Comparing version 0.7.15 to 0.7.16
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.InfernoCompat=e.InfernoCompat||{})}(this,function(e){"use strict";function t(e,t){if(!i(e)){var r=n(e);(r&&e.length>0||!r)&&(t=t?Object.assign({},t,{children:e}):{children:e})}return t}function n(e){return e instanceof Array}function r(e){return void 0!==e.prototype.render}function o(e){return u(e)||c(e)}function i(e){return p(e)||d(e)}function l(e){return d(e)||e===!1||e===!0||p(e)}function a(e){return"function"==typeof e}function s(e){return"o"===e[0]&&"n"===e[1]&&e.length>3}function u(e){return"string"==typeof e}function c(e){return"number"==typeof e}function d(e){return null===e}function f(e){return e===!0}function p(e){return void 0===e}function h(e){return"onCreated"===e||"onAttached"===e||"onWillDetach"===e||"onWillUpdate"===e||"onDidUpdate"===e}function m(e){return"onComponentWillMount"===e||"onComponentDidMount"===e||"onComponentWillUnmount"===e||"onComponentShouldUpdate"===e||"onComponentWillUpdate"===e||"onComponentDidUpdate"===e}function v(e,t){if(!l(e))if(n(e))for(var r=0;r<e.length;r++){var o=e[r];if(!l(o)){if(o===t)return!0;if(o.children)return v(o.children,t)}}else{if(e===t)return!0;if(e.children)return v(e.children,t)}return!1}function y(e,t){var n=t.props.children;return v(n,e)?y(e,t._parentComponent):t}function g(e,t,n,r,o){if(void 0!==t){var l=e.key,a=null===l?t.pools.nonKeyed:t.pools.keyed[l];if(!i(a)){var s=a.pop();if(!i(s))return ge(s,e,null,n,r,o,!0,t.isSVG),e.dom}}return null}function b(e){var t=e.bp;if(!i(t)){var n=e.key,r=t.pools;if(null===n){var o=r.nonKeyed;o&&o.push(e)}else{var l=r.keyed;(l[n]||(l[n]=[])).push(e)}return!0}return!1}function k(e,t){W(e)?w(e,t,!0):A(e)&&x(e,t,!1)}function w(e,t,n){var r=e.items,o=r.length,i=r.pointer;if(o>0)for(var l=0;o>l;l++){var a=r[l];W(a)?w(a,t,!0):(t&&X(t,a.dom),k(a,null))}t&&n&&X(t,i)}function x(e,t,r){var o=e.instance,l=null,a=null;i(o)||(l=o.hooks,a=o.children,void 0!==o.render&&(o.componentWillUnmount(),o._unmounted=!0,Ut.delete(o),!r&&k(o._lastNode,null)));var s=e.hooks||l;i(s)||(i(s.willDetach)||s.willDetach(e.dom),i(s.componentWillUnmount)||s.componentWillUnmount(e.dom,s));var u=(i(o)?e.children:null)||a;if(!i(u))if(n(u))for(var c=0;c<u.length;c++)k(u[c],null);else k(u,null)}function S(e){this.bp=e,this.dom=null,this.instance=null,this.tag=null,this.children=null,this.style=null,this.className=null,this.attrs=null,this.events=null,this.hooks=null,this.key=null,this.clipData=null}function _(e){return new S(e)}function C(e){this.text=e,this.dom=null}function N(){this.placeholder=!0,this.dom=null}function E(e){this.dom=null,this.pointer=null,this.items=e}function O(e){return new C(e)}function j(){return new N}function M(e){return new E(e)}function T(e,t,n){e.split(",").forEach(function(e){return t[e]=n})}function U(e){return void 0!==e.text}function D(e){return e.placeholder===!0}function W(e){return void 0!==e.items}function A(e){return void 0!==e.tag||void 0!==e.bp}function I(e,t,n){i(n)?e.appendChild(t):e.insertBefore(t,n)}function V(e,t,n){var r=t.pointer;w(t,e,!1),L(e,n,r)}function K(e,t){var n;return n=t===!0?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}function G(e,t,n){if(null===t)return document.createTextNode(e);if(n){if(""!==e)return t.textContent=e,t.firstChild;var r=document.createTextNode("");return t.appendChild(r),r}var o=document.createTextNode(e);return t.appendChild(o),o}function R(e,t,n,r,o,l,a){var s=null,u=e._lastNode;i(u)||(s=e,e=u),k(e,!1);var c=ne(t,null,r,o,l,a);t.dom=c,L(n,c,e.dom),null!==s&&(s._lastNode=t)}function L(e,t,n){e.replaceChild(t,n)}function H(e){return o(e)?O(e):l(e)?j():n(e)?M(e):e}function P(e,t){var n=e[t];return e[t]=H(n)}function Y(e,t){var n=e.dom;n===t?n.innerHTML="":(X(t,n),gt&&b(e)),k(e,!1)}function X(e,t){e.removeChild(t)}function q(e,t,n){for(var r=t||Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=null}}function z(){return document.activeElement}function F(e,t){if(gt){var n=t.length;if(n>5)for(var r=0;n>r;r++){var o=t[r];l(o)||b(o)}}e.textContent=""}function $(e){null!==e&&e!==document.body&&document.activeElement!==e&&e.focus()}function B(e,t){return e.complex?!1:t.length&&!i(t[0])&&!i(t[0].key)&&e.length&&!i(e[0])&&!i(e[0].key)}function Z(e,t){if("option"===e.tag){var n=e.attrs&&e.attrs.value;t[n]?(e.attrs=e.attrs||{},e.attrs.selected="selected",e.dom.selected=!0):e.dom.selected=!1}else for(var r=0,o=e.children.length;o>r;r++)Z(e.children[r],t)}function J(e){var t=e.attrs&&e.attrs.value,r={};if(n(t))for(var o=0,i=t.length;i>o;o++)r[t[o]]=t[o];else r[t]=t;for(var l=0,a=e.children.length;a>l;l++)Z(e.children[l],r);e.attrs&&e.attrs[t]&&delete e.attrs.value}function Q(e,t,n){i(e.created)||e.created(n),i(e.attached)||t.addListener(function(){e.attached(n)})}function ee(e){var t=e.attrs.value;i(t)||(e.dom.value=t)}function te(e,t){if("input"===e){var n=t.attrs.type;if("text"===n)ee(t);else if("checkbox"===n||"radio"===n){var r=t.attrs.checked;t.dom.checked=!!r}}else"textarea"===e&&ee(t)}function ne(e,t,n,r,o,i){return D(e)?le(e,t):U(e)?ie(e,t):W(e)?oe(e,t,n,r,o,i):A(e)?re(e,t,n,r,o,i):void ne(normalise(e),t,n,r,o,i)}function re(e,t,n,r,o,i){var l=e.bp;if(p(l))return de(e,t,n,r,o,i);if(gt){var a=g(e,l,n,r,o);if(!d(a))return d(t)||t.appendChild(a),a}return ce(e,l,t,n,r,o)}function oe(e,t,n,r,o,i){var l=e.items,a=document.createTextNode(""),s=document.createDocumentFragment();return fe(l,s,n,r,o,i),e.pointer=a,e.dom=s,s.appendChild(a),t&&I(t,s),s}function ie(e,t){var n=document.createTextNode(e.text);return e.dom=n,t&&I(t,n),n}function le(e,t){var n=document.createTextNode("");return e.dom=n,t&&I(t,n),n}function ae(e){"select"===e.tag&&J(e)}function se(e,t,n,r){ae(e);var o=e.attrs;if(d(t.attrKeys)){var i=Object.keys(o);t.attrKeys=t.attrKeys?t.attrKeys.concat(i):i}var l=t.attrKeys;ye(e,o,l,n,r)}function ue(e,t,n){var r=e.events;d(t.eventKeys)&&(t.eventKeys=Object.keys(r));var o=t.eventKeys;me(r,o,n)}function ce(e,t,n,r,o,i){var l=e.tag;if(f(t.isComponent))return ve(e,l,e.attrs||{},e.hooks,e.children,i,n,r,o);var a=K(t.tag,t.isSVG);e.dom=a,f(t.hasHooks)&&Q(e.hooks,r,a),f(t.lazy)&&Ve(e,r,a);var s=e.children;switch(t.childrenType){case 1:G(s,a,!0);break;case 2:ne(e.children,a,r,o,i,t.isSVG);break;case 3:fe(s,a,r,o,i,t.isSVG);break;case 4:for(var u=0;u<s.length;u++)ne(s[u],a,r,o,i,t.isSVG);break;case 5:pe(e,s,a,r,o,i,t.isSVG)}return f(t.hasAttrs)&&se(e,t,a,i),f(t.hasClassName)&&(a.className=e.className),f(t.hasStyle)&&Ne(null,e.style,a),f(t.hasEvents)&&ue(e,t,a),d(n)||n.appendChild(a),a}function de(e,t,n,r,o,s){var c=e.tag;if(a(c))return ve(e,c,e.attrs||{},e.hooks,e.children,o,t,n,r);if(!u(c)||""===c)throw Error("Inferno Error: Expected function or string for element tag type");"svg"===c&&(s=!0);var f=K(c,s),p=e.children,h=e.attrs,m=e.events,v=e.hooks,y=e.className,g=e.style;return e.dom=f,i(v)||Q(v,n,f),l(p)||pe(e,p,f,n,r,o,s),i(h)||(ae(e),ye(e,h,Object.keys(h),f,o)),i(y)||(f.className=y),i(g)||Ne(null,g,f),i(m)||me(m,Object.keys(m),f),d(t)||t.appendChild(f),f}function fe(e,t,n,r,o,i){e.complex=!1;for(var l=0;l<e.length;l++){var a=P(e,l);U(a)?(ie(a,t),e.complex=!0):D(a)?(le(a,t),e.complex=!0):W(a)?(oe(a,t,n,r,o,i),e.complex=!0):ne(a,t,n,r,o,i)}}function pe(e,t,r,i,a,s,u){n(t)?fe(t,r,i,a,s,u):o(t)?G(t,r,!0):l(t)||ne(t,r,i,a,s,u)}function he(e,t,n){!l(e)&&u(t)&&(e.refs[t]=n)}function me(e,t,n){for(var r=0;r<t.length;r++){var o=t[r];n[o]=e[o]}}function ve(e,n,o,a,s,u,c,d,f){o=t(s,o);var p;if(r(n)){var h=new n(o);h._patch=ge,h._componentToDOMNodeMap=Ut,!i(u)&&o.ref&&he(u,o.ref,h);var m=h.getChildContext();i(m)||(f=Object.assign({},f,m)),h.context=f,h._unmounted=!1,h._parentNode=e,u&&(h._parentComponent=u),h._pendingSetState=!0,h.componentWillMount();var v=h.render();l(v)&&(v=j()),h._pendingSetState=!1,p=ne(v,null,d,f,h,!1),h._lastNode=v,h.componentDidMount(),null===c||l(p)||c.appendChild(p),Ut.set(h,p),e.dom=p,e.instance=h}else{i(a)||(i(a.componentWillMount)||a.componentWillMount(null,o),i(a.componentDidMount)||d.addListener(function(){a.componentDidMount(p,o)}));var y=n(o,f);l(y)&&(y=j()),p=ne(y,null,d,f,null,!1),e.instance=y,null===c||l(p)||c.appendChild(p),e.dom=p}return p}function ye(e,t,n,r,o){for(var i=0;i<n.length;i++){var l=n[i];"ref"===l?he(y(e,o),t[l],r):Oe(l,null,t[l],r)}}function ge(e,t,n,r,i,a,s){if(e!==t)if(l(e))ne(t,n,r,i,a,s);else if(l(t))Y(e,n);else if(o(e))if(o(t))n.firstChild.nodeValue=t;else{var u=ne(t,null,r,i,a,s);t.dom=u,L(n,u,n.firstChild)}else if(o(t))L(n,document.createTextNode(t),e.dom);else if(W(t))W(e)?Me(e,t,n,r,i,a,s):(L(n,oe(t,null),e.dom),k(e,null));else if(W(e))V(n,e,ne(t,null,r,i,a,s));else if(D(t))D(e)?Ue(e,t):(L(n,le(t,null),e.dom),k(e,null));else if(D(e))L(n,ne(t,null,r,i,a,s),e.dom);else if(U(t))U(e)?De(e,t):(L(n,ie(t,null),e.dom),k(e,null));else if(U(e))L(n,ne(t,null,r,i,a,s),e.dom);else if(A(t))A(e)?xe(e,t,n,r,i,a,s,!1):(L(n,mountVNode(t,null,r,i,a,s),e.dom),k(e,null));else{if(!A(e))return ge(e,normalise(t),parentDomdom,r,i,a,s);L(n,ne(t,null,r,i,a,s),e.dom),k(e,null)}return t}function be(e,t,n){o(t)?e.firstChild.nodeValue=n:e.textContent=n}function ke(e,t,n,r){e&&(u(t)&&delete e.refs[t],u(n)&&(e.refs[n]=r))}function we(e,t,r,i,a,s,u){var c=t.children,d=e.children;if(d!==c)if(l(d))o(c)?be(r,d,c):l(c)||(n(c)?fe(c,r,i,a,s,u):ne(c,r,i,a,s,u));else if(l(c))F(r,d);else if(n(d))n(c)?(c.complex=d.complex,B(d,c)?We(d,c,r,i,a,s,u,null):Te(d,c,r,i,a,s,u,null)):Te(d,[c],r,i,a,s,u,null);else if(n(c)){var f=d;o(d)&&(f=O(f),f.dom=r.firstChild),Te([f],c,r,i,a,s,u,null)}else o(c)?be(r,d,c):o(d)?ge(d,c,r,i,a,s,u):xe(d,c,r,i,a,s,u,!1)}function xe(e,t,n,r,o,i,l,a){var s=e.bp,u=t.bp;void 0===s||void 0===u?_e(e,t,n,r,o,i,l):Se(e,t,s,u,n,r,o,i,a)}function Se(e,t,n,o,a,s,u,c,d){var f;o.hasHooks===!0&&(f=t.hooks,f&&!i(f.willUpdate)&&f.willUpdate(e.dom));var p=t.tag||o.tag,h=e.tag||n.tag;if(h!==p)if(n.isComponent===!0){var m=e.instance;o.isComponent===!0?R(e,t,a,s,u,c,!1):r(h)?(x(e,null,!0),Se(m._lastNode,t,a,s,u,c,o.isSVG)):(x(e,null,!0),Se(m,t,a,s,u,c,o.isSVG))}else R(e,t,a,s,u,c,o.isSVG);else if(i(h))t.dom=e.dom;else if(n.isComponent===!0){if(o.isComponent===!0){var v=e.instance;if(!i(v)&&v._unmounted){var y=ve(t,h,t.attrs||{},t.hooks,t.children,v,a,s,u);null!==a&&L(a,y,e.dom)}else t.instance=v,t.dom=e.dom,je(!0,t,t.tag,n,o,v,e.attrs||{},t.attrs||{},t.hooks,t.children,a,s,u)}}else{var g=e.dom,b=n.childrenType,k=o.childrenType;if(t.dom=g,o.lazy===!0&&d===!1){var w=e.clipData;if(null===s.scrollY&&s.refresh(),t.clipData=w,(w.pending===!0||w.top-s.scrollY>s.screenHeight)&&setClipNode(w,g,e,t,a,s,u,c,n.isSVG))return;if(w.bottom<s.scrollY&&setClipNode(w,g,e,t,a,s,u,c,n.isSVG))return}if(b>0||k>0)if(5===k||5===b)we(e,t,g,s,u,c);else{var S=e.children,_=t.children;0===b||l(S)?k>2?fe(_,g,s,u,c):ne(_,g,s,u,c):0===k||l(_)?b>2?F(g,S):Y(S,g):S!==_&&(4===b&&4===k?We(S,_,g,s,u,c,o.isSVG,null):2===b&&2===k?ge(S,_,g,s,u,c,!0,o.isSVG):1===b&&1===k?be(g,S,_):we(e,t,g,s,u,c,o.isSVG))}if(n.hasAttrs!==!0&&o.hasAttrs!==!0||Ce(e,t,n.attrKeys,o.attrKeys,g,c),n.hasEvents!==!0&&o.hasEvents!==!0||Ee(e.events,t.events,n.eventKeys,o.eventKeys,g),n.hasClassName===!0||o.hasClassName===!0){var C=t.className;e.className!==C&&(i(C)?g.removeAttribute("class"):g.className=C)}if(n.hasStyle===!0||o.hasStyle===!0){var N=t.style,E=e.style;E!==N&&Ne(E,N,g)}o.hasHooks!==!0||i(f.didUpdate)||f.didUpdate(g),te(p,t)}}function _e(e,t,n,o,l,s,u){var c=t.hooks,d=!i(c);d&&!i(c.willUpdate)&&c.willUpdate(e.dom);var f=t.tag||(i(t.bp)?null:t.bp.tag),p=e.tag||(i(e.bp)?null:e.bp.tag);if("svg"===f&&(u=!0),p!==f){var h=e.instance;a(p)?a(f)?R(e,t,n,o,l,s,u):r(p)?(x(e,null,!0),Se(h._lastNode,t,n,o,l,s,u)):(x(e,null,!0),Se(h,t,n,o,l,s,u)):R(h||e,t,n,o,l,s,u)}else if(i(p))t.dom=e.dom;else if(a(p)){if(a(f)){var m=e._instance;if(!i(m)&&m._unmounted){var v=ve(t,p,t.attrs||{},t.hooks,t.children,m,n,o,l);null!==n&&L(n,v,e.dom)}else t.instance=e.instance,t.dom=e.dom,je(!1,t,t.tag,null,null,t.instance,e.attrs||{},t.attrs||{},t.hooks,t.children,n,o,l)}}else{var y=e.dom,g=t.className,b=t.style;t.dom=y,we(e,t,y,o,l,s,u),Ce(e,t,null,null,y,s),Ee(e.events,t.events,null,null,y),e.className!==g&&(i(g)?y.removeAttribute("class"):y.className=g),e.style!==b&&Ne(e.style,b,y),d&&!i(c.didUpdate)&&c.didUpdate(y),te(f,t)}}function Ce(e,t,n,r,o,l){"select"===e.tag&&J(t);var a=t.attrs,s=e.attrs,u=i(a),c=!i(s);if(!u)for(var d=r||Object.keys(a),f=d.length,p=0;f>p;p++){var h=d[p],m=c&&s[h],v=a[h];m!==v&&("ref"===h?ke(l,m,v,o):Oe(h,m,v,o))}if(c)for(var y=n||Object.keys(s),g=y.length,b=0;g>b;b++){var k=y[b];(u||i(a[k]))&&("ref"===k?ke(getRefInstance(node,l),s[k],null,o):o.removeAttribute(k))}}function Ne(e,t,n){if(u(t))n.style.cssText=t;else if(i(e)){if(!i(t))for(var r=Object.keys(t),o=0;o<r.length;o++){var l=r[o],a=t[l];c(a)&&!_t[l]?n.style[l]=a+"px":n.style[l]=a}}else if(i(t))n.removeAttribute("style");else{for(var s=Object.keys(t),d=0;d<s.length;d++){var f=s[d],p=t[f];c(p)&&!_t[f]?n.style[f]=p+"px":n.style[f]=p}for(var h=Object.keys(e),m=0;m<h.length;m++){var v=h[m];i(t[v])&&(n.style[v]="")}}}function Ee(e,t,n,r,o){var l=!i(t),a=!i(e);if(l)if(a){for(var s=r||Object.keys(t),u=0;u<s.length;u++){var c=s[u],d=e[c],f=t[c];d!==f&&(o[c]=f)}for(var p=n||Object.keys(e),h=0;h<p.length;h++){var m=p[h];i(t[m])&&(o[m]=null)}}else mountEvents(t,r,o);else a&&q(e,r,o)}function Oe(e,t,n,r){if("dangerouslySetInnerHTML"===e){var o=t&&t.__html,l=n&&n.__html;if(i(l))throw new Error("Inferno Error: dangerouslySetInnerHTML requires an object with a __html propety containing the innerHTML content");o!==l&&(r.innerHTML=l)}else if(wt[e])r[e]=null===n?"":n;else if(xt[e])r[e]=!!n;else{var a=St[e];n===!1||i(n)?void 0!==a?r.removeAttributeNS(a,e):r.removeAttribute(e):void 0!==a?r.setAttributeNS(a,e,n===!0?e:n):r.setAttribute(e,n===!0?e:n)}}function je(e,n,o,a,s,u,c,d,f,p,h,m,v){if(d=t(p,d),r(o)){var y=u.props,g=u.state,b=u.state,k=u.getChildContext();i(k)||(v=Object.assign({},v,k)),u.context=v;var w=u._updateComponent(g,b,y,d);w===vt?w=u._lastNode:i(w)&&(w=j()),ge(u._lastNode,w,h,m,v,u,null,!1),n.dom=w.dom,u._lastNode=w,Ut.set(u,w.dom)}else{var x=!0,S=e&&s.hasHooks===!0||!i(f);if(S&&!i(f.componentShouldUpdate)&&(x=f.componentShouldUpdate(n.dom,c,d)),x!==!1){S&&!i(f.componentWillUpdate)&&f.componentWillUpdate(n.dom,c,d);var _=o(d,v);l(_)&&(_=j()),_.dom=n.dom,ge(u,_,h,m,v,null,null,!1),n.instance=_,S&&!i(f.componentDidUpdate)&&f.componentDidUpdate(n.dom,c,d)}}}function Me(e,t,n,r,o,i,l){var a=e.items,s=t.items,u=e.pointer;t.dom=e.dom,t.pointer=u,!a!==s&&(B(a,s)?We(a,s,n,r,o,i,l,t):Te(a,s,n,r,o,i,l,t))}function Te(e,t,n,r,o,i,l,a){for(var s=e.length,u=t.length,c=s>u?u:s,d=0;c>d;d++){var f=e[d],p=P(t,d);ge(f,p,n,r,o,i,l)}if(u>s)for(d=c;u>d;d++){var h=P(t,d);I(n,ne(h,null,r,o,i,l),a&&a.pointer)}else if(s>u)for(d=c;s>d;d++)Y(e[d],n)}function Ue(e,t){t.dom=e.dom}function De(e,t){var n=t.text,r=e.dom;t.dom=r,e.text!==n&&(r.nodeValue=n)}function We(e,t,n,r,o,i,l,a){for(var s,u,c,d,f,p=e.length,h=t.length,m=p-1,v=h-1,y=0,g=0,b=null,k=null,w=null,x=null,S=0;m>=y&&v>=g&&(k=t[g],b=e[y],k.key===b.key);)xe(b,k,n,r,o,i,l,!1),g++,y++;for(;m>=y&&v>=g&&(w=t[v],x=e[m],w.key===x.key);)xe(x,w,n,r,o,i,l,!1),v--,m--;for(;m>=y&&v>=g&&(w=t[v],b=e[y],w.key===b.key);)c=h>v+1?t[v+1].dom:null,xe(b,w,n,r,o,i,l,!1),I(n,w.dom,c),v--,y++;for(;m>=y&&v>=g&&(k=t[g],x=e[m],k.key===x.key);)c=e[y].dom,xe(x,k,n,r,o,i,l,!1),I(n,k.dom,c),g++,m--;if(y>m){if(v>=g)for(c=h>v+1?t[v+1].dom:a&&a.pointer;v>=g;g++)I(n,ne(t[g],null,r,o,i,l),c)}else if(g>v)for(;m>=y;)Y(e[y++],n);else{var _=m-y+1,C=v-g+1,N=new Array(C);for(s=0;C>s;s++)N[s]=-1;var E=!1,O=0;if(16>=_*C)for(s=y;m>=s;s++){var j=!0;for(x=e[s],u=g;v>=u;u++)if(w=t[u],x.key===w.key){N[u-g]=s,S>u?E=!0:S=u,xe(x,w,n,r,o,i,l,!1),j=!1;break}j&&(Y(x,n),O++)}else{var M=new Map;for(s=g;v>=s;s++)f=t[s],M.set(f.key,s);for(s=m;s>=y;s--)x=e[s],u=M.get(x.key),void 0===u?(Y(x,n),O++):(w=t[u],N[u-g]=s,S>u?E=!0:S=u,xe(x,w,n,r,o,i,l,!1))}if(E){var T=Ae(N);for(u=T.length-1,s=C-1;s>=0;s--)-1===N[s]?(d=s+g,c=h>d+1?t[d+1].dom:a&&a.pointer,I(n,ne(t[d],null,r,o,i,l),c)):0>u||s!==T[u]?(d=s+g,c=h>d+1?t[d+1].dom:a&&a.pointer,I(n,t[d].dom,c)):u--}else if(_-O!==C)for(s=C-1;s>=0;s--)-1===N[s]&&(d=s+g,c=h>d+1?t[d+1].dom:a&&a.pointer,I(n,ne(t[d],null,r,o,i,l),c))}}function Ae(e){var t=e.slice(0),n=[];n.push(0);var r,o,i,l,a;for(r=0;r<e.length;r++)if(-1!==e[r])if(o=n[n.length-1],e[o]<e[r])t[r]=o,n.push(r);else{for(i=0,l=n.length-1;l>i;)a=(i+l)/2|0,e[n[a]]<e[r]?i=a+1:l=a;e[r]<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}for(i=n.length,l=n[i-1];i-- >0;)n[i]=l,l=t[l];return n}function Ie(){this._listeners=[],this.scrollX=null,this.scrollY=null,this.screenHeight=Nt,this.screenWidth=Ct}function Ve(e,t,n){t.addListener(function(){var r=n.getBoundingClientRect();null===t.scrollY&&t.refresh(),e.clipData={top:r.top+t.scrollY,left:r.left+t.scrollX,bottom:r.bottom+t.scrollY,right:r.right+t.scrollX,pending:!1}})}function Ke(e,t,n,r,o,i,l){var a=t[n.i];if(U(e)){var s=e.text;if(e.dom=a,3===a.nodeType&&""!==s)a.nodeValue=s;else{var u=ie(s);L(r,u,a),t.splice(t.indexOf(a),1,u),e.dom=u}}else if(D(e))e.dom=a;else if(W(e)){var c=e.items;e.dom=document.createDocumentFragment();for(var d=0;d<c.length;d++){var f=Ke(P(c,d),t,n,r,o,i,l);if(f)return!0}var p=t[n.i++];if(!p||3!==p.nodeType)return!0;e.pointer=p}else{var h=Le(e,a,r,o,i,l,!1);if(h)return!0}n.i++}function Ge(e){for(var t=[],n=e.childNodes,r=n.length,o=0;r>o;){var i=n[o];if(8===i.nodeType)if("!"===i.data){var l=document.createTextNode("");e.replaceChild(l,i),t.push(l),o++}else e.removeChild(i),r--;else t.push(i),o++}return t}function Re(e,n,o,a,s,u,c,d,f,p,h){if(o=t(s,o),!r(n)){var m=e.instance=n(o);return i(a)||(i(a.componentWillMount)||a.componentWillMount(null,o),i(a.componentDidMount)||d.addListener(function(){a.componentDidMount(u,o)})),Le(m,u,c,d,f,m,h)}var v=e.instance=new n(o);v._patch=ge,!i(p)&&o.ref&&he(p,o.ref,v);var y=v.getChildContext();i(y)||(f=Object.assign({},f,y)),v.context=f,v._unmounted=!1,v._parentNode=e,p&&(v._parentComponent=p),v._pendingSetState=!0,v.componentWillMount();var g=v.render();v._pendingSetState=!1,l(g)&&(g=j()),Le(g,u,c,d,f,v,h),v._lastNode=g,v.componentDidMount()}function Le(e,t,r,l,s,u,c){var d=e.bp,f=e.tag||d.tag;if(a(f))e.dom=t,Re(e,f,e.attrs||{},e.hooks,e.children,t,r,l,s,u,c);else if(1!==t.nodeType||f!==t.tagName.toLowerCase());else{e.dom=t;var p=e.hooks;(d&&d.hasHooks===!0||!i(p))&&Q(p,l,t);var h=e.children;if(!i(h))if(o(h))t.textContent!==h&&(t.textContent=h);else{var m=Ge(t),v={i:0},y=!1;if(n(h))for(var g=0;g<h.length&&!(y=Ke(P(h,g),m,v,t,l,s,u));g++);else y=1===m.length?Ke(h,m,v,t,l,s,u):!0}var b=e.className,k=e.style;if(i(b)||(t.className=b),i(k)||Ne(null,k,t),d&&d.hasAttrs===!0)se(e,d,t,u);else{var w=e.attrs;i(w)||(ae(e),ye(e,w,Object.keys(w),t,u))}if(d&&d.hasEvents===!0)ue(e,d,t);else{var x=e.events;i(x)||me(x,Object.keys(x),t)}}}function He(e,t,n){if(t&&1===t.nodeType){var r=t.querySelector("[data-infernoroot]");if(r&&r.parentNode===t)return Le(e,r,t,n,{},!0),!0}return t!==Mt?t.textContent="":console.warn('Inferno Warning: rendering to the "document.body" is dangerous! Use a dedicated container element instead.'),!1}function Pe(e){return Ut.get(e)||null}function Ye(e,t){var n=Tt.get(t),r=new Ie;if(p(n))l(e)||(He(e,t,r)||ne(e,t,r,{},null,!1),r.trigger(),Tt.set(t,{input:e}));else{var o=z(),i=ge(n.input,e,t,r,{},null,!1);r.trigger(),d(e)&&Tt.delete(t),n.input=i,$(o)}}function Xe(e,t){var r=null,o=null,l=null,u=null,c=null;if(!i(e)){if(n(e))return e;for(var d in e)"className"===d?u=e[d]:"style"===d?c=e[d]:h(d)&&!a(t)?(i(o)&&(o={}),o[d.substring(2).toLowerCase()]=e[d],delete e[d]):s(d)&&!a(t)?(i(r)&&(r={}),r[d.toLowerCase()]=e[d],delete e[d]):m(d)&&a(t)?(i(o)&&(o={}),o["c"+d.substring(3)]=e[d],delete e[d]):a(t)?l=e:(i(l)&&(l={}),l[d]=e[d])}return{attrs:l,events:r,className:u,style:c,hooks:o}}function qe(e){var t=e.tag,r=e.attrs,o=e.children,a=e.className,s=e.style,u=e.events,c=e.hooks;if(void 0===t&&!i(r)&&!r.tpl&&!i(o)&&0===o.length)return null;var d=i(r)||i(r.key)?void 0:r.key;i(o)||0!==o.length?l(o)||(o=ze(n(o)&&1===o.length?o[0]:o)):o=null,void 0!==d&&delete r.key;var f=Xe(r,t),p=_();return a=a||f.className,s=s||f.style,p.tag=t||null,p.attrs=f.attrs||null,p.events=f.events||u,p.hooks=f.hooks||c,p.children=void 0===o?null:o,p.key=void 0===d?null:d,p.className=void 0===a?null:a,p.style=void 0===s?null:s,p}function ze(e){var t=!i(e);if(t&&n(e)){for(var r=[],o=0;o<e.length;o++){var l=e[o];i(l)||"object"!=typeof l?r.push(l):n(l)?l.length>0?r.push(ze(l)):r.push(null):r.push(qe(l))}return r}return t&&"object"==typeof e&&void 0===e.dom?qe(e):e}function Fe(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return qe({tag:e,attrs:t,children:n})}function $e(){return document.activeElement}function Be(e){e!==document.body&&document.activeElement!==e&&e.focus()}function Ze(e,t,n){for(var r in t)e._pendingState[r]=t[r];if(e._pendingSetState){var o=e._pendingState,i=e.state;e.state=Object.assign({},i,o),e._pendingState={}}else e._pendingSetState=!0,Je(e,!1,n)}function Je(e,t,n){if(!e._deferSetState||t){e._pendingSetState=!1;var r=e._pendingState,o=e.state,l=Object.assign({},o,r);e._pendingState={};var a=e._updateComponent(o,l,e.props,e.props,t);a===vt?a=e._lastNode:i(a)&&(a=j());var s=e._lastNode,u=s.dom.parentNode,c=$e(),d=new Ie;e._patch(s,a,u,d,e.context,e,null),e._lastNode=a,e._componentToDOMNodeMap.set(e,a.dom),e._parentNode.dom=a.dom,d.trigger(),i(n)||n(),Be(c)}}function Qe(){}function et(e,t,n){for(var r in t)n!==!0&&i(t[r])||(e[r]=t[r]);return e}function tt(e){for(var t in e){var n=e[t];"function"!=typeof n||n.__bound||At.hasOwnProperty(t)||((e[t]=n.bind(e)).__bound=!0)}}function nt(e){function t(t){et(this,e),Wt.call(this,t),tt(this),this.getInitialState&&(this.state=this.getInitialState())}return Qe.prototype=Wt.prototype,t.prototype=new Qe,t.prototype.constructor=t,t.displayName=e.displayName||"Component",t}function rt(e){return(e+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function ot(e){return(e+"").replace(/&/g,"&").replace(/"/g,""")}function it(e){return e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function lt(e){return!!It[e]}function at(e,n,o,l,a){if(n=t(o,n),r(e)){var s=new e(n),u=s.getChildContext();i(u)||(l=Object.assign({},l,u)),s.context=l,s._pendingSetState=!0,s.componentWillMount();var c=s.render();return s._pendingSetState=!1,ct(c,l,a)}return ct(e(n),l,a)}function st(e,t){if(e&&n(e)){for(var r=[],i=!1,a=0;a<e.length;a++){var s=e[a],u=o(s),c=l(s);u||c?(i===!0&&(l(s)?r.push("<!--!-->"):r.push("<!---->")),u&&r.push(rt(s)),i=!0):n(s)?(r.push("<!---->"),r.push(st(s)),r.push("<!--!-->"),i=!0):(i=!1,r.push(ct(s,t,!1)))}return r.join("")}return l(e)?"":o(e)?rt(e):ct(e,t,!1)||""}function ut(e){if(o(e))return e;for(var t=[],n=Object.keys(e),r=0;r<n.length;r++){var l=n[r],a=e[l],s=c(a)&&!_t[l]?"px":"";i(a)||t.push(it(l)+":"+ot(a)+s+";")}return t.join()}function ct(e,t,n){if(!l(e)){var r=e.bp,s=e.tag||r&&r.tag,u=[],c=e.className,d=e.style;if(a(s))return at(s,e.attrs,e.children,t,n);i(c)||u.push('class="'+ot(c)+'"'),i(d)||u.push('style="'+ut(d)+'"');var p=e.attrs,h=p&&Object.keys(p)||[],m="";return r&&r.hasAttrs===!0&&(h=r.attrKeys=r.attrKeys?r.attrKeys.concat(h):h),h.forEach(function(e,t){var n=h[t],r=p[n];"dangerouslySetInnerHTML"===n?m=r.__html:o(r)?u.push(ot(n)+'="'+ot(r)+'"'):f(r)&&u.push(ot(n))}),n&&u.push("data-infernoroot"),lt(s)?"<"+s+(u.length>0?" "+u.join(" "):"")+">":"<"+s+(u.length>0?" "+u.join(" "):"")+">"+(m||st(e.children,t))+"</"+s+">"}}function dt(e){return ct(e,null,!1)}function ft(e){return ct(e,null,!0)}function pt(e,t){return t={exports:{}},e(t,t.exports),t.exports}function ht(e){return Ye(null,e),!0}function mt(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Fe.apply(void 0,[e.tag,Object.assign({},e.attrs||{},t||{},e.className?{className:e.className}:{},e.style?{style:e.style}:{},e.key?{key:e.key}:{},e.hooks||{},e.events||{})].concat(n))}var vt="NO_RENDER",yt="undefined"!=typeof window&&window.document,gt=!0;S.prototype={setAttrs:function(e){return this.attrs=e,this},setTag:function(e){return this.tag=e,this},setStyle:function(e){return this.style=e,this},setClassName:function(e){return this.className=e,this},setChildren:function(e){return this.children=e,this},setHooks:function(e){return this.hooks=e,this},setEvents:function(e){return this.events=e,this},setKey:function(e){return this.key=e,this}};var bt="http://www.w3.org/1999/xlink",kt="http://www.w3.org/XML/1998/namespace",wt={},xt={},St={},_t={};T("xlink:href,xlink:arcrole,xlink:actuate,xlink:role,xlink:titlef,xlink:type",St,bt),T("xml:base,xml:lang,xml:space",St,kt),T("volume,value",wt,!0),T("muted,scoped,loop,open,checked,default,capture,disabled,selected,readonly,multiple,required,autoplay,controls,seamless,reversed,allowfullscreen,novalidate",xt,!0),T("animationIterationCount,borderImageOutset,borderImageSlice,borderImageWidth,boxFlex,boxFlexGroup,boxOrdinalGroup,columnCount,flex,flexGrow,flexPositive,flexShrink,flexNegative,flexOrder,gridRow,gridColumn,fontWeight,lineClamp,lineHeight,opacity,order,orphans,tabSize,widows,zIndex,zoom,fillOpacity,floodOpacity,stopOpacity,strokeDasharray,strokeDashoffset,strokeMiterlimit,strokeOpacity,strokeWidth,",_t,!0);var Ct=yt&&window.screen.width,Nt=yt&&window.screen.height,Et=0,Ot=0,jt=0;yt&&(window.onscroll=function(){Et=window.scrollX,Ot=window.scrollY,jt=performance.now()},window.resize=function(){Et=window.scrollX,Ot=window.scrollY,Ct=window.screen.width,Nt=window.screen.height,jt=performance.now()}),Ie.prototype={refresh:function(){this.scrollX=yt&&window.scrollX,this.scrollY=yt&&window.scrollY},addListener:function(e){this._listeners.push(e)},trigger:function(){for(var e=this,t=0;t<this._listeners.length;t++)e._listeners[t]()}};var Mt=document.body,Tt=new Map,Ut=new Map,Dt="Inferno Error: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.",Wt=function(e){this.props=e||{},this.state={},this.refs={},this._blockSetState=!1,this._deferSetState=!1,this._pendingSetState=!1,this._pendingState={},this._parentNode=null,this._lastNode=null,this._unmounted=!0,this.context={},this._patch=null,this._parentComponent=null,this._componentToDOMNodeMap=null};Wt.prototype.render=function(){},Wt.prototype.forceUpdate=function(e){if(this._unmounted)throw Error(Dt);Je(this,!0,e)},Wt.prototype.setState=function(e,t){if(this._unmounted)throw Error(Dt);if(this._blockSetState!==!1)throw Error("Inferno Warning: Cannot update state via setState() in componentWillUpdate()");Ze(this,e,t)},Wt.prototype.componentDidMount=function(){},Wt.prototype.componentWillMount=function(){},Wt.prototype.componentWillUnmount=function(){},Wt.prototype.componentDidUpdate=function(){},Wt.prototype.shouldComponentUpdate=function(){return!0},Wt.prototype.componentWillReceiveProps=function(){},Wt.prototype.componentWillUpdate=function(){},Wt.prototype.getChildContext=function(){},Wt.prototype._updateComponent=function(e,t,n,r,o){if(this._unmounted===!0)return this._unmounted=!1,!1;if(!i(r)&&i(r.children)&&(r.children=n.children),n!==r||e!==t||o){n!==r&&(this._blockSetState=!0,this.componentWillReceiveProps(r),this._blockSetState=!1);var l=this.shouldComponentUpdate(r,t);if(l!==!1||o){this._blockSetState=!0,this.componentWillUpdate(r,t),this._blockSetState=!1,this.props=r,this.state=t;var a=this.render();return this.componentDidUpdate(n,e),a}}return vt};var At={constructor:1,render:1,shouldComponentUpdate:1,componentWillRecieveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},It={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Vt="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Kt=pt(function(e,t){!function(n,r){if("function"==typeof define&&define.amd)define("PropTypes",["exports","module"],r);else if("undefined"!=typeof t&&"undefined"!=typeof e)r(t,e);else{var o={exports:{}};r(o.exports,o),n.PropTypes=o.exports}}(Vt,function(e,t){function n(e){var t=e&&(x&&e[x]||e[S]);return"function"==typeof t?t:void 0}function r(e){function t(t,n,r,o,i,l){if(o=o||_,l=l||r,null==n[r]){var a=k[i];return t?new Error("Required "+a+" `"+l+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,i,l)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e){function t(t,n,r,o,i){var l=t[n],a=m(l);if(a!==e){var s=k[o],u=v(l);return new Error("Invalid "+s+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return r(t)}function i(){return r(w.thatReturns(null))}function l(e){function t(t,n,r,o,i){var l=t[n];if(!Array.isArray(l)){var a=k[o],s=m(l);return new Error("Invalid "+a+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var u=0;u<l.length;u++){var c=e(l,u,r,o,i+"["+u+"]");if(c instanceof Error)return c}return null}return r(t)}function a(){function e(e,t,n,r,o){if(!b.isValidElement(e[t])){var i=k[r];return new Error("Invalid "+i+" `"+o+"` supplied to "+("`"+n+"`, expected a single ReactElement."))}return null}return r(e)}function s(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var l=k[o],a=e.name||_,s=y(t[n]);return new Error("Invalid "+l+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+a+"`."))}return null}return r(t)}function u(e){function t(t,n,r,o,i){for(var l=t[n],a=0;a<e.length;a++)if(l===e[a])return null;var s=k[o],u=JSON.stringify(e);return new Error("Invalid "+s+" `"+i+"` of value `"+l+"` "+("supplied to `"+r+"`, expected one of "+u+"."))}return r(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function c(e){function t(t,n,r,o,i){var l=t[n],a=m(l);if("object"!==a){var s=k[o];return new Error("Invalid "+s+" `"+i+"` of type "+("`"+a+"` supplied to `"+r+"`, expected an object."))}for(var u in l)if(l.hasOwnProperty(u)){var c=e(l,u,r,o,i+"."+u);if(c instanceof Error)return c}return null}return r(t)}function d(e){function t(t,n,r,o,i){for(var l=0;l<e.length;l++){var a=e[l];if(null==a(t,n,r,o,i))return null}var s=k[o];return new Error("Invalid "+s+" `"+i+"` supplied to "+("`"+r+"`."))}return r(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOfType, expected an instance of array.")})}function f(){function e(e,t,n,r,o){if(!h(e[t])){var i=k[r];return new Error("Invalid "+i+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return r(e)}function p(e){function t(t,n,r,o,i){var l=t[n],a=m(l);if("object"!==a){var s=k[o];return new Error("Invalid "+s+" `"+i+"` of type `"+a+"` "+("supplied to `"+r+"`, expected `object`."))}for(var u in e){var c=e[u];if(c){var d=c(l,u,r,o,i+"."+u);if(d)return d}}return null}return r(t)}function h(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(h);if(null===e||b.isValidElement(e))return!0;var t=n(e);if(!t)return!1;var r,o=t.call(e);if(t!==e.entries){for(;!(r=o.next()).done;)if(!h(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!h(i[1]))return!1}return!0;default:return!1}}function m(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function v(e){var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){return e.constructor&&e.constructor.name?e.constructor.name:_}var g="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,b={};b.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===g};var k={prop:"prop",context:"context",childContext:"child context"},w={thatReturns:function(e){return function(){return e}}},x="function"==typeof Symbol&&Symbol.iterator,S="@@iterator",_="<<anonymous>>",C={ | ||
array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:i(),arrayOf:l,element:a(),instanceOf:s,node:f(),objectOf:c,oneOf:u,oneOfType:d,shape:p};t.exports=C})}),Gt=Kt&&"object"==typeof Kt&&"default"in Kt?Kt.default:Kt;Wt.prototype.isReactComponent={};var Rt={render:Ye,createElement:Fe,Component:Wt,unmountComponentAtNode:ht,cloneElement:mt,PropTypes:Gt,createClass:nt,findDOMNode:Pe,renderToString:dt,renderToStaticMarkup:ft};e.render=Ye,e.createElement=Fe,e.Component=Wt,e.unmountComponentAtNode=ht,e.cloneElement=mt,e.PropTypes=Gt,e.createClass=nt,e.findDOMNode=Pe,e.renderToString=dt,e.renderToStaticMarkup=ft,e.default=Rt,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.InfernoCompat=e.InfernoCompat||{})}(this,function(e){"use strict";function t(e,t){if(!i(e)){var r=n(e);(r&&e.length>0||!r)&&(t=t?Object.assign({},t,{children:e}):{children:e})}return t}function n(e){return e instanceof Array}function r(e){return void 0!==e.prototype.render}function o(e){return u(e)||c(e)}function i(e){return p(e)||d(e)}function l(e){return d(e)||e===!1||e===!0||p(e)}function a(e){return"function"==typeof e}function s(e){return"o"===e[0]&&"n"===e[1]&&e.length>3}function u(e){return"string"==typeof e}function c(e){return"number"==typeof e}function d(e){return null===e}function f(e){return e===!0}function p(e){return void 0===e}function h(e){return"onCreated"===e||"onAttached"===e||"onWillDetach"===e||"onWillUpdate"===e||"onDidUpdate"===e}function m(e){return"onComponentWillMount"===e||"onComponentDidMount"===e||"onComponentWillUnmount"===e||"onComponentShouldUpdate"===e||"onComponentWillUpdate"===e||"onComponentDidUpdate"===e}function v(e,t){if(!l(e))if(n(e))for(var r=0;r<e.length;r++){var o=e[r];if(!l(o)){if(o===t)return!0;if(o.children)return v(o.children,t)}}else{if(e===t)return!0;if(e.children)return v(e.children,t)}return!1}function y(e,t){var n=t.props.children;return v(n,e)?y(e,t._parentComponent):t}function g(e,t,n,r,o){if(void 0!==t){var l=e.key,a=null===l?t.pools.nonKeyed:t.pools.keyed[l];if(!i(a)){var s=a.pop();if(!i(s))return xe(s,e,null,n,r,o,!0,t.isSVG),e.dom}}return null}function b(e){var t=e.bp;if(!i(t)){var n=e.key,r=t.pools;if(null===n){var o=r.nonKeyed;o&&o.push(e)}else{var l=r.keyed;(l[n]||(l[n]=[])).push(e)}return!0}return!1}function k(e,t){K(e)?w(e,t,!0):R(e)&&x(e,t,!1)}function w(e,t,n){var r=e.items,o=r.length,i=r.pointer;if(o>0)for(var l=0;o>l;l++){var a=r[l];K(a)?w(a,t,!0):(t&&B(t,a.dom),k(a,null))}t&&n&&B(t,i)}function x(e,t,r){var o=e.instance,l=null,a=null;i(o)||(l=o.hooks,a=o.children,void 0!==o.render&&(o.componentWillUnmount(),o._unmounted=!0,It.delete(o),!r&&k(o._lastNode,null)));var s=e.hooks||l;i(s)||(i(s.willDetach)||s.willDetach(e.dom),i(s.componentWillUnmount)||s.componentWillUnmount(e.dom,s));var u=(i(o)?e.children:null)||a;if(!i(u))if(n(u))for(var c=0;c<u.length;c++)k(u[c],null);else k(u,null)}function C(e){this.bp=e,this.dom=null,this.instance=null,this.tag=null,this.children=null,this.style=null,this.className=null,this.attrs=null,this.events=null,this.hooks=null,this.key=null,this.clipData=null}function S(e){return new C(e)}function _(e){return"o"===e[0]&&"n"===e[1]&&e.length>3}function N(e){return"onCreated"===e||"onAttached"===e||"onWillDetach"===e||"onWillUpdate"===e||"onDidUpdate"===e}function E(e){return"onComponentWillMount"===e||"onComponentDidMount"===e||"onComponentWillUnmount"===e||"onComponentShouldUpdate"===e||"onComponentWillUpdate"===e||"onComponentDidUpdate"===e}function O(e,t){var n=e.tag||null,r=!(!n||void 0===n.arg),o=i(e.children)?null:e.children,l=!(!o||void 0===o.arg),a=e.attrs||null,s=!(!a||void 0===a.arg),u=e.hooks||null,c=!(!u||void 0===u.arg),d=e.events||null,f=!(!d||void 0===d.arg),p=void 0===e.key?null:e.key,h=!i(p)&&!i(p.arg),m=e.style||null,v=!(!m||void 0===m.arg),y=void 0===e.className?null:e.className,g=!(!y||void 0===y.arg),b=void 0===e.spread?null:e.spread,k=void 0!==e.spread,w={lazy:e.lazy||!1,dom:null,pools:{keyed:{},nonKeyed:[]},tag:r?null:n,className:""!==y&&y?y:null,style:""!==m&&m?m:null,isComponent:r,hasAttrs:s||!!a,hasHooks:c,hasEvents:f,hasStyle:v||!(""===m||!m),hasClassName:g||!(""===y||!y),childrenType:void 0===t?o?5:0:t,attrKeys:null,eventKeys:null,isSVG:e.isSVG||!1};return function(){var e=new C(w);if(r===!0&&(e.tag=arguments[n.arg]),l===!0&&(e.children=arguments[o.arg]),k){var t,i,x,S=arguments[b.arg],O=[],j=[];for(var U in S){var M=S[U];"className"===U||"class"===U&&!w.isSVG?(e.className=M,w.hasClassName=!0):"style"===U?(e.style=M,w.hasStyle=!0):"key"===U?e.key=M:N(U)||E(U)?(x||(x={}),x[U[2].toLowerCase()+U.substring(3)]=M):_(U)?(i||(i={}),j.push(U.toLowerCase()),i[U.toLowerCase()]=M):"children"===U?(e.children=M,w.childrenType=w.childrenType||5):(t||(t={}),O.push(U),t[U]=M)}t&&(e.attrs=t,w.attrKeys=O,w.hasAttrs=!0),i&&(e.events=i,w.eventKeys=j,w.hasEvents=!0),x&&(e.hooks=x,w.hasHooks=!0)}else s===!0?e.attrs=arguments[a.arg]:e.attrs=a,c===!0&&(e.hooks=arguments[u.arg]),f===!0&&(e.events=arguments[d.arg]),h===!0?e.key=arguments[p.arg]:e.key=p,v===!0?e.style=arguments[m.arg]:e.style=w.style,g===!0?e.className=arguments[y.arg]:e.className=w.className;return e}}function j(e){this.text=e,this.dom=null}function U(){this.placeholder=!0,this.dom=null}function M(e){this.dom=null,this.pointer=null,this.items=e}function T(e){return new j(e)}function D(){return new U}function W(e){return new M(e)}function A(e,t,n){e.split(",").forEach(function(e){return t[e]=n})}function I(e){return void 0!==e.text}function V(e){return e.placeholder===!0}function K(e){return void 0!==e.items}function R(e){return void 0!==e.tag||void 0!==e.bp}function G(e,t,n){i(n)?e.appendChild(t):e.insertBefore(t,n)}function L(e,t,n){var r=t.pointer;w(t,e,!1),z(e,n,r)}function H(e,t){var n;return n=t===!0?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}function P(e,t,n){if(null===t)return document.createTextNode(e);if(n){if(""!==e)return t.textContent=e,t.firstChild;var r=document.createTextNode("");return t.appendChild(r),r}var o=document.createTextNode(e);return t.appendChild(o),o}function Y(e,t,n,r,o,l,a){var s=null,u=e._lastNode;i(u)||(s=e,e=u),k(e,!1);var c=le(t,null,r,o,l,a);t.dom=c,z(n,c,e.dom),null!==s&&(s._lastNode=t)}function z(e,t,n){e.replaceChild(t,n)}function X(e){return o(e)?T(e):l(e)?D():n(e)?W(e):e}function q(e,t){var n=e[t];return e[t]=X(n)}function F(e,t){var n=e.dom;n===t?n.innerHTML="":(B(t,n),xt&&b(e)),k(e,!1)}function B(e,t){e.removeChild(t)}function $(e,t,n){for(var r=t||Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=null}}function Z(){return document.activeElement}function J(e,t){if(xt){var n=t.length;if(n>5)for(var r=0;n>r;r++){var o=t[r];l(o)||b(o)}}e.textContent=""}function Q(e){null!==e&&e!==document.body&&document.activeElement!==e&&e.focus()}function ee(e,t){return e.complex?!1:t.length&&!i(t[0])&&!i(t[0].key)&&e.length&&!i(e[0])&&!i(e[0].key)}function te(e,t){if("option"===e.tag){var n=e.attrs&&e.attrs.value;t[n]?(e.attrs=e.attrs||{},e.attrs.selected="selected",e.dom.selected=!0):e.dom.selected=!1}else for(var r=0,o=e.children.length;o>r;r++)te(e.children[r],t)}function ne(e){var t=e.attrs&&e.attrs.value,r={};if(n(t))for(var o=0,i=t.length;i>o;o++)r[t[o]]=t[o];else r[t]=t;for(var l=0,a=e.children.length;a>l;l++)te(e.children[l],r);e.attrs&&e.attrs[t]&&delete e.attrs.value}function re(e,t,n){i(e.created)||e.created(n),i(e.attached)||t.addListener(function(){e.attached(n)})}function oe(e){var t=e.attrs.value;i(t)||(e.dom.value=t)}function ie(e,t){if("input"===e){var n=t.attrs.type;if("text"===n)oe(t);else if("checkbox"===n||"radio"===n){var r=t.attrs.checked;t.dom.checked=!!r}}else"textarea"===e&&oe(t)}function le(e,t,n,r,o,i){return V(e)?ce(e,t):I(e)?ue(e,t):K(e)?se(e,t,n,r,o,i):R(e)?ae(e,t,n,r,o,i):void le(normalise(e),t,n,r,o,i)}function ae(e,t,n,r,o,i){var l=e.bp;if(p(l))return me(e,t,n,r,o,i);if(xt){var a=g(e,l,n,r,o);if(!d(a))return d(t)||t.appendChild(a),a}return he(e,l,t,n,r,o)}function se(e,t,n,r,o,i){var l=e.items,a=document.createTextNode(""),s=document.createDocumentFragment();return ve(l,s,n,r,o,i),e.pointer=a,e.dom=s,s.appendChild(a),t&&G(t,s),s}function ue(e,t){var n=document.createTextNode(e.text);return e.dom=n,t&&G(t,n),n}function ce(e,t){var n=document.createTextNode("");return e.dom=n,t&&G(t,n),n}function de(e){"select"===e.tag&&ne(e)}function fe(e,t,n,r){de(e);var o=e.attrs;if(d(t.attrKeys)){var i=Object.keys(o);t.attrKeys=t.attrKeys?t.attrKeys.concat(i):i}var l=t.attrKeys;we(e,o,l,n,r)}function pe(e,t,n){var r=e.events;d(t.eventKeys)&&(t.eventKeys=Object.keys(r));var o=t.eventKeys;be(r,o,n)}function he(e,t,n,r,o,i){var l=e.tag;if(f(t.isComponent))return ke(e,l,e.attrs||{},e.hooks,e.children,i,n,r,o);var a=H(t.tag,t.isSVG);e.dom=a,f(t.hasHooks)&&re(e.hooks,r,a),f(t.lazy)&&Le(e,r,a);var s=e.children;switch(t.childrenType){case 1:P(s,a,!0);break;case 2:le(e.children,a,r,o,i,t.isSVG);break;case 3:ve(s,a,r,o,i,t.isSVG);break;case 4:for(var u=0;u<s.length;u++)le(s[u],a,r,o,i,t.isSVG);break;case 5:ye(e,s,a,r,o,i,t.isSVG)}return f(t.hasAttrs)&&fe(e,t,a,i),f(t.hasClassName)&&(a.className=e.className),f(t.hasStyle)&&Ue(null,e.style,a),f(t.hasEvents)&&pe(e,t,a),d(n)||n.appendChild(a),a}function me(e,t,n,r,o,s){var c=e.tag;if(a(c))return ke(e,c,e.attrs||{},e.hooks,e.children,o,t,n,r);if(!u(c)||""===c)throw Error("Inferno Error: Expected function or string for element tag type");"svg"===c&&(s=!0);var f=H(c,s),p=e.children,h=e.attrs,m=e.events,v=e.hooks,y=e.className,g=e.style;return e.dom=f,i(v)||re(v,n,f),l(p)||ye(e,p,f,n,r,o,s),i(h)||(de(e),we(e,h,Object.keys(h),f,o)),i(y)||(f.className=y),i(g)||Ue(null,g,f),i(m)||be(m,Object.keys(m),f),d(t)||t.appendChild(f),f}function ve(e,t,n,r,o,i){e.complex=!1;for(var l=0;l<e.length;l++){var a=q(e,l);I(a)?(ue(a,t),e.complex=!0):V(a)?(ce(a,t),e.complex=!0):K(a)?(se(a,t,n,r,o,i),e.complex=!0):le(a,t,n,r,o,i)}}function ye(e,t,r,i,a,s,u){n(t)?ve(t,r,i,a,s,u):o(t)?P(t,r,!0):l(t)||le(t,r,i,a,s,u)}function ge(e,t,n){!l(e)&&u(t)&&(e.refs[t]=n)}function be(e,t,n){for(var r=0;r<t.length;r++){var o=t[r];n[o]=e[o]}}function ke(e,n,o,a,s,u,c,d,f){o=t(s,o);var p;if(r(n)){var h=new n(o);h._patch=xe,h._componentToDOMNodeMap=It,!i(u)&&o.ref&&ge(u,o.ref,h);var m=h.getChildContext();i(m)||(f=Object.assign({},f,m)),h.context=f,h._unmounted=!1,h._parentNode=e,u&&(h._parentComponent=u),h._pendingSetState=!0,h.componentWillMount();var v=h.render();l(v)&&(v=D()),h._pendingSetState=!1,p=le(v,null,d,f,h,!1),h._lastNode=v,h.componentDidMount(),null===c||l(p)||c.appendChild(p),It.set(h,p),e.dom=p,e.instance=h}else{i(a)||(i(a.componentWillMount)||a.componentWillMount(null,o),i(a.componentDidMount)||d.addListener(function(){a.componentDidMount(p,o)}));var y=n(o,f);l(y)&&(y=D()),p=le(y,null,d,f,null,!1),e.instance=y,null===c||l(p)||c.appendChild(p),e.dom=p}return p}function we(e,t,n,r,o){for(var i=0;i<n.length;i++){var l=n[i];"ref"===l?ge(y(e,o),t[l],r):Te(l,null,t[l],r)}}function xe(e,t,n,r,i,a,s){if(e!==t)if(l(e))le(t,n,r,i,a,s);else if(l(t))F(e,n);else if(o(e))if(o(t))n.firstChild.nodeValue=t;else{var u=le(t,null,r,i,a,s);t.dom=u,z(n,u,n.firstChild)}else if(o(t))z(n,document.createTextNode(t),e.dom);else if(K(t))K(e)?We(e,t,n,r,i,a,s):(z(n,se(t,null),e.dom),k(e,null));else if(K(e))L(n,e,le(t,null,r,i,a,s));else if(V(t))V(e)?Ie(e,t):(z(n,ce(t,null),e.dom),k(e,null));else if(V(e))z(n,le(t,null,r,i,a,s),e.dom);else if(I(t))I(e)?Ve(e,t):(z(n,ue(t,null),e.dom),k(e,null));else if(I(e))z(n,le(t,null,r,i,a,s),e.dom);else if(R(t))R(e)?Ne(e,t,n,r,i,a,s,!1):(z(n,mountVNode(t,null,r,i,a,s),e.dom),k(e,null));else{if(!R(e))return xe(e,normalise(t),parentDomdom,r,i,a,s);z(n,le(t,null,r,i,a,s),e.dom),k(e,null)}return t}function Ce(e,t,n){o(t)?e.firstChild.nodeValue=n:e.textContent=n}function Se(e,t,n,r){e&&(u(t)&&delete e.refs[t],u(n)&&(e.refs[n]=r))}function _e(e,t,r,i,a,s,u){var c=t.children,d=e.children;if(d!==c)if(l(d))o(c)?Ce(r,d,c):l(c)||(n(c)?ve(c,r,i,a,s,u):le(c,r,i,a,s,u));else if(l(c))J(r,d);else if(n(d))n(c)?(c.complex=d.complex,ee(d,c)?Ke(d,c,r,i,a,s,u,null):Ae(d,c,r,i,a,s,u,null)):Ae(d,[c],r,i,a,s,u,null);else if(n(c)){var f=d;o(d)&&(f=T(f),f.dom=r.firstChild),Ae([f],c,r,i,a,s,u,null)}else o(c)?Ce(r,d,c):o(d)?xe(d,c,r,i,a,s,u):Ne(d,c,r,i,a,s,u,!1)}function Ne(e,t,n,r,o,i,l,a){var s=e.bp,u=t.bp;void 0===s||void 0===u?Oe(e,t,n,r,o,i,l):Ee(e,t,s,u,n,r,o,i,a)}function Ee(e,t,n,o,a,s,u,c,d){var f;o.hasHooks===!0&&(f=t.hooks,f&&!i(f.willUpdate)&&f.willUpdate(e.dom));var p=t.tag||o.tag,h=e.tag||n.tag;if(h!==p)if(n.isComponent===!0){var m=e.instance;if(o.isComponent===!0)Y(e,t,a,s,u,c,!1);else if(r(h)){x(e,null,!0);var v=m._lastNode;Ee(v,t,v.bp,o,a,s,u,c,o.isSVG)}else x(e,null,!0),Ee(m,t,m.bp,o,a,s,u,c,o.isSVG)}else Y(e,t,a,s,u,c,o.isSVG);else if(i(h))t.dom=e.dom;else if(n.isComponent===!0){if(o.isComponent===!0){var y=e.instance;if(!i(y)&&y._unmounted){var g=ke(t,h,t.attrs||{},t.hooks,t.children,y,a,s,u);null!==a&&z(a,g,e.dom)}else t.instance=y,t.dom=e.dom,De(!0,t,t.tag,n,o,y,e.attrs||{},t.attrs||{},t.hooks,t.children,a,s,u)}}else{var b=e.dom,k=n.childrenType,w=o.childrenType;if(t.dom=b,o.lazy===!0&&d===!1){var C=e.clipData;if(null===s.scrollY&&s.refresh(),t.clipData=C,(C.pending===!0||C.top-s.scrollY>s.screenHeight)&&setClipNode(C,b,e,t,a,s,u,c,n.isSVG))return;if(C.bottom<s.scrollY&&setClipNode(C,b,e,t,a,s,u,c,n.isSVG))return}if(k>0||w>0)if(5===w||5===k)_e(e,t,b,s,u,c);else{var S=e.children,_=t.children;0===k||l(S)?w>2?ve(_,b,s,u,c):le(_,b,s,u,c):0===w||l(_)?k>2?J(b,S):F(S,b):S!==_&&(4===k&&4===w?Ke(S,_,b,s,u,c,o.isSVG,null):2===k&&2===w?xe(S,_,b,s,u,c,!0,o.isSVG):1===k&&1===w?Ce(b,S,_):_e(e,t,b,s,u,c,o.isSVG))}if(n.hasAttrs!==!0&&o.hasAttrs!==!0||je(e,t,n.attrKeys,o.attrKeys,b,c),n.hasEvents!==!0&&o.hasEvents!==!0||Me(e.events,t.events,n.eventKeys,o.eventKeys,b),n.hasClassName===!0||o.hasClassName===!0){var N=t.className;e.className!==N&&(i(N)?b.removeAttribute("class"):b.className=N)}if(n.hasStyle===!0||o.hasStyle===!0){var E=t.style,O=e.style;O!==E&&Ue(O,E,b)}o.hasHooks!==!0||i(f.didUpdate)||f.didUpdate(b),ie(p,t)}}function Oe(e,t,n,o,l,s,u){var c=t.hooks,d=!i(c);d&&!i(c.willUpdate)&&c.willUpdate(e.dom);var f=t.tag||(i(t.bp)?null:t.bp.tag),p=e.tag||(i(e.bp)?null:e.bp.tag);if("svg"===f&&(u=!0),p!==f){var h=e.instance;a(p)?a(f)?Y(e,t,n,o,l,s,u):r(p)?(x(e,null,!0),Oe(h._lastNode,t,n,o,l,s,u)):(x(e,null,!0),Oe(h,t,n,o,l,s,u)):Y(h||e,t,n,o,l,s,u)}else if(i(p))t.dom=e.dom;else if(a(p)){if(a(f)){var m=e._instance;if(!i(m)&&m._unmounted){var v=ke(t,p,t.attrs||{},t.hooks,t.children,m,n,o,l);null!==n&&z(n,v,e.dom)}else t.instance=e.instance,t.dom=e.dom,De(!1,t,t.tag,null,null,t.instance,e.attrs||{},t.attrs||{},t.hooks,t.children,n,o,l)}}else{var y=e.dom,g=t.className,b=t.style;t.dom=y,_e(e,t,y,o,l,s,u),je(e,t,null,null,y,s),Me(e.events,t.events,null,null,y),e.className!==g&&(i(g)?y.removeAttribute("class"):y.className=g),e.style!==b&&Ue(e.style,b,y),d&&!i(c.didUpdate)&&c.didUpdate(y),ie(f,t)}}function je(e,t,n,r,o,l){"select"===e.tag&&ne(t);var a=t.attrs,s=e.attrs,u=i(a),c=!i(s);if(!u)for(var d=r||Object.keys(a),f=d.length,p=0;f>p;p++){var h=d[p],m=c&&s[h],v=a[h];m!==v&&("ref"===h?Se(l,m,v,o):Te(h,m,v,o))}if(c)for(var y=n||Object.keys(s),g=y.length,b=0;g>b;b++){var k=y[b];(u||i(a[k]))&&("ref"===k?Se(getRefInstance(node,l),s[k],null,o):o.removeAttribute(k))}}function Ue(e,t,n){if(u(t))n.style.cssText=t;else if(i(e)){if(!i(t))for(var r=Object.keys(t),o=0;o<r.length;o++){var l=r[o],a=t[l];c(a)&&!Ot[l]?n.style[l]=a+"px":n.style[l]=a}}else if(i(t))n.removeAttribute("style");else{for(var s=Object.keys(t),d=0;d<s.length;d++){var f=s[d],p=t[f];c(p)&&!Ot[f]?n.style[f]=p+"px":n.style[f]=p}for(var h=Object.keys(e),m=0;m<h.length;m++){var v=h[m];i(t[v])&&(n.style[v]="")}}}function Me(e,t,n,r,o){var l=!i(t),a=!i(e);if(l)if(a){for(var s=r||Object.keys(t),u=0;u<s.length;u++){var c=s[u],d=e[c],f=t[c];d!==f&&(o[c]=f)}for(var p=n||Object.keys(e),h=0;h<p.length;h++){var m=p[h];i(t[m])&&(o[m]=null)}}else mountEvents(t,r,o);else a&&$(e,r,o)}function Te(e,t,n,r){if("dangerouslySetInnerHTML"===e){var o=t&&t.__html,l=n&&n.__html;if(i(l))throw new Error("Inferno Error: dangerouslySetInnerHTML requires an object with a __html propety containing the innerHTML content");o!==l&&(r.innerHTML=l)}else if(_t[e])r[e]=null===n?"":n;else if(Nt[e])r[e]=!!n;else{var a=Et[e];n===!1||i(n)?void 0!==a?r.removeAttributeNS(a,e):r.removeAttribute(e):void 0!==a?r.setAttributeNS(a,e,n===!0?e:n):r.setAttribute(e,n===!0?e:n)}}function De(e,n,o,a,s,u,c,d,f,p,h,m,v){if(d=t(p,d),r(o)){var y=u.props,g=u.state,b=u.state,k=u.getChildContext();i(k)||(v=Object.assign({},v,k)),u.context=v;var w=u._updateComponent(g,b,y,d);w===kt?w=u._lastNode:i(w)&&(w=D()),xe(u._lastNode,w,h,m,v,u,null,!1),n.dom=w.dom,u._lastNode=w,It.set(u,w.dom)}else{var x=!0,C=e&&s.hasHooks===!0||!i(f);if(C&&!i(f.componentShouldUpdate)&&(x=f.componentShouldUpdate(n.dom,c,d)),x!==!1){C&&!i(f.componentWillUpdate)&&f.componentWillUpdate(n.dom,c,d);var S=o(d,v);l(S)&&(S=D()),S.dom=n.dom,xe(u,S,h,m,v,null,null,!1),n.instance=S,C&&!i(f.componentDidUpdate)&&f.componentDidUpdate(n.dom,c,d)}}}function We(e,t,n,r,o,i,l){var a=e.items,s=t.items,u=e.pointer;t.dom=e.dom,t.pointer=u,!a!==s&&(ee(a,s)?Ke(a,s,n,r,o,i,l,t):Ae(a,s,n,r,o,i,l,t))}function Ae(e,t,n,r,o,i,l,a){for(var s=e.length,u=t.length,c=s>u?u:s,d=0;c>d;d++){var f=e[d],p=q(t,d);xe(f,p,n,r,o,i,l)}if(u>s)for(d=c;u>d;d++){var h=q(t,d);G(n,le(h,null,r,o,i,l),a&&a.pointer)}else if(s>u)for(d=c;s>d;d++)F(e[d],n)}function Ie(e,t){t.dom=e.dom}function Ve(e,t){var n=t.text,r=e.dom;t.dom=r,e.text!==n&&(r.nodeValue=n)}function Ke(e,t,n,r,o,i,l,a){for(var s,u,c,d,f,p=e.length,h=t.length,m=p-1,v=h-1,y=0,g=0,b=null,k=null,w=null,x=null,C=0;m>=y&&v>=g&&(k=t[g],b=e[y],k.key===b.key);)Ne(b,k,n,r,o,i,l,!1),g++,y++;for(;m>=y&&v>=g&&(w=t[v],x=e[m],w.key===x.key);)Ne(x,w,n,r,o,i,l,!1),v--,m--;for(;m>=y&&v>=g&&(w=t[v],b=e[y],w.key===b.key);)c=h>v+1?t[v+1].dom:null,Ne(b,w,n,r,o,i,l,!1),G(n,w.dom,c),v--,y++;for(;m>=y&&v>=g&&(k=t[g],x=e[m],k.key===x.key);)c=e[y].dom,Ne(x,k,n,r,o,i,l,!1),G(n,k.dom,c),g++,m--;if(y>m){if(v>=g)for(c=h>v+1?t[v+1].dom:a&&a.pointer;v>=g;g++)G(n,le(t[g],null,r,o,i,l),c)}else if(g>v)for(;m>=y;)F(e[y++],n);else{var S=m-y+1,_=v-g+1,N=new Array(_);for(s=0;_>s;s++)N[s]=-1;var E=!1,O=0;if(16>=S*_)for(s=y;m>=s;s++){var j=!0;for(x=e[s],u=g;v>=u;u++)if(w=t[u],x.key===w.key){N[u-g]=s,C>u?E=!0:C=u,Ne(x,w,n,r,o,i,l,!1),j=!1;break}j&&(F(x,n),O++)}else{var U=new Map;for(s=g;v>=s;s++)f=t[s],U.set(f.key,s);for(s=m;s>=y;s--)x=e[s],u=U.get(x.key),void 0===u?(F(x,n),O++):(w=t[u],N[u-g]=s,C>u?E=!0:C=u,Ne(x,w,n,r,o,i,l,!1))}if(E){var M=Re(N);for(u=M.length-1,s=_-1;s>=0;s--)-1===N[s]?(d=s+g,c=h>d+1?t[d+1].dom:a&&a.pointer,G(n,le(t[d],null,r,o,i,l),c)):0>u||s!==M[u]?(d=s+g,c=h>d+1?t[d+1].dom:a&&a.pointer,G(n,t[d].dom,c)):u--}else if(S-O!==_)for(s=_-1;s>=0;s--)-1===N[s]&&(d=s+g,c=h>d+1?t[d+1].dom:a&&a.pointer,G(n,le(t[d],null,r,o,i,l),c))}}function Re(e){var t=e.slice(0),n=[];n.push(0);var r,o,i,l,a;for(r=0;r<e.length;r++)if(-1!==e[r])if(o=n[n.length-1],e[o]<e[r])t[r]=o,n.push(r);else{for(i=0,l=n.length-1;l>i;)a=(i+l)/2|0,e[n[a]]<e[r]?i=a+1:l=a;e[r]<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}for(i=n.length,l=n[i-1];i-- >0;)n[i]=l,l=t[l];return n}function Ge(){this._listeners=[],this.scrollX=null,this.scrollY=null,this.screenHeight=Ut,this.screenWidth=jt}function Le(e,t,n){t.addListener(function(){var r=n.getBoundingClientRect();null===t.scrollY&&t.refresh(),e.clipData={top:r.top+t.scrollY,left:r.left+t.scrollX,bottom:r.bottom+t.scrollY,right:r.right+t.scrollX,pending:!1}})}function He(e,t,n,r,o,i,l){var a=t[n.i];if(I(e)){var s=e.text;if(e.dom=a,3===a.nodeType&&""!==s)a.nodeValue=s;else{var u=ue(s);z(r,u,a),t.splice(t.indexOf(a),1,u),e.dom=u}}else if(V(e))e.dom=a;else if(K(e)){var c=e.items;e.dom=document.createDocumentFragment();for(var d=0;d<c.length;d++){var f=He(q(c,d),t,n,r,o,i,l);if(f)return!0}var p=t[n.i++];if(!p||3!==p.nodeType)return!0;e.pointer=p}else{var h=ze(e,a,r,o,i,l,!1);if(h)return!0}n.i++}function Pe(e){for(var t=[],n=e.childNodes,r=n.length,o=0;r>o;){var i=n[o];if(8===i.nodeType)if("!"===i.data){var l=document.createTextNode("");e.replaceChild(l,i),t.push(l),o++}else e.removeChild(i),r--;else t.push(i),o++}return t}function Ye(e,n,o,a,s,u,c,d,f,p,h){if(o=t(s,o),!r(n)){var m=e.instance=n(o);return i(a)||(i(a.componentWillMount)||a.componentWillMount(null,o),i(a.componentDidMount)||d.addListener(function(){a.componentDidMount(u,o)})),ze(m,u,c,d,f,m,h)}var v=e.instance=new n(o);v._patch=xe,!i(p)&&o.ref&&ge(p,o.ref,v);var y=v.getChildContext();i(y)||(f=Object.assign({},f,y)),v.context=f,v._unmounted=!1,v._parentNode=e,p&&(v._parentComponent=p),v._pendingSetState=!0,v.componentWillMount();var g=v.render();v._pendingSetState=!1,l(g)&&(g=D()),ze(g,u,c,d,f,v,h),v._lastNode=g,v.componentDidMount()}function ze(e,t,r,l,s,u,c){var d=e.bp,f=e.tag||d.tag;if(a(f))e.dom=t,Ye(e,f,e.attrs||{},e.hooks,e.children,t,r,l,s,u,c);else if(1!==t.nodeType||f!==t.tagName.toLowerCase());else{e.dom=t;var p=e.hooks;(d&&d.hasHooks===!0||!i(p))&&re(p,l,t);var h=e.children;if(!i(h))if(o(h))t.textContent!==h&&(t.textContent=h);else{var m=Pe(t),v={i:0},y=!1;if(n(h))for(var g=0;g<h.length&&!(y=He(q(h,g),m,v,t,l,s,u));g++);else y=1===m.length?He(h,m,v,t,l,s,u):!0}var b=e.className,k=e.style;if(i(b)||(t.className=b),i(k)||Ue(null,k,t),d&&d.hasAttrs===!0)fe(e,d,t,u);else{var w=e.attrs;i(w)||(de(e),we(e,w,Object.keys(w),t,u))}if(d&&d.hasEvents===!0)pe(e,d,t);else{var x=e.events;i(x)||be(x,Object.keys(x),t)}}}function Xe(e,t,n){if(t&&1===t.nodeType){var r=t.querySelector("[data-infernoroot]");if(r&&r.parentNode===t)return ze(e,r,t,n,{},!0),!0}return t!==Wt?t.textContent="":console.warn('Inferno Warning: rendering to the "document.body" is dangerous! Use a dedicated container element instead.'),!1}function qe(e){return It.get(e)||null}function Fe(e,t){var n=At.get(t),r=new Ge;if(p(n))l(e)||(Xe(e,t,r)||le(e,t,r,{},null,!1),r.trigger(),At.set(t,{input:e}));else{var o=Z(),i=xe(n.input,e,t,r,{},null,!1);r.trigger(),d(e)&&At.delete(t),n.input=i,Q(o)}}function Be(e,t){var r=null,o=null,l=null,u=null,c=null;if(!i(e)){if(n(e))return e;for(var d in e)"className"===d?u=e[d]:"style"===d?c=e[d]:h(d)&&!a(t)?(i(o)&&(o={}),o[d.substring(2).toLowerCase()]=e[d],delete e[d]):s(d)&&!a(t)?(i(r)&&(r={}),r[d.toLowerCase()]=e[d],delete e[d]):m(d)&&a(t)?(i(o)&&(o={}),o["c"+d.substring(3)]=e[d],delete e[d]):a(t)?l=e:(i(l)&&(l={}),l[d]=e[d])}return{attrs:l,events:r,className:u,style:c,hooks:o}}function $e(e){var t=e.tag,r=e.attrs,o=e.children,a=e.className,s=e.style,u=e.events,c=e.hooks;if(void 0===t&&!i(r)&&!r.tpl&&!i(o)&&0===o.length)return null;var d=i(r)||i(r.key)?void 0:r.key;i(o)||0!==o.length?l(o)||(o=Ze(n(o)&&1===o.length?o[0]:o)):o=null,void 0!==d&&delete r.key;var f=Be(r,t),p=S();return a=a||f.className,s=s||f.style,p.tag=t||null,p.attrs=f.attrs||null,p.events=f.events||u,p.hooks=f.hooks||c,p.children=void 0===o?null:o,p.key=void 0===d?null:d,p.className=void 0===a?null:a,p.style=void 0===s?null:s,p}function Ze(e){var t=!i(e);if(t&&n(e)){for(var r=[],o=0;o<e.length;o++){var l=e[o];i(l)||"object"!=typeof l?r.push(l):n(l)?l.length>0?r.push(Ze(l)):r.push(null):r.push($e(l))}return r}return t&&"object"==typeof e&&void 0===e.dom?$e(e):e}function Je(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return $e({tag:e,attrs:t,children:n})}function Qe(){return document.activeElement}function et(e){e!==document.body&&document.activeElement!==e&&e.focus()}function tt(e,t,n){for(var r in t)e._pendingState[r]=t[r];e._pendingSetState?(e.state=Object.assign({},e.state,e._pendingState),e._pendingState={}):(e._pendingSetState=!0,nt(e,!1,n))}function nt(e,t,n){if((!e._deferSetState||t)&&!e._blockRender){e._pendingSetState=!1;var r=e._pendingState,o=e.state,l=Object.assign({},o,r);e._pendingState={};var a=e._updateComponent(o,l,e.props,e.props,t);a===kt?a=e._lastNode:i(a)&&(a=D());var s=e._lastNode,u=s.dom.parentNode,c=Qe(),d=new Ge;e._patch(s,a,u,d,e.context,e,null),e._lastNode=a,e._componentToDOMNodeMap.set(e,a.dom),e._parentNode.dom=a.dom,d.trigger(),i(n)||n(),et(c)}}function rt(){}function ot(e,t,n){for(var r in t)n!==!0&&i(t[r])||(e[r]=t[r]);return e}function it(e){for(var t in e){var n=e[t];"function"!=typeof n||n.__bound||Rt.hasOwnProperty(t)||((e[t]=n.bind(e)).__bound=!0)}}function lt(e){function t(t){ot(this,e),Kt.call(this,t),it(this),this.getInitialState&&(this.state=this.getInitialState())}return rt.prototype=Kt.prototype,t.prototype=new rt,t.prototype.constructor=t,t.displayName=e.displayName||"Component",t}function at(e){return(e+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function st(e){return(e+"").replace(/&/g,"&").replace(/"/g,""")}function ut(e){return e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function ct(e){return!!Gt[e]}function dt(e,n,o,l,a){if(n=t(o,n),r(e)){var s=new e(n),u=s.getChildContext();i(u)||(l=Object.assign({},l,u)),s.context=l,s._pendingSetState=!0,s.componentWillMount();var c=s.render();return s._pendingSetState=!1,ht(c,l,a)}return ht(e(n),l,a)}function ft(e,t){if(e&&n(e)){for(var r=[],i=!1,a=0;a<e.length;a++){var s=e[a],u=o(s),c=l(s);u||c?(i===!0&&(l(s)?r.push("<!--!-->"):r.push("<!---->")),u&&r.push(at(s)),i=!0):n(s)?(r.push("<!---->"),r.push(ft(s)),r.push("<!--!-->"),i=!0):(i=!1,r.push(ht(s,t,!1)))}return r.join("")}return l(e)?"":o(e)?at(e):ht(e,t,!1)||""}function pt(e){if(o(e))return e;for(var t=[],n=Object.keys(e),r=0;r<n.length;r++){var l=n[r],a=e[l],s=c(a)&&!Ot[l]?"px":"";i(a)||t.push(ut(l)+":"+st(a)+s+";")}return t.join()}function ht(e,t,n){if(!l(e)){var r=e.bp,s=e.tag||r&&r.tag,u=[],c=e.className,d=e.style;if(a(s))return dt(s,e.attrs,e.children,t,n);i(c)||u.push('class="'+st(c)+'"'),i(d)||u.push('style="'+pt(d)+'"');var p=e.attrs,h=p&&Object.keys(p)||[],m="";return r&&r.hasAttrs===!0&&(h=r.attrKeys=r.attrKeys?r.attrKeys.concat(h):h),h.forEach(function(e,t){var n=h[t],r=p[n];"dangerouslySetInnerHTML"===n?m=r.__html:o(r)?u.push(st(n)+'="'+st(r)+'"'):f(r)&&u.push(st(n))}),n&&u.push("data-infernoroot"),ct(s)?"<"+s+(u.length>0?" "+u.join(" "):"")+">":"<"+s+(u.length>0?" "+u.join(" "):"")+">"+(m||ft(e.children,t))+"</"+s+">"}}function mt(e){return ht(e,null,!1)}function vt(e){return ht(e,null,!0)}function yt(e,t){return t={exports:{}},e(t,t.exports),t.exports}function gt(e){return Fe(null,e),!0}function bt(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Je.apply(void 0,[e.tag,Object.assign({},e.attrs||{},t||{},e.className?{className:e.className}:{},e.style?{style:e.style}:{},e.key?{key:e.key}:{},e.hooks||{},e.events||{})].concat(n))}var kt="NO_RENDER",wt="undefined"!=typeof window&&window.document,xt=!0;C.prototype={setAttrs:function(e){return this.attrs=e,this},setTag:function(e){return this.tag=e,this},setStyle:function(e){return this.style=e,this},setClassName:function(e){return this.className=e,this},setChildren:function(e){return this.children=e,this},setHooks:function(e){return this.hooks=e,this},setEvents:function(e){return this.events=e,this},setKey:function(e){return this.key=e,this}};var Ct="http://www.w3.org/1999/xlink",St="http://www.w3.org/XML/1998/namespace",_t={},Nt={},Et={},Ot={};A("xlink:href,xlink:arcrole,xlink:actuate,xlink:role,xlink:titlef,xlink:type",Et,Ct),A("xml:base,xml:lang,xml:space",Et,St),A("volume,value",_t,!0),A("muted,scoped,loop,open,checked,default,capture,disabled,selected,readonly,multiple,required,autoplay,controls,seamless,reversed,allowfullscreen,novalidate",Nt,!0),A("animationIterationCount,borderImageOutset,borderImageSlice,borderImageWidth,boxFlex,boxFlexGroup,boxOrdinalGroup,columnCount,flex,flexGrow,flexPositive,flexShrink,flexNegative,flexOrder,gridRow,gridColumn,fontWeight,lineClamp,lineHeight,opacity,order,orphans,tabSize,widows,zIndex,zoom,fillOpacity,floodOpacity,stopOpacity,strokeDasharray,strokeDashoffset,strokeMiterlimit,strokeOpacity,strokeWidth,",Ot,!0);var jt=wt&&window.screen.width,Ut=wt&&window.screen.height,Mt=0,Tt=0,Dt=0;wt&&(window.onscroll=function(){Mt=window.scrollX,Tt=window.scrollY,Dt=performance.now()},window.resize=function(){Mt=window.scrollX,Tt=window.scrollY,jt=window.screen.width,Ut=window.screen.height,Dt=performance.now()}),Ge.prototype={refresh:function(){this.scrollX=wt&&window.scrollX,this.scrollY=wt&&window.scrollY},addListener:function(e){this._listeners.push(e)},trigger:function(){for(var e=this,t=0;t<this._listeners.length;t++)e._listeners[t]()}};var Wt=document.body,At=new Map,It=new Map,Vt="Inferno Error: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.",Kt=function(e){this.props=e||{},this.state={},this.refs={},this._blockRender=!1,this._blockSetState=!1,this._deferSetState=!1,this._pendingSetState=!1,this._pendingState={},this._parentNode=null,this._lastNode=null,this._unmounted=!0,this.context={},this._patch=null,this._parentComponent=null,this._componentToDOMNodeMap=null};Kt.prototype.render=function(){},Kt.prototype.forceUpdate=function(e){if(this._unmounted)throw Error(Vt);nt(this,!0,e)},Kt.prototype.setState=function(e,t){if(this._unmounted)throw Error(Vt);if(this._blockSetState!==!1)throw Error("Inferno Warning: Cannot update state via setState() in componentWillUpdate()");tt(this,e,t)},Kt.prototype.componentDidMount=function(){},Kt.prototype.componentWillMount=function(){},Kt.prototype.componentWillUnmount=function(){},Kt.prototype.componentDidUpdate=function(){},Kt.prototype.shouldComponentUpdate=function(){return!0},Kt.prototype.componentWillReceiveProps=function(){},Kt.prototype.componentWillUpdate=function(){},Kt.prototype.getChildContext=function(){},Kt.prototype._updateComponent=function(e,t,n,r,o){if(this._unmounted===!0)return this._unmounted=!1,!1;if(!i(r)&&i(r.children)&&(r.children=n.children),n!==r||e!==t||o){n!==r&&(this._blockRender=!0,this.componentWillReceiveProps(r),this._blockRender=!1,this._pendingSetState&&(t=Object.assign({},t,this._pendingState),this._pendingSetState=!1,this._pendingState={}));var l=this.shouldComponentUpdate(r,t);if(l!==!1||o){this._blockSetState=!0,this.componentWillUpdate(r,t),this._blockSetState=!1,this.props=r,this.state=t;var a=this.render();return this.componentDidUpdate(n,e),a}}return kt};var Rt={constructor:1,render:1,shouldComponentUpdate:1,componentWillRecieveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},Gt={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Lt="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Ht=yt(function(e,t){!function(n,r){if("function"==typeof define&&define.amd)define("PropTypes",["exports","module"],r);else if("undefined"!=typeof t&&"undefined"!=typeof e)r(t,e);else{var o={exports:{}};r(o.exports,o),n.PropTypes=o.exports}}(Lt,function(e,t){function n(e){var t=e&&(x&&e[x]||e[C]);return"function"==typeof t?t:void 0}function r(e){function t(t,n,r,o,i,l){if(o=o||S,l=l||r,null==n[r]){var a=k[i];return t?new Error("Required "+a+" `"+l+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,i,l)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e){function t(t,n,r,o,i){var l=t[n],a=m(l);if(a!==e){var s=k[o],u=v(l);return new Error("Invalid "+s+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return r(t)}function i(){return r(w.thatReturns(null))}function l(e){function t(t,n,r,o,i){var l=t[n];if(!Array.isArray(l)){var a=k[o],s=m(l);return new Error("Invalid "+a+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var u=0;u<l.length;u++){var c=e(l,u,r,o,i+"["+u+"]");if(c instanceof Error)return c}return null}return r(t)}function a(){function e(e,t,n,r,o){if(!b.isValidElement(e[t])){var i=k[r];return new Error("Invalid "+i+" `"+o+"` supplied to "+("`"+n+"`, expected a single ReactElement."))}return null}return r(e)}function s(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var l=k[o],a=e.name||S,s=y(t[n]);return new Error("Invalid "+l+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+a+"`."))}return null}return r(t)}function u(e){function t(t,n,r,o,i){for(var l=t[n],a=0;a<e.length;a++)if(l===e[a])return null;var s=k[o],u=JSON.stringify(e);return new Error("Invalid "+s+" `"+i+"` of value `"+l+"` "+("supplied to `"+r+"`, expected one of "+u+"."))}return r(Array.isArray(e)?t:function(){ | ||
return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function c(e){function t(t,n,r,o,i){var l=t[n],a=m(l);if("object"!==a){var s=k[o];return new Error("Invalid "+s+" `"+i+"` of type "+("`"+a+"` supplied to `"+r+"`, expected an object."))}for(var u in l)if(l.hasOwnProperty(u)){var c=e(l,u,r,o,i+"."+u);if(c instanceof Error)return c}return null}return r(t)}function d(e){function t(t,n,r,o,i){for(var l=0;l<e.length;l++){var a=e[l];if(null==a(t,n,r,o,i))return null}var s=k[o];return new Error("Invalid "+s+" `"+i+"` supplied to "+("`"+r+"`."))}return r(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOfType, expected an instance of array.")})}function f(){function e(e,t,n,r,o){if(!h(e[t])){var i=k[r];return new Error("Invalid "+i+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return r(e)}function p(e){function t(t,n,r,o,i){var l=t[n],a=m(l);if("object"!==a){var s=k[o];return new Error("Invalid "+s+" `"+i+"` of type `"+a+"` "+("supplied to `"+r+"`, expected `object`."))}for(var u in e){var c=e[u];if(c){var d=c(l,u,r,o,i+"."+u);if(d)return d}}return null}return r(t)}function h(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(h);if(null===e||b.isValidElement(e))return!0;var t=n(e);if(!t)return!1;var r,o=t.call(e);if(t!==e.entries){for(;!(r=o.next()).done;)if(!h(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!h(i[1]))return!1}return!0;default:return!1}}function m(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function v(e){var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){return e.constructor&&e.constructor.name?e.constructor.name:S}var g="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,b={};b.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===g};var k={prop:"prop",context:"context",childContext:"child context"},w={thatReturns:function(e){return function(){return e}}},x="function"==typeof Symbol&&Symbol.iterator,C="@@iterator",S="<<anonymous>>",_={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:i(),arrayOf:l,element:a(),instanceOf:s,node:f(),objectOf:c,oneOf:u,oneOfType:d,shape:p};t.exports=_})}),Pt=Ht&&"object"==typeof Ht&&"default"in Ht?Ht.default:Ht;Kt.prototype.isReactComponent={};var Yt={render:Fe,createElement:Je,Component:Kt,unmountComponentAtNode:gt,cloneElement:bt,PropTypes:Pt,createClass:lt,findDOMNode:qe,renderToString:mt,renderToStaticMarkup:vt,createBlueprint:O,createVNode:S};e.render=Fe,e.createElement=Je,e.Component=Kt,e.unmountComponentAtNode=gt,e.cloneElement=bt,e.PropTypes=Pt,e.createClass=lt,e.findDOMNode=qe,e.renderToString=mt,e.renderToStaticMarkup=vt,e.createBlueprint=O,e.createVNode=S,e.default=Yt,Object.defineProperty(e,"__esModule",{value:!0})}); |
/*! | ||
* inferno-component v0.7.15 | ||
* inferno-component v0.7.16 | ||
* (c) 2016 Dominic Gannaway | ||
@@ -125,6 +125,3 @@ * Released under the MIT License. | ||
} else { | ||
var pendingState = component._pendingState; | ||
var oldState = component.state; | ||
component.state = Object.assign({}, oldState, pendingState); | ||
component.state = Object.assign({}, component.state, component._pendingState); | ||
component._pendingState = {}; | ||
@@ -135,3 +132,3 @@ } | ||
function applyState(component, force, callback) { | ||
if (!component._deferSetState || force) { | ||
if ((!component._deferSetState || force) && !component._blockRender) { | ||
component._pendingSetState = false; | ||
@@ -177,2 +174,3 @@ var pendingState = component._pendingState; | ||
this.refs = {}; | ||
this._blockRender = false; | ||
this._blockSetState = false; | ||
@@ -247,5 +245,10 @@ this._deferSetState = false; | ||
if (prevProps !== nextProps) { | ||
this._blockSetState = true; | ||
this._blockRender = true; | ||
this.componentWillReceiveProps(nextProps); | ||
this._blockSetState = false; | ||
this._blockRender = false; | ||
if (this._pendingSetState) { | ||
nextState = Object.assign({}, nextState, this._pendingState); | ||
this._pendingSetState = false; | ||
this._pendingState = {}; | ||
} | ||
} | ||
@@ -252,0 +255,0 @@ var shouldUpdate = this.shouldComponentUpdate(nextProps, nextState); |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.InfernoComponent=e()}(this,function(){"use strict";function t(t){return n(t)||e(t)}function e(t){return null===t}function n(t){return void 0===t}function o(){this.placeholder=!0,this.dom=null}function i(){return new o}function r(t,e,n){t.split(",").forEach(function(t){return e[t]=n})}function l(){this._listeners=[],this.scrollX=null,this.scrollY=null,this.screenHeight=y,this.screenWidth=g}function s(){return document.activeElement}function a(t){t!==document.body&&document.activeElement!==t&&t.focus()}function p(t,e,n){for(var o in e)t._pendingState[o]=e[o];if(t._pendingSetState){var i=t._pendingState,r=t.state;t.state=Object.assign({},r,i),t._pendingState={}}else t._pendingSetState=!0,d(t,!1,n)}function d(e,n,o){if(!e._deferSetState||n){e._pendingSetState=!1;var r=e._pendingState,p=e.state,d=Object.assign({},p,r);e._pendingState={};var u=e._updateComponent(p,d,e.props,e.props,n);u===c?u=e._lastNode:t(u)&&(u=i());var h=e._lastNode,f=h.dom.parentNode,m=s(),w=new l;e._patch(h,u,f,w,e.context,e,null),e._lastNode=u,e._componentToDOMNodeMap.set(e,u.dom),e._parentNode.dom=u.dom,w.trigger(),t(o)||o(),a(m)}}var c="NO_RENDER",u="undefined"!=typeof window&&window.document,h="http://www.w3.org/1999/xlink",f="http://www.w3.org/XML/1998/namespace",m={},w={},_={},S={};r("xlink:href,xlink:arcrole,xlink:actuate,xlink:role,xlink:titlef,xlink:type",_,h),r("xml:base,xml:lang,xml:space",_,f),r("volume,value",m,!0),r("muted,scoped,loop,open,checked,default,capture,disabled,selected,readonly,multiple,required,autoplay,controls,seamless,reversed,allowfullscreen,novalidate",w,!0),r("animationIterationCount,borderImageOutset,borderImageSlice,borderImageWidth,boxFlex,boxFlexGroup,boxOrdinalGroup,columnCount,flex,flexGrow,flexPositive,flexShrink,flexNegative,flexOrder,gridRow,gridColumn,fontWeight,lineClamp,lineHeight,opacity,order,orphans,tabSize,widows,zIndex,zoom,fillOpacity,floodOpacity,stopOpacity,strokeDasharray,strokeDashoffset,strokeMiterlimit,strokeOpacity,strokeWidth,",S,!0);var g=u&&window.screen.width,y=u&&window.screen.height,x=0,v=0,k=0;u&&(window.onscroll=function(){x=window.scrollX,v=window.scrollY,k=performance.now()},window.resize=function(){x=window.scrollX,v=window.scrollY,g=window.screen.width,y=window.screen.height,k=performance.now()}),l.prototype={refresh:function(){this.scrollX=u&&window.scrollX,this.scrollY=u&&window.scrollY},addListener:function(t){this._listeners.push(t)},trigger:function(){for(var t=this,e=0;e<this._listeners.length;e++)t._listeners[e]()}};var b="Inferno Error: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.",C=function(t){this.props=t||{},this.state={},this.refs={},this._blockSetState=!1,this._deferSetState=!1,this._pendingSetState=!1,this._pendingState={},this._parentNode=null,this._lastNode=null,this._unmounted=!0,this.context={},this._patch=null,this._parentComponent=null,this._componentToDOMNodeMap=null};return C.prototype.render=function(){},C.prototype.forceUpdate=function(t){if(this._unmounted)throw Error(b);d(this,!0,t)},C.prototype.setState=function(t,e){if(this._unmounted)throw Error(b);if(this._blockSetState!==!1)throw Error("Inferno Warning: Cannot update state via setState() in componentWillUpdate()");p(this,t,e)},C.prototype.componentDidMount=function(){},C.prototype.componentWillMount=function(){},C.prototype.componentWillUnmount=function(){},C.prototype.componentDidUpdate=function(){},C.prototype.shouldComponentUpdate=function(){return!0},C.prototype.componentWillReceiveProps=function(){},C.prototype.componentWillUpdate=function(){},C.prototype.getChildContext=function(){},C.prototype._updateComponent=function(e,n,o,i,r){if(this._unmounted===!0)return this._unmounted=!1,!1;if(!t(i)&&t(i.children)&&(i.children=o.children),o!==i||e!==n||r){o!==i&&(this._blockSetState=!0,this.componentWillReceiveProps(i),this._blockSetState=!1);var l=this.shouldComponentUpdate(i,n);if(l!==!1||r){this._blockSetState=!0,this.componentWillUpdate(i,n),this._blockSetState=!1,this.props=i,this.state=n;var s=this.render();return this.componentDidUpdate(o,e),s}}return c},C}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.InfernoComponent=e()}(this,function(){"use strict";function t(t){return n(t)||e(t)}function e(t){return null===t}function n(t){return void 0===t}function o(){this.placeholder=!0,this.dom=null}function i(){return new o}function r(t,e,n){t.split(",").forEach(function(t){return e[t]=n})}function s(){this._listeners=[],this.scrollX=null,this.scrollY=null,this.screenHeight=y,this.screenWidth=S}function l(){return document.activeElement}function d(t){t!==document.body&&document.activeElement!==t&&t.focus()}function a(t,e,n){for(var o in e)t._pendingState[o]=e[o];t._pendingSetState?(t.state=Object.assign({},t.state,t._pendingState),t._pendingState={}):(t._pendingSetState=!0,p(t,!1,n))}function p(e,n,o){if((!e._deferSetState||n)&&!e._blockRender){e._pendingSetState=!1;var r=e._pendingState,a=e.state,p=Object.assign({},a,r);e._pendingState={};var u=e._updateComponent(a,p,e.props,e.props,n);u===c?u=e._lastNode:t(u)&&(u=i());var h=e._lastNode,f=h.dom.parentNode,m=l(),w=new s;e._patch(h,u,f,w,e.context,e,null),e._lastNode=u,e._componentToDOMNodeMap.set(e,u.dom),e._parentNode.dom=u.dom,w.trigger(),t(o)||o(),d(m)}}var c="NO_RENDER",u="undefined"!=typeof window&&window.document,h="http://www.w3.org/1999/xlink",f="http://www.w3.org/XML/1998/namespace",m={},w={},_={},g={};r("xlink:href,xlink:arcrole,xlink:actuate,xlink:role,xlink:titlef,xlink:type",_,h),r("xml:base,xml:lang,xml:space",_,f),r("volume,value",m,!0),r("muted,scoped,loop,open,checked,default,capture,disabled,selected,readonly,multiple,required,autoplay,controls,seamless,reversed,allowfullscreen,novalidate",w,!0),r("animationIterationCount,borderImageOutset,borderImageSlice,borderImageWidth,boxFlex,boxFlexGroup,boxOrdinalGroup,columnCount,flex,flexGrow,flexPositive,flexShrink,flexNegative,flexOrder,gridRow,gridColumn,fontWeight,lineClamp,lineHeight,opacity,order,orphans,tabSize,widows,zIndex,zoom,fillOpacity,floodOpacity,stopOpacity,strokeDasharray,strokeDashoffset,strokeMiterlimit,strokeOpacity,strokeWidth,",g,!0);var S=u&&window.screen.width,y=u&&window.screen.height,x=0,b=0,k=0;u&&(window.onscroll=function(){x=window.scrollX,b=window.scrollY,k=performance.now()},window.resize=function(){x=window.scrollX,b=window.scrollY,S=window.screen.width,y=window.screen.height,k=performance.now()}),s.prototype={refresh:function(){this.scrollX=u&&window.scrollX,this.scrollY=u&&window.scrollY},addListener:function(t){this._listeners.push(t)},trigger:function(){for(var t=this,e=0;e<this._listeners.length;e++)t._listeners[e]()}};var v="Inferno Error: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.",C=function(t){this.props=t||{},this.state={},this.refs={},this._blockRender=!1,this._blockSetState=!1,this._deferSetState=!1,this._pendingSetState=!1,this._pendingState={},this._parentNode=null,this._lastNode=null,this._unmounted=!0,this.context={},this._patch=null,this._parentComponent=null,this._componentToDOMNodeMap=null};return C.prototype.render=function(){},C.prototype.forceUpdate=function(t){if(this._unmounted)throw Error(v);p(this,!0,t)},C.prototype.setState=function(t,e){if(this._unmounted)throw Error(v);if(this._blockSetState!==!1)throw Error("Inferno Warning: Cannot update state via setState() in componentWillUpdate()");a(this,t,e)},C.prototype.componentDidMount=function(){},C.prototype.componentWillMount=function(){},C.prototype.componentWillUnmount=function(){},C.prototype.componentDidUpdate=function(){},C.prototype.shouldComponentUpdate=function(){return!0},C.prototype.componentWillReceiveProps=function(){},C.prototype.componentWillUpdate=function(){},C.prototype.getChildContext=function(){},C.prototype._updateComponent=function(e,n,o,i,r){if(this._unmounted===!0)return this._unmounted=!1,!1;if(!t(i)&&t(i.children)&&(i.children=o.children),o!==i||e!==n||r){o!==i&&(this._blockRender=!0,this.componentWillReceiveProps(i),this._blockRender=!1,this._pendingSetState&&(n=Object.assign({},n,this._pendingState),this._pendingSetState=!1,this._pendingState={}));var s=this.shouldComponentUpdate(i,n);if(s!==!1||r){this._blockSetState=!0,this.componentWillUpdate(i,n),this._blockSetState=!1,this.props=i,this.state=n;var l=this.render();return this.componentDidUpdate(o,e),l}}return c},C}); |
/*! | ||
* inferno-create-class v0.7.15 | ||
* inferno-create-class v0.7.16 | ||
* (c) 2016 Dominic Gannaway | ||
@@ -125,6 +125,3 @@ * Released under the MIT License. | ||
} else { | ||
var pendingState = component._pendingState; | ||
var oldState = component.state; | ||
component.state = Object.assign({}, oldState, pendingState); | ||
component.state = Object.assign({}, component.state, component._pendingState); | ||
component._pendingState = {}; | ||
@@ -135,3 +132,3 @@ } | ||
function applyState(component, force, callback) { | ||
if (!component._deferSetState || force) { | ||
if ((!component._deferSetState || force) && !component._blockRender) { | ||
component._pendingSetState = false; | ||
@@ -177,2 +174,3 @@ var pendingState = component._pendingState; | ||
this.refs = {}; | ||
this._blockRender = false; | ||
this._blockSetState = false; | ||
@@ -247,5 +245,10 @@ this._deferSetState = false; | ||
if (prevProps !== nextProps) { | ||
this._blockSetState = true; | ||
this._blockRender = true; | ||
this.componentWillReceiveProps(nextProps); | ||
this._blockSetState = false; | ||
this._blockRender = false; | ||
if (this._pendingSetState) { | ||
nextState = Object.assign({}, nextState, this._pendingState); | ||
this._pendingSetState = false; | ||
this._pendingState = {}; | ||
} | ||
} | ||
@@ -252,0 +255,0 @@ var shouldUpdate = this.shouldComponentUpdate(nextProps, nextState); |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.InfernoCreateClass=e()}(this,function(){"use strict";function t(t){return n(t)||e(t)}function e(t){return null===t}function n(t){return void 0===t}function o(){this.placeholder=!0,this.dom=null}function i(){return new o}function r(t,e,n){t.split(",").forEach(function(t){return e[t]=n})}function l(){this._listeners=[],this.scrollX=null,this.scrollY=null,this.screenHeight=k,this.screenWidth=b}function s(){return document.activeElement}function p(t){t!==document.body&&document.activeElement!==t&&t.focus()}function a(t,e,n){for(var o in e)t._pendingState[o]=e[o];if(t._pendingSetState){var i=t._pendingState,r=t.state;t.state=Object.assign({},r,i),t._pendingState={}}else t._pendingSetState=!0,c(t,!1,n)}function c(e,n,o){if(!e._deferSetState||n){e._pendingSetState=!1;var r=e._pendingState,a=e.state,c=Object.assign({},a,r);e._pendingState={};var d=e._updateComponent(a,c,e.props,e.props,n);d===m?d=e._lastNode:t(d)&&(d=i());var u=e._lastNode,h=u.dom.parentNode,f=s(),w=new l;e._patch(u,d,h,w,e.context,e,null),e._lastNode=d,e._componentToDOMNodeMap.set(e,d.dom),e._parentNode.dom=d.dom,w.trigger(),t(o)||o(),p(f)}}function d(){}function u(e,n,o){for(var i in n)o!==!0&&t(n[i])||(e[i]=n[i]);return e}function h(t){for(var e in t){var n=t[e];"function"!=typeof n||n.__bound||D.hasOwnProperty(e)||((t[e]=n.bind(t)).__bound=!0)}}function f(t){function e(e){u(this,t),O.call(this,e),h(this),this.getInitialState&&(this.state=this.getInitialState())}return d.prototype=O.prototype,e.prototype=new d,e.prototype.constructor=e,e.displayName=t.displayName||"Component",e}var m="NO_RENDER",w="undefined"!=typeof window&&window.document,_="http://www.w3.org/1999/xlink",y="http://www.w3.org/XML/1998/namespace",S={},g={},v={},x={};r("xlink:href,xlink:arcrole,xlink:actuate,xlink:role,xlink:titlef,xlink:type",v,_),r("xml:base,xml:lang,xml:space",v,y),r("volume,value",S,!0),r("muted,scoped,loop,open,checked,default,capture,disabled,selected,readonly,multiple,required,autoplay,controls,seamless,reversed,allowfullscreen,novalidate",g,!0),r("animationIterationCount,borderImageOutset,borderImageSlice,borderImageWidth,boxFlex,boxFlexGroup,boxOrdinalGroup,columnCount,flex,flexGrow,flexPositive,flexShrink,flexNegative,flexOrder,gridRow,gridColumn,fontWeight,lineClamp,lineHeight,opacity,order,orphans,tabSize,widows,zIndex,zoom,fillOpacity,floodOpacity,stopOpacity,strokeDasharray,strokeDashoffset,strokeMiterlimit,strokeOpacity,strokeWidth,",x,!0);var b=w&&window.screen.width,k=w&&window.screen.height,C=0,W=0,U=0;w&&(window.onscroll=function(){C=window.scrollX,W=window.scrollY,U=performance.now()},window.resize=function(){C=window.scrollX,W=window.scrollY,b=window.screen.width,k=window.screen.height,U=performance.now()}),l.prototype={refresh:function(){this.scrollX=w&&window.scrollX,this.scrollY=w&&window.scrollY},addListener:function(t){this._listeners.push(t)},trigger:function(){for(var t=this,e=0;e<this._listeners.length;e++)t._listeners[e]()}};var N="Inferno Error: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.",O=function(t){this.props=t||{},this.state={},this.refs={},this._blockSetState=!1,this._deferSetState=!1,this._pendingSetState=!1,this._pendingState={},this._parentNode=null,this._lastNode=null,this._unmounted=!0,this.context={},this._patch=null,this._parentComponent=null,this._componentToDOMNodeMap=null};O.prototype.render=function(){},O.prototype.forceUpdate=function(t){if(this._unmounted)throw Error(N);c(this,!0,t)},O.prototype.setState=function(t,e){if(this._unmounted)throw Error(N);if(this._blockSetState!==!1)throw Error("Inferno Warning: Cannot update state via setState() in componentWillUpdate()");a(this,t,e)},O.prototype.componentDidMount=function(){},O.prototype.componentWillMount=function(){},O.prototype.componentWillUnmount=function(){},O.prototype.componentDidUpdate=function(){},O.prototype.shouldComponentUpdate=function(){return!0},O.prototype.componentWillReceiveProps=function(){},O.prototype.componentWillUpdate=function(){},O.prototype.getChildContext=function(){},O.prototype._updateComponent=function(e,n,o,i,r){if(this._unmounted===!0)return this._unmounted=!1,!1;if(!t(i)&&t(i.children)&&(i.children=o.children),o!==i||e!==n||r){o!==i&&(this._blockSetState=!0,this.componentWillReceiveProps(i),this._blockSetState=!1);var l=this.shouldComponentUpdate(i,n);if(l!==!1||r){this._blockSetState=!0,this.componentWillUpdate(i,n),this._blockSetState=!1,this.props=i,this.state=n;var s=this.render();return this.componentDidUpdate(o,e),s}}return m};var D={constructor:1,render:1,shouldComponentUpdate:1,componentWillRecieveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1};return f}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.InfernoCreateClass=e()}(this,function(){"use strict";function t(t){return n(t)||e(t)}function e(t){return null===t}function n(t){return void 0===t}function o(){this.placeholder=!0,this.dom=null}function i(){return new o}function r(t,e,n){t.split(",").forEach(function(t){return e[t]=n})}function s(){this._listeners=[],this.scrollX=null,this.scrollY=null,this.screenHeight=k,this.screenWidth=b}function l(){return document.activeElement}function p(t){t!==document.body&&document.activeElement!==t&&t.focus()}function a(t,e,n){for(var o in e)t._pendingState[o]=e[o];t._pendingSetState?(t.state=Object.assign({},t.state,t._pendingState),t._pendingState={}):(t._pendingSetState=!0,d(t,!1,n))}function d(e,n,o){if((!e._deferSetState||n)&&!e._blockRender){e._pendingSetState=!1;var r=e._pendingState,a=e.state,d=Object.assign({},a,r);e._pendingState={};var c=e._updateComponent(a,d,e.props,e.props,n);c===m?c=e._lastNode:t(c)&&(c=i());var u=e._lastNode,h=u.dom.parentNode,f=l(),w=new s;e._patch(u,c,h,w,e.context,e,null),e._lastNode=c,e._componentToDOMNodeMap.set(e,c.dom),e._parentNode.dom=c.dom,w.trigger(),t(o)||o(),p(f)}}function c(){}function u(e,n,o){for(var i in n)o!==!0&&t(n[i])||(e[i]=n[i]);return e}function h(t){for(var e in t){var n=t[e];"function"!=typeof n||n.__bound||D.hasOwnProperty(e)||((t[e]=n.bind(t)).__bound=!0)}}function f(t){function e(e){u(this,t),O.call(this,e),h(this),this.getInitialState&&(this.state=this.getInitialState())}return c.prototype=O.prototype,e.prototype=new c,e.prototype.constructor=e,e.displayName=t.displayName||"Component",e}var m="NO_RENDER",w="undefined"!=typeof window&&window.document,_="http://www.w3.org/1999/xlink",g="http://www.w3.org/XML/1998/namespace",S={},y={},v={},x={};r("xlink:href,xlink:arcrole,xlink:actuate,xlink:role,xlink:titlef,xlink:type",v,_),r("xml:base,xml:lang,xml:space",v,g),r("volume,value",S,!0),r("muted,scoped,loop,open,checked,default,capture,disabled,selected,readonly,multiple,required,autoplay,controls,seamless,reversed,allowfullscreen,novalidate",y,!0),r("animationIterationCount,borderImageOutset,borderImageSlice,borderImageWidth,boxFlex,boxFlexGroup,boxOrdinalGroup,columnCount,flex,flexGrow,flexPositive,flexShrink,flexNegative,flexOrder,gridRow,gridColumn,fontWeight,lineClamp,lineHeight,opacity,order,orphans,tabSize,widows,zIndex,zoom,fillOpacity,floodOpacity,stopOpacity,strokeDasharray,strokeDashoffset,strokeMiterlimit,strokeOpacity,strokeWidth,",x,!0);var b=w&&window.screen.width,k=w&&window.screen.height,C=0,W=0,U=0;w&&(window.onscroll=function(){C=window.scrollX,W=window.scrollY,U=performance.now()},window.resize=function(){C=window.scrollX,W=window.scrollY,b=window.screen.width,k=window.screen.height,U=performance.now()}),s.prototype={refresh:function(){this.scrollX=w&&window.scrollX,this.scrollY=w&&window.scrollY},addListener:function(t){this._listeners.push(t)},trigger:function(){for(var t=this,e=0;e<this._listeners.length;e++)t._listeners[e]()}};var N="Inferno Error: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.",O=function(t){this.props=t||{},this.state={},this.refs={},this._blockRender=!1,this._blockSetState=!1,this._deferSetState=!1,this._pendingSetState=!1,this._pendingState={},this._parentNode=null,this._lastNode=null,this._unmounted=!0,this.context={},this._patch=null,this._parentComponent=null,this._componentToDOMNodeMap=null};O.prototype.render=function(){},O.prototype.forceUpdate=function(t){if(this._unmounted)throw Error(N);d(this,!0,t)},O.prototype.setState=function(t,e){if(this._unmounted)throw Error(N);if(this._blockSetState!==!1)throw Error("Inferno Warning: Cannot update state via setState() in componentWillUpdate()");a(this,t,e)},O.prototype.componentDidMount=function(){},O.prototype.componentWillMount=function(){},O.prototype.componentWillUnmount=function(){},O.prototype.componentDidUpdate=function(){},O.prototype.shouldComponentUpdate=function(){return!0},O.prototype.componentWillReceiveProps=function(){},O.prototype.componentWillUpdate=function(){},O.prototype.getChildContext=function(){},O.prototype._updateComponent=function(e,n,o,i,r){if(this._unmounted===!0)return this._unmounted=!1,!1;if(!t(i)&&t(i.children)&&(i.children=o.children),o!==i||e!==n||r){o!==i&&(this._blockRender=!0,this.componentWillReceiveProps(i),this._blockRender=!1,this._pendingSetState&&(n=Object.assign({},n,this._pendingState),this._pendingSetState=!1,this._pendingState={}));var s=this.shouldComponentUpdate(i,n);if(s!==!1||r){this._blockSetState=!0,this.componentWillUpdate(i,n),this._blockSetState=!1,this.props=i,this.state=n;var l=this.render();return this.componentDidUpdate(o,e),l}}return m};var D={constructor:1,render:1,shouldComponentUpdate:1,componentWillRecieveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1};return f}); |
/*! | ||
* inferno-create-element v0.7.15 | ||
* inferno-create-element v0.7.16 | ||
* (c) 2016 Dominic Gannaway | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* inferno-dom v0.7.15 | ||
* inferno-dom v0.7.16 | ||
* (c) 2016 Dominic Gannaway | ||
@@ -901,3 +901,3 @@ * Released under the MIT License. | ||
function updateTextNode(dom, lastChildren, nextChildren) { | ||
function patchTextNode(dom, lastChildren, nextChildren) { | ||
if (isStringOrNumber(lastChildren)) { | ||
@@ -930,3 +930,3 @@ dom.firstChild.nodeValue = nextChildren; | ||
if (isStringOrNumber(nextChildren)) { | ||
updateTextNode(dom, lastChildren, nextChildren); | ||
patchTextNode(dom, lastChildren, nextChildren); | ||
} else if (!isInvalidNode(nextChildren)) { | ||
@@ -964,3 +964,3 @@ if (isArray(nextChildren)) { | ||
} else if (isStringOrNumber(nextChildren)) { | ||
updateTextNode(dom, lastChildren, nextChildren); | ||
patchTextNode(dom, lastChildren, nextChildren); | ||
} else if (isStringOrNumber(lastChildren)) { | ||
@@ -1007,6 +1007,7 @@ patch(lastChildren, nextChildren, dom, lifecycle, context, instance, isSVG); | ||
unmountVNode(lastVNode, null, true); | ||
patchVNodeWithBlueprint(lastNodeInstance._lastNode, nextVNode, parentDom, lifecycle, context, instance, nextBp.isSVG); | ||
var lastNode = lastNodeInstance._lastNode; | ||
patchVNodeWithBlueprint(lastNode, nextVNode, lastNode.bp, nextBp, parentDom, lifecycle, context, instance, nextBp.isSVG); | ||
} else { | ||
unmountVNode(lastVNode, null, true); | ||
patchVNodeWithBlueprint(lastNodeInstance, nextVNode, parentDom, lifecycle, context, instance, nextBp.isSVG); | ||
patchVNodeWithBlueprint(lastNodeInstance, nextVNode, lastNodeInstance.bp, nextBp, parentDom, lifecycle, context, instance, nextBp.isSVG); | ||
} | ||
@@ -1086,3 +1087,3 @@ } else { | ||
} else if (lastChildrenType === 1 && nextChildrenType === 1) { | ||
updateTextNode(dom, lastChildren, nextChildren); | ||
patchTextNode(dom, lastChildren, nextChildren); | ||
} else { | ||
@@ -1149,6 +1150,6 @@ patchChildren(lastVNode, nextVNode, dom, lifecycle, context, instance, nextBp.isSVG); | ||
unmountVNode(lastNode, null, true); | ||
patchVNodeWithBlueprint(lastNodeInstance._lastNode, nextNode, parentDom, lifecycle, context, instance, isSVG); | ||
patchVNodeWithoutBlueprint(lastNodeInstance._lastNode, nextNode, parentDom, lifecycle, context, instance, isSVG); | ||
} else { | ||
unmountVNode(lastNode, null, true); | ||
patchVNodeWithBlueprint(lastNodeInstance, nextNode, parentDom, lifecycle, context, instance, isSVG); | ||
patchVNodeWithoutBlueprint(lastNodeInstance, nextNode, parentDom, lifecycle, context, instance, isSVG); | ||
} | ||
@@ -1155,0 +1156,0 @@ } else { |
@@ -1,1 +0,1 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.InfernoDOM=n()}(this,function(){"use strict";function e(e,t){if(!o(e)){var r=n(e);(r&&e.length>0||!r)&&(t=t?Object.assign({},t,{children:e}):{children:e})}return t}function n(e){return e instanceof Array}function t(e){return void 0!==e.prototype.render}function r(e){return a(e)||s(e)}function o(e){return c(e)||u(e)}function l(e){return u(e)||e===!1||e===!0||c(e)}function i(e){return"function"==typeof e}function a(e){return"string"==typeof e}function s(e){return"number"==typeof e}function u(e){return null===e}function d(e){return e===!0}function c(e){return void 0===e}function f(e,t){if(!l(e))if(n(e))for(var r=0;r<e.length;r++){var o=e[r];if(!l(o)){if(o===t)return!0;if(o.children)return f(o.children,t)}}else{if(e===t)return!0;if(e.children)return f(e.children,t)}return!1}function m(e,n){var t=n.props.children;return f(t,e)?m(e,n._parentComponent):n}function v(e,n,t,r,l){if(void 0!==n){var i=e.key,a=null===i?n.pools.nonKeyed:n.pools.keyed[i];if(!o(a)){var s=a.pop();if(!o(s))return fe(s,e,null,t,r,l,!0,n.isSVG),e.dom}}return null}function p(e){var n=e.bp;if(!o(n)){var t=e.key,r=n.pools;if(null===t){var l=r.nonKeyed;l&&l.push(e)}else{var i=r.keyed;(i[t]||(i[t]=[])).push(e)}return!0}return!1}function h(e,n){M(e)?g(e,n,!0):T(e)&&y(e,n,!1)}function g(e,n,t){var r=e.items,o=r.length,l=r.pointer;if(o>0)for(var i=0;o>i;i++){var a=r[i];M(a)?g(a,n,!0):(n&&H(n,a.dom),h(a,null))}n&&t&&H(n,l)}function y(e,t,r){var l=e.instance,i=null,a=null;o(l)||(i=l.hooks,a=l.children,void 0!==l.render&&(l.componentWillUnmount(),l._unmounted=!0,nn.delete(l),!r&&h(l._lastNode,null)));var s=e.hooks||i;o(s)||(o(s.willDetach)||s.willDetach(e.dom),o(s.componentWillUnmount)||s.componentWillUnmount(e.dom,s));var u=(o(l)?e.children:null)||a;if(!o(u))if(n(u))for(var d=0;d<u.length;d++)h(u[d],null);else h(u,null)}function k(e){this.text=e,this.dom=null}function w(){this.placeholder=!0,this.dom=null}function x(e){this.dom=null,this.pointer=null,this.items=e}function b(e){return new k(e)}function C(){return new w}function N(e){return new x(e)}function _(e,n,t){e.split(",").forEach(function(e){return n[e]=t})}function S(e){return void 0!==e.text}function O(e){return e.placeholder===!0}function M(e){return void 0!==e.items}function T(e){return void 0!==e.tag||void 0!==e.bp}function D(e,n,t){o(t)?e.appendChild(n):e.insertBefore(n,t)}function j(e,n,t){var r=n.pointer;g(n,e,!1),G(e,t,r)}function V(e,n){var t;return t=n===!0?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}function U(e,n,t){if(null===n)return document.createTextNode(e);if(t){if(""!==e)return n.textContent=e,n.firstChild;var r=document.createTextNode("");return n.appendChild(r),r}var o=document.createTextNode(e);return n.appendChild(o),o}function E(e,n,t,r,l,i,a){var s=null,u=e._lastNode;o(u)||(s=e,e=u),h(e,!1);var d=J(n,null,r,l,i,a);n.dom=d,G(t,d,e.dom),null!==s&&(s._lastNode=n)}function G(e,n,t){e.replaceChild(n,t)}function W(e){return r(e)?b(e):l(e)?C():n(e)?N(e):e}function A(e,n){var t=e[n];return e[n]=W(t)}function K(e,n){var t=e.dom;t===n?t.innerHTML="":(H(n,t),Le&&p(e)),h(e,!1)}function H(e,n){e.removeChild(n)}function I(e,n,t){for(var r=n||Object.keys(e),o=0;o<r.length;o++){var l=r[o];t[l]=null}}function L(){return document.activeElement}function Y(e,n){if(Le){var t=n.length;if(t>5)for(var r=0;t>r;r++){var o=n[r];l(o)||p(o)}}e.textContent=""}function X(e){null!==e&&e!==document.body&&document.activeElement!==e&&e.focus()}function z(e,n){return e.complex?!1:n.length&&!o(n[0])&&!o(n[0].key)&&e.length&&!o(e[0])&&!o(e[0].key)}function R(e,n){if("option"===e.tag){var t=e.attrs&&e.attrs.value;n[t]?(e.attrs=e.attrs||{},e.attrs.selected="selected",e.dom.selected=!0):e.dom.selected=!1}else for(var r=0,o=e.children.length;o>r;r++)R(e.children[r],n)}function F(e){var t=e.attrs&&e.attrs.value,r={};if(n(t))for(var o=0,l=t.length;l>o;o++)r[t[o]]=t[o];else r[t]=t;for(var i=0,a=e.children.length;a>i;i++)R(e.children[i],r);e.attrs&&e.attrs[t]&&delete e.attrs.value}function q(e,n,t){o(e.created)||e.created(t),o(e.attached)||n.addListener(function(){e.attached(t)})}function B(e){var n=e.attrs.value;o(n)||(e.dom.value=n)}function P(e,n){if("input"===e){var t=n.attrs.type;if("text"===t)B(n);else if("checkbox"===t||"radio"===t){var r=n.attrs.checked;n.dom.checked=!!r}}else"textarea"===e&&B(n)}function J(e,n,t,r,o,l){return O(e)?ee(e,n):S(e)?$(e,n):M(e)?Z(e,n,t,r,o,l):T(e)?Q(e,n,t,r,o,l):void J(normalise(e),n,t,r,o,l)}function Q(e,n,t,r,o,l){var i=e.bp;if(c(i))return le(e,n,t,r,o,l);if(Le){var a=v(e,i,t,r,o);if(!u(a))return u(n)||n.appendChild(a),a}return oe(e,i,n,t,r,o)}function Z(e,n,t,r,o,l){var i=e.items,a=document.createTextNode(""),s=document.createDocumentFragment();return ie(i,s,t,r,o,l),e.pointer=a,e.dom=s,s.appendChild(a),n&&D(n,s),s}function $(e,n){var t=document.createTextNode(e.text);return e.dom=t,n&&D(n,t),t}function ee(e,n){var t=document.createTextNode("");return e.dom=t,n&&D(n,t),t}function ne(e){"select"===e.tag&&F(e)}function te(e,n,t,r){ne(e);var o=e.attrs;if(u(n.attrKeys)){var l=Object.keys(o);n.attrKeys=n.attrKeys?n.attrKeys.concat(l):l}var i=n.attrKeys;ce(e,o,i,t,r)}function re(e,n,t){var r=e.events;u(n.eventKeys)&&(n.eventKeys=Object.keys(r));var o=n.eventKeys;ue(r,o,t)}function oe(e,n,t,r,o,l){var i=e.tag;if(d(n.isComponent))return de(e,i,e.attrs||{},e.hooks,e.children,l,t,r,o);var a=V(n.tag,n.isSVG);e.dom=a,d(n.hasHooks)&&q(e.hooks,r,a),d(n.lazy)&&je(e,r,a);var s=e.children;switch(n.childrenType){case 1:U(s,a,!0);break;case 2:J(e.children,a,r,o,l,n.isSVG);break;case 3:ie(s,a,r,o,l,n.isSVG);break;case 4:for(var c=0;c<s.length;c++)J(s[c],a,r,o,l,n.isSVG);break;case 5:ae(e,s,a,r,o,l,n.isSVG)}return d(n.hasAttrs)&&te(e,n,a,l),d(n.hasClassName)&&(a.className=e.className),d(n.hasStyle)&&we(null,e.style,a),d(n.hasEvents)&&re(e,n,a),u(t)||t.appendChild(a),a}function le(e,n,t,r,s,d){var c=e.tag;if(i(c))return de(e,c,e.attrs||{},e.hooks,e.children,s,n,t,r);if(!a(c)||""===c)throw Error("Inferno Error: Expected function or string for element tag type");"svg"===c&&(d=!0);var f=V(c,d),m=e.children,v=e.attrs,p=e.events,h=e.hooks,g=e.className,y=e.style;return e.dom=f,o(h)||q(h,t,f),l(m)||ae(e,m,f,t,r,s,d),o(v)||(ne(e),ce(e,v,Object.keys(v),f,s)),o(g)||(f.className=g),o(y)||we(null,y,f),o(p)||ue(p,Object.keys(p),f),u(n)||n.appendChild(f),f}function ie(e,n,t,r,o,l){e.complex=!1;for(var i=0;i<e.length;i++){var a=A(e,i);S(a)?($(a,n),e.complex=!0):O(a)?(ee(a,n),e.complex=!0):M(a)?(Z(a,n,t,r,o,l),e.complex=!0):J(a,n,t,r,o,l)}}function ae(e,t,o,i,a,s,u){n(t)?ie(t,o,i,a,s,u):r(t)?U(t,o,!0):l(t)||J(t,o,i,a,s,u)}function se(e,n,t){!l(e)&&a(n)&&(e.refs[n]=t)}function ue(e,n,t){for(var r=0;r<n.length;r++){var o=n[r];t[o]=e[o]}}function de(n,r,i,a,s,u,d,c,f){i=e(s,i);var m;if(t(r)){var v=new r(i);v._patch=fe,v._componentToDOMNodeMap=nn,!o(u)&&i.ref&&se(u,i.ref,v);var p=v.getChildContext();o(p)||(f=Object.assign({},f,p)),v.context=f,v._unmounted=!1,v._parentNode=n,u&&(v._parentComponent=u),v._pendingSetState=!0,v.componentWillMount();var h=v.render();l(h)&&(h=C()),v._pendingSetState=!1,m=J(h,null,c,f,v,!1),v._lastNode=h,v.componentDidMount(),null===d||l(m)||d.appendChild(m),nn.set(v,m),n.dom=m,n.instance=v}else{o(a)||(o(a.componentWillMount)||a.componentWillMount(null,i),o(a.componentDidMount)||c.addListener(function(){a.componentDidMount(m,i)}));var g=r(i,f);l(g)&&(g=C()),m=J(g,null,c,f,null,!1),n.instance=g,null===d||l(m)||d.appendChild(m),n.dom=m}return m}function ce(e,n,t,r,o){for(var l=0;l<t.length;l++){var i=t[l];"ref"===i?se(m(e,o),n[i],r):be(i,null,n[i],r)}}function fe(e,n,t,o,i,a,s){if(e!==n)if(l(e))J(n,t,o,i,a,s);else if(l(n))K(e,t);else if(r(e))if(r(n))t.firstChild.nodeValue=n;else{var u=J(n,null,o,i,a,s);n.dom=u,G(t,u,t.firstChild)}else if(r(n))G(t,document.createTextNode(n),e.dom);else if(M(n))M(e)?Ne(e,n,t,o,i,a,s):(G(t,Z(n,null),e.dom),h(e,null));else if(M(e))j(t,e,J(n,null,o,i,a,s));else if(O(n))O(e)?Se(e,n):(G(t,ee(n,null),e.dom),h(e,null));else if(O(e))G(t,J(n,null,o,i,a,s),e.dom);else if(S(n))S(e)?Oe(e,n):(G(t,$(n,null),e.dom),h(e,null));else if(S(e))G(t,J(n,null,o,i,a,s),e.dom);else if(T(n))T(e)?he(e,n,t,o,i,a,s,!1):(G(t,mountVNode(n,null,o,i,a,s),e.dom),h(e,null));else{if(!T(e))return fe(e,normalise(n),parentDomdom,o,i,a,s);G(t,J(n,null,o,i,a,s),e.dom),h(e,null)}return n}function me(e,n,t){r(n)?e.firstChild.nodeValue=t:e.textContent=t}function ve(e,n,t,r){e&&(a(n)&&delete e.refs[n],a(t)&&(e.refs[t]=r))}function pe(e,t,o,i,a,s,u){var d=t.children,c=e.children;if(c!==d)if(l(c))r(d)?me(o,c,d):l(d)||(n(d)?ie(d,o,i,a,s,u):J(d,o,i,a,s,u));else if(l(d))Y(o,c);else if(n(c))n(d)?(d.complex=c.complex,z(c,d)?Me(c,d,o,i,a,s,u,null):_e(c,d,o,i,a,s,u,null)):_e(c,[d],o,i,a,s,u,null);else if(n(d)){var f=c;r(c)&&(f=b(f),f.dom=o.firstChild),_e([f],d,o,i,a,s,u,null)}else r(d)?me(o,c,d):r(c)?fe(c,d,o,i,a,s,u):he(c,d,o,i,a,s,u,!1)}function he(e,n,t,r,o,l,i,a){var s=e.bp,u=n.bp;void 0===s||void 0===u?ye(e,n,t,r,o,l,i):ge(e,n,s,u,t,r,o,l,a)}function ge(e,n,r,i,a,s,u,d,c){var f;i.hasHooks===!0&&(f=n.hooks,f&&!o(f.willUpdate)&&f.willUpdate(e.dom));var m=n.tag||i.tag,v=e.tag||r.tag;if(v!==m)if(r.isComponent===!0){var p=e.instance;i.isComponent===!0?E(e,n,a,s,u,d,!1):t(v)?(y(e,null,!0),ge(p._lastNode,n,a,s,u,d,i.isSVG)):(y(e,null,!0),ge(p,n,a,s,u,d,i.isSVG))}else E(e,n,a,s,u,d,i.isSVG);else if(o(v))n.dom=e.dom;else if(r.isComponent===!0){if(i.isComponent===!0){var h=e.instance;if(!o(h)&&h._unmounted){var g=de(n,v,n.attrs||{},n.hooks,n.children,h,a,s,u);null!==a&&G(a,g,e.dom)}else n.instance=h,n.dom=e.dom,Ce(!0,n,n.tag,r,i,h,e.attrs||{},n.attrs||{},n.hooks,n.children,a,s,u)}}else{var k=e.dom,w=r.childrenType,x=i.childrenType;if(n.dom=k,i.lazy===!0&&c===!1){var b=e.clipData;if(null===s.scrollY&&s.refresh(),n.clipData=b,(b.pending===!0||b.top-s.scrollY>s.screenHeight)&&setClipNode(b,k,e,n,a,s,u,d,r.isSVG))return;if(b.bottom<s.scrollY&&setClipNode(b,k,e,n,a,s,u,d,r.isSVG))return}if(w>0||x>0)if(5===x||5===w)pe(e,n,k,s,u,d);else{var C=e.children,N=n.children;0===w||l(C)?x>2?ie(N,k,s,u,d):J(N,k,s,u,d):0===x||l(N)?w>2?Y(k,C):K(C,k):C!==N&&(4===w&&4===x?Me(C,N,k,s,u,d,i.isSVG,null):2===w&&2===x?fe(C,N,k,s,u,d,!0,i.isSVG):1===w&&1===x?me(k,C,N):pe(e,n,k,s,u,d,i.isSVG))}if(r.hasAttrs!==!0&&i.hasAttrs!==!0||ke(e,n,r.attrKeys,i.attrKeys,k,d),r.hasEvents!==!0&&i.hasEvents!==!0||xe(e.events,n.events,r.eventKeys,i.eventKeys,k),r.hasClassName===!0||i.hasClassName===!0){var _=n.className;e.className!==_&&(o(_)?k.removeAttribute("class"):k.className=_)}if(r.hasStyle===!0||i.hasStyle===!0){var S=n.style,O=e.style;O!==S&&we(O,S,k)}i.hasHooks!==!0||o(f.didUpdate)||f.didUpdate(k),P(m,n)}}function ye(e,n,r,l,a,s,u){var d=n.hooks,c=!o(d);c&&!o(d.willUpdate)&&d.willUpdate(e.dom);var f=n.tag||(o(n.bp)?null:n.bp.tag),m=e.tag||(o(e.bp)?null:e.bp.tag);if("svg"===f&&(u=!0),m!==f){var v=e.instance;i(m)?i(f)?E(e,n,r,l,a,s,u):t(m)?(y(e,null,!0),ge(v._lastNode,n,r,l,a,s,u)):(y(e,null,!0),ge(v,n,r,l,a,s,u)):E(v||e,n,r,l,a,s,u)}else if(o(m))n.dom=e.dom;else if(i(m)){if(i(f)){var p=e._instance;if(!o(p)&&p._unmounted){var h=de(n,m,n.attrs||{},n.hooks,n.children,p,r,l,a);null!==r&&G(r,h,e.dom)}else n.instance=e.instance,n.dom=e.dom,Ce(!1,n,n.tag,null,null,n.instance,e.attrs||{},n.attrs||{},n.hooks,n.children,r,l,a)}}else{var g=e.dom,k=n.className,w=n.style;n.dom=g,pe(e,n,g,l,a,s,u),ke(e,n,null,null,g,s),xe(e.events,n.events,null,null,g),e.className!==k&&(o(k)?g.removeAttribute("class"):g.className=k),e.style!==w&&we(e.style,w,g),c&&!o(d.didUpdate)&&d.didUpdate(g),P(f,n)}}function ke(e,n,t,r,l,i){"select"===e.tag&&F(n);var a=n.attrs,s=e.attrs,u=o(a),d=!o(s);if(!u)for(var c=r||Object.keys(a),f=c.length,m=0;f>m;m++){var v=c[m],p=d&&s[v],h=a[v];p!==h&&("ref"===v?ve(i,p,h,l):be(v,p,h,l))}if(d)for(var g=t||Object.keys(s),y=g.length,k=0;y>k;k++){var w=g[k];(u||o(a[w]))&&("ref"===w?ve(getRefInstance(node,i),s[w],null,l):l.removeAttribute(w))}}function we(e,n,t){if(a(n))t.style.cssText=n;else if(o(e)){if(!o(n))for(var r=Object.keys(n),l=0;l<r.length;l++){var i=r[l],u=n[i];s(u)&&!qe[i]?t.style[i]=u+"px":t.style[i]=u}}else if(o(n))t.removeAttribute("style");else{for(var d=Object.keys(n),c=0;c<d.length;c++){var f=d[c],m=n[f];s(m)&&!qe[f]?t.style[f]=m+"px":t.style[f]=m}for(var v=Object.keys(e),p=0;p<v.length;p++){var h=v[p];o(n[h])&&(t.style[h]="")}}}function xe(e,n,t,r,l){var i=!o(n),a=!o(e);if(i)if(a){for(var s=r||Object.keys(n),u=0;u<s.length;u++){var d=s[u],c=e[d],f=n[d];c!==f&&(l[d]=f)}for(var m=t||Object.keys(e),v=0;v<m.length;v++){var p=m[v];o(n[p])&&(l[p]=null)}}else mountEvents(n,r,l);else a&&I(e,r,l)}function be(e,n,t,r){if("dangerouslySetInnerHTML"===e){var l=n&&n.__html,i=t&&t.__html;if(o(i))throw new Error("Inferno Error: dangerouslySetInnerHTML requires an object with a __html propety containing the innerHTML content");l!==i&&(r.innerHTML=i)}else if(ze[e])r[e]=null===t?"":t;else if(Re[e])r[e]=!!t;else{var a=Fe[e];t===!1||o(t)?void 0!==a?r.removeAttributeNS(a,e):r.removeAttribute(e):void 0!==a?r.setAttributeNS(a,e,t===!0?e:t):r.setAttribute(e,t===!0?e:t)}}function Ce(n,r,i,a,s,u,d,c,f,m,v,p,h){if(c=e(m,c),t(i)){var g=u.props,y=u.state,k=u.state,w=u.getChildContext();o(w)||(h=Object.assign({},h,w)),u.context=h;var x=u._updateComponent(y,k,g,c);x===He?x=u._lastNode:o(x)&&(x=C()),fe(u._lastNode,x,v,p,h,u,null,!1),r.dom=x.dom,u._lastNode=x,nn.set(u,x.dom)}else{var b=!0,N=n&&s.hasHooks===!0||!o(f);if(N&&!o(f.componentShouldUpdate)&&(b=f.componentShouldUpdate(r.dom,d,c)),b!==!1){N&&!o(f.componentWillUpdate)&&f.componentWillUpdate(r.dom,d,c);var _=i(c,h);l(_)&&(_=C()),_.dom=r.dom,fe(u,_,v,p,h,null,null,!1),r.instance=_,N&&!o(f.componentDidUpdate)&&f.componentDidUpdate(r.dom,d,c)}}}function Ne(e,n,t,r,o,l,i){var a=e.items,s=n.items,u=e.pointer;n.dom=e.dom,n.pointer=u,!a!==s&&(z(a,s)?Me(a,s,t,r,o,l,i,n):_e(a,s,t,r,o,l,i,n))}function _e(e,n,t,r,o,l,i,a){for(var s=e.length,u=n.length,d=s>u?u:s,c=0;d>c;c++){var f=e[c],m=A(n,c);fe(f,m,t,r,o,l,i)}if(u>s)for(c=d;u>c;c++){var v=A(n,c);D(t,J(v,null,r,o,l,i),a&&a.pointer)}else if(s>u)for(c=d;s>c;c++)K(e[c],t)}function Se(e,n){n.dom=e.dom}function Oe(e,n){var t=n.text,r=e.dom;n.dom=r,e.text!==t&&(r.nodeValue=t)}function Me(e,n,t,r,o,l,i,a){for(var s,u,d,c,f,m=e.length,v=n.length,p=m-1,h=v-1,g=0,y=0,k=null,w=null,x=null,b=null,C=0;p>=g&&h>=y&&(w=n[y],k=e[g],w.key===k.key);)he(k,w,t,r,o,l,i,!1),y++,g++;for(;p>=g&&h>=y&&(x=n[h],b=e[p],x.key===b.key);)he(b,x,t,r,o,l,i,!1),h--,p--;for(;p>=g&&h>=y&&(x=n[h],k=e[g],x.key===k.key);)d=v>h+1?n[h+1].dom:null,he(k,x,t,r,o,l,i,!1),D(t,x.dom,d),h--,g++;for(;p>=g&&h>=y&&(w=n[y],b=e[p],w.key===b.key);)d=e[g].dom,he(b,w,t,r,o,l,i,!1),D(t,w.dom,d),y++,p--;if(g>p){if(h>=y)for(d=v>h+1?n[h+1].dom:a&&a.pointer;h>=y;y++)D(t,J(n[y],null,r,o,l,i),d)}else if(y>h)for(;p>=g;)K(e[g++],t);else{var N=p-g+1,_=h-y+1,S=new Array(_);for(s=0;_>s;s++)S[s]=-1;var O=!1,M=0;if(16>=N*_)for(s=g;p>=s;s++){var T=!0;for(b=e[s],u=y;h>=u;u++)if(x=n[u],b.key===x.key){S[u-y]=s,C>u?O=!0:C=u,he(b,x,t,r,o,l,i,!1),T=!1;break}T&&(K(b,t),M++)}else{var j=new Map;for(s=y;h>=s;s++)f=n[s],j.set(f.key,s);for(s=p;s>=g;s--)b=e[s],u=j.get(b.key),void 0===u?(K(b,t),M++):(x=n[u],S[u-y]=s,C>u?O=!0:C=u,he(b,x,t,r,o,l,i,!1))}if(O){var V=Te(S);for(u=V.length-1,s=_-1;s>=0;s--)-1===S[s]?(c=s+y,d=v>c+1?n[c+1].dom:a&&a.pointer,D(t,J(n[c],null,r,o,l,i),d)):0>u||s!==V[u]?(c=s+y,d=v>c+1?n[c+1].dom:a&&a.pointer,D(t,n[c].dom,d)):u--}else if(N-M!==_)for(s=_-1;s>=0;s--)-1===S[s]&&(c=s+y,d=v>c+1?n[c+1].dom:a&&a.pointer,D(t,J(n[c],null,r,o,l,i),d))}}function Te(e){var n=e.slice(0),t=[];t.push(0);var r,o,l,i,a;for(r=0;r<e.length;r++)if(-1!==e[r])if(o=t[t.length-1],e[o]<e[r])n[r]=o,t.push(r);else{for(l=0,i=t.length-1;i>l;)a=(l+i)/2|0,e[t[a]]<e[r]?l=a+1:i=a;e[r]<e[t[l]]&&(l>0&&(n[r]=t[l-1]),t[l]=r)}for(l=t.length,i=t[l-1];l-- >0;)t[l]=i,i=n[i];return t}function De(){this._listeners=[],this.scrollX=null,this.scrollY=null,this.screenHeight=Pe,this.screenWidth=Be}function je(e,n,t){n.addListener(function(){var r=t.getBoundingClientRect();null===n.scrollY&&n.refresh(),e.clipData={top:r.top+n.scrollY,left:r.left+n.scrollX,bottom:r.bottom+n.scrollY,right:r.right+n.scrollX,pending:!1}})}function Ve(e,n,t,r,o,l,i){var a=n[t.i];if(S(e)){var s=e.text;if(e.dom=a,3===a.nodeType&&""!==s)a.nodeValue=s;else{var u=$(s);G(r,u,a),n.splice(n.indexOf(a),1,u),e.dom=u}}else if(O(e))e.dom=a;else if(M(e)){var d=e.items;e.dom=document.createDocumentFragment();for(var c=0;c<d.length;c++){var f=Ve(A(d,c),n,t,r,o,l,i);if(f)return!0}var m=n[t.i++];if(!m||3!==m.nodeType)return!0;e.pointer=m}else{var v=Ge(e,a,r,o,l,i,!1);if(v)return!0}t.i++}function Ue(e){for(var n=[],t=e.childNodes,r=t.length,o=0;r>o;){var l=t[o];if(8===l.nodeType)if("!"===l.data){var i=document.createTextNode("");e.replaceChild(i,l),n.push(i),o++}else e.removeChild(l),r--;else n.push(l),o++}return n}function Ee(n,r,i,a,s,u,d,c,f,m,v){if(i=e(s,i),!t(r)){var p=n.instance=r(i);return o(a)||(o(a.componentWillMount)||a.componentWillMount(null,i),o(a.componentDidMount)||c.addListener(function(){a.componentDidMount(u,i)})),Ge(p,u,d,c,f,p,v)}var h=n.instance=new r(i);h._patch=fe,!o(m)&&i.ref&&se(m,i.ref,h);var g=h.getChildContext();o(g)||(f=Object.assign({},f,g)),h.context=f,h._unmounted=!1,h._parentNode=n,m&&(h._parentComponent=m),h._pendingSetState=!0,h.componentWillMount();var y=h.render();h._pendingSetState=!1,l(y)&&(y=C()),Ge(y,u,d,c,f,h,v),h._lastNode=y,h.componentDidMount()}function Ge(e,t,l,a,s,u,d){var c=e.bp,f=e.tag||c.tag;if(i(f))e.dom=t,Ee(e,f,e.attrs||{},e.hooks,e.children,t,l,a,s,u,d);else if(1!==t.nodeType||f!==t.tagName.toLowerCase());else{e.dom=t;var m=e.hooks;(c&&c.hasHooks===!0||!o(m))&&q(m,a,t);var v=e.children;if(!o(v))if(r(v))t.textContent!==v&&(t.textContent=v);else{var p=Ue(t),h={i:0},g=!1;if(n(v))for(var y=0;y<v.length&&!(g=Ve(A(v,y),p,h,t,a,s,u));y++);else g=1===p.length?Ve(v,p,h,t,a,s,u):!0}var k=e.className,w=e.style;if(o(k)||(t.className=k),o(w)||we(null,w,t),c&&c.hasAttrs===!0)te(e,c,t,u);else{var x=e.attrs;o(x)||(ne(e),ce(e,x,Object.keys(x),t,u))}if(c&&c.hasEvents===!0)re(e,c,t);else{var b=e.events;o(b)||ue(b,Object.keys(b),t)}}}function We(e,n,t){if(n&&1===n.nodeType){var r=n.querySelector("[data-infernoroot]");if(r&&r.parentNode===n)return Ge(e,r,n,t,{},!0),!0}return n!==$e?n.textContent="":console.warn('Inferno Warning: rendering to the "document.body" is dangerous! Use a dedicated container element instead.'),!1}function Ae(e){return nn.get(e)||null}function Ke(e,n){var t=en.get(n),r=new De;if(c(t))l(e)||(We(e,n,r)||J(e,n,r,{},null,!1),r.trigger(),en.set(n,{input:e}));else{var o=L(),i=fe(t.input,e,n,r,{},null,!1);r.trigger(),u(e)&&en.delete(n),t.input=i,X(o)}}var He="NO_RENDER",Ie="undefined"!=typeof window&&window.document,Le=!0,Ye="http://www.w3.org/1999/xlink",Xe="http://www.w3.org/XML/1998/namespace",ze={},Re={},Fe={},qe={};_("xlink:href,xlink:arcrole,xlink:actuate,xlink:role,xlink:titlef,xlink:type",Fe,Ye),_("xml:base,xml:lang,xml:space",Fe,Xe),_("volume,value",ze,!0),_("muted,scoped,loop,open,checked,default,capture,disabled,selected,readonly,multiple,required,autoplay,controls,seamless,reversed,allowfullscreen,novalidate",Re,!0),_("animationIterationCount,borderImageOutset,borderImageSlice,borderImageWidth,boxFlex,boxFlexGroup,boxOrdinalGroup,columnCount,flex,flexGrow,flexPositive,flexShrink,flexNegative,flexOrder,gridRow,gridColumn,fontWeight,lineClamp,lineHeight,opacity,order,orphans,tabSize,widows,zIndex,zoom,fillOpacity,floodOpacity,stopOpacity,strokeDasharray,strokeDashoffset,strokeMiterlimit,strokeOpacity,strokeWidth,",qe,!0);var Be=Ie&&window.screen.width,Pe=Ie&&window.screen.height,Je=0,Qe=0,Ze=0;Ie&&(window.onscroll=function(){Je=window.scrollX,Qe=window.scrollY,Ze=performance.now()},window.resize=function(){Je=window.scrollX,Qe=window.scrollY,Be=window.screen.width,Pe=window.screen.height,Ze=performance.now()}),De.prototype={refresh:function(){this.scrollX=Ie&&window.scrollX,this.scrollY=Ie&&window.scrollY},addListener:function(e){this._listeners.push(e)},trigger:function(){for(var e=this,n=0;n<this._listeners.length;n++)e._listeners[n]()}};var $e=document.body,en=new Map,nn=new Map,tn={render:Ke,findDOMNode:Ae,mount:J,patch:fe,unmount:h};return tn}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.InfernoDOM=n()}(this,function(){"use strict";function e(e,t){if(!o(e)){var r=n(e);(r&&e.length>0||!r)&&(t=t?Object.assign({},t,{children:e}):{children:e})}return t}function n(e){return e instanceof Array}function t(e){return void 0!==e.prototype.render}function r(e){return a(e)||s(e)}function o(e){return c(e)||u(e)}function l(e){return u(e)||e===!1||e===!0||c(e)}function i(e){return"function"==typeof e}function a(e){return"string"==typeof e}function s(e){return"number"==typeof e}function u(e){return null===e}function d(e){return e===!0}function c(e){return void 0===e}function f(e,t){if(!l(e))if(n(e))for(var r=0;r<e.length;r++){var o=e[r];if(!l(o)){if(o===t)return!0;if(o.children)return f(o.children,t)}}else{if(e===t)return!0;if(e.children)return f(e.children,t)}return!1}function m(e,n){var t=n.props.children;return f(t,e)?m(e,n._parentComponent):n}function v(e,n,t,r,l){if(void 0!==n){var i=e.key,a=null===i?n.pools.nonKeyed:n.pools.keyed[i];if(!o(a)){var s=a.pop();if(!o(s))return fe(s,e,null,t,r,l,!0,n.isSVG),e.dom}}return null}function p(e){var n=e.bp;if(!o(n)){var t=e.key,r=n.pools;if(null===t){var l=r.nonKeyed;l&&l.push(e)}else{var i=r.keyed;(i[t]||(i[t]=[])).push(e)}return!0}return!1}function h(e,n){M(e)?g(e,n,!0):T(e)&&y(e,n,!1)}function g(e,n,t){var r=e.items,o=r.length,l=r.pointer;if(o>0)for(var i=0;o>i;i++){var a=r[i];M(a)?g(a,n,!0):(n&&H(n,a.dom),h(a,null))}n&&t&&H(n,l)}function y(e,t,r){var l=e.instance,i=null,a=null;o(l)||(i=l.hooks,a=l.children,void 0!==l.render&&(l.componentWillUnmount(),l._unmounted=!0,nn.delete(l),!r&&h(l._lastNode,null)));var s=e.hooks||i;o(s)||(o(s.willDetach)||s.willDetach(e.dom),o(s.componentWillUnmount)||s.componentWillUnmount(e.dom,s));var u=(o(l)?e.children:null)||a;if(!o(u))if(n(u))for(var d=0;d<u.length;d++)h(u[d],null);else h(u,null)}function k(e){this.text=e,this.dom=null}function w(){this.placeholder=!0,this.dom=null}function x(e){this.dom=null,this.pointer=null,this.items=e}function b(e){return new k(e)}function C(){return new w}function N(e){return new x(e)}function _(e,n,t){e.split(",").forEach(function(e){return n[e]=t})}function S(e){return void 0!==e.text}function O(e){return e.placeholder===!0}function M(e){return void 0!==e.items}function T(e){return void 0!==e.tag||void 0!==e.bp}function D(e,n,t){o(t)?e.appendChild(n):e.insertBefore(n,t)}function j(e,n,t){var r=n.pointer;g(n,e,!1),G(e,t,r)}function V(e,n){var t;return t=n===!0?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}function U(e,n,t){if(null===n)return document.createTextNode(e);if(t){if(""!==e)return n.textContent=e,n.firstChild;var r=document.createTextNode("");return n.appendChild(r),r}var o=document.createTextNode(e);return n.appendChild(o),o}function E(e,n,t,r,l,i,a){var s=null,u=e._lastNode;o(u)||(s=e,e=u),h(e,!1);var d=J(n,null,r,l,i,a);n.dom=d,G(t,d,e.dom),null!==s&&(s._lastNode=n)}function G(e,n,t){e.replaceChild(n,t)}function W(e){return r(e)?b(e):l(e)?C():n(e)?N(e):e}function A(e,n){var t=e[n];return e[n]=W(t)}function K(e,n){var t=e.dom;t===n?t.innerHTML="":(H(n,t),Le&&p(e)),h(e,!1)}function H(e,n){e.removeChild(n)}function I(e,n,t){for(var r=n||Object.keys(e),o=0;o<r.length;o++){var l=r[o];t[l]=null}}function L(){return document.activeElement}function Y(e,n){if(Le){var t=n.length;if(t>5)for(var r=0;t>r;r++){var o=n[r];l(o)||p(o)}}e.textContent=""}function X(e){null!==e&&e!==document.body&&document.activeElement!==e&&e.focus()}function z(e,n){return e.complex?!1:n.length&&!o(n[0])&&!o(n[0].key)&&e.length&&!o(e[0])&&!o(e[0].key)}function R(e,n){if("option"===e.tag){var t=e.attrs&&e.attrs.value;n[t]?(e.attrs=e.attrs||{},e.attrs.selected="selected",e.dom.selected=!0):e.dom.selected=!1}else for(var r=0,o=e.children.length;o>r;r++)R(e.children[r],n)}function F(e){var t=e.attrs&&e.attrs.value,r={};if(n(t))for(var o=0,l=t.length;l>o;o++)r[t[o]]=t[o];else r[t]=t;for(var i=0,a=e.children.length;a>i;i++)R(e.children[i],r);e.attrs&&e.attrs[t]&&delete e.attrs.value}function q(e,n,t){o(e.created)||e.created(t),o(e.attached)||n.addListener(function(){e.attached(t)})}function B(e){var n=e.attrs.value;o(n)||(e.dom.value=n)}function P(e,n){if("input"===e){var t=n.attrs.type;if("text"===t)B(n);else if("checkbox"===t||"radio"===t){var r=n.attrs.checked;n.dom.checked=!!r}}else"textarea"===e&&B(n)}function J(e,n,t,r,o,l){return O(e)?ee(e,n):S(e)?$(e,n):M(e)?Z(e,n,t,r,o,l):T(e)?Q(e,n,t,r,o,l):void J(normalise(e),n,t,r,o,l)}function Q(e,n,t,r,o,l){var i=e.bp;if(c(i))return le(e,n,t,r,o,l);if(Le){var a=v(e,i,t,r,o);if(!u(a))return u(n)||n.appendChild(a),a}return oe(e,i,n,t,r,o)}function Z(e,n,t,r,o,l){var i=e.items,a=document.createTextNode(""),s=document.createDocumentFragment();return ie(i,s,t,r,o,l),e.pointer=a,e.dom=s,s.appendChild(a),n&&D(n,s),s}function $(e,n){var t=document.createTextNode(e.text);return e.dom=t,n&&D(n,t),t}function ee(e,n){var t=document.createTextNode("");return e.dom=t,n&&D(n,t),t}function ne(e){"select"===e.tag&&F(e)}function te(e,n,t,r){ne(e);var o=e.attrs;if(u(n.attrKeys)){var l=Object.keys(o);n.attrKeys=n.attrKeys?n.attrKeys.concat(l):l}var i=n.attrKeys;ce(e,o,i,t,r)}function re(e,n,t){var r=e.events;u(n.eventKeys)&&(n.eventKeys=Object.keys(r));var o=n.eventKeys;ue(r,o,t)}function oe(e,n,t,r,o,l){var i=e.tag;if(d(n.isComponent))return de(e,i,e.attrs||{},e.hooks,e.children,l,t,r,o);var a=V(n.tag,n.isSVG);e.dom=a,d(n.hasHooks)&&q(e.hooks,r,a),d(n.lazy)&&je(e,r,a);var s=e.children;switch(n.childrenType){case 1:U(s,a,!0);break;case 2:J(e.children,a,r,o,l,n.isSVG);break;case 3:ie(s,a,r,o,l,n.isSVG);break;case 4:for(var c=0;c<s.length;c++)J(s[c],a,r,o,l,n.isSVG);break;case 5:ae(e,s,a,r,o,l,n.isSVG)}return d(n.hasAttrs)&&te(e,n,a,l),d(n.hasClassName)&&(a.className=e.className),d(n.hasStyle)&&we(null,e.style,a),d(n.hasEvents)&&re(e,n,a),u(t)||t.appendChild(a),a}function le(e,n,t,r,s,d){var c=e.tag;if(i(c))return de(e,c,e.attrs||{},e.hooks,e.children,s,n,t,r);if(!a(c)||""===c)throw Error("Inferno Error: Expected function or string for element tag type");"svg"===c&&(d=!0);var f=V(c,d),m=e.children,v=e.attrs,p=e.events,h=e.hooks,g=e.className,y=e.style;return e.dom=f,o(h)||q(h,t,f),l(m)||ae(e,m,f,t,r,s,d),o(v)||(ne(e),ce(e,v,Object.keys(v),f,s)),o(g)||(f.className=g),o(y)||we(null,y,f),o(p)||ue(p,Object.keys(p),f),u(n)||n.appendChild(f),f}function ie(e,n,t,r,o,l){e.complex=!1;for(var i=0;i<e.length;i++){var a=A(e,i);S(a)?($(a,n),e.complex=!0):O(a)?(ee(a,n),e.complex=!0):M(a)?(Z(a,n,t,r,o,l),e.complex=!0):J(a,n,t,r,o,l)}}function ae(e,t,o,i,a,s,u){n(t)?ie(t,o,i,a,s,u):r(t)?U(t,o,!0):l(t)||J(t,o,i,a,s,u)}function se(e,n,t){!l(e)&&a(n)&&(e.refs[n]=t)}function ue(e,n,t){for(var r=0;r<n.length;r++){var o=n[r];t[o]=e[o]}}function de(n,r,i,a,s,u,d,c,f){i=e(s,i);var m;if(t(r)){var v=new r(i);v._patch=fe,v._componentToDOMNodeMap=nn,!o(u)&&i.ref&&se(u,i.ref,v);var p=v.getChildContext();o(p)||(f=Object.assign({},f,p)),v.context=f,v._unmounted=!1,v._parentNode=n,u&&(v._parentComponent=u),v._pendingSetState=!0,v.componentWillMount();var h=v.render();l(h)&&(h=C()),v._pendingSetState=!1,m=J(h,null,c,f,v,!1),v._lastNode=h,v.componentDidMount(),null===d||l(m)||d.appendChild(m),nn.set(v,m),n.dom=m,n.instance=v}else{o(a)||(o(a.componentWillMount)||a.componentWillMount(null,i),o(a.componentDidMount)||c.addListener(function(){a.componentDidMount(m,i)}));var g=r(i,f);l(g)&&(g=C()),m=J(g,null,c,f,null,!1),n.instance=g,null===d||l(m)||d.appendChild(m),n.dom=m}return m}function ce(e,n,t,r,o){for(var l=0;l<t.length;l++){var i=t[l];"ref"===i?se(m(e,o),n[i],r):be(i,null,n[i],r)}}function fe(e,n,t,o,i,a,s){if(e!==n)if(l(e))J(n,t,o,i,a,s);else if(l(n))K(e,t);else if(r(e))if(r(n))t.firstChild.nodeValue=n;else{var u=J(n,null,o,i,a,s);n.dom=u,G(t,u,t.firstChild)}else if(r(n))G(t,document.createTextNode(n),e.dom);else if(M(n))M(e)?Ne(e,n,t,o,i,a,s):(G(t,Z(n,null),e.dom),h(e,null));else if(M(e))j(t,e,J(n,null,o,i,a,s));else if(O(n))O(e)?Se(e,n):(G(t,ee(n,null),e.dom),h(e,null));else if(O(e))G(t,J(n,null,o,i,a,s),e.dom);else if(S(n))S(e)?Oe(e,n):(G(t,$(n,null),e.dom),h(e,null));else if(S(e))G(t,J(n,null,o,i,a,s),e.dom);else if(T(n))T(e)?he(e,n,t,o,i,a,s,!1):(G(t,mountVNode(n,null,o,i,a,s),e.dom),h(e,null));else{if(!T(e))return fe(e,normalise(n),parentDomdom,o,i,a,s);G(t,J(n,null,o,i,a,s),e.dom),h(e,null)}return n}function me(e,n,t){r(n)?e.firstChild.nodeValue=t:e.textContent=t}function ve(e,n,t,r){e&&(a(n)&&delete e.refs[n],a(t)&&(e.refs[t]=r))}function pe(e,t,o,i,a,s,u){var d=t.children,c=e.children;if(c!==d)if(l(c))r(d)?me(o,c,d):l(d)||(n(d)?ie(d,o,i,a,s,u):J(d,o,i,a,s,u));else if(l(d))Y(o,c);else if(n(c))n(d)?(d.complex=c.complex,z(c,d)?Me(c,d,o,i,a,s,u,null):_e(c,d,o,i,a,s,u,null)):_e(c,[d],o,i,a,s,u,null);else if(n(d)){var f=c;r(c)&&(f=b(f),f.dom=o.firstChild),_e([f],d,o,i,a,s,u,null)}else r(d)?me(o,c,d):r(c)?fe(c,d,o,i,a,s,u):he(c,d,o,i,a,s,u,!1)}function he(e,n,t,r,o,l,i,a){var s=e.bp,u=n.bp;void 0===s||void 0===u?ye(e,n,t,r,o,l,i):ge(e,n,s,u,t,r,o,l,a)}function ge(e,n,r,i,a,s,u,d,c){var f;i.hasHooks===!0&&(f=n.hooks,f&&!o(f.willUpdate)&&f.willUpdate(e.dom));var m=n.tag||i.tag,v=e.tag||r.tag;if(v!==m)if(r.isComponent===!0){var p=e.instance;if(i.isComponent===!0)E(e,n,a,s,u,d,!1);else if(t(v)){y(e,null,!0);var h=p._lastNode;ge(h,n,h.bp,i,a,s,u,d,i.isSVG)}else y(e,null,!0),ge(p,n,p.bp,i,a,s,u,d,i.isSVG)}else E(e,n,a,s,u,d,i.isSVG);else if(o(v))n.dom=e.dom;else if(r.isComponent===!0){if(i.isComponent===!0){var g=e.instance;if(!o(g)&&g._unmounted){var k=de(n,v,n.attrs||{},n.hooks,n.children,g,a,s,u);null!==a&&G(a,k,e.dom)}else n.instance=g,n.dom=e.dom,Ce(!0,n,n.tag,r,i,g,e.attrs||{},n.attrs||{},n.hooks,n.children,a,s,u)}}else{var w=e.dom,x=r.childrenType,b=i.childrenType;if(n.dom=w,i.lazy===!0&&c===!1){var C=e.clipData;if(null===s.scrollY&&s.refresh(),n.clipData=C,(C.pending===!0||C.top-s.scrollY>s.screenHeight)&&setClipNode(C,w,e,n,a,s,u,d,r.isSVG))return;if(C.bottom<s.scrollY&&setClipNode(C,w,e,n,a,s,u,d,r.isSVG))return}if(x>0||b>0)if(5===b||5===x)pe(e,n,w,s,u,d);else{var N=e.children,_=n.children;0===x||l(N)?b>2?ie(_,w,s,u,d):J(_,w,s,u,d):0===b||l(_)?x>2?Y(w,N):K(N,w):N!==_&&(4===x&&4===b?Me(N,_,w,s,u,d,i.isSVG,null):2===x&&2===b?fe(N,_,w,s,u,d,!0,i.isSVG):1===x&&1===b?me(w,N,_):pe(e,n,w,s,u,d,i.isSVG))}if(r.hasAttrs!==!0&&i.hasAttrs!==!0||ke(e,n,r.attrKeys,i.attrKeys,w,d),r.hasEvents!==!0&&i.hasEvents!==!0||xe(e.events,n.events,r.eventKeys,i.eventKeys,w),r.hasClassName===!0||i.hasClassName===!0){var S=n.className;e.className!==S&&(o(S)?w.removeAttribute("class"):w.className=S)}if(r.hasStyle===!0||i.hasStyle===!0){var O=n.style,M=e.style;M!==O&&we(M,O,w)}i.hasHooks!==!0||o(f.didUpdate)||f.didUpdate(w),P(m,n)}}function ye(e,n,r,l,a,s,u){var d=n.hooks,c=!o(d);c&&!o(d.willUpdate)&&d.willUpdate(e.dom);var f=n.tag||(o(n.bp)?null:n.bp.tag),m=e.tag||(o(e.bp)?null:e.bp.tag);if("svg"===f&&(u=!0),m!==f){var v=e.instance;i(m)?i(f)?E(e,n,r,l,a,s,u):t(m)?(y(e,null,!0),ye(v._lastNode,n,r,l,a,s,u)):(y(e,null,!0),ye(v,n,r,l,a,s,u)):E(v||e,n,r,l,a,s,u)}else if(o(m))n.dom=e.dom;else if(i(m)){if(i(f)){var p=e._instance;if(!o(p)&&p._unmounted){var h=de(n,m,n.attrs||{},n.hooks,n.children,p,r,l,a);null!==r&&G(r,h,e.dom)}else n.instance=e.instance,n.dom=e.dom,Ce(!1,n,n.tag,null,null,n.instance,e.attrs||{},n.attrs||{},n.hooks,n.children,r,l,a)}}else{var g=e.dom,k=n.className,w=n.style;n.dom=g,pe(e,n,g,l,a,s,u),ke(e,n,null,null,g,s),xe(e.events,n.events,null,null,g),e.className!==k&&(o(k)?g.removeAttribute("class"):g.className=k),e.style!==w&&we(e.style,w,g),c&&!o(d.didUpdate)&&d.didUpdate(g),P(f,n)}}function ke(e,n,t,r,l,i){"select"===e.tag&&F(n);var a=n.attrs,s=e.attrs,u=o(a),d=!o(s);if(!u)for(var c=r||Object.keys(a),f=c.length,m=0;f>m;m++){var v=c[m],p=d&&s[v],h=a[v];p!==h&&("ref"===v?ve(i,p,h,l):be(v,p,h,l))}if(d)for(var g=t||Object.keys(s),y=g.length,k=0;y>k;k++){var w=g[k];(u||o(a[w]))&&("ref"===w?ve(getRefInstance(node,i),s[w],null,l):l.removeAttribute(w))}}function we(e,n,t){if(a(n))t.style.cssText=n;else if(o(e)){if(!o(n))for(var r=Object.keys(n),l=0;l<r.length;l++){var i=r[l],u=n[i];s(u)&&!qe[i]?t.style[i]=u+"px":t.style[i]=u}}else if(o(n))t.removeAttribute("style");else{for(var d=Object.keys(n),c=0;c<d.length;c++){var f=d[c],m=n[f];s(m)&&!qe[f]?t.style[f]=m+"px":t.style[f]=m}for(var v=Object.keys(e),p=0;p<v.length;p++){var h=v[p];o(n[h])&&(t.style[h]="")}}}function xe(e,n,t,r,l){var i=!o(n),a=!o(e);if(i)if(a){for(var s=r||Object.keys(n),u=0;u<s.length;u++){var d=s[u],c=e[d],f=n[d];c!==f&&(l[d]=f)}for(var m=t||Object.keys(e),v=0;v<m.length;v++){var p=m[v];o(n[p])&&(l[p]=null)}}else mountEvents(n,r,l);else a&&I(e,r,l)}function be(e,n,t,r){if("dangerouslySetInnerHTML"===e){var l=n&&n.__html,i=t&&t.__html;if(o(i))throw new Error("Inferno Error: dangerouslySetInnerHTML requires an object with a __html propety containing the innerHTML content");l!==i&&(r.innerHTML=i)}else if(ze[e])r[e]=null===t?"":t;else if(Re[e])r[e]=!!t;else{var a=Fe[e];t===!1||o(t)?void 0!==a?r.removeAttributeNS(a,e):r.removeAttribute(e):void 0!==a?r.setAttributeNS(a,e,t===!0?e:t):r.setAttribute(e,t===!0?e:t)}}function Ce(n,r,i,a,s,u,d,c,f,m,v,p,h){if(c=e(m,c),t(i)){var g=u.props,y=u.state,k=u.state,w=u.getChildContext();o(w)||(h=Object.assign({},h,w)),u.context=h;var x=u._updateComponent(y,k,g,c);x===He?x=u._lastNode:o(x)&&(x=C()),fe(u._lastNode,x,v,p,h,u,null,!1),r.dom=x.dom,u._lastNode=x,nn.set(u,x.dom)}else{var b=!0,N=n&&s.hasHooks===!0||!o(f);if(N&&!o(f.componentShouldUpdate)&&(b=f.componentShouldUpdate(r.dom,d,c)),b!==!1){N&&!o(f.componentWillUpdate)&&f.componentWillUpdate(r.dom,d,c);var _=i(c,h);l(_)&&(_=C()),_.dom=r.dom,fe(u,_,v,p,h,null,null,!1),r.instance=_,N&&!o(f.componentDidUpdate)&&f.componentDidUpdate(r.dom,d,c)}}}function Ne(e,n,t,r,o,l,i){var a=e.items,s=n.items,u=e.pointer;n.dom=e.dom,n.pointer=u,!a!==s&&(z(a,s)?Me(a,s,t,r,o,l,i,n):_e(a,s,t,r,o,l,i,n))}function _e(e,n,t,r,o,l,i,a){for(var s=e.length,u=n.length,d=s>u?u:s,c=0;d>c;c++){var f=e[c],m=A(n,c);fe(f,m,t,r,o,l,i)}if(u>s)for(c=d;u>c;c++){var v=A(n,c);D(t,J(v,null,r,o,l,i),a&&a.pointer)}else if(s>u)for(c=d;s>c;c++)K(e[c],t)}function Se(e,n){n.dom=e.dom}function Oe(e,n){var t=n.text,r=e.dom;n.dom=r,e.text!==t&&(r.nodeValue=t)}function Me(e,n,t,r,o,l,i,a){for(var s,u,d,c,f,m=e.length,v=n.length,p=m-1,h=v-1,g=0,y=0,k=null,w=null,x=null,b=null,C=0;p>=g&&h>=y&&(w=n[y],k=e[g],w.key===k.key);)he(k,w,t,r,o,l,i,!1),y++,g++;for(;p>=g&&h>=y&&(x=n[h],b=e[p],x.key===b.key);)he(b,x,t,r,o,l,i,!1),h--,p--;for(;p>=g&&h>=y&&(x=n[h],k=e[g],x.key===k.key);)d=v>h+1?n[h+1].dom:null,he(k,x,t,r,o,l,i,!1),D(t,x.dom,d),h--,g++;for(;p>=g&&h>=y&&(w=n[y],b=e[p],w.key===b.key);)d=e[g].dom,he(b,w,t,r,o,l,i,!1),D(t,w.dom,d),y++,p--;if(g>p){if(h>=y)for(d=v>h+1?n[h+1].dom:a&&a.pointer;h>=y;y++)D(t,J(n[y],null,r,o,l,i),d)}else if(y>h)for(;p>=g;)K(e[g++],t);else{var N=p-g+1,_=h-y+1,S=new Array(_);for(s=0;_>s;s++)S[s]=-1;var O=!1,M=0;if(16>=N*_)for(s=g;p>=s;s++){var T=!0;for(b=e[s],u=y;h>=u;u++)if(x=n[u],b.key===x.key){S[u-y]=s,C>u?O=!0:C=u,he(b,x,t,r,o,l,i,!1),T=!1;break}T&&(K(b,t),M++)}else{var j=new Map;for(s=y;h>=s;s++)f=n[s],j.set(f.key,s);for(s=p;s>=g;s--)b=e[s],u=j.get(b.key),void 0===u?(K(b,t),M++):(x=n[u],S[u-y]=s,C>u?O=!0:C=u,he(b,x,t,r,o,l,i,!1))}if(O){var V=Te(S);for(u=V.length-1,s=_-1;s>=0;s--)-1===S[s]?(c=s+y,d=v>c+1?n[c+1].dom:a&&a.pointer,D(t,J(n[c],null,r,o,l,i),d)):0>u||s!==V[u]?(c=s+y,d=v>c+1?n[c+1].dom:a&&a.pointer,D(t,n[c].dom,d)):u--}else if(N-M!==_)for(s=_-1;s>=0;s--)-1===S[s]&&(c=s+y,d=v>c+1?n[c+1].dom:a&&a.pointer,D(t,J(n[c],null,r,o,l,i),d))}}function Te(e){var n=e.slice(0),t=[];t.push(0);var r,o,l,i,a;for(r=0;r<e.length;r++)if(-1!==e[r])if(o=t[t.length-1],e[o]<e[r])n[r]=o,t.push(r);else{for(l=0,i=t.length-1;i>l;)a=(l+i)/2|0,e[t[a]]<e[r]?l=a+1:i=a;e[r]<e[t[l]]&&(l>0&&(n[r]=t[l-1]),t[l]=r)}for(l=t.length,i=t[l-1];l-- >0;)t[l]=i,i=n[i];return t}function De(){this._listeners=[],this.scrollX=null,this.scrollY=null,this.screenHeight=Pe,this.screenWidth=Be}function je(e,n,t){n.addListener(function(){var r=t.getBoundingClientRect();null===n.scrollY&&n.refresh(),e.clipData={top:r.top+n.scrollY,left:r.left+n.scrollX,bottom:r.bottom+n.scrollY,right:r.right+n.scrollX,pending:!1}})}function Ve(e,n,t,r,o,l,i){var a=n[t.i];if(S(e)){var s=e.text;if(e.dom=a,3===a.nodeType&&""!==s)a.nodeValue=s;else{var u=$(s);G(r,u,a),n.splice(n.indexOf(a),1,u),e.dom=u}}else if(O(e))e.dom=a;else if(M(e)){var d=e.items;e.dom=document.createDocumentFragment();for(var c=0;c<d.length;c++){var f=Ve(A(d,c),n,t,r,o,l,i);if(f)return!0}var m=n[t.i++];if(!m||3!==m.nodeType)return!0;e.pointer=m}else{var v=Ge(e,a,r,o,l,i,!1);if(v)return!0}t.i++}function Ue(e){for(var n=[],t=e.childNodes,r=t.length,o=0;r>o;){var l=t[o];if(8===l.nodeType)if("!"===l.data){var i=document.createTextNode("");e.replaceChild(i,l),n.push(i),o++}else e.removeChild(l),r--;else n.push(l),o++}return n}function Ee(n,r,i,a,s,u,d,c,f,m,v){if(i=e(s,i),!t(r)){var p=n.instance=r(i);return o(a)||(o(a.componentWillMount)||a.componentWillMount(null,i),o(a.componentDidMount)||c.addListener(function(){a.componentDidMount(u,i)})),Ge(p,u,d,c,f,p,v)}var h=n.instance=new r(i);h._patch=fe,!o(m)&&i.ref&&se(m,i.ref,h);var g=h.getChildContext();o(g)||(f=Object.assign({},f,g)),h.context=f,h._unmounted=!1,h._parentNode=n,m&&(h._parentComponent=m),h._pendingSetState=!0,h.componentWillMount();var y=h.render();h._pendingSetState=!1,l(y)&&(y=C()),Ge(y,u,d,c,f,h,v),h._lastNode=y,h.componentDidMount()}function Ge(e,t,l,a,s,u,d){var c=e.bp,f=e.tag||c.tag;if(i(f))e.dom=t,Ee(e,f,e.attrs||{},e.hooks,e.children,t,l,a,s,u,d);else if(1!==t.nodeType||f!==t.tagName.toLowerCase());else{e.dom=t;var m=e.hooks;(c&&c.hasHooks===!0||!o(m))&&q(m,a,t);var v=e.children;if(!o(v))if(r(v))t.textContent!==v&&(t.textContent=v);else{var p=Ue(t),h={i:0},g=!1;if(n(v))for(var y=0;y<v.length&&!(g=Ve(A(v,y),p,h,t,a,s,u));y++);else g=1===p.length?Ve(v,p,h,t,a,s,u):!0}var k=e.className,w=e.style;if(o(k)||(t.className=k),o(w)||we(null,w,t),c&&c.hasAttrs===!0)te(e,c,t,u);else{var x=e.attrs;o(x)||(ne(e),ce(e,x,Object.keys(x),t,u))}if(c&&c.hasEvents===!0)re(e,c,t);else{var b=e.events;o(b)||ue(b,Object.keys(b),t)}}}function We(e,n,t){if(n&&1===n.nodeType){var r=n.querySelector("[data-infernoroot]");if(r&&r.parentNode===n)return Ge(e,r,n,t,{},!0),!0}return n!==$e?n.textContent="":console.warn('Inferno Warning: rendering to the "document.body" is dangerous! Use a dedicated container element instead.'),!1}function Ae(e){return nn.get(e)||null}function Ke(e,n){var t=en.get(n),r=new De;if(c(t))l(e)||(We(e,n,r)||J(e,n,r,{},null,!1),r.trigger(),en.set(n,{input:e}));else{var o=L(),i=fe(t.input,e,n,r,{},null,!1);r.trigger(),u(e)&&en.delete(n),t.input=i,X(o)}}var He="NO_RENDER",Ie="undefined"!=typeof window&&window.document,Le=!0,Ye="http://www.w3.org/1999/xlink",Xe="http://www.w3.org/XML/1998/namespace",ze={},Re={},Fe={},qe={};_("xlink:href,xlink:arcrole,xlink:actuate,xlink:role,xlink:titlef,xlink:type",Fe,Ye),_("xml:base,xml:lang,xml:space",Fe,Xe),_("volume,value",ze,!0),_("muted,scoped,loop,open,checked,default,capture,disabled,selected,readonly,multiple,required,autoplay,controls,seamless,reversed,allowfullscreen,novalidate",Re,!0),_("animationIterationCount,borderImageOutset,borderImageSlice,borderImageWidth,boxFlex,boxFlexGroup,boxOrdinalGroup,columnCount,flex,flexGrow,flexPositive,flexShrink,flexNegative,flexOrder,gridRow,gridColumn,fontWeight,lineClamp,lineHeight,opacity,order,orphans,tabSize,widows,zIndex,zoom,fillOpacity,floodOpacity,stopOpacity,strokeDasharray,strokeDashoffset,strokeMiterlimit,strokeOpacity,strokeWidth,",qe,!0);var Be=Ie&&window.screen.width,Pe=Ie&&window.screen.height,Je=0,Qe=0,Ze=0;Ie&&(window.onscroll=function(){Je=window.scrollX,Qe=window.scrollY,Ze=performance.now()},window.resize=function(){Je=window.scrollX,Qe=window.scrollY,Be=window.screen.width,Pe=window.screen.height,Ze=performance.now()}),De.prototype={refresh:function(){this.scrollX=Ie&&window.scrollX,this.scrollY=Ie&&window.scrollY},addListener:function(e){this._listeners.push(e)},trigger:function(){for(var e=this,n=0;n<this._listeners.length;n++)e._listeners[n]()}};var $e=document.body,en=new Map,nn=new Map,tn={render:Ke,findDOMNode:Ae,mount:J,patch:fe,unmount:h};return tn}); |
/*! | ||
* inferno-router v0.7.15 | ||
* inferno-router v0.7.16 | ||
* (c) 2016 Dominic Gannaway | ||
@@ -183,6 +183,3 @@ * Released under the MIT License. | ||
} else { | ||
var pendingState = component._pendingState; | ||
var oldState = component.state; | ||
component.state = Object.assign({}, oldState, pendingState); | ||
component.state = Object.assign({}, component.state, component._pendingState); | ||
component._pendingState = {}; | ||
@@ -193,3 +190,3 @@ } | ||
function applyState(component, force, callback) { | ||
if (!component._deferSetState || force) { | ||
if ((!component._deferSetState || force) && !component._blockRender) { | ||
component._pendingSetState = false; | ||
@@ -235,2 +232,3 @@ var pendingState = component._pendingState; | ||
this.refs = {}; | ||
this._blockRender = false; | ||
this._blockSetState = false; | ||
@@ -305,5 +303,10 @@ this._deferSetState = false; | ||
if (prevProps !== nextProps) { | ||
this._blockSetState = true; | ||
this._blockRender = true; | ||
this.componentWillReceiveProps(nextProps); | ||
this._blockSetState = false; | ||
this._blockRender = false; | ||
if (this._pendingSetState) { | ||
nextState = Object.assign({}, nextState, this._pendingState); | ||
this._pendingSetState = false; | ||
this._pendingState = {}; | ||
} | ||
} | ||
@@ -310,0 +313,0 @@ var shouldUpdate = this.shouldComponentUpdate(nextProps, nextState); |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.InfernoRouter=e()}(this,function(){"use strict";function t(t){return t instanceof Array}function e(t){return o(t)||n(t)}function n(t){return null===t}function o(t){return void 0===t}function r(t){this.bp=t,this.dom=null,this.instance=null,this.tag=null,this.children=null,this.style=null,this.className=null,this.attrs=null,this.events=null,this.hooks=null,this.key=null,this.clipData=null}function i(t){return new r(t)}function s(){this.placeholder=!0,this.dom=null}function a(){return new s}function l(t,e,n){t.split(",").forEach(function(t){return e[t]=n})}function u(){this._listeners=[],this.scrollX=null,this.scrollY=null,this.screenHeight=T,this.screenWidth=M}function c(){return document.activeElement}function p(t){t!==document.body&&document.activeElement!==t&&t.focus()}function h(t,e,n){for(var o in e)t._pendingState[o]=e[o];if(t._pendingSetState){var r=t._pendingState,i=t.state;t.state=Object.assign({},i,r),t._pendingState={}}else t._pendingSetState=!0,d(t,!1,n)}function d(t,n,o){if(!t._deferSetState||n){t._pendingSetState=!1;var r=t._pendingState,i=t.state,s=Object.assign({},i,r);t._pendingState={};var l=t._updateComponent(i,s,t.props,t.props,n);l===R?l=t._lastNode:e(l)&&(l=a());var h=t._lastNode,d=h.dom.parentNode,f=c(),m=new u;t._patch(h,l,d,m,t.context,t,null),t._lastNode=l,t._componentToDOMNodeMap.set(t,l.dom),t._parentNode.dom=l.dom,m.trigger(),e(o)||o(),p(f)}}function f(t){return m(t).split("/")}function m(t){return t.replace(/(^\/+|\/+$)/g,"")}function y(t){if(-1===t.indexOf("#"))t="/";else{var e=t.split("#!");e.shift(),t=e.join("")}return t}function g(t,e,n){void 0===n&&(n=L);var o,r=/(?:\?([^#]*))?(#.*)?$/,i=t.match(r),s={};if(i&&i[1])for(var a=i[1].split("&"),l=0;l<a.length;l++){var u=a[l].split("=");s[decodeURIComponent(u[0])]=decodeURIComponent(u.slice(1).join("="))}t=f(t.replace(r,"")),e=f(e||"");for(var c=Math.max(t.length,e.length),p=!1,h=0;c>h;h++)if(e[h]&&":"===e[h].charAt(0)){var d=e[h].replace(/(^\:|[+*?]+$)/g,""),m=(e[h].match(/[+*?]+$/)||L)[0]||"",y=~m.indexOf("+"),g=~m.indexOf("*"),w=t[h]||"";if(!w&&!g&&(m.indexOf("?")<0||y)){o=!1;break}if(s[d]=decodeURIComponent(w),y||g){s[d]=t.slice(h).map(decodeURIComponent).join("/");break}}else if(e[h]!==t[h]&&!p){if("*"!==e[h]||e.length!==h+1){o=!1;break}p=!0}return n.default!==!0&&o===!1?!1:s}function w(t,e){var n=t.attrs||L,o=e.attrs||L,r=v(o.path)-v(n.path);return r||o.path.length-n.path.length}function v(t){return(m(t).match(/\/+/g)||"").length}function _(e){return t(e)?e:e?[e]:e}function S(t,e,o,r,s){t.sort(w);for(var a=0;a<t.length;a++){var l=t[a],u=l.attrs,c=u.path,p=s+c,h=g(o?y(e):e,p),d=_(l.children);if(d){var f=S(d,e,o,r,p);if(!n(f))return f}if(h)return r?i().setTag(r).setChildren(l).setAttrs({params:h}):l.setAttrs(Object.assign({},{params:h},l.attrs))}return!s&&r?i().setTag(r):null}function x(t,e){var n=t.to,o=t.children,r=e.hashbang,s=e.history;return i().setAttrs({href:r?s.getHashbangRoot()+y("#!"+n):n}).setTag("a").setChildren(o)}function b(){var t="undefined"!=typeof location?location:EMPTY;return""+(t.pathname||"")+(t.search||"")+(t.hash||"")}function k(){var t="undefined"!=typeof location?location:EMPTY;return""+(t.protocol+"//"||"")+(t.host||"")+(t.pathname||"")+(t.search||"")+"#!"}function C(t){for(var e=!1,n=0;n<G.length;n++)G[n].routeTo(t)===!0&&(e=!0);return e}var R="NO_RENDER",O="undefined"!=typeof window&&window.document;r.prototype={setAttrs:function(t){return this.attrs=t,this},setTag:function(t){return this.tag=t,this},setStyle:function(t){return this.style=t,this},setClassName:function(t){return this.className=t,this},setChildren:function(t){return this.children=t,this},setHooks:function(t){return this.hooks=t,this},setEvents:function(t){return this.events=t,this},setKey:function(t){return this.key=t,this}};var U="http://www.w3.org/1999/xlink",W="http://www.w3.org/XML/1998/namespace",j={},E={},N={},I={};l("xlink:href,xlink:arcrole,xlink:actuate,xlink:role,xlink:titlef,xlink:type",N,U),l("xml:base,xml:lang,xml:space",N,W),l("volume,value",j,!0),l("muted,scoped,loop,open,checked,default,capture,disabled,selected,readonly,multiple,required,autoplay,controls,seamless,reversed,allowfullscreen,novalidate",E,!0),l("animationIterationCount,borderImageOutset,borderImageSlice,borderImageWidth,boxFlex,boxFlexGroup,boxOrdinalGroup,columnCount,flex,flexGrow,flexPositive,flexShrink,flexNegative,flexOrder,gridRow,gridColumn,fontWeight,lineClamp,lineHeight,opacity,order,orphans,tabSize,widows,zIndex,zoom,fillOpacity,floodOpacity,stopOpacity,strokeDasharray,strokeDashoffset,strokeMiterlimit,strokeOpacity,strokeWidth,",I,!0);var M=O&&window.screen.width,T=O&&window.screen.height,D=0,A=0,Y=0;O&&(window.onscroll=function(){D=window.scrollX,A=window.scrollY,Y=performance.now()},window.resize=function(){D=window.scrollX,A=window.scrollY,M=window.screen.width,T=window.screen.height,Y=performance.now()}),u.prototype={refresh:function(){this.scrollX=O&&window.scrollX,this.scrollY=O&&window.scrollY},addListener:function(t){this._listeners.push(t)},trigger:function(){for(var t=this,e=0;e<this._listeners.length;e++)t._listeners[e]()}};var H="Inferno Error: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.",P=function(t){this.props=t||{},this.state={},this.refs={},this._blockSetState=!1,this._deferSetState=!1,this._pendingSetState=!1,this._pendingState={},this._parentNode=null,this._lastNode=null,this._unmounted=!0,this.context={},this._patch=null,this._parentComponent=null,this._componentToDOMNodeMap=null};P.prototype.render=function(){},P.prototype.forceUpdate=function(t){if(this._unmounted)throw Error(H);d(this,!0,t)},P.prototype.setState=function(t,e){if(this._unmounted)throw Error(H);if(this._blockSetState!==!1)throw Error("Inferno Warning: Cannot update state via setState() in componentWillUpdate()");h(this,t,e)},P.prototype.componentDidMount=function(){},P.prototype.componentWillMount=function(){},P.prototype.componentWillUnmount=function(){},P.prototype.componentDidUpdate=function(){},P.prototype.shouldComponentUpdate=function(){return!0},P.prototype.componentWillReceiveProps=function(){},P.prototype.componentWillUpdate=function(){},P.prototype.getChildContext=function(){},P.prototype._updateComponent=function(t,n,o,r,i){if(this._unmounted===!0)return this._unmounted=!1,!1;if(!e(r)&&e(r.children)&&(r.children=o.children),o!==r||t!==n||i){o!==r&&(this._blockSetState=!0,this.componentWillReceiveProps(r),this._blockSetState=!1);var s=this.shouldComponentUpdate(r,n);if(s!==!1||i){this._blockSetState=!0,this.componentWillUpdate(r,n),this._blockSetState=!1,this.props=r,this.state=n;var a=this.render();return this.componentDidUpdate(o,t),a}}return R};var X={pending:"pending",fulfilled:"fulfilled",rejected:"rejected"},z=function(t){function e(e){t.call(this,e),this.state={async:null}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.async=function t(){var e=this,t=this.props.async;t&&(this.setState({async:{status:X.pending}}),t(this.props.params).then(function(t){e.setState({async:{status:X.fulfilled,value:t}})},this.reject).catch(this.reject))},e.prototype.reject=function(t){this.setState({async:{status:X.rejected,value:t}})},e.prototype.componentWillReceiveProps=function(){this.async()},e.prototype.componentWillMount=function(){this.async()},e.prototype.render=function(){var t=this.props,e=t.component,n=t.params;return i().setTag(e).setAttrs({params:n,async:this.state.async})},e}(P),L={},$=function(t){function e(e){if(t.call(this,e),!e.history)throw new Error('Inferno Error: "inferno-router" Router components require a "history" prop passed.');this._didRoute=!1,this.state={url:e.url||e.history.getCurrentUrl()}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getChildContext=function(){return{history:this.props.history,hashbang:this.props.hashbang}},e.prototype.componentWillMount=function(){this.props.history.addRouter(this)},e.prototype.componentWillUnmount=function(){this.props.history.removeRouter(this)},e.prototype.routeTo=function(t){return this._didRoute=!1,this.setState({url:t}),this._didRoute},e.prototype.render=function(){var t=_(this.props.children),e=this.props.url||this.state.url,n=this.props.component,o=this.props.hashbang;return S(t,e,o,n,"")},e}(P),G=[];O&&window.addEventListener("popstate",function(){return C(b())});var q={addRouter:function(t){G.push(t)},removeRouter:function(t){G.splice(G.indexOf(t),1)},getCurrentUrl:b,getHashbangRoot:k},F={Route:z,Router:$,Link:x,browserHistory:q};return F}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.InfernoRouter=e()}(this,function(){"use strict";function t(t){return t instanceof Array}function e(t){return o(t)||n(t)}function n(t){return null===t}function o(t){return void 0===t}function r(t){this.bp=t,this.dom=null,this.instance=null,this.tag=null,this.children=null,this.style=null,this.className=null,this.attrs=null,this.events=null,this.hooks=null,this.key=null,this.clipData=null}function i(t){return new r(t)}function s(){this.placeholder=!0,this.dom=null}function a(){return new s}function l(t,e,n){t.split(",").forEach(function(t){return e[t]=n})}function u(){this._listeners=[],this.scrollX=null,this.scrollY=null,this.screenHeight=T,this.screenWidth=M}function p(){return document.activeElement}function c(t){t!==document.body&&document.activeElement!==t&&t.focus()}function h(t,e,n){for(var o in e)t._pendingState[o]=e[o];t._pendingSetState?(t.state=Object.assign({},t.state,t._pendingState),t._pendingState={}):(t._pendingSetState=!0,d(t,!1,n))}function d(t,n,o){if((!t._deferSetState||n)&&!t._blockRender){t._pendingSetState=!1;var r=t._pendingState,i=t.state,s=Object.assign({},i,r);t._pendingState={};var l=t._updateComponent(i,s,t.props,t.props,n);l===C?l=t._lastNode:e(l)&&(l=a());var h=t._lastNode,d=h.dom.parentNode,f=p(),m=new u;t._patch(h,l,d,m,t.context,t,null),t._lastNode=l,t._componentToDOMNodeMap.set(t,l.dom),t._parentNode.dom=l.dom,m.trigger(),e(o)||o(),c(f)}}function f(t){return m(t).split("/")}function m(t){return t.replace(/(^\/+|\/+$)/g,"")}function y(t){if(-1===t.indexOf("#"))t="/";else{var e=t.split("#!");e.shift(),t=e.join("")}return t}function g(t,e,n){void 0===n&&(n=L);var o,r=/(?:\?([^#]*))?(#.*)?$/,i=t.match(r),s={};if(i&&i[1])for(var a=i[1].split("&"),l=0;l<a.length;l++){var u=a[l].split("=");s[decodeURIComponent(u[0])]=decodeURIComponent(u.slice(1).join("="))}t=f(t.replace(r,"")),e=f(e||"");for(var p=Math.max(t.length,e.length),c=!1,h=0;p>h;h++)if(e[h]&&":"===e[h].charAt(0)){var d=e[h].replace(/(^\:|[+*?]+$)/g,""),m=(e[h].match(/[+*?]+$/)||L)[0]||"",y=~m.indexOf("+"),g=~m.indexOf("*"),_=t[h]||"";if(!_&&!g&&(m.indexOf("?")<0||y)){o=!1;break}if(s[d]=decodeURIComponent(_),y||g){s[d]=t.slice(h).map(decodeURIComponent).join("/");break}}else if(e[h]!==t[h]&&!c){if("*"!==e[h]||e.length!==h+1){o=!1;break}c=!0}return n.default!==!0&&o===!1?!1:s}function _(t,e){var n=t.attrs||L,o=e.attrs||L,r=w(o.path)-w(n.path);return r||o.path.length-n.path.length}function w(t){return(m(t).match(/\/+/g)||"").length}function v(e){return t(e)?e:e?[e]:e}function S(t,e,o,r,s){t.sort(_);for(var a=0;a<t.length;a++){var l=t[a],u=l.attrs,p=u.path,c=s+p,h=g(o?y(e):e,c),d=v(l.children);if(d){var f=S(d,e,o,r,c);if(!n(f))return f}if(h)return r?i().setTag(r).setChildren(l).setAttrs({params:h}):l.setAttrs(Object.assign({},{params:h},l.attrs))}return!s&&r?i().setTag(r):null}function b(t,e){var n=t.to,o=t.children,r=e.hashbang,s=e.history;return i().setAttrs({href:r?s.getHashbangRoot()+y("#!"+n):n}).setTag("a").setChildren(o)}function x(){var t="undefined"!=typeof location?location:EMPTY;return""+(t.pathname||"")+(t.search||"")+(t.hash||"")}function k(){var t="undefined"!=typeof location?location:EMPTY;return""+(t.protocol+"//"||"")+(t.host||"")+(t.pathname||"")+(t.search||"")+"#!"}function R(t){for(var e=!1,n=0;n<G.length;n++)G[n].routeTo(t)===!0&&(e=!0);return e}var C="NO_RENDER",O="undefined"!=typeof window&&window.document;r.prototype={setAttrs:function(t){return this.attrs=t,this},setTag:function(t){return this.tag=t,this},setStyle:function(t){return this.style=t,this},setClassName:function(t){return this.className=t,this},setChildren:function(t){return this.children=t,this},setHooks:function(t){return this.hooks=t,this},setEvents:function(t){return this.events=t,this},setKey:function(t){return this.key=t,this}};var U="http://www.w3.org/1999/xlink",j="http://www.w3.org/XML/1998/namespace",W={},E={},N={},I={};l("xlink:href,xlink:arcrole,xlink:actuate,xlink:role,xlink:titlef,xlink:type",N,U),l("xml:base,xml:lang,xml:space",N,j),l("volume,value",W,!0),l("muted,scoped,loop,open,checked,default,capture,disabled,selected,readonly,multiple,required,autoplay,controls,seamless,reversed,allowfullscreen,novalidate",E,!0),l("animationIterationCount,borderImageOutset,borderImageSlice,borderImageWidth,boxFlex,boxFlexGroup,boxOrdinalGroup,columnCount,flex,flexGrow,flexPositive,flexShrink,flexNegative,flexOrder,gridRow,gridColumn,fontWeight,lineClamp,lineHeight,opacity,order,orphans,tabSize,widows,zIndex,zoom,fillOpacity,floodOpacity,stopOpacity,strokeDasharray,strokeDashoffset,strokeMiterlimit,strokeOpacity,strokeWidth,",I,!0);var M=O&&window.screen.width,T=O&&window.screen.height,D=0,A=0,Y=0;O&&(window.onscroll=function(){D=window.scrollX,A=window.scrollY,Y=performance.now()},window.resize=function(){D=window.scrollX,A=window.scrollY,M=window.screen.width,T=window.screen.height,Y=performance.now()}),u.prototype={refresh:function(){this.scrollX=O&&window.scrollX,this.scrollY=O&&window.scrollY},addListener:function(t){this._listeners.push(t)},trigger:function(){for(var t=this,e=0;e<this._listeners.length;e++)t._listeners[e]()}};var H="Inferno Error: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.",P=function(t){this.props=t||{},this.state={},this.refs={},this._blockRender=!1,this._blockSetState=!1,this._deferSetState=!1,this._pendingSetState=!1,this._pendingState={},this._parentNode=null,this._lastNode=null,this._unmounted=!0,this.context={},this._patch=null,this._parentComponent=null,this._componentToDOMNodeMap=null};P.prototype.render=function(){},P.prototype.forceUpdate=function(t){if(this._unmounted)throw Error(H);d(this,!0,t)},P.prototype.setState=function(t,e){if(this._unmounted)throw Error(H);if(this._blockSetState!==!1)throw Error("Inferno Warning: Cannot update state via setState() in componentWillUpdate()");h(this,t,e)},P.prototype.componentDidMount=function(){},P.prototype.componentWillMount=function(){},P.prototype.componentWillUnmount=function(){},P.prototype.componentDidUpdate=function(){},P.prototype.shouldComponentUpdate=function(){return!0},P.prototype.componentWillReceiveProps=function(){},P.prototype.componentWillUpdate=function(){},P.prototype.getChildContext=function(){},P.prototype._updateComponent=function(t,n,o,r,i){if(this._unmounted===!0)return this._unmounted=!1,!1;if(!e(r)&&e(r.children)&&(r.children=o.children),o!==r||t!==n||i){o!==r&&(this._blockRender=!0,this.componentWillReceiveProps(r),this._blockRender=!1,this._pendingSetState&&(n=Object.assign({},n,this._pendingState),this._pendingSetState=!1,this._pendingState={}));var s=this.shouldComponentUpdate(r,n);if(s!==!1||i){this._blockSetState=!0,this.componentWillUpdate(r,n),this._blockSetState=!1,this.props=r,this.state=n;var a=this.render();return this.componentDidUpdate(o,t),a}}return C};var X={pending:"pending",fulfilled:"fulfilled",rejected:"rejected"},z=function(t){function e(e){t.call(this,e),this.state={async:null}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.async=function t(){var e=this,t=this.props.async;t&&(this.setState({async:{status:X.pending}}),t(this.props.params).then(function(t){e.setState({async:{status:X.fulfilled,value:t}})},this.reject).catch(this.reject))},e.prototype.reject=function(t){this.setState({async:{status:X.rejected,value:t}})},e.prototype.componentWillReceiveProps=function(){this.async()},e.prototype.componentWillMount=function(){this.async()},e.prototype.render=function(){var t=this.props,e=t.component,n=t.params;return i().setTag(e).setAttrs({params:n,async:this.state.async})},e}(P),L={},$=function(t){function e(e){if(t.call(this,e),!e.history)throw new Error('Inferno Error: "inferno-router" Router components require a "history" prop passed.');this._didRoute=!1,this.state={url:e.url||e.history.getCurrentUrl()}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getChildContext=function(){return{history:this.props.history,hashbang:this.props.hashbang}},e.prototype.componentWillMount=function(){this.props.history.addRouter(this)},e.prototype.componentWillUnmount=function(){this.props.history.removeRouter(this)},e.prototype.routeTo=function(t){return this._didRoute=!1,this.setState({url:t}),this._didRoute},e.prototype.render=function(){var t=v(this.props.children),e=this.props.url||this.state.url,n=this.props.component,o=this.props.hashbang;return S(t,e,o,n,"")},e}(P),G=[];O&&window.addEventListener("popstate",function(){return R(x())});var q={addRouter:function(t){G.push(t)},removeRouter:function(t){G.splice(G.indexOf(t),1)},getCurrentUrl:x,getHashbangRoot:k},F={Route:z,Router:$,Link:b,browserHistory:q};return F}); |
/*! | ||
* inferno-server v0.7.15 | ||
* inferno-server v0.7.16 | ||
* (c) 2016 Dominic Gannaway | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* inferno-test-utils v0.7.15 | ||
* inferno-test-utils v0.7.16 | ||
* (c) 2016 Dominic Gannaway | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* inferno v0.7.15 | ||
* inferno v0.7.16 | ||
* (c) 2016 Dominic Gannaway | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
{ | ||
"name": "inferno", | ||
"version": "0.7.15", | ||
"version": "0.7.16", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "An extremely fast, isomorphic JavaScript library for building modern user interfaces", |
Sorry, the diff of this file is too big to display
304466
6489