diff --git a/docs/909.bundle.js b/docs/909.bundle.js index d4ee221..859462a 100644 --- a/docs/909.bundle.js +++ b/docs/909.bundle.js @@ -1,4 +1,4 @@ -(()=>{var e={887:function(e,t,n){var i,r;i=0,r=function(){"use strict";function t(e,t,n){var i=new XMLHttpRequest;i.open("GET",e),i.responseType="blob",i.onload=function(){a(i.response,t,n)},i.onerror=function(){console.error("could not download file")},i.send()}function i(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function r(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,n,s){var a=o.URL||o.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?r(l):i(l.href)?t(e,n,s):r(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout(function(){a.revokeObjectURL(l.href)},4e4),setTimeout(function(){r(l)},0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e){var s,a;navigator.msSaveOrOpenBlob((s=e,void 0===(a=o)?a={autoBom:!1}:"object"!=typeof a&&(console.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s),n)}else if(i(e))t(e,n,o);else{var l=document.createElement("a");l.href=e,l.target="_blank",setTimeout(function(){r(l)})}}:function(e,n,i,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,i);var a="application/octet-stream"===e.type,l=/constructor/i.test(o.HTMLElement)||o.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||a&&l||s)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},c.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,h=d.createObjectURL(e);r?r.location=h:location.href=h,r=null,setTimeout(function(){d.revokeObjectURL(h)},4e4)}});o.saveAs=a.saveAs=a,e.exports=a},"function"==typeof define&&define.amd?define([],r):r()},461:function(e,t,n){e=n.nmd(e);var i=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function r(e,t){if(!i[e]){i[e]={};for(var n=0;n>>8,n[2*i+1]=s%256}return n},decompressFromUint8Array:function(t){if(null==t)return o.decompress(t);for(var n=Array(t.length/2),i=0,r=n.length;ic.charCodeAt(0)){for(i=0;i>=1}else{for(i=0,r=1;i>=1}0==--d&&(d=Math.pow(2,p),p++),delete a[c]}else for(i=0,r=s[c];i>=1;0==--d&&(d=Math.pow(2,p),p++),s[u]=h++,c=String(l)}if(""!==c){if(Object.prototype.hasOwnProperty.call(a,c)){if(256>c.charCodeAt(0)){for(i=0;i>=1}else{for(i=0,r=1;i>=1}0==--d&&(d=Math.pow(2,p),p++),delete a[c]}else for(i=0,r=s[c];i>=1;0==--d&&(d=Math.pow(2,p),p++)}for(i=0,r=2;i>=1;for(;;){if(m<<=1,g==t-1){f.push(n(m));break}g++}return f.join("")},decompress:function(e){return null==e?"":""==e?null:o._decompress(e.length,32768,function(t){return e.charCodeAt(t)})},_decompress:function(t,n,i){var r,o,s,a,l,u,c,d,h=[],p=4,f=4,m=3,g="",y=[],v={val:i(0),position:n,index:1};for(o=0;o<3;o+=1)h[o]=o;for(a=0,u=4,c=1;c!=u;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=i(v.index++)),a|=(l>0?1:0)*c,c<<=1;switch(a){case 0:for(a=0,u=256,c=1;c!=u;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=i(v.index++)),a|=(l>0?1:0)*c,c<<=1;d=e(a);break;case 1:for(a=0,u=65536,c=1;c!=u;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=i(v.index++)),a|=(l>0?1:0)*c,c<<=1;d=e(a);break;case 2:return""}for(h[3]=d,s=d,y.push(d);;){if(v.index>t)return"";for(a=0,u=Math.pow(2,m),c=1;c!=u;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=i(v.index++)),a|=(l>0?1:0)*c,c<<=1;switch(d=a){case 0:for(a=0,u=256,c=1;c!=u;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=i(v.index++)),a|=(l>0?1:0)*c,c<<=1;h[f++]=e(a),d=f-1,p--;break;case 1:for(a=0,u=65536,c=1;c!=u;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=i(v.index++)),a|=(l>0?1:0)*c,c<<=1;h[f++]=e(a),d=f-1,p--;break;case 2:return y.join("")}if(0==p&&(p=Math.pow(2,m),m++),h[d])g=h[d];else{if(d!==f)return null;g=s+s.charAt(0)}y.push(g),h[f++]=s+g.charAt(0),p--,s=g,0==p&&(p=Math.pow(2,m),m++)}}};return o}();"function"==typeof define&&define.amd?define(function(){return i}):null!=e?e.exports=i:"undefined"!=typeof angular&&null!=angular&&angular.module("LZString",[]).factory("LZString",function(){return i})},142:function(e,t,n){e=n.nmd(e);var i,r,o,s,a,l,u,c,d,h,p,f,m,g,y,v,w,b,E,T,_,x,A,S,L,I,N,k,D,C,j,O,R,z,P,B,U,F,Y,W,H,Q,V,G,K,q,Z,X,J,ee,et,en,ei,er,eo,es,ea,el,eu,ec,ed,eh,ep,ef,em,eg,ey,ev,ew,eb,eM,eE,eT,e_,ex,eA,eS,eL,eI,eN,ek=function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},eD=function(){function e(e,t){for(var n=0;n/,p=/^\w+$/;function f(e,n){return n=n||t,d.test(e)?n.getElementsByClassName(e.slice(1)):p.test(e)?n.getElementsByTagName(e):n.querySelectorAll(e)}function m(n){if(!e){var i=(e=t.implementation.createHTMLDocument(null)).createElement("base");i.href=t.location.href,e.head.appendChild(i)}return e.body.innerHTML=n,e.body.childNodes}function g(e){"loading"!==t.readyState?e():t.addEventListener("DOMContentLoaded",e)}function y(e,i){if(!e)return this;if(e.cash&&e!==n)return e;var r,o=e,s=0;if(u(e))o=c.test(e)?t.getElementById(e.slice(1)):h.test(e)?m(e):f(e,i);else if(l(e))return g(e),this;if(!o)return this;if(o.nodeType||o===n)this[0]=o,this.length=1;else for(r=this.length=o.length;sr.right-n||l+t.width>window.innerWidth-n)&&(i.right=!0),(uo-n||u+t.height>window.innerHeight-n)&&(i.bottom=!0),i},M.checkPossibleAlignments=function(e,t,n,i){var r={top:!0,right:!0,bottom:!0,left:!0,spaceOnTop:null,spaceOnRight:null,spaceOnBottom:null,spaceOnLeft:null},o="visible"===getComputedStyle(t).overflow,s=t.getBoundingClientRect(),a=Math.min(s.height,window.innerHeight),l=Math.min(s.width,window.innerWidth),u=e.getBoundingClientRect(),c=t.scrollLeft,d=t.scrollTop,h=n.left-c,p=n.top-d,f=n.top+u.height-d;return r.spaceOnRight=o?window.innerWidth-(u.left+n.width):l-(h+n.width),r.spaceOnRight<0&&(r.left=!1),r.spaceOnLeft=o?u.right-n.width:h-n.width+u.width,r.spaceOnLeft<0&&(r.right=!1),r.spaceOnBottom=o?window.innerHeight-(u.top+n.height+i):a-(p+n.height+i),r.spaceOnBottom<0&&(r.top=!1),r.spaceOnTop=o?u.bottom-(n.height+i):f-(n.height-i),r.spaceOnTop<0&&(r.bottom=!1),r},M.getOverflowParent=function(e){return null==e?null:e===document.body||"visible"!==getComputedStyle(e).overflow?e:M.getOverflowParent(e.parentElement)},M.getIdFromTrigger=function(e){var t=e.getAttribute("data-target");return t||(t=(t=e.getAttribute("href"))?t.slice(1):""),t},M.getDocumentScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},M.getDocumentScrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0};var ez=Date.now||function(){return(new Date).getTime()};M.throttle=function(e,t,n){var i=void 0,r=void 0,o=void 0,s=null,a=0;n||(n={});var l=function(){a=!1===n.leading?0:ez(),s=null,o=e.apply(i,r),i=r=null};return function(){var u=ez();a||!1!==n.leading||(a=u);var c=t-(u-a);return i=this,r=arguments,c<=0?(clearTimeout(s),s=null,a=u,o=e.apply(i,r),i=r=null):s||!1===n.trailing||(s=setTimeout(l,c)),o}};var eP={scope:{}};eP.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){if(n.get||n.set)throw TypeError("ES3 does not support getters and setters.");e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},eP.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:void 0!==n.g&&null!=n.g?n.g:e},eP.global=eP.getGlobal(this),eP.SYMBOL_PREFIX="jscomp_symbol_",eP.initSymbol=function(){eP.initSymbol=function(){},eP.global.Symbol||(eP.global.Symbol=eP.Symbol)},eP.symbolCounter_=0,eP.Symbol=function(e){return eP.SYMBOL_PREFIX+(e||"")+eP.symbolCounter_++},eP.initSymbolIterator=function(){eP.initSymbol();var e=eP.global.Symbol.iterator;e||(e=eP.global.Symbol.iterator=eP.global.Symbol("iterator")),"function"!=typeof Array.prototype[e]&&eP.defineProperty(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return eP.arrayIterator(this)}}),eP.initSymbolIterator=function(){}},eP.arrayIterator=function(e){var t=0;return eP.iteratorPrototype(function(){return t=B.currentTime)for(var c=0;cn&&(t.duration=i.duration),t.children.push(i)}),t.seek(0),t.reset(),t.autoplay&&t.restart(),t},t},b.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},b}(),r=cash,o=M.anime,s={accordion:!0,onOpenStart:void 0,onOpenEnd:void 0,onCloseStart:void 0,onCloseEnd:void 0,inDuration:300,outDuration:300},a=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));(i.el.M_Collapsible=i).options=r.extend({},t.defaults,n),i.$headers=i.$el.children("li").children(".collapsible-header"),i.$headers.attr("tabindex",0),i._setupEventHandlers();var o=i.$el.children("li.active").children(".collapsible-body");return i.options.accordion?o.first().css("display","block"):o.css("display","block"),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Collapsible=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleCollapsibleClickBound=this._handleCollapsibleClick.bind(this),this._handleCollapsibleKeydownBound=this._handleCollapsibleKeydown.bind(this),this.el.addEventListener("click",this._handleCollapsibleClickBound),this.$headers.each(function(t){t.addEventListener("keydown",e._handleCollapsibleKeydownBound)})}},{key:"_removeEventHandlers",value:function(){var e=this;this.el.removeEventListener("click",this._handleCollapsibleClickBound),this.$headers.each(function(t){t.removeEventListener("keydown",e._handleCollapsibleKeydownBound)})}},{key:"_handleCollapsibleClick",value:function(e){var t=r(e.target).closest(".collapsible-header");if(e.target&&t.length){var n=t.closest(".collapsible");if(n[0]===this.el){var i=t.closest("li"),o=n.children("li"),s=i[0].classList.contains("active"),a=o.index(i);s?this.close(a):this.open(a)}}}},{key:"_handleCollapsibleKeydown",value:function(e){13===e.keyCode&&this._handleCollapsibleClickBound(e)}},{key:"_animateIn",value:function(e){var t=this,n=this.$el.children("li").eq(e);if(n.length){var i=n.children(".collapsible-body");o.remove(i[0]),i.css({display:"block",overflow:"hidden",height:0,paddingTop:"",paddingBottom:""});var r=i.css("padding-top"),s=i.css("padding-bottom"),a=i[0].scrollHeight;i.css({paddingTop:0,paddingBottom:0}),o({targets:i[0],height:a,paddingTop:r,paddingBottom:s,duration:this.options.inDuration,easing:"easeInOutCubic",complete:function(e){i.css({overflow:"",paddingTop:"",paddingBottom:"",height:""}),"function"==typeof t.options.onOpenEnd&&t.options.onOpenEnd.call(t,n[0])}})}}},{key:"_animateOut",value:function(e){var t=this,n=this.$el.children("li").eq(e);if(n.length){var i=n.children(".collapsible-body");o.remove(i[0]),i.css("overflow","hidden"),o({targets:i[0],height:0,paddingTop:0,paddingBottom:0,duration:this.options.outDuration,easing:"easeInOutCubic",complete:function(){i.css({height:"",overflow:"",padding:"",display:""}),"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t,n[0])}})}}},{key:"open",value:function(e){var t=this,n=this.$el.children("li").eq(e);if(n.length&&!n[0].classList.contains("active")){if("function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,n[0]),this.options.accordion){var i=this.$el.children("li");this.$el.children("li.active").each(function(e){var n=i.index(r(e));t.close(n)})}n[0].classList.add("active"),this._animateIn(e)}}},{key:"close",value:function(e){var t=this.$el.children("li").eq(e);t.length&&t[0].classList.contains("active")&&("function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,t[0]),t[0].classList.remove("active"),this._animateOut(e))}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Collapsible}},{key:"defaults",get:function(){return s}}]),t}(),M.Collapsible=a,M.jQueryLoaded&&M.initializeJqueryWrapper(a,"collapsible","M_Collapsible"),l=cash,u=M.anime,c={alignment:"left",autoFocus:!0,constrainWidth:!0,container:null,coverTrigger:!0,closeOnClick:!0,hover:!1,inDuration:150,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onItemClick:null},(d=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return i.el.M_Dropdown=i,t._dropdowns.push(i),i.id=M.getIdFromTrigger(e),i.dropdownEl=document.getElementById(i.id),i.$dropdownEl=l(i.dropdownEl),i.options=l.extend({},t.defaults,n),i.isOpen=!1,i.isScrollable=!1,i.isTouchMoving=!1,i.focusedIndex=-1,i.filterQuery=[],i.options.container?l(i.options.container).append(i.dropdownEl):i.$el.after(i.dropdownEl),i._makeDropdownFocusable(),i._resetFilterQueryBound=i._resetFilterQuery.bind(i),i._handleDocumentClickBound=i._handleDocumentClick.bind(i),i._handleDocumentTouchmoveBound=i._handleDocumentTouchmove.bind(i),i._handleDropdownClickBound=i._handleDropdownClick.bind(i),i._handleDropdownKeydownBound=i._handleDropdownKeydown.bind(i),i._handleTriggerKeydownBound=i._handleTriggerKeydown.bind(i),i._setupEventHandlers(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._resetDropdownStyles(),this._removeEventHandlers(),t._dropdowns.splice(t._dropdowns.indexOf(this),1),this.el.M_Dropdown=void 0}},{key:"_setupEventHandlers",value:function(){this.el.addEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.addEventListener("click",this._handleDropdownClickBound),this.options.hover?(this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.addEventListener("mouseleave",this._handleMouseLeaveBound)):(this._handleClickBound=this._handleClick.bind(this),this.el.addEventListener("click",this._handleClickBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.removeEventListener("click",this._handleDropdownClickBound),this.options.hover?(this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.removeEventListener("mouseleave",this._handleMouseLeaveBound)):this.el.removeEventListener("click",this._handleClickBound)}},{key:"_setupTemporaryEventHandlers",value:function(){document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound),document.body.addEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.addEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_removeTemporaryEventHandlers",value:function(){document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound),document.body.removeEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.removeEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_handleClick",value:function(e){e.preventDefault(),this.open()}},{key:"_handleMouseEnter",value:function(){this.open()}},{key:"_handleMouseLeave",value:function(e){var t=e.toElement||e.relatedTarget,n=!!l(t).closest(".dropdown-content").length,i=!1,r=l(t).closest(".dropdown-trigger");r.length&&r[0].M_Dropdown&&r[0].M_Dropdown.isOpen&&(i=!0),i||n||this.close()}},{key:"_handleDocumentClick",value:function(e){var t=this,n=l(e.target);this.options.closeOnClick&&n.closest(".dropdown-content").length&&!this.isTouchMoving?setTimeout(function(){t.close()},0):!n.closest(".dropdown-trigger").length&&n.closest(".dropdown-content").length||setTimeout(function(){t.close()},0),this.isTouchMoving=!1}},{key:"_handleTriggerKeydown",value:function(e){e.which!==M.keys.ARROW_DOWN&&e.which!==M.keys.ENTER||this.isOpen||(e.preventDefault(),this.open())}},{key:"_handleDocumentTouchmove",value:function(e){l(e.target).closest(".dropdown-content").length&&(this.isTouchMoving=!0)}},{key:"_handleDropdownClick",value:function(e){if("function"==typeof this.options.onItemClick){var t=l(e.target).closest("li")[0];this.options.onItemClick.call(this,t)}}},{key:"_handleDropdownKeydown",value:function(e){if(e.which===M.keys.TAB)e.preventDefault(),this.close();else if((e.which===M.keys.ARROW_DOWN||e.which===M.keys.ARROW_UP)&&this.isOpen){e.preventDefault();var t=e.which===M.keys.ARROW_DOWN?1:-1,n=this.focusedIndex,i=!1;do if(n+=t,this.dropdownEl.children[n]&&-1!==this.dropdownEl.children[n].tabIndex){i=!0;break}while(nl.spaceOnBottom?(u="bottom",n+=l.spaceOnTop,o-=l.spaceOnTop):n+=l.spaceOnBottom)),!l[c]){var d="left"===c?"right":"left";l[d]?c=d:l.spaceOnLeft>l.spaceOnRight?(c="right",i+=l.spaceOnLeft,r-=l.spaceOnLeft):(c="left",i+=l.spaceOnRight)}return"bottom"===u&&(o=o-t.height+(this.options.coverTrigger?e.height:0)),"right"===c&&(r=r-t.width+e.width),{x:r,y:o,verticalAlignment:u,horizontalAlignment:c,height:n,width:i}}},{key:"_animateIn",value:function(){var e=this;u.remove(this.dropdownEl),u({targets:this.dropdownEl,opacity:{value:[0,1],easing:"easeOutQuad"},scaleX:[.3,1],scaleY:[.3,1],duration:this.options.inDuration,easing:"easeOutQuint",complete:function(t){e.options.autoFocus&&e.dropdownEl.focus(),"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el)}})}},{key:"_animateOut",value:function(){var e=this;u.remove(this.dropdownEl),u({targets:this.dropdownEl,opacity:{value:0,easing:"easeOutQuint"},scaleX:.3,scaleY:.3,duration:this.options.outDuration,easing:"easeOutQuint",complete:function(t){e._resetDropdownStyles(),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}})}},{key:"_placeDropdown",value:function(){var e=this.options.constrainWidth?this.el.getBoundingClientRect().width:this.dropdownEl.getBoundingClientRect().width;this.dropdownEl.style.width=e+"px";var t=this._getDropdownPosition();this.dropdownEl.style.left=t.x+"px",this.dropdownEl.style.top=t.y+"px",this.dropdownEl.style.height=t.height+"px",this.dropdownEl.style.width=t.width+"px",this.dropdownEl.style.transformOrigin=("left"===t.horizontalAlignment?"0":"100%")+" "+("top"===t.verticalAlignment?"0":"100%")}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this._resetDropdownStyles(),this.dropdownEl.style.display="block",this._placeDropdown(),this._animateIn(),this._setupTemporaryEventHandlers())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.focusedIndex=-1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this._animateOut(),this._removeTemporaryEventHandlers(),this.options.autoFocus&&this.el.focus())}},{key:"recalculateDimensions",value:function(){this.isOpen&&(this.$dropdownEl.css({width:"",height:"",left:"",top:"","transform-origin":""}),this._placeDropdown())}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Dropdown}},{key:"defaults",get:function(){return c}}]),t}())._dropdowns=[],M.Dropdown=d,M.jQueryLoaded&&M.initializeJqueryWrapper(d,"dropdown","M_Dropdown"),h=cash,p=M.anime,f={opacity:.5,inDuration:250,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,preventScrolling:!0,dismissible:!0,startingTop:"4%",endingTop:"10%"},(m=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_Modal=i).options=h.extend({},t.defaults,n),i.isOpen=!1,i.id=i.$el.attr("id"),i._openingTrigger=void 0,i.$overlay=h(''),i.el.tabIndex=0,i._nthModalOpened=0,t._count++,i._setupEventHandlers(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){t._count--,this._removeEventHandlers(),this.el.removeAttribute("style"),this.$overlay.remove(),this.el.M_Modal=void 0}},{key:"_setupEventHandlers",value:function(){this._handleOverlayClickBound=this._handleOverlayClick.bind(this),this._handleModalCloseClickBound=this._handleModalCloseClick.bind(this),1===t._count&&document.body.addEventListener("click",this._handleTriggerClick),this.$overlay[0].addEventListener("click",this._handleOverlayClickBound),this.el.addEventListener("click",this._handleModalCloseClickBound)}},{key:"_removeEventHandlers",value:function(){0===t._count&&document.body.removeEventListener("click",this._handleTriggerClick),this.$overlay[0].removeEventListener("click",this._handleOverlayClickBound),this.el.removeEventListener("click",this._handleModalCloseClickBound)}},{key:"_handleTriggerClick",value:function(e){var t=h(e.target).closest(".modal-trigger");if(t.length){var n=M.getIdFromTrigger(t[0]),i=document.getElementById(n).M_Modal;i&&i.open(t),e.preventDefault()}}},{key:"_handleOverlayClick",value:function(){this.options.dismissible&&this.close()}},{key:"_handleModalCloseClick",value:function(e){h(e.target).closest(".modal-close").length&&this.close()}},{key:"_handleKeydown",value:function(e){27===e.keyCode&&this.options.dismissible&&this.close()}},{key:"_handleFocus",value:function(e){this.el.contains(e.target)||this._nthModalOpened!==t._modalsOpen||this.el.focus()}},{key:"_animateIn",value:function(){var e=this;h.extend(this.el.style,{display:"block",opacity:0}),h.extend(this.$overlay[0].style,{display:"block",opacity:0}),p({targets:this.$overlay[0],opacity:this.options.opacity,duration:this.options.inDuration,easing:"easeOutQuad"});var t={targets:this.el,duration:this.options.inDuration,easing:"easeOutCubic",complete:function(){"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el,e._openingTrigger)}};this.el.classList.contains("bottom-sheet")?h.extend(t,{bottom:0,opacity:1}):h.extend(t,{top:[this.options.startingTop,this.options.endingTop],opacity:1,scaleX:[.8,1],scaleY:[.8,1]}),p(t)}},{key:"_animateOut",value:function(){var e=this;p({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuart"});var t={targets:this.el,duration:this.options.outDuration,easing:"easeOutCubic",complete:function(){e.el.style.display="none",e.$overlay.remove(),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}};this.el.classList.contains("bottom-sheet")?h.extend(t,{bottom:"-100%",opacity:0}):h.extend(t,{top:[this.options.endingTop,this.options.startingTop],opacity:0,scaleX:.8,scaleY:.8}),p(t)}},{key:"open",value:function(e){if(!this.isOpen)return this.isOpen=!0,t._modalsOpen++,this._nthModalOpened=t._modalsOpen,this.$overlay[0].style.zIndex=1e3+2*t._modalsOpen,this.el.style.zIndex=1e3+2*t._modalsOpen+1,this._openingTrigger=e?e[0]:void 0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el,this._openingTrigger),this.options.preventScrolling&&(document.body.style.overflow="hidden"),this.el.classList.add("open"),this.el.insertAdjacentElement("afterend",this.$overlay[0]),this.options.dismissible&&(this._handleKeydownBound=this._handleKeydown.bind(this),this._handleFocusBound=this._handleFocus.bind(this),document.addEventListener("keydown",this._handleKeydownBound),document.addEventListener("focus",this._handleFocusBound,!0)),p.remove(this.el),p.remove(this.$overlay[0]),this._animateIn(),this.el.focus(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,t._modalsOpen--,this._nthModalOpened=0,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this.el.classList.remove("open"),0===t._modalsOpen&&(document.body.style.overflow=""),this.options.dismissible&&(document.removeEventListener("keydown",this._handleKeydownBound),document.removeEventListener("focus",this._handleFocusBound,!0)),p.remove(this.el),p.remove(this.$overlay[0]),this._animateOut(),this}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Modal}},{key:"defaults",get:function(){return f}}]),t}())._modalsOpen=0,m._count=0,M.Modal=m,M.jQueryLoaded&&M.initializeJqueryWrapper(m,"modal","M_Modal"),g=cash,y=M.anime,v={inDuration:275,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null},w=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_Materialbox=i).options=g.extend({},t.defaults,n),i.overlayActive=!1,i.doneAnimating=!0,i.placeholder=g("
").addClass("material-placeholder"),i.originalWidth=0,i.originalHeight=0,i.originInlineStyles=i.$el.attr("style"),i.caption=i.el.getAttribute("data-caption")||"",i.$el.before(i.placeholder),i.placeholder.append(i.$el),i._setupEventHandlers(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Materialbox=void 0,g(this.placeholder).after(this.el).remove(),this.$el.removeAttr("style")}},{key:"_setupEventHandlers",value:function(){this._handleMaterialboxClickBound=this._handleMaterialboxClick.bind(this),this.el.addEventListener("click",this._handleMaterialboxClickBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleMaterialboxClickBound)}},{key:"_handleMaterialboxClick",value:function(e){!1===this.doneAnimating||this.overlayActive&&this.doneAnimating?this.close():this.open()}},{key:"_handleWindowScroll",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowResize",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowEscape",value:function(e){27===e.keyCode&&this.doneAnimating&&this.overlayActive&&this.close()}},{key:"_makeAncestorsOverflowVisible",value:function(){this.ancestorsChanged=g();for(var e=this.placeholder[0].parentNode;null!==e&&!g(e).is(document);){var t=g(e);"visible"!==t.css("overflow")&&(t.css("overflow","visible"),void 0===this.ancestorsChanged?this.ancestorsChanged=t:this.ancestorsChanged=this.ancestorsChanged.add(t)),e=e.parentNode}}},{key:"_animateImageIn",value:function(){var e=this,t={targets:this.el,height:[this.originalHeight,this.newHeight],width:[this.originalWidth,this.newWidth],left:M.getDocumentScrollLeft()+this.windowWidth/2-this.placeholder.offset().left-this.newWidth/2,top:M.getDocumentScrollTop()+this.windowHeight/2-this.placeholder.offset().top-this.newHeight/2,duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){e.doneAnimating=!0,"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el)}};this.maxWidth=this.$el.css("max-width"),this.maxHeight=this.$el.css("max-height"),"none"!==this.maxWidth&&(t.maxWidth=this.newWidth),"none"!==this.maxHeight&&(t.maxHeight=this.newHeight),y(t)}},{key:"_animateImageOut",value:function(){var e=this;y({targets:this.el,width:this.originalWidth,height:this.originalHeight,left:0,top:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){e.placeholder.css({height:"",width:"",position:"",top:"",left:""}),e.attrWidth&&e.$el.attr("width",e.attrWidth),e.attrHeight&&e.$el.attr("height",e.attrHeight),e.$el.removeAttr("style"),e.originInlineStyles&&e.$el.attr("style",e.originInlineStyles),e.$el.removeClass("active"),e.doneAnimating=!0,e.ancestorsChanged.length&&e.ancestorsChanged.css("overflow",""),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}})}},{key:"_updateVars",value:function(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.caption=this.el.getAttribute("data-caption")||""}},{key:"open",value:function(){var e=this;this._updateVars(),this.originalWidth=this.el.getBoundingClientRect().width,this.originalHeight=this.el.getBoundingClientRect().height,this.doneAnimating=!1,this.$el.addClass("active"),this.overlayActive=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this.placeholder.css({width:this.placeholder[0].getBoundingClientRect().width+"px",height:this.placeholder[0].getBoundingClientRect().height+"px",position:"relative",top:0,left:0}),this._makeAncestorsOverflowVisible(),this.$el.css({position:"absolute","z-index":1e3,"will-change":"left, top, width, height"}),this.attrWidth=this.$el.attr("width"),this.attrHeight=this.$el.attr("height"),this.attrWidth&&(this.$el.css("width",this.attrWidth+"px"),this.$el.removeAttr("width")),this.attrHeight&&(this.$el.css("width",this.attrHeight+"px"),this.$el.removeAttr("height")),this.$overlay=g('
').css({opacity:0}).one("click",function(){e.doneAnimating&&e.close()}),this.$el.before(this.$overlay);var t=this.$overlay[0].getBoundingClientRect();this.$overlay.css({width:this.windowWidth+"px",height:this.windowHeight+"px",left:-1*t.left+"px",top:-1*t.top+"px"}),y.remove(this.el),y.remove(this.$overlay[0]),y({targets:this.$overlay[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}),""!==this.caption&&(this.$photocaption&&y.remove(this.$photoCaption[0]),this.$photoCaption=g('
'),this.$photoCaption.text(this.caption),g("body").append(this.$photoCaption),this.$photoCaption.css({display:"inline"}),y({targets:this.$photoCaption[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}));var n=0,i=this.originalWidth/this.windowWidth,r=this.originalHeight/this.windowHeight;this.newWidth=0,this.newHeight=0,ri.options.responsiveThreshold,i.$img=i.$el.find("img").first(),i.$img.each(function(){this.complete&&b(this).trigger("load")}),i._updateParallax(),i._setupEventHandlers(),i._setupStyles(),t._parallaxes.push(i),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){t._parallaxes.splice(t._parallaxes.indexOf(this),1),this.$img[0].style.transform="",this._removeEventHandlers(),this.$el[0].M_Parallax=void 0}},{key:"_setupEventHandlers",value:function(){this._handleImageLoadBound=this._handleImageLoad.bind(this),this.$img[0].addEventListener("load",this._handleImageLoadBound),0===t._parallaxes.length&&(t._handleScrollThrottled=M.throttle(t._handleScroll,5),window.addEventListener("scroll",t._handleScrollThrottled),t._handleWindowResizeThrottled=M.throttle(t._handleWindowResize,5),window.addEventListener("resize",t._handleWindowResizeThrottled))}},{key:"_removeEventHandlers",value:function(){this.$img[0].removeEventListener("load",this._handleImageLoadBound),0===t._parallaxes.length&&(window.removeEventListener("scroll",t._handleScrollThrottled),window.removeEventListener("resize",t._handleWindowResizeThrottled))}},{key:"_setupStyles",value:function(){this.$img[0].style.opacity=1}},{key:"_handleImageLoad",value:function(){this._updateParallax()}},{key:"_updateParallax",value:function(){var e=0n.options.responsiveThreshold}}},{key:"defaults",get:function(){return E}}]),t}())._parallaxes=[],M.Parallax=T,M.jQueryLoaded&&M.initializeJqueryWrapper(T,"parallax","M_Parallax"),_=cash,x=M.anime,A={duration:300,onShow:null,swipeable:!1,responsiveThreshold:1/0},S=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_Tabs=i).options=_.extend({},t.defaults,n),i.$tabLinks=i.$el.children("li.tab").children("a"),i.index=0,i._setupActiveTabLink(),i.options.swipeable?i._setupSwipeableTabs():i._setupNormalTabs(),i._setTabsAndTabWidth(),i._createIndicator(),i._setupEventHandlers(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this._indicator.parentNode.removeChild(this._indicator),this.options.swipeable?this._teardownSwipeableTabs():this._teardownNormalTabs(),this.$el[0].M_Tabs=void 0}},{key:"_setupEventHandlers",value:function(){this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound),this._handleTabClickBound=this._handleTabClick.bind(this),this.el.addEventListener("click",this._handleTabClickBound)}},{key:"_removeEventHandlers",value:function(){window.removeEventListener("resize",this._handleWindowResizeBound),this.el.removeEventListener("click",this._handleTabClickBound)}},{key:"_handleWindowResize",value:function(){this._setTabsAndTabWidth(),0!==this.tabWidth&&0!==this.tabsWidth&&(this._indicator.style.left=this._calcLeftPos(this.$activeTabLink)+"px",this._indicator.style.right=this._calcRightPos(this.$activeTabLink)+"px")}},{key:"_handleTabClick",value:function(e){var t=this,n=_(e.target).closest("li.tab"),i=_(e.target).closest("a");if(i.length&&i.parent().hasClass("tab")){if(n.hasClass("disabled"))e.preventDefault();else if(!i.attr("target")){this.$activeTabLink.removeClass("active");var r=this.$content;this.$activeTabLink=i,this.$content=_(M.escapeHash(i[0].hash)),this.$tabLinks=this.$el.children("li.tab").children("a"),this.$activeTabLink.addClass("active");var o=this.index;this.index=Math.max(this.$tabLinks.index(i),0),this.options.swipeable?this._tabsCarousel&&this._tabsCarousel.set(this.index,function(){"function"==typeof t.options.onShow&&t.options.onShow.call(t,t.$content[0])}):this.$content.length&&(this.$content[0].style.display="block",this.$content.addClass("active"),"function"==typeof this.options.onShow&&this.options.onShow.call(this,this.$content[0]),r.length&&!r.is(this.$content)&&(r[0].style.display="none",r.removeClass("active"))),this._setTabsAndTabWidth(),this._animateIndicator(o),e.preventDefault()}}}},{key:"_createIndicator",value:function(){var e=this,t=document.createElement("li");t.classList.add("indicator"),this.el.appendChild(t),this._indicator=t,setTimeout(function(){e._indicator.style.left=e._calcLeftPos(e.$activeTabLink)+"px",e._indicator.style.right=e._calcRightPos(e.$activeTabLink)+"px"},0)}},{key:"_setupActiveTabLink",value:function(){this.$activeTabLink=_(this.$tabLinks.filter('[href="'+location.hash+'"]')),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a.active").first()),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a").first()),this.$tabLinks.removeClass("active"),this.$activeTabLink[0].classList.add("active"),this.index=Math.max(this.$tabLinks.index(this.$activeTabLink),0),this.$activeTabLink.length&&(this.$content=_(M.escapeHash(this.$activeTabLink[0].hash)),this.$content.addClass("active"))}},{key:"_setupSwipeableTabs",value:function(){var e=this;window.innerWidth>this.options.responsiveThreshold&&(this.options.swipeable=!1);var t=_();this.$tabLinks.each(function(e){var n=_(M.escapeHash(e.hash));n.addClass("carousel-item"),t=t.add(n)});var n=_('');t.first().before(n),n.append(t),t[0].style.display="";var i=this.$activeTabLink.closest(".tab").index();this._tabsCarousel=M.Carousel.init(n[0],{fullWidth:!0,noWrap:!0,onCycleTo:function(t){var n=e.index;e.index=_(t).index(),e.$activeTabLink.removeClass("active"),e.$activeTabLink=e.$tabLinks.eq(e.index),e.$activeTabLink.addClass("active"),e._animateIndicator(n),"function"==typeof e.options.onShow&&e.options.onShow.call(e,e.$content[0])}}),this._tabsCarousel.set(i)}},{key:"_teardownSwipeableTabs",value:function(){var e=this._tabsCarousel.$el;this._tabsCarousel.destroy(),e.after(e.children()),e.remove()}},{key:"_setupNormalTabs",value:function(){this.$tabLinks.not(this.$activeTabLink).each(function(e){if(e.hash){var t=_(M.escapeHash(e.hash));t.length&&(t[0].style.display="none")}})}},{key:"_teardownNormalTabs",value:function(){this.$tabLinks.each(function(e){if(e.hash){var t=_(M.escapeHash(e.hash));t.length&&(t[0].style.display="")}})}},{key:"_setTabsAndTabWidth",value:function(){this.tabsWidth=this.$el.width(),this.tabWidth=Math.max(this.tabsWidth,this.el.scrollWidth)/this.$tabLinks.length}},{key:"_calcRightPos",value:function(e){return Math.ceil(this.tabsWidth-e.position().left-e[0].getBoundingClientRect().width)}},{key:"_calcLeftPos",value:function(e){return Math.floor(e.position().left)}},{key:"updateTabIndicator",value:function(){this._setTabsAndTabWidth(),this._animateIndicator(this.index)}},{key:"_animateIndicator",value:function(e){var t=0,n=0;0<=this.index-e?t=90:n=90;var i={targets:this._indicator,left:{value:this._calcLeftPos(this.$activeTabLink),delay:t},right:{value:this._calcRightPos(this.$activeTabLink),delay:n},duration:this.options.duration,easing:"easeOutQuad"};x.remove(this._indicator),x(i)}},{key:"select",value:function(e){var t=this.$tabLinks.filter('[href="#'+e+'"]');t.length&&t.trigger("click")}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Tabs}},{key:"defaults",get:function(){return A}}]),t}(),M.Tabs=S,M.jQueryLoaded&&M.initializeJqueryWrapper(S,"tabs","M_Tabs"),L=cash,I=M.anime,N={exitDelay:200,enterDelay:0,html:null,margin:5,inDuration:250,outDuration:200,position:"bottom",transitionMovement:10},k=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_Tooltip=i).options=L.extend({},t.defaults,n),i.isOpen=!1,i.isHovered=!1,i.isFocused=!1,i._appendTooltipEl(),i._setupEventHandlers(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){L(this.tooltipEl).remove(),this._removeEventHandlers(),this.el.M_Tooltip=void 0}},{key:"_appendTooltipEl",value:function(){var e=document.createElement("div");e.classList.add("material-tooltip"),this.tooltipEl=e;var t=document.createElement("div");t.classList.add("tooltip-content"),t.innerHTML=this.options.html,e.appendChild(t),document.body.appendChild(e)}},{key:"_updateTooltipContent",value:function(){this.tooltipEl.querySelector(".tooltip-content").innerHTML=this.options.html}},{key:"_setupEventHandlers",value:function(){this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this._handleFocusBound=this._handleFocus.bind(this),this._handleBlurBound=this._handleBlur.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.el.addEventListener("focus",this._handleFocusBound,!0),this.el.addEventListener("blur",this._handleBlurBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.el.removeEventListener("focus",this._handleFocusBound,!0),this.el.removeEventListener("blur",this._handleBlurBound,!0)}},{key:"open",value:function(e){this.isOpen||(e=void 0===e||void 0,this.isOpen=!0,this.options=L.extend({},this.options,this._getAttributeOptions()),this._updateTooltipContent(),this._setEnterDelayTimeout(e))}},{key:"close",value:function(){this.isOpen&&(this.isHovered=!1,this.isFocused=!1,this.isOpen=!1,this._setExitDelayTimeout())}},{key:"_setExitDelayTimeout",value:function(){var e=this;clearTimeout(this._exitDelayTimeout),this._exitDelayTimeout=setTimeout(function(){e.isHovered||e.isFocused||e._animateOut()},this.options.exitDelay)}},{key:"_setEnterDelayTimeout",value:function(e){var t=this;clearTimeout(this._enterDelayTimeout),this._enterDelayTimeout=setTimeout(function(){(t.isHovered||t.isFocused||e)&&t._animateIn()},this.options.enterDelay)}},{key:"_positionTooltip",value:function(){var e,t=this.el,n=this.tooltipEl,i=t.offsetHeight,r=t.offsetWidth,o=n.offsetHeight,s=n.offsetWidth,a=this.options.margin,l=void 0,u=void 0;this.xMovement=0,this.yMovement=0,l=t.getBoundingClientRect().top+M.getDocumentScrollTop(),u=t.getBoundingClientRect().left+M.getDocumentScrollLeft(),"top"===this.options.position?(l+=-o-a,u+=r/2-s/2,this.yMovement=-this.options.transitionMovement):"right"===this.options.position?(l+=i/2-o/2,u+=r+a,this.xMovement=this.options.transitionMovement):"left"===this.options.position?(l+=i/2-o/2,u+=-s-a,this.xMovement=-this.options.transitionMovement):(l+=i+a,u+=r/2-s/2,this.yMovement=this.options.transitionMovement),e=this._repositionWithinScreen(u,l,s,o),L(n).css({top:e.y+"px",left:e.x+"px"})}},{key:"_repositionWithinScreen",value:function(e,t,n,i){var r=M.getDocumentScrollLeft(),o=M.getDocumentScrollTop(),s=e-r,a=t-o,l={left:s,top:a,width:n,height:i},u=this.options.margin+this.options.transitionMovement,c=M.checkWithinContainer(document.body,l,u);return c.left?s=u:c.right&&(s-=s+n-window.innerWidth),c.top?a=u:c.bottom&&(a-=a+i-window.innerHeight),{x:s+r,y:a+o}}},{key:"_animateIn",value:function(){this._positionTooltip(),this.tooltipEl.style.visibility="visible",I.remove(this.tooltipEl),I({targets:this.tooltipEl,opacity:1,translateX:this.xMovement,translateY:this.yMovement,duration:this.options.inDuration,easing:"easeOutCubic"})}},{key:"_animateOut",value:function(){I.remove(this.tooltipEl),I({targets:this.tooltipEl,opacity:0,translateX:0,translateY:0,duration:this.options.outDuration,easing:"easeOutCubic"})}},{key:"_handleMouseEnter",value:function(){this.isHovered=!0,this.isFocused=!1,this.open(!1)}},{key:"_handleMouseLeave",value:function(){this.isHovered=!1,this.isFocused=!1,this.close()}},{key:"_handleFocus",value:function(){M.tabPressed&&(this.isFocused=!0,this.open(!1))}},{key:"_handleBlur",value:function(){this.isFocused=!1,this.close()}},{key:"_getAttributeOptions",value:function(){var e={},t=this.el.getAttribute("data-tooltip"),n=this.el.getAttribute("data-position");return t&&(e.html=t),n&&(e.position=n),e}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Tooltip}},{key:"defaults",get:function(){return N}}]),t}(),M.Tooltip=k,M.jQueryLoaded&&M.initializeJqueryWrapper(k,"tooltip","M_Tooltip"),function(e){"use strict";var t=t||{},n=document.querySelectorAll.bind(document);function i(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t+=n+":"+e[n]+";");return t}var r={duration:750,show:function(e,t){if(2===e.button)return!1;var n=t||this,o=document.createElement("div");o.className="waves-ripple",n.appendChild(o);var s,a,l,u,c=(l={top:0,left:0},s=(u=n&&n.ownerDocument).documentElement,void 0!==n.getBoundingClientRect&&(l=n.getBoundingClientRect()),a=null!==u&&u===u.window?u:9===u.nodeType&&u.defaultView,{top:l.top+a.pageYOffset-s.clientTop,left:l.left+a.pageXOffset-s.clientLeft}),d=e.pageY-c.top,h=e.pageX-c.left,p="scale("+n.clientWidth/100*10+")";"touches"in e&&(d=e.touches[0].pageY-c.top,h=e.touches[0].pageX-c.left),o.setAttribute("data-hold",Date.now()),o.setAttribute("data-scale",p),o.setAttribute("data-x",h),o.setAttribute("data-y",d);var f={top:d+"px",left:h+"px"};o.className=o.className+" waves-notransition",o.setAttribute("style",i(f)),o.className=o.className.replace("waves-notransition",""),f["-webkit-transform"]=p,f["-moz-transform"]=p,f["-ms-transform"]=p,f["-o-transform"]=p,f.transform=p,f.opacity="1",f["-webkit-transition-duration"]=r.duration+"ms",f["-moz-transition-duration"]=r.duration+"ms",f["-o-transition-duration"]=r.duration+"ms",f["transition-duration"]=r.duration+"ms",f["-webkit-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["-moz-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["-o-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",o.setAttribute("style",i(f))},hide:function(e){o.touchup(e);var t=this,n=(t.clientWidth,null),s=t.getElementsByClassName("waves-ripple");if(!(0t.el.offsetWidth*t.options.activationPercent||1"+o+""+s+""+a+""),n.length&&t.prepend(n)}},{key:"_resetCurrentElement",value:function(){this.activeIndex=-1,this.$active.removeClass("active")}},{key:"_resetAutocomplete",value:function(){H(this.container).empty(),this._resetCurrentElement(),this.oldVal=null,this.isOpen=!1,this._mousedown=!1}},{key:"selectOption",value:function(e){var t=e.text().trim();this.el.value=t,this.$el.trigger("change"),this._resetAutocomplete(),this.close(),"function"==typeof this.options.onAutocomplete&&this.options.onAutocomplete.call(this,t)}},{key:"_renderDropdown",value:function(e,t){var n=this;this._resetAutocomplete();var i=[];for(var r in e)if(e.hasOwnProperty(r)&&-1!==r.toLowerCase().indexOf(t)){if(this.count>=this.options.limit)break;var o={data:e[r],key:r};i.push(o),this.count++}this.options.sortFunction&&i.sort(function(e,i){return n.options.sortFunction(e.key.toLowerCase(),i.key.toLowerCase(),t.toLowerCase())});for(var s=0;s");a.data?l.append(''+a.key+""):l.append(""+a.key+""),H(this.container).append(l),this._highlight(t,l)}}},{key:"open",value:function(){var e=this.el.value.toLowerCase();this._resetAutocomplete(),e.length>=this.options.minLength&&(this.isOpen=!0,this._renderDropdown(this.options.data,e)),this.dropdown.isOpen?this.dropdown.recalculateDimensions():this.dropdown.open()}},{key:"close",value:function(){this.dropdown.close()}},{key:"updateData",value:function(e){var t=this.el.value.toLowerCase();this.options.data=e,this.isOpen&&this._renderDropdown(e,t)}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Autocomplete}},{key:"defaults",get:function(){return Q}}]),t}())._keydown=!1,M.Autocomplete=V,M.jQueryLoaded&&M.initializeJqueryWrapper(V,"autocomplete","M_Autocomplete"),G=cash,M.updateTextFields=function(){G("input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea").each(function(e,t){var n=G(this);0'),G("body").append(t));var n=e.css("font-family"),i=e.css("font-size"),r=e.css("line-height"),o=e.css("padding-top"),s=e.css("padding-right"),a=e.css("padding-bottom"),l=e.css("padding-left");i&&t.css("font-size",i),n&&t.css("font-family",n),r&&t.css("line-height",r),o&&t.css("padding-top",o),s&&t.css("padding-right",s),a&&t.css("padding-bottom",a),l&&t.css("padding-left",l),e.data("original-height")||e.data("original-height",e.height()),"off"===e.attr("wrap")&&t.css("overflow-wrap","normal").css("white-space","pre"),t.text(e[0].value+"\n");var u=t.html().replace(/\n/g,"
");t.html(u),0'),this.$slides.each(function(t,n){var i=K('
  • ');e.$indicators.append(i[0])}),this.$el.append(this.$indicators[0]),this.$indicators=this.$indicators.children("li.indicator-item"))}},{key:"_removeIndicators",value:function(){this.$el.find("ul.indicators").remove()}},{key:"set",value:function(e){var t=this;if(e>=this.$slides.length?e=0:e<0&&(e=this.$slides.length-1),this.activeIndex!=e){this.$active=this.$slides.eq(this.activeIndex);var n=this.$active.find(".caption");this.$active.removeClass("active"),q({targets:this.$active[0],opacity:0,duration:this.options.duration,easing:"easeOutQuad",complete:function(){t.$slides.not(".active").each(function(e){q({targets:e,opacity:0,translateX:0,translateY:0,duration:0,easing:"easeOutQuad"})})}}),this._animateCaptionIn(n[0],this.options.duration),this.options.indicators&&(this.$indicators.eq(this.activeIndex).removeClass("active"),this.$indicators.eq(e).addClass("active")),q({targets:this.$slides.eq(e)[0],opacity:1,duration:this.options.duration,easing:"easeOutQuad"}),q({targets:this.$slides.eq(e).find(".caption")[0],opacity:1,translateX:0,translateY:0,duration:this.options.duration,delay:this.options.duration,easing:"easeOutQuad"}),this.$slides.eq(e).addClass("active"),this.activeIndex=e,this.start()}}},{key:"pause",value:function(){clearInterval(this.interval)}},{key:"start",value:function(){clearInterval(this.interval),this.interval=setInterval(this._handleIntervalBound,this.options.duration+this.options.interval)}},{key:"next",value:function(){var e=this.activeIndex+1;e>=this.$slides.length?e=0:e<0&&(e=this.$slides.length-1),this.set(e)}},{key:"prev",value:function(){var e=this.activeIndex-1;e>=this.$slides.length?e=0:e<0&&(e=this.$slides.length-1),this.set(e)}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Slider}},{key:"defaults",get:function(){return Z}}]),t}(),M.Slider=X,M.jQueryLoaded&&M.initializeJqueryWrapper(X,"slider","M_Slider"),function(e,t){e(document).on("click",".card",function(n){if(e(this).children(".card-reveal").length){var i=e(n.target).closest(".card");void 0===i.data("initialOverflow")&&i.data("initialOverflow",void 0===i.css("overflow")?"":i.css("overflow"));var r=e(this).find(".card-reveal");e(n.target).is(e(".card-reveal .card-title"))||e(n.target).is(e(".card-reveal .card-title i"))?t({targets:r[0],translateY:0,duration:225,easing:"easeInOutQuad",complete:function(t){e(t.animatables[0].target).css({display:"none"}),i.css("overflow",i.data("initialOverflow"))}}):(e(n.target).is(e(".card .activator"))||e(n.target).is(e(".card .activator i")))&&(i.css("overflow","hidden"),r.css({display:"block"}),t({targets:r[0],translateY:"-100%",duration:300,easing:"easeInOutQuad"}))}})}(cash,M.anime),J=cash,ee={data:[],placeholder:"",secondaryPlaceholder:"",autocompleteOptions:{},limit:1/0,onChipAdd:null,onChipSelect:null,onChipDelete:null},(et=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_Chips=i).options=J.extend({},t.defaults,n),i.$el.addClass("chips input-field"),i.chipsData=[],i.$chips=J(),i._setupInput(),i.hasAutocomplete=0"),this.$el.append(this.$input)),this.$input.addClass("input")}},{key:"_setupLabel",value:function(){this.$label=this.$el.find("label"),this.$label.length&&this.$label.setAttribute("for",this.$input.attr("id"))}},{key:"_setPlaceholder",value:function(){void 0!==this.chipsData&&!this.chipsData.length&&this.options.placeholder?J(this.$input).prop("placeholder",this.options.placeholder):(void 0===this.chipsData||this.chipsData.length)&&this.options.secondaryPlaceholder&&J(this.$input).prop("placeholder",this.options.secondaryPlaceholder)}},{key:"_isValid",value:function(e){if(e.hasOwnProperty("tag")&&""!==e.tag){for(var t=!1,n=0;n=this.options.limit)){var t=this._renderChip(e);this.$chips.add(t),this.chipsData.push(e),J(this.$input).before(t),this._setPlaceholder(),"function"==typeof this.options.onChipAdd&&this.options.onChipAdd.call(this,this.$el,t)}}},{key:"deleteChip",value:function(e){var t=this.$chips.eq(e);this.$chips.eq(e).remove(),this.$chips=this.$chips.filter(function(e){return 0<=J(e).index()}),this.chipsData.splice(e,1),this._setPlaceholder(),"function"==typeof this.options.onChipDelete&&this.options.onChipDelete.call(this,this.$el,t[0])}},{key:"selectChip",value:function(e){var t=this.$chips.eq(e);(this._selectedChip=t)[0].focus(),"function"==typeof this.options.onChipSelect&&this.options.onChipSelect.call(this,this.$el,t[0])}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Chips}},{key:"_handleChipsKeydown",value:function(e){t._keydown=!0;var n=J(e.target).closest(".chips"),i=e.target&&n.length;if(!J(e.target).is("input, textarea")&&i){var r=n[0].M_Chips;if(8===e.keyCode||46===e.keyCode){e.preventDefault();var o=r.chipsData.length;if(r._selectedChip){var s=r._selectedChip.index();r.deleteChip(s),r._selectedChip=null,o=Math.max(s-1,0)}r.chipsData.length&&r.selectChip(o)}else if(37===e.keyCode){if(r._selectedChip){var a=r._selectedChip.index()-1;if(a<0)return;r.selectChip(a)}}else if(39===e.keyCode&&r._selectedChip){var l=r._selectedChip.index()+1;l>=r.chipsData.length?r.$input[0].focus():r.selectChip(l)}}}},{key:"_handleChipsKeyup",value:function(e){t._keydown=!1}},{key:"_handleChipsBlur",value:function(e){t._keydown||(J(e.target).closest(".chips")[0].M_Chips._selectedChip=null)}},{key:"defaults",get:function(){return ee}}]),t}())._keydown=!1,M.Chips=et,M.jQueryLoaded&&M.initializeJqueryWrapper(et,"chips","M_Chips"),J(document).ready(function(){J(document.body).on("click",".chip .close",function(){var e=J(this).closest(".chips");e.length&&e[0].M_Chips||J(this).closest(".chip").remove()})}),en=cash,ei={top:0,bottom:1/0,offset:0,onPositionChange:null},(er=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_Pushpin=i).options=en.extend({},t.defaults,n),i.originalOffset=i.el.offsetTop,t._pushpins.push(i),i._setupEventHandlers(),i._updatePosition(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this.el.style.top=null,this._removePinClasses(),this._removeEventHandlers();var e=t._pushpins.indexOf(this);t._pushpins.splice(e,1)}},{key:"_setupEventHandlers",value:function(){document.addEventListener("scroll",t._updateElements)}},{key:"_removeEventHandlers",value:function(){document.removeEventListener("scroll",t._updateElements)}},{key:"_updatePosition",value:function(){var e=M.getDocumentScrollTop()+this.options.offset;this.options.top<=e&&this.options.bottom>=e&&!this.el.classList.contains("pinned")&&(this._removePinClasses(),this.el.style.top=this.options.offset+"px",this.el.classList.add("pinned"),"function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pinned")),ethis.options.bottom&&!this.el.classList.contains("pin-bottom")&&(this._removePinClasses(),this.el.classList.add("pin-bottom"),this.el.style.top=this.options.bottom-this.originalOffset+"px","function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pin-bottom"))}},{key:"_removePinClasses",value:function(){this.el.classList.remove("pin-top"),this.el.classList.remove("pinned"),this.el.classList.remove("pin-bottom")}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Pushpin}},{key:"_updateElements",value:function(){for(var e in t._pushpins)t._pushpins[e]._updatePosition()}},{key:"defaults",get:function(){return ei}}]),t}())._pushpins=[],M.Pushpin=er,M.jQueryLoaded&&M.initializeJqueryWrapper(er,"pushpin","M_Pushpin"),eo=cash,es=M.anime,ea={direction:"top",hoverEnabled:!0,toolbarEnabled:!1},eo.fn.reverse=[].reverse,el=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_FloatingActionButton=i).options=eo.extend({},t.defaults,n),i.isOpen=!1,i.$anchor=i.$el.children("a").first(),i.$menu=i.$el.children("ul").first(),i.$floatingBtns=i.$el.find("ul .btn-floating"),i.$floatingBtnsReverse=i.$el.find("ul .btn-floating").reverse(),i.offsetY=0,i.offsetX=0,i.$el.addClass("direction-"+i.options.direction),"top"===i.options.direction?i.offsetY=40:"right"===i.options.direction?i.offsetX=-40:"bottom"===i.options.direction?i.offsetY=-40:i.offsetX=40,i._setupEventHandlers(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_FloatingActionButton=void 0}},{key:"_setupEventHandlers",value:function(){this._handleFABClickBound=this._handleFABClick.bind(this),this._handleOpenBound=this.open.bind(this),this._handleCloseBound=this.close.bind(this),this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.addEventListener("mouseenter",this._handleOpenBound),this.el.addEventListener("mouseleave",this._handleCloseBound)):this.el.addEventListener("click",this._handleFABClickBound)}},{key:"_removeEventHandlers",value:function(){this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.removeEventListener("mouseenter",this._handleOpenBound),this.el.removeEventListener("mouseleave",this._handleCloseBound)):this.el.removeEventListener("click",this._handleFABClickBound)}},{key:"_handleFABClick",value:function(){this.isOpen?this.close():this.open()}},{key:"_handleDocumentClick",value:function(e){eo(e.target).closest(this.$menu).length||this.close()}},{key:"open",value:function(){this.isOpen||(this.options.toolbarEnabled?this._animateInToolbar():this._animateInFAB(),this.isOpen=!0)}},{key:"close",value:function(){this.isOpen&&(this.options.toolbarEnabled?(window.removeEventListener("scroll",this._handleCloseBound,!0),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),this._animateOutToolbar()):this._animateOutFAB(),this.isOpen=!1)}},{key:"_animateInFAB",value:function(){var e=this;this.$el.addClass("active");var t=0;this.$floatingBtnsReverse.each(function(n){es({targets:n,opacity:1,scale:[.4,1],translateY:[e.offsetY,0],translateX:[e.offsetX,0],duration:275,delay:t,easing:"easeInOutQuad"}),t+=40})}},{key:"_animateOutFAB",value:function(){var e=this;this.$floatingBtnsReverse.each(function(t){es.remove(t),es({targets:t,opacity:0,scale:.4,translateY:e.offsetY,translateX:e.offsetX,duration:175,easing:"easeOutQuad",complete:function(){e.$el.removeClass("active")}})})}},{key:"_animateInToolbar",value:function(){var e,t=this,n=window.innerWidth,i=window.innerHeight,r=this.el.getBoundingClientRect(),o=eo('
    '),s=this.$anchor.css("background-color");this.$anchor.append(o),this.offsetX=r.left-n/2+r.width/2,this.offsetY=i-r.bottom,e=n/o[0].clientWidth,this.btnBottom=r.bottom,this.btnLeft=r.left,this.btnWidth=r.width,this.$el.addClass("active"),this.$el.css({"text-align":"center",width:"100%",bottom:0,left:0,transform:"translateX("+this.offsetX+"px)",transition:"none"}),this.$anchor.css({transform:"translateY("+-this.offsetY+"px)",transition:"none"}),o.css({"background-color":s}),setTimeout(function(){t.$el.css({transform:"",transition:"transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s"}),t.$anchor.css({overflow:"visible",transform:"",transition:"transform .2s"}),setTimeout(function(){t.$el.css({overflow:"hidden","background-color":s}),o.css({transform:"scale("+e+")",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"}),t.$menu.children("li").children("a").css({opacity:1}),t._handleDocumentClickBound=t._handleDocumentClick.bind(t),window.addEventListener("scroll",t._handleCloseBound,!0),document.body.addEventListener("click",t._handleDocumentClickBound,!0)},100)},0)}},{key:"_animateOutToolbar",value:function(){var e=this,t=window.innerWidth,n=window.innerHeight,i=this.$el.find(".fab-backdrop"),r=this.$anchor.css("background-color");this.offsetX=this.btnLeft-t/2+this.btnWidth/2,this.offsetY=n-this.btnBottom,this.$el.removeClass("active"),this.$el.css({"background-color":"transparent",transition:"none"}),this.$anchor.css({transition:"none"}),i.css({transform:"scale(0)","background-color":r}),this.$menu.children("li").children("a").css({opacity:""}),setTimeout(function(){i.remove(),e.$el.css({"text-align":"",width:"",bottom:"",left:"",overflow:"","background-color":"",transform:"translate3d("+-e.offsetX+"px,0,0)"}),e.$anchor.css({overflow:"",transform:"translate3d(0,"+e.offsetY+"px,0)"}),setTimeout(function(){e.$el.css({transform:"translate3d(0,0,0)",transition:"transform .2s"}),e.$anchor.css({transform:"translate3d(0,0,0)",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"})},20)},200)}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_FloatingActionButton}},{key:"defaults",get:function(){return ea}}]),t}(),M.FloatingActionButton=el,M.jQueryLoaded&&M.initializeJqueryWrapper(el,"floatingActionButton","M_FloatingActionButton"),eu=cash,ec={autoClose:!1,format:"mmm dd, yyyy",parse:null,defaultDate:null,setDefaultDate:!1,disableWeekends:!1,disableDayFn:null,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,container:null,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok",previousMonth:"‹",nextMonth:"›",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"]},events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null},(ed=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));(i.el.M_Datepicker=i).options=eu.extend({},t.defaults,n),n&&n.hasOwnProperty("i18n")&&"object"==typeof n.i18n&&(i.options.i18n=eu.extend({},t.defaults.i18n,n.i18n)),i.options.minDate&&i.options.minDate.setHours(0,0,0,0),i.options.maxDate&&i.options.maxDate.setHours(0,0,0,0),i.id=M.guid(),i._setupVariables(),i._insertHTMLIntoDOM(),i._setupModal(),i._setupEventHandlers(),i.options.defaultDate||(i.options.defaultDate=new Date(Date.parse(i.el.value)));var r=i.options.defaultDate;return t._isDate(r)?i.options.setDefaultDate?(i.setDate(r,!0),i.setInputValue()):i.gotoDate(r):i.gotoDate(new Date),i.isOpen=!1,i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),eu(this.modalEl).remove(),this.destroySelects(),this.el.M_Datepicker=void 0}},{key:"destroySelects",value:function(){var e=this.calendarEl.querySelector(".orig-select-year");e&&M.FormSelect.getInstance(e).destroy();var t=this.calendarEl.querySelector(".orig-select-month");t&&M.FormSelect.getInstance(t).destroy()}},{key:"_insertHTMLIntoDOM",value:function(){this.options.showClearBtn&&(eu(this.clearBtn).css({visibility:""}),this.clearBtn.innerHTML=this.options.i18n.clear),this.doneBtn.innerHTML=this.options.i18n.done,this.cancelBtn.innerHTML=this.options.i18n.cancel,this.options.container?this.$modalEl.appendTo(this.options.container):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var e=this;this.modalEl.id="modal-"+this.id,this.modal=M.Modal.init(this.modalEl,{onCloseEnd:function(){e.isOpen=!1}})}},{key:"toString",value:function(e){var n=this;return e=e||this.options.format,t._isDate(this.date)?e.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map(function(e){return n.formats[e]?n.formats[e]():e}).join(""):""}},{key:"setDate",value:function(e,n){if(!e)return this.date=null,this._renderDateDisplay(),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),t._isDate(e)){var i=this.options.minDate,r=this.options.maxDate;t._isDate(i)&&er.maxDate||r.disableWeekends&&t._isWeekend(b)||r.disableDayFn&&r.disableDayFn(b),isEmpty:x,isStartRange:I,isEndRange:N,isInRange:k,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths};u.push(this.renderDay(D)),7==++w&&(l.push(this.renderRow(u,r.isRTL,y)),w=0,u=[],y=!1)}return this.renderTable(r,l,i)}},{key:"renderDay",value:function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'';t.push("is-outside-current-month"),t.push("is-selection-disabled")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.hasEvent&&t.push("has-event"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'"}},{key:"renderRow",value:function(e,t,n){return''+(t?e.reverse():e).join("")+""}},{key:"renderTable",value:function(e,t,n){return'
    '+this.renderHead(e)+this.renderBody(t)+"
    "}},{key:"renderHead",value:function(e){var t=void 0,n=[];for(t=0;t<7;t++)n.push(''+this.renderDayName(e,t,!0)+"");return""+(e.isRTL?n.reverse():n).join("")+""}},{key:"renderBody",value:function(e){return""+e.join("")+""}},{key:"renderTitle",value:function(e,t,n,i,r,o){var s,a,l=void 0,u=void 0,c=void 0,d=this.options,h=n===d.minYear,p=n===d.maxYear,f='
    ',m=!0,g=!0;for(c=[],l=0;l<12;l++)c.push('");for(s='",eu.isArray(d.yearRange)?(l=d.yearRange[0],u=d.yearRange[1]+1):(l=n-d.yearRange,u=1+n+d.yearRange),c=[];l=d.minYear&&c.push('");return a='",f+='
    ',d.showMonthAfterYear?f+=a+s:f+=s+a,f+="
    ",h&&(0===i||d.minMonth>=i)&&(m=!1),p&&(11===i||d.maxMonth<=i)&&(g=!1),(f+='')+"
    "}},{key:"draw",value:function(e){if(this.isOpen||e){var t,n=this.options,i=n.minYear,r=n.maxYear,o=n.minMonth,s=n.maxMonth,a="";this._y<=i&&(this._y=i,!isNaN(o)&&this._m=r&&(this._y=r,!isNaN(s)&&this._m>s&&(this._m=s)),t="datepicker-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var l=0;l<1;l++)this._renderDateDisplay(),a+=this.renderTitle(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,t)+this.render(this.calendars[l].year,this.calendars[l].month,t);this.destroySelects(),this.calendarEl.innerHTML=a;var u=this.calendarEl.querySelector(".orig-select-year"),c=this.calendarEl.querySelector(".orig-select-month");M.FormSelect.init(u,{classes:"select-year",dropdownOptions:{container:document.body,constrainWidth:!1}}),M.FormSelect.init(c,{classes:"select-month",dropdownOptions:{container:document.body,constrainWidth:!1}}),u.addEventListener("change",this._handleYearChange.bind(this)),c.addEventListener("change",this._handleMonthChange.bind(this)),"function"==typeof this.options.onDraw&&this.options.onDraw(this)}}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleInputChangeBound=this._handleInputChange.bind(this),this._handleCalendarClickBound=this._handleCalendarClick.bind(this),this._finishSelectionBound=this._finishSelection.bind(this),this._handleMonthChange=this._handleMonthChange.bind(this),this._closeBound=this.close.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("change",this._handleInputChangeBound),this.calendarEl.addEventListener("click",this._handleCalendarClickBound),this.doneBtn.addEventListener("click",this._finishSelectionBound),this.cancelBtn.addEventListener("click",this._closeBound),this.options.showClearBtn&&(this._handleClearClickBound=this._handleClearClick.bind(this),this.clearBtn.addEventListener("click",this._handleClearClickBound))}},{key:"_setupVariables",value:function(){var e=this;this.$modalEl=eu(t._template),this.modalEl=this.$modalEl[0],this.calendarEl=this.modalEl.querySelector(".datepicker-calendar"),this.yearTextEl=this.modalEl.querySelector(".year-text"),this.dateTextEl=this.modalEl.querySelector(".date-text"),this.options.showClearBtn&&(this.clearBtn=this.modalEl.querySelector(".datepicker-clear")),this.doneBtn=this.modalEl.querySelector(".datepicker-done"),this.cancelBtn=this.modalEl.querySelector(".datepicker-cancel"),this.formats={d:function(){return e.date.getDate()},dd:function(){var t=e.date.getDate();return(t<10?"0":"")+t},ddd:function(){return e.options.i18n.weekdaysShort[e.date.getDay()]},dddd:function(){return e.options.i18n.weekdays[e.date.getDay()]},m:function(){return e.date.getMonth()+1},mm:function(){var t=e.date.getMonth()+1;return(t<10?"0":"")+t},mmm:function(){return e.options.i18n.monthsShort[e.date.getMonth()]},mmmm:function(){return e.options.i18n.months[e.date.getMonth()]},yy:function(){return(""+e.date.getFullYear()).slice(2)},yyyy:function(){return e.date.getFullYear()}}}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("change",this._handleInputChangeBound),this.calendarEl.removeEventListener("click",this._handleCalendarClickBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(e){e.which===M.keys.ENTER&&(e.preventDefault(),this.open())}},{key:"_handleCalendarClick",value:function(e){if(this.isOpen){var t=eu(e.target);t.hasClass("is-disabled")||(!t.hasClass("datepicker-day-button")||t.hasClass("is-empty")||t.parent().hasClass("is-disabled")?t.closest(".month-prev").length?this.prevMonth():t.closest(".month-next").length&&this.nextMonth():(this.setDate(new Date(e.target.getAttribute("data-year"),e.target.getAttribute("data-month"),e.target.getAttribute("data-day"))),this.options.autoClose&&this._finishSelection()))}}},{key:"_handleClearClick",value:function(){this.date=null,this.setInputValue(),this.close()}},{key:"_handleMonthChange",value:function(e){this.gotoMonth(e.target.value)}},{key:"_handleYearChange",value:function(e){this.gotoYear(e.target.value)}},{key:"gotoMonth",value:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())}},{key:"gotoYear",value:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())}},{key:"_handleInputChange",value:function(e){var n=void 0;e.firedBy!==this&&(n=this.options.parse?this.options.parse(this.el.value,this.options.format):new Date(Date.parse(this.el.value)),t._isDate(n)&&this.setDate(n))}},{key:"renderDayName",value:function(e,t,n){for(t+=e.firstDay;7<=t;)t-=7;return n?e.i18n.weekdaysAbbrev[t]:e.i18n.weekdays[t]}},{key:"_finishSelection",value:function(){this.setInputValue(),this.close()}},{key:"open",value:function(){if(!this.isOpen)return this.isOpen=!0,"function"==typeof this.options.onOpen&&this.options.onOpen.call(this),this.draw(),this.modal.open(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,"function"==typeof this.options.onClose&&this.options.onClose.call(this),this.modal.close(),this}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"_isDate",value:function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())}},{key:"_isWeekend",value:function(e){var t=e.getDay();return 0===t||6===t}},{key:"_setToStartOfDay",value:function(e){t._isDate(e)&&e.setHours(0,0,0,0)}},{key:"_getDaysInMonth",value:function(e,n){return[31,t._isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][n]}},{key:"_isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"_compareDates",value:function(e,t){return e.getTime()===t.getTime()}},{key:"_setToStartOfDay",value:function(e){t._isDate(e)&&e.setHours(0,0,0,0)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Datepicker}},{key:"defaults",get:function(){return ec}}]),t}())._template='',M.Datepicker=ed,M.jQueryLoaded&&M.initializeJqueryWrapper(ed,"datepicker","M_Datepicker"),eh=cash,ep={dialRadius:135,outerRadius:105,innerRadius:70,tickRadius:20,duration:350,container:null,defaultTime:"now",fromNow:0,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok"},autoClose:!1,twelveHour:!0,vibrate:!0,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onSelect:null},(ef=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_Timepicker=i).options=eh.extend({},t.defaults,n),i.id=M.guid(),i._insertHTMLIntoDOM(),i._setupModal(),i._setupVariables(),i._setupEventHandlers(),i._clockSetup(),i._pickerSetup(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),eh(this.modalEl).remove(),this.el.M_Timepicker=void 0}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleClockClickStartBound=this._handleClockClickStart.bind(this),this._handleDocumentClickMoveBound=this._handleDocumentClickMove.bind(this),this._handleDocumentClickEndBound=this._handleDocumentClickEnd.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.plate.addEventListener("mousedown",this._handleClockClickStartBound),this.plate.addEventListener("touchstart",this._handleClockClickStartBound),eh(this.spanHours).on("click",this.showView.bind(this,"hours")),eh(this.spanMinutes).on("click",this.showView.bind(this,"minutes"))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(e){e.which===M.keys.ENTER&&(e.preventDefault(),this.open())}},{key:"_handleClockClickStart",value:function(e){e.preventDefault();var n=this.plate.getBoundingClientRect(),i=n.left,r=n.top;this.x0=i+this.options.dialRadius,this.y0=r+this.options.dialRadius,this.moved=!1;var o=t._Pos(e);this.dx=o.x-this.x0,this.dy=o.y-this.y0,this.setHand(this.dx,this.dy,!1),document.addEventListener("mousemove",this._handleDocumentClickMoveBound),document.addEventListener("touchmove",this._handleDocumentClickMoveBound),document.addEventListener("mouseup",this._handleDocumentClickEndBound),document.addEventListener("touchend",this._handleDocumentClickEndBound)}},{key:"_handleDocumentClickMove",value:function(e){e.preventDefault();var n=t._Pos(e),i=n.x-this.x0,r=n.y-this.y0;this.moved=!0,this.setHand(i,r,!1,!0)}},{key:"_handleDocumentClickEnd",value:function(e){var n=this;e.preventDefault(),document.removeEventListener("mouseup",this._handleDocumentClickEndBound),document.removeEventListener("touchend",this._handleDocumentClickEndBound);var i=t._Pos(e),r=i.x-this.x0,o=i.y-this.y0;this.moved&&r===this.dx&&o===this.dy&&this.setHand(r,o),"hours"===this.currentView?this.showView("minutes",this.options.duration/2):this.options.autoClose&&(eh(this.minutesView).addClass("timepicker-dial-out"),setTimeout(function(){n.done()},this.options.duration/2)),"function"==typeof this.options.onSelect&&this.options.onSelect.call(this,this.hours,this.minutes),document.removeEventListener("mousemove",this._handleDocumentClickMoveBound),document.removeEventListener("touchmove",this._handleDocumentClickMoveBound)}},{key:"_insertHTMLIntoDOM",value:function(){this.$modalEl=eh(t._template),this.modalEl=this.$modalEl[0],this.modalEl.id="modal-"+this.id;var e=document.querySelector(this.options.container);this.options.container&&e?this.$modalEl.appendTo(e):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var e=this;this.modal=M.Modal.init(this.modalEl,{onOpenStart:this.options.onOpenStart,onOpenEnd:this.options.onOpenEnd,onCloseStart:this.options.onCloseStart,onCloseEnd:function(){"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e),e.isOpen=!1}})}},{key:"_setupVariables",value:function(){this.currentView="hours",this.vibrate=navigator.vibrate?"vibrate":navigator.webkitVibrate?"webkitVibrate":null,this._canvas=this.modalEl.querySelector(".timepicker-canvas"),this.plate=this.modalEl.querySelector(".timepicker-plate"),this.hoursView=this.modalEl.querySelector(".timepicker-hours"),this.minutesView=this.modalEl.querySelector(".timepicker-minutes"),this.spanHours=this.modalEl.querySelector(".timepicker-span-hours"),this.spanMinutes=this.modalEl.querySelector(".timepicker-span-minutes"),this.spanAmPm=this.modalEl.querySelector(".timepicker-span-am-pm"),this.footer=this.modalEl.querySelector(".timepicker-footer"),this.amOrPm="PM"}},{key:"_pickerSetup",value:function(){var e=eh('").appendTo(this.footer).on("click",this.clear.bind(this));this.options.showClearBtn&&e.css({visibility:""});var t=eh('
    ');eh('").appendTo(t).on("click",this.close.bind(this)),eh('").appendTo(t).on("click",this.done.bind(this)),t.appendTo(this.footer)}},{key:"_clockSetup",value:function(){this.options.twelveHour&&(this.$amBtn=eh('
    AM
    '),this.$pmBtn=eh('
    PM
    '),this.$amBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm),this.$pmBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm)),this._buildHoursView(),this._buildMinutesView(),this._buildSVGClock()}},{key:"_buildSVGClock",value:function(){var e=this.options.dialRadius,n=this.options.tickRadius,i=2*e,r=t._createSVGEl("svg");r.setAttribute("class","timepicker-svg"),r.setAttribute("width",i),r.setAttribute("height",i);var o=t._createSVGEl("g");o.setAttribute("transform","translate("+e+","+e+")");var s=t._createSVGEl("circle");s.setAttribute("class","timepicker-canvas-bearing"),s.setAttribute("cx",0),s.setAttribute("cy",0),s.setAttribute("r",4);var a=t._createSVGEl("line");a.setAttribute("x1",0),a.setAttribute("y1",0);var l=t._createSVGEl("circle");l.setAttribute("class","timepicker-canvas-bg"),l.setAttribute("r",n),o.appendChild(a),o.appendChild(l),o.appendChild(s),r.appendChild(o),this._canvas.appendChild(r),this.hand=a,this.bg=l,this.bearing=s,this.g=o}},{key:"_buildHoursView",value:function(){var e=eh('
    ');if(this.options.twelveHour)for(var t=1;t<13;t+=1){var n=e.clone(),i=t/6*Math.PI,r=this.options.outerRadius;n.css({left:this.options.dialRadius+Math.sin(i)*r-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(i)*r-this.options.tickRadius+"px"}),n.html(0===t?"00":t),this.hoursView.appendChild(n[0])}else for(var o=0;o<24;o+=1){var s=e.clone(),a=o/6*Math.PI,l=0'),n=0;n<60;n+=5){var i=e.clone(),r=n/30*Math.PI;i.css({left:this.options.dialRadius+Math.sin(r)*this.options.outerRadius-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(r)*this.options.outerRadius-this.options.tickRadius+"px"}),i.html(t._addLeadingZero(n)),this.minutesView.appendChild(i[0])}}},{key:"_handleAmPmClick",value:function(e){var t=eh(e.target);this.amOrPm=t.hasClass("am-btn")?"AM":"PM",this._updateAmPmView()}},{key:"_updateAmPmView",value:function(){this.options.twelveHour&&(this.$amBtn.toggleClass("text-primary","AM"===this.amOrPm),this.$pmBtn.toggleClass("text-primary","PM"===this.amOrPm))}},{key:"_updateTimeFromInput",value:function(){var e=((this.el.value||this.options.defaultTime||"")+"").split(":");if(this.options.twelveHour&&void 0!==e[1]&&(0'),i.$el.find(".carousel-item").each(function(e,t){if(i.images.push(e),i.showIndicators){var n=ev('
  • ');0===t&&n[0].classList.add("active"),i.$indicators.append(n)}}),i.showIndicators&&i.$el.append(i.$indicators),i.count=i.images.length,i.options.numVisible=Math.min(i.count,i.options.numVisible),i.xform="transform",["webkit","Moz","O","ms"].every(function(e){var t=e+"Transform";return void 0===document.body.style[t]||(i.xform=t,!1)}),i._setupEventHandlers(),i._scroll(i.offset),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Carousel=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleCarouselTapBound=this._handleCarouselTap.bind(this),this._handleCarouselDragBound=this._handleCarouselDrag.bind(this),this._handleCarouselReleaseBound=this._handleCarouselRelease.bind(this),this._handleCarouselClickBound=this._handleCarouselClick.bind(this),void 0!==window.ontouchstart&&(this.el.addEventListener("touchstart",this._handleCarouselTapBound),this.el.addEventListener("touchmove",this._handleCarouselDragBound),this.el.addEventListener("touchend",this._handleCarouselReleaseBound)),this.el.addEventListener("mousedown",this._handleCarouselTapBound),this.el.addEventListener("mousemove",this._handleCarouselDragBound),this.el.addEventListener("mouseup",this._handleCarouselReleaseBound),this.el.addEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.addEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&(this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.$indicators.find(".indicator-item").each(function(t,n){t.addEventListener("click",e._handleIndicatorClickBound)}));var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){var e=this;void 0!==window.ontouchstart&&(this.el.removeEventListener("touchstart",this._handleCarouselTapBound),this.el.removeEventListener("touchmove",this._handleCarouselDragBound),this.el.removeEventListener("touchend",this._handleCarouselReleaseBound)),this.el.removeEventListener("mousedown",this._handleCarouselTapBound),this.el.removeEventListener("mousemove",this._handleCarouselDragBound),this.el.removeEventListener("mouseup",this._handleCarouselReleaseBound),this.el.removeEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.removeEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&this.$indicators.find(".indicator-item").each(function(t,n){t.removeEventListener("click",e._handleIndicatorClickBound)}),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleCarouselTap",value:function(e){"mousedown"===e.type&&ev(e.target).is("img")&&e.preventDefault(),this.pressed=!0,this.dragged=!1,this.verticalDragged=!1,this.reference=this._xpos(e),this.referenceY=this._ypos(e),this.velocity=this.amplitude=0,this.frame=this.offset,this.timestamp=Date.now(),clearInterval(this.ticker),this.ticker=setInterval(this._trackBound,100)}},{key:"_handleCarouselDrag",value:function(e){var t=void 0,n=void 0,i=void 0;if(this.pressed){if(t=this._xpos(e),n=this._ypos(e),i=this.reference-t,30>Math.abs(this.referenceY-n)&&!this.verticalDragged)(2=this.dim*(this.count-1)?this.target=this.dim*(this.count-1):this.target<0&&(this.target=0)),this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound),this.dragged&&(e.preventDefault(),e.stopPropagation()),!1}},{key:"_handleCarouselClick",value:function(e){if(this.dragged)return e.preventDefault(),e.stopPropagation(),!1;if(!this.options.fullWidth){var t=ev(e.target).closest(".carousel-item").index();0!=this._wrap(this.center)-t&&(e.preventDefault(),e.stopPropagation()),this._cycleTo(t)}}},{key:"_handleIndicatorClick",value:function(e){e.stopPropagation();var t=ev(e.target).closest(".indicator-item");t.length&&this._cycleTo(t.index())}},{key:"_handleResize",value:function(e){this.options.fullWidth?(this.itemWidth=this.$el.find(".carousel-item").first().innerWidth(),this.imageHeight=this.$el.find(".carousel-item.active").height(),this.dim=2*this.itemWidth+this.options.padding,this.offset=2*this.center*this.itemWidth,this.target=this.offset,this._setCarouselHeight(!0)):this._scroll()}},{key:"_setCarouselHeight",value:function(e){var t=this,n=this.$el.find(".carousel-item.active").length?this.$el.find(".carousel-item.active").first():this.$el.find(".carousel-item").first(),i=n.find("img").first();if(i.length){if(i[0].complete){var r=i.height();if(0=this.count?e%this.count:e<0?this._wrap(this.count+e%this.count):e}},{key:"_track",value:function(){var e,t,n,i;t=(e=Date.now())-this.timestamp,this.timestamp=e,n=this.offset-this.frame,this.frame=this.offset,i=1e3*n/(1+t),this.velocity=.8*i+.2*this.velocity}},{key:"_autoScroll",value:function(){var e=void 0,t=void 0;this.amplitude&&(e=Date.now()-this.timestamp,2<(t=this.amplitude*Math.exp(-e/this.options.duration))||t<-2?(this._scroll(this.target-t),requestAnimationFrame(this._autoScrollBound)):this._scroll(this.target))}},{key:"_scroll",value:function(e){var t=this;this.$el.hasClass("scrolling")||this.el.classList.add("scrolling"),null!=this.scrollingTimeout&&window.clearTimeout(this.scrollingTimeout),this.scrollingTimeout=window.setTimeout(function(){t.$el.removeClass("scrolling")},this.options.duration);var n,i,r,o,s=void 0,a=void 0,l=void 0,u=void 0,c=void 0,d=void 0,h=this.center,p=1/this.options.numVisible;if(this.offset="number"==typeof e?e:this.offset,this.center=Math.floor((this.offset+this.dim/2)/this.dim),o=-(r=(i=this.offset-this.center*this.dim)<0?1:-1)*i*2/this.dim,n=this.count>>1,this.options.fullWidth?(l="translateX(0)",d=1):(l="translateX("+(this.el.clientWidth-this.itemWidth)/2+"px) "+("translateY("+(this.el.clientHeight-this.itemHeight)/2+"px)"),d=1-p*o),this.showIndicators){var f=this.center%this.count,m=this.$indicators.find(".indicator-item.active");m.index()!==f&&(m.removeClass("active"),this.$indicators.find(".indicator-item").eq(f)[0].classList.add("active"))}if(!this.noWrap||0<=this.center&&this.center=this.count||t<0){if(this.noWrap)return;t=this._wrap(t)}this._cycleTo(t)}},{key:"prev",value:function(e){(void 0===e||isNaN(e))&&(e=1);var t=this.center-e;if(t>=this.count||t<0){if(this.noWrap)return;t=this._wrap(t)}this._cycleTo(t)}},{key:"set",value:function(e,t){if((void 0===e||isNaN(e))&&(e=0),e>this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e,t)}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Carousel}},{key:"defaults",get:function(){return ew}}]),t}(),M.Carousel=eb,M.jQueryLoaded&&M.initializeJqueryWrapper(eb,"carousel","M_Carousel"),eM=cash,eE={onOpen:void 0,onClose:void 0},eT=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_TapTarget=i).options=eM.extend({},t.defaults,n),i.isOpen=!1,i.$origin=eM("#"+i.$el.attr("data-target")),i._setup(),i._calculatePositioning(),i._setupEventHandlers(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.TapTarget=void 0}},{key:"_setupEventHandlers",value:function(){this._handleDocumentClickBound=this._handleDocumentClick.bind(this),this._handleTargetClickBound=this._handleTargetClick.bind(this),this._handleOriginClickBound=this._handleOriginClick.bind(this),this.el.addEventListener("click",this._handleTargetClickBound),this.originEl.addEventListener("click",this._handleOriginClickBound);var e=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=e.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleTargetClickBound),this.originEl.removeEventListener("click",this._handleOriginClickBound),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleTargetClick",value:function(e){this.open()}},{key:"_handleOriginClick",value:function(e){this.close()}},{key:"_handleResize",value:function(e){this._calculatePositioning()}},{key:"_handleDocumentClick",value:function(e){eM(e.target).closest(".tap-target-wrapper").length||(this.close(),e.preventDefault(),e.stopPropagation())}},{key:"_setup",value:function(){this.wrapper=this.$el.parent()[0],this.waveEl=eM(this.wrapper).find(".tap-target-wave")[0],this.originEl=eM(this.wrapper).find(".tap-target-origin")[0],this.contentEl=this.$el.find(".tap-target-content")[0],eM(this.wrapper).hasClass(".tap-target-wrapper")||(this.wrapper=document.createElement("div"),this.wrapper.classList.add("tap-target-wrapper"),this.$el.before(eM(this.wrapper)),this.wrapper.append(this.el)),this.contentEl||(this.contentEl=document.createElement("div"),this.contentEl.classList.add("tap-target-content"),this.$el.append(this.contentEl)),this.waveEl||(this.waveEl=document.createElement("div"),this.waveEl.classList.add("tap-target-wave"),this.originEl||(this.originEl=this.$origin.clone(!0,!0),this.originEl.addClass("tap-target-origin"),this.originEl.removeAttr("id"),this.originEl.removeAttr("style"),this.originEl=this.originEl[0],this.waveEl.append(this.originEl)),this.wrapper.append(this.waveEl))}},{key:"_calculatePositioning",value:function(){var e="fixed"===this.$origin.css("position");if(!e)for(var t=this.$origin.parents(),n=0;n'+t.getAttribute("label")+"")[0]),i.each(function(t){var n=e._appendOptionWithIcon(e.$el,t,"optgroup-option");e._addOptionToValueDict(t,n)})}}),this.$el.after(this.dropdownOptions),this.input=document.createElement("input"),e_(this.input).addClass("select-dropdown dropdown-trigger"),this.input.setAttribute("type","text"),this.input.setAttribute("readonly","true"),this.input.setAttribute("data-target",this.dropdownOptions.id),this.el.disabled&&e_(this.input).prop("disabled","true"),this.$el.before(this.input),this._setValueToInput();var t=e_('');if(this.$el.before(t[0]),!this.el.disabled){var n=e_.extend({},this.options.dropdownOptions);n.onOpenEnd=function(t){var n=e_(e.dropdownOptions).find(".selected").first();if(n.length&&(M.keyDown=!0,e.dropdown.focusedIndex=n.index(),e.dropdown._focusFocusedItem(),M.keyDown=!1,e.dropdown.isScrollable)){var i=n[0].getBoundingClientRect().top-e.dropdownOptions.getBoundingClientRect().top;i-=e.dropdownOptions.clientHeight/2,e.dropdownOptions.scrollTop=i}},this.isMultiple&&(n.closeOnClick=!1),this.dropdown=M.Dropdown.init(this.input,n)}this._setSelectedStates()}},{key:"_addOptionToValueDict",value:function(e,t){var n=Object.keys(this._valueDict).length,i=this.dropdownOptions.id+n,r={};t.id=i,r.el=e,r.optionEl=t,this._valueDict[i]=r}},{key:"_removeDropdown",value:function(){e_(this.wrapper).find(".caret").remove(),e_(this.input).remove(),e_(this.dropdownOptions).remove(),e_(this.wrapper).before(this.$el),e_(this.wrapper).remove()}},{key:"_appendOptionWithIcon",value:function(e,t,n){var i=t.disabled?"disabled ":"",r=this.isMultiple?'":t.innerHTML,o=e_("
  • "),s=e_("");s.html(r),o.addClass(i+" "+("optgroup-option"===n?"optgroup-option ":"")),o.append(s);var a=t.getAttribute("data-icon");if(a){var l=e_('');o.prepend(l)}return e_(this.dropdownOptions).append(o[0]),o[0]}},{key:"_toggleEntryFromArray",value:function(e){var t=!this._keysSelected.hasOwnProperty(e),n=e_(this._valueDict[e].optionEl);return t?this._keysSelected[e]=!0:delete this._keysSelected[e],n.toggleClass("selected",t),n.find('input[type="checkbox"]').prop("checked",t),n.prop("selected",t),t}},{key:"_setValueToInput",value:function(){var e=[];if(this.$el.find("option").each(function(t){if(e_(t).prop("selected")){var n=e_(t).text();e.push(n)}}),!e.length){var t=this.$el.find("option:disabled").eq(0);t.length&&""===t[0].value&&e.push(t.text())}this.input.value=e.join(", ")}},{key:"_setSelectedStates",value:function(){for(var e in this._keysSelected={},this._valueDict){var t=this._valueDict[e],n=e_(t.el).prop("selected");e_(t.optionEl).find('input[type="checkbox"]').prop("checked",n),n?(this._activateOption(e_(this.dropdownOptions),e_(t.optionEl)),this._keysSelected[e]=!0):e_(t.optionEl).removeClass("selected")}}},{key:"_activateOption",value:function(e,t){t&&(this.isMultiple||e.find("li.selected").removeClass("selected"),e_(t).addClass("selected"))}},{key:"getSelectedValues",value:function(){var e=[];for(var t in this._keysSelected)e.push(this._valueDict[t].el.value);return e}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_FormSelect}},{key:"defaults",get:function(){return ex}}]),t}(),M.FormSelect=eA,M.jQueryLoaded&&M.initializeJqueryWrapper(eA,"formSelect","M_FormSelect"),eS=cash,eL=M.anime,eI={},eN=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_Range=i).options=eS.extend({},t.defaults,n),i._mousedown=!1,i._setupThumb(),i._setupEventHandlers(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeThumb(),this.el.M_Range=void 0}},{key:"_setupEventHandlers",value:function(){this._handleRangeChangeBound=this._handleRangeChange.bind(this),this._handleRangeMousedownTouchstartBound=this._handleRangeMousedownTouchstart.bind(this),this._handleRangeInputMousemoveTouchmoveBound=this._handleRangeInputMousemoveTouchmove.bind(this),this._handleRangeMouseupTouchendBound=this._handleRangeMouseupTouchend.bind(this),this._handleRangeBlurMouseoutTouchleaveBound=this._handleRangeBlurMouseoutTouchleave.bind(this),this.el.addEventListener("change",this._handleRangeChangeBound),this.el.addEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.addEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.addEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("change",this._handleRangeChangeBound),this.el.removeEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_handleRangeChange",value:function(){eS(this.value).html(this.$el.val()),eS(this.thumb).hasClass("active")||this._showRangeBubble();var e=this._calcRangeOffset();eS(this.thumb).addClass("active").css("left",e+"px")}},{key:"_handleRangeMousedownTouchstart",value:function(e){if(eS(this.value).html(this.$el.val()),this._mousedown=!0,this.$el.addClass("active"),eS(this.thumb).hasClass("active")||this._showRangeBubble(),"input"!==e.type){var t=this._calcRangeOffset();eS(this.thumb).addClass("active").css("left",t+"px")}}},{key:"_handleRangeInputMousemoveTouchmove",value:function(){if(this._mousedown){eS(this.thumb).hasClass("active")||this._showRangeBubble();var e=this._calcRangeOffset();eS(this.thumb).addClass("active").css("left",e+"px"),eS(this.value).html(this.$el.val())}}},{key:"_handleRangeMouseupTouchend",value:function(){this._mousedown=!1,this.$el.removeClass("active")}},{key:"_handleRangeBlurMouseoutTouchleave",value:function(){if(!this._mousedown){var e=7+parseInt(this.$el.css("padding-left"))+"px";eS(this.thumb).hasClass("active")&&(eL.remove(this.thumb),eL({targets:this.thumb,height:0,width:0,top:10,easing:"easeOutQuad",marginLeft:e,duration:100})),eS(this.thumb).removeClass("active")}}},{key:"_setupThumb",value:function(){this.thumb=document.createElement("span"),this.value=document.createElement("span"),eS(this.thumb).addClass("thumb"),eS(this.value).addClass("value"),eS(this.thumb).append(this.value),this.$el.after(this.thumb)}},{key:"_removeThumb",value:function(){eS(this.thumb).remove()}},{key:"_showRangeBubble",value:function(){var e=-7+parseInt(eS(this.thumb).parent().css("padding-left"))+"px";eL.remove(this.thumb),eL({targets:this.thumb,height:30,width:30,top:-30,marginLeft:e,duration:300,easing:"easeOutQuint"})}},{key:"_calcRangeOffset",value:function(){var e=this.$el.width()-15,t=parseFloat(this.$el.attr("max"))||100,n=parseFloat(this.$el.attr("min"))||0;return(parseFloat(this.$el.val())-n)/(t-n)*e}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Range}},{key:"defaults",get:function(){return eI}}]),t}(),M.Range=eN,M.jQueryLoaded&&M.initializeJqueryWrapper(eN,"range","M_Range"),eN.init(eS("input[type=range]"))},363:function(e,t,n){"use strict";t.meiosisSetup=void 0;var i=n(977);Object.defineProperty(t,"meiosisSetup",{enumerable:!0,get:function(){return i.meiosisSetup}})},977:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.meiosisSetup=void 0;let r=n(125),o=n(264),s=i(n(388)),a=(e,t,n)=>(n[e]=t,n),l=(e,t)=>t?e.concat(t):e,u=e=>e?Object.keys(e).reduce((t,n)=>a(n,Object.assign({},e[n].initial,u(e[n].nested)),t),{}):{},c=e=>Object.assign({},e.initial,u(e.nested)),d=e=>e?Object.keys(e).reduce((t,n)=>{let i=e[n];if(void 0!==i.view){let e=i.view;return a(n,{view:(t,...i)=>e(t.nest(n),...i),nested:d(i.nested)},t)}return t},{}):{},h=e=>d(e.nested),p=(e,t=e=>e,n=e=>e)=>e?Object.keys(e).reduce((i,r)=>{var o;let s=e=>t(e).nest(r),a=e=>n(e)[r],u=e[r];return l(i,null===(o=u.services)||void 0===o?void 0:o.map(e=>({onchange:t=>e.onchange?e.onchange(a(t)):t,run:t=>e.run(s(t))}))).concat(p(u.nested,s,a))},[]):[],f=e=>l([],e.services).concat(p(e.nested)),m=({stream:e,app:t})=>{!e&&(e=r.simpleStream);let n=t||{},i=c(n),o=h(n),a="function"==typeof e?e:e.stream,l=e.scan,u=a();return{states:l((e,t)=>(0,s.default)(e,t),i,u),update:u,view:o}},g=(e,t)=>({[t]:e}),y=(e,t)=>n=>e(g(n,t)),v=(e,t,n)=>i=>{let r=e.map(e=>e[i]),s=()=>e()[i],a=y(t,i),l=(0,o.get)(n,[i,"nested"]);return{states:r,state:s(),getState:s,update:a,nest:v(r,a,l),nested:l}};t.meiosisSetup=e=>{let t=null==e?void 0:e.stream,n=null==e?void 0:e.app,{states:i,update:o,view:s}=m({stream:t,app:n}),a=v(i,o,s),l=()=>i(),u=e=>({states:i,state:e,getState:l,update:o,nest:a,nested:s}),c=(0,r.createDropRepeats)(t);return n&&f(n).forEach(e=>{c(i,e.onchange).map(t=>e.run(u(t)))}),c(i).map(u)}},125:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dropRepeats=t.createDropRepeats=t.simpleStream=t.scan=t.stream=void 0;t.stream=e=>{let n=[],i=e,r=function(e){if(arguments.length>0&&!r.ended)for(let t in i=e,n)n[t](i);return i};return r.map=e=>{let r=(0,t.stream)(),o=t=>{r(e(t))};return n.push(o),r.end=e=>{let t=n.indexOf(o);r.ended=!0,n.splice(t,1)},void 0!==i&&r(e(i)),r},r.end=e=>{r.ended=!0},r};t.scan=(e,n,i)=>{let r=(0,t.stream)(n),o=n;return i.map(t=>{r(o=e(o,t))}),r},t.simpleStream={stream:t.stream,scan:t.scan};t.createDropRepeats=(e=t.simpleStream)=>(t,n=e=>e)=>{let i;let r=("function"==typeof e?e:e.stream)();return t.map(e=>{let t=n(e);t!==i&&(i=t,r(e))}),r},t.dropRepeats=(0,t.createDropRepeats)()},264:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateFormFloatValue=t.updateFormIntValue=t.updateFormValue=t.get=void 0;t.get=(e,t)=>t.reduce((e,t)=>void 0==e?void 0:e[t],e);let n=(e,t)=>({[e[0]]:1===e.length?t:n(e.slice(1),t)}),i=e=>Array.isArray(e)?e:[e],r=(e,t,r)=>o=>{let s=e(o.currentTarget.value);!isNaN(s)&&t.update(n(i(r),s))};t.updateFormValue=(e,t,r=e=>e)=>o=>e.update(n(i(t),r(o.currentTarget.value)));t.updateFormIntValue=(e,t)=>n=>r(parseInt,e,t)(n);t.updateFormFloatValue=(e,t)=>n=>r(parseFloat,e,t)(n)},388:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return s}});let i=Object.assign||((e,t)=>(t&&Object.keys(t).forEach(n=>e[n]=t[n]),e)),r=(e,t,n)=>{let i=typeof n;if(n&&"object"===i){if(Array.isArray(n))for(let i of n)t=r(e,t,i);else for(let i of Object.keys(n)){let s=n[i];"function"==typeof s?t[i]=s(t[i],o):void 0===s?e&&!isNaN(i)?t.splice(i,1):delete t[i]:null===s||"object"!=typeof s||Array.isArray(s)?t[i]=s:"object"==typeof t[i]?t[i]=s===t[i]?s:o(t[i],s):t[i]=r(!1,{},s)}}else"function"===i&&(t=n(t,o));return t},o=(e,...t)=>{let n=Array.isArray(e);return r(n,n?e.slice():i({},e),t)},s=o},862:function(e,t,n){"use strict";var i=n(230);e.exports=function(e,t,n){var r=[],o=!1,s=-1;function a(){for(s=0;s=0&&(r.splice(o,2),o<=s&&(s-=2),e(t,[])),null!=n&&(r.push(t,n),e(t,i(n),l))},redraw:l}}},236:function(e,t,n){"use strict";var i=n(230),r=n(326),o=n(31),s=n(578),a=n(376),l=n(819),u=n(427),c=n(750),d={};function h(e){try{return decodeURIComponent(e)}catch(t){return e}}e.exports=function(e,t){var n=null==e?null:"function"==typeof e.setImmediate?e.setImmediate:e.setTimeout,p=o.resolve(),f=!1,m=!1,g=0,y,v,w,b,E,T,_=d,x={onbeforeupdate:function(){return!(!(g=g?2:1)||d===_)},onremove:function(){e.removeEventListener("popstate",L,!1),e.removeEventListener("hashchange",S,!1)},view:function(){if(g&&d!==_){var e=[i(w,b.key,b)];return _&&(e=_.render(e[0])),e}}},A=N.SKIP={};function S(){f=!1;var n=e.location.hash;"#"!==N.prefix[0]&&(n=e.location.search+n,"?"!==N.prefix[0]&&"/"!==(n=e.location.pathname+n)[0]&&(n="/"+n));var i=n.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,h).slice(N.prefix.length),r=a(i);function o(e){console.error(e),I(v,null,{replace:!0})}u(r.params,e.history.state),function e(n){for(;n=0&&(m+=e.slice(n,s)),d>=0&&(m+=(n<0?"?":"&")+c.slice(d,p));var g=i(u);return g&&(m+=(n<0&&d<0?"?":"&")+g),o>=0&&(m+=e.slice(o)),h>=0&&(m+=(o<0?"":"&")+c.slice(h)),m}},819:function(e,t,n){"use strict";var i=n(376);e.exports=function(e){var t=i(e),n=Object.keys(t.params),r=[],o=RegExp("^"+t.path.replace(/:([^\/.-]+)(\.{3}|\.(?!\.)|-)?|[\\^$*+.()|\[\]{}]/g,function(e,t,n){return null==t?"\\"+e:(r.push({k:t,r:"..."===n}),"..."===n)?"(.*)":"."===n?"([^/]+)\\.":"([^/]+)"+(n||"")})+"$");return function(e){for(var i=0;i1&&"/"===s[s.length-1]&&(s=s.slice(0,-1))):s="/",{path:s,params:t<0?{}:i(e.slice(t+1,r))}}},657:function(e){"use strict";var t=function(e){if(!(this instanceof t))throw Error("Promise must be called with 'new'.");if("function"!=typeof e)throw TypeError("executor must be a function.");var n=this,i=[],r=[],o=u(i,!0),s=u(r,!1),a=n._instance={resolvers:i,rejectors:r},l="function"==typeof setImmediate?setImmediate:setTimeout;function u(e,t){return function o(u){var d;try{if(t&&null!=u&&("object"==typeof u||"function"==typeof u)&&"function"==typeof(d=u.then)){if(u===n)throw TypeError("Promise can't be resolved with itself.");c(d.bind(u))}else l(function(){!t&&0===e.length&&console.error("Possible unhandled promise rejection:",u);for(var n=0;n0)&&e(n)}}var i=n(s);try{e(n(o),i)}catch(e){i(e)}}c(e)};t.prototype.then=function(e,n){var i,r,o=this._instance;function s(e,t,n,s){t.push(function(t){if("function"!=typeof e)n(t);else try{i(e(t))}catch(e){r&&r(e)}}),"function"==typeof o.retry&&s===o.state&&o.retry()}var a=new t(function(e,t){i=e,r=t});return s(e,o.resolvers,i,!0),s(n,o.rejectors,r,!1),a},t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(e){return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})},t.resolve=function(e){return e instanceof t?e:new t(function(t){t(e)})},t.reject=function(e){return new t(function(t,n){n(e)})},t.all=function(e){return new t(function(t,n){var i=e.length,r=0,o=[];if(0===e.length)t([]);else for(var s=0;s-1&&u.pop();for(var d=0;d0&&(r.className=i.join(" ")),a[e]={tag:n,attrs:r}}(e),t):(t.tag=e,t)}},933:function(e,t,n){"use strict";var i=n(230);e.exports=function(){var e,t=arguments[this],n=this+1;if(null==t?t={}:("object"!=typeof t||null!=t.tag||Array.isArray(t))&&(t={},n=this),arguments.length===n+1)e=arguments[n],!Array.isArray(e)&&(e=[e]);else for(e=[];n'+t.children+"",a=a.firstChild):a.innerHTML=t.children,t.dom=a.firstChild,t.domSize=a.childNodes.length,t.instance=[];for(var l=r.createDocumentFragment();o=a.firstChild;)t.instance.push(o),l.appendChild(o);w(e,l,i)}function f(e,t,n,i,r,o){if(t!==n&&(null!=t||null!=n))if(null==t||0===t.length)c(e,n,0,n.length,i,r,o);else if(null==n||0===n.length)E(e,t,0,t.length);else{var s=null!=t[0]&&null!=t[0].key,a=null!=n[0]&&null!=n[0].key,l=0,u=0;if(!s)for(;u=u&&A>=l&&(w=t[x],b=n[A],w.key===b.key);){;w!==b&&m(e,w,b,i,r,o),null!=b.dom&&(r=b.dom),x--,A--}for(;x>=u&&A>=l&&(p=t[u],f=n[l],p.key===f.key);){;u++,l++,p!==f&&m(e,p,f,i,y(t,u,r),o)}for(;x>=u&&A>=l&&l!==A&&p.key===b.key&&w.key===f.key;){;v(e,w,_=y(t,u,r)),w!==f&&m(e,w,f,i,_,o),++l<=--A&&v(e,p,r),p!==b&&m(e,p,b,i,r,o),null!=b.dom&&(r=b.dom),u++,w=t[--x],b=n[A],p=t[u],f=n[l]}for(;x>=u&&A>=l&&w.key===b.key;){;w!==b&&m(e,w,b,i,r,o),null!=b.dom&&(r=b.dom),x--,A--,w=t[x],b=n[A]}if(l>A)E(e,t,u,x+1);else if(u>x)c(e,n,l,A+1,i,r,o);else{var h,S,L=r,I=A-l+1,N=Array(I),k=0,D=0,C=2147483647,j=0;for(D=0;D=l;D--){null==h&&(h=function(e,t,n){for(var i=Object.create(null);t>>1)+(i>>>1)+(n&i&1);e[t[a]]0&&(g[r]=t[n-1]),t[n]=r)}for(n=t.length,i=t[n-1];n-- >0;)t[n]=i,i=g[i];return g.length=0,t}(N)).length-1,D=A;D>=l;D--)f=n[D],-1===N[D-l]?d(e,f,i,o,r):S[k]===D-l?k--:v(e,f,r),null!=f.dom&&(r=n[D].dom);else for(D=A;D>=l;D--)f=n[D],-1===N[D-l]&&d(e,f,i,o,r),null!=f.dom&&(r=n[D].dom)}}else{var R=t.lengthR&&E(e,t,l,t.length),n.length>R&&c(e,n,l,n.length,i,r,o)}}}function m(e,t,n,r,o,a){var c=t.tag;if(c===n.tag){if(n.state=t.state,n.events=t.events,function(e,t){do{if(null!=e.attrs&&"function"==typeof e.attrs.onbeforeupdate){var n=l.call(e.attrs.onbeforeupdate,e,t);if(void 0!==n&&!n)break}if("string"!=typeof e.tag&&"function"==typeof e.state.onbeforeupdate){var n=l.call(e.state.onbeforeupdate,e,t);if(void 0!==n&&!n)break}return!1}while(!1);return e.dom=t.dom,e.domSize=t.domSize,e.instance=t.instance,e.attrs=t.attrs,e.children=t.children,e.text=t.text,!0}(n,t))return;if("string"==typeof c)switch(null!=n.attrs&&z(n.attrs,n,r),c){case"#":(function(e,t){e.children.toString()!==t.children.toString()&&(e.dom.nodeValue=t.children),t.dom=e.dom})(t,n);break;case"<":(function(e,t,n,i,r){t.children!==n.children?(_(e,t),p(e,n,i,r)):(n.dom=t.dom,n.domSize=t.domSize,n.instance=t.instance)})(e,t,n,a,o);break;case"[":(function(e,t,n,i,r,o){f(e,t.children,n.children,i,r,o);var s=0,a=n.children;if(n.dom=null,null!=a){for(var l=0;l-1||null!=e.attrs&&e.attrs.is||"href"!==t&&"list"!==t&&"form"!==t&&"width"!==t&&"height"!==t)&&t in e.dom}var N=/[A-Z]/g;function k(e){return"-"+e.toLowerCase()}function D(e){return"-"===e[0]&&"-"===e[1]?e:"cssFloat"===e?"float":e.replace(N,k)}function C(e,t,n){if(t===n);else if(null==n)e.style.cssText="";else if("object"!=typeof n)e.style.cssText=n;else if(null==t||"object"!=typeof t)for(var i in e.style.cssText="",n){var r=n[i];null!=r&&e.style.setProperty(D(i),String(r))}else{for(var i in n){var r=n[i];null!=r&&(r=String(r))!==String(t[i])&&e.style.setProperty(D(i),r)}for(var i in t)null!=t[i]&&null==n[i]&&e.style.removeProperty(D(i))}}function j(){this._=t}function O(e,n,i){null!=e.events?(e.events._=t,e.events[n]!==i&&(null!=i&&("function"==typeof i||"object"==typeof i)?(null==e.events[n]&&e.dom.addEventListener(n.slice(2),e.events,!1),e.events[n]=i):(null!=e.events[n]&&e.dom.removeEventListener(n.slice(2),e.events,!1),e.events[n]=void 0))):null!=i&&("function"==typeof i||"object"==typeof i)&&(e.events=new j,e.dom.addEventListener(n.slice(2),e.events,!1),e.events[n]=i)}function R(e,t,n){"function"==typeof e.oninit&&l.call(e.oninit,t),"function"==typeof e.oncreate&&n.push(l.bind(e.oncreate,t))}function z(e,t,n){"function"==typeof e.onupdate&&n.push(l.bind(e.onupdate,t))}return j.prototype=Object.create(null),j.prototype.handleEvent=function(e){var t,n=this["on"+e.type];"function"==typeof n?t=n.call(e.currentTarget,e):"function"==typeof n.handleEvent&&n.handleEvent(e),this._&&!1!==e.redraw&&(0,this._)(),!1===t&&(e.preventDefault(),e.stopPropagation())},function(e,r,o){if(!e)throw TypeError("DOM element being rendered to does not exist.");if(null!=n&&e.contains(n))throw TypeError("Node is currently being rendered to and thus is locked.");var s=t,a=n,l=[],c=u(),d=e.namespaceURI;n=e,t="function"==typeof o?o:void 0;try{null==e.vnodes&&(e.textContent=""),r=i.normalizeChildren(Array.isArray(r)?r:[r]),f(e,e.vnodes,r,l,null,"http://www.w3.org/1999/xhtml"===d?void 0:d),e.vnodes=r,null!=c&&u()!==c&&"function"==typeof c.focus&&c.focus();for(var h=0;h=200&&e.target.status<300||304===e.target.status||/^file:\/\//i.test(t),a=e.target.response;if("json"===c){if(!e.target.responseType&&"function"!=typeof n.extract)try{a=JSON.parse(e.target.responseText)}catch(e){a=null}}else(!c||"text"===c)&&null==a&&(a=e.target.responseText);if("function"==typeof n.extract?(a=n.extract(e.target,n),s=!0):"function"==typeof n.deserialize&&(a=n.deserialize(a)),s)i(a);else{var l=function(){try{r=e.target.responseText}catch(e){r=a}var t=Error(r);t.code=e.target.status,t.response=a,o(t)};0===d.status?setTimeout(function(){!p&&l()}):l()}}catch(e){o(e)}},d.ontimeout=function(e){p=!0;var t=Error("Request timed out");t.code=e.target.status,o(t)},"function"==typeof n.config&&(d=n.config(d,n,t)||d)!==m&&(f=d.abort,d.abort=function(){h=!0,f.call(this)}),null==a?d.send():"function"==typeof n.serialize?d.send(n.serialize(a)):a instanceof e.FormData||a instanceof e.URLSearchParams?d.send(a):d.send(JSON.stringify(a))}),jsonp:a(function(t,n,i,r){var s=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+o++,a=e.document.createElement("script");e[s]=function(t){delete e[s],a.parentNode.removeChild(a),i(t)},a.onerror=function(){delete e[s],a.parentNode.removeChild(a),r(Error("JSONP request failed"))},a.src=t+(0>t.indexOf("?")?"?":"&")+encodeURIComponent(n.callbackKey||"callback")+"="+encodeURIComponent(s),e.document.documentElement.appendChild(a)})}}},483:function(e,t,n){"use strict";var i=n(10);e.exports=n(236)("undefined"!=typeof window?window:null,i)},427:function(e,t,n){"use strict";var i=n(729);e.exports=Object.assign||function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n])}},750:function(e,t,n){"use strict";var i=n(729),r=RegExp("^(?:key|oninit|oncreate|onbeforeupdate|onupdate|onbeforeremove|onremove)$");e.exports=function(e,t){var n={};if(null!=t)for(var o in e)i.call(e,o)&&!r.test(o)&&0>t.indexOf(o)&&(n[o]=e[o]);else for(var o in e)i.call(e,o)&&!r.test(o)&&(n[o]=e[o]);return n}},729:function(e){"use strict";e.exports=({}).hasOwnProperty},512:function(e,t){var n;function i(e){return 1!==e?"p":"s"}t.plural_EN=i},949:function(e){"use strict";e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23949ba3' viewBox='0 0 16 16'%3E%3Cpath d='M8 13.1l-8-8 2.1-2.2 5.9 5.9 5.9-5.9 2.1 2.2z'/%3E%3C/svg%3E"},876:function(e,t,n){"use strict";e.exports=n.p+"4d73cb90e394b34b7670.woff"},550:function(e,t,n){"use strict";e.exports=n.p+"0c35d18bf06992036b69.woff2"},106:function(e,t,n){"use strict";var i,r,o,s,a,l,u,c,d,h,p,f,m,g,y,v,w,b,E,T,_,x,A,S,L,I,N,k,D,C,j,O,R,z,P,B,U,F,Y,W,H,Q,V,G,K,q,Z,X,J,ee,et,en,ei,er,eo,es,ea,el,eu,ec,ed,eh,ep,ef,em,eg,ey,ev,ew,eb,eM,eE,eT,e_,ex,eA,eS,eL,eI,eN,ek,eD,eC,ej,eO,eR,ez,eP,eB,eU,eF,eY,e$,eW,eH,eQ,eV,eG,eK,eq,eZ,eX,eJ,e0,e1,e2,e4,e3,e5,e6,e8,e9,e7,te,tt,tn,ti,tr,to,ts,ta,tl,tu,tc,td,th,tp=n("898"),tf=n.n(tp);n("473"),n("514"),n("142"),n("784"),(i=I||(I={})).LANDING="LANDING",i.LOGIN="LOGIN",i.HOME="HOME",i.CRIME_SCRIPT="CRIME_SCRIPT",i.SETTINGS="SETTINGS",i.ABOUT="ABOUT";var tm=n("363");let tg=()=>"idxxxxxxxx".replace(/[x]/g,()=>(16*Math.random()|0).toString(16)),ty=(...e)=>t=>e.reduceRight((e,t)=>t(e),t),tv=e=>t=>Array.prototype.map.call(t,e),tw=e=>t=>Array.prototype.join.call(t,e),tb=e=>e.replace(/([A-Z])/g,e=>"-"+e.toLowerCase()),tM=e=>e?ty(tw(""),tv(t=>`[${tb(t)}="${((e="")=>e.toString().replace(/"/g,"""))(e[t])}"]`),Object.keys)(e):"",tE=["min","max","minLength","maxLength","rows","cols","placeholder","autocomplete","pattern","readOnly","step"],tT=e=>tE.indexOf(e)>=0,t_=({disabled:e})=>e?"[disabled]":"",tx=({required:e,isMandatory:t})=>e||t?"[required][aria-required=true]":"",tA=e=>{let t;return(e=>Object.keys(e).filter(tT).filter(t=>void 0!==e[t]).reduce((t,n)=>{let i=e[n];return t.push(`[${n.toLowerCase()}=${i}]`),t},[]).join(""))(e)+((t=e).maxLength?`[data-length=${t.maxLength}]`:"")+t_(e)+tx(e)+(({autofocus:e})=>"boolean"==typeof e&&e||e&&e()?"[autofocus]":"")(e)},tS=e=>!isNaN(parseFloat(e))&&isFinite(e),tL=(e,t=2,n="0")=>(e+="").length>=t?e:Array(t-e.length+1).join(n)+e;function tI(){return(tI=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}let tk=["label","id","isMandatory","isActive"],tD={view:({attrs:e})=>tf()("span.mandatory",e,"*")},tC=()=>({view:e=>{let{attrs:{label:t,id:n,isMandatory:i,isActive:r}}=e,o=tN(e.attrs,tk);return t?tf()(`label${r?".active":""}${n?`[for=${n}]`:""}`,o,[tf().trust(t),i?tf()(tD):void 0]):void 0}}),tj=()=>({view:({attrs:{helperText:e,dataError:t,dataSuccess:n,className:i}})=>e||t||n?tf()("span.helper-text",{className:i,dataError:t,dataSuccess:n},e?tf().trust(e):""):void 0}),tO=["iconName"],tR=()=>({view:e=>{let{attrs:{iconName:t}}=e,n=tN(e.attrs,tO);return tf()("i.material-icons",n,t)}}),tz=["modalId","tooltip","tooltipPostion","iconName","iconClass","label","attr"],tP=(e,t="")=>()=>{let n=`${e}${t}`;return{view:({attrs:e})=>{let{modalId:t,tooltip:i,tooltipPostion:r,iconName:o,iconClass:s,label:a,attr:l}=e,u=tN(e,tz);return tf()(`${n}${t?`.modal-trigger[href=#${t}]`:""}${i?`.tooltipped[data-position=${r||"top"}][data-tooltip=${i}]`:""}${tM(l)}`,u,o?tf()(tR,{iconName:o,className:s||"left"}):void 0,a||void 0)}}},tB=(tP("a.waves-effect.waves-light.btn","[type=button]"),tP("a.waves-effect.waves-light.btn-large","[type=button]"),tP("a.waves-effect.waves-light.btn-small","[type=button]"),tP("a.waves-effect.waves-teal.btn-flat","[type=button]")),tU=(tP("button.btn-floating.btn-large.waves-effect.waves-light","[type=button]"),tP("button.btn.waves-effect.waves-light","[type=submit]"),()=>({view:({attrs:{header:e,body:t,active:n,iconName:i}})=>tf()(n?"li.active":"li",[e||i?tf()(".collapsible-header",[i?tf()("i.material-icons",i):void 0,e?"string"==typeof e?tf()("span",e):e:void 0]):void 0,t?tf()(".collapsible-body",t):void 0])})),tF=()=>({oncreate:({dom:e,attrs:t})=>{M.Collapsible.init(e,t)},view:({attrs:e})=>{let{items:t,class:n,className:i,style:r,id:o}=e;return t&&t.length>0?tf()("ul.collapsible",{class:n||i,style:r,id:o},t.map(e=>tf()(tU,e))):void 0}});(r=N||(N={}))[r.BASIC=0]="BASIC",r[r.LINKS=1]="LINKS",r[r.AVATAR=2]="AVATAR";let tY=["className","helperText","iconName","id","initialValue","isMandatory","label","onchange","onkeydown","onkeypress","onkeyup","onblur","style"],t$=["className","dataError","dataSuccess","helperText","iconName","id","initialValue","isMandatory","label","maxLength","newRow","onchange","onkeydown","onkeypress","onkeyup","onblur","style","validate"],tW=()=>{let e={id:tg()};return{view:({attrs:t})=>{let{className:n="col s12",helperText:i,iconName:r,id:o=e.id,initialValue:s,isMandatory:a,label:l,onchange:u,onkeydown:c,onkeypress:d,onkeyup:h,onblur:p,style:f}=t,m=tA(tN(t,tY));return tf()(".input-field",{className:n,style:f},[r?tf()("i.material-icons.prefix",r):"",tf()(`textarea.materialize-textarea[tabindex=0][id=${o}]${m}`,{oncreate:({dom:e})=>{M.textareaAutoResize(e),t.maxLength&&M.CharacterCounter.init(e)},onchange:u?e=>{let t=e.target;u(t&&"string"==typeof t.value?t.value:"")}:void 0,value:s,onkeyup:h?e=>{h(e,e.target.value)}:void 0,onkeydown:c?e=>{c(e,e.target.value)}:void 0,onkeypress:d?e=>{d(e,e.target.value)}:void 0,onblur:p}),tf()(tC,{label:l,id:o,isMandatory:a,isActive:s||t.placeholder}),tf()(tj,{helperText:i})])}}},tH=(e,t="")=>()=>{let n={id:tg()},i=t=>{let n=t.value;return n&&("number"===e||"range"===e)?+n:n},r=(e,t)=>{e.setCustomValidity("boolean"==typeof t?t?"":"Custom validation failed":t)};return{view:({attrs:o})=>{let{className:s="col s12",dataError:a,dataSuccess:l,helperText:u,iconName:c,id:d=n.id,initialValue:h,isMandatory:p,label:f,maxLength:m,newRow:g,onchange:y,onkeydown:v,onkeypress:w,onkeyup:b,onblur:E,style:T,validate:_}=o,x=tA(tN(o,t$));return tf()(`.input-field${g?".clear":""}${t}`,{className:s,style:T},[c?tf()("i.material-icons.prefix",c):void 0,tf()(`input.validate[type=${e}][tabindex=0][id=${d}]${x}`,{oncreate:({dom:t})=>{(({autofocus:e})=>!!e&&("boolean"==typeof e?e:e()))(o)&&t.focus(),m&&M.CharacterCounter.init(t),"range"===e&&M.Range.init(t)},onkeyup:b?e=>{b(e,i(e.target))}:void 0,onkeydown:v?e=>{v(e,i(e.target))}:void 0,onkeypress:w?e=>{w(e,i(e.target))}:void 0,onblur:E,onupdate:_?({dom:e})=>{r(e,_(i(e),e))}:void 0,onchange:e=>{let t=e.target;if(t){let e=i(t);y&&y(e),_&&r(t,_(e,t))}},value:h}),tf()(tC,{label:f,id:d,isMandatory:p,isActive:!(void 0===h&&!o.placeholder&&"number"!==e&&"color"!==e&&"range"!==e)}),tf()(tj,{helperText:u,dataError:a,dataSuccess:l})])}}},tQ=(tH("text"),tH("password"),tH("number"),tH("url"),tH("color"),tH("range",".range-field"),tH("email"),()=>({oncreate:({dom:e,attrs:{options:t,onCreate:n}})=>{let i=M.Modal.init(e,t);n&&n(i)},view:({attrs:{id:e,title:t,description:n,fixedFooter:i,bottomSheet:r,buttons:o,richContent:s}})=>tf()(`.modal${i?".modal-fixed-footer":""}${r?".bottom-sheet":""}[id=${e}]`,[tf()(".modal-content",[tf()("h4",t),s&&"string"==typeof n?tf().trust(n||""):"string"==typeof n?tf()("p",n):n]),o?tf()(".modal-footer",o.map(e=>tf()(tB,tI({},e,{className:"modal-close"})))):void 0])})),tV=()=>{let e={},t=e=>e.map(e=>e.id).join(""),n=(e,t,n=!1)=>n||(t instanceof Array&&(e||"number"==typeof e)?t.indexOf(e)>=0:t===e);return{oninit:({attrs:{checkedId:n,initialValue:i,options:r}})=>{e.ids=t(r);let o=n||i;e.checkedId=n instanceof Array?[...n]:n,e.initialValue=null!=o?o instanceof Array?o.filter(e=>null!=e):[o]:[]},view:({attrs:{id:i,newRow:r,className:o="col s12",checkedId:s,key:a,options:l,multiple:u,label:c,helperText:d,placeholder:h="",isMandatory:p,iconName:f,disabled:m,classes:g="",dropdownOptions:y,onchange:v}})=>{e.checkedId!==s&&(e.initialValue=s?s instanceof Array?s:[s]:void 0);let{initialValue:w}=e,b=v?u?()=>{let t=e.instance&&e.instance.getSelectedValues(),n=t?t.length>0&&tS(t[0])?t.map(e=>+e):t.filter(e=>null!==e||void 0!==e):void 0;e.initialValue=n||[],v(e.initialValue)}:t=>{if(t&&t.currentTarget){let n=t.currentTarget,i=tS(n.value)?+n.value:n.value;e.initialValue=[i]}e.initialValue&&v(e.initialValue)}:void 0;r&&(o+=" clear");let E=!l.some(e=>n(e.id,w)),T=l.reduce((e,t)=>(t.group&&0>e.indexOf(t.group)&&e.push(t.group),e),[]);return tf()(".input-field.select-space",{className:o,key:a,oncreate:u?({dom:t})=>e.wrapper=t:void 0},[f&&tf()("i.material-icons.prefix",f),tf()("select",{id:i,title:c,disabled:m,multiple:u,oncreate:({dom:t})=>{e.instance=M.FormSelect.init(t,{classes:g,dropdownOptions:y})},onupdate:({dom:n})=>{if(u){let t=f?1:0;!e.inputEl&&e.wrapper&&e.wrapper.childNodes&&e.wrapper.childNodes.length>0&&e.wrapper.childNodes[t].childNodes&&e.wrapper.childNodes[t].childNodes[0]&&(e.inputEl=e.wrapper.childNodes[t].childNodes[0]),e.inputEl&&e.inputEl.value&&e.inputEl.value.startsWith(`${h}, `)&&(e.inputEl.value=e.inputEl.value.replace(`${h}, `,""))}let i=t(l),r=s&&e.checkedId!==s.toString();e.ids!==i&&(e.ids=i,r=!0),(e.checkedId instanceof Array&&s instanceof Array?e.checkedId.join()!==s.join():e.checkedId!==s)&&(e.checkedId=s,r=!0),r&&(e.instance=M.FormSelect.init(n,{classes:g,dropdownOptions:y}))},onchange:b},tf()("option",{value:"",disabled:!0,selected:!!E||void 0},h),0===T.length?l.map((e,t)=>{var i;return tf()("option",{value:e.id,title:e.title||void 0,disabled:e.disabled?"true":void 0,"data-icon":e.img||void 0,selected:n(e.id,w,0===t&&E&&!h)},null==(i=e.label)?void 0:i.replace("&","&"))}):T.map(e=>tf()("optgroup",{label:e},l.filter(t=>t.group===e).map((e,t)=>{var i;return tf()("option",{value:e.id,title:e.title||void 0,disabled:e.disabled?"true":void 0,"data-icon":e.img||void 0,selected:n(e.id,w,0===t&&E&&!h)},null==(i=e.label)?void 0:i.replace("&","&"))})))),tf()(tC,{label:c,isMandatory:p}),d&&tf()(tj,{helperText:d})])}}},tG=()=>{let e={},t=(e,t)=>t||e.replace(/ /g,"").toLowerCase();return{view:({attrs:{tabWidth:n,selectedTabId:i,tabs:r,className:o,style:s,duration:a,onShow:l,swipeable:u,responsiveThreshold:c}})=>{let d=r.filter(e=>e.active).shift(),h=i||(d?t(d.title,d.id):"");return tf()(".row",[tf()(".col.s12",tf()("ul.tabs"+("fill"===n?".tabs-fixed-width":""),{className:o,style:s,oncreate:({dom:t})=>{e.instance=M.Tabs.init(t,{duration:a,onShow:l,responsiveThreshold:c,swipeable:u})},onupdate:()=>{if(h){let e=document.getElementById(`tab_${h}`);e&&e.click()}},onremove:()=>e.instance.destroy()},r.map(({className:e,title:i,id:o,active:s,disabled:a,target:l,href:u})=>tf()(`li.tab${a?".disabled":""}${"fixed"===n?`.col.s${Math.floor(12/r.length)}`:""}`,{className:e},tf()(`a[id=tab_${t(i,o)}]${s?".active":""}`,{target:l,href:u||`#${t(i,o)}`},i))))),r.filter(({href:e})=>void 0===e).map(({id:e,title:n,vnode:i,contentClass:r})=>tf()(`.col.s12[id=${t(n,e)}]`,{className:r},i))])}}};function tK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n0&&void 0!==arguments[0]?arguments[0]:new Date,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",n=new Date(e);return"".concat(n.getFullYear()).concat(t).concat(tL(n.getMonth()+1)).concat(t).concat(tL(n.getDate()))},t0=function(){window.scrollTo({top:0,behavior:"smooth"})},t1=function(e,t){return" ".repeat(t)+e};function t2(e,t,n,i,r,o,s){try{var a=e[o](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,r)}function t4(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function s(e){t2(o,i,r,s,a,"next",e)}function a(e){t2(o,i,r,s,a,"throw",e)}s(void 0)})}}function t3(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=(r=s.trys).length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]1?s:s[0],i[e]=o}return o=o.pop?function(e,t,n,i){for(var r=i.array?e.slice():e[0],o=e.length,s=1;s0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]- Steering column locks and ignition immobilizers
    - Anti-robbery screens
    - Tamper-proof packaging | 6. Extend guardianship
    - Go out in group at night
    - Leave signs of occupancy
    - Carry cell phone | 11. Conceal targets
    - Off-street parking
    - Gender-neutral phone directories
    - Unmarked armored trucks | 16. Reduce frustrations and stress
    - Efficient lines
    - Polite service
    - Expanded seating
    - Soothing music/muted lights | 21. Set rules
    - Rental agreements
    - Harassment codes
    - Hotel registration |\n| 2. Control access to facilities
    - Entry phones
    - Electronic card access
    - Baggage screening | 7. Assist natural surveillance
    - Improved street lighting
    - Defensible space design
    - Support whistleblowers | 12. Remove targets
    - Removable car radio
    - Women\'s shelters
    - Pre-paid cards for pay phones | 17. Avoid disputes
    - Separate seating for rival soccer fans
    - Reduce crowding in bars
    - Fixed cab fares | 22. Post instructions
    - "No parking"
    - "Private property"
    - "Extinguish camp fires" |\n| 3. Screen exits
    - Ticket needed for exit
    - Export documents
    - Electronic merchandise tags | 8. Reduce anonymity
    - Taxi driver IDs
    - "How\'s my driving?" decals
    - School uniforms | 13. Identify property
    - Property marking
    - Vehicle licensing and parts marking
    - Cattle branding | 18. Reduce temptation and arousal
    - Controls on violent pornography
    - Enforce good behavior on soccer field
    - Prohibit racial slurs | 23. Alert conscience
    - Roadside speed display boards
    - Signatures for customs declarations
    - "Shoplifting is stealing" |\n| 4. Deflect offenders
    - Street closures
    - Separate bathrooms for women
    - Disperse pubs | 9. Use place managers
    - CCTV for double-deck buses
    - Two clerks for convenience stores
    - Reward vigilance | 14. Disrupt markets
    - Monitor pawn shops
    - Controls on classified ads
    - License street vendors | 19. Neutralize peer pressure
    - "Idiots drink and drive"
    - "It\'s OK to say No"
    - Disperse troublemakers at school | 24. Assist compliance
    - Easy library checkout
    - Public lavatories
    - Litter receptacles |\n| 5. Control tools/weapons
    - "Smart" guns
    - Restrict spray paint sales to juveniles
    - Toughened beer glasses | 10. Strengthen formal surveillance
    - Red light cameras
    - Burglar alarms
    - Security guards | 15. Deny benefits
    - Ink merchandise tags
    - Graffiti cleaning
    - Disabling stolen cell phones | 20. Discourage imitation
    - Rapid repair of vandalism
    - V-chips in TVs
    - Censor details of modus operandi | 25. Control drugs and alcohol
    - Breathalyzers in bars
    - Server intervention programs
    - Alcohol-free events |\n'},CRIME_SCRIPT:{TITLE:"Crime script",ROUTE:"/crime_script"},SETTINGS:{TITLE:"Settings",ROUTE:"/settings"},LANDING:{TITLE:"Introduction",ROUTE:"/"},USER:"User",EDITOR:"Editor",ADMIN:"Administrator",CANCEL:"Cancel",DELETE:"Delete",YES:"Yes",NO:"No",OK:"Ok",NAME:"Name",MISC:"Miscellaneous",DESCRIPTION:"Description",DELETE_ITEM:{TITLE:"Delete {item}",DESCRIPTION:"Are you certain you want to delete this {item}. There is no turning back?"},EDIT_BUTTON:{LABEL:"Edit",TOOLTIP:"Edit"},SAVE_BUTTON:{LABEL:"Save",TOOLTIP:"Save unsaved changes"},MODEL:"Model",TITLE:"Title",AUTHORS:"Authors",LINK:"Link",TYPE:"Type",CAST_TYPE:"Role type",SAVE_SCRIPT:"Save Script",EDIT_SCRIPT:"Edit Script",DELETE_SCRIPT:"Delete Script",NEW_SCRIPT:"New Script",DELETE_SCRIPT_CONFIRM:'Are you certain you want to delete the script "{name}"?',ACTIVITIES:"Activities",CAST:"Cast",CONDITIONS:"Conditions",ATTRIBUTES:"Attributes",MEASURES:"Measures",NEW_ACT:"New Act",PREPARATION_PHASE:"Preparation Phase",PRE_ACTIVITY_PHASE:"Pre-Activity Phase",ACTIVITY_PHASE:"Activity Phase",POST_ACTIVITY_PHASE:"Post-Activity Phase",SUMMARY:"Summary",IMAGE:"Image",ACTIVITY:"Activity",SPECIFY:"Specify",CONDITION:"Condition",CATEGORY:"Category",SELECT:"Select",CREATE:"Create",STAGES:"Stages",STAGE:"Stage",SELECT_ACT_TO_EDIT:"Select act to edit",CREATE_NEW_ACT:"Create new act",REFERENCES:"References",DETAILS:"Details",LANGUAGE:"Language",CLEAR:"Clear model",UPLOAD:"Upload model as JSON",DOWNLOAD:"Download model as JSON",PERMALINK:"Create permanent link",ROLE:"Role",ACT:"Act",SELECT_ACT:"Select act to edit",SELECT_ACT_N:"Select one or more acts for this step",INCREASE_EFFORT:"Increase the effort",TARGET_HARDEN:{TITLE:"Target harden",DESC:"Steering column locks and ignition immobilizers, Anti-robbery screens, Tamper-proof packaging"},CONTROL_ACCESS:{TITLE:"Control access to facilities",DESC:"Entry phones, Electronic card access, Baggage screening"},SCREEN_EXITS:{TITLE:"Screen exits",DESC:"Ticket needed for exit, Export documents, Electronic merchandise tags"},DEFLECT_OFFENDERS:{TITLE:"Deflect offenders",DESC:"Street closures, Separate bathrooms for women, Disperse pubs"},CONTROL_TOOLS:{TITLE:"Control tools/weapons",DESC:'"Smart" guns, Restrict spray paint sales to juveniles, Toughened beer glasses'},INCREASE_RISKS:"Increase the risks",EXTEND_GUARDIANSHIP:{TITLE:"Extend guardianship",DESC:"Go out in group at night, Leave signs of occupancy, Carry cell phone"},ASSIST_SURVEILLANCE:{TITLE:"Assist natural surveillance",DESC:"Improved street lighting, Defensible space design, Support whistleblowers"},REDUCE_ANONYMITY:{TITLE:"Reduce anonymity",DESC:'Taxi driver IDs, "How\'s my driving?" decals, School uniforms'},USE_PLACE_MANAGERS:{TITLE:"Use place managers",DESC:"CCTV for double-deck buses, Two clerks for convenience stores, Reward vigilance"},STRENGTHEN_SURVEILLANCE:{TITLE:"Strengthen formal surveillance",DESC:"Red light cameras, Burglar alarms, Security guards"},REDUCE_REWARDS:"Reduce the rewards",CONCEAL_TARGETS:{TITLE:"Conceal targets",DESC:"Off-street parking, Gender-neutral phone directories, Unmarked armored trucks"},REMOVE_TARGETS:{TITLE:"Remove targets",DESC:"Removable car radio, Women's shelters, Pre-paid cards for pay phones"},IDENTIFY_PROPERTY:{TITLE:"Identify property",DESC:"Property marking, Vehicle licensing and parts marking, Cattle branding"},DISRUPT_MARKETS:{TITLE:"Disrupt markets",DESC:"Monitor pawn shops, Controls on classified ads, License street vendors"},DENY_BENEFITS:{TITLE:"Deny benefits",DESC:"Ink merchandise tags, Graffiti cleaning, Disabling stolen cell phones"},REDUCE_PROVOCATIONS:"Reduce provocations",REDUCE_FRUSTRATIONS:{TITLE:"Reduce frustrations and stress",DESC:"Efficient lines, Polite service, Expanded seating, Soothing music/muted lights"},AVOID_DISPUTES:{TITLE:"Avoid disputes",DESC:"Separate seating for rival soccer fans, Reduce crowding in bars, Fixed cab fares"},REDUCE_TEMPTATION:{TITLE:"Reduce temptation and arousal",DESC:"Controls on violent pornography, Enforce good behavior on soccer field, Prohibit racial slurs"},NEUTRALIZE_PRESSURE:{TITLE:"Neutralize peer pressure",DESC:'"Idiots drink and drive", "It\'s OK to say No", Disperse troublemakers at school'},DISCOURAGE_IMITATION:{TITLE:"Discourage imitation",DESC:"Rapid repair of vandalism, V-chips in TVs, Censor details of modus operandi"},REMOVE_EXCUSES:"Remove excuses",SET_RULES:{TITLE:"Set rules",DESC:"Rental agreements, Harassment codes, Hotel registration"},POST_INSTRUCTIONS:{TITLE:"Post instructions",DESC:'"No parking", "Private property", "Extinguish camp fires"'},ALERT_CONSCIENCE:{TITLE:"Alert conscience",DESC:'Roadside speed display boards, Signatures for customs declarations, "Shoplifting is stealing"'},ASSIST_COMPLIANCE:{TITLE:"Assist compliance",DESC:"Easy library checkout, Public lavatories, Litter receptacles"},CONTROL_DRUGS:{TITLE:"Control drugs and alcohol",DESC:"Breathalyzers in bars, Server intervention programs, Alcohol-free events"},EXPORT_TO_WORD:"Export to Word",INTRODUCTION:"Introduction",LOCATION:"Location",LOCATIONS:"Locations ",SEARCH:"Search...",HITS:{0:"No results found",1:"1 result found",n:"{n} results found"}},nu={HOME:{TITLE:"Home",ROUTE:"/home"},ABOUT:{TITLE:"Over de app",ROUTE:"/over",TEXT:'\n\n#### Situational Crime Prevention technieken\n\n| Verhoog de inspanning | Verhoog de risico\'s | Verminder de beloningen | Verminder provocaties | Verwijder excuses |\n|------------------------|----------------------|--------------------------|-------------------------|---------------------|\n| 1. Doelversteviging
    - Stuursloten en startonderbrekers
    - Anti-overval schermen
    - Manipulatiebestendige verpakking | 6. Breid toezicht uit
    - Ga \'s nachts in groep uit
    - Laat tekenen van bewoning achter
    - Draag een mobiele telefoon | 11. Verberg doelen
    - Parkeren buiten de straat
    - Genderneutrale telefoongidsen
    - Ongemarkeerde gepantserde vrachtwagens | 16. Verminder frustraties en stress
    - Effici\xebnte rijen
    - Beleefde service
    - Uitgebreide zitplaatsen
    - Rustgevende muziek/gedempte verlichting | 21. Stel regels op
    - Huurovereenkomsten
    - Intimidatiecodes
    - Hotelregistratie |\n| 2. Controleer toegang tot faciliteiten
    - Deurtelefoons
    - Elektronische kaart toegang
    - Bagagecontrole | 7. Ondersteun natuurlijk toezicht
    - Verbeterde straatverlichting
    - Verdedigbaar ruimteontwerp
    - Ondersteuning van klokkenluiders | 12. Verwijder doelen
    - Verwijderbare autoradio
    - Vrouwenopvang
    - Prepaidkaarten voor openbare telefoons | 17. Vermijd geschillen
    - Gescheiden zitplaatsen voor rivaliserende voetbalfans
    - Verminder drukte in bars
    - Vaste taxitarieven | 22. Plaats instructies
    - "Parkeren verboden"
    - "Priv\xe9-eigendom"
    - "Doof kampvuren" |\n| 3. Controleer uitgangen
    - Ticket nodig voor vertrek
    - Exportdocumenten
    - Elektronische artikelbeveiliging | 8. Verminder anonimiteit
    - Taxichauffeur ID\'s
    - "Hoe is mijn rijgedrag?" stickers
    - Schooluniformen | 13. Identificeer eigendom
    - Eigendomsmarkering
    - Voertuigregistratie en onderdelenmarkering
    - Veemerken | 18. Verminder verleiding en opwinding
    - Controles op gewelddadige pornografie
    - Handhaaf goed gedrag op voetbalveld
    - Verbied racistische opmerkingen | 23. Activeer geweten
    - Snelheidsweergaveborden langs de weg
    - Handtekeningen voor douaneaangiften
    - "Winkeldiefstal is stelen" |\n| 4. Leid overtreders af
    - Straatafsluitingen
    - Aparte toiletten voor vrouwen
    - Verspreid pubs | 9. Gebruik plaatsmanagers
    - CCTV voor dubbeldekkers
    - Twee bedienden voor gemakswinkels
    - Beloon waakzaamheid | 14. Verstoor markten
    - Monitor pandjeshuis
    - Controles op rubrieksadvertenties
    - Vergunning voor straatverkopers | 19. Neutraliseer groepsdruk
    - "Idioten drinken en rijden"
    - "Het is OK om Nee te zeggen"
    - Verspreid onruststokers op school | 24. Help bij naleving
    - Eenvoudige bibliotheekuitleen
    - Openbare toiletten
    - Afvalbakken |\n| 5. Beheers gereedschappen/wapens
    - "Slimme" wapens
    - Beperk verkoop spuitverf aan jongeren
    - Geharde bierglazen | 10. Versterk formeel toezicht
    - Roodlichtcamera\'s
    - Inbraakalarm
    - Beveiligingspersoneel | 15. Ontzeg voordelen
    - Inktlabels op artikelen
    - Graffiti reiniging
    - Uitschakelen gestolen mobiele telefoons | 20. Ontmoedig imitatie
    - Snelle reparatie van vandalisme
    - V-chips in TV\'s
    - Censureer details van modus operandi | 25. Beheers drugs en alcohol
    - Ademanalysers in bars
    - Interventie programma\'s voor barpersoneel
    - Alcoholvrije evenementen |\n'},CRIME_SCRIPT:{TITLE:"Crime script",ROUTE:"/crime_script"},SETTINGS:{TITLE:"Instellingen",ROUTE:"/instellingen"},LANDING:{TITLE:"Introductie",ROUTE:"/"},USER:"Gebruiker",EDITOR:"Redacteur",ADMIN:"Beheerder",CANCEL:"Annuleren",DELETE:"Verwijderen",YES:"Ja",NO:"Nee",OK:"Ok",NAME:"Naam",MISC:"Overig",DESCRIPTION:"Beschrijving",DELETE_ITEM:{TITLE:"{item} verwijderen",DESCRIPTION:"Weet je zeker dat je dit {item} wilt verwijderen? Dit kan niet ongedaan worden gemaakt."},EDIT_BUTTON:{LABEL:"Bewerken",TOOLTIP:"Bewerken"},SAVE_BUTTON:{LABEL:"Opslaan",TOOLTIP:"Wijzigingen opslaan"},MODEL:"Model",TITLE:"Titel",AUTHORS:"Auteurs",LINK:"Link",TYPE:"Type",CAST_TYPE:"Roltype",SAVE_SCRIPT:"Script opslaan",EDIT_SCRIPT:"Script bewerken",DELETE_SCRIPT:"Script verwijderen",NEW_SCRIPT:"Nieuw script",DELETE_SCRIPT_CONFIRM:'Weet je zeker dat je het script "{name}" wilt verwijderen?',ACTIVITIES:"Activiteiten",CAST:"Rolverdeling",CONDITIONS:"Voorwaarden",ATTRIBUTES:"Attributen",MEASURES:"Maatregelen",NEW_ACT:"Nieuwe handeling",PREPARATION_PHASE:"Voorbereidingsfase",PRE_ACTIVITY_PHASE:"Voor-activiteitsfase",ACTIVITY_PHASE:"Activiteitsfase",POST_ACTIVITY_PHASE:"Na-activiteitsfase",SUMMARY:"Samenvatting",IMAGE:"Afbeelding",ACTIVITY:"Activiteit",SPECIFY:"Specificeren",CONDITION:"Voorwaarde",CATEGORY:"Categorie",SELECT:"Selecteren",CREATE:"Maken",STAGES:"Fasen",STAGE:"Fase",SELECT_ACT_TO_EDIT:"Selecteer handeling om te bewerken",CREATE_NEW_ACT:"Nieuwe handeling maken",REFERENCES:"Referenties",DETAILS:"Details",LANGUAGE:"Taal",CLEAR:"Wis model",UPLOAD:"Lees model in als JSON",DOWNLOAD:"Sla model op als JSON",PERMALINK:"Maak permanente link",ROLE:"Rol",ACT:"Act",SELECT_ACT:"Selecteer act om te bewerken",SELECT_ACT_N:"Selecteer een of meerdere acts in deze stage",INCREASE_EFFORT:"Verhoog de inspanning",TARGET_HARDEN:{TITLE:"Doelversteviging",DESC:"Stuursloten en startonderbrekers, Anti-overval schermen, Manipulatiebestendige verpakking"},CONTROL_ACCESS:{TITLE:"Controleer toegang tot faciliteiten",DESC:"Deurtelefoons, Elektronische kaart toegang, Bagagecontrole"},SCREEN_EXITS:{TITLE:"Controleer uitgangen",DESC:"Ticket nodig voor vertrek, Exportdocumenten, Elektronische artikelbeveiliging"},DEFLECT_OFFENDERS:{TITLE:"Leid overtreders af",DESC:"Straatafsluitingen, Aparte toiletten voor vrouwen, Verspreid pubs"},CONTROL_TOOLS:{TITLE:"Beheers gereedschappen/wapens",DESC:'"Slimme" wapens, Beperk verkoop spuitverf aan jongeren, Geharde bierglazen'},INCREASE_RISKS:"Verhoog de risico's",EXTEND_GUARDIANSHIP:{TITLE:"Breid toezicht uit",DESC:"Ga 's nachts in groep uit, Laat tekenen van bewoning achter, Draag een mobiele telefoon"},ASSIST_SURVEILLANCE:{TITLE:"Ondersteun natuurlijk toezicht",DESC:"Verbeterde straatverlichting, Verdedigbaar ruimteontwerp, Ondersteuning van klokkenluiders"},REDUCE_ANONYMITY:{TITLE:"Verminder anonimiteit",DESC:'Taxichauffeur ID\'s, "Hoe is mijn rijgedrag?" stickers, Schooluniformen'},USE_PLACE_MANAGERS:{TITLE:"Gebruik plaatsmanagers",DESC:"CCTV voor dubbeldekkers, Twee bedienden voor gemakswinkels, Beloon waakzaamheid"},STRENGTHEN_SURVEILLANCE:{TITLE:"Versterk formeel toezicht",DESC:"Roodlichtcamera's, Inbraakalarm, Beveiligingspersoneel"},REDUCE_REWARDS:"Verminder de beloningen",CONCEAL_TARGETS:{TITLE:"Verberg doelen",DESC:"Parkeren buiten de straat, Genderneutrale telefoongidsen, Ongemarkeerde gepantserde vrachtwagens"},REMOVE_TARGETS:{TITLE:"Verwijder doelen",DESC:"Verwijderbare autoradio, Vrouwenopvang, Prepaidkaarten voor openbare telefoons"},IDENTIFY_PROPERTY:{TITLE:"Identificeer eigendom",DESC:"Eigendomsmarkering, Voertuigregistratie en onderdelenmarkering, Veemerken"},DISRUPT_MARKETS:{TITLE:"Verstoor markten",DESC:"Monitor pandjeshuis, Controles op rubrieksadvertenties, Vergunning voor straatverkopers"},DENY_BENEFITS:{TITLE:"Ontzeg voordelen",DESC:"Inktlabels op artikelen, Graffiti reiniging, Uitschakelen gestolen mobiele telefoons"},REDUCE_PROVOCATIONS:"Verminder provocaties",REDUCE_FRUSTRATIONS:{TITLE:"Verminder frustraties en stress",DESC:"Effici\xebnte rijen, Beleefde service, Uitgebreide zitplaatsen, Rustgevende muziek/gedempte verlichting"},AVOID_DISPUTES:{TITLE:"Vermijd geschillen",DESC:"Gescheiden zitplaatsen voor rivaliserende voetbalfans, Verminder drukte in bars, Vaste taxitarieven"},REDUCE_TEMPTATION:{TITLE:"Verminder verleiding en opwinding",DESC:"Controles op gewelddadige pornografie, Handhaaf goed gedrag op voetbalveld, Verbied racistische opmerkingen"},NEUTRALIZE_PRESSURE:{TITLE:"Neutraliseer groepsdruk",DESC:'"Idioten drinken en rijden", "Het is OK om Nee te zeggen", Verspreid onruststokers op school'},DISCOURAGE_IMITATION:{TITLE:"Ontmoedig imitatie",DESC:"Snelle reparatie van vandalisme, V-chips in TV's, Censureer details van modus operandi"},REMOVE_EXCUSES:"Verwijder excuses",SET_RULES:{TITLE:"Stel regels op",DESC:"Huurovereenkomsten, Intimidatiecodes, Hotelregistratie"},POST_INSTRUCTIONS:{TITLE:"Plaats instructies",DESC:'"Parkeren verboden", "Priv\xe9-eigendom", "Doof kampvuren"'},ALERT_CONSCIENCE:{TITLE:"Activeer geweten",DESC:'Snelheidsweergaveborden langs de weg, Handtekeningen voor douaneaangiften, "Winkeldiefstal is stelen"'},ASSIST_COMPLIANCE:{TITLE:"Help bij naleving",DESC:"Eenvoudige bibliotheekuitleen, Openbare toiletten, Afvalbakken"},CONTROL_DRUGS:{TITLE:"Beheers drugs en alcohol",DESC:"Ademanalysers in bars, Interventie programma's voor barpersoneel, Alcoholvrije evenementen"},EXPORT_TO_WORD:"Exporteer naar Word",INTRODUCTION:"Introductie",LOCATION:"Locatie",LOCATIONS:"Locaties",SEARCH:"Zoek...",HITS:{0:"Geen resultaten gevonden",1:"1 resultaat gevonden",n:"{n} resultaten gevonden"}},nc=function(e){return ni("nl"===e?nu:nl,{debug:!0,array:!0,resolveAliases:!0,pluralize:nr.plural_EN,useKeyForMissingTranslation:!0})},nd=[],nh={defaultLocale:"en",currentLocale:"en",locales:{},init:function(e,t){return nf.apply(this,arguments)},addOnChangeListener:function(e){nd.push(e)},loadAndSetLocale:nm},np=nc(nh.currentLocale);function nf(){return(nf=ns(function(e,t){var n;return na(this,function(i){switch(i.label){case 0:return nh.locales=e,(n=Object.keys(e).filter(function(t){return e[t].default}).shift())&&(nh.defaultLocale=n||t),document.documentElement.setAttribute("lang",t),[4,nm(t)];case 1:return i.sent(),[2]}})})).apply(this,arguments)}function nm(e){return ng.apply(this,arguments)}function ng(){return(ng=ns(function(e){var t;return na(this,function(n){return nh.currentLocale===e?[2]:(t=function(e){return Object.keys(nh.locales).indexOf(e)>=0}(e)?e:nh.defaultLocale,nh.currentLocale=t,np=nc(e),nd.forEach(function(e){return e(nh.currentLocale,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nh.currentLocale;return nh.locales[e].dir||"ltr"}())}),[2])})})).apply(this,arguments)}let ny=[[/\r\n/g,"\n"],[/\n(#+)(.*)/g,(e,t,n="")=>{let i=t.length;return`${n.trim()}`}],[/!\[([^\[]+)\]\((?:javascript:)?([^\)]+)\)/g,'$1'],[/\[([^\[]+)\]\((?:javascript:)?([^\)]+)\)/g,'$1'],[/([^\\])(\*\*|__)(.*?(_|\*)?)\2/g,"$1$3"],[/([^\\])(\*|_)(.*?)\2/g,"$1$3"],[/\\_/g,"_"],[/\~\~(.*?)\~\~/g,"$1"],[/\:\"(.*?)\"\:/g,"$1"],[/\n\s*```\n([^]*?)\n\s*```\s*\n/g,"\n
    $1
    "],[/`(.*?)`/g,(e,t)=>`${(e=>{e=e.replace(/\&/g,"&");let t="'#<>`*-~_=:\"![]()nt",n=t.length;for(let i=0;i`&#${e.charCodeAt(0)};`);return e})(t)}`],[/\n(\*|\-|\+)(.*)/g,(e,t,n="")=>`
      +(()=>{var e={887:function(e,t,n){var i,r;i=0,r=function(){"use strict";function t(e,t,n){var i=new XMLHttpRequest;i.open("GET",e),i.responseType="blob",i.onload=function(){a(i.response,t,n)},i.onerror=function(){console.error("could not download file")},i.send()}function i(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function r(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,n,s){var a=o.URL||o.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?r(l):i(l.href)?t(e,n,s):r(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout(function(){a.revokeObjectURL(l.href)},4e4),setTimeout(function(){r(l)},0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e){var s,a;navigator.msSaveOrOpenBlob((s=e,void 0===(a=o)?a={autoBom:!1}:"object"!=typeof a&&(console.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s),n)}else if(i(e))t(e,n,o);else{var l=document.createElement("a");l.href=e,l.target="_blank",setTimeout(function(){r(l)})}}:function(e,n,i,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,i);var a="application/octet-stream"===e.type,l=/constructor/i.test(o.HTMLElement)||o.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||a&&l||s)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},c.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,h=d.createObjectURL(e);r?r.location=h:location.href=h,r=null,setTimeout(function(){d.revokeObjectURL(h)},4e4)}});o.saveAs=a.saveAs=a,e.exports=a},"function"==typeof define&&define.amd?define([],r):r()},461:function(e,t,n){e=n.nmd(e);var i=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function r(e,t){if(!i[e]){i[e]={};for(var n=0;n>>8,n[2*i+1]=s%256}return n},decompressFromUint8Array:function(t){if(null==t)return o.decompress(t);for(var n=Array(t.length/2),i=0,r=n.length;ic.charCodeAt(0)){for(i=0;i>=1}else{for(i=0,r=1;i>=1}0==--d&&(d=Math.pow(2,p),p++),delete a[c]}else for(i=0,r=s[c];i>=1;0==--d&&(d=Math.pow(2,p),p++),s[u]=h++,c=String(l)}if(""!==c){if(Object.prototype.hasOwnProperty.call(a,c)){if(256>c.charCodeAt(0)){for(i=0;i>=1}else{for(i=0,r=1;i>=1}0==--d&&(d=Math.pow(2,p),p++),delete a[c]}else for(i=0,r=s[c];i>=1;0==--d&&(d=Math.pow(2,p),p++)}for(i=0,r=2;i>=1;for(;;){if(m<<=1,g==t-1){f.push(n(m));break}g++}return f.join("")},decompress:function(e){return null==e?"":""==e?null:o._decompress(e.length,32768,function(t){return e.charCodeAt(t)})},_decompress:function(t,n,i){var r,o,s,a,l,u,c,d,h=[],p=4,f=4,m=3,g="",y=[],v={val:i(0),position:n,index:1};for(o=0;o<3;o+=1)h[o]=o;for(a=0,u=4,c=1;c!=u;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=i(v.index++)),a|=(l>0?1:0)*c,c<<=1;switch(a){case 0:for(a=0,u=256,c=1;c!=u;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=i(v.index++)),a|=(l>0?1:0)*c,c<<=1;d=e(a);break;case 1:for(a=0,u=65536,c=1;c!=u;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=i(v.index++)),a|=(l>0?1:0)*c,c<<=1;d=e(a);break;case 2:return""}for(h[3]=d,s=d,y.push(d);;){if(v.index>t)return"";for(a=0,u=Math.pow(2,m),c=1;c!=u;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=i(v.index++)),a|=(l>0?1:0)*c,c<<=1;switch(d=a){case 0:for(a=0,u=256,c=1;c!=u;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=i(v.index++)),a|=(l>0?1:0)*c,c<<=1;h[f++]=e(a),d=f-1,p--;break;case 1:for(a=0,u=65536,c=1;c!=u;)l=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=i(v.index++)),a|=(l>0?1:0)*c,c<<=1;h[f++]=e(a),d=f-1,p--;break;case 2:return y.join("")}if(0==p&&(p=Math.pow(2,m),m++),h[d])g=h[d];else{if(d!==f)return null;g=s+s.charAt(0)}y.push(g),h[f++]=s+g.charAt(0),p--,s=g,0==p&&(p=Math.pow(2,m),m++)}}};return o}();"function"==typeof define&&define.amd?define(function(){return i}):null!=e?e.exports=i:"undefined"!=typeof angular&&null!=angular&&angular.module("LZString",[]).factory("LZString",function(){return i})},142:function(e,t,n){e=n.nmd(e);var i,r,o,s,a,l,u,c,d,h,p,f,m,g,y,v,w,b,E,T,_,x,A,S,L,I,N,k,D,C,j,O,R,z,P,B,U,F,Y,W,H,Q,V,G,K,q,Z,X,J,ee,et,en,ei,er,eo,es,ea,el,eu,ec,ed,eh,ep,ef,em,eg,ey,ev,ew,eb,eM,eE,eT,e_,ex,eA,eS,eL,eI,eN,ek=function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},eD=function(){function e(e,t){for(var n=0;n/,p=/^\w+$/;function f(e,n){return n=n||t,d.test(e)?n.getElementsByClassName(e.slice(1)):p.test(e)?n.getElementsByTagName(e):n.querySelectorAll(e)}function m(n){if(!e){var i=(e=t.implementation.createHTMLDocument(null)).createElement("base");i.href=t.location.href,e.head.appendChild(i)}return e.body.innerHTML=n,e.body.childNodes}function g(e){"loading"!==t.readyState?e():t.addEventListener("DOMContentLoaded",e)}function y(e,i){if(!e)return this;if(e.cash&&e!==n)return e;var r,o=e,s=0;if(u(e))o=c.test(e)?t.getElementById(e.slice(1)):h.test(e)?m(e):f(e,i);else if(l(e))return g(e),this;if(!o)return this;if(o.nodeType||o===n)this[0]=o,this.length=1;else for(r=this.length=o.length;sr.right-n||l+t.width>window.innerWidth-n)&&(i.right=!0),(uo-n||u+t.height>window.innerHeight-n)&&(i.bottom=!0),i},M.checkPossibleAlignments=function(e,t,n,i){var r={top:!0,right:!0,bottom:!0,left:!0,spaceOnTop:null,spaceOnRight:null,spaceOnBottom:null,spaceOnLeft:null},o="visible"===getComputedStyle(t).overflow,s=t.getBoundingClientRect(),a=Math.min(s.height,window.innerHeight),l=Math.min(s.width,window.innerWidth),u=e.getBoundingClientRect(),c=t.scrollLeft,d=t.scrollTop,h=n.left-c,p=n.top-d,f=n.top+u.height-d;return r.spaceOnRight=o?window.innerWidth-(u.left+n.width):l-(h+n.width),r.spaceOnRight<0&&(r.left=!1),r.spaceOnLeft=o?u.right-n.width:h-n.width+u.width,r.spaceOnLeft<0&&(r.right=!1),r.spaceOnBottom=o?window.innerHeight-(u.top+n.height+i):a-(p+n.height+i),r.spaceOnBottom<0&&(r.top=!1),r.spaceOnTop=o?u.bottom-(n.height+i):f-(n.height-i),r.spaceOnTop<0&&(r.bottom=!1),r},M.getOverflowParent=function(e){return null==e?null:e===document.body||"visible"!==getComputedStyle(e).overflow?e:M.getOverflowParent(e.parentElement)},M.getIdFromTrigger=function(e){var t=e.getAttribute("data-target");return t||(t=(t=e.getAttribute("href"))?t.slice(1):""),t},M.getDocumentScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},M.getDocumentScrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0};var ez=Date.now||function(){return(new Date).getTime()};M.throttle=function(e,t,n){var i=void 0,r=void 0,o=void 0,s=null,a=0;n||(n={});var l=function(){a=!1===n.leading?0:ez(),s=null,o=e.apply(i,r),i=r=null};return function(){var u=ez();a||!1!==n.leading||(a=u);var c=t-(u-a);return i=this,r=arguments,c<=0?(clearTimeout(s),s=null,a=u,o=e.apply(i,r),i=r=null):s||!1===n.trailing||(s=setTimeout(l,c)),o}};var eP={scope:{}};eP.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){if(n.get||n.set)throw TypeError("ES3 does not support getters and setters.");e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},eP.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:void 0!==n.g&&null!=n.g?n.g:e},eP.global=eP.getGlobal(this),eP.SYMBOL_PREFIX="jscomp_symbol_",eP.initSymbol=function(){eP.initSymbol=function(){},eP.global.Symbol||(eP.global.Symbol=eP.Symbol)},eP.symbolCounter_=0,eP.Symbol=function(e){return eP.SYMBOL_PREFIX+(e||"")+eP.symbolCounter_++},eP.initSymbolIterator=function(){eP.initSymbol();var e=eP.global.Symbol.iterator;e||(e=eP.global.Symbol.iterator=eP.global.Symbol("iterator")),"function"!=typeof Array.prototype[e]&&eP.defineProperty(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return eP.arrayIterator(this)}}),eP.initSymbolIterator=function(){}},eP.arrayIterator=function(e){var t=0;return eP.iteratorPrototype(function(){return t=B.currentTime)for(var c=0;cn&&(t.duration=i.duration),t.children.push(i)}),t.seek(0),t.reset(),t.autoplay&&t.restart(),t},t},b.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},b}(),r=cash,o=M.anime,s={accordion:!0,onOpenStart:void 0,onOpenEnd:void 0,onCloseStart:void 0,onCloseEnd:void 0,inDuration:300,outDuration:300},a=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));(i.el.M_Collapsible=i).options=r.extend({},t.defaults,n),i.$headers=i.$el.children("li").children(".collapsible-header"),i.$headers.attr("tabindex",0),i._setupEventHandlers();var o=i.$el.children("li.active").children(".collapsible-body");return i.options.accordion?o.first().css("display","block"):o.css("display","block"),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Collapsible=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleCollapsibleClickBound=this._handleCollapsibleClick.bind(this),this._handleCollapsibleKeydownBound=this._handleCollapsibleKeydown.bind(this),this.el.addEventListener("click",this._handleCollapsibleClickBound),this.$headers.each(function(t){t.addEventListener("keydown",e._handleCollapsibleKeydownBound)})}},{key:"_removeEventHandlers",value:function(){var e=this;this.el.removeEventListener("click",this._handleCollapsibleClickBound),this.$headers.each(function(t){t.removeEventListener("keydown",e._handleCollapsibleKeydownBound)})}},{key:"_handleCollapsibleClick",value:function(e){var t=r(e.target).closest(".collapsible-header");if(e.target&&t.length){var n=t.closest(".collapsible");if(n[0]===this.el){var i=t.closest("li"),o=n.children("li"),s=i[0].classList.contains("active"),a=o.index(i);s?this.close(a):this.open(a)}}}},{key:"_handleCollapsibleKeydown",value:function(e){13===e.keyCode&&this._handleCollapsibleClickBound(e)}},{key:"_animateIn",value:function(e){var t=this,n=this.$el.children("li").eq(e);if(n.length){var i=n.children(".collapsible-body");o.remove(i[0]),i.css({display:"block",overflow:"hidden",height:0,paddingTop:"",paddingBottom:""});var r=i.css("padding-top"),s=i.css("padding-bottom"),a=i[0].scrollHeight;i.css({paddingTop:0,paddingBottom:0}),o({targets:i[0],height:a,paddingTop:r,paddingBottom:s,duration:this.options.inDuration,easing:"easeInOutCubic",complete:function(e){i.css({overflow:"",paddingTop:"",paddingBottom:"",height:""}),"function"==typeof t.options.onOpenEnd&&t.options.onOpenEnd.call(t,n[0])}})}}},{key:"_animateOut",value:function(e){var t=this,n=this.$el.children("li").eq(e);if(n.length){var i=n.children(".collapsible-body");o.remove(i[0]),i.css("overflow","hidden"),o({targets:i[0],height:0,paddingTop:0,paddingBottom:0,duration:this.options.outDuration,easing:"easeInOutCubic",complete:function(){i.css({height:"",overflow:"",padding:"",display:""}),"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t,n[0])}})}}},{key:"open",value:function(e){var t=this,n=this.$el.children("li").eq(e);if(n.length&&!n[0].classList.contains("active")){if("function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,n[0]),this.options.accordion){var i=this.$el.children("li");this.$el.children("li.active").each(function(e){var n=i.index(r(e));t.close(n)})}n[0].classList.add("active"),this._animateIn(e)}}},{key:"close",value:function(e){var t=this.$el.children("li").eq(e);t.length&&t[0].classList.contains("active")&&("function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,t[0]),t[0].classList.remove("active"),this._animateOut(e))}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Collapsible}},{key:"defaults",get:function(){return s}}]),t}(),M.Collapsible=a,M.jQueryLoaded&&M.initializeJqueryWrapper(a,"collapsible","M_Collapsible"),l=cash,u=M.anime,c={alignment:"left",autoFocus:!0,constrainWidth:!0,container:null,coverTrigger:!0,closeOnClick:!0,hover:!1,inDuration:150,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onItemClick:null},(d=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return i.el.M_Dropdown=i,t._dropdowns.push(i),i.id=M.getIdFromTrigger(e),i.dropdownEl=document.getElementById(i.id),i.$dropdownEl=l(i.dropdownEl),i.options=l.extend({},t.defaults,n),i.isOpen=!1,i.isScrollable=!1,i.isTouchMoving=!1,i.focusedIndex=-1,i.filterQuery=[],i.options.container?l(i.options.container).append(i.dropdownEl):i.$el.after(i.dropdownEl),i._makeDropdownFocusable(),i._resetFilterQueryBound=i._resetFilterQuery.bind(i),i._handleDocumentClickBound=i._handleDocumentClick.bind(i),i._handleDocumentTouchmoveBound=i._handleDocumentTouchmove.bind(i),i._handleDropdownClickBound=i._handleDropdownClick.bind(i),i._handleDropdownKeydownBound=i._handleDropdownKeydown.bind(i),i._handleTriggerKeydownBound=i._handleTriggerKeydown.bind(i),i._setupEventHandlers(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._resetDropdownStyles(),this._removeEventHandlers(),t._dropdowns.splice(t._dropdowns.indexOf(this),1),this.el.M_Dropdown=void 0}},{key:"_setupEventHandlers",value:function(){this.el.addEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.addEventListener("click",this._handleDropdownClickBound),this.options.hover?(this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.addEventListener("mouseleave",this._handleMouseLeaveBound)):(this._handleClickBound=this._handleClick.bind(this),this.el.addEventListener("click",this._handleClickBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.removeEventListener("click",this._handleDropdownClickBound),this.options.hover?(this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.removeEventListener("mouseleave",this._handleMouseLeaveBound)):this.el.removeEventListener("click",this._handleClickBound)}},{key:"_setupTemporaryEventHandlers",value:function(){document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound),document.body.addEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.addEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_removeTemporaryEventHandlers",value:function(){document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound),document.body.removeEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.removeEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_handleClick",value:function(e){e.preventDefault(),this.open()}},{key:"_handleMouseEnter",value:function(){this.open()}},{key:"_handleMouseLeave",value:function(e){var t=e.toElement||e.relatedTarget,n=!!l(t).closest(".dropdown-content").length,i=!1,r=l(t).closest(".dropdown-trigger");r.length&&r[0].M_Dropdown&&r[0].M_Dropdown.isOpen&&(i=!0),i||n||this.close()}},{key:"_handleDocumentClick",value:function(e){var t=this,n=l(e.target);this.options.closeOnClick&&n.closest(".dropdown-content").length&&!this.isTouchMoving?setTimeout(function(){t.close()},0):!n.closest(".dropdown-trigger").length&&n.closest(".dropdown-content").length||setTimeout(function(){t.close()},0),this.isTouchMoving=!1}},{key:"_handleTriggerKeydown",value:function(e){e.which!==M.keys.ARROW_DOWN&&e.which!==M.keys.ENTER||this.isOpen||(e.preventDefault(),this.open())}},{key:"_handleDocumentTouchmove",value:function(e){l(e.target).closest(".dropdown-content").length&&(this.isTouchMoving=!0)}},{key:"_handleDropdownClick",value:function(e){if("function"==typeof this.options.onItemClick){var t=l(e.target).closest("li")[0];this.options.onItemClick.call(this,t)}}},{key:"_handleDropdownKeydown",value:function(e){if(e.which===M.keys.TAB)e.preventDefault(),this.close();else if((e.which===M.keys.ARROW_DOWN||e.which===M.keys.ARROW_UP)&&this.isOpen){e.preventDefault();var t=e.which===M.keys.ARROW_DOWN?1:-1,n=this.focusedIndex,i=!1;do if(n+=t,this.dropdownEl.children[n]&&-1!==this.dropdownEl.children[n].tabIndex){i=!0;break}while(nl.spaceOnBottom?(u="bottom",n+=l.spaceOnTop,o-=l.spaceOnTop):n+=l.spaceOnBottom)),!l[c]){var d="left"===c?"right":"left";l[d]?c=d:l.spaceOnLeft>l.spaceOnRight?(c="right",i+=l.spaceOnLeft,r-=l.spaceOnLeft):(c="left",i+=l.spaceOnRight)}return"bottom"===u&&(o=o-t.height+(this.options.coverTrigger?e.height:0)),"right"===c&&(r=r-t.width+e.width),{x:r,y:o,verticalAlignment:u,horizontalAlignment:c,height:n,width:i}}},{key:"_animateIn",value:function(){var e=this;u.remove(this.dropdownEl),u({targets:this.dropdownEl,opacity:{value:[0,1],easing:"easeOutQuad"},scaleX:[.3,1],scaleY:[.3,1],duration:this.options.inDuration,easing:"easeOutQuint",complete:function(t){e.options.autoFocus&&e.dropdownEl.focus(),"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el)}})}},{key:"_animateOut",value:function(){var e=this;u.remove(this.dropdownEl),u({targets:this.dropdownEl,opacity:{value:0,easing:"easeOutQuint"},scaleX:.3,scaleY:.3,duration:this.options.outDuration,easing:"easeOutQuint",complete:function(t){e._resetDropdownStyles(),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}})}},{key:"_placeDropdown",value:function(){var e=this.options.constrainWidth?this.el.getBoundingClientRect().width:this.dropdownEl.getBoundingClientRect().width;this.dropdownEl.style.width=e+"px";var t=this._getDropdownPosition();this.dropdownEl.style.left=t.x+"px",this.dropdownEl.style.top=t.y+"px",this.dropdownEl.style.height=t.height+"px",this.dropdownEl.style.width=t.width+"px",this.dropdownEl.style.transformOrigin=("left"===t.horizontalAlignment?"0":"100%")+" "+("top"===t.verticalAlignment?"0":"100%")}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this._resetDropdownStyles(),this.dropdownEl.style.display="block",this._placeDropdown(),this._animateIn(),this._setupTemporaryEventHandlers())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.focusedIndex=-1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this._animateOut(),this._removeTemporaryEventHandlers(),this.options.autoFocus&&this.el.focus())}},{key:"recalculateDimensions",value:function(){this.isOpen&&(this.$dropdownEl.css({width:"",height:"",left:"",top:"","transform-origin":""}),this._placeDropdown())}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Dropdown}},{key:"defaults",get:function(){return c}}]),t}())._dropdowns=[],M.Dropdown=d,M.jQueryLoaded&&M.initializeJqueryWrapper(d,"dropdown","M_Dropdown"),h=cash,p=M.anime,f={opacity:.5,inDuration:250,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,preventScrolling:!0,dismissible:!0,startingTop:"4%",endingTop:"10%"},(m=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_Modal=i).options=h.extend({},t.defaults,n),i.isOpen=!1,i.id=i.$el.attr("id"),i._openingTrigger=void 0,i.$overlay=h(''),i.el.tabIndex=0,i._nthModalOpened=0,t._count++,i._setupEventHandlers(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){t._count--,this._removeEventHandlers(),this.el.removeAttribute("style"),this.$overlay.remove(),this.el.M_Modal=void 0}},{key:"_setupEventHandlers",value:function(){this._handleOverlayClickBound=this._handleOverlayClick.bind(this),this._handleModalCloseClickBound=this._handleModalCloseClick.bind(this),1===t._count&&document.body.addEventListener("click",this._handleTriggerClick),this.$overlay[0].addEventListener("click",this._handleOverlayClickBound),this.el.addEventListener("click",this._handleModalCloseClickBound)}},{key:"_removeEventHandlers",value:function(){0===t._count&&document.body.removeEventListener("click",this._handleTriggerClick),this.$overlay[0].removeEventListener("click",this._handleOverlayClickBound),this.el.removeEventListener("click",this._handleModalCloseClickBound)}},{key:"_handleTriggerClick",value:function(e){var t=h(e.target).closest(".modal-trigger");if(t.length){var n=M.getIdFromTrigger(t[0]),i=document.getElementById(n).M_Modal;i&&i.open(t),e.preventDefault()}}},{key:"_handleOverlayClick",value:function(){this.options.dismissible&&this.close()}},{key:"_handleModalCloseClick",value:function(e){h(e.target).closest(".modal-close").length&&this.close()}},{key:"_handleKeydown",value:function(e){27===e.keyCode&&this.options.dismissible&&this.close()}},{key:"_handleFocus",value:function(e){this.el.contains(e.target)||this._nthModalOpened!==t._modalsOpen||this.el.focus()}},{key:"_animateIn",value:function(){var e=this;h.extend(this.el.style,{display:"block",opacity:0}),h.extend(this.$overlay[0].style,{display:"block",opacity:0}),p({targets:this.$overlay[0],opacity:this.options.opacity,duration:this.options.inDuration,easing:"easeOutQuad"});var t={targets:this.el,duration:this.options.inDuration,easing:"easeOutCubic",complete:function(){"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el,e._openingTrigger)}};this.el.classList.contains("bottom-sheet")?h.extend(t,{bottom:0,opacity:1}):h.extend(t,{top:[this.options.startingTop,this.options.endingTop],opacity:1,scaleX:[.8,1],scaleY:[.8,1]}),p(t)}},{key:"_animateOut",value:function(){var e=this;p({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuart"});var t={targets:this.el,duration:this.options.outDuration,easing:"easeOutCubic",complete:function(){e.el.style.display="none",e.$overlay.remove(),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}};this.el.classList.contains("bottom-sheet")?h.extend(t,{bottom:"-100%",opacity:0}):h.extend(t,{top:[this.options.endingTop,this.options.startingTop],opacity:0,scaleX:.8,scaleY:.8}),p(t)}},{key:"open",value:function(e){if(!this.isOpen)return this.isOpen=!0,t._modalsOpen++,this._nthModalOpened=t._modalsOpen,this.$overlay[0].style.zIndex=1e3+2*t._modalsOpen,this.el.style.zIndex=1e3+2*t._modalsOpen+1,this._openingTrigger=e?e[0]:void 0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el,this._openingTrigger),this.options.preventScrolling&&(document.body.style.overflow="hidden"),this.el.classList.add("open"),this.el.insertAdjacentElement("afterend",this.$overlay[0]),this.options.dismissible&&(this._handleKeydownBound=this._handleKeydown.bind(this),this._handleFocusBound=this._handleFocus.bind(this),document.addEventListener("keydown",this._handleKeydownBound),document.addEventListener("focus",this._handleFocusBound,!0)),p.remove(this.el),p.remove(this.$overlay[0]),this._animateIn(),this.el.focus(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,t._modalsOpen--,this._nthModalOpened=0,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this.el.classList.remove("open"),0===t._modalsOpen&&(document.body.style.overflow=""),this.options.dismissible&&(document.removeEventListener("keydown",this._handleKeydownBound),document.removeEventListener("focus",this._handleFocusBound,!0)),p.remove(this.el),p.remove(this.$overlay[0]),this._animateOut(),this}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Modal}},{key:"defaults",get:function(){return f}}]),t}())._modalsOpen=0,m._count=0,M.Modal=m,M.jQueryLoaded&&M.initializeJqueryWrapper(m,"modal","M_Modal"),g=cash,y=M.anime,v={inDuration:275,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null},w=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_Materialbox=i).options=g.extend({},t.defaults,n),i.overlayActive=!1,i.doneAnimating=!0,i.placeholder=g("
      ").addClass("material-placeholder"),i.originalWidth=0,i.originalHeight=0,i.originInlineStyles=i.$el.attr("style"),i.caption=i.el.getAttribute("data-caption")||"",i.$el.before(i.placeholder),i.placeholder.append(i.$el),i._setupEventHandlers(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Materialbox=void 0,g(this.placeholder).after(this.el).remove(),this.$el.removeAttr("style")}},{key:"_setupEventHandlers",value:function(){this._handleMaterialboxClickBound=this._handleMaterialboxClick.bind(this),this.el.addEventListener("click",this._handleMaterialboxClickBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleMaterialboxClickBound)}},{key:"_handleMaterialboxClick",value:function(e){!1===this.doneAnimating||this.overlayActive&&this.doneAnimating?this.close():this.open()}},{key:"_handleWindowScroll",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowResize",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowEscape",value:function(e){27===e.keyCode&&this.doneAnimating&&this.overlayActive&&this.close()}},{key:"_makeAncestorsOverflowVisible",value:function(){this.ancestorsChanged=g();for(var e=this.placeholder[0].parentNode;null!==e&&!g(e).is(document);){var t=g(e);"visible"!==t.css("overflow")&&(t.css("overflow","visible"),void 0===this.ancestorsChanged?this.ancestorsChanged=t:this.ancestorsChanged=this.ancestorsChanged.add(t)),e=e.parentNode}}},{key:"_animateImageIn",value:function(){var e=this,t={targets:this.el,height:[this.originalHeight,this.newHeight],width:[this.originalWidth,this.newWidth],left:M.getDocumentScrollLeft()+this.windowWidth/2-this.placeholder.offset().left-this.newWidth/2,top:M.getDocumentScrollTop()+this.windowHeight/2-this.placeholder.offset().top-this.newHeight/2,duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){e.doneAnimating=!0,"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el)}};this.maxWidth=this.$el.css("max-width"),this.maxHeight=this.$el.css("max-height"),"none"!==this.maxWidth&&(t.maxWidth=this.newWidth),"none"!==this.maxHeight&&(t.maxHeight=this.newHeight),y(t)}},{key:"_animateImageOut",value:function(){var e=this;y({targets:this.el,width:this.originalWidth,height:this.originalHeight,left:0,top:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){e.placeholder.css({height:"",width:"",position:"",top:"",left:""}),e.attrWidth&&e.$el.attr("width",e.attrWidth),e.attrHeight&&e.$el.attr("height",e.attrHeight),e.$el.removeAttr("style"),e.originInlineStyles&&e.$el.attr("style",e.originInlineStyles),e.$el.removeClass("active"),e.doneAnimating=!0,e.ancestorsChanged.length&&e.ancestorsChanged.css("overflow",""),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}})}},{key:"_updateVars",value:function(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.caption=this.el.getAttribute("data-caption")||""}},{key:"open",value:function(){var e=this;this._updateVars(),this.originalWidth=this.el.getBoundingClientRect().width,this.originalHeight=this.el.getBoundingClientRect().height,this.doneAnimating=!1,this.$el.addClass("active"),this.overlayActive=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this.placeholder.css({width:this.placeholder[0].getBoundingClientRect().width+"px",height:this.placeholder[0].getBoundingClientRect().height+"px",position:"relative",top:0,left:0}),this._makeAncestorsOverflowVisible(),this.$el.css({position:"absolute","z-index":1e3,"will-change":"left, top, width, height"}),this.attrWidth=this.$el.attr("width"),this.attrHeight=this.$el.attr("height"),this.attrWidth&&(this.$el.css("width",this.attrWidth+"px"),this.$el.removeAttr("width")),this.attrHeight&&(this.$el.css("width",this.attrHeight+"px"),this.$el.removeAttr("height")),this.$overlay=g('
      ').css({opacity:0}).one("click",function(){e.doneAnimating&&e.close()}),this.$el.before(this.$overlay);var t=this.$overlay[0].getBoundingClientRect();this.$overlay.css({width:this.windowWidth+"px",height:this.windowHeight+"px",left:-1*t.left+"px",top:-1*t.top+"px"}),y.remove(this.el),y.remove(this.$overlay[0]),y({targets:this.$overlay[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}),""!==this.caption&&(this.$photocaption&&y.remove(this.$photoCaption[0]),this.$photoCaption=g('
      '),this.$photoCaption.text(this.caption),g("body").append(this.$photoCaption),this.$photoCaption.css({display:"inline"}),y({targets:this.$photoCaption[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}));var n=0,i=this.originalWidth/this.windowWidth,r=this.originalHeight/this.windowHeight;this.newWidth=0,this.newHeight=0,ri.options.responsiveThreshold,i.$img=i.$el.find("img").first(),i.$img.each(function(){this.complete&&b(this).trigger("load")}),i._updateParallax(),i._setupEventHandlers(),i._setupStyles(),t._parallaxes.push(i),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){t._parallaxes.splice(t._parallaxes.indexOf(this),1),this.$img[0].style.transform="",this._removeEventHandlers(),this.$el[0].M_Parallax=void 0}},{key:"_setupEventHandlers",value:function(){this._handleImageLoadBound=this._handleImageLoad.bind(this),this.$img[0].addEventListener("load",this._handleImageLoadBound),0===t._parallaxes.length&&(t._handleScrollThrottled=M.throttle(t._handleScroll,5),window.addEventListener("scroll",t._handleScrollThrottled),t._handleWindowResizeThrottled=M.throttle(t._handleWindowResize,5),window.addEventListener("resize",t._handleWindowResizeThrottled))}},{key:"_removeEventHandlers",value:function(){this.$img[0].removeEventListener("load",this._handleImageLoadBound),0===t._parallaxes.length&&(window.removeEventListener("scroll",t._handleScrollThrottled),window.removeEventListener("resize",t._handleWindowResizeThrottled))}},{key:"_setupStyles",value:function(){this.$img[0].style.opacity=1}},{key:"_handleImageLoad",value:function(){this._updateParallax()}},{key:"_updateParallax",value:function(){var e=0n.options.responsiveThreshold}}},{key:"defaults",get:function(){return E}}]),t}())._parallaxes=[],M.Parallax=T,M.jQueryLoaded&&M.initializeJqueryWrapper(T,"parallax","M_Parallax"),_=cash,x=M.anime,A={duration:300,onShow:null,swipeable:!1,responsiveThreshold:1/0},S=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_Tabs=i).options=_.extend({},t.defaults,n),i.$tabLinks=i.$el.children("li.tab").children("a"),i.index=0,i._setupActiveTabLink(),i.options.swipeable?i._setupSwipeableTabs():i._setupNormalTabs(),i._setTabsAndTabWidth(),i._createIndicator(),i._setupEventHandlers(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this._indicator.parentNode.removeChild(this._indicator),this.options.swipeable?this._teardownSwipeableTabs():this._teardownNormalTabs(),this.$el[0].M_Tabs=void 0}},{key:"_setupEventHandlers",value:function(){this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound),this._handleTabClickBound=this._handleTabClick.bind(this),this.el.addEventListener("click",this._handleTabClickBound)}},{key:"_removeEventHandlers",value:function(){window.removeEventListener("resize",this._handleWindowResizeBound),this.el.removeEventListener("click",this._handleTabClickBound)}},{key:"_handleWindowResize",value:function(){this._setTabsAndTabWidth(),0!==this.tabWidth&&0!==this.tabsWidth&&(this._indicator.style.left=this._calcLeftPos(this.$activeTabLink)+"px",this._indicator.style.right=this._calcRightPos(this.$activeTabLink)+"px")}},{key:"_handleTabClick",value:function(e){var t=this,n=_(e.target).closest("li.tab"),i=_(e.target).closest("a");if(i.length&&i.parent().hasClass("tab")){if(n.hasClass("disabled"))e.preventDefault();else if(!i.attr("target")){this.$activeTabLink.removeClass("active");var r=this.$content;this.$activeTabLink=i,this.$content=_(M.escapeHash(i[0].hash)),this.$tabLinks=this.$el.children("li.tab").children("a"),this.$activeTabLink.addClass("active");var o=this.index;this.index=Math.max(this.$tabLinks.index(i),0),this.options.swipeable?this._tabsCarousel&&this._tabsCarousel.set(this.index,function(){"function"==typeof t.options.onShow&&t.options.onShow.call(t,t.$content[0])}):this.$content.length&&(this.$content[0].style.display="block",this.$content.addClass("active"),"function"==typeof this.options.onShow&&this.options.onShow.call(this,this.$content[0]),r.length&&!r.is(this.$content)&&(r[0].style.display="none",r.removeClass("active"))),this._setTabsAndTabWidth(),this._animateIndicator(o),e.preventDefault()}}}},{key:"_createIndicator",value:function(){var e=this,t=document.createElement("li");t.classList.add("indicator"),this.el.appendChild(t),this._indicator=t,setTimeout(function(){e._indicator.style.left=e._calcLeftPos(e.$activeTabLink)+"px",e._indicator.style.right=e._calcRightPos(e.$activeTabLink)+"px"},0)}},{key:"_setupActiveTabLink",value:function(){this.$activeTabLink=_(this.$tabLinks.filter('[href="'+location.hash+'"]')),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a.active").first()),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a").first()),this.$tabLinks.removeClass("active"),this.$activeTabLink[0].classList.add("active"),this.index=Math.max(this.$tabLinks.index(this.$activeTabLink),0),this.$activeTabLink.length&&(this.$content=_(M.escapeHash(this.$activeTabLink[0].hash)),this.$content.addClass("active"))}},{key:"_setupSwipeableTabs",value:function(){var e=this;window.innerWidth>this.options.responsiveThreshold&&(this.options.swipeable=!1);var t=_();this.$tabLinks.each(function(e){var n=_(M.escapeHash(e.hash));n.addClass("carousel-item"),t=t.add(n)});var n=_('');t.first().before(n),n.append(t),t[0].style.display="";var i=this.$activeTabLink.closest(".tab").index();this._tabsCarousel=M.Carousel.init(n[0],{fullWidth:!0,noWrap:!0,onCycleTo:function(t){var n=e.index;e.index=_(t).index(),e.$activeTabLink.removeClass("active"),e.$activeTabLink=e.$tabLinks.eq(e.index),e.$activeTabLink.addClass("active"),e._animateIndicator(n),"function"==typeof e.options.onShow&&e.options.onShow.call(e,e.$content[0])}}),this._tabsCarousel.set(i)}},{key:"_teardownSwipeableTabs",value:function(){var e=this._tabsCarousel.$el;this._tabsCarousel.destroy(),e.after(e.children()),e.remove()}},{key:"_setupNormalTabs",value:function(){this.$tabLinks.not(this.$activeTabLink).each(function(e){if(e.hash){var t=_(M.escapeHash(e.hash));t.length&&(t[0].style.display="none")}})}},{key:"_teardownNormalTabs",value:function(){this.$tabLinks.each(function(e){if(e.hash){var t=_(M.escapeHash(e.hash));t.length&&(t[0].style.display="")}})}},{key:"_setTabsAndTabWidth",value:function(){this.tabsWidth=this.$el.width(),this.tabWidth=Math.max(this.tabsWidth,this.el.scrollWidth)/this.$tabLinks.length}},{key:"_calcRightPos",value:function(e){return Math.ceil(this.tabsWidth-e.position().left-e[0].getBoundingClientRect().width)}},{key:"_calcLeftPos",value:function(e){return Math.floor(e.position().left)}},{key:"updateTabIndicator",value:function(){this._setTabsAndTabWidth(),this._animateIndicator(this.index)}},{key:"_animateIndicator",value:function(e){var t=0,n=0;0<=this.index-e?t=90:n=90;var i={targets:this._indicator,left:{value:this._calcLeftPos(this.$activeTabLink),delay:t},right:{value:this._calcRightPos(this.$activeTabLink),delay:n},duration:this.options.duration,easing:"easeOutQuad"};x.remove(this._indicator),x(i)}},{key:"select",value:function(e){var t=this.$tabLinks.filter('[href="#'+e+'"]');t.length&&t.trigger("click")}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Tabs}},{key:"defaults",get:function(){return A}}]),t}(),M.Tabs=S,M.jQueryLoaded&&M.initializeJqueryWrapper(S,"tabs","M_Tabs"),L=cash,I=M.anime,N={exitDelay:200,enterDelay:0,html:null,margin:5,inDuration:250,outDuration:200,position:"bottom",transitionMovement:10},k=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_Tooltip=i).options=L.extend({},t.defaults,n),i.isOpen=!1,i.isHovered=!1,i.isFocused=!1,i._appendTooltipEl(),i._setupEventHandlers(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){L(this.tooltipEl).remove(),this._removeEventHandlers(),this.el.M_Tooltip=void 0}},{key:"_appendTooltipEl",value:function(){var e=document.createElement("div");e.classList.add("material-tooltip"),this.tooltipEl=e;var t=document.createElement("div");t.classList.add("tooltip-content"),t.innerHTML=this.options.html,e.appendChild(t),document.body.appendChild(e)}},{key:"_updateTooltipContent",value:function(){this.tooltipEl.querySelector(".tooltip-content").innerHTML=this.options.html}},{key:"_setupEventHandlers",value:function(){this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this._handleFocusBound=this._handleFocus.bind(this),this._handleBlurBound=this._handleBlur.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.el.addEventListener("focus",this._handleFocusBound,!0),this.el.addEventListener("blur",this._handleBlurBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.el.removeEventListener("focus",this._handleFocusBound,!0),this.el.removeEventListener("blur",this._handleBlurBound,!0)}},{key:"open",value:function(e){this.isOpen||(e=void 0===e||void 0,this.isOpen=!0,this.options=L.extend({},this.options,this._getAttributeOptions()),this._updateTooltipContent(),this._setEnterDelayTimeout(e))}},{key:"close",value:function(){this.isOpen&&(this.isHovered=!1,this.isFocused=!1,this.isOpen=!1,this._setExitDelayTimeout())}},{key:"_setExitDelayTimeout",value:function(){var e=this;clearTimeout(this._exitDelayTimeout),this._exitDelayTimeout=setTimeout(function(){e.isHovered||e.isFocused||e._animateOut()},this.options.exitDelay)}},{key:"_setEnterDelayTimeout",value:function(e){var t=this;clearTimeout(this._enterDelayTimeout),this._enterDelayTimeout=setTimeout(function(){(t.isHovered||t.isFocused||e)&&t._animateIn()},this.options.enterDelay)}},{key:"_positionTooltip",value:function(){var e,t=this.el,n=this.tooltipEl,i=t.offsetHeight,r=t.offsetWidth,o=n.offsetHeight,s=n.offsetWidth,a=this.options.margin,l=void 0,u=void 0;this.xMovement=0,this.yMovement=0,l=t.getBoundingClientRect().top+M.getDocumentScrollTop(),u=t.getBoundingClientRect().left+M.getDocumentScrollLeft(),"top"===this.options.position?(l+=-o-a,u+=r/2-s/2,this.yMovement=-this.options.transitionMovement):"right"===this.options.position?(l+=i/2-o/2,u+=r+a,this.xMovement=this.options.transitionMovement):"left"===this.options.position?(l+=i/2-o/2,u+=-s-a,this.xMovement=-this.options.transitionMovement):(l+=i+a,u+=r/2-s/2,this.yMovement=this.options.transitionMovement),e=this._repositionWithinScreen(u,l,s,o),L(n).css({top:e.y+"px",left:e.x+"px"})}},{key:"_repositionWithinScreen",value:function(e,t,n,i){var r=M.getDocumentScrollLeft(),o=M.getDocumentScrollTop(),s=e-r,a=t-o,l={left:s,top:a,width:n,height:i},u=this.options.margin+this.options.transitionMovement,c=M.checkWithinContainer(document.body,l,u);return c.left?s=u:c.right&&(s-=s+n-window.innerWidth),c.top?a=u:c.bottom&&(a-=a+i-window.innerHeight),{x:s+r,y:a+o}}},{key:"_animateIn",value:function(){this._positionTooltip(),this.tooltipEl.style.visibility="visible",I.remove(this.tooltipEl),I({targets:this.tooltipEl,opacity:1,translateX:this.xMovement,translateY:this.yMovement,duration:this.options.inDuration,easing:"easeOutCubic"})}},{key:"_animateOut",value:function(){I.remove(this.tooltipEl),I({targets:this.tooltipEl,opacity:0,translateX:0,translateY:0,duration:this.options.outDuration,easing:"easeOutCubic"})}},{key:"_handleMouseEnter",value:function(){this.isHovered=!0,this.isFocused=!1,this.open(!1)}},{key:"_handleMouseLeave",value:function(){this.isHovered=!1,this.isFocused=!1,this.close()}},{key:"_handleFocus",value:function(){M.tabPressed&&(this.isFocused=!0,this.open(!1))}},{key:"_handleBlur",value:function(){this.isFocused=!1,this.close()}},{key:"_getAttributeOptions",value:function(){var e={},t=this.el.getAttribute("data-tooltip"),n=this.el.getAttribute("data-position");return t&&(e.html=t),n&&(e.position=n),e}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Tooltip}},{key:"defaults",get:function(){return N}}]),t}(),M.Tooltip=k,M.jQueryLoaded&&M.initializeJqueryWrapper(k,"tooltip","M_Tooltip"),function(e){"use strict";var t=t||{},n=document.querySelectorAll.bind(document);function i(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t+=n+":"+e[n]+";");return t}var r={duration:750,show:function(e,t){if(2===e.button)return!1;var n=t||this,o=document.createElement("div");o.className="waves-ripple",n.appendChild(o);var s,a,l,u,c=(l={top:0,left:0},s=(u=n&&n.ownerDocument).documentElement,void 0!==n.getBoundingClientRect&&(l=n.getBoundingClientRect()),a=null!==u&&u===u.window?u:9===u.nodeType&&u.defaultView,{top:l.top+a.pageYOffset-s.clientTop,left:l.left+a.pageXOffset-s.clientLeft}),d=e.pageY-c.top,h=e.pageX-c.left,p="scale("+n.clientWidth/100*10+")";"touches"in e&&(d=e.touches[0].pageY-c.top,h=e.touches[0].pageX-c.left),o.setAttribute("data-hold",Date.now()),o.setAttribute("data-scale",p),o.setAttribute("data-x",h),o.setAttribute("data-y",d);var f={top:d+"px",left:h+"px"};o.className=o.className+" waves-notransition",o.setAttribute("style",i(f)),o.className=o.className.replace("waves-notransition",""),f["-webkit-transform"]=p,f["-moz-transform"]=p,f["-ms-transform"]=p,f["-o-transform"]=p,f.transform=p,f.opacity="1",f["-webkit-transition-duration"]=r.duration+"ms",f["-moz-transition-duration"]=r.duration+"ms",f["-o-transition-duration"]=r.duration+"ms",f["transition-duration"]=r.duration+"ms",f["-webkit-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["-moz-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["-o-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",o.setAttribute("style",i(f))},hide:function(e){o.touchup(e);var t=this,n=(t.clientWidth,null),s=t.getElementsByClassName("waves-ripple");if(!(0t.el.offsetWidth*t.options.activationPercent||1"+o+""+s+""+a+""),n.length&&t.prepend(n)}},{key:"_resetCurrentElement",value:function(){this.activeIndex=-1,this.$active.removeClass("active")}},{key:"_resetAutocomplete",value:function(){H(this.container).empty(),this._resetCurrentElement(),this.oldVal=null,this.isOpen=!1,this._mousedown=!1}},{key:"selectOption",value:function(e){var t=e.text().trim();this.el.value=t,this.$el.trigger("change"),this._resetAutocomplete(),this.close(),"function"==typeof this.options.onAutocomplete&&this.options.onAutocomplete.call(this,t)}},{key:"_renderDropdown",value:function(e,t){var n=this;this._resetAutocomplete();var i=[];for(var r in e)if(e.hasOwnProperty(r)&&-1!==r.toLowerCase().indexOf(t)){if(this.count>=this.options.limit)break;var o={data:e[r],key:r};i.push(o),this.count++}this.options.sortFunction&&i.sort(function(e,i){return n.options.sortFunction(e.key.toLowerCase(),i.key.toLowerCase(),t.toLowerCase())});for(var s=0;s");a.data?l.append(''+a.key+""):l.append(""+a.key+""),H(this.container).append(l),this._highlight(t,l)}}},{key:"open",value:function(){var e=this.el.value.toLowerCase();this._resetAutocomplete(),e.length>=this.options.minLength&&(this.isOpen=!0,this._renderDropdown(this.options.data,e)),this.dropdown.isOpen?this.dropdown.recalculateDimensions():this.dropdown.open()}},{key:"close",value:function(){this.dropdown.close()}},{key:"updateData",value:function(e){var t=this.el.value.toLowerCase();this.options.data=e,this.isOpen&&this._renderDropdown(e,t)}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Autocomplete}},{key:"defaults",get:function(){return Q}}]),t}())._keydown=!1,M.Autocomplete=V,M.jQueryLoaded&&M.initializeJqueryWrapper(V,"autocomplete","M_Autocomplete"),G=cash,M.updateTextFields=function(){G("input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea").each(function(e,t){var n=G(this);0'),G("body").append(t));var n=e.css("font-family"),i=e.css("font-size"),r=e.css("line-height"),o=e.css("padding-top"),s=e.css("padding-right"),a=e.css("padding-bottom"),l=e.css("padding-left");i&&t.css("font-size",i),n&&t.css("font-family",n),r&&t.css("line-height",r),o&&t.css("padding-top",o),s&&t.css("padding-right",s),a&&t.css("padding-bottom",a),l&&t.css("padding-left",l),e.data("original-height")||e.data("original-height",e.height()),"off"===e.attr("wrap")&&t.css("overflow-wrap","normal").css("white-space","pre"),t.text(e[0].value+"\n");var u=t.html().replace(/\n/g,"
      ");t.html(u),0
    '),this.$slides.each(function(t,n){var i=K('
  • ');e.$indicators.append(i[0])}),this.$el.append(this.$indicators[0]),this.$indicators=this.$indicators.children("li.indicator-item"))}},{key:"_removeIndicators",value:function(){this.$el.find("ul.indicators").remove()}},{key:"set",value:function(e){var t=this;if(e>=this.$slides.length?e=0:e<0&&(e=this.$slides.length-1),this.activeIndex!=e){this.$active=this.$slides.eq(this.activeIndex);var n=this.$active.find(".caption");this.$active.removeClass("active"),q({targets:this.$active[0],opacity:0,duration:this.options.duration,easing:"easeOutQuad",complete:function(){t.$slides.not(".active").each(function(e){q({targets:e,opacity:0,translateX:0,translateY:0,duration:0,easing:"easeOutQuad"})})}}),this._animateCaptionIn(n[0],this.options.duration),this.options.indicators&&(this.$indicators.eq(this.activeIndex).removeClass("active"),this.$indicators.eq(e).addClass("active")),q({targets:this.$slides.eq(e)[0],opacity:1,duration:this.options.duration,easing:"easeOutQuad"}),q({targets:this.$slides.eq(e).find(".caption")[0],opacity:1,translateX:0,translateY:0,duration:this.options.duration,delay:this.options.duration,easing:"easeOutQuad"}),this.$slides.eq(e).addClass("active"),this.activeIndex=e,this.start()}}},{key:"pause",value:function(){clearInterval(this.interval)}},{key:"start",value:function(){clearInterval(this.interval),this.interval=setInterval(this._handleIntervalBound,this.options.duration+this.options.interval)}},{key:"next",value:function(){var e=this.activeIndex+1;e>=this.$slides.length?e=0:e<0&&(e=this.$slides.length-1),this.set(e)}},{key:"prev",value:function(){var e=this.activeIndex-1;e>=this.$slides.length?e=0:e<0&&(e=this.$slides.length-1),this.set(e)}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Slider}},{key:"defaults",get:function(){return Z}}]),t}(),M.Slider=X,M.jQueryLoaded&&M.initializeJqueryWrapper(X,"slider","M_Slider"),function(e,t){e(document).on("click",".card",function(n){if(e(this).children(".card-reveal").length){var i=e(n.target).closest(".card");void 0===i.data("initialOverflow")&&i.data("initialOverflow",void 0===i.css("overflow")?"":i.css("overflow"));var r=e(this).find(".card-reveal");e(n.target).is(e(".card-reveal .card-title"))||e(n.target).is(e(".card-reveal .card-title i"))?t({targets:r[0],translateY:0,duration:225,easing:"easeInOutQuad",complete:function(t){e(t.animatables[0].target).css({display:"none"}),i.css("overflow",i.data("initialOverflow"))}}):(e(n.target).is(e(".card .activator"))||e(n.target).is(e(".card .activator i")))&&(i.css("overflow","hidden"),r.css({display:"block"}),t({targets:r[0],translateY:"-100%",duration:300,easing:"easeInOutQuad"}))}})}(cash,M.anime),J=cash,ee={data:[],placeholder:"",secondaryPlaceholder:"",autocompleteOptions:{},limit:1/0,onChipAdd:null,onChipSelect:null,onChipDelete:null},(et=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_Chips=i).options=J.extend({},t.defaults,n),i.$el.addClass("chips input-field"),i.chipsData=[],i.$chips=J(),i._setupInput(),i.hasAutocomplete=0"),this.$el.append(this.$input)),this.$input.addClass("input")}},{key:"_setupLabel",value:function(){this.$label=this.$el.find("label"),this.$label.length&&this.$label.setAttribute("for",this.$input.attr("id"))}},{key:"_setPlaceholder",value:function(){void 0!==this.chipsData&&!this.chipsData.length&&this.options.placeholder?J(this.$input).prop("placeholder",this.options.placeholder):(void 0===this.chipsData||this.chipsData.length)&&this.options.secondaryPlaceholder&&J(this.$input).prop("placeholder",this.options.secondaryPlaceholder)}},{key:"_isValid",value:function(e){if(e.hasOwnProperty("tag")&&""!==e.tag){for(var t=!1,n=0;n=this.options.limit)){var t=this._renderChip(e);this.$chips.add(t),this.chipsData.push(e),J(this.$input).before(t),this._setPlaceholder(),"function"==typeof this.options.onChipAdd&&this.options.onChipAdd.call(this,this.$el,t)}}},{key:"deleteChip",value:function(e){var t=this.$chips.eq(e);this.$chips.eq(e).remove(),this.$chips=this.$chips.filter(function(e){return 0<=J(e).index()}),this.chipsData.splice(e,1),this._setPlaceholder(),"function"==typeof this.options.onChipDelete&&this.options.onChipDelete.call(this,this.$el,t[0])}},{key:"selectChip",value:function(e){var t=this.$chips.eq(e);(this._selectedChip=t)[0].focus(),"function"==typeof this.options.onChipSelect&&this.options.onChipSelect.call(this,this.$el,t[0])}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Chips}},{key:"_handleChipsKeydown",value:function(e){t._keydown=!0;var n=J(e.target).closest(".chips"),i=e.target&&n.length;if(!J(e.target).is("input, textarea")&&i){var r=n[0].M_Chips;if(8===e.keyCode||46===e.keyCode){e.preventDefault();var o=r.chipsData.length;if(r._selectedChip){var s=r._selectedChip.index();r.deleteChip(s),r._selectedChip=null,o=Math.max(s-1,0)}r.chipsData.length&&r.selectChip(o)}else if(37===e.keyCode){if(r._selectedChip){var a=r._selectedChip.index()-1;if(a<0)return;r.selectChip(a)}}else if(39===e.keyCode&&r._selectedChip){var l=r._selectedChip.index()+1;l>=r.chipsData.length?r.$input[0].focus():r.selectChip(l)}}}},{key:"_handleChipsKeyup",value:function(e){t._keydown=!1}},{key:"_handleChipsBlur",value:function(e){t._keydown||(J(e.target).closest(".chips")[0].M_Chips._selectedChip=null)}},{key:"defaults",get:function(){return ee}}]),t}())._keydown=!1,M.Chips=et,M.jQueryLoaded&&M.initializeJqueryWrapper(et,"chips","M_Chips"),J(document).ready(function(){J(document.body).on("click",".chip .close",function(){var e=J(this).closest(".chips");e.length&&e[0].M_Chips||J(this).closest(".chip").remove()})}),en=cash,ei={top:0,bottom:1/0,offset:0,onPositionChange:null},(er=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_Pushpin=i).options=en.extend({},t.defaults,n),i.originalOffset=i.el.offsetTop,t._pushpins.push(i),i._setupEventHandlers(),i._updatePosition(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this.el.style.top=null,this._removePinClasses(),this._removeEventHandlers();var e=t._pushpins.indexOf(this);t._pushpins.splice(e,1)}},{key:"_setupEventHandlers",value:function(){document.addEventListener("scroll",t._updateElements)}},{key:"_removeEventHandlers",value:function(){document.removeEventListener("scroll",t._updateElements)}},{key:"_updatePosition",value:function(){var e=M.getDocumentScrollTop()+this.options.offset;this.options.top<=e&&this.options.bottom>=e&&!this.el.classList.contains("pinned")&&(this._removePinClasses(),this.el.style.top=this.options.offset+"px",this.el.classList.add("pinned"),"function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pinned")),ethis.options.bottom&&!this.el.classList.contains("pin-bottom")&&(this._removePinClasses(),this.el.classList.add("pin-bottom"),this.el.style.top=this.options.bottom-this.originalOffset+"px","function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pin-bottom"))}},{key:"_removePinClasses",value:function(){this.el.classList.remove("pin-top"),this.el.classList.remove("pinned"),this.el.classList.remove("pin-bottom")}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Pushpin}},{key:"_updateElements",value:function(){for(var e in t._pushpins)t._pushpins[e]._updatePosition()}},{key:"defaults",get:function(){return ei}}]),t}())._pushpins=[],M.Pushpin=er,M.jQueryLoaded&&M.initializeJqueryWrapper(er,"pushpin","M_Pushpin"),eo=cash,es=M.anime,ea={direction:"top",hoverEnabled:!0,toolbarEnabled:!1},eo.fn.reverse=[].reverse,el=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_FloatingActionButton=i).options=eo.extend({},t.defaults,n),i.isOpen=!1,i.$anchor=i.$el.children("a").first(),i.$menu=i.$el.children("ul").first(),i.$floatingBtns=i.$el.find("ul .btn-floating"),i.$floatingBtnsReverse=i.$el.find("ul .btn-floating").reverse(),i.offsetY=0,i.offsetX=0,i.$el.addClass("direction-"+i.options.direction),"top"===i.options.direction?i.offsetY=40:"right"===i.options.direction?i.offsetX=-40:"bottom"===i.options.direction?i.offsetY=-40:i.offsetX=40,i._setupEventHandlers(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_FloatingActionButton=void 0}},{key:"_setupEventHandlers",value:function(){this._handleFABClickBound=this._handleFABClick.bind(this),this._handleOpenBound=this.open.bind(this),this._handleCloseBound=this.close.bind(this),this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.addEventListener("mouseenter",this._handleOpenBound),this.el.addEventListener("mouseleave",this._handleCloseBound)):this.el.addEventListener("click",this._handleFABClickBound)}},{key:"_removeEventHandlers",value:function(){this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.removeEventListener("mouseenter",this._handleOpenBound),this.el.removeEventListener("mouseleave",this._handleCloseBound)):this.el.removeEventListener("click",this._handleFABClickBound)}},{key:"_handleFABClick",value:function(){this.isOpen?this.close():this.open()}},{key:"_handleDocumentClick",value:function(e){eo(e.target).closest(this.$menu).length||this.close()}},{key:"open",value:function(){this.isOpen||(this.options.toolbarEnabled?this._animateInToolbar():this._animateInFAB(),this.isOpen=!0)}},{key:"close",value:function(){this.isOpen&&(this.options.toolbarEnabled?(window.removeEventListener("scroll",this._handleCloseBound,!0),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),this._animateOutToolbar()):this._animateOutFAB(),this.isOpen=!1)}},{key:"_animateInFAB",value:function(){var e=this;this.$el.addClass("active");var t=0;this.$floatingBtnsReverse.each(function(n){es({targets:n,opacity:1,scale:[.4,1],translateY:[e.offsetY,0],translateX:[e.offsetX,0],duration:275,delay:t,easing:"easeInOutQuad"}),t+=40})}},{key:"_animateOutFAB",value:function(){var e=this;this.$floatingBtnsReverse.each(function(t){es.remove(t),es({targets:t,opacity:0,scale:.4,translateY:e.offsetY,translateX:e.offsetX,duration:175,easing:"easeOutQuad",complete:function(){e.$el.removeClass("active")}})})}},{key:"_animateInToolbar",value:function(){var e,t=this,n=window.innerWidth,i=window.innerHeight,r=this.el.getBoundingClientRect(),o=eo('
    '),s=this.$anchor.css("background-color");this.$anchor.append(o),this.offsetX=r.left-n/2+r.width/2,this.offsetY=i-r.bottom,e=n/o[0].clientWidth,this.btnBottom=r.bottom,this.btnLeft=r.left,this.btnWidth=r.width,this.$el.addClass("active"),this.$el.css({"text-align":"center",width:"100%",bottom:0,left:0,transform:"translateX("+this.offsetX+"px)",transition:"none"}),this.$anchor.css({transform:"translateY("+-this.offsetY+"px)",transition:"none"}),o.css({"background-color":s}),setTimeout(function(){t.$el.css({transform:"",transition:"transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s"}),t.$anchor.css({overflow:"visible",transform:"",transition:"transform .2s"}),setTimeout(function(){t.$el.css({overflow:"hidden","background-color":s}),o.css({transform:"scale("+e+")",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"}),t.$menu.children("li").children("a").css({opacity:1}),t._handleDocumentClickBound=t._handleDocumentClick.bind(t),window.addEventListener("scroll",t._handleCloseBound,!0),document.body.addEventListener("click",t._handleDocumentClickBound,!0)},100)},0)}},{key:"_animateOutToolbar",value:function(){var e=this,t=window.innerWidth,n=window.innerHeight,i=this.$el.find(".fab-backdrop"),r=this.$anchor.css("background-color");this.offsetX=this.btnLeft-t/2+this.btnWidth/2,this.offsetY=n-this.btnBottom,this.$el.removeClass("active"),this.$el.css({"background-color":"transparent",transition:"none"}),this.$anchor.css({transition:"none"}),i.css({transform:"scale(0)","background-color":r}),this.$menu.children("li").children("a").css({opacity:""}),setTimeout(function(){i.remove(),e.$el.css({"text-align":"",width:"",bottom:"",left:"",overflow:"","background-color":"",transform:"translate3d("+-e.offsetX+"px,0,0)"}),e.$anchor.css({overflow:"",transform:"translate3d(0,"+e.offsetY+"px,0)"}),setTimeout(function(){e.$el.css({transform:"translate3d(0,0,0)",transition:"transform .2s"}),e.$anchor.css({transform:"translate3d(0,0,0)",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"})},20)},200)}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_FloatingActionButton}},{key:"defaults",get:function(){return ea}}]),t}(),M.FloatingActionButton=el,M.jQueryLoaded&&M.initializeJqueryWrapper(el,"floatingActionButton","M_FloatingActionButton"),eu=cash,ec={autoClose:!1,format:"mmm dd, yyyy",parse:null,defaultDate:null,setDefaultDate:!1,disableWeekends:!1,disableDayFn:null,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,container:null,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok",previousMonth:"‹",nextMonth:"›",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"]},events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null},(ed=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));(i.el.M_Datepicker=i).options=eu.extend({},t.defaults,n),n&&n.hasOwnProperty("i18n")&&"object"==typeof n.i18n&&(i.options.i18n=eu.extend({},t.defaults.i18n,n.i18n)),i.options.minDate&&i.options.minDate.setHours(0,0,0,0),i.options.maxDate&&i.options.maxDate.setHours(0,0,0,0),i.id=M.guid(),i._setupVariables(),i._insertHTMLIntoDOM(),i._setupModal(),i._setupEventHandlers(),i.options.defaultDate||(i.options.defaultDate=new Date(Date.parse(i.el.value)));var r=i.options.defaultDate;return t._isDate(r)?i.options.setDefaultDate?(i.setDate(r,!0),i.setInputValue()):i.gotoDate(r):i.gotoDate(new Date),i.isOpen=!1,i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),eu(this.modalEl).remove(),this.destroySelects(),this.el.M_Datepicker=void 0}},{key:"destroySelects",value:function(){var e=this.calendarEl.querySelector(".orig-select-year");e&&M.FormSelect.getInstance(e).destroy();var t=this.calendarEl.querySelector(".orig-select-month");t&&M.FormSelect.getInstance(t).destroy()}},{key:"_insertHTMLIntoDOM",value:function(){this.options.showClearBtn&&(eu(this.clearBtn).css({visibility:""}),this.clearBtn.innerHTML=this.options.i18n.clear),this.doneBtn.innerHTML=this.options.i18n.done,this.cancelBtn.innerHTML=this.options.i18n.cancel,this.options.container?this.$modalEl.appendTo(this.options.container):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var e=this;this.modalEl.id="modal-"+this.id,this.modal=M.Modal.init(this.modalEl,{onCloseEnd:function(){e.isOpen=!1}})}},{key:"toString",value:function(e){var n=this;return e=e||this.options.format,t._isDate(this.date)?e.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map(function(e){return n.formats[e]?n.formats[e]():e}).join(""):""}},{key:"setDate",value:function(e,n){if(!e)return this.date=null,this._renderDateDisplay(),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),t._isDate(e)){var i=this.options.minDate,r=this.options.maxDate;t._isDate(i)&&er.maxDate||r.disableWeekends&&t._isWeekend(b)||r.disableDayFn&&r.disableDayFn(b),isEmpty:x,isStartRange:I,isEndRange:N,isInRange:k,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths};u.push(this.renderDay(D)),7==++w&&(l.push(this.renderRow(u,r.isRTL,y)),w=0,u=[],y=!1)}return this.renderTable(r,l,i)}},{key:"renderDay",value:function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'';t.push("is-outside-current-month"),t.push("is-selection-disabled")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.hasEvent&&t.push("has-event"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'"}},{key:"renderRow",value:function(e,t,n){return''+(t?e.reverse():e).join("")+""}},{key:"renderTable",value:function(e,t,n){return'
    '+this.renderHead(e)+this.renderBody(t)+"
    "}},{key:"renderHead",value:function(e){var t=void 0,n=[];for(t=0;t<7;t++)n.push(''+this.renderDayName(e,t,!0)+"");return""+(e.isRTL?n.reverse():n).join("")+""}},{key:"renderBody",value:function(e){return""+e.join("")+""}},{key:"renderTitle",value:function(e,t,n,i,r,o){var s,a,l=void 0,u=void 0,c=void 0,d=this.options,h=n===d.minYear,p=n===d.maxYear,f='
    ',m=!0,g=!0;for(c=[],l=0;l<12;l++)c.push('");for(s='",eu.isArray(d.yearRange)?(l=d.yearRange[0],u=d.yearRange[1]+1):(l=n-d.yearRange,u=1+n+d.yearRange),c=[];l=d.minYear&&c.push('");return a='",f+='
    ',d.showMonthAfterYear?f+=a+s:f+=s+a,f+="
    ",h&&(0===i||d.minMonth>=i)&&(m=!1),p&&(11===i||d.maxMonth<=i)&&(g=!1),(f+='')+"
    "}},{key:"draw",value:function(e){if(this.isOpen||e){var t,n=this.options,i=n.minYear,r=n.maxYear,o=n.minMonth,s=n.maxMonth,a="";this._y<=i&&(this._y=i,!isNaN(o)&&this._m=r&&(this._y=r,!isNaN(s)&&this._m>s&&(this._m=s)),t="datepicker-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var l=0;l<1;l++)this._renderDateDisplay(),a+=this.renderTitle(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,t)+this.render(this.calendars[l].year,this.calendars[l].month,t);this.destroySelects(),this.calendarEl.innerHTML=a;var u=this.calendarEl.querySelector(".orig-select-year"),c=this.calendarEl.querySelector(".orig-select-month");M.FormSelect.init(u,{classes:"select-year",dropdownOptions:{container:document.body,constrainWidth:!1}}),M.FormSelect.init(c,{classes:"select-month",dropdownOptions:{container:document.body,constrainWidth:!1}}),u.addEventListener("change",this._handleYearChange.bind(this)),c.addEventListener("change",this._handleMonthChange.bind(this)),"function"==typeof this.options.onDraw&&this.options.onDraw(this)}}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleInputChangeBound=this._handleInputChange.bind(this),this._handleCalendarClickBound=this._handleCalendarClick.bind(this),this._finishSelectionBound=this._finishSelection.bind(this),this._handleMonthChange=this._handleMonthChange.bind(this),this._closeBound=this.close.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("change",this._handleInputChangeBound),this.calendarEl.addEventListener("click",this._handleCalendarClickBound),this.doneBtn.addEventListener("click",this._finishSelectionBound),this.cancelBtn.addEventListener("click",this._closeBound),this.options.showClearBtn&&(this._handleClearClickBound=this._handleClearClick.bind(this),this.clearBtn.addEventListener("click",this._handleClearClickBound))}},{key:"_setupVariables",value:function(){var e=this;this.$modalEl=eu(t._template),this.modalEl=this.$modalEl[0],this.calendarEl=this.modalEl.querySelector(".datepicker-calendar"),this.yearTextEl=this.modalEl.querySelector(".year-text"),this.dateTextEl=this.modalEl.querySelector(".date-text"),this.options.showClearBtn&&(this.clearBtn=this.modalEl.querySelector(".datepicker-clear")),this.doneBtn=this.modalEl.querySelector(".datepicker-done"),this.cancelBtn=this.modalEl.querySelector(".datepicker-cancel"),this.formats={d:function(){return e.date.getDate()},dd:function(){var t=e.date.getDate();return(t<10?"0":"")+t},ddd:function(){return e.options.i18n.weekdaysShort[e.date.getDay()]},dddd:function(){return e.options.i18n.weekdays[e.date.getDay()]},m:function(){return e.date.getMonth()+1},mm:function(){var t=e.date.getMonth()+1;return(t<10?"0":"")+t},mmm:function(){return e.options.i18n.monthsShort[e.date.getMonth()]},mmmm:function(){return e.options.i18n.months[e.date.getMonth()]},yy:function(){return(""+e.date.getFullYear()).slice(2)},yyyy:function(){return e.date.getFullYear()}}}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("change",this._handleInputChangeBound),this.calendarEl.removeEventListener("click",this._handleCalendarClickBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(e){e.which===M.keys.ENTER&&(e.preventDefault(),this.open())}},{key:"_handleCalendarClick",value:function(e){if(this.isOpen){var t=eu(e.target);t.hasClass("is-disabled")||(!t.hasClass("datepicker-day-button")||t.hasClass("is-empty")||t.parent().hasClass("is-disabled")?t.closest(".month-prev").length?this.prevMonth():t.closest(".month-next").length&&this.nextMonth():(this.setDate(new Date(e.target.getAttribute("data-year"),e.target.getAttribute("data-month"),e.target.getAttribute("data-day"))),this.options.autoClose&&this._finishSelection()))}}},{key:"_handleClearClick",value:function(){this.date=null,this.setInputValue(),this.close()}},{key:"_handleMonthChange",value:function(e){this.gotoMonth(e.target.value)}},{key:"_handleYearChange",value:function(e){this.gotoYear(e.target.value)}},{key:"gotoMonth",value:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())}},{key:"gotoYear",value:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())}},{key:"_handleInputChange",value:function(e){var n=void 0;e.firedBy!==this&&(n=this.options.parse?this.options.parse(this.el.value,this.options.format):new Date(Date.parse(this.el.value)),t._isDate(n)&&this.setDate(n))}},{key:"renderDayName",value:function(e,t,n){for(t+=e.firstDay;7<=t;)t-=7;return n?e.i18n.weekdaysAbbrev[t]:e.i18n.weekdays[t]}},{key:"_finishSelection",value:function(){this.setInputValue(),this.close()}},{key:"open",value:function(){if(!this.isOpen)return this.isOpen=!0,"function"==typeof this.options.onOpen&&this.options.onOpen.call(this),this.draw(),this.modal.open(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,"function"==typeof this.options.onClose&&this.options.onClose.call(this),this.modal.close(),this}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"_isDate",value:function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())}},{key:"_isWeekend",value:function(e){var t=e.getDay();return 0===t||6===t}},{key:"_setToStartOfDay",value:function(e){t._isDate(e)&&e.setHours(0,0,0,0)}},{key:"_getDaysInMonth",value:function(e,n){return[31,t._isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][n]}},{key:"_isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"_compareDates",value:function(e,t){return e.getTime()===t.getTime()}},{key:"_setToStartOfDay",value:function(e){t._isDate(e)&&e.setHours(0,0,0,0)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Datepicker}},{key:"defaults",get:function(){return ec}}]),t}())._template='',M.Datepicker=ed,M.jQueryLoaded&&M.initializeJqueryWrapper(ed,"datepicker","M_Datepicker"),eh=cash,ep={dialRadius:135,outerRadius:105,innerRadius:70,tickRadius:20,duration:350,container:null,defaultTime:"now",fromNow:0,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok"},autoClose:!1,twelveHour:!0,vibrate:!0,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onSelect:null},(ef=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_Timepicker=i).options=eh.extend({},t.defaults,n),i.id=M.guid(),i._insertHTMLIntoDOM(),i._setupModal(),i._setupVariables(),i._setupEventHandlers(),i._clockSetup(),i._pickerSetup(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),eh(this.modalEl).remove(),this.el.M_Timepicker=void 0}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleClockClickStartBound=this._handleClockClickStart.bind(this),this._handleDocumentClickMoveBound=this._handleDocumentClickMove.bind(this),this._handleDocumentClickEndBound=this._handleDocumentClickEnd.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.plate.addEventListener("mousedown",this._handleClockClickStartBound),this.plate.addEventListener("touchstart",this._handleClockClickStartBound),eh(this.spanHours).on("click",this.showView.bind(this,"hours")),eh(this.spanMinutes).on("click",this.showView.bind(this,"minutes"))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(e){e.which===M.keys.ENTER&&(e.preventDefault(),this.open())}},{key:"_handleClockClickStart",value:function(e){e.preventDefault();var n=this.plate.getBoundingClientRect(),i=n.left,r=n.top;this.x0=i+this.options.dialRadius,this.y0=r+this.options.dialRadius,this.moved=!1;var o=t._Pos(e);this.dx=o.x-this.x0,this.dy=o.y-this.y0,this.setHand(this.dx,this.dy,!1),document.addEventListener("mousemove",this._handleDocumentClickMoveBound),document.addEventListener("touchmove",this._handleDocumentClickMoveBound),document.addEventListener("mouseup",this._handleDocumentClickEndBound),document.addEventListener("touchend",this._handleDocumentClickEndBound)}},{key:"_handleDocumentClickMove",value:function(e){e.preventDefault();var n=t._Pos(e),i=n.x-this.x0,r=n.y-this.y0;this.moved=!0,this.setHand(i,r,!1,!0)}},{key:"_handleDocumentClickEnd",value:function(e){var n=this;e.preventDefault(),document.removeEventListener("mouseup",this._handleDocumentClickEndBound),document.removeEventListener("touchend",this._handleDocumentClickEndBound);var i=t._Pos(e),r=i.x-this.x0,o=i.y-this.y0;this.moved&&r===this.dx&&o===this.dy&&this.setHand(r,o),"hours"===this.currentView?this.showView("minutes",this.options.duration/2):this.options.autoClose&&(eh(this.minutesView).addClass("timepicker-dial-out"),setTimeout(function(){n.done()},this.options.duration/2)),"function"==typeof this.options.onSelect&&this.options.onSelect.call(this,this.hours,this.minutes),document.removeEventListener("mousemove",this._handleDocumentClickMoveBound),document.removeEventListener("touchmove",this._handleDocumentClickMoveBound)}},{key:"_insertHTMLIntoDOM",value:function(){this.$modalEl=eh(t._template),this.modalEl=this.$modalEl[0],this.modalEl.id="modal-"+this.id;var e=document.querySelector(this.options.container);this.options.container&&e?this.$modalEl.appendTo(e):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var e=this;this.modal=M.Modal.init(this.modalEl,{onOpenStart:this.options.onOpenStart,onOpenEnd:this.options.onOpenEnd,onCloseStart:this.options.onCloseStart,onCloseEnd:function(){"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e),e.isOpen=!1}})}},{key:"_setupVariables",value:function(){this.currentView="hours",this.vibrate=navigator.vibrate?"vibrate":navigator.webkitVibrate?"webkitVibrate":null,this._canvas=this.modalEl.querySelector(".timepicker-canvas"),this.plate=this.modalEl.querySelector(".timepicker-plate"),this.hoursView=this.modalEl.querySelector(".timepicker-hours"),this.minutesView=this.modalEl.querySelector(".timepicker-minutes"),this.spanHours=this.modalEl.querySelector(".timepicker-span-hours"),this.spanMinutes=this.modalEl.querySelector(".timepicker-span-minutes"),this.spanAmPm=this.modalEl.querySelector(".timepicker-span-am-pm"),this.footer=this.modalEl.querySelector(".timepicker-footer"),this.amOrPm="PM"}},{key:"_pickerSetup",value:function(){var e=eh('").appendTo(this.footer).on("click",this.clear.bind(this));this.options.showClearBtn&&e.css({visibility:""});var t=eh('
    ');eh('").appendTo(t).on("click",this.close.bind(this)),eh('").appendTo(t).on("click",this.done.bind(this)),t.appendTo(this.footer)}},{key:"_clockSetup",value:function(){this.options.twelveHour&&(this.$amBtn=eh('
    AM
    '),this.$pmBtn=eh('
    PM
    '),this.$amBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm),this.$pmBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm)),this._buildHoursView(),this._buildMinutesView(),this._buildSVGClock()}},{key:"_buildSVGClock",value:function(){var e=this.options.dialRadius,n=this.options.tickRadius,i=2*e,r=t._createSVGEl("svg");r.setAttribute("class","timepicker-svg"),r.setAttribute("width",i),r.setAttribute("height",i);var o=t._createSVGEl("g");o.setAttribute("transform","translate("+e+","+e+")");var s=t._createSVGEl("circle");s.setAttribute("class","timepicker-canvas-bearing"),s.setAttribute("cx",0),s.setAttribute("cy",0),s.setAttribute("r",4);var a=t._createSVGEl("line");a.setAttribute("x1",0),a.setAttribute("y1",0);var l=t._createSVGEl("circle");l.setAttribute("class","timepicker-canvas-bg"),l.setAttribute("r",n),o.appendChild(a),o.appendChild(l),o.appendChild(s),r.appendChild(o),this._canvas.appendChild(r),this.hand=a,this.bg=l,this.bearing=s,this.g=o}},{key:"_buildHoursView",value:function(){var e=eh('
    ');if(this.options.twelveHour)for(var t=1;t<13;t+=1){var n=e.clone(),i=t/6*Math.PI,r=this.options.outerRadius;n.css({left:this.options.dialRadius+Math.sin(i)*r-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(i)*r-this.options.tickRadius+"px"}),n.html(0===t?"00":t),this.hoursView.appendChild(n[0])}else for(var o=0;o<24;o+=1){var s=e.clone(),a=o/6*Math.PI,l=0'),n=0;n<60;n+=5){var i=e.clone(),r=n/30*Math.PI;i.css({left:this.options.dialRadius+Math.sin(r)*this.options.outerRadius-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(r)*this.options.outerRadius-this.options.tickRadius+"px"}),i.html(t._addLeadingZero(n)),this.minutesView.appendChild(i[0])}}},{key:"_handleAmPmClick",value:function(e){var t=eh(e.target);this.amOrPm=t.hasClass("am-btn")?"AM":"PM",this._updateAmPmView()}},{key:"_updateAmPmView",value:function(){this.options.twelveHour&&(this.$amBtn.toggleClass("text-primary","AM"===this.amOrPm),this.$pmBtn.toggleClass("text-primary","PM"===this.amOrPm))}},{key:"_updateTimeFromInput",value:function(){var e=((this.el.value||this.options.defaultTime||"")+"").split(":");if(this.options.twelveHour&&void 0!==e[1]&&(0'),i.$el.find(".carousel-item").each(function(e,t){if(i.images.push(e),i.showIndicators){var n=ev('
  • ');0===t&&n[0].classList.add("active"),i.$indicators.append(n)}}),i.showIndicators&&i.$el.append(i.$indicators),i.count=i.images.length,i.options.numVisible=Math.min(i.count,i.options.numVisible),i.xform="transform",["webkit","Moz","O","ms"].every(function(e){var t=e+"Transform";return void 0===document.body.style[t]||(i.xform=t,!1)}),i._setupEventHandlers(),i._scroll(i.offset),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Carousel=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleCarouselTapBound=this._handleCarouselTap.bind(this),this._handleCarouselDragBound=this._handleCarouselDrag.bind(this),this._handleCarouselReleaseBound=this._handleCarouselRelease.bind(this),this._handleCarouselClickBound=this._handleCarouselClick.bind(this),void 0!==window.ontouchstart&&(this.el.addEventListener("touchstart",this._handleCarouselTapBound),this.el.addEventListener("touchmove",this._handleCarouselDragBound),this.el.addEventListener("touchend",this._handleCarouselReleaseBound)),this.el.addEventListener("mousedown",this._handleCarouselTapBound),this.el.addEventListener("mousemove",this._handleCarouselDragBound),this.el.addEventListener("mouseup",this._handleCarouselReleaseBound),this.el.addEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.addEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&(this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.$indicators.find(".indicator-item").each(function(t,n){t.addEventListener("click",e._handleIndicatorClickBound)}));var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){var e=this;void 0!==window.ontouchstart&&(this.el.removeEventListener("touchstart",this._handleCarouselTapBound),this.el.removeEventListener("touchmove",this._handleCarouselDragBound),this.el.removeEventListener("touchend",this._handleCarouselReleaseBound)),this.el.removeEventListener("mousedown",this._handleCarouselTapBound),this.el.removeEventListener("mousemove",this._handleCarouselDragBound),this.el.removeEventListener("mouseup",this._handleCarouselReleaseBound),this.el.removeEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.removeEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&this.$indicators.find(".indicator-item").each(function(t,n){t.removeEventListener("click",e._handleIndicatorClickBound)}),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleCarouselTap",value:function(e){"mousedown"===e.type&&ev(e.target).is("img")&&e.preventDefault(),this.pressed=!0,this.dragged=!1,this.verticalDragged=!1,this.reference=this._xpos(e),this.referenceY=this._ypos(e),this.velocity=this.amplitude=0,this.frame=this.offset,this.timestamp=Date.now(),clearInterval(this.ticker),this.ticker=setInterval(this._trackBound,100)}},{key:"_handleCarouselDrag",value:function(e){var t=void 0,n=void 0,i=void 0;if(this.pressed){if(t=this._xpos(e),n=this._ypos(e),i=this.reference-t,30>Math.abs(this.referenceY-n)&&!this.verticalDragged)(2=this.dim*(this.count-1)?this.target=this.dim*(this.count-1):this.target<0&&(this.target=0)),this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound),this.dragged&&(e.preventDefault(),e.stopPropagation()),!1}},{key:"_handleCarouselClick",value:function(e){if(this.dragged)return e.preventDefault(),e.stopPropagation(),!1;if(!this.options.fullWidth){var t=ev(e.target).closest(".carousel-item").index();0!=this._wrap(this.center)-t&&(e.preventDefault(),e.stopPropagation()),this._cycleTo(t)}}},{key:"_handleIndicatorClick",value:function(e){e.stopPropagation();var t=ev(e.target).closest(".indicator-item");t.length&&this._cycleTo(t.index())}},{key:"_handleResize",value:function(e){this.options.fullWidth?(this.itemWidth=this.$el.find(".carousel-item").first().innerWidth(),this.imageHeight=this.$el.find(".carousel-item.active").height(),this.dim=2*this.itemWidth+this.options.padding,this.offset=2*this.center*this.itemWidth,this.target=this.offset,this._setCarouselHeight(!0)):this._scroll()}},{key:"_setCarouselHeight",value:function(e){var t=this,n=this.$el.find(".carousel-item.active").length?this.$el.find(".carousel-item.active").first():this.$el.find(".carousel-item").first(),i=n.find("img").first();if(i.length){if(i[0].complete){var r=i.height();if(0=this.count?e%this.count:e<0?this._wrap(this.count+e%this.count):e}},{key:"_track",value:function(){var e,t,n,i;t=(e=Date.now())-this.timestamp,this.timestamp=e,n=this.offset-this.frame,this.frame=this.offset,i=1e3*n/(1+t),this.velocity=.8*i+.2*this.velocity}},{key:"_autoScroll",value:function(){var e=void 0,t=void 0;this.amplitude&&(e=Date.now()-this.timestamp,2<(t=this.amplitude*Math.exp(-e/this.options.duration))||t<-2?(this._scroll(this.target-t),requestAnimationFrame(this._autoScrollBound)):this._scroll(this.target))}},{key:"_scroll",value:function(e){var t=this;this.$el.hasClass("scrolling")||this.el.classList.add("scrolling"),null!=this.scrollingTimeout&&window.clearTimeout(this.scrollingTimeout),this.scrollingTimeout=window.setTimeout(function(){t.$el.removeClass("scrolling")},this.options.duration);var n,i,r,o,s=void 0,a=void 0,l=void 0,u=void 0,c=void 0,d=void 0,h=this.center,p=1/this.options.numVisible;if(this.offset="number"==typeof e?e:this.offset,this.center=Math.floor((this.offset+this.dim/2)/this.dim),o=-(r=(i=this.offset-this.center*this.dim)<0?1:-1)*i*2/this.dim,n=this.count>>1,this.options.fullWidth?(l="translateX(0)",d=1):(l="translateX("+(this.el.clientWidth-this.itemWidth)/2+"px) "+("translateY("+(this.el.clientHeight-this.itemHeight)/2+"px)"),d=1-p*o),this.showIndicators){var f=this.center%this.count,m=this.$indicators.find(".indicator-item.active");m.index()!==f&&(m.removeClass("active"),this.$indicators.find(".indicator-item").eq(f)[0].classList.add("active"))}if(!this.noWrap||0<=this.center&&this.center=this.count||t<0){if(this.noWrap)return;t=this._wrap(t)}this._cycleTo(t)}},{key:"prev",value:function(e){(void 0===e||isNaN(e))&&(e=1);var t=this.center-e;if(t>=this.count||t<0){if(this.noWrap)return;t=this._wrap(t)}this._cycleTo(t)}},{key:"set",value:function(e,t){if((void 0===e||isNaN(e))&&(e=0),e>this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e,t)}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Carousel}},{key:"defaults",get:function(){return ew}}]),t}(),M.Carousel=eb,M.jQueryLoaded&&M.initializeJqueryWrapper(eb,"carousel","M_Carousel"),eM=cash,eE={onOpen:void 0,onClose:void 0},eT=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_TapTarget=i).options=eM.extend({},t.defaults,n),i.isOpen=!1,i.$origin=eM("#"+i.$el.attr("data-target")),i._setup(),i._calculatePositioning(),i._setupEventHandlers(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.TapTarget=void 0}},{key:"_setupEventHandlers",value:function(){this._handleDocumentClickBound=this._handleDocumentClick.bind(this),this._handleTargetClickBound=this._handleTargetClick.bind(this),this._handleOriginClickBound=this._handleOriginClick.bind(this),this.el.addEventListener("click",this._handleTargetClickBound),this.originEl.addEventListener("click",this._handleOriginClickBound);var e=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=e.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleTargetClickBound),this.originEl.removeEventListener("click",this._handleOriginClickBound),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleTargetClick",value:function(e){this.open()}},{key:"_handleOriginClick",value:function(e){this.close()}},{key:"_handleResize",value:function(e){this._calculatePositioning()}},{key:"_handleDocumentClick",value:function(e){eM(e.target).closest(".tap-target-wrapper").length||(this.close(),e.preventDefault(),e.stopPropagation())}},{key:"_setup",value:function(){this.wrapper=this.$el.parent()[0],this.waveEl=eM(this.wrapper).find(".tap-target-wave")[0],this.originEl=eM(this.wrapper).find(".tap-target-origin")[0],this.contentEl=this.$el.find(".tap-target-content")[0],eM(this.wrapper).hasClass(".tap-target-wrapper")||(this.wrapper=document.createElement("div"),this.wrapper.classList.add("tap-target-wrapper"),this.$el.before(eM(this.wrapper)),this.wrapper.append(this.el)),this.contentEl||(this.contentEl=document.createElement("div"),this.contentEl.classList.add("tap-target-content"),this.$el.append(this.contentEl)),this.waveEl||(this.waveEl=document.createElement("div"),this.waveEl.classList.add("tap-target-wave"),this.originEl||(this.originEl=this.$origin.clone(!0,!0),this.originEl.addClass("tap-target-origin"),this.originEl.removeAttr("id"),this.originEl.removeAttr("style"),this.originEl=this.originEl[0],this.waveEl.append(this.originEl)),this.wrapper.append(this.waveEl))}},{key:"_calculatePositioning",value:function(){var e="fixed"===this.$origin.css("position");if(!e)for(var t=this.$origin.parents(),n=0;n'+t.getAttribute("label")+"")[0]),i.each(function(t){var n=e._appendOptionWithIcon(e.$el,t,"optgroup-option");e._addOptionToValueDict(t,n)})}}),this.$el.after(this.dropdownOptions),this.input=document.createElement("input"),e_(this.input).addClass("select-dropdown dropdown-trigger"),this.input.setAttribute("type","text"),this.input.setAttribute("readonly","true"),this.input.setAttribute("data-target",this.dropdownOptions.id),this.el.disabled&&e_(this.input).prop("disabled","true"),this.$el.before(this.input),this._setValueToInput();var t=e_('');if(this.$el.before(t[0]),!this.el.disabled){var n=e_.extend({},this.options.dropdownOptions);n.onOpenEnd=function(t){var n=e_(e.dropdownOptions).find(".selected").first();if(n.length&&(M.keyDown=!0,e.dropdown.focusedIndex=n.index(),e.dropdown._focusFocusedItem(),M.keyDown=!1,e.dropdown.isScrollable)){var i=n[0].getBoundingClientRect().top-e.dropdownOptions.getBoundingClientRect().top;i-=e.dropdownOptions.clientHeight/2,e.dropdownOptions.scrollTop=i}},this.isMultiple&&(n.closeOnClick=!1),this.dropdown=M.Dropdown.init(this.input,n)}this._setSelectedStates()}},{key:"_addOptionToValueDict",value:function(e,t){var n=Object.keys(this._valueDict).length,i=this.dropdownOptions.id+n,r={};t.id=i,r.el=e,r.optionEl=t,this._valueDict[i]=r}},{key:"_removeDropdown",value:function(){e_(this.wrapper).find(".caret").remove(),e_(this.input).remove(),e_(this.dropdownOptions).remove(),e_(this.wrapper).before(this.$el),e_(this.wrapper).remove()}},{key:"_appendOptionWithIcon",value:function(e,t,n){var i=t.disabled?"disabled ":"",r=this.isMultiple?'":t.innerHTML,o=e_("
  • "),s=e_("");s.html(r),o.addClass(i+" "+("optgroup-option"===n?"optgroup-option ":"")),o.append(s);var a=t.getAttribute("data-icon");if(a){var l=e_('');o.prepend(l)}return e_(this.dropdownOptions).append(o[0]),o[0]}},{key:"_toggleEntryFromArray",value:function(e){var t=!this._keysSelected.hasOwnProperty(e),n=e_(this._valueDict[e].optionEl);return t?this._keysSelected[e]=!0:delete this._keysSelected[e],n.toggleClass("selected",t),n.find('input[type="checkbox"]').prop("checked",t),n.prop("selected",t),t}},{key:"_setValueToInput",value:function(){var e=[];if(this.$el.find("option").each(function(t){if(e_(t).prop("selected")){var n=e_(t).text();e.push(n)}}),!e.length){var t=this.$el.find("option:disabled").eq(0);t.length&&""===t[0].value&&e.push(t.text())}this.input.value=e.join(", ")}},{key:"_setSelectedStates",value:function(){for(var e in this._keysSelected={},this._valueDict){var t=this._valueDict[e],n=e_(t.el).prop("selected");e_(t.optionEl).find('input[type="checkbox"]').prop("checked",n),n?(this._activateOption(e_(this.dropdownOptions),e_(t.optionEl)),this._keysSelected[e]=!0):e_(t.optionEl).removeClass("selected")}}},{key:"_activateOption",value:function(e,t){t&&(this.isMultiple||e.find("li.selected").removeClass("selected"),e_(t).addClass("selected"))}},{key:"getSelectedValues",value:function(){var e=[];for(var t in this._keysSelected)e.push(this._valueDict[t].el.value);return e}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_FormSelect}},{key:"defaults",get:function(){return ex}}]),t}(),M.FormSelect=eA,M.jQueryLoaded&&M.initializeJqueryWrapper(eA,"formSelect","M_FormSelect"),eS=cash,eL=M.anime,eI={},eN=function(e){function t(e,n){eO(this,t);var i=eC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,t,e,n));return(i.el.M_Range=i).options=eS.extend({},t.defaults,n),i._mousedown=!1,i._setupThumb(),i._setupEventHandlers(),i}return ej(t,eR),eD(t,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeThumb(),this.el.M_Range=void 0}},{key:"_setupEventHandlers",value:function(){this._handleRangeChangeBound=this._handleRangeChange.bind(this),this._handleRangeMousedownTouchstartBound=this._handleRangeMousedownTouchstart.bind(this),this._handleRangeInputMousemoveTouchmoveBound=this._handleRangeInputMousemoveTouchmove.bind(this),this._handleRangeMouseupTouchendBound=this._handleRangeMouseupTouchend.bind(this),this._handleRangeBlurMouseoutTouchleaveBound=this._handleRangeBlurMouseoutTouchleave.bind(this),this.el.addEventListener("change",this._handleRangeChangeBound),this.el.addEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.addEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.addEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("change",this._handleRangeChangeBound),this.el.removeEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_handleRangeChange",value:function(){eS(this.value).html(this.$el.val()),eS(this.thumb).hasClass("active")||this._showRangeBubble();var e=this._calcRangeOffset();eS(this.thumb).addClass("active").css("left",e+"px")}},{key:"_handleRangeMousedownTouchstart",value:function(e){if(eS(this.value).html(this.$el.val()),this._mousedown=!0,this.$el.addClass("active"),eS(this.thumb).hasClass("active")||this._showRangeBubble(),"input"!==e.type){var t=this._calcRangeOffset();eS(this.thumb).addClass("active").css("left",t+"px")}}},{key:"_handleRangeInputMousemoveTouchmove",value:function(){if(this._mousedown){eS(this.thumb).hasClass("active")||this._showRangeBubble();var e=this._calcRangeOffset();eS(this.thumb).addClass("active").css("left",e+"px"),eS(this.value).html(this.$el.val())}}},{key:"_handleRangeMouseupTouchend",value:function(){this._mousedown=!1,this.$el.removeClass("active")}},{key:"_handleRangeBlurMouseoutTouchleave",value:function(){if(!this._mousedown){var e=7+parseInt(this.$el.css("padding-left"))+"px";eS(this.thumb).hasClass("active")&&(eL.remove(this.thumb),eL({targets:this.thumb,height:0,width:0,top:10,easing:"easeOutQuad",marginLeft:e,duration:100})),eS(this.thumb).removeClass("active")}}},{key:"_setupThumb",value:function(){this.thumb=document.createElement("span"),this.value=document.createElement("span"),eS(this.thumb).addClass("thumb"),eS(this.value).addClass("value"),eS(this.thumb).append(this.value),this.$el.after(this.thumb)}},{key:"_removeThumb",value:function(){eS(this.thumb).remove()}},{key:"_showRangeBubble",value:function(){var e=-7+parseInt(eS(this.thumb).parent().css("padding-left"))+"px";eL.remove(this.thumb),eL({targets:this.thumb,height:30,width:30,top:-30,marginLeft:e,duration:300,easing:"easeOutQuint"})}},{key:"_calcRangeOffset",value:function(){var e=this.$el.width()-15,t=parseFloat(this.$el.attr("max"))||100,n=parseFloat(this.$el.attr("min"))||0;return(parseFloat(this.$el.val())-n)/(t-n)*e}}],[{key:"init",value:function(e,n){return ek(t.__proto__||Object.getPrototypeOf(t),"init",this).call(this,this,e,n)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Range}},{key:"defaults",get:function(){return eI}}]),t}(),M.Range=eN,M.jQueryLoaded&&M.initializeJqueryWrapper(eN,"range","M_Range"),eN.init(eS("input[type=range]"))},363:function(e,t,n){"use strict";t.meiosisSetup=void 0;var i=n(977);Object.defineProperty(t,"meiosisSetup",{enumerable:!0,get:function(){return i.meiosisSetup}})},977:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.meiosisSetup=void 0;let r=n(125),o=n(264),s=i(n(388)),a=(e,t,n)=>(n[e]=t,n),l=(e,t)=>t?e.concat(t):e,u=e=>e?Object.keys(e).reduce((t,n)=>a(n,Object.assign({},e[n].initial,u(e[n].nested)),t),{}):{},c=e=>Object.assign({},e.initial,u(e.nested)),d=e=>e?Object.keys(e).reduce((t,n)=>{let i=e[n];if(void 0!==i.view){let e=i.view;return a(n,{view:(t,...i)=>e(t.nest(n),...i),nested:d(i.nested)},t)}return t},{}):{},h=e=>d(e.nested),p=(e,t=e=>e,n=e=>e)=>e?Object.keys(e).reduce((i,r)=>{var o;let s=e=>t(e).nest(r),a=e=>n(e)[r],u=e[r];return l(i,null===(o=u.services)||void 0===o?void 0:o.map(e=>({onchange:t=>e.onchange?e.onchange(a(t)):t,run:t=>e.run(s(t))}))).concat(p(u.nested,s,a))},[]):[],f=e=>l([],e.services).concat(p(e.nested)),m=({stream:e,app:t})=>{!e&&(e=r.simpleStream);let n=t||{},i=c(n),o=h(n),a="function"==typeof e?e:e.stream,l=e.scan,u=a();return{states:l((e,t)=>(0,s.default)(e,t),i,u),update:u,view:o}},g=(e,t)=>({[t]:e}),y=(e,t)=>n=>e(g(n,t)),v=(e,t,n)=>i=>{let r=e.map(e=>e[i]),s=()=>e()[i],a=y(t,i),l=(0,o.get)(n,[i,"nested"]);return{states:r,state:s(),getState:s,update:a,nest:v(r,a,l),nested:l}};t.meiosisSetup=e=>{let t=null==e?void 0:e.stream,n=null==e?void 0:e.app,{states:i,update:o,view:s}=m({stream:t,app:n}),a=v(i,o,s),l=()=>i(),u=e=>({states:i,state:e,getState:l,update:o,nest:a,nested:s}),c=(0,r.createDropRepeats)(t);return n&&f(n).forEach(e=>{c(i,e.onchange).map(t=>e.run(u(t)))}),c(i).map(u)}},125:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dropRepeats=t.createDropRepeats=t.simpleStream=t.scan=t.stream=void 0;t.stream=e=>{let n=[],i=e,r=function(e){if(arguments.length>0&&!r.ended)for(let t in i=e,n)n[t](i);return i};return r.map=e=>{let r=(0,t.stream)(),o=t=>{r(e(t))};return n.push(o),r.end=e=>{let t=n.indexOf(o);r.ended=!0,n.splice(t,1)},void 0!==i&&r(e(i)),r},r.end=e=>{r.ended=!0},r};t.scan=(e,n,i)=>{let r=(0,t.stream)(n),o=n;return i.map(t=>{r(o=e(o,t))}),r},t.simpleStream={stream:t.stream,scan:t.scan};t.createDropRepeats=(e=t.simpleStream)=>(t,n=e=>e)=>{let i;let r=("function"==typeof e?e:e.stream)();return t.map(e=>{let t=n(e);t!==i&&(i=t,r(e))}),r},t.dropRepeats=(0,t.createDropRepeats)()},264:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateFormFloatValue=t.updateFormIntValue=t.updateFormValue=t.get=void 0;t.get=(e,t)=>t.reduce((e,t)=>void 0==e?void 0:e[t],e);let n=(e,t)=>({[e[0]]:1===e.length?t:n(e.slice(1),t)}),i=e=>Array.isArray(e)?e:[e],r=(e,t,r)=>o=>{let s=e(o.currentTarget.value);!isNaN(s)&&t.update(n(i(r),s))};t.updateFormValue=(e,t,r=e=>e)=>o=>e.update(n(i(t),r(o.currentTarget.value)));t.updateFormIntValue=(e,t)=>n=>r(parseInt,e,t)(n);t.updateFormFloatValue=(e,t)=>n=>r(parseFloat,e,t)(n)},388:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return s}});let i=Object.assign||((e,t)=>(t&&Object.keys(t).forEach(n=>e[n]=t[n]),e)),r=(e,t,n)=>{let i=typeof n;if(n&&"object"===i){if(Array.isArray(n))for(let i of n)t=r(e,t,i);else for(let i of Object.keys(n)){let s=n[i];"function"==typeof s?t[i]=s(t[i],o):void 0===s?e&&!isNaN(i)?t.splice(i,1):delete t[i]:null===s||"object"!=typeof s||Array.isArray(s)?t[i]=s:"object"==typeof t[i]?t[i]=s===t[i]?s:o(t[i],s):t[i]=r(!1,{},s)}}else"function"===i&&(t=n(t,o));return t},o=(e,...t)=>{let n=Array.isArray(e);return r(n,n?e.slice():i({},e),t)},s=o},862:function(e,t,n){"use strict";var i=n(230);e.exports=function(e,t,n){var r=[],o=!1,s=-1;function a(){for(s=0;s=0&&(r.splice(o,2),o<=s&&(s-=2),e(t,[])),null!=n&&(r.push(t,n),e(t,i(n),l))},redraw:l}}},236:function(e,t,n){"use strict";var i=n(230),r=n(326),o=n(31),s=n(578),a=n(376),l=n(819),u=n(427),c=n(750),d={};function h(e){try{return decodeURIComponent(e)}catch(t){return e}}e.exports=function(e,t){var n=null==e?null:"function"==typeof e.setImmediate?e.setImmediate:e.setTimeout,p=o.resolve(),f=!1,m=!1,g=0,y,v,w,b,E,T,_=d,x={onbeforeupdate:function(){return!(!(g=g?2:1)||d===_)},onremove:function(){e.removeEventListener("popstate",L,!1),e.removeEventListener("hashchange",S,!1)},view:function(){if(g&&d!==_){var e=[i(w,b.key,b)];return _&&(e=_.render(e[0])),e}}},A=N.SKIP={};function S(){f=!1;var n=e.location.hash;"#"!==N.prefix[0]&&(n=e.location.search+n,"?"!==N.prefix[0]&&"/"!==(n=e.location.pathname+n)[0]&&(n="/"+n));var i=n.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,h).slice(N.prefix.length),r=a(i);function o(e){console.error(e),I(v,null,{replace:!0})}u(r.params,e.history.state),function e(n){for(;n=0&&(m+=e.slice(n,s)),d>=0&&(m+=(n<0?"?":"&")+c.slice(d,p));var g=i(u);return g&&(m+=(n<0&&d<0?"?":"&")+g),o>=0&&(m+=e.slice(o)),h>=0&&(m+=(o<0?"":"&")+c.slice(h)),m}},819:function(e,t,n){"use strict";var i=n(376);e.exports=function(e){var t=i(e),n=Object.keys(t.params),r=[],o=RegExp("^"+t.path.replace(/:([^\/.-]+)(\.{3}|\.(?!\.)|-)?|[\\^$*+.()|\[\]{}]/g,function(e,t,n){return null==t?"\\"+e:(r.push({k:t,r:"..."===n}),"..."===n)?"(.*)":"."===n?"([^/]+)\\.":"([^/]+)"+(n||"")})+"$");return function(e){for(var i=0;i1&&"/"===s[s.length-1]&&(s=s.slice(0,-1))):s="/",{path:s,params:t<0?{}:i(e.slice(t+1,r))}}},657:function(e){"use strict";var t=function(e){if(!(this instanceof t))throw Error("Promise must be called with 'new'.");if("function"!=typeof e)throw TypeError("executor must be a function.");var n=this,i=[],r=[],o=u(i,!0),s=u(r,!1),a=n._instance={resolvers:i,rejectors:r},l="function"==typeof setImmediate?setImmediate:setTimeout;function u(e,t){return function o(u){var d;try{if(t&&null!=u&&("object"==typeof u||"function"==typeof u)&&"function"==typeof(d=u.then)){if(u===n)throw TypeError("Promise can't be resolved with itself.");c(d.bind(u))}else l(function(){!t&&0===e.length&&console.error("Possible unhandled promise rejection:",u);for(var n=0;n0)&&e(n)}}var i=n(s);try{e(n(o),i)}catch(e){i(e)}}c(e)};t.prototype.then=function(e,n){var i,r,o=this._instance;function s(e,t,n,s){t.push(function(t){if("function"!=typeof e)n(t);else try{i(e(t))}catch(e){r&&r(e)}}),"function"==typeof o.retry&&s===o.state&&o.retry()}var a=new t(function(e,t){i=e,r=t});return s(e,o.resolvers,i,!0),s(n,o.rejectors,r,!1),a},t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(e){return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})},t.resolve=function(e){return e instanceof t?e:new t(function(t){t(e)})},t.reject=function(e){return new t(function(t,n){n(e)})},t.all=function(e){return new t(function(t,n){var i=e.length,r=0,o=[];if(0===e.length)t([]);else for(var s=0;s-1&&u.pop();for(var d=0;d0&&(r.className=i.join(" ")),a[e]={tag:n,attrs:r}}(e),t):(t.tag=e,t)}},933:function(e,t,n){"use strict";var i=n(230);e.exports=function(){var e,t=arguments[this],n=this+1;if(null==t?t={}:("object"!=typeof t||null!=t.tag||Array.isArray(t))&&(t={},n=this),arguments.length===n+1)e=arguments[n],!Array.isArray(e)&&(e=[e]);else for(e=[];n'+t.children+"",a=a.firstChild):a.innerHTML=t.children,t.dom=a.firstChild,t.domSize=a.childNodes.length,t.instance=[];for(var l=r.createDocumentFragment();o=a.firstChild;)t.instance.push(o),l.appendChild(o);w(e,l,i)}function f(e,t,n,i,r,o){if(t!==n&&(null!=t||null!=n))if(null==t||0===t.length)c(e,n,0,n.length,i,r,o);else if(null==n||0===n.length)E(e,t,0,t.length);else{var s=null!=t[0]&&null!=t[0].key,a=null!=n[0]&&null!=n[0].key,l=0,u=0;if(!s)for(;u=u&&A>=l&&(w=t[x],b=n[A],w.key===b.key);){;w!==b&&m(e,w,b,i,r,o),null!=b.dom&&(r=b.dom),x--,A--}for(;x>=u&&A>=l&&(p=t[u],f=n[l],p.key===f.key);){;u++,l++,p!==f&&m(e,p,f,i,y(t,u,r),o)}for(;x>=u&&A>=l&&l!==A&&p.key===b.key&&w.key===f.key;){;v(e,w,_=y(t,u,r)),w!==f&&m(e,w,f,i,_,o),++l<=--A&&v(e,p,r),p!==b&&m(e,p,b,i,r,o),null!=b.dom&&(r=b.dom),u++,w=t[--x],b=n[A],p=t[u],f=n[l]}for(;x>=u&&A>=l&&w.key===b.key;){;w!==b&&m(e,w,b,i,r,o),null!=b.dom&&(r=b.dom),x--,A--,w=t[x],b=n[A]}if(l>A)E(e,t,u,x+1);else if(u>x)c(e,n,l,A+1,i,r,o);else{var h,S,L=r,I=A-l+1,N=Array(I),k=0,D=0,C=2147483647,j=0;for(D=0;D=l;D--){null==h&&(h=function(e,t,n){for(var i=Object.create(null);t>>1)+(i>>>1)+(n&i&1);e[t[a]]0&&(g[r]=t[n-1]),t[n]=r)}for(n=t.length,i=t[n-1];n-- >0;)t[n]=i,i=g[i];return g.length=0,t}(N)).length-1,D=A;D>=l;D--)f=n[D],-1===N[D-l]?d(e,f,i,o,r):S[k]===D-l?k--:v(e,f,r),null!=f.dom&&(r=n[D].dom);else for(D=A;D>=l;D--)f=n[D],-1===N[D-l]&&d(e,f,i,o,r),null!=f.dom&&(r=n[D].dom)}}else{var R=t.lengthR&&E(e,t,l,t.length),n.length>R&&c(e,n,l,n.length,i,r,o)}}}function m(e,t,n,r,o,a){var c=t.tag;if(c===n.tag){if(n.state=t.state,n.events=t.events,function(e,t){do{if(null!=e.attrs&&"function"==typeof e.attrs.onbeforeupdate){var n=l.call(e.attrs.onbeforeupdate,e,t);if(void 0!==n&&!n)break}if("string"!=typeof e.tag&&"function"==typeof e.state.onbeforeupdate){var n=l.call(e.state.onbeforeupdate,e,t);if(void 0!==n&&!n)break}return!1}while(!1);return e.dom=t.dom,e.domSize=t.domSize,e.instance=t.instance,e.attrs=t.attrs,e.children=t.children,e.text=t.text,!0}(n,t))return;if("string"==typeof c)switch(null!=n.attrs&&z(n.attrs,n,r),c){case"#":(function(e,t){e.children.toString()!==t.children.toString()&&(e.dom.nodeValue=t.children),t.dom=e.dom})(t,n);break;case"<":(function(e,t,n,i,r){t.children!==n.children?(_(e,t),p(e,n,i,r)):(n.dom=t.dom,n.domSize=t.domSize,n.instance=t.instance)})(e,t,n,a,o);break;case"[":(function(e,t,n,i,r,o){f(e,t.children,n.children,i,r,o);var s=0,a=n.children;if(n.dom=null,null!=a){for(var l=0;l-1||null!=e.attrs&&e.attrs.is||"href"!==t&&"list"!==t&&"form"!==t&&"width"!==t&&"height"!==t)&&t in e.dom}var N=/[A-Z]/g;function k(e){return"-"+e.toLowerCase()}function D(e){return"-"===e[0]&&"-"===e[1]?e:"cssFloat"===e?"float":e.replace(N,k)}function C(e,t,n){if(t===n);else if(null==n)e.style.cssText="";else if("object"!=typeof n)e.style.cssText=n;else if(null==t||"object"!=typeof t)for(var i in e.style.cssText="",n){var r=n[i];null!=r&&e.style.setProperty(D(i),String(r))}else{for(var i in n){var r=n[i];null!=r&&(r=String(r))!==String(t[i])&&e.style.setProperty(D(i),r)}for(var i in t)null!=t[i]&&null==n[i]&&e.style.removeProperty(D(i))}}function j(){this._=t}function O(e,n,i){null!=e.events?(e.events._=t,e.events[n]!==i&&(null!=i&&("function"==typeof i||"object"==typeof i)?(null==e.events[n]&&e.dom.addEventListener(n.slice(2),e.events,!1),e.events[n]=i):(null!=e.events[n]&&e.dom.removeEventListener(n.slice(2),e.events,!1),e.events[n]=void 0))):null!=i&&("function"==typeof i||"object"==typeof i)&&(e.events=new j,e.dom.addEventListener(n.slice(2),e.events,!1),e.events[n]=i)}function R(e,t,n){"function"==typeof e.oninit&&l.call(e.oninit,t),"function"==typeof e.oncreate&&n.push(l.bind(e.oncreate,t))}function z(e,t,n){"function"==typeof e.onupdate&&n.push(l.bind(e.onupdate,t))}return j.prototype=Object.create(null),j.prototype.handleEvent=function(e){var t,n=this["on"+e.type];"function"==typeof n?t=n.call(e.currentTarget,e):"function"==typeof n.handleEvent&&n.handleEvent(e),this._&&!1!==e.redraw&&(0,this._)(),!1===t&&(e.preventDefault(),e.stopPropagation())},function(e,r,o){if(!e)throw TypeError("DOM element being rendered to does not exist.");if(null!=n&&e.contains(n))throw TypeError("Node is currently being rendered to and thus is locked.");var s=t,a=n,l=[],c=u(),d=e.namespaceURI;n=e,t="function"==typeof o?o:void 0;try{null==e.vnodes&&(e.textContent=""),r=i.normalizeChildren(Array.isArray(r)?r:[r]),f(e,e.vnodes,r,l,null,"http://www.w3.org/1999/xhtml"===d?void 0:d),e.vnodes=r,null!=c&&u()!==c&&"function"==typeof c.focus&&c.focus();for(var h=0;h=200&&e.target.status<300||304===e.target.status||/^file:\/\//i.test(t),a=e.target.response;if("json"===c){if(!e.target.responseType&&"function"!=typeof n.extract)try{a=JSON.parse(e.target.responseText)}catch(e){a=null}}else(!c||"text"===c)&&null==a&&(a=e.target.responseText);if("function"==typeof n.extract?(a=n.extract(e.target,n),s=!0):"function"==typeof n.deserialize&&(a=n.deserialize(a)),s)i(a);else{var l=function(){try{r=e.target.responseText}catch(e){r=a}var t=Error(r);t.code=e.target.status,t.response=a,o(t)};0===d.status?setTimeout(function(){!p&&l()}):l()}}catch(e){o(e)}},d.ontimeout=function(e){p=!0;var t=Error("Request timed out");t.code=e.target.status,o(t)},"function"==typeof n.config&&(d=n.config(d,n,t)||d)!==m&&(f=d.abort,d.abort=function(){h=!0,f.call(this)}),null==a?d.send():"function"==typeof n.serialize?d.send(n.serialize(a)):a instanceof e.FormData||a instanceof e.URLSearchParams?d.send(a):d.send(JSON.stringify(a))}),jsonp:a(function(t,n,i,r){var s=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+o++,a=e.document.createElement("script");e[s]=function(t){delete e[s],a.parentNode.removeChild(a),i(t)},a.onerror=function(){delete e[s],a.parentNode.removeChild(a),r(Error("JSONP request failed"))},a.src=t+(0>t.indexOf("?")?"?":"&")+encodeURIComponent(n.callbackKey||"callback")+"="+encodeURIComponent(s),e.document.documentElement.appendChild(a)})}}},483:function(e,t,n){"use strict";var i=n(10);e.exports=n(236)("undefined"!=typeof window?window:null,i)},427:function(e,t,n){"use strict";var i=n(729);e.exports=Object.assign||function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n])}},750:function(e,t,n){"use strict";var i=n(729),r=RegExp("^(?:key|oninit|oncreate|onbeforeupdate|onupdate|onbeforeremove|onremove)$");e.exports=function(e,t){var n={};if(null!=t)for(var o in e)i.call(e,o)&&!r.test(o)&&0>t.indexOf(o)&&(n[o]=e[o]);else for(var o in e)i.call(e,o)&&!r.test(o)&&(n[o]=e[o]);return n}},729:function(e){"use strict";e.exports=({}).hasOwnProperty},512:function(e,t){var n;function i(e){return 1!==e?"p":"s"}t.plural_EN=i},949:function(e){"use strict";e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23949ba3' viewBox='0 0 16 16'%3E%3Cpath d='M8 13.1l-8-8 2.1-2.2 5.9 5.9 5.9-5.9 2.1 2.2z'/%3E%3C/svg%3E"},876:function(e,t,n){"use strict";e.exports=n.p+"4d73cb90e394b34b7670.woff"},550:function(e,t,n){"use strict";e.exports=n.p+"0c35d18bf06992036b69.woff2"},106:function(e,t,n){"use strict";var i,r,o,s,a,l,u,c,d,h,p,f,m,g,y,v,w,b,E,T,_,x,A,S,L,I,N,k,D,C,j,O,R,z,P,B,U,F,Y,W,H,Q,V,G,K,q,Z,X,J,ee,et,en,ei,er,eo,es,ea,el,eu,ec,ed,eh,ep,ef,em,eg,ey,ev,ew,eb,eM,eE,eT,e_,ex,eA,eS,eL,eI,eN,ek,eD,eC,ej,eO,eR,ez,eP,eB,eU,eF,eY,e$,eW,eH,eQ,eV,eG,eK,eq,eZ,eX,eJ,e0,e1,e2,e4,e3,e5,e6,e8,e9,e7,te,tt,tn,ti,tr,to,ts,ta,tl,tu,tc,td,th,tp=n("898"),tf=n.n(tp);n("473"),n("514"),n("142"),n("784"),(i=I||(I={})).LANDING="LANDING",i.LOGIN="LOGIN",i.HOME="HOME",i.CRIME_SCRIPT="CRIME_SCRIPT",i.SETTINGS="SETTINGS",i.ABOUT="ABOUT";var tm=n("363");let tg=()=>"idxxxxxxxx".replace(/[x]/g,()=>(16*Math.random()|0).toString(16)),ty=(...e)=>t=>e.reduceRight((e,t)=>t(e),t),tv=e=>t=>Array.prototype.map.call(t,e),tw=e=>t=>Array.prototype.join.call(t,e),tb=e=>e.replace(/([A-Z])/g,e=>"-"+e.toLowerCase()),tM=e=>e?ty(tw(""),tv(t=>`[${tb(t)}="${((e="")=>e.toString().replace(/"/g,"""))(e[t])}"]`),Object.keys)(e):"",tE=["min","max","minLength","maxLength","rows","cols","placeholder","autocomplete","pattern","readOnly","step"],tT=e=>tE.indexOf(e)>=0,t_=({disabled:e})=>e?"[disabled]":"",tx=({required:e,isMandatory:t})=>e||t?"[required][aria-required=true]":"",tA=e=>{let t;return(e=>Object.keys(e).filter(tT).filter(t=>void 0!==e[t]).reduce((t,n)=>{let i=e[n];return t.push(`[${n.toLowerCase()}=${i}]`),t},[]).join(""))(e)+((t=e).maxLength?`[data-length=${t.maxLength}]`:"")+t_(e)+tx(e)+(({autofocus:e})=>"boolean"==typeof e&&e||e&&e()?"[autofocus]":"")(e)},tS=e=>!isNaN(parseFloat(e))&&isFinite(e),tL=(e,t=2,n="0")=>(e+="").length>=t?e:Array(t-e.length+1).join(n)+e;function tI(){return(tI=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}let tk=["label","id","isMandatory","isActive"],tD={view:({attrs:e})=>tf()("span.mandatory",e,"*")},tC=()=>({view:e=>{let{attrs:{label:t,id:n,isMandatory:i,isActive:r}}=e,o=tN(e.attrs,tk);return t?tf()(`label${r?".active":""}${n?`[for=${n}]`:""}`,o,[tf().trust(t),i?tf()(tD):void 0]):void 0}}),tj=()=>({view:({attrs:{helperText:e,dataError:t,dataSuccess:n,className:i}})=>e||t||n?tf()("span.helper-text",{className:i,dataError:t,dataSuccess:n},e?tf().trust(e):""):void 0}),tO=["iconName"],tR=()=>({view:e=>{let{attrs:{iconName:t}}=e,n=tN(e.attrs,tO);return tf()("i.material-icons",n,t)}}),tz=["modalId","tooltip","tooltipPostion","iconName","iconClass","label","attr"],tP=(e,t="")=>()=>{let n=`${e}${t}`;return{view:({attrs:e})=>{let{modalId:t,tooltip:i,tooltipPostion:r,iconName:o,iconClass:s,label:a,attr:l}=e,u=tN(e,tz);return tf()(`${n}${t?`.modal-trigger[href=#${t}]`:""}${i?`.tooltipped[data-position=${r||"top"}][data-tooltip=${i}]`:""}${tM(l)}`,u,o?tf()(tR,{iconName:o,className:s||"left"}):void 0,a||void 0)}}},tB=(tP("a.waves-effect.waves-light.btn","[type=button]"),tP("a.waves-effect.waves-light.btn-large","[type=button]"),tP("a.waves-effect.waves-light.btn-small","[type=button]"),tP("a.waves-effect.waves-teal.btn-flat","[type=button]")),tU=(tP("button.btn-floating.btn-large.waves-effect.waves-light","[type=button]"),tP("button.btn.waves-effect.waves-light","[type=submit]"),()=>({view:({attrs:{header:e,body:t,active:n,iconName:i}})=>tf()(n?"li.active":"li",[e||i?tf()(".collapsible-header",[i?tf()("i.material-icons",i):void 0,e?"string"==typeof e?tf()("span",e):e:void 0]):void 0,t?tf()(".collapsible-body",t):void 0])})),tF=()=>({oncreate:({dom:e,attrs:t})=>{M.Collapsible.init(e,t)},view:({attrs:e})=>{let{items:t,class:n,className:i,style:r,id:o}=e;return t&&t.length>0?tf()("ul.collapsible",{class:n||i,style:r,id:o},t.map(e=>tf()(tU,e))):void 0}});(r=N||(N={}))[r.BASIC=0]="BASIC",r[r.LINKS=1]="LINKS",r[r.AVATAR=2]="AVATAR";let tY=["className","helperText","iconName","id","initialValue","isMandatory","label","onchange","onkeydown","onkeypress","onkeyup","onblur","style"],t$=["className","dataError","dataSuccess","helperText","iconName","id","initialValue","isMandatory","label","maxLength","newRow","onchange","onkeydown","onkeypress","onkeyup","onblur","style","validate"],tW=()=>{let e={id:tg()};return{view:({attrs:t})=>{let{className:n="col s12",helperText:i,iconName:r,id:o=e.id,initialValue:s,isMandatory:a,label:l,onchange:u,onkeydown:c,onkeypress:d,onkeyup:h,onblur:p,style:f}=t,m=tA(tN(t,tY));return tf()(".input-field",{className:n,style:f},[r?tf()("i.material-icons.prefix",r):"",tf()(`textarea.materialize-textarea[tabindex=0][id=${o}]${m}`,{oncreate:({dom:e})=>{M.textareaAutoResize(e),t.maxLength&&M.CharacterCounter.init(e)},onchange:u?e=>{let t=e.target;u(t&&"string"==typeof t.value?t.value:"")}:void 0,value:s,onkeyup:h?e=>{h(e,e.target.value)}:void 0,onkeydown:c?e=>{c(e,e.target.value)}:void 0,onkeypress:d?e=>{d(e,e.target.value)}:void 0,onblur:p}),tf()(tC,{label:l,id:o,isMandatory:a,isActive:s||t.placeholder}),tf()(tj,{helperText:i})])}}},tH=(e,t="")=>()=>{let n={id:tg()},i=t=>{let n=t.value;return n&&("number"===e||"range"===e)?+n:n},r=(e,t)=>{e.setCustomValidity("boolean"==typeof t?t?"":"Custom validation failed":t)};return{view:({attrs:o})=>{let{className:s="col s12",dataError:a,dataSuccess:l,helperText:u,iconName:c,id:d=n.id,initialValue:h,isMandatory:p,label:f,maxLength:m,newRow:g,onchange:y,onkeydown:v,onkeypress:w,onkeyup:b,onblur:E,style:T,validate:_}=o,x=tA(tN(o,t$));return tf()(`.input-field${g?".clear":""}${t}`,{className:s,style:T},[c?tf()("i.material-icons.prefix",c):void 0,tf()(`input.validate[type=${e}][tabindex=0][id=${d}]${x}`,{oncreate:({dom:t})=>{(({autofocus:e})=>!!e&&("boolean"==typeof e?e:e()))(o)&&t.focus(),m&&M.CharacterCounter.init(t),"range"===e&&M.Range.init(t)},onkeyup:b?e=>{b(e,i(e.target))}:void 0,onkeydown:v?e=>{v(e,i(e.target))}:void 0,onkeypress:w?e=>{w(e,i(e.target))}:void 0,onblur:E,onupdate:_?({dom:e})=>{r(e,_(i(e),e))}:void 0,onchange:e=>{let t=e.target;if(t){let e=i(t);y&&y(e),_&&r(t,_(e,t))}},value:h}),tf()(tC,{label:f,id:d,isMandatory:p,isActive:!(void 0===h&&!o.placeholder&&"number"!==e&&"color"!==e&&"range"!==e)}),tf()(tj,{helperText:u,dataError:a,dataSuccess:l})])}}},tQ=(tH("text"),tH("password"),tH("number"),tH("url"),tH("color"),tH("range",".range-field"),tH("email"),()=>({oncreate:({dom:e,attrs:{options:t,onCreate:n}})=>{let i=M.Modal.init(e,t);n&&n(i)},view:({attrs:{id:e,title:t,description:n,fixedFooter:i,bottomSheet:r,buttons:o,richContent:s}})=>tf()(`.modal${i?".modal-fixed-footer":""}${r?".bottom-sheet":""}[id=${e}]`,[tf()(".modal-content",[tf()("h4",t),s&&"string"==typeof n?tf().trust(n||""):"string"==typeof n?tf()("p",n):n]),o?tf()(".modal-footer",o.map(e=>tf()(tB,tI({},e,{className:"modal-close"})))):void 0])})),tV=()=>{let e={},t=e=>e.map(e=>e.id).join(""),n=(e,t,n=!1)=>n||(t instanceof Array&&(e||"number"==typeof e)?t.indexOf(e)>=0:t===e);return{oninit:({attrs:{checkedId:n,initialValue:i,options:r}})=>{e.ids=t(r);let o=n||i;e.checkedId=n instanceof Array?[...n]:n,e.initialValue=null!=o?o instanceof Array?o.filter(e=>null!=e):[o]:[]},view:({attrs:{id:i,newRow:r,className:o="col s12",checkedId:s,key:a,options:l,multiple:u,label:c,helperText:d,placeholder:h="",isMandatory:p,iconName:f,disabled:m,classes:g="",dropdownOptions:y,onchange:v}})=>{e.checkedId!==s&&(e.initialValue=s?s instanceof Array?s:[s]:void 0);let{initialValue:w}=e,b=v?u?()=>{let t=e.instance&&e.instance.getSelectedValues(),n=t?t.length>0&&tS(t[0])?t.map(e=>+e):t.filter(e=>null!==e||void 0!==e):void 0;e.initialValue=n||[],v(e.initialValue)}:t=>{if(t&&t.currentTarget){let n=t.currentTarget,i=tS(n.value)?+n.value:n.value;e.initialValue=[i]}e.initialValue&&v(e.initialValue)}:void 0;r&&(o+=" clear");let E=!l.some(e=>n(e.id,w)),T=l.reduce((e,t)=>(t.group&&0>e.indexOf(t.group)&&e.push(t.group),e),[]);return tf()(".input-field.select-space",{className:o,key:a,oncreate:u?({dom:t})=>e.wrapper=t:void 0},[f&&tf()("i.material-icons.prefix",f),tf()("select",{id:i,title:c,disabled:m,multiple:u,oncreate:({dom:t})=>{e.instance=M.FormSelect.init(t,{classes:g,dropdownOptions:y})},onupdate:({dom:n})=>{if(u){let t=f?1:0;!e.inputEl&&e.wrapper&&e.wrapper.childNodes&&e.wrapper.childNodes.length>0&&e.wrapper.childNodes[t].childNodes&&e.wrapper.childNodes[t].childNodes[0]&&(e.inputEl=e.wrapper.childNodes[t].childNodes[0]),e.inputEl&&e.inputEl.value&&e.inputEl.value.startsWith(`${h}, `)&&(e.inputEl.value=e.inputEl.value.replace(`${h}, `,""))}let i=t(l),r=s&&e.checkedId!==s.toString();e.ids!==i&&(e.ids=i,r=!0),(e.checkedId instanceof Array&&s instanceof Array?e.checkedId.join()!==s.join():e.checkedId!==s)&&(e.checkedId=s,r=!0),r&&(e.instance=M.FormSelect.init(n,{classes:g,dropdownOptions:y}))},onchange:b},tf()("option",{value:"",disabled:!0,selected:!!E||void 0},h),0===T.length?l.map((e,t)=>{var i;return tf()("option",{value:e.id,title:e.title||void 0,disabled:e.disabled?"true":void 0,"data-icon":e.img||void 0,selected:n(e.id,w,0===t&&E&&!h)},null==(i=e.label)?void 0:i.replace("&","&"))}):T.map(e=>tf()("optgroup",{label:e},l.filter(t=>t.group===e).map((e,t)=>{var i;return tf()("option",{value:e.id,title:e.title||void 0,disabled:e.disabled?"true":void 0,"data-icon":e.img||void 0,selected:n(e.id,w,0===t&&E&&!h)},null==(i=e.label)?void 0:i.replace("&","&"))})))),tf()(tC,{label:c,isMandatory:p}),d&&tf()(tj,{helperText:d})])}}},tG=()=>{let e={},t=(e,t)=>t||e.replace(/ /g,"").toLowerCase();return{view:({attrs:{tabWidth:n,selectedTabId:i,tabs:r,className:o,style:s,duration:a,onShow:l,swipeable:u,responsiveThreshold:c}})=>{let d=r.filter(e=>e.active).shift(),h=i||(d?t(d.title,d.id):"");return tf()(".row",[tf()(".col.s12",tf()("ul.tabs"+("fill"===n?".tabs-fixed-width":""),{className:o,style:s,oncreate:({dom:t})=>{e.instance=M.Tabs.init(t,{duration:a,onShow:l,responsiveThreshold:c,swipeable:u})},onupdate:()=>{if(h){let e=document.getElementById(`tab_${h}`);e&&e.click()}},onremove:()=>e.instance.destroy()},r.map(({className:e,title:i,id:o,active:s,disabled:a,target:l,href:u})=>tf()(`li.tab${a?".disabled":""}${"fixed"===n?`.col.s${Math.floor(12/r.length)}`:""}`,{className:e},tf()(`a[id=tab_${t(i,o)}]${s?".active":""}`,{target:l,href:u||`#${t(i,o)}`},i))))),r.filter(({href:e})=>void 0===e).map(({id:e,title:n,vnode:i,contentClass:r})=>tf()(`.col.s12[id=${t(n,e)}]`,{className:r},i))])}}};function tK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n0&&void 0!==arguments[0]?arguments[0]:new Date,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",n=new Date(e);return"".concat(n.getFullYear()).concat(t).concat(tL(n.getMonth()+1)).concat(t).concat(tL(n.getDate()))},t0=function(){window.scrollTo({top:0,behavior:"smooth"})},t1=function(e,t){return" ".repeat(t)+e};function t2(e,t,n,i,r,o,s){try{var a=e[o](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,r)}function t4(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function s(e){t2(o,i,r,s,a,"next",e)}function a(e){t2(o,i,r,s,a,"throw",e)}s(void 0)})}}function t3(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=(r=s.trys).length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]1?s:s[0],i[e]=o}return o=o.pop?function(e,t,n,i){for(var r=i.array?e.slice():e[0],o=e.length,s=1;s0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]- Steering column locks and ignition immobilizers
    - Anti-robbery screens
    - Tamper-proof packaging | 6. Extend guardianship
    - Go out in group at night
    - Leave signs of occupancy
    - Carry cell phone | 11. Conceal targets
    - Off-street parking
    - Gender-neutral phone directories
    - Unmarked armored trucks | 16. Reduce frustrations and stress
    - Efficient lines
    - Polite service
    - Expanded seating
    - Soothing music/muted lights | 21. Set rules
    - Rental agreements
    - Harassment codes
    - Hotel registration |\n| 2. Control access to facilities
    - Entry phones
    - Electronic card access
    - Baggage screening | 7. Assist natural surveillance
    - Improved street lighting
    - Defensible space design
    - Support whistleblowers | 12. Remove targets
    - Removable car radio
    - Women\'s shelters
    - Pre-paid cards for pay phones | 17. Avoid disputes
    - Separate seating for rival soccer fans
    - Reduce crowding in bars
    - Fixed cab fares | 22. Post instructions
    - "No parking"
    - "Private property"
    - "Extinguish camp fires" |\n| 3. Screen exits
    - Ticket needed for exit
    - Export documents
    - Electronic merchandise tags | 8. Reduce anonymity
    - Taxi driver IDs
    - "How\'s my driving?" decals
    - School uniforms | 13. Identify property
    - Property marking
    - Vehicle licensing and parts marking
    - Cattle branding | 18. Reduce temptation and arousal
    - Controls on violent pornography
    - Enforce good behavior on soccer field
    - Prohibit racial slurs | 23. Alert conscience
    - Roadside speed display boards
    - Signatures for customs declarations
    - "Shoplifting is stealing" |\n| 4. Deflect offenders
    - Street closures
    - Separate bathrooms for women
    - Disperse pubs | 9. Use place managers
    - CCTV for double-deck buses
    - Two clerks for convenience stores
    - Reward vigilance | 14. Disrupt markets
    - Monitor pawn shops
    - Controls on classified ads
    - License street vendors | 19. Neutralize peer pressure
    - "Idiots drink and drive"
    - "It\'s OK to say No"
    - Disperse troublemakers at school | 24. Assist compliance
    - Easy library checkout
    - Public lavatories
    - Litter receptacles |\n| 5. Control tools/weapons
    - "Smart" guns
    - Restrict spray paint sales to juveniles
    - Toughened beer glasses | 10. Strengthen formal surveillance
    - Red light cameras
    - Burglar alarms
    - Security guards | 15. Deny benefits
    - Ink merchandise tags
    - Graffiti cleaning
    - Disabling stolen cell phones | 20. Discourage imitation
    - Rapid repair of vandalism
    - V-chips in TVs
    - Censor details of modus operandi | 25. Control drugs and alcohol
    - Breathalyzers in bars
    - Server intervention programs
    - Alcohol-free events |\n'},CRIME_SCRIPT:{TITLE:"Crime script",ROUTE:"/crime_script"},SETTINGS:{TITLE:"Settings",ROUTE:"/settings"},LANDING:{TITLE:"Introduction",ROUTE:"/"},USER:"User",EDITOR:"Editor",ADMIN:"Administrator",CANCEL:"Cancel",DELETE:"Delete",YES:"Yes",NO:"No",OK:"Ok",NAME:"Name",MISC:"Miscellaneous",DESCRIPTION:"Description",DELETE_ITEM:{TITLE:"Delete {item}",DESCRIPTION:"Are you certain you want to delete this {item}. There is no turning back?"},EDIT_BUTTON:{LABEL:"Edit",TOOLTIP:"Edit"},SAVE_BUTTON:{LABEL:"Save",TOOLTIP:"Save unsaved changes"},MODEL:"Model",TITLE:"Title",AUTHORS:"Authors",LINK:"Link",TYPE:"Type",CAST_TYPE:"Role type",SAVE_SCRIPT:"Save Script",EDIT_SCRIPT:"Edit Script",DELETE_SCRIPT:"Delete Script",NEW_SCRIPT:"New Script",DELETE_SCRIPT_CONFIRM:'Are you certain you want to delete the script "{name}"?',ACTIVITIES:"Activities",CAST:"Cast",CONDITIONS:"Conditions",ATTRIBUTES:"Attributes",MEASURES:"Measures",NEW_ACT:"New Act",PREPARATION_PHASE:"Preparation Phase",PRE_ACTIVITY_PHASE:"Pre-Activity Phase",ACTIVITY_PHASE:"Activity Phase",POST_ACTIVITY_PHASE:"Post-Activity Phase",SUMMARY:"Summary",IMAGE:"Image",ACTIVITY:"Activity",SPECIFY:"Specify",CONDITION:"Condition",CATEGORY:"Category",SELECT:"Select",CREATE:"Create",STAGES:"Stages",STAGE:"Stage",SELECT_ACT_TO_EDIT:"Select act to edit",CREATE_NEW_ACT:"Create new act",REFERENCES:"References",DETAILS:"Details",LANGUAGE:"Language",CLEAR:"Clear model",UPLOAD:"Upload model as JSON",DOWNLOAD:"Download model as JSON",PERMALINK:"Create permanent link",ROLE:"Role",ACT:"Act",SELECT_ACT:"Select act to edit",SELECT_ACT_N:"Select one or more acts for this step",INCREASE_EFFORT:"Increase the effort",TARGET_HARDEN:{TITLE:"Target harden",DESC:"Steering column locks and ignition immobilizers, Anti-robbery screens, Tamper-proof packaging"},CONTROL_ACCESS:{TITLE:"Control access to facilities",DESC:"Entry phones, Electronic card access, Baggage screening"},SCREEN_EXITS:{TITLE:"Screen exits",DESC:"Ticket needed for exit, Export documents, Electronic merchandise tags"},DEFLECT_OFFENDERS:{TITLE:"Deflect offenders",DESC:"Street closures, Separate bathrooms for women, Disperse pubs"},CONTROL_TOOLS:{TITLE:"Control tools/weapons",DESC:'"Smart" guns, Restrict spray paint sales to juveniles, Toughened beer glasses'},INCREASE_RISKS:"Increase the risks",EXTEND_GUARDIANSHIP:{TITLE:"Extend guardianship",DESC:"Go out in group at night, Leave signs of occupancy, Carry cell phone"},ASSIST_SURVEILLANCE:{TITLE:"Assist natural surveillance",DESC:"Improved street lighting, Defensible space design, Support whistleblowers"},REDUCE_ANONYMITY:{TITLE:"Reduce anonymity",DESC:'Taxi driver IDs, "How\'s my driving?" decals, School uniforms'},USE_PLACE_MANAGERS:{TITLE:"Use place managers",DESC:"CCTV for double-deck buses, Two clerks for convenience stores, Reward vigilance"},STRENGTHEN_SURVEILLANCE:{TITLE:"Strengthen formal surveillance",DESC:"Red light cameras, Burglar alarms, Security guards"},REDUCE_REWARDS:"Reduce the rewards",CONCEAL_TARGETS:{TITLE:"Conceal targets",DESC:"Off-street parking, Gender-neutral phone directories, Unmarked armored trucks"},REMOVE_TARGETS:{TITLE:"Remove targets",DESC:"Removable car radio, Women's shelters, Pre-paid cards for pay phones"},IDENTIFY_PROPERTY:{TITLE:"Identify property",DESC:"Property marking, Vehicle licensing and parts marking, Cattle branding"},DISRUPT_MARKETS:{TITLE:"Disrupt markets",DESC:"Monitor pawn shops, Controls on classified ads, License street vendors"},DENY_BENEFITS:{TITLE:"Deny benefits",DESC:"Ink merchandise tags, Graffiti cleaning, Disabling stolen cell phones"},REDUCE_PROVOCATIONS:"Reduce provocations",REDUCE_FRUSTRATIONS:{TITLE:"Reduce frustrations and stress",DESC:"Efficient lines, Polite service, Expanded seating, Soothing music/muted lights"},AVOID_DISPUTES:{TITLE:"Avoid disputes",DESC:"Separate seating for rival soccer fans, Reduce crowding in bars, Fixed cab fares"},REDUCE_TEMPTATION:{TITLE:"Reduce temptation and arousal",DESC:"Controls on violent pornography, Enforce good behavior on soccer field, Prohibit racial slurs"},NEUTRALIZE_PRESSURE:{TITLE:"Neutralize peer pressure",DESC:'"Idiots drink and drive", "It\'s OK to say No", Disperse troublemakers at school'},DISCOURAGE_IMITATION:{TITLE:"Discourage imitation",DESC:"Rapid repair of vandalism, V-chips in TVs, Censor details of modus operandi"},REMOVE_EXCUSES:"Remove excuses",SET_RULES:{TITLE:"Set rules",DESC:"Rental agreements, Harassment codes, Hotel registration"},POST_INSTRUCTIONS:{TITLE:"Post instructions",DESC:'"No parking", "Private property", "Extinguish camp fires"'},ALERT_CONSCIENCE:{TITLE:"Alert conscience",DESC:'Roadside speed display boards, Signatures for customs declarations, "Shoplifting is stealing"'},ASSIST_COMPLIANCE:{TITLE:"Assist compliance",DESC:"Easy library checkout, Public lavatories, Litter receptacles"},CONTROL_DRUGS:{TITLE:"Control drugs and alcohol",DESC:"Breathalyzers in bars, Server intervention programs, Alcohol-free events"},EXPORT_TO_WORD:"Export to Word",INTRODUCTION:"Introduction",LOCATION:"Location",LOCATIONS:"Locations ",SEARCH:"Search...",SEARCH_TOOLTIP:"Type / to search",HITS:{0:"No results found",1:"1 result found",n:"{n} results found"}},nu={HOME:{TITLE:"Home",ROUTE:"/home"},ABOUT:{TITLE:"Over de app",ROUTE:"/over",TEXT:'\n\n#### Situational Crime Prevention technieken\n\n| Verhoog de inspanning | Verhoog de risico\'s | Verminder de beloningen | Verminder provocaties | Verwijder excuses |\n|------------------------|----------------------|--------------------------|-------------------------|---------------------|\n| 1. Doelversteviging
    - Stuursloten en startonderbrekers
    - Anti-overval schermen
    - Manipulatiebestendige verpakking | 6. Breid toezicht uit
    - Ga \'s nachts in groep uit
    - Laat tekenen van bewoning achter
    - Draag een mobiele telefoon | 11. Verberg doelen
    - Parkeren buiten de straat
    - Genderneutrale telefoongidsen
    - Ongemarkeerde gepantserde vrachtwagens | 16. Verminder frustraties en stress
    - Effici\xebnte rijen
    - Beleefde service
    - Uitgebreide zitplaatsen
    - Rustgevende muziek/gedempte verlichting | 21. Stel regels op
    - Huurovereenkomsten
    - Intimidatiecodes
    - Hotelregistratie |\n| 2. Controleer toegang tot faciliteiten
    - Deurtelefoons
    - Elektronische kaart toegang
    - Bagagecontrole | 7. Ondersteun natuurlijk toezicht
    - Verbeterde straatverlichting
    - Verdedigbaar ruimteontwerp
    - Ondersteuning van klokkenluiders | 12. Verwijder doelen
    - Verwijderbare autoradio
    - Vrouwenopvang
    - Prepaidkaarten voor openbare telefoons | 17. Vermijd geschillen
    - Gescheiden zitplaatsen voor rivaliserende voetbalfans
    - Verminder drukte in bars
    - Vaste taxitarieven | 22. Plaats instructies
    - "Parkeren verboden"
    - "Priv\xe9-eigendom"
    - "Doof kampvuren" |\n| 3. Controleer uitgangen
    - Ticket nodig voor vertrek
    - Exportdocumenten
    - Elektronische artikelbeveiliging | 8. Verminder anonimiteit
    - Taxichauffeur ID\'s
    - "Hoe is mijn rijgedrag?" stickers
    - Schooluniformen | 13. Identificeer eigendom
    - Eigendomsmarkering
    - Voertuigregistratie en onderdelenmarkering
    - Veemerken | 18. Verminder verleiding en opwinding
    - Controles op gewelddadige pornografie
    - Handhaaf goed gedrag op voetbalveld
    - Verbied racistische opmerkingen | 23. Activeer geweten
    - Snelheidsweergaveborden langs de weg
    - Handtekeningen voor douaneaangiften
    - "Winkeldiefstal is stelen" |\n| 4. Leid overtreders af
    - Straatafsluitingen
    - Aparte toiletten voor vrouwen
    - Verspreid pubs | 9. Gebruik plaatsmanagers
    - CCTV voor dubbeldekkers
    - Twee bedienden voor gemakswinkels
    - Beloon waakzaamheid | 14. Verstoor markten
    - Monitor pandjeshuis
    - Controles op rubrieksadvertenties
    - Vergunning voor straatverkopers | 19. Neutraliseer groepsdruk
    - "Idioten drinken en rijden"
    - "Het is OK om Nee te zeggen"
    - Verspreid onruststokers op school | 24. Help bij naleving
    - Eenvoudige bibliotheekuitleen
    - Openbare toiletten
    - Afvalbakken |\n| 5. Beheers gereedschappen/wapens
    - "Slimme" wapens
    - Beperk verkoop spuitverf aan jongeren
    - Geharde bierglazen | 10. Versterk formeel toezicht
    - Roodlichtcamera\'s
    - Inbraakalarm
    - Beveiligingspersoneel | 15. Ontzeg voordelen
    - Inktlabels op artikelen
    - Graffiti reiniging
    - Uitschakelen gestolen mobiele telefoons | 20. Ontmoedig imitatie
    - Snelle reparatie van vandalisme
    - V-chips in TV\'s
    - Censureer details van modus operandi | 25. Beheers drugs en alcohol
    - Ademanalysers in bars
    - Interventie programma\'s voor barpersoneel
    - Alcoholvrije evenementen |\n'},CRIME_SCRIPT:{TITLE:"Crime script",ROUTE:"/crime_script"},SETTINGS:{TITLE:"Instellingen",ROUTE:"/instellingen"},LANDING:{TITLE:"Introductie",ROUTE:"/"},USER:"Gebruiker",EDITOR:"Redacteur",ADMIN:"Beheerder",CANCEL:"Annuleren",DELETE:"Verwijderen",YES:"Ja",NO:"Nee",OK:"Ok",NAME:"Naam",MISC:"Overig",DESCRIPTION:"Beschrijving",DELETE_ITEM:{TITLE:"{item} verwijderen",DESCRIPTION:"Weet je zeker dat je dit {item} wilt verwijderen? Dit kan niet ongedaan worden gemaakt."},EDIT_BUTTON:{LABEL:"Bewerken",TOOLTIP:"Bewerken"},SAVE_BUTTON:{LABEL:"Opslaan",TOOLTIP:"Wijzigingen opslaan"},MODEL:"Model",TITLE:"Titel",AUTHORS:"Auteurs",LINK:"Link",TYPE:"Type",CAST_TYPE:"Roltype",SAVE_SCRIPT:"Script opslaan",EDIT_SCRIPT:"Script bewerken",DELETE_SCRIPT:"Script verwijderen",NEW_SCRIPT:"Nieuw script",DELETE_SCRIPT_CONFIRM:'Weet je zeker dat je het script "{name}" wilt verwijderen?',ACTIVITIES:"Activiteiten",CAST:"Rolverdeling",CONDITIONS:"Voorwaarden",ATTRIBUTES:"Attributen",MEASURES:"Maatregelen",NEW_ACT:"Nieuwe handeling",PREPARATION_PHASE:"Voorbereidingsfase",PRE_ACTIVITY_PHASE:"Voor-activiteitsfase",ACTIVITY_PHASE:"Activiteitsfase",POST_ACTIVITY_PHASE:"Na-activiteitsfase",SUMMARY:"Samenvatting",IMAGE:"Afbeelding",ACTIVITY:"Activiteit",SPECIFY:"Specificeren",CONDITION:"Voorwaarde",CATEGORY:"Categorie",SELECT:"Selecteren",CREATE:"Maken",STAGES:"Fasen",STAGE:"Fase",SELECT_ACT_TO_EDIT:"Selecteer handeling om te bewerken",CREATE_NEW_ACT:"Nieuwe handeling maken",REFERENCES:"Referenties",DETAILS:"Details",LANGUAGE:"Taal",CLEAR:"Wis model",UPLOAD:"Lees model in als JSON",DOWNLOAD:"Sla model op als JSON",PERMALINK:"Maak permanente link",ROLE:"Rol",ACT:"Act",SELECT_ACT:"Selecteer act om te bewerken",SELECT_ACT_N:"Selecteer een of meerdere acts in deze stage",INCREASE_EFFORT:"Verhoog de inspanning",TARGET_HARDEN:{TITLE:"Doelversteviging",DESC:"Stuursloten en startonderbrekers, Anti-overval schermen, Manipulatiebestendige verpakking"},CONTROL_ACCESS:{TITLE:"Controleer toegang tot faciliteiten",DESC:"Deurtelefoons, Elektronische kaart toegang, Bagagecontrole"},SCREEN_EXITS:{TITLE:"Controleer uitgangen",DESC:"Ticket nodig voor vertrek, Exportdocumenten, Elektronische artikelbeveiliging"},DEFLECT_OFFENDERS:{TITLE:"Leid overtreders af",DESC:"Straatafsluitingen, Aparte toiletten voor vrouwen, Verspreid pubs"},CONTROL_TOOLS:{TITLE:"Beheers gereedschappen/wapens",DESC:'"Slimme" wapens, Beperk verkoop spuitverf aan jongeren, Geharde bierglazen'},INCREASE_RISKS:"Verhoog de risico's",EXTEND_GUARDIANSHIP:{TITLE:"Breid toezicht uit",DESC:"Ga 's nachts in groep uit, Laat tekenen van bewoning achter, Draag een mobiele telefoon"},ASSIST_SURVEILLANCE:{TITLE:"Ondersteun natuurlijk toezicht",DESC:"Verbeterde straatverlichting, Verdedigbaar ruimteontwerp, Ondersteuning van klokkenluiders"},REDUCE_ANONYMITY:{TITLE:"Verminder anonimiteit",DESC:'Taxichauffeur ID\'s, "Hoe is mijn rijgedrag?" stickers, Schooluniformen'},USE_PLACE_MANAGERS:{TITLE:"Gebruik plaatsmanagers",DESC:"CCTV voor dubbeldekkers, Twee bedienden voor gemakswinkels, Beloon waakzaamheid"},STRENGTHEN_SURVEILLANCE:{TITLE:"Versterk formeel toezicht",DESC:"Roodlichtcamera's, Inbraakalarm, Beveiligingspersoneel"},REDUCE_REWARDS:"Verminder de beloningen",CONCEAL_TARGETS:{TITLE:"Verberg doelen",DESC:"Parkeren buiten de straat, Genderneutrale telefoongidsen, Ongemarkeerde gepantserde vrachtwagens"},REMOVE_TARGETS:{TITLE:"Verwijder doelen",DESC:"Verwijderbare autoradio, Vrouwenopvang, Prepaidkaarten voor openbare telefoons"},IDENTIFY_PROPERTY:{TITLE:"Identificeer eigendom",DESC:"Eigendomsmarkering, Voertuigregistratie en onderdelenmarkering, Veemerken"},DISRUPT_MARKETS:{TITLE:"Verstoor markten",DESC:"Monitor pandjeshuis, Controles op rubrieksadvertenties, Vergunning voor straatverkopers"},DENY_BENEFITS:{TITLE:"Ontzeg voordelen",DESC:"Inktlabels op artikelen, Graffiti reiniging, Uitschakelen gestolen mobiele telefoons"},REDUCE_PROVOCATIONS:"Verminder provocaties",REDUCE_FRUSTRATIONS:{TITLE:"Verminder frustraties en stress",DESC:"Effici\xebnte rijen, Beleefde service, Uitgebreide zitplaatsen, Rustgevende muziek/gedempte verlichting"},AVOID_DISPUTES:{TITLE:"Vermijd geschillen",DESC:"Gescheiden zitplaatsen voor rivaliserende voetbalfans, Verminder drukte in bars, Vaste taxitarieven"},REDUCE_TEMPTATION:{TITLE:"Verminder verleiding en opwinding",DESC:"Controles op gewelddadige pornografie, Handhaaf goed gedrag op voetbalveld, Verbied racistische opmerkingen"},NEUTRALIZE_PRESSURE:{TITLE:"Neutraliseer groepsdruk",DESC:'"Idioten drinken en rijden", "Het is OK om Nee te zeggen", Verspreid onruststokers op school'},DISCOURAGE_IMITATION:{TITLE:"Ontmoedig imitatie",DESC:"Snelle reparatie van vandalisme, V-chips in TV's, Censureer details van modus operandi"},REMOVE_EXCUSES:"Verwijder excuses",SET_RULES:{TITLE:"Stel regels op",DESC:"Huurovereenkomsten, Intimidatiecodes, Hotelregistratie"},POST_INSTRUCTIONS:{TITLE:"Plaats instructies",DESC:'"Parkeren verboden", "Priv\xe9-eigendom", "Doof kampvuren"'},ALERT_CONSCIENCE:{TITLE:"Activeer geweten",DESC:'Snelheidsweergaveborden langs de weg, Handtekeningen voor douaneaangiften, "Winkeldiefstal is stelen"'},ASSIST_COMPLIANCE:{TITLE:"Help bij naleving",DESC:"Eenvoudige bibliotheekuitleen, Openbare toiletten, Afvalbakken"},CONTROL_DRUGS:{TITLE:"Beheers drugs en alcohol",DESC:"Ademanalysers in bars, Interventie programma's voor barpersoneel, Alcoholvrije evenementen"},EXPORT_TO_WORD:"Exporteer naar Word",INTRODUCTION:"Introductie",LOCATION:"Locatie",LOCATIONS:"Locaties",SEARCH:"Zoek...",SEARCH_TOOLTIP:"Type / om te zoeken",HITS:{0:"Geen resultaten gevonden",1:"1 resultaat gevonden",n:"{n} resultaten gevonden"}},nc=function(e){return ni("nl"===e?nu:nl,{debug:!0,array:!0,resolveAliases:!0,pluralize:nr.plural_EN,useKeyForMissingTranslation:!0})},nd=[],nh={defaultLocale:"en",currentLocale:"en",locales:{},init:function(e,t){return nf.apply(this,arguments)},addOnChangeListener:function(e){nd.push(e)},loadAndSetLocale:nm},np=nc(nh.currentLocale);function nf(){return(nf=ns(function(e,t){var n;return na(this,function(i){switch(i.label){case 0:return nh.locales=e,(n=Object.keys(e).filter(function(t){return e[t].default}).shift())&&(nh.defaultLocale=n||t),document.documentElement.setAttribute("lang",t),[4,nm(t)];case 1:return i.sent(),[2]}})})).apply(this,arguments)}function nm(e){return ng.apply(this,arguments)}function ng(){return(ng=ns(function(e){var t;return na(this,function(n){return nh.currentLocale===e?[2]:(t=function(e){return Object.keys(nh.locales).indexOf(e)>=0}(e)?e:nh.defaultLocale,nh.currentLocale=t,np=nc(e),nd.forEach(function(e){return e(nh.currentLocale,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nh.currentLocale;return nh.locales[e].dir||"ltr"}())}),[2])})})).apply(this,arguments)}let ny=[[/\r\n/g,"\n"],[/\n(#+)(.*)/g,(e,t,n="")=>{let i=t.length;return`${n.trim()}`}],[/!\[([^\[]+)\]\((?:javascript:)?([^\)]+)\)/g,'$1'],[/\[([^\[]+)\]\((?:javascript:)?([^\)]+)\)/g,'$1'],[/([^\\])(\*\*|__)(.*?(_|\*)?)\2/g,"$1$3"],[/([^\\])(\*|_)(.*?)\2/g,"$1$3"],[/\\_/g,"_"],[/\~\~(.*?)\~\~/g,"$1"],[/\:\"(.*?)\"\:/g,"$1"],[/\n\s*```\n([^]*?)\n\s*```\s*\n/g,"\n
    $1
    "],[/`(.*?)`/g,(e,t)=>`${(e=>{e=e.replace(/\&/g,"&");let t="'#<>`*-~_=:\"![]()nt",n=t.length;for(let i=0;i`&#${e.charCodeAt(0)};`);return e})(t)}`],[/\n(\*|\-|\+)(.*)/g,(e,t,n="")=>`
    • ${n.trim()}
    `],[/\n[0-9]+\.(.*)/g,(e,t="")=>`
    1. ${t.trim()}
    2. @@ -13,5 +13,5 @@ ${n}

      `}],[/\s?<\/ul>\s?'),this.$slides.each(function(t,e){var i=s('
    3. ');n.$indicators.append(i[0])}),this.$el.append(this.$indicators[0]),this.$indicators=this.$indicators.children(\"li.indicator-item\"))}},{key:\"_removeIndicators\",value:function(){this.$el.find(\"ul.indicators\").remove()}},{key:\"set\",value:function(t){var e=this;if(t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.activeIndex!=t){this.$active=this.$slides.eq(this.activeIndex);var i=this.$active.find(\".caption\");this.$active.removeClass(\"active\"),o({targets:this.$active[0],opacity:0,duration:this.options.duration,easing:\"easeOutQuad\",complete:function(){e.$slides.not(\".active\").each(function(t){o({targets:t,opacity:0,translateX:0,translateY:0,duration:0,easing:\"easeOutQuad\"})})}}),this._animateCaptionIn(i[0],this.options.duration),this.options.indicators&&(this.$indicators.eq(this.activeIndex).removeClass(\"active\"),this.$indicators.eq(t).addClass(\"active\")),o({targets:this.$slides.eq(t)[0],opacity:1,duration:this.options.duration,easing:\"easeOutQuad\"}),o({targets:this.$slides.eq(t).find(\".caption\")[0],opacity:1,translateX:0,translateY:0,duration:this.options.duration,delay:this.options.duration,easing:\"easeOutQuad\"}),this.$slides.eq(t).addClass(\"active\"),this.activeIndex=t,this.start()}}},{key:\"pause\",value:function(){clearInterval(this.interval)}},{key:\"start\",value:function(){clearInterval(this.interval),this.interval=setInterval(this._handleIntervalBound,this.options.duration+this.options.interval)}},{key:\"next\",value:function(){var t=this.activeIndex+1;t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.set(t)}},{key:\"prev\",value:function(){var t=this.activeIndex-1;t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.set(t)}}],[{key:\"init\",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),\"init\",this).call(this,this,t,e)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_Slider}},{key:\"defaults\",get:function(){return e}}]),n}();M.Slider=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"slider\",\"M_Slider\")}(cash,M.anime),function(n,s){n(document).on(\"click\",\".card\",function(t){if(n(this).children(\".card-reveal\").length){var i=n(t.target).closest(\".card\");void 0===i.data(\"initialOverflow\")&&i.data(\"initialOverflow\",void 0===i.css(\"overflow\")?\"\":i.css(\"overflow\"));var e=n(this).find(\".card-reveal\");n(t.target).is(n(\".card-reveal .card-title\"))||n(t.target).is(n(\".card-reveal .card-title i\"))?s({targets:e[0],translateY:0,duration:225,easing:\"easeInOutQuad\",complete:function(t){var e=t.animatables[0].target;n(e).css({display:\"none\"}),i.css(\"overflow\",i.data(\"initialOverflow\"))}}):(n(t.target).is(n(\".card .activator\"))||n(t.target).is(n(\".card .activator i\")))&&(i.css(\"overflow\",\"hidden\"),e.css({display:\"block\"}),s({targets:e[0],translateY:\"-100%\",duration:300,easing:\"easeInOutQuad\"}))}})}(cash,M.anime),function(h){\"use strict\";var e={data:[],placeholder:\"\",secondaryPlaceholder:\"\",autocompleteOptions:{},limit:1/0,onChipAdd:null,onChipSelect:null,onChipDelete:null},t=function(t){function l(t,e){_classCallCheck(this,l);var i=_possibleConstructorReturn(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,l,t,e));return(i.el.M_Chips=i).options=h.extend({},l.defaults,e),i.$el.addClass(\"chips input-field\"),i.chipsData=[],i.$chips=h(),i._setupInput(),i.hasAutocomplete=0\"),this.$el.append(this.$input)),this.$input.addClass(\"input\")}},{key:\"_setupLabel\",value:function(){this.$label=this.$el.find(\"label\"),this.$label.length&&this.$label.setAttribute(\"for\",this.$input.attr(\"id\"))}},{key:\"_setPlaceholder\",value:function(){void 0!==this.chipsData&&!this.chipsData.length&&this.options.placeholder?h(this.$input).prop(\"placeholder\",this.options.placeholder):(void 0===this.chipsData||this.chipsData.length)&&this.options.secondaryPlaceholder&&h(this.$input).prop(\"placeholder\",this.options.secondaryPlaceholder)}},{key:\"_isValid\",value:function(t){if(t.hasOwnProperty(\"tag\")&&\"\"!==t.tag){for(var e=!1,i=0;i=this.options.limit)){var e=this._renderChip(t);this.$chips.add(e),this.chipsData.push(t),h(this.$input).before(e),this._setPlaceholder(),\"function\"==typeof this.options.onChipAdd&&this.options.onChipAdd.call(this,this.$el,e)}}},{key:\"deleteChip\",value:function(t){var e=this.$chips.eq(t);this.$chips.eq(t).remove(),this.$chips=this.$chips.filter(function(t){return 0<=h(t).index()}),this.chipsData.splice(t,1),this._setPlaceholder(),\"function\"==typeof this.options.onChipDelete&&this.options.onChipDelete.call(this,this.$el,e[0])}},{key:\"selectChip\",value:function(t){var e=this.$chips.eq(t);(this._selectedChip=e)[0].focus(),\"function\"==typeof this.options.onChipSelect&&this.options.onChipSelect.call(this,this.$el,e[0])}}],[{key:\"init\",value:function(t,e){return _get(l.__proto__||Object.getPrototypeOf(l),\"init\",this).call(this,this,t,e)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_Chips}},{key:\"_handleChipsKeydown\",value:function(t){l._keydown=!0;var e=h(t.target).closest(\".chips\"),i=t.target&&e.length;if(!h(t.target).is(\"input, textarea\")&&i){var n=e[0].M_Chips;if(8===t.keyCode||46===t.keyCode){t.preventDefault();var s=n.chipsData.length;if(n._selectedChip){var o=n._selectedChip.index();n.deleteChip(o),n._selectedChip=null,s=Math.max(o-1,0)}n.chipsData.length&&n.selectChip(s)}else if(37===t.keyCode){if(n._selectedChip){var a=n._selectedChip.index()-1;if(a<0)return;n.selectChip(a)}}else if(39===t.keyCode&&n._selectedChip){var r=n._selectedChip.index()+1;r>=n.chipsData.length?n.$input[0].focus():n.selectChip(r)}}}},{key:\"_handleChipsKeyup\",value:function(t){l._keydown=!1}},{key:\"_handleChipsBlur\",value:function(t){l._keydown||(h(t.target).closest(\".chips\")[0].M_Chips._selectedChip=null)}},{key:\"defaults\",get:function(){return e}}]),l}();t._keydown=!1,M.Chips=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"chips\",\"M_Chips\"),h(document).ready(function(){h(document.body).on(\"click\",\".chip .close\",function(){var t=h(this).closest(\".chips\");t.length&&t[0].M_Chips||h(this).closest(\".chip\").remove()})})}(cash),function(s){\"use strict\";var e={top:0,bottom:1/0,offset:0,onPositionChange:null},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Pushpin=i).options=s.extend({},n.defaults,e),i.originalOffset=i.el.offsetTop,n._pushpins.push(i),i._setupEventHandlers(),i._updatePosition(),i}return _inherits(n,Component),_createClass(n,[{key:\"destroy\",value:function(){this.el.style.top=null,this._removePinClasses(),this._removeEventHandlers();var t=n._pushpins.indexOf(this);n._pushpins.splice(t,1)}},{key:\"_setupEventHandlers\",value:function(){document.addEventListener(\"scroll\",n._updateElements)}},{key:\"_removeEventHandlers\",value:function(){document.removeEventListener(\"scroll\",n._updateElements)}},{key:\"_updatePosition\",value:function(){var t=M.getDocumentScrollTop()+this.options.offset;this.options.top<=t&&this.options.bottom>=t&&!this.el.classList.contains(\"pinned\")&&(this._removePinClasses(),this.el.style.top=this.options.offset+\"px\",this.el.classList.add(\"pinned\"),\"function\"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,\"pinned\")),tthis.options.bottom&&!this.el.classList.contains(\"pin-bottom\")&&(this._removePinClasses(),this.el.classList.add(\"pin-bottom\"),this.el.style.top=this.options.bottom-this.originalOffset+\"px\",\"function\"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,\"pin-bottom\"))}},{key:\"_removePinClasses\",value:function(){this.el.classList.remove(\"pin-top\"),this.el.classList.remove(\"pinned\"),this.el.classList.remove(\"pin-bottom\")}}],[{key:\"init\",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),\"init\",this).call(this,this,t,e)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_Pushpin}},{key:\"_updateElements\",value:function(){for(var t in n._pushpins){n._pushpins[t]._updatePosition()}}},{key:\"defaults\",get:function(){return e}}]),n}();t._pushpins=[],M.Pushpin=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"pushpin\",\"M_Pushpin\")}(cash),function(r,s){\"use strict\";var e={direction:\"top\",hoverEnabled:!0,toolbarEnabled:!1};r.fn.reverse=[].reverse;var t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_FloatingActionButton=i).options=r.extend({},n.defaults,e),i.isOpen=!1,i.$anchor=i.$el.children(\"a\").first(),i.$menu=i.$el.children(\"ul\").first(),i.$floatingBtns=i.$el.find(\"ul .btn-floating\"),i.$floatingBtnsReverse=i.$el.find(\"ul .btn-floating\").reverse(),i.offsetY=0,i.offsetX=0,i.$el.addClass(\"direction-\"+i.options.direction),\"top\"===i.options.direction?i.offsetY=40:\"right\"===i.options.direction?i.offsetX=-40:\"bottom\"===i.options.direction?i.offsetY=-40:i.offsetX=40,i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:\"destroy\",value:function(){this._removeEventHandlers(),this.el.M_FloatingActionButton=void 0}},{key:\"_setupEventHandlers\",value:function(){this._handleFABClickBound=this._handleFABClick.bind(this),this._handleOpenBound=this.open.bind(this),this._handleCloseBound=this.close.bind(this),this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.addEventListener(\"mouseenter\",this._handleOpenBound),this.el.addEventListener(\"mouseleave\",this._handleCloseBound)):this.el.addEventListener(\"click\",this._handleFABClickBound)}},{key:\"_removeEventHandlers\",value:function(){this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.removeEventListener(\"mouseenter\",this._handleOpenBound),this.el.removeEventListener(\"mouseleave\",this._handleCloseBound)):this.el.removeEventListener(\"click\",this._handleFABClickBound)}},{key:\"_handleFABClick\",value:function(){this.isOpen?this.close():this.open()}},{key:\"_handleDocumentClick\",value:function(t){r(t.target).closest(this.$menu).length||this.close()}},{key:\"open\",value:function(){this.isOpen||(this.options.toolbarEnabled?this._animateInToolbar():this._animateInFAB(),this.isOpen=!0)}},{key:\"close\",value:function(){this.isOpen&&(this.options.toolbarEnabled?(window.removeEventListener(\"scroll\",this._handleCloseBound,!0),document.body.removeEventListener(\"click\",this._handleDocumentClickBound,!0),this._animateOutToolbar()):this._animateOutFAB(),this.isOpen=!1)}},{key:\"_animateInFAB\",value:function(){var e=this;this.$el.addClass(\"active\");var i=0;this.$floatingBtnsReverse.each(function(t){s({targets:t,opacity:1,scale:[.4,1],translateY:[e.offsetY,0],translateX:[e.offsetX,0],duration:275,delay:i,easing:\"easeInOutQuad\"}),i+=40})}},{key:\"_animateOutFAB\",value:function(){var e=this;this.$floatingBtnsReverse.each(function(t){s.remove(t),s({targets:t,opacity:0,scale:.4,translateY:e.offsetY,translateX:e.offsetX,duration:175,easing:\"easeOutQuad\",complete:function(){e.$el.removeClass(\"active\")}})})}},{key:\"_animateInToolbar\",value:function(){var t,e=this,i=window.innerWidth,n=window.innerHeight,s=this.el.getBoundingClientRect(),o=r('
      '),a=this.$anchor.css(\"background-color\");this.$anchor.append(o),this.offsetX=s.left-i/2+s.width/2,this.offsetY=n-s.bottom,t=i/o[0].clientWidth,this.btnBottom=s.bottom,this.btnLeft=s.left,this.btnWidth=s.width,this.$el.addClass(\"active\"),this.$el.css({\"text-align\":\"center\",width:\"100%\",bottom:0,left:0,transform:\"translateX(\"+this.offsetX+\"px)\",transition:\"none\"}),this.$anchor.css({transform:\"translateY(\"+-this.offsetY+\"px)\",transition:\"none\"}),o.css({\"background-color\":a}),setTimeout(function(){e.$el.css({transform:\"\",transition:\"transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s\"}),e.$anchor.css({overflow:\"visible\",transform:\"\",transition:\"transform .2s\"}),setTimeout(function(){e.$el.css({overflow:\"hidden\",\"background-color\":a}),o.css({transform:\"scale(\"+t+\")\",transition:\"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)\"}),e.$menu.children(\"li\").children(\"a\").css({opacity:1}),e._handleDocumentClickBound=e._handleDocumentClick.bind(e),window.addEventListener(\"scroll\",e._handleCloseBound,!0),document.body.addEventListener(\"click\",e._handleDocumentClickBound,!0)},100)},0)}},{key:\"_animateOutToolbar\",value:function(){var t=this,e=window.innerWidth,i=window.innerHeight,n=this.$el.find(\".fab-backdrop\"),s=this.$anchor.css(\"background-color\");this.offsetX=this.btnLeft-e/2+this.btnWidth/2,this.offsetY=i-this.btnBottom,this.$el.removeClass(\"active\"),this.$el.css({\"background-color\":\"transparent\",transition:\"none\"}),this.$anchor.css({transition:\"none\"}),n.css({transform:\"scale(0)\",\"background-color\":s}),this.$menu.children(\"li\").children(\"a\").css({opacity:\"\"}),setTimeout(function(){n.remove(),t.$el.css({\"text-align\":\"\",width:\"\",bottom:\"\",left:\"\",overflow:\"\",\"background-color\":\"\",transform:\"translate3d(\"+-t.offsetX+\"px,0,0)\"}),t.$anchor.css({overflow:\"\",transform:\"translate3d(0,\"+t.offsetY+\"px,0)\"}),setTimeout(function(){t.$el.css({transform:\"translate3d(0,0,0)\",transition:\"transform .2s\"}),t.$anchor.css({transform:\"translate3d(0,0,0)\",transition:\"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)\"})},20)},200)}}],[{key:\"init\",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),\"init\",this).call(this,this,t,e)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_FloatingActionButton}},{key:\"defaults\",get:function(){return e}}]),n}();M.FloatingActionButton=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"floatingActionButton\",\"M_FloatingActionButton\")}(cash,M.anime),function(g){\"use strict\";var e={autoClose:!1,format:\"mmm dd, yyyy\",parse:null,defaultDate:null,setDefaultDate:!1,disableWeekends:!1,disableDayFn:null,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,container:null,showClearBtn:!1,i18n:{cancel:\"Cancel\",clear:\"Clear\",done:\"Ok\",previousMonth:\"‹\",nextMonth:\"›\",months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthsShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],weekdays:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],weekdaysShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],weekdaysAbbrev:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"]},events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null},t=function(t){function B(t,e){_classCallCheck(this,B);var i=_possibleConstructorReturn(this,(B.__proto__||Object.getPrototypeOf(B)).call(this,B,t,e));(i.el.M_Datepicker=i).options=g.extend({},B.defaults,e),e&&e.hasOwnProperty(\"i18n\")&&\"object\"==typeof e.i18n&&(i.options.i18n=g.extend({},B.defaults.i18n,e.i18n)),i.options.minDate&&i.options.minDate.setHours(0,0,0,0),i.options.maxDate&&i.options.maxDate.setHours(0,0,0,0),i.id=M.guid(),i._setupVariables(),i._insertHTMLIntoDOM(),i._setupModal(),i._setupEventHandlers(),i.options.defaultDate||(i.options.defaultDate=new Date(Date.parse(i.el.value)));var n=i.options.defaultDate;return B._isDate(n)?i.options.setDefaultDate?(i.setDate(n,!0),i.setInputValue()):i.gotoDate(n):i.gotoDate(new Date),i.isOpen=!1,i}return _inherits(B,Component),_createClass(B,[{key:\"destroy\",value:function(){this._removeEventHandlers(),this.modal.destroy(),g(this.modalEl).remove(),this.destroySelects(),this.el.M_Datepicker=void 0}},{key:\"destroySelects\",value:function(){var t=this.calendarEl.querySelector(\".orig-select-year\");t&&M.FormSelect.getInstance(t).destroy();var e=this.calendarEl.querySelector(\".orig-select-month\");e&&M.FormSelect.getInstance(e).destroy()}},{key:\"_insertHTMLIntoDOM\",value:function(){this.options.showClearBtn&&(g(this.clearBtn).css({visibility:\"\"}),this.clearBtn.innerHTML=this.options.i18n.clear),this.doneBtn.innerHTML=this.options.i18n.done,this.cancelBtn.innerHTML=this.options.i18n.cancel,this.options.container?this.$modalEl.appendTo(this.options.container):this.$modalEl.insertBefore(this.el)}},{key:\"_setupModal\",value:function(){var t=this;this.modalEl.id=\"modal-\"+this.id,this.modal=M.Modal.init(this.modalEl,{onCloseEnd:function(){t.isOpen=!1}})}},{key:\"toString\",value:function(t){var e=this;return t=t||this.options.format,B._isDate(this.date)?t.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map(function(t){return e.formats[t]?e.formats[t]():t}).join(\"\"):\"\"}},{key:\"setDate\",value:function(t,e){if(!t)return this.date=null,this._renderDateDisplay(),this.draw();if(\"string\"==typeof t&&(t=new Date(Date.parse(t))),B._isDate(t)){var i=this.options.minDate,n=this.options.maxDate;B._isDate(i)&&tn.maxDate||n.disableWeekends&&B._isWeekend(y)||n.disableDayFn&&n.disableDayFn(y),isEmpty:C,isStartRange:x,isEndRange:L,isInRange:T,showDaysInNextAndPreviousMonths:n.showDaysInNextAndPreviousMonths};l.push(this.renderDay($)),7==++_&&(r.push(this.renderRow(l,n.isRTL,m)),_=0,m=!(l=[]))}return this.renderTable(n,r,i)}},{key:\"renderDay\",value:function(t){var e=[],i=\"false\";if(t.isEmpty){if(!t.showDaysInNextAndPreviousMonths)return'';e.push(\"is-outside-current-month\"),e.push(\"is-selection-disabled\")}return t.isDisabled&&e.push(\"is-disabled\"),t.isToday&&e.push(\"is-today\"),t.isSelected&&(e.push(\"is-selected\"),i=\"true\"),t.hasEvent&&e.push(\"has-event\"),t.isInRange&&e.push(\"is-inrange\"),t.isStartRange&&e.push(\"is-startrange\"),t.isEndRange&&e.push(\"is-endrange\"),'\"}},{key:\"renderRow\",value:function(t,e,i){return''+(e?t.reverse():t).join(\"\")+\"\"}},{key:\"renderTable\",value:function(t,e,i){return'
      '+this.renderHead(t)+this.renderBody(e)+\"
      \"}},{key:\"renderHead\",value:function(t){var e=void 0,i=[];for(e=0;e<7;e++)i.push(''+this.renderDayName(t,e,!0)+\"\");return\"\"+(t.isRTL?i.reverse():i).join(\"\")+\"\"}},{key:\"renderBody\",value:function(t){return\"\"+t.join(\"\")+\"\"}},{key:\"renderTitle\",value:function(t,e,i,n,s,o){var a,r,l=void 0,h=void 0,d=void 0,u=this.options,c=i===u.minYear,p=i===u.maxYear,v='
      ',f=!0,m=!0;for(d=[],l=0;l<12;l++)d.push('\");for(a='\",g.isArray(u.yearRange)?(l=u.yearRange[0],h=u.yearRange[1]+1):(l=i-u.yearRange,h=1+i+u.yearRange),d=[];l=u.minYear&&d.push('\");r='\";v+='',v+='
      ',u.showMonthAfterYear?v+=r+a:v+=a+r,v+=\"
      \",c&&(0===n||u.minMonth>=n)&&(f=!1),p&&(11===n||u.maxMonth<=n)&&(m=!1);return(v+='')+\"
      \"}},{key:\"draw\",value:function(t){if(this.isOpen||t){var e,i=this.options,n=i.minYear,s=i.maxYear,o=i.minMonth,a=i.maxMonth,r=\"\";this._y<=n&&(this._y=n,!isNaN(o)&&this._m=s&&(this._y=s,!isNaN(a)&&this._m>a&&(this._m=a)),e=\"datepicker-title-\"+Math.random().toString(36).replace(/[^a-z]+/g,\"\").substr(0,2);for(var l=0;l<1;l++)this._renderDateDisplay(),r+=this.renderTitle(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,e)+this.render(this.calendars[l].year,this.calendars[l].month,e);this.destroySelects(),this.calendarEl.innerHTML=r;var h=this.calendarEl.querySelector(\".orig-select-year\"),d=this.calendarEl.querySelector(\".orig-select-month\");M.FormSelect.init(h,{classes:\"select-year\",dropdownOptions:{container:document.body,constrainWidth:!1}}),M.FormSelect.init(d,{classes:\"select-month\",dropdownOptions:{container:document.body,constrainWidth:!1}}),h.addEventListener(\"change\",this._handleYearChange.bind(this)),d.addEventListener(\"change\",this._handleMonthChange.bind(this)),\"function\"==typeof this.options.onDraw&&this.options.onDraw(this)}}},{key:\"_setupEventHandlers\",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleInputChangeBound=this._handleInputChange.bind(this),this._handleCalendarClickBound=this._handleCalendarClick.bind(this),this._finishSelectionBound=this._finishSelection.bind(this),this._handleMonthChange=this._handleMonthChange.bind(this),this._closeBound=this.close.bind(this),this.el.addEventListener(\"click\",this._handleInputClickBound),this.el.addEventListener(\"keydown\",this._handleInputKeydownBound),this.el.addEventListener(\"change\",this._handleInputChangeBound),this.calendarEl.addEventListener(\"click\",this._handleCalendarClickBound),this.doneBtn.addEventListener(\"click\",this._finishSelectionBound),this.cancelBtn.addEventListener(\"click\",this._closeBound),this.options.showClearBtn&&(this._handleClearClickBound=this._handleClearClick.bind(this),this.clearBtn.addEventListener(\"click\",this._handleClearClickBound))}},{key:\"_setupVariables\",value:function(){var e=this;this.$modalEl=g(B._template),this.modalEl=this.$modalEl[0],this.calendarEl=this.modalEl.querySelector(\".datepicker-calendar\"),this.yearTextEl=this.modalEl.querySelector(\".year-text\"),this.dateTextEl=this.modalEl.querySelector(\".date-text\"),this.options.showClearBtn&&(this.clearBtn=this.modalEl.querySelector(\".datepicker-clear\")),this.doneBtn=this.modalEl.querySelector(\".datepicker-done\"),this.cancelBtn=this.modalEl.querySelector(\".datepicker-cancel\"),this.formats={d:function(){return e.date.getDate()},dd:function(){var t=e.date.getDate();return(t<10?\"0\":\"\")+t},ddd:function(){return e.options.i18n.weekdaysShort[e.date.getDay()]},dddd:function(){return e.options.i18n.weekdays[e.date.getDay()]},m:function(){return e.date.getMonth()+1},mm:function(){var t=e.date.getMonth()+1;return(t<10?\"0\":\"\")+t},mmm:function(){return e.options.i18n.monthsShort[e.date.getMonth()]},mmmm:function(){return e.options.i18n.months[e.date.getMonth()]},yy:function(){return(\"\"+e.date.getFullYear()).slice(2)},yyyy:function(){return e.date.getFullYear()}}}},{key:\"_removeEventHandlers\",value:function(){this.el.removeEventListener(\"click\",this._handleInputClickBound),this.el.removeEventListener(\"keydown\",this._handleInputKeydownBound),this.el.removeEventListener(\"change\",this._handleInputChangeBound),this.calendarEl.removeEventListener(\"click\",this._handleCalendarClickBound)}},{key:\"_handleInputClick\",value:function(){this.open()}},{key:\"_handleInputKeydown\",value:function(t){t.which===M.keys.ENTER&&(t.preventDefault(),this.open())}},{key:\"_handleCalendarClick\",value:function(t){if(this.isOpen){var e=g(t.target);e.hasClass(\"is-disabled\")||(!e.hasClass(\"datepicker-day-button\")||e.hasClass(\"is-empty\")||e.parent().hasClass(\"is-disabled\")?e.closest(\".month-prev\").length?this.prevMonth():e.closest(\".month-next\").length&&this.nextMonth():(this.setDate(new Date(t.target.getAttribute(\"data-year\"),t.target.getAttribute(\"data-month\"),t.target.getAttribute(\"data-day\"))),this.options.autoClose&&this._finishSelection()))}}},{key:\"_handleClearClick\",value:function(){this.date=null,this.setInputValue(),this.close()}},{key:\"_handleMonthChange\",value:function(t){this.gotoMonth(t.target.value)}},{key:\"_handleYearChange\",value:function(t){this.gotoYear(t.target.value)}},{key:\"gotoMonth\",value:function(t){isNaN(t)||(this.calendars[0].month=parseInt(t,10),this.adjustCalendars())}},{key:\"gotoYear\",value:function(t){isNaN(t)||(this.calendars[0].year=parseInt(t,10),this.adjustCalendars())}},{key:\"_handleInputChange\",value:function(t){var e=void 0;t.firedBy!==this&&(e=this.options.parse?this.options.parse(this.el.value,this.options.format):new Date(Date.parse(this.el.value)),B._isDate(e)&&this.setDate(e))}},{key:\"renderDayName\",value:function(t,e,i){for(e+=t.firstDay;7<=e;)e-=7;return i?t.i18n.weekdaysAbbrev[e]:t.i18n.weekdays[e]}},{key:\"_finishSelection\",value:function(){this.setInputValue(),this.close()}},{key:\"open\",value:function(){if(!this.isOpen)return this.isOpen=!0,\"function\"==typeof this.options.onOpen&&this.options.onOpen.call(this),this.draw(),this.modal.open(),this}},{key:\"close\",value:function(){if(this.isOpen)return this.isOpen=!1,\"function\"==typeof this.options.onClose&&this.options.onClose.call(this),this.modal.close(),this}}],[{key:\"init\",value:function(t,e){return _get(B.__proto__||Object.getPrototypeOf(B),\"init\",this).call(this,this,t,e)}},{key:\"_isDate\",value:function(t){return/Date/.test(Object.prototype.toString.call(t))&&!isNaN(t.getTime())}},{key:\"_isWeekend\",value:function(t){var e=t.getDay();return 0===e||6===e}},{key:\"_setToStartOfDay\",value:function(t){B._isDate(t)&&t.setHours(0,0,0,0)}},{key:\"_getDaysInMonth\",value:function(t,e){return[31,B._isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]}},{key:\"_isLeapYear\",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:\"_compareDates\",value:function(t,e){return t.getTime()===e.getTime()}},{key:\"_setToStartOfDay\",value:function(t){B._isDate(t)&&t.setHours(0,0,0,0)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_Datepicker}},{key:\"defaults\",get:function(){return e}}]),B}();t._template=['
      ','
      ','
      ','','',\"
      \",'
      ','
      ','
      ','','
      ','','',\"
      \",\"
      \",\"
      \",\"
      \",\"
      \"].join(\"\"),M.Datepicker=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"datepicker\",\"M_Datepicker\")}(cash),function(h){\"use strict\";var e={dialRadius:135,outerRadius:105,innerRadius:70,tickRadius:20,duration:350,container:null,defaultTime:\"now\",fromNow:0,showClearBtn:!1,i18n:{cancel:\"Cancel\",clear:\"Clear\",done:\"Ok\"},autoClose:!1,twelveHour:!0,vibrate:!0,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onSelect:null},t=function(t){function f(t,e){_classCallCheck(this,f);var i=_possibleConstructorReturn(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,f,t,e));return(i.el.M_Timepicker=i).options=h.extend({},f.defaults,e),i.id=M.guid(),i._insertHTMLIntoDOM(),i._setupModal(),i._setupVariables(),i._setupEventHandlers(),i._clockSetup(),i._pickerSetup(),i}return _inherits(f,Component),_createClass(f,[{key:\"destroy\",value:function(){this._removeEventHandlers(),this.modal.destroy(),h(this.modalEl).remove(),this.el.M_Timepicker=void 0}},{key:\"_setupEventHandlers\",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleClockClickStartBound=this._handleClockClickStart.bind(this),this._handleDocumentClickMoveBound=this._handleDocumentClickMove.bind(this),this._handleDocumentClickEndBound=this._handleDocumentClickEnd.bind(this),this.el.addEventListener(\"click\",this._handleInputClickBound),this.el.addEventListener(\"keydown\",this._handleInputKeydownBound),this.plate.addEventListener(\"mousedown\",this._handleClockClickStartBound),this.plate.addEventListener(\"touchstart\",this._handleClockClickStartBound),h(this.spanHours).on(\"click\",this.showView.bind(this,\"hours\")),h(this.spanMinutes).on(\"click\",this.showView.bind(this,\"minutes\"))}},{key:\"_removeEventHandlers\",value:function(){this.el.removeEventListener(\"click\",this._handleInputClickBound),this.el.removeEventListener(\"keydown\",this._handleInputKeydownBound)}},{key:\"_handleInputClick\",value:function(){this.open()}},{key:\"_handleInputKeydown\",value:function(t){t.which===M.keys.ENTER&&(t.preventDefault(),this.open())}},{key:\"_handleClockClickStart\",value:function(t){t.preventDefault();var e=this.plate.getBoundingClientRect(),i=e.left,n=e.top;this.x0=i+this.options.dialRadius,this.y0=n+this.options.dialRadius,this.moved=!1;var s=f._Pos(t);this.dx=s.x-this.x0,this.dy=s.y-this.y0,this.setHand(this.dx,this.dy,!1),document.addEventListener(\"mousemove\",this._handleDocumentClickMoveBound),document.addEventListener(\"touchmove\",this._handleDocumentClickMoveBound),document.addEventListener(\"mouseup\",this._handleDocumentClickEndBound),document.addEventListener(\"touchend\",this._handleDocumentClickEndBound)}},{key:\"_handleDocumentClickMove\",value:function(t){t.preventDefault();var e=f._Pos(t),i=e.x-this.x0,n=e.y-this.y0;this.moved=!0,this.setHand(i,n,!1,!0)}},{key:\"_handleDocumentClickEnd\",value:function(t){var e=this;t.preventDefault(),document.removeEventListener(\"mouseup\",this._handleDocumentClickEndBound),document.removeEventListener(\"touchend\",this._handleDocumentClickEndBound);var i=f._Pos(t),n=i.x-this.x0,s=i.y-this.y0;this.moved&&n===this.dx&&s===this.dy&&this.setHand(n,s),\"hours\"===this.currentView?this.showView(\"minutes\",this.options.duration/2):this.options.autoClose&&(h(this.minutesView).addClass(\"timepicker-dial-out\"),setTimeout(function(){e.done()},this.options.duration/2)),\"function\"==typeof this.options.onSelect&&this.options.onSelect.call(this,this.hours,this.minutes),document.removeEventListener(\"mousemove\",this._handleDocumentClickMoveBound),document.removeEventListener(\"touchmove\",this._handleDocumentClickMoveBound)}},{key:\"_insertHTMLIntoDOM\",value:function(){this.$modalEl=h(f._template),this.modalEl=this.$modalEl[0],this.modalEl.id=\"modal-\"+this.id;var t=document.querySelector(this.options.container);this.options.container&&t?this.$modalEl.appendTo(t):this.$modalEl.insertBefore(this.el)}},{key:\"_setupModal\",value:function(){var t=this;this.modal=M.Modal.init(this.modalEl,{onOpenStart:this.options.onOpenStart,onOpenEnd:this.options.onOpenEnd,onCloseStart:this.options.onCloseStart,onCloseEnd:function(){\"function\"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t),t.isOpen=!1}})}},{key:\"_setupVariables\",value:function(){this.currentView=\"hours\",this.vibrate=navigator.vibrate?\"vibrate\":navigator.webkitVibrate?\"webkitVibrate\":null,this._canvas=this.modalEl.querySelector(\".timepicker-canvas\"),this.plate=this.modalEl.querySelector(\".timepicker-plate\"),this.hoursView=this.modalEl.querySelector(\".timepicker-hours\"),this.minutesView=this.modalEl.querySelector(\".timepicker-minutes\"),this.spanHours=this.modalEl.querySelector(\".timepicker-span-hours\"),this.spanMinutes=this.modalEl.querySelector(\".timepicker-span-minutes\"),this.spanAmPm=this.modalEl.querySelector(\".timepicker-span-am-pm\"),this.footer=this.modalEl.querySelector(\".timepicker-footer\"),this.amOrPm=\"PM\"}},{key:\"_pickerSetup\",value:function(){var t=h('\").appendTo(this.footer).on(\"click\",this.clear.bind(this));this.options.showClearBtn&&t.css({visibility:\"\"});var e=h('
      ');h('\").appendTo(e).on(\"click\",this.close.bind(this)),h('\").appendTo(e).on(\"click\",this.done.bind(this)),e.appendTo(this.footer)}},{key:\"_clockSetup\",value:function(){this.options.twelveHour&&(this.$amBtn=h('
      AM
      '),this.$pmBtn=h('
      PM
      '),this.$amBtn.on(\"click\",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm),this.$pmBtn.on(\"click\",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm)),this._buildHoursView(),this._buildMinutesView(),this._buildSVGClock()}},{key:\"_buildSVGClock\",value:function(){var t=this.options.dialRadius,e=this.options.tickRadius,i=2*t,n=f._createSVGEl(\"svg\");n.setAttribute(\"class\",\"timepicker-svg\"),n.setAttribute(\"width\",i),n.setAttribute(\"height\",i);var s=f._createSVGEl(\"g\");s.setAttribute(\"transform\",\"translate(\"+t+\",\"+t+\")\");var o=f._createSVGEl(\"circle\");o.setAttribute(\"class\",\"timepicker-canvas-bearing\"),o.setAttribute(\"cx\",0),o.setAttribute(\"cy\",0),o.setAttribute(\"r\",4);var a=f._createSVGEl(\"line\");a.setAttribute(\"x1\",0),a.setAttribute(\"y1\",0);var r=f._createSVGEl(\"circle\");r.setAttribute(\"class\",\"timepicker-canvas-bg\"),r.setAttribute(\"r\",e),s.appendChild(a),s.appendChild(r),s.appendChild(o),n.appendChild(s),this._canvas.appendChild(n),this.hand=a,this.bg=r,this.bearing=o,this.g=s}},{key:\"_buildHoursView\",value:function(){var t=h('
      ');if(this.options.twelveHour)for(var e=1;e<13;e+=1){var i=t.clone(),n=e/6*Math.PI,s=this.options.outerRadius;i.css({left:this.options.dialRadius+Math.sin(n)*s-this.options.tickRadius+\"px\",top:this.options.dialRadius-Math.cos(n)*s-this.options.tickRadius+\"px\"}),i.html(0===e?\"00\":e),this.hoursView.appendChild(i[0])}else for(var o=0;o<24;o+=1){var a=t.clone(),r=o/6*Math.PI,l=0'),e=0;e<60;e+=5){var i=t.clone(),n=e/30*Math.PI;i.css({left:this.options.dialRadius+Math.sin(n)*this.options.outerRadius-this.options.tickRadius+\"px\",top:this.options.dialRadius-Math.cos(n)*this.options.outerRadius-this.options.tickRadius+\"px\"}),i.html(f._addLeadingZero(e)),this.minutesView.appendChild(i[0])}}},{key:\"_handleAmPmClick\",value:function(t){var e=h(t.target);this.amOrPm=e.hasClass(\"am-btn\")?\"AM\":\"PM\",this._updateAmPmView()}},{key:\"_updateAmPmView\",value:function(){this.options.twelveHour&&(this.$amBtn.toggleClass(\"text-primary\",\"AM\"===this.amOrPm),this.$pmBtn.toggleClass(\"text-primary\",\"PM\"===this.amOrPm))}},{key:\"_updateTimeFromInput\",value:function(){var t=((this.el.value||this.options.defaultTime||\"\")+\"\").split(\":\");if(this.options.twelveHour&&void 0!==t[1]&&(0','
      ','
      ','
      ','
      ','',\":\",'',\"
      \",'
      ','
      ',\"
      \",\"
      \",\"
      \",'
      ','
      ','
      ','
      ','
      ',\"
      \",'
      ',\"
      \",\"
      \",\"\"].join(\"\"),M.Timepicker=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"timepicker\",\"M_Timepicker\")}(cash),function(s){\"use strict\";var e={},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_CharacterCounter=i).options=s.extend({},n.defaults,e),i.isInvalid=!1,i.isValidLength=!1,i._setupCounter(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:\"destroy\",value:function(){this._removeEventHandlers(),this.el.CharacterCounter=void 0,this._removeCounter()}},{key:\"_setupEventHandlers\",value:function(){this._handleUpdateCounterBound=this.updateCounter.bind(this),this.el.addEventListener(\"focus\",this._handleUpdateCounterBound,!0),this.el.addEventListener(\"input\",this._handleUpdateCounterBound,!0)}},{key:\"_removeEventHandlers\",value:function(){this.el.removeEventListener(\"focus\",this._handleUpdateCounterBound,!0),this.el.removeEventListener(\"input\",this._handleUpdateCounterBound,!0)}},{key:\"_setupCounter\",value:function(){this.counterEl=document.createElement(\"span\"),s(this.counterEl).addClass(\"character-counter\").css({float:\"right\",\"font-size\":\"12px\",height:1}),this.$el.parent().append(this.counterEl)}},{key:\"_removeCounter\",value:function(){s(this.counterEl).remove()}},{key:\"updateCounter\",value:function(){var t=+this.$el.attr(\"data-length\"),e=this.el.value.length;this.isValidLength=e<=t;var i=e;t&&(i+=\"/\"+t,this._validateInput()),s(this.counterEl).html(i)}},{key:\"_validateInput\",value:function(){this.isValidLength&&this.isInvalid?(this.isInvalid=!1,this.$el.removeClass(\"invalid\")):this.isValidLength||this.isInvalid||(this.isInvalid=!0,this.$el.removeClass(\"valid\"),this.$el.addClass(\"invalid\"))}}],[{key:\"init\",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),\"init\",this).call(this,this,t,e)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_CharacterCounter}},{key:\"defaults\",get:function(){return e}}]),n}();M.CharacterCounter=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"characterCounter\",\"M_CharacterCounter\")}(cash),function(b){\"use strict\";var e={duration:200,dist:-100,shift:0,padding:0,numVisible:5,fullWidth:!1,indicators:!1,noWrap:!1,onCycleTo:null},t=function(t){function i(t,e){_classCallCheck(this,i);var n=_possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,i,t,e));return(n.el.M_Carousel=n).options=b.extend({},i.defaults,e),n.hasMultipleSlides=1'),n.$el.find(\".carousel-item\").each(function(t,e){if(n.images.push(t),n.showIndicators){var i=b('
    4. ');0===e&&i[0].classList.add(\"active\"),n.$indicators.append(i)}}),n.showIndicators&&n.$el.append(n.$indicators),n.count=n.images.length,n.options.numVisible=Math.min(n.count,n.options.numVisible),n.xform=\"transform\",[\"webkit\",\"Moz\",\"O\",\"ms\"].every(function(t){var e=t+\"Transform\";return void 0===document.body.style[e]||(n.xform=e,!1)}),n._setupEventHandlers(),n._scroll(n.offset),n}return _inherits(i,Component),_createClass(i,[{key:\"destroy\",value:function(){this._removeEventHandlers(),this.el.M_Carousel=void 0}},{key:\"_setupEventHandlers\",value:function(){var i=this;this._handleCarouselTapBound=this._handleCarouselTap.bind(this),this._handleCarouselDragBound=this._handleCarouselDrag.bind(this),this._handleCarouselReleaseBound=this._handleCarouselRelease.bind(this),this._handleCarouselClickBound=this._handleCarouselClick.bind(this),void 0!==window.ontouchstart&&(this.el.addEventListener(\"touchstart\",this._handleCarouselTapBound),this.el.addEventListener(\"touchmove\",this._handleCarouselDragBound),this.el.addEventListener(\"touchend\",this._handleCarouselReleaseBound)),this.el.addEventListener(\"mousedown\",this._handleCarouselTapBound),this.el.addEventListener(\"mousemove\",this._handleCarouselDragBound),this.el.addEventListener(\"mouseup\",this._handleCarouselReleaseBound),this.el.addEventListener(\"mouseleave\",this._handleCarouselReleaseBound),this.el.addEventListener(\"click\",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&(this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.$indicators.find(\".indicator-item\").each(function(t,e){t.addEventListener(\"click\",i._handleIndicatorClickBound)}));var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener(\"resize\",this._handleThrottledResizeBound)}},{key:\"_removeEventHandlers\",value:function(){var i=this;void 0!==window.ontouchstart&&(this.el.removeEventListener(\"touchstart\",this._handleCarouselTapBound),this.el.removeEventListener(\"touchmove\",this._handleCarouselDragBound),this.el.removeEventListener(\"touchend\",this._handleCarouselReleaseBound)),this.el.removeEventListener(\"mousedown\",this._handleCarouselTapBound),this.el.removeEventListener(\"mousemove\",this._handleCarouselDragBound),this.el.removeEventListener(\"mouseup\",this._handleCarouselReleaseBound),this.el.removeEventListener(\"mouseleave\",this._handleCarouselReleaseBound),this.el.removeEventListener(\"click\",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&this.$indicators.find(\".indicator-item\").each(function(t,e){t.removeEventListener(\"click\",i._handleIndicatorClickBound)}),window.removeEventListener(\"resize\",this._handleThrottledResizeBound)}},{key:\"_handleCarouselTap\",value:function(t){\"mousedown\"===t.type&&b(t.target).is(\"img\")&&t.preventDefault(),this.pressed=!0,this.dragged=!1,this.verticalDragged=!1,this.reference=this._xpos(t),this.referenceY=this._ypos(t),this.velocity=this.amplitude=0,this.frame=this.offset,this.timestamp=Date.now(),clearInterval(this.ticker),this.ticker=setInterval(this._trackBound,100)}},{key:\"_handleCarouselDrag\",value:function(t){var e=void 0,i=void 0,n=void 0;if(this.pressed)if(e=this._xpos(t),i=this._ypos(t),n=this.reference-e,Math.abs(this.referenceY-i)<30&&!this.verticalDragged)(2=this.dim*(this.count-1)?this.target=this.dim*(this.count-1):this.target<0&&(this.target=0)),this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound),this.dragged&&(t.preventDefault(),t.stopPropagation()),!1}},{key:\"_handleCarouselClick\",value:function(t){if(this.dragged)return t.preventDefault(),t.stopPropagation(),!1;if(!this.options.fullWidth){var e=b(t.target).closest(\".carousel-item\").index();0!==this._wrap(this.center)-e&&(t.preventDefault(),t.stopPropagation()),this._cycleTo(e)}}},{key:\"_handleIndicatorClick\",value:function(t){t.stopPropagation();var e=b(t.target).closest(\".indicator-item\");e.length&&this._cycleTo(e.index())}},{key:\"_handleResize\",value:function(t){this.options.fullWidth?(this.itemWidth=this.$el.find(\".carousel-item\").first().innerWidth(),this.imageHeight=this.$el.find(\".carousel-item.active\").height(),this.dim=2*this.itemWidth+this.options.padding,this.offset=2*this.center*this.itemWidth,this.target=this.offset,this._setCarouselHeight(!0)):this._scroll()}},{key:\"_setCarouselHeight\",value:function(t){var i=this,e=this.$el.find(\".carousel-item.active\").length?this.$el.find(\".carousel-item.active\").first():this.$el.find(\".carousel-item\").first(),n=e.find(\"img\").first();if(n.length)if(n[0].complete){var s=n.height();if(0=this.count?t%this.count:t<0?this._wrap(this.count+t%this.count):t}},{key:\"_track\",value:function(){var t,e,i,n;e=(t=Date.now())-this.timestamp,this.timestamp=t,i=this.offset-this.frame,this.frame=this.offset,n=1e3*i/(1+e),this.velocity=.8*n+.2*this.velocity}},{key:\"_autoScroll\",value:function(){var t=void 0,e=void 0;this.amplitude&&(t=Date.now()-this.timestamp,2<(e=this.amplitude*Math.exp(-t/this.options.duration))||e<-2?(this._scroll(this.target-e),requestAnimationFrame(this._autoScrollBound)):this._scroll(this.target))}},{key:\"_scroll\",value:function(t){var e=this;this.$el.hasClass(\"scrolling\")||this.el.classList.add(\"scrolling\"),null!=this.scrollingTimeout&&window.clearTimeout(this.scrollingTimeout),this.scrollingTimeout=window.setTimeout(function(){e.$el.removeClass(\"scrolling\")},this.options.duration);var i,n,s,o,a=void 0,r=void 0,l=void 0,h=void 0,d=void 0,u=void 0,c=this.center,p=1/this.options.numVisible;if(this.offset=\"number\"==typeof t?t:this.offset,this.center=Math.floor((this.offset+this.dim/2)/this.dim),o=-(s=(n=this.offset-this.center*this.dim)<0?1:-1)*n*2/this.dim,i=this.count>>1,this.options.fullWidth?(l=\"translateX(0)\",u=1):(l=\"translateX(\"+(this.el.clientWidth-this.itemWidth)/2+\"px) \",l+=\"translateY(\"+(this.el.clientHeight-this.itemHeight)/2+\"px)\",u=1-p*o),this.showIndicators){var v=this.center%this.count,f=this.$indicators.find(\".indicator-item.active\");f.index()!==v&&(f.removeClass(\"active\"),this.$indicators.find(\".indicator-item\").eq(v)[0].classList.add(\"active\"))}if(!this.noWrap||0<=this.center&&this.center=this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e)}},{key:\"prev\",value:function(t){(void 0===t||isNaN(t))&&(t=1);var e=this.center-t;if(e>=this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e)}},{key:\"set\",value:function(t,e){if((void 0===t||isNaN(t))&&(t=0),t>this.count||t<0){if(this.noWrap)return;t=this._wrap(t)}this._cycleTo(t,e)}}],[{key:\"init\",value:function(t,e){return _get(i.__proto__||Object.getPrototypeOf(i),\"init\",this).call(this,this,t,e)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_Carousel}},{key:\"defaults\",get:function(){return e}}]),i}();M.Carousel=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"carousel\",\"M_Carousel\")}(cash),function(S){\"use strict\";var e={onOpen:void 0,onClose:void 0},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_TapTarget=i).options=S.extend({},n.defaults,e),i.isOpen=!1,i.$origin=S(\"#\"+i.$el.attr(\"data-target\")),i._setup(),i._calculatePositioning(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:\"destroy\",value:function(){this._removeEventHandlers(),this.el.TapTarget=void 0}},{key:\"_setupEventHandlers\",value:function(){this._handleDocumentClickBound=this._handleDocumentClick.bind(this),this._handleTargetClickBound=this._handleTargetClick.bind(this),this._handleOriginClickBound=this._handleOriginClick.bind(this),this.el.addEventListener(\"click\",this._handleTargetClickBound),this.originEl.addEventListener(\"click\",this._handleOriginClickBound);var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener(\"resize\",this._handleThrottledResizeBound)}},{key:\"_removeEventHandlers\",value:function(){this.el.removeEventListener(\"click\",this._handleTargetClickBound),this.originEl.removeEventListener(\"click\",this._handleOriginClickBound),window.removeEventListener(\"resize\",this._handleThrottledResizeBound)}},{key:\"_handleTargetClick\",value:function(t){this.open()}},{key:\"_handleOriginClick\",value:function(t){this.close()}},{key:\"_handleResize\",value:function(t){this._calculatePositioning()}},{key:\"_handleDocumentClick\",value:function(t){S(t.target).closest(\".tap-target-wrapper\").length||(this.close(),t.preventDefault(),t.stopPropagation())}},{key:\"_setup\",value:function(){this.wrapper=this.$el.parent()[0],this.waveEl=S(this.wrapper).find(\".tap-target-wave\")[0],this.originEl=S(this.wrapper).find(\".tap-target-origin\")[0],this.contentEl=this.$el.find(\".tap-target-content\")[0],S(this.wrapper).hasClass(\".tap-target-wrapper\")||(this.wrapper=document.createElement(\"div\"),this.wrapper.classList.add(\"tap-target-wrapper\"),this.$el.before(S(this.wrapper)),this.wrapper.append(this.el)),this.contentEl||(this.contentEl=document.createElement(\"div\"),this.contentEl.classList.add(\"tap-target-content\"),this.$el.append(this.contentEl)),this.waveEl||(this.waveEl=document.createElement(\"div\"),this.waveEl.classList.add(\"tap-target-wave\"),this.originEl||(this.originEl=this.$origin.clone(!0,!0),this.originEl.addClass(\"tap-target-origin\"),this.originEl.removeAttr(\"id\"),this.originEl.removeAttr(\"style\"),this.originEl=this.originEl[0],this.waveEl.append(this.originEl)),this.wrapper.append(this.waveEl))}},{key:\"_calculatePositioning\",value:function(){var t=\"fixed\"===this.$origin.css(\"position\");if(!t)for(var e=this.$origin.parents(),i=0;i'+t.getAttribute(\"label\")+\"\")[0]),i.each(function(t){var e=n._appendOptionWithIcon(n.$el,t,\"optgroup-option\");n._addOptionToValueDict(t,e)})}}),this.$el.after(this.dropdownOptions),this.input=document.createElement(\"input\"),d(this.input).addClass(\"select-dropdown dropdown-trigger\"),this.input.setAttribute(\"type\",\"text\"),this.input.setAttribute(\"readonly\",\"true\"),this.input.setAttribute(\"data-target\",this.dropdownOptions.id),this.el.disabled&&d(this.input).prop(\"disabled\",\"true\"),this.$el.before(this.input),this._setValueToInput();var t=d('');if(this.$el.before(t[0]),!this.el.disabled){var e=d.extend({},this.options.dropdownOptions);e.onOpenEnd=function(t){var e=d(n.dropdownOptions).find(\".selected\").first();if(e.length&&(M.keyDown=!0,n.dropdown.focusedIndex=e.index(),n.dropdown._focusFocusedItem(),M.keyDown=!1,n.dropdown.isScrollable)){var i=e[0].getBoundingClientRect().top-n.dropdownOptions.getBoundingClientRect().top;i-=n.dropdownOptions.clientHeight/2,n.dropdownOptions.scrollTop=i}},this.isMultiple&&(e.closeOnClick=!1),this.dropdown=M.Dropdown.init(this.input,e)}this._setSelectedStates()}},{key:\"_addOptionToValueDict\",value:function(t,e){var i=Object.keys(this._valueDict).length,n=this.dropdownOptions.id+i,s={};e.id=n,s.el=t,s.optionEl=e,this._valueDict[n]=s}},{key:\"_removeDropdown\",value:function(){d(this.wrapper).find(\".caret\").remove(),d(this.input).remove(),d(this.dropdownOptions).remove(),d(this.wrapper).before(this.$el),d(this.wrapper).remove()}},{key:\"_appendOptionWithIcon\",value:function(t,e,i){var n=e.disabled?\"disabled \":\"\",s=\"optgroup-option\"===i?\"optgroup-option \":\"\",o=this.isMultiple?'\":e.innerHTML,a=d(\"
    5. \"),r=d(\"\");r.html(o),a.addClass(n+\" \"+s),a.append(r);var l=e.getAttribute(\"data-icon\");if(l){var h=d('\"\"');a.prepend(h)}return d(this.dropdownOptions).append(a[0]),a[0]}},{key:\"_toggleEntryFromArray\",value:function(t){var e=!this._keysSelected.hasOwnProperty(t),i=d(this._valueDict[t].optionEl);return e?this._keysSelected[t]=!0:delete this._keysSelected[t],i.toggleClass(\"selected\",e),i.find('input[type=\"checkbox\"]').prop(\"checked\",e),i.prop(\"selected\",e),e}},{key:\"_setValueToInput\",value:function(){var i=[];if(this.$el.find(\"option\").each(function(t){if(d(t).prop(\"selected\")){var e=d(t).text();i.push(e)}}),!i.length){var t=this.$el.find(\"option:disabled\").eq(0);t.length&&\"\"===t[0].value&&i.push(t.text())}this.input.value=i.join(\", \")}},{key:\"_setSelectedStates\",value:function(){for(var t in this._keysSelected={},this._valueDict){var e=this._valueDict[t],i=d(e.el).prop(\"selected\");d(e.optionEl).find('input[type=\"checkbox\"]').prop(\"checked\",i),i?(this._activateOption(d(this.dropdownOptions),d(e.optionEl)),this._keysSelected[t]=!0):d(e.optionEl).removeClass(\"selected\")}}},{key:\"_activateOption\",value:function(t,e){e&&(this.isMultiple||t.find(\"li.selected\").removeClass(\"selected\"),d(e).addClass(\"selected\"))}},{key:\"getSelectedValues\",value:function(){var t=[];for(var e in this._keysSelected)t.push(this._valueDict[e].el.value);return t}}],[{key:\"init\",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),\"init\",this).call(this,this,t,e)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_FormSelect}},{key:\"defaults\",get:function(){return e}}]),n}();M.FormSelect=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"formSelect\",\"M_FormSelect\")}(cash),function(s,e){\"use strict\";var i={},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Range=i).options=s.extend({},n.defaults,e),i._mousedown=!1,i._setupThumb(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:\"destroy\",value:function(){this._removeEventHandlers(),this._removeThumb(),this.el.M_Range=void 0}},{key:\"_setupEventHandlers\",value:function(){this._handleRangeChangeBound=this._handleRangeChange.bind(this),this._handleRangeMousedownTouchstartBound=this._handleRangeMousedownTouchstart.bind(this),this._handleRangeInputMousemoveTouchmoveBound=this._handleRangeInputMousemoveTouchmove.bind(this),this._handleRangeMouseupTouchendBound=this._handleRangeMouseupTouchend.bind(this),this._handleRangeBlurMouseoutTouchleaveBound=this._handleRangeBlurMouseoutTouchleave.bind(this),this.el.addEventListener(\"change\",this._handleRangeChangeBound),this.el.addEventListener(\"mousedown\",this._handleRangeMousedownTouchstartBound),this.el.addEventListener(\"touchstart\",this._handleRangeMousedownTouchstartBound),this.el.addEventListener(\"input\",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener(\"mousemove\",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener(\"touchmove\",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener(\"mouseup\",this._handleRangeMouseupTouchendBound),this.el.addEventListener(\"touchend\",this._handleRangeMouseupTouchendBound),this.el.addEventListener(\"blur\",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener(\"mouseout\",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener(\"touchleave\",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:\"_removeEventHandlers\",value:function(){this.el.removeEventListener(\"change\",this._handleRangeChangeBound),this.el.removeEventListener(\"mousedown\",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener(\"touchstart\",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener(\"input\",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener(\"mousemove\",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener(\"touchmove\",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener(\"mouseup\",this._handleRangeMouseupTouchendBound),this.el.removeEventListener(\"touchend\",this._handleRangeMouseupTouchendBound),this.el.removeEventListener(\"blur\",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener(\"mouseout\",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener(\"touchleave\",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:\"_handleRangeChange\",value:function(){s(this.value).html(this.$el.val()),s(this.thumb).hasClass(\"active\")||this._showRangeBubble();var t=this._calcRangeOffset();s(this.thumb).addClass(\"active\").css(\"left\",t+\"px\")}},{key:\"_handleRangeMousedownTouchstart\",value:function(t){if(s(this.value).html(this.$el.val()),this._mousedown=!0,this.$el.addClass(\"active\"),s(this.thumb).hasClass(\"active\")||this._showRangeBubble(),\"input\"!==t.type){var e=this._calcRangeOffset();s(this.thumb).addClass(\"active\").css(\"left\",e+\"px\")}}},{key:\"_handleRangeInputMousemoveTouchmove\",value:function(){if(this._mousedown){s(this.thumb).hasClass(\"active\")||this._showRangeBubble();var t=this._calcRangeOffset();s(this.thumb).addClass(\"active\").css(\"left\",t+\"px\"),s(this.value).html(this.$el.val())}}},{key:\"_handleRangeMouseupTouchend\",value:function(){this._mousedown=!1,this.$el.removeClass(\"active\")}},{key:\"_handleRangeBlurMouseoutTouchleave\",value:function(){if(!this._mousedown){var t=7+parseInt(this.$el.css(\"padding-left\"))+\"px\";s(this.thumb).hasClass(\"active\")&&(e.remove(this.thumb),e({targets:this.thumb,height:0,width:0,top:10,easing:\"easeOutQuad\",marginLeft:t,duration:100})),s(this.thumb).removeClass(\"active\")}}},{key:\"_setupThumb\",value:function(){this.thumb=document.createElement(\"span\"),this.value=document.createElement(\"span\"),s(this.thumb).addClass(\"thumb\"),s(this.value).addClass(\"value\"),s(this.thumb).append(this.value),this.$el.after(this.thumb)}},{key:\"_removeThumb\",value:function(){s(this.thumb).remove()}},{key:\"_showRangeBubble\",value:function(){var t=-7+parseInt(s(this.thumb).parent().css(\"padding-left\"))+\"px\";e.remove(this.thumb),e({targets:this.thumb,height:30,width:30,top:-30,marginLeft:t,duration:300,easing:\"easeOutQuint\"})}},{key:\"_calcRangeOffset\",value:function(){var t=this.$el.width()-15,e=parseFloat(this.$el.attr(\"max\"))||100,i=parseFloat(this.$el.attr(\"min\"))||0;return(parseFloat(this.$el.val())-i)/(e-i)*t}}],[{key:\"init\",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),\"init\",this).call(this,this,t,e)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_Range}},{key:\"defaults\",get:function(){return i}}]),n}();M.Range=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"range\",\"M_Range\"),t.init(s(\"input[type=range]\"))}(cash,M.anime);","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.meiosisSetup = void 0;\nvar setup_1 = require(\"./setup\");\nObject.defineProperty(exports, \"meiosisSetup\", { enumerable: true, get: function () { return setup_1.meiosisSetup; } });\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.meiosisSetup = void 0;\nconst simple_stream_1 = require(\"./simple-stream\");\nconst util_1 = require(\"./util\");\nconst mergerino_1 = __importDefault(require(\"mergerino\"));\nconst assoc = (prop, value, target) => {\n target[prop] = value;\n return target;\n};\nconst concatIfPresent = (target, source) => source ? target.concat(source) : target;\nconst assembleInitialState = (nestedComponents) => nestedComponents\n ? Object.keys(nestedComponents).reduce((result, key) => assoc(key, Object.assign({}, nestedComponents[key].initial, assembleInitialState(nestedComponents[key].nested)), result), {})\n : {};\nconst getInitialState = (app) => Object.assign({}, app.initial, assembleInitialState(app.nested));\nconst assembleView = (nestedComponents) => nestedComponents\n ? Object.keys(nestedComponents).reduce((result, key) => {\n const nestedApp = nestedComponents[key];\n if (nestedApp.view !== undefined) {\n const view = nestedApp.view;\n return assoc(key, {\n view: (cell, ...args) => view(cell.nest(key), ...args),\n nested: assembleView(nestedApp.nested)\n }, result);\n }\n return result;\n }, {})\n : {};\nconst getView = (app) => assembleView(app.nested);\nconst assembleServices = (nestedComponents, getCell = (cell) => cell, getState = (state) => state) => nestedComponents\n ? Object.keys(nestedComponents).reduce((result, key) => {\n var _a;\n const nextGetCell = (cell) => getCell(cell).nest(key);\n const nextGetState = (state) => getState(state)[key];\n const nestedApp = nestedComponents[key];\n return concatIfPresent(result, (_a = nestedApp.services) === null || _a === void 0 ? void 0 : _a.map((service) => ({\n onchange: (state) => (service.onchange ? service.onchange(nextGetState(state)) : state),\n run: (cell) => service.run(nextGetCell(cell))\n }))).concat(assembleServices(nestedApp.nested, nextGetCell, nextGetState));\n }, [])\n : [];\nconst getServices = (app) => concatIfPresent([], app.services).concat(assembleServices(app.nested));\nconst baseSetup = ({ stream, app }) => {\n if (!stream) {\n stream = simple_stream_1.simpleStream;\n }\n const safeApp = app || {};\n const initial = getInitialState(safeApp);\n const view = getView(safeApp);\n const createStream = typeof stream === 'function' ? stream : stream.stream;\n const scan = stream.scan;\n const update = createStream();\n const states = scan((state, patch) => (0, mergerino_1.default)(state, patch), initial, update);\n return {\n states,\n update,\n view\n };\n};\nconst nestPatch = (patch, prop) => ({ [prop]: patch });\nconst nestUpdate = (parentUpdate, prop) => (patch) => parentUpdate(nestPatch(patch, prop));\nconst nestCell = (states, parentUpdate, components) => (prop) => {\n const nestedStates = states.map((state) => state[prop]);\n const getNestedState = () => states()[prop];\n const nestedUpdate = nestUpdate(parentUpdate, prop);\n const nestedComponents = (0, util_1.get)(components, [prop, 'nested']);\n return {\n states: nestedStates,\n state: getNestedState(),\n getState: getNestedState,\n update: nestedUpdate,\n nest: nestCell(nestedStates, nestedUpdate, nestedComponents),\n nested: nestedComponents\n };\n};\n/**\n * Helper to setup the Meiosis pattern with [Mergerino](https://github.com/fuzetsu/mergerino).\n *\n * @template S the State type.\n *\n * @param config the Meiosis config for use with Mergerino\n *\n * @returns a stream of Meiosis cells.\n */\nconst meiosisSetup = (config) => {\n const stream = config === null || config === void 0 ? void 0 : config.stream;\n const app = config === null || config === void 0 ? void 0 : config.app;\n const { states, update, view } = baseSetup({\n stream,\n app\n });\n const nest = nestCell(states, update, view);\n const getState = () => states();\n const getCell = (state) => ({ states, state, getState, update, nest, nested: view });\n const dropRepeats = (0, simple_stream_1.createDropRepeats)(stream);\n if (app) {\n getServices(app).forEach((service) => {\n dropRepeats(states, service.onchange).map((state) => service.run(getCell(state)));\n });\n }\n const cells = dropRepeats(states).map(getCell);\n return cells;\n};\nexports.meiosisSetup = meiosisSetup;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dropRepeats = exports.createDropRepeats = exports.simpleStream = exports.scan = exports.stream = void 0;\n/**\n * Creates a stream.\n *\n * @template T the type of the stream's values.\n *\n * @param initial the stream's initial value.\n *\n * @returns the created stream.\n */\nconst stream = (initial) => {\n const mapFunctions = [];\n let latestValue = initial;\n const createdStream = function (value) {\n if (arguments.length > 0 && !createdStream.ended) {\n latestValue = value;\n for (const i in mapFunctions) {\n // credit @cmnstmntmn for discovering this bug.\n // Make sure to send the latest value.\n // Otherwise, if f1 triggers another update, f2 will be called with value2 and\n // then value1 (old value).\n mapFunctions[i](latestValue);\n }\n }\n return latestValue;\n };\n createdStream.map = (mapFunction) => {\n const newStream = (0, exports.stream)();\n const mappedFunction = (value) => {\n newStream(mapFunction(value));\n };\n mapFunctions.push(mappedFunction);\n newStream.end = (_value) => {\n const idx = mapFunctions.indexOf(mappedFunction);\n newStream.ended = true;\n mapFunctions.splice(idx, 1);\n };\n if (latestValue !== undefined) {\n newStream(mapFunction(latestValue));\n }\n return newStream;\n };\n createdStream.end = (_value) => {\n createdStream.ended = true;\n };\n return createdStream;\n};\nexports.stream = stream;\n/**\n * Creates a new stream that starts with the initial value and, for each value arriving onto the\n * source stream, emits the result of calling the accumulator function with the latest result and\n * the source stream value.\n */\nconst scan = (accumulator, initial, sourceStream) => {\n const newStream = (0, exports.stream)(initial);\n let accumulated = initial;\n sourceStream.map((value) => {\n accumulated = accumulator(accumulated, value);\n newStream(accumulated);\n });\n return newStream;\n};\nexports.scan = scan;\nexports.simpleStream = {\n stream: exports.stream,\n scan: exports.scan\n};\n/**\n * Credit: James Forbes (https://james-forbes.com/)\n *\n * Creates a `dropRepeats` function, which returns new stream that drops repeated values from the\n * source stream.\n *\n * @param stream the stream library, defaults to simpleStream.\n */\nconst createDropRepeats = (stream = exports.simpleStream) => \n/**\n * @param source the source stream.\n * @param onchange function that receives the current state of the source stream and returns the\n * value for which changes will emit onto the returned stream.\n * @returns a stream that does not emit repeated values.\n */\n(source, onchange = (state) => state) => {\n const createStream = typeof stream === 'function' ? stream : stream.stream;\n let prev = undefined;\n const result = createStream();\n source.map((state) => {\n const next = onchange(state);\n if (next !== prev) {\n prev = next;\n result(state);\n }\n });\n return result;\n};\nexports.createDropRepeats = createDropRepeats;\n/**\n * `dropRepeats` function that uses `simpleStream`.\n */\nexports.dropRepeats = (0, exports.createDropRepeats)();\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.updateFormFloatValue = exports.updateFormIntValue = exports.updateFormValue = exports.get = void 0;\n/**\n * Safely gets a property path from an object. The path is an array. If any property along the path\n * is `undefined`, the function returns `undefined`.\n *\n * @param object the object on which to get the property.\n * @param path the property path.\n *\n * @returns the property value, or `undefined` if any property along the path is `undefined`.\n */\nconst get = (object, path) => path.reduce((obj, key) => (obj == undefined ? undefined : obj[key]), object);\nexports.get = get;\nconst intoPath = (path, value) => ({\n [path[0]]: path.length === 1 ? value : intoPath(path.slice(1), value)\n});\nconst toPath = (pathOrProp) => Array.isArray(pathOrProp) ? pathOrProp : [pathOrProp];\nconst updateParseValue = (parseFn, cell, path) => (evt) => {\n const value = parseFn(evt.currentTarget.value);\n if (!isNaN(value)) {\n cell.update(intoPath(toPath(path), value));\n }\n};\n/**\n * Convenience function to update a form value. Pass the Meiosis cell and the state property (such\n * as `'firstName'`) or path (such as `['person', 'firstName']`) into which to update the value.\n * Returns a function that you can pass to a DOM handler, such as `oninput` (Mithril) or `onInput`\n * (Preact, React). For example:\n *\n * ```js\n * // Using Mithil\n * m('input[type=text]', { oninput: updateFormValue(cell, 'firstName') })\n *\n * // Using Preact/React\n * \n * ```\n *\n * @param cell the Meiosis cell.\n * @param path the property or path into which to update the value.\n * @param fn (optional) a function to modify the value before updating it.\n *\n * @returns a function that accepts a DOM event and updates the value on the Meiosis state.\n */\nconst updateFormValue = (cell, path, fn = (value) => value) => (evt) => cell.update(intoPath(toPath(path), fn(evt.currentTarget.value)));\nexports.updateFormValue = updateFormValue;\n/**\n * Convenience function to update a form value with an Integer value. If the user input does not\n * return a number with `parseInt`, no state change occurs. Pass the Meiosis cell and the state\n * property (such as `'counter'`) or path (such as `['book', 'counter']`) into which to update the\n * value. Returns a function that you can pass to a DOM handler, such as `oninput` (Mithril) or\n * `onInput` (Preact, React). For example:\n *\n * ```js\n * // Using Mithil\n * m('input[type=text]', { oninput: updateFormIntValue(cell, 'counter') })\n *\n * // Using Preact/React\n * \n * ```\n *\n * @param cell the Meiosis cell.\n * @param path the property or path into which to update the value.\n *\n * @returns a function that accepts a DOM event and updates the value on the Meiosis state.\n */\nconst updateFormIntValue = (cell, path) => (evt) => updateParseValue(parseInt, cell, path)(evt);\nexports.updateFormIntValue = updateFormIntValue;\n/**\n * Convenience function to update a form value with a Float value. If the user input does not return\n * a number with `parseFloat`, no state change occurs. Pass the Meiosis cell and the state property\n * (such as `'pH'`) or path (such as `['water', 'pH']`) into which to update the value. Returns a\n * function that you can pass to a DOM handler, such as `oninput` (Mithril) or `onInput` (Preact,\n * React). For example:\n *\n * ```js\n * // Using Mithil\n * m('input[type=text]', { oninput: updateFormFloatValue(cell, 'pH') })\n *\n * // Using Preact/React\n * \n * ```\n *\n * @param cell the Meiosis cell.\n * @param path the property or path into which to update the value.\n *\n * @returns a function that accepts a DOM event and updates the value on the Meiosis state.\n */\nconst updateFormFloatValue = (cell, path) => (evt) => updateParseValue(parseFloat, cell, path)(evt);\nexports.updateFormFloatValue = updateFormFloatValue;\n","const e=Object.assign||((e,t)=>(t&&Object.keys(t).forEach(o=>e[o]=t[o]),e)),t=(e,r,s)=>{const c=typeof s;if(s&&\"object\"===c)if(Array.isArray(s))for(const o of s)r=t(e,r,o);else for(const c of Object.keys(s)){const f=s[c];\"function\"==typeof f?r[c]=f(r[c],o):void 0===f?e&&!isNaN(c)?r.splice(c,1):delete r[c]:null===f||\"object\"!=typeof f||Array.isArray(f)?r[c]=f:\"object\"==typeof r[c]?r[c]=f===r[c]?f:o(r[c],f):r[c]=t(!1,{},f)}else\"function\"===c&&(r=s(r,o));return r},o=(o,...r)=>{const s=Array.isArray(o);return t(s,s?o.slice():e({},o),r)};export default o;\n//# sourceMappingURL=mergerino.min.js.map","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(render, schedule, console) {\n\tvar subscriptions = []\n\tvar pending = false\n\tvar offset = -1\n\n\tfunction sync() {\n\t\tfor (offset = 0; offset < subscriptions.length; offset += 2) {\n\t\t\ttry { render(subscriptions[offset], Vnode(subscriptions[offset + 1]), redraw) }\n\t\t\tcatch (e) { console.error(e) }\n\t\t}\n\t\toffset = -1\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 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\tif (index <= offset) offset -= 2\n\t\t\trender(root, [])\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(\"../util/assign\")\nvar censor = require(\"../util/censor\")\n\nvar sentinel = {}\n\nfunction decodeURIComponentSave(component) {\n\ttry {\n\t\treturn decodeURIComponent(component)\n\t} catch(e) {\n\t\treturn component\n\t}\n}\n\nmodule.exports = function($window, mountRedraw) {\n\tvar callAsync = $window == null\n\t\t// In case Mithril.js' loaded globally without the DOM, let's not break\n\t\t? null\n\t\t: typeof $window.setImmediate === \"function\" ? $window.setImmediate : $window.setTimeout\n\tvar p = Promise.resolve()\n\n\tvar scheduled = false\n\n\t// state === 0: init\n\t// state === 1: scheduled\n\t// state === 2: done\n\tvar ready = false\n\tvar state = 0\n\n\tvar compiled, fallbackRoute\n\n\tvar currentResolver = sentinel, component, attrs, currentPath, lastUpdate\n\n\tvar RouterRoot = {\n\t\tonbeforeupdate: function() {\n\t\t\tstate = state ? 2 : 1\n\t\t\treturn !(!state || sentinel === currentResolver)\n\t\t},\n\t\tonremove: function() {\n\t\t\t$window.removeEventListener(\"popstate\", fireAsync, false)\n\t\t\t$window.removeEventListener(\"hashchange\", resolveRoute, false)\n\t\t},\n\t\tview: function() {\n\t\t\tif (!state || sentinel === currentResolver) return\n\t\t\t// Wrap in a fragment to preserve existing key semantics\n\t\t\tvar vnode = [Vnode(component, attrs.key, attrs)]\n\t\t\tif (currentResolver) vnode = currentResolver.render(vnode[0])\n\t\t\treturn vnode\n\t\t},\n\t}\n\n\tvar SKIP = route.SKIP = {}\n\n\tfunction resolveRoute() {\n\t\tscheduled = false\n\t\t// Consider the pathname holistically. The prefix might even be invalid,\n\t\t// but that's not our problem.\n\t\tvar prefix = $window.location.hash\n\t\tif (route.prefix[0] !== \"#\") {\n\t\t\tprefix = $window.location.search + prefix\n\t\t\tif (route.prefix[0] !== \"?\") {\n\t\t\t\tprefix = $window.location.pathname + prefix\n\t\t\t\tif (prefix[0] !== \"/\") prefix = \"/\" + prefix\n\t\t\t}\n\t\t}\n\t\t// This seemingly useless `.concat()` speeds up the tests quite a bit,\n\t\t// since the representation is consistently a relatively poorly\n\t\t// optimized cons string.\n\t\tvar path = prefix.concat()\n\t\t\t.replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponentSave)\n\t\t\t.slice(route.prefix.length)\n\t\tvar data = parsePathname(path)\n\n\t\tassign(data.params, $window.history.state)\n\n\t\tfunction reject(e) {\n\t\t\tconsole.error(e)\n\t\t\tsetPath(fallbackRoute, null, {replace: true})\n\t\t}\n\n\t\tloop(0)\n\t\tfunction loop(i) {\n\t\t\t// state === 0: init\n\t\t\t// state === 1: scheduled\n\t\t\t// state === 2: done\n\t\t\tfor (; i < compiled.length; i++) {\n\t\t\t\tif (compiled[i].check(data)) {\n\t\t\t\t\tvar payload = compiled[i].component\n\t\t\t\t\tvar matchedRoute = compiled[i].route\n\t\t\t\t\tvar localComp = payload\n\t\t\t\t\tvar update = lastUpdate = function(comp) {\n\t\t\t\t\t\tif (update !== lastUpdate) return\n\t\t\t\t\t\tif (comp === SKIP) return loop(i + 1)\n\t\t\t\t\t\tcomponent = comp != null && (typeof comp.view === \"function\" || typeof comp === \"function\")? comp : \"div\"\n\t\t\t\t\t\tattrs = data.params, currentPath = path, lastUpdate = null\n\t\t\t\t\t\tcurrentResolver = payload.render ? payload : null\n\t\t\t\t\t\tif (state === 2) mountRedraw.redraw()\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tstate = 2\n\t\t\t\t\t\t\tmountRedraw.redraw.sync()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// There's no understating how much I *wish* I could\n\t\t\t\t\t// use `async`/`await` here...\n\t\t\t\t\tif (payload.view || typeof payload === \"function\") {\n\t\t\t\t\t\tpayload = {}\n\t\t\t\t\t\tupdate(localComp)\n\t\t\t\t\t}\n\t\t\t\t\telse if (payload.onmatch) {\n\t\t\t\t\t\tp.then(function () {\n\t\t\t\t\t\t\treturn payload.onmatch(data.params, path, matchedRoute)\n\t\t\t\t\t\t}).then(update, path === fallbackRoute ? null : reject)\n\t\t\t\t\t}\n\t\t\t\t\telse update(\"div\")\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (path === fallbackRoute) {\n\t\t\t\tthrow new Error(\"Could not resolve default route \" + fallbackRoute + \".\")\n\t\t\t}\n\t\t\tsetPath(fallbackRoute, null, {replace: true})\n\t\t}\n\t}\n\n\t// Set it unconditionally so `m.route.set` and `m.route.Link` both work,\n\t// even if neither `pushState` nor `hashchange` are supported. It's\n\t// cleared if `hashchange` is used, since that makes it automatically\n\t// async.\n\tfunction fireAsync() {\n\t\tif (!scheduled) {\n\t\t\tscheduled = true\n\t\t\t// TODO: just do `mountRedraw.redraw()` here and elide the timer\n\t\t\t// dependency. Note that this will muck with tests a *lot*, so it's\n\t\t\t// not as easy of a change as it sounds.\n\t\t\tcallAsync(resolveRoute)\n\t\t}\n\t}\n\n\tfunction setPath(path, data, options) {\n\t\tpath = buildPathname(path, data)\n\t\tif (ready) {\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\tfunction route(root, defaultRoute, routes) {\n\t\tif (!root) throw new TypeError(\"DOM element being rendered to does not exist.\")\n\n\t\tcompiled = 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\tfallbackRoute = defaultRoute\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\tif (typeof $window.history.pushState === \"function\") {\n\t\t\t$window.addEventListener(\"popstate\", fireAsync, false)\n\t\t} else if (route.prefix[0] === \"#\") {\n\t\t\t$window.addEventListener(\"hashchange\", resolveRoute, false)\n\t\t}\n\n\t\tready = true\n\t\tmountRedraw.mount(root, RouterRoot)\n\t\tresolveRoute()\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\t// Omit the used parameters from the rendered element - they are\n\t\t\t// internal. Also, censor the various lifecycle methods.\n\t\t\t//\n\t\t\t// We don't strip the other parameters because for convenience we\n\t\t\t// let them be specified in the selector as well.\n\t\t\tvar child = m(\n\t\t\t\tvnode.attrs.selector || \"a\",\n\t\t\t\tcensor(vnode.attrs, [\"options\", \"params\", \"selector\", \"onclick\"]),\n\t\t\t\tvnode.children\n\t\t\t)\n\t\t\tvar options, onclick, href\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 add `onclick` on a disabled link, use\n\t\t\t\t// an `oncreate` hook to add it.\n\t\t\t} else {\n\t\t\t\toptions = vnode.attrs.options\n\t\t\t\tonclick = vnode.attrs.onclick\n\t\t\t\t// Easier to build it now to keep it isomorphic.\n\t\t\t\thref = buildPathname(child.attrs.href, vnode.attrs.params)\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.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\")\nm.censor = require(\"./util/censor\")\n\nmodule.exports = m\n","\"use strict\"\n\nvar render = require(\"./render\")\n\nmodule.exports = require(\"./api/mount-redraw\")(render, typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : null, typeof console !== \"undefined\" ? console : null)\n","\"use strict\"\n\nvar buildQueryString = require(\"../querystring/build\")\nvar assign = require(\"../util/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 by either a '/', '-', or '.'.\")\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 with 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","/* global window */\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\nfunction decodeURIComponentSave(str) {\n\ttry {\n\t\treturn decodeURIComponent(str)\n\t} catch(err) {\n\t\treturn str\n\t}\n}\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 = decodeURIComponentSave(entry[0])\n\t\tvar value = entry.length === 2 ? decodeURIComponentSave(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\")(typeof window !== \"undefined\" ? window : null)\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\")\nvar hasOwn = require(\"../util/hasOwn\")\n\nvar selectorParser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[(.+?)(?:\\s*=\\s*(\"|'|)((?:\\\\[\"'\\]]|.)*?)\\5)?\\])/g\nvar selectorCache = {}\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 hasClass = hasOwn.call(attrs, \"class\")\n\tvar className = hasClass ? attrs.class : attrs.className\n\n\tvnode.tag = state.tag\n\tvnode.attrs = {}\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\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.js 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 = \"ij\"\n\t\t// console.log(div.innerHTML)\n\t\t// --> \"ij\", no 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 = \"\" + vnode.children + \"\"\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.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 (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}\n\t\tupdateAttrs(vnode, old.attrs, vnode.attrs, ns)\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tupdateNodes(element, old.children, vnode.children, hooks, null, ns)\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// subsequence\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 (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\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//\n\t\t// Also, the DOM does things to inputs based on the value, so it needs set first.\n\t\t// See: https://github.com/MithrilJS/mithril.js/issues/2622\n\t\tif (vnode.tag === \"input\" && attrs.type != null) vnode.dom.setAttribute(\"type\", attrs.type)\n\t\tvar isFileInput = attrs != null && vnode.tag === \"input\" && attrs.type === \"file\"\n\t\tfor (var key in attrs) {\n\t\t\tsetAttr(vnode, key, null, attrs[key], ns, isFileInput)\n\t\t}\n\t}\n\tfunction setAttr(vnode, key, old, value, ns, isFileInput) {\n\t\tif (key === \"key\" || key === \"is\" || value == null || isLifecycleMethod(key) || (old === value && !isFormAttribute(vnode, key)) && typeof value !== \"object\" || key === \"type\" && vnode.tag === \"input\") 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\t//setting input[type=file][value] to same value causes an error to be generated if it's non-empty\n\t\t\t\tif ((vnode.tag === \"input\" || vnode.tag === \"textarea\") && vnode.dom.value === \"\" + value && (isFileInput || 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//setting input[type=file][value] to different value is an error if it's non-empty\n\t\t\t\t// Not ideal, but it at least works around the most common source of uncaught exceptions for now.\n\t\t\t\tif (isFileInput && \"\" + value !== \"\") { console.error(\"`value` is read-only on file inputs!\"); return }\n\t\t\t\t/* eslint-enable no-implicit-coercion */\n\t\t\t}\n\t\t\tvnode.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\") 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 !== \"title\" // creates \"null\" as title\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 (old && old === attrs) {\n\t\t\tconsole.warn(\"Don't reuse attrs object, use new object for every redraw, this will throw in next major\")\n\t\t}\n\t\tif (attrs != null) {\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\t//\n\t\t\t// Also, the DOM does things to inputs based on the value, so it needs set first.\n\t\t\t// See: https://github.com/MithrilJS/mithril.js/issues/2622\n\t\t\tif (vnode.tag === \"input\" && attrs.type != null) vnode.dom.setAttribute(\"type\", attrs.type)\n\t\t\tvar isFileInput = vnode.tag === \"input\" && attrs.type === \"file\"\n\t\t\tfor (var key in attrs) {\n\t\t\t\tsetAttr(vnode, key, old && old[key], attrs[key], ns, isFileInput)\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\tvnode.events._ = currentRedraw\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\tvar currentDOM\n\n\treturn function(dom, vnodes, redraw) {\n\t\tif (!dom) throw new TypeError(\"DOM element being rendered to does not exist.\")\n\t\tif (currentDOM != null && dom.contains(currentDOM)) {\n\t\t\tthrow new TypeError(\"Node is currently being rendered to and thus is locked.\")\n\t\t}\n\t\tvar prevRedraw = currentRedraw\n\t\tvar prevDOM = currentDOM\n\t\tvar hooks = []\n\t\tvar active = activeElement()\n\t\tvar namespace = dom.namespaceURI\n\n\t\tcurrentDOM = dom\n\t\tcurrentRedraw = typeof redraw === \"function\" ? redraw : undefined\n\t\ttry {\n\t\t\t// First time rendering into a node clears it out\n\t\t\tif (dom.vnodes == null) dom.textContent = \"\"\n\t\t\tvnodes = Vnode.normalizeChildren(Array.isArray(vnodes) ? vnodes : [vnodes])\n\t\t\tupdateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === \"http://www.w3.org/1999/xhtml\" ? undefined : namespace)\n\t\t\tdom.vnodes = vnodes\n\t\t\t// `document.activeElement` can return null: https://html.spec.whatwg.org/multipage/interaction.html#dom-document-activeelement\n\t\t\tif (active != null && activeElement() !== active && typeof active.focus === \"function\") active.focus()\n\t\t\tfor (var i = 0; i < hooks.length; i++) hooks[i]()\n\t\t} finally {\n\t\t\tcurrentRedraw = prevRedraw\n\t\t\tcurrentDOM = prevDOM\n\t\t}\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(\n\t\t\t\t\tisKeyed && (input[i] != null || typeof input[i] === \"boolean\")\n\t\t\t\t\t\t? \"In fragments, vnodes must either all have keys or none have keys. You may wish to consider using an explicit keyed empty fragment, m.fragment({key: ...}), instead of a hole.\"\n\t\t\t\t\t\t: \"In fragments, vnodes must either all have keys or none have keys.\"\n\t\t\t\t)\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\")(typeof window !== \"undefined\" ? window : null, PromisePolyfill, mountRedraw.redraw)\n","\"use strict\"\n\nvar buildPathname = require(\"../pathname/build\")\nvar hasOwn = require(\"../util/hasOwn\")\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 (hasOwn.call(args.headers, key) && key.toLowerCase() === name) 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 || body instanceof $window.URLSearchParams)\n\t\t\tvar responseType = args.responseType || (typeof args.extract === \"function\" ? \"\" : \"json\")\n\n\t\t\tvar xhr = new $window.XMLHttpRequest(), aborted = false, isTimeout = 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\")) {\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\")) {\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 (hasOwn.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\") {\n\t\t\t\t\t\t\t\t// Handle no-content which will not parse.\n\t\t\t\t\t\t\t\ttry { response = JSON.parse(ev.target.responseText) }\n\t\t\t\t\t\t\t\tcatch (e) { response = null }\n\t\t\t\t\t\t\t}\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\tvar completeErrorResponse = function() {\n\t\t\t\t\t\t\t\ttry { message = ev.target.responseText }\n\t\t\t\t\t\t\t\tcatch (e) { message = response }\n\t\t\t\t\t\t\t\tvar error = new Error(message)\n\t\t\t\t\t\t\t\terror.code = ev.target.status\n\t\t\t\t\t\t\t\terror.response = response\n\t\t\t\t\t\t\t\treject(error)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (xhr.status === 0) {\n\t\t\t\t\t\t\t\t// Use setTimeout to push this code block onto the event queue\n\t\t\t\t\t\t\t\t// This allows `xhr.ontimeout` to run in the case that there is a timeout\n\t\t\t\t\t\t\t\t// Without this setTimeout, `xhr.ontimeout` doesn't have a chance to reject\n\t\t\t\t\t\t\t\t// as `xhr.onreadystatechange` will run before it\n\t\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\tif (isTimeout) return\n\t\t\t\t\t\t\t\t\tcompleteErrorResponse()\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t} else completeErrorResponse()\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\txhr.ontimeout = function (ev) {\n\t\t\t\tisTimeout = true\n\t\t\t\tvar error = new Error(\"Request timed out\")\n\t\t\t\terror.code = ev.target.status\n\t\t\t\treject(error)\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 || body instanceof $window.URLSearchParams) 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\")(typeof window !== \"undefined\" ? window : null, mountRedraw)\n","// This exists so I'm only saving it once.\n\"use strict\"\n\nvar hasOwn = require(\"./hasOwn\")\n\nmodule.exports = Object.assign || function(target, source) {\n\tfor (var key in source) {\n\t\tif (hasOwn.call(source, key)) target[key] = source[key]\n\t}\n}\n","\"use strict\"\n\n// Note: this is mildly perf-sensitive.\n//\n// It does *not* use `delete` - dynamic `delete`s usually cause objects to bail\n// out into dictionary mode and just generally cause a bunch of optimization\n// issues within engines.\n//\n// Ideally, I would've preferred to do this, if it weren't for the optimization\n// issues:\n//\n// ```js\n// const hasOwn = require(\"./hasOwn\")\n// const magic = [\n// \"key\", \"oninit\", \"oncreate\", \"onbeforeupdate\", \"onupdate\",\n// \"onbeforeremove\", \"onremove\",\n// ]\n// module.exports = (attrs, extras) => {\n// const result = Object.assign(Object.create(null), attrs)\n// for (const key of magic) delete result[key]\n// if (extras != null) for (const key of extras) delete result[key]\n// return result\n// }\n// ```\n\nvar hasOwn = require(\"./hasOwn\")\n// Words in RegExp literals are sometimes mangled incorrectly by the internal bundler, so use RegExp().\nvar magic = new RegExp(\"^(?:key|oninit|oncreate|onbeforeupdate|onupdate|onbeforeremove|onremove)$\")\n\nmodule.exports = function(attrs, extras) {\n\tvar result = {}\n\n\tif (extras != null) {\n\t\tfor (var key in attrs) {\n\t\t\tif (hasOwn.call(attrs, key) && !magic.test(key) && extras.indexOf(key) < 0) {\n\t\t\t\tresult[key] = attrs[key]\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (var key in attrs) {\n\t\t\tif (hasOwn.call(attrs, key) && !magic.test(key)) {\n\t\t\t\tresult[key] = attrs[key]\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result\n}\n","// This exists so I'm only saving it once.\n\"use strict\"\n\nmodule.exports = {}.hasOwnProperty\n","function none(n) {\n return 'n'\n}\nfunction p_ne_1(n) {\n return n !== 1 ? 'p' : 's'\n}\nfunction p_gt_1(n) {\n return n > 1 ? 'p' : 's'\n}\n\n// ---------------------------------------------------------------------------\n\nexports.plural_CS = function(n) {\n return n == 1 ? 's' : n >= 2 && n <= 4 ? 'p' : 'n'\n}\nexports.plural_DA = p_ne_1\nexports.plural_DE = p_ne_1\nexports.plural_EN = p_ne_1\nexports.plural_ES = p_ne_1\nexports.plural_FR = p_gt_1\nexports.plural_IS = function(n) {\n return n % 10 !== 1 || n % 100 === 11 ? 'p' : 's'\n}\nexports.plural_IT = p_ne_1\nexports.plural_JA = none\nexports.plural_PT = p_ne_1\nexports.plural_SE = p_ne_1\n","import { ComponentTypes } from 'mithril';\nimport { State } from '../services';\n\ntype IconResolver = string | (() => string);\n\nexport enum Pages {\n LANDING = 'LANDING',\n LOGIN = 'LOGIN',\n HOME = 'HOME',\n CRIME_SCRIPT = 'CRIME_SCRIPT',\n SETTINGS = 'SETTINGS',\n ABOUT = 'ABOUT',\n}\n\nexport type VisibilityResolver = (s: State) => boolean;\n\nexport interface Page {\n id: Pages;\n default?: boolean;\n hasNavBar?: boolean;\n title: string;\n icon?: IconResolver;\n iconClass?: string;\n route: string;\n visible: boolean | VisibilityResolver;\n component: ComponentTypes;\n sidebar?: ComponentTypes;\n hasSidebar?: boolean;\n}\n","import e from\"mithril\";const t=()=>\"idxxxxxxxx\".replace(/[x]/g,()=>(16*Math.random()|0).toString(16)),a=()=>\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return(\"x\"===e?t:3&t|8).toString(16)}),i=(...e)=>t=>e.reduceRight((e,t)=>t(e),t),l=e=>t=>Array.prototype.map.call(t,e),o=e=>t=>Array.prototype.join.call(t,e),n=e=>e.replace(/([A-Z])/g,e=>\"-\"+e.toLowerCase()),s=e=>e?i(o(\"\"),l(t=>`[${n(t)}=\"${((e=\"\")=>e.toString().replace(/\"/g,\""\"))(e[t])}\"]`),Object.keys)(e):\"\",r=[\"min\",\"max\",\"minLength\",\"maxLength\",\"rows\",\"cols\",\"placeholder\",\"autocomplete\",\"pattern\",\"readOnly\",\"step\"],c=e=>r.indexOf(e)>=0,d=({disabled:e})=>e?\"[disabled]\":\"\",p=({required:e,isMandatory:t})=>e||t?\"[required][aria-required=true]\":\"\",m=e=>(e=>{const t=(a=e,e=>void 0!==a[e]);var a;return Object.keys(e).filter(c).filter(t).reduce((t,a)=>{const i=e[a];return t.push(`[${a.toLowerCase()}=${i}]`),t},[]).join(\"\")})(e)+(e=>e.maxLength?`[data-length=${e.maxLength}]`:\"\")(e)+d(e)+p(e)+(({autofocus:e})=>\"boolean\"==typeof e&&e||e&&e()?\"[autofocus]\":\"\")(e),u=e=>!isNaN(parseFloat(e))&&isFinite(e),h=(...e)=>t=>e.reduce((e,t)=>t(e),t),v=(e,t=2,a=\"0\")=>(e+=\"\").length>=t?e:new Array(t-e.length+1).join(a)+e,b=(e,t,a)=>{const i=e[t];e[t]=e[a],e[a]=i},y=(e,t,a)=>{const i=e[t];e.splice(t,1),e.splice(a,0,i)};function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(l[a]=e[a]);return l}const x=[\"label\",\"id\",\"isMandatory\",\"isActive\"],w={view:({attrs:t})=>e(\"span.mandatory\",t,\"*\")},k=()=>({view:t=>{let{attrs:{label:a,id:i,isMandatory:l,isActive:o}}=t,n=f(t.attrs,x);return a?e(`label${o?\".active\":\"\"}${i?`[for=${i}]`:\"\"}`,n,[e.trust(a),l?e(w):void 0]):void 0}}),N=()=>({view:({attrs:{helperText:t,dataError:a,dataSuccess:i,className:l}})=>t||a||i?e(\"span.helper-text\",{className:l,dataError:a,dataSuccess:i},t?e.trust(t):\"\"):void 0}),$=()=>{const a={id:t()};return{view:({attrs:t})=>{const i=t.id||a.id,l=m(t),{label:o,helperText:n,initialValue:s,onchange:r,newRow:c,className:d=\"col s12\",style:p,iconName:u,isMandatory:h}=t;return e(\".input-field\"+(c?\".clear\":\"\"),{className:c?d+\" clear\":d,style:p},[u?e(\"i.material-icons.prefix\",u):\"\",e(`input.autocomplete[type=text][tabindex=0]${l}`,{id:i,oncreate:({dom:e})=>{M.Autocomplete.init(e,t)},onchange:r?e=>{e.target&&e.target.value&&r(e.target.value)}:void 0,value:s}),e(k,{label:o,id:i,isMandatory:h,isActive:s}),e(N,{helperText:n})])}}},C=[\"iconName\"],I=()=>({view:t=>{let{attrs:{iconName:a}}=t,i=f(t.attrs,C);return e(\"i.material-icons\",i,a)}}),A=[\"modalId\",\"tooltip\",\"tooltipPostion\",\"iconName\",\"iconClass\",\"label\",\"attr\"],T=(t,a=\"\")=>()=>{const i=`${t}${a}`;return{view:({attrs:t})=>{const{modalId:a,tooltip:l,tooltipPostion:o,iconName:n,iconClass:r,label:c,attr:d}=t,p=f(t,A);return e(`${i}${a?`.modal-trigger[href=#${a}]`:\"\"}${l?`.tooltipped[data-position=${o||\"top\"}][data-tooltip=${l}]`:\"\"}${s(d)}`,p,n?e(I,{iconName:n,className:r||\"left\"}):void 0,c||void 0)}}},V=T(\"a.waves-effect.waves-light.btn\",\"[type=button]\"),S=T(\"a.waves-effect.waves-light.btn-large\",\"[type=button]\"),O=T(\"a.waves-effect.waves-light.btn-small\",\"[type=button]\"),R=T(\"a.waves-effect.waves-teal.btn-flat\",\"[type=button]\"),j=T(\"button.btn-floating.btn-large.waves-effect.waves-light\",\"[type=button]\"),L=T(\"button.btn.waves-effect.waves-light\",\"[type=submit]\"),E=()=>({view:({attrs:{href:t,src:a}})=>e(\"a.carousel-item\",{href:t},e(`img[src=${a}]`))}),F=()=>({view:({attrs:t})=>{const{items:a}=t;return a&&a.length>0?e(\".carousel\",{oncreate:({dom:e})=>{M.Carousel.init(e,t)}},a.map(t=>e(E,t))):void 0}}),D=()=>({oncreate:({attrs:e,dom:t})=>{const{onchange:a,onChipAdd:i,onChipDelete:l}=e,o=M.Chips.getInstance(t.children[0]),n=i?i.bind(o):void 0;e.onChipAdd=function(e,t){a&&a(this.chipsData),n&&n(e,t)};const s=l?l.bind(o):void 0;e.onChipDelete=function(e,t){a&&a(this.chipsData),s&&s(e,t)},M.Chips.init(t.children[0],e)},onupdate:({dom:e,attrs:{data:t}})=>{if(!t||0===t.length)return;const a=M.Chips.getInstance(e.children[0]);t.forEach(e=>a.addChip(e))},view:({attrs:{placeholder:t,required:a,isMandatory:i=a,data:l,className:o=\"col s12\",label:n,helperText:s}})=>e(\".input-field\",{className:o},[e(`.chips.chips-autocomplete${t?\".chips-placeholder\":\"\"}${l?\".chips-initial\":\"\"}`),n?e(k,{label:n,isMandatory:i,className:\"active\"}):void 0,s?e(N,{helperText:s}):void 0])}),K=()=>({view:({attrs:t})=>{const{newRow:a,code:i,language:l}=t,o=l||\"lang-TypeScript\",n=o.replace(\"lang-\",\"\"),s=i instanceof Array?i.join(\"\\n\"):i;return e(\"pre.codeblock\"+(a?\".clear\":\"\"),t,[e(\"div\",e(\"label\",n)),e(`code.${o}`,s)])}}),_=()=>({view:({attrs:{header:t,body:a,active:i,iconName:l}})=>e(i?\"li.active\":\"li\",[t||l?e(\".collapsible-header\",[l?e(\"i.material-icons\",l):void 0,t?\"string\"==typeof t?e(\"span\",t):t:void 0]):void 0,a?e(\".collapsible-body\",a):void 0])}),B=()=>({oncreate:({dom:e,attrs:t})=>{M.Collapsible.init(e,t)},view:({attrs:t})=>{const{items:a,class:i,className:l,style:o,id:n}=t;return a&&a.length>0?e(\"ul.collapsible\",{class:i||l,style:o,id:n},a.map(t=>e(_,t))):void 0}}),q=[\"header\",\"items\",\"mode\"],P=[\"title\",\"active\",\"href\"],U=[\"items\",\"header\"],z=[\"items\",\"header\",\"mode\"];var H;!function(e){e[e.BASIC=0]=\"BASIC\",e[e.LINKS=1]=\"LINKS\",e[e.AVATAR=2]=\"AVATAR\"}(H||(H={}));const W=e=>e&&/https?:\\/\\//.test(e),Y=()=>({view:({attrs:t})=>{const{href:a,iconName:i=\"send\",onclick:l,style:o={cursor:\"pointer\"}}=t,n={href:a,style:o,className:\"secondary-content\",onclick:l?()=>l(t):void 0};return W(a)||!a?e(\"a[target=_]\",n,e(I,{iconName:i})):e(e.route.Link,n,e(I,{iconName:i}))}}),Z=(e=\"\")=>/\\./.test(e),G=()=>({view:({attrs:{item:t,mode:a}})=>{const{title:i,content:l=\"\",active:o,iconName:n,avatar:s,className:r,onclick:c}=t;return a===H.AVATAR?e(\"li.collection-item.avatar\"+(o?\".active\":\"\"),{onclick:c?()=>c(t):void 0},[Z(s)?e(\"img.circle\",{src:s}):e(\"i.material-icons.circle\",{className:r},s),e(\"span.title\",i),e(\"p\",e.trust(l)),e(Y,t)]):e(\"li.collection-item\"+(o?\".active\":\"\"),n?e(\"div\",[i,e(Y,t)]):i)}}),J=()=>({view:t=>{let{attrs:{header:a,items:i,mode:l=H.BASIC}}=t,o=f(t.attrs,q);const n=i.map(t=>e(G,{key:t.id,item:t,mode:l}));return a?e(\"ul.collection.with-header\",o,[e(\"li.collection-header\",e(\"h4\",a)),n]):e(\"ul.collection\",o,n)}}),Q=()=>({view:({attrs:{item:t}})=>{const{title:a,active:i,href:l}=t,o=g({},f(t,P),{className:\"collection-item \"+(i?\"active\":\"\"),href:l});return W(l)||!l?e(\"a[target=_]\",o,a):e(e.route.Link,o,a)}}),X=()=>({view:t=>{let{attrs:{items:a,header:i}}=t,l=f(t.attrs,U);return i?e(\".collection.with-header\",l,[e(\".collection-header\",e(\"h4\",i)),a.map(t=>e(Q,{key:t.id,item:t}))]):e(\".collection\",l,a.map(t=>e(Q,{key:t.id,item:t})))}}),ee=()=>({view:t=>{let{attrs:{items:a,header:i,mode:l=H.BASIC}}=t,o=f(t.attrs,z);return i||a&&a.length>0?l===H.LINKS?e(X,g({header:i,items:a},o)):e(J,g({header:i,items:a,mode:l},o)):void 0}}),te=[\"key\",\"label\",\"onchange\",\"disabled\",\"items\",\"iconName\",\"helperText\",\"style\",\"className\"],ae=()=>{const a={};return{oninit:({attrs:{id:e=t(),initialValue:i,checkedId:l}})=>{a.id=e,a.initialValue=i||l},view:t=>{let{attrs:{key:i,label:l,onchange:o,disabled:n=!1,items:s,iconName:r,helperText:c,style:d,className:p=\"col s12\"}}=t,m=f(t.attrs,te);const{id:u,initialValue:h}=a,v=h?s.filter(e=>e.id?e.id===h:e.label===h).shift():void 0,b=v?v.label:l||\"Select\";return e(\".input-field\",{className:p,key:i,style:d},[r?e(\"i.material-icons.prefix\",r):void 0,e(N,{helperText:c}),e(`a.dropdown-trigger.btn.truncate[href=#][data-target=${u}]${n?\"[disabled]\":\"\"}`,{className:\"col s12\",style:d||(r?\"margin: 0.2em 0 0 3em;\":void 0),oncreate:({dom:e})=>{M.Dropdown.init(e,m)}},b),e(`ul.dropdown-content[id=${u}]`,s.map(t=>e(\"li\"+(t.divider?\".divider[tabindex=-1]\":\"\"),t.divider?void 0:e(\"a\",{onclick:o?()=>{a.initialValue=t.id||t.label,o(a.initialValue)}:void 0},[t.iconName?e(\"i.material-icons\",t.iconName):void 0,t.label]))))])}}},ie=[\"className\",\"iconName\",\"iconClass\",\"position\",\"style\",\"buttons\"],le=()=>({view:t=>{let{attrs:{className:a,iconName:i,iconClass:l=\"large\",position:o,style:n=(\"left\"===o||\"inline-left\"===o?\"position: absolute; display: inline-block; left: 24px;\":\"right\"===o||\"inline-right\"===o?\"position: absolute; display: inline-block; right: 24px;\":void 0),buttons:s}}=t,r=f(t.attrs,ie);const c=e(\".fixed-action-btn\",{style:n,oncreate:({dom:e})=>M.FloatingActionButton.init(e,r)},[e(\"a.btn-floating.btn-large\",{className:a},e(\"i.material-icons\",{classNames:l},i)),s?e(\"ul\",s.map(t=>e(\"li\",e(\"a.btn-floating\",{className:t.className,onclick:e=>t.onClick&&t.onClick(e)},e(\"i.material-icons\",{className:t.iconClass},t.iconName))))):void 0]);return\"inline-right\"===o||\"inline-left\"===o?e(\"div\",{style:\"position: relative; height: 70px;\"},c):c}}),oe=[\"className\",\"helperText\",\"iconName\",\"id\",\"initialValue\",\"isMandatory\",\"label\",\"onchange\",\"onkeydown\",\"onkeypress\",\"onkeyup\",\"onblur\",\"style\"],ne=[\"className\",\"dataError\",\"dataSuccess\",\"helperText\",\"iconName\",\"id\",\"initialValue\",\"isMandatory\",\"label\",\"maxLength\",\"newRow\",\"onchange\",\"onkeydown\",\"onkeypress\",\"onkeyup\",\"onblur\",\"style\",\"validate\"],se=()=>{const a={id:t()};return{view:({attrs:t})=>{const{className:i=\"col s12\",helperText:l,iconName:o,id:n=a.id,initialValue:s,isMandatory:r,label:c,onchange:d,onkeydown:p,onkeypress:u,onkeyup:h,onblur:v,style:b}=t,y=f(t,oe),g=m(y);return e(\".input-field\",{className:i,style:b},[o?e(\"i.material-icons.prefix\",o):\"\",e(`textarea.materialize-textarea[tabindex=0][id=${n}]${g}`,{oncreate:({dom:e})=>{M.textareaAutoResize(e),t.maxLength&&M.CharacterCounter.init(e)},onchange:d?e=>{const t=e.target;d(t&&\"string\"==typeof t.value?t.value:\"\")}:void 0,value:s,onkeyup:h?e=>{h(e,e.target.value)}:void 0,onkeydown:p?e=>{p(e,e.target.value)}:void 0,onkeypress:u?e=>{u(e,e.target.value)}:void 0,onblur:v}),e(k,{label:c,id:n,isMandatory:r,isActive:s||t.placeholder}),e(N,{helperText:l})])}}},re=(a,i=\"\")=>()=>{const l={id:t()},o=e=>{const t=e.value;return!t||\"number\"!==a&&\"range\"!==a?t:+t},n=(e,t)=>{e.setCustomValidity(\"boolean\"==typeof t?t?\"\":\"Custom validation failed\":t)};return{view:({attrs:t})=>{const{className:s=\"col s12\",dataError:r,dataSuccess:c,helperText:d,iconName:p,id:u=l.id,initialValue:h,isMandatory:v,label:b,maxLength:y,newRow:g,onchange:x,onkeydown:w,onkeypress:$,onkeyup:C,onblur:I,style:A,validate:T}=t,V=f(t,ne),S=m(V);return e(`.input-field${g?\".clear\":\"\"}${i}`,{className:s,style:A},[p?e(\"i.material-icons.prefix\",p):void 0,e(`input.validate[type=${a}][tabindex=0][id=${u}]${S}`,{oncreate:({dom:e})=>{(({autofocus:e})=>!!e&&(\"boolean\"==typeof e?e:e()))(t)&&e.focus(),y&&M.CharacterCounter.init(e),\"range\"===a&&M.Range.init(e)},onkeyup:C?e=>{C(e,o(e.target))}:void 0,onkeydown:w?e=>{w(e,o(e.target))}:void 0,onkeypress:$?e=>{$(e,o(e.target))}:void 0,onblur:I,onupdate:T?({dom:e})=>{const t=e;n(t,T(o(t),t))}:void 0,onchange:e=>{const t=e.target;if(t){const e=o(t);x&&x(e),T&&n(t,T(e,t))}},value:h}),e(k,{label:b,id:u,isMandatory:v,isActive:!(void 0===h&&!t.placeholder&&\"number\"!==a&&\"color\"!==a&&\"range\"!==a)}),e(N,{helperText:d,dataError:r,dataSuccess:c})])}}},ce=re(\"text\"),de=re(\"password\"),pe=re(\"number\"),me=re(\"url\"),ue=re(\"color\"),he=re(\"range\",\".range-field\"),ve=re(\"email\"),be=()=>{let t,a=!1;return{view:({attrs:i})=>{const{multiple:l,disabled:o,initialValue:n,placeholder:s,onchange:r,className:c=\"col s12\",accept:d,label:p=\"File\"}=i,m=d?d instanceof Array?d.join(\", \"):d:void 0,u=m?`[accept=${m}]`:\"\",h=l?\"[multiple]\":\"\",v=o?\"[disabled]\":\"\",b=s?`[placeholder=${s}]`:\"\";return e(\".file-field.input-field\",{className:i.class||c},[e(\".btn\",[e(\"span\",p),e(`input[type=file]${h}${v}${u}`,{onchange:r?e=>{const t=e.target;t&&t.files&&r&&(a=!0,r(t.files))}:void 0})]),e(\".file-path-wrapper\",e(`input.file-path.validate${b}[type=text]`,{oncreate:({dom:e})=>{t=e,n&&(t.value=n)}})),(a||n)&&e(\"a.waves-effect.waves-teal.btn-flat\",{style:\"float: right;position: relative;top: -3rem; padding: 0\",onclick:()=>{a=!1,t.value=\"\",r&&r({})}},e(\"i.material-icons\",\"clear\"))])}}},ye=()=>({view:({attrs:{className:t=\"col s12\",onchange:a,label:i,checked:l,disabled:o,description:n}})=>e(\"div\",{className:t},e(\"label\",[e(\"input[type=checkbox][tabindex=0]\",{checked:l,disabled:o,onclick:a?e=>{e.target&&void 0!==e.target.checked&&a(e.target.checked)}:void 0}),i?\"string\"==typeof i?e(\"span\",i):i:void 0]),n&&e(N,{className:\"input-checkbox-desc\",helperText:n}))}),ge=()=>{const t={},a=e=>t.checkedIds.indexOf(e)>=0;return{oninit:({attrs:{initialValue:e,checkedId:a}})=>{const i=a||e;t.checkedId=a,t.checkedIds=i?i instanceof Array?[...i]:[i]:[]},view:({attrs:{label:i,id:l,options:o,checkedId:n,description:s,className:r=\"col s12\",disabled:c,checkboxClass:d,newRow:p,isMandatory:m,onchange:u}})=>{n&&t.checkedId!==n&&(t.checkedId=n,t.checkedIds=n instanceof Array?n:[n]);const h=u?(e,a)=>{const i=t.checkedIds.filter(t=>t!==e);a&&i.push(e),t.checkedIds=i,u(i)}:void 0;return e(\"div\"+(p?\".clear\":\"\"),{className:r},[e(\"div\",{className:\"input-field options\"},e(k,{id:l,label:i,isMandatory:m})),e(N,{helperText:s}),...o.map(t=>e(ye,{disabled:c||t.disabled,label:t.label,onchange:h?e=>h(t.id,e):void 0,className:t.className||d,checked:a(t.id),description:t.description}))])}}},fe=()=>{const a=e=>i.curKey=i.id=e,i={elementId:t(),id:\"\",curKey:\"\",kvc:(t,a,i)=>{const{keyClass:l=\".col.s4\",valueClass:o=\".col.s8\"}=i,n=a instanceof Array?a.join(\", \"):\"boolean\"==typeof a?e(ye,{label:\" \",checked:a,disabled:!0,className:\"checkbox-in-collection\"}):a.toString();return{title:e(\".row\",{style:\"margin-bottom: 0\"},[e(l,e(\"b\",t)),e(o,n)])}}},l=()=>{i.id=\"\",i.curKey=\"\"};return{oninit:({attrs:{keyValueConverter:e,id:t}})=>{e&&(i.kvc=e),t&&(i.elementId=t)},view:({attrs:{className:t=\"col s12\",disabled:o,disallowArrays:n,header:s,iconName:r,iconNameKey:c=(r?\"label\":void 0),isMandatory:d,label:p,labelKey:m=\"Key\",labelValue:u=\"Value\",properties:h,keyClass:v,valueClass:b,onchange:y,falsy:g=[\"false\"],truthy:f=[\"true\"]}})=>{const x=()=>y?y(h):void 0,w=((e,t)=>Object.keys(e).map(t=>({key:t,value:e[t]})).map(e=>((e,t)=>{const l=t.onclick;return t.id=t.id||e,t.active=e===i.curKey,t.onclick=l?()=>a(e)&&l(t):()=>a(e),t})(e.key,i.kvc(e.key,e.value,{keyClass:t.keyClass,valueClass:t.valueClass}))))(h,{keyClass:v,valueClass:b}),N=i.curKey,$=h[N],M=\"boolean\"==typeof $||\"number\"==typeof $?$:$?$ instanceof Array?`[${$.join(\", \")}]`:$:\"\",C=i.elementId;return[e(\".map-editor\",e(\".input-field\",{className:t,style:\"min-height: 1.5em;\"},[r?e(\"i.material-icons.prefix\",r):\"\",e(k,{label:p,isMandatory:d,isActive:w.length>0}),e(ee,{id:C,items:w,mode:H.LINKS,header:s})])),o?void 0:[e(ce,{label:m,iconName:c,className:\"col s5\",initialValue:N,onchange:e=>{i.curKey=e,i.id&&(delete h[i.id],h[e]=$,i.id=e),x()}}),\"string\"==typeof M?e(se,{label:u,initialValue:M,className:\"col s7\",onchange:e=>{const t=(i=g,f.indexOf(a=e)>=0||!(i.indexOf(a)>=0)&&void 0);var a,i;const l=void 0===t&&/^\\s*\\d+\\s*$/i.test(e)?+e:void 0;h[N]=\"boolean\"==typeof t?t:\"number\"==typeof l?l:((e,t=!1)=>{if(t)return e;if(!e)return;const a=/\\s*\\[(.*)\\]\\s*/gi.exec(e);return a&&2===a.length?a[1].split(\",\").map(e=>e.trim()).map(e=>/^\\d+$/g.test(e)?+e:e):void 0})(e,n)||e,x()}}):\"number\"==typeof M?e(pe,{label:u,initialValue:M,className:\"col s7\",onchange:e=>{h[N]=e,x()}}):e(ye,{label:u,checked:M,className:\"input-field col s7\",onchange:e=>{h[N]=e,x()}}),e(\".col.s12.right-align\",[e(R,{iconName:\"add\",onclick:l}),e(R,{iconName:\"delete\",disabled:!N,onclick:()=>{delete h[N],l(),x()}})])]]}}},xe=()=>({oncreate:({dom:e,attrs:t})=>{M.Materialbox.init(e,t)},view:({attrs:t})=>{const{src:a,width:i,height:l}=t;return e(`img.materialboxed[src=${a}]${i?`[width=${i}]`:\"\"}${l?`[height=${l}]`:\"\"}`,t)}}),we=()=>({oncreate:({dom:e,attrs:{options:t,onCreate:a}})=>{const i=M.Modal.init(e,t);a&&a(i)},view:({attrs:{id:t,title:a,description:i,fixedFooter:l,bottomSheet:o,buttons:n,richContent:s}})=>e(`.modal${l?\".modal-fixed-footer\":\"\"}${o?\".bottom-sheet\":\"\"}[id=${t}]`,[e(\".modal-content\",[e(\"h4\",a),s&&\"string\"==typeof i?e.trust(i||\"\"):\"string\"==typeof i?e(\"p\",i):i]),n?e(\".modal-footer\",n.map(t=>e(R,g({},t,{className:\"modal-close\"})))):void 0])}),ke=()=>({view:({attrs:{title:t,href:a,active:i,disabled:l}})=>e(\"li\",{className:i?\"active\":l?\"disabled\":\"waves-effect\"},\"number\"==typeof t?e(e.route.Link,{href:a},t):t)}),Ne=()=>{const t={pagIndex:0};return{view:({attrs:{items:a,curPage:i=1,size:l=Math.min(9,a.length)}})=>{const{pagIndex:o}=t,n=o*l,s=n+l,r=o>0,c=sr&&t.pagIndex--},e(\"i.material-icons\",\"chevron_left\")),disabled:!r},...a.filter((e,t)=>n<=t&&tc&&t.pagIndex++},e(\"i.material-icons\",\"chevron_right\")),disabled:!c}];return e(\"ul.pagination\",d.map((t,a)=>e(ke,g({title:n+a},t,{active:n+a===i}))))}}},$e=()=>({oncreate:({dom:e,attrs:t})=>{M.Parallax.init(e,t)},view:({attrs:{src:t}})=>t?e(\".parallax-container\",e(\".parallax\",e(`img[src=${t}]`))):void 0}),Me=[\"label\",\"helperText\",\"initialValue\",\"newRow\",\"className\",\"iconName\",\"isMandatory\",\"onchange\",\"disabled\"],Ce=[\"label\",\"helperText\",\"initialValue\",\"newRow\",\"className\",\"iconName\",\"isMandatory\",\"onchange\",\"disabled\"],Ie=()=>{const a={id:t()};return{view:t=>{let{attrs:{label:i,helperText:l,initialValue:o,newRow:n,className:s=\"col s12\",iconName:r,isMandatory:c,onchange:d,disabled:p}}=t,u=f(t.attrs,Me);const h=a.id,v=m(u),b=d?()=>a.dp&&d(a.dp.date):void 0;return e(\".input-field\"+(n?\".clear\":\"\"),{className:s,onremove:()=>a.dp&&a.dp.destroy()},[r?e(\"i.material-icons.prefix\",r):\"\",e(`input.datepicker[type=text][tabindex=0][id=${h}]${v}${p?\"[disabled]\":\"\"}`,{oncreate:({dom:e})=>{a.dp=M.Datepicker.init(e,g({format:\"yyyy/mm/dd\",showClearBtn:!0,setDefaultDate:!0,defaultDate:o?new Date(o):new Date},u,{onClose:b}))}}),e(k,{label:i,id:h,isMandatory:c,isActive:!!o}),e(N,{helperText:l})])}}},Ae=()=>{const a={id:t()};return{view:t=>{let{attrs:{label:i,helperText:l,initialValue:o,newRow:n,className:s=\"col s12\",iconName:r,isMandatory:c,onchange:d,disabled:p}}=t,u=f(t.attrs,Ce);const h=a.id,v=m(u),b=n?\".clear\":\"\",y=new Date,x=d?()=>a.tp&&d(a.tp.time||o||`${y.getHours()}:${y.getMinutes()}`):void 0;return e(`.input-field.timepicker${b}`,{className:s,onremove:()=>a.tp&&a.tp.destroy()},[r?e(\"i.material-icons.prefix\",r):\"\",e(`input[type=text][tabindex=0][id=${h}]${v}${p?\"[disabled]\":\"\"}`,{value:o,oncreate:({dom:e})=>{a.tp=M.Timepicker.init(e,g({twelveHour:!1,showClearBtn:!0,defaultTime:o},u,{onCloseEnd:x}))}}),e(k,{label:i,id:h,isMandatory:c,isActive:o}),e(N,{helperText:l})])}}},Te=()=>({view:({attrs:{id:t,groupId:a,label:i,onchange:l,className:o=\"col s12\",checked:n,disabled:s}})=>e(\"div\",{className:o},e(\"label\",[e(`input[type=radio][tabindex=0][name=${a}]${n?\"[checked=checked]\":\"\"}${s?\"[disabled]\":\"\"}`,{onclick:l?()=>l(t):void 0}),e(\"span\",e.trust(i))]))}),Ve=()=>{const a={groupId:t()};return{oninit:({attrs:{checkedId:e,initialValue:t}})=>{a.oldCheckedId=e,a.checkedId=e||t},view:({attrs:{id:t,checkedId:i,newRow:l,className:o=\"col s12\",label:n=\"\",disabled:s,description:r,options:c,isMandatory:d,checkboxClass:p,onchange:m}})=>{a.oldCheckedId!==i&&(a.oldCheckedId=a.checkedId=i);const{groupId:u,checkedId:h}=a,v=e=>{a.checkedId=e,m&&m(e)};return l&&(o+=\" clear\"),e(\"div\",{id:t,className:o},[e(\"div\",{className:\"input-field options\"},e(k,{id:t,label:n,isMandatory:d})),r?e(\"p.helper-text\",e.trust(r)):\"\",...c.map(t=>e(Te,g({},t,{onchange:v,groupId:u,disabled:s,className:p,checked:t.id===h})))])}}},Se=()=>{const t={},a=e=>e.map(e=>e.id).join(\"\"),i=(e,t,a=!1)=>a||(t instanceof Array&&(e||\"number\"==typeof e)?t.indexOf(e)>=0:t===e);return{oninit:({attrs:{checkedId:e,initialValue:i,options:l}})=>{t.ids=a(l);const o=e||i;t.checkedId=e instanceof Array?[...e]:e,t.initialValue=null!=o?o instanceof Array?o.filter(e=>null!=e):[o]:[]},view:({attrs:{id:l,newRow:o,className:n=\"col s12\",checkedId:s,key:r,options:c,multiple:d,label:p,helperText:m,placeholder:h=\"\",isMandatory:v,iconName:b,disabled:y,classes:g=\"\",dropdownOptions:f,onchange:x}})=>{t.checkedId!==s&&(t.initialValue=s?s instanceof Array?s:[s]:void 0);const{initialValue:w}=t,$=x?d?()=>{const e=t.instance&&t.instance.getSelectedValues(),a=e?e.length>0&&u(e[0])?e.map(e=>+e):e.filter(e=>null!==e||void 0!==e):void 0;t.initialValue=a||[],x(t.initialValue)}:e=>{if(e&&e.currentTarget){const a=e.currentTarget,i=u(a.value)?+a.value:a.value;t.initialValue=void 0!==typeof i?[i]:[]}t.initialValue&&x(t.initialValue)}:void 0;o&&(n+=\" clear\");const C=!c.some(e=>i(e.id,w)),I=c.reduce((e,t)=>(t.group&&e.indexOf(t.group)<0&&e.push(t.group),e),[]);return e(\".input-field.select-space\",{className:n,key:r,oncreate:d?({dom:e})=>t.wrapper=e:void 0},[b&&e(\"i.material-icons.prefix\",b),e(\"select\",{id:l,title:p,disabled:y,multiple:d,oncreate:({dom:e})=>{t.instance=M.FormSelect.init(e,{classes:g,dropdownOptions:f})},onupdate:({dom:e})=>{if(d){const e=b?1:0;!t.inputEl&&t.wrapper&&t.wrapper.childNodes&&t.wrapper.childNodes.length>0&&t.wrapper.childNodes[e].childNodes&&t.wrapper.childNodes[e].childNodes[0]&&(t.inputEl=t.wrapper.childNodes[e].childNodes[0]),t.inputEl&&t.inputEl.value&&t.inputEl.value.startsWith(`${h}, `)&&(t.inputEl.value=t.inputEl.value.replace(`${h}, `,\"\"))}const i=a(c);let l=s&&t.checkedId!==s.toString();t.ids!==i&&(t.ids=i,l=!0),(t.checkedId instanceof Array&&s instanceof Array?t.checkedId.join()!==s.join():t.checkedId!==s)&&(t.checkedId=s,l=!0),l&&(t.instance=M.FormSelect.init(e,{classes:g,dropdownOptions:f}))},onchange:$},e(\"option\",{value:\"\",disabled:!0,selected:!!C||void 0},h),0===I.length?c.map((t,a)=>{var l;return e(\"option\",{value:t.id,title:t.title||void 0,disabled:t.disabled?\"true\":void 0,\"data-icon\":t.img||void 0,selected:i(t.id,w,0===a&&C&&!h)},null==(l=t.label)?void 0:l.replace(\"&\",\"&\"))}):I.map(t=>e(\"optgroup\",{label:t},c.filter(e=>e.group===t).map((t,a)=>{var l;return e(\"option\",{value:t.id,title:t.title||void 0,disabled:t.disabled?\"true\":void 0,\"data-icon\":t.img||void 0,selected:i(t.id,w,0===a&&C&&!h)},null==(l=t.label)?void 0:l.replace(\"&\",\"&\"))})))),e(k,{label:p,isMandatory:v}),m&&e(N,{helperText:m})])}}},Oe=[\"label\",\"left\",\"right\",\"disabled\",\"newRow\",\"onchange\",\"checked\",\"isMandatory\",\"className\"],Re=()=>{const a={id:t()};return{view:({attrs:t})=>{const i=t.id||a.id,{label:l,left:o,right:n,disabled:s,newRow:r,onchange:c,checked:p,isMandatory:m,className:u=\"col s12\"}=t,h=f(t,Oe);return e(\"div\"+(r?\".clear\":\"\"),{className:u},[l?e(k,{label:l||\"\",id:i,isMandatory:m}):void 0,e(\".switch\",h,e(\"label\",[o||\"Off\",e(`input[id=${i}][type=checkbox]${d({disabled:s})}${p?\"[checked]\":\"\"}`,{onclick:c?e=>{e.target&&void 0!==e.target.checked&&c(e.target.checked)}:void 0}),e(\"span.lever\"),n||\"On\"]))])}}},je=()=>{const t={},a=(e,t)=>t||e.replace(/ /g,\"\").toLowerCase();return{view:({attrs:{tabWidth:i,selectedTabId:l,tabs:o,className:n,style:s,duration:r,onShow:c,swipeable:d,responsiveThreshold:p}})=>{const m=o.filter(e=>e.active).shift(),u=l||(m?a(m.title,m.id):\"\");return e(\".row\",[e(\".col.s12\",e(\"ul.tabs\"+(\"fill\"===i?\".tabs-fixed-width\":\"\"),{className:n,style:s,oncreate:({dom:e})=>{t.instance=M.Tabs.init(e,{duration:r,onShow:c,responsiveThreshold:p,swipeable:d})},onupdate:()=>{if(u){const e=document.getElementById(`tab_${u}`);e&&e.click()}},onremove:()=>t.instance.destroy()},o.map(({className:t,title:l,id:n,active:s,disabled:r,target:c,href:d})=>e(`li.tab${r?\".disabled\":\"\"}${\"fixed\"===i?`.col.s${Math.floor(12/o.length)}`:\"\"}`,{className:t},e(`a[id=tab_${a(l,n)}]${s?\".active\":\"\"}`,{target:c,href:d||`#${a(l,n)}`},l))))),o.filter(({href:e})=>void 0===e).map(({id:t,title:i,vnode:l,contentClass:o})=>e(`.col.s12[id=${a(i,t)}]`,{className:o},l))])}}},Le=()=>({view:({attrs:{id:t,title:a,datetime:i,active:l,content:o,iconName:n,dateFormatter:s,timeFormatter:r,onSelect:c}})=>e(`li${l?\".active\":\"\"}${t?`[id=${t}]`:\"\"}`,{onclick:c?()=>c({id:t,title:a,datetime:i,active:l,content:o}):void 0,style:c?\"cursor: pointer;\":void 0},[e(\".mm_time\",{datetime:i},[e(\"span\",s(i)),e(\"span\",r(i))]),n?e(\".mm_icon\",e(\"i.material-icons\",n)):void 0,e(\".mm_label\",[a?\"string\"==typeof a?e(\"h5\",a):a:void 0,o?\"string\"==typeof o?e(\"p\",o):o:void 0])])}),Ee=()=>{const t=e=>`${e.getUTCDate()}/${e.getUTCMonth()+1}/${e.getUTCFullYear()}`,a=e=>`${v(e.getUTCHours())}:${v(e.getUTCMinutes())}`;return{view:({attrs:{items:i,onSelect:l,timeFormatter:o=a,dateFormatter:n=t}})=>e(\"ul.mm_timeline\",i.map(t=>e(Le,g({onSelect:l,dateFormatter:n,timeFormatter:o},t))))}};export{Q as AnchorItem,$ as Autocomplete,V as Button,T as ButtonFactory,F as Carousel,E as CarouselItem,D as Chips,K as CodeBlock,B as Collapsible,_ as CollapsibleItem,ee as Collection,H as CollectionMode,ue as ColorInput,Ie as DatePicker,ae as Dropdown,ve as EmailInput,be as FileInput,R as FlatButton,le as FloatingActionButton,N as HelperText,I as Icon,ye as InputCheckbox,k as Label,S as LargeButton,G as ListItem,w as Mandatory,fe as MapEditor,xe as MaterialBox,we as ModalPanel,pe as NumberInput,ge as Options,Ne as Pagination,$e as Parallax,de as PasswordInput,Te as RadioButton,Ve as RadioButtons,he as RangeInput,j as RoundIconButton,Y as SecondaryContent,Se as Select,O as SmallButton,L as SubmitButton,Re as Switch,je as Tabs,se as TextArea,ce as TextInput,Ae as TimePicker,Ee as Timeline,me as UrlInput,n as camelToSnake,i as compose,d as disable,u as isNumeric,o as join,l as map,y as move,v as padLeft,h as pipe,p as req,b as swap,s as toAttributeString,m as toAttrs,t as uniqueId,a as uuid4};\n//# sourceMappingURL=index.modern.js.map\n","import e from\"mithril\";import{render as t}from\"slimdown-js\";export*from\"slimdown-js\";const a=()=>\"idxxxxxxxx\".replace(/[x]/g,()=>(16*Math.random()|0).toString(16)),i=[\"min\",\"max\",\"minLength\",\"maxLength\",\"rows\",\"cols\",\"placeholder\",\"autocomplete\",\"pattern\",\"readOnly\",\"step\"],n=e=>i.indexOf(e)>=0,o=({disabled:e})=>e?\"[disabled]\":\"\",l=e=>(e=>{const t=(a=e,e=>void 0!==a[e]);var a;return Object.keys(e).filter(n).filter(t).reduce((t,a)=>{const i=e[a];return t.push(`[${a.toLowerCase()}=${i}]`),t},[]).join(\"\")})(e)+(e=>e.maxLength?`[data-length=${e.maxLength}]`:\"\")(e)+o(e)+(({required:e,isMandatory:t})=>e||t?\"[required][aria-required=true]\":\"\")(e)+(({autofocus:e})=>\"boolean\"==typeof e&&e||e&&e()?\"[autofocus]\":\"\")(e),r=e=>!isNaN(parseFloat(e))&&isFinite(e);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(n[a]=e[a]);return n}const d=[\"label\",\"id\",\"isMandatory\",\"isActive\"],p={view:({attrs:t})=>e(\"span.mandatory\",t,\"*\")},u=()=>({view:t=>{let{attrs:{label:a,id:i,isMandatory:n,isActive:o}}=t,l=c(t.attrs,d);return a?e(`label${o?\".active\":\"\"}${i?`[for=${i}]`:\"\"}`,l,[e.trust(a),n?e(p):void 0]):void 0}}),m=()=>({view:({attrs:{helperText:t,dataError:a,dataSuccess:i,className:n}})=>t||a||i?e(\"span.helper-text\",{className:n,dataError:a,dataSuccess:i},t?e.trust(t):\"\"):void 0}),h=()=>{const t={id:a()};return{view:({attrs:a})=>{const i=a.id||t.id,n=l(a),{label:o,helperText:r,initialValue:s,onchange:c,newRow:d,className:p=\"col s12\",style:h,iconName:f,isMandatory:g}=a;return e(\".input-field\"+(d?\".clear\":\"\"),{className:d?p+\" clear\":p,style:h},[f?e(\"i.material-icons.prefix\",f):\"\",e(`input.autocomplete[type=text][tabindex=0]${n}`,{id:i,oncreate:({dom:e})=>{M.Autocomplete.init(e,a)},onchange:c?e=>{e.target&&e.target.value&&c(e.target.value)}:void 0,value:s}),e(u,{label:o,id:i,isMandatory:g,isActive:s}),e(m,{helperText:r})])}}},f=[\"iconName\"],g=()=>({view:t=>{let{attrs:{iconName:a}}=t,i=c(t.attrs,f);return e(\"i.material-icons\",i,a)}}),b=[\"modalId\",\"tooltip\",\"tooltipPostion\",\"iconName\",\"iconClass\",\"label\",\"attr\"],y=(t,a=\"\")=>()=>{const i=`${t}${a}`;return{view:({attrs:t})=>{const{modalId:a,tooltip:n,tooltipPostion:o,iconName:l,iconClass:r,label:s,attr:d}=t,p=c(t,b);return e(`${i}${a?`.modal-trigger[href=#${a}]`:\"\"}${n?`.tooltipped[data-position=${o||\"top\"}][data-tooltip=${n}]`:\"\"}${(e=>e?((...e)=>t=>e.reduceRight((e,t)=>t(e),t))(e=>Array.prototype.join.call(e,\"\"),(e=>t=>Array.prototype.map.call(t,e))(t=>`[${(e=>e.replace(/([A-Z])/g,e=>\"-\"+e.toLowerCase()))(t)}=\"${((e=\"\")=>e.toString().replace(/\"/g,\""\"))(e[t])}\"]`),Object.keys)(e):\"\")(d)}`,p,l?e(g,{iconName:l,className:r||\"left\"}):void 0,s||void 0)}}},v=y(\"a.waves-effect.waves-teal.btn-flat\",\"[type=button]\"),w=y(\"button.btn-floating.btn-large.waves-effect.waves-light\",\"[type=button]\"),x=()=>({oncreate:({attrs:e,dom:t})=>{const{onchange:a,onChipAdd:i,onChipDelete:n}=e,o=M.Chips.getInstance(t.children[0]),l=i?i.bind(o):void 0;e.onChipAdd=function(e,t){a&&a(this.chipsData),l&&l(e,t)};const r=n?n.bind(o):void 0;e.onChipDelete=function(e,t){a&&a(this.chipsData),r&&r(e,t)},M.Chips.init(t.children[0],e)},onupdate:({dom:e,attrs:{data:t}})=>{if(!t||0===t.length)return;const a=M.Chips.getInstance(e.children[0]);t.forEach(e=>a.addChip(e))},view:({attrs:{placeholder:t,required:a,isMandatory:i=a,data:n,className:o=\"col s12\",label:l,helperText:r}})=>e(\".input-field\",{className:o},[e(`.chips.chips-autocomplete${t?\".chips-placeholder\":\"\"}${n?\".chips-initial\":\"\"}`),l?e(u,{label:l,isMandatory:i,className:\"active\"}):void 0,r?e(m,{helperText:r}):void 0])}),k=()=>({view:({attrs:{header:t,body:a,active:i,iconName:n}})=>e(i?\"li.active\":\"li\",[t||n?e(\".collapsible-header\",[n?e(\"i.material-icons\",n):void 0,t?\"string\"==typeof t?e(\"span\",t):t:void 0]):void 0,a?e(\".collapsible-body\",a):void 0])}),N=()=>({oncreate:({dom:e,attrs:t})=>{M.Collapsible.init(e,t)},view:({attrs:t})=>{const{items:a,class:i,className:n,style:o,id:l}=t;return a&&a.length>0?e(\"ul.collapsible\",{class:i||n,style:o,id:l},a.map(t=>e(k,t))):void 0}});var $;!function(e){e[e.BASIC=0]=\"BASIC\",e[e.LINKS=1]=\"LINKS\",e[e.AVATAR=2]=\"AVATAR\"}($||($={}));const I=[\"className\",\"helperText\",\"iconName\",\"id\",\"initialValue\",\"isMandatory\",\"label\",\"onchange\",\"onkeydown\",\"onkeypress\",\"onkeyup\",\"onblur\",\"style\"],O=[\"className\",\"dataError\",\"dataSuccess\",\"helperText\",\"iconName\",\"id\",\"initialValue\",\"isMandatory\",\"label\",\"maxLength\",\"newRow\",\"onchange\",\"onkeydown\",\"onkeypress\",\"onkeyup\",\"onblur\",\"style\",\"validate\"],A=()=>{const t={id:a()};return{view:({attrs:a})=>{const{className:i=\"col s12\",helperText:n,iconName:o,id:r=t.id,initialValue:s,isMandatory:d,label:p,onchange:h,onkeydown:f,onkeypress:g,onkeyup:b,onblur:y,style:v}=a,w=c(a,I),x=l(w);return e(\".input-field\",{className:i,style:v},[o?e(\"i.material-icons.prefix\",o):\"\",e(`textarea.materialize-textarea[tabindex=0][id=${r}]${x}`,{oncreate:({dom:e})=>{M.textareaAutoResize(e),a.maxLength&&M.CharacterCounter.init(e)},onchange:h?e=>{const t=e.target;h(t&&\"string\"==typeof t.value?t.value:\"\")}:void 0,value:s,onkeyup:b?e=>{b(e,e.target.value)}:void 0,onkeydown:f?e=>{f(e,e.target.value)}:void 0,onkeypress:g?e=>{g(e,e.target.value)}:void 0,onblur:y}),e(u,{label:p,id:r,isMandatory:d,isActive:s||a.placeholder}),e(m,{helperText:n})])}}},D=(t,i=\"\")=>()=>{const n={id:a()},o=e=>{const a=e.value;return!a||\"number\"!==t&&\"range\"!==t?a:+a},r=(e,t)=>{e.setCustomValidity(\"boolean\"==typeof t?t?\"\":\"Custom validation failed\":t)};return{view:({attrs:a})=>{const{className:s=\"col s12\",dataError:d,dataSuccess:p,helperText:h,iconName:f,id:g=n.id,initialValue:b,isMandatory:y,label:v,maxLength:w,newRow:x,onchange:k,onkeydown:N,onkeypress:$,onkeyup:I,onblur:A,style:D,validate:S}=a,T=c(a,O),C=l(T);return e(`.input-field${x?\".clear\":\"\"}${i}`,{className:s,style:D},[f?e(\"i.material-icons.prefix\",f):void 0,e(`input.validate[type=${t}][tabindex=0][id=${g}]${C}`,{oncreate:({dom:e})=>{(({autofocus:e})=>!!e&&(\"boolean\"==typeof e?e:e()))(a)&&e.focus(),w&&M.CharacterCounter.init(e),\"range\"===t&&M.Range.init(e)},onkeyup:I?e=>{I(e,o(e.target))}:void 0,onkeydown:N?e=>{N(e,o(e.target))}:void 0,onkeypress:$?e=>{$(e,o(e.target))}:void 0,onblur:A,onupdate:S?({dom:e})=>{const t=e;r(t,S(o(t),t))}:void 0,onchange:e=>{const t=e.target;if(t){const e=o(t);k&&k(e),S&&r(t,S(e,t))}},value:b}),e(u,{label:v,id:g,isMandatory:y,isActive:!(void 0===b&&!a.placeholder&&\"number\"!==t&&\"color\"!==t&&\"range\"!==t)}),e(m,{helperText:h,dataError:d,dataSuccess:p})])}}},S=D(\"text\"),T=D(\"number\"),C=D(\"url\"),V=D(\"color\"),j=D(\"email\"),L=()=>{let t,a=!1;return{view:({attrs:i})=>{const{multiple:n,disabled:o,initialValue:l,placeholder:r,onchange:s,className:c=\"col s12\",accept:d,label:p=\"File\"}=i,u=d?d instanceof Array?d.join(\", \"):d:void 0,m=u?`[accept=${u}]`:\"\",h=n?\"[multiple]\":\"\",f=o?\"[disabled]\":\"\",g=r?`[placeholder=${r}]`:\"\";return e(\".file-field.input-field\",{className:i.class||c},[e(\".btn\",[e(\"span\",p),e(`input[type=file]${h}${f}${m}`,{onchange:s?e=>{const t=e.target;t&&t.files&&s&&(a=!0,s(t.files))}:void 0})]),e(\".file-path-wrapper\",e(`input.file-path.validate${g}[type=text]`,{oncreate:({dom:e})=>{t=e,l&&(t.value=l)}})),(a||l)&&e(\"a.waves-effect.waves-teal.btn-flat\",{style:\"float: right;position: relative;top: -3rem; padding: 0\",onclick:()=>{a=!1,t.value=\"\",s&&s({})}},e(\"i.material-icons\",\"clear\"))])}}},P=()=>({view:({attrs:{className:t=\"col s12\",onchange:a,label:i,checked:n,disabled:o,description:l}})=>e(\"div\",{className:t},e(\"label\",[e(\"input[type=checkbox][tabindex=0]\",{checked:n,disabled:o,onclick:a?e=>{e.target&&void 0!==e.target.checked&&a(e.target.checked)}:void 0}),i?\"string\"==typeof i?e(\"span\",i):i:void 0]),l&&e(m,{className:\"input-checkbox-desc\",helperText:l}))}),R=()=>{const t={},a=e=>t.checkedIds.indexOf(e)>=0;return{oninit:({attrs:{initialValue:e,checkedId:a}})=>{const i=a||e;t.checkedId=a,t.checkedIds=i?i instanceof Array?[...i]:[i]:[]},view:({attrs:{label:i,id:n,options:o,checkedId:l,description:r,className:s=\"col s12\",disabled:c,checkboxClass:d,newRow:p,isMandatory:h,onchange:f}})=>{l&&t.checkedId!==l&&(t.checkedId=l,t.checkedIds=l instanceof Array?l:[l]);const g=f?(e,a)=>{const i=t.checkedIds.filter(t=>t!==e);a&&i.push(e),t.checkedIds=i,f(i)}:void 0;return e(\"div\"+(p?\".clear\":\"\"),{className:s},[e(\"div\",{className:\"input-field options\"},e(u,{id:n,label:i,isMandatory:h})),e(m,{helperText:r}),...o.map(t=>e(P,{disabled:c||t.disabled,label:t.label,onchange:g?e=>g(t.id,e):void 0,className:t.className||d,checked:a(t.id),description:t.description}))])}}},E=()=>({oncreate:({dom:e,attrs:{options:t,onCreate:a}})=>{const i=M.Modal.init(e,t);a&&a(i)},view:({attrs:{id:t,title:a,description:i,fixedFooter:n,bottomSheet:o,buttons:l,richContent:r}})=>e(`.modal${n?\".modal-fixed-footer\":\"\"}${o?\".bottom-sheet\":\"\"}[id=${t}]`,[e(\".modal-content\",[e(\"h4\",a),r&&\"string\"==typeof i?e.trust(i||\"\"):\"string\"==typeof i?e(\"p\",i):i]),l?e(\".modal-footer\",l.map(t=>e(v,s({},t,{className:\"modal-close\"})))):void 0])}),F=()=>({view:({attrs:{title:t,href:a,active:i,disabled:n}})=>e(\"li\",{className:i?\"active\":n?\"disabled\":\"waves-effect\"},\"number\"==typeof t?e(e.route.Link,{href:a},t):t)}),_=()=>{const t={pagIndex:0};return{view:({attrs:{items:a,curPage:i=1,size:n=Math.min(9,a.length)}})=>{const{pagIndex:o}=t,l=o*n,r=l+n,c=o>0,d=rc&&t.pagIndex--},e(\"i.material-icons\",\"chevron_left\")),disabled:!c},...a.filter((e,t)=>l<=t&&td&&t.pagIndex++},e(\"i.material-icons\",\"chevron_right\")),disabled:!d}];return e(\"ul.pagination\",p.map((t,a)=>e(F,s({title:l+a},t,{active:l+a===i}))))}}},H=[\"label\",\"helperText\",\"initialValue\",\"newRow\",\"className\",\"iconName\",\"isMandatory\",\"onchange\",\"disabled\"],U=[\"label\",\"helperText\",\"initialValue\",\"newRow\",\"className\",\"iconName\",\"isMandatory\",\"onchange\",\"disabled\"],q=()=>{const t={id:a()};return{view:a=>{let{attrs:{label:i,helperText:n,initialValue:o,newRow:r,className:d=\"col s12\",iconName:p,isMandatory:h,onchange:f,disabled:g}}=a,b=c(a.attrs,H);const y=t.id,v=l(b),w=f?()=>t.dp&&f(t.dp.date):void 0;return e(\".input-field\"+(r?\".clear\":\"\"),{className:d,onremove:()=>t.dp&&t.dp.destroy()},[p?e(\"i.material-icons.prefix\",p):\"\",e(`input.datepicker[type=text][tabindex=0][id=${y}]${v}${g?\"[disabled]\":\"\"}`,{oncreate:({dom:e})=>{t.dp=M.Datepicker.init(e,s({format:\"yyyy/mm/dd\",showClearBtn:!0,setDefaultDate:!0,defaultDate:o?new Date(o):new Date},b,{onClose:w}))}}),e(u,{label:i,id:y,isMandatory:h,isActive:!!o}),e(m,{helperText:n})])}}},B=()=>{const t={id:a()};return{view:a=>{let{attrs:{label:i,helperText:n,initialValue:o,newRow:r,className:d=\"col s12\",iconName:p,isMandatory:h,onchange:f,disabled:g}}=a,b=c(a.attrs,U);const y=t.id,v=l(b),w=r?\".clear\":\"\",x=new Date,k=f?()=>t.tp&&f(t.tp.time||o||`${x.getHours()}:${x.getMinutes()}`):void 0;return e(`.input-field.timepicker${w}`,{className:d,onremove:()=>t.tp&&t.tp.destroy()},[p?e(\"i.material-icons.prefix\",p):\"\",e(`input[type=text][tabindex=0][id=${y}]${v}${g?\"[disabled]\":\"\"}`,{value:o,oncreate:({dom:e})=>{t.tp=M.Timepicker.init(e,s({twelveHour:!1,showClearBtn:!0,defaultTime:o},b,{onCloseEnd:k}))}}),e(u,{label:i,id:y,isMandatory:h,isActive:o}),e(m,{helperText:n})])}}},J=()=>({view:({attrs:{id:t,groupId:a,label:i,onchange:n,className:o=\"col s12\",checked:l,disabled:r}})=>e(\"div\",{className:o},e(\"label\",[e(`input[type=radio][tabindex=0][name=${a}]${l?\"[checked=checked]\":\"\"}${r?\"[disabled]\":\"\"}`,{onclick:n?()=>n(t):void 0}),e(\"span\",e.trust(i))]))}),z=()=>{const t={groupId:a()};return{oninit:({attrs:{checkedId:e,initialValue:a}})=>{t.oldCheckedId=e,t.checkedId=e||a},view:({attrs:{id:a,checkedId:i,newRow:n,className:o=\"col s12\",label:l=\"\",disabled:r,description:c,options:d,isMandatory:p,checkboxClass:m,onchange:h}})=>{t.oldCheckedId!==i&&(t.oldCheckedId=t.checkedId=i);const{groupId:f,checkedId:g}=t,b=e=>{t.checkedId=e,h&&h(e)};return n&&(o+=\" clear\"),e(\"div\",{id:a,className:o},[e(\"div\",{className:\"input-field options\"},e(u,{id:a,label:l,isMandatory:p})),c?e(\"p.helper-text\",e.trust(c)):\"\",...d.map(t=>e(J,s({},t,{onchange:b,groupId:f,disabled:r,className:m,checked:t.id===g})))])}}},W=()=>{const t={},a=e=>e.map(e=>e.id).join(\"\"),i=(e,t,a=!1)=>a||(t instanceof Array&&(e||\"number\"==typeof e)?t.indexOf(e)>=0:t===e);return{oninit:({attrs:{checkedId:e,initialValue:i,options:n}})=>{t.ids=a(n);const o=e||i;t.checkedId=e instanceof Array?[...e]:e,t.initialValue=null!=o?o instanceof Array?o.filter(e=>null!=e):[o]:[]},view:({attrs:{id:n,newRow:o,className:l=\"col s12\",checkedId:s,key:c,options:d,multiple:p,label:h,helperText:f,placeholder:g=\"\",isMandatory:b,iconName:y,disabled:v,classes:w=\"\",dropdownOptions:x,onchange:k}})=>{t.checkedId!==s&&(t.initialValue=s?s instanceof Array?s:[s]:void 0);const{initialValue:N}=t,$=k?p?()=>{const e=t.instance&&t.instance.getSelectedValues(),a=e?e.length>0&&r(e[0])?e.map(e=>+e):e.filter(e=>null!==e||void 0!==e):void 0;t.initialValue=a||[],k(t.initialValue)}:e=>{if(e&&e.currentTarget){const a=e.currentTarget,i=r(a.value)?+a.value:a.value;t.initialValue=void 0!==typeof i?[i]:[]}t.initialValue&&k(t.initialValue)}:void 0;o&&(l+=\" clear\");const I=!d.some(e=>i(e.id,N)),O=d.reduce((e,t)=>(t.group&&e.indexOf(t.group)<0&&e.push(t.group),e),[]);return e(\".input-field.select-space\",{className:l,key:c,oncreate:p?({dom:e})=>t.wrapper=e:void 0},[y&&e(\"i.material-icons.prefix\",y),e(\"select\",{id:n,title:h,disabled:v,multiple:p,oncreate:({dom:e})=>{t.instance=M.FormSelect.init(e,{classes:w,dropdownOptions:x})},onupdate:({dom:e})=>{if(p){const e=y?1:0;!t.inputEl&&t.wrapper&&t.wrapper.childNodes&&t.wrapper.childNodes.length>0&&t.wrapper.childNodes[e].childNodes&&t.wrapper.childNodes[e].childNodes[0]&&(t.inputEl=t.wrapper.childNodes[e].childNodes[0]),t.inputEl&&t.inputEl.value&&t.inputEl.value.startsWith(`${g}, `)&&(t.inputEl.value=t.inputEl.value.replace(`${g}, `,\"\"))}const i=a(d);let n=s&&t.checkedId!==s.toString();t.ids!==i&&(t.ids=i,n=!0),(t.checkedId instanceof Array&&s instanceof Array?t.checkedId.join()!==s.join():t.checkedId!==s)&&(t.checkedId=s,n=!0),n&&(t.instance=M.FormSelect.init(e,{classes:w,dropdownOptions:x}))},onchange:$},e(\"option\",{value:\"\",disabled:!0,selected:!!I||void 0},g),0===O.length?d.map((t,a)=>{var n;return e(\"option\",{value:t.id,title:t.title||void 0,disabled:t.disabled?\"true\":void 0,\"data-icon\":t.img||void 0,selected:i(t.id,N,0===a&&I&&!g)},null==(n=t.label)?void 0:n.replace(\"&\",\"&\"))}):O.map(t=>e(\"optgroup\",{label:t},d.filter(e=>e.group===t).map((t,a)=>{var n;return e(\"option\",{value:t.id,title:t.title||void 0,disabled:t.disabled?\"true\":void 0,\"data-icon\":t.img||void 0,selected:i(t.id,N,0===a&&I&&!g)},null==(n=t.label)?void 0:n.replace(\"&\",\"&\"))})))),e(u,{label:h,isMandatory:b}),f&&e(m,{helperText:f})])}}},K=[\"label\",\"left\",\"right\",\"disabled\",\"newRow\",\"onchange\",\"checked\",\"isMandatory\",\"className\"],Y=()=>{const t={id:a()};return{view:({attrs:a})=>{const i=a.id||t.id,{label:n,left:l,right:r,disabled:s,newRow:d,onchange:p,checked:m,isMandatory:h,className:f=\"col s12\"}=a,g=c(a,K);return e(\"div\"+(d?\".clear\":\"\"),{className:f},[n?e(u,{label:n||\"\",id:i,isMandatory:h}):void 0,e(\".switch\",g,e(\"label\",[l||\"Off\",e(`input[id=${i}][type=checkbox]${o({disabled:s})}${m?\"[checked]\":\"\"}`,{onclick:p?e=>{e.target&&void 0!==e.target.checked&&p(e.target.checked)}:void 0}),e(\"span.lever\"),r||\"On\"]))])}}},Z=()=>{const t={},a=(e,t)=>t||e.replace(/ /g,\"\").toLowerCase();return{view:({attrs:{tabWidth:i,selectedTabId:n,tabs:o,className:l,style:r,duration:s,onShow:c,swipeable:d,responsiveThreshold:p}})=>{const u=o.filter(e=>e.active).shift(),m=n||(u?a(u.title,u.id):\"\");return e(\".row\",[e(\".col.s12\",e(\"ul.tabs\"+(\"fill\"===i?\".tabs-fixed-width\":\"\"),{className:l,style:r,oncreate:({dom:e})=>{t.instance=M.Tabs.init(e,{duration:s,onShow:c,responsiveThreshold:p,swipeable:d})},onupdate:()=>{if(m){const e=document.getElementById(`tab_${m}`);e&&e.click()}},onremove:()=>t.instance.destroy()},o.map(({className:t,title:n,id:l,active:r,disabled:s,target:c,href:d})=>e(`li.tab${s?\".disabled\":\"\"}${\"fixed\"===i?`.col.s${Math.floor(12/o.length)}`:\"\"}`,{className:t},e(`a[id=tab_${a(n,l)}]${r?\".active\":\"\"}`,{target:c,href:d||`#${a(n,l)}`},n))))),o.filter(({href:e})=>void 0===e).map(({id:t,title:i,vnode:n,contentClass:o})=>e(`.col.s12[id=${a(i,t)}]`,{className:o},n))])}}},G=e=>e.charAt(0).toUpperCase()+e.slice(1),Q=e=>\"string\"==typeof e,X=(e,t=2,a=\"0\")=>e.toString().length>=t?e.toString():X(a+e,t,a),ee=e=>e?`${X(e.getHours())}:${X(e.getMinutes())}`:\"00:00\",te=(e,t)=>{const a=(t=(t=t.replace(/\\[(\\w+)\\]/g,\".$1\")).replace(/^\\./,\"\")).split(\".\");let i={...e};for(let t=0,n=a.length;te[o]===t).shift();if(!l)return;i=l}}}return i},ae=e=>e.reduce((e,t)=>t instanceof Array?[...e,...t]:[...e,t],[]),ie=/([^ =><]*)\\s*([=><]*)\\s*(\\S*)/i,ne=/^\\s*!\\s*/,oe=/===?|[^<>=]/i,le=function(e){var t=[].slice.call(arguments,1);return 0===e.length||(e instanceof Array?e:[e]).some(e=>((e,t)=>e.split(\"&\").reduce((e,a)=>{const i=ne.test(a),n=i?a.replace(ne,\"\"):a;return e=e&&t.filter(Boolean).reduce((e,t)=>e||((e,t)=>{if(!t||0===Object.keys(t).length)return!1;const a=ie.exec(e);if(a){const[e,i,n,o]=a,l=te(t,i.trim());if(void 0===l||\"string\"==typeof l&&0===l.length)return!1;if(!n||!o)return!0;{const t=isNaN(+o)?\"true\"===o||\"false\"!==o&&o:+o;switch(n){case\"=\":case\"==\":case\"===\":return l instanceof Array?l.indexOf(t)>=0:l===t;case\"<=\":return l<=t;case\">=\":return l>=t;case\"<\":return l\":return l>t;default:return console.error(`Unrecognized operand (${n}) in expression: ${e}`),!1}}}return!0})(n.trim(),t),!1),i?!e:e},!0))(e,oe.test(e)?[t[0]]:ae(t)))},re=(e,t)=>te(t.filter(Boolean).reduceRight((e,t)=>({...t,...e})),e.trim()),se=(e,t)=>void 0!==re(e,t),ce=/{{\\s*([^\\s\"'`:]*):?([^\\s]*)\\s*}}/g,de=function(e){if(!ce.test(e))return!0;let t;ce.lastIndex=0;let a=!0;do{t=ce.exec(e),t&&(t.index===ce.lastIndex&&ce.lastIndex++,t.forEach((e,t,[,i])=>{a=a&&se(i,[].slice.call(arguments,1))}))}while(a&&null!==t);return a},pe=(e,t)=>{if(void 0===e)return\"\";if(e instanceof Array)return e.map(e=>pe(e,t)).join(\", \");if(!t)return e.toString();if(\"boolean\"==typeof e){const a=t.indexOf(\":\");return e?t.substring(0,a):t.substring(a+1)}switch(t){default:return e.toString();case\"date\":return new Date(e).toLocaleDateString();case\"time\":return new Date(e).toLocaleTimeString();case\"iso\":return new Date(e).toISOString();case\"utc\":return new Date(e).toUTCString()}},ue=function(e){if(!ce.test(e))return e;let t;ce.lastIndex=0;do{t=ce.exec(e),t&&(t.index===ce.lastIndex&&ce.lastIndex++,t.forEach((t,a,[i,n,o])=>{const l=re(n,[].slice.call(arguments,1));!l||l instanceof Array||(e=e.replace(i,pe(l,o)))}))}while(null!==t);return e},me=e=>{if(null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){const t=[];return e.forEach(e=>{t.push(e)}),t.map(e=>me(e))}if(\"object\"==typeof e){const t={...e};return Object.keys(t).forEach(e=>{t[e]=me(t[e])}),t}return e},he=e=>{const t=(e,a=\"\")=>{const i=e.filter(e=>\"section\"!==e.type&&\"md\"!==e.type).reduce((e,i)=>{const n=(a?`${a}.`:\"\")+String(i.id),o=i.type||(i.options&&i.options.length>0?\"select\":\"text\");return\"string\"==typeof o?e[n]=i:e={...e,...t(o,n)},e},{});return i},a=t(e),i=(e,t)=>{if(!a.hasOwnProperty(e)||void 0===t)return t;const i=a[e],n=t instanceof Array?t.filter(e=>null!=e):[t];switch(i.type||(i.options?\"options\":\"none\")){default:return t;case\"radio\":case\"select\":case\"options\":const e=\"string\"==typeof i.options?re(i.options,[a]):i.options;return n.map(t=>e.filter(e=>e.id===t).map(e=>e.label||G(e.id)).shift()).filter(e=>void 0!==e)}},n=(e,t=\"\")=>{if(e&&(\"object\"!=typeof e||0!==Object.keys(e).length)){if(e instanceof Array)return e.map(e=>n(e,t));{const a={};return Object.keys(e).forEach(o=>{const l=t?`${t}.${o}`:o,r=e[o];if(\"boolean\"==typeof r)a[o]=r;else if(\"number\"==typeof r||\"string\"==typeof r){const e=i(l,r);e&&(a[o]=e instanceof Array&&1===e.length?e[0]:e)}else if(r instanceof Array)if(\"string\"==typeof r[0]||null===r[0]){const e=i(l,r);e&&(a[o]=e)}else a[o]=n(r,o);else\"object\"==typeof r&&(a[o]=r)}),a}}};return n},fe=(e=\"\")=>e.replace(/\\s|,|\\./g,\"\").toLowerCase(),ge=(e,t,a=1)=>{const i=[];for(let n=e;n<=t;n+=a)i.push(n);return i},be=e=>{\"string\"!=typeof e&&(e=JSON.stringify(e));let t=0;if(0===e.length)return t;for(var a=0;a{const i=Object.assign({},t,a);return`${e}?${Object.keys(i).map(e=>`${e}=${i[e]}`).join(\"&\")}`},ve=()=>({view:({attrs:{md:a=\"\",removeParagraphs:i=!1,externalLinks:n=!1,...o}})=>e(\".slimdown-view.markdown\",o,e.trust(t(a,i,n)))}),we=()=>({view:({attrs:{type:t,props:a,label:i=\"\",initialValue:n,inline:o=!1}})=>{const l={className:a.className||\"col s12\"};if(n instanceof Array&&n.length>3)return e(\".readonly\",l,[e(\"label\",i),e(ve,{md:\"\\n- \"+n.join(\"\\n- \")})]);if(\"string\"==typeof n)return e(\".readonly\",l,\"url\"===t?[e(\"label\",`${i.trim()}: `),e(\"a[target=_blank]\",{href:n},n)]:\"color\"===t?[e(\"label\",`${i.trim()}: `),e(\".color\",{style:`height: 1rem; width: 40px; border-radius: 4px; background-color: ${n}`})]:[e(\"label\",i),e(ve,{md:n})]);const r=n instanceof Array?n.join(\", \"):n;return e(\".readonly\",l,[i&&e(\"label\",i),o?e(\"span\",r?`: ${r}`:e.trust(\" \")):e(\"p\",r||e.trust(\" \"))])}}),xe=(i={},n={})=>()=>{const o={key:Date.now()};return{view:({attrs:{i18n:l,field:r,obj:s,autofocus:c,onchange:d,context:p=[],containerId:u,disabled:m,readonly:f}})=>{const{id:g=\"\",type:b,disabled:y=m,readonly:w=f,value:k,required:N,autogenerate:$,show:I,label:O,description:D,i18n:M=l||{},checkAllOptions:E,transform:F,effect:_,onkeyup:H,onkeydown:U,onblur:J}=r;if(I&&!le(I,s,p)||O&&!de(O,s,p)||D&&!de(D,s,p))return;const K=\"string\"==typeof r.options?re(r.options,[s,...p]):r.options,Z=K&&K instanceof Array?K.filter(e=>void 0!==e.id&&(e.label||!/[0-9]/.test(e.id))&&(!e.show||le(e.show,s,p))).map(e=>e.label?e:{...e,label:G(e.id)}):[],Q=\"boolean\"==typeof m&&m,X=((e,i=!1,n=!1)=>{const{id:o=\"\",label:l,description:r,required:s,multiple:c,className:d,checkboxClass:p,icon:u,iconClass:m,placeholder:h,maxLength:f,minLength:g,max:b,min:y,step:v,dateTimeOutput:w,dateTimeSeconds:x,dateFormat:k,twelveHour:N}=e,$={id:`mui_${String(o)}-${a()}`,label:l};return void 0===l&&o&&($.label=G(String(o))),r&&($.helperText=t(r,!0)),d&&($.className=d),u&&($.iconName=u),m&&($.iconClass=m),p&&($.checkboxClass=p),h&&($.placeholder=h),s&&($.isMandatory=!0),c&&($.multiple=c),n&&($.disabled=!0),i&&($.autofocus=!0),void 0!==f&&($.maxLength=f),void 0!==g&&($.minLength=g),void 0!==b&&($.max=b),void 0!==y&&($.min=y),void 0!==v&&($.step=v),w&&($.dateTimeOutput=w),x&&($.dateTimeSeconds=x),k&&($.dateFormat=k),N&&($.twelveHour=N),$})(r,c,\"boolean\"==typeof y||void 0===y?Q||y:Q||le(y,s,p));O&&(X.label=t(ue(X.label||O,s,p),!0)),D&&(X.description=t(ue(X.description||D,s,p),!0));const te=N?e=>e instanceof Array?e&&e.length>0:void 0!==typeof e:void 0;if(s instanceof Array)return void console.warn(\"Only a repeat list can deal with arrays!\");const ae=function(e){try{return void 0===e||\"undefined\"===e?(delete s[g],d(s),Promise.resolve()):(s[g]=F?F(\"to\",e):e,_?Promise.resolve(_(s,s[g],p)).then(function(e){d(void 0!==e?e:s)}):Promise.resolve(d(s)))}catch(e){return Promise.reject(e)}};if(b instanceof Array)return g?(s.hasOwnProperty(g)||(s[g]={}),e(\".muf-form\",{className:r.className},[e(\".muf-form-header\",e.trust(t(X.label||G(String(g)),!0))),X.description&&e(\"div\",e.trust(t(X.description))),e(\".row\",e(De,{...X,i18n:M,readonly:w,form:b,obj:s[g],context:p instanceof Array?[s,...p]:[s,p],onchange:()=>d&&d(s),containerId:u}))])):void console.warn(\"Missing ID for type \"+JSON.stringify(b));$&&!s[g]&&(s[g]=\"guid\"===$?\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return(\"x\"===e?t:3&t|8).toString(16)}):\"id\"===$?a():Date.now());const ie=s.hasOwnProperty(g)&&void 0!==s[g]?F?F(\"from\",s[g]):s[g]:k;g&&void 0!==k&&void 0!==ie&&(s[g]=F?F(\"to\",ie):ie);const[ne,oe]=E?E.split(\"|\"):[\"\",\"\"];if(w&&b&&[\"md\",\"none\"].indexOf(b)<0){if(n.hasOwnProperty(b))return e(n[b],{iv:ie,field:r,props:X,label:X.label,obj:s,context:p});if(b&&i.hasOwnProperty(b))return e(i[b],{iv:ie,field:r,props:X,label:X.label,onchange:ae,obj:s,context:p});switch(b){case\"time\":{const t=M.dateTimeOptions?{hour:\"2-digit\",minute:\"2-digit\",second:void 0,...M.dateTimeOptions,weekday:void 0,month:void 0,day:void 0,year:void 0}:void 0,a=\"number\"==typeof ie||\"string\"==typeof ie||ie instanceof Date?new Date(ie):void 0,i=a?a.toLocaleTimeString(M.locales,t):\"\";return e(we,{props:X,label:X.label,initialValue:i})}case\"date\":{const t=M.dateTimeOptions?{...M.dateTimeOptions,hour:void 0,hour12:void 0,minute:void 0,second:void 0}:void 0,a=\"number\"==typeof ie||\"string\"==typeof ie||ie instanceof Date?new Date(ie):void 0,i=a?a.toLocaleDateString(M.locales,t):\"\";return e(we,{props:X,label:X.label,initialValue:i})}case\"datetime\":{const t=M.dateTimeOptions?{hour:\"2-digit\",minute:\"2-digit\",month:\"numeric\",day:\"numeric\",...M.dateTimeOptions}:void 0,a=\"number\"==typeof ie||\"string\"==typeof ie||ie instanceof Date?new Date(ie):void 0,i=a?a.toLocaleTimeString(M.locales,t):\"\";return e(we,{props:X,label:X.label,initialValue:i})}case\"switch\":case\"checkbox\":return e(we,{props:X,label:X.label,initialValue:ie?\"✔\":\"✘\",inline:!0});case\"tags\":return e(we,{props:X,label:X.label,initialValue:ie||[]});case\"options\":case\"select\":{const t=void 0!==ie?ie instanceof Array?ie:[ie]:[],a=Z.filter(e=>t.indexOf(e.id)>=0),i=a&&0===a.length?\"?\":1===a.length?a[0].label:a.map(e=>e.label);return e(we,{props:X,label:X.label,initialValue:i})}case\"radio\":{const t=ie,a=Z.filter(e=>e.id===t);return e(we,{props:X,label:X.label,initialValue:a&&a.length?a[0].label:\"?\"})}case\"base64\":{const t=ie;return!(!t||!/data:image/i.test(t))&&e(\"div\",e(\"img.responsive-img\",{src:t,alt:s.title||s.alt||s.name||\"\",style:`max-height: ${r.max||50}px`}))}case\"file\":return e(\"div\",X,(ie instanceof Array?ie:[ie]).map((t=\"\")=>{const a=/data:image|.jpg$|.jpeg$|.png$|.gif$|.svg$|.bmp$|.tif$|.tiff$/i.test(t),i=`${new URL(r.url).origin}${t}`;return e(\"a[target=_blank]\",{href:i},a?e(\"img\",{src:i,alt:i,style:`max-height: ${r.max||50}`}):e(we,{props:X,label:r.placeholder||\"File\",initialValue:t}))}));case\"md\":case\"markdown\":{const a=\"string\"==typeof ie&&ie?t(ie):\"\";return e(we,{props:X,label:X.label,initialValue:a})}default:return e(we,{props:X,type:b,label:X.label,initialValue:ie})}}else{if(b&&i.hasOwnProperty(b))return e(i[b],{iv:ie,field:r,props:X,label:X.label,onchange:ae,obj:s,context:p});switch(b){case\"colour\":case\"color\":{const t=ie;return e(V,{...X,initialValue:t,onchange:ae,onblur:J})}case\"time\":{const{twelveHour:t=!1}=X,a=ie?\"number\"==typeof ie||\"string\"==typeof ie?new Date(ie):ie:new Date,i=ee(a);return s[g]=F?F(\"to\",a):a,e(B,{...X,twelveHour:t,initialValue:i,onchange:e=>{const t=e.split(\":\").map(e=>+e);a.setHours(t[0],t[1]),ae(a)},container:u})}case\"date\":{const{format:t=\"mmmm d, yyyy\"}=X,a=\"number\"==typeof ie||\"string\"==typeof ie?new Date(ie):ie;s[g]=a?F?F(\"to\",a.valueOf()):a.valueOf():a;const{min:i,max:n}=X,o=i?!a||ia.valueOf()?new Date(n):a:void 0;return e(q,{...X,minDate:o,maxDate:l,setDefaultDate:!!a,format:t,initialValue:a,onchange:e=>{ae(new Date(e))},container:u})}case\"datetime\":{const{label:t,className:a=\"col s12\",dateTimeSeconds:i=!1,twelveHour:n=!1,format:o=\"mmmm d, yyyy\",...l}=X,r=\"number\"==typeof ie||\"string\"==typeof ie?new Date(ie):ie,s={initialDateTime:r},c=r||void 0,d=r?ee(r):\"\",{min:p,max:m}=X,h=p?!r||pr.valueOf()?new Date(m):r:void 0,g=X.dateTimeOutput||\"UTC\",b=e=>{s.initialDateTime=e,ae(\"UTC\"===g?e.toUTCString():\"ISO\"===g?e.toISOString():e.valueOf())};return e(\"div\",{className:a},e(\".row\",[e(i?\".col.s6\":\".col.s8\",{style:\"padding: 0\"},e(q,{...l,label:t,minDate:h,maxDate:f,setDefaultDate:!!r,format:o,initialValue:c,container:u,onchange:e=>{const t=new Date(s.initialDateTime);t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(e.getDate()),b(t)}})),e(\".col.s4\",{style:\"min-width: 6rem; padding-right: 0; padding-left: 0\"},e(B,{...l,label:\"\",helperText:\"\",twelveHour:n,initialValue:d,container:u,onchange:e=>{const t=e.split(\":\").map(e=>+e),a=s.initialDateTime||new Date((new Date).setSeconds(0,0));a.setHours(t[0],t[1]),b(a)}})),i&&e(T,{style:\"min-width: 4rem; padding-right: 0; padding-left: 0\",className:\"col s2\",min:0,max:59,onchange:e=>{const t=s.initialDateTime||new Date((new Date).setSeconds(0,0));t.setSeconds(e,0),b(t)}})]))}case\"email\":{const t=ie;return e(j,{...X,validate:te,autofocus:c,onchange:ae,initialValue:t,onkeydown:U,onkeyup:H,onblur:J})}case\"number\":{const t=ie;return e(T,{...X,validate:te,autofocus:c,onchange:ae,initialValue:t,onkeydown:U,onkeyup:H,onblur:J})}case\"radio\":{const t=ie;return e(z,{label:\"\",...X,options:Z,checkedId:t,onchange:ae})}case\"checkbox\":{const t=ie;return e(P,{...X,checked:t,onchange:ae})}case\"options\":{const t=ie;return[[e(R,{key:o.key,checkboxClass:\"col s6 m4 l3\",className:\"input-field col s12\",...X,disabled:X.disabled||!Z||0===Z.length,options:Z,checkedId:t,onchange:e=>ae(1===e.length?e[0]:e.filter(e=>null!==e))})],void 0!==E&&e(\".col.s12.option-buttons\",[e(v,{disabled:X.disabled,label:ne,iconName:\"check\",onclick:()=>{o.key=Date.now(),ae(Z.map(e=>e.id))}}),oe&&e(v,{disabled:X.disabled,label:oe,iconName:\"check_box_outline_blank\",onclick:()=>{const e=s[g]||[];e.length=0,o.key=Date.now(),ae(e)}})])]}case\"select\":{const t=ie;return e(W,{placeholder:X.multiple?M.pickOneOrMore||\"Pick one or more\":M.pickOne||\"Pick one\",...X,disabled:X.disabled||!Z||0===Z.length,options:Z,initialValue:t,onchange:e=>ae(1!==e.length||X.multiple?e.filter(e=>null!==e||void 0!==e):e[0])})}case\"markdown\":case\"md\":{const{label:t,className:a=\"col s12\"}=X,i=ue((g?ie:k||t)||\"\",s,p);return e(ve,{md:i,className:a})}case\"section\":return e(\".divider\");case\"switch\":{const t=ie,a=Z&&Z.length>0?Z[0].label:\"\",i=Z&&Z.length>1?Z[1].label:\"\";return e(Y,{...X,left:a,right:i,checked:t,onchange:ae})}case\"tags\":{const t=(ie?ie instanceof Array?ie:[ie]:[]).map(e=>({tag:e})),a=Z&&Z.length>0?{data:Z.reduce((e,t)=>(e[t.id]=null,e),{}),limit:r.maxLength||Infinity,minLength:r.minLength||1}:{},{label:i,isMandatory:n,className:o,helperText:l}=X;return e(x,{className:o,label:i,isMandatory:n,helperText:l,onchange:e=>ae(e.map(e=>e.tag)),placeholder:r.placeholder||\"Add a tag\",secondaryPlaceholder:r.secondaryPlaceholder||\"+tag\",data:t,autocompleteOptions:a,onblur:J})}case\"autocomplete\":{const t=ie,a=Z&&Z.length>0?{data:Z.reduce((e,t)=>(e[t.id]=null,e),{}),limit:r.maxLength||Infinity,minLength:r.minLength||1}:{data:{}},{label:i,isMandatory:n,className:o,helperText:l}=X;return e(h,{initialValue:t,className:o,label:i,isMandatory:n,helperText:l,onchange:ae,onblur:J,placeholder:r.placeholder||\"...\",...a})}case\"textarea\":{const t=ie;return e(A,{...X,validate:te,autofocus:c,onchange:ae,initialValue:t,onkeyup:H,onkeydown:U,onblur:J})}case\"file\":{const t=ie,{url:a,placeholder:i}=r;if(!a)throw Error('Input field \"url\" not defined, which indicates the URL to the upload folder.');const n=Z?Z.map(e=>e.id):void 0,o=t=>{if(!t||t.length<1)return void ae(\"\");const i=new FormData;i.append(\"file\",t[0]),e.request({method:\"POST\",url:a,body:i}).then(e=>ae(e)).catch(console.error)};return e(L,{...X,accept:n,placeholder:i,onchange:o,initialValue:t})}case\"base64\":{const t=ie,a=!(!t||!/data:image/i.test(t)),{placeholder:i}=r,n=Z?Z.map(e=>e.id).join(\",\"):void 0,o=t=>{if(!t||t.length<1)return void ae(\"\");const a=new FileReader;a.onloadend=()=>{\"string\"==typeof a.result&&ae(a.result),e.redraw()},a.readAsDataURL(t[0])};return a?e(\"div\",[e(\"img.responsive-img\",{src:t,alt:s.title||s.alt||s.name||\"\",style:`max-height: ${r.max||50}px`}),e(v,{iconName:\"clear\",onclick:()=>ae(\"\")})]):e(L,{...X,accept:n,placeholder:i,onchange:o,initialValue:t})}case\"url\":{const t=ie;return e(C,{placeholder:\"http(s)://www.example.com\",...X,validate:te,autofocus:c,onchange:ae,initialValue:t,onkeydown:U,onkeyup:H,onblur:J})}case\"text\":{const t=ie;return e(S,{...X,validate:te,autofocus:c,onchange:ae,initialValue:t,onkeydown:U,onkeyup:H,onblur:J})}default:return}}}}},ke=()=>{const t={},a=(e,a)=>{const i=e instanceof Array?e.length:e.hasOwnProperty(a)?e[a].length:0,n=t.onNewItem?t.onNewItem(e,a,i):{};e instanceof Array?e.push(n):e.hasOwnProperty(a)?e[a].push(n):e[a]=[n]};let i;const n=e=>{e.preventDefault()};return{oninit:({attrs:{i18n:e={},field:{id:a=\"\",sortProperty:n,onNewItem:o}}})=>{t.editLabel=e.editRepeat||`Edit ${String(a)}`,t.createLabel=e.createRepeat||`Create new ${String(a)}`,t.onNewItem=o,i=(e=>{if(!e)return(e,t)=>0;const t=\"!\"===e[0],a=t?e.substring(1):e;return t?(e,t)=>e[a]>t[a]?-1:e[a]e[a]>t[a]?1:e[a]{const{filterValue:f}=t,{id:g,label:b,type:y,min:x,max:k,pageSize:N,propertyFilter:$,filterLabel:I,readonly:O=u,repeatItemClass:A=\"\"}=o,D=((e,t)=>e instanceof Array?e:(e.hasOwnProperty(t)||(e[t]=[]),e[t]))(l,g),T=f?fe(f):void 0,M=$&&T&&T.length>2?D.filter(e=>fe(`${e[$]}`).indexOf(T)>=0):D,C=(e=>{const t=window.location.hash.split(\"?\")[1];return t?new URLSearchParams(t).get(e):null})(String(g)),V=C?Math.min(M.length,+C):1,j=N&&M&&(V-1)*N(j-1)*N<=t&&t!0,P=e.route.get()||location.href.replace(location.origin,\"\").replace(\"/#!\",\"\"),R=N?Math.ceil(M.length/N):0,F=!!(k&&M.length>=k),H=!p&&!O&&(!x||M.length>x),U=P?P.split(\"?\")[0]:\"\",q=(e=>{const t=e?e.split(\"?\")[1]:window.location.search.slice(1),a={};if(t){const e=t.split(\"&\");for(var i=0;i{a(l,String(g)),g&&e.route.set(U,Object.assign(q,{[g]:M.length})),h&&h(l)},style:{padding:0},className:\"left\",disabled:p||F,readonly:O}),R>1&&e(\".right\",e(_,{curPage:j,items:ge(1,R).map(e=>({href:ye(U,q,{[g]:e})}))})),(M.length>1||f)&&$&&!p&&e(S,{style:\"margin-top: -6px; margin-bottom: -1rem;\",iconName:\"filter_list\",iconClass:\"small\",placeholder:I,onkeyup:(e,a)=>t.filterValue=a,className:\"right\",disabled:p,readonly:O})])),M&&M.length>0&&\"string\"!=typeof y&&M.sort(i).filter(L).map((a,i)=>e(\".mui-repeat-item\",{key:i,draggable:J,ondragstart:J?e=>((e,t)=>{e.dataTransfer?.setData(\"text/plain\",t.toString())})(e,i):void 0,ondragover:J?n:void 0,ondrop:J?e=>((e,t,a,i,n)=>{const o=parseInt(e.dataTransfer?.getData(\"text\")||\"0\",10),l=[...a[i]],[r]=l.splice(o,1);l.splice(t,0,r),a[i]=l,n&&n(a),e.preventDefault()})(e,i,l,g,h):void 0,style:{display:\"flex\",cursor:J?\"move\":void 0}},[H&&[(!N||N>1)&&e(\"span.mui-show-item-number left\",{style:`flex: 0 0 ${B}px;`},`[${(N?(j-1)*N+i:i)+1}]`)],[e(\".row.repeat-item\",{className:A,key:V+be(a),style:\"flex: 1;\"},[y&&e(De,{form:y,obj:a,i18n:m,context:r instanceof Array?[l,...r]:[l,r],section:c,containerId:d,disabled:p,readonly:O,onchange:()=>h&&h(l)})])],H&&[e(v,{iconName:\"delete\",className:\"mui-delete-item\",iconClass:\"mui-delete-icon\",style:{flex:\"0 0 20px\",padding:0},disabled:p,readonly:O,onclick:()=>{t.curItemIdx=N?(j-1)*N+i:i}})]])),!(p||F||O||!M||0===M.length||1===N)&&e(w,{iconName:\"add\",className:\"row mui-add-new-item btn-small right\",title:b,style:\"padding: 0; margin-top: -10px; margin-right: -25px\",onclick:()=>{a(l,String(g)),e.route.set(U,Object.assign(q,{[g]:M.length})),h&&h(l)}})])],void 0!==t.curItemIdx&&e(E,{id:\"deleteItem\",onCreate:e=>e.open(),options:{onCloseStart:()=>{t.curItemIdx=void 0,e.redraw()}},fixedFooter:!0,title:m.deleteItem||\"Delete item\",description:e(De,{form:y,obj:M[t.curItemIdx],context:r instanceof Array?[l,...r]:[l,r],section:c,containerId:d,readonly:!0,i18n:m}),buttons:[{label:m.disagree||\"Disagree\"},{label:m.agree||\"Agree\",onclick:()=>{void 0!==t.curItemIdx&&(M.splice(t.curItemIdx,1),l instanceof Array?l=[...M]:l[g]=[...M],h&&h(l))}}]})]}}},Ne=()=>{const t={};return{oninit:({attrs:{i18n:e={}}})=>{const{raw:a=\"RAW\",view:i=\"VIEW\"}=e;t.raw=a,t.view=i},view:({attrs:{field:{id:a=\"\",type:i,onSelect:n},obj:o,context:l,containerId:r,disabled:s,readonly:c,i18n:d,onchange:p}})=>{if(o instanceof Array)return;const u=o[a],m=u?JSON.parse(u):void 0,h=m&&m.features||[],f=[],g={title:t.raw,vnode:e(A,{class:\"col s12\",initialValue:m?JSON.stringify(m,null,2):void 0,placeholder:\"Enter GeoJSON\",onchange:e=>o[a]=e})};if(!i||\"string\"==typeof i)return;const b=i,y=b.length>0?b[0].id:void 0,v={title:t.view,vnode:h.length?e(N,{oncreate:({dom:e})=>t.dom=e,onOpenStart:n?e=>{const a=t.dom.children||[];for(let t=0;t(t.properties||(t.properties={}),{id:\"erik_\"+i,key:i,header:y&&t.properties[y]||t.geometry.type,body:e(\".row\",e(De,{class:\"col s12\",form:b,obj:t.properties,i18n:d,context:l instanceof Array?[o,...l]:[o,l],containerId:r,disabled:s,readonly:c,onchange:(e,t)=>{t&&(h[i].properties=t),o[a]=JSON.stringify(m,null,2),p&&p(o)}}))}))}):e(\"span\",\"...\")};return f.push(v),f.push(g),e(Z,{tabs:f,tabWidth:\"fill\"})}}},$e={},Ie={},Oe=(e,t,a)=>{$e[e]=t,a&&(Ie[e]=a)},Ae=xe($e,Ie),De=()=>({view:({attrs:{i18n:t,form:a,obj:i,onchange:n,disabled:o,readonly:l,context:r,section:s}})=>{const c=e=>n&&n(((e,t)=>t.filter(e=>e.required&&void 0!==typeof e.id).reduce((t,a)=>t&&!(a.id&&(void 0===e[a.id]||e[a.id]instanceof Array&&0===e[a.id].length||\"string\"==typeof e[a.id]&&0===e[a.id].length)),!0))(e,a),e);return a.filter((e=>{if(!e)return e=>!0;let t=!1;return({type:a,id:i})=>\"section\"===a?(t=i===e,!1):t})(s)).filter(e=>!e.show||le(e.show,i,...r||[])).reduce((a,n)=>(n.type||(n.type=(e=>{const{autogenerate:t,value:a,options:i}=e;return t?\"none\":a?\"string\"==typeof a?\"md\":\"number\"==typeof a?\"number\":\"boolean\"==typeof a?\"checkbox\":\"none\":i&&i.length>0?\"select\":\"none\"})(n)),[...a,void 0===n.repeat||!1===n.repeat?e(Ae,{i18n:t,field:n,obj:i,onchange:c,disabled:o,readonly:l,context:r,section:s,containerId:\"body\"}):e(\"geojson\"===n.repeat?Ne:ke,{obj:i,field:n,onchange:c,context:r,i18n:t,containerId:\"body\",disabled:o,readonly:l})]),[])}});export{xe as FormFieldFactory,De as LayoutForm,we as ReadonlyComponent,ke as RepeatList,ve as SlimdownView,G as capitalizeFirstLetter,me as deepCopy,ae as flatten,pe as formatExpression,te as getPath,Q as isComponentType,he as labelResolver,X as padLeft,ge as range,Oe as registerPlugin,re as resolveExpression,fe as stripSpaces,ee as toHourMin};\n//# sourceMappingURL=index.esm.js.map\n","var __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nvar __async = (__this, __arguments, generator) => {\n return new Promise((resolve2, reject) => {\n var fulfilled = (value) => {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n };\n var rejected = (value) => {\n try {\n step(generator.throw(value));\n } catch (e) {\n reject(e);\n }\n };\n var step = (x) => x.done ? resolve2(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);\n step((generator = generator.apply(__this, __arguments)).next());\n });\n};\nclass BaseXmlComponent {\n constructor(rootKey) {\n __publicField(this, \"rootKey\");\n this.rootKey = rootKey;\n }\n}\nconst EMPTY_OBJECT = Object.seal({});\nclass XmlComponent extends BaseXmlComponent {\n constructor(rootKey) {\n super(rootKey);\n // eslint-disable-next-line functional/prefer-readonly-type, @typescript-eslint/no-explicit-any\n __publicField(this, \"root\");\n this.root = new Array();\n }\n // This method is called by the formatter to get the XML representation of this component.\n // It is called recursively for all child components.\n // It is a serializer to be used in the xml library.\n // https://www.npmjs.com/package/xml\n // Child components can override this method to customize the XML representation, or execute side effects.\n prepForXml(context) {\n var _a;\n context.stack.push(this);\n const children = this.root.map((comp) => {\n if (comp instanceof BaseXmlComponent) {\n return comp.prepForXml(context);\n }\n return comp;\n }).filter((comp) => comp !== void 0);\n context.stack.pop();\n return {\n [this.rootKey]: children.length ? children.length === 1 && ((_a = children[0]) == null ? void 0 : _a._attr) ? children[0] : children : EMPTY_OBJECT\n };\n }\n /**\n * @deprecated Do not use this method. It is only used internally by the library. It will be removed in a future version.\n */\n addChildElement(child) {\n this.root.push(child);\n return this;\n }\n}\nclass IgnoreIfEmptyXmlComponent extends XmlComponent {\n prepForXml(context) {\n const result = super.prepForXml(context);\n if (result && (typeof result[this.rootKey] !== \"object\" || Object.keys(result[this.rootKey]).length)) {\n return result;\n }\n return void 0;\n }\n}\nclass XmlAttributeComponent extends BaseXmlComponent {\n constructor(root) {\n super(\"_attr\");\n __publicField(this, \"xmlKeys\");\n this.root = root;\n }\n prepForXml(_) {\n const attrs = {};\n Object.keys(this.root).forEach((key) => {\n const value = this.root[key];\n if (value !== void 0) {\n const newKey = this.xmlKeys && this.xmlKeys[key] || key;\n attrs[newKey] = value;\n }\n });\n return { _attr: attrs };\n }\n}\nclass NextAttributeComponent extends BaseXmlComponent {\n constructor(root) {\n super(\"_attr\");\n this.root = root;\n }\n prepForXml(_) {\n const attrs = Object.values(this.root).filter(({ value }) => value !== void 0).reduce((acc, { key, value }) => __spreadProps(__spreadValues({}, acc), { [key]: value }), {});\n return { _attr: attrs };\n }\n}\nclass Attributes extends XmlAttributeComponent {\n constructor() {\n super(...arguments);\n __publicField(this, \"xmlKeys\", {\n val: \"w:val\",\n color: \"w:color\",\n fill: \"w:fill\",\n space: \"w:space\",\n sz: \"w:sz\",\n type: \"w:type\",\n rsidR: \"w:rsidR\",\n rsidRPr: \"w:rsidRPr\",\n rsidSect: \"w:rsidSect\",\n w: \"w:w\",\n h: \"w:h\",\n top: \"w:top\",\n right: \"w:right\",\n bottom: \"w:bottom\",\n left: \"w:left\",\n header: \"w:header\",\n footer: \"w:footer\",\n gutter: \"w:gutter\",\n linePitch: \"w:linePitch\",\n pos: \"w:pos\"\n });\n }\n}\nvar commonjsGlobal = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nfunction getDefaultExportFromCjs$1(x) {\n return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, \"default\") ? x[\"default\"] : x;\n}\nvar sax$1 = {};\nvar events = { exports: {} };\nvar R = typeof Reflect === \"object\" ? Reflect : null;\nvar ReflectApply = R && typeof R.apply === \"function\" ? R.apply : function ReflectApply2(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n};\nvar ReflectOwnKeys;\nif (R && typeof R.ownKeys === \"function\") {\n ReflectOwnKeys = R.ownKeys;\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys2(target) {\n return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys2(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn)\n console.warn(warning);\n}\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN2(value) {\n return value !== value;\n};\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nevents.exports = EventEmitter;\nevents.exports.once = once2;\nEventEmitter.EventEmitter = EventEmitter;\nEventEmitter.prototype._events = void 0;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = void 0;\nvar defaultMaxListeners = 10;\nfunction checkListener(listener) {\n if (typeof listener !== \"function\") {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\nObject.defineProperty(EventEmitter, \"defaultMaxListeners\", {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== \"number\" || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + \".\");\n }\n defaultMaxListeners = arg;\n }\n});\nEventEmitter.init = function() {\n if (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {\n this._events = /* @__PURE__ */ Object.create(null);\n this._eventsCount = 0;\n }\n this._maxListeners = this._maxListeners || void 0;\n};\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== \"number\" || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + \".\");\n }\n this._maxListeners = n;\n return this;\n};\nfunction _getMaxListeners(that) {\n if (that._maxListeners === void 0)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++)\n args.push(arguments[i]);\n var doError = type === \"error\";\n var events2 = this._events;\n if (events2 !== void 0)\n doError = doError && events2.error === void 0;\n else if (!doError)\n return false;\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n throw er;\n }\n var err = new Error(\"Unhandled error.\" + (er ? \" (\" + er.message + \")\" : \"\"));\n err.context = er;\n throw err;\n }\n var handler = events2[type];\n if (handler === void 0)\n return false;\n if (typeof handler === \"function\") {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners2 = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners2[i], this, args);\n }\n return true;\n};\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events2;\n var existing;\n checkListener(listener);\n events2 = target._events;\n if (events2 === void 0) {\n events2 = target._events = /* @__PURE__ */ Object.create(null);\n target._eventsCount = 0;\n } else {\n if (events2.newListener !== void 0) {\n target.emit(\n \"newListener\",\n type,\n listener.listener ? listener.listener : listener\n );\n events2 = target._events;\n }\n existing = events2[type];\n }\n if (existing === void 0) {\n existing = events2[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === \"function\") {\n existing = events2[type] = prepend ? [listener, existing] : [existing, listener];\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n var w = new Error(\"Possible EventEmitter memory leak detected. \" + existing.length + \" \" + String(type) + \" listeners added. Use emitter.setMaxListeners() to increase limit\");\n w.name = \"MaxListenersExceededWarning\";\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n return target;\n}\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\nEventEmitter.prototype.prependListener = function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n};\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\nfunction _onceWrap(target, type, listener) {\n var state2 = { fired: false, wrapFn: void 0, target, type, listener };\n var wrapped = onceWrapper.bind(state2);\n wrapped.listener = listener;\n state2.wrapFn = wrapped;\n return wrapped;\n}\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\nEventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n};\nEventEmitter.prototype.removeListener = function removeListener(type, listener) {\n var list, events2, position, i, originalListener;\n checkListener(listener);\n events2 = this._events;\n if (events2 === void 0)\n return this;\n list = events2[type];\n if (list === void 0)\n return this;\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = /* @__PURE__ */ Object.create(null);\n else {\n delete events2[type];\n if (events2.removeListener)\n this.emit(\"removeListener\", type, list.listener || listener);\n }\n } else if (typeof list !== \"function\") {\n position = -1;\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n if (position < 0)\n return this;\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n if (list.length === 1)\n events2[type] = list[0];\n if (events2.removeListener !== void 0)\n this.emit(\"removeListener\", type, originalListener || listener);\n }\n return this;\n};\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(type) {\n var listeners2, events2, i;\n events2 = this._events;\n if (events2 === void 0)\n return this;\n if (events2.removeListener === void 0) {\n if (arguments.length === 0) {\n this._events = /* @__PURE__ */ Object.create(null);\n this._eventsCount = 0;\n } else if (events2[type] !== void 0) {\n if (--this._eventsCount === 0)\n this._events = /* @__PURE__ */ Object.create(null);\n else\n delete events2[type];\n }\n return this;\n }\n if (arguments.length === 0) {\n var keys = Object.keys(events2);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === \"removeListener\")\n continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners(\"removeListener\");\n this._events = /* @__PURE__ */ Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n listeners2 = events2[type];\n if (typeof listeners2 === \"function\") {\n this.removeListener(type, listeners2);\n } else if (listeners2 !== void 0) {\n for (i = listeners2.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners2[i]);\n }\n }\n return this;\n};\nfunction _listeners(target, type, unwrap) {\n var events2 = target._events;\n if (events2 === void 0)\n return [];\n var evlistener = events2[type];\n if (evlistener === void 0)\n return [];\n if (typeof evlistener === \"function\")\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === \"function\") {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events2 = this._events;\n if (events2 !== void 0) {\n var evlistener = events2[type];\n if (typeof evlistener === \"function\") {\n return 1;\n } else if (evlistener !== void 0) {\n return evlistener.length;\n }\n }\n return 0;\n}\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\nfunction once2(emitter, name) {\n return new Promise(function(resolve2, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n function resolver() {\n if (typeof emitter.removeListener === \"function\") {\n emitter.removeListener(\"error\", errorListener);\n }\n resolve2([].slice.call(arguments));\n }\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== \"error\") {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === \"function\") {\n eventTargetAgnosticAddListener(emitter, \"error\", handler, flags);\n }\n}\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === \"function\") {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === \"function\") {\n emitter.addEventListener(name, function wrapListener(arg) {\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\nvar eventsExports = events.exports;\nvar inherits_browser = { exports: {} };\nif (typeof Object.create === \"function\") {\n inherits_browser.exports = function inherits2(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n }\n };\n} else {\n inherits_browser.exports = function inherits2(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n };\n}\nvar inherits_browserExports = inherits_browser.exports;\nfunction getDefaultExportFromCjs(x) {\n return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, \"default\") ? x[\"default\"] : x;\n}\nvar browser$1 = { exports: {} };\nvar process = browser$1.exports = {};\nvar cachedSetTimeout;\nvar cachedClearTimeout;\nfunction defaultSetTimout() {\n throw new Error(\"setTimeout has not been defined\");\n}\nfunction defaultClearTimeout() {\n throw new Error(\"clearTimeout has not been defined\");\n}\n(function() {\n try {\n if (typeof setTimeout === \"function\") {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === \"function\") {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n})();\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n return setTimeout(fun, 0);\n }\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n return cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n return cachedSetTimeout.call(null, fun, 0);\n } catch (e2) {\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n return clearTimeout(marker);\n }\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n return cachedClearTimeout(marker);\n } catch (e) {\n try {\n return cachedClearTimeout.call(null, marker);\n } catch (e2) {\n return cachedClearTimeout.call(this, marker);\n }\n }\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n var len = queue.length;\n while (len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\nprocess.nextTick = function(fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function() {\n this.fun.apply(null, this.array);\n};\nprocess.title = \"browser\";\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = \"\";\nprocess.versions = {};\nfunction noop() {\n}\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\nprocess.listeners = function(name) {\n return [];\n};\nprocess.binding = function(name) {\n throw new Error(\"process.binding is not supported\");\n};\nprocess.cwd = function() {\n return \"/\";\n};\nprocess.chdir = function(dir) {\n throw new Error(\"process.chdir is not supported\");\n};\nprocess.umask = function() {\n return 0;\n};\nvar browserExports = browser$1.exports;\nconst process$1 = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);\nvar streamBrowser;\nvar hasRequiredStreamBrowser;\nfunction requireStreamBrowser() {\n if (hasRequiredStreamBrowser)\n return streamBrowser;\n hasRequiredStreamBrowser = 1;\n streamBrowser = eventsExports.EventEmitter;\n return streamBrowser;\n}\nvar buffer = {};\nvar base64Js = {};\nvar hasRequiredBase64Js;\nfunction requireBase64Js() {\n if (hasRequiredBase64Js)\n return base64Js;\n hasRequiredBase64Js = 1;\n base64Js.byteLength = byteLength;\n base64Js.toByteArray = toByteArray;\n base64Js.fromByteArray = fromByteArray;\n var lookup = [];\n var revLookup = [];\n var Arr = typeof Uint8Array !== \"undefined\" ? Uint8Array : Array;\n var code = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n }\n revLookup[\"-\".charCodeAt(0)] = 62;\n revLookup[\"_\".charCodeAt(0)] = 63;\n function getLens(b64) {\n var len2 = b64.length;\n if (len2 % 4 > 0) {\n throw new Error(\"Invalid string. Length must be a multiple of 4\");\n }\n var validLen = b64.indexOf(\"=\");\n if (validLen === -1)\n validLen = len2;\n var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;\n return [validLen, placeHoldersLen];\n }\n function byteLength(b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function _byteLength(b64, validLen, placeHoldersLen) {\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function toByteArray(b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n var curByte = 0;\n var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;\n var i2;\n for (i2 = 0; i2 < len2; i2 += 4) {\n tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)];\n arr[curByte++] = tmp >> 16 & 255;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 2) {\n tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 1) {\n tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n return arr;\n }\n function tripletToBase64(num) {\n return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];\n }\n function encodeChunk(uint8, start, end) {\n var tmp;\n var output = [];\n for (var i2 = start; i2 < end; i2 += 3) {\n tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255);\n output.push(tripletToBase64(tmp));\n }\n return output.join(\"\");\n }\n function fromByteArray(uint8) {\n var tmp;\n var len2 = uint8.length;\n var extraBytes = len2 % 3;\n var parts = [];\n var maxChunkLength = 16383;\n for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) {\n parts.push(encodeChunk(uint8, i2, i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength));\n }\n if (extraBytes === 1) {\n tmp = uint8[len2 - 1];\n parts.push(\n lookup[tmp >> 2] + lookup[tmp << 4 & 63] + \"==\"\n );\n } else if (extraBytes === 2) {\n tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];\n parts.push(\n lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + \"=\"\n );\n }\n return parts.join(\"\");\n }\n return base64Js;\n}\nvar ieee754 = {};\n/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nvar hasRequiredIeee754;\nfunction requireIeee754() {\n if (hasRequiredIeee754)\n return ieee754;\n hasRequiredIeee754 = 1;\n ieee754.read = function(buffer2, offset, isLE, mLen, nBytes) {\n var e, m;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE ? nBytes - 1 : 0;\n var d = isLE ? -1 : 1;\n var s = buffer2[offset + i];\n i += d;\n e = s & (1 << -nBits) - 1;\n s >>= -nBits;\n nBits += eLen;\n for (; nBits > 0; e = e * 256 + buffer2[offset + i], i += d, nBits -= 8) {\n }\n m = e & (1 << -nBits) - 1;\n e >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer2[offset + i], i += d, nBits -= 8) {\n }\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : (s ? -1 : 1) * Infinity;\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\n };\n ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {\n var e, m, c;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n var i = isLE ? 0 : nBytes - 1;\n var d = isLE ? 1 : -1;\n var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n value = Math.abs(value);\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n for (; mLen >= 8; buffer2[offset + i] = m & 255, i += d, m /= 256, mLen -= 8) {\n }\n e = e << mLen | m;\n eLen += mLen;\n for (; eLen > 0; buffer2[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {\n }\n buffer2[offset + i - d] |= s * 128;\n };\n return ieee754;\n}\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\nvar hasRequiredBuffer;\nfunction requireBuffer() {\n if (hasRequiredBuffer)\n return buffer;\n hasRequiredBuffer = 1;\n (function(exports) {\n var base64 = requireBase64Js();\n var ieee7542 = requireIeee754();\n var customInspectSymbol = typeof Symbol === \"function\" && typeof Symbol[\"for\"] === \"function\" ? Symbol[\"for\"](\"nodejs.util.inspect.custom\") : null;\n exports.Buffer = Buffer2;\n exports.SlowBuffer = SlowBuffer;\n exports.INSPECT_MAX_BYTES = 50;\n var K_MAX_LENGTH = 2147483647;\n exports.kMaxLength = K_MAX_LENGTH;\n Buffer2.TYPED_ARRAY_SUPPORT = typedArraySupport();\n if (!Buffer2.TYPED_ARRAY_SUPPORT && typeof console !== \"undefined\" && typeof console.error === \"function\") {\n console.error(\n \"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"\n );\n }\n function typedArraySupport() {\n try {\n var arr = new Uint8Array(1);\n var proto = { foo: function() {\n return 42;\n } };\n Object.setPrototypeOf(proto, Uint8Array.prototype);\n Object.setPrototypeOf(arr, proto);\n return arr.foo() === 42;\n } catch (e) {\n return false;\n }\n }\n Object.defineProperty(Buffer2.prototype, \"parent\", {\n enumerable: true,\n get: function() {\n if (!Buffer2.isBuffer(this))\n return void 0;\n return this.buffer;\n }\n });\n Object.defineProperty(Buffer2.prototype, \"offset\", {\n enumerable: true,\n get: function() {\n if (!Buffer2.isBuffer(this))\n return void 0;\n return this.byteOffset;\n }\n });\n function createBuffer(length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"');\n }\n var buf = new Uint8Array(length);\n Object.setPrototypeOf(buf, Buffer2.prototype);\n return buf;\n }\n function Buffer2(arg, encodingOrOffset, length) {\n if (typeof arg === \"number\") {\n if (typeof encodingOrOffset === \"string\") {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n );\n }\n return allocUnsafe(arg);\n }\n return from(arg, encodingOrOffset, length);\n }\n Buffer2.poolSize = 8192;\n function from(value, encodingOrOffset, length) {\n if (typeof value === \"string\") {\n return fromString(value, encodingOrOffset);\n }\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value);\n }\n if (value == null) {\n throw new TypeError(\n \"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value\n );\n }\n if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n if (typeof SharedArrayBuffer !== \"undefined\" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n if (typeof value === \"number\") {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n );\n }\n var valueOf = value.valueOf && value.valueOf();\n if (valueOf != null && valueOf !== value) {\n return Buffer2.from(valueOf, encodingOrOffset, length);\n }\n var b = fromObject(value);\n if (b)\n return b;\n if (typeof Symbol !== \"undefined\" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === \"function\") {\n return Buffer2.from(\n value[Symbol.toPrimitive](\"string\"),\n encodingOrOffset,\n length\n );\n }\n throw new TypeError(\n \"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value\n );\n }\n Buffer2.from = function(value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length);\n };\n Object.setPrototypeOf(Buffer2.prototype, Uint8Array.prototype);\n Object.setPrototypeOf(Buffer2, Uint8Array);\n function assertSize(size) {\n if (typeof size !== \"number\") {\n throw new TypeError('\"size\" argument must be of type number');\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"');\n }\n }\n function alloc(size, fill, encoding) {\n assertSize(size);\n if (size <= 0) {\n return createBuffer(size);\n }\n if (fill !== void 0) {\n return typeof encoding === \"string\" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);\n }\n return createBuffer(size);\n }\n Buffer2.alloc = function(size, fill, encoding) {\n return alloc(size, fill, encoding);\n };\n function allocUnsafe(size) {\n assertSize(size);\n return createBuffer(size < 0 ? 0 : checked(size) | 0);\n }\n Buffer2.allocUnsafe = function(size) {\n return allocUnsafe(size);\n };\n Buffer2.allocUnsafeSlow = function(size) {\n return allocUnsafe(size);\n };\n function fromString(string, encoding) {\n if (typeof encoding !== \"string\" || encoding === \"\") {\n encoding = \"utf8\";\n }\n if (!Buffer2.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n var length = byteLength(string, encoding) | 0;\n var buf = createBuffer(length);\n var actual = buf.write(string, encoding);\n if (actual !== length) {\n buf = buf.slice(0, actual);\n }\n return buf;\n }\n function fromArrayLike(array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0;\n var buf = createBuffer(length);\n for (var i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255;\n }\n return buf;\n }\n function fromArrayView(arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n var copy = new Uint8Array(arrayView);\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);\n }\n return fromArrayLike(arrayView);\n }\n function fromArrayBuffer(array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds');\n }\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds');\n }\n var buf;\n if (byteOffset === void 0 && length === void 0) {\n buf = new Uint8Array(array);\n } else if (length === void 0) {\n buf = new Uint8Array(array, byteOffset);\n } else {\n buf = new Uint8Array(array, byteOffset, length);\n }\n Object.setPrototypeOf(buf, Buffer2.prototype);\n return buf;\n }\n function fromObject(obj) {\n if (Buffer2.isBuffer(obj)) {\n var len = checked(obj.length) | 0;\n var buf = createBuffer(len);\n if (buf.length === 0) {\n return buf;\n }\n obj.copy(buf, 0, 0, len);\n return buf;\n }\n if (obj.length !== void 0) {\n if (typeof obj.length !== \"number\" || numberIsNaN(obj.length)) {\n return createBuffer(0);\n }\n return fromArrayLike(obj);\n }\n if (obj.type === \"Buffer\" && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data);\n }\n }\n function checked(length) {\n if (length >= K_MAX_LENGTH) {\n throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\" + K_MAX_LENGTH.toString(16) + \" bytes\");\n }\n return length | 0;\n }\n function SlowBuffer(length) {\n if (+length != length) {\n length = 0;\n }\n return Buffer2.alloc(+length);\n }\n Buffer2.isBuffer = function isBuffer(b) {\n return b != null && b._isBuffer === true && b !== Buffer2.prototype;\n };\n Buffer2.compare = function compare(a, b) {\n if (isInstance(a, Uint8Array))\n a = Buffer2.from(a, a.offset, a.byteLength);\n if (isInstance(b, Uint8Array))\n b = Buffer2.from(b, b.offset, b.byteLength);\n if (!Buffer2.isBuffer(a) || !Buffer2.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n );\n }\n if (a === b)\n return 0;\n var x = a.length;\n var y = b.length;\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n if (x < y)\n return -1;\n if (y < x)\n return 1;\n return 0;\n };\n Buffer2.isEncoding = function isEncoding(encoding) {\n switch (String(encoding).toLowerCase()) {\n case \"hex\":\n case \"utf8\":\n case \"utf-8\":\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n case \"base64\":\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return true;\n default:\n return false;\n }\n };\n Buffer2.concat = function concat(list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n if (list.length === 0) {\n return Buffer2.alloc(0);\n }\n var i;\n if (length === void 0) {\n length = 0;\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n var buffer2 = Buffer2.allocUnsafe(length);\n var pos = 0;\n for (i = 0; i < list.length; ++i) {\n var buf = list[i];\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer2.length) {\n Buffer2.from(buf).copy(buffer2, pos);\n } else {\n Uint8Array.prototype.set.call(\n buffer2,\n buf,\n pos\n );\n }\n } else if (!Buffer2.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n } else {\n buf.copy(buffer2, pos);\n }\n pos += buf.length;\n }\n return buffer2;\n };\n function byteLength(string, encoding) {\n if (Buffer2.isBuffer(string)) {\n return string.length;\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength;\n }\n if (typeof string !== \"string\") {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string\n );\n }\n var len = string.length;\n var mustMatch = arguments.length > 2 && arguments[2] === true;\n if (!mustMatch && len === 0)\n return 0;\n var loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return len;\n case \"utf8\":\n case \"utf-8\":\n return utf8ToBytes(string).length;\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return len * 2;\n case \"hex\":\n return len >>> 1;\n case \"base64\":\n return base64ToBytes(string).length;\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length;\n }\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer2.byteLength = byteLength;\n function slowToString(encoding, start, end) {\n var loweredCase = false;\n if (start === void 0 || start < 0) {\n start = 0;\n }\n if (start > this.length) {\n return \"\";\n }\n if (end === void 0 || end > this.length) {\n end = this.length;\n }\n if (end <= 0) {\n return \"\";\n }\n end >>>= 0;\n start >>>= 0;\n if (end <= start) {\n return \"\";\n }\n if (!encoding)\n encoding = \"utf8\";\n while (true) {\n switch (encoding) {\n case \"hex\":\n return hexSlice(this, start, end);\n case \"utf8\":\n case \"utf-8\":\n return utf8Slice(this, start, end);\n case \"ascii\":\n return asciiSlice(this, start, end);\n case \"latin1\":\n case \"binary\":\n return latin1Slice(this, start, end);\n case \"base64\":\n return base64Slice(this, start, end);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return utf16leSlice(this, start, end);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (encoding + \"\").toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer2.prototype._isBuffer = true;\n function swap(b, n, m) {\n var i = b[n];\n b[n] = b[m];\n b[m] = i;\n }\n Buffer2.prototype.swap16 = function swap16() {\n var len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 16-bits\");\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n return this;\n };\n Buffer2.prototype.swap32 = function swap32() {\n var len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 32-bits\");\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n return this;\n };\n Buffer2.prototype.swap64 = function swap64() {\n var len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 64-bits\");\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7);\n swap(this, i + 1, i + 6);\n swap(this, i + 2, i + 5);\n swap(this, i + 3, i + 4);\n }\n return this;\n };\n Buffer2.prototype.toString = function toString() {\n var length = this.length;\n if (length === 0)\n return \"\";\n if (arguments.length === 0)\n return utf8Slice(this, 0, length);\n return slowToString.apply(this, arguments);\n };\n Buffer2.prototype.toLocaleString = Buffer2.prototype.toString;\n Buffer2.prototype.equals = function equals(b) {\n if (!Buffer2.isBuffer(b))\n throw new TypeError(\"Argument must be a Buffer\");\n if (this === b)\n return true;\n return Buffer2.compare(this, b) === 0;\n };\n Buffer2.prototype.inspect = function inspect() {\n var str = \"\";\n var max = exports.INSPECT_MAX_BYTES;\n str = this.toString(\"hex\", 0, max).replace(/(.{2})/g, \"$1 \").trim();\n if (this.length > max)\n str += \" ... \";\n return \"\";\n };\n if (customInspectSymbol) {\n Buffer2.prototype[customInspectSymbol] = Buffer2.prototype.inspect;\n }\n Buffer2.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer2.from(target, target.offset, target.byteLength);\n }\n if (!Buffer2.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target\n );\n }\n if (start === void 0) {\n start = 0;\n }\n if (end === void 0) {\n end = target ? target.length : 0;\n }\n if (thisStart === void 0) {\n thisStart = 0;\n }\n if (thisEnd === void 0) {\n thisEnd = this.length;\n }\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError(\"out of range index\");\n }\n if (thisStart >= thisEnd && start >= end) {\n return 0;\n }\n if (thisStart >= thisEnd) {\n return -1;\n }\n if (start >= end) {\n return 1;\n }\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n if (this === target)\n return 0;\n var x = thisEnd - thisStart;\n var y = end - start;\n var len = Math.min(x, y);\n var thisCopy = this.slice(thisStart, thisEnd);\n var targetCopy = target.slice(start, end);\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break;\n }\n }\n if (x < y)\n return -1;\n if (y < x)\n return 1;\n return 0;\n };\n function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {\n if (buffer2.length === 0)\n return -1;\n if (typeof byteOffset === \"string\") {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 2147483647) {\n byteOffset = 2147483647;\n } else if (byteOffset < -2147483648) {\n byteOffset = -2147483648;\n }\n byteOffset = +byteOffset;\n if (numberIsNaN(byteOffset)) {\n byteOffset = dir ? 0 : buffer2.length - 1;\n }\n if (byteOffset < 0)\n byteOffset = buffer2.length + byteOffset;\n if (byteOffset >= buffer2.length) {\n if (dir)\n return -1;\n else\n byteOffset = buffer2.length - 1;\n } else if (byteOffset < 0) {\n if (dir)\n byteOffset = 0;\n else\n return -1;\n }\n if (typeof val === \"string\") {\n val = Buffer2.from(val, encoding);\n }\n if (Buffer2.isBuffer(val)) {\n if (val.length === 0) {\n return -1;\n }\n return arrayIndexOf(buffer2, val, byteOffset, encoding, dir);\n } else if (typeof val === \"number\") {\n val = val & 255;\n if (typeof Uint8Array.prototype.indexOf === \"function\") {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer2, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer2, val, byteOffset);\n }\n }\n return arrayIndexOf(buffer2, [val], byteOffset, encoding, dir);\n }\n throw new TypeError(\"val must be string, number or Buffer\");\n }\n function arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n var indexSize = 1;\n var arrLength = arr.length;\n var valLength = val.length;\n if (encoding !== void 0) {\n encoding = String(encoding).toLowerCase();\n if (encoding === \"ucs2\" || encoding === \"ucs-2\" || encoding === \"utf16le\" || encoding === \"utf-16le\") {\n if (arr.length < 2 || val.length < 2) {\n return -1;\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n function read(buf, i2) {\n if (indexSize === 1) {\n return buf[i2];\n } else {\n return buf.readUInt16BE(i2 * indexSize);\n }\n }\n var i;\n if (dir) {\n var foundIndex = -1;\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1)\n foundIndex = i;\n if (i - foundIndex + 1 === valLength)\n return foundIndex * indexSize;\n } else {\n if (foundIndex !== -1)\n i -= i - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength)\n byteOffset = arrLength - valLength;\n for (i = byteOffset; i >= 0; i--) {\n var found = true;\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break;\n }\n }\n if (found)\n return i;\n }\n }\n return -1;\n }\n Buffer2.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1;\n };\n Buffer2.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n };\n Buffer2.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n };\n function hexWrite(buf, string, offset, length) {\n offset = Number(offset) || 0;\n var remaining = buf.length - offset;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n var strLen = string.length;\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16);\n if (numberIsNaN(parsed))\n return i;\n buf[offset + i] = parsed;\n }\n return i;\n }\n function utf8Write(buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);\n }\n function asciiWrite(buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length);\n }\n function base64Write(buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length);\n }\n function ucs2Write(buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);\n }\n Buffer2.prototype.write = function write(string, offset, length, encoding) {\n if (offset === void 0) {\n encoding = \"utf8\";\n length = this.length;\n offset = 0;\n } else if (length === void 0 && typeof offset === \"string\") {\n encoding = offset;\n length = this.length;\n offset = 0;\n } else if (isFinite(offset)) {\n offset = offset >>> 0;\n if (isFinite(length)) {\n length = length >>> 0;\n if (encoding === void 0)\n encoding = \"utf8\";\n } else {\n encoding = length;\n length = void 0;\n }\n } else {\n throw new Error(\n \"Buffer.write(string, encoding, offset[, length]) is no longer supported\"\n );\n }\n var remaining = this.length - offset;\n if (length === void 0 || length > remaining)\n length = remaining;\n if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {\n throw new RangeError(\"Attempt to write outside buffer bounds\");\n }\n if (!encoding)\n encoding = \"utf8\";\n var loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"hex\":\n return hexWrite(this, string, offset, length);\n case \"utf8\":\n case \"utf-8\":\n return utf8Write(this, string, offset, length);\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return asciiWrite(this, string, offset, length);\n case \"base64\":\n return base64Write(this, string, offset, length);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return ucs2Write(this, string, offset, length);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n };\n Buffer2.prototype.toJSON = function toJSON() {\n return {\n type: \"Buffer\",\n data: Array.prototype.slice.call(this._arr || this, 0)\n };\n };\n function base64Slice(buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf);\n } else {\n return base64.fromByteArray(buf.slice(start, end));\n }\n }\n function utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end);\n var res = [];\n var i = start;\n while (i < end) {\n var firstByte = buf[i];\n var codePoint = null;\n var bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint;\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 128) {\n codePoint = firstByte;\n }\n break;\n case 2:\n secondByte = buf[i + 1];\n if ((secondByte & 192) === 128) {\n tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;\n if (tempCodePoint > 127) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;\n if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;\n if (tempCodePoint > 65535 && tempCodePoint < 1114112) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n if (codePoint === null) {\n codePoint = 65533;\n bytesPerSequence = 1;\n } else if (codePoint > 65535) {\n codePoint -= 65536;\n res.push(codePoint >>> 10 & 1023 | 55296);\n codePoint = 56320 | codePoint & 1023;\n }\n res.push(codePoint);\n i += bytesPerSequence;\n }\n return decodeCodePointsArray(res);\n }\n var MAX_ARGUMENTS_LENGTH = 4096;\n function decodeCodePointsArray(codePoints) {\n var len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints);\n }\n var res = \"\";\n var i = 0;\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n );\n }\n return res;\n }\n function asciiSlice(buf, start, end) {\n var ret = \"\";\n end = Math.min(buf.length, end);\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 127);\n }\n return ret;\n }\n function latin1Slice(buf, start, end) {\n var ret = \"\";\n end = Math.min(buf.length, end);\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n return ret;\n }\n function hexSlice(buf, start, end) {\n var len = buf.length;\n if (!start || start < 0)\n start = 0;\n if (!end || end < 0 || end > len)\n end = len;\n var out = \"\";\n for (var i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]];\n }\n return out;\n }\n function utf16leSlice(buf, start, end) {\n var bytes = buf.slice(start, end);\n var res = \"\";\n for (var i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n }\n return res;\n }\n Buffer2.prototype.slice = function slice(start, end) {\n var len = this.length;\n start = ~~start;\n end = end === void 0 ? len : ~~end;\n if (start < 0) {\n start += len;\n if (start < 0)\n start = 0;\n } else if (start > len) {\n start = len;\n }\n if (end < 0) {\n end += len;\n if (end < 0)\n end = 0;\n } else if (end > len) {\n end = len;\n }\n if (end < start)\n end = start;\n var newBuf = this.subarray(start, end);\n Object.setPrototypeOf(newBuf, Buffer2.prototype);\n return newBuf;\n };\n function checkOffset(offset, ext, length) {\n if (offset % 1 !== 0 || offset < 0)\n throw new RangeError(\"offset is not uint\");\n if (offset + ext > length)\n throw new RangeError(\"Trying to access beyond buffer length\");\n }\n Buffer2.prototype.readUintLE = Buffer2.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset, byteLength2, this.length);\n var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength2 && (mul *= 256)) {\n val += this[offset + i] * mul;\n }\n return val;\n };\n Buffer2.prototype.readUintBE = Buffer2.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n checkOffset(offset, byteLength2, this.length);\n }\n var val = this[offset + --byteLength2];\n var mul = 1;\n while (byteLength2 > 0 && (mul *= 256)) {\n val += this[offset + --byteLength2] * mul;\n }\n return val;\n };\n Buffer2.prototype.readUint8 = Buffer2.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 1, this.length);\n return this[offset];\n };\n Buffer2.prototype.readUint16LE = Buffer2.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n return this[offset] | this[offset + 1] << 8;\n };\n Buffer2.prototype.readUint16BE = Buffer2.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n return this[offset] << 8 | this[offset + 1];\n };\n Buffer2.prototype.readUint32LE = Buffer2.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;\n };\n Buffer2.prototype.readUint32BE = Buffer2.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);\n };\n Buffer2.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset, byteLength2, this.length);\n var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength2 && (mul *= 256)) {\n val += this[offset + i] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer2.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset, byteLength2, this.length);\n var i = byteLength2;\n var mul = 1;\n var val = this[offset + --i];\n while (i > 0 && (mul *= 256)) {\n val += this[offset + --i] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer2.prototype.readInt8 = function readInt8(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 1, this.length);\n if (!(this[offset] & 128))\n return this[offset];\n return (255 - this[offset] + 1) * -1;\n };\n Buffer2.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n var val = this[offset] | this[offset + 1] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer2.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n var val = this[offset + 1] | this[offset] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer2.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;\n };\n Buffer2.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];\n };\n Buffer2.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return ieee7542.read(this, offset, true, 23, 4);\n };\n Buffer2.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return ieee7542.read(this, offset, false, 23, 4);\n };\n Buffer2.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 8, this.length);\n return ieee7542.read(this, offset, true, 52, 8);\n };\n Buffer2.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 8, this.length);\n return ieee7542.read(this, offset, false, 52, 8);\n };\n function checkInt(buf, value, offset, ext, max, min) {\n if (!Buffer2.isBuffer(buf))\n throw new TypeError('\"buffer\" argument must be a Buffer instance');\n if (value > max || value < min)\n throw new RangeError('\"value\" argument is out of bounds');\n if (offset + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n }\n Buffer2.prototype.writeUintLE = Buffer2.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset, byteLength2, maxBytes, 0);\n }\n var mul = 1;\n var i = 0;\n this[offset] = value & 255;\n while (++i < byteLength2 && (mul *= 256)) {\n this[offset + i] = value / mul & 255;\n }\n return offset + byteLength2;\n };\n Buffer2.prototype.writeUintBE = Buffer2.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset, byteLength2, maxBytes, 0);\n }\n var i = byteLength2 - 1;\n var mul = 1;\n this[offset + i] = value & 255;\n while (--i >= 0 && (mul *= 256)) {\n this[offset + i] = value / mul & 255;\n }\n return offset + byteLength2;\n };\n Buffer2.prototype.writeUint8 = Buffer2.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 1, 255, 0);\n this[offset] = value & 255;\n return offset + 1;\n };\n Buffer2.prototype.writeUint16LE = Buffer2.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 65535, 0);\n this[offset] = value & 255;\n this[offset + 1] = value >>> 8;\n return offset + 2;\n };\n Buffer2.prototype.writeUint16BE = Buffer2.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 65535, 0);\n this[offset] = value >>> 8;\n this[offset + 1] = value & 255;\n return offset + 2;\n };\n Buffer2.prototype.writeUint32LE = Buffer2.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 4294967295, 0);\n this[offset + 3] = value >>> 24;\n this[offset + 2] = value >>> 16;\n this[offset + 1] = value >>> 8;\n this[offset] = value & 255;\n return offset + 4;\n };\n Buffer2.prototype.writeUint32BE = Buffer2.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 4294967295, 0);\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 255;\n return offset + 4;\n };\n Buffer2.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset, byteLength2, limit - 1, -limit);\n }\n var i = 0;\n var mul = 1;\n var sub = 0;\n this[offset] = value & 255;\n while (++i < byteLength2 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = (value / mul >> 0) - sub & 255;\n }\n return offset + byteLength2;\n };\n Buffer2.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset, byteLength2, limit - 1, -limit);\n }\n var i = byteLength2 - 1;\n var mul = 1;\n var sub = 0;\n this[offset + i] = value & 255;\n while (--i >= 0 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = (value / mul >> 0) - sub & 255;\n }\n return offset + byteLength2;\n };\n Buffer2.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 1, 127, -128);\n if (value < 0)\n value = 255 + value + 1;\n this[offset] = value & 255;\n return offset + 1;\n };\n Buffer2.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 32767, -32768);\n this[offset] = value & 255;\n this[offset + 1] = value >>> 8;\n return offset + 2;\n };\n Buffer2.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 32767, -32768);\n this[offset] = value >>> 8;\n this[offset + 1] = value & 255;\n return offset + 2;\n };\n Buffer2.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 2147483647, -2147483648);\n this[offset] = value & 255;\n this[offset + 1] = value >>> 8;\n this[offset + 2] = value >>> 16;\n this[offset + 3] = value >>> 24;\n return offset + 4;\n };\n Buffer2.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 2147483647, -2147483648);\n if (value < 0)\n value = 4294967295 + value + 1;\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 255;\n return offset + 4;\n };\n function checkIEEE754(buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n if (offset < 0)\n throw new RangeError(\"Index out of range\");\n }\n function writeFloat(buf, value, offset, littleEndian, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4);\n }\n ieee7542.write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4;\n }\n Buffer2.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert);\n };\n Buffer2.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert);\n };\n function writeDouble(buf, value, offset, littleEndian, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8);\n }\n ieee7542.write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8;\n }\n Buffer2.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert);\n };\n Buffer2.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert);\n };\n Buffer2.prototype.copy = function copy(target, targetStart, start, end) {\n if (!Buffer2.isBuffer(target))\n throw new TypeError(\"argument should be a Buffer\");\n if (!start)\n start = 0;\n if (!end && end !== 0)\n end = this.length;\n if (targetStart >= target.length)\n targetStart = target.length;\n if (!targetStart)\n targetStart = 0;\n if (end > 0 && end < start)\n end = start;\n if (end === start)\n return 0;\n if (target.length === 0 || this.length === 0)\n return 0;\n if (targetStart < 0) {\n throw new RangeError(\"targetStart out of bounds\");\n }\n if (start < 0 || start >= this.length)\n throw new RangeError(\"Index out of range\");\n if (end < 0)\n throw new RangeError(\"sourceEnd out of bounds\");\n if (end > this.length)\n end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n var len = end - start;\n if (this === target && typeof Uint8Array.prototype.copyWithin === \"function\") {\n this.copyWithin(targetStart, start, end);\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n );\n }\n return len;\n };\n Buffer2.prototype.fill = function fill(val, start, end, encoding) {\n if (typeof val === \"string\") {\n if (typeof start === \"string\") {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === \"string\") {\n encoding = end;\n end = this.length;\n }\n if (encoding !== void 0 && typeof encoding !== \"string\") {\n throw new TypeError(\"encoding must be a string\");\n }\n if (typeof encoding === \"string\" && !Buffer2.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0);\n if (encoding === \"utf8\" && code < 128 || encoding === \"latin1\") {\n val = code;\n }\n }\n } else if (typeof val === \"number\") {\n val = val & 255;\n } else if (typeof val === \"boolean\") {\n val = Number(val);\n }\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError(\"Out of range index\");\n }\n if (end <= start) {\n return this;\n }\n start = start >>> 0;\n end = end === void 0 ? this.length : end >>> 0;\n if (!val)\n val = 0;\n var i;\n if (typeof val === \"number\") {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n var bytes = Buffer2.isBuffer(val) ? val : Buffer2.from(val, encoding);\n var len = bytes.length;\n if (len === 0) {\n throw new TypeError('The value \"' + val + '\" is invalid for argument \"value\"');\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n return this;\n };\n var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n function base64clean(str) {\n str = str.split(\"=\")[0];\n str = str.trim().replace(INVALID_BASE64_RE, \"\");\n if (str.length < 2)\n return \"\";\n while (str.length % 4 !== 0) {\n str = str + \"=\";\n }\n return str;\n }\n function utf8ToBytes(string, units) {\n units = units || Infinity;\n var codePoint;\n var length = string.length;\n var leadSurrogate = null;\n var bytes = [];\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i);\n if (codePoint > 55295 && codePoint < 57344) {\n if (!leadSurrogate) {\n if (codePoint > 56319) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n } else if (i + 1 === length) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n }\n leadSurrogate = codePoint;\n continue;\n }\n if (codePoint < 56320) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n leadSurrogate = codePoint;\n continue;\n }\n codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;\n } else if (leadSurrogate) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n }\n leadSurrogate = null;\n if (codePoint < 128) {\n if ((units -= 1) < 0)\n break;\n bytes.push(codePoint);\n } else if (codePoint < 2048) {\n if ((units -= 2) < 0)\n break;\n bytes.push(\n codePoint >> 6 | 192,\n codePoint & 63 | 128\n );\n } else if (codePoint < 65536) {\n if ((units -= 3) < 0)\n break;\n bytes.push(\n codePoint >> 12 | 224,\n codePoint >> 6 & 63 | 128,\n codePoint & 63 | 128\n );\n } else if (codePoint < 1114112) {\n if ((units -= 4) < 0)\n break;\n bytes.push(\n codePoint >> 18 | 240,\n codePoint >> 12 & 63 | 128,\n codePoint >> 6 & 63 | 128,\n codePoint & 63 | 128\n );\n } else {\n throw new Error(\"Invalid code point\");\n }\n }\n return bytes;\n }\n function asciiToBytes(str) {\n var byteArray = [];\n for (var i = 0; i < str.length; ++i) {\n byteArray.push(str.charCodeAt(i) & 255);\n }\n return byteArray;\n }\n function utf16leToBytes(str, units) {\n var c, hi, lo;\n var byteArray = [];\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0)\n break;\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n return byteArray;\n }\n function base64ToBytes(str) {\n return base64.toByteArray(base64clean(str));\n }\n function blitBuffer(src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if (i + offset >= dst.length || i >= src.length)\n break;\n dst[i + offset] = src[i];\n }\n return i;\n }\n function isInstance(obj, type) {\n return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;\n }\n function numberIsNaN(obj) {\n return obj !== obj;\n }\n var hexSliceLookupTable = function() {\n var alphabet = \"0123456789abcdef\";\n var table = new Array(256);\n for (var i = 0; i < 16; ++i) {\n var i16 = i * 16;\n for (var j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j];\n }\n }\n return table;\n }();\n })(buffer);\n return buffer;\n}\nvar util = {};\nvar types = {};\nvar shams$1;\nvar hasRequiredShams$1;\nfunction requireShams$1() {\n if (hasRequiredShams$1)\n return shams$1;\n hasRequiredShams$1 = 1;\n shams$1 = function hasSymbols2() {\n if (typeof Symbol !== \"function\" || typeof Object.getOwnPropertySymbols !== \"function\") {\n return false;\n }\n if (typeof Symbol.iterator === \"symbol\") {\n return true;\n }\n var obj = {};\n var sym = Symbol(\"test\");\n var symObj = Object(sym);\n if (typeof sym === \"string\") {\n return false;\n }\n if (Object.prototype.toString.call(sym) !== \"[object Symbol]\") {\n return false;\n }\n if (Object.prototype.toString.call(symObj) !== \"[object Symbol]\") {\n return false;\n }\n var symVal = 42;\n obj[sym] = symVal;\n for (sym in obj) {\n return false;\n }\n if (typeof Object.keys === \"function\" && Object.keys(obj).length !== 0) {\n return false;\n }\n if (typeof Object.getOwnPropertyNames === \"function\" && Object.getOwnPropertyNames(obj).length !== 0) {\n return false;\n }\n var syms = Object.getOwnPropertySymbols(obj);\n if (syms.length !== 1 || syms[0] !== sym) {\n return false;\n }\n if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {\n return false;\n }\n if (typeof Object.getOwnPropertyDescriptor === \"function\") {\n var descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n if (descriptor.value !== symVal || descriptor.enumerable !== true) {\n return false;\n }\n }\n return true;\n };\n return shams$1;\n}\nvar shams;\nvar hasRequiredShams;\nfunction requireShams() {\n if (hasRequiredShams)\n return shams;\n hasRequiredShams = 1;\n var hasSymbols2 = requireShams$1();\n shams = function hasToStringTagShams() {\n return hasSymbols2() && !!Symbol.toStringTag;\n };\n return shams;\n}\nvar hasSymbols;\nvar hasRequiredHasSymbols;\nfunction requireHasSymbols() {\n if (hasRequiredHasSymbols)\n return hasSymbols;\n hasRequiredHasSymbols = 1;\n var origSymbol = typeof Symbol !== \"undefined\" && Symbol;\n var hasSymbolSham = requireShams$1();\n hasSymbols = function hasNativeSymbols() {\n if (typeof origSymbol !== \"function\") {\n return false;\n }\n if (typeof Symbol !== \"function\") {\n return false;\n }\n if (typeof origSymbol(\"foo\") !== \"symbol\") {\n return false;\n }\n if (typeof Symbol(\"bar\") !== \"symbol\") {\n return false;\n }\n return hasSymbolSham();\n };\n return hasSymbols;\n}\nvar hasProto;\nvar hasRequiredHasProto;\nfunction requireHasProto() {\n if (hasRequiredHasProto)\n return hasProto;\n hasRequiredHasProto = 1;\n var test = {\n foo: {}\n };\n var $Object = Object;\n hasProto = function hasProto2() {\n return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n };\n return hasProto;\n}\nvar implementation;\nvar hasRequiredImplementation;\nfunction requireImplementation() {\n if (hasRequiredImplementation)\n return implementation;\n hasRequiredImplementation = 1;\n var ERROR_MESSAGE = \"Function.prototype.bind called on incompatible \";\n var toStr = Object.prototype.toString;\n var max = Math.max;\n var funcType = \"[object Function]\";\n var concatty = function concatty2(a, b) {\n var arr = [];\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n return arr;\n };\n var slicy = function slicy2(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n };\n var joiny = function(arr, joiner) {\n var str = \"\";\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n };\n implementation = function bind(that) {\n var target = this;\n if (typeof target !== \"function\" || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n var bound;\n var binder = function() {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n concatty(args, arguments)\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(\n that,\n concatty(args, arguments)\n );\n };\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = \"$\" + i;\n }\n bound = Function(\"binder\", \"return function (\" + joiny(boundArgs, \",\") + \"){ return binder.apply(this,arguments); }\")(binder);\n if (target.prototype) {\n var Empty = function Empty2() {\n };\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n return bound;\n };\n return implementation;\n}\nvar functionBind;\nvar hasRequiredFunctionBind;\nfunction requireFunctionBind() {\n if (hasRequiredFunctionBind)\n return functionBind;\n hasRequiredFunctionBind = 1;\n var implementation2 = requireImplementation();\n functionBind = Function.prototype.bind || implementation2;\n return functionBind;\n}\nvar hasown;\nvar hasRequiredHasown;\nfunction requireHasown() {\n if (hasRequiredHasown)\n return hasown;\n hasRequiredHasown = 1;\n var call = Function.prototype.call;\n var $hasOwn = Object.prototype.hasOwnProperty;\n var bind = requireFunctionBind();\n hasown = bind.call(call, $hasOwn);\n return hasown;\n}\nvar getIntrinsic;\nvar hasRequiredGetIntrinsic;\nfunction requireGetIntrinsic() {\n if (hasRequiredGetIntrinsic)\n return getIntrinsic;\n hasRequiredGetIntrinsic = 1;\n var undefined$1;\n var $SyntaxError = SyntaxError;\n var $Function = Function;\n var $TypeError = TypeError;\n var getEvalledConstructor = function(expressionSyntax) {\n try {\n return $Function('\"use strict\"; return (' + expressionSyntax + \").constructor;\")();\n } catch (e) {\n }\n };\n var $gOPD = Object.getOwnPropertyDescriptor;\n if ($gOPD) {\n try {\n $gOPD({}, \"\");\n } catch (e) {\n $gOPD = null;\n }\n }\n var throwTypeError = function() {\n throw new $TypeError();\n };\n var ThrowTypeError = $gOPD ? function() {\n try {\n arguments.callee;\n return throwTypeError;\n } catch (calleeThrows) {\n try {\n return $gOPD(arguments, \"callee\").get;\n } catch (gOPDthrows) {\n return throwTypeError;\n }\n }\n }() : throwTypeError;\n var hasSymbols2 = requireHasSymbols()();\n var hasProto2 = requireHasProto()();\n var getProto = Object.getPrototypeOf || (hasProto2 ? function(x) {\n return x.__proto__;\n } : null);\n var needsEval = {};\n var TypedArray = typeof Uint8Array === \"undefined\" || !getProto ? undefined$1 : getProto(Uint8Array);\n var INTRINSICS = {\n \"%AggregateError%\": typeof AggregateError === \"undefined\" ? undefined$1 : AggregateError,\n \"%Array%\": Array,\n \"%ArrayBuffer%\": typeof ArrayBuffer === \"undefined\" ? undefined$1 : ArrayBuffer,\n \"%ArrayIteratorPrototype%\": hasSymbols2 && getProto ? getProto([][Symbol.iterator]()) : undefined$1,\n \"%AsyncFromSyncIteratorPrototype%\": undefined$1,\n \"%AsyncFunction%\": needsEval,\n \"%AsyncGenerator%\": needsEval,\n \"%AsyncGeneratorFunction%\": needsEval,\n \"%AsyncIteratorPrototype%\": needsEval,\n \"%Atomics%\": typeof Atomics === \"undefined\" ? undefined$1 : Atomics,\n \"%BigInt%\": typeof BigInt === \"undefined\" ? undefined$1 : BigInt,\n \"%BigInt64Array%\": typeof BigInt64Array === \"undefined\" ? undefined$1 : BigInt64Array,\n \"%BigUint64Array%\": typeof BigUint64Array === \"undefined\" ? undefined$1 : BigUint64Array,\n \"%Boolean%\": Boolean,\n \"%DataView%\": typeof DataView === \"undefined\" ? undefined$1 : DataView,\n \"%Date%\": Date,\n \"%decodeURI%\": decodeURI,\n \"%decodeURIComponent%\": decodeURIComponent,\n \"%encodeURI%\": encodeURI,\n \"%encodeURIComponent%\": encodeURIComponent,\n \"%Error%\": Error,\n \"%eval%\": eval,\n // eslint-disable-line no-eval\n \"%EvalError%\": EvalError,\n \"%Float32Array%\": typeof Float32Array === \"undefined\" ? undefined$1 : Float32Array,\n \"%Float64Array%\": typeof Float64Array === \"undefined\" ? undefined$1 : Float64Array,\n \"%FinalizationRegistry%\": typeof FinalizationRegistry === \"undefined\" ? undefined$1 : FinalizationRegistry,\n \"%Function%\": $Function,\n \"%GeneratorFunction%\": needsEval,\n \"%Int8Array%\": typeof Int8Array === \"undefined\" ? undefined$1 : Int8Array,\n \"%Int16Array%\": typeof Int16Array === \"undefined\" ? undefined$1 : Int16Array,\n \"%Int32Array%\": typeof Int32Array === \"undefined\" ? undefined$1 : Int32Array,\n \"%isFinite%\": isFinite,\n \"%isNaN%\": isNaN,\n \"%IteratorPrototype%\": hasSymbols2 && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,\n \"%JSON%\": typeof JSON === \"object\" ? JSON : undefined$1,\n \"%Map%\": typeof Map === \"undefined\" ? undefined$1 : Map,\n \"%MapIteratorPrototype%\": typeof Map === \"undefined\" || !hasSymbols2 || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),\n \"%Math%\": Math,\n \"%Number%\": Number,\n \"%Object%\": Object,\n \"%parseFloat%\": parseFloat,\n \"%parseInt%\": parseInt,\n \"%Promise%\": typeof Promise === \"undefined\" ? undefined$1 : Promise,\n \"%Proxy%\": typeof Proxy === \"undefined\" ? undefined$1 : Proxy,\n \"%RangeError%\": RangeError,\n \"%ReferenceError%\": ReferenceError,\n \"%Reflect%\": typeof Reflect === \"undefined\" ? undefined$1 : Reflect,\n \"%RegExp%\": RegExp,\n \"%Set%\": typeof Set === \"undefined\" ? undefined$1 : Set,\n \"%SetIteratorPrototype%\": typeof Set === \"undefined\" || !hasSymbols2 || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),\n \"%SharedArrayBuffer%\": typeof SharedArrayBuffer === \"undefined\" ? undefined$1 : SharedArrayBuffer,\n \"%String%\": String,\n \"%StringIteratorPrototype%\": hasSymbols2 && getProto ? getProto(\"\"[Symbol.iterator]()) : undefined$1,\n \"%Symbol%\": hasSymbols2 ? Symbol : undefined$1,\n \"%SyntaxError%\": $SyntaxError,\n \"%ThrowTypeError%\": ThrowTypeError,\n \"%TypedArray%\": TypedArray,\n \"%TypeError%\": $TypeError,\n \"%Uint8Array%\": typeof Uint8Array === \"undefined\" ? undefined$1 : Uint8Array,\n \"%Uint8ClampedArray%\": typeof Uint8ClampedArray === \"undefined\" ? undefined$1 : Uint8ClampedArray,\n \"%Uint16Array%\": typeof Uint16Array === \"undefined\" ? undefined$1 : Uint16Array,\n \"%Uint32Array%\": typeof Uint32Array === \"undefined\" ? undefined$1 : Uint32Array,\n \"%URIError%\": URIError,\n \"%WeakMap%\": typeof WeakMap === \"undefined\" ? undefined$1 : WeakMap,\n \"%WeakRef%\": typeof WeakRef === \"undefined\" ? undefined$1 : WeakRef,\n \"%WeakSet%\": typeof WeakSet === \"undefined\" ? undefined$1 : WeakSet\n };\n if (getProto) {\n try {\n null.error;\n } catch (e) {\n var errorProto = getProto(getProto(e));\n INTRINSICS[\"%Error.prototype%\"] = errorProto;\n }\n }\n var doEval = function doEval2(name) {\n var value;\n if (name === \"%AsyncFunction%\") {\n value = getEvalledConstructor(\"async function () {}\");\n } else if (name === \"%GeneratorFunction%\") {\n value = getEvalledConstructor(\"function* () {}\");\n } else if (name === \"%AsyncGeneratorFunction%\") {\n value = getEvalledConstructor(\"async function* () {}\");\n } else if (name === \"%AsyncGenerator%\") {\n var fn = doEval2(\"%AsyncGeneratorFunction%\");\n if (fn) {\n value = fn.prototype;\n }\n } else if (name === \"%AsyncIteratorPrototype%\") {\n var gen = doEval2(\"%AsyncGenerator%\");\n if (gen && getProto) {\n value = getProto(gen.prototype);\n }\n }\n INTRINSICS[name] = value;\n return value;\n };\n var LEGACY_ALIASES = {\n \"%ArrayBufferPrototype%\": [\"ArrayBuffer\", \"prototype\"],\n \"%ArrayPrototype%\": [\"Array\", \"prototype\"],\n \"%ArrayProto_entries%\": [\"Array\", \"prototype\", \"entries\"],\n \"%ArrayProto_forEach%\": [\"Array\", \"prototype\", \"forEach\"],\n \"%ArrayProto_keys%\": [\"Array\", \"prototype\", \"keys\"],\n \"%ArrayProto_values%\": [\"Array\", \"prototype\", \"values\"],\n \"%AsyncFunctionPrototype%\": [\"AsyncFunction\", \"prototype\"],\n \"%AsyncGenerator%\": [\"AsyncGeneratorFunction\", \"prototype\"],\n \"%AsyncGeneratorPrototype%\": [\"AsyncGeneratorFunction\", \"prototype\", \"prototype\"],\n \"%BooleanPrototype%\": [\"Boolean\", \"prototype\"],\n \"%DataViewPrototype%\": [\"DataView\", \"prototype\"],\n \"%DatePrototype%\": [\"Date\", \"prototype\"],\n \"%ErrorPrototype%\": [\"Error\", \"prototype\"],\n \"%EvalErrorPrototype%\": [\"EvalError\", \"prototype\"],\n \"%Float32ArrayPrototype%\": [\"Float32Array\", \"prototype\"],\n \"%Float64ArrayPrototype%\": [\"Float64Array\", \"prototype\"],\n \"%FunctionPrototype%\": [\"Function\", \"prototype\"],\n \"%Generator%\": [\"GeneratorFunction\", \"prototype\"],\n \"%GeneratorPrototype%\": [\"GeneratorFunction\", \"prototype\", \"prototype\"],\n \"%Int8ArrayPrototype%\": [\"Int8Array\", \"prototype\"],\n \"%Int16ArrayPrototype%\": [\"Int16Array\", \"prototype\"],\n \"%Int32ArrayPrototype%\": [\"Int32Array\", \"prototype\"],\n \"%JSONParse%\": [\"JSON\", \"parse\"],\n \"%JSONStringify%\": [\"JSON\", \"stringify\"],\n \"%MapPrototype%\": [\"Map\", \"prototype\"],\n \"%NumberPrototype%\": [\"Number\", \"prototype\"],\n \"%ObjectPrototype%\": [\"Object\", \"prototype\"],\n \"%ObjProto_toString%\": [\"Object\", \"prototype\", \"toString\"],\n \"%ObjProto_valueOf%\": [\"Object\", \"prototype\", \"valueOf\"],\n \"%PromisePrototype%\": [\"Promise\", \"prototype\"],\n \"%PromiseProto_then%\": [\"Promise\", \"prototype\", \"then\"],\n \"%Promise_all%\": [\"Promise\", \"all\"],\n \"%Promise_reject%\": [\"Promise\", \"reject\"],\n \"%Promise_resolve%\": [\"Promise\", \"resolve\"],\n \"%RangeErrorPrototype%\": [\"RangeError\", \"prototype\"],\n \"%ReferenceErrorPrototype%\": [\"ReferenceError\", \"prototype\"],\n \"%RegExpPrototype%\": [\"RegExp\", \"prototype\"],\n \"%SetPrototype%\": [\"Set\", \"prototype\"],\n \"%SharedArrayBufferPrototype%\": [\"SharedArrayBuffer\", \"prototype\"],\n \"%StringPrototype%\": [\"String\", \"prototype\"],\n \"%SymbolPrototype%\": [\"Symbol\", \"prototype\"],\n \"%SyntaxErrorPrototype%\": [\"SyntaxError\", \"prototype\"],\n \"%TypedArrayPrototype%\": [\"TypedArray\", \"prototype\"],\n \"%TypeErrorPrototype%\": [\"TypeError\", \"prototype\"],\n \"%Uint8ArrayPrototype%\": [\"Uint8Array\", \"prototype\"],\n \"%Uint8ClampedArrayPrototype%\": [\"Uint8ClampedArray\", \"prototype\"],\n \"%Uint16ArrayPrototype%\": [\"Uint16Array\", \"prototype\"],\n \"%Uint32ArrayPrototype%\": [\"Uint32Array\", \"prototype\"],\n \"%URIErrorPrototype%\": [\"URIError\", \"prototype\"],\n \"%WeakMapPrototype%\": [\"WeakMap\", \"prototype\"],\n \"%WeakSetPrototype%\": [\"WeakSet\", \"prototype\"]\n };\n var bind = requireFunctionBind();\n var hasOwn = requireHasown();\n var $concat = bind.call(Function.call, Array.prototype.concat);\n var $spliceApply = bind.call(Function.apply, Array.prototype.splice);\n var $replace = bind.call(Function.call, String.prototype.replace);\n var $strSlice = bind.call(Function.call, String.prototype.slice);\n var $exec = bind.call(Function.call, RegExp.prototype.exec);\n var rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\n var reEscapeChar = /\\\\(\\\\)?/g;\n var stringToPath = function stringToPath2(string) {\n var first = $strSlice(string, 0, 1);\n var last = $strSlice(string, -1);\n if (first === \"%\" && last !== \"%\") {\n throw new $SyntaxError(\"invalid intrinsic syntax, expected closing `%`\");\n } else if (last === \"%\" && first !== \"%\") {\n throw new $SyntaxError(\"invalid intrinsic syntax, expected opening `%`\");\n }\n var result = [];\n $replace(string, rePropName, function(match, number, quote, subString) {\n result[result.length] = quote ? $replace(subString, reEscapeChar, \"$1\") : number || match;\n });\n return result;\n };\n var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {\n var intrinsicName = name;\n var alias;\n if (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n alias = LEGACY_ALIASES[intrinsicName];\n intrinsicName = \"%\" + alias[0] + \"%\";\n }\n if (hasOwn(INTRINSICS, intrinsicName)) {\n var value = INTRINSICS[intrinsicName];\n if (value === needsEval) {\n value = doEval(intrinsicName);\n }\n if (typeof value === \"undefined\" && !allowMissing) {\n throw new $TypeError(\"intrinsic \" + name + \" exists, but is not available. Please file an issue!\");\n }\n return {\n alias,\n name: intrinsicName,\n value\n };\n }\n throw new $SyntaxError(\"intrinsic \" + name + \" does not exist!\");\n };\n getIntrinsic = function GetIntrinsic(name, allowMissing) {\n if (typeof name !== \"string\" || name.length === 0) {\n throw new $TypeError(\"intrinsic name must be a non-empty string\");\n }\n if (arguments.length > 1 && typeof allowMissing !== \"boolean\") {\n throw new $TypeError('\"allowMissing\" argument must be a boolean');\n }\n if ($exec(/^%?[^%]*%?$/, name) === null) {\n throw new $SyntaxError(\"`%` may not be present anywhere but at the beginning and end of the intrinsic name\");\n }\n var parts = stringToPath(name);\n var intrinsicBaseName = parts.length > 0 ? parts[0] : \"\";\n var intrinsic = getBaseIntrinsic(\"%\" + intrinsicBaseName + \"%\", allowMissing);\n var intrinsicRealName = intrinsic.name;\n var value = intrinsic.value;\n var skipFurtherCaching = false;\n var alias = intrinsic.alias;\n if (alias) {\n intrinsicBaseName = alias[0];\n $spliceApply(parts, $concat([0, 1], alias));\n }\n for (var i = 1, isOwn = true; i < parts.length; i += 1) {\n var part = parts[i];\n var first = $strSlice(part, 0, 1);\n var last = $strSlice(part, -1);\n if ((first === '\"' || first === \"'\" || first === \"`\" || (last === '\"' || last === \"'\" || last === \"`\")) && first !== last) {\n throw new $SyntaxError(\"property names with quotes must have matching quotes\");\n }\n if (part === \"constructor\" || !isOwn) {\n skipFurtherCaching = true;\n }\n intrinsicBaseName += \".\" + part;\n intrinsicRealName = \"%\" + intrinsicBaseName + \"%\";\n if (hasOwn(INTRINSICS, intrinsicRealName)) {\n value = INTRINSICS[intrinsicRealName];\n } else if (value != null) {\n if (!(part in value)) {\n if (!allowMissing) {\n throw new $TypeError(\"base intrinsic for \" + name + \" exists, but the property is not available.\");\n }\n return void 0;\n }\n if ($gOPD && i + 1 >= parts.length) {\n var desc = $gOPD(value, part);\n isOwn = !!desc;\n if (isOwn && \"get\" in desc && !(\"originalValue\" in desc.get)) {\n value = desc.get;\n } else {\n value = value[part];\n }\n } else {\n isOwn = hasOwn(value, part);\n value = value[part];\n }\n if (isOwn && !skipFurtherCaching) {\n INTRINSICS[intrinsicRealName] = value;\n }\n }\n }\n return value;\n };\n return getIntrinsic;\n}\nvar callBind = { exports: {} };\nvar hasPropertyDescriptors_1;\nvar hasRequiredHasPropertyDescriptors;\nfunction requireHasPropertyDescriptors() {\n if (hasRequiredHasPropertyDescriptors)\n return hasPropertyDescriptors_1;\n hasRequiredHasPropertyDescriptors = 1;\n var GetIntrinsic = requireGetIntrinsic();\n var $defineProperty = GetIntrinsic(\"%Object.defineProperty%\", true);\n var hasPropertyDescriptors = function hasPropertyDescriptors2() {\n if ($defineProperty) {\n try {\n $defineProperty({}, \"a\", { value: 1 });\n return true;\n } catch (e) {\n return false;\n }\n }\n return false;\n };\n hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n if (!hasPropertyDescriptors()) {\n return null;\n }\n try {\n return $defineProperty([], \"length\", { value: 1 }).length !== 1;\n } catch (e) {\n return true;\n }\n };\n hasPropertyDescriptors_1 = hasPropertyDescriptors;\n return hasPropertyDescriptors_1;\n}\nvar gopd;\nvar hasRequiredGopd;\nfunction requireGopd() {\n if (hasRequiredGopd)\n return gopd;\n hasRequiredGopd = 1;\n var GetIntrinsic = requireGetIntrinsic();\n var $gOPD = GetIntrinsic(\"%Object.getOwnPropertyDescriptor%\", true);\n if ($gOPD) {\n try {\n $gOPD([], \"length\");\n } catch (e) {\n $gOPD = null;\n }\n }\n gopd = $gOPD;\n return gopd;\n}\nvar defineDataProperty;\nvar hasRequiredDefineDataProperty;\nfunction requireDefineDataProperty() {\n if (hasRequiredDefineDataProperty)\n return defineDataProperty;\n hasRequiredDefineDataProperty = 1;\n var hasPropertyDescriptors = requireHasPropertyDescriptors()();\n var GetIntrinsic = requireGetIntrinsic();\n var $defineProperty = hasPropertyDescriptors && GetIntrinsic(\"%Object.defineProperty%\", true);\n if ($defineProperty) {\n try {\n $defineProperty({}, \"a\", { value: 1 });\n } catch (e) {\n $defineProperty = false;\n }\n }\n var $SyntaxError = GetIntrinsic(\"%SyntaxError%\");\n var $TypeError = GetIntrinsic(\"%TypeError%\");\n var gopd2 = requireGopd();\n defineDataProperty = function defineDataProperty2(obj, property, value) {\n if (!obj || typeof obj !== \"object\" && typeof obj !== \"function\") {\n throw new $TypeError(\"`obj` must be an object or a function`\");\n }\n if (typeof property !== \"string\" && typeof property !== \"symbol\") {\n throw new $TypeError(\"`property` must be a string or a symbol`\");\n }\n if (arguments.length > 3 && typeof arguments[3] !== \"boolean\" && arguments[3] !== null) {\n throw new $TypeError(\"`nonEnumerable`, if provided, must be a boolean or null\");\n }\n if (arguments.length > 4 && typeof arguments[4] !== \"boolean\" && arguments[4] !== null) {\n throw new $TypeError(\"`nonWritable`, if provided, must be a boolean or null\");\n }\n if (arguments.length > 5 && typeof arguments[5] !== \"boolean\" && arguments[5] !== null) {\n throw new $TypeError(\"`nonConfigurable`, if provided, must be a boolean or null\");\n }\n if (arguments.length > 6 && typeof arguments[6] !== \"boolean\") {\n throw new $TypeError(\"`loose`, if provided, must be a boolean\");\n }\n var nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n var nonWritable = arguments.length > 4 ? arguments[4] : null;\n var nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n var loose = arguments.length > 6 ? arguments[6] : false;\n var desc = !!gopd2 && gopd2(obj, property);\n if ($defineProperty) {\n $defineProperty(obj, property, {\n configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n value,\n writable: nonWritable === null && desc ? desc.writable : !nonWritable\n });\n } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {\n obj[property] = value;\n } else {\n throw new $SyntaxError(\"This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.\");\n }\n };\n return defineDataProperty;\n}\nvar setFunctionLength;\nvar hasRequiredSetFunctionLength;\nfunction requireSetFunctionLength() {\n if (hasRequiredSetFunctionLength)\n return setFunctionLength;\n hasRequiredSetFunctionLength = 1;\n var GetIntrinsic = requireGetIntrinsic();\n var define = requireDefineDataProperty();\n var hasDescriptors = requireHasPropertyDescriptors()();\n var gOPD = requireGopd();\n var $TypeError = GetIntrinsic(\"%TypeError%\");\n var $floor = GetIntrinsic(\"%Math.floor%\");\n setFunctionLength = function setFunctionLength2(fn, length) {\n if (typeof fn !== \"function\") {\n throw new $TypeError(\"`fn` is not a function\");\n }\n if (typeof length !== \"number\" || length < 0 || length > 4294967295 || $floor(length) !== length) {\n throw new $TypeError(\"`length` must be a positive 32-bit integer\");\n }\n var loose = arguments.length > 2 && !!arguments[2];\n var functionLengthIsConfigurable = true;\n var functionLengthIsWritable = true;\n if (\"length\" in fn && gOPD) {\n var desc = gOPD(fn, \"length\");\n if (desc && !desc.configurable) {\n functionLengthIsConfigurable = false;\n }\n if (desc && !desc.writable) {\n functionLengthIsWritable = false;\n }\n }\n if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {\n if (hasDescriptors) {\n define(fn, \"length\", length, true, true);\n } else {\n define(fn, \"length\", length);\n }\n }\n return fn;\n };\n return setFunctionLength;\n}\nvar hasRequiredCallBind;\nfunction requireCallBind() {\n if (hasRequiredCallBind)\n return callBind.exports;\n hasRequiredCallBind = 1;\n (function(module) {\n var bind = requireFunctionBind();\n var GetIntrinsic = requireGetIntrinsic();\n var setFunctionLength2 = requireSetFunctionLength();\n var $TypeError = GetIntrinsic(\"%TypeError%\");\n var $apply = GetIntrinsic(\"%Function.prototype.apply%\");\n var $call = GetIntrinsic(\"%Function.prototype.call%\");\n var $reflectApply = GetIntrinsic(\"%Reflect.apply%\", true) || bind.call($call, $apply);\n var $defineProperty = GetIntrinsic(\"%Object.defineProperty%\", true);\n var $max = GetIntrinsic(\"%Math.max%\");\n if ($defineProperty) {\n try {\n $defineProperty({}, \"a\", { value: 1 });\n } catch (e) {\n $defineProperty = null;\n }\n }\n module.exports = function callBind2(originalFunction) {\n if (typeof originalFunction !== \"function\") {\n throw new $TypeError(\"a function is required\");\n }\n var func = $reflectApply(bind, $call, arguments);\n return setFunctionLength2(\n func,\n 1 + $max(0, originalFunction.length - (arguments.length - 1)),\n true\n );\n };\n var applyBind = function applyBind2() {\n return $reflectApply(bind, $apply, arguments);\n };\n if ($defineProperty) {\n $defineProperty(module.exports, \"apply\", { value: applyBind });\n } else {\n module.exports.apply = applyBind;\n }\n })(callBind);\n return callBind.exports;\n}\nvar callBound;\nvar hasRequiredCallBound;\nfunction requireCallBound() {\n if (hasRequiredCallBound)\n return callBound;\n hasRequiredCallBound = 1;\n var GetIntrinsic = requireGetIntrinsic();\n var callBind2 = requireCallBind();\n var $indexOf = callBind2(GetIntrinsic(\"String.prototype.indexOf\"));\n callBound = function callBoundIntrinsic(name, allowMissing) {\n var intrinsic = GetIntrinsic(name, !!allowMissing);\n if (typeof intrinsic === \"function\" && $indexOf(name, \".prototype.\") > -1) {\n return callBind2(intrinsic);\n }\n return intrinsic;\n };\n return callBound;\n}\nvar isArguments;\nvar hasRequiredIsArguments;\nfunction requireIsArguments() {\n if (hasRequiredIsArguments)\n return isArguments;\n hasRequiredIsArguments = 1;\n var hasToStringTag = requireShams()();\n var callBound2 = requireCallBound();\n var $toString = callBound2(\"Object.prototype.toString\");\n var isStandardArguments = function isArguments2(value) {\n if (hasToStringTag && value && typeof value === \"object\" && Symbol.toStringTag in value) {\n return false;\n }\n return $toString(value) === \"[object Arguments]\";\n };\n var isLegacyArguments = function isArguments2(value) {\n if (isStandardArguments(value)) {\n return true;\n }\n return value !== null && typeof value === \"object\" && typeof value.length === \"number\" && value.length >= 0 && $toString(value) !== \"[object Array]\" && $toString(value.callee) === \"[object Function]\";\n };\n var supportsStandardArguments = function() {\n return isStandardArguments(arguments);\n }();\n isStandardArguments.isLegacyArguments = isLegacyArguments;\n isArguments = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n return isArguments;\n}\nvar isGeneratorFunction;\nvar hasRequiredIsGeneratorFunction;\nfunction requireIsGeneratorFunction() {\n if (hasRequiredIsGeneratorFunction)\n return isGeneratorFunction;\n hasRequiredIsGeneratorFunction = 1;\n var toStr = Object.prototype.toString;\n var fnToStr = Function.prototype.toString;\n var isFnRegex = /^\\s*(?:function)?\\*/;\n var hasToStringTag = requireShams()();\n var getProto = Object.getPrototypeOf;\n var getGeneratorFunc = function() {\n if (!hasToStringTag) {\n return false;\n }\n try {\n return Function(\"return function*() {}\")();\n } catch (e) {\n }\n };\n var GeneratorFunction;\n isGeneratorFunction = function isGeneratorFunction2(fn) {\n if (typeof fn !== \"function\") {\n return false;\n }\n if (isFnRegex.test(fnToStr.call(fn))) {\n return true;\n }\n if (!hasToStringTag) {\n var str = toStr.call(fn);\n return str === \"[object GeneratorFunction]\";\n }\n if (!getProto) {\n return false;\n }\n if (typeof GeneratorFunction === \"undefined\") {\n var generatorFunc = getGeneratorFunc();\n GeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;\n }\n return getProto(fn) === GeneratorFunction;\n };\n return isGeneratorFunction;\n}\nvar isCallable;\nvar hasRequiredIsCallable;\nfunction requireIsCallable() {\n if (hasRequiredIsCallable)\n return isCallable;\n hasRequiredIsCallable = 1;\n var fnToStr = Function.prototype.toString;\n var reflectApply = typeof Reflect === \"object\" && Reflect !== null && Reflect.apply;\n var badArrayLike;\n var isCallableMarker;\n if (typeof reflectApply === \"function\" && typeof Object.defineProperty === \"function\") {\n try {\n badArrayLike = Object.defineProperty({}, \"length\", {\n get: function() {\n throw isCallableMarker;\n }\n });\n isCallableMarker = {};\n reflectApply(function() {\n throw 42;\n }, null, badArrayLike);\n } catch (_) {\n if (_ !== isCallableMarker) {\n reflectApply = null;\n }\n }\n } else {\n reflectApply = null;\n }\n var constructorRegex = /^\\s*class\\b/;\n var isES6ClassFn = function isES6ClassFunction(value) {\n try {\n var fnStr = fnToStr.call(value);\n return constructorRegex.test(fnStr);\n } catch (e) {\n return false;\n }\n };\n var tryFunctionObject = function tryFunctionToStr(value) {\n try {\n if (isES6ClassFn(value)) {\n return false;\n }\n fnToStr.call(value);\n return true;\n } catch (e) {\n return false;\n }\n };\n var toStr = Object.prototype.toString;\n var objectClass = \"[object Object]\";\n var fnClass = \"[object Function]\";\n var genClass = \"[object GeneratorFunction]\";\n var ddaClass = \"[object HTMLAllCollection]\";\n var ddaClass2 = \"[object HTML document.all class]\";\n var ddaClass3 = \"[object HTMLCollection]\";\n var hasToStringTag = typeof Symbol === \"function\" && !!Symbol.toStringTag;\n var isIE68 = !(0 in [,]);\n var isDDA = function isDocumentDotAll() {\n return false;\n };\n if (typeof document === \"object\") {\n var all = document.all;\n if (toStr.call(all) === toStr.call(document.all)) {\n isDDA = function isDocumentDotAll(value) {\n if ((isIE68 || !value) && (typeof value === \"undefined\" || typeof value === \"object\")) {\n try {\n var str = toStr.call(value);\n return (str === ddaClass || str === ddaClass2 || str === ddaClass3 || str === objectClass) && value(\"\") == null;\n } catch (e) {\n }\n }\n return false;\n };\n }\n }\n isCallable = reflectApply ? function isCallable2(value) {\n if (isDDA(value)) {\n return true;\n }\n if (!value) {\n return false;\n }\n if (typeof value !== \"function\" && typeof value !== \"object\") {\n return false;\n }\n try {\n reflectApply(value, null, badArrayLike);\n } catch (e) {\n if (e !== isCallableMarker) {\n return false;\n }\n }\n return !isES6ClassFn(value) && tryFunctionObject(value);\n } : function isCallable2(value) {\n if (isDDA(value)) {\n return true;\n }\n if (!value) {\n return false;\n }\n if (typeof value !== \"function\" && typeof value !== \"object\") {\n return false;\n }\n if (hasToStringTag) {\n return tryFunctionObject(value);\n }\n if (isES6ClassFn(value)) {\n return false;\n }\n var strClass = toStr.call(value);\n if (strClass !== fnClass && strClass !== genClass && !/^\\[object HTML/.test(strClass)) {\n return false;\n }\n return tryFunctionObject(value);\n };\n return isCallable;\n}\nvar forEach_1;\nvar hasRequiredForEach;\nfunction requireForEach() {\n if (hasRequiredForEach)\n return forEach_1;\n hasRequiredForEach = 1;\n var isCallable2 = requireIsCallable();\n var toStr = Object.prototype.toString;\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n var forEachArray = function forEachArray2(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n };\n var forEachString = function forEachString2(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n };\n var forEachObject = function forEachObject2(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n };\n var forEach = function forEach2(list, iterator, thisArg) {\n if (!isCallable2(iterator)) {\n throw new TypeError(\"iterator must be a function\");\n }\n var receiver;\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n if (toStr.call(list) === \"[object Array]\") {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === \"string\") {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n };\n forEach_1 = forEach;\n return forEach_1;\n}\nvar availableTypedArrays;\nvar hasRequiredAvailableTypedArrays;\nfunction requireAvailableTypedArrays() {\n if (hasRequiredAvailableTypedArrays)\n return availableTypedArrays;\n hasRequiredAvailableTypedArrays = 1;\n var possibleNames = [\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Float32Array\",\n \"Float64Array\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\"\n ];\n var g = typeof globalThis === \"undefined\" ? commonjsGlobal : globalThis;\n availableTypedArrays = function availableTypedArrays2() {\n var out = [];\n for (var i = 0; i < possibleNames.length; i++) {\n if (typeof g[possibleNames[i]] === \"function\") {\n out[out.length] = possibleNames[i];\n }\n }\n return out;\n };\n return availableTypedArrays;\n}\nvar whichTypedArray;\nvar hasRequiredWhichTypedArray;\nfunction requireWhichTypedArray() {\n if (hasRequiredWhichTypedArray)\n return whichTypedArray;\n hasRequiredWhichTypedArray = 1;\n var forEach = requireForEach();\n var availableTypedArrays2 = requireAvailableTypedArrays();\n var callBind2 = requireCallBind();\n var callBound2 = requireCallBound();\n var gOPD = requireGopd();\n var $toString = callBound2(\"Object.prototype.toString\");\n var hasToStringTag = requireShams()();\n var g = typeof globalThis === \"undefined\" ? commonjsGlobal : globalThis;\n var typedArrays = availableTypedArrays2();\n var $slice = callBound2(\"String.prototype.slice\");\n var getPrototypeOf = Object.getPrototypeOf;\n var $indexOf = callBound2(\"Array.prototype.indexOf\", true) || function indexOf(array, value) {\n for (var i = 0; i < array.length; i += 1) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n };\n var cache = { __proto__: null };\n if (hasToStringTag && gOPD && getPrototypeOf) {\n forEach(typedArrays, function(typedArray) {\n var arr = new g[typedArray]();\n if (Symbol.toStringTag in arr) {\n var proto = getPrototypeOf(arr);\n var descriptor = gOPD(proto, Symbol.toStringTag);\n if (!descriptor) {\n var superProto = getPrototypeOf(proto);\n descriptor = gOPD(superProto, Symbol.toStringTag);\n }\n cache[\"$\" + typedArray] = callBind2(descriptor.get);\n }\n });\n } else {\n forEach(typedArrays, function(typedArray) {\n var arr = new g[typedArray]();\n var fn = arr.slice || arr.set;\n if (fn) {\n cache[\"$\" + typedArray] = callBind2(fn);\n }\n });\n }\n var tryTypedArrays = function tryAllTypedArrays(value) {\n var found = false;\n forEach(cache, function(getter, typedArray) {\n if (!found) {\n try {\n if (\"$\" + getter(value) === typedArray) {\n found = $slice(typedArray, 1);\n }\n } catch (e) {\n }\n }\n });\n return found;\n };\n var trySlices = function tryAllSlices(value) {\n var found = false;\n forEach(cache, function(getter, name) {\n if (!found) {\n try {\n getter(value);\n found = $slice(name, 1);\n } catch (e) {\n }\n }\n });\n return found;\n };\n whichTypedArray = function whichTypedArray2(value) {\n if (!value || typeof value !== \"object\") {\n return false;\n }\n if (!hasToStringTag) {\n var tag = $slice($toString(value), 8, -1);\n if ($indexOf(typedArrays, tag) > -1) {\n return tag;\n }\n if (tag !== \"Object\") {\n return false;\n }\n return trySlices(value);\n }\n if (!gOPD) {\n return null;\n }\n return tryTypedArrays(value);\n };\n return whichTypedArray;\n}\nvar isTypedArray;\nvar hasRequiredIsTypedArray;\nfunction requireIsTypedArray() {\n if (hasRequiredIsTypedArray)\n return isTypedArray;\n hasRequiredIsTypedArray = 1;\n var whichTypedArray2 = requireWhichTypedArray();\n isTypedArray = function isTypedArray2(value) {\n return !!whichTypedArray2(value);\n };\n return isTypedArray;\n}\nvar hasRequiredTypes;\nfunction requireTypes() {\n if (hasRequiredTypes)\n return types;\n hasRequiredTypes = 1;\n (function(exports) {\n var isArgumentsObject = requireIsArguments();\n var isGeneratorFunction2 = requireIsGeneratorFunction();\n var whichTypedArray2 = requireWhichTypedArray();\n var isTypedArray2 = requireIsTypedArray();\n function uncurryThis(f) {\n return f.call.bind(f);\n }\n var BigIntSupported = typeof BigInt !== \"undefined\";\n var SymbolSupported = typeof Symbol !== \"undefined\";\n var ObjectToString = uncurryThis(Object.prototype.toString);\n var numberValue = uncurryThis(Number.prototype.valueOf);\n var stringValue = uncurryThis(String.prototype.valueOf);\n var booleanValue = uncurryThis(Boolean.prototype.valueOf);\n if (BigIntSupported) {\n var bigIntValue = uncurryThis(BigInt.prototype.valueOf);\n }\n if (SymbolSupported) {\n var symbolValue = uncurryThis(Symbol.prototype.valueOf);\n }\n function checkBoxedPrimitive(value, prototypeValueOf) {\n if (typeof value !== \"object\") {\n return false;\n }\n try {\n prototypeValueOf(value);\n return true;\n } catch (e) {\n return false;\n }\n }\n exports.isArgumentsObject = isArgumentsObject;\n exports.isGeneratorFunction = isGeneratorFunction2;\n exports.isTypedArray = isTypedArray2;\n function isPromise(input) {\n return typeof Promise !== \"undefined\" && input instanceof Promise || input !== null && typeof input === \"object\" && typeof input.then === \"function\" && typeof input.catch === \"function\";\n }\n exports.isPromise = isPromise;\n function isArrayBufferView(value) {\n if (typeof ArrayBuffer !== \"undefined\" && ArrayBuffer.isView) {\n return ArrayBuffer.isView(value);\n }\n return isTypedArray2(value) || isDataView(value);\n }\n exports.isArrayBufferView = isArrayBufferView;\n function isUint8Array(value) {\n return whichTypedArray2(value) === \"Uint8Array\";\n }\n exports.isUint8Array = isUint8Array;\n function isUint8ClampedArray(value) {\n return whichTypedArray2(value) === \"Uint8ClampedArray\";\n }\n exports.isUint8ClampedArray = isUint8ClampedArray;\n function isUint16Array(value) {\n return whichTypedArray2(value) === \"Uint16Array\";\n }\n exports.isUint16Array = isUint16Array;\n function isUint32Array(value) {\n return whichTypedArray2(value) === \"Uint32Array\";\n }\n exports.isUint32Array = isUint32Array;\n function isInt8Array(value) {\n return whichTypedArray2(value) === \"Int8Array\";\n }\n exports.isInt8Array = isInt8Array;\n function isInt16Array(value) {\n return whichTypedArray2(value) === \"Int16Array\";\n }\n exports.isInt16Array = isInt16Array;\n function isInt32Array(value) {\n return whichTypedArray2(value) === \"Int32Array\";\n }\n exports.isInt32Array = isInt32Array;\n function isFloat32Array(value) {\n return whichTypedArray2(value) === \"Float32Array\";\n }\n exports.isFloat32Array = isFloat32Array;\n function isFloat64Array(value) {\n return whichTypedArray2(value) === \"Float64Array\";\n }\n exports.isFloat64Array = isFloat64Array;\n function isBigInt64Array(value) {\n return whichTypedArray2(value) === \"BigInt64Array\";\n }\n exports.isBigInt64Array = isBigInt64Array;\n function isBigUint64Array(value) {\n return whichTypedArray2(value) === \"BigUint64Array\";\n }\n exports.isBigUint64Array = isBigUint64Array;\n function isMapToString(value) {\n return ObjectToString(value) === \"[object Map]\";\n }\n isMapToString.working = typeof Map !== \"undefined\" && isMapToString(/* @__PURE__ */ new Map());\n function isMap(value) {\n if (typeof Map === \"undefined\") {\n return false;\n }\n return isMapToString.working ? isMapToString(value) : value instanceof Map;\n }\n exports.isMap = isMap;\n function isSetToString(value) {\n return ObjectToString(value) === \"[object Set]\";\n }\n isSetToString.working = typeof Set !== \"undefined\" && isSetToString(/* @__PURE__ */ new Set());\n function isSet(value) {\n if (typeof Set === \"undefined\") {\n return false;\n }\n return isSetToString.working ? isSetToString(value) : value instanceof Set;\n }\n exports.isSet = isSet;\n function isWeakMapToString(value) {\n return ObjectToString(value) === \"[object WeakMap]\";\n }\n isWeakMapToString.working = typeof WeakMap !== \"undefined\" && isWeakMapToString(/* @__PURE__ */ new WeakMap());\n function isWeakMap(value) {\n if (typeof WeakMap === \"undefined\") {\n return false;\n }\n return isWeakMapToString.working ? isWeakMapToString(value) : value instanceof WeakMap;\n }\n exports.isWeakMap = isWeakMap;\n function isWeakSetToString(value) {\n return ObjectToString(value) === \"[object WeakSet]\";\n }\n isWeakSetToString.working = typeof WeakSet !== \"undefined\" && isWeakSetToString(/* @__PURE__ */ new WeakSet());\n function isWeakSet(value) {\n return isWeakSetToString(value);\n }\n exports.isWeakSet = isWeakSet;\n function isArrayBufferToString(value) {\n return ObjectToString(value) === \"[object ArrayBuffer]\";\n }\n isArrayBufferToString.working = typeof ArrayBuffer !== \"undefined\" && isArrayBufferToString(new ArrayBuffer());\n function isArrayBuffer(value) {\n if (typeof ArrayBuffer === \"undefined\") {\n return false;\n }\n return isArrayBufferToString.working ? isArrayBufferToString(value) : value instanceof ArrayBuffer;\n }\n exports.isArrayBuffer = isArrayBuffer;\n function isDataViewToString(value) {\n return ObjectToString(value) === \"[object DataView]\";\n }\n isDataViewToString.working = typeof ArrayBuffer !== \"undefined\" && typeof DataView !== \"undefined\" && isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1));\n function isDataView(value) {\n if (typeof DataView === \"undefined\") {\n return false;\n }\n return isDataViewToString.working ? isDataViewToString(value) : value instanceof DataView;\n }\n exports.isDataView = isDataView;\n var SharedArrayBufferCopy = typeof SharedArrayBuffer !== \"undefined\" ? SharedArrayBuffer : void 0;\n function isSharedArrayBufferToString(value) {\n return ObjectToString(value) === \"[object SharedArrayBuffer]\";\n }\n function isSharedArrayBuffer(value) {\n if (typeof SharedArrayBufferCopy === \"undefined\") {\n return false;\n }\n if (typeof isSharedArrayBufferToString.working === \"undefined\") {\n isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());\n }\n return isSharedArrayBufferToString.working ? isSharedArrayBufferToString(value) : value instanceof SharedArrayBufferCopy;\n }\n exports.isSharedArrayBuffer = isSharedArrayBuffer;\n function isAsyncFunction(value) {\n return ObjectToString(value) === \"[object AsyncFunction]\";\n }\n exports.isAsyncFunction = isAsyncFunction;\n function isMapIterator(value) {\n return ObjectToString(value) === \"[object Map Iterator]\";\n }\n exports.isMapIterator = isMapIterator;\n function isSetIterator(value) {\n return ObjectToString(value) === \"[object Set Iterator]\";\n }\n exports.isSetIterator = isSetIterator;\n function isGeneratorObject(value) {\n return ObjectToString(value) === \"[object Generator]\";\n }\n exports.isGeneratorObject = isGeneratorObject;\n function isWebAssemblyCompiledModule(value) {\n return ObjectToString(value) === \"[object WebAssembly.Module]\";\n }\n exports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;\n function isNumberObject(value) {\n return checkBoxedPrimitive(value, numberValue);\n }\n exports.isNumberObject = isNumberObject;\n function isStringObject(value) {\n return checkBoxedPrimitive(value, stringValue);\n }\n exports.isStringObject = isStringObject;\n function isBooleanObject(value) {\n return checkBoxedPrimitive(value, booleanValue);\n }\n exports.isBooleanObject = isBooleanObject;\n function isBigIntObject(value) {\n return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);\n }\n exports.isBigIntObject = isBigIntObject;\n function isSymbolObject(value) {\n return SymbolSupported && checkBoxedPrimitive(value, symbolValue);\n }\n exports.isSymbolObject = isSymbolObject;\n function isBoxedPrimitive(value) {\n return isNumberObject(value) || isStringObject(value) || isBooleanObject(value) || isBigIntObject(value) || isSymbolObject(value);\n }\n exports.isBoxedPrimitive = isBoxedPrimitive;\n function isAnyArrayBuffer(value) {\n return typeof Uint8Array !== \"undefined\" && (isArrayBuffer(value) || isSharedArrayBuffer(value));\n }\n exports.isAnyArrayBuffer = isAnyArrayBuffer;\n [\"isProxy\", \"isExternal\", \"isModuleNamespaceObject\"].forEach(function(method) {\n Object.defineProperty(exports, method, {\n enumerable: false,\n value: function() {\n throw new Error(method + \" is not supported in userland\");\n }\n });\n });\n })(types);\n return types;\n}\nvar isBufferBrowser;\nvar hasRequiredIsBufferBrowser;\nfunction requireIsBufferBrowser() {\n if (hasRequiredIsBufferBrowser)\n return isBufferBrowser;\n hasRequiredIsBufferBrowser = 1;\n isBufferBrowser = function isBuffer(arg) {\n return arg && typeof arg === \"object\" && typeof arg.copy === \"function\" && typeof arg.fill === \"function\" && typeof arg.readUInt8 === \"function\";\n };\n return isBufferBrowser;\n}\nvar hasRequiredUtil;\nfunction requireUtil() {\n if (hasRequiredUtil)\n return util;\n hasRequiredUtil = 1;\n (function(exports) {\n var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors2(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n var formatRegExp = /%[sdj%]/g;\n exports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(\" \");\n }\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x2) {\n if (x2 === \"%%\")\n return \"%\";\n if (i >= len)\n return x2;\n switch (x2) {\n case \"%s\":\n return String(args[i++]);\n case \"%d\":\n return Number(args[i++]);\n case \"%j\":\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return \"[Circular]\";\n }\n default:\n return x2;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += \" \" + x;\n } else {\n str += \" \" + inspect(x);\n }\n }\n return str;\n };\n exports.deprecate = function(fn, msg) {\n if (typeof process$1 !== \"undefined\" && process$1.noDeprecation === true) {\n return fn;\n }\n if (typeof process$1 === \"undefined\") {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process$1.throwDeprecation) {\n throw new Error(msg);\n } else if (process$1.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n return deprecated;\n };\n var debugs = {};\n var debugEnvRegex = /^$/;\n if (process$1.env.NODE_DEBUG) {\n var debugEnv = process$1.env.NODE_DEBUG;\n debugEnv = debugEnv.replace(/[|\\\\{}()[\\]^$+?.]/g, \"\\\\$&\").replace(/\\*/g, \".*\").replace(/,/g, \"$|^\").toUpperCase();\n debugEnvRegex = new RegExp(\"^\" + debugEnv + \"$\", \"i\");\n }\n exports.debuglog = function(set) {\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (debugEnvRegex.test(set)) {\n var pid = process$1.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error(\"%s %d: %s\", set, pid, msg);\n };\n } else {\n debugs[set] = function() {\n };\n }\n }\n return debugs[set];\n };\n function inspect(obj, opts) {\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n if (arguments.length >= 3)\n ctx.depth = arguments[2];\n if (arguments.length >= 4)\n ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n ctx.showHidden = opts;\n } else if (opts) {\n exports._extend(ctx, opts);\n }\n if (isUndefined(ctx.showHidden))\n ctx.showHidden = false;\n if (isUndefined(ctx.depth))\n ctx.depth = 2;\n if (isUndefined(ctx.colors))\n ctx.colors = false;\n if (isUndefined(ctx.customInspect))\n ctx.customInspect = true;\n if (ctx.colors)\n ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n }\n exports.inspect = inspect;\n inspect.colors = {\n \"bold\": [1, 22],\n \"italic\": [3, 23],\n \"underline\": [4, 24],\n \"inverse\": [7, 27],\n \"white\": [37, 39],\n \"grey\": [90, 39],\n \"black\": [30, 39],\n \"blue\": [34, 39],\n \"cyan\": [36, 39],\n \"green\": [32, 39],\n \"magenta\": [35, 39],\n \"red\": [31, 39],\n \"yellow\": [33, 39]\n };\n inspect.styles = {\n \"special\": \"cyan\",\n \"number\": \"yellow\",\n \"boolean\": \"yellow\",\n \"undefined\": \"grey\",\n \"null\": \"bold\",\n \"string\": \"green\",\n \"date\": \"magenta\",\n // \"name\": intentionally not styling\n \"regexp\": \"red\"\n };\n function stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n if (style) {\n return \"\\x1B[\" + inspect.colors[style][0] + \"m\" + str + \"\\x1B[\" + inspect.colors[style][1] + \"m\";\n } else {\n return str;\n }\n }\n function stylizeNoColor(str, styleType) {\n return str;\n }\n function arrayToHash(array) {\n var hash = {};\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n return hash;\n }\n function formatValue(ctx, value, recurseTimes) {\n if (ctx.customInspect && value && isFunction(value.inspect) && // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect && // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n if (isError(value) && (keys.indexOf(\"message\") >= 0 || keys.indexOf(\"description\") >= 0)) {\n return formatError(value);\n }\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? \": \" + value.name : \"\";\n return ctx.stylize(\"[Function\" + name + \"]\", \"special\");\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), \"regexp\");\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), \"date\");\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n var base = \"\", array = false, braces = [\"{\", \"}\"];\n if (isArray2(value)) {\n array = true;\n braces = [\"[\", \"]\"];\n }\n if (isFunction(value)) {\n var n = value.name ? \": \" + value.name : \"\";\n base = \" [Function\" + n + \"]\";\n }\n if (isRegExp(value)) {\n base = \" \" + RegExp.prototype.toString.call(value);\n }\n if (isDate(value)) {\n base = \" \" + Date.prototype.toUTCString.call(value);\n }\n if (isError(value)) {\n base = \" \" + formatError(value);\n }\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), \"regexp\");\n } else {\n return ctx.stylize(\"[Object]\", \"special\");\n }\n }\n ctx.seen.push(value);\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n ctx.seen.pop();\n return reduceToSingleString(output, base, braces);\n }\n function formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize(\"undefined\", \"undefined\");\n if (isString(value)) {\n var simple = \"'\" + JSON.stringify(value).replace(/^\"|\"$/g, \"\").replace(/'/g, \"\\\\'\").replace(/\\\\\"/g, '\"') + \"'\";\n return ctx.stylize(simple, \"string\");\n }\n if (isNumber(value))\n return ctx.stylize(\"\" + value, \"number\");\n if (isBoolean(value))\n return ctx.stylize(\"\" + value, \"boolean\");\n if (isNull(value))\n return ctx.stylize(\"null\", \"null\");\n }\n function formatError(value) {\n return \"[\" + Error.prototype.toString.call(value) + \"]\";\n }\n function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(\n ctx,\n value,\n recurseTimes,\n visibleKeys,\n String(i),\n true\n ));\n } else {\n output.push(\"\");\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(\n ctx,\n value,\n recurseTimes,\n visibleKeys,\n key,\n true\n ));\n }\n });\n return output;\n }\n function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize(\"[Getter/Setter]\", \"special\");\n } else {\n str = ctx.stylize(\"[Getter]\", \"special\");\n }\n } else {\n if (desc.set) {\n str = ctx.stylize(\"[Setter]\", \"special\");\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = \"[\" + key + \"]\";\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf(\"\\n\") > -1) {\n if (array) {\n str = str.split(\"\\n\").map(function(line) {\n return \" \" + line;\n }).join(\"\\n\").slice(2);\n } else {\n str = \"\\n\" + str.split(\"\\n\").map(function(line) {\n return \" \" + line;\n }).join(\"\\n\");\n }\n }\n } else {\n str = ctx.stylize(\"[Circular]\", \"special\");\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify(\"\" + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.slice(1, -1);\n name = ctx.stylize(name, \"name\");\n } else {\n name = name.replace(/'/g, \"\\\\'\").replace(/\\\\\"/g, '\"').replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, \"string\");\n }\n }\n return name + \": \" + str;\n }\n function reduceToSingleString(output, base, braces) {\n var length = output.reduce(function(prev, cur) {\n if (cur.indexOf(\"\\n\") >= 0)\n ;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, \"\").length + 1;\n }, 0);\n if (length > 60) {\n return braces[0] + (base === \"\" ? \"\" : base + \"\\n \") + \" \" + output.join(\",\\n \") + \" \" + braces[1];\n }\n return braces[0] + base + \" \" + output.join(\", \") + \" \" + braces[1];\n }\n exports.types = requireTypes();\n function isArray2(ar) {\n return Array.isArray(ar);\n }\n exports.isArray = isArray2;\n function isBoolean(arg) {\n return typeof arg === \"boolean\";\n }\n exports.isBoolean = isBoolean;\n function isNull(arg) {\n return arg === null;\n }\n exports.isNull = isNull;\n function isNullOrUndefined(arg) {\n return arg == null;\n }\n exports.isNullOrUndefined = isNullOrUndefined;\n function isNumber(arg) {\n return typeof arg === \"number\";\n }\n exports.isNumber = isNumber;\n function isString(arg) {\n return typeof arg === \"string\";\n }\n exports.isString = isString;\n function isSymbol(arg) {\n return typeof arg === \"symbol\";\n }\n exports.isSymbol = isSymbol;\n function isUndefined(arg) {\n return arg === void 0;\n }\n exports.isUndefined = isUndefined;\n function isRegExp(re) {\n return isObject(re) && objectToString(re) === \"[object RegExp]\";\n }\n exports.isRegExp = isRegExp;\n exports.types.isRegExp = isRegExp;\n function isObject(arg) {\n return typeof arg === \"object\" && arg !== null;\n }\n exports.isObject = isObject;\n function isDate(d) {\n return isObject(d) && objectToString(d) === \"[object Date]\";\n }\n exports.isDate = isDate;\n exports.types.isDate = isDate;\n function isError(e) {\n return isObject(e) && (objectToString(e) === \"[object Error]\" || e instanceof Error);\n }\n exports.isError = isError;\n exports.types.isNativeError = isError;\n function isFunction(arg) {\n return typeof arg === \"function\";\n }\n exports.isFunction = isFunction;\n function isPrimitive(arg) {\n return arg === null || typeof arg === \"boolean\" || typeof arg === \"number\" || typeof arg === \"string\" || typeof arg === \"symbol\" || // ES6 symbol\n typeof arg === \"undefined\";\n }\n exports.isPrimitive = isPrimitive;\n exports.isBuffer = requireIsBufferBrowser();\n function objectToString(o) {\n return Object.prototype.toString.call(o);\n }\n function pad(n) {\n return n < 10 ? \"0\" + n.toString(10) : n.toString(10);\n }\n var months = [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\"\n ];\n function timestamp() {\n var d = /* @__PURE__ */ new Date();\n var time = [\n pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())\n ].join(\":\");\n return [d.getDate(), months[d.getMonth()], time].join(\" \");\n }\n exports.log = function() {\n console.log(\"%s - %s\", timestamp(), exports.format.apply(exports, arguments));\n };\n exports.inherits = inherits_browserExports;\n exports._extend = function(origin, add) {\n if (!add || !isObject(add))\n return origin;\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n };\n function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n }\n var kCustomPromisifiedSymbol = typeof Symbol !== \"undefined\" ? Symbol(\"util.promisify.custom\") : void 0;\n exports.promisify = function promisify(original) {\n if (typeof original !== \"function\")\n throw new TypeError('The \"original\" argument must be of type Function');\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== \"function\") {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn,\n enumerable: false,\n writable: false,\n configurable: true\n });\n return fn;\n }\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function(resolve2, reject) {\n promiseResolve = resolve2;\n promiseReject = reject;\n });\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function(err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n return promise;\n }\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n if (kCustomPromisifiedSymbol)\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn,\n enumerable: false,\n writable: false,\n configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n };\n exports.promisify.custom = kCustomPromisifiedSymbol;\n function callbackifyOnRejected(reason, cb) {\n if (!reason) {\n var newReason = new Error(\"Promise was rejected with a falsy value\");\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n }\n function callbackify(original) {\n if (typeof original !== \"function\") {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n var maybeCb = args.pop();\n if (typeof maybeCb !== \"function\") {\n throw new TypeError(\"The last argument must be of type Function\");\n }\n var self2 = this;\n var cb = function() {\n return maybeCb.apply(self2, arguments);\n };\n original.apply(this, args).then(\n function(ret) {\n process$1.nextTick(cb.bind(null, null, ret));\n },\n function(rej) {\n process$1.nextTick(callbackifyOnRejected.bind(null, rej, cb));\n }\n );\n }\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(\n callbackified,\n getOwnPropertyDescriptors(original)\n );\n return callbackified;\n }\n exports.callbackify = callbackify;\n })(util);\n return util;\n}\nvar buffer_list;\nvar hasRequiredBuffer_list;\nfunction requireBuffer_list() {\n if (hasRequiredBuffer_list)\n return buffer_list;\n hasRequiredBuffer_list = 1;\n function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly)\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n }\n function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function(key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n }\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });\n } else {\n obj[key] = value;\n }\n return obj;\n }\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\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)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps)\n _defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n var _require = requireBuffer(), Buffer2 = _require.Buffer;\n var _require2 = requireUtil(), inspect = _require2.inspect;\n var custom = inspect && inspect.custom || \"inspect\";\n function copyBuffer(src, target, offset) {\n Buffer2.prototype.copy.call(src, target, offset);\n }\n buffer_list = /* @__PURE__ */ function() {\n function BufferList() {\n _classCallCheck(this, BufferList);\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n _createClass(BufferList, [{\n key: \"push\",\n value: function push(v) {\n var entry = {\n data: v,\n next: null\n };\n if (this.length > 0)\n this.tail.next = entry;\n else\n this.head = entry;\n this.tail = entry;\n ++this.length;\n }\n }, {\n key: \"unshift\",\n value: function unshift(v) {\n var entry = {\n data: v,\n next: this.head\n };\n if (this.length === 0)\n this.tail = entry;\n this.head = entry;\n ++this.length;\n }\n }, {\n key: \"shift\",\n value: function shift() {\n if (this.length === 0)\n return;\n var ret = this.head.data;\n if (this.length === 1)\n this.head = this.tail = null;\n else\n this.head = this.head.next;\n --this.length;\n return ret;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.head = this.tail = null;\n this.length = 0;\n }\n }, {\n key: \"join\",\n value: function join(s) {\n if (this.length === 0)\n return \"\";\n var p = this.head;\n var ret = \"\" + p.data;\n while (p = p.next) {\n ret += s + p.data;\n }\n return ret;\n }\n }, {\n key: \"concat\",\n value: function concat(n) {\n if (this.length === 0)\n return Buffer2.alloc(0);\n var ret = Buffer2.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n }\n // Consumes a specified amount of bytes or characters from the buffered data.\n }, {\n key: \"consume\",\n value: function consume(n, hasStrings) {\n var ret;\n if (n < this.head.data.length) {\n ret = this.head.data.slice(0, n);\n this.head.data = this.head.data.slice(n);\n } else if (n === this.head.data.length) {\n ret = this.shift();\n } else {\n ret = hasStrings ? this._getString(n) : this._getBuffer(n);\n }\n return ret;\n }\n }, {\n key: \"first\",\n value: function first() {\n return this.head.data;\n }\n // Consumes a specified amount of characters from the buffered data.\n }, {\n key: \"_getString\",\n value: function _getString(n) {\n var p = this.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length)\n ret += str;\n else\n ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next)\n this.head = p.next;\n else\n this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n // Consumes a specified amount of bytes from the buffered data.\n }, {\n key: \"_getBuffer\",\n value: function _getBuffer(n) {\n var ret = Buffer2.allocUnsafe(n);\n var p = this.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next)\n this.head = p.next;\n else\n this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n this.length -= c;\n return ret;\n }\n // Make sure the linked list only shows the minimal necessary information.\n }, {\n key: custom,\n value: function value(_, options2) {\n return inspect(this, _objectSpread({}, options2, {\n // Only inspect one level.\n depth: 0,\n // It should not recurse.\n customInspect: false\n }));\n }\n }]);\n return BufferList;\n }();\n return buffer_list;\n}\nvar destroy_1;\nvar hasRequiredDestroy;\nfunction requireDestroy() {\n if (hasRequiredDestroy)\n return destroy_1;\n hasRequiredDestroy = 1;\n function destroy(err, cb) {\n var _this = this;\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err) {\n if (!this._writableState) {\n process$1.nextTick(emitErrorNT, this, err);\n } else if (!this._writableState.errorEmitted) {\n this._writableState.errorEmitted = true;\n process$1.nextTick(emitErrorNT, this, err);\n }\n }\n return this;\n }\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n this._destroy(err || null, function(err2) {\n if (!cb && err2) {\n if (!_this._writableState) {\n process$1.nextTick(emitErrorAndCloseNT, _this, err2);\n } else if (!_this._writableState.errorEmitted) {\n _this._writableState.errorEmitted = true;\n process$1.nextTick(emitErrorAndCloseNT, _this, err2);\n } else {\n process$1.nextTick(emitCloseNT, _this);\n }\n } else if (cb) {\n process$1.nextTick(emitCloseNT, _this);\n cb(err2);\n } else {\n process$1.nextTick(emitCloseNT, _this);\n }\n });\n return this;\n }\n function emitErrorAndCloseNT(self2, err) {\n emitErrorNT(self2, err);\n emitCloseNT(self2);\n }\n function emitCloseNT(self2) {\n if (self2._writableState && !self2._writableState.emitClose)\n return;\n if (self2._readableState && !self2._readableState.emitClose)\n return;\n self2.emit(\"close\");\n }\n function undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finalCalled = false;\n this._writableState.prefinished = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n }\n function emitErrorNT(self2, err) {\n self2.emit(\"error\", err);\n }\n function errorOrDestroy(stream, err) {\n var rState = stream._readableState;\n var wState = stream._writableState;\n if (rState && rState.autoDestroy || wState && wState.autoDestroy)\n stream.destroy(err);\n else\n stream.emit(\"error\", err);\n }\n destroy_1 = {\n destroy,\n undestroy,\n errorOrDestroy\n };\n return destroy_1;\n}\nvar errorsBrowser = {};\nvar hasRequiredErrorsBrowser;\nfunction requireErrorsBrowser() {\n if (hasRequiredErrorsBrowser)\n return errorsBrowser;\n hasRequiredErrorsBrowser = 1;\n function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n }\n var codes = {};\n function createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === \"string\") {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n var NodeError = /* @__PURE__ */ function(_Base) {\n _inheritsLoose(NodeError2, _Base);\n function NodeError2(arg1, arg2, arg3) {\n return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n }\n return NodeError2;\n }(Base);\n NodeError.prototype.name = Base.name;\n NodeError.prototype.code = code;\n codes[code] = NodeError;\n }\n function oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function(i) {\n return String(i);\n });\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(\", \"), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n }\n function startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n }\n function endsWith(str, search, this_len) {\n if (this_len === void 0 || this_len > str.length) {\n this_len = str.length;\n }\n return str.substring(this_len - search.length, this_len) === search;\n }\n function includes(str, search, start) {\n if (typeof start !== \"number\") {\n start = 0;\n }\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n }\n createErrorType(\"ERR_INVALID_OPT_VALUE\", function(name, value) {\n return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n }, TypeError);\n createErrorType(\"ERR_INVALID_ARG_TYPE\", function(name, expected, actual) {\n var determiner;\n if (typeof expected === \"string\" && startsWith(expected, \"not \")) {\n determiner = \"must not be\";\n expected = expected.replace(/^not /, \"\");\n } else {\n determiner = \"must be\";\n }\n var msg;\n if (endsWith(name, \" argument\")) {\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, \"type\"));\n } else {\n var type = includes(name, \".\") ? \"property\" : \"argument\";\n msg = 'The \"'.concat(name, '\" ').concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, \"type\"));\n }\n msg += \". Received type \".concat(typeof actual);\n return msg;\n }, TypeError);\n createErrorType(\"ERR_STREAM_PUSH_AFTER_EOF\", \"stream.push() after EOF\");\n createErrorType(\"ERR_METHOD_NOT_IMPLEMENTED\", function(name) {\n return \"The \" + name + \" method is not implemented\";\n });\n createErrorType(\"ERR_STREAM_PREMATURE_CLOSE\", \"Premature close\");\n createErrorType(\"ERR_STREAM_DESTROYED\", function(name) {\n return \"Cannot call \" + name + \" after a stream was destroyed\";\n });\n createErrorType(\"ERR_MULTIPLE_CALLBACK\", \"Callback called multiple times\");\n createErrorType(\"ERR_STREAM_CANNOT_PIPE\", \"Cannot pipe, not readable\");\n createErrorType(\"ERR_STREAM_WRITE_AFTER_END\", \"write after end\");\n createErrorType(\"ERR_STREAM_NULL_VALUES\", \"May not write null values to stream\", TypeError);\n createErrorType(\"ERR_UNKNOWN_ENCODING\", function(arg) {\n return \"Unknown encoding: \" + arg;\n }, TypeError);\n createErrorType(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\", \"stream.unshift() after end event\");\n errorsBrowser.codes = codes;\n return errorsBrowser;\n}\nvar state;\nvar hasRequiredState;\nfunction requireState() {\n if (hasRequiredState)\n return state;\n hasRequiredState = 1;\n var ERR_INVALID_OPT_VALUE = requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;\n function highWaterMarkFrom(options2, isDuplex, duplexKey) {\n return options2.highWaterMark != null ? options2.highWaterMark : isDuplex ? options2[duplexKey] : null;\n }\n function getHighWaterMark(state2, options2, duplexKey, isDuplex) {\n var hwm = highWaterMarkFrom(options2, isDuplex, duplexKey);\n if (hwm != null) {\n if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {\n var name = isDuplex ? duplexKey : \"highWaterMark\";\n throw new ERR_INVALID_OPT_VALUE(name, hwm);\n }\n return Math.floor(hwm);\n }\n return state2.objectMode ? 16 : 16 * 1024;\n }\n state = {\n getHighWaterMark\n };\n return state;\n}\nvar browser;\nvar hasRequiredBrowser;\nfunction requireBrowser() {\n if (hasRequiredBrowser)\n return browser;\n hasRequiredBrowser = 1;\n browser = deprecate;\n function deprecate(fn, msg) {\n if (config(\"noDeprecation\")) {\n return fn;\n }\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config(\"throwDeprecation\")) {\n throw new Error(msg);\n } else if (config(\"traceDeprecation\")) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n return deprecated;\n }\n function config(name) {\n try {\n if (!commonjsGlobal.localStorage)\n return false;\n } catch (_) {\n return false;\n }\n var val = commonjsGlobal.localStorage[name];\n if (null == val)\n return false;\n return String(val).toLowerCase() === \"true\";\n }\n return browser;\n}\nvar _stream_writable;\nvar hasRequired_stream_writable;\nfunction require_stream_writable() {\n if (hasRequired_stream_writable)\n return _stream_writable;\n hasRequired_stream_writable = 1;\n _stream_writable = Writable;\n function CorkedRequest(state2) {\n var _this = this;\n this.next = null;\n this.entry = null;\n this.finish = function() {\n onCorkedFinish(_this, state2);\n };\n }\n var Duplex;\n Writable.WritableState = WritableState;\n var internalUtil = {\n deprecate: requireBrowser()\n };\n var Stream2 = requireStreamBrowser();\n var Buffer2 = requireBuffer().Buffer;\n var OurUint8Array = commonjsGlobal.Uint8Array || function() {\n };\n function _uint8ArrayToBuffer(chunk) {\n return Buffer2.from(chunk);\n }\n function _isUint8Array(obj) {\n return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;\n }\n var destroyImpl = requireDestroy();\n var _require = requireState(), getHighWaterMark = _require.getHighWaterMark;\n var _require$codes = requireErrorsBrowser().codes, ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;\n var errorOrDestroy = destroyImpl.errorOrDestroy;\n inherits_browserExports(Writable, Stream2);\n function nop() {\n }\n function WritableState(options2, stream, isDuplex) {\n Duplex = Duplex || require_stream_duplex();\n options2 = options2 || {};\n if (typeof isDuplex !== \"boolean\")\n isDuplex = stream instanceof Duplex;\n this.objectMode = !!options2.objectMode;\n if (isDuplex)\n this.objectMode = this.objectMode || !!options2.writableObjectMode;\n this.highWaterMark = getHighWaterMark(this, options2, \"writableHighWaterMark\", isDuplex);\n this.finalCalled = false;\n this.needDrain = false;\n this.ending = false;\n this.ended = false;\n this.finished = false;\n this.destroyed = false;\n var noDecode = options2.decodeStrings === false;\n this.decodeStrings = !noDecode;\n this.defaultEncoding = options2.defaultEncoding || \"utf8\";\n this.length = 0;\n this.writing = false;\n this.corked = 0;\n this.sync = true;\n this.bufferProcessing = false;\n this.onwrite = function(er) {\n onwrite(stream, er);\n };\n this.writecb = null;\n this.writelen = 0;\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n this.pendingcb = 0;\n this.prefinished = false;\n this.errorEmitted = false;\n this.emitClose = options2.emitClose !== false;\n this.autoDestroy = !!options2.autoDestroy;\n this.bufferedRequestCount = 0;\n this.corkedRequestsFree = new CorkedRequest(this);\n }\n WritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n };\n (function() {\n try {\n Object.defineProperty(WritableState.prototype, \"buffer\", {\n get: internalUtil.deprecate(function writableStateBufferGetter() {\n return this.getBuffer();\n }, \"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\", \"DEP0003\")\n });\n } catch (_) {\n }\n })();\n var realHasInstance;\n if (typeof Symbol === \"function\" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === \"function\") {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(object) {\n if (realHasInstance.call(this, object))\n return true;\n if (this !== Writable)\n return false;\n return object && object._writableState instanceof WritableState;\n }\n });\n } else {\n realHasInstance = function realHasInstance2(object) {\n return object instanceof this;\n };\n }\n function Writable(options2) {\n Duplex = Duplex || require_stream_duplex();\n var isDuplex = this instanceof Duplex;\n if (!isDuplex && !realHasInstance.call(Writable, this))\n return new Writable(options2);\n this._writableState = new WritableState(options2, this, isDuplex);\n this.writable = true;\n if (options2) {\n if (typeof options2.write === \"function\")\n this._write = options2.write;\n if (typeof options2.writev === \"function\")\n this._writev = options2.writev;\n if (typeof options2.destroy === \"function\")\n this._destroy = options2.destroy;\n if (typeof options2.final === \"function\")\n this._final = options2.final;\n }\n Stream2.call(this);\n }\n Writable.prototype.pipe = function() {\n errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());\n };\n function writeAfterEnd(stream, cb) {\n var er = new ERR_STREAM_WRITE_AFTER_END();\n errorOrDestroy(stream, er);\n process$1.nextTick(cb, er);\n }\n function validChunk(stream, state2, chunk, cb) {\n var er;\n if (chunk === null) {\n er = new ERR_STREAM_NULL_VALUES();\n } else if (typeof chunk !== \"string\" && !state2.objectMode) {\n er = new ERR_INVALID_ARG_TYPE(\"chunk\", [\"string\", \"Buffer\"], chunk);\n }\n if (er) {\n errorOrDestroy(stream, er);\n process$1.nextTick(cb, er);\n return false;\n }\n return true;\n }\n Writable.prototype.write = function(chunk, encoding, cb) {\n var state2 = this._writableState;\n var ret = false;\n var isBuf = !state2.objectMode && _isUint8Array(chunk);\n if (isBuf && !Buffer2.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (typeof encoding === \"function\") {\n cb = encoding;\n encoding = null;\n }\n if (isBuf)\n encoding = \"buffer\";\n else if (!encoding)\n encoding = state2.defaultEncoding;\n if (typeof cb !== \"function\")\n cb = nop;\n if (state2.ending)\n writeAfterEnd(this, cb);\n else if (isBuf || validChunk(this, state2, chunk, cb)) {\n state2.pendingcb++;\n ret = writeOrBuffer(this, state2, isBuf, chunk, encoding, cb);\n }\n return ret;\n };\n Writable.prototype.cork = function() {\n this._writableState.corked++;\n };\n Writable.prototype.uncork = function() {\n var state2 = this._writableState;\n if (state2.corked) {\n state2.corked--;\n if (!state2.writing && !state2.corked && !state2.bufferProcessing && state2.bufferedRequest)\n clearBuffer(this, state2);\n }\n };\n Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n if (typeof encoding === \"string\")\n encoding = encoding.toLowerCase();\n if (!([\"hex\", \"utf8\", \"utf-8\", \"ascii\", \"binary\", \"base64\", \"ucs2\", \"ucs-2\", \"utf16le\", \"utf-16le\", \"raw\"].indexOf((encoding + \"\").toLowerCase()) > -1))\n throw new ERR_UNKNOWN_ENCODING(encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n };\n Object.defineProperty(Writable.prototype, \"writableBuffer\", {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n });\n function decodeChunk(state2, chunk, encoding) {\n if (!state2.objectMode && state2.decodeStrings !== false && typeof chunk === \"string\") {\n chunk = Buffer2.from(chunk, encoding);\n }\n return chunk;\n }\n Object.defineProperty(Writable.prototype, \"writableHighWaterMark\", {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n });\n function writeOrBuffer(stream, state2, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state2, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = \"buffer\";\n chunk = newChunk;\n }\n }\n var len = state2.objectMode ? 1 : chunk.length;\n state2.length += len;\n var ret = state2.length < state2.highWaterMark;\n if (!ret)\n state2.needDrain = true;\n if (state2.writing || state2.corked) {\n var last = state2.lastBufferedRequest;\n state2.lastBufferedRequest = {\n chunk,\n encoding,\n isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state2.lastBufferedRequest;\n } else {\n state2.bufferedRequest = state2.lastBufferedRequest;\n }\n state2.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state2, false, len, chunk, encoding, cb);\n }\n return ret;\n }\n function doWrite(stream, state2, writev, len, chunk, encoding, cb) {\n state2.writelen = len;\n state2.writecb = cb;\n state2.writing = true;\n state2.sync = true;\n if (state2.destroyed)\n state2.onwrite(new ERR_STREAM_DESTROYED(\"write\"));\n else if (writev)\n stream._writev(chunk, state2.onwrite);\n else\n stream._write(chunk, encoding, state2.onwrite);\n state2.sync = false;\n }\n function onwriteError(stream, state2, sync, er, cb) {\n --state2.pendingcb;\n if (sync) {\n process$1.nextTick(cb, er);\n process$1.nextTick(finishMaybe, stream, state2);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n } else {\n cb(er);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n finishMaybe(stream, state2);\n }\n }\n function onwriteStateUpdate(state2) {\n state2.writing = false;\n state2.writecb = null;\n state2.length -= state2.writelen;\n state2.writelen = 0;\n }\n function onwrite(stream, er) {\n var state2 = stream._writableState;\n var sync = state2.sync;\n var cb = state2.writecb;\n if (typeof cb !== \"function\")\n throw new ERR_MULTIPLE_CALLBACK();\n onwriteStateUpdate(state2);\n if (er)\n onwriteError(stream, state2, sync, er, cb);\n else {\n var finished = needFinish(state2) || stream.destroyed;\n if (!finished && !state2.corked && !state2.bufferProcessing && state2.bufferedRequest) {\n clearBuffer(stream, state2);\n }\n if (sync) {\n process$1.nextTick(afterWrite, stream, state2, finished, cb);\n } else {\n afterWrite(stream, state2, finished, cb);\n }\n }\n }\n function afterWrite(stream, state2, finished, cb) {\n if (!finished)\n onwriteDrain(stream, state2);\n state2.pendingcb--;\n cb();\n finishMaybe(stream, state2);\n }\n function onwriteDrain(stream, state2) {\n if (state2.length === 0 && state2.needDrain) {\n state2.needDrain = false;\n stream.emit(\"drain\");\n }\n }\n function clearBuffer(stream, state2) {\n state2.bufferProcessing = true;\n var entry = state2.bufferedRequest;\n if (stream._writev && entry && entry.next) {\n var l = state2.bufferedRequestCount;\n var buffer2 = new Array(l);\n var holder = state2.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer2[count] = entry;\n if (!entry.isBuf)\n allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer2.allBuffers = allBuffers;\n doWrite(stream, state2, true, state2.length, buffer2, \"\", holder.finish);\n state2.pendingcb++;\n state2.lastBufferedRequest = null;\n if (holder.next) {\n state2.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state2.corkedRequestsFree = new CorkedRequest(state2);\n }\n state2.bufferedRequestCount = 0;\n } else {\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state2.objectMode ? 1 : chunk.length;\n doWrite(stream, state2, false, len, chunk, encoding, cb);\n entry = entry.next;\n state2.bufferedRequestCount--;\n if (state2.writing) {\n break;\n }\n }\n if (entry === null)\n state2.lastBufferedRequest = null;\n }\n state2.bufferedRequest = entry;\n state2.bufferProcessing = false;\n }\n Writable.prototype._write = function(chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED(\"_write()\"));\n };\n Writable.prototype._writev = null;\n Writable.prototype.end = function(chunk, encoding, cb) {\n var state2 = this._writableState;\n if (typeof chunk === \"function\") {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === \"function\") {\n cb = encoding;\n encoding = null;\n }\n if (chunk !== null && chunk !== void 0)\n this.write(chunk, encoding);\n if (state2.corked) {\n state2.corked = 1;\n this.uncork();\n }\n if (!state2.ending)\n endWritable(this, state2, cb);\n return this;\n };\n Object.defineProperty(Writable.prototype, \"writableLength\", {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n });\n function needFinish(state2) {\n return state2.ending && state2.length === 0 && state2.bufferedRequest === null && !state2.finished && !state2.writing;\n }\n function callFinal(stream, state2) {\n stream._final(function(err) {\n state2.pendingcb--;\n if (err) {\n errorOrDestroy(stream, err);\n }\n state2.prefinished = true;\n stream.emit(\"prefinish\");\n finishMaybe(stream, state2);\n });\n }\n function prefinish(stream, state2) {\n if (!state2.prefinished && !state2.finalCalled) {\n if (typeof stream._final === \"function\" && !state2.destroyed) {\n state2.pendingcb++;\n state2.finalCalled = true;\n process$1.nextTick(callFinal, stream, state2);\n } else {\n state2.prefinished = true;\n stream.emit(\"prefinish\");\n }\n }\n }\n function finishMaybe(stream, state2) {\n var need = needFinish(state2);\n if (need) {\n prefinish(stream, state2);\n if (state2.pendingcb === 0) {\n state2.finished = true;\n stream.emit(\"finish\");\n if (state2.autoDestroy) {\n var rState = stream._readableState;\n if (!rState || rState.autoDestroy && rState.endEmitted) {\n stream.destroy();\n }\n }\n }\n }\n return need;\n }\n function endWritable(stream, state2, cb) {\n state2.ending = true;\n finishMaybe(stream, state2);\n if (cb) {\n if (state2.finished)\n process$1.nextTick(cb);\n else\n stream.once(\"finish\", cb);\n }\n state2.ended = true;\n stream.writable = false;\n }\n function onCorkedFinish(corkReq, state2, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state2.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n state2.corkedRequestsFree.next = corkReq;\n }\n Object.defineProperty(Writable.prototype, \"destroyed\", {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._writableState === void 0) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function set(value) {\n if (!this._writableState) {\n return;\n }\n this._writableState.destroyed = value;\n }\n });\n Writable.prototype.destroy = destroyImpl.destroy;\n Writable.prototype._undestroy = destroyImpl.undestroy;\n Writable.prototype._destroy = function(err, cb) {\n cb(err);\n };\n return _stream_writable;\n}\nvar _stream_duplex;\nvar hasRequired_stream_duplex;\nfunction require_stream_duplex() {\n if (hasRequired_stream_duplex)\n return _stream_duplex;\n hasRequired_stream_duplex = 1;\n var objectKeys = Object.keys || function(obj) {\n var keys2 = [];\n for (var key in obj) {\n keys2.push(key);\n }\n return keys2;\n };\n _stream_duplex = Duplex;\n var Readable = require_stream_readable();\n var Writable = require_stream_writable();\n inherits_browserExports(Duplex, Readable);\n {\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method])\n Duplex.prototype[method] = Writable.prototype[method];\n }\n }\n function Duplex(options2) {\n if (!(this instanceof Duplex))\n return new Duplex(options2);\n Readable.call(this, options2);\n Writable.call(this, options2);\n this.allowHalfOpen = true;\n if (options2) {\n if (options2.readable === false)\n this.readable = false;\n if (options2.writable === false)\n this.writable = false;\n if (options2.allowHalfOpen === false) {\n this.allowHalfOpen = false;\n this.once(\"end\", onend);\n }\n }\n }\n Object.defineProperty(Duplex.prototype, \"writableHighWaterMark\", {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n });\n Object.defineProperty(Duplex.prototype, \"writableBuffer\", {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n });\n Object.defineProperty(Duplex.prototype, \"writableLength\", {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n });\n function onend() {\n if (this._writableState.ended)\n return;\n process$1.nextTick(onEndNT, this);\n }\n function onEndNT(self2) {\n self2.end();\n }\n Object.defineProperty(Duplex.prototype, \"destroyed\", {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === void 0 || this._writableState === void 0) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n if (this._readableState === void 0 || this._writableState === void 0) {\n return;\n }\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n });\n return _stream_duplex;\n}\nvar string_decoder = {};\nvar safeBuffer = { exports: {} };\nvar hasRequiredSafeBuffer;\nfunction requireSafeBuffer() {\n if (hasRequiredSafeBuffer)\n return safeBuffer.exports;\n hasRequiredSafeBuffer = 1;\n (function(module, exports) {\n var buffer2 = requireBuffer();\n var Buffer2 = buffer2.Buffer;\n function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n }\n if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) {\n module.exports = buffer2;\n } else {\n copyProps(buffer2, exports);\n exports.Buffer = SafeBuffer;\n }\n function SafeBuffer(arg, encodingOrOffset, length) {\n return Buffer2(arg, encodingOrOffset, length);\n }\n copyProps(Buffer2, SafeBuffer);\n SafeBuffer.from = function(arg, encodingOrOffset, length) {\n if (typeof arg === \"number\") {\n throw new TypeError(\"Argument must not be a number\");\n }\n return Buffer2(arg, encodingOrOffset, length);\n };\n SafeBuffer.alloc = function(size, fill, encoding) {\n if (typeof size !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n var buf = Buffer2(size);\n if (fill !== void 0) {\n if (typeof encoding === \"string\") {\n buf.fill(fill, encoding);\n } else {\n buf.fill(fill);\n }\n } else {\n buf.fill(0);\n }\n return buf;\n };\n SafeBuffer.allocUnsafe = function(size) {\n if (typeof size !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n return Buffer2(size);\n };\n SafeBuffer.allocUnsafeSlow = function(size) {\n if (typeof size !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n return buffer2.SlowBuffer(size);\n };\n })(safeBuffer, safeBuffer.exports);\n return safeBuffer.exports;\n}\nvar hasRequiredString_decoder;\nfunction requireString_decoder() {\n if (hasRequiredString_decoder)\n return string_decoder;\n hasRequiredString_decoder = 1;\n var Buffer2 = requireSafeBuffer().Buffer;\n var isEncoding = Buffer2.isEncoding || function(encoding) {\n encoding = \"\" + encoding;\n switch (encoding && encoding.toLowerCase()) {\n case \"hex\":\n case \"utf8\":\n case \"utf-8\":\n case \"ascii\":\n case \"binary\":\n case \"base64\":\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n case \"raw\":\n return true;\n default:\n return false;\n }\n };\n function _normalizeEncoding(enc) {\n if (!enc)\n return \"utf8\";\n var retried;\n while (true) {\n switch (enc) {\n case \"utf8\":\n case \"utf-8\":\n return \"utf8\";\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return \"utf16le\";\n case \"latin1\":\n case \"binary\":\n return \"latin1\";\n case \"base64\":\n case \"ascii\":\n case \"hex\":\n return enc;\n default:\n if (retried)\n return;\n enc = (\"\" + enc).toLowerCase();\n retried = true;\n }\n }\n }\n function normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== \"string\" && (Buffer2.isEncoding === isEncoding || !isEncoding(enc)))\n throw new Error(\"Unknown encoding: \" + enc);\n return nenc || enc;\n }\n string_decoder.StringDecoder = StringDecoder;\n function StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case \"utf16le\":\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case \"utf8\":\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case \"base64\":\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer2.allocUnsafe(nb);\n }\n StringDecoder.prototype.write = function(buf) {\n if (buf.length === 0)\n return \"\";\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === void 0)\n return \"\";\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length)\n return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || \"\";\n };\n StringDecoder.prototype.end = utf8End;\n StringDecoder.prototype.text = utf8Text;\n StringDecoder.prototype.fillLast = function(buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n };\n function utf8CheckByte(byte) {\n if (byte <= 127)\n return 0;\n else if (byte >> 5 === 6)\n return 2;\n else if (byte >> 4 === 14)\n return 3;\n else if (byte >> 3 === 30)\n return 4;\n return byte >> 6 === 2 ? -1 : -2;\n }\n function utf8CheckIncomplete(self2, buf, i) {\n var j = buf.length - 1;\n if (j < i)\n return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0)\n self2.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i || nb === -2)\n return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0)\n self2.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i || nb === -2)\n return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2)\n nb = 0;\n else\n self2.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n }\n function utf8CheckExtraBytes(self2, buf, p) {\n if ((buf[0] & 192) !== 128) {\n self2.lastNeed = 0;\n return \"�\";\n }\n if (self2.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 192) !== 128) {\n self2.lastNeed = 1;\n return \"�\";\n }\n if (self2.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 192) !== 128) {\n self2.lastNeed = 2;\n return \"�\";\n }\n }\n }\n }\n function utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf);\n if (r !== void 0)\n return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n }\n function utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed)\n return buf.toString(\"utf8\", i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString(\"utf8\", i, end);\n }\n function utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : \"\";\n if (this.lastNeed)\n return r + \"�\";\n return r;\n }\n function utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString(\"utf16le\", i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 55296 && c <= 56319) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString(\"utf16le\", i, buf.length - 1);\n }\n function utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : \"\";\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString(\"utf16le\", 0, end);\n }\n return r;\n }\n function base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0)\n return buf.toString(\"base64\", i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString(\"base64\", i, buf.length - n);\n }\n function base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : \"\";\n if (this.lastNeed)\n return r + this.lastChar.toString(\"base64\", 0, 3 - this.lastNeed);\n return r;\n }\n function simpleWrite(buf) {\n return buf.toString(this.encoding);\n }\n function simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : \"\";\n }\n return string_decoder;\n}\nvar endOfStream;\nvar hasRequiredEndOfStream;\nfunction requireEndOfStream() {\n if (hasRequiredEndOfStream)\n return endOfStream;\n hasRequiredEndOfStream = 1;\n var ERR_STREAM_PREMATURE_CLOSE = requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;\n function once3(callback) {\n var called = false;\n return function() {\n if (called)\n return;\n called = true;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n callback.apply(this, args);\n };\n }\n function noop2() {\n }\n function isRequest(stream) {\n return stream.setHeader && typeof stream.abort === \"function\";\n }\n function eos(stream, opts, callback) {\n if (typeof opts === \"function\")\n return eos(stream, null, opts);\n if (!opts)\n opts = {};\n callback = once3(callback || noop2);\n var readable = opts.readable || opts.readable !== false && stream.readable;\n var writable = opts.writable || opts.writable !== false && stream.writable;\n var onlegacyfinish = function onlegacyfinish2() {\n if (!stream.writable)\n onfinish();\n };\n var writableEnded = stream._writableState && stream._writableState.finished;\n var onfinish = function onfinish2() {\n writable = false;\n writableEnded = true;\n if (!readable)\n callback.call(stream);\n };\n var readableEnded = stream._readableState && stream._readableState.endEmitted;\n var onend = function onend2() {\n readable = false;\n readableEnded = true;\n if (!writable)\n callback.call(stream);\n };\n var onerror = function onerror2(err) {\n callback.call(stream, err);\n };\n var onclose = function onclose2() {\n var err;\n if (readable && !readableEnded) {\n if (!stream._readableState || !stream._readableState.ended)\n err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n if (writable && !writableEnded) {\n if (!stream._writableState || !stream._writableState.ended)\n err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n };\n var onrequest = function onrequest2() {\n stream.req.on(\"finish\", onfinish);\n };\n if (isRequest(stream)) {\n stream.on(\"complete\", onfinish);\n stream.on(\"abort\", onclose);\n if (stream.req)\n onrequest();\n else\n stream.on(\"request\", onrequest);\n } else if (writable && !stream._writableState) {\n stream.on(\"end\", onlegacyfinish);\n stream.on(\"close\", onlegacyfinish);\n }\n stream.on(\"end\", onend);\n stream.on(\"finish\", onfinish);\n if (opts.error !== false)\n stream.on(\"error\", onerror);\n stream.on(\"close\", onclose);\n return function() {\n stream.removeListener(\"complete\", onfinish);\n stream.removeListener(\"abort\", onclose);\n stream.removeListener(\"request\", onrequest);\n if (stream.req)\n stream.req.removeListener(\"finish\", onfinish);\n stream.removeListener(\"end\", onlegacyfinish);\n stream.removeListener(\"close\", onlegacyfinish);\n stream.removeListener(\"finish\", onfinish);\n stream.removeListener(\"end\", onend);\n stream.removeListener(\"error\", onerror);\n stream.removeListener(\"close\", onclose);\n };\n }\n endOfStream = eos;\n return endOfStream;\n}\nvar async_iterator;\nvar hasRequiredAsync_iterator;\nfunction requireAsync_iterator() {\n if (hasRequiredAsync_iterator)\n return async_iterator;\n hasRequiredAsync_iterator = 1;\n var _Object$setPrototypeO;\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });\n } else {\n obj[key] = value;\n }\n return obj;\n }\n var finished = requireEndOfStream();\n var kLastResolve = Symbol(\"lastResolve\");\n var kLastReject = Symbol(\"lastReject\");\n var kError = Symbol(\"error\");\n var kEnded = Symbol(\"ended\");\n var kLastPromise = Symbol(\"lastPromise\");\n var kHandlePromise = Symbol(\"handlePromise\");\n var kStream = Symbol(\"stream\");\n function createIterResult(value, done) {\n return {\n value,\n done\n };\n }\n function readAndResolve(iter) {\n var resolve2 = iter[kLastResolve];\n if (resolve2 !== null) {\n var data = iter[kStream].read();\n if (data !== null) {\n iter[kLastPromise] = null;\n iter[kLastResolve] = null;\n iter[kLastReject] = null;\n resolve2(createIterResult(data, false));\n }\n }\n }\n function onReadable(iter) {\n process$1.nextTick(readAndResolve, iter);\n }\n function wrapForNext(lastPromise, iter) {\n return function(resolve2, reject) {\n lastPromise.then(function() {\n if (iter[kEnded]) {\n resolve2(createIterResult(void 0, true));\n return;\n }\n iter[kHandlePromise](resolve2, reject);\n }, reject);\n };\n }\n var AsyncIteratorPrototype = Object.getPrototypeOf(function() {\n });\n var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {\n get stream() {\n return this[kStream];\n },\n next: function next() {\n var _this = this;\n var error = this[kError];\n if (error !== null) {\n return Promise.reject(error);\n }\n if (this[kEnded]) {\n return Promise.resolve(createIterResult(void 0, true));\n }\n if (this[kStream].destroyed) {\n return new Promise(function(resolve2, reject) {\n process$1.nextTick(function() {\n if (_this[kError]) {\n reject(_this[kError]);\n } else {\n resolve2(createIterResult(void 0, true));\n }\n });\n });\n }\n var lastPromise = this[kLastPromise];\n var promise;\n if (lastPromise) {\n promise = new Promise(wrapForNext(lastPromise, this));\n } else {\n var data = this[kStream].read();\n if (data !== null) {\n return Promise.resolve(createIterResult(data, false));\n }\n promise = new Promise(this[kHandlePromise]);\n }\n this[kLastPromise] = promise;\n return promise;\n }\n }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() {\n return this;\n }), _defineProperty(_Object$setPrototypeO, \"return\", function _return() {\n var _this2 = this;\n return new Promise(function(resolve2, reject) {\n _this2[kStream].destroy(null, function(err) {\n if (err) {\n reject(err);\n return;\n }\n resolve2(createIterResult(void 0, true));\n });\n });\n }), _Object$setPrototypeO), AsyncIteratorPrototype);\n var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator2(stream) {\n var _Object$create;\n var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {\n value: stream,\n writable: true\n }), _defineProperty(_Object$create, kLastResolve, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kLastReject, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kError, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kEnded, {\n value: stream._readableState.endEmitted,\n writable: true\n }), _defineProperty(_Object$create, kHandlePromise, {\n value: function value(resolve2, reject) {\n var data = iterator[kStream].read();\n if (data) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve2(createIterResult(data, false));\n } else {\n iterator[kLastResolve] = resolve2;\n iterator[kLastReject] = reject;\n }\n },\n writable: true\n }), _Object$create));\n iterator[kLastPromise] = null;\n finished(stream, function(err) {\n if (err && err.code !== \"ERR_STREAM_PREMATURE_CLOSE\") {\n var reject = iterator[kLastReject];\n if (reject !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n reject(err);\n }\n iterator[kError] = err;\n return;\n }\n var resolve2 = iterator[kLastResolve];\n if (resolve2 !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve2(createIterResult(void 0, true));\n }\n iterator[kEnded] = true;\n });\n stream.on(\"readable\", onReadable.bind(null, iterator));\n return iterator;\n };\n async_iterator = createReadableStreamAsyncIterator;\n return async_iterator;\n}\nvar fromBrowser;\nvar hasRequiredFromBrowser;\nfunction requireFromBrowser() {\n if (hasRequiredFromBrowser)\n return fromBrowser;\n hasRequiredFromBrowser = 1;\n fromBrowser = function() {\n throw new Error(\"Readable.from is not available in the browser\");\n };\n return fromBrowser;\n}\nvar _stream_readable;\nvar hasRequired_stream_readable;\nfunction require_stream_readable() {\n if (hasRequired_stream_readable)\n return _stream_readable;\n hasRequired_stream_readable = 1;\n _stream_readable = Readable;\n var Duplex;\n Readable.ReadableState = ReadableState;\n eventsExports.EventEmitter;\n var EElistenerCount = function EElistenerCount2(emitter, type) {\n return emitter.listeners(type).length;\n };\n var Stream2 = requireStreamBrowser();\n var Buffer2 = requireBuffer().Buffer;\n var OurUint8Array = commonjsGlobal.Uint8Array || function() {\n };\n function _uint8ArrayToBuffer(chunk) {\n return Buffer2.from(chunk);\n }\n function _isUint8Array(obj) {\n return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;\n }\n var debugUtil = requireUtil();\n var debug;\n if (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog(\"stream\");\n } else {\n debug = function debug2() {\n };\n }\n var BufferList = requireBuffer_list();\n var destroyImpl = requireDestroy();\n var _require = requireState(), getHighWaterMark = _require.getHighWaterMark;\n var _require$codes = requireErrorsBrowser().codes, ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;\n var StringDecoder;\n var createReadableStreamAsyncIterator;\n var from;\n inherits_browserExports(Readable, Stream2);\n var errorOrDestroy = destroyImpl.errorOrDestroy;\n var kProxyEvents = [\"error\", \"close\", \"destroy\", \"pause\", \"resume\"];\n function prependListener2(emitter, event, fn) {\n if (typeof emitter.prependListener === \"function\")\n return emitter.prependListener(event, fn);\n if (!emitter._events || !emitter._events[event])\n emitter.on(event, fn);\n else if (Array.isArray(emitter._events[event]))\n emitter._events[event].unshift(fn);\n else\n emitter._events[event] = [fn, emitter._events[event]];\n }\n function ReadableState(options2, stream, isDuplex) {\n Duplex = Duplex || require_stream_duplex();\n options2 = options2 || {};\n if (typeof isDuplex !== \"boolean\")\n isDuplex = stream instanceof Duplex;\n this.objectMode = !!options2.objectMode;\n if (isDuplex)\n this.objectMode = this.objectMode || !!options2.readableObjectMode;\n this.highWaterMark = getHighWaterMark(this, options2, \"readableHighWaterMark\", isDuplex);\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n this.sync = true;\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n this.paused = true;\n this.emitClose = options2.emitClose !== false;\n this.autoDestroy = !!options2.autoDestroy;\n this.destroyed = false;\n this.defaultEncoding = options2.defaultEncoding || \"utf8\";\n this.awaitDrain = 0;\n this.readingMore = false;\n this.decoder = null;\n this.encoding = null;\n if (options2.encoding) {\n if (!StringDecoder)\n StringDecoder = requireString_decoder().StringDecoder;\n this.decoder = new StringDecoder(options2.encoding);\n this.encoding = options2.encoding;\n }\n }\n function Readable(options2) {\n Duplex = Duplex || require_stream_duplex();\n if (!(this instanceof Readable))\n return new Readable(options2);\n var isDuplex = this instanceof Duplex;\n this._readableState = new ReadableState(options2, this, isDuplex);\n this.readable = true;\n if (options2) {\n if (typeof options2.read === \"function\")\n this._read = options2.read;\n if (typeof options2.destroy === \"function\")\n this._destroy = options2.destroy;\n }\n Stream2.call(this);\n }\n Object.defineProperty(Readable.prototype, \"destroyed\", {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === void 0) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function set(value) {\n if (!this._readableState) {\n return;\n }\n this._readableState.destroyed = value;\n }\n });\n Readable.prototype.destroy = destroyImpl.destroy;\n Readable.prototype._undestroy = destroyImpl.undestroy;\n Readable.prototype._destroy = function(err, cb) {\n cb(err);\n };\n Readable.prototype.push = function(chunk, encoding) {\n var state2 = this._readableState;\n var skipChunkCheck;\n if (!state2.objectMode) {\n if (typeof chunk === \"string\") {\n encoding = encoding || state2.defaultEncoding;\n if (encoding !== state2.encoding) {\n chunk = Buffer2.from(chunk, encoding);\n encoding = \"\";\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n };\n Readable.prototype.unshift = function(chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n };\n function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n debug(\"readableAddChunk\", chunk);\n var state2 = stream._readableState;\n if (chunk === null) {\n state2.reading = false;\n onEofChunk(stream, state2);\n } else {\n var er;\n if (!skipChunkCheck)\n er = chunkInvalid(state2, chunk);\n if (er) {\n errorOrDestroy(stream, er);\n } else if (state2.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== \"string\" && !state2.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (addToFront) {\n if (state2.endEmitted)\n errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());\n else\n addChunk(stream, state2, chunk, true);\n } else if (state2.ended) {\n errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());\n } else if (state2.destroyed) {\n return false;\n } else {\n state2.reading = false;\n if (state2.decoder && !encoding) {\n chunk = state2.decoder.write(chunk);\n if (state2.objectMode || chunk.length !== 0)\n addChunk(stream, state2, chunk, false);\n else\n maybeReadMore(stream, state2);\n } else {\n addChunk(stream, state2, chunk, false);\n }\n }\n } else if (!addToFront) {\n state2.reading = false;\n maybeReadMore(stream, state2);\n }\n }\n return !state2.ended && (state2.length < state2.highWaterMark || state2.length === 0);\n }\n function addChunk(stream, state2, chunk, addToFront) {\n if (state2.flowing && state2.length === 0 && !state2.sync) {\n state2.awaitDrain = 0;\n stream.emit(\"data\", chunk);\n } else {\n state2.length += state2.objectMode ? 1 : chunk.length;\n if (addToFront)\n state2.buffer.unshift(chunk);\n else\n state2.buffer.push(chunk);\n if (state2.needReadable)\n emitReadable(stream);\n }\n maybeReadMore(stream, state2);\n }\n function chunkInvalid(state2, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== \"string\" && chunk !== void 0 && !state2.objectMode) {\n er = new ERR_INVALID_ARG_TYPE(\"chunk\", [\"string\", \"Buffer\", \"Uint8Array\"], chunk);\n }\n return er;\n }\n Readable.prototype.isPaused = function() {\n return this._readableState.flowing === false;\n };\n Readable.prototype.setEncoding = function(enc) {\n if (!StringDecoder)\n StringDecoder = requireString_decoder().StringDecoder;\n var decoder = new StringDecoder(enc);\n this._readableState.decoder = decoder;\n this._readableState.encoding = this._readableState.decoder.encoding;\n var p = this._readableState.buffer.head;\n var content = \"\";\n while (p !== null) {\n content += decoder.write(p.data);\n p = p.next;\n }\n this._readableState.buffer.clear();\n if (content !== \"\")\n this._readableState.buffer.push(content);\n this._readableState.length = content.length;\n return this;\n };\n var MAX_HWM = 1073741824;\n function computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n }\n function howMuchToRead(n, state2) {\n if (n <= 0 || state2.length === 0 && state2.ended)\n return 0;\n if (state2.objectMode)\n return 1;\n if (n !== n) {\n if (state2.flowing && state2.length)\n return state2.buffer.head.data.length;\n else\n return state2.length;\n }\n if (n > state2.highWaterMark)\n state2.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state2.length)\n return n;\n if (!state2.ended) {\n state2.needReadable = true;\n return 0;\n }\n return state2.length;\n }\n Readable.prototype.read = function(n) {\n debug(\"read\", n);\n n = parseInt(n, 10);\n var state2 = this._readableState;\n var nOrig = n;\n if (n !== 0)\n state2.emittedReadable = false;\n if (n === 0 && state2.needReadable && ((state2.highWaterMark !== 0 ? state2.length >= state2.highWaterMark : state2.length > 0) || state2.ended)) {\n debug(\"read: emitReadable\", state2.length, state2.ended);\n if (state2.length === 0 && state2.ended)\n endReadable(this);\n else\n emitReadable(this);\n return null;\n }\n n = howMuchToRead(n, state2);\n if (n === 0 && state2.ended) {\n if (state2.length === 0)\n endReadable(this);\n return null;\n }\n var doRead = state2.needReadable;\n debug(\"need readable\", doRead);\n if (state2.length === 0 || state2.length - n < state2.highWaterMark) {\n doRead = true;\n debug(\"length less than watermark\", doRead);\n }\n if (state2.ended || state2.reading) {\n doRead = false;\n debug(\"reading or ended\", doRead);\n } else if (doRead) {\n debug(\"do read\");\n state2.reading = true;\n state2.sync = true;\n if (state2.length === 0)\n state2.needReadable = true;\n this._read(state2.highWaterMark);\n state2.sync = false;\n if (!state2.reading)\n n = howMuchToRead(nOrig, state2);\n }\n var ret;\n if (n > 0)\n ret = fromList(n, state2);\n else\n ret = null;\n if (ret === null) {\n state2.needReadable = state2.length <= state2.highWaterMark;\n n = 0;\n } else {\n state2.length -= n;\n state2.awaitDrain = 0;\n }\n if (state2.length === 0) {\n if (!state2.ended)\n state2.needReadable = true;\n if (nOrig !== n && state2.ended)\n endReadable(this);\n }\n if (ret !== null)\n this.emit(\"data\", ret);\n return ret;\n };\n function onEofChunk(stream, state2) {\n debug(\"onEofChunk\");\n if (state2.ended)\n return;\n if (state2.decoder) {\n var chunk = state2.decoder.end();\n if (chunk && chunk.length) {\n state2.buffer.push(chunk);\n state2.length += state2.objectMode ? 1 : chunk.length;\n }\n }\n state2.ended = true;\n if (state2.sync) {\n emitReadable(stream);\n } else {\n state2.needReadable = false;\n if (!state2.emittedReadable) {\n state2.emittedReadable = true;\n emitReadable_(stream);\n }\n }\n }\n function emitReadable(stream) {\n var state2 = stream._readableState;\n debug(\"emitReadable\", state2.needReadable, state2.emittedReadable);\n state2.needReadable = false;\n if (!state2.emittedReadable) {\n debug(\"emitReadable\", state2.flowing);\n state2.emittedReadable = true;\n process$1.nextTick(emitReadable_, stream);\n }\n }\n function emitReadable_(stream) {\n var state2 = stream._readableState;\n debug(\"emitReadable_\", state2.destroyed, state2.length, state2.ended);\n if (!state2.destroyed && (state2.length || state2.ended)) {\n stream.emit(\"readable\");\n state2.emittedReadable = false;\n }\n state2.needReadable = !state2.flowing && !state2.ended && state2.length <= state2.highWaterMark;\n flow(stream);\n }\n function maybeReadMore(stream, state2) {\n if (!state2.readingMore) {\n state2.readingMore = true;\n process$1.nextTick(maybeReadMore_, stream, state2);\n }\n }\n function maybeReadMore_(stream, state2) {\n while (!state2.reading && !state2.ended && (state2.length < state2.highWaterMark || state2.flowing && state2.length === 0)) {\n var len = state2.length;\n debug(\"maybeReadMore read 0\");\n stream.read(0);\n if (len === state2.length)\n break;\n }\n state2.readingMore = false;\n }\n Readable.prototype._read = function(n) {\n errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED(\"_read()\"));\n };\n Readable.prototype.pipe = function(dest, pipeOpts) {\n var src = this;\n var state2 = this._readableState;\n switch (state2.pipesCount) {\n case 0:\n state2.pipes = dest;\n break;\n case 1:\n state2.pipes = [state2.pipes, dest];\n break;\n default:\n state2.pipes.push(dest);\n break;\n }\n state2.pipesCount += 1;\n debug(\"pipe count=%d opts=%j\", state2.pipesCount, pipeOpts);\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process$1.stdout && dest !== process$1.stderr;\n var endFn = doEnd ? onend : unpipe;\n if (state2.endEmitted)\n process$1.nextTick(endFn);\n else\n src.once(\"end\", endFn);\n dest.on(\"unpipe\", onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug(\"onunpipe\");\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n function onend() {\n debug(\"onend\");\n dest.end();\n }\n var ondrain = pipeOnDrain(src);\n dest.on(\"drain\", ondrain);\n var cleanedUp = false;\n function cleanup() {\n debug(\"cleanup\");\n dest.removeListener(\"close\", onclose);\n dest.removeListener(\"finish\", onfinish);\n dest.removeListener(\"drain\", ondrain);\n dest.removeListener(\"error\", onerror);\n dest.removeListener(\"unpipe\", onunpipe);\n src.removeListener(\"end\", onend);\n src.removeListener(\"end\", unpipe);\n src.removeListener(\"data\", ondata);\n cleanedUp = true;\n if (state2.awaitDrain && (!dest._writableState || dest._writableState.needDrain))\n ondrain();\n }\n src.on(\"data\", ondata);\n function ondata(chunk) {\n debug(\"ondata\");\n var ret = dest.write(chunk);\n debug(\"dest.write\", ret);\n if (ret === false) {\n if ((state2.pipesCount === 1 && state2.pipes === dest || state2.pipesCount > 1 && indexOf(state2.pipes, dest) !== -1) && !cleanedUp) {\n debug(\"false write response, pause\", state2.awaitDrain);\n state2.awaitDrain++;\n }\n src.pause();\n }\n }\n function onerror(er) {\n debug(\"onerror\", er);\n unpipe();\n dest.removeListener(\"error\", onerror);\n if (EElistenerCount(dest, \"error\") === 0)\n errorOrDestroy(dest, er);\n }\n prependListener2(dest, \"error\", onerror);\n function onclose() {\n dest.removeListener(\"finish\", onfinish);\n unpipe();\n }\n dest.once(\"close\", onclose);\n function onfinish() {\n debug(\"onfinish\");\n dest.removeListener(\"close\", onclose);\n unpipe();\n }\n dest.once(\"finish\", onfinish);\n function unpipe() {\n debug(\"unpipe\");\n src.unpipe(dest);\n }\n dest.emit(\"pipe\", src);\n if (!state2.flowing) {\n debug(\"pipe resume\");\n src.resume();\n }\n return dest;\n };\n function pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state2 = src._readableState;\n debug(\"pipeOnDrain\", state2.awaitDrain);\n if (state2.awaitDrain)\n state2.awaitDrain--;\n if (state2.awaitDrain === 0 && EElistenerCount(src, \"data\")) {\n state2.flowing = true;\n flow(src);\n }\n };\n }\n Readable.prototype.unpipe = function(dest) {\n var state2 = this._readableState;\n var unpipeInfo = {\n hasUnpiped: false\n };\n if (state2.pipesCount === 0)\n return this;\n if (state2.pipesCount === 1) {\n if (dest && dest !== state2.pipes)\n return this;\n if (!dest)\n dest = state2.pipes;\n state2.pipes = null;\n state2.pipesCount = 0;\n state2.flowing = false;\n if (dest)\n dest.emit(\"unpipe\", this, unpipeInfo);\n return this;\n }\n if (!dest) {\n var dests = state2.pipes;\n var len = state2.pipesCount;\n state2.pipes = null;\n state2.pipesCount = 0;\n state2.flowing = false;\n for (var i = 0; i < len; i++) {\n dests[i].emit(\"unpipe\", this, {\n hasUnpiped: false\n });\n }\n return this;\n }\n var index = indexOf(state2.pipes, dest);\n if (index === -1)\n return this;\n state2.pipes.splice(index, 1);\n state2.pipesCount -= 1;\n if (state2.pipesCount === 1)\n state2.pipes = state2.pipes[0];\n dest.emit(\"unpipe\", this, unpipeInfo);\n return this;\n };\n Readable.prototype.on = function(ev, fn) {\n var res = Stream2.prototype.on.call(this, ev, fn);\n var state2 = this._readableState;\n if (ev === \"data\") {\n state2.readableListening = this.listenerCount(\"readable\") > 0;\n if (state2.flowing !== false)\n this.resume();\n } else if (ev === \"readable\") {\n if (!state2.endEmitted && !state2.readableListening) {\n state2.readableListening = state2.needReadable = true;\n state2.flowing = false;\n state2.emittedReadable = false;\n debug(\"on readable\", state2.length, state2.reading);\n if (state2.length) {\n emitReadable(this);\n } else if (!state2.reading) {\n process$1.nextTick(nReadingNextTick, this);\n }\n }\n }\n return res;\n };\n Readable.prototype.addListener = Readable.prototype.on;\n Readable.prototype.removeListener = function(ev, fn) {\n var res = Stream2.prototype.removeListener.call(this, ev, fn);\n if (ev === \"readable\") {\n process$1.nextTick(updateReadableListening, this);\n }\n return res;\n };\n Readable.prototype.removeAllListeners = function(ev) {\n var res = Stream2.prototype.removeAllListeners.apply(this, arguments);\n if (ev === \"readable\" || ev === void 0) {\n process$1.nextTick(updateReadableListening, this);\n }\n return res;\n };\n function updateReadableListening(self2) {\n var state2 = self2._readableState;\n state2.readableListening = self2.listenerCount(\"readable\") > 0;\n if (state2.resumeScheduled && !state2.paused) {\n state2.flowing = true;\n } else if (self2.listenerCount(\"data\") > 0) {\n self2.resume();\n }\n }\n function nReadingNextTick(self2) {\n debug(\"readable nexttick read 0\");\n self2.read(0);\n }\n Readable.prototype.resume = function() {\n var state2 = this._readableState;\n if (!state2.flowing) {\n debug(\"resume\");\n state2.flowing = !state2.readableListening;\n resume(this, state2);\n }\n state2.paused = false;\n return this;\n };\n function resume(stream, state2) {\n if (!state2.resumeScheduled) {\n state2.resumeScheduled = true;\n process$1.nextTick(resume_, stream, state2);\n }\n }\n function resume_(stream, state2) {\n debug(\"resume\", state2.reading);\n if (!state2.reading) {\n stream.read(0);\n }\n state2.resumeScheduled = false;\n stream.emit(\"resume\");\n flow(stream);\n if (state2.flowing && !state2.reading)\n stream.read(0);\n }\n Readable.prototype.pause = function() {\n debug(\"call pause flowing=%j\", this._readableState.flowing);\n if (this._readableState.flowing !== false) {\n debug(\"pause\");\n this._readableState.flowing = false;\n this.emit(\"pause\");\n }\n this._readableState.paused = true;\n return this;\n };\n function flow(stream) {\n var state2 = stream._readableState;\n debug(\"flow\", state2.flowing);\n while (state2.flowing && stream.read() !== null) {\n }\n }\n Readable.prototype.wrap = function(stream) {\n var _this = this;\n var state2 = this._readableState;\n var paused = false;\n stream.on(\"end\", function() {\n debug(\"wrapped end\");\n if (state2.decoder && !state2.ended) {\n var chunk = state2.decoder.end();\n if (chunk && chunk.length)\n _this.push(chunk);\n }\n _this.push(null);\n });\n stream.on(\"data\", function(chunk) {\n debug(\"wrapped data\");\n if (state2.decoder)\n chunk = state2.decoder.write(chunk);\n if (state2.objectMode && (chunk === null || chunk === void 0))\n return;\n else if (!state2.objectMode && (!chunk || !chunk.length))\n return;\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n for (var i in stream) {\n if (this[i] === void 0 && typeof stream[i] === \"function\") {\n this[i] = /* @__PURE__ */ function methodWrap(method) {\n return function methodWrapReturnFunction() {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n this._read = function(n2) {\n debug(\"wrapped _read\", n2);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n return this;\n };\n if (typeof Symbol === \"function\") {\n Readable.prototype[Symbol.asyncIterator] = function() {\n if (createReadableStreamAsyncIterator === void 0) {\n createReadableStreamAsyncIterator = requireAsync_iterator();\n }\n return createReadableStreamAsyncIterator(this);\n };\n }\n Object.defineProperty(Readable.prototype, \"readableHighWaterMark\", {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.highWaterMark;\n }\n });\n Object.defineProperty(Readable.prototype, \"readableBuffer\", {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState && this._readableState.buffer;\n }\n });\n Object.defineProperty(Readable.prototype, \"readableFlowing\", {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.flowing;\n },\n set: function set(state2) {\n if (this._readableState) {\n this._readableState.flowing = state2;\n }\n }\n });\n Readable._fromList = fromList;\n Object.defineProperty(Readable.prototype, \"readableLength\", {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.length;\n }\n });\n function fromList(n, state2) {\n if (state2.length === 0)\n return null;\n var ret;\n if (state2.objectMode)\n ret = state2.buffer.shift();\n else if (!n || n >= state2.length) {\n if (state2.decoder)\n ret = state2.buffer.join(\"\");\n else if (state2.buffer.length === 1)\n ret = state2.buffer.first();\n else\n ret = state2.buffer.concat(state2.length);\n state2.buffer.clear();\n } else {\n ret = state2.buffer.consume(n, state2.decoder);\n }\n return ret;\n }\n function endReadable(stream) {\n var state2 = stream._readableState;\n debug(\"endReadable\", state2.endEmitted);\n if (!state2.endEmitted) {\n state2.ended = true;\n process$1.nextTick(endReadableNT, state2, stream);\n }\n }\n function endReadableNT(state2, stream) {\n debug(\"endReadableNT\", state2.endEmitted, state2.length);\n if (!state2.endEmitted && state2.length === 0) {\n state2.endEmitted = true;\n stream.readable = false;\n stream.emit(\"end\");\n if (state2.autoDestroy) {\n var wState = stream._writableState;\n if (!wState || wState.autoDestroy && wState.finished) {\n stream.destroy();\n }\n }\n }\n }\n if (typeof Symbol === \"function\") {\n Readable.from = function(iterable, opts) {\n if (from === void 0) {\n from = requireFromBrowser();\n }\n return from(Readable, iterable, opts);\n };\n }\n function indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x)\n return i;\n }\n return -1;\n }\n return _stream_readable;\n}\nvar _stream_transform;\nvar hasRequired_stream_transform;\nfunction require_stream_transform() {\n if (hasRequired_stream_transform)\n return _stream_transform;\n hasRequired_stream_transform = 1;\n _stream_transform = Transform;\n var _require$codes = requireErrorsBrowser().codes, ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;\n var Duplex = require_stream_duplex();\n inherits_browserExports(Transform, Duplex);\n function afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n var cb = ts.writecb;\n if (cb === null) {\n return this.emit(\"error\", new ERR_MULTIPLE_CALLBACK());\n }\n ts.writechunk = null;\n ts.writecb = null;\n if (data != null)\n this.push(data);\n cb(er);\n var rs = this._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n }\n function Transform(options2) {\n if (!(this instanceof Transform))\n return new Transform(options2);\n Duplex.call(this, options2);\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n };\n this._readableState.needReadable = true;\n this._readableState.sync = false;\n if (options2) {\n if (typeof options2.transform === \"function\")\n this._transform = options2.transform;\n if (typeof options2.flush === \"function\")\n this._flush = options2.flush;\n }\n this.on(\"prefinish\", prefinish);\n }\n function prefinish() {\n var _this = this;\n if (typeof this._flush === \"function\" && !this._readableState.destroyed) {\n this._flush(function(er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n }\n Transform.prototype.push = function(chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n };\n Transform.prototype._transform = function(chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED(\"_transform()\"));\n };\n Transform.prototype._write = function(chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark)\n this._read(rs.highWaterMark);\n }\n };\n Transform.prototype._read = function(n) {\n var ts = this._transformState;\n if (ts.writechunk !== null && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n ts.needTransform = true;\n }\n };\n Transform.prototype._destroy = function(err, cb) {\n Duplex.prototype._destroy.call(this, err, function(err2) {\n cb(err2);\n });\n };\n function done(stream, er, data) {\n if (er)\n return stream.emit(\"error\", er);\n if (data != null)\n stream.push(data);\n if (stream._writableState.length)\n throw new ERR_TRANSFORM_WITH_LENGTH_0();\n if (stream._transformState.transforming)\n throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();\n return stream.push(null);\n }\n return _stream_transform;\n}\nvar _stream_passthrough;\nvar hasRequired_stream_passthrough;\nfunction require_stream_passthrough() {\n if (hasRequired_stream_passthrough)\n return _stream_passthrough;\n hasRequired_stream_passthrough = 1;\n _stream_passthrough = PassThrough;\n var Transform = require_stream_transform();\n inherits_browserExports(PassThrough, Transform);\n function PassThrough(options2) {\n if (!(this instanceof PassThrough))\n return new PassThrough(options2);\n Transform.call(this, options2);\n }\n PassThrough.prototype._transform = function(chunk, encoding, cb) {\n cb(null, chunk);\n };\n return _stream_passthrough;\n}\nvar pipeline_1;\nvar hasRequiredPipeline;\nfunction requirePipeline() {\n if (hasRequiredPipeline)\n return pipeline_1;\n hasRequiredPipeline = 1;\n var eos;\n function once3(callback) {\n var called = false;\n return function() {\n if (called)\n return;\n called = true;\n callback.apply(void 0, arguments);\n };\n }\n var _require$codes = requireErrorsBrowser().codes, ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;\n function noop2(err) {\n if (err)\n throw err;\n }\n function isRequest(stream) {\n return stream.setHeader && typeof stream.abort === \"function\";\n }\n function destroyer(stream, reading, writing, callback) {\n callback = once3(callback);\n var closed = false;\n stream.on(\"close\", function() {\n closed = true;\n });\n if (eos === void 0)\n eos = requireEndOfStream();\n eos(stream, {\n readable: reading,\n writable: writing\n }, function(err) {\n if (err)\n return callback(err);\n closed = true;\n callback();\n });\n var destroyed = false;\n return function(err) {\n if (closed)\n return;\n if (destroyed)\n return;\n destroyed = true;\n if (isRequest(stream))\n return stream.abort();\n if (typeof stream.destroy === \"function\")\n return stream.destroy();\n callback(err || new ERR_STREAM_DESTROYED(\"pipe\"));\n };\n }\n function call(fn) {\n fn();\n }\n function pipe(from, to) {\n return from.pipe(to);\n }\n function popCallback(streams) {\n if (!streams.length)\n return noop2;\n if (typeof streams[streams.length - 1] !== \"function\")\n return noop2;\n return streams.pop();\n }\n function pipeline() {\n for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {\n streams[_key] = arguments[_key];\n }\n var callback = popCallback(streams);\n if (Array.isArray(streams[0]))\n streams = streams[0];\n if (streams.length < 2) {\n throw new ERR_MISSING_ARGS(\"streams\");\n }\n var error;\n var destroys = streams.map(function(stream, i) {\n var reading = i < streams.length - 1;\n var writing = i > 0;\n return destroyer(stream, reading, writing, function(err) {\n if (!error)\n error = err;\n if (err)\n destroys.forEach(call);\n if (reading)\n return;\n destroys.forEach(call);\n callback(error);\n });\n });\n return streams.reduce(pipe);\n }\n pipeline_1 = pipeline;\n return pipeline_1;\n}\nvar streamBrowserify = Stream$1;\nvar EE = eventsExports.EventEmitter;\nvar inherits = inherits_browserExports;\ninherits(Stream$1, EE);\nStream$1.Readable = require_stream_readable();\nStream$1.Writable = require_stream_writable();\nStream$1.Duplex = require_stream_duplex();\nStream$1.Transform = require_stream_transform();\nStream$1.PassThrough = require_stream_passthrough();\nStream$1.finished = requireEndOfStream();\nStream$1.pipeline = requirePipeline();\nStream$1.Stream = Stream$1;\nfunction Stream$1() {\n EE.call(this);\n}\nStream$1.prototype.pipe = function(dest, options2) {\n var source = this;\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n source.on(\"data\", ondata);\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n dest.on(\"drain\", ondrain);\n if (!dest._isStdio && (!options2 || options2.end !== false)) {\n source.on(\"end\", onend);\n source.on(\"close\", onclose);\n }\n var didOnEnd = false;\n function onend() {\n if (didOnEnd)\n return;\n didOnEnd = true;\n dest.end();\n }\n function onclose() {\n if (didOnEnd)\n return;\n didOnEnd = true;\n if (typeof dest.destroy === \"function\")\n dest.destroy();\n }\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, \"error\") === 0) {\n throw er;\n }\n }\n source.on(\"error\", onerror);\n dest.on(\"error\", onerror);\n function cleanup() {\n source.removeListener(\"data\", ondata);\n dest.removeListener(\"drain\", ondrain);\n source.removeListener(\"end\", onend);\n source.removeListener(\"close\", onclose);\n source.removeListener(\"error\", onerror);\n dest.removeListener(\"error\", onerror);\n source.removeListener(\"end\", cleanup);\n source.removeListener(\"close\", cleanup);\n dest.removeListener(\"close\", cleanup);\n }\n source.on(\"end\", cleanup);\n source.on(\"close\", cleanup);\n dest.on(\"close\", cleanup);\n dest.emit(\"pipe\", source);\n return dest;\n};\n(function(exports) {\n (function(sax2) {\n sax2.parser = function(strict, opt) {\n return new SAXParser(strict, opt);\n };\n sax2.SAXParser = SAXParser;\n sax2.SAXStream = SAXStream;\n sax2.createStream = createStream;\n sax2.MAX_BUFFER_LENGTH = 64 * 1024;\n var buffers = [\n \"comment\",\n \"sgmlDecl\",\n \"textNode\",\n \"tagName\",\n \"doctype\",\n \"procInstName\",\n \"procInstBody\",\n \"entity\",\n \"attribName\",\n \"attribValue\",\n \"cdata\",\n \"script\"\n ];\n sax2.EVENTS = [\n \"text\",\n \"processinginstruction\",\n \"sgmldeclaration\",\n \"doctype\",\n \"comment\",\n \"opentagstart\",\n \"attribute\",\n \"opentag\",\n \"closetag\",\n \"opencdata\",\n \"cdata\",\n \"closecdata\",\n \"error\",\n \"end\",\n \"ready\",\n \"script\",\n \"opennamespace\",\n \"closenamespace\"\n ];\n function SAXParser(strict, opt) {\n if (!(this instanceof SAXParser)) {\n return new SAXParser(strict, opt);\n }\n var parser = this;\n clearBuffers(parser);\n parser.q = parser.c = \"\";\n parser.bufferCheckPosition = sax2.MAX_BUFFER_LENGTH;\n parser.opt = opt || {};\n parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags;\n parser.looseCase = parser.opt.lowercase ? \"toLowerCase\" : \"toUpperCase\";\n parser.tags = [];\n parser.closed = parser.closedRoot = parser.sawRoot = false;\n parser.tag = parser.error = null;\n parser.strict = !!strict;\n parser.noscript = !!(strict || parser.opt.noscript);\n parser.state = S.BEGIN;\n parser.strictEntities = parser.opt.strictEntities;\n parser.ENTITIES = parser.strictEntities ? Object.create(sax2.XML_ENTITIES) : Object.create(sax2.ENTITIES);\n parser.attribList = [];\n if (parser.opt.xmlns) {\n parser.ns = Object.create(rootNS);\n }\n parser.trackPosition = parser.opt.position !== false;\n if (parser.trackPosition) {\n parser.position = parser.line = parser.column = 0;\n }\n emit2(parser, \"onready\");\n }\n if (!Object.create) {\n Object.create = function(o) {\n function F() {\n }\n F.prototype = o;\n var newf = new F();\n return newf;\n };\n }\n if (!Object.keys) {\n Object.keys = function(o) {\n var a = [];\n for (var i in o)\n if (o.hasOwnProperty(i))\n a.push(i);\n return a;\n };\n }\n function checkBufferLength(parser) {\n var maxAllowed = Math.max(sax2.MAX_BUFFER_LENGTH, 10);\n var maxActual = 0;\n for (var i = 0, l = buffers.length; i < l; i++) {\n var len = parser[buffers[i]].length;\n if (len > maxAllowed) {\n switch (buffers[i]) {\n case \"textNode\":\n closeText(parser);\n break;\n case \"cdata\":\n emitNode(parser, \"oncdata\", parser.cdata);\n parser.cdata = \"\";\n break;\n case \"script\":\n emitNode(parser, \"onscript\", parser.script);\n parser.script = \"\";\n break;\n default:\n error(parser, \"Max buffer length exceeded: \" + buffers[i]);\n }\n }\n maxActual = Math.max(maxActual, len);\n }\n var m = sax2.MAX_BUFFER_LENGTH - maxActual;\n parser.bufferCheckPosition = m + parser.position;\n }\n function clearBuffers(parser) {\n for (var i = 0, l = buffers.length; i < l; i++) {\n parser[buffers[i]] = \"\";\n }\n }\n function flushBuffers(parser) {\n closeText(parser);\n if (parser.cdata !== \"\") {\n emitNode(parser, \"oncdata\", parser.cdata);\n parser.cdata = \"\";\n }\n if (parser.script !== \"\") {\n emitNode(parser, \"onscript\", parser.script);\n parser.script = \"\";\n }\n }\n SAXParser.prototype = {\n end: function() {\n end(this);\n },\n write,\n resume: function() {\n this.error = null;\n return this;\n },\n close: function() {\n return this.write(null);\n },\n flush: function() {\n flushBuffers(this);\n }\n };\n var Stream2;\n try {\n Stream2 = streamBrowserify.Stream;\n } catch (ex) {\n Stream2 = function() {\n };\n }\n var streamWraps = sax2.EVENTS.filter(function(ev) {\n return ev !== \"error\" && ev !== \"end\";\n });\n function createStream(strict, opt) {\n return new SAXStream(strict, opt);\n }\n function SAXStream(strict, opt) {\n if (!(this instanceof SAXStream)) {\n return new SAXStream(strict, opt);\n }\n Stream2.apply(this);\n this._parser = new SAXParser(strict, opt);\n this.writable = true;\n this.readable = true;\n var me = this;\n this._parser.onend = function() {\n me.emit(\"end\");\n };\n this._parser.onerror = function(er) {\n me.emit(\"error\", er);\n me._parser.error = null;\n };\n this._decoder = null;\n streamWraps.forEach(function(ev) {\n Object.defineProperty(me, \"on\" + ev, {\n get: function() {\n return me._parser[\"on\" + ev];\n },\n set: function(h) {\n if (!h) {\n me.removeAllListeners(ev);\n me._parser[\"on\" + ev] = h;\n return h;\n }\n me.on(ev, h);\n },\n enumerable: true,\n configurable: false\n });\n });\n }\n SAXStream.prototype = Object.create(Stream2.prototype, {\n constructor: {\n value: SAXStream\n }\n });\n SAXStream.prototype.write = function(data) {\n if (typeof Buffer === \"function\" && typeof Buffer.isBuffer === \"function\" && Buffer.isBuffer(data)) {\n if (!this._decoder) {\n var SD = requireString_decoder().StringDecoder;\n this._decoder = new SD(\"utf8\");\n }\n data = this._decoder.write(data);\n }\n this._parser.write(data.toString());\n this.emit(\"data\", data);\n return true;\n };\n SAXStream.prototype.end = function(chunk) {\n if (chunk && chunk.length) {\n this.write(chunk);\n }\n this._parser.end();\n return true;\n };\n SAXStream.prototype.on = function(ev, handler) {\n var me = this;\n if (!me._parser[\"on\" + ev] && streamWraps.indexOf(ev) !== -1) {\n me._parser[\"on\" + ev] = function() {\n var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);\n args.splice(0, 0, ev);\n me.emit.apply(me, args);\n };\n }\n return Stream2.prototype.on.call(me, ev, handler);\n };\n var CDATA = \"[CDATA[\";\n var DOCTYPE = \"DOCTYPE\";\n var XML_NAMESPACE = \"http://www.w3.org/XML/1998/namespace\";\n var XMLNS_NAMESPACE = \"http://www.w3.org/2000/xmlns/\";\n var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE };\n var nameStart = /[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/;\n var nameBody = /[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/;\n var entityStart = /[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/;\n var entityBody = /[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/;\n function isWhitespace(c) {\n return c === \" \" || c === \"\\n\" || c === \"\\r\" || c === \"\t\";\n }\n function isQuote(c) {\n return c === '\"' || c === \"'\";\n }\n function isAttribEnd(c) {\n return c === \">\" || isWhitespace(c);\n }\n function isMatch(regex, c) {\n return regex.test(c);\n }\n function notMatch(regex, c) {\n return !isMatch(regex, c);\n }\n var S = 0;\n sax2.STATE = {\n BEGIN: S++,\n // leading byte order mark or whitespace\n BEGIN_WHITESPACE: S++,\n // leading whitespace\n TEXT: S++,\n // general stuff\n TEXT_ENTITY: S++,\n // & and such.\n OPEN_WAKA: S++,\n // <\n SGML_DECL: S++,\n // \n SCRIPT: S++,\n //