Comparing version 0.2.0 to 0.2.1
@@ -1,1 +0,1 @@ | ||
!(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.Nerv={})})(this,(function(e){"use strict";function t(e){return"number"==typeof e}function n(e){return"string"==typeof e}function r(e){return"function"==typeof e}function o(e){return!0===e||!1===e}function i(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor.prototype}function a(e){return e===Object(e)&&!r(e)}function s(e){return r(e)&&/native code/.test(e.toString())}function l(e,t){if(!t)return e;for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function u(e){return l({},e)}function c(){De=!1;var e=Me.slice(0);Me=[],e.forEach((function(e){return e()}))}function p(e,t){var n;if(Me.push((function(){if(e)try{e.call(t)}catch(r){console.error(r)}else n&&n(t)})),De||(De=!0,Pe()),!e&&Ue)return new Promise(function(e){n=e})}function f(e){return e&&"VirtualNode"===e.type}function h(e){return e&&"VirtualText"===e.type}function d(e){return e&&"Widget"===e.type}function v(e){return!!(e&&"function"==typeof e.hook&&!e.hasOwnProperty("hook")||e&&"function"==typeof e.unhook&&!e.hasOwnProperty("unhook"))}function m(e,r){if(d(e))return e.init();if(n(e)||t(e))return ze.createTextNode(e);if(h(e))return ze.createTextNode(e.text);if(null===e||!1===e)return ze.createComment("Empty dom node");if(f(e)){e.isSvg?r=!0:"svg"===e.tagName?r=!0:"foreignObject"===e.tagName&&(r=!1),We||(r=!1),r&&(e.namespace=je,e.isSvg=r);var o=null===e.namespace?ze.createElement(e.tagName):We?ze.createElementNS(e.namespace,e.tagName):ze.createElement(e.tagName);g(o,e.props,r),Le.debug&&(o._props=e.props);var i=e.children;return i.length&&i.forEach((function(t){if(t!==undefined&&null!==t&&!1!==t&&o.appendChild){(d(t)||f(t))&&(t.parentContext=e.parentContext||{});var n=m(t,r);n&&o.appendChild(n)}})),o}if(Array.isArray(e)){var a=ze.createDocumentFragment();return e.forEach((function(e){if(e!==undefined&&null!==e&&!1!==e&&a.appendChild){var t=m(e,r);return t&&a.appendChild(t),a.appendChild(t)}})),a}return null}function g(e,t,o){for(var i in t)if("children"!==i){var s=t[i];if(v(s))s.hook&&s.hook(e,i);else if("style"!==i)if(a(s))if(i in e)try{e[i]=s}catch(c){console.warn("set prop failed, prop value:",s)}else e.setAttribute(i,s);else if("list"!==i&&"type"!==i&&!o&&i in e){try{e[i]=null==s?"":s}catch(c){console.warn("set prop failed, prop value:",s)}null!=s&&!1!==s||e.removeAttribute(i)}else null==s||!1===s?e.removeAttribute(i):r(s)||e.setAttribute(i,s);else if(n(s))e.setAttribute(i,s);else if(a(s))for(var l in s){var u=s[l];if(u!==undefined)try{e[i][l]=u}catch(c){console.warn("Can't set empty style")}}}}function y(e){return new Ie(e)}function k(e,t){var n={old:e};return x(e,t,n,0),n}function x(e,t,n,r){if(e!==t){var o=n[r],i=!1;if(t)if(h(t))h(e)?e.text!==t.text&&(o=P(o,new Xe(Xe.VTEXT,e,t))):(i=!0,o=P(o,new Xe(Xe.VTEXT,e,t)));else if(f(t))if(f(e))if(e.tagName===t.tagName&&e.key===t.key){var a=b(e.props,t.props);a&&(o=P(o,new Xe(Xe.PROPS,e,a))),o=w(e,t,o,n,r)}else o=P(o,new Xe(Xe.VNODE,e,t)),i=!0;else o=P(o,new Xe(Xe.VNODE,e,t)),i=!0;else d(t)?(d(e)||(i=!0),o=P(o,new Xe(Xe.WIDGET,e,t))):Array.isArray(t)&&(i=!0,t.forEach((function(e){x(null,e,n,r),r++})));else d(e)||(C(e,n,r),o=n[r]),o=P(o,new Xe(Xe.REMOVE,e,null));o&&(n[r]=o),i&&C(e,n,r)}}function b(e,t){var n=null;for(var r in e)if("children"!==r){t.hasOwnProperty(r)||((n=n||{})[r]=undefined);var o=e[r],s=t[r];if(o!==s)if(a(o)&&a(s))if(i(o)!==i(s))(n=n||{})[r]=s;else if(v(s))(n=n||{})[r]=s;else{var l=b(o,s);l&&((n=n||{})[r]=l)}else(n=n||{})[r]=s}for(var u in t)e.hasOwnProperty(u)||((n=n||{})[u]=t[u]);return n}function w(e,t,n,r,o){for(var i=e.children,a=E(i,t.children,"key"),s=a.list,l=Math.max(i.length,s.length),u=0;u<l;u++){var c=i[u],p=s[u];o+=1,c?x(c,p,r,o):p&&(n=P(n,new Xe(Xe.INSERT,null,p))),f(c)&&c.count&&(o+=c.count)}return a.moves&&(n=P(n,new Xe(Xe.ORDER,e,a.moves))),n}function E(e,t,n){var r=A(t,n),o=r.keyMap,i=r.free;if(i.length===t.length)return{list:t,moves:null};var a=A(e,n),s=a.keyMap;if(a.free.length===e.length)return{list:t,moves:null};var l=0,u=0,c=e.map((function(e){var r=e[n];if(r)return o.hasOwnProperty(r)?t[o[r]]:(u++,null);var a=i[l++],s=t[a];return s||(u++,null)})),p=l>=i.length?t.length:i[l];t.forEach((function(e,t){var r=e[n];r?s.hasOwnProperty(r)||c.push(e):t>=p&&c.push(e)}));for(var f,h=c.slice(0),d=0,v=[],m=[],g=0;g<t.length;){for(f=h[d];null===f&&h.length;)v.push(O(h,d,null)),f=h[d];var y=t[g],k=y[n],x=f[n];f&&x===k?(d++,g++):y[n]?(f&&x&&o[x]!==g+1?(v.push(O(h,d,x)),(f=h[d])&&x===k?d++:m.push({key:k,to:g})):m.push({key:k,to:g}),g++):f&&x&&v.push(O(h,d,x))}for(;d<h.length;)f=h[d],v.push(O(h,d,f&&f.key));return v.length!==u||m.length?{list:c,moves:{removes:v,inserts:m}}:{list:c,moves:null}}function O(e,t,n){return e.splice(t,1),{from:t,key:n}}function C(e,t,n){N(e,t,n),T(e,t,n)}function N(e,t,n){if(f(e)&&(e.hooks&&(t[n]=P(t[n],new Xe(Xe.PROPS,e,S(e.hooks)))),e.descendantHooks))for(var r=e.children,o=r.length,i=0;i<o;i++){var a=r[i];N(a,t,n+=1),f(a)&&a.count&&(n+=a.count)}}function T(e,t,n){d(e)?r(e.destroy)&&(t[n]=P(t[n],new Xe(Xe.REMOVE,e,null))):f(e)&&e.hasWidgets&&e.children.forEach((function(e){T(e,t,n+=1),f(e)&&e.count&&(n+=e.count)}))}function A(e,t){var n={},r=[];return e.forEach((function(e,o){e[t]?n[e[t]]=o:r.push(o)})),{keyMap:n,free:r}}function S(e){var t={};for(var n in e)t[n]=undefined;return t}function P(e,t){return e?(Array.isArray(e)?e.push(t):e=[e,t],e):[t]}function _(e,t,n,r){return n&&0!==n.length?(n.sort((function(e,t){return e-t})),R(e,t,n,r)):{}}function R(e,t,n,r,o){if(void 0===r&&(r={}),void 0===o&&(o=0),e){M(n,o,o)&&(r[o]=e);var i=t&&t.children;if(i){var a=e.childNodes;i.forEach((function(e,t){var i=++o+((e=e||{}).count||0);M(n,o,i)&&R(a[t],e,n,r,o),o=i}))}}return r}function M(e,t,n){if(0===e.length)return!1;for(var r,o,i=0,a=e.length-1;i<=a;){if(r=(a+i)/2>>0,o=e[r],i===a)return o>=t&&o<=n;if(o<t)i=r+1;else{if(!(o>n))return!0;a=r-1}}return!1}function D(e,t,n){var r=F(t);if(0===r.length)return e;var o=t.old,i=_(e,o,r);return r.forEach((function(r){e=U(e,i[r],t[r],n)})),e}function U(e,t,n,r){if(!t)return e;var o;return Array.isArray(n)||(n=[n]),n.forEach((function(n){o=V(t,n,r),t===e&&(e=o)})),e}function V(e,t,n){var r=t.type,o=t.vnode,i=t.patch;switch(r){case Xe.VTEXT:return H(e,i);case Xe.VNODE:return L(e,i,n);case Xe.INSERT:return j(e,i,n);case Xe.WIDGET:return z(e,o,i);case Xe.PROPS:return I(e,i,o.props,o.isSvg);case Xe.ORDER:return X(e,i);case Xe.REMOVE:return B(e,o);default:return e}}function H(e,t){if(null===e)return m(t);if(e.splitText!==undefined)return e.nodeValue=t.text,e;var n=e.parentNode,r=m(t);return n&&n.replaceChild(r,e),r}function L(e,t,n){if((d(t)||f(t))&&(t.parentContext=n),null===e)return m(t);var r=e.parentNode,o=m(t);return r&&o!==e&&r.replaceChild(o,e),o}function j(e,t,n){(d(t)||f(t))&&(t.parentContext=n);var r=m(t);return e&&r&&e.appendChild(r),e}function z(e,t,n){var r=q(t,n);t&&(n.parentContext=t.parentContext);var o=r?n.update(t,n,e)||e:m(n),i=e.parentNode;return i&&e!==o&&i.replaceChild(o,e),!r&&t&&W(e,t),o}function W(e,t){r(t.destroy)&&d(t)&&t.destroy(e)}function I(e,t,o,s){for(var l in t)if("children"!==l){var u=t[l],c=o[l];if(null==u||!1===u){if(v(c)&&c.unhook){c.unhook(e,l,u);continue}if("style"===l){n(c)||e.removeAttribute(l);continue}l in e?(e[l]=n(c)?"":null,e.removeAttribute(l)):e.removeAttribute(l)}else{if(v(u)){v(c)&&c.unhook&&c.unhook(e,l,u),u&&u.hook&&u.hook(e,l,c);continue}if("style"===l){if(n(u))e.setAttribute(l,u);else for(var p in u){var f=u[p];if(null!=f&&!1!==f)try{e[l][p]=f}catch(h){}}continue}if(a(u)){if(c&&a(c)&&i(c)!==i(u))if(l in e)try{e[l]=u}catch(h){}else e.setAttribute(l,u);continue}if("list"!==l&&"type"!==l&&!s&&l in e){try{e[l]=u}catch(h){}continue}r(u)||e.setAttribute(l,u)}}return e}function X(e,t){for(var n,r,o,i=t.removes,a=t.inserts,s=e.childNodes,l={},u=0;u<i.length;u++)n=s[(r=i[u]).from],r.key&&(l[r.key]=n),e.removeChild(n);for(var c=s.length,p=0;p<a.length;p++)n=l[(o=a[p]).key],e.insertBefore(n,o.to>=c++?null:s[o.to]);return e}function B(e,t){var n=e.parentNode;return n&&n.removeChild(e),d(t)&&W(e,t),null}function q(e,t){if(d(e)&&d(t)){var n=e.props.key,r=t.props.key;return"name"in e&&"name"in t?e.name===t.name&&n===r:e.init===t.init&&n===r}return!1}function F(e){var t=[];if(e)for(var n in e)"old"!==n&&e.hasOwnProperty(n)&&t.push(Number(n));return t}function Y(e,t){return a(e)&&(e.parentContext=t),m(e)}function G(e){var t=e.parentContext,n=e.tagName.prototype;n&&r(n.render)&&(e.component=new e.tagName(e.props,t));var o=e.component;r(o.componentWillMount)&&(o.componentWillMount(),o.state=o.getState()),o._dirty=!1;var i=J(o);o._rendered=i,r(o.componentDidMount)&&qe.push(o),r(e.props.ref)&&qe.push((function(){return e.props.ref(o)}));var a=Y(i,$(o,t));return o.dom=a,o._disable=!1,null!==Le.afterMount&&Le.afterMount(e),a}function Z(e){var t=e.props.ref;delete e.props.ref,e._rendered=e.tagName(e.props,e.parentContext);var n=e._rendered;return f(n)&&r(t)&&(t=new Be(t),n.props.ref=t),Y(n,e.parentContext)}function $(e,t){return e.getChildContext?l(t,e.getChildContext()):t}function J(e){He.current=e;var r=e.render();return(t(r)||n(r))&&(r=y(r)),He.current=null,r}function K(){if(qe.length){var e=qe.slice(0);qe.length=0,e.forEach((function(e){r(e)?e():e.componentDidMount&&e.componentDidMount()}))}}function Q(e,t){var n=t.component=e.component,o=t.props,i=n.context;return n._disable=!0,r(n.componentWillReceiveProps)&&n.componentWillReceiveProps(o,i),n._disable=!1,n.prevProps=n.props,n.prevState=n.state,n.prevContext=n.context,n.props=o,n.context=i,r(t.props.ref)&&t.props.ref(n),te(n),n.dom}function ee(e,t,n){var r=e._rendered,o=t.tagName(t.props,t.parentContext);return t._rendered=o,ne(o,r,n,e.parentContext)}function te(e,t){void 0===t&&(t=!1);var n=e.dom,o=e.props,i=e.getState(),a=e.context,s=e.prevProps||o,l=e.prevContext||a;e.props=s,e.context=l;var u=!1;if(!t&&r(e.shouldComponentUpdate)&&!1===e.shouldComponentUpdate(o,i,a)?u=!0:r(e.componentWillUpdate)&&e.componentWillUpdate(o,i,a),e.props=o,e.state=i,e.context=a,e._dirty=!1,!u){var c=e._rendered,p=J(e),f=$(e,a);e._rendered=p,e.dom=ne(p,c,n,f),e.componentDidUpdate&&e.componentDidUpdate(o,i,a)}if(e.prevProps=e.props,e.prevState=e.state,e.prevContext=e.context,e._pendingCallbacks)for(;e._pendingCallbacks.length;)e._pendingCallbacks.pop().call(e);null!==Le.afterUpdate&&Le.afterUpdate(e),K()}function ne(e,t,n,r){return a(e)&&(e.parentContext=r),D(n,k(t,e),r)}function re(e){var t=e.component;null!==Le.beforeUnmount&&Le.beforeUnmount(t),r(t.componentWillUnmount)&&t.componentWillUnmount(),ne(null,t._rendered,t.dom,t.context),t.dom=t._rendered=null,r(e.props.ref)&&e.props.ref(null)}function oe(e,t){ne(null,e._rendered,t,e.parentContext),e._rendered=null,r(e.props.ref)&&e.props.ref(null)}function ie(e){!e._dirty&&(e._dirty=!0)&&1===Fe.push(e)&&p(ae)}function ae(){var e,t=Fe;for(Fe=[];e=t.pop();)e._dirty&&te(e)}function se(e,t){if(null===e||null===t)return!1;if(Object.is(e,t))return!0;var n=e?Object.keys(e):[],r=t?Object.keys(t):[];if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!t.hasOwnProperty(i)||!Object.is(e[i],t[i]))return!1}return!0}function le(e){return f(e)||n(e)||t(e)}function ue(e,t,n){if(!le(e)&&!d(e))return null;if(!t||1!==t.nodeType)throw new Error(t+" should be a DOM Element");var r=Y(e,{});return r&&t.appendChild(r),t&&(t._component=e),K(),n&&n(),e.component||r}function ce(e,t,n){var r,o,i,a=[];return!n&&he(t)&&(n=t,t={}),(t=t||{}).hasOwnProperty("key")&&t.key&&(r=t.key,delete t.key),t.hasOwnProperty("namespace")&&t.namespace&&(o=t.namespace,delete t.namespace),t.hasOwnProperty("owner")&&(i=t.owner,delete t.owner),t.hasOwnProperty("children")&&t.children&&(n&&n.length||(n=t.children),delete t.children),n&&pe(a,n,e),new Ze(e,t,a,r,o,i)}function pe(e,r,o){n(r)||t(r)?(r=String(r),e.push(y(r))):fe(r)?e.push(r):_e(r)&&r.forEach((function(t){return pe(e,t,o)}))}function fe(e){return f(e)||h(e)||d(e)}function he(e){return n(e)||_e(e)||fe(e)}function de(e){return"onDoubleClick"===e?e="ondblclick":"onTouchTap"===e&&(e="onclick"),e.toLowerCase()}function ve(e){if("value"===e.propertyName){var t=e.target||e.srcElement,n=t.value;n!==pt&&(pt=n,r(ht)&&ht.call(t,e))}}function me(e,t){ht=t,lt||(lt=!0,document.addEventListener("focusin",(function(){ye(),ge(e)}),!1),document.addEventListener("focusout",ye,!1))}function ge(e){ct=e,pt=e.value,ft=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(ct,"value",{get:function(){return ft.get.call(this)},set:function(e){pt=e,ft.set.call(this,e)}}),ct.addEventListener("propertychange",ve,!1)}function ye(){ct&&(delete ct.value,ct.removeEventListener("propertychange",ve,!1),ct=null,pt=null,ft=null)}function ke(e){var t=e.nodeName&&e.nodeName.toLowerCase(),n=e.type;return"input"===t&&/text|password/.test(n)||"textarea"===t}function xe(e,t){return ke(e)&&"onchange"===t&&(t=rt in window?rt:ot),t}function be(e){return e.substr(2)}function we(){this.cancelBubble=!0,this.stopImmediatePropagation()}function Ee(e,t,n,r,o){var i=n.get(t);if((!i||(r--,o.currentTarget=t,i(e),!e.cancelBubble))&&r>0){var a=t.parentNode;if(null===a||"click"===e.type&&1===a.nodeType&&a.disabled)return;Ee(e,a,n,r,o)}}function Oe(e,t,n){var r=function(e){var t=n.items.size;if(t>0){var r={currentTarget:e.target};Object.defineProperties(e,{currentTarget:{configurable:!0,get:function(){return r.currentTarget}},stopPropagation:{value:we}}),Ee(e,e.target,n.items,t,r)}};return e.addEventListener(be(t),r,!1),r}function Ce(e,t,n){var r=function(t){var r=n.get(e);if(r&&r.eventHandler){var o={currentTarget:e};Object.defineProperties(t,{currentTarget:{configurable:!0,get:function(){return o.currentTarget}}}),r.eventHandler(t)}};return e.addEventListener(be(t),r,!1),r}function Ne(e,r){var i={},s=Ke.DOMAttributeNamespaces;for(var l in r){var u=r[l],c=l;if("id"!==(l=Ke.DOMAttributeNames[l]||l)&&"className"!==l&&"namespace"!==l||u===undefined)if("ref"!==l)if("dangerouslySetInnerHTML"!==l)if("o"!==l.charAt(0)||"n"!==l.charAt(1))if(gt&&s.hasOwnProperty(c)&&(n(u)||t(u)||o(u))){var p=s[c];i[l]=u instanceof dt?u:new dt(p,u)}else if("defaultValue"!==l){if("style"!==l)i[l]=u;else if(n(u))i[l]=u;else if(a(u))for(var f in u){var h=u[f];h===undefined||!n(h)&&isNaN(h)||(h=t(h)&&!1===vt.test(f)?h+"px":h,i[l]=i[l]||{},i[l][f]=h)}}else i.value=r.value||r.defaultValue;else i[l]=u instanceof ut?u:new ut(l,u);else i[l]=u instanceof tt?u:new tt(u);else i[l]=u instanceof Be?u:new Be(u);else i[l]=u}return i}function Te(e,t){var n={};for(var r in e){var o=e[r];n[r]=o}if(t)for(var i in t)n[i]===undefined&&(n[i]=t[i]);return n}function Ae(e,t){for(var o=arguments,i=[],a=arguments.length-2;a-- >0;)i[a]=arguments[a+2];for(var s=mt,l=2,u=arguments.length;l<u;l++){var c=o[l];Array.isArray(c)?c.forEach((function(e){s===mt?s=[e]:s.push(e)})):s===mt?s=[c]:s.push(c)}var p;return n(e)?(p=Ne(e,t),p.owner=He.current,ce(e,p,s)):r(e)?((p=Te(t,e.defaultProps)).children?Array.isArray(p.children)||(p.children=[p.children]):p.children=s,p.owner=He.current,e.prototype&&e.prototype.render?new Qe(e,p):new et(e,p)):e}function Se(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];var o=l(u(e.props),t);return e.namespace&&(o.namespace=e.namespace),Ae(e.tagName,o,0===n.length?e.children:n)}var Pe,_e=Array.isArray,Re=(function(){var e=document;return function(){return!!e.createElementNS&&!!e.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect}})(),Me=[],De=!1,Ue="Promise"in window&&s(Promise),Ve="MutationObserver"in window&&(s(MutationObserver)||"[object MutationObserverConstructor]"===MutationObserver.toString());Ue?(function(){var e=Promise.resolve();Pe=function(){e.then(c)}})():Ve?(function(){var e=1,t=document.createTextNode(e);new MutationObserver(c).observe(t,{characterData:!0}),Pe=function(){e=(e+1)%2,t.data=e}})():Pe=function(){setTimeout(c,0)};var He={current:null},Le={afterMount:null,afterUpdate:null,beforeUnmount:null,roots:{},debug:!1},je="http://www.w3.org/2000/svg",ze=document,We=Re(),Ie=function(e){this.type="VirtualText",this.text=e||""},Xe=function(e,t,n){void 0===e&&(e="VirtualPatch"),this.type=e,this.vnode=t,this.patch=n};Xe.NODE="NODE",Xe.VTEXT="VTEXT",Xe.VNODE="VNODE",Xe.WIDGET="WIDGET",Xe.STATELESS="STATELESS",Xe.PROPS="PROPS",Xe.ORDER="ORDER",Xe.INSERT="INSERT",Xe.REMOVE="REMOVE";var Be=function(e){this.callback=e};Be.prototype.hook=function(e){this.callback(e)},Be.prototype.unhook=function(){this.callback(null)};var qe=[],Fe=[],Ye=function(e,t){this._dirty=!0,this._disable=!0,this._pendingStates=[],this.state||(this.state={}),this.props=e||{},this.context=t||{}};Ye.prototype.setState=function(e,t){e&&(this._pendingStates=this._pendingStates||[]).push(e),r(t)&&(this._pendingCallbacks=this._pendingCallbacks||[]).push(t),this._disable||ie(this)},Ye.prototype.getState=function(){var e=this,t=this,n=t._pendingStates,o=t.state,i=t.props;if(!n.length)return o;var a=u(o),s=n.concat();return this._pendingStates.length=0,s.forEach((function(t){r(t)&&(t=t.call(e,o,i)),l(a,t)})),a},Ye.prototype.forceUpdate=function(e){r(e)&&(this._pendingCallbacks=this._pendingCallbacks||[]).push(e),te(this,!0)},Ye.prototype.render=function(e,t,n){},Object.is=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t};var Ge=(function(e){function t(){e.apply(this,arguments),this.isPureComponent=!0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.shouldComponentUpdate=function(e,t){return!se(this.props,e)||!se(this.state,t)},t})(Ye),Ze=function(e,t,o,i,a,s){this.type="VirtualNode",this.tagName=e||"DIV",this.props=t||{},this.children=o||[],this.key=i||null,this.namespace=n(a)?a:null,this._owner=s;var l,u=this.children.length||0,c=0,p=!1,h=!1;for(var m in t)if(t.hasOwnProperty(m)){var g=t[m];v(g)&&g.unhook&&(l||(l={}),l[m]=g)}u&&this.children.forEach((function(e){f(e)?(c+=e.count||0,!p&&e.hasWidgets&&(p=!0),h||!e.hooks&&!e.descendantHooks||(h=!0)):!p&&d(e)&&r(e.destroy)&&(p=!0)})),this.count=u+c,this.hasWidgets=p,this.hooks=l,this.descendantHooks=h},$e={ev:"http://www.w3.org/2001/xml-events",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Je={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,evEvent:"ev:event",exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering","in":0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlId:"xml:id",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},Ke={Properties:{},DOMAttributeNamespaces:{evEvent:$e.ev,xlinkActuate:$e.xlink,xlinkArcrole:$e.xlink,xlinkHref:$e.xlink,xlinkRole:$e.xlink,xlinkShow:$e.xlink,xlinkTitle:$e.xlink,xlinkType:$e.xlink,xmlBase:$e.xml,xmlId:$e.xml,xmlLang:$e.xml,xmlSpace:$e.xml},DOMAttributeNames:{}};Object.keys(Je).forEach((function(e){Ke.Properties[e]=0,Je[e]&&(Ke.DOMAttributeNames[e]=Je[e])}));var Qe=function(e,t){this.type="Widget",this.tagName=e,this.name=e.name||e.toString().match(/^function\s*([^\s(]+)/)[1],e.displayName=this.name,this._owner=t.owner,delete t.owner,this.props=t};Qe.prototype.init=function(){return G(this)},Qe.prototype.update=function(e,t,n){return Q(e,this)},Qe.prototype.destroy=function(e){re(this)};var et=function(e,t){this.type="Widget",this.tagName=e,this._owner=t.owner,delete t.owner,this.props=t};et.prototype.init=function(){return Z(this)},et.prototype.update=function(e,t,n){var r=e.props,o=t.props;return e.tagName===t.tagName&&se(r,o)?n:ee(e,this,n)},et.prototype.destroy=function(e){oe(this,e)};var tt=function(e){this.type="HtmlHook",this.value=e};tt.prototype.hook=function(e,t,n){n&&"HtmlHook"===n.type&&n.value.__html===this.value.__html||(e.innerHTML=this.value.__html||"")};var nt=function(){this.cache=[],this.size=0};nt.prototype.set=function(e,t){var n=this,r=this.cache.length;if(!r)return this.cache.push({k:e,v:t}),void(this.size+=1);for(var o=0;o<r;o++){var i=n.cache[o];if(i.k===e)return void(i.v=t)}this.cache.push({k:e,v:t}),this.size+=1},nt.prototype.get=function(e){var t=this,n=this.cache.length;if(n)for(var r=0;r<n;r++){var o=t.cache[r];if(o.k===e)return o.v}},nt.prototype.has=function(e){var t=this,n=this.cache.length;if(!n)return!1;for(var r=0;r<n;r++)if(t.cache[r].k===e)return!0;return!1},nt.prototype["delete"]=function(e){for(var t=this,n=this.cache.length,r=0;r<n;r++)if(t.cache[r].k===e)return t.cache.splice(r,1),t.size-=1,!0;return!1},nt.prototype.clear=function(){var e=this,t=this.cache.length;if(this.size=0,t)for(;t;)e.cache.pop(),t--};var rt="oninput",ot="onpropertychange",it="Map"in window&&s(Map)?Map:nt,at=new it,st={onmousemove:1,ontouchmove:1,onmouseleave:1,onmouseenter:1,onload:1,onunload:1,onscroll:1,onfocus:1,onblur:1,onrowexit:1,onbeforeunload:1,onstop:1,ondragdrop:1,ondragenter:1,ondragexit:1,ondraggesture:1,ondragover:1,oncontextmenu:1,onerror:1,onabort:1,oncanplay:1,oncanplaythrough:1,ondurationchange:1,onemptied:1,onended:1,onloadeddata:1,onloadedmetadata:1,onloadstart:1,onencrypted:1,onpause:1,onplay:1,onplaying:1,onprogress:1,onratechange:1,onseeking:1,onseeked:1,onstalled:1,onsuspend:1,ontimeupdate:1,onvolumechange:1,onwaiting:1};st[ot]=1;var lt=!1,ut=function(e,t){this.type="EventHook",this.eventName=de(e),this.handler=t};ut.prototype.hook=function(e,t,n){if(!n||"EventHook"!==n.type||n.handler!==this.handler||n.eventName!==this.eventName){var o=xe(e,this.eventName);if(this.eventName=o,o!==ot){var i=at.get(o);if(1===st[o]){i||(i=new it);var a=Ce(e,o,i);at.set(o,i),r(this.handler)&&i.set(e,{eventHandler:this.handler,event:a})}else i||((i={items:new it}).event=Oe(document,o,i),at.set(o,i)),r(this.handler)&&i.items.set(e,this.handler)}else me(e,this.handler)}},ut.prototype.unhook=function(e,t,n){if(!n||"EventHook"!==n.type||n.handler!==this.handler||n.eventName!==n.eventName){var r=xe(e,this.eventName);if(r!==ot){var o=at.get(r);if(1===st[r]&&o){var i=o.get(e);e.removeEventListener(be(r),i.event,!1);var a=o.size;o["delete"](e)&&0===a&&at["delete"](r)}else if(o&&o.items){var s=o.items;s["delete"](e)&&0===s.size&&(document.removeEventListener(be(r),o.event,!1),at["delete"](r))}}}};var ct,pt,ft,ht,dt=function(e,t){this.type="AttributeHook",this.namespace=e,this.value=t};dt.prototype.hook=function(e,t,n){n&&"AttributeHook"===n.type&&n.value===this.value&&n.namespace===this.namespace||e.setAttributeNS(this.namespace,t,this.value)},dt.prototype.unhook=function(e,t,n){if(!n||"AttributeHook"!==n.type||n.namespace!==this.namespace){var r=t.indexOf(":"),o=r>-1?t.substr(r+1):t;e.removeAttributeNS(this.namespace,o)}};var vt=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,mt=[],gt=Re(),yt={Component:Ye,PureComponent:Ge,createElement:Ae,cloneElement:Se,render:ue,nextTick:p,options:Le,findDOMNode:function(e){return e||e.dom&&e}};e.Component=Ye,e.PureComponent=Ge,e.createElement=Ae,e.cloneElement=Se,e.render=ue,e.nextTick=p,e.options=Le,e.unmountComponentAtNode=function(e){var t=e._component;return!!d(t)&&(t.destroy(e),!0)},e["default"]=yt})); | ||
!(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.Nerv={})})(this,(function(e){"use strict";function t(e){return"number"==typeof e}function n(e){return"string"==typeof e}function r(e){return"function"==typeof e}function o(e){return!0===e||!1===e}function i(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor.prototype}function a(e){return e===Object(e)&&!r(e)}function s(e){return r(e)&&/native code/.test(e.toString())}function l(e,t){if(!t)return e;for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function u(e){return l({},e)}function c(){De=!1;var e=Me.slice(0);Me=[],e.forEach((function(e){return e()}))}function p(e,t){var n;if(Me.push((function(){if(e)try{e.call(t)}catch(r){console.error(r)}else n&&n(t)})),De||(De=!0,Pe()),!e&&Ue)return new Promise(function(e){n=e})}function f(e){return e&&"VirtualNode"===e.type}function h(e){return e&&"VirtualText"===e.type}function d(e){return e&&"Widget"===e.type}function v(e){return!!(e&&"function"==typeof e.hook&&!e.hasOwnProperty("hook")||e&&"function"==typeof e.unhook&&!e.hasOwnProperty("unhook"))}function m(e,r){if(d(e))return e.init();if(n(e)||t(e))return ze.createTextNode(e);if(h(e))return ze.createTextNode(e.text);if(null===e||!1===e)return ze.createComment("Empty dom node");if(f(e)){e.isSvg?r=!0:"svg"===e.tagName?r=!0:"foreignObject"===e.tagName&&(r=!1),We||(r=!1),r&&(e.namespace=je,e.isSvg=r);var o=null===e.namespace?ze.createElement(e.tagName):We?ze.createElementNS(e.namespace,e.tagName):ze.createElement(e.tagName);g(o,e.props,r),Le.debug&&(o._props=e.props);var i=e.children;return i.length&&i.forEach((function(t){if(t!==undefined&&null!==t&&!1!==t&&o.appendChild){(d(t)||f(t))&&(t.parentContext=e.parentContext||{});var n=m(t,r);n&&o.appendChild(n)}})),o}if(Array.isArray(e)){var a=ze.createDocumentFragment();return e.forEach((function(e){if(e!==undefined&&null!==e&&!1!==e&&a.appendChild){var t=m(e,r);return t&&a.appendChild(t),a.appendChild(t)}})),a}return null}function g(e,t,o){for(var i in t)if("children"!==i){var s=t[i];if(v(s))s.hook&&s.hook(e,i);else if("style"!==i)if(a(s))if(i in e)try{e[i]=s}catch(c){console.warn("set prop failed, prop value:",s)}else e.setAttribute(i,s);else if("list"!==i&&"type"!==i&&!o&&i in e){try{e[i]=null==s?"":s}catch(c){console.warn("set prop failed, prop value:",s)}null!=s&&!1!==s||e.removeAttribute(i)}else null==s||!1===s?e.removeAttribute(i):r(s)||e.setAttribute(i,s);else if(n(s))e.setAttribute(i,s);else if(a(s))for(var l in s){var u=s[l];if(u!==undefined)try{e[i][l]=u}catch(c){console.warn("Can't set empty style")}}}}function y(e){return new Ie(e)}function k(e,t){var n={old:e};return x(e,t,n,0),n}function x(e,t,n,r){if(e!==t){var o=n[r],i=!1;if(t)if(h(t))h(e)?e.text!==t.text&&(o=P(o,new Xe(Xe.VTEXT,e,t))):(i=!0,o=P(o,new Xe(Xe.VTEXT,e,t)));else if(f(t))if(f(e))if(e.tagName===t.tagName&&e.key===t.key){var a=b(e.props,t.props);a&&(o=P(o,new Xe(Xe.PROPS,e,a))),o=w(e,t,o,n,r)}else o=P(o,new Xe(Xe.VNODE,e,t)),i=!0;else o=P(o,new Xe(Xe.VNODE,e,t)),i=!0;else d(t)?(d(e)||(i=!0),o=P(o,new Xe(Xe.WIDGET,e,t))):Array.isArray(t)&&(i=!0,t.forEach((function(e){x(null,e,n,r),r++})));else d(e)||(C(e,n,r),o=n[r]),o=P(o,new Xe(Xe.REMOVE,e,null));o&&(n[r]=o),i&&C(e,n,r)}}function b(e,t){var n=null;for(var r in e)if("children"!==r){t.hasOwnProperty(r)||((n=n||{})[r]=undefined);var o=e[r],s=t[r];if(o!==s)if(a(o)&&a(s))if(i(o)!==i(s))(n=n||{})[r]=s;else if(v(s))(n=n||{})[r]=s;else{var l=b(o,s);l&&((n=n||{})[r]=l)}else(n=n||{})[r]=s}for(var u in t)e.hasOwnProperty(u)||((n=n||{})[u]=t[u]);return n}function w(e,t,n,r,o){for(var i=e.children,a=E(i,t.children,"key"),s=a.list,l=Math.max(i.length,s.length),u=0;u<l;u++){var c=i[u],p=s[u];o+=1,c?x(c,p,r,o):p&&(n=P(n,new Xe(Xe.INSERT,null,p))),f(c)&&c.count&&(o+=c.count)}return a.moves&&(n=P(n,new Xe(Xe.ORDER,e,a.moves))),n}function E(e,t,n){var r=A(t,n),o=r.keyMap,i=r.free;if(i.length===t.length)return{list:t,moves:null};var a=A(e,n),s=a.keyMap;if(a.free.length===e.length)return{list:t,moves:null};var l=0,u=0,c=e.map((function(e){var r=e[n];if(r)return o.hasOwnProperty(r)?t[o[r]]:(u++,null);var a=i[l++],s=t[a];return s||(u++,null)})),p=l>=i.length?t.length:i[l];t.forEach((function(e,t){var r=e[n];r?s.hasOwnProperty(r)||c.push(e):t>=p&&c.push(e)}));for(var f,h=c.slice(0),d=0,v=[],m=[],g=0;g<t.length;){for(f=h[d];null===f&&h.length;)v.push(O(h,d,null)),f=h[d];var y=t[g],k=y[n],x=f[n];f&&x===k?(d++,g++):y[n]?(f&&x&&o[x]!==g+1?(v.push(O(h,d,x)),(f=h[d])&&x===k?d++:m.push({key:k,to:g})):m.push({key:k,to:g}),g++):f&&x&&v.push(O(h,d,x))}for(;d<h.length;)f=h[d],v.push(O(h,d,f&&f.key));return v.length!==u||m.length?{list:c,moves:{removes:v,inserts:m}}:{list:c,moves:null}}function O(e,t,n){return e.splice(t,1),{from:t,key:n}}function C(e,t,n){N(e,t,n),T(e,t,n)}function N(e,t,n){if(f(e)&&(e.hooks&&(t[n]=P(t[n],new Xe(Xe.PROPS,e,S(e.hooks)))),e.descendantHooks))for(var r=e.children,o=r.length,i=0;i<o;i++){var a=r[i];N(a,t,n+=1),f(a)&&a.count&&(n+=a.count)}}function T(e,t,n){d(e)?r(e.destroy)&&(t[n]=P(t[n],new Xe(Xe.REMOVE,e,null))):f(e)&&e.hasWidgets&&e.children.forEach((function(e){T(e,t,n+=1),f(e)&&e.count&&(n+=e.count)}))}function A(e,t){var n={},r=[];return e.forEach((function(e,o){e[t]?n[e[t]]=o:r.push(o)})),{keyMap:n,free:r}}function S(e){var t={};for(var n in e)t[n]=undefined;return t}function P(e,t){return e?(Array.isArray(e)?e.push(t):e=[e,t],e):[t]}function _(e,t,n,r){return n&&0!==n.length?(n.sort((function(e,t){return e-t})),R(e,t,n,r)):{}}function R(e,t,n,r,o){if(void 0===r&&(r={}),void 0===o&&(o=0),e){M(n,o,o)&&(r[o]=e);var i=t&&t.children;if(i){var a=e.childNodes;i.forEach((function(e,t){var i=++o+((e=e||{}).count||0);M(n,o,i)&&R(a[t],e,n,r,o),o=i}))}}return r}function M(e,t,n){if(0===e.length)return!1;for(var r,o,i=0,a=e.length-1;i<=a;){if(r=(a+i)/2>>0,o=e[r],i===a)return o>=t&&o<=n;if(o<t)i=r+1;else{if(!(o>n))return!0;a=r-1}}return!1}function D(e,t,n){var r=F(t);if(0===r.length)return e;var o=t.old,i=_(e,o,r);return r.forEach((function(r){e=U(e,i[r],t[r],n)})),e}function U(e,t,n,r){if(!t)return e;var o;return Array.isArray(n)||(n=[n]),n.forEach((function(n){o=V(t,n,r),t===e&&(e=o)})),e}function V(e,t,n){var r=t.type,o=t.vnode,i=t.patch;switch(r){case Xe.VTEXT:return H(e,i);case Xe.VNODE:return L(e,i,n);case Xe.INSERT:return j(e,i,n);case Xe.WIDGET:return z(e,o,i);case Xe.PROPS:return I(e,i,o.props,o.isSvg);case Xe.ORDER:return X(e,i);case Xe.REMOVE:return B(e,o);default:return e}}function H(e,t){if(null===e)return m(t);if(e.splitText!==undefined)return e.nodeValue=t.text,e;var n=e.parentNode,r=m(t);return n&&n.replaceChild(r,e),r}function L(e,t,n){if((d(t)||f(t))&&(t.parentContext=n),null===e)return m(t);var r=e.parentNode,o=m(t);return r&&o!==e&&r.replaceChild(o,e),o}function j(e,t,n){(d(t)||f(t))&&(t.parentContext=n);var r=m(t);return e&&r&&e.appendChild(r),e}function z(e,t,n){var r=q(t,n);t&&(n.parentContext=t.parentContext);var o=r?n.update(t,n,e)||e:m(n),i=e.parentNode;return i&&e!==o&&i.replaceChild(o,e),!r&&t&&W(e,t),o}function W(e,t){r(t.destroy)&&d(t)&&t.destroy(e)}function I(e,t,o,s){for(var l in t)if("children"!==l){var u=t[l],c=o[l];if(null==u||!1===u){if(v(c)&&c.unhook){c.unhook(e,l,u);continue}if("style"===l){n(c)||e.removeAttribute(l);continue}l in e?(e[l]=n(c)?"":null,e.removeAttribute(l)):e.removeAttribute(l)}else{if(v(u)){v(c)&&c.unhook&&c.unhook(e,l,u),u&&u.hook&&u.hook(e,l,c);continue}if("style"===l){if(n(u))e.setAttribute(l,u);else for(var p in u){var f=u[p];if(null!=f&&!1!==f)try{e[l][p]=f}catch(h){}}continue}if(a(u)){if(c&&a(c)&&i(c)!==i(u))if(l in e)try{e[l]=u}catch(h){}else e.setAttribute(l,u);continue}if("list"!==l&&"type"!==l&&!s&&l in e){try{e[l]=u}catch(h){}continue}r(u)||e.setAttribute(l,u)}}return e}function X(e,t){for(var n,r,o,i=t.removes,a=t.inserts,s=e.childNodes,l={},u=0;u<i.length;u++)n=s[(r=i[u]).from],r.key&&(l[r.key]=n),e.removeChild(n);for(var c=s.length,p=0;p<a.length;p++)n=l[(o=a[p]).key],e.insertBefore(n,o.to>=c++?null:s[o.to]);return e}function B(e,t){var n=e.parentNode;return n&&n.removeChild(e),d(t)&&W(e,t),null}function q(e,t){if(d(e)&&d(t)){var n=e.props.key,r=t.props.key;return"name"in e&&"name"in t?e.name===t.name&&n===r:e.init===t.init&&n===r}return!1}function F(e){var t=[];if(e)for(var n in e)"old"!==n&&e.hasOwnProperty(n)&&t.push(Number(n));return t}function Y(e,t){return a(e)&&(e.parentContext=t),m(e)}function G(e){var t=e.parentContext,n=e.tagName.prototype;n&&r(n.render)&&(e.component=new e.tagName(e.props,t));var o=e.component;r(o.componentWillMount)&&(o.componentWillMount(),o.state=o.getState()),o._dirty=!1;var i=J(o);o._rendered=i,r(o.componentDidMount)&&qe.push(o),r(e.props.ref)&&qe.push((function(){return e.props.ref(o)}));var a=Y(i,$(o,t));return o.dom=a,o._disable=!1,null!==Le.afterMount&&Le.afterMount(e),a}function Z(e){var t=e.props.ref;delete e.props.ref,e._rendered=e.tagName(e.props,e.parentContext);var n=e._rendered;return f(n)&&r(t)&&(t=new Be(t),n.props.ref=t),Y(n,e.parentContext)}function $(e,t){return e.getChildContext?l(t,e.getChildContext()):t}function J(e){He.current=e;var r=e.render();return(t(r)||n(r))&&(r=y(r)),He.current=null,r}function K(){if(qe.length){var e=qe.slice(0);qe.length=0,e.forEach((function(e){r(e)?e():e.componentDidMount&&e.componentDidMount()}))}}function Q(e,t){var n=t.component=e.component,o=t.props,i=n.context;return n._disable=!0,r(n.componentWillReceiveProps)&&n.componentWillReceiveProps(o,i),n._disable=!1,n.prevProps=n.props,n.prevState=n.state,n.prevContext=n.context,n.props=o,n.context=i,r(t.props.ref)&&t.props.ref(n),te(n),n.dom}function ee(e,t,n){var r=e._rendered,o=t.tagName(t.props,t.parentContext);return t._rendered=o,ne(o,r,n,e.parentContext)}function te(e,t){void 0===t&&(t=!1);var n=e.dom,o=e.props,i=e.getState(),a=e.context,s=e.prevProps||o,l=e.prevState||i,u=e.prevContext||a;e.props=s,e.context=u;var c=!1;if(!t&&r(e.shouldComponentUpdate)&&!1===e.shouldComponentUpdate(o,i,a)?c=!0:r(e.componentWillUpdate)&&e.componentWillUpdate(o,i,a),e.props=o,e.state=i,e.context=a,e._dirty=!1,!c){var p=e._rendered,f=J(e),h=$(e,a);e._rendered=f,e.dom=ne(f,p,n,h),e.componentDidUpdate&&e.componentDidUpdate(s,l,a)}if(e.prevProps=e.props,e.prevState=e.state,e.prevContext=e.context,e._pendingCallbacks)for(;e._pendingCallbacks.length;)e._pendingCallbacks.pop().call(e);null!==Le.afterUpdate&&Le.afterUpdate(e),K()}function ne(e,t,n,r){return a(e)&&(e.parentContext=r),D(n,k(t,e),r)}function re(e){var t=e.component;null!==Le.beforeUnmount&&Le.beforeUnmount(t),r(t.componentWillUnmount)&&t.componentWillUnmount(),ne(null,t._rendered,t.dom,t.context),t.dom=t._rendered=null,r(e.props.ref)&&e.props.ref(null)}function oe(e,t){ne(null,e._rendered,t,e.parentContext),e._rendered=null,r(e.props.ref)&&e.props.ref(null)}function ie(e){!e._dirty&&(e._dirty=!0)&&1===Fe.push(e)&&p(ae)}function ae(){var e,t=Fe;for(Fe=[];e=t.pop();)e._dirty&&te(e)}function se(e,t){if(null===e||null===t)return!1;if(Object.is(e,t))return!0;var n=e?Object.keys(e):[],r=t?Object.keys(t):[];if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!t.hasOwnProperty(i)||!Object.is(e[i],t[i]))return!1}return!0}function le(e){return f(e)||n(e)||t(e)}function ue(e,t,n){if(!le(e)&&!d(e))return null;if(!t||1!==t.nodeType)throw new Error(t+" should be a DOM Element");var r=Y(e,{});return r&&t.appendChild(r),t&&(t._component=e),K(),n&&n(),e.component||r}function ce(e,t,n){var r,o,i,a=[];return!n&&he(t)&&(n=t,t={}),(t=t||{}).hasOwnProperty("key")&&t.key&&(r=t.key,delete t.key),t.hasOwnProperty("namespace")&&t.namespace&&(o=t.namespace,delete t.namespace),t.hasOwnProperty("owner")&&(i=t.owner,delete t.owner),t.hasOwnProperty("children")&&t.children&&(n&&n.length||(n=t.children),delete t.children),n&&pe(a,n,e),new Ze(e,t,a,r,o,i)}function pe(e,r,o){n(r)||t(r)?(r=String(r),e.push(y(r))):fe(r)?e.push(r):_e(r)&&r.forEach((function(t){return pe(e,t,o)}))}function fe(e){return f(e)||h(e)||d(e)}function he(e){return n(e)||_e(e)||fe(e)}function de(e){return"onDoubleClick"===e?e="ondblclick":"onTouchTap"===e&&(e="onclick"),e.toLowerCase()}function ve(e){if("value"===e.propertyName){var t=e.target||e.srcElement,n=t.value;n!==pt&&(pt=n,r(ht)&&ht.call(t,e))}}function me(e,t){ht=t,lt||(lt=!0,document.addEventListener("focusin",(function(){ye(),ge(e)}),!1),document.addEventListener("focusout",ye,!1))}function ge(e){ct=e,pt=e.value,ft=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(ct,"value",{get:function(){return ft.get.call(this)},set:function(e){pt=e,ft.set.call(this,e)}}),ct.addEventListener("propertychange",ve,!1)}function ye(){ct&&(delete ct.value,ct.removeEventListener("propertychange",ve,!1),ct=null,pt=null,ft=null)}function ke(e){var t=e.nodeName&&e.nodeName.toLowerCase(),n=e.type;return"input"===t&&/text|password/.test(n)||"textarea"===t}function xe(e,t){return ke(e)&&"onchange"===t&&(t=rt in window?rt:ot),t}function be(e){return e.substr(2)}function we(){this.cancelBubble=!0,this.stopImmediatePropagation()}function Ee(e,t,n,r,o){var i=n.get(t);if((!i||(r--,o.currentTarget=t,i(e),!e.cancelBubble))&&r>0){var a=t.parentNode;if(null===a||"click"===e.type&&1===a.nodeType&&a.disabled)return;Ee(e,a,n,r,o)}}function Oe(e,t,n){var r=function(e){var t=n.items.size;if(t>0){var r={currentTarget:e.target};Object.defineProperties(e,{currentTarget:{configurable:!0,get:function(){return r.currentTarget}},stopPropagation:{value:we}}),Ee(e,e.target,n.items,t,r)}};return e.addEventListener(be(t),r,!1),r}function Ce(e,t,n){var r=function(t){var r=n.get(e);if(r&&r.eventHandler){var o={currentTarget:e};Object.defineProperties(t,{currentTarget:{configurable:!0,get:function(){return o.currentTarget}}}),r.eventHandler(t)}};return e.addEventListener(be(t),r,!1),r}function Ne(e,r){var i={},s=Ke.DOMAttributeNamespaces;for(var l in r){var u=r[l],c=l;if("id"!==(l=Ke.DOMAttributeNames[l]||l)&&"className"!==l&&"namespace"!==l||u===undefined)if("ref"!==l)if("dangerouslySetInnerHTML"!==l)if("o"!==l.charAt(0)||"n"!==l.charAt(1))if(gt&&s.hasOwnProperty(c)&&(n(u)||t(u)||o(u))){var p=s[c];i[l]=u instanceof dt?u:new dt(p,u)}else if("defaultValue"!==l){if("style"!==l)i[l]=u;else if(n(u))i[l]=u;else if(a(u))for(var f in u){var h=u[f];h===undefined||!n(h)&&isNaN(h)||(h=t(h)&&!1===vt.test(f)?h+"px":h,i[l]=i[l]||{},i[l][f]=h)}}else i.value=r.value||r.defaultValue;else i[l]=u instanceof ut?u:new ut(l,u);else i[l]=u instanceof tt?u:new tt(u);else i[l]=u instanceof Be?u:new Be(u);else i[l]=u}return i}function Te(e,t){var n={};for(var r in e){var o=e[r];n[r]=o}if(t)for(var i in t)n[i]===undefined&&(n[i]=t[i]);return n}function Ae(e,t){for(var o=arguments,i=[],a=arguments.length-2;a-- >0;)i[a]=arguments[a+2];for(var s=mt,l=2,u=arguments.length;l<u;l++){var c=o[l];Array.isArray(c)?c.forEach((function(e){s===mt?s=[e]:s.push(e)})):s===mt?s=[c]:s.push(c)}var p;return n(e)?(p=Ne(e,t),p.owner=He.current,ce(e,p,s)):r(e)?((p=Te(t,e.defaultProps)).children?Array.isArray(p.children)||(p.children=[p.children]):p.children=s,p.owner=He.current,e.prototype&&e.prototype.render?new Qe(e,p):new et(e,p)):e}function Se(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];var o=l(u(e.props),t);return e.namespace&&(o.namespace=e.namespace),Ae(e.tagName,o,0===n.length?e.children:n)}var Pe,_e=Array.isArray,Re=(function(){var e=document;return function(){return!!e.createElementNS&&!!e.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect}})(),Me=[],De=!1,Ue="Promise"in window&&s(Promise),Ve="MutationObserver"in window&&(s(MutationObserver)||"[object MutationObserverConstructor]"===MutationObserver.toString());Ue?(function(){var e=Promise.resolve();Pe=function(){e.then(c)}})():Ve?(function(){var e=1,t=document.createTextNode(e);new MutationObserver(c).observe(t,{characterData:!0}),Pe=function(){e=(e+1)%2,t.data=e}})():Pe=function(){setTimeout(c,0)};var He={current:null},Le={afterMount:null,afterUpdate:null,beforeUnmount:null,roots:{},debug:!1},je="http://www.w3.org/2000/svg",ze=document,We=Re(),Ie=function(e){this.type="VirtualText",this.text=e||""},Xe=function(e,t,n){void 0===e&&(e="VirtualPatch"),this.type=e,this.vnode=t,this.patch=n};Xe.NODE="NODE",Xe.VTEXT="VTEXT",Xe.VNODE="VNODE",Xe.WIDGET="WIDGET",Xe.STATELESS="STATELESS",Xe.PROPS="PROPS",Xe.ORDER="ORDER",Xe.INSERT="INSERT",Xe.REMOVE="REMOVE";var Be=function(e){this.callback=e};Be.prototype.hook=function(e){this.callback(e)},Be.prototype.unhook=function(){this.callback(null)};var qe=[],Fe=[],Ye=function(e,t){this._dirty=!0,this._disable=!0,this._pendingStates=[],this.state||(this.state={}),this.props=e||{},this.context=t||{}};Ye.prototype.setState=function(e,t){e&&(this._pendingStates=this._pendingStates||[]).push(e),r(t)&&(this._pendingCallbacks=this._pendingCallbacks||[]).push(t),this._disable||ie(this)},Ye.prototype.getState=function(){var e=this,t=this,n=t._pendingStates,o=t.state,i=t.props;if(!n.length)return o;var a=u(o),s=n.concat();return this._pendingStates.length=0,s.forEach((function(t){r(t)&&(t=t.call(e,o,i)),l(a,t)})),a},Ye.prototype.forceUpdate=function(e){r(e)&&(this._pendingCallbacks=this._pendingCallbacks||[]).push(e),te(this,!0)},Ye.prototype.render=function(e,t,n){},Object.is=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t};var Ge=(function(e){function t(){e.apply(this,arguments),this.isPureComponent=!0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.shouldComponentUpdate=function(e,t){return!se(this.props,e)||!se(this.state,t)},t})(Ye),Ze=function(e,t,o,i,a,s){this.type="VirtualNode",this.tagName=e||"DIV",this.props=t||{},this.children=o||[],this.key=i||null,this.namespace=n(a)?a:null,this._owner=s;var l,u=this.children.length||0,c=0,p=!1,h=!1;for(var m in t)if(t.hasOwnProperty(m)){var g=t[m];v(g)&&g.unhook&&(l||(l={}),l[m]=g)}u&&this.children.forEach((function(e){f(e)?(c+=e.count||0,!p&&e.hasWidgets&&(p=!0),h||!e.hooks&&!e.descendantHooks||(h=!0)):!p&&d(e)&&r(e.destroy)&&(p=!0)})),this.count=u+c,this.hasWidgets=p,this.hooks=l,this.descendantHooks=h},$e={ev:"http://www.w3.org/2001/xml-events",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Je={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,evEvent:"ev:event",exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering","in":0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlId:"xml:id",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},Ke={Properties:{},DOMAttributeNamespaces:{evEvent:$e.ev,xlinkActuate:$e.xlink,xlinkArcrole:$e.xlink,xlinkHref:$e.xlink,xlinkRole:$e.xlink,xlinkShow:$e.xlink,xlinkTitle:$e.xlink,xlinkType:$e.xlink,xmlBase:$e.xml,xmlId:$e.xml,xmlLang:$e.xml,xmlSpace:$e.xml},DOMAttributeNames:{}};Object.keys(Je).forEach((function(e){Ke.Properties[e]=0,Je[e]&&(Ke.DOMAttributeNames[e]=Je[e])}));var Qe=function(e,t){this.type="Widget",this.tagName=e,this.name=e.name||e.toString().match(/^function\s*([^\s(]+)/)[1],e.displayName=this.name,this._owner=t.owner,delete t.owner,this.props=t};Qe.prototype.init=function(){return G(this)},Qe.prototype.update=function(e,t,n){return Q(e,this)},Qe.prototype.destroy=function(e){re(this)};var et=function(e,t){this.type="Widget",this.tagName=e,this._owner=t.owner,delete t.owner,this.props=t};et.prototype.init=function(){return Z(this)},et.prototype.update=function(e,t,n){var r=e.props,o=t.props;return e.tagName===t.tagName&&se(r,o)?n:ee(e,this,n)},et.prototype.destroy=function(e){oe(this,e)};var tt=function(e){this.type="HtmlHook",this.value=e};tt.prototype.hook=function(e,t,n){n&&"HtmlHook"===n.type&&n.value.__html===this.value.__html||(e.innerHTML=this.value.__html||"")};var nt=function(){this.cache=[],this.size=0};nt.prototype.set=function(e,t){var n=this,r=this.cache.length;if(!r)return this.cache.push({k:e,v:t}),void(this.size+=1);for(var o=0;o<r;o++){var i=n.cache[o];if(i.k===e)return void(i.v=t)}this.cache.push({k:e,v:t}),this.size+=1},nt.prototype.get=function(e){var t=this,n=this.cache.length;if(n)for(var r=0;r<n;r++){var o=t.cache[r];if(o.k===e)return o.v}},nt.prototype.has=function(e){var t=this,n=this.cache.length;if(!n)return!1;for(var r=0;r<n;r++)if(t.cache[r].k===e)return!0;return!1},nt.prototype["delete"]=function(e){for(var t=this,n=this.cache.length,r=0;r<n;r++)if(t.cache[r].k===e)return t.cache.splice(r,1),t.size-=1,!0;return!1},nt.prototype.clear=function(){var e=this,t=this.cache.length;if(this.size=0,t)for(;t;)e.cache.pop(),t--};var rt="oninput",ot="onpropertychange",it="Map"in window&&s(Map)?Map:nt,at=new it,st={onmousemove:1,ontouchmove:1,onmouseleave:1,onmouseenter:1,onload:1,onunload:1,onscroll:1,onfocus:1,onblur:1,onrowexit:1,onbeforeunload:1,onstop:1,ondragdrop:1,ondragenter:1,ondragexit:1,ondraggesture:1,ondragover:1,oncontextmenu:1,onerror:1,onabort:1,oncanplay:1,oncanplaythrough:1,ondurationchange:1,onemptied:1,onended:1,onloadeddata:1,onloadedmetadata:1,onloadstart:1,onencrypted:1,onpause:1,onplay:1,onplaying:1,onprogress:1,onratechange:1,onseeking:1,onseeked:1,onstalled:1,onsuspend:1,ontimeupdate:1,onvolumechange:1,onwaiting:1};st[ot]=1;var lt=!1,ut=function(e,t){this.type="EventHook",this.eventName=de(e),this.handler=t};ut.prototype.hook=function(e,t,n){if(!n||"EventHook"!==n.type||n.handler!==this.handler||n.eventName!==this.eventName){var o=xe(e,this.eventName);if(this.eventName=o,o!==ot){var i=at.get(o);if(1===st[o]){i||(i=new it);var a=Ce(e,o,i);at.set(o,i),r(this.handler)&&i.set(e,{eventHandler:this.handler,event:a})}else i||((i={items:new it}).event=Oe(document,o,i),at.set(o,i)),r(this.handler)&&i.items.set(e,this.handler)}else me(e,this.handler)}},ut.prototype.unhook=function(e,t,n){if(!n||"EventHook"!==n.type||n.handler!==this.handler||n.eventName!==n.eventName){var r=xe(e,this.eventName);if(r!==ot){var o=at.get(r);if(1===st[r]&&o){var i=o.get(e);e.removeEventListener(be(r),i.event,!1);var a=o.size;o["delete"](e)&&0===a&&at["delete"](r)}else if(o&&o.items){var s=o.items;s["delete"](e)&&0===s.size&&(document.removeEventListener(be(r),o.event,!1),at["delete"](r))}}}};var ct,pt,ft,ht,dt=function(e,t){this.type="AttributeHook",this.namespace=e,this.value=t};dt.prototype.hook=function(e,t,n){n&&"AttributeHook"===n.type&&n.value===this.value&&n.namespace===this.namespace||e.setAttributeNS(this.namespace,t,this.value)},dt.prototype.unhook=function(e,t,n){if(!n||"AttributeHook"!==n.type||n.namespace!==this.namespace){var r=t.indexOf(":"),o=r>-1?t.substr(r+1):t;e.removeAttributeNS(this.namespace,o)}};var vt=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,mt=[],gt=Re(),yt={Component:Ye,PureComponent:Ge,createElement:Ae,cloneElement:Se,render:ue,nextTick:p,options:Le,findDOMNode:function(e){return e||e.dom&&e}};e.Component=Ye,e.PureComponent=Ge,e.createElement=Ae,e.cloneElement=Se,e.render=ue,e.nextTick=p,e.options=Le,e.unmountComponentAtNode=function(e){var t=e._component;return!!d(t)&&(t.destroy(e),!0)},e["default"]=yt})); |
'use strict' | ||
var Nerv = process.env.NODE_ENV === 'production' | ||
? require('./dist/nerv.js') | ||
: require('./dist/nerv.min.js') | ||
var Nerv = require('./dist/nerv.js') | ||
module.exports = Nerv | ||
module.exports.default = module.exports |
{ | ||
"name": "nervjs", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A react-like framework based on virtual-dom", | ||
@@ -77,3 +77,3 @@ "main": "index.js", | ||
"es3ify-loader": "^0.2.0", | ||
"es5-polyfill": "^0.0.1", | ||
"es5-polyfill": "^0.0.2", | ||
"es6-promise": "^4.1.1", | ||
@@ -80,0 +80,0 @@ "eslint": "^3.19.0", |
@@ -129,2 +129,3 @@ import { extend, isFunction, isNumber, isString, isObject } from './util' | ||
const prevProps = component.prevProps || props | ||
const prevState = component.prevState || state | ||
const prevContext = component.prevContext || context | ||
@@ -151,3 +152,3 @@ component.props = prevProps | ||
if (component.componentDidUpdate) { | ||
component.componentDidUpdate(props, state, context) | ||
component.componentDidUpdate(prevProps, prevState, context) | ||
} | ||
@@ -154,0 +155,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
299240
78
7628
0
1