29 lines
34 KiB
JavaScript
29 lines
34 KiB
JavaScript
/**
|
||
* 2007-2017 PrestaShop
|
||
*
|
||
* NOTICE OF LICENSE
|
||
*
|
||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||
* that is bundled with this package in the file LICENSE.txt.
|
||
* It is also available through the world-wide-web at this URL:
|
||
* http://opensource.org/licenses/afl-3.0.php
|
||
* If you did not receive a copy of the license and are unable to
|
||
* obtain it through the world-wide-web, please send an email
|
||
* to license@prestashop.com so we can send you a copy immediately.
|
||
*
|
||
* DISCLAIMER
|
||
*
|
||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||
* versions in the future. If you wish to customize PrestaShop for your
|
||
* needs please refer to http://www.prestashop.com for more information.
|
||
*
|
||
* @author PrestaShop SA <contact@prestashop.com>
|
||
* @copyright 2007-2017 PrestaShop SA
|
||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||
* International Registered Trademark & Property of PrestaShop SA
|
||
*/
|
||
|
||
/* Riot v3.3.2, @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){return dt.test(e)}function t(e){return typeof e===ot}function r(e){return e&&typeof e===nt}function n(e){return typeof e===it}function i(e){return typeof e===rt}function o(e){return n(e)||null===e||""===e}function s(e){return Array.isArray(e)||e instanceof Array}function a(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return n(e[t])||r&&r.writable}function u(e){return pt.test(e)}function c(e,t){return(t||document).querySelectorAll(e)}function l(e,t){return(t||document).querySelector(e)}function p(){return document.createDocumentFragment()}function f(){return document.createTextNode("")}function h(e){return document.createElement(e)}function d(e,t){if(n(e.innerHTML)){var r=(new DOMParser).parseFromString(t,"application/xml"),i=e.ownerDocument.importNode(r.documentElement,!0);e.appendChild(i)}else e.innerHTML=t}function g(e,t){e.removeAttribute(t)}function m(e,t){return e.getAttribute(t)}function v(e,t,r){var n=at.exec(t);n&&n[1]?e.setAttributeNS(st,n[1],r):e.setAttribute(t,r)}function x(e,t,r){e.insertBefore(t,r.parentNode&&r)}function y(e,t){if(e)for(var r;r=ft.exec(e);)t(r[1].toLowerCase(),r[2]||r[3]||r[4])}function b(e,t,r){if(e){var n,i=t(e,r);if(i===!1)return;for(e=e.firstChild;e;)n=e.nextSibling,b(e,t,i),e=n}}function _(e,t){for(var r=e?e.length:0,n=0;n<r;++n)t(e[n],n);return e}function w(e,t){return e.indexOf(t)!==-1}function O(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function C(e,t){return e.slice(0,t.length)===t}function N(e,t,r,n){return Object.defineProperty(e,t,j({value:r,enumerable:!1,writable:!1,configurable:!0},n)),e}function j(e){for(var t,r=arguments,n=1;n<r.length;++n)if(t=r[n])for(var i in t)a(e,i)&&(e[i]=t[i]);return e}function E(e,t,r){var n=this.__.parent,i=this.__.item;if(!i)for(;n&&!i;)i=n.__.item,n=n.__.parent;if(a(r,"currentTarget")&&(r.currentTarget=e),a(r,"target")&&(r.target=r.srcElement),a(r,"which")&&(r.which=r.charCode||r.keyCode),r.item=i,t.call(this,r),!r.preventUpdate){var o=ie(this);o.isMounted&&o.update()}}function S(e,t,r,n){var i,o=E.bind(n,r,t);r[e]=null,i=e.replace(At,""),r._riotEvents||(r._riotEvents={}),r._riotEvents[e]&&r.removeEventListener(i,r._riotEvents[e]),r._riotEvents[e]=o,r.addEventListener(i,o,!1)}function A(e,t){var r,n,i,o,s=Nt(e.value,t);return e.tag&&e.tagName===s?void e.tag.update():(n="VIRTUAL"===e.dom.tagName,e.tag&&(n&&(i=e.tag.__.head,o=f(),i.parentNode.insertBefore(o,i)),e.tag.unmount(!0)),e.impl=Ze[s],r={root:e.dom,parent:t,hasImpl:!0,tagName:s},e.tag=ne(e.impl,r,e.dom.innerHTML,t),_(e.attrs,function(t){return v(e.tag.root,t.name,t.value)}),e.tagName=s,e.tag.mount(),n&&pe(e.tag,o||e.tag.root),void(t.__.onUnmount=function(){var t=e.tag.opts.dataIs,r=e.tag.parent.tags,n=e.tag.__.parent.tags;ce(r,t,e.tag),ce(n,t,e.tag),e.tag.unmount()}))}function T(e){if(!this.root||!m(this.root,"virtualized")){var r,i=e.dom,o=e.attr,s=w([et,tt],o),a=Nt(e.expr,this),u="riot-value"===o,c=e.root&&"VIRTUAL"===e.root.tagName,l=i&&(e.parent||i.parentNode);if(e.bool?a=!!a&&o:(n(a)||null===a)&&(a=""),e._riot_id)return void(e.isMounted?e.update():(e.mount(),c&&pe(e,e.root)));if(r=e.value,e.value=a,e.update)return void e.update();if(e.isRtag&&a)return A(e,this);if(r!==a&&(!u||i.value!==a)){if(!o)return a+="",void(l&&(e.parent=l,"TEXTAREA"===l.tagName?(l.value=a,gt||(i.nodeValue=a)):i.nodeValue=a));if(e.isAttrRemoved&&a||(g(i,o),e.isAttrRemoved=!0),t(a))S(o,a,i,this);else if(s)o===tt&&(a=!a),i.style.display=a?"":"none";else if(u)i.value=a;else if(C(o,Ge)&&o!==We)o=o.slice(Ge.length),ht[o]&&(o=ht[o]),null!=a&&v(i,o,a);else{if(e.bool&&(i[o]=a,!a))return;(0===a||a&&typeof a!==nt)&&v(i,o,a)}}}}function L(e){_(e,T.bind(this))}function R(e,t,r,n){var i=n?Object.create(n):{};return i[e.key]=t,e.pos&&(i[e.pos]=r),i}function M(e,t){for(var r=t.length,n=e.length;r>n;)r--,k.apply(t[r],[t,r])}function k(e,t){e.splice(t,1),this.unmount(),ce(this.parent,this,this.__.tagName,!0)}function I(e){var t=this;_(Object.keys(this.tags),function(r){re.apply(t.tags[r],[r,e])})}function $(e,t,r){r?he.apply(this,[e,t]):x(e,this.root,t.root)}function F(e,t,r){r?fe.apply(this,[e,t]):x(e,this.root,t.root)}function H(e,t){t?fe.call(this,e):e.appendChild(this.root)}function P(e,t,r){g(e,Xe);var n,o=typeof m(e,Ye)!==rt||g(e,Ye),a=se(e),u=Ze[a],c=e.parentNode,l=f(),h=ee(e),d=m(e,Je),v=[],x=[],y=!0,b=!Ze[a],O="VIRTUAL"===e.tagName;return r=Nt.loopKeys(r),r.isLoop=!0,d&&g(e,Je),c.insertBefore(l,e),c.removeChild(e),r.update=function(){var c=Nt(r.val,t),f=p(),g=!s(c)&&!i(c),m=l.parentNode;g?(n=c||!1,c=n?Object.keys(c).map(function(e){return R(r,c[e],e)}):[]):n=!1,d&&(c=c.filter(function(e,n){return r.key&&!g?!!Nt(d,R(r,e,n,t)):!!Nt(d,j(Object.create(t),e))})),_(c,function(i,s){var l=o&&typeof i===nt&&!n,p=x.indexOf(i),d=p===-1,g=!d&&l?p:s,_=v[g],C=s>=x.length,N=l&&d||!l&&!_;i=!n&&r.key?R(r,i,s):i,N?(_=new Y(u,{parent:t,isLoop:y,isAnonymous:b,tagName:a,root:e.cloneNode(b),item:i,index:s},e.innerHTML),_.mount(),C?H.apply(_,[f||m,O]):F.apply(_,[m,v[s],O]),C||x.splice(s,0,i),v.splice(s,0,_),h&&ue(t.tags,a,_,!0)):g!==s&&l&&(w(c,x[g])&&($.apply(_,[m,v[s],O]),v.splice(s,0,v.splice(g,1)[0]),x.splice(s,0,x.splice(g,1)[0])),r.pos&&(_[r.pos]=s),!h&&_.tags&&I.call(_,s)),_.__.item=i,_.__.index=s,_.__.parent=t,N||_.update(i)}),M(c,v),x=c.slice(),m.insertBefore(f,l)},r.unmount=function(){_(v,function(e){e.unmount()})},r}function z(e,t,r){var n=this,i={parent:{children:t}};return b(e,function(t,i){var o,s,a,u=t.nodeType,c=i.parent;if(!r&&t===e)return{parent:c};if(3===u&&"STYLE"!==t.parentNode.tagName&&Nt.hasExpr(t.nodeValue)&&c.children.push({dom:t,expr:t.nodeValue}),1!==u)return i;var l="VIRTUAL"===t.tagName;if(o=m(t,Xe))return l&&v(t,"loopVirtual",!0),c.children.push(P(t,n,o)),!1;if(o=m(t,Je))return c.children.push(Object.create(Tt).init(t,n,o)),!1;if((s=m(t,We))&&Nt.hasExpr(s))return c.children.push({isRtag:!0,expr:s,dom:t,attrs:[].slice.call(t.attributes)}),!1;if(a=ee(t),l&&(m(t,"virtualized")&&t.parentElement.removeChild(t),a||m(t,"virtualized")||m(t,"loopVirtual")||(a={tmpl:t.outerHTML})),a&&(t!==e||r)){if(!l||m(t,We)){var p={root:t,parent:n,hasImpl:!0};return c.children.push(ne(a,p,t.innerHTML,n)),!1}v(t,"virtualized",!0);var f=new Y({tmpl:t.outerHTML},{root:t,parent:n},t.innerHTML);c.children.push(f)}return B.apply(n,[t,t.attributes,function(e,t){t&&c.children.push(t)}]),{parent:c}},i),{tree:i,root:e}}function B(t,r,n){var i=this;_(r,function(r){var o,s=r.name,a=e(s);w(Qe,s)?o=Object.create(Lt).init(t,i,s,r.value):Nt.hasExpr(r.value)&&(o={dom:t,expr:r.value,attr:r.name,bool:a}),n(r,o)})}function U(e,t,r){var n="o"===r[0],i=n?"select>":"table>";if(e.innerHTML="<"+i+t.trim()+"</"+i,i=e.firstChild,n)i.selectedIndex=-1;else{var o=$t[r];o&&1===i.childElementCount&&(i=l(o,i))}return i}function V(e,t){if(!Rt.test(e))return e;var r={};return t=t&&t.replace(kt,function(e,t,n){return r[t]=r[t]||n,""}).trim(),e.replace(It,function(e,t,n){return r[t]||n||""}).replace(Mt,function(e,r){return t||r||""})}function D(e,t){var r=e&&e.match(/^\s*<([-\w]+)/),n=r&&r[1].toLowerCase(),i=h(Ht);return e=V(e,t),Ft.test(n)?i=U(i,e,n):d(i,e),i}function q(e,t){var r=this,n=r.name,i=r.tmpl,o=r.css,s=r.attrs,a=r.onCreate;return Ze[n]||(Z(n,i,o,s,a),Ze[n].class=this.constructor),le(e,n,t,this),o&&Ot.inject(),this}function Z(e,r,n,i,o){return t(i)&&(o=i,/^[\w\-]+\s?=/.test(n)?(i=n,n=""):i=""),n&&(t(n)?o=n:Ot.add(n)),e=e.toLowerCase(),Ze[e]={name:e,tmpl:r,attrs:i,fn:o},e}function K(e,t,r,n,i){return r&&Ot.add(r,e),Ze[e]={name:e,tmpl:t,attrs:n,fn:i},e}function G(e,t,n){function o(e){if(e.tagName){var r=m(e,We);t&&r!==t&&(r=t,v(e,We,t));var i=le(e,r||e.tagName.toLowerCase(),n);i&&s.push(i)}else e.length&&_(e,o)}var s=[];Ot.inject(),r(t)&&(n=t,t=0);var a,u;if(i(e)?(e="*"===e?u=de():e+de(e.split(/, */)),a=e?c(e):[]):a=e,"*"===t){if(t=u||de(),a.tagName)a=c(t,a);else{var l=[];_(a,function(e){return l.push(c(t,e))}),a=l}t=0}return o(a),s}function Q(e,i,o){if(r(e))return void Q("__unnamed_"+Bt++,e,!0);var s=o?zt:Pt;if(!i){if(n(s[e]))throw new Error("Unregistered mixin: "+e);return s[e]}s[e]=t(i)?j(i.prototype,s[e]||{})&&i:j(s[e]||{},i)}function W(){return _(qe,function(e){return e.update()})}function J(e){delete Ze[e]}function X(e,t,r,n,i){if(!e||!r){var o=!r&&e?this:t||this;_(i,function(e){e.expr&&L.call(o,[e.expr]),n[O(e.name)]=e.expr?e.expr.value:e.value})}}function Y(e,r,n){void 0===e&&(e={}),void 0===r&&(r={});var o,s=j({},r.opts),a=r.parent,u=r.isLoop,c=!!r.isAnonymous,l=St.skipAnonymousTags&&c,p=ae(r.item),f=r.index,h=[],d=[],m=[],x=r.root,b=r.tagName||se(x),O="virtual"===b,E=[];l||jt(this),e.name&&x._tag&&x._tag.unmount(!0),this.isMounted=!1,N(this,"__",{isAnonymous:c,instAttrs:h,innerHTML:n,tagName:b,index:f,isLoop:u,virts:[],tail:null,head:null,parent:null,item:null}),N(this,"_riot_id",++Dt),N(this,"root",x),j(this,{opts:s},p),N(this,"parent",a||null),N(this,"tags",{}),N(this,"refs",{}),o=u&&c?x:D(e.tmpl,n,u),N(this,"update",function(e){var r={},n=this.isMounted&&!l;return e=ae(e),j(this,e),X.apply(this,[u,a,c,r,h]),this.isMounted&&t(this.shouldUpdate)&&!this.shouldUpdate(e,r)?this:(u&&c&&te.apply(this,[this.parent,E]),j(s,r),n&&this.trigger("update",e),L.call(this,m),n&&this.trigger("updated"),this)}.bind(this)),N(this,"mixin",function(){var e=this;return _(arguments,function(r){var n,o,s=[],a=["init","__proto__"];r=i(r)?Q(r):r,n=t(r)?new r:r;var u=Object.getPrototypeOf(n);do s=s.concat(Object.getOwnPropertyNames(o||n));while(o=Object.getPrototypeOf(o||n));_(s,function(r){if(!w(a,r)){var i=Object.getOwnPropertyDescriptor(n,r)||Object.getOwnPropertyDescriptor(u,r),o=i&&(i.get||i.set);!e.hasOwnProperty(r)&&o?Object.defineProperty(e,r,i):e[r]=t(n[r])?n[r].bind(e):n[r]}}),n.init&&n.init.bind(e)()}),this}.bind(this)),N(this,"mount",function(){var t=this;x._tag=this,B.apply(a,[x,x.attributes,function(e,r){!c&&Lt.isPrototypeOf(r)&&(r.tag=t),e.expr=r,h.push(e)}]),d=[],y(e.attrs,function(e,t){d.push({name:e,value:t})}),B.apply(this,[x,d,function(e,t){t?m.push(t):v(x,e.name,e.value)}]),X.apply(this,[u,a,c,s,h]);var r=Q(Ke);if(r&&!l)for(var n in r)r.hasOwnProperty(n)&&t.mixin(r[n]);if(e.fn&&e.fn.call(this,s),l||this.trigger("before-mount"),z.apply(this,[o,m,c]),this.update(p),!c)for(;o.firstChild;)x.appendChild(o.firstChild);if(N(this,"root",x),N(this,"isMounted",!0),!l){if(this.parent){var i=ie(this.parent);i.one(i.isMounted?"updated":"mount",function(){t.trigger("mount")})}else this.trigger("mount");return this}}.bind(this)),N(this,"unmount",function(t){var r,n=this,i=this.root,o=i.parentNode,s=qe.indexOf(this);if(l||this.trigger("before-unmount"),y(e.attrs,function(e){C(e,Ge)&&(e=e.slice(Ge.length)),g(x,e)}),s!==-1&&qe.splice(s,1),o||O){if(a)r=ie(a),O?Object.keys(this.tags).forEach(function(e){ce(r.tags,e,n.tags[e])}):(ce(r.tags,b,this),a!==r&&ce(a.tags,b,this));else for(;i.firstChild;)i.removeChild(i.firstChild);o&&(t?g(o,We):o.removeChild(i))}return this.__.virts&&_(this.__.virts,function(e){e.parentNode&&e.parentNode.removeChild(e)}),oe(m),_(h,function(e){return e.expr&&e.expr.unmount&&e.expr.unmount()}),this.__.onUnmount&&this.__.onUnmount(),l||(this.trigger("unmount"),this.off("*")),N(this,"isMounted",!1),delete this.root._tag,this}.bind(this))}function ee(e){return e.tagName&&Ze[m(e,We)||m(e,We)||e.tagName.toLowerCase()]}function te(e,t){var r=this;_(Object.keys(e),function(i){var o=!u(i)&&w(t,i);(n(r[i])||o)&&(o||t.push(i),r[i]=e[i])})}function re(e,t){var r,n=this.parent;n&&(r=n.tags[e],s(r)?r.splice(t,0,r.splice(r.indexOf(this),1)[0]):ue(n.tags,e,this))}function ne(e,t,r,n){var i=new Y(e,t,r),o=t.tagName||se(t.root,!0),s=ie(n);return N(i,"parent",s),i.__.parent=n,ue(s.tags,o,i),s!==n&&ue(n.tags,o,i),t.root.innerHTML="",i}function ie(e){for(var t=e;t.__.isAnonymous&&t.parent;)t=t.parent;return t}function oe(e){_(e,function(e){e instanceof Y?e.unmount(!0):e.unmount&&e.unmount()})}function se(e,t){var r=ee(e),n=!t&&m(e,We);return n&&!Nt.hasExpr(n)?n:r?r.name:e.tagName.toLowerCase()}function ae(e){if(!(e instanceof Y||e&&t(e.trigger)))return e;var r={};for(var n in e)pt.test(n)||(r[n]=e[n]);return r}function ue(e,t,r,i,o){var a=e[t],u=s(a),c=!n(o);if(!a||a!==r)if(!a&&i)e[t]=[r];else if(a)if(u){var l=a.indexOf(r);if(l===o)return;l!==-1&&a.splice(l,1),c?a.splice(o,0,r):a.push(r)}else e[t]=[a,r];else e[t]=r}function ce(e,t,r,n){if(s(e[t])){var i=e[t].indexOf(r);i!==-1&&e[t].splice(i,1),e[t].length?1!==e[t].length||n||(e[t]=e[t][0]):delete e[t]}else delete e[t]}function le(e,t,r,n){var i=Ze[t],o=Ze[t].class,s=n||(o?Object.create(o.prototype):{}),a=e._innerHTML=e._innerHTML||e.innerHTML;e.innerHTML="";var u=j({root:e,opts:r},{parent:r?r.parent:null});return i&&e&&Y.apply(s,[i,u,a]),s&&s.mount&&(s.mount(!0),w(qe,s)||qe.push(s)),s}function pe(e,t){var r=p();fe.call(e,r),t.parentNode.replaceChild(r,t)}function fe(e,t){var r,n,i=this,o=f(),s=f(),a=p();for(this.root.insertBefore(o,this.root.firstChild),this.root.appendChild(s),this.__.head=n=o,this.__.tail=s;n;)r=n.nextSibling,a.appendChild(n),i.__.virts.push(n),n=r;t?e.insertBefore(a,t.__.head):e.appendChild(a)}function he(e,t){for(var r,n=this,i=this.__.head,o=p();i;)if(r=i.nextSibling,o.appendChild(i),i=r,i===n.__.tail){o.appendChild(i),e.insertBefore(o,t.__.head);break}}function de(e){if(!e){var t=Object.keys(Ze);return t+de(t)}return e.filter(function(e){return!/[^-\w]/.test(e)}).reduce(function(e,t){var r=t.trim().toLowerCase();return e+",["+We+'="'+r+'"]'},"")}function ge(e){var t=arguments,r=e.source,n=e.global?"g":"";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m");for(var i=1;i<arguments.length;i++)r=r.replace("@","\\"+t[i]);return new RegExp(r,n)}function me(e){var t,r=cr;for(~e.indexOf("\r")&&(e=e.replace(/\r\n?/g,"\n")),r.lastIndex=0;t=r.exec(e);)"<"===t[0][0]&&(e=RegExp.leftContext+RegExp.rightContext,r.lastIndex=t[3]+1);return e}function ve(e,t){var r,n,i,o=[];for(ur.lastIndex=0,e=e.replace(/\s+/g," ");r=ur.exec(e);){var s=r[1].toLowerCase(),a=r[2];a?(a[0]!==wr&&(a=wr+(a[0]===Or?a.slice(1,-1):a)+wr),"type"===s&&gr.test(a)?n=a:(xr.test(a)&&("value"===s&&(i=1),~fr.indexOf(s)&&(s="riot-"+s)),o.push(s+"="+a))):o.push(s)}return n&&(i&&(n=wr+t._bp[0]+Or+n.slice(1,-1)+Or+t._bp[1]+wr),o.push("type="+n)),o.join(" ")}function xe(e,t,r){var n=r._bp;if(e&&n[4].test(e)){for(var i,o=t.expr&&(t.parser||t.type)?Oe:0,s=Ct.split(e,0,n),a=1;a<s.length;a+=2)i=s[a],"^"===i[0]?i=i.slice(1):o&&(i=o(i,t).trim(),";"===i.slice(-1)&&(i=i.slice(0,-1))),s[a]=br+(r.push(i)-1)+n[1];e=s.join("")}return e}function ye(e,t){return t.length&&(e=e.replace(yr,function(e,r){return t._bp[0]+t[r].trim().replace(/[\r\n]+/g," ").replace(/"/g,_r)})),e}function be(e,t,r){if(!/\S/.test(e))return"";if(e=xe(e,t,r).replace(lr,function(e,t,n,i){return t=t.toLowerCase(),i=i&&!hr.test(t)?"></"+t:"",n&&(t+=" "+ve(n,r)),"<"+t+i+">"}),!t.whitespace){var n=[];/<pre[\s>]/.test(e)&&(e=e.replace(dr,function(e){return n.push(e),""})),e=e.trim().replace(/\s+/g," "),n.length&&(e=e.replace(/\u0002/g,function(){return n.shift()}))}return t.compact&&(e=e.replace(pr,"><$1")),ye(e,r).replace(vr,"")}function _e(e,t,r){return Array.isArray(t)?(r=t,t={}):(r||(r=[]),t||(t={})),r._bp=Ct.array(t.brackets),be(me(e),t,r)}function we(e){function t(e,t,r){for(t.lastIndex=0;r=t.exec(e);)"/"!==r[0][0]||r[1]||r[2]||(e=l.leftContext+" "+l.rightContext,t.lastIndex=r[3]+1);return e}function r(e,t){var r,n=1;for(t.lastIndex=0;n&&(r=t.exec(e));)"{"===r[0]?++n:"}"===r[0]&&--n;return n?e.length:t.lastIndex}var n,i,o,s,a,u,c=[],l=RegExp;for(~e.indexOf("/")&&(e=t(e,jr));n=e.match(Cr);)c.push(l.leftContext),e=l.rightContext,o=r(e,Nr),s=n[1],a=n[2]||"",u=n[3],i=!/^(?:if|while|for|switch|catch|function)$/.test(u),u=i?n[0].replace(s,"this."+u+" ="+a+" function"):n[0],c.push(u,e.slice(0,o)),e=e.slice(o),i&&!/^\s*.\s*bind\b/.test(e)&&c.push(".bind(this)");return c.length?c.join("")+e:e}function Oe(e,t,r,n,i){if(!/\S/.test(e))return"";r||(r=t.type);var o=t.parser||r&&ir._req("js."+r,!0)||we;return o(e,n,i).replace(/\r\n?/g,"\n").replace(vr,"")}function Ce(e,t,r,n){return"string"==typeof t&&(n=r,r=t,t={}),r&&"object"==typeof r&&(n=r,r=""),n||(n={}),Oe(e,t||{},r,n.parserOptions,n.url)}function Ne(e,t){var r=":scope";return t.replace(Er,function(t,n,i){return i?(i=i.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(r)<0?e+" "+n+',[data-is="'+e+'"] '+n:n.replace(r,e)+","+n.replace(r,'[data-is="'+e+'"]'):t}),n?n+" "+i:i):t})}function je(e,t,r,n){if(n=n||{},r&&"css"!==r){var i=ir._req("css."+r,!0);e=i(t,e,n.parserOpts||{},n.url)}return e=e.replace(Ct.R_MLCOMMS,"").replace(/\s+/g," ").trim(),t&&(e=Ne(t,e)),e}function Ee(e,t,r){return t&&"object"==typeof t?(r=t,t=""):r||(r={}),je(e,r.tagName,t,r)}function Se(e,t){return e?(e=Or+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+Or,t&&~e.indexOf("\n")?e.replace(/\n/g,"\\n"):e):"''"}function Ae(e,t,r,n,i,o,s){var a=s.debug?",\n ":", ",u="});";return i&&"\n"!==i.slice(-1)&&(u="\n"+u),o+"riot.tag2('"+e+Or+a+Se(t,1)+a+Se(r)+a+Se(n)+", function(opts) {\n"+i+u}function Te(e){if(/<[-\w]/.test(e))for(var t,r=e.lastIndexOf("<"),n=e.length;~r;){if(t=e.slice(r,n).match(Tr))return r+=t.index+t[0].length,t=e.slice(0,r),"<-/>\n"===t.slice(-5)&&(t=t.slice(0,-5)),[t,e.slice(r)];n=r,r=e.lastIndexOf("<",r-1)}return["",e]}function Le(e){if(e){var t=e.match(Sr);if(t=t&&(t[2]||t[3]))return t.replace("text/","")}return""}function Re(e,t){if(e){var r=e.match(RegExp("\\s"+t+Ar,"i"));if(r=r&&r[1])return/^['"]/.test(r)?r.slice(1,-1):r}return""}function Me(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'")}function ke(e){var t=Me(Re(e,"options"));return t?JSON.parse(t):null}function Ie(e,t,r,n){var i=Le(r),o=Re(r,"src"),s=or({},t.parserOptions.js);return!o&&Oe(e,t,i,or(s,ke(r)),n)}function $e(e,t,r,n,i){var o=or({},t.parserOptions.style),s={parserOpts:or(o,ke(r)),url:n};return je(e,i,Le(r)||t.style,s)}function Fe(e,t,r,n){var i=ir._req("html."+r,!0);return i(e,n,t)}function He(e,t,r){var n,i=[],o={template:{},js:{},style:{}};t||(t={}),t.parserOptions=or(o,t.parserOptions||{}),n=t.exclude?function(e){return t.exclude.indexOf(e)<0}:function(){return 1},r||(r="");var s=Ct.array(t.brackets);return t.template&&(e=Fe(e,r,t.template,t.parserOptions.template)),e=me(e).replace(Lr,function(e,o,a,u,c,l){var p="",f="",h="",d="",g=[];if(g._bp=s,a=a.toLowerCase(),u=u&&n("attribs")?ye(ve(xe(u,t,g),g),g):"",(c||(c=l))&&/\S/.test(c))if(l)n("html")&&(h=be(l,t,g));else{c=c.replace(RegExp("^"+o,"gm"),""),c=c.replace(Rr,function(e,i,o){if(n("js")){var s=Ie(o,t,i,r);s&&(p+=(p?"\n":"")+s)}return""}),c=c.replace(Mr,function(e,i,o){return n("css")&&(f+=(f?" ":"")+$e(o,t,i,r,a)),""});var m=Te(c.replace(vr,""));n("html")&&(h=be(m[0],t,g)),n("js")&&(c=Oe(m[1],t,null,null,r),c&&(p+=(p?"\n":"")+c),p=p.replace(mr,function(e){return d+=e.trim()+"\n",""}))}return p=/\S/.test(p)?p.replace(/\n{3,}/g,"\n\n"):"",t.entities?(i.push({tagName:a,html:h,css:f,attribs:u,js:p,imports:d}),""):Ae(a,h,f,u,p,d,t)}),t.entities?i:e}function Pe(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){4===n.readyState&&(200===n.status||!n.status&&n.responseText.length)&&t(n.responseText,r,e)},n.open("GET",e,!0),n.send("")}function ze(e,t){if(typeof e===rt){var r=h("script"),n=document.documentElement;t&&(e+="\n//# sourceURL="+t+".js"),r.text=e,n.appendChild(r),n.removeChild(r)}}function Be(e,t){function r(){_t.trigger("ready"),wt=!0,e&&e()}function n(e,t,n){var i=Ir.compile(e,t,n);ze(i,n),--o||r()}var i=c('script[type="riot/tag"]'),o=i.length;if(o)for(var s=0;s<i.length;++s){var a=i[s],u=j({template:m(a,"template")},t),l=m(a,"src")||m(a,"data-src");l?Pe(l,n,u):n(a.innerHTML,u)}else r()}function Ue(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r;return Fr(function(){r=Jt.apply(nr,e)}),r}var Ve,De,qe=[],Ze={},Ke="__global_mixin",Ge="riot-",Qe=["ref","data-ref"],We="data-is",Je="if",Xe="each",Ye="no-reorder",et="show",tt="hide",rt="string",nt="object",it="undefined",ot="function",st="http://www.w3.org/1999/xlink",at=/^xlink:(\w+)/,ut=typeof window===it?void 0:window,ct=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?|opt(?:ion|group))$/,lt=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?)$/,pt=/^(?:_(?:item|id|parent)|update|root|(?:un)?mount|mixin|is(?:Mounted|Loop)|tags|refs|parent|opts|trigger|o(?:n|ff|ne))$/,ft=/([-\w]+) ?= ?(?:"([^"]*)|'([^']*)|({[^}]*}))/g,ht={viewbox:"viewBox"},dt=/^(?: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)$/,gt=0|(ut&&ut.document||{}).documentMode,mt=Object.freeze({isBoolAttr:e,isFunction:t,isObject:r,isUndefined:n,isString:i,isBlank:o,isArray:s,isWritable:a,isReservedName:u}),vt=Object.freeze({$$:c,$:l,createFrag:p,createDOMPlaceholder:f,mkEl:h,setInnerHTML:d,remAttr:g,getAttr:m,setAttr:v,safeInsert:x,walkAttrs:y,walkNodes:b}),xt={},yt=[],bt=!1;ut&&(Ve=function(){var e=h("style");v(e,"type","text/css");var t=l("style[type=riot]");return t?(t.id&&(e.id=t.id),t.parentNode.replaceChild(e,t)):document.getElementsByTagName("head")[0].appendChild(e),e}(),De=Ve.styleSheet);var _t,wt,Ot={styleNode:Ve,add:function(e,t){t?xt[t]=e:yt.push(e),bt=!0},inject:function(){if(ut&&bt){bt=!1;var e=Object.keys(xt).map(function(e){return xt[e]}).concat(yt).join("\n");De?De.cssText=e:Ve.innerHTML=e}}},Ct=function(e){function t(e){return e}function r(e,t){return t||(t=y),new RegExp(e.source.replace(/{/g,t[2]).replace(/}/g,t[3]),e.global?c:"")}function n(e){if(e===m)return v;var t=e.split(" ");if(2!==t.length||h.test(e))throw new Error('Unsupported brackets "'+e+'"');return t=t.concat(e.replace(d,"\\").split(" ")),t[4]=r(t[1].length>1?/{[\S\s]*?}/:v[4],t),t[5]=r(e.length>3?/\\({|})/g:v[5],t),t[6]=r(v[6],t),t[7]=RegExp("\\\\("+t[3]+")|([[({])|("+t[3]+")|"+f,c),t[8]=e,t}function i(e){return e instanceof RegExp?a(e):y[e]}function o(e){(e||(e=m))!==y[8]&&(y=n(e),a=e===m?t:r,y[9]=a(v[9])),x=e}function s(e){var t;e=e||{},t=e.brackets,Object.defineProperty(e,"brackets",{set:o,get:function(){return x},enumerable:!0}),u=e,o(t)}var a,u,c="g",l=/\/\*[^*]*\*+(?:[^*\/][^*]*\*+)*\//g,p=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'|`[^`\\]*(?:\\[\S\s][^`\\]*)*`/g,f=p.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?(\/)[gim]*/.source,h=RegExp("[\\x00-\\x1F<>a-zA-Z0-9'\",;\\\\]"),d=/(?=[[\]()*+?.^$|])/g,g={"(":RegExp("([()])|"+f,c),"[":RegExp("([[\\]])|"+f,c),"{":RegExp("([{}])|"+f,c)},m="{ }",v=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+f,c),m,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],x=e,y=[];return i.split=function(e,t,r){function n(e){t||s?c.push(e&&e.replace(r[5],"$1")):c.push(e)}function i(e,t,r){var n,i=g[t];for(i.lastIndex=r,r=1;(n=i.exec(e))&&(!n[1]||(n[1]===t?++r:--r)););return r?e.length:i.lastIndex}r||(r=y);var o,s,a,u,c=[],l=r[6];for(s=a=l.lastIndex=0;o=l.exec(e);){if(u=o.index,s){if(o[2]){l.lastIndex=i(e,o[2],l.lastIndex);continue}if(!o[3])continue}o[1]||(n(e.slice(a,u)),a=l.lastIndex,l=r[6+(s^=1)],l.lastIndex=a)}return e&&a<e.length&&n(e.slice(a)),c},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?n(e):y},Object.defineProperty(i,"settings",{set:s,get:function(){return u}}),i.settings="undefined"!=typeof riot&&riot.settings||{},i.set=o,i.R_STRINGS=p,i.R_MLCOMMS=l,i.S_QBLOCKS=f,i}(),Nt=function(){function e(e,n){return e?(s[e]||(s[e]=r(e))).call(n,t):e}function t(t,r){t.riotData={tagName:r&&r.__&&r.__.tagName,_riot_id:r&&r._riot_id},e.errorHandler?e.errorHandler(t):"undefined"!=typeof console&&"function"==typeof console.error&&(t.riotData.tagName&&console.error("Riot template error thrown in the <%s> tag",t.riotData.tagName),console.error(t))}function r(e){var t=n(e);return"try{return "!==t.slice(0,11)&&(t="return "+t),new Function("E",t+";")}function n(e){var t,r=[],n=Ct.split(e.replace(l,'"'),1);if(n.length>2||n[0]){var o,s,a=[];for(o=s=0;o<n.length;++o)t=n[o],t&&(t=1&o?i(t,1,r):'"'+t.replace(/\\/g,"\\\\").replace(/\r\n?|\n/g,"\\n").replace(/"/g,'\\"')+'"')&&(a[s++]=t);t=s<2?a[0]:"["+a.join(",")+'].join("")'}else t=i(n[1],0,r);return r[0]&&(t=t.replace(p,function(e,t){return r[t].replace(/\r/g,"\\r").replace(/\n/g,"\\n")})),t}function i(e,t,r){function n(t,r){var n,i=1,o=f[t];for(o.lastIndex=r.lastIndex;n=o.exec(e);)if(n[0]===t)++i;else if(!--i)break;r.lastIndex=i?e.length:o.lastIndex}if(e=e.replace(c,function(e,t){return e.length>2&&!t?a+(r.push(e)-1)+"~":e}).replace(/\s+/g," ").trim().replace(/\ ?([[\({},?\.:])\ ?/g,"$1")){for(var i,s=[],l=0;e&&(i=e.match(u))&&!i.index;){var p,h,d=/,|([[{(])|$/g;for(e=RegExp.rightContext,p=i[2]?r[i[2]].slice(1,-1).trim().replace(/\s+/g," "):i[1];h=(i=d.exec(e))[1];)n(h,d);h=e.slice(0,i.index),e=RegExp.rightContext,s[l++]=o(h,1,p)}e=l?l>1?"["+s.join(",")+'].join(" ").trim()':s[0]:o(e,t)}return e}function o(e,t,r){var n;return e=e.replace(d,function(e,t,r,i,o){return r&&(i=n?0:i+e.length,"this"!==r&&"global"!==r&&"window"!==r?(e=t+'("'+r+h+r,i&&(n="."===(o=o[i])||"("===o||"["===o)):i&&(n=!g.test(o.slice(i)))),e}),n&&(e="try{return "+e+"}catch(e){E(e,this)}"),r?e=(n?"function(){"+e+"}.call(this)":"("+e+")")+'?"'+r+'":""':t&&(e="function(v){"+(n?e.replace("return ","v="):"v=("+e+")")+';return v||v===0?v:""}.call(this)'),e}var s={};e.hasExpr=Ct.hasExpr,e.loopKeys=Ct.loopKeys,e.clearCache=function(){s={}},e.errorHandler=null;var a=String.fromCharCode(8279),u=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,c=RegExp(Ct.S_QBLOCKS,"g"),l=/\u2057/g,p=/\u2057(\d+)~/g,f={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g},h='"in this?this:'+("object"!=typeof window?"global":"window")+").",d=/[,{][\$\w]+(?=:)|(^ *|[^$\w\.{])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,g=/^(?=(\.[$\w]+))\1(?:[^.[(]|$)/;return e.version=Ct.version="v3.0.3",e}(),jt=function(e){e=e||{};var t={},r=Array.prototype.slice;return Object.defineProperties(e,{on:{value:function(r,n){return"function"==typeof n&&(t[r]=t[r]||[]).push(n),e},enumerable:!1,writable:!1,configurable:!1},off:{value:function(r,n){if("*"!=r||n)if(n)for(var i,o=t[r],s=0;i=o&&o[s];++s)i==n&&o.splice(s--,1);else delete t[r];else t={};return e},enumerable:!1,writable:!1,configurable:!1},one:{value:function(t,r){function n(){e.off(t,n),r.apply(e,arguments)}return e.on(t,n)},enumerable:!1,writable:!1,configurable:!1},trigger:{value:function(n){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=r.call(t[n]||[],0),s=0;o=i[s];++s)o.apply(e,c);return t["*"]&&"*"!=n&&e.trigger.apply(e,["*",n].concat(c)),e},enumerable:!1,writable:!1,configurable:!1}}),e},Et=Object.freeze({each:_,contains:w,toCamel:O,startsWith:C,defineProperty:N,extend:j}),St=j(Object.create(Ct.settings),{skipAnonymousTags:!0}),At=/^on/,Tt={init:function(e,t,r){g(e,Je),this.tag=t,this.expr=r,this.stub=document.createTextNode(""),this.pristine=e;var n=e.parentNode;return n.insertBefore(this.stub,e),n.removeChild(e),this},update:function(){var e=Nt(this.expr,this.tag);e&&!this.current?(this.current=this.pristine.cloneNode(!0),this.stub.parentNode.insertBefore(this.current,this.stub),this.expressions=[],z.apply(this.tag,[this.current,this.expressions,!0])):!e&&this.current&&(oe(this.expressions),this.current._tag?this.current._tag.unmount():this.current.parentNode&&this.current.parentNode.removeChild(this.current),this.current=null,this.expressions=[]),e&&L.call(this.tag,this.expressions)},unmount:function(){oe(this.expressions||[]),delete this.pristine,delete this.parentNode,delete this.stub}},Lt={init:function(e,t,r,n){return this.dom=e,this.attr=r,this.rawValue=n,this.parent=t,this.hasExp=Nt.hasExpr(n),this.firstRun=!0,this},update:function(){var e=this.rawValue;if(this.hasExp&&(e=Nt(this.rawValue,this.parent)),this.firstRun||e!==this.value){var t=this.parent&&ie(this.parent),r=this.tag||this.dom;!o(this.value)&&t&&ce(t.refs,this.value,r),o(e)?g(this.dom,this.attr):(t&&ue(t.refs,e,r,null,this.parent.__.index),v(this.dom,this.attr,e)),this.value=e,this.firstRun=!1}},unmount:function(){var e=this.tag||this.dom,t=this.parent&&ie(this.parent);!o(this.value)&&t&&ce(t.refs,this.value,e),delete this.dom,delete this.parent}},Rt=/<yield\b/i,Mt=/<yield\s*(?:\/>|>([\S\s]*?)<\/yield\s*>|>)/gi,kt=/<yield\s+to=['"]([^'">]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,It=/<yield\s+from=['"]?([-\w]+)['"]?\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/gi,$t={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},Ft=gt&><10?ct:lt,Ht="div",Pt={},zt=Pt[Ke]={},Bt=0,Ut="v3.3.2",Vt=Object.freeze({Tag:q,tag:Z,tag2:K,mount:G,mixin:Q,update:W,unregister:J,version:Ut}),Dt=0,qt=Object.freeze({getTag:ee,inheritFrom:te,moveChildTag:re,initChildTag:ne,getImmediateCustomParentTag:ie,unmountAll:oe,getTagName:se,cleanUpData:ae,arrayishAdd:ue,arrayishRemove:ce,mountTo:le,makeReplaceVirtual:pe,makeVirtual:fe,moveVirtual:he,selectTags:de}),Zt=St,Kt={tmpl:Nt,brackets:Ct,styleManager:Ot,vdom:qe,styleNode:Ot.styleNode,dom:vt,check:mt,misc:Et,tags:qt},Gt=q,Qt=Z,Wt=K,Jt=G,Xt=Q,Yt=W,er=J,tr=jt,rr=j({},Vt,{observable:jt,settings:Zt,util:Kt}),nr=Object.freeze({settings:Zt,util:Kt,Tag:Gt,tag:Qt,tag2:Wt,mount:Jt,mixin:Xt,update:Yt,unregister:er,observable:tr,default:rr}),ir=function(e){function t(t){var r=e[t];if(r)return r;throw new Error('Parser "'+t+'" not loaded.')}function r(e){var t=e.split(".");if(2!==t.length)throw new Error("Bad format for parsers._req");var r=o[t[0]][t[1]];if(r)return r;throw new Error('Parser "'+e+'" not found.')}function n(e,t){if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function i(e,r,i,o){return i=n({pretty:!0,filename:o,doctype:"html"},i),t(e).render(r,i)}var o={};return o.html={jade:function(e,t,r){return console.log('DEPRECATION WARNING: jade was renamed "pug" - The jade parser will be removed in riot@3.0.0!'),i("jade",e,t,r)},pug:function(e,t,r){return i("pug",e,t,r)}},o.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}},o.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,r){return t("typescript")(e,r)},none:function(e){return e}},o.js.javascript=o.js.none,o.js.coffeescript=o.js.coffee,o._req=r,o.utils={extend:n},o}(window||global),or=ir.utils.extend,sr=/"[^"\n\\]*(?:\\[\S\s][^"\n\\]*)*"|'[^'\n\\]*(?:\\[\S\s][^'\n\\]*)*'/.source,ar=Ct.R_STRINGS.source,ur=/ *([-\w:\xA0-\xFF]+) ?(?:= ?('[^']*'|"[^"]*"|\S+))?/g,cr=RegExp(/<!--(?!>)[\S\s]*?-->/.source+"|"+sr,"g"),lr=/<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^"'\/>]*(?:(?:"[^"]*"|'[^']*'|\/[^>])[^'"\/>]*)*)|\s*)(\/?)>/g,pr=/>[ \t]+<(-?[A-Za-z]|\/[-A-Za-z])/g,fr=["style","src","d","value"],hr=/^(?:input|img|br|wbr|hr|area|base|col|embed|keygen|link|meta|param|source|track)$/,dr=/<pre(?:\s+(?:[^">]*|"[^"]*")*)?>([\S\s]+?)<\/pre\s*>/gi,gr=/^"(?:number|date(?:time)?|time|month|email|color)\b/i,mr=/^\s*import(?!\w)(?:(?:\s|[^\s'"])*)['|"].*\n?/gm,vr=/[ \t]+$/gm,xr=ge(/@#\d/,"x01"),yr=ge(/@#(\d+)/g,"x01"),br="#",_r="⁗",wr='"',Or="'",Cr=/^[ \t]*(((?:async|\*)\s*)?([$_A-Za-z][$\w]*))\s*\([^()]*\)\s*{/m,Nr=RegExp("[{}]|"+Ct.S_QBLOCKS,"g"),jr=RegExp(Ct.R_MLCOMMS.source+"|//[^\r\n]*|"+Ct.S_QBLOCKS,"g"),Er=RegExp("([{}]|^)[; ]*((?:[^@ ;{}][^{}]*)?[^@ ;{}:] ?)(?={)|"+sr,"g"),Sr=/\stype\s*=\s*(?:(['"])(.+?)\1|(\S+))/i,Ar="\\s*=\\s*("+ar+"|{[^}]+}|\\S+)",Tr=/\/>\n|^<(?:\/?-?[A-Za-z][-\w\xA0-\xFF]*\s*|-?[A-Za-z][-\w\xA0-\xFF]*\s+[-\w:\xA0-\xFF][\S\s]*?)>\n/,Lr=RegExp(/^([ \t]*)<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^'"\/>]+(?:(?:@|\/[^>])[^'"\/>]*)*)|\s*)?(?:\/>|>[ \t]*\n?([\S\s]*)^\1<\/\2\s*>|>(.*)<\/\2\s*>)/.source.replace("@",ar),"gim"),Rr=/<script(\s+[^>]*)?>\n?([\S\s]*?)<\/script\s*>/gi,Mr=/<style(\s+[^>]*)?>\n?([\S\s]*?)<\/style\s*>/gi,kr="v3.2.1",Ir={
|
||
compile:He,compileHTML:_e,compileCSS:Ee,compileJS:Ce,parsers:ir,version:kr},$r=Ir.parsers,Fr=function(e,n,i){if(typeof e===rt){if(r(n)&&(i=n,n=!1),/^\s*</m.test(e)){var o=Ir.compile(e,i);return n!==!0&&ze(o),t(n)&&n(o,e,i),o}Pe(e,function(e,t,r){var i=Ir.compile(e,t,r);ze(i,r),n&&n(i,e,t)},i)}else if(s(e)){var a=e.length;e.forEach(function(e){Pe(e,function(e,t,r){var i=Ir.compile(e,t,r);ze(i,r),a--,!a&&n&&n(i,e,t)},i)})}else{if(t(e)?(i=n,n=e):(i=e,n=void 0),wt)return n&&n();_t?n&&_t.on("ready",n):(_t=jt(),Be(n,i))}},Hr=j({},nr,{mount:Ue,compile:Fr,parsers:$r});return Hr});
|