forked from riot/riot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
riot+compiler.min.js
2 lines (2 loc) · 35.1 KB
/
riot+compiler.min.js
1
2
/* Riot v3.7.3, @license MIT */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.riot=t()}(this,function(){"use strict";function e(e,t){for(var n=e?e.length:0,r=0;r<n;r++)t(e[r],r);return e}function t(e,t){return-1!==e.indexOf(t)}function n(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function r(e,t){return e.slice(0,t.length)===t}function i(e,t,n,r){return Object.defineProperty(e,t,o({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function o(e){for(var t,n=1,r=arguments,i=r.length;n<i;n++)if(t=r[n])for(var o in t)h(e,o)&&(e[o]=t[o]);return e}function s(e){return bt.test(e)}function a(e){return typeof e===lt}function u(e){return e&&typeof e===ut}function c(e){return typeof e===ct}function l(e){return typeof e===at}function f(e){return p(e)||""===e}function p(e){return c(e)||null===e}function d(e){return Array.isArray(e)||e instanceof Array}function h(e,t){var n=Ot(e,t);return c(e[t])||n&&n.writable}function g(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function m(e,t){return(t||document).querySelector(e)}function v(){return document.createDocumentFragment()}function x(){return document.createTextNode("")}function y(e){return!!e.ownerSVGElement}function b(e){return"svg"===e?document.createElementNS(pt,e):document.createElement(e)}function _(e,t){if(c(e.innerHTML)){var n=(new DOMParser).parseFromString(t,"application/xml"),r=e.ownerDocument.importNode(n.documentElement,!0);e.appendChild(r)}else e.innerHTML=t}function w(e,t){e.style.display=t?"":"none",e.hidden=!t}function O(e,t){e.removeAttribute(t)}function j(e){return Object.keys(e).reduce(function(t,n){return t+" "+n+": "+e[n]+";"},"")}function E(e,t){return e.getAttribute(t)}function N(e,t,n){var r=dt.exec(t);r&&r[1]?e.setAttributeNS(ft,r[1],n):e.setAttribute(t,n)}function C(e,t,n){e.insertBefore(t,n.parentNode&&n)}function A(e,t){if(e)for(var n;n=xt.exec(e);)t(n[1].toLowerCase(),n[2]||n[3]||n[4])}function S(e,t,n){if(e){var r,i=t(e,n);if(!1===i)return;for(e=e.firstChild;e;)r=e.nextSibling,S(e,t,i),e=r}}function T(e,t,n){var r=this.__.parent,i=this.__.item;if(!i)for(;r&&!i;)i=r.__.item,r=r.__.parent;if(h(n,"currentTarget")&&(n.currentTarget=e),h(n,"target")&&(n.target=n.srcElement),h(n,"which")&&(n.which=n.charCode||n.keyCode),n.item=i,t.call(this,n),Pt.autoUpdate&&!n.preventUpdate){var o=ce(this);o.isMounted&&o.update()}}function L(e,n,r,i){var o,s=T.bind(i,r,n);r[e]=null,o=e.replace(vt,""),t(i.__.listeners,r)||i.__.listeners.push(r),r[st]||(r[st]={}),r[st][e]&&r.removeEventListener(o,r[st][e]),r[st][e]=s,r.addEventListener(o,s,!1)}function k(t,n,r){var i,o=t.tag||t.dom._tag,s=(o?o.__:{}).head,a="VIRTUAL"===t.dom.tagName;o&&t.tagName===r?o.update():(o&&(a&&(i=x(),s.parentNode.insertBefore(i,s)),o.unmount(!0)),l(r)&&(t.impl=Ke[r],t.impl&&(t.tag=o=ue(t.impl,{root:t.dom,parent:n,tagName:r},t.dom.innerHTML,n),e(t.attrs,function(e){return N(o.root,e.name,e.value)}),t.tagName=r,o.mount(),a&&ge(o,i||o.root),n.__.onUnmount=function(){var e=o.opts.dataIs;de(o.parent.tags,e,o),de(o.__.parent.tags,e,o),o.unmount()})))}function I(e){return e?(e=e.replace(Qe,""),yt[e]&&(e=yt[e]),e):null}function R(e){if(!this.root||!E(this.root,"virtualized")){var n,r=e.dom,i=I(e.attr),s=t([rt,it],i),c=e.root&&"VIRTUAL"===e.root.tagName,l=this.__.isAnonymous,p=r&&(e.parent||r.parentNode),d="style"===i,h="class"===i;if(e._riot_id)e.__.wasCreated?e.update():(e.mount(),c&&ge(e,e.root));else{if(e.update)return e.update();var g=s&&!l?o(Object.create(this),this.parent):this,m=!f(n=Mt(e.expr,g)),v=u(n);if(v&&(h?n=Mt(JSON.stringify(n),this):d&&(n=j(n))),!e.attr||e.wasParsedOnce&&m&&!1!==n||O(r,E(r,e.attr)?e.attr:i),e.bool&&(n=!!n&&i),e.isRtag)return k(e,this,n);if((!e.wasParsedOnce||e.value!==n)&&(e.value=n,e.wasParsedOnce=!0,!v||h||d||s)){if(m||(n=""),!i)return n+="",void(p&&(e.parent=p,"TEXTAREA"===p.tagName?(p.value=n,_t||(r.nodeValue=n)):r.nodeValue=n));a(n)?L(i,n,r,this):s?w(r,i===it?!n:n):(e.bool&&(r[i]=n),"value"===i&&r.value!==n?r.value=n:m&&!1!==n&&N(r,i,n),d&&r.hidden&&w(r,!1))}}}}function M(t){e(t,R.bind(this))}function $(e,t,n,r){var i=r?Object.create(r):{};return i[e.key]=t,e.pos&&(i[e.pos]=n),i}function P(e,t){for(var n=t.length,r=e.length;n>r;)n--,F.apply(t[n],[t,n])}function F(e,t){e.splice(t,1),this.unmount(),de(this.parent,this,this.__.tagName,!0)}function H(t){var n=this;e(Object.keys(this.tags),function(e){ae.apply(n.tags[e],[e,t])})}function z(e,t,n){n?ve.apply(this,[e,t]):C(e,this.root,t.root)}function U(e,t,n){n?me.apply(this,[e,t]):C(e,this.root,t.root)}function V(e,t){t?me.call(this,e):e.appendChild(this.root)}function B(e,t,n,r){return e?r?Mt(e,n):t[e]:t}function q(n,r,i){var s,a=typeof E(n,nt)!==at||O(n,nt),u=E(n,ot),c=!!u&&Mt.hasExpr(u),f=fe(n),p=Ke[f],h=n.parentNode,g=x(),m=se(n),y=E(n,et),b=[],_=n.innerHTML,w=!Ke[f],j="VIRTUAL"===n.tagName,N=[];return O(n,tt),O(n,ot),i=Mt.loopKeys(i),i.isLoop=!0,y&&O(n,et),h.insertBefore(g,n),h.removeChild(n),i.update=function(){i.value=Mt(i.val,r);var h=i.value,x=v(),O=!d(h)&&!l(h),E=g.parentNode,C=[];E&&(O?h=(s=h||!1)?Object.keys(h).map(function(e){return $(i,h[e],e)}):[]:s=!1,y&&(h=h.filter(function(e,t){return i.key&&!O?!!Mt(y,$(i,e,t,r)):!!Mt(y,o(Object.create(r),e))})),e(h,function(e,o){var l=!s&&i.key?$(i,e,o):e,d=B(u,e,l,c),g=a&&typeof e===ut&&!s,v=N.indexOf(d),y=-1===v,O=!y&&g?v:o,A=b[O],S=o>=N.length,T=g&&y||!g&&!A;T?((A=oe(p,{parent:r,isLoop:!0,isAnonymous:w,tagName:f,root:n.cloneNode(w),item:l,index:o},_)).mount(),S?V.apply(A,[x||E,j]):U.apply(A,[E,b[o],j]),S||N.splice(o,0,l),b.splice(o,0,A),m&&pe(r.tags,f,A,!0)):O!==o&&g&&((u||t(h,N[O]))&&(z.apply(A,[E,b[o],j]),b.splice(o,0,b.splice(O,1)[0]),N.splice(o,0,N.splice(O,1)[0])),i.pos&&(A[i.pos]=o),!m&&A.tags&&H.call(A,o)),A.__.item=l,A.__.index=o,A.__.parent=r,C[o]=d,T||A.update(l)}),P(h,b),N=C.slice(),E.insertBefore(x,g))},i.unmount=function(){e(b,function(e){e.unmount()})},i}function D(e,t,n){var r=this;S(e,function(t,i){var o,s,a,u=t.nodeType,c=i.parent;if(!n&&t===e)return{parent:c};if(3===u&&"STYLE"!==t.parentNode.tagName&&Mt.hasExpr(t.nodeValue)&&c.children.push({dom:t,expr:t.nodeValue}),1!==u)return i;var l="VIRTUAL"===t.tagName;if(o=E(t,tt))return l&&N(t,"loopVirtual",!0),c.children.push(q(t,r,o)),!1;if(o=E(t,et))return c.children.push(Object.create(Ft).init(t,r,o)),!1;if((s=E(t,Ye))&&Mt.hasExpr(s))return c.children.push({isRtag:!0,expr:s,dom:t,attrs:[].slice.call(t.attributes)}),!1;if(a=se(t),l&&(E(t,"virtualized")&&t.parentElement.removeChild(t),a||E(t,"virtualized")||E(t,"loopVirtual")||(a={tmpl:t.outerHTML})),a&&(t!==e||n)){if(!l||E(t,Ye))return c.children.push(ue(a,{root:t,parent:r},t.innerHTML,r)),!1;N(t,"virtualized",!0);var f=oe({tmpl:t.outerHTML},{root:t,parent:r},t.innerHTML);c.children.push(f)}return Z.apply(r,[t,t.attributes,function(e,t){t&&c.children.push(t)}]),{parent:c}},{parent:{children:t}})}function Z(n,r,i){var o=this;e(r,function(e){if(!e)return!1;var r,a=e.name,u=s(a);t(Xe,a)&&n.tagName.toLowerCase()!==We?r=Object.create(Ht).init(n,o,a,e.value):Mt.hasExpr(e.value)&&(r={dom:n,expr:e.value,attr:a,bool:u}),i(e,r)})}function G(e,t,n){var r="o"===n[0],i=r?"select>":"table>";if(e.innerHTML="<"+i+t.trim()+"</"+i,i=e.firstChild,r)i.selectedIndex=-1;else{var o=qt[n];o&&1===i.childElementCount&&(i=m(o,i))}return i}function K(e,t){if(!zt.test(e))return e;var n={};return t=t&&t.replace(Vt,function(e,t,r){return n[t]=n[t]||r,""}).trim(),e.replace(Bt,function(e,t,r){return n[t]||r||""}).replace(Ut,function(e,n){return t||n||""})}function W(e,t,n){var r=e&&e.match(/^\s*<([-\w]+)/),i=r&&r[1].toLowerCase(),o=b(n?Gt:Zt);return e=K(e,t),Dt.test(i)?o=G(o,e,i):_(o,e),o}function J(e,t){var n=this,r=n.name,i=n.tmpl,o=n.css,s=n.attrs,a=n.onCreate;return Ke[r]||(Q(r,i,o,s,a),Ke[r].class=this.constructor),he(e,r,t,this),o&&kt.inject(),this}function Q(e,t,n,r,i){return a(r)&&(i=r,/^[\w-]+\s?=/.test(n)?(r=n,n=""):r=""),n&&(a(n)?i=n:kt.add(n)),e=e.toLowerCase(),Ke[e]={name:e,tmpl:t,attrs:r,fn:i},e}function X(e,t,n,r,i){return n&&kt.add(n,e),Ke[e]={name:e,tmpl:t,attrs:r,fn:i},e}function Y(t,n,r){function i(t){if(t.tagName){var o,s=E(t,Ye);n&&s!==n&&(s=n,N(t,Ye,n)),(o=he(t,s||t.tagName.toLowerCase(),r))&&a.push(o)}else t.length&&e(t,i)}var o,s,a=[];if(kt.inject(),u(n)&&(r=n,n=0),o=l(t)?(t="*"===t?s=xe():t+xe(t.split(/, */)))?g(t):[]:t,"*"===n){if(n=s||xe(),o.tagName)o=g(n,o);else{var c=[];e(o,function(e){return c.push(g(n,e))}),o=c}n=0}return i(o),a}function ee(e,t,n){if(u(e))ee("__"+Jt+++"__",e,!0);else{var r=n?Wt:Kt;if(!t){if(c(r[e]))throw new Error("Unregistered mixin: "+e);return r[e]}r[e]=a(t)?o(t.prototype,r[e]||{})&&t:o(r[e]||{},t)}}function te(){return e(Ge,function(e){return e.update()})}function ne(e){Ke[e]=null}function re(t,r,i,o,s){if(!t||!i){var a=!i&&t?this:r||this;e(s,function(e){e.expr&&M.call(a,[e.expr]),o[n(e.name).replace(Qe,"")]=e.expr?e.expr.value:e.value})}}function ie(e){var t=this.__.isAnonymous;i(this,"isMounted",e),t||(e?this.trigger("mount"):(this.trigger("unmount"),this.off("*"),this.__.wasCreated=!1))}function oe(n,s,u){void 0===n&&(n={}),void 0===s&&(s={});var c,f=s.context||{},p=o({},s.opts),d=s.parent,h=s.isLoop,g=!!s.isAnonymous,m=Pt.skipAnonymousTags&&g,v=s.item,x=s.index,b=[],w=[],j=[],E=s.root,C=s.tagName||fe(E),S="virtual"===C,T=!S&&!n.tmpl;return m||$t(f),n.name&&E._tag&&E._tag.unmount(!0),i(f,"isMounted",!1),i(f,"__",{isAnonymous:g,instAttrs:b,innerHTML:u,tagName:C,index:x,isLoop:h,isInline:T,listeners:[],virts:[],wasCreated:!1,tail:null,head:null,parent:null,item:null}),i(f,"_riot_id",wt()),i(f,"root",E),o(f,{opts:p},v),i(f,"parent",d||null),i(f,"tags",{}),i(f,"refs",{}),T||h&&g?c=E:(S||(E.innerHTML=""),c=W(n.tmpl,u,y(E))),i(f,"update",function(e){var t={},n=f.isMounted&&!m;return g&&d&&o(f,d),o(f,e),re.apply(f,[h,d,g,t,b]),n&&f.isMounted&&a(f.shouldUpdate)&&!f.shouldUpdate(e,t)?f:(o(p,t),n&&f.trigger("update",e),M.call(f,j),n&&f.trigger("updated"),f)}),i(f,"mixin",function(){return e(arguments,function(n){var r,i,o=[],s=["init","__proto__"];n=l(n)?ee(n):n,r=a(n)?new n:n;var u=Object.getPrototypeOf(r);do{o=o.concat(Object.getOwnPropertyNames(i||r))}while(i=Object.getPrototypeOf(i||r));e(o,function(e){if(!t(s,e)){var n=Ot(r,e)||Ot(u,e),i=n&&(n.get||n.set);!f.hasOwnProperty(e)&&i?Object.defineProperty(f,e,n):f[e]=a(r[e])?r[e].bind(f):r[e]}}),r.init&&r.init.bind(f)(p)}),f}),i(f,"mount",function(){E._tag=f,Z.apply(d,[E,E.attributes,function(e,t){!g&&Ht.isPrototypeOf(t)&&(t.tag=f),e.expr=t,b.push(e)}]),A(n.attrs,function(e,t){w.push({name:e,value:t})}),Z.apply(f,[E,w,function(e,t){t?j.push(t):N(E,e.name,e.value)}]),re.apply(f,[h,d,g,p,b]);var e=ee(Je);if(e&&!m)for(var t in e)e.hasOwnProperty(t)&&f.mixin(e[t]);if(n.fn&&n.fn.call(f,p),m||f.trigger("before-mount"),D.apply(f,[c,j,g]),f.update(v),!g&&!T)for(;c.firstChild;)E.appendChild(c.firstChild);if(i(f,"root",E),!m&&f.parent){var r=ce(f.parent);r.one(r.isMounted?"updated":"mount",function(){ie.call(f,!0)})}else ie.call(f,!0);return f.__.wasCreated=!0,f}),i(f,"unmount",function(t){var i,o=f.root,s=o.parentNode,a=Ge.indexOf(f);return m||f.trigger("before-unmount"),A(n.attrs,function(e){r(e,Qe)&&(e=e.slice(Qe.length)),O(E,e)}),f.__.listeners.forEach(function(e){Object.keys(e[st]).forEach(function(t){e.removeEventListener(t,e[st][t])})}),-1!==a&&Ge.splice(a,1),(s||S)&&(d?(i=ce(d),S?Object.keys(f.tags).forEach(function(e){de(i.tags,e,f.tags[e])}):(de(i.tags,C,f),d!==i&&de(d.tags,C,f))):_(o,""),s&&!t&&s.removeChild(o)),f.__.virts&&e(f.__.virts,function(e){e.parentNode&&e.parentNode.removeChild(e)}),le(j),e(b,function(e){return e.expr&&e.expr.unmount&&e.expr.unmount()}),f.__.onUnmount&&f.__.onUnmount(),f.isMounted||ie.call(f,!0),ie.call(f,!1),delete f.root._tag,f}),f}function se(e){return e.tagName&&Ke[E(e,Ye)||E(e,Ye)||e.tagName.toLowerCase()]}function ae(e,t){var n,r=this.parent;r&&(d(n=r.tags[e])?n.splice(t,0,n.splice(n.indexOf(this),1)[0]):pe(r.tags,e,this))}function ue(e,t,n,r){var o=oe(e,t,n),s=t.tagName||fe(t.root,!0),a=ce(r);return i(o,"parent",a),o.__.parent=r,pe(a.tags,s,o),a!==r&&pe(r.tags,s,o),o}function ce(e){for(var t=e;t.__.isAnonymous&&t.parent;)t=t.parent;return t}function le(t){e(t,function(e){e.unmount?e.unmount(!0):e.tagName?e.tag.unmount(!0):e.unmount&&e.unmount()})}function fe(e,t){var n=se(e),r=!t&&E(e,Ye);return r&&!Mt.hasExpr(r)?r:n?n.name:e.tagName.toLowerCase()}function pe(e,t,n,r,i){var o=e[t],s=d(o),a=!c(i);if(!o||o!==n)if(!o&&r)e[t]=[n];else if(o)if(s){var u=o.indexOf(n);if(u===i)return;-1!==u&&o.splice(u,1),a?o.splice(i,0,n):o.push(n)}else e[t]=[o,n];else e[t]=n}function de(e,t,n,r){if(d(e[t])){var i=e[t].indexOf(n);-1!==i&&e[t].splice(i,1),e[t].length?1!==e[t].length||r||(e[t]=e[t][0]):delete e[t]}else delete e[t]}function he(e,n,r,i){var s,a=Ke[n],u=Ke[n].class,c=i||(u?Object.create(u.prototype):{}),l=e._innerHTML=e._innerHTML||e.innerHTML,f=o({root:e,opts:r,context:c},{parent:r?r.parent:null});return a&&e&&(s=oe(a,f,l)),s&&s.mount&&(s.mount(!0),t(Ge,s)||Ge.push(s)),s}function ge(e,t){var n=v();me.call(e,n),t.parentNode.replaceChild(n,t)}function me(e,t){var n,r,i=this,o=x(),s=x(),a=v();for(this.root.insertBefore(o,this.root.firstChild),this.root.appendChild(s),this.__.head=r=o,this.__.tail=s;r;)n=r.nextSibling,a.appendChild(r),i.__.virts.push(r),r=n;t?e.insertBefore(a,t.__.head):e.appendChild(a)}function ve(e,t){for(var n,r=this,i=this.__.head,o=v();i;)if(n=i.nextSibling,o.appendChild(i),(i=n)===r.__.tail){o.appendChild(i),e.insertBefore(o,t.__.head);break}}function xe(e){if(!e){var t=Object.keys(Ke);return t+xe(t)}return e.filter(function(e){return!/[^-\w]/.test(e)}).reduce(function(e,t){var n=t.trim().toLowerCase();return e+",["+Ye+'="'+n+'"]'},"")}function ye(e){var t=arguments,n=e.source,r=e.global?"g":"";e.ignoreCase&&(r+="i"),e.multiline&&(r+="m");for(var i=1;i<arguments.length;i++)n=n.replace("@","\\"+t[i]);return new RegExp(n,r)}function be(e,t,n){var r=/[`$\\]/g;for(r.lastIndex=t;r.exec(e);){var i=r.lastIndex,o=e[i-1];if("`"===o)return i;if("$"===o&&"{"===e[i])return n.push("`","}"),i+1;r.lastIndex++}throw new Error("Unclosed ES6 template")}function _e(e,t){for(var n,r,i,o,s,a,u=new RegExp(hn,"g"),c=Rt.skipRegex,l=0|t,f=[[]],p=[],d=u,h=d.lastIndex=l;a=d.exec(e);){if(o=a.index,s=d.lastIndex,r="",i=a[1]){if("{"===i)p.push("}");else if("}"===i){if(p.pop()!==i)throw new Error("Unexpected '}'");"`"===p[p.length-1]&&(i=p.pop())}else"/"===i&&(s=c(e,o))>o+1&&(r=e.slice(o,s));"`"===i&&(s=be(e,s,p),r=e.slice(o,s),d=p.length?n||(n=new RegExp(gn,"g")):u)}else"/"===(r=a[0])[0]?(r="*"===r[1]?" ":"",e=e.slice(l,o)+r+e.slice(s),s=o+r.length,r=""):2===r.length&&(r="");r&&(f[0].push(e.slice(h,o)),f.push(r),h=s),d.lastIndex=s}return f[0].push(e.slice(h)),f}function we(e){var t,n=bn;for(1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,"\n")),n.lastIndex=0;t=n.exec(e);)"<"===t[0][0]&&(e=RegExp.leftContext+RegExp.rightContext,n.lastIndex=t[3]+1);return e}function Oe(e,t){var n,r,i,o=[];for(yn.lastIndex=0,e=e.replace(/\s+/g," ");n=yn.exec(e);){var s=n[1].toLowerCase(),a=n[2];a?(a[0]!==In&&(a=In+(a[0]===Rn?a.slice(1,-1):a)+In),"type"===s&&Nn.test(a)?r=a:(Sn.test(a)&&("value"===s&&(i=1),-1!==On.indexOf(s)&&(s="riot-"+s)),o.push(s+"="+a))):o.push(s)}return r&&(i&&(r=In+t._bp[0]+Rn+r.slice(1,-1)+Rn+t._bp[1]+In),o.push("type="+r)),o.join(" ")}function je(e,t,n){var r=n._bp;if(e&&r[4].test(e)){for(var i,o=t.expr&&(t.parser||t.type)?Ae:0,s=Rt.split(e,0,r),a=1;a<s.length;a+=2)"^"===(i=s[a])[0]?i=i.slice(1):o&&";"===(i=o(i,t).trim()).slice(-1)&&(i=i.slice(0,-1)),s[a]=Ln+(n.push(i)-1)+r[1];e=s.join("")}return e}function Ee(e,t){return t.length&&(e=e.replace(Tn,function(e,n){return t._bp[0]+t[n].trim().replace(/[\r\n]+/g," ").replace(/"/g,kn)})),e}function Ne(e,t,n){if(!/\S/.test(e))return"";if(e=je(e,t,n).replace(_n,function(e,t,r,i){return t=t.toLowerCase(),i=i&&!jn.test(t)?"></"+t:"",r&&(t+=" "+Oe(r,n)),"<"+t+i+">"}),!t.whitespace){var r=[];/<pre[\s>]/.test(e)&&(e=e.replace(En,function(e){return r.push(e),""})),e=e.trim().replace(/\s+/g," "),r.length&&(e=e.replace(/\u0002/g,function(){return r.shift()}))}return t.compact&&(e=e.replace(wn,"><$1")),Ee(e,n).replace(An,"")}function Ce(e){var t,n,r,i,o,s,a=[],u=RegExp,c=_e(e);for(e=c.shift().join("<%>");t=e.match(Mn);)a.push(u.leftContext),r=function(e){for(var t=/[{}]/g,n=1;n&&t.exec(e);)"{"===e[t.lastIndex-1]?++n:--n;return n?e.length:t.lastIndex}(e=u.rightContext),i=t[1],o=t[2]||"",s=t[3],s=(n=!/^(?:if|while|for|switch|catch|function)$/.test(s))?t[0].replace(i,"this."+s+" ="+o+" function"):t[0],a.push(s,e.slice(0,r)),e=e.slice(r),n&&!/^\s*.\s*bind\b/.test(e)&&a.push(".bind(this)");return a.length&&(e=a.join("")+e),c.length&&(e=e.replace(/<%>/g,function(){return c.shift()})),e}function Ae(e,t,n,r,i){return/\S/.test(e)?(n||(n=t.type),(t.parser||n&&pn._req("js."+n,!0)||Ce)(e,r,i).replace(/\r\n?/g,"\n").replace(An,"")):""}function Se(e,t){return t.replace($n,function(t,n,r){return r?(r=r.replace(/[^,]+/g,function(t){var n=t.trim();return 0===n.indexOf(e)?t:n&&"from"!==n&&"to"!==n&&"%"!==n.slice(-1)?n=n.indexOf(":scope")<0?e+" "+n+',[data-is="'+e+'"] '+n:n.replace(":scope",e)+","+n.replace(":scope",'[data-is="'+e+'"]'):t}),n?n+" "+r:r):t})}function Te(e,t,n,r){return r=r||{},n&&"css"!==n&&(e=pn._req("css."+n,!0)(t,e,r.parserOpts||{},r.url)),e=e.replace(Rt.R_MLCOMMS,"").replace(/\s+/g," ").trim(),t&&(e=Se(t,e)),e}function Le(e,t){return e?(e=Rn+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+Rn,t&&-1!==e.indexOf("\n")?e.replace(/\n/g,"\\n"):e):"''"}function ke(e,t,n,r,i,o,s){var a=s.debug?",\n ":", ",u="});";return i&&"\n"!==i.slice(-1)&&(u="\n"+u),o+"riot.tag2('"+e+Rn+a+Le(t,1)+a+Le(n)+a+Le(r)+", function(opts) {\n"+i+u}function Ie(e){if(/<[-\w]/.test(e))for(var t,n=e.lastIndexOf("<"),r=e.length;-1!==n;){if(t=e.slice(n,r).match(Hn))return n+=t.index+t[0].length,"<-/>\n"===(t=e.slice(0,n)).slice(-5)&&(t=t.slice(0,-5)),[t,e.slice(n)];r=n,n=e.lastIndexOf("<",n-1)}return["",e]}function Re(e){if(e){var t=e.match(Pn);if(t=t&&(t[2]||t[3]))return t.replace("text/","")}return""}function Me(e,t){if(e){var n=e.match(RegExp("\\s"+t+Fn,"i"));if(n=n&&n[1])return/^['"]/.test(n)?n.slice(1,-1):n}return""}function $e(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'")}function Pe(e){var t=$e(Me(e,"options"));return t?JSON.parse(t):null}function Fe(e,t,n,r){var i=Re(n),o=Me(n,"src"),s=mn({},t.parserOptions.js);return!o&&Ae(e,t,i,mn(s,Pe(n)),r)}function He(e,t,n,r,i){var o=mn({},t.parserOptions.style),s={parserOpts:mn(o,Pe(n)),url:r};return Te(e,i,Re(n)||t.style,s)}function ze(e,t,n,r){return pn._req("html."+n,!0)(e,r,t)}function Ue(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){4===r.readyState&&(200===r.status||!r.status&&r.responseText.length?t(r.responseText,n,e):qe.error('"'+e+'" not found'))},r.onerror=function(e){return qe.error(e)},r.open("GET",e,!0),r.send("")}function Ve(e,t){if(typeof e===at){var n=b("script"),r=document.documentElement;t&&(e+="\n//# sourceURL="+t+".js"),n.text=e,r.appendChild(n),r.removeChild(n)}}function Be(e,t){function n(){Tt.trigger("ready"),Lt=!0,e&&e()}function r(e,t,r){Ve(Bn.compile(e,t,r),r),--s||n()}var i=g('script[type="riot/tag"]'),s=i.length;if(s)for(var a=0;a<i.length;++a){var u=i[a],c=o({template:E(u,"template")},t),l=E(u,"src")||E(u,"data-src");l?Ue(l,r,c):r(u.innerHTML,c)}else n()}function qe(e,t,n){if(typeof e===at){if(u(t)&&(n=t,t=!1),/^\s*</m.test(e)){var r=Bn.compile(e,n);return!0!==t&&Ve(r),a(t)&&t(r,e,n),r}Ue(e,function(e,n,r){var i=Bn.compile(e,n,r);Ve(i,r),t&&t(i,e,n)},n)}else if(d(e)){var i=e.length;e.forEach(function(e){Ue(e,function(e,n,r){var o=Bn.compile(e,n,r);Ve(o,r),!--i&&t&&t(o,e,n)},n)})}else{if(a(e)?(n=t,t=e):(n=e,t=void 0),Lt)return t&&t();Tt?t&&Tt.on("ready",t):(Tt=$t(),Be(t,n))}}var De,Ze,Ge=[],Ke={},We="yield",Je="__global_mixin",Qe="riot-",Xe=["ref","data-ref"],Ye="data-is",et="if",tt="each",nt="no-reorder",rt="show",it="hide",ot="key",st="__riot-events__",at="string",ut="object",ct="undefined",lt="function",ft="http://www.w3.org/1999/xlink",pt="http://www.w3.org/2000/svg",dt=/^xlink:(\w+)/,ht=typeof window===ct?void 0:window,gt=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?|opt(?:ion|group))$/,mt=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?)$/,vt=/^on/,xt=/([-\w]+) ?= ?(?:"([^"]*)|'([^']*)|({[^}]*}))/g,yt={viewbox:"viewBox",preserveaspectratio:"preserveAspectRatio"},bt=/^(?:disabled|checked|readonly|required|allowfullscreen|auto(?:focus|play)|compact|controls|default|formnovalidate|hidden|ismap|itemscope|loop|multiple|muted|no(?:resize|shade|validate|wrap)?|open|reversed|seamless|selected|sortable|truespeed|typemustmatch)$/,_t=0|(ht&&ht.document||{}).documentMode,wt=function(){var e=0;return function(){return++e}}(),Ot=function(e,t){return Object.getOwnPropertyDescriptor(e,t)},jt=Object.freeze({each:e,contains:t,toCamel:n,startsWith:r,defineProperty:i,uid:wt,getPropDescriptor:Ot,extend:o}),Et=Object.freeze({isBoolAttr:s,isFunction:a,isObject:u,isUndefined:c,isString:l,isBlank:f,isNil:p,isArray:d,isWritable:h}),Nt=Object.freeze({$$:g,$:m,createFrag:v,createDOMPlaceholder:x,isSvg:y,mkEl:b,setInnerHTML:_,toggleVisibility:w,remAttr:O,styleObjectToString:j,getAttr:E,setAttr:N,safeInsert:C,walkAttrs:A,walkNodes:S}),Ct={},At=[],St=!1;ht&&(De=function(){var e=b("style"),t=m("style[type=riot]");return N(e,"type","text/css"),t?(t.id&&(e.id=t.id),t.parentNode.replaceChild(e,t)):document.getElementsByTagName("head")[0].appendChild(e),e}(),Ze=De.styleSheet);var Tt,Lt,kt={styleNode:De,add:function(e,t){t?Ct[t]=e:At.push(e),St=!0},inject:function(){if(ht&&St){St=!1;var e=Object.keys(Ct).map(function(e){return Ct[e]}).concat(At).join("\n");Ze?Ze.cssText=e:De.innerHTML=e}}},It=function(){function e(e,t){for(;--t>=0&&/\s/.test(e[t]););return t}var t="[{(,;:?=|&!^~>%*/",n=["case","default","do","else","in","instanceof","prefix","return","typeof","void","yield"],r=n.reduce(function(e,t){return e+t.slice(-1)},""),i=/^\/(?=[^*>/])[^[/\\]*(?:(?:\\.|\[(?:\\.|[^\]\\]*)*\])[^[\\/]*)*?\/[gimuy]*/,o=/[$\w]/;return function(s,a){var u=/.*/g,c=u.lastIndex=a++,l=u.exec(s)[0].match(i);if(l){var f=c+l[0].length,p=s[c=e(s,c)];if(c<0||~t.indexOf(p))return f;if("."===p)"."===s[c-1]&&(a=f);else if("+"===p||"-"===p)(s[--c]!==p||(c=e(s,c))<0||!o.test(s[c]))&&(a=f);else if(~r.indexOf(p)){for(var d=c+1;--c>=0&&o.test(s[c]););~n.indexOf(s.slice(c+1,d))&&(a=f)}}return a}}(),Rt=function(e){function t(e){return e}function n(e,t){return t||(t=y),new RegExp(e.source.replace(/{/g,t[2]).replace(/}/g,t[3]),e.global?u:"")}function r(e){if(e===m)return v;var t=e.split(" ");if(2!==t.length||p.test(e))throw new Error('Unsupported brackets "'+e+'"');return t=t.concat(e.replace(d,"\\").split(" ")),t[4]=n(t[1].length>1?/{[\S\s]*?}/:v[4],t),t[5]=n(e.length>3?/\\({|})/g:v[5],t),t[6]=n(v[6],t),t[7]=RegExp("\\\\("+t[3]+")|([[({])|("+t[3]+")|"+h,u),t[8]=e,t}function i(e){return e instanceof RegExp?s(e):y[e]}function o(e){(e||(e=m))!==y[8]&&(y=r(e),s=e===m?t:n,y[9]=s(v[9])),x=e}var s,a,u="g",c=/\/\*[^*]*\*+(?:[^*\/][^*]*\*+)*\//g,l=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'|`[^`\\]*(?:\\[\S\s][^`\\]*)*`/g,f=l.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?([^<]\/)[gim]*/.source,p=RegExp("[\\x00-\\x1F<>a-zA-Z0-9'\",;\\\\]"),d=/(?=[[\]()*+?.^$|])/g,h=l.source+"|"+/(\/)(?![*\/])/.source,g={"(":RegExp("([()])|"+h,u),"[":RegExp("([[\\]])|"+h,u),"{":RegExp("([{}])|"+h,u)},m="{ }",v=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+h,u),m,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],x=void 0,y=[];return i.split=function(e,t,n){function r(e){h&&(e=h+e,h=""),t||s?f.push(e&&e.replace(n[5],"$1")):f.push(e)}function i(n,r,i){return i&&(r=It(e,n)),t&&r>n+2&&(c="⁗"+d.length+"~",d.push(e.slice(n,r)),h+=e.slice(a,n)+c,a=r),r}n||(n=y);var o,s,a,u,c,l,f=[],p=n[6],d=[],h="";for(s=a=p.lastIndex=0;o=p.exec(e);){if(l=p.lastIndex,u=o.index,s){if(o[2]){var m=o[2],v=g[m],x=1;for(v.lastIndex=l;o=v.exec(e);)if(o[1]){if(o[1]===m)++x;else if(!--x)break}else v.lastIndex=i(o.index,v.lastIndex,o[2]);p.lastIndex=x?e.length:v.lastIndex;continue}if(!o[3]){p.lastIndex=i(u,l,o[4]);continue}}o[1]||(r(e.slice(a,u)),a=p.lastIndex,(p=n[6+(s^=1)]).lastIndex=a)}return e&&a<e.length&&r(e.slice(a)),f.qblocks=d,f},i.hasExpr=function(e){return y[4].test(e)},i.loopKeys=function(e){var t=e.match(y[9]);return t?{key:t[1],pos:t[2],val:y[0]+t[3].trim()+y[1]}:{val:e.trim()}},i.array=function(e){return e?r(e):y},Object.defineProperty(i,"settings",{set:function(e){var t;t=(e=e||{}).brackets,Object.defineProperty(e,"brackets",{set:o,get:function(){return x},enumerable:!0}),a=e,o(t)},get:function(){return a}}),i.settings="undefined"!=typeof riot&&riot.settings||{},i.set=o,i.skipRegex=It,i.R_STRINGS=l,i.R_MLCOMMS=c,i.S_QBLOCKS=f,i.S_QBLOCK2=h,i}(),Mt=function(){function e(e,r){return e?(s[e]||(s[e]=n(e))).call(r,t.bind({data:r,tmpl:e})):e}function t(t,n){t.riotData={tagName:n&&n.__&&n.__.tagName,_riot_id:n&&n._riot_id},e.errorHandler?e.errorHandler(t):"undefined"!=typeof console&&"function"==typeof console.error&&(console.error(t.message),console.log("<%s> %s",t.riotData.tagName||"Unknown tag",this.tmpl),console.log(this.data))}function n(e){var t=r(e);return"try{return "!==t.slice(0,11)&&(t="return "+t),new Function("E",t+";")}function r(e){var t,n=Rt.split(e.replace(a,'"'),1),r=n.qblocks;if(n.length>2||n[0]){var o,s,c=[];for(o=s=0;o<n.length;++o)(t=n[o])&&(t=1&o?i(t,1,r):'"'+t.replace(/\\/g,"\\\\").replace(/\r\n?|\n/g,"\\n").replace(/"/g,'\\"')+'"')&&(c[s++]=t);t=s<2?c[0]:"["+c.join(",")+'].join("")'}else t=i(n[1],0,r);return r.length&&(t=t.replace(u,function(e,t){return r[t].replace(/\r/g,"\\r").replace(/\n/g,"\\n")})),t}function i(e,t,n){if(e=e.replace(/\s+/g," ").trim().replace(/\ ?([[\({},?\.:])\ ?/g,"$1")){for(var r,i=[],s=0;e&&(r=e.match(c))&&!r.index;){var a,u,f=/,|([[{(])|$/g;for(e=RegExp.rightContext,a=r[2]?n[r[2]].slice(1,-1).trim().replace(/\s+/g," "):r[1];u=(r=f.exec(e))[1];)!function(t,n){var r,i=1,o=l[t];for(o.lastIndex=n.lastIndex;r=o.exec(e);)if(r[0]===t)++i;else if(!--i)break;n.lastIndex=i?e.length:o.lastIndex}(u,f);u=e.slice(0,r.index),e=RegExp.rightContext,i[s++]=o(u,1,a)}e=s?s>1?"["+i.join(",")+'].join(" ").trim()':i[0]:o(e,t)}return e}function o(e,t,n){var r;return e=e.replace(p,function(e,t,n,i,o){return n&&(i=r?0:i+e.length,"this"!==n&&"global"!==n&&"window"!==n?(e=t+'("'+n+f+n,i&&(r="."===(o=o[i])||"("===o||"["===o)):i&&(r=!d.test(o.slice(i)))),e}),r&&(e="try{return "+e+"}catch(e){E(e,this)}"),n?e=(r?"function(){"+e+"}.call(this)":"("+e+")")+'?"'+n+'":""':t&&(e="function(v){"+(r?e.replace("return ","v="):"v=("+e+")")+';return v||v===0?v:""}.call(this)'),e}var s={};e.hasExpr=Rt.hasExpr,e.loopKeys=Rt.loopKeys,e.clearCache=function(){s={}},e.errorHandler=null;var a=/\u2057/g,u=/\u2057(\d+)~/g,c=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,l={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g},f='"in this?this:'+("object"!=typeof window?"global":"window")+").",p=/[,{][\$\w]+(?=:)|(^ *|[^$\w\.{])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,d=/^(?=(\.[$\w]+))\1(?:[^.[(]|$)/;return e.version=Rt.version="v3.0.8",e}(),$t=function(e){e=e||{};var t={},n=Array.prototype.slice;return Object.defineProperties(e,{on:{value:function(n,r){return"function"==typeof r&&(t[n]=t[n]||[]).push(r),e},enumerable:!1,writable:!1,configurable:!1},off:{value:function(n,r){if("*"!=n||r)if(r)for(var i,o=t[n],s=0;i=o&&o[s];++s)i==r&&o.splice(s--,1);else delete t[n];else t={};return e},enumerable:!1,writable:!1,configurable:!1},one:{value:function(t,n){function r(){e.off(t,r),n.apply(e,arguments)}return e.on(t,r)},enumerable:!1,writable:!1,configurable:!1},trigger:{value:function(r){var i,o,s,a=arguments,u=arguments.length-1,c=new Array(u);for(s=0;s<u;s++)c[s]=a[s+1];for(i=n.call(t[r]||[],0),s=0;o=i[s];++s)o.apply(e,c);return t["*"]&&"*"!=r&&e.trigger.apply(e,["*",r].concat(c)),e},enumerable:!1,writable:!1,configurable:!1}}),e},Pt=o(Object.create(Rt.settings),{skipAnonymousTags:!0,autoUpdate:!0}),Ft={init:function(e,t,n){O(e,et),this.tag=t,this.expr=n,this.stub=x(),this.pristine=e;var r=e.parentNode;return r.insertBefore(this.stub,e),r.removeChild(e),this},update:function(){this.value=Mt(this.expr,this.tag),this.value&&!this.current?(this.current=this.pristine.cloneNode(!0),this.stub.parentNode.insertBefore(this.current,this.stub),this.expressions=[],D.apply(this.tag,[this.current,this.expressions,!0])):!this.value&&this.current&&(le(this.expressions),this.current._tag?this.current._tag.unmount():this.current.parentNode&&this.current.parentNode.removeChild(this.current),this.current=null,this.expressions=[]),this.value&&M.call(this.tag,this.expressions)},unmount:function(){le(this.expressions||[])}},Ht={init:function(e,t,n,r){return this.dom=e,this.attr=n,this.rawValue=r,this.parent=t,this.hasExp=Mt.hasExpr(r),this},update:function(){var e=this.value,t=this.parent&&ce(this.parent),n=this.dom.__ref||this.tag||this.dom;this.value=this.hasExp?Mt(this.rawValue,this.parent):this.rawValue,!f(e)&&t&&de(t.refs,e,n),!f(this.value)&&l(this.value)?(t&&pe(t.refs,this.value,n,null,this.parent.__.index),this.value!==e&&N(this.dom,this.attr,this.value)):O(this.dom,this.attr),this.dom.__ref||(this.dom.__ref=n)},unmount:function(){var e=this.tag||this.dom,t=this.parent&&ce(this.parent);!f(this.value)&&t&&de(t.refs,this.value,e)}},zt=/<yield\b/i,Ut=/<yield\s*(?:\/>|>([\S\s]*?)<\/yield\s*>|>)/gi,Vt=/<yield\s+to=['"]([^'">]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,Bt=/<yield\s+from=['"]?([-\w]+)['"]?\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/gi,qt={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},Dt=_t&&_t<10?gt:mt,Zt="div",Gt="svg",Kt={},Wt=Kt[Je]={},Jt=0,Qt=Object.freeze({Tag:J,tag:Q,tag2:X,mount:Y,mixin:ee,update:te,unregister:ne,version:"v3.7.3"}),Xt=Object.freeze({getTag:se,moveChildTag:ae,initChildTag:ue,getImmediateCustomParentTag:ce,unmountAll:le,getTagName:fe,arrayishAdd:pe,arrayishRemove:de,mountTo:he,makeReplaceVirtual:ge,makeVirtual:me,moveVirtual:ve,selectTags:xe}),Yt=Pt,en={tmpl:Mt,brackets:Rt,styleManager:kt,vdom:Ge,styleNode:kt.styleNode,dom:Nt,check:Et,misc:jt,tags:Xt},tn=J,nn=Q,rn=X,on=Y,sn=ee,an=te,un=ne,cn=$t,ln=o({},Qt,{observable:$t,settings:Yt,util:en}),fn=Object.freeze({settings:Yt,util:en,Tag:tn,tag:nn,tag2:rn,mount:on,mixin:sn,update:an,unregister:un,version:"v3.7.3",observable:cn,default:ln}),pn=function(e){function t(t){var n=e[t];if(n)return n;throw new Error('Parser "'+t+'" not loaded.')}function n(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function r(e,r,i,o){return i=n({pretty:!0,filename:o,doctype:"html"},i),t(e).render(r,i)}var i={};return i.html={jade:function(e,t,n){return console.log('DEPRECATION WARNING: jade was renamed "pug" - The jade parser will be removed in [email protected]!'),r("jade",e,t,n)},pug:function(e,t,n){return r("pug",e,t,n)}},i.css={less:function(e,r,i,o){var s;return i=n({sync:!0,syncImport:!0,filename:o},i),t("less").render(r,i,function(e,t){if(e)throw e;s=t.css}),s}},i.js={es6:function(e,r,i){return t("Babel").transform(e,n({plugins:[["transform-es2015-template-literals",{loose:!0}],"transform-es2015-literals","transform-es2015-function-name","transform-es2015-arrow-functions","transform-es2015-block-scoped-functions",["transform-es2015-classes",{loose:!0}],"transform-es2015-object-super","transform-es2015-shorthand-properties","transform-es2015-duplicate-keys",["transform-es2015-computed-properties",{loose:!0}],["transform-es2015-for-of",{loose:!0}],"transform-es2015-sticky-regex","transform-es2015-unicode-regex","check-es2015-constants",["transform-es2015-spread",{loose:!0}],"transform-es2015-parameters",["transform-es2015-destructuring",{loose:!0}],"transform-es2015-block-scoping","transform-es2015-typeof-symbol",["transform-es2015-modules-commonjs",{allowTopLevelThis:!0}],["transform-regenerator",{async:!1,asyncGenerators:!1}]]},r)).code},buble:function(e,r,i){return r=n({source:i,modules:!1},r),t("buble").transform(e,r).code},coffee:function(e,r){return t("CoffeeScript").compile(e,n({bare:!0},r))},livescript:function(e,r){return t("livescript").compile(e,n({bare:!0,header:!1},r))},typescript:function(e,n){return t("typescript")(e,n)},none:function(e){return e}},i.js.javascript=i.js.none,i.js.coffeescript=i.js.coffee,i._req=function(e){var t=e.split(".");if(2!==t.length)throw new Error("Bad format for parsers._req");var n=i[t[0]][t[1]];if(n)return n;throw new Error('Parser "'+e+'" not found.')},i.utils={extend:n},i}(window||global),dn=/'[^'\n\r\\]*(?:\\(?:\r\n?|[\S\s])[^'\n\r\\]*)*'/.source,hn=[/\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//.source,"//.*",dn,dn.replace(/'/g,'"'),"([/`])"].join("|"),gn=hn.slice(0,-2)+"{}])",mn=pn.utils.extend,vn=/"[^"\n\\]*(?:\\[\S\s][^"\n\\]*)*"|'[^'\n\\]*(?:\\[\S\s][^'\n\\]*)*'/.source,xn=Rt.R_STRINGS.source,yn=/ *([-\w:\xA0-\xFF]+) ?(?:= ?('[^']*'|"[^"]*"|\S+))?/g,bn=RegExp(/<!--(?!>)[\S\s]*?-->/.source+"|"+vn,"g"),_n=/<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^"'/>]*(?:(?:"[^"]*"|'[^']*'|\/[^>])[^'"/>]*)*)|\s*)(\/?)>/g,wn=/>[ \t]+<(-?[A-Za-z]|\/[-A-Za-z])/g,On=["style","src","d","value"],jn=/^(?:input|img|br|wbr|hr|area|base|col|embed|keygen|link|meta|param|source|track)$/,En=/<pre(?:\s+(?:[^">]*|"[^"]*")*)?>([\S\s]+?)<\/pre\s*>/gi,Nn=/^"(?:number|date(?:time)?|time|month|email|color)\b/i,Cn=/^\s*import(?!\w)(?:(?:\s|[^\s'"])*)['|"].*\n?/gm,An=/[ \t]+$/gm,Sn=ye(/@#\d/,"x01"),Tn=ye(/@#(\d+)/g,"x01"),Ln="#",kn="⁗",In='"',Rn="'",Mn=/^[ \t]*(((?:async|\*)\s*)?([$_A-Za-z][$\w]*))\s*\([^()]*\)\s*{/m,$n=RegExp("([{}]|^)[; ]*((?:[^@ ;{}][^{}]*)?[^@ ;{}:] ?)(?={)|"+vn,"g"),Pn=/\stype\s*=\s*(?:(['"])(.+?)\1|(\S+))/i,Fn="\\s*=\\s*("+xn+"|{[^}]+}|\\S+)",Hn=/\/>\n|^<(?:\/?-?[A-Za-z][-\w\xA0-\xFF]*\s*|-?[A-Za-z][-\w\xA0-\xFF]*\s+[-\w:\xA0-\xFF][\S\s]*?)>\n/,zn=RegExp(/^([ \t]*)<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^'"/>]+(?:(?:@|\/[^>])[^'"/>]*)*)|\s*)?(?:\/>|>[ \t]*\n?([\S\s]*)^\1<\/\2\s*>|>(.*)<\/\2\s*>)/.source.replace("@",xn),"gim"),Un=/<script(\s+[^>]*)?>\n?([\S\s]*?)<\/script\s*>/gi,Vn=/<style(\s+[^>]*)?>\n?([\S\s]*?)<\/style\s*>/gi,Bn={compile:function(e,t,n){var r,i=[],o={template:{},js:{},style:{}};t||(t={}),t.parserOptions=mn(o,t.parserOptions||{}),r=t.exclude?function(e){return t.exclude.indexOf(e)<0}:function(){return 1},n||(n="");var s=Rt.array(t.brackets);return t.template&&(e=ze(e,n,t.template,t.parserOptions.template)),e=we(e).replace(zn,function(e,o,a,u,c,l){var f="",p="",d="",h="",g=[];if(g._bp=s,a=a.toLowerCase(),u=u&&r("attribs")?Ee(Oe(je(u,t,g),g),g):"",(c||(c=l))&&/\S/.test(c))if(l)r("html")&&(d=Ne(l,t,g));else{var m=Ie((c=(c=(c=c.replace(RegExp("^"+o,"gm"),"")).replace(Un,function(e,i,o){if(r("js")){var s=Fe(o,t,i,n);s&&(f+=(f?"\n":"")+s)}return""})).replace(Vn,function(e,i,o){return r("css")&&(p+=(p?" ":"")+He(o,t,i,n,a)),""})).replace(An,""));r("html")&&(d=Ne(m[0],t,g)),r("js")&&((c=Ae(m[1],t,null,null,n))&&(f+=(f?"\n":"")+c),f=f.replace(Cn,function(e){return h+=e.trim()+"\n",""}))}return f=/\S/.test(f)?f.replace(/\n{3,}/g,"\n\n"):"",t.entities?(i.push({tagName:a,html:d,css:p,attribs:u,js:f,imports:h}),""):ke(a,d,p,u,f,h,t)}),t.entities?i:e},compileHTML:function(e,t,n){return Array.isArray(t)?(n=t,t={}):(n||(n=[]),t||(t={})),n._bp=Rt.array(t.brackets),Ne(we(e),t,n)},compileCSS:function(e,t,n){return t&&"object"==typeof t?(n=t,t=""):n||(n={}),Te(e,n.tagName,t,n)},compileJS:function(e,t,n,r){return"string"==typeof t&&(r=n,n=t,t={}),n&&"object"==typeof n&&(r=n,n=""),r||(r={}),Ae(e,t||{},n,r.parserOptions,r.url)},parsers:pn,version:"v3.2.5"},qn=Bn.parsers;return qe.error=function(e){throw new Error(e)},o({},fn,{mount:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n;return qe(function(){n=on.apply(fn,e)}),n},compile:qe,parsers:qn})});