Comparing version 8.1.0-beta.0 to 8.1.0-rc
@@ -1,14 +0,11 @@ | ||
## (Unreleased) | ||
## 8.1.0 (19 November 2017) | ||
- Adds top-level API `createFactory` to create element or renderer factories. | ||
- Adds `Children.find` and `Children.filter` to the top-level `Children` API. | ||
- Adds support for cross-realm element construction/consumption. | ||
- Improvements to the reconciler. | ||
- Improves importing async components with `import(...)`. | ||
- Fix #39 hydration of differing text node length. | ||
- Adds `Children.find` and `Children.filter` to the top-level `Children` API. | ||
- Adds top-level API `createFactory` to create element or renderer factories. | ||
- Adds support for cross-realm element construction/consumption. | ||
- Fix [#39](https://github.com/thysultan/dio.js/issues/39) hydration of differing text node length. | ||
- Fix [#40](https://github.com/thysultan/dio.js/issues/40) improves handling static hoisted elements. | ||
#### Reconciler Improvements | ||
The reconciler has gone through some improvments that aim to insure the shorterst path is taken to reach a reconciled state. | ||
#### createFactory | ||
@@ -24,4 +21,8 @@ | ||
The `Children.filter` API works like the Array.filter API in that it allows you filter element from the opaque children data-structure | ||
The `Children.filter` API works like the Array.filter API in that it allows you filter element from the opaque children data-structure. | ||
#### Reconciler Improvements | ||
The reconciler has gone through some improvments that aim to insure the shorterst path is taken to reach a reconciled state. | ||
#### Import(...) | ||
@@ -54,4 +55,2 @@ | ||
## 8.0.3 (09 October 2017) | ||
@@ -58,0 +57,0 @@ |
@@ -1,2 +0,2 @@ | ||
/*! DIO 8.1.0-beta.0 @license MIT */ | ||
/*! DIO 8.1.0-rc @license MIT */ | ||
@@ -3,0 +3,0 @@ module.exports = function (exports, Element, getComponentChildren, getComponentElement, getElementDefinition, mountComponentElement, invokeErrorBoundary) {/* eslint-disable */'use strict' |
@@ -1,2 +0,2 @@ | ||
!function(e){"use strict";function t(e,n,r){function o(){this.next=this,this.prev=this,this.length=0}function i(){this.hash=""}function c(){}function u(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t,n){for(var r in t)e[r]=t[r];for(var r in n)e[r]=n[r];return e}function f(e,t){for(var n=0;n<e.length;++n)on(e[n])?f(e[n],t):t.push(e[n]);return t}function s(e,t,n){if("function"==typeof e.find)return e.find(t,n);for(var r=0;r<e.length;++r)if(t.call(n,e[r],r,e))return e[r]}function l(e,t){if("function"==typeof e.forEach)return e.forEach(t);for(var n=0,r=e.next(r,n++);!r.done;)r=e.next(r.value,n=t(r.value,n))}function p(e,t){throw new Error("#"+e+"(...): "+t+".")}function h(e,t){for(var n in e)if(!rn.call(t,n))return!0;for(var n in t)if(!d(e[n],t[n]))return!0;return!1}function d(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function v(e){for(var t=0,n=0;t<e.length;++t)n=(n<<5)-n+e.charCodeAt(t);return n>>>0}function y(e){this.id=e,this.work=Nt,this.active=!1,this.xmlns="",this.key=null,this.ref=null,this.type=null,this.props=null,this.state=null,this.children=null,this.owner=null,this.instance=null,this.event=null,this.DOM=null,this.context=null,this.parent=null,this.host=null,this.next=null,this.prev=null}function m(e){var t=new y(e.id);return t.type=e.type,t.props=e.props,t.xmlns=e.xmlns,t.key=e.key,t.ref=e.ref,t.children=e.children,t}function w(e){var t=new y(ct);return t.children=e,t}function x(e,t){var n=new y(ft);return n.type=Gt,n.key=Bt+t,n.children=e+"",n}function b(e){var t=new y(st);return t.type=Wt,t.key=Bt+e,t.children="",t}function k(e){var t=new y(ot),n=new o,r=0;if(t.type=hn,t.children=n,E(e))N(n,e,r);else for(;r<e.length;++r)N(n,e[r],r);return P(n),t}function g(e,t){if("function"==typeof e[sn])return k(Ve(e));switch(typeof e){case"boolean":return b(t);case"object":if("function"!=typeof e.then)break;case"function":return C(e)}p(Lt,"Invalid element [object "+T(e)+"]")}function E(e){return null!=e&&e.constructor===pn}function C(e,t){var n=null!=t?1:2,r=0,i=0,c="function"!=typeof e?at:ut,u=arguments.length,f=new y(c),s={},l=c!==ut?new o:null;if(1===n&&"object"==typeof t&&void 0===t[sn])switch(t.constructor){case pn:break;default:if(on(t))break;case Object:if("function"==typeof t.then)break;j(f,(n++,s=t)),void 0!==s.children&&c!==ut&&(s.children=void(i=N(l,s.children,i)))}if((r=u-n)>0)if(c!==ut)for(;n<u;++n)i=N(l,arguments[n],i);else{if(r>1)for(l=[];n<u;++n)l.push(arguments[n]);else l=arguments[n];s.children=l}switch(typeof e){case"function":e.defaultProps&&(s=S(f,e,s));break;case"number":case"symbol":e===hn&&P((f.id=ot,l));break;case"object":E(e)?(j(f,s=a({},e.props,s)),f.id=e.id,e=e.type):"function"==typeof e.then&&P((f.id=rt,l))}return f.type=e,f.props=s,f.children=l,f}function j(e,t){void 0!==t.key&&(e.key=t.key),void 0!==t.ref&&(e.ref=t.ref),void 0!==t.xmlns&&(e.xmlns=t.xmlns)}function N(e,t,n){if(null!=t)if(t.constructor===pn)null===t.key&&(t.key=Bt+n),e.insert(null===t.next?t:m(t),e);else switch(typeof t){case"string":case"number":e.insert(x(t,n),e);break;case"object":if(on(t)){for(var r=0;r<t.length;++r)N(e,t[r],n+r);return n+r}default:return N(e,g(t,n),n)}else e.insert(b(n),e);return n+1}function P(e){e.insert(b(Ft),e.next),e.insert(b(It),e)}function M(e,t,n){e.insert(n,t),e.remove(t)}function S(e,t,n){return"function"==typeof t.defaultProps&&tn(t,"defaultProps",{value:ie(e,t.defaultProps)}),a({},t.defaultProps,n)}function T(e){switch(typeof e){case"function":return T(e.displayName||e.name);case"number":case"symbol":return T(e.toString());case"string":if(e)return e;default:return e&&e.constructor.name||"anonymous"}}function O(e,t,n){return E(e[n])?e[n].id===it?O(e[n],t,n):e[n]:e.host&&L(e.host)===e?O(e.host,t,n):t.id<ct?O(t,t.parent,n):w(e)}function A(e){return e.id<it?A(e.parent):e}function D(e,t){return e.id<ct?D(e.children[t]):e}function L(e){return e.id===ut?L(e.children):e}function _(e){if(null==e)return b(Bt);if(e.constructor===pn)return e;switch(typeof e){case"string":case"number":return x(e,Bt);case"object":if(on(e))return k(e);default:return g(e,Bt)}}function q(e){return!E(e)&&"object"==typeof e&&e&&rn.call(e,"default")?q(e.default):k(_(e))}function H(e,t){this.refs=null,this.state=null,this.props=e,this.context=t}function U(e,t){H.call(this,e,t)}function V(e){return tn(nn(e,{forceUpdate:{value:F},setState:{value:B}}),dn,{value:dn}),rn.call(e,Lt)||tn(e,Lt,{value:c,writable:!0}),e}function B(e,t){z(Z(this),this,e,t)}function F(e){Q(Z(this),this,e,vt)}function I(e){var t,n,r,o=e.type,i=e.props,c=e.context||{},u=o.prototype;return u&&u.render?(u[dn]!==dn&&V(u),t=o=X(e,o)):tn(t=new H,Lt,{value:o,writable:!0}),e.owner=o,e.instance=t,e.context=c,t[pn]=e,t.refs={},t.props=i,t.context=c,t.state=r=t.state||{},o[en]&&(e.state=ee(e,en,i,r,c))&&"function"==typeof(r=t.state=e.state).then&&(e.work===Et&&J(e,t,r),n=null),o[Qt]&&e.work!==Nt&&te(e,Qt),n=null!==n?Y(e,t):_(n),o[$t]&&(e.context=$(e,i,r,c)),e.children=n}function W(e,t,n){switch(e.work){case Ct:an(R(e,t,n));case jt:return}e.work=jt;var r=e.instance,o=e.owner,i=r.context,c=e.props,f=t.props,s=e.state,l=r.state,p=n===mt?a({},l,s):l;switch(o[$t]&&u(e.context,$(e,f,p,i)),n){case vt:break;case yt:o[zt]&&ne(e,zt,f,i);case mt:if(o[Jt]&&!ne(e,Jt,f,p,i))return void(e.work=Nt)}e.work=Ct,s!==e.state&&u(p,e.state),o[Kt]&&ne(e,Kt,f,p,i),n===yt&&(r.props=e.props=f),n===mt&&(r.state=p),Ne(e.children,Y(e,r)),o[Xt]&&ne(e,Xt,c,l,i),e.ref!==t.ref&&ye(e,t.ref,dt),e.work=Nt}function G(e){e.state=null,e.owner[Yt]&&(e.state=te(e,Yt))}function Q(e,t,n,r){e?e.work!==Ct?(e.active?W(e,e,r):t.state=a({},t.state,e.state),n&&K(e,t,n)):an(function(){Q(e,t,n,r)}):an(function(){Q(Z(t),t,n,r)})}function R(e,t,n){return function(){W(e,t,n)}}function z(e,t,n,r){if(n)if(e){if("function"==typeof n.then)return J(e,t,n,r);switch(typeof n){case"function":return z(e,t,K(e,t,n),r);case"object":e.state=n}Q(e,t,r,mt)}else an(function(){z(t[pn],t,n,r)})}function J(e,t,n,r){n.then(function(n){an(function(){z(e,t,n,r)})}).catch(function(t){Se(e,t,Ht+":"+Ut,Mt)})}function K(e,t,n){try{if("function"==typeof n)return n.call(t,t.state,t.props,t.context)}catch(t){Se(e,t,Ut+":"+Dt,Mt)}}function X(e,t){try{return new t(e.props,e.context)}catch(t){Se(e,t,qt,Mt)}return new H}function Y(e,t){try{return _(t.render(t.props,t.state,e.context))}catch(t){return _(Se(e,t,Lt,Mt))}}function Z(e){return e[pn]}function $(e,t,n,r){return ee(e,$t,t,n,r)||r}function ee(e,t,n,r,o){try{return e.owner[t].call(e.instance,n,r,o)}catch(n){Se(e,n,t,Mt)}}function te(e,t){try{var n=e.owner[t].call(e.instance,e.active&&Cn(e));if(t!==Yt)oe(e,n);else if(n&&"function"==typeof n.then)return n}catch(n){Se(e,n,t,Mt)}}function ne(e,t,n,r,o){try{var r=e.owner[t].call(e.instance,n,r,o);if(t===Jt)return r;oe(e,r)}catch(n){Se(e,n,t,Mt)}}function re(e,t,n,r){try{oe(e,e.owner[t].call(e.instance,n,r))}catch(t){Se(e.host,t,Zt,Mt)}}function oe(e,t){switch(typeof t){case"object":case"function":z(e,e.instance,t)}}function ie(e,t,n,r,o){try{if("function"==typeof t)return t.call(e.instance,n,r,o)}catch(t){Se(e,t,Dt,Pt)}}function ce(e,t,n){t!==n.ref&&delete this.refs[n.ref],this.refs[t]=e}function ue(e,t){var n=e.host,r=e.parent;if(fe(t,e,r,n,gt,xt),le(e,r,bt),n.children!==e)M(r.children,e,t);else for(n.children=t;Cn(n)===Cn(e);)wn(n,Cn(t)),n=n.host}function ae(e,t,n,r,o){for(var i=e.children,c=i.length,u=i.next;c-- >0;)fe(u,t,e,n,r,o),u=u.next}function fe(e,t,n,r,o,i){switch(e.host=r,e.parent=n,e.context=r.context,e.id){case ut:return e.work=Et,fe(I(e),t,n,e,o,i),me(e),e.work=Nt,e.ref&&ye(e,e.ref,ht),void(e.owner[Rt]&&te(e,Rt));case rt:he(e,e);case it:case ot:return wn(e,e.id!==it?Cn(n):Sn(e)),ae(e,t,r,o,i),void me(e);case at:e.xmlns=Pn(e,n.xmlns);default:switch(i){case wt:if(xe(e,n))break;default:me(e),o===kt?Ee(e,n):ge(e,t,n)}if(e.id!==at)return}ae(e,t,r,kt,i),de(e,Mn(e),St)}function se(e,t,n){switch(e.id){case ut:se(e.children,t,-n),G(e);case ft:case st:break;case it:n<ct&&t.id>ct&&ke(e,t);default:for(var r=e.children,o=r.length;o-- >0;)se(r=r.next,e,-n)}e.ref&&ye(e,e.ref,lt),e.active=!1}function le(e,t,n){return n>ct&&se(e,t,n),e.id!==ut?ke(e,t):e.state?e.state=void e.state.then(pe(e,t,e,Pt)).catch(pe(e,t,e,Mt)):void le(e.children,t,ct)}function pe(e,t,n,r){return e.id===ut?pe(e.children,t,n,r):function(o){le(e,t,bt),r===Mt&&Se(n,o,Ht+":"+Yt,r)}}function he(e,t){t.type.then(function(t){e.active&&Pe(e,q(t))}).catch(function(t){Se(e,t,Ht+":"+Lt,Mt)})}function de(e,t,n){for(var r in t)switch(r){case"ref":ye(e,t[r],n);case"key":case"xmlns":case"children":break;default:111===r.charCodeAt(0)&&110===r.charCodeAt(1)&&r.length>2?ve(e,r.substring(2).toLowerCase(),t[r]):gn(e,r,t[r],e.xmlns)}}function ve(e,t,n){e.event||(e.event={}),e.event[t]||kn(e,t),e.event[t]=n}function ye(e,t,n,r){switch(typeof t){case"string":return n===lt?ye(e,ce,lt,t):ye(e,ce,ht,t);case"function":switch(n){case lt:return ie(e.host,t,e.ref=null,r,e);case pt:e.ref=t;case ht:return ie(e.host,t,e.instance||Cn(e),r,e);case dt:ye(e,t,lt,r),ye(e,t,pt,r)}break;default:ye(e,e.ref===t?c:e.ref,lt,r)}}function me(e){try{switch(e.active=!0,e.id){case at:return wn(e,Hn(e));case ft:return wn(e,Un(e));case st:return wn(e,Vn(e));case ut:return wn(e,Cn(e.children));case it:break;default:wn(e,Cn(D(e,At)))}}catch(t){return me(we(e,Se(e,t,_t,Mt)))}}function we(e,t){return a(e,t,{key:e.key,prev:e.prev,next:e.next,host:e.host,parent:e.parent})}function xe(e,t){return wn(e,Tn(e,t,O(e,t,Ot),O(e,t,At))),e.active=!!Cn(e)}function be(e,t){bn(e,t)}function ke(e,t){return t.id<it?ke(e,A(t)):e.id>ct?Ln(e,t):void e.children.forEach(function(t){ke(L(t),e)})}function ge(e,t,n){if(n.id<ct){if(n.id<it)return ge(e,t,A(n));if(!n.active)return Ee(e,n)}switch(t.id){case ut:return ge(e,L(t),n);case it:return ge(e,O(t,n,At),n);case ot:case rt:return ge(e,D(t,At),n);case ct:return Ee(e,n)}switch(e.id){case at:case ft:case st:return _n(e,t,n);case ut:return ge(L(e),t,n);case it:return}e.children.forEach(function(e){ge(L(e),t,n)})}function Ee(e,t){if(t.id<it)return Ee(e,A(t));switch(e.id){case at:case ft:case st:return qn(e,t);case ut:return Ee(L(e),t);case it:return}e.children.forEach(function(e){Ee(L(e),t)})}function Ce(e,t){de(e,je(e.props,e.props=t.props),Tt)}function je(e,t){if(e!==t){var n=0,r={};for(var o in e)rn.call(t,o)||(r[(++n,o)]=null);for(var o in t){var i=t[o],c=e[o];i!==c&&("object"!=typeof i||null===i?r[(++n,o)]=i:(i=je(c||{},i))&&(r[(++n,o)]=i))}return n>0?r:void 0}}function Ne(e,t){if(e.id===rt&&t.id===rt)return he(e,t);if(e.key!==t.key||e.type!==t.type)return ue(e,t);switch(e.id){case it:case ot:return Pe(e,t);case ut:return W(e,t,yt);case ft:e.children!==t.children&&be(e,e.children=t.children);break;case at:Pe(e,t),Ce(e,t)}}function Pe(e,t){var n=kt,r=e.host,o=e.children,i=t.children,c=o.length,u=i.length;if(c+u!==0){var a=0,f=0,s=c-1,l=u-1,p=o.next,h=i.next,d=o.prev,v=i.prev,y=p,m=h,w=d,x=v;e:for(;;){for(;p.key===h.key;){if(y=p.next,m=h.next,Ne(p,h),++a,++f,a>s||f>l)break e;p=y,h=m}for(;d.key===v.key;){if(w=d.prev,x=v.prev,Ne(d,v),--s,--l,a>s||f>l)break e;d=w,v=x}break}if(a>s++){if(f<=l++)for(l<u?n=gt:(d=o,c>0&&(h=m));f++<l;)h=(p=h).next,fe(o.insert(p,d),d,e,r,n,xt)}else if(f>l++)for(l===u&&u>0&&(p=y);a++<s;)p=(h=p).next,le(o.remove(h),e,bt);else Me(e,r,o,p,h,a,f,s,l,c)}}function Me(e,t,n,r,o,i,c,u,a,f){for(var s=i,l=c,p=r,h=o,d=p,v=p,y=p,m=p,w={},x={};s<u||l<a;)s<u&&(w[p.key]=p,++s!==f)&&(p=p.next),l<a&&(x[h.key]=h,++l!==a)&&(h=h.next);for(;l-- >c;)d=h.prev,v=h.next,y=w[h.key],m=w[v.key],E(y)?E(v)?d.key!==y.prev.key&&(v=v.active?v:m||p).key!==y.next.key&&ge(n.insert(n.remove(y),v),v,e):E(v=y.next)&&E(x[v.key])&&(d.key===p.key?Ee(n.insert(n.remove(y),n),e):v!==p&&(E(x[p.key])||v.key!==p.prev.key)&&ge(n.insert(n.remove(y),p),p,e)):E(v)?(v=v.active?v:m||p,fe(n.insert(h,v),v,e,t,gt,xt)):fe(n.insert(h,n),h,e,t,kt,xt),h=d;for(var b in w)E((p=w[b],h=x[b]))?Ne(p,h):le(n.remove(p),e,bt)}function Se(e,t,n,r){return _(Te(e,_e(e,t,n),n,r))}function Te(e,t,n,r){if(r===Pt)return Ae(t);var o=e.host,i=e.owner,c=e.instance,u=c&&!c[ln]&&i&&i[Zt];return an(function(){e.active&&Oe(e,_(null))}),u&&(e.work=Ct,re(e,Zt,t,c[ln]=t),e.work=Nt),!u&&E(o)&&e.id!==ct?Te(o,t,n,r):Te(e,t,n,Pt)}function Oe(e,t){Ne(e.id===ut?e.children:e,t)}function Ae(e){e.defaultPrevented||De(e.inspect())}function De(e){return"undefined"!=typeof console?(console.error||console.log).call(console,e):"function"==typeof printErr?printErr(e):void 0}function Le(e){return{enumerable:!0,configurable:!0,value:e}}function _e(e,t,n){if(!(t instanceof Error))return _e(e,new Error(t),n);for(var r="",o=" ",i=e;i&&i.type;)r+=o+"<"+T(i.type)+">\n",o+=" ",i=i.host;var c="The above error occurred in `\n"+r+'` from "'+n+'"',u=t.stack+"\n\n"+c;return nn(t,{errorLocation:Le(n),errorStack:Le(u),errorMessage:Le(c),componentStack:Le(r),defaultPrevented:Le(!1),preventDefault:Le(function(){return!!tn(t,"defaultPrevented",Le(!0))}),inspect:Le(function(){return u})})}function qe(e){return e||p(Vt,"Expected to receive a component"),E(Z(e))?qe(Z(e)):E(e)&&e.active?Cn(e):Dn(e)?Nn(e):An(e)?e:void p(Vt,"Called on an unmounted component")}function He(e){return C.bind(null,e)}function Ue(e,t){return n?("function"!=typeof n[e]&&(n[e]=t),n[e]):t}function Ve(e){var t=[];if(null==e)return t;if(E(e)||"object"!=typeof e)return[e];if(on(e))return f(e,t);if("function"==typeof e.next||"function"==typeof e.forEach)l(e,function(e){return t.push(e)});else{if("function"==typeof e[sn])return Ve(e[sn]());t.push(e)}return f(t,[])}function Be(e,t,n){return t?On(t)?We(En(t),_(e),n):void Ie(e,t,n,xt):Be(e,jn(),n)}function Fe(e,t,n){if(!t)return Fe(e,jn(),n);Ie(e,t,n,wt)}function Ie(e,t,n,r){if(!E(e))return Ie(_(e),t,n,r);An(t)||p(Lt,"Target container is not a DOM element"),Ge(e,w(e),t,r),n&&ie(e,n)}function We(e,t,n){Ne(e,t),n&&ie(e,n)}function Ge(e,t,n,r){wn(t,n),mn(t,n),r===xt&&xn(t),fe(e,e,t,t,kt,r)}function Qe(e,t){for(var n in t){var r=t[n];n.indexOf("-")<0?Xe(e).style[n]=!1!==r&&void 0!==r?r:"":Xe(e).style.setProperty(n,r)}}function Re(e,t,n){switch(n){case null:case!1:case void 0:return ze(e,t,n,Xe(e)[t]="");default:Xe(e)[t]=n}}function ze(e,t,n,r){switch(n){case null:case!1:case void 0:return r&&Xe(e).removeAttributeNS(r,t),Xe(e).removeAttribute(t);case!0:return ze(e,t,"",r);default:r?Xe(e).setAttributeNS(r,t,n):Xe(e).setAttribute(t,n)}}function Je(e,t,n,r){switch(t){case"className":if(!r&&n)return Re(e,t,n);case"class":return ze(e,"class",n,"");case"style":return"object"==typeof n?Qe(e,n):ze(e,t,n,"");case"xlink:href":return ze(e,t,n,"http://www.w3.org/1999/xlink");case"innerHTML":return Ke(e,t,n||"",[]);case"dangerouslySetInnerHTML":return Je(e,"innerHTML",n&&n.__html,r);case"acceptCharset":return Je(e,"accept-charset",n,r);case"httpEquiv":return Je(e,"http-equiv",n,r);case"tabIndex":return Je(e,t.toLowerCase(),n,r);case"autofocus":case"autoFocus":return Xe(e)[n?"focus":"blur"]();case"width":case"height":if("img"===e.type)return ze(e,t,n,"")}switch(typeof n){case"object":return Re(e,t,n&&Ze(e)[t]);case"string":case"number":case"boolean":if(r||!(t in Xe(e)))return ze(e,t,n,"");default:Re(e,t,n)}}function Ke(e,t,n,r){Xe(e)[t]&&e.children.forEach(function(e){r.push(Xe(e))}),(Xe(e)[t]=n)&&r.push.apply(r,Xe(e).childNodes),r.forEach(function(t){Xe(e).appendChild(t)})}function Xe(e){return e.DOM}function Ye(){return document.documentElement}function Ze(e){switch(e.type){case"input":return u({type:null,step:null,min:null,max:null},e.props);default:return e.props}}function $e(e){return"string"==typeof e.type?Ye().querySelector(e.type):et(e.type)?e.type:Ye()}function et(e){return!(!e||!e.ELEMENT_NODE)}function tt(e){return document.createTextNode(e.children)}var nt={version:"8.1.0-beta.0"},rt=-3,ot=-2,it=-1,ct=0,ut=1,at=2,ft=3,st=4,lt=-1,pt=0,ht=1,dt=2,vt=0,yt=1,mt=2,wt=0,xt=1,bt=2,kt=3,gt=4,Et=-2,Ct=-1,jt=0,Nt=1,Pt=-2,Mt=-1,St=1,Tt=2,Ot="prev",At="next",Dt="callback",Lt="render",_t="element",qt="constructor",Ht="async",Ut="setState",Vt="findDOMNode",Bt="&|",Ft="&head",It="&tail",Wt="#empty",Gt="#text",Qt="componentWillMount",Rt="componentDidMount",zt="componentWillReceiveProps",Jt="shouldComponentUpdate",Kt="componentWillUpdate",Xt="componentDidUpdate",Yt="componentWillUnmount",Zt="componentDidCatch",$t="getChildContext",en="getInitialState",tn=Object.defineProperty,nn=Object.defineProperties,rn=Object.hasOwnProperty,on=Array.isArray,cn=e.WeakMap||i,un=e.Symbol||function(e){return v(e)},an=e.requestAnimationFrame||function(e){setTimeout(e,16)},fn=un.for||un,sn=un.iterator||"@@iterator",ln=fn("dio.Error"),pn=fn("dio.Element"),hn=fn("dio.Fragment"),dn=fn("dio.Component");nn(o.prototype,{insert:{value:function(e,t){return e.next=t,e.prev=t.prev,t.prev.next=e,t.prev=e,this.length++,e}},remove:{value:function(e){return 0===this.length?e:(e.next.prev=e.prev,e.prev.next=e.next,this.length--,e)}},forEach:{value:function(e){for(var t=0,n=this;t<this.length;++t)e(n=n.next,t)}}}),nn(i.prototype,{set:{value:function(e,t){e[this.hash]=t}},get:{value:function(e){return e[this.hash]}},has:{value:function(e){return this.hash in e}}}),nn(y.prototype,{constructor:{value:pn},handleEvent:{value:function(e){try{var t,n=e.type,r=this,o=r.event[n],i=r.host,c=i.instance,u=c||r,a=u.props,f=u.state,s=u.context;if(!o)return;"function"==typeof o?t=o.call(c,e,a,f,s):"function"==typeof o.handleEvent&&(c!==o&&o[dn]===dn&&(i=Z(c=o)),t=o.handleEvent(e,a,f,s)),t&&c&&oe(i,t)}catch(e){Se(i,e,"on"+n+":"+T(o.handleEvent||o),Pt)}}}}),U.prototype=Object.create(V(H.prototype),{shouldComponentUpdate:{value:function(e,t){return h(this.props,e)||h(this.state,t)}}});var vn={toArray:Ve,forEach:function(e,t,n){null!=e&&Ve(e).forEach(t,n)},map:function(e,t,n){return null!=e?Ve(e).map(t,n):e},filter:function(e,t,n){return null!=e?Ve(e).filter(t,n):e},find:function(e,t,n){return null!=e?s(Ve(e),t,n):e},count:function(e){return Ve(e).length},only:function(e){if(E(e))return e;p("Children.only","Expected to receive a single element")}},yn=new cn,mn=Ue("setHost",function(e,t){yn.set(t,e)}),wn=Ue("setNode",function(e,t){e.DOM=t}),xn=Ue("setContent",function(e){Xe(e).textContent=""}),bn=Ue("setText",function(e,t){Xe(e).nodeValue=t}),kn=Ue("setEvent",function(e,t){Xe(e).addEventListener(t,e,!1)}),gn=Ue("setProps",Je),En=Ue("getHost",function(e){return yn.get(e).children}),Cn=Ue("getNode",Xe),jn=Ue("getDocument",Ye),Nn=Ue("getTarget",function(e){return e.currentTarget}),Pn=Ue("getType",function(e,t){switch(e.type){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";case"foreignObject":return""}return t}),Mn=Ue("getProps",Ze),Sn=Ue("getPortal",$e),Tn=Ue("getQuery",function(e,t,n,r){for(var o=e.id,i=o>at?"#text":e.type.toLowerCase(),c=e.props,u=e.children,a=u.length,f=n.active?Xe(n).nextSibling:Xe(t).firstChild,s=f,l=null;f&&(f.nodeName.toLowerCase()!==i||(o>at?(r.id>at&&f.splitText(0),f.nodeValue!==u&&(f.nodeValue=u)):0===a&&f.firstChild&&(f.textContent=""),t.id===it&&$e(t).appendChild(f),l=f,i=null,(f=f.nextSibling)&&!r.type));){if(o>at&&0===a){if(f.parentNode.insertBefore(l=tt(e),f),r.type)break;i=null}f=(s=f).nextSibling,s.parentNode.removeChild(s)}if(l&&!l.splitText)for(var p=l.attributes,h=p.length-1;h>=0;--h){var d=p[h].name;void 0===c[d]&&l.removeAttribute(d)}return l}),On=Ue("isValidHost",function(e){return yn.has(e)}),An=Ue("isValidNode",et),Dn=Ue("isValidEvent",function(e){return!(!e||!e.BUBBLING_PHASE)}),Ln=Ue("removeNode",function(e,t){Xe(t).removeChild(Xe(e))}),_n=Ue("insertNode",function(e,t,n){Xe(n).insertBefore(Xe(e),Xe(t))}),qn=Ue("appendNode",function(e,t){Xe(t).appendChild(Xe(e))}),Hn=Ue("createElement",function(e){return e.xmlns?document.createElementNS(e.xmlns,e.type):document.createElement(e.type)}),Un=Ue("createText",tt),Vn=Ue("createEmpty",function(e){return document.createTextNode("")});return nt.render=Be,nt.hydrate=Fe,nt.Component=H,nt.Fragment=hn,nt.PureComponent=U,nt.Children=vn,nt.findDOMNode=qe,nt.unmountComponentAtNode=function(e){return On(e)&&!Be(null,e)},nt.createFactory=function(n){return"object"!=typeof n||null===n||E(n)?He(n):t(e,n,r)},nt.cloneElement=function(){return C.apply(null,arguments)},nt.isValidElement=E,nt.createPortal=function(e,t,n){var r=new y(it),i=new o;return r.type=t,r.children=i,void 0!==n&&(r.key=n),N(i,e,0),P(i),r},nt.createElement=C,nt.h=C,"function"==typeof r&&function(){try{r("./cjs")(nt,y,Y,Z,_,I,Se)}catch(e){De(e),De("Something went wrong trying to import the server module")}}(),"object"==typeof n&&"function"==typeof n.createExport?n.createExport(nt,y,Y,Z,_,I,Se)||nt:nt}"object"==typeof exports&&"object"==typeof module&&null!==module?"undefined"==typeof __webpack_require__&&"function"==typeof require&&e.global===e&&e.process?module.exports=t(e,void 0,require):module.exports=t(e):"function"==typeof define&&define.amd?define(t(e)):e.dio=t(e)}("object"==typeof window?window:"object"==typeof global?global:this); | ||
!function(e){"use strict";function t(e,n,r){function o(){this.next=this,this.prev=this,this.length=0}function i(){this.hash=""}function c(){}function u(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t,n){for(var r in t)e[r]=t[r];for(var r in n)e[r]=n[r];return e}function f(e,t){for(var n=0;n<e.length;++n)on(e[n])?f(e[n],t):t.push(e[n]);return t}function s(e,t,n){if("function"==typeof e.find)return e.find(t,n);for(var r=0;r<e.length;++r)if(t.call(n,e[r],r,e))return e[r]}function l(e,t){if("function"==typeof e.forEach)return e.forEach(t);for(var n=0,r=e.next(r,n++);!r.done;)r=e.next(r.value,n=t(r.value,n))}function p(e,t){throw new Error("#"+e+"(...): "+t+".")}function h(e,t){for(var n in e)if(!rn.call(t,n))return!0;for(var n in t)if(!d(e[n],t[n]))return!0;return!1}function d(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function v(e){for(var t=0,n=0;t<e.length;++t)n=(n<<5)-n+e.charCodeAt(t);return n>>>0}function y(e){this.id=e,this.work=Nt,this.active=!1,this.xmlns="",this.key=null,this.ref=null,this.type=null,this.props=null,this.state=null,this.children=null,this.owner=null,this.instance=null,this.event=null,this.DOM=null,this.context=null,this.parent=null,this.host=null,this.next=null,this.prev=null}function m(e){var t=new y(e.id);return t.type=e.type,t.props=e.props,t.xmlns=e.xmlns,t.key=e.key,t.ref=e.ref,t.children=e.children,t}function w(e){var t=new y(ct);return t.children=e,t}function x(e,t){var n=new y(ft);return n.type=Gt,n.key=Bt+t,n.children=e+"",n}function b(e){var t=new y(st);return t.type=Wt,t.key=Bt+e,t.children="",t}function k(e){var t=new y(ot),n=new o,r=0;if(t.type=hn,t.children=n,E(e))N(n,e,r);else for(;r<e.length;++r)N(n,e[r],r);return P(n),t}function g(e,t){if("function"==typeof e[sn])return k(Ve(e));switch(typeof e){case"boolean":return b(t);case"object":if("function"!=typeof e.then)break;case"function":return C(e)}p(Lt,"Invalid element [object "+T(e)+"]")}function E(e){return null!=e&&e.constructor===pn}function C(e,t){var n=null!=t?1:2,r=0,i=0,c="function"!=typeof e?at:ut,u=arguments.length,f=new y(c),s={},l=c!==ut?new o:null;if(1===n&&"object"==typeof t&&void 0===t[sn])switch(t.constructor){case pn:break;default:if(on(t))break;case Object:if("function"==typeof t.then)break;j(f,(n++,s=t)),void 0!==s.children&&c!==ut&&(s.children=void(i=N(l,s.children,i)))}if((r=u-n)>0)if(c!==ut)for(;n<u;++n)i=N(l,arguments[n],i);else{if(r>1)for(l=[];n<u;++n)l.push(arguments[n]);else l=arguments[n];s.children=l}switch(typeof e){case"function":e.defaultProps&&(s=S(f,e,s));break;case"number":case"symbol":e===hn&&P((f.id=ot,l));break;case"object":E(e)?(j(f,s=a({},e.props,s)),f.id=e.id,e=e.type):"function"==typeof e.then&&P((f.id=rt,l))}return f.type=e,f.props=s,f.children=l,f}function j(e,t){void 0!==t.key&&(e.key=t.key),void 0!==t.ref&&(e.ref=t.ref),void 0!==t.xmlns&&(e.xmlns=t.xmlns)}function N(e,t,n){if(null!=t)if(t.constructor===pn)null===t.key&&(t.key=Bt+n),e.insert(null===t.next?t:m(t),e);else switch(typeof t){case"string":case"number":e.insert(x(t,n),e);break;case"object":if(on(t)){for(var r=0;r<t.length;++r)N(e,t[r],n+r);return n+r}default:return N(e,g(t,n),n)}else e.insert(b(n),e);return n+1}function P(e){e.insert(b(Ft),e.next),e.insert(b(It),e)}function M(e,t,n){e.insert(n,t),e.remove(t)}function S(e,t,n){return"function"==typeof t.defaultProps&&tn(t,"defaultProps",{value:ie(e,t.defaultProps)}),a({},t.defaultProps,n)}function T(e){switch(typeof e){case"function":return T(e.displayName||e.name);case"number":case"symbol":return T(e.toString());case"string":if(e)return e;default:return e&&e.constructor.name||"anonymous"}}function O(e,t,n){return E(e[n])?e[n].id===it?O(e[n],t,n):e[n]:e.host&&L(e.host)===e?O(e.host,t,n):t.id<ct?O(t,t.parent,n):w(e)}function A(e){return e.id<it?A(e.parent):e}function D(e,t){return e.id<ct?D(e.children[t]):e}function L(e){return e.id===ut?L(e.children):e}function _(e){if(null==e)return b(Bt);if(e.constructor===pn)return e;switch(typeof e){case"string":case"number":return x(e,Bt);case"object":if(on(e))return k(e);default:return g(e,Bt)}}function q(e){return!E(e)&&"object"==typeof e&&e&&rn.call(e,"default")?q(e.default):k(_(e))}function H(e,t){this.refs=null,this.state=null,this.props=e,this.context=t}function U(e,t){H.call(this,e,t)}function V(e){return tn(nn(e,{forceUpdate:{value:F},setState:{value:B}}),dn,{value:dn}),rn.call(e,Lt)||tn(e,Lt,{value:c,writable:!0}),e}function B(e,t){z(Z(this),this,e,t)}function F(e){Q(Z(this),this,e,vt)}function I(e){var t,n,r,o=e.type,i=e.props,c=e.context||{},u=o.prototype;return u&&u.render?(u[dn]!==dn&&V(u),t=o=X(e,o)):tn(t=new H,Lt,{value:o,writable:!0}),e.owner=o,e.instance=t,e.context=c,t[pn]=e,t.refs={},t.props=i,t.context=c,t.state=r=t.state||{},o[en]&&(e.state=ee(e,en,i,r,c))&&"function"==typeof(r=t.state=e.state).then&&(e.work===Et&&J(e,t,r),n=null),o[Qt]&&e.work!==Nt&&te(e,Qt),n=null!==n?Y(e,t):_(n),o[$t]&&(e.context=$(e,i,r,c)),e.children=n}function W(e,t,n){switch(e.work){case Ct:an(R(e,t,n));case jt:return}e.work=jt;var r=e.instance,o=e.owner,i=r.context,c=e.props,f=t.props,s=e.state,l=r.state,p=n===mt?a({},l,s):l;switch(o[$t]&&u(e.context,$(e,f,p,i)),n){case vt:break;case yt:o[zt]&&ne(e,zt,f,i);case mt:if(o[Jt]&&!ne(e,Jt,f,p,i))return void(e.work=Nt)}e.work=Ct,s!==e.state&&u(p,e.state),o[Kt]&&ne(e,Kt,f,p,i),n===yt&&(r.props=e.props=f),n===mt&&(r.state=p),Ne(e.children,Y(e,r)),o[Xt]&&ne(e,Xt,c,l,i),e.ref!==t.ref&&ye(e,t.ref,dt),e.work=Nt}function G(e){e.state=null,e.owner[Yt]&&(e.state=te(e,Yt))}function Q(e,t,n,r){e?e.work!==Ct?(e.active?W(e,e,r):t.state=a({},t.state,e.state),n&&K(e,t,n)):an(function(){Q(e,t,n,r)}):an(function(){Q(Z(t),t,n,r)})}function R(e,t,n){return function(){W(e,t,n)}}function z(e,t,n,r){if(n)if(e){if("function"==typeof n.then)return J(e,t,n,r);switch(typeof n){case"function":return z(e,t,K(e,t,n),r);case"object":e.state=n}Q(e,t,r,mt)}else an(function(){z(t[pn],t,n,r)})}function J(e,t,n,r){n.then(function(n){an(function(){z(e,t,n,r)})}).catch(function(t){Se(e,t,Ht+":"+Ut,Mt)})}function K(e,t,n){try{if("function"==typeof n)return n.call(t,t.state,t.props,t.context)}catch(t){Se(e,t,Ut+":"+Dt,Mt)}}function X(e,t){try{return new t(e.props,e.context)}catch(t){Se(e,t,qt,Mt)}return new H}function Y(e,t){try{return _(t.render(t.props,t.state,e.context))}catch(t){return _(Se(e,t,Lt,Mt))}}function Z(e){return e[pn]}function $(e,t,n,r){return ee(e,$t,t,n,r)||r}function ee(e,t,n,r,o){try{return e.owner[t].call(e.instance,n,r,o)}catch(n){Se(e,n,t,Mt)}}function te(e,t){try{var n=e.owner[t].call(e.instance,e.active&&Cn(e));if(t!==Yt)oe(e,n);else if(n&&"function"==typeof n.then)return n}catch(n){Se(e,n,t,Mt)}}function ne(e,t,n,r,o){try{var r=e.owner[t].call(e.instance,n,r,o);if(t===Jt)return r;oe(e,r)}catch(n){Se(e,n,t,Mt)}}function re(e,t,n,r){try{oe(e,e.owner[t].call(e.instance,n,r))}catch(t){Se(e.host,t,Zt,Mt)}}function oe(e,t){switch(typeof t){case"object":case"function":z(e,e.instance,t)}}function ie(e,t,n,r,o){try{if("function"==typeof t)return t.call(e.instance,n,r,o)}catch(t){Se(e,t,Dt,Pt)}}function ce(e,t,n){t!==n.ref&&delete this.refs[n.ref],this.refs[t]=e}function ue(e,t){var n=e.host,r=e.parent;if(fe(t,e,r,n,gt,xt),le(e,r,bt),n.children!==e)M(r.children,e,t);else for(n.children=t;Cn(n)===Cn(e);)wn(n,Cn(t)),n=n.host}function ae(e,t,n,r,o){for(var i=e.children,c=i.length,u=i.next;c-- >0;)fe(u,t,e,n,r,o),u=u.next}function fe(e,t,n,r,o,i){switch(e.host=r,e.parent=n,e.context=r.context,e.id){case ut:return e.work=Et,fe(I(e),t,n,e,o,i),me(e),e.work=Nt,e.ref&&ye(e,e.ref,ht),void(e.owner[Rt]&&te(e,Rt));case rt:he(e,e);case it:case ot:return wn(e,e.id!==it?Cn(n):Sn(e)),ae(e,t,r,o,i),void me(e);case at:e.xmlns=Pn(e,n.xmlns);default:switch(i){case wt:if(xe(e,n))break;default:me(e),o===kt?Ee(e,n):ge(e,t,n)}if(e.id!==at)return}ae(e,t,r,kt,i),de(e,Mn(e),St)}function se(e,t,n){switch(e.id){case ut:se(e.children,t,-n),G(e);case ft:case st:break;case it:n<ct&&t.id>ct&&ke(e,t);default:for(var r=e.children,o=r.length;o-- >0;)se(r=r.next,e,-n)}e.ref&&ye(e,e.ref,lt),e.active=!1}function le(e,t,n){return n>ct&&se(e,t,n),e.id!==ut?ke(e,t):e.state?e.state=void e.state.then(pe(e,t,e,Pt)).catch(pe(e,t,e,Mt)):void le(e.children,t,ct)}function pe(e,t,n,r){return e.id===ut?pe(e.children,t,n,r):function(o){le(e,t,bt),r===Mt&&Se(n,o,Ht+":"+Yt,r)}}function he(e,t){t.type.then(function(t){e.active&&Pe(e,q(t))}).catch(function(t){Se(e,t,Ht+":"+Lt,Mt)})}function de(e,t,n){for(var r in t)switch(r){case"ref":ye(e,t[r],n);case"key":case"xmlns":case"children":break;default:111===r.charCodeAt(0)&&110===r.charCodeAt(1)&&r.length>2?ve(e,r.substring(2).toLowerCase(),t[r]):gn(e,r,t[r],e.xmlns)}}function ve(e,t,n){e.event||(e.event={}),e.event[t]||kn(e,t),e.event[t]=n}function ye(e,t,n,r){switch(typeof t){case"string":return n===lt?ye(e,ce,lt,t):ye(e,ce,ht,t);case"function":switch(n){case lt:return ie(e.host,t,e.ref=null,r,e);case pt:e.ref=t;case ht:return ie(e.host,t,e.instance||Cn(e),r,e);case dt:ye(e,t,lt,r),ye(e,t,pt,r)}break;default:ye(e,e.ref===t?c:e.ref,lt,r)}}function me(e){try{switch(e.active=!0,e.id){case at:return wn(e,Hn(e));case ft:return wn(e,Un(e));case st:return wn(e,Vn(e));case ut:return wn(e,Cn(e.children));case it:break;default:wn(e,Cn(D(e,At)))}}catch(t){return me(we(e,Se(e,t,_t,Mt)))}}function we(e,t){return a(e,t,{key:e.key,prev:e.prev,next:e.next,host:e.host,parent:e.parent})}function xe(e,t){return wn(e,Tn(e,t,O(e,t,Ot),O(e,t,At))),e.active=!!Cn(e)}function be(e,t){bn(e,t)}function ke(e,t){return t.id<it?ke(e,A(t)):e.id>ct?Ln(e,t):void e.children.forEach(function(t){ke(L(t),e)})}function ge(e,t,n){if(n.id<ct){if(n.id<it)return ge(e,t,A(n));if(!n.active)return Ee(e,n)}switch(t.id){case ut:return ge(e,L(t),n);case it:return ge(e,O(t,n,At),n);case ot:case rt:return ge(e,D(t,At),n);case ct:return Ee(e,n)}switch(e.id){case at:case ft:case st:return _n(e,t,n);case ut:return ge(L(e),t,n);case it:return}e.children.forEach(function(e){ge(L(e),t,n)})}function Ee(e,t){if(t.id<it)return Ee(e,A(t));switch(e.id){case at:case ft:case st:return qn(e,t);case ut:return Ee(L(e),t);case it:return}e.children.forEach(function(e){Ee(L(e),t)})}function Ce(e,t){de(e,je(e.props,e.props=t.props),Tt)}function je(e,t){if(e!==t){var n=0,r={};for(var o in e)rn.call(t,o)||(r[(++n,o)]=null);for(var o in t){var i=t[o],c=e[o];i!==c&&("object"!=typeof i||null===i?r[(++n,o)]=i:(i=je(c||{},i))&&(r[(++n,o)]=i))}return n>0?r:void 0}}function Ne(e,t){if(e.id===rt&&t.id===rt)return he(e,t);if(e.key!==t.key||e.type!==t.type)return ue(e,t);switch(e.id){case it:case ot:return Pe(e,t);case ut:return W(e,t,yt);case ft:e.children!==t.children&&be(e,e.children=t.children);break;case at:Pe(e,t),Ce(e,t)}}function Pe(e,t){var n=kt,r=e.host,o=e.children,i=t.children,c=o.length,u=i.length;if(c+u!==0){var a=0,f=0,s=c-1,l=u-1,p=o.next,h=i.next,d=o.prev,v=i.prev,y=p,m=h,w=d,x=v;e:for(;;){for(;p.key===h.key;){if(y=p.next,m=h.next,Ne(p,h),++a,++f,a>s||f>l)break e;p=y,h=m}for(;d.key===v.key;){if(w=d.prev,x=v.prev,Ne(d,v),--s,--l,a>s||f>l)break e;d=w,v=x}break}if(a>s++){if(f<=l++)for(l<u?n=gt:(d=o,c>0&&(h=m));f++<l;)h=(p=h).next,fe(o.insert(p,d),d,e,r,n,xt)}else if(f>l++)for(l===u&&u>0&&(p=y);a++<s;)p=(h=p).next,le(o.remove(h),e,bt);else Me(e,r,o,p,h,a,f,s,l,c)}}function Me(e,t,n,r,o,i,c,u,a,f){for(var s=i,l=c,p=r,h=o,d=p,v=p,y=p,m=p,w={},x={};s<u||l<a;)s<u&&(w[p.key]=p,++s!==f)&&(p=p.next),l<a&&(x[h.key]=h,++l!==a)&&(h=h.next);for(;l-- >c;)d=h.prev,v=h.next,y=w[h.key],m=w[v.key],E(y)?E(v)?d.key!==y.prev.key&&(v=v.active?v:m||p).key!==y.next.key&&ge(n.insert(n.remove(y),v),v,e):E(v=y.next)&&E(x[v.key])&&(d.key===p.key?Ee(n.insert(n.remove(y),n),e):v!==p&&(E(x[p.key])||v.key!==p.prev.key)&&ge(n.insert(n.remove(y),p),p,e)):E(v)?(v=v.active?v:m||p,fe(n.insert(h,v),v,e,t,gt,xt)):fe(n.insert(h,n),h,e,t,kt,xt),h=d;for(var b in w)E((p=w[b],h=x[b]))?Ne(p,h):le(n.remove(p),e,bt)}function Se(e,t,n,r){return _(Te(e,_e(e,t,n),n,r))}function Te(e,t,n,r){if(r===Pt)return Ae(t);var o=e.host,i=e.owner,c=e.instance,u=c&&!c[ln]&&i&&i[Zt];return an(function(){e.active&&Oe(e,_(null))}),u&&(e.work=Ct,re(e,Zt,t,c[ln]=t),e.work=Nt),!u&&E(o)&&e.id!==ct?Te(o,t,n,r):Te(e,t,n,Pt)}function Oe(e,t){Ne(e.id===ut?e.children:e,t)}function Ae(e){e.defaultPrevented||De(e.inspect())}function De(e){return"undefined"!=typeof console?(console.error||console.log).call(console,e):"function"==typeof printErr?printErr(e):void 0}function Le(e){return{enumerable:!0,configurable:!0,value:e}}function _e(e,t,n){if(!(t instanceof Error))return _e(e,new Error(t),n);for(var r="",o=" ",i=e;i&&i.type;)r+=o+"<"+T(i.type)+">\n",o+=" ",i=i.host;var c="The above error occurred in `\n"+r+'` from "'+n+'"',u=t.stack+"\n\n"+c;return nn(t,{errorLocation:Le(n),errorStack:Le(u),errorMessage:Le(c),componentStack:Le(r),defaultPrevented:Le(!1),preventDefault:Le(function(){return!!tn(t,"defaultPrevented",Le(!0))}),inspect:Le(function(){return u})})}function qe(e){return e||p(Vt,"Expected to receive a component"),E(Z(e))?qe(Z(e)):E(e)&&e.active?Cn(e):Dn(e)?Nn(e):An(e)?e:void p(Vt,"Called on an unmounted component")}function He(e){return C.bind(null,e)}function Ue(e,t){return n?("function"!=typeof n[e]&&(n[e]=t),n[e]):t}function Ve(e){var t=[];if(null==e)return t;if(E(e)||"object"!=typeof e)return[e];if(on(e))return f(e,t);if("function"==typeof e.next||"function"==typeof e.forEach)l(e,function(e){return t.push(e)});else{if("function"==typeof e[sn])return Ve(e[sn]());t.push(e)}return f(t,[])}function Be(e,t,n){return t?On(t)?We(En(t),_(e),n):void Ie(e,t,n,xt):Be(e,jn(),n)}function Fe(e,t,n){if(!t)return Fe(e,jn(),n);Ie(e,t,n,wt)}function Ie(e,t,n,r){if(!E(e))return Ie(_(e),t,n,r);An(t)||p(Lt,"Target container is not a DOM element"),Ge(e,w(e),t,r),n&&ie(e,n)}function We(e,t,n){Ne(e,t),n&&ie(e,n)}function Ge(e,t,n,r){wn(t,n),mn(t,n),r===xt&&xn(t),fe(e,e,t,t,kt,r)}function Qe(e,t){for(var n in t){var r=t[n];n.indexOf("-")<0?Xe(e).style[n]=!1!==r&&void 0!==r?r:"":Xe(e).style.setProperty(n,r)}}function Re(e,t,n){switch(n){case null:case!1:case void 0:return ze(e,t,n,Xe(e)[t]="");default:Xe(e)[t]=n}}function ze(e,t,n,r){switch(n){case null:case!1:case void 0:return r&&Xe(e).removeAttributeNS(r,t),Xe(e).removeAttribute(t);case!0:return ze(e,t,"",r);default:r?Xe(e).setAttributeNS(r,t,n):Xe(e).setAttribute(t,n)}}function Je(e,t,n,r){switch(t){case"className":if(!r&&n)return Re(e,t,n);case"class":return ze(e,"class",n,"");case"style":return"object"==typeof n?Qe(e,n):ze(e,t,n,"");case"xlink:href":return ze(e,t,n,"http://www.w3.org/1999/xlink");case"innerHTML":return Ke(e,t,n||"",[]);case"dangerouslySetInnerHTML":return Je(e,"innerHTML",n&&n.__html,r);case"acceptCharset":return Je(e,"accept-charset",n,r);case"httpEquiv":return Je(e,"http-equiv",n,r);case"tabIndex":return Je(e,t.toLowerCase(),n,r);case"autofocus":case"autoFocus":return Xe(e)[n?"focus":"blur"]();case"width":case"height":if("img"===e.type)return ze(e,t,n,"")}switch(typeof n){case"object":return Re(e,t,n&&Ze(e)[t]);case"string":case"number":case"boolean":if(r||!(t in Xe(e)))return ze(e,t,n,"");default:Re(e,t,n)}}function Ke(e,t,n,r){Xe(e)[t]&&e.children.forEach(function(e){r.push(Xe(e))}),(Xe(e)[t]=n)&&r.push.apply(r,Xe(e).childNodes),r.forEach(function(t){Xe(e).appendChild(t)})}function Xe(e){return e.DOM}function Ye(){return document.documentElement}function Ze(e){switch(e.type){case"input":return u({type:null,step:null,min:null,max:null},e.props);default:return e.props}}function $e(e){return"string"==typeof e.type?Ye().querySelector(e.type):et(e.type)?e.type:Ye()}function et(e){return!(!e||!e.ELEMENT_NODE)}function tt(e){return document.createTextNode(e.children)}var nt={version:"8.1.0-rc"},rt=-3,ot=-2,it=-1,ct=0,ut=1,at=2,ft=3,st=4,lt=-1,pt=0,ht=1,dt=2,vt=0,yt=1,mt=2,wt=0,xt=1,bt=2,kt=3,gt=4,Et=-2,Ct=-1,jt=0,Nt=1,Pt=-2,Mt=-1,St=1,Tt=2,Ot="prev",At="next",Dt="callback",Lt="render",_t="element",qt="constructor",Ht="async",Ut="setState",Vt="findDOMNode",Bt="&|",Ft="&head",It="&tail",Wt="#empty",Gt="#text",Qt="componentWillMount",Rt="componentDidMount",zt="componentWillReceiveProps",Jt="shouldComponentUpdate",Kt="componentWillUpdate",Xt="componentDidUpdate",Yt="componentWillUnmount",Zt="componentDidCatch",$t="getChildContext",en="getInitialState",tn=Object.defineProperty,nn=Object.defineProperties,rn=Object.hasOwnProperty,on=Array.isArray,cn=e.WeakMap||i,un=e.Symbol||function(e){return v(e)},an=e.requestAnimationFrame||function(e){setTimeout(e,16)},fn=un.for||un,sn=un.iterator||"@@iterator",ln=fn("dio.Error"),pn=fn("dio.Element"),hn=fn("dio.Fragment"),dn=fn("dio.Component");nn(o.prototype,{insert:{value:function(e,t){return e.next=t,e.prev=t.prev,t.prev.next=e,t.prev=e,this.length++,e}},remove:{value:function(e){return 0===this.length?e:(e.next.prev=e.prev,e.prev.next=e.next,this.length--,e)}},forEach:{value:function(e){for(var t=0,n=this;t<this.length;++t)e(n=n.next,t)}}}),nn(i.prototype,{set:{value:function(e,t){e[this.hash]=t}},get:{value:function(e){return e[this.hash]}},has:{value:function(e){return this.hash in e}}}),nn(y.prototype,{constructor:{value:pn},handleEvent:{value:function(e){try{var t,n=e.type,r=this,o=r.event[n],i=r.host,c=i.instance,u=c||r,a=u.props,f=u.state,s=u.context;if(!o)return;"function"==typeof o?t=o.call(c,e,a,f,s):"function"==typeof o.handleEvent&&(c!==o&&o[dn]===dn&&(i=Z(c=o)),t=o.handleEvent(e,a,f,s)),t&&c&&oe(i,t)}catch(e){Se(i,e,"on"+n+":"+T(o.handleEvent||o),Pt)}}}}),U.prototype=Object.create(V(H.prototype),{shouldComponentUpdate:{value:function(e,t){return h(this.props,e)||h(this.state,t)}}});var vn={toArray:Ve,forEach:function(e,t,n){null!=e&&Ve(e).forEach(t,n)},map:function(e,t,n){return null!=e?Ve(e).map(t,n):e},filter:function(e,t,n){return null!=e?Ve(e).filter(t,n):e},find:function(e,t,n){return null!=e?s(Ve(e),t,n):e},count:function(e){return Ve(e).length},only:function(e){if(E(e))return e;p("Children.only","Expected to receive a single element")}},yn=new cn,mn=Ue("setHost",function(e,t){yn.set(t,e)}),wn=Ue("setNode",function(e,t){e.DOM=t}),xn=Ue("setContent",function(e){Xe(e).textContent=""}),bn=Ue("setText",function(e,t){Xe(e).nodeValue=t}),kn=Ue("setEvent",function(e,t){Xe(e).addEventListener(t,e,!1)}),gn=Ue("setProps",Je),En=Ue("getHost",function(e){return yn.get(e).children}),Cn=Ue("getNode",Xe),jn=Ue("getDocument",Ye),Nn=Ue("getTarget",function(e){return e.currentTarget}),Pn=Ue("getType",function(e,t){switch(e.type){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";case"foreignObject":return""}return t}),Mn=Ue("getProps",Ze),Sn=Ue("getPortal",$e),Tn=Ue("getQuery",function(e,t,n,r){for(var o=e.id,i=o>at?"#text":e.type.toLowerCase(),c=e.props,u=e.children,a=u.length,f=n.active?Xe(n).nextSibling:Xe(t).firstChild,s=f,l=null;f&&(f.nodeName.toLowerCase()!==i||(o>at?(r.id>at&&f.splitText(0),f.nodeValue!==u&&(f.nodeValue=u)):0===a&&f.firstChild&&(f.textContent=""),t.id===it&&$e(t).appendChild(f),l=f,i=null,(f=f.nextSibling)&&!r.type));){if(o>at&&0===a){if(f.parentNode.insertBefore(l=tt(e),f),r.type)break;i=null}f=(s=f).nextSibling,s.parentNode.removeChild(s)}if(l&&!l.splitText)for(var p=l.attributes,h=p.length-1;h>=0;--h){var d=p[h].name;void 0===c[d]&&l.removeAttribute(d)}return l}),On=Ue("isValidHost",function(e){return yn.has(e)}),An=Ue("isValidNode",et),Dn=Ue("isValidEvent",function(e){return!(!e||!e.BUBBLING_PHASE)}),Ln=Ue("removeNode",function(e,t){Xe(t).removeChild(Xe(e))}),_n=Ue("insertNode",function(e,t,n){Xe(n).insertBefore(Xe(e),Xe(t))}),qn=Ue("appendNode",function(e,t){Xe(t).appendChild(Xe(e))}),Hn=Ue("createElement",function(e){return e.xmlns?document.createElementNS(e.xmlns,e.type):document.createElement(e.type)}),Un=Ue("createText",tt),Vn=Ue("createEmpty",function(e){return document.createTextNode("")});return nt.render=Be,nt.hydrate=Fe,nt.Component=H,nt.Fragment=hn,nt.PureComponent=U,nt.Children=vn,nt.findDOMNode=qe,nt.unmountComponentAtNode=function(e){return On(e)&&!Be(null,e)},nt.createFactory=function(n){return"object"!=typeof n||null===n||E(n)?He(n):t(e,n,r)},nt.cloneElement=function(){return C.apply(null,arguments)},nt.isValidElement=E,nt.createPortal=function(e,t,n){var r=new y(it),i=new o;return r.type=t,r.children=i,void 0!==n&&(r.key=n),N(i,e,0),P(i),r},nt.createElement=C,nt.h=C,"function"==typeof r&&function(){try{r("./cjs")(nt,y,Y,Z,_,I,Se)}catch(e){De(e),De("Something went wrong trying to import the server module")}}(),"object"==typeof n&&"function"==typeof n.createExport?n.createExport(nt,y,Y,Z,_,I,Se)||nt:nt}"object"==typeof exports&&"object"==typeof module&&null!==module?"undefined"==typeof __webpack_require__&&"function"==typeof require&&e.global===e&&e.process?module.exports=t(e,void 0,require):module.exports=t(e):"function"==typeof define&&define.amd?define(t(e)):e.dio=t(e)}("object"==typeof window?window:"object"==typeof global?global:this); | ||
//# sourceMappingURL=umd.min.js.map |
{ | ||
"name": "dio.js", | ||
"version": "8.1.0-beta.0", | ||
"version": "8.1.0-rc", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "A Library For Building User Interfaces.", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
174551