New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dio.js

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dio.js - npm Package Compare versions

Comparing version 9.0.0-rc.2 to 9.0.0

36

CHANGELOG.md

@@ -1,18 +0,30 @@

## 9.0.0 (Unreleased)
## 9.0.0 (11 April 2018)
- Breaking: Improve Error Boundaries to act more like React and `try..catch`.
- Breaking: Name change to custom reconcilers method `getProps` to `getInitialProps`.
- Breaking: Name change to custom reconcilers method `setContent` to `setDocument`.
- Improve: error boundaries implementation to support possible future `Timeout` and `Placeholder` React components.
#### Core
- Breaking: Improve Error Boundaries to behave more inline with React and `try..catch` heuristics.
- Improve: `async getInitialState` implementation.
- Improve: support for `defaultValue` on select elements.
- New: adds `createClass` API.
- New: adds `createContext` API.
- New: adds `createComment` API.
- New: support for async generators/iterators.
- New: support for auto resolution of json `fetch` based Promises passed to setState/getInitialState.
- New: support for custom elements.
- New: `createClass` top-level API.
- New: `createContext` top-level API.
- New: `createComment` top-level API.
- New: support async generators/iterators.
- New: support auto resolution of json `fetch` based Promises passed to setState/getInitialState.
- New: support custom element constructors.
- New: support multiple event handlers on a single event.
- NEW: reconciler adds `getContext`, `createComment`, `setComment`, `willUnmount`, and `getUpdatedProps` methods to custom reconcilers.
#### Reconciler
- Breaking: Name change to custom reconcilers method `getProps` to `getInitialProps`.
- Breaking: Name change to custom reconcilers method `setContent` to `setDocument`.
- NEW: `getUpdatedProps` reconciler API.
- NEW: `getContext` reconciler API.
- NEW: `createComment` reconciler API.
- NEW: `setComment` reconciler API.
- NEW: `willUnmount` reconciler API.
## 8.2.4 (11 March 2018)
- Patch nested rendering with children array.
## 8.2.3 (25 January 2018)

@@ -19,0 +31,0 @@

@@ -1,2 +0,2 @@

/*!dio 9.0.0-rc.2 @license MIT */
/*!dio 9.0.0 @license MIT */
module.exports = function (dio, Element, mountComponentInstance, delegateErrorBoundary, getElementDefinition, createElementSnapshot, createElementEmpty, createElement, commitOwner) {/* eslint-disable */'use strict'

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

!function(e,t){"use strict";function n(t,r){var o={version:"9.0.0-rc.2"},i=0,c=1,u=2,a=3,s=4,f=5,l=6,h=7,d=8,p=9,v=0,y=1,w=2,m=0,b=1,x=2,g=3,k=0,C=1,E=0,j=1,S=0,N=1,P=0,O=1,U="&|head|",A="&|body|",M="&|tail|",T="#comment",D="#empty",L="#text",V="prev",I="next",F="event",W="prototype",B="callback",H="render",_="constructor",q="forceUpdate",R="setState",G="displayName",Q="componentWillMount",z="componentDidMount",J="componentWillReceiveProps",K="shouldComponentUpdate",X="componentWillUpdate",Y="componentDidUpdate",Z="componentWillUnmount",$="componentDidCatch",ee="getChildContext",te="getInitialState",ne="getDefaultProps",re="defaultProps",oe=e.WeakMap||Ce,ie=e.Symbol||Math.random,ce=Array.isArray,ue=Object.defineProperties,ae=Object.defineProperty,se=Object.hasOwnProperty,fe=Object.create,le=Object.keys,he=ie.for||function(e){for(var t=0,n=0;t<e.length;++t)n=(n<<5)-n+e.charCodeAt(t);return n>>>0},de=he("dio.Cache"),pe=he("dio.State"),ve=he("dio.Context"),ye=he("dio.Element"),we=he("dio.Fragment"),me=he("dio.Component"),be=he("dio.Exception"),xe=ie.iterator||"@@iterator",ge=ie.asyncIterator||"@@asyncIterator";function ke(){this.next=this,this.prev=this,this.length=0}function Ce(){this.hash=ie()}function Ee(){}function je(e,t){for(var n in t)e[n]=t[n];return e}function Se(e,t,n){for(var r in t)e[r]=t[r];for(var r in n)e[r]=n[r];return e}function Ne(e,t){if(null!=e){if("object"==typeof e){if("function"==typeof e.forEach||"function"==typeof e.next)return function(e,t){if("function"==typeof e.forEach)return e.forEach(t);for(var n=e.next(n);!n.done;)n=e.next(n.value,t(n.value))}(e,function(e){Ne(e,t)});if("function"==typeof e[xe])return Ne(e[xe](),t)}t(e)}}function Pe(e,t){throw new Error("#"+e+"(...): "+t+".")}function Oe(e,t){for(var n in e)if(!se.call(t,n))return!0;for(var n in t)if(!Ue(e[n],t[n]))return!0;return!1}function Ue(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function Ae(e){return"function"==typeof e.then&&"function"==typeof e.catch}function Me(e){this.id=e,this.active=!1,this.work=P,this.xmlns=null,this.key=null,this.ref=null,this.type=null,this.props=null,this.cache=null,this.children=null,this.owner=null,this.context=null,this.parent=null,this.host=null,this.next=null,this.prev=null}function Te(e){var t=new Me(e.id),n=e.children;return"object"==typeof n&&e.id!==s&&(n=function(e){for(var t=new ke,n=e,r=n.length;r>0;--r)t.insert(Te(n=n.next),t);return t}(n)),t.type=e.type,t.props=e.props,t.xmlns=e.xmlns,t.key=e.key,t.ref=e.ref,t.children=n,t}function De(e){var t=new Me(a);return t.children=e,t}function Le(e,t){var n=new Me(d);return n.type=L,n.key=A+t,n.children=e+"",n}function Ve(e){var t=new Me(p);return t.type=D,t.key=A+e,t.children="",t}function Ie(e){return Ye({then:e,catch:Ee})}function Fe(e,t){return(e.type.then=function(e,t){return function n(r,o){return t.next(e.cache).then(function(t){!0!==t.done||void 0!==t.value?r(e.cache=t.value,t.done,n(r,o)):e.context&&r(e.cache,t.done)},o)}}(e,t))&&e}function We(e){var t=new Me(c);return t.type=we,t.children=Be(e),t}function Be(e){var t=new ke;if(ce(e))for(var n=0;n<e.length;++n)qe(t,e[n],n);else qe(t,e,0);return _e(t),t}function He(e,t){switch(typeof e){case"boolean":return Ve(t);case"object":if(e[xe])return We(et(e));if(e[ge])return Fe(Ie(Ee),e);if(!Ae(e))break;case"function":return Ye(e)}Pe(H,"Invalid element [object "+Ge(e)+"]")}function _e(e){e.insert(Ve(U),e.next),e.insert(Ve(M),e)}function qe(e,t,n){if(null!=t)if(t.constructor===ye)null===t.key&&(t.key=A+n),e.insert(null===t.next?t:Te(t),e);else switch(typeof t){case"string":case"number":e.insert(Le(t,n),e);break;case"object":if(ce(t)){for(var r=0;r<t.length;++r)qe(e,t[r],n+r);return n+r}default:return qe(e,He(t,n),n)}else e.insert(Ve(n),e);return n+1}function Re(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 Ge(e){switch(typeof e){case"number":case"symbol":return Ge(e.toString());case"function":return Ge(e[G]||e.name);case"object":if(Ze(e))return Ge(e.type);case"string":if(e)return e;default:return"#anonymous"}}function Qe(e,t,n){return Ze(e[n])?e[n].id===u?Qe(e[n],t,n):e[n]:e.host&&e.host.children===e?Qe(e.host,t,n):t.id<a?Qe(t,t.parent,n):De(e)}function ze(e){return e.id<u?ze(e.parent):e}function Je(e,t){return e.id<a?Je(e.children[t]):e}function Ke(e){return e.id===s?Ke(e.children):e}function Xe(e){if(null==e)return Ve(A);if(e.constructor===ye)return e;switch(typeof e){case"string":case"number":return Le(e,A);case"object":if(ce(e))return We(e);default:return He(e,A)}}function Ye(e,t){var n,r=null!=t?1:2,o=0,u="function"!=typeof e?l:s,a=arguments.length,f=new Me(u),h={},d=f.children=u!==s?new ke:void 0;if(1===r&&"object"==typeof t&&void 0===t[xe])switch(t.constructor){default:if(ce(t))break;case Object:if(Ae(t))break;Re(f,(++r,h=t)),void 0!==h.children&&u!==s&&a-r<1&&(o=qe(d,h.children,o))}if((n=a-r)>0)if(u!==s)for(;r<a;++r)o=qe(d,arguments[r],o);else{if(1===n)d=arguments[r];else for(d=[];r<a;++r)d.push(arguments[r]);h.children=d}switch(typeof e){case"function":e[re]&&(h=Se({},function(e,t,n){return"function"==typeof t[re]?t[re](n):t[re]}(0,e,h),h));break;case"number":case"symbol":e===we&&_e((f.id=c,d));break;default:Ae(e)&&_e((f.id=i,d))}return f.type=e,f.props=h,f}function Ze(e){return null!=e&&e.constructor===ye}ue(ae(ke[W],xe,{value:xe}),{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=this,n=t.length;n>0;--n)e(t=t.next)}}}),ue(Ce[W],{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}}}),ue(ae(Me[W],xe,{value:xe}),{constructor:{value:ye},handleEvent:{value:function(e){var t=this,n=on(t,e);if(!n)return;if("object"==typeof n&&(n[xe]||ce(n)))return Ne(n,function(n){ft(t,e,n)});ft(t,e,n)}}});var $e={toArray:et,forEach:function(e,t,n){null!=e&&et(e).forEach(t,n)},map:function(e,t,n){return null!=e?et(e).map(t,n):e},filter:function(e,t,n){return null!=e?et(e).filter(t,n):e},find:function(e,t,n){return null!=e?function(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]}(et(e),t,n):e},count:function(e){return et(e).length},only:function(e){return Ze(e)?e:Pe("Children.only","Expected to receive a single element")}};function et(e){var t=[];return Ne(e,function(e){t.push(e)}),t}function tt(e,t){return r?"function"==typeof r[e]?r[e].bind(r):r[e]=t:t}function nt(e,t,n){this.error=t,this.origin=n,this.bubbles=!0,this[ye]=e}function rt(e,t,n){return new nt(e,t,n)}function ot(e,t,n){throw rt(e,t,n)}function it(e){try{console.error(e.toString())}catch(e){}finally{return e.error}}function ct(e,t,n){st(e,e,e.host,rt(e,t,n))}function ut(e,t,n){st(e,t,t,n)}function at(e,t,n){n&&n[$]&&!n[be]&&(n[be]=function(e,t,n){try{Et(e,$,t[$](n.error,n))}catch(t){ot(e,t,$)}finally{n.bubbles=!1}}(e,n,n[be]=t))}function st(e,t,n,r){if(function(e){zt(e.children,Xe(),e)}(n),at(n,r,n.owner),r.bubbles){if(!Ze(n.host))throw it(r);if(e!==t)throw r;st(e,t,n.host,r)}}function ft(e,t,n){try{var r,o=e.host,i=o.owner,c=i.props,u=i.state,a=i.context;"function"==typeof n?r=n.call(i,t,c,u,a):"function"==typeof n.handleEvent&&(i!==n&&n[me]&&(o=(i=n)[ye]),r=n.handleEvent(t,c,u,a)),r&&i[me]&&Et(o,F,r)}catch(e){!function(e,t,n){throw it(rt(e,t,n))}(o,e,F+":"+Ge(n.handleEvent||n))}}function lt(e,t){this.refs={},this.state={},this.props=e,this.context=t}ue(nt[W],{toString:{value:function(){return this.message}},message:{get:function(){return this[de]=this[de]||"Exception: "+Object(this.error).toString()+"\n\nThe following error occurred in `\n"+this.componentStack+'` from "'+this.origin+'"'}},componentStack:{get:function(){return this[me]=this[me]||function e(t,n){return t&&t.host?n+e(t.host,"<"+Ge(t)+">\n"):n}(this[ye].host,"<"+Ge(this[ye])+">\n")}}}),lt[W]=mt(lt[W]);var ht=we;function dt(e,t){lt.call(this,e,t)}function pt(e,t){lt.call(this,e,t)}function vt(e,t){Ct(this[ye],this,e,w,t)}function yt(e){Ct(this[ye],this,{},v,e)}function wt(e,t){if(e[me])return e[me];if("function"==typeof e&&!e[H])return wt(e[H]=e,t);for(var n in e[G]&&(t[G]=e[G]),e[ne]&&(t[re]=e[ne]),e)e[n]=bt(n,e[n]);return t[W]=fe(lt[W],e),e[me]=t}function mt(e){return ae(e,me,{value:me}),ae(e,R,{value:vt}),ae(e,q,{value:yt}),e[H]||ae(e,H,bt(H,Ee)),e}function bt(e,t){switch(e){case Q:case z:case J:case K:case X:case Y:case Z:case $:case ne:case ee:case te:case _:case G:case H:return{value:t,writable:!0,configurable:!0,enumerable:!1};default:return{value:t,writable:!0,configurable:!0,enumerable:"function"==typeof t}}}function xt(e){var t,n=e,r=e.props,o=e.host,i=e.context=o.context||en(e),c=function(e,t,n,r){try{return e.owner=new t(n,r)}catch(t){ot(e,t,_)}}(e,(t=e.type)[W]&&t[W][H]?(t[W][me]||mt(t[W]),t):t[me]||(dn(t)?pt:wt(t,function(){})),r,i),u=c.state=c.state||{};return c.props=r,c.context=i,c.refs=c.refs||{},c[pe]=c[de]={},c[ve]=e.cache=o.cache,c[ye]=e,c[te]&&(c.state=Ut(e,te,r,u,i)||u),c[Q]&&Ut(e,Q,r,u,i),n=Ae(u=c.state)?Ie(function(e,t,n){return function r(o,i){jt(e,t,n,w,function(){t[be]?i(t[be]):o(e.children.type.then===r&&Ot(e,t))})}}(e,c,u)):Ot(e,c),c[ee]&&(e.context=Se({},i,Ut(e,ee,r,u,i))),e.children=n}function gt(e){if(e.owner[Z]&&(e.cache=function(e,t){try{return e.owner[t](tn(Ke(e)))}catch(n){ct(e,n,t)}}(e,Z))&&Ae(e.cache))return e.cache.catch(function(t){ct(e,t,Z)});e.cache=null}function kt(e,t,n,r){try{!function(e,t,n){var r=e.owner,o=e.props,i=t.props,c=r.context,u=r.state,a=r[pe]=r[de],s=u;switch(n){case y:if(r[J]&&Ut(e,J,i,c,s),a!==r[de])break;case v:a=s}if(s=r[pe]=a!==s?Se({},u,a):s,n!==v&&r[K]&&!Ut(e,K,i,s,c))return;r[X]&&Ut(e,X,i,s,c);switch(n){case y:r.props=e.props=i;case w:r.state=s}r[ee]&&je(e.context,Ut(e,ee,i,s,c));zt(e.children,Ot(e,r),e),r[Y]&&Ut(e,Y,o,u,c);e.ref!==t.ref&&_t(e,t.ref,b)}(e,t,r)}catch(t){ut(e,n,t)}}function Ct(e,t,n,r,o){if(n)if(e)switch(typeof n){case"function":return Ct(e,t,St(e,t,n),r,o);case"object":if(Ae(t[de]=n))return jt(e,t,n,r,o);!function(e,t,n){e.active?e.work===O?je(t[pe],t[de]):kt(e,e,e,n):je(t.state,t[de])}(e,t,r)}else t.state=n;o&&St(e,t,o)}function Et(e,t,n){if(n)switch(typeof n){case"object":case"function":switch(t){case te:case ee:case K:break;default:Ct(e,e.owner,n,w)}}return n}function jt(e,t,n,r,o){n.then(function(n){var i;"function"==typeof(i=Object(n)).blob&&"function"==typeof i.text&&"function"==typeof i.json?Ct(e,t,n.json(),r,o):Ct(e,t,n,r,o)},function(n){if(Ae(e.children.type))try{t[be]=rt(e,n,R)}finally{St(e,t,o)}else ct(e,n,R)})}function St(e,t,n){try{if("function"==typeof n)return n.call(t,t.state,t.props,t.context)}catch(t){ct(e,t,B)}}function Nt(e,t){try{"function"==typeof t&&t.call(e.owner)}catch(t){ot(e,t,B)}}function Pt(e,t,n){try{switch(typeof n){case"function":return n.call(e.owner,t);case"object":return n.current=t;default:e.owner.refs&&(e.owner.refs[n]=t)}}catch(t){ot(e,t,B)}}function Ot(e,t){try{return Xe(t.render(t.props,t.state,t.context))}catch(t){ot(e,t,H)}}function Ut(e,t,n,r,o){t!==Y&&(e.work=O);try{return Et(e,t,e.owner[t](n,r,o))}catch(n){ot(e,n,t)}finally{e.work=P}}function At(e,t){lt.call(this,e,t)}function Mt(e,t){lt.call(this,e,t)}function Tt(e,t,n){t?Kt.has(t)?function(e,t,n){zt(e,t,e.host),n&&Nt(e,n)}(Kt.get(t).children,Xe(e),n):Dt(e,t,n,j):Tt(e,nn(),n)}function Dt(e,t,n,r){Ze(e)?ln(t)?function(e,t,n,r){Kt.set(t.owner=n,t),r===j&&Xt(t);Lt(e,e,t,t,S,r)}(e,De(e),t,r):Pe(H,"Target container is not a valid container"):Dt(Xe(e),t,n,r),n&&Nt(e,n)}function Lt(e,t,n,r,o,a){switch(e.host=r,e.parent=n,e.id){case s:return void function(e,t,n,r,o,i){try{Lt(xt(e),t,n,e,o,i),Ht(e),e.owner[z]&&function(e,t){try{Et(e,t,e.owner[t](tn(Ke(e))))}catch(n){ot(e,n,t)}}(e,z,e.owner),e.ref&&_t(e,e.ref,m)}catch(t){It(r.children,Xe(Ht(r)),r),ut(e,r,t)}}(e,t,n,r,o,a);case i:Ft(e,r,e.type);case c:return e.owner=n.owner,Vt(e,t,r,o,a),void Ht(e);case u:return e.owner=un(e,e.type),Vt(e,t,r,o,a),void Ht(e);case f:case l:e.xmlns=cn(e,n.xmlns);default:switch(a){case E:if(function(e,t){return e.active=!!(e.owner=an(e,t,Ke(Qe(e,t,V)),Qe(e,t,I)))}(e,n))break;default:Ht(e),o===S?Qt(e,n):Gt(e,t,n)}if(e.id>l)return}Vt(e,t,r,S,a),qt(e,sn(e,e.props),e.xmlns,k)}function Vt(e,t,n,r,o){for(var i=e.children,c=i.length;c>0;--c)Lt(i=i.next,t,e,n,r,o)}function It(e,t,n){var r=e.parent,o=Qe(e,r,I);Wt(e,r),o.active?Lt(t,o,r,n,N,j):Lt(t,o,r,n,S,j),t.active&&(e!==n.children?function(e,t,n){n.insert(t,e),n.remove(e)}(e,t,r.children):n.children=t)}function Ft(e,t,n){n.then(function(r){e.active&&e.type===n&&Jt(e,function e(t){return!Ze(t)&&se.call(Object(t),"default")?e(t.default):We(Xe(t))}(r),t)},function(t){ct(e,t,H)})}function Wt(e,t){if(e.active){if(Bt(e,t,e),e.id===s&&e.cache)return function(e,t){e.cache.then(function(){Rt(e,t)})}(e,t);Rt(e,t)}}function Bt(e,t,n){switch(e.active=!1,e.id){case s:e.children&&function(e,t,n,r){Bt(r,t,e!==n?n:r),gt(e)}(e,t,n,e.children);case a:break;case d:case p:case h:return pn(e,t,n);case u:if(e.active=e!==n&&t.id>a)return Wt(e,t);default:for(var r=e.children,o=r.length;o>0;--o)Bt(r=r.next,e,n);pn(e,t,n)}e.ref&&_t(e,e.ref,x)}function Ht(e){try{switch(e.id){case l:e.owner=gn(e);break;case d:e.owner=mn(e);break;case p:e.owner=bn(e);break;case h:e.owner=xn(e);break;case f:e.owner=kn(e);case s:case u:break;default:e.owner=Je(e,I).owner}}catch(t){ot(e,t,H)}finally{e.active=!0}}function _t(e,t,n){switch(typeof t){case"object":if(t)break;case"undefined":return _t(e,e.ref===t?Ee:e.ref,x)}switch(n){case x:return Pt(e.host,e.ref=null,t);case g:e.ref=t;case m:return Pt(e.host,e.owner,t);case b:_t(e,e.ref,x),_t(e,t,g)}}function qt(e,t,n,r){for(var o in t)switch(o){case"ref":_t(e,t[o],r);case"key":case"xmlns":case"children":break;default:$t(e,o,t[o],n,r)}}function Rt(e,t){if(t.id<u)return Rt(e,ze(t));switch(e.id){case u:case i:case c:return e.children.forEach(function(t){Rt(Ke(t),e)});case s:return Rt(Ke(e),t)}wn(e,t)}function Gt(e,t,n){if(n.id<a){if(n.id<u)return Gt(e,t,ze(n));if(!n.active)return Qt(e,n)}switch(t.id){case u:return Gt(e,Qe(t,n,I),n);case i:case c:return Gt(e,Je(t,I),n);case s:return Gt(e,Ke(t),n);case a:return Qt(e,n)}switch(e.id){case u:return;case i:case c:return e.children.forEach(function(e){Gt(Ke(e),t,n)});case s:return Gt(Ke(e),t,n)}vn(e,t,n)}function Qt(e,t){if(t.id<u)return Qt(e,ze(t));switch(e.id){case u:return;case i:case c:return e.children.forEach(function(e){Qt(Ke(e),t)});case s:return Qt(Ke(e),t)}yn(e,t)}function zt(e,t,n){if(e.active){if(e.key!==t.key)return It(e,t,n);if(e.id===i&&t.id===i)return Ft(e,n,e.type=t.type);if(e.type!==t.type)return It(e,t,n);switch(e.id){case d:case h:e.children!==t.children&&function(e,t){switch(e.id){case d:return Yt(e,t);case h:Zt(e,t)}}(e,e.children=t.children);case p:return;case u:case c:return Jt(e,t,n);case s:return kt(e,t,n,y)}Jt(e,t,n),function(e,t){qt(e,fn(e,t),e.xmlns,C)}(e,function e(t,n){if(t===n)return;var r=0;var o={};for(var i in t)se.call(n,i)||(o[(++r,i)]=null);for(var i in n){var c=n[i],u=t[i];c!==u&&("object"!=typeof c||null===c?o[(++r,i)]=c:(c===n||c[xe]===xe||(c=e(u||{},c)))&&(o[(++r,i)]=c))}if(r>0)return o}(e.props,e.props=t.props))}}function Jt(e,t,n){var r=S,o=e.children,i=t.children,c=o.length,u=i.length;if(c+u!==0){var a=0,s=0,f=c-1,l=u-1,h=o.next,d=i.next,p=o.prev,v=i.prev,y=h,w=d,m=p,b=v;e:for(;;){for(;h.key===d.key;){if(y=h.next,w=d.next,zt(h,d,n),++s,++a>f||s>l)break e;h=y,d=w}for(;p.key===v.key;){if(m=p.prev,b=v.prev,zt(p,v,n),--l,a>--f||s>l)break e;p=m,v=b}break}if(a>f++){if(s<=l++)for(l<u?r=N:(p=o,c>0&&(d=w));s++<l;)d=(h=d).next,Lt(o.insert(h,p),p,e,n,r,j)}else if(s>l++)for(l===u&&u>0&&(h=y);a++<f;)h=(d=h).next,Wt(o.remove(d),e);else!function(e,t,n,r,o,i,c,u,a,s){var f=i,l=c,h=r,d=o,p=h,v=h,y=h,w=h,m={},b={};for(;f<u||l<a;)f<u&&(m[h.key]=h,++f!==s)&&(h=h.next),l<a&&(b[d.key]=d,++l!==a)&&(d=d.next);for(;l-- >c;){if(p=d.prev,v=d.next,y=m[d.key],w=m[v.key],Ze(y))if(Ze(v)){if(v=v.active?v:w||h,w=y.next,v.key!==w.key){for(;Ze(w)&&!Ze(b[w.key]);)w=w.next;v.key!==w.key&&(p.key===y.prev.key&&v.key===w.next.key||Gt(n.insert(n.remove(y),v),v,e))}}else Ze(w=y.next)&&Ze(b[w.key])&&(p.key===h.key?Qt(n.insert(n.remove(y),n),e):w!==h&&(Ze(v=b[h.key])?h.prev.key===v.prev.key?Qt(n.insert(n.remove(y),n),e):Gt(n.insert(n.remove(y),h),h,e):w.key!==h.prev.key&&Gt(n.insert(n.remove(y),h),h,e)));else Ze(v)?(v=v.active?v:w||h,Lt(n.insert(d,v),v,e,t,N,j)):Lt(n.insert(d,n),d,e,t,S,j);d=p}for(var x in m)Ze((h=m[x],d=b[x]))?zt(h,d,t):Wt(n.remove(h),e)}(e,n,o,h,d,a,s,f,l,c)}}dt[W]=fe(lt[W],{shouldComponentUpdate:{value:function(e,t){return Oe(this.props,e)||Oe(this.state,t)}}}),pt[W]=fe(lt[W],{render:{value:function(e){return function(e,t,n){var r=new Me(f);return r.type=e,r.props=t,r.children=Be(n),r}(this[ye].type,e,e.children)}}}),At[W]=fe(lt[W],{getInitialState:{value:function(e,t,n){return this[ye].cache={provider:this,consumers:new ke}}},render:{value:function(e){return e.children}},componentDidUpdate:{value:function(e){!Ue(this.props.value,e.value)&&this.state.consumers.forEach(this.componentChildUpdate)}},componentChildUpdate:{value:function(e){e.didUpdate=!e.didUpdate&&!!e[q]()}}}),Mt[W]=fe(lt[W],{getInitialState:{value:function(e){return this[ve]||{provider:this}}},render:{value:function(e,t){return e.children(t.provider.props.value)}},componentWillReceiveProps:{value:function(){this.didUpdate=!0}},componentDidMount:{value:function(){this.state.consumers&&this.state.consumers.insert(this,this.state.consumers)}},componentWillUnmount:{value:function(){this.state.consumers&&this.state.consumers.remove(this)}}});var Kt=new oe,Xt=tt("setDocument",function(e){e.owner.textContent=""}),Yt=tt("setText",function(e,t){e.owner.nodeValue=t}),Zt=tt("setComment",function(e,t){e.owner.nodeValue=t}),$t=tt("setProps",function e(t,n,r,o,i){switch(n){case"style":return function(e,t,n){if("object"!=typeof n)return En(e,t,n,"");for(var r in n){var o=n[r];-1===r.indexOf("-")?e.owner.style[r]=!1!==o&&void 0!==o?o:"":e.owner.style.setProperty(r,o)}}(t,n,r);case"className":if(!o&&r)return Cn(t,n,r);case"class":return En(t,"class",r,"");case"xlink:href":return En(t,n,r,"http://www.w3.org/1999/xlink");case"innerHTML":return function(e,t,n,r){e.owner[t]&&e.children.forEach(function(e){r.push(e.owner)});(e.owner[t]=n)&&r.push.apply(r,e.owner.childNodes);r.forEach(function(t){e.owner.appendChild(t)})}(t,n,r||"",[]);case"dangerouslySetInnerHTML":return e(t,"innerHTML",r&&r.__html,o,i);case"acceptCharset":return e(t,"accept-charset",r,o,i);case"httpEquiv":return e(t,"http-equiv",r,o,i);case"tabIndex":return e(t,n.toLowerCase(),r,o,i);case"autofocus":case"autoFocus":return t.owner[r?"focus":"blur"]();case"defaultValue":if("select"===t.type)return;break;case"width":case"height":if("img"===t.type)return En(t,n,r,"")}if(111===n.charCodeAt(0)&&110===n.charCodeAt(1)&&n.length>2)return function(e,t,n){e.cache||(e.cache={});e.cache[t]||e.owner.addEventListener(t,e,!1);e.cache[t]=n}(t,n.substring(2).toLowerCase(),r);switch(typeof r){case"object":return Cn(t,n,r&&t.props[n]);case"string":case"number":case"boolean":if(o||!(n in t.owner))return En(t,n,r,"");default:Cn(t,n,r)}}),en=tt("getContext",function(e){return{}}),tn=tt("getOwner",function(e){return e.owner}),nn=tt("getDocument",jn),rn=tt("getTarget",function(e){return e.currentTarget}),on=tt("getListener",function(e,t){return e.cache[t.type]}),cn=tt("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}),un=tt("getPortal",Sn),an=tt("getQuery",function(e,t,n,r){var o=e.id,i=o>h?"#text":e.type.toLowerCase(),c=e.props,a=e.children,s=a.length,f=n.active?n.owner.nextSibling:t.owner.firstChild,d=f,p=null;for(;f&&(f.nodeName.toLowerCase()!==i||(o>l?(o>h&&r.id>l&&f.splitText(0),f.nodeValue!==a&&(f.nodeValue=a)):0===s&&f.firstChild&&(f.textContent=""),t.id===u&&Sn(t,t.type).appendChild(f),p=f,i=null,(f=f.nextSibling)&&!r.type));){if(o>h&&0===s){if(f.parentNode.insertBefore(p=Pn(e),f),r.type)break;i=null}f=(d=f).nextSibling,d.parentNode.removeChild(d)}if(p&&p.attributes)for(var v=p.attributes,y=v.length-1;y>=0;--y)null==c[i=v[y].name]&&p.removeAttribute(i);return p}),sn=tt("getInitialProps",function(e,t){switch(e.type){case"input":return je({type:null,step:null,min:null,max:null},t);case"select":return je({value:t.defaultValue},t)}return t}),fn=tt("getUpdatedProps",function(e,t){return t}),ln=tt("isValidTarget",Nn),hn=tt("isValidEvent",function(e){return null!=e&&3===e.BUBBLING_PHASE}),dn=tt("isValidComponent",function(e){return Nn(e[W])}),pn=tt("willUnmount",function(e,t,n){}),vn=tt("insertChild",function(e,t,n){n.owner.insertBefore(e.owner,t.owner)}),yn=tt("appendChild",function(e,t){t.owner.appendChild(e.owner)}),wn=tt("removeChild",function(e,t){t.owner.removeChild(e.owner)}),mn=tt("createText",Pn),bn=tt("createEmpty",function(e){return document.createTextNode("")}),xn=tt("createComment",function(e){return document.createComment(e.children)}),gn=tt("createElement",function(e){return e.xmlns?document.createElementNS(e.xmlns,e.type):document.createElement(e.type)}),kn=tt("createComponent",function(e){return new e.type(e.props)});function Cn(e,t,n){switch(n){case null:case!1:case void 0:return En(e,t,n,e.owner[t]="");default:e.owner[t]=n}}function En(e,t,n,r){switch(n){case null:case!1:case void 0:return r&&e.owner.removeAttributeNS(r,t),e.owner.removeAttribute(t);case!0:return En(e,t,"",r);default:r?e.owner.setAttributeNS(r,t,n):e.owner.setAttribute(t,n)}}function jn(){return document.documentElement}function Sn(e,t){return"string"==typeof t?jn().querySelector(t):Nn(t)?t:jn()}function Nn(e){return null!=e&&1===e.ELEMENT_NODE}function Pn(e){return document.createTextNode(e.children)}return o.render=Tt,o.hydrate=function e(t,n,r){n?Dt(t,n,r,E):e(t,nn(),r)},o.Component=lt,o.Fragment=ht,o.PureComponent=dt,o.Children=$e,o.createContext=function(e){return function(e){return{Provider:function(t){return Ye(At,Se({},e,t))},Consumer:function(t){return Ye(Mt,Se({},e,t))}}}({value:e,children:Ee})},o.createFactory=function(e){return null===e||"object"!=typeof e||Ae(e)?Ye.bind(null,e):n(t,e)},o.cloneElement=function(e){if(Ze(e))return function(e,t,n){var r=Ye.apply(null,[e].concat(n));return Re(r,r.props=Se({},t,r.props)),r}(e.type,e.props,[].slice.call(arguments,1))},o.isValidElement=Ze,o.createPortal=function(e,t,n){var r=new Me(u);return r.type=t,r.key=void 0===n?null:n,r.children=Be(e),r},o.createElement=Ye,o.createComment=function(e,t){var n=new Me(h);return n.type=T,n.key=void 0===t?null:t,n.children=e+"",n},o.createClass=function(e){return wt(Object(e),function e(t,n){for(var r=0,o=le(e[W]);r<o.length;++r)this[o[r]]=this[o[r]].bind(this)})},o.unmountComponentAtNode=function(e){return Kt.has(e)&&!Tt(null,e)},o.findDOMNode=function e(t){if(t)return Ze(t[ye])?e(t[ye]):Ze(t)?t.active&&tn(Ke(t)):hn(t)?rn(t):ln(t)?t:void 0},o.h=Ye,o}"object"==typeof exports&&"object"==typeof module?module.exports=n(e.process&&e.process.exit&&"function"==typeof t&&t("./cjs")):"function"==typeof define&&define.amd?define(n()):e.dio=n()}("object"==typeof window&&window.window===window?window:"object"==typeof global&&global.global===global?global:this,"object"==typeof arguments&&arguments[1]);export var render=dio.render;export var hydrate=dio.hydrate;export var Component=dio.Component;export var Fragment=dio.Fragment;export var PureComponent=dio.PureComponent;export var Children=dio.Children;export var createContext=dio.createContext;export var createFactory=dio.createFactory;export var cloneElement=dio.cloneElement;export var isValidElement=dio.isValidElement;export var createPortal=dio.createPortal;export var createElement=dio.createElement;export var createComment=dio.createComment;export var createClass=dio.createClass;export var unmountComponentAtNode=dio.unmountComponentAtNode;export var findDOMNode=dio.findDOMNode;export var h=dio.h;export default dio;
!function(e,t){"use strict";function n(t,r){var o={version:"9.0.0"},i=0,c=1,u=2,a=3,s=4,f=5,l=6,h=7,d=8,p=9,v=0,y=1,w=2,m=0,b=1,x=2,g=3,k=0,C=1,E=0,j=1,S=0,N=1,P=0,O=1,U="&|head|",A="&|body|",M="&|tail|",T="#comment",D="#empty",L="#text",V="prev",I="next",F="event",W="prototype",B="callback",H="render",_="constructor",q="forceUpdate",R="setState",G="displayName",Q="componentWillMount",z="componentDidMount",J="componentWillReceiveProps",K="shouldComponentUpdate",X="componentWillUpdate",Y="componentDidUpdate",Z="componentWillUnmount",$="componentDidCatch",ee="getChildContext",te="getInitialState",ne="getDefaultProps",re="defaultProps",oe=e.WeakMap||Ce,ie=e.Symbol||Math.random,ce=Array.isArray,ue=Object.defineProperties,ae=Object.defineProperty,se=Object.hasOwnProperty,fe=Object.create,le=Object.keys,he=ie.for||function(e){for(var t=0,n=0;t<e.length;++t)n=(n<<5)-n+e.charCodeAt(t);return n>>>0},de=he("dio.Cache"),pe=he("dio.State"),ve=he("dio.Context"),ye=he("dio.Element"),we=he("dio.Fragment"),me=he("dio.Component"),be=he("dio.Exception"),xe=ie.iterator||"@@iterator",ge=ie.asyncIterator||"@@asyncIterator";function ke(){this.next=this,this.prev=this,this.length=0}function Ce(){this.hash=ie()}function Ee(){}function je(e,t){for(var n in t)e[n]=t[n];return e}function Se(e,t,n){for(var r in t)e[r]=t[r];for(var r in n)e[r]=n[r];return e}function Ne(e,t){if(null!=e){if("object"==typeof e){if("function"==typeof e.forEach||"function"==typeof e.next)return function(e,t){if("function"==typeof e.forEach)return e.forEach(t);for(var n=e.next(n);!n.done;)n=e.next(n.value,t(n.value))}(e,function(e){Ne(e,t)});if("function"==typeof e[xe])return Ne(e[xe](),t)}t(e)}}function Pe(e,t){throw new Error("#"+e+"(...): "+t+".")}function Oe(e,t){for(var n in e)if(!se.call(t,n))return!0;for(var n in t)if(!Ue(e[n],t[n]))return!0;return!1}function Ue(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function Ae(e){return"function"==typeof e.then&&"function"==typeof e.catch}function Me(e){this.id=e,this.active=!1,this.work=P,this.xmlns=null,this.key=null,this.ref=null,this.type=null,this.props=null,this.cache=null,this.children=null,this.owner=null,this.context=null,this.parent=null,this.host=null,this.next=null,this.prev=null}function Te(e){var t=new Me(e.id),n=e.children;return"object"==typeof n&&e.id!==s&&(n=function(e){for(var t=new ke,n=e,r=n.length;r>0;--r)t.insert(Te(n=n.next),t);return t}(n)),t.type=e.type,t.props=e.props,t.xmlns=e.xmlns,t.key=e.key,t.ref=e.ref,t.children=n,t}function De(e){var t=new Me(a);return t.children=e,t}function Le(e,t){var n=new Me(d);return n.type=L,n.key=A+t,n.children=e+"",n}function Ve(e){var t=new Me(p);return t.type=D,t.key=A+e,t.children="",t}function Ie(e){return Ye({then:e,catch:Ee})}function Fe(e,t){return(e.type.then=function(e,t){return function n(r,o){return t.next(e.cache).then(function(t){!0!==t.done||void 0!==t.value?r(e.cache=t.value,t.done,n(r,o)):e.context&&r(e.cache,t.done)},o)}}(e,t))&&e}function We(e){var t=new Me(c);return t.type=we,t.children=Be(e),t}function Be(e){var t=new ke;if(ce(e))for(var n=0;n<e.length;++n)qe(t,e[n],n);else qe(t,e,0);return _e(t),t}function He(e,t){switch(typeof e){case"boolean":return Ve(t);case"object":if(e[xe])return We(et(e));if(e[ge])return Fe(Ie(Ee),e);if(!Ae(e))break;case"function":return Ye(e)}Pe(H,"Invalid element [object "+Ge(e)+"]")}function _e(e){e.insert(Ve(U),e.next),e.insert(Ve(M),e)}function qe(e,t,n){if(null!=t)if(t.constructor===ye)null===t.key&&(t.key=A+n),e.insert(null===t.next?t:Te(t),e);else switch(typeof t){case"string":case"number":e.insert(Le(t,n),e);break;case"object":if(ce(t)){for(var r=0;r<t.length;++r)qe(e,t[r],n+r);return n+r}default:return qe(e,He(t,n),n)}else e.insert(Ve(n),e);return n+1}function Re(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 Ge(e){switch(typeof e){case"number":case"symbol":return Ge(e.toString());case"function":return Ge(e[G]||e.name);case"object":if(Ze(e))return Ge(e.type);case"string":if(e)return e;default:return"#anonymous"}}function Qe(e,t,n){return Ze(e[n])?e[n].id===u?Qe(e[n],t,n):e[n]:e.host&&e.host.children===e?Qe(e.host,t,n):t.id<a?Qe(t,t.parent,n):De(e)}function ze(e){return e.id<u?ze(e.parent):e}function Je(e,t){return e.id<a?Je(e.children[t]):e}function Ke(e){return e.id===s?Ke(e.children):e}function Xe(e){if(null==e)return Ve(A);if(e.constructor===ye)return e;switch(typeof e){case"string":case"number":return Le(e,A);case"object":if(ce(e))return We(e);default:return He(e,A)}}function Ye(e,t){var n,r=null!=t?1:2,o=0,u="function"!=typeof e?l:s,a=arguments.length,f=new Me(u),h={},d=f.children=u!==s?new ke:void 0;if(1===r&&"object"==typeof t&&void 0===t[xe])switch(t.constructor){default:if(ce(t))break;case Object:if(Ae(t))break;Re(f,(++r,h=t)),void 0!==h.children&&u!==s&&a-r<1&&(o=qe(d,h.children,o))}if((n=a-r)>0)if(u!==s)for(;r<a;++r)o=qe(d,arguments[r],o);else{if(1===n)d=arguments[r];else for(d=[];r<a;++r)d.push(arguments[r]);h.children=d}switch(typeof e){case"function":e[re]&&(h=Se({},function(e,t,n){return"function"==typeof t[re]?t[re](n):t[re]}(0,e,h),h));break;case"number":case"symbol":e===we&&_e((f.id=c,d));break;default:Ae(e)&&_e((f.id=i,d))}return f.type=e,f.props=h,f}function Ze(e){return null!=e&&e.constructor===ye}ue(ae(ke[W],xe,{value:xe}),{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=this,n=t.length;n>0;--n)e(t=t.next)}}}),ue(Ce[W],{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}}}),ue(ae(Me[W],xe,{value:xe}),{constructor:{value:ye},handleEvent:{value:function(e){var t=this,n=on(t,e);if(!n)return;if("object"==typeof n&&(n[xe]||ce(n)))return Ne(n,function(n){ft(t,e,n)});ft(t,e,n)}}});var $e={toArray:et,forEach:function(e,t,n){null!=e&&et(e).forEach(t,n)},map:function(e,t,n){return null!=e?et(e).map(t,n):e},filter:function(e,t,n){return null!=e?et(e).filter(t,n):e},find:function(e,t,n){return null!=e?function(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]}(et(e),t,n):e},count:function(e){return et(e).length},only:function(e){return Ze(e)?e:Pe("Children.only","Expected to receive a single element")}};function et(e){var t=[];return Ne(e,function(e){t.push(e)}),t}function tt(e,t){return r?"function"==typeof r[e]?r[e].bind(r):r[e]=t:t}function nt(e,t,n){this.error=t,this.origin=n,this.bubbles=!0,this[ye]=e}function rt(e,t,n){return new nt(e,t,n)}function ot(e,t,n){throw rt(e,t,n)}function it(e){try{console.error(e.toString())}catch(e){}finally{return e.error}}function ct(e,t,n){st(e,e,e.host,rt(e,t,n))}function ut(e,t,n){st(e,t,t,n)}function at(e,t,n){n&&n[$]&&!n[be]&&(n[be]=function(e,t,n){try{Et(e,$,t[$](n.error,n))}catch(t){ot(e,t,$)}finally{n.bubbles=!1}}(e,n,n[be]=t))}function st(e,t,n,r){if(function(e){zt(e.children,Xe(),e)}(n),at(n,r,n.owner),r.bubbles){if(!Ze(n.host))throw it(r);if(e!==t)throw r;st(e,t,n.host,r)}}function ft(e,t,n){try{var r,o=e.host,i=o.owner,c=i.props,u=i.state,a=i.context;"function"==typeof n?r=n.call(i,t,c,u,a):"function"==typeof n.handleEvent&&(i!==n&&n[me]&&(o=(i=n)[ye]),r=n.handleEvent(t,c,u,a)),r&&i[me]&&Et(o,F,r)}catch(e){!function(e,t,n){throw it(rt(e,t,n))}(o,e,F+":"+Ge(n.handleEvent||n))}}function lt(e,t){this.refs={},this.state={},this.props=e,this.context=t}ue(nt[W],{toString:{value:function(){return this.message}},message:{get:function(){return this[de]=this[de]||"Exception: "+Object(this.error).toString()+"\n\nThe following error occurred in `\n"+this.componentStack+'` from "'+this.origin+'"'}},componentStack:{get:function(){return this[me]=this[me]||function e(t,n){return t&&t.host?n+e(t.host,"<"+Ge(t)+">\n"):n}(this[ye].host,"<"+Ge(this[ye])+">\n")}}}),lt[W]=mt(lt[W]);var ht=we;function dt(e,t){lt.call(this,e,t)}function pt(e,t){lt.call(this,e,t)}function vt(e,t){Ct(this[ye],this,e,w,t)}function yt(e){Ct(this[ye],this,{},v,e)}function wt(e,t){if(e[me])return e[me];if("function"==typeof e&&!e[H])return wt(e[H]=e,t);for(var n in e[G]&&(t[G]=e[G]),e[ne]&&(t[re]=e[ne]),e)e[n]=bt(n,e[n]);return t[W]=fe(lt[W],e),e[me]=t}function mt(e){return ae(e,me,{value:me}),ae(e,R,{value:vt}),ae(e,q,{value:yt}),e[H]||ae(e,H,bt(H,Ee)),e}function bt(e,t){switch(e){case Q:case z:case J:case K:case X:case Y:case Z:case $:case ne:case ee:case te:case _:case G:case H:return{value:t,writable:!0,configurable:!0,enumerable:!1};default:return{value:t,writable:!0,configurable:!0,enumerable:"function"==typeof t}}}function xt(e){var t,n=e,r=e.props,o=e.host,i=e.context=o.context||en(e),c=function(e,t,n,r){try{return e.owner=new t(n,r)}catch(t){ot(e,t,_)}}(e,(t=e.type)[W]&&t[W][H]?(t[W][me]||mt(t[W]),t):t[me]||(dn(t)?pt:wt(t,function(){})),r,i),u=c.state=c.state||{};return c.props=r,c.context=i,c.refs=c.refs||{},c[pe]=c[de]={},c[ve]=e.cache=o.cache,c[ye]=e,c[te]&&(c.state=Ut(e,te,r,u,i)||u),c[Q]&&Ut(e,Q,r,u,i),n=Ae(u=c.state)?Ie(function(e,t,n){return function r(o,i){jt(e,t,n,w,function(){t[be]?i(t[be]):o(e.children.type.then===r&&Ot(e,t))})}}(e,c,u)):Ot(e,c),c[ee]&&(e.context=Se({},i,Ut(e,ee,r,u,i))),e.children=n}function gt(e){if(e.owner[Z]&&(e.cache=function(e,t){try{return e.owner[t](tn(Ke(e)))}catch(n){ct(e,n,t)}}(e,Z))&&Ae(e.cache))return e.cache.catch(function(t){ct(e,t,Z)});e.cache=null}function kt(e,t,n,r){try{!function(e,t,n){var r=e.owner,o=e.props,i=t.props,c=r.context,u=r.state,a=r[pe]=r[de],s=u;switch(n){case y:if(r[J]&&Ut(e,J,i,c,s),a!==r[de])break;case v:a=s}if(s=r[pe]=a!==s?Se({},u,a):s,n!==v&&r[K]&&!Ut(e,K,i,s,c))return;r[X]&&Ut(e,X,i,s,c);switch(n){case y:r.props=e.props=i;case w:r.state=s}r[ee]&&je(e.context,Ut(e,ee,i,s,c));zt(e.children,Ot(e,r),e),r[Y]&&Ut(e,Y,o,u,c);e.ref!==t.ref&&_t(e,t.ref,b)}(e,t,r)}catch(t){ut(e,n,t)}}function Ct(e,t,n,r,o){if(n)if(e)switch(typeof n){case"function":return Ct(e,t,St(e,t,n),r,o);case"object":if(Ae(t[de]=n))return jt(e,t,n,r,o);!function(e,t,n){e.active?e.work===O?je(t[pe],t[de]):kt(e,e,e,n):je(t.state,t[de])}(e,t,r)}else t.state=n;o&&St(e,t,o)}function Et(e,t,n){if(n)switch(typeof n){case"object":case"function":switch(t){case te:case ee:case K:break;default:Ct(e,e.owner,n,w)}}return n}function jt(e,t,n,r,o){n.then(function(n){var i;"function"==typeof(i=Object(n)).blob&&"function"==typeof i.text&&"function"==typeof i.json?Ct(e,t,n.json(),r,o):Ct(e,t,n,r,o)},function(n){if(Ae(e.children.type))try{t[be]=rt(e,n,R)}finally{St(e,t,o)}else ct(e,n,R)})}function St(e,t,n){try{if("function"==typeof n)return n.call(t,t.state,t.props,t.context)}catch(t){ct(e,t,B)}}function Nt(e,t){try{"function"==typeof t&&t.call(e.owner)}catch(t){ot(e,t,B)}}function Pt(e,t,n){try{switch(typeof n){case"function":return n.call(e.owner,t);case"object":return n.current=t;default:e.owner.refs&&(e.owner.refs[n]=t)}}catch(t){ot(e,t,B)}}function Ot(e,t){try{return Xe(t.render(t.props,t.state,t.context))}catch(t){ot(e,t,H)}}function Ut(e,t,n,r,o){t!==Y&&(e.work=O);try{return Et(e,t,e.owner[t](n,r,o))}catch(n){ot(e,n,t)}finally{e.work=P}}function At(e,t){lt.call(this,e,t)}function Mt(e,t){lt.call(this,e,t)}function Tt(e,t,n){t?Kt.has(t)?function(e,t,n){zt(e,t,e.host),n&&Nt(e,n)}(Kt.get(t).children,Xe(e),n):Dt(e,t,n,j):Tt(e,nn(),n)}function Dt(e,t,n,r){Ze(e)?ln(t)?function(e,t,n,r){Kt.set(t.owner=n,t),r===j&&Xt(t);Lt(e,e,t,t,S,r)}(e,De(e),t,r):Pe(H,"Target container is not a valid container"):Dt(Xe(e),t,n,r),n&&Nt(e,n)}function Lt(e,t,n,r,o,a){switch(e.host=r,e.parent=n,e.id){case s:return void function(e,t,n,r,o,i){try{Lt(xt(e),t,n,e,o,i),Ht(e),e.owner[z]&&function(e,t){try{Et(e,t,e.owner[t](tn(Ke(e))))}catch(n){ot(e,n,t)}}(e,z,e.owner),e.ref&&_t(e,e.ref,m)}catch(t){It(r.children,Xe(Ht(r)),r),ut(e,r,t)}}(e,t,n,r,o,a);case i:Ft(e,r,e.type);case c:return e.owner=n.owner,Vt(e,t,r,o,a),void Ht(e);case u:return e.owner=un(e,e.type),Vt(e,t,r,o,a),void Ht(e);case f:case l:e.xmlns=cn(e,n.xmlns);default:switch(a){case E:if(function(e,t){return e.active=!!(e.owner=an(e,t,Ke(Qe(e,t,V)),Qe(e,t,I)))}(e,n))break;default:Ht(e),o===S?Qt(e,n):Gt(e,t,n)}if(e.id>l)return}Vt(e,t,r,S,a),qt(e,sn(e,e.props),e.xmlns,k)}function Vt(e,t,n,r,o){for(var i=e.children,c=i.length;c>0;--c)Lt(i=i.next,t,e,n,r,o)}function It(e,t,n){var r=e.parent,o=Qe(e,r,I);Wt(e,r),o.active?Lt(t,o,r,n,N,j):Lt(t,o,r,n,S,j),t.active&&(e!==n.children?function(e,t,n){n.insert(t,e),n.remove(e)}(e,t,r.children):n.children=t)}function Ft(e,t,n){n.then(function(r){e.active&&e.type===n&&Jt(e,function e(t){return!Ze(t)&&se.call(Object(t),"default")?e(t.default):We(Xe(t))}(r),t)},function(t){ct(e,t,H)})}function Wt(e,t){if(e.active){if(Bt(e,t,e),e.id===s&&e.cache)return function(e,t){e.cache.then(function(){Rt(e,t)})}(e,t);Rt(e,t)}}function Bt(e,t,n){switch(e.active=!1,e.id){case s:e.children&&function(e,t,n,r){Bt(r,t,e!==n?n:r),gt(e)}(e,t,n,e.children);case a:break;case d:case p:case h:return pn(e,t,n);case u:if(e.active=e!==n&&t.id>a)return Wt(e,t);default:for(var r=e.children,o=r.length;o>0;--o)Bt(r=r.next,e,n);pn(e,t,n)}e.ref&&_t(e,e.ref,x)}function Ht(e){try{switch(e.id){case l:e.owner=gn(e);break;case d:e.owner=mn(e);break;case p:e.owner=bn(e);break;case h:e.owner=xn(e);break;case f:e.owner=kn(e);case s:case u:break;default:e.owner=Je(e,I).owner}}catch(t){ot(e,t,H)}finally{e.active=!0}}function _t(e,t,n){switch(typeof t){case"object":if(t)break;case"undefined":return _t(e,e.ref===t?Ee:e.ref,x)}switch(n){case x:return Pt(e.host,e.ref=null,t);case g:e.ref=t;case m:return Pt(e.host,e.owner,t);case b:_t(e,e.ref,x),_t(e,t,g)}}function qt(e,t,n,r){for(var o in t)switch(o){case"ref":_t(e,t[o],r);case"key":case"xmlns":case"children":break;default:$t(e,o,t[o],n,r)}}function Rt(e,t){if(t.id<u)return Rt(e,ze(t));switch(e.id){case u:case i:case c:return e.children.forEach(function(t){Rt(Ke(t),e)});case s:return Rt(Ke(e),t)}wn(e,t)}function Gt(e,t,n){if(n.id<a){if(n.id<u)return Gt(e,t,ze(n));if(!n.active)return Qt(e,n)}switch(t.id){case u:return Gt(e,Qe(t,n,I),n);case i:case c:return Gt(e,Je(t,I),n);case s:return Gt(e,Ke(t),n);case a:return Qt(e,n)}switch(e.id){case u:return;case i:case c:return e.children.forEach(function(e){Gt(Ke(e),t,n)});case s:return Gt(Ke(e),t,n)}vn(e,t,n)}function Qt(e,t){if(t.id<u)return Qt(e,ze(t));switch(e.id){case u:return;case i:case c:return e.children.forEach(function(e){Qt(Ke(e),t)});case s:return Qt(Ke(e),t)}yn(e,t)}function zt(e,t,n){if(e.active){if(e.key!==t.key)return It(e,t,n);if(e.id===i&&t.id===i)return Ft(e,n,e.type=t.type);if(e.type!==t.type)return It(e,t,n);switch(e.id){case d:case h:e.children!==t.children&&function(e,t){switch(e.id){case d:return Yt(e,t);case h:Zt(e,t)}}(e,e.children=t.children);case p:return;case u:case c:return Jt(e,t,n);case s:return kt(e,t,n,y)}Jt(e,t,n),function(e,t){qt(e,fn(e,t),e.xmlns,C)}(e,function e(t,n){if(t===n)return;var r=0;var o={};for(var i in t)se.call(n,i)||(o[(++r,i)]=null);for(var i in n){var c=n[i],u=t[i];c!==u&&("object"!=typeof c||null===c?o[(++r,i)]=c:(c===n||c[xe]===xe||(c=e(u||{},c)))&&(o[(++r,i)]=c))}if(r>0)return o}(e.props,e.props=t.props))}}function Jt(e,t,n){var r=S,o=e.children,i=t.children,c=o.length,u=i.length;if(c+u!==0){var a=0,s=0,f=c-1,l=u-1,h=o.next,d=i.next,p=o.prev,v=i.prev,y=h,w=d,m=p,b=v;e:for(;;){for(;h.key===d.key;){if(y=h.next,w=d.next,zt(h,d,n),++s,++a>f||s>l)break e;h=y,d=w}for(;p.key===v.key;){if(m=p.prev,b=v.prev,zt(p,v,n),--l,a>--f||s>l)break e;p=m,v=b}break}if(a>f++){if(s<=l++)for(l<u?r=N:(p=o,c>0&&(d=w));s++<l;)d=(h=d).next,Lt(o.insert(h,p),p,e,n,r,j)}else if(s>l++)for(l===u&&u>0&&(h=y);a++<f;)h=(d=h).next,Wt(o.remove(d),e);else!function(e,t,n,r,o,i,c,u,a,s){var f=i,l=c,h=r,d=o,p=h,v=h,y=h,w=h,m={},b={};for(;f<u||l<a;)f<u&&(m[h.key]=h,++f!==s)&&(h=h.next),l<a&&(b[d.key]=d,++l!==a)&&(d=d.next);for(;l-- >c;){if(p=d.prev,v=d.next,y=m[d.key],w=m[v.key],Ze(y))if(Ze(v)){if(v=v.active?v:w||h,w=y.next,v.key!==w.key){for(;Ze(w)&&!Ze(b[w.key]);)w=w.next;v.key!==w.key&&(p.key===y.prev.key&&v.key===w.next.key||Gt(n.insert(n.remove(y),v),v,e))}}else Ze(w=y.next)&&Ze(b[w.key])&&(p.key===h.key?Qt(n.insert(n.remove(y),n),e):w!==h&&(Ze(v=b[h.key])?h.prev.key===v.prev.key?Qt(n.insert(n.remove(y),n),e):Gt(n.insert(n.remove(y),h),h,e):w.key!==h.prev.key&&Gt(n.insert(n.remove(y),h),h,e)));else Ze(v)?(v=v.active?v:w||h,Lt(n.insert(d,v),v,e,t,N,j)):Lt(n.insert(d,n),d,e,t,S,j);d=p}for(var x in m)Ze((h=m[x],d=b[x]))?zt(h,d,t):Wt(n.remove(h),e)}(e,n,o,h,d,a,s,f,l,c)}}dt[W]=fe(lt[W],{shouldComponentUpdate:{value:function(e,t){return Oe(this.props,e)||Oe(this.state,t)}}}),pt[W]=fe(lt[W],{render:{value:function(e){return function(e,t,n){var r=new Me(f);return r.type=e,r.props=t,r.children=Be(n),r}(this[ye].type,e,e.children)}}}),At[W]=fe(lt[W],{getInitialState:{value:function(e,t,n){return this[ye].cache={provider:this,consumers:new ke}}},render:{value:function(e){return e.children}},componentDidUpdate:{value:function(e){!Ue(this.props.value,e.value)&&this.state.consumers.forEach(this.componentChildUpdate)}},componentChildUpdate:{value:function(e){e.didUpdate=!e.didUpdate&&!!e[q]()}}}),Mt[W]=fe(lt[W],{getInitialState:{value:function(e){return this[ve]||{provider:this}}},render:{value:function(e,t){return e.children(t.provider.props.value)}},componentWillReceiveProps:{value:function(){this.didUpdate=!0}},componentDidMount:{value:function(){this.state.consumers&&this.state.consumers.insert(this,this.state.consumers)}},componentWillUnmount:{value:function(){this.state.consumers&&this.state.consumers.remove(this)}}});var Kt=new oe,Xt=tt("setDocument",function(e){e.owner.textContent=""}),Yt=tt("setText",function(e,t){e.owner.nodeValue=t}),Zt=tt("setComment",function(e,t){e.owner.nodeValue=t}),$t=tt("setProps",function e(t,n,r,o,i){switch(n){case"style":return function(e,t,n){if("object"!=typeof n)return En(e,t,n,"");for(var r in n){var o=n[r];-1===r.indexOf("-")?e.owner.style[r]=!1!==o&&void 0!==o?o:"":e.owner.style.setProperty(r,o)}}(t,n,r);case"className":if(!o&&r)return Cn(t,n,r);case"class":return En(t,"class",r,"");case"xlink:href":return En(t,n,r,"http://www.w3.org/1999/xlink");case"innerHTML":return function(e,t,n,r){e.owner[t]&&e.children.forEach(function(e){r.push(e.owner)});(e.owner[t]=n)&&r.push.apply(r,e.owner.childNodes);r.forEach(function(t){e.owner.appendChild(t)})}(t,n,r||"",[]);case"dangerouslySetInnerHTML":return e(t,"innerHTML",r&&r.__html,o,i);case"acceptCharset":return e(t,"accept-charset",r,o,i);case"httpEquiv":return e(t,"http-equiv",r,o,i);case"tabIndex":return e(t,n.toLowerCase(),r,o,i);case"autofocus":case"autoFocus":return t.owner[r?"focus":"blur"]();case"defaultValue":if("select"===t.type)return;break;case"width":case"height":if("img"===t.type)return En(t,n,r,"")}if(111===n.charCodeAt(0)&&110===n.charCodeAt(1)&&n.length>2)return function(e,t,n){e.cache||(e.cache={});e.cache[t]||e.owner.addEventListener(t,e,!1);e.cache[t]=n}(t,n.substring(2).toLowerCase(),r);switch(typeof r){case"object":return Cn(t,n,r&&t.props[n]);case"string":case"number":case"boolean":if(o||!(n in t.owner))return En(t,n,r,"");default:Cn(t,n,r)}}),en=tt("getContext",function(e){return{}}),tn=tt("getOwner",function(e){return e.owner}),nn=tt("getDocument",jn),rn=tt("getTarget",function(e){return e.currentTarget}),on=tt("getListener",function(e,t){return e.cache[t.type]}),cn=tt("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}),un=tt("getPortal",Sn),an=tt("getQuery",function(e,t,n,r){var o=e.id,i=o>h?"#text":e.type.toLowerCase(),c=e.props,a=e.children,s=a.length,f=n.active?n.owner.nextSibling:t.owner.firstChild,d=f,p=null;for(;f&&(f.nodeName.toLowerCase()!==i||(o>l?(o>h&&r.id>l&&f.splitText(0),f.nodeValue!==a&&(f.nodeValue=a)):0===s&&f.firstChild&&(f.textContent=""),t.id===u&&Sn(t,t.type).appendChild(f),p=f,i=null,(f=f.nextSibling)&&!r.type));){if(o>h&&0===s){if(f.parentNode.insertBefore(p=Pn(e),f),r.type)break;i=null}f=(d=f).nextSibling,d.parentNode.removeChild(d)}if(p&&p.attributes)for(var v=p.attributes,y=v.length-1;y>=0;--y)null==c[i=v[y].name]&&p.removeAttribute(i);return p}),sn=tt("getInitialProps",function(e,t){switch(e.type){case"input":return je({type:null,step:null,min:null,max:null},t);case"select":return je({value:t.defaultValue},t)}return t}),fn=tt("getUpdatedProps",function(e,t){return t}),ln=tt("isValidTarget",Nn),hn=tt("isValidEvent",function(e){return null!=e&&3===e.BUBBLING_PHASE}),dn=tt("isValidComponent",function(e){return Nn(e[W])}),pn=tt("willUnmount",function(e,t,n){}),vn=tt("insertChild",function(e,t,n){n.owner.insertBefore(e.owner,t.owner)}),yn=tt("appendChild",function(e,t){t.owner.appendChild(e.owner)}),wn=tt("removeChild",function(e,t){t.owner.removeChild(e.owner)}),mn=tt("createText",Pn),bn=tt("createEmpty",function(e){return document.createTextNode("")}),xn=tt("createComment",function(e){return document.createComment(e.children)}),gn=tt("createElement",function(e){return e.xmlns?document.createElementNS(e.xmlns,e.type):document.createElement(e.type)}),kn=tt("createComponent",function(e){return new e.type(e.props)});function Cn(e,t,n){switch(n){case null:case!1:case void 0:return En(e,t,n,e.owner[t]="");default:e.owner[t]=n}}function En(e,t,n,r){switch(n){case null:case!1:case void 0:return r&&e.owner.removeAttributeNS(r,t),e.owner.removeAttribute(t);case!0:return En(e,t,"",r);default:r?e.owner.setAttributeNS(r,t,n):e.owner.setAttribute(t,n)}}function jn(){return document.documentElement}function Sn(e,t){return"string"==typeof t?jn().querySelector(t):Nn(t)?t:jn()}function Nn(e){return null!=e&&1===e.ELEMENT_NODE}function Pn(e){return document.createTextNode(e.children)}return o.render=Tt,o.hydrate=function e(t,n,r){n?Dt(t,n,r,E):e(t,nn(),r)},o.Component=lt,o.Fragment=ht,o.PureComponent=dt,o.Children=$e,o.createContext=function(e){return function(e){return{Provider:function(t){return Ye(At,Se({},e,t))},Consumer:function(t){return Ye(Mt,Se({},e,t))}}}({value:e,children:Ee})},o.createFactory=function(e){return null===e||"object"!=typeof e||Ae(e)?Ye.bind(null,e):n(t,e)},o.cloneElement=function(e){if(Ze(e))return function(e,t,n){var r=Ye.apply(null,[e].concat(n));return Re(r,r.props=Se({},t,r.props)),r}(e.type,e.props,[].slice.call(arguments,1))},o.isValidElement=Ze,o.createPortal=function(e,t,n){var r=new Me(u);return r.type=t,r.key=void 0===n?null:n,r.children=Be(e),r},o.createElement=Ye,o.createComment=function(e,t){var n=new Me(h);return n.type=T,n.key=void 0===t?null:t,n.children=e+"",n},o.createClass=function(e){return wt(Object(e),function e(t,n){for(var r=0,o=le(e[W]);r<o.length;++r)this[o[r]]=this[o[r]].bind(this)})},o.unmountComponentAtNode=function(e){return Kt.has(e)&&!Tt(null,e)},o.findDOMNode=function e(t){if(t)return Ze(t[ye])?e(t[ye]):Ze(t)?t.active&&tn(Ke(t)):hn(t)?rn(t):ln(t)?t:void 0},o.h=Ye,o}"object"==typeof exports&&"object"==typeof module?module.exports=n(e.process&&e.process.exit&&"function"==typeof t&&t("./cjs")):"function"==typeof define&&define.amd?define(n()):e.dio=n()}("object"==typeof window&&window.window===window?window:"object"==typeof global&&global.global===global?global:this,"object"==typeof arguments&&arguments[1]);export var render=dio.render;export var hydrate=dio.hydrate;export var Component=dio.Component;export var Fragment=dio.Fragment;export var PureComponent=dio.PureComponent;export var Children=dio.Children;export var createContext=dio.createContext;export var createFactory=dio.createFactory;export var cloneElement=dio.cloneElement;export var isValidElement=dio.isValidElement;export var createPortal=dio.createPortal;export var createElement=dio.createElement;export var createComment=dio.createComment;export var createClass=dio.createClass;export var unmountComponentAtNode=dio.unmountComponentAtNode;export var findDOMNode=dio.findDOMNode;export var h=dio.h;export default dio;
//# sourceMappingURL=esm.min.js.map

@@ -1,2 +0,2 @@

!function(e,t){"use strict";function n(t,r){var o={version:"9.0.0-rc.2"},i=0,c=1,u=2,a=3,s=4,f=5,l=6,h=7,p=8,d=9,v=0,y=1,w=2,m=0,b=1,x=2,g=3,k=0,C=1,E=0,j=1,S=0,N=1,O=0,P=1,U="&|head|",T="&|body|",A="&|tail|",M="#comment",L="#empty",D="#text",I="prev",V="next",W="event",B="prototype",F="callback",H="render",_="constructor",q="forceUpdate",R="setState",G="displayName",Q="componentWillMount",z="componentDidMount",J="componentWillReceiveProps",K="shouldComponentUpdate",X="componentWillUpdate",Y="componentDidUpdate",Z="componentWillUnmount",$="componentDidCatch",ee="getChildContext",te="getInitialState",ne="getDefaultProps",re="defaultProps",oe=e.WeakMap||Ce,ie=e.Symbol||Math.random,ce=Array.isArray,ue=Object.defineProperties,ae=Object.defineProperty,se=Object.hasOwnProperty,fe=Object.create,le=Object.keys,he=ie.for||function(e){for(var t=0,n=0;t<e.length;++t)n=(n<<5)-n+e.charCodeAt(t);return n>>>0},pe=he("dio.Cache"),de=he("dio.State"),ve=he("dio.Context"),ye=he("dio.Element"),we=he("dio.Fragment"),me=he("dio.Component"),be=he("dio.Exception"),xe=ie.iterator||"@@iterator",ge=ie.asyncIterator||"@@asyncIterator";function ke(){this.next=this,this.prev=this,this.length=0}function Ce(){this.hash=ie()}function Ee(){}function je(e,t){for(var n in t)e[n]=t[n];return e}function Se(e,t,n){for(var r in t)e[r]=t[r];for(var r in n)e[r]=n[r];return e}function Ne(e,t){if(null!=e){if("object"==typeof e){if("function"==typeof e.forEach||"function"==typeof e.next)return function(e,t){if("function"==typeof e.forEach)return e.forEach(t);for(var n=e.next(n);!n.done;)n=e.next(n.value,t(n.value))}(e,function(e){Ne(e,t)});if("function"==typeof e[xe])return Ne(e[xe](),t)}t(e)}}function Oe(e,t){throw new Error("#"+e+"(...): "+t+".")}function Pe(e,t){for(var n in e)if(!se.call(t,n))return!0;for(var n in t)if(!Ue(e[n],t[n]))return!0;return!1}function Ue(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function Te(e){return"function"==typeof e.then&&"function"==typeof e.catch}function Ae(e){this.id=e,this.active=!1,this.work=O,this.xmlns=null,this.key=null,this.ref=null,this.type=null,this.props=null,this.cache=null,this.children=null,this.owner=null,this.context=null,this.parent=null,this.host=null,this.next=null,this.prev=null}function Me(e){var t=new Ae(e.id),n=e.children;return"object"==typeof n&&e.id!==s&&(n=function(e){for(var t=new ke,n=e,r=n.length;r>0;--r)t.insert(Me(n=n.next),t);return t}(n)),t.type=e.type,t.props=e.props,t.xmlns=e.xmlns,t.key=e.key,t.ref=e.ref,t.children=n,t}function Le(e){var t=new Ae(a);return t.children=e,t}function De(e,t){var n=new Ae(p);return n.type=D,n.key=T+t,n.children=e+"",n}function Ie(e){var t=new Ae(d);return t.type=L,t.key=T+e,t.children="",t}function Ve(e){return Ye({then:e,catch:Ee})}function We(e,t){return(e.type.then=(n=e,r=t,function e(t,o){return r.next(n.cache).then(function(r){!0!==r.done||void 0!==r.value?t(n.cache=r.value,r.done,e(t,o)):n.context&&t(n.cache,r.done)},o)}))&&e;var n,r}function Be(e){var t=new Ae(c);return t.type=we,t.children=Fe(e),t}function Fe(e){var t=new ke;if(ce(e))for(var n=0;n<e.length;++n)qe(t,e[n],n);else qe(t,e,0);return _e(t),t}function He(e,t){switch(typeof e){case"boolean":return Ie(t);case"object":if(e[xe])return Be(et(e));if(e[ge])return We(Ve(Ee),e);if(!Te(e))break;case"function":return Ye(e)}Oe(H,"Invalid element [object "+Ge(e)+"]")}function _e(e){e.insert(Ie(U),e.next),e.insert(Ie(A),e)}function qe(e,t,n){if(null!=t)if(t.constructor===ye)null===t.key&&(t.key=T+n),e.insert(null===t.next?t:Me(t),e);else switch(typeof t){case"string":case"number":e.insert(De(t,n),e);break;case"object":if(ce(t)){for(var r=0;r<t.length;++r)qe(e,t[r],n+r);return n+r}default:return qe(e,He(t,n),n)}else e.insert(Ie(n),e);return n+1}function Re(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 Ge(e){switch(typeof e){case"number":case"symbol":return Ge(e.toString());case"function":return Ge(e[G]||e.name);case"object":if(Ze(e))return Ge(e.type);case"string":if(e)return e;default:return"#anonymous"}}function Qe(e,t,n){return Ze(e[n])?e[n].id===u?Qe(e[n],t,n):e[n]:e.host&&e.host.children===e?Qe(e.host,t,n):t.id<a?Qe(t,t.parent,n):Le(e)}function ze(e){return e.id<u?ze(e.parent):e}function Je(e,t){return e.id<a?Je(e.children[t]):e}function Ke(e){return e.id===s?Ke(e.children):e}function Xe(e){if(null==e)return Ie(T);if(e.constructor===ye)return e;switch(typeof e){case"string":case"number":return De(e,T);case"object":if(ce(e))return Be(e);default:return He(e,T)}}function Ye(e,t){var n,r,o,u=null!=t?1:2,a=0,f="function"!=typeof e?l:s,h=arguments.length,p=new Ae(f),d={},v=p.children=f!==s?new ke:void 0;if(1===u&&"object"==typeof t&&void 0===t[xe])switch(t.constructor){default:if(ce(t))break;case Object:if(Te(t))break;Re(p,(++u,d=t)),void 0!==d.children&&f!==s&&h-u<1&&(a=qe(v,d.children,a))}if((n=h-u)>0)if(f!==s)for(;u<h;++u)a=qe(v,arguments[u],a);else{if(1===n)v=arguments[u];else for(v=[];u<h;++u)v.push(arguments[u]);d.children=v}switch(typeof e){case"function":e[re]&&(d=Se({},(o=d,"function"==typeof(r=e)[re]?r[re](o):r[re]),d));break;case"number":case"symbol":e===we&&_e((p.id=c,v));break;default:Te(e)&&_e((p.id=i,v))}return p.type=e,p.props=d,p}function Ze(e){return null!=e&&e.constructor===ye}ue(ae(ke[B],xe,{value:xe}),{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=this,n=t.length;n>0;--n)e(t=t.next)}}}),ue(Ce[B],{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}}}),ue(ae(Ae[B],xe,{value:xe}),{constructor:{value:ye},handleEvent:{value:function(e){var t=this,n=on(t,e);if(!n)return;if("object"==typeof n&&(n[xe]||ce(n)))return Ne(n,function(n){ft(t,e,n)});ft(t,e,n)}}});var $e={toArray:et,forEach:function(e,t,n){null!=e&&et(e).forEach(t,n)},map:function(e,t,n){return null!=e?et(e).map(t,n):e},filter:function(e,t,n){return null!=e?et(e).filter(t,n):e},find:function(e,t,n){return null!=e?function(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]}(et(e),t,n):e},count:function(e){return et(e).length},only:function(e){return Ze(e)?e:Oe("Children.only","Expected to receive a single element")}};function et(e){var t=[];return Ne(e,function(e){t.push(e)}),t}function tt(e,t){return r?"function"==typeof r[e]?r[e].bind(r):r[e]=t:t}function nt(e,t,n){this.error=t,this.origin=n,this.bubbles=!0,this[ye]=e}function rt(e,t,n){return new nt(e,t,n)}function ot(e,t,n){throw rt(e,t,n)}function it(e){try{console.error(e.toString())}catch(e){}finally{return e.error}}function ct(e,t,n){st(e,e,e.host,rt(e,t,n))}function ut(e,t,n){st(e,t,t,n)}function at(e,t,n){n&&n[$]&&!n[be]&&(n[be]=function(e,t,n){try{Et(e,$,t[$](n.error,n))}catch(t){ot(e,t,$)}finally{n.bubbles=!1}}(e,n,n[be]=t))}function st(e,t,n,r){var o;if(zt((o=n).children,Xe(),o),at(n,r,n.owner),r.bubbles){if(!Ze(n.host))throw it(r);if(e!==t)throw r;st(e,t,n.host,r)}}function ft(e,t,n){try{var r,o=e.host,i=o.owner,c=i.props,u=i.state,a=i.context;"function"==typeof n?r=n.call(i,t,c,u,a):"function"==typeof n.handleEvent&&(i!==n&&n[me]&&(o=(i=n)[ye]),r=n.handleEvent(t,c,u,a)),r&&i[me]&&Et(o,W,r)}catch(e){!function(e,t,n){throw it(rt(e,t,n))}(o,e,W+":"+Ge(n.handleEvent||n))}}function lt(e,t){this.refs={},this.state={},this.props=e,this.context=t}ue(nt[B],{toString:{value:function(){return this.message}},message:{get:function(){return this[pe]=this[pe]||"Exception: "+Object(this.error).toString()+"\n\nThe following error occurred in `\n"+this.componentStack+'` from "'+this.origin+'"'}},componentStack:{get:function(){return this[me]=this[me]||function e(t,n){return t&&t.host?n+e(t.host,"<"+Ge(t)+">\n"):n}(this[ye].host,"<"+Ge(this[ye])+">\n")}}}),lt[B]=mt(lt[B]);var ht=we;function pt(e,t){lt.call(this,e,t)}function dt(e,t){lt.call(this,e,t)}function vt(e,t){Ct(this[ye],this,e,w,t)}function yt(e){Ct(this[ye],this,{},v,e)}function wt(e,t){if(e[me])return e[me];if("function"==typeof e&&!e[H])return wt(e[H]=e,t);for(var n in e[G]&&(t[G]=e[G]),e[ne]&&(t[re]=e[ne]),e)e[n]=bt(n,e[n]);return t[B]=fe(lt[B],e),e[me]=t}function mt(e){return ae(e,me,{value:me}),ae(e,R,{value:vt}),ae(e,q,{value:yt}),e[H]||ae(e,H,bt(H,Ee)),e}function bt(e,t){switch(e){case Q:case z:case J:case K:case X:case Y:case Z:case $:case ne:case ee:case te:case _:case G:case H:return{value:t,writable:!0,configurable:!0,enumerable:!1};default:return{value:t,writable:!0,configurable:!0,enumerable:"function"==typeof t}}}function xt(e){var t,n,r,o,i=e,c=e.props,u=e.host,a=e.context=u.context||en(e),s=function(e,t,n,r){try{return e.owner=new t(n,r)}catch(t){ot(e,t,_)}}(e,(t=e.type)[B]&&t[B][H]?(t[B][me]||mt(t[B]),t):t[me]||(pn(t)?dt:wt(t,function(){})),c,a),f=s.state=s.state||{};return s.props=c,s.context=a,s.refs=s.refs||{},s[de]=s[pe]={},s[ve]=e.cache=u.cache,s[ye]=e,s[te]&&(s.state=Ut(e,te,c,f,a)||f),s[Q]&&Ut(e,Q,c,f,a),i=Te(f=s.state)?Ve((n=e,r=s,o=f,function e(t,i){jt(n,r,o,w,function(){r[be]?i(r[be]):t(n.children.type.then===e&&Pt(n,r))})})):Pt(e,s),s[ee]&&(e.context=Se({},a,Ut(e,ee,c,f,a))),e.children=i}function gt(e){if(e.owner[Z]&&(e.cache=function(e,t){try{return e.owner[t](tn(Ke(e)))}catch(n){ct(e,n,t)}}(e,Z))&&Te(e.cache))return e.cache.catch(function(t){ct(e,t,Z)});e.cache=null}function kt(e,t,n,r){try{!function(e,t,n){var r=e.owner,o=e.props,i=t.props,c=r.context,u=r.state,a=r[de]=r[pe],s=u;switch(n){case y:if(r[J]&&Ut(e,J,i,c,s),a!==r[pe])break;case v:a=s}if(s=r[de]=a!==s?Se({},u,a):s,n!==v&&r[K]&&!Ut(e,K,i,s,c))return;r[X]&&Ut(e,X,i,s,c);switch(n){case y:r.props=e.props=i;case w:r.state=s}r[ee]&&je(e.context,Ut(e,ee,i,s,c));zt(e.children,Pt(e,r),e),r[Y]&&Ut(e,Y,o,u,c);e.ref!==t.ref&&_t(e,t.ref,b)}(e,t,r)}catch(t){ut(e,n,t)}}function Ct(e,t,n,r,o){if(n)if(e)switch(typeof n){case"function":return Ct(e,t,St(e,t,n),r,o);case"object":if(Te(t[pe]=n))return jt(e,t,n,r,o);c=t,u=r,(i=e).active?i.work===P?je(c[de],c[pe]):kt(i,i,i,u):je(c.state,c[pe])}else t.state=n;var i,c,u;o&&St(e,t,o)}function Et(e,t,n){if(n)switch(typeof n){case"object":case"function":switch(t){case te:case ee:case K:break;default:Ct(e,e.owner,n,w)}}return n}function jt(e,t,n,r,o){n.then(function(n){var i;"function"==typeof(i=Object(n)).blob&&"function"==typeof i.text&&"function"==typeof i.json?Ct(e,t,n.json(),r,o):Ct(e,t,n,r,o)},function(n){if(Te(e.children.type))try{t[be]=rt(e,n,R)}finally{St(e,t,o)}else ct(e,n,R)})}function St(e,t,n){try{if("function"==typeof n)return n.call(t,t.state,t.props,t.context)}catch(t){ct(e,t,F)}}function Nt(e,t){try{"function"==typeof t&&t.call(e.owner)}catch(t){ot(e,t,F)}}function Ot(e,t,n){try{switch(typeof n){case"function":return n.call(e.owner,t);case"object":return n.current=t;default:e.owner.refs&&(e.owner.refs[n]=t)}}catch(t){ot(e,t,F)}}function Pt(e,t){try{return Xe(t.render(t.props,t.state,t.context))}catch(t){ot(e,t,H)}}function Ut(e,t,n,r,o){t!==Y&&(e.work=P);try{return Et(e,t,e.owner[t](n,r,o))}catch(n){ot(e,n,t)}finally{e.work=O}}function Tt(e,t){lt.call(this,e,t)}function At(e,t){lt.call(this,e,t)}function Mt(e,t,n){var r,o,i;t?Kt.has(t)?(r=Kt.get(t).children,o=Xe(e),i=n,zt(r,o,r.host),i&&Nt(r,i)):Lt(e,t,n,j):Mt(e,nn(),n)}function Lt(e,t,n,r){Ze(e)?ln(t)?function(e,t,n,r){Kt.set(t.owner=n,t),r===j&&Xt(t);Dt(e,e,t,t,S,r)}(e,Le(e),t,r):Oe(H,"Target container is not a valid container"):Lt(Xe(e),t,n,r),n&&Nt(e,n)}function Dt(e,t,n,r,o,a){switch(e.host=r,e.parent=n,e.id){case s:return void function(e,t,n,r,o,i){try{Dt(xt(e),t,n,e,o,i),Ht(e),e.owner[z]&&function(e,t){try{Et(e,t,e.owner[t](tn(Ke(e))))}catch(n){ot(e,n,t)}}(e,z,e.owner),e.ref&&_t(e,e.ref,m)}catch(t){Vt(r.children,Xe(Ht(r)),r),ut(e,r,t)}}(e,t,n,r,o,a);case i:Wt(e,r,e.type);case c:return e.owner=n.owner,It(e,t,r,o,a),void Ht(e);case u:return e.owner=un(e,e.type),It(e,t,r,o,a),void Ht(e);case f:case l:e.xmlns=cn(e,n.xmlns);default:switch(a){case E:if(p=n,(h=e).active=!!(h.owner=an(h,p,Ke(Qe(h,p,I)),Qe(h,p,V))))break;default:Ht(e),o===S?Qt(e,n):Gt(e,t,n)}if(e.id>l)return}var h,p;It(e,t,r,S,a),qt(e,sn(e,e.props),e.xmlns,k)}function It(e,t,n,r,o){for(var i=e.children,c=i.length;c>0;--c)Dt(i=i.next,t,e,n,r,o)}function Vt(e,t,n){var r,o,i,c=e.parent,u=Qe(e,c,V);Bt(e,c),u.active?Dt(t,u,c,n,N,j):Dt(t,u,c,n,S,j),t.active&&(e!==n.children?(r=e,o=t,(i=c.children).insert(o,r),i.remove(r)):n.children=t)}function Wt(e,t,n){n.then(function(r){e.active&&e.type===n&&Jt(e,function e(t){return!Ze(t)&&se.call(Object(t),"default")?e(t.default):Be(Xe(t))}(r),t)},function(t){ct(e,t,H)})}function Bt(e,t){if(e.active){if(Ft(e,t,e),e.id===s&&e.cache)return r=t,void(n=e).cache.then(function(){Rt(n,r)});var n,r;Rt(e,t)}}function Ft(e,t,n){switch(e.active=!1,e.id){case s:e.children&&(i=e,c=t,f=n,Ft(l=e.children,c,i!==f?f:l),gt(i));case a:break;case p:case d:case h:return dn(e,t,n);case u:if(e.active=e!==n&&t.id>a)return Bt(e,t);default:for(var r=e.children,o=r.length;o>0;--o)Ft(r=r.next,e,n);dn(e,t,n)}var i,c,f,l;e.ref&&_t(e,e.ref,x)}function Ht(e){try{switch(e.id){case l:e.owner=gn(e);break;case p:e.owner=mn(e);break;case d:e.owner=bn(e);break;case h:e.owner=xn(e);break;case f:e.owner=kn(e);case s:case u:break;default:e.owner=Je(e,V).owner}}catch(t){ot(e,t,H)}finally{e.active=!0}}function _t(e,t,n){switch(typeof t){case"object":if(t)break;case"undefined":return _t(e,e.ref===t?Ee:e.ref,x)}switch(n){case x:return Ot(e.host,e.ref=null,t);case g:e.ref=t;case m:return Ot(e.host,e.owner,t);case b:_t(e,e.ref,x),_t(e,t,g)}}function qt(e,t,n,r){for(var o in t)switch(o){case"ref":_t(e,t[o],r);case"key":case"xmlns":case"children":break;default:$t(e,o,t[o],n,r)}}function Rt(e,t){if(t.id<u)return Rt(e,ze(t));switch(e.id){case u:case i:case c:return e.children.forEach(function(t){Rt(Ke(t),e)});case s:return Rt(Ke(e),t)}wn(e,t)}function Gt(e,t,n){if(n.id<a){if(n.id<u)return Gt(e,t,ze(n));if(!n.active)return Qt(e,n)}switch(t.id){case u:return Gt(e,Qe(t,n,V),n);case i:case c:return Gt(e,Je(t,V),n);case s:return Gt(e,Ke(t),n);case a:return Qt(e,n)}switch(e.id){case u:return;case i:case c:return e.children.forEach(function(e){Gt(Ke(e),t,n)});case s:return Gt(Ke(e),t,n)}vn(e,t,n)}function Qt(e,t){if(t.id<u)return Qt(e,ze(t));switch(e.id){case u:return;case i:case c:return e.children.forEach(function(e){Qt(Ke(e),t)});case s:return Qt(Ke(e),t)}yn(e,t)}function zt(e,t,n){if(e.active){if(e.key!==t.key)return Vt(e,t,n);if(e.id===i&&t.id===i)return Wt(e,n,e.type=t.type);if(e.type!==t.type)return Vt(e,t,n);switch(e.id){case p:case h:e.children!==t.children&&function(e,t){switch(e.id){case p:return Yt(e,t);case h:Zt(e,t)}}(e,e.children=t.children);case d:return;case u:case c:return Jt(e,t,n);case s:return kt(e,t,n,y)}var r,o;Jt(e,t,n),r=e,o=function e(t,n){if(t===n)return;var r=0;var o={};for(var i in t)se.call(n,i)||(o[(++r,i)]=null);for(var i in n){var c=n[i],u=t[i];c!==u&&("object"!=typeof c||null===c?o[(++r,i)]=c:(c===n||c[xe]===xe||(c=e(u||{},c)))&&(o[(++r,i)]=c))}if(r>0)return o}(e.props,e.props=t.props),qt(r,fn(r,o),r.xmlns,C)}}function Jt(e,t,n){var r=S,o=e.children,i=t.children,c=o.length,u=i.length;if(c+u!==0){var a=0,s=0,f=c-1,l=u-1,h=o.next,p=i.next,d=o.prev,v=i.prev,y=h,w=p,m=d,b=v;e:for(;;){for(;h.key===p.key;){if(y=h.next,w=p.next,zt(h,p,n),++s,++a>f||s>l)break e;h=y,p=w}for(;d.key===v.key;){if(m=d.prev,b=v.prev,zt(d,v,n),--l,a>--f||s>l)break e;d=m,v=b}break}if(a>f++){if(s<=l++)for(l<u?r=N:(d=o,c>0&&(p=w));s++<l;)p=(h=p).next,Dt(o.insert(h,d),d,e,n,r,j)}else if(s>l++)for(l===u&&u>0&&(h=y);a++<f;)h=(p=h).next,Bt(o.remove(p),e);else!function(e,t,n,r,o,i,c,u,a,s){var f=i,l=c,h=r,p=o,d=h,v=h,y=h,w=h,m={},b={};for(;f<u||l<a;)f<u&&(m[h.key]=h,++f!==s)&&(h=h.next),l<a&&(b[p.key]=p,++l!==a)&&(p=p.next);for(;l-- >c;){if(d=p.prev,v=p.next,y=m[p.key],w=m[v.key],Ze(y))if(Ze(v)){if(v=v.active?v:w||h,w=y.next,v.key!==w.key){for(;Ze(w)&&!Ze(b[w.key]);)w=w.next;v.key!==w.key&&(d.key===y.prev.key&&v.key===w.next.key||Gt(n.insert(n.remove(y),v),v,e))}}else Ze(w=y.next)&&Ze(b[w.key])&&(d.key===h.key?Qt(n.insert(n.remove(y),n),e):w!==h&&(Ze(v=b[h.key])?h.prev.key===v.prev.key?Qt(n.insert(n.remove(y),n),e):Gt(n.insert(n.remove(y),h),h,e):w.key!==h.prev.key&&Gt(n.insert(n.remove(y),h),h,e)));else Ze(v)?(v=v.active?v:w||h,Dt(n.insert(p,v),v,e,t,N,j)):Dt(n.insert(p,n),p,e,t,S,j);p=d}for(var x in m)Ze((h=m[x],p=b[x]))?zt(h,p,t):Bt(n.remove(h),e)}(e,n,o,h,p,a,s,f,l,c)}}pt[B]=fe(lt[B],{shouldComponentUpdate:{value:function(e,t){return Pe(this.props,e)||Pe(this.state,t)}}}),dt[B]=fe(lt[B],{render:{value:function(e){return t=this[ye].type,n=e,r=e.children,(o=new Ae(f)).type=t,o.props=n,o.children=Fe(r),o;var t,n,r,o}}}),Tt[B]=fe(lt[B],{getInitialState:{value:function(e,t,n){return this[ye].cache={provider:this,consumers:new ke}}},render:{value:function(e){return e.children}},componentDidUpdate:{value:function(e){!Ue(this.props.value,e.value)&&this.state.consumers.forEach(this.componentChildUpdate)}},componentChildUpdate:{value:function(e){e.didUpdate=!e.didUpdate&&!!e[q]()}}}),At[B]=fe(lt[B],{getInitialState:{value:function(e){return this[ve]||{provider:this}}},render:{value:function(e,t){return e.children(t.provider.props.value)}},componentWillReceiveProps:{value:function(){this.didUpdate=!0}},componentDidMount:{value:function(){this.state.consumers&&this.state.consumers.insert(this,this.state.consumers)}},componentWillUnmount:{value:function(){this.state.consumers&&this.state.consumers.remove(this)}}});var Kt=new oe,Xt=tt("setDocument",function(e){e.owner.textContent=""}),Yt=tt("setText",function(e,t){e.owner.nodeValue=t}),Zt=tt("setComment",function(e,t){e.owner.nodeValue=t}),$t=tt("setProps",function e(t,n,r,o,i){switch(n){case"style":return function(e,t,n){if("object"!=typeof n)return En(e,t,n,"");for(var r in n){var o=n[r];-1===r.indexOf("-")?e.owner.style[r]=!1!==o&&void 0!==o?o:"":e.owner.style.setProperty(r,o)}}(t,n,r);case"className":if(!o&&r)return Cn(t,n,r);case"class":return En(t,"class",r,"");case"xlink:href":return En(t,n,r,"http://www.w3.org/1999/xlink");case"innerHTML":return function(e,t,n,r){e.owner[t]&&e.children.forEach(function(e){r.push(e.owner)});(e.owner[t]=n)&&r.push.apply(r,e.owner.childNodes);r.forEach(function(t){e.owner.appendChild(t)})}(t,n,r||"",[]);case"dangerouslySetInnerHTML":return e(t,"innerHTML",r&&r.__html,o,i);case"acceptCharset":return e(t,"accept-charset",r,o,i);case"httpEquiv":return e(t,"http-equiv",r,o,i);case"tabIndex":return e(t,n.toLowerCase(),r,o,i);case"autofocus":case"autoFocus":return t.owner[r?"focus":"blur"]();case"defaultValue":if("select"===t.type)return;break;case"width":case"height":if("img"===t.type)return En(t,n,r,"")}if(111===n.charCodeAt(0)&&110===n.charCodeAt(1)&&n.length>2)return function(e,t,n){e.cache||(e.cache={});e.cache[t]||e.owner.addEventListener(t,e,!1);e.cache[t]=n}(t,n.substring(2).toLowerCase(),r);switch(typeof r){case"object":return Cn(t,n,r&&t.props[n]);case"string":case"number":case"boolean":if(o||!(n in t.owner))return En(t,n,r,"");default:Cn(t,n,r)}}),en=tt("getContext",function(e){return{}}),tn=tt("getOwner",function(e){return e.owner}),nn=tt("getDocument",jn),rn=tt("getTarget",function(e){return e.currentTarget}),on=tt("getListener",function(e,t){return e.cache[t.type]}),cn=tt("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}),un=tt("getPortal",Sn),an=tt("getQuery",function(e,t,n,r){var o=e.id,i=o>h?"#text":e.type.toLowerCase(),c=e.props,a=e.children,s=a.length,f=n.active?n.owner.nextSibling:t.owner.firstChild,p=f,d=null;for(;f&&(f.nodeName.toLowerCase()!==i||(o>l?(o>h&&r.id>l&&f.splitText(0),f.nodeValue!==a&&(f.nodeValue=a)):0===s&&f.firstChild&&(f.textContent=""),t.id===u&&Sn(t,t.type).appendChild(f),d=f,i=null,(f=f.nextSibling)&&!r.type));){if(o>h&&0===s){if(f.parentNode.insertBefore(d=On(e),f),r.type)break;i=null}f=(p=f).nextSibling,p.parentNode.removeChild(p)}if(d&&d.attributes)for(var v=d.attributes,y=v.length-1;y>=0;--y)null==c[i=v[y].name]&&d.removeAttribute(i);return d}),sn=tt("getInitialProps",function(e,t){switch(e.type){case"input":return je({type:null,step:null,min:null,max:null},t);case"select":return je({value:t.defaultValue},t)}return t}),fn=tt("getUpdatedProps",function(e,t){return t}),ln=tt("isValidTarget",Nn),hn=tt("isValidEvent",function(e){return null!=e&&3===e.BUBBLING_PHASE}),pn=tt("isValidComponent",function(e){return Nn(e[B])}),dn=tt("willUnmount",function(e,t,n){}),vn=tt("insertChild",function(e,t,n){n.owner.insertBefore(e.owner,t.owner)}),yn=tt("appendChild",function(e,t){t.owner.appendChild(e.owner)}),wn=tt("removeChild",function(e,t){t.owner.removeChild(e.owner)}),mn=tt("createText",On),bn=tt("createEmpty",function(e){return document.createTextNode("")}),xn=tt("createComment",function(e){return document.createComment(e.children)}),gn=tt("createElement",function(e){return e.xmlns?document.createElementNS(e.xmlns,e.type):document.createElement(e.type)}),kn=tt("createComponent",function(e){return new e.type(e.props)});function Cn(e,t,n){switch(n){case null:case!1:case void 0:return En(e,t,n,e.owner[t]="");default:e.owner[t]=n}}function En(e,t,n,r){switch(n){case null:case!1:case void 0:return r&&e.owner.removeAttributeNS(r,t),e.owner.removeAttribute(t);case!0:return En(e,t,"",r);default:r?e.owner.setAttributeNS(r,t,n):e.owner.setAttribute(t,n)}}function jn(){return document.documentElement}function Sn(e,t){return"string"==typeof t?jn().querySelector(t):Nn(t)?t:jn()}function Nn(e){return null!=e&&1===e.ELEMENT_NODE}function On(e){return document.createTextNode(e.children)}return o.render=Mt,o.hydrate=function e(t,n,r){n?Lt(t,n,r,E):e(t,nn(),r)},o.Component=lt,o.Fragment=ht,o.PureComponent=pt,o.Children=$e,o.createContext=function(e){return t={value:e,children:Ee},{Provider:function(e){return Ye(Tt,Se({},t,e))},Consumer:function(e){return Ye(At,Se({},t,e))}};var t},o.createFactory=function(e){return null===e||"object"!=typeof e||Te(e)?Ye.bind(null,e):n(t,e)},o.cloneElement=function(e){if(Ze(e))return t=e.type,n=e.props,r=[].slice.call(arguments,1),Re(o=Ye.apply(null,[t].concat(r)),o.props=Se({},n,o.props)),o;var t,n,r,o},o.isValidElement=Ze,o.createPortal=function(e,t,n){var r=new Ae(u);return r.type=t,r.key=void 0===n?null:n,r.children=Fe(e),r},o.createElement=Ye,o.createComment=function(e,t){var n=new Ae(h);return n.type=M,n.key=void 0===t?null:t,n.children=e+"",n},o.createClass=function(e){return wt(Object(e),function e(t,n){for(var r=0,o=le(e[B]);r<o.length;++r)this[o[r]]=this[o[r]].bind(this)})},o.unmountComponentAtNode=function(e){return Kt.has(e)&&!Mt(null,e)},o.findDOMNode=function e(t){if(t)return Ze(t[ye])?e(t[ye]):Ze(t)?t.active&&tn(Ke(t)):hn(t)?rn(t):ln(t)?t:void 0},o.h=Ye,"function"==typeof t&&t(o,Ae,xt,ut,Xe,Le,Ie,Ye,Ht),o}"object"==typeof exports&&"object"==typeof module?module.exports=n(e.process&&e.process.exit&&"function"==typeof t&&t("./cjs")):"function"==typeof define&&define.amd?define(n()):e.dio=n()}("object"==typeof window&&window.window===window?window:"object"==typeof global&&global.global===global?global:this,"object"==typeof arguments&&arguments[1]);
!function(e,t){"use strict";function n(t,r){var o={version:"9.0.0"},i=0,c=1,u=2,a=3,s=4,f=5,l=6,h=7,p=8,d=9,v=0,y=1,w=2,m=0,b=1,x=2,g=3,k=0,C=1,E=0,j=1,S=0,N=1,O=0,P=1,U="&|head|",T="&|body|",A="&|tail|",M="#comment",L="#empty",D="#text",I="prev",V="next",W="event",B="prototype",F="callback",H="render",_="constructor",q="forceUpdate",R="setState",G="displayName",Q="componentWillMount",z="componentDidMount",J="componentWillReceiveProps",K="shouldComponentUpdate",X="componentWillUpdate",Y="componentDidUpdate",Z="componentWillUnmount",$="componentDidCatch",ee="getChildContext",te="getInitialState",ne="getDefaultProps",re="defaultProps",oe=e.WeakMap||Ce,ie=e.Symbol||Math.random,ce=Array.isArray,ue=Object.defineProperties,ae=Object.defineProperty,se=Object.hasOwnProperty,fe=Object.create,le=Object.keys,he=ie.for||function(e){for(var t=0,n=0;t<e.length;++t)n=(n<<5)-n+e.charCodeAt(t);return n>>>0},pe=he("dio.Cache"),de=he("dio.State"),ve=he("dio.Context"),ye=he("dio.Element"),we=he("dio.Fragment"),me=he("dio.Component"),be=he("dio.Exception"),xe=ie.iterator||"@@iterator",ge=ie.asyncIterator||"@@asyncIterator";function ke(){this.next=this,this.prev=this,this.length=0}function Ce(){this.hash=ie()}function Ee(){}function je(e,t){for(var n in t)e[n]=t[n];return e}function Se(e,t,n){for(var r in t)e[r]=t[r];for(var r in n)e[r]=n[r];return e}function Ne(e,t){if(null!=e){if("object"==typeof e){if("function"==typeof e.forEach||"function"==typeof e.next)return function(e,t){if("function"==typeof e.forEach)return e.forEach(t);for(var n=e.next(n);!n.done;)n=e.next(n.value,t(n.value))}(e,function(e){Ne(e,t)});if("function"==typeof e[xe])return Ne(e[xe](),t)}t(e)}}function Oe(e,t){throw new Error("#"+e+"(...): "+t+".")}function Pe(e,t){for(var n in e)if(!se.call(t,n))return!0;for(var n in t)if(!Ue(e[n],t[n]))return!0;return!1}function Ue(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function Te(e){return"function"==typeof e.then&&"function"==typeof e.catch}function Ae(e){this.id=e,this.active=!1,this.work=O,this.xmlns=null,this.key=null,this.ref=null,this.type=null,this.props=null,this.cache=null,this.children=null,this.owner=null,this.context=null,this.parent=null,this.host=null,this.next=null,this.prev=null}function Me(e){var t=new Ae(e.id),n=e.children;return"object"==typeof n&&e.id!==s&&(n=function(e){for(var t=new ke,n=e,r=n.length;r>0;--r)t.insert(Me(n=n.next),t);return t}(n)),t.type=e.type,t.props=e.props,t.xmlns=e.xmlns,t.key=e.key,t.ref=e.ref,t.children=n,t}function Le(e){var t=new Ae(a);return t.children=e,t}function De(e,t){var n=new Ae(p);return n.type=D,n.key=T+t,n.children=e+"",n}function Ie(e){var t=new Ae(d);return t.type=L,t.key=T+e,t.children="",t}function Ve(e){return Ye({then:e,catch:Ee})}function We(e,t){return(e.type.then=(n=e,r=t,function e(t,o){return r.next(n.cache).then(function(r){!0!==r.done||void 0!==r.value?t(n.cache=r.value,r.done,e(t,o)):n.context&&t(n.cache,r.done)},o)}))&&e;var n,r}function Be(e){var t=new Ae(c);return t.type=we,t.children=Fe(e),t}function Fe(e){var t=new ke;if(ce(e))for(var n=0;n<e.length;++n)qe(t,e[n],n);else qe(t,e,0);return _e(t),t}function He(e,t){switch(typeof e){case"boolean":return Ie(t);case"object":if(e[xe])return Be(et(e));if(e[ge])return We(Ve(Ee),e);if(!Te(e))break;case"function":return Ye(e)}Oe(H,"Invalid element [object "+Ge(e)+"]")}function _e(e){e.insert(Ie(U),e.next),e.insert(Ie(A),e)}function qe(e,t,n){if(null!=t)if(t.constructor===ye)null===t.key&&(t.key=T+n),e.insert(null===t.next?t:Me(t),e);else switch(typeof t){case"string":case"number":e.insert(De(t,n),e);break;case"object":if(ce(t)){for(var r=0;r<t.length;++r)qe(e,t[r],n+r);return n+r}default:return qe(e,He(t,n),n)}else e.insert(Ie(n),e);return n+1}function Re(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 Ge(e){switch(typeof e){case"number":case"symbol":return Ge(e.toString());case"function":return Ge(e[G]||e.name);case"object":if(Ze(e))return Ge(e.type);case"string":if(e)return e;default:return"#anonymous"}}function Qe(e,t,n){return Ze(e[n])?e[n].id===u?Qe(e[n],t,n):e[n]:e.host&&e.host.children===e?Qe(e.host,t,n):t.id<a?Qe(t,t.parent,n):Le(e)}function ze(e){return e.id<u?ze(e.parent):e}function Je(e,t){return e.id<a?Je(e.children[t]):e}function Ke(e){return e.id===s?Ke(e.children):e}function Xe(e){if(null==e)return Ie(T);if(e.constructor===ye)return e;switch(typeof e){case"string":case"number":return De(e,T);case"object":if(ce(e))return Be(e);default:return He(e,T)}}function Ye(e,t){var n,r,o,u=null!=t?1:2,a=0,f="function"!=typeof e?l:s,h=arguments.length,p=new Ae(f),d={},v=p.children=f!==s?new ke:void 0;if(1===u&&"object"==typeof t&&void 0===t[xe])switch(t.constructor){default:if(ce(t))break;case Object:if(Te(t))break;Re(p,(++u,d=t)),void 0!==d.children&&f!==s&&h-u<1&&(a=qe(v,d.children,a))}if((n=h-u)>0)if(f!==s)for(;u<h;++u)a=qe(v,arguments[u],a);else{if(1===n)v=arguments[u];else for(v=[];u<h;++u)v.push(arguments[u]);d.children=v}switch(typeof e){case"function":e[re]&&(d=Se({},(o=d,"function"==typeof(r=e)[re]?r[re](o):r[re]),d));break;case"number":case"symbol":e===we&&_e((p.id=c,v));break;default:Te(e)&&_e((p.id=i,v))}return p.type=e,p.props=d,p}function Ze(e){return null!=e&&e.constructor===ye}ue(ae(ke[B],xe,{value:xe}),{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=this,n=t.length;n>0;--n)e(t=t.next)}}}),ue(Ce[B],{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}}}),ue(ae(Ae[B],xe,{value:xe}),{constructor:{value:ye},handleEvent:{value:function(e){var t=this,n=on(t,e);if(!n)return;if("object"==typeof n&&(n[xe]||ce(n)))return Ne(n,function(n){ft(t,e,n)});ft(t,e,n)}}});var $e={toArray:et,forEach:function(e,t,n){null!=e&&et(e).forEach(t,n)},map:function(e,t,n){return null!=e?et(e).map(t,n):e},filter:function(e,t,n){return null!=e?et(e).filter(t,n):e},find:function(e,t,n){return null!=e?function(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]}(et(e),t,n):e},count:function(e){return et(e).length},only:function(e){return Ze(e)?e:Oe("Children.only","Expected to receive a single element")}};function et(e){var t=[];return Ne(e,function(e){t.push(e)}),t}function tt(e,t){return r?"function"==typeof r[e]?r[e].bind(r):r[e]=t:t}function nt(e,t,n){this.error=t,this.origin=n,this.bubbles=!0,this[ye]=e}function rt(e,t,n){return new nt(e,t,n)}function ot(e,t,n){throw rt(e,t,n)}function it(e){try{console.error(e.toString())}catch(e){}finally{return e.error}}function ct(e,t,n){st(e,e,e.host,rt(e,t,n))}function ut(e,t,n){st(e,t,t,n)}function at(e,t,n){n&&n[$]&&!n[be]&&(n[be]=function(e,t,n){try{Et(e,$,t[$](n.error,n))}catch(t){ot(e,t,$)}finally{n.bubbles=!1}}(e,n,n[be]=t))}function st(e,t,n,r){var o;if(zt((o=n).children,Xe(),o),at(n,r,n.owner),r.bubbles){if(!Ze(n.host))throw it(r);if(e!==t)throw r;st(e,t,n.host,r)}}function ft(e,t,n){try{var r,o=e.host,i=o.owner,c=i.props,u=i.state,a=i.context;"function"==typeof n?r=n.call(i,t,c,u,a):"function"==typeof n.handleEvent&&(i!==n&&n[me]&&(o=(i=n)[ye]),r=n.handleEvent(t,c,u,a)),r&&i[me]&&Et(o,W,r)}catch(e){!function(e,t,n){throw it(rt(e,t,n))}(o,e,W+":"+Ge(n.handleEvent||n))}}function lt(e,t){this.refs={},this.state={},this.props=e,this.context=t}ue(nt[B],{toString:{value:function(){return this.message}},message:{get:function(){return this[pe]=this[pe]||"Exception: "+Object(this.error).toString()+"\n\nThe following error occurred in `\n"+this.componentStack+'` from "'+this.origin+'"'}},componentStack:{get:function(){return this[me]=this[me]||function e(t,n){return t&&t.host?n+e(t.host,"<"+Ge(t)+">\n"):n}(this[ye].host,"<"+Ge(this[ye])+">\n")}}}),lt[B]=mt(lt[B]);var ht=we;function pt(e,t){lt.call(this,e,t)}function dt(e,t){lt.call(this,e,t)}function vt(e,t){Ct(this[ye],this,e,w,t)}function yt(e){Ct(this[ye],this,{},v,e)}function wt(e,t){if(e[me])return e[me];if("function"==typeof e&&!e[H])return wt(e[H]=e,t);for(var n in e[G]&&(t[G]=e[G]),e[ne]&&(t[re]=e[ne]),e)e[n]=bt(n,e[n]);return t[B]=fe(lt[B],e),e[me]=t}function mt(e){return ae(e,me,{value:me}),ae(e,R,{value:vt}),ae(e,q,{value:yt}),e[H]||ae(e,H,bt(H,Ee)),e}function bt(e,t){switch(e){case Q:case z:case J:case K:case X:case Y:case Z:case $:case ne:case ee:case te:case _:case G:case H:return{value:t,writable:!0,configurable:!0,enumerable:!1};default:return{value:t,writable:!0,configurable:!0,enumerable:"function"==typeof t}}}function xt(e){var t,n,r,o,i=e,c=e.props,u=e.host,a=e.context=u.context||en(e),s=function(e,t,n,r){try{return e.owner=new t(n,r)}catch(t){ot(e,t,_)}}(e,(t=e.type)[B]&&t[B][H]?(t[B][me]||mt(t[B]),t):t[me]||(pn(t)?dt:wt(t,function(){})),c,a),f=s.state=s.state||{};return s.props=c,s.context=a,s.refs=s.refs||{},s[de]=s[pe]={},s[ve]=e.cache=u.cache,s[ye]=e,s[te]&&(s.state=Ut(e,te,c,f,a)||f),s[Q]&&Ut(e,Q,c,f,a),i=Te(f=s.state)?Ve((n=e,r=s,o=f,function e(t,i){jt(n,r,o,w,function(){r[be]?i(r[be]):t(n.children.type.then===e&&Pt(n,r))})})):Pt(e,s),s[ee]&&(e.context=Se({},a,Ut(e,ee,c,f,a))),e.children=i}function gt(e){if(e.owner[Z]&&(e.cache=function(e,t){try{return e.owner[t](tn(Ke(e)))}catch(n){ct(e,n,t)}}(e,Z))&&Te(e.cache))return e.cache.catch(function(t){ct(e,t,Z)});e.cache=null}function kt(e,t,n,r){try{!function(e,t,n){var r=e.owner,o=e.props,i=t.props,c=r.context,u=r.state,a=r[de]=r[pe],s=u;switch(n){case y:if(r[J]&&Ut(e,J,i,c,s),a!==r[pe])break;case v:a=s}if(s=r[de]=a!==s?Se({},u,a):s,n!==v&&r[K]&&!Ut(e,K,i,s,c))return;r[X]&&Ut(e,X,i,s,c);switch(n){case y:r.props=e.props=i;case w:r.state=s}r[ee]&&je(e.context,Ut(e,ee,i,s,c));zt(e.children,Pt(e,r),e),r[Y]&&Ut(e,Y,o,u,c);e.ref!==t.ref&&_t(e,t.ref,b)}(e,t,r)}catch(t){ut(e,n,t)}}function Ct(e,t,n,r,o){if(n)if(e)switch(typeof n){case"function":return Ct(e,t,St(e,t,n),r,o);case"object":if(Te(t[pe]=n))return jt(e,t,n,r,o);c=t,u=r,(i=e).active?i.work===P?je(c[de],c[pe]):kt(i,i,i,u):je(c.state,c[pe])}else t.state=n;var i,c,u;o&&St(e,t,o)}function Et(e,t,n){if(n)switch(typeof n){case"object":case"function":switch(t){case te:case ee:case K:break;default:Ct(e,e.owner,n,w)}}return n}function jt(e,t,n,r,o){n.then(function(n){var i;"function"==typeof(i=Object(n)).blob&&"function"==typeof i.text&&"function"==typeof i.json?Ct(e,t,n.json(),r,o):Ct(e,t,n,r,o)},function(n){if(Te(e.children.type))try{t[be]=rt(e,n,R)}finally{St(e,t,o)}else ct(e,n,R)})}function St(e,t,n){try{if("function"==typeof n)return n.call(t,t.state,t.props,t.context)}catch(t){ct(e,t,F)}}function Nt(e,t){try{"function"==typeof t&&t.call(e.owner)}catch(t){ot(e,t,F)}}function Ot(e,t,n){try{switch(typeof n){case"function":return n.call(e.owner,t);case"object":return n.current=t;default:e.owner.refs&&(e.owner.refs[n]=t)}}catch(t){ot(e,t,F)}}function Pt(e,t){try{return Xe(t.render(t.props,t.state,t.context))}catch(t){ot(e,t,H)}}function Ut(e,t,n,r,o){t!==Y&&(e.work=P);try{return Et(e,t,e.owner[t](n,r,o))}catch(n){ot(e,n,t)}finally{e.work=O}}function Tt(e,t){lt.call(this,e,t)}function At(e,t){lt.call(this,e,t)}function Mt(e,t,n){var r,o,i;t?Kt.has(t)?(r=Kt.get(t).children,o=Xe(e),i=n,zt(r,o,r.host),i&&Nt(r,i)):Lt(e,t,n,j):Mt(e,nn(),n)}function Lt(e,t,n,r){Ze(e)?ln(t)?function(e,t,n,r){Kt.set(t.owner=n,t),r===j&&Xt(t);Dt(e,e,t,t,S,r)}(e,Le(e),t,r):Oe(H,"Target container is not a valid container"):Lt(Xe(e),t,n,r),n&&Nt(e,n)}function Dt(e,t,n,r,o,a){switch(e.host=r,e.parent=n,e.id){case s:return void function(e,t,n,r,o,i){try{Dt(xt(e),t,n,e,o,i),Ht(e),e.owner[z]&&function(e,t){try{Et(e,t,e.owner[t](tn(Ke(e))))}catch(n){ot(e,n,t)}}(e,z,e.owner),e.ref&&_t(e,e.ref,m)}catch(t){Vt(r.children,Xe(Ht(r)),r),ut(e,r,t)}}(e,t,n,r,o,a);case i:Wt(e,r,e.type);case c:return e.owner=n.owner,It(e,t,r,o,a),void Ht(e);case u:return e.owner=un(e,e.type),It(e,t,r,o,a),void Ht(e);case f:case l:e.xmlns=cn(e,n.xmlns);default:switch(a){case E:if(p=n,(h=e).active=!!(h.owner=an(h,p,Ke(Qe(h,p,I)),Qe(h,p,V))))break;default:Ht(e),o===S?Qt(e,n):Gt(e,t,n)}if(e.id>l)return}var h,p;It(e,t,r,S,a),qt(e,sn(e,e.props),e.xmlns,k)}function It(e,t,n,r,o){for(var i=e.children,c=i.length;c>0;--c)Dt(i=i.next,t,e,n,r,o)}function Vt(e,t,n){var r,o,i,c=e.parent,u=Qe(e,c,V);Bt(e,c),u.active?Dt(t,u,c,n,N,j):Dt(t,u,c,n,S,j),t.active&&(e!==n.children?(r=e,o=t,(i=c.children).insert(o,r),i.remove(r)):n.children=t)}function Wt(e,t,n){n.then(function(r){e.active&&e.type===n&&Jt(e,function e(t){return!Ze(t)&&se.call(Object(t),"default")?e(t.default):Be(Xe(t))}(r),t)},function(t){ct(e,t,H)})}function Bt(e,t){if(e.active){if(Ft(e,t,e),e.id===s&&e.cache)return r=t,void(n=e).cache.then(function(){Rt(n,r)});var n,r;Rt(e,t)}}function Ft(e,t,n){switch(e.active=!1,e.id){case s:e.children&&(i=e,c=t,f=n,Ft(l=e.children,c,i!==f?f:l),gt(i));case a:break;case p:case d:case h:return dn(e,t,n);case u:if(e.active=e!==n&&t.id>a)return Bt(e,t);default:for(var r=e.children,o=r.length;o>0;--o)Ft(r=r.next,e,n);dn(e,t,n)}var i,c,f,l;e.ref&&_t(e,e.ref,x)}function Ht(e){try{switch(e.id){case l:e.owner=gn(e);break;case p:e.owner=mn(e);break;case d:e.owner=bn(e);break;case h:e.owner=xn(e);break;case f:e.owner=kn(e);case s:case u:break;default:e.owner=Je(e,V).owner}}catch(t){ot(e,t,H)}finally{e.active=!0}}function _t(e,t,n){switch(typeof t){case"object":if(t)break;case"undefined":return _t(e,e.ref===t?Ee:e.ref,x)}switch(n){case x:return Ot(e.host,e.ref=null,t);case g:e.ref=t;case m:return Ot(e.host,e.owner,t);case b:_t(e,e.ref,x),_t(e,t,g)}}function qt(e,t,n,r){for(var o in t)switch(o){case"ref":_t(e,t[o],r);case"key":case"xmlns":case"children":break;default:$t(e,o,t[o],n,r)}}function Rt(e,t){if(t.id<u)return Rt(e,ze(t));switch(e.id){case u:case i:case c:return e.children.forEach(function(t){Rt(Ke(t),e)});case s:return Rt(Ke(e),t)}wn(e,t)}function Gt(e,t,n){if(n.id<a){if(n.id<u)return Gt(e,t,ze(n));if(!n.active)return Qt(e,n)}switch(t.id){case u:return Gt(e,Qe(t,n,V),n);case i:case c:return Gt(e,Je(t,V),n);case s:return Gt(e,Ke(t),n);case a:return Qt(e,n)}switch(e.id){case u:return;case i:case c:return e.children.forEach(function(e){Gt(Ke(e),t,n)});case s:return Gt(Ke(e),t,n)}vn(e,t,n)}function Qt(e,t){if(t.id<u)return Qt(e,ze(t));switch(e.id){case u:return;case i:case c:return e.children.forEach(function(e){Qt(Ke(e),t)});case s:return Qt(Ke(e),t)}yn(e,t)}function zt(e,t,n){if(e.active){if(e.key!==t.key)return Vt(e,t,n);if(e.id===i&&t.id===i)return Wt(e,n,e.type=t.type);if(e.type!==t.type)return Vt(e,t,n);switch(e.id){case p:case h:e.children!==t.children&&function(e,t){switch(e.id){case p:return Yt(e,t);case h:Zt(e,t)}}(e,e.children=t.children);case d:return;case u:case c:return Jt(e,t,n);case s:return kt(e,t,n,y)}var r,o;Jt(e,t,n),r=e,o=function e(t,n){if(t===n)return;var r=0;var o={};for(var i in t)se.call(n,i)||(o[(++r,i)]=null);for(var i in n){var c=n[i],u=t[i];c!==u&&("object"!=typeof c||null===c?o[(++r,i)]=c:(c===n||c[xe]===xe||(c=e(u||{},c)))&&(o[(++r,i)]=c))}if(r>0)return o}(e.props,e.props=t.props),qt(r,fn(r,o),r.xmlns,C)}}function Jt(e,t,n){var r=S,o=e.children,i=t.children,c=o.length,u=i.length;if(c+u!==0){var a=0,s=0,f=c-1,l=u-1,h=o.next,p=i.next,d=o.prev,v=i.prev,y=h,w=p,m=d,b=v;e:for(;;){for(;h.key===p.key;){if(y=h.next,w=p.next,zt(h,p,n),++s,++a>f||s>l)break e;h=y,p=w}for(;d.key===v.key;){if(m=d.prev,b=v.prev,zt(d,v,n),--l,a>--f||s>l)break e;d=m,v=b}break}if(a>f++){if(s<=l++)for(l<u?r=N:(d=o,c>0&&(p=w));s++<l;)p=(h=p).next,Dt(o.insert(h,d),d,e,n,r,j)}else if(s>l++)for(l===u&&u>0&&(h=y);a++<f;)h=(p=h).next,Bt(o.remove(p),e);else!function(e,t,n,r,o,i,c,u,a,s){var f=i,l=c,h=r,p=o,d=h,v=h,y=h,w=h,m={},b={};for(;f<u||l<a;)f<u&&(m[h.key]=h,++f!==s)&&(h=h.next),l<a&&(b[p.key]=p,++l!==a)&&(p=p.next);for(;l-- >c;){if(d=p.prev,v=p.next,y=m[p.key],w=m[v.key],Ze(y))if(Ze(v)){if(v=v.active?v:w||h,w=y.next,v.key!==w.key){for(;Ze(w)&&!Ze(b[w.key]);)w=w.next;v.key!==w.key&&(d.key===y.prev.key&&v.key===w.next.key||Gt(n.insert(n.remove(y),v),v,e))}}else Ze(w=y.next)&&Ze(b[w.key])&&(d.key===h.key?Qt(n.insert(n.remove(y),n),e):w!==h&&(Ze(v=b[h.key])?h.prev.key===v.prev.key?Qt(n.insert(n.remove(y),n),e):Gt(n.insert(n.remove(y),h),h,e):w.key!==h.prev.key&&Gt(n.insert(n.remove(y),h),h,e)));else Ze(v)?(v=v.active?v:w||h,Dt(n.insert(p,v),v,e,t,N,j)):Dt(n.insert(p,n),p,e,t,S,j);p=d}for(var x in m)Ze((h=m[x],p=b[x]))?zt(h,p,t):Bt(n.remove(h),e)}(e,n,o,h,p,a,s,f,l,c)}}pt[B]=fe(lt[B],{shouldComponentUpdate:{value:function(e,t){return Pe(this.props,e)||Pe(this.state,t)}}}),dt[B]=fe(lt[B],{render:{value:function(e){return t=this[ye].type,n=e,r=e.children,(o=new Ae(f)).type=t,o.props=n,o.children=Fe(r),o;var t,n,r,o}}}),Tt[B]=fe(lt[B],{getInitialState:{value:function(e,t,n){return this[ye].cache={provider:this,consumers:new ke}}},render:{value:function(e){return e.children}},componentDidUpdate:{value:function(e){!Ue(this.props.value,e.value)&&this.state.consumers.forEach(this.componentChildUpdate)}},componentChildUpdate:{value:function(e){e.didUpdate=!e.didUpdate&&!!e[q]()}}}),At[B]=fe(lt[B],{getInitialState:{value:function(e){return this[ve]||{provider:this}}},render:{value:function(e,t){return e.children(t.provider.props.value)}},componentWillReceiveProps:{value:function(){this.didUpdate=!0}},componentDidMount:{value:function(){this.state.consumers&&this.state.consumers.insert(this,this.state.consumers)}},componentWillUnmount:{value:function(){this.state.consumers&&this.state.consumers.remove(this)}}});var Kt=new oe,Xt=tt("setDocument",function(e){e.owner.textContent=""}),Yt=tt("setText",function(e,t){e.owner.nodeValue=t}),Zt=tt("setComment",function(e,t){e.owner.nodeValue=t}),$t=tt("setProps",function e(t,n,r,o,i){switch(n){case"style":return function(e,t,n){if("object"!=typeof n)return En(e,t,n,"");for(var r in n){var o=n[r];-1===r.indexOf("-")?e.owner.style[r]=!1!==o&&void 0!==o?o:"":e.owner.style.setProperty(r,o)}}(t,n,r);case"className":if(!o&&r)return Cn(t,n,r);case"class":return En(t,"class",r,"");case"xlink:href":return En(t,n,r,"http://www.w3.org/1999/xlink");case"innerHTML":return function(e,t,n,r){e.owner[t]&&e.children.forEach(function(e){r.push(e.owner)});(e.owner[t]=n)&&r.push.apply(r,e.owner.childNodes);r.forEach(function(t){e.owner.appendChild(t)})}(t,n,r||"",[]);case"dangerouslySetInnerHTML":return e(t,"innerHTML",r&&r.__html,o,i);case"acceptCharset":return e(t,"accept-charset",r,o,i);case"httpEquiv":return e(t,"http-equiv",r,o,i);case"tabIndex":return e(t,n.toLowerCase(),r,o,i);case"autofocus":case"autoFocus":return t.owner[r?"focus":"blur"]();case"defaultValue":if("select"===t.type)return;break;case"width":case"height":if("img"===t.type)return En(t,n,r,"")}if(111===n.charCodeAt(0)&&110===n.charCodeAt(1)&&n.length>2)return function(e,t,n){e.cache||(e.cache={});e.cache[t]||e.owner.addEventListener(t,e,!1);e.cache[t]=n}(t,n.substring(2).toLowerCase(),r);switch(typeof r){case"object":return Cn(t,n,r&&t.props[n]);case"string":case"number":case"boolean":if(o||!(n in t.owner))return En(t,n,r,"");default:Cn(t,n,r)}}),en=tt("getContext",function(e){return{}}),tn=tt("getOwner",function(e){return e.owner}),nn=tt("getDocument",jn),rn=tt("getTarget",function(e){return e.currentTarget}),on=tt("getListener",function(e,t){return e.cache[t.type]}),cn=tt("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}),un=tt("getPortal",Sn),an=tt("getQuery",function(e,t,n,r){var o=e.id,i=o>h?"#text":e.type.toLowerCase(),c=e.props,a=e.children,s=a.length,f=n.active?n.owner.nextSibling:t.owner.firstChild,p=f,d=null;for(;f&&(f.nodeName.toLowerCase()!==i||(o>l?(o>h&&r.id>l&&f.splitText(0),f.nodeValue!==a&&(f.nodeValue=a)):0===s&&f.firstChild&&(f.textContent=""),t.id===u&&Sn(t,t.type).appendChild(f),d=f,i=null,(f=f.nextSibling)&&!r.type));){if(o>h&&0===s){if(f.parentNode.insertBefore(d=On(e),f),r.type)break;i=null}f=(p=f).nextSibling,p.parentNode.removeChild(p)}if(d&&d.attributes)for(var v=d.attributes,y=v.length-1;y>=0;--y)null==c[i=v[y].name]&&d.removeAttribute(i);return d}),sn=tt("getInitialProps",function(e,t){switch(e.type){case"input":return je({type:null,step:null,min:null,max:null},t);case"select":return je({value:t.defaultValue},t)}return t}),fn=tt("getUpdatedProps",function(e,t){return t}),ln=tt("isValidTarget",Nn),hn=tt("isValidEvent",function(e){return null!=e&&3===e.BUBBLING_PHASE}),pn=tt("isValidComponent",function(e){return Nn(e[B])}),dn=tt("willUnmount",function(e,t,n){}),vn=tt("insertChild",function(e,t,n){n.owner.insertBefore(e.owner,t.owner)}),yn=tt("appendChild",function(e,t){t.owner.appendChild(e.owner)}),wn=tt("removeChild",function(e,t){t.owner.removeChild(e.owner)}),mn=tt("createText",On),bn=tt("createEmpty",function(e){return document.createTextNode("")}),xn=tt("createComment",function(e){return document.createComment(e.children)}),gn=tt("createElement",function(e){return e.xmlns?document.createElementNS(e.xmlns,e.type):document.createElement(e.type)}),kn=tt("createComponent",function(e){return new e.type(e.props)});function Cn(e,t,n){switch(n){case null:case!1:case void 0:return En(e,t,n,e.owner[t]="");default:e.owner[t]=n}}function En(e,t,n,r){switch(n){case null:case!1:case void 0:return r&&e.owner.removeAttributeNS(r,t),e.owner.removeAttribute(t);case!0:return En(e,t,"",r);default:r?e.owner.setAttributeNS(r,t,n):e.owner.setAttribute(t,n)}}function jn(){return document.documentElement}function Sn(e,t){return"string"==typeof t?jn().querySelector(t):Nn(t)?t:jn()}function Nn(e){return null!=e&&1===e.ELEMENT_NODE}function On(e){return document.createTextNode(e.children)}return o.render=Mt,o.hydrate=function e(t,n,r){n?Lt(t,n,r,E):e(t,nn(),r)},o.Component=lt,o.Fragment=ht,o.PureComponent=pt,o.Children=$e,o.createContext=function(e){return t={value:e,children:Ee},{Provider:function(e){return Ye(Tt,Se({},t,e))},Consumer:function(e){return Ye(At,Se({},t,e))}};var t},o.createFactory=function(e){return null===e||"object"!=typeof e||Te(e)?Ye.bind(null,e):n(t,e)},o.cloneElement=function(e){if(Ze(e))return t=e.type,n=e.props,r=[].slice.call(arguments,1),Re(o=Ye.apply(null,[t].concat(r)),o.props=Se({},n,o.props)),o;var t,n,r,o},o.isValidElement=Ze,o.createPortal=function(e,t,n){var r=new Ae(u);return r.type=t,r.key=void 0===n?null:n,r.children=Fe(e),r},o.createElement=Ye,o.createComment=function(e,t){var n=new Ae(h);return n.type=M,n.key=void 0===t?null:t,n.children=e+"",n},o.createClass=function(e){return wt(Object(e),function e(t,n){for(var r=0,o=le(e[B]);r<o.length;++r)this[o[r]]=this[o[r]].bind(this)})},o.unmountComponentAtNode=function(e){return Kt.has(e)&&!Mt(null,e)},o.findDOMNode=function e(t){if(t)return Ze(t[ye])?e(t[ye]):Ze(t)?t.active&&tn(Ke(t)):hn(t)?rn(t):ln(t)?t:void 0},o.h=Ye,"function"==typeof t&&t(o,Ae,xt,ut,Xe,Le,Ie,Ye,Ht),o}"object"==typeof exports&&"object"==typeof module?module.exports=n(e.process&&e.process.exit&&"function"==typeof t&&t("./cjs")):"function"==typeof define&&define.amd?define(n()):e.dio=n()}("object"==typeof window&&window.window===window?window:"object"==typeof global&&global.global===global?global:this,"object"==typeof arguments&&arguments[1]);
//# sourceMappingURL=umd.min.js.map
{
"name": "dio.js",
"version": "9.0.0-rc.2",
"version": "9.0.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "A Library For Building User Interfaces.",

# DIO
[![dio.js](https://dio.js.org/assets/images/logo.svg)](https://dio.js.org/)
[![dio.js](https://dio.js.org/assets/images/logo.svg)](https://dio.js.org)

@@ -59,7 +59,11 @@ A Library For Building User Interfaces.

The easiest way to get started with DIO is to walk through the [Introduction to DIO](https://dio.js.org/introduction) or the [API Documentation](https://dio.js.org/api).
## Links
1. [Introduction](https://dio.js.org/introduction)
2. [API](https://dio.js.org/api)
3. [REPL](https://dio.js.org/repl)
## Features
The following is an overview of the features DIO allows you to make use of.
The following is an overview of the features afforded.

@@ -70,5 +74,5 @@ 1. ### Rendering

1. Components
1. Primitives like strings, numbers, null, undefined
1. Fragments like Arrays, Iterables
1. and others renderables like Promises and Portals
1. Primitives
1. Fragments, Arrays, Iterables
1. Comments, Portals, and Promises

@@ -82,16 +86,14 @@ 1. ### Components

1. Functions or [EventListener](https://developer.mozilla.org/en/docs/Web/API/EventListener)
1. Preserve "this" reference
1. Functions, [EventListener](https://developer.mozilla.org/en/docs/Web/API/EventListener) or an Array of either.
1. ### Errors
1. Error boundaries through `componentDidCatch`
1. Error boundaries marked by the `componentDidCatch` lifecycle.
1. ### setState
1. As with a Object
1. As with a Promise
1. As with an implicit return
1. Object
1. Promise
1. ### Lifecycle
1. ### Async Lifecycle

@@ -103,24 +105,25 @@ 1. async componentWillUnmount

This intentionally overloaded example presents a few features detailed above, namely – error boundaries, an implicit setState return, Promise setState and rendering Promises & Fragments.
The following overloaded example presents a few features detailed above, namely – error boundaries, an implicit setState return, Promise setState and rendering Promises & Fragments.
```js
class Input {
// Error Boundary
componentDidCatch ({stack, message, ...error}, {componentStack}) {
// error boundary
componentDidCatch (err, {componentStack, origin, message}) {
return {error: true}
}
// Isomorphic Async getInitialState
// isomorphic async getInitialState
async getInitialState() {
return {value: 'Hi!'}
}
// Implicit Promise setState
// implicit promise setState
async handleInput({target}, props, state) {
return {value: target.value}
}
// Rendering Promises
// rendering promises
async render(props, {value, error}, context) {
// error state
if (error)
return h('h1', 'Something went wrong!')
// Rendering Fragments
// fragments
return [

@@ -140,50 +143,31 @@ h('input', {

## Links
---
1. [Introduction to DIO](https://dio.js.org/introduction)
2. [API Documentation](https://dio.js.org/api)
3. [REPL](https://dio.js.org/repl)
--
## Goals
Public react compatibility with an [edge](#edge), this means that any react library should work as long as it does not make use of undocumented/public features for example API's prefixed with `unstable_`.
Public react compatibility with an [edge](#edge), this should mean that most react libraries can work as long as they does not make use of undocumented/public features, for example API's prefixed with `unstable_` and vice-versa.
## Differences
## Comparison, React
#### Custom Renderer, Factory
There are a few react-like libraries but at the date of this writing DIO might be the only one to afford the ability to create your own renderer. Now while both React and DIO expose a way to create your own renderer, there is a difference in how you create this custom renderer.
Affords the same ability as React to create your own renderer.
While react might exposes a package called `react-reconciler` DIO exposes a public API for this as part of an overloaded `createFactory` API.
This is coupled with fact that the config structure somewhat differ as do the arguments passed to the methodes implemented – for example react might pass the view instance(in the case of ReactDOM this might be a DOM node) to the method while DIO would pass the related virtual element(s) that have a reference to the DOM node, which you can then extract(by means of a readonly property), which can be argued gives renderers room to do more with what they have.
All in all it is easy for DIO to consume the react reconcilers config, so the plan is that once the `react-reconciler` package is considererd stable by the React team DIO is in a position to consume the sementics of its config.
As a show of confidence DIO itself uses this interface to implement the DOM renderer that it ships by default, which can be used to create any renderer.
#### Portals, Event Bubbling
Events bubble in Portals as you would expect them to in the DOM, this avoid issues like [#11387](https://github.com/facebook/react/issues/11387) where bubbling them through the virtual tree has unintented behaviors.
Events bubble in Portals as you would expect them to in the DOM, this avoids issues such as [#11387](https://github.com/facebook/react/issues/11387) where bubbling through the virtual tree has some unintended behaviors.
The `createPortal` API also supports string selectors which allows for server-side rendering portals and out-of-order rendering, a feature that might also make it into react: [related issue](https://github.com/facebook/react/issues/10711).
In addition `createPortal` supports string selectors and server-side rendering portals, a feature that might also make it into react: [related issue](https://github.com/facebook/react/issues/10711).
#### Events, Delegation
Though it may sound strange when considering all the articles about event delegation and performance/memory DIO on the other hand intentionally does not implement events with delegation to avoid the performance impact that comes with re-implementing(in JavaScript) event bubbling that browsers do, which is almost always efficiently handled by the host enviroment.
In contrary to the assumed pros of event delegation a general purpose event delegation model is intentionally avoided to avoid the performance and memory pitfalls that come with re-implementing this at the level of abstraction that JavaScript affords, when considering the standard event bubbling behaviour that the host platform implements. That is to say, implementing such a system involves doing more work than the host platform would otherwise do.
However DIO's model does not create any more memory when attaching events than you might imagine React's event delegation model to use, interestingly it might just create less considerering that where react might create a Map entry for each element-event-pair the browser is in a better position to use an optimial reference pointer and data-strucuture to track the relationship between event handlers and elements when using addEventListener for each element.
#### Hydration, Self Correction
In simple terms implementing events with Reacts model of delegation(preserving the DOM model of bubbling) involves doing the same/more amount of work at assignment of the event and more work when emitting the events than a browser would otherwise do.
Hydration goes the [whole 9 yards](https://en.wikipedia.org/wiki/The_whole_nine_yards) to correct differences when hydrating, where React might otherwise error or ignore.
#### Hydration, Self Correcting
DIO goes the [whole 9 yards](https://en.wikipedia.org/wiki/The_whole_nine_yards) to correct differences when hydrating where react might otherwise error or ignore.
#### Error Messages
There are error messages for incorrect use of top-level API's but react is famous for going the extra mile in both error messages and warnings regarding what is considered best practices in **dev mode** but the presence of error boundaries insures that if an error does occur DIO can give you a full trace of the component tree affected in a presentable error message and more.
As opposed to React, the concept of developer warnings in a development build does not exist, The semantics that surround error boundaries help provide error messages when they occur at runtime.

@@ -194,22 +178,14 @@ ## Tradeoffs

React hands down has the bigger community.
React has a big community.
#### Warnings
React has dev mode warnings where DIO does not.
React has developer build warnings.
#### unstable_API
Sadly some libraries do make use of these undocumented unstable API's that React sometimes exposes with a `unstable_` prefix – which DIO intentionally ignores implementing due to their otherwise "considered" unstable nature.
## Edge
There a lot of small details that give DIO its edge that don't realy touch on new API's but rather on creating a larger surface area of what React already supports and adding to this.
#### Supporting Promises
For example React can render strings, numbers, elements and components but what if it was able to render Promises or Thenables? This would help solve a lot of "problems" with data fetching and lazy loading that is possible with React but not declaratively incentivised at the library level.
The ability to render Promises makes support for code-splitting and lazy loading straight forward when supported at the library level. The ability to use a Promise for initial state makes data fetching more declarative and the ability to update state with a promise allows you to deal with async services without cutting back on the declarative nature that is afforded to other first-class citizens.
#### Supporting Thenables/Promises
The ability to render thenables makes support for code-splitting and lazy loading easy at the library level. The ability to use a Promise for initial state makes data fetching more declartive at the library level and the ability to update state with a promise allows you to deal with async services without cutting back on the declarative nature that is afforded to first-class citizens like elements.
```js

@@ -232,14 +208,13 @@ class Input {

#### Supporting Pending Unmounts
#### Supporting Delayed Unmount
It's no suprise that declarative entry and outro animations in react are not at its best compared to other first-class citizens.
Allowing a means to declaratively define a pending unmount that can trigger an outro animation before it is unmounted goes a long away in reducing the abstractions that go into dealing with this when this feature is abscent from the library level.
It is no surprise that declarative entry and exit animations in React are not at its best compared to other first-class citizens.
Allowing a means to declaratively define a delayed unmount that can enqueue exit animations before an unmount goes a long away in reducing the abstractions that go into dealing with this in its absence.
```js
class Input {
async componentWillUnmount(){
async componentWillUnmount(node){
return new Promise((resolve) => {
findDOMNode(this).animate([...], {
...
}).onfinish = resolve
node.animate([...], {...}).onfinish = resolve
})

@@ -255,2 +230,3 @@ }

return h('input', {
ref: 'input'
value: value,

@@ -263,5 +239,5 @@ onInput: this.handleInput

#### Events & "This"
#### Event "this"
Events in React have the infamous legacy of `.bind`. The implementation details of DIO allow it to avoid this legacy as demonstrated in the examples mentioned. In addition DIO allows for multiple event handlers on a single event as illustrated in the following example.
React events outside of `createClass` components have an infamous relationship with `.bind`. The implementation details allow us to avoid this relationship and additionally allow multiple event handlers for a single event.

@@ -271,6 +247,6 @@ ```js

handleSubmit(e, props, state) {
// ...
this instanceof Input
}
handleReset(e, props, state) {
// ...
this instanceof Input
}

@@ -287,2 +263,4 @@ render() {

Support for async iterators works much like regular iterators, but instead of a sequence of elements involve a sequence of states. This allows synchronous designs to emerge from otherwise asynchronous programs.
```js

@@ -292,3 +270,4 @@ class Suspense {

yield 'Loading...'
yield h('h1', 'Complete!')
const data = await fetch('./')
yield h('pre', JSON.stringify(data))
}

@@ -300,11 +279,8 @@ }

While React 16 does allow some level of async server side rendering with `renderToNodeStream` DIO takes it a step further to make sure that the mentioned points about rendering Promises and Promise states applies just as well in a server side render.
Rendering promises/awaiting promise states is afforded to components within the context of `renderToNodeStream` allowing both the previous example uses of `async getInitialState` and Async Generators to render just as well when delivering a rendered payload from a server.
That is to say the server-side renderer can render whatever the client renderer can, including portals – which coupled with the client renderers hydration API allows for out of order rendering that is ordered on the client while hydrating.
#### Custom Components
Custom components are components that instantiate their own host elements. A custom elements constructor might fall under this group of components.
Custom components are components that instantiate their own host elements. Within a DOM context a custom element constructor might fall under this group of components.
```js

@@ -317,3 +293,3 @@ class WordCount extends HTMLElement {

Given DIO's goal to support custom renderers that might not even target the DOM the definition of a what is a custom component is left up to the renderer to configure. In the case of the default DOM renderer this would match custom elements/web components allowing us to render the `WordCount` custom element given without knowing its `localName`.
This allows us to render the given `WordCount` custom element without afore knowledge of its defined `localName`.

@@ -320,0 +296,0 @@ ```js

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc