rax-countdown
Advanced tools
Comparing version 1.1.7 to 1.2.0
# Changelog | ||
## v1.2.0 | ||
- Update rax-view and rax-text version to v2 | ||
## v1.1.7 | ||
@@ -4,0 +8,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=5)}([function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("rax")},function(e,t){e.exports=require("rax-text")},function(e,t){e.exports=require("rax-view")},function(e,t){e.exports=require("rax-image")},function(e,t,n){e.exports=n(6)},function(e,t,n){"use strict";n.r(t);var i=n(1),r=n(0),o=n.n(r),a=n(2),c=n.n(a),s=n(3),u=n.n(s),l=n(4),m=n.n(l);n(7);function p(e){return e&&"[object Function]"==={}.toString.call(e)}function d(e){const{num:t,timeWrapStyle:n,timeBackground:r,timeBackgroundStyle:o,timeStyle:a,secondStyle:s}=e;let l=t.toString();t<0?l="00":t<10&&(l="0"+t);const p=l.split(""),d=p.length-1;return Object(i.createElement)(u.a,{className:"rax-countdown-item",style:n},r?Object(i.createElement)(m.a,{className:"rax-countdown-background",source:r,style:o}):null,p.map(((e,t)=>Object(i.createElement)(c.a,{key:`time_${t}`,style:t===d?s:a},e))))}class f extends i.Component{constructor(...e){super(...e),this.state={timeRemaining:0},this.timeoutId=0,this.tick=()=>{const{onComplete:e,onTick:t,interval:n}=this.props,{timeRemaining:i}=this.state,r=1e3>i;this.timeoutId&&clearTimeout(this.timeoutId),r&&p(e)?e():this.timeoutId=!r&&setTimeout((()=>this.setState({timeRemaining:i-n},(()=>p(t)&&t(i)))),n)}}componentWillMount(){const{timeRemaining:e}=this.props;this.setState({timeRemaining:e})}componentDidMount(){this.tick()}componentDidUpdate(){this.tick()}componentWillReceiveProps(e){e.timeRemaining!==this.props.timeRemaining&&(this.timeoutId&&clearTimeout(this.timeoutId),this.setState({timeRemaining:e.timeRemaining}))}componentWillUnmount(){this.timeoutId&&clearTimeout(this.timeoutId)}shouldComponentUpdate(e,t){return this.props.timeRemaining!==e.timeRemaining||this.state.timeRemaining!==t.timeRemaining}render(){const{timeRemaining:e}=this.state,{formatFunc:t,timeStyle:n,timeBackgroundStyle:r,timeWrapStyle:o,timeBackground:a,secondStyle:s,textStyle:l,tpl:m}=this.props;if(t)return t(e);const p=Math.floor(e/1e3);const f={d:parseInt(p/3600/24),h:parseInt(p/3600)%24,m:parseInt(p/60)%60,s:parseInt(p%60)};let y=new RegExp("{[d,h,m,s]}","g");const g=[];let h=null;for(;null!==(h=y.exec(m));)g.push(h.index,h.index);0!==g.length&&g.push(-1);let b=0;return Object(i.createElement)(u.a,{className:"rax-countdown-main"},g.map(((e,t)=>{if(-1===e){const e=m.slice(b);return e?Object(i.createElement)(c.a,{style:l,key:`text_${t}`},e):null}const u=m[e+1];switch(u){case"d":case"h":case"m":case"s":if(t%2==0){const n=m.slice(b,e);return n?Object(i.createElement)(c.a,{style:l,key:`text_${t}`},n):null}return b=e+3,Object(i.createElement)(d,{num:f[u],timeWrapStyle:o,timeBackground:a,timeBackgroundStyle:r,timeStyle:n,secondStyle:s,key:`time_${t}`});default:return null}})))}}f.propTypes={formatFunc:o.a.func,onTick:o.a.func,onComplete:o.a.func,tpl:o.a.string,timeRemaining:o.a.number,secondStyle:o.a.object,timeStyle:o.a.object,textStyle:o.a.object,timeWrapStyle:o.a.object,timeBackground:o.a.shape({uri:o.a.string}),timeBackgroundStyle:o.a.object,interval:o.a.number},f.defaultProps={tpl:"{d}\u5929{h}\u65f6{m}\u5206{s}\u79d2",timeRemaining:0,interval:1e3},t.default=f},function(e,t,n){}]); | ||
!function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="/",e(e.s=5)}([function(t,n){t.exports=require("prop-types")},function(t,n,e){t.exports=e(7)},function(t,n){t.exports=require("rax-text")},function(t,n){t.exports=require("rax-view")},function(t,n){t.exports=require("rax-image")},function(t,n,e){t.exports=e(6)},function(t,n,e){"use strict";e.r(n);var r=e(1),i=e(0),o=e.n(i),u=e(2),s=e.n(u),c=e(3),a=e.n(c),l=e(4),f=e.n(l);e(8);function h(t){return t&&"[object Function]"==={}.toString.call(t)}function p(t){const{num:n,timeWrapStyle:e,timeBackground:i,timeBackgroundStyle:o,timeStyle:u,secondStyle:c}=t;let l=n.toString();n<0?l="00":n<10&&(l="0"+n);const h=l.split(""),p=h.length-1;return Object(r.createElement)(a.a,{className:"rax-countdown-item",style:e},i?Object(r.createElement)(f.a,{className:"rax-countdown-background",source:i,style:o}):null,h.map(((t,n)=>Object(r.createElement)(s.a,{key:`time_${n}`,style:n===p?c:u},t))))}class d extends r.Component{constructor(...t){super(...t),this.state={timeRemaining:0},this.timeoutId=0,this.tick=()=>{const{onComplete:t,onTick:n,interval:e}=this.props,{timeRemaining:r}=this.state,i=1e3>r;this.timeoutId&&clearTimeout(this.timeoutId),i&&h(t)?t():this.timeoutId=!i&&setTimeout((()=>this.setState({timeRemaining:r-e},(()=>h(n)&&n(r)))),e)}}componentWillMount(){const{timeRemaining:t}=this.props;this.setState({timeRemaining:t})}componentDidMount(){this.tick()}componentDidUpdate(){this.tick()}componentWillReceiveProps(t){t.timeRemaining!==this.props.timeRemaining&&(this.timeoutId&&clearTimeout(this.timeoutId),this.setState({timeRemaining:t.timeRemaining}))}componentWillUnmount(){this.timeoutId&&clearTimeout(this.timeoutId)}shouldComponentUpdate(t,n){return this.props.timeRemaining!==t.timeRemaining||this.state.timeRemaining!==n.timeRemaining}render(){const{timeRemaining:t}=this.state,{formatFunc:n,timeStyle:e,timeBackgroundStyle:i,timeWrapStyle:o,timeBackground:u,secondStyle:c,textStyle:l,tpl:f}=this.props;if(n)return n(t);const h=Math.floor(t/1e3);const d={d:parseInt(h/3600/24),h:parseInt(h/3600)%24,m:parseInt(h/60)%60,s:parseInt(h%60)};let v=new RegExp("{[d,h,m,s]}","g");const m=[];let _=null;for(;null!==(_=v.exec(f));)m.push(_.index,_.index);0!==m.length&&m.push(-1);let g=0;return Object(r.createElement)(a.a,{className:"rax-countdown-main"},m.map(((t,n)=>{if(-1===t){const t=f.slice(g);return t?Object(r.createElement)(s.a,{style:l,key:`text_${n}`},t):null}const a=f[t+1];switch(a){case"d":case"h":case"m":case"s":if(n%2==0){const e=f.slice(g,t);return e?Object(r.createElement)(s.a,{style:l,key:`text_${n}`},e):null}return g=t+3,Object(r.createElement)(p,{num:d[a],timeWrapStyle:o,timeBackground:u,timeBackgroundStyle:i,timeStyle:e,secondStyle:c,key:`time_${n}`});default:return null}})))}}d.propTypes={formatFunc:o.a.func,onTick:o.a.func,onComplete:o.a.func,tpl:o.a.string,timeRemaining:o.a.number,secondStyle:o.a.object,timeStyle:o.a.object,textStyle:o.a.object,timeWrapStyle:o.a.object,timeBackground:o.a.shape({uri:o.a.string}),timeBackgroundStyle:o.a.object,interval:o.a.number},d.defaultProps={tpl:"{d}\u5929{h}\u65f6{m}\u5206{s}\u79d2",timeRemaining:0,interval:1e3},n.default=d},function(t,n){var e={t:1,i:!1,driver:null,rootComponents:{},rootInstances:{},owner:null};function r(t,n,e,r,i){return{type:t,key:n,ref:e,props:r,_owner:i}}function i(t){return null===t}function o(t){return"function"==typeof t}function u(t){return"object"==typeof t}function s(t){return"[object Object]"===h.toString.call(t)}function c(t){return Array.isArray(t)}function a(t){return"string"==typeof t}function l(t){return"number"==typeof t}var f=function(){},h={};function p(t,n){if(c(t))for(var e=0,r=t.length;e<r;e++)p(t[e],n);else n.push(t)}function d(t){if(null==t)return t;var n=[];return p(t,n),n.length-1?n:n[0]}var v=[],m=[],_=[],g=setTimeout;function y(t){for(var n;n=t.shift();)n()}function x(t){0===v.length&&g(C),v.push(t)}function C(){y(v)}function w(t){0===m.length&&g(k),m.push(t)}function k(){y(m)}function R(t){_.push(t)}function b(t,n,r){var i,o=void 0===r?"":" got: "+function(t){return s(t)?Object.keys(t):t}(r);return Error(t+": #"+n+", "+((i=e.owner)?"check <"+i.u()+">":"no owner")+"."+o)}function S(t,n){throw b("Error",t,n)}function I(t,n){var e=b("Warn",t,n);g((function(){throw e}),0)}var W={key:!0,ref:!0};function j(t,n,i){var o,u={},s=null,a=null;if(null!=n)for(o in a=void 0===n.ref?null:n.ref,s=void 0===n.key?null:""+n.key,n)W[o]||(u[o]=n[o]);var l=arguments.length-2;if(l>0)if(1!==l||c(i)){var h=i;if(l>1){h=Array(l);for(var p=0;p<l;p++)h[p]=arguments[p+2]}u.children=d(h)}else u.children=i;if(t&&t.defaultProps){var v=t.defaultProps;for(o in v)void 0===u[o]&&(u[o]=v[o])}return null==t&&(t=f,I(0)),new r(t,s,a,u,e.owner)}function D(t,n,e){for(var r=0,i=t&&t.length;r<i;r++)t[r].call(n,e)}var O=h.hasOwnProperty;function U(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}function M(t,n){if(U(t,n))return!0;if(!u(t)||i(t)||!u(n)||i(n))return!1;var e=Object.keys(t);if(e.length!==Object.keys(n).length)return!1;for(var r=0;r<e.length;r++)if(!O.call(n,e[r])||!U(t[e[r]],n[e[r]]))return!1;return!0}function E(){return e.owner&&e.owner._instance}function Z(){var t=E();if(t)return t;S(1)}function T(t,n){if(i(n)||t.length!==n.length)return!1;for(var e=0;e<t.length;e++)if(!U(t[e],n[e]))return!1;return!0}function P(t){var n=Z(),r=n.getHookID(),i=n.getHooks();i[r]||(o(t)&&(t=t()),i[r]=[t,function(t){e.i||k();var u=i[r],s=u[2];o(t)&&(t=t(s)),U(t,s)||(u[2]=t,E()===n?n.o=!0:n.h())},t]);var u=i[r];return U(u[0],u[2])||(u[0]=u[2],n.l=!0),u}function H(t,n){N(t,n)}function N(t,n,e){var r=Z(),i=r.getHookID(),o=r.getHooks();if(n=void 0===n?null:n,o[i]){var u=o[i],s=u.v,c=u.p;u.p=n,u._=c,s.current=t}else{var a=function t(n){if(!n&&e)return w((function(){return t(!0)}));var r=t.current;r&&(l.current=r(),t.current=null)},l=function t(n){if(!n&&e)return w((function(){return t(!0)}));var r=t.current;r&&(r(),t.current=null)};a.current=t,o[i]={v:a,j:l,_:n,p:n},r.didMount.push(a),r.willUnmount.push((function(){return l(!0)})),r.didUpdate.push((function(){var t=o[i],n=t.p,e=t.v;null!=n&&T(n,t._)||(l(),e())}))}}function A(t,n){var e=Z(),r=e.getHookID(),o=e.getHooks();if(n=void 0===n?null:n,o[r]){var u=o[r][1];!i(n)&&T(n,u)||(o[r]=[t(),n])}else o[r]=[t(),n];return o[r][0]}function B(t){return c(t)?t:[t]}function F(t,n){for(var e;t&&t._internal;){if(n(t)){e=t;break}t=t._internal.m}return e}var V=0;function $(t){var n;return s(t)&&null!==t&&t.type?n=a(t.type)?new e.O(t):new e.g(t):a(t)||l(t)?n=new e.k(t+""):c(t)?n=new e.I(t):(void 0===t||i(t)||!1===t||!0===t||I(2,t),n=new e.A(t)),n}function q(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,L(t,n)}function L(t,n){return(L=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}var G=function(){function t(t,n){this.props=t,this.context=n,this.refs={}}var n=t.prototype;return n.setState=function(t,n){this.updater.setState(this,t,n)},n.forceUpdate=function(t){this.updater.forceUpdate(this,t)},t}(),J=function(t){function n(n,e){var r;return(r=t.call(this,n,e)||this).C=!0,r}return q(n,t),n}(G),K=1,Y=function(t){function n(){var n;return(n=t.call(this)||this).P=[],n.D=K++,n}q(n,t);var e=n.prototype;return e.S=function(){return this.U().S()},e.U=function(){return this._internal._renderedComponent},e.h=function(t){this.P=t,this.forceUpdate()},e.render=function(){return this.P},n}(G),X={set:function(t,n){t._r||(t._r=n,n.D&&(e.rootInstances[n.D]=n,e.rootComponents[n.D]=n._internal))},get:function(t){return t._r},remove:function(t){var n=this.get(t);n&&(t._r=null,n.D&&(delete e.rootComponents[n.D],delete e.rootInstances[n.D]))},mount:function(t,n,r){var i=r.parent,o=r.hydrate,u=e.driver;null==n&&(n=u.createBody());var s,c={element:t,container:n,hydrate:o};if(u.beforeRender&&u.beforeRender(c),i){var a=i._internal;s=a.H(a._context)}var l=this.get(n);if(l&&l.D)return s&&(l._internal.N=s),l.h(t),u.afterRender&&u.afterRender(c),l;var f=$(j(Y)).R(n,i,s||{});return this.set(n,f),f.h(t),u.afterRender&&u.afterRender(c),f}};function z(t,n,e){var r=t?t.ref:null,i=n?n.ref:null;r!==i&&(r&&tt(t._owner,r,e),i&&Q(n._owner,i,e))}function Q(t,n,e){if(t){var r=e.S();o(n)?n(r):u(n)?n.current=r:t._instance.refs[n]=r}else I(3)}function tt(t,n,e){if(o(n))n(null);else{var r=e.S();u(n)&&n.current===r?n.current=null:t._instance.refs[n]===r&&delete t._instance.refs[n]}}function nt(t,n){var e=i(t),r=i(n);return e||r?e===r:!(!c(t)||!c(n))||(a(t)||l(t)?a(n)||l(n):u(t)&&u(n)&&t.type===n.type&&t.key===n.key)}function et(t,n,e){var r=n&&n.key,i="."+e.toString(36);if(a(r)){var o="$"+r;return void 0===t[o]?o:i}return i}function rt(t){for(var n=t;n=t.m&&t.m._internal;)if(n instanceof e.g)t=n;else{for(var r=Object.keys(n.T),i=t.V-1;i>=0;i--){var o=n.T[r[i]].W();if(!c(o))return o;if(o.length>0)return o[o.length-1]}if(!(n instanceof e.I))return null;t=n}}var it=function(){function t(t){this.Z=t}var n=t.prototype;return n.$=function(t,n,r){this._parent=t,this.m=n,this._context=r,this._mountID=e.t++},n.q=function(){this.Z=this._nativeNode=this._parent=this.m=this._context=null,this._instance&&(this._instance=this._instance._internal=null)},n.R=function(t,n,e,r){this.$(t,n,e),this.B(r);var i={};return i._internal=this,i},n.unmountComponent=function(t){this._nativeNode&&!t&&e.driver.removeChild(this._nativeNode,this._parent),this.q()},n.u=function(){var t=this.Z,n=t&&t.type;return n&&n.displayName||n&&n.name||n||t},n.B=function(t){var n=this.W(),r=this._parent;t?t(n,r):e.driver.appendChild(n,r)},n.W=function(){return null==this._nativeNode?this._nativeNode=this.F():this._nativeNode},n.S=function(){return this.W()},t}(),ot=Object.assign,ut=/^on[A-Z]/,st=function(t){function n(){return t.apply(this,arguments)||this}q(n,t);var r=n.prototype;return r.R=function(t,n,e,r){this.$(t,n,e);var i=this.Z,o=i.props,u=i.type,s=o.children,c=o.append||"tree";this.G=ot({},o.style);var a={type:u,props:o};return a._internal=this,this._instance=a,"tree"===c?(this.J(s,e),this.B(r)):(this.B(r),this.J(s,e)),i&&i.ref&&Q(i._owner,i.ref,this),a},r.J=function(t,n){if(null==t)return t;var e=this.W();return this.K(e,B(t),n)},r.K=function(t,n,e,r){for(var i=this.T={},o=[],u=0,s=n.length;u<s;u++){var c=n[u],a=$(c);i[et(i,c,u)]=a,a.V=u;var l=a.R(t,this._instance,e,r);o.push(l)}return o},r.L=function(t){var n=this.T;if(n){for(var e in n)n[e].unmountComponent(t);this.T=null}},r.unmountComponent=function(t){if(this._nativeNode){var n=this.Z.ref;n&&tt(this.Z._owner,n,this),X.remove(this._nativeNode),t||e.driver.removeChild(this._nativeNode,this._parent)}this.L(!0),this.G=null,this.q()},r.M=function(t,n,e,r){this.Z=n,z(t,n,this);var i=t.props,o=n.props;this.X(i,o),null==i.children||c(i.children)&&0===i.children.length?this.J(o.children,r):this.Y(o.children,r)},r.X=function(t,n){var r,i,u,s=e.driver,c=this.W();for(r in t)if("children"!==r&&null!=t[r]&&!n.hasOwnProperty(r))if("style"===r){var a=this.G;for(i in a)(u=u||{})[i]="";this.G=null}else if(ut.test(r)){var l=t[r];o(l)&&s.removeEventListener(c,r.slice(2).toLowerCase(),l)}else s.removeAttribute(c,r,t[r]);for(r in n){var f=n[r],h="style"===r?this.G:null!=t?t[r]:void 0;if("children"!==r&&h!==f&&(null!=f||null!=h))if("style"===r)if(f?f=this.G=ot({},f):this.G=null,null!=h){for(i in h)f&&(f[i]||0===f[i])||((u=u||{})[i]="");for(i in f)h[i]!==f[i]&&((u=u||{})[i]=f[i])}else u=f;else if(ut.test(r)){var p=r.slice(2).toLowerCase();o(h)&&s.removeEventListener(c,p,h,n),o(f)&&s.addEventListener(c,p,f,n)}else null!=f?s.setAttribute(c,r,f):s.removeAttribute(c,r,t[r])}u&&s.setStyle(c,u)},r.Y=function(t,n){var r=this.T,o=e.driver;if(null!=t||null!=r){var u={};if(null!=t)for(var s=0,a=(t=B(t)).length;s<a;s++){var l=t[s],f=et(u,l,s),h=r&&r[f],p=h&&h.Z,d=h&&h._context;null!=h&&nt(p,l)?(p===l&&d===n||h.M(p,l,n,n),u[f]=h):(h&&(h.nn=!0),u[f]=$(l))}var v=this.W(),m=c(v),_=null,g=null,y=!1,x=!1,C=null,w=!(!o.removeChildren||!(i(t)||t&&!t.length)||m);if(null!=r){for(var k in r){var R=r[k],b=R.nn||!u[k];_?b&&R.unmountComponent(w):(x=b,c(g=(_=R).W())&&(y=0===g.length,g=g[0]))}(m&&0===v.length||y)&&(C=rt(this))}var S=function(t,n){for(var e=0,r=(t=B(t)).length;e<r;e++)C?o.insertAfter(t[r-1-e],C):g?o.insertBefore(t[e],g):n&&o.appendChild(t[e],n)},I=0;for(var W in u){var j=u[W],D=r&&r[W];if(D===j){var O=D.W();D.V!==I&&S(O)}else m&&(v=this._parent),j.R(v,this._instance,n,S);j.V=I++,c(C=j.W())&&(C=C[C.length-1])}x&&_.unmountComponent(w),w&&o.removeChildren(this._nativeNode),this.T=u}},r.F=function(){var t=this._instance,n=e.driver.createElement(t.type,t.props,this);return X.set(n,t),n},n}(it),ct=function(t){function n(n,e){var r;(r=t.call(this)||this).tn=!0,r.rn=n,r.un=0,r.fn=0,r.on={},r.o=!1,r.l=!1,r.en=null,r.sn={},r.didMount=[],r.didUpdate=[],r.willUnmount=[],r.state=h,n._forwardRef&&(r.cn=r._forwardRef=e);var i=n.hn;return i&&(r.shouldComponentUpdate=function(t){for(var n=!0,e=i.length-1;e>-1&&!(n=i[e](r.props,t));e--);return!n||r.cn!==r._forwardRef}),r}q(n,t);var e=n.prototype;return e.getHooks=function(){return this.on},e.getHookID=function(){return++this.un},e.useContext=function(t){var n=this,e=t._contextID,r=this.sn[e];if(!r){var i=t.an(this);if(r=this.sn[e]={ln:i},i){var o=function(t){r.vn!==t&&(n.l=!0,n.h())};i.pn(o),this.willUnmount.push((function(){return i.dn(o)}))}}return r.vn=r.ln?r.ln.getValue():t._defaultValue},e.componentWillMount=function(){this.l=!0},e.componentDidMount=function(){D(this.didMount)},e.componentWillReceiveProps=function(){this.l=!0},e.componentDidUpdate=function(){D(this.didUpdate)},e.componentWillUnmount=function(){D(this.willUnmount)},e.h=function(){this.setState(h)},e.render=function(){this.un=0,this.fn=0,this.o=!1;for(var t=this.rn(this.props,this._forwardRef?this._forwardRef:this.context);this.o;)this.fn++,this.fn>24&&S(4),this.un=0,this.o=!1,t=this.rn(this.props,this._forwardRef?this._forwardRef:this.context);return this.l&&(this.en=t,this.l=!1),this.en},n}(G),at=[];function lt(t){return t._n}function ft(t){var n=t._internal;if(n){e.i=!0;var r=n.Z,i=n._context,o=n.N||i;n.N=void 0,(lt(n)||n.xn)&&(n.M(r,r,i,o),y(_)),e.i=!1}}function ht(t,n){return n._internal._mountID-t._internal._mountID}function pt(){if(e.i)return x(pt);var t,n=at;if(n.length>0)for(k(),at=[],n.length>1&&(n=n.filter((function(t){return!!t._internal})).sort(ht));t=n.pop();)ft(t)}function dt(t,n){if(at.indexOf(t)<0&&at.push(t),n){if(at.length>1)return;x(pt)}else pt()}function vt(t,n,e){var r=t._internal;if(r){e&&function(t,n){(function(t){return t.wn}(t)||function(t){return t.wn=[]}(t)).push(n)}(r,e);var i=r._renderedComponent;n?(t.tn&&(r.xn=!0),function(t,n){(lt(t)||function(t){return t._n=[]}(t)).push(n)}(r,n),!r.yn&&i&&dt(t,!0)):(r.xn=!0,i&&dt(t))}}var mt={setState:function(t,n,r){e.i||k(),vt(t,n,r)},forceUpdate:function(t,n){vt(t,null,n)}};function _t(t,n,e){try{return t()}catch(t){e?e(t):function(t,n){var e=F(t,(function(t){return t.componentDidCatch||t.constructor&&t.constructor.getDerivedStateFromError}));e?R((function(){var t=e._internal;t&&_t((function(){if(e.componentDidCatch&&e.componentDidCatch(n),e.constructor&&e.constructor.getDerivedStateFromError){var t=e.constructor.getDerivedStateFromError(n);e.setState(t)}}),t.m)})):g((function(){throw n}),0)}(n,t)}}function gt(t,n){R((function(){_t(t,n)}))}function yt(t,n){t&>((function(){D(t,n)}),n)}var xt=function(t){function n(){return t.apply(this,arguments)||this}q(n,t);var r=n.prototype;return r.R=function(t,n,r,i){this.$(t,n,r);var u,s,c=this.Z,a=c.type,l=c.ref,f=c.props,h=a.prototype,p=this.bn(r);if(_t((function(){h&&h.render?u=new a(f,p):o(a)?u=new ct(a,l):S(6,a)}),n),u){u.props=f,u.context=p,u.refs={},u.updater=mt,u._internal=this,this._instance=u;var d=u.state;void 0===d&&(u.state=d=null),u.componentWillMount&&_t((function(){u.componentWillMount()}),u),e.owner=this,u.state=this.jn(f,p);var v=this.wn;return this.wn=null,_t((function(){s=u.render()}),u),e.owner=null,this._renderedComponent=$(s),this._renderedComponent.R(this._parent,u,this.H(r),i),!c.type._forwardRef&&l&&Q(c._owner,l,this),u.componentDidMount&>((function(){u.componentDidMount()}),u),yt(v,u),u}},r.unmountComponent=function(t){var n=this._instance;if(n&&n.componentWillUnmount&&_t((function(){n.componentWillUnmount()}),n),null!=this._renderedComponent){var e=this.Z,r=e.ref;!e.type._forwardRef&&r&&tt(e._owner,r,this),this._renderedComponent.unmountComponent(t),this._renderedComponent=null}this._n=null,this.xn=!1,this.q()},r.bn=function(t){var n={},e=this.Z.type.contextTypes;if(e)for(var r in e)n[r]=t[r];return n},r.H=function(t){var n=this._instance,e=n.getChildContext&&n.getChildContext();return e?ot({},t,e):t},r.jn=function(t,n){var e=this._instance,r=this._n;if(!r)return e.state;this._n=null;for(var i=ot({},e.state),u=0;u<r.length;u++){var s=r[u];ot(i,o(s)?s.call(e,i,t,n):s)}return i},r.M=function(t,n,e,r){var i=this,o=this._instance;o&&_t((function(){var e,u,s;i._context===r?u=o.context:(u=i.bn(r),e=!0),s=n.props,t!==n&&(e=!0),e&&o.componentWillReceiveProps&&(i.yn=!0,o.componentWillReceiveProps(s,u),i.yn=!1),i.Z.type._forwardRef?(o.cn=t.ref,o._forwardRef=n.ref):z(t,n,i);var c=!0,a=o.props,l=o.state,f=i.jn(s,u),h=i.wn;if(i.wn=null,i.xn||(o.shouldComponentUpdate?c=o.shouldComponentUpdate(s,f,u):o.C&&(c=!M(a,s)||!M(l,f))),c){i.xn=!1;var p=o.context;o.componentWillUpdate&&o.componentWillUpdate(s,f,u),i.Z=n,i._context=r,o.props=s,o.state=f,o.context=u,i.mn(r),o.componentDidUpdate&>((function(){o.componentDidUpdate(a,l,p)}),o)}else i.Z=n,i._context=r,o.props=s,o.state=f,o.context=u;yt(h,o)}),o)},r.mn=function(t){var n,r=this._renderedComponent,i=r.Z,o=this._instance;if(e.owner=this,n=o.render(),e.owner=null,nt(i,n)){var u=r._context,s=this.H(t);i===n&&u===s||r.M(i,n,u,s)}else{var a=null,l=r.W();c(l)&&0===l.length&&null==o.D&&(a=rt(r)),r.unmountComponent(!0),this._renderedComponent=$(n),this._renderedComponent.R(this._parent,o,this.H(t),(function(t,n){var r=e.driver;l=B(l),t=B(t);for(var i=0;i<t.length;i++){var o=t[i];l[i]?r.replaceChild(o,l[i]):a?r.insertAfter(o,a):r.appendChild(o,n),a=o}for(var u=t.length;u<l.length;u++)r.removeChild(l[u])}))}},r.W=function(){var t=this._renderedComponent;if(t)return t.W()},r.S=function(){var t=this._instance;return t.tn?null:t},n}(it),Ct=function(t){function n(){return t.apply(this,arguments)||this}q(n,t);var r=n.prototype;return r.M=function(t,n){t!==(n=""+n)&&(this.Z=n,e.driver.updateText(this.W(),n))},r.F=function(){return e.driver.createText(this.Z,this)},n}(it),wt=function(t){function n(){return t.apply(this,arguments)||this}q(n,t);var r=n.prototype;return r.R=function(t,n,r,i){this.$(t,n,r);var o=this._instance={};o._internal=this;var u=[];if(this.K(this._parent,this.Z,r,(function(t){t=B(t);for(var n=0;n<t.length;n++)u.push(t[n])})),i)i(u,t);else for(var s=0;s<u.length;s++)e.driver.appendChild(u[s],t);return o},r.unmountComponent=function(t){if(!t)for(var n=this.W(),r=0,i=n.length;r<i;r++)e.driver.removeChild(n[r]);this.L(!0),this.q()},r.M=function(t,n,e,r){this.Z=n,this.Y(this.Z,r)},r.W=function(){var t=this.T||{};return[].concat.apply([],Object.keys(t).map((function(n){return t[n].W()})))},n}(st),kt=function(t){function n(){return t.apply(this,arguments)||this}q(n,t);var r=n.prototype;return r.F=function(){return e.driver.createEmpty(this)},r.M=function(){},n}(it);e.A=kt,e.O=st,e.k=Ct,e.I=wt,e.g=xt;var Rt={Host:e,Instance:X,Element:r,flattenChildren:d};n.Component=G,n.Fragment=function(t){return t.children},n.PureComponent=J,n.createContext=function(t){var n="_c"+V++;function e(t){return F(t,(function(t){return t.On===n}))}return{Provider:function(){function e(){this.On=n,this.gn=[]}var r=e.prototype;return r.pn=function(t){this.gn.push(t)},r.dn=function(t){this.gn=this.gn.filter((function(n){return n!==t}))},r._getChildContext=function(){var t;return(t={})[n]=this,t},r.getValue=function(){return void 0!==this.props.value?this.props.value:t},r.componentDidUpdate=function(t){this.props.value!==t.value&&D(this.gn,null,this.getValue())},r.render=function(){return this.props.children},e}(),Consumer:function(r,i){var u=this,s=P((function(){return i[n]||e(u)}))[0],c=s?s.getValue():t,a=P(c),l=a[1];if(c===a[0]){H((function(){if(s)return s.pn(l),function(){s.dn(l)}}),[]);var f=B(r.children)[0];return o(f)?f(c):void 0}l(c)},_contextID:n,_defaultValue:t,an:e}},n.createElement=j,n.createRef=function(){return{current:null}},n.forwardRef=function(t){return t._forwardRef=!0,t},n.memo=function(t,n){return n=n||M,t.hn?t.hn.push(n):t.hn=[n],t},n.render=function(t,n,r,i){o(r)&&(i=r,r=null),(e.driver=(r=r||h).driver||e.driver)||S(5);var u=X.mount(t,n,r).S();return i&&i.call(u),u},n.shared=Rt,n.useCallback=function(t,n){return A((function(){return t}),n)},n.useContext=function(t){return Z().useContext(t)},n.useEffect=function(t,n){N(t,n,!0)},n.useImperativeHandle=function(t,n,e){H((function(){return o(t)?(t(n()),function(){return t(null)}):null!=t?(t.current=n(),function(){t.current=null}):void 0}),c(e)?e.concat([t]):null)},n.useLayoutEffect=H,n.useMemo=A,n.useReducer=function(t,n,r){var i=Z(),u=i.getHookID(),s=i.getHooks(),c=s[u];if(!c){var a=o(r)?r(n):n;return s[u]=[a,function(t){e.i||k();var n=s[u][2];if(E()===i)n.kn.push(t),i.o=!0;else{var r=n.In,o=(0,n.An)(r,t);if(U(o,r))return;n.In=o,n.kn.push(t),i.h()}},{kn:[],An:t,In:a}]}var l=c[2],f=c[0];if(i.fn>0)for(var h=0;h<l.kn.length;h++)f=t(f,l.kn[h]);else f=l.In;return U(f,c[0])||(c[0]=f,i.l=!0),l.An=t,l.In=f,l.kn.length=0,s[u]},n.useRef=function(t){var n=Z(),e=n.getHookID(),r=n.getHooks();return r[e]||(r[e]={current:t}),r[e]},n.useState=P,n.version="1.2.2"},function(t,n,e){}]); |
@@ -1,1 +0,1 @@ | ||
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=6)}([function(t,e){t.exports=require("prop-types")},function(t,e){t.exports=require("rax")},function(t,e){t.exports=require("rax-text")},function(t,e){t.exports=require("rax-view")},function(t,e){t.exports=require("rax-image")},function(t,e){t.exports={"rax-countdown-main":{flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},"rax-countdown-item":{flexDirection:"row"},"rax-countdown-background":{position:"absolute"}}},function(t,e,n){t.exports=n(7)},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n(0),o=n.n(i),a=n(2),u=n.n(a),c=n(3),l=n.n(c),m=n(4),s=n.n(m),p=n(5);function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var d=n.n(p).a;function y(t){return t&&"[object Function]"==={}.toString.call(t)}function g(t){var e=t.num,n=t.timeWrapStyle,i=t.timeBackground,o=t.timeBackgroundStyle,a=t.timeStyle,c=t.secondStyle,m=e.toString();e<0?m="00":e<10&&(m="0"+e);var p=m.split(""),f=p.length-1;return Object(r.createElement)(l.a,{className:"rax-countdown-item",style:Object.assign({},d["rax-countdown-item"],n)},i?Object(r.createElement)(s.a,{className:"rax-countdown-background",source:i,style:Object.assign({},d["rax-countdown-background"],o)}):null,p.map((function(t,e){return Object(r.createElement)(u.a,{key:"time_"+e,style:e===f?c:a},t)})))}var x=function(t){var e,n;function i(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).state={timeRemaining:0},e.timeoutId=0,e.tick=function(){var t=e.props,n=t.onComplete,r=t.onTick,i=t.interval,o=e.state.timeRemaining,a=1e3>o;e.timeoutId&&clearTimeout(e.timeoutId),a&&y(n)?n():e.timeoutId=!a&&setTimeout((function(){return e.setState({timeRemaining:o-i},(function(){return y(r)&&r(o)}))}),i)},e}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,f(e,n);var o=i.prototype;return o.componentWillMount=function(){var t=this.props.timeRemaining;this.setState({timeRemaining:t})},o.componentDidMount=function(){this.tick()},o.componentDidUpdate=function(){this.tick()},o.componentWillReceiveProps=function(t){t.timeRemaining!==this.props.timeRemaining&&(this.timeoutId&&clearTimeout(this.timeoutId),this.setState({timeRemaining:t.timeRemaining}))},o.componentWillUnmount=function(){this.timeoutId&&clearTimeout(this.timeoutId)},o.shouldComponentUpdate=function(t,e){return this.props.timeRemaining!==t.timeRemaining||this.state.timeRemaining!==e.timeRemaining},o.render=function(){var t=this.state.timeRemaining,e=this.props,n=e.formatFunc,i=e.timeStyle,o=e.timeBackgroundStyle,a=e.timeWrapStyle,c=e.timeBackground,m=e.secondStyle,s=e.textStyle,p=e.tpl;if(n)return n(t);for(var f=Math.floor(t/1e3),y={d:parseInt(f/3600/24),h:parseInt(f/3600)%24,m:parseInt(f/60)%60,s:parseInt(f%60)},x=new RegExp("{[d,h,m,s]}","g"),b=[],h=null;null!==(h=x.exec(p));)b.push(h.index,h.index);0!==b.length&&b.push(-1);var v=0;return Object(r.createElement)(l.a,{className:"rax-countdown-main",style:d["rax-countdown-main"]},b.map((function(t,e){if(-1===t){var n=p.slice(v);return n?Object(r.createElement)(u.a,{style:s,key:"text_"+e},n):null}var l=p[t+1];switch(l){case"d":case"h":case"m":case"s":if(e%2==0){var f=p.slice(v,t);return f?Object(r.createElement)(u.a,{style:s,key:"text_"+e},f):null}return v=t+3,Object(r.createElement)(g,{num:y[l],timeWrapStyle:a,timeBackground:c,timeBackgroundStyle:o,timeStyle:i,secondStyle:m,key:"time_"+e});default:return null}})))},i}(r.Component);x.propTypes={formatFunc:o.a.func,onTick:o.a.func,onComplete:o.a.func,tpl:o.a.string,timeRemaining:o.a.number,secondStyle:o.a.object,timeStyle:o.a.object,textStyle:o.a.object,timeWrapStyle:o.a.object,timeBackground:o.a.shape({uri:o.a.string}),timeBackgroundStyle:o.a.object,interval:o.a.number},x.defaultProps={tpl:"{d}\u5929{h}\u65f6{m}\u5206{s}\u79d2",timeRemaining:0,interval:1e3},e.default=x}]); | ||
!function(n){var t={};function e(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var i in n)e.d(r,i,function(t){return n[t]}.bind(null,i));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="/",e(e.s=6)}([function(n,t){n.exports=require("prop-types")},function(n,t,e){n.exports=e(8)},function(n,t){n.exports=require("rax-text")},function(n,t){n.exports=require("rax-view")},function(n,t){n.exports=require("rax-image")},function(n,t){n.exports={"rax-countdown-main":{flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},"rax-countdown-item":{flexDirection:"row"},"rax-countdown-background":{position:"absolute"}}},function(n,t,e){n.exports=e(7)},function(n,t,e){"use strict";e.r(t);var r=e(1),i=e(0),o=e.n(i),u=e(2),a=e.n(u),c=e(3),s=e.n(c),f=e(4),l=e.n(f),h=e(5);function p(n,t){return p=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n},p(n,t)}var v=e.n(h).a;function d(n){return n&&"[object Function]"==={}.toString.call(n)}function m(n){var t=n.num,e=n.timeWrapStyle,i=n.timeBackground,o=n.timeBackgroundStyle,u=n.timeStyle,c=n.secondStyle,f=t.toString();t<0?f="00":t<10&&(f="0"+t);var h=f.split(""),p=h.length-1;return Object(r.createElement)(s.a,{className:"rax-countdown-item",style:Object.assign({},v["rax-countdown-item"],e)},i?Object(r.createElement)(l.a,{className:"rax-countdown-background",source:i,style:Object.assign({},v["rax-countdown-background"],o)}):null,h.map((function(n,t){return Object(r.createElement)(a.a,{key:"time_"+t,style:t===p?c:u},n)})))}var _=function(n){var t,e;function i(){for(var t,e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return(t=n.call.apply(n,[this].concat(r))||this).state={timeRemaining:0},t.timeoutId=0,t.tick=function(){var n=t.props,e=n.onComplete,r=n.onTick,i=n.interval,o=t.state.timeRemaining,u=1e3>o;t.timeoutId&&clearTimeout(t.timeoutId),u&&d(e)?e():t.timeoutId=!u&&setTimeout((function(){return t.setState({timeRemaining:o-i},(function(){return d(r)&&r(o)}))}),i)},t}e=n,(t=i).prototype=Object.create(e.prototype),t.prototype.constructor=t,p(t,e);var o=i.prototype;return o.componentWillMount=function(){var n=this.props.timeRemaining;this.setState({timeRemaining:n})},o.componentDidMount=function(){this.tick()},o.componentDidUpdate=function(){this.tick()},o.componentWillReceiveProps=function(n){n.timeRemaining!==this.props.timeRemaining&&(this.timeoutId&&clearTimeout(this.timeoutId),this.setState({timeRemaining:n.timeRemaining}))},o.componentWillUnmount=function(){this.timeoutId&&clearTimeout(this.timeoutId)},o.shouldComponentUpdate=function(n,t){return this.props.timeRemaining!==n.timeRemaining||this.state.timeRemaining!==t.timeRemaining},o.render=function(){var n=this.state.timeRemaining,t=this.props,e=t.formatFunc,i=t.timeStyle,o=t.timeBackgroundStyle,u=t.timeWrapStyle,c=t.timeBackground,f=t.secondStyle,l=t.textStyle,h=t.tpl;if(e)return e(n);for(var p=Math.floor(n/1e3),d={d:parseInt(p/3600/24),h:parseInt(p/3600)%24,m:parseInt(p/60)%60,s:parseInt(p%60)},_=new RegExp("{[d,h,m,s]}","g"),y=[],g=null;null!==(g=_.exec(h));)y.push(g.index,g.index);0!==y.length&&y.push(-1);var x=0;return Object(r.createElement)(s.a,{className:"rax-countdown-main",style:v["rax-countdown-main"]},y.map((function(n,t){if(-1===n){var e=h.slice(x);return e?Object(r.createElement)(a.a,{style:l,key:"text_"+t},e):null}var s=h[n+1];switch(s){case"d":case"h":case"m":case"s":if(t%2==0){var p=h.slice(x,n);return p?Object(r.createElement)(a.a,{style:l,key:"text_"+t},p):null}return x=n+3,Object(r.createElement)(m,{num:d[s],timeWrapStyle:u,timeBackground:c,timeBackgroundStyle:o,timeStyle:i,secondStyle:f,key:"time_"+t});default:return null}})))},i}(r.Component);_.propTypes={formatFunc:o.a.func,onTick:o.a.func,onComplete:o.a.func,tpl:o.a.string,timeRemaining:o.a.number,secondStyle:o.a.object,timeStyle:o.a.object,textStyle:o.a.object,timeWrapStyle:o.a.object,timeBackground:o.a.shape({uri:o.a.string}),timeBackgroundStyle:o.a.object,interval:o.a.number},_.defaultProps={tpl:"{d}\u5929{h}\u65f6{m}\u5206{s}\u79d2",timeRemaining:0,interval:1e3},t.default=_},function(n,t){var e={t:1,i:!1,driver:null,rootComponents:{},rootInstances:{},owner:null};function r(n,t,e,r,i){return{type:n,key:t,ref:e,props:r,_owner:i}}function i(n){return null===n}function o(n){return"function"==typeof n}function u(n){return"object"==typeof n}function a(n){return"[object Object]"===h.toString.call(n)}function c(n){return Array.isArray(n)}function s(n){return"string"==typeof n}function f(n){return"number"==typeof n}var l=function(){},h={};function p(n,t){if(c(n))for(var e=0,r=n.length;e<r;e++)p(n[e],t);else t.push(n)}function v(n){if(null==n)return n;var t=[];return p(n,t),t.length-1?t:t[0]}var d=[],m=[],_=[],y=setTimeout;function g(n){for(var t;t=n.shift();)t()}function x(n){0===d.length&&y(w),d.push(n)}function w(){g(d)}function C(n){0===m.length&&y(b),m.push(n)}function b(){g(m)}function k(n){_.push(n)}function R(n,t,r){var i,o=void 0===r?"":" got: "+function(n){return a(n)?Object.keys(n):n}(r);return Error(n+": #"+t+", "+((i=e.owner)?"check <"+i.u()+">":"no owner")+"."+o)}function S(n,t){throw R("Error",n,t)}function j(n,t){var e=R("Warn",n,t);y((function(){throw e}),0)}var D={key:!0,ref:!0};function I(n,t,i){var o,u={},a=null,s=null;if(null!=t)for(o in s=void 0===t.ref?null:t.ref,a=void 0===t.key?null:""+t.key,t)D[o]||(u[o]=t[o]);var f=arguments.length-2;if(f>0)if(1!==f||c(i)){var h=i;if(f>1){h=Array(f);for(var p=0;p<f;p++)h[p]=arguments[p+2]}u.children=v(h)}else u.children=i;if(n&&n.defaultProps){var d=n.defaultProps;for(o in d)void 0===u[o]&&(u[o]=d[o])}return null==n&&(n=l,j(0)),new r(n,a,s,u,e.owner)}function O(n,t,e){for(var r=0,i=n&&n.length;r<i;r++)n[r].call(t,e)}var W=h.hasOwnProperty;function U(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function M(n,t){if(U(n,t))return!0;if(!u(n)||i(n)||!u(t)||i(t))return!1;var e=Object.keys(n);if(e.length!==Object.keys(t).length)return!1;for(var r=0;r<e.length;r++)if(!W.call(t,e[r])||!U(n[e[r]],t[e[r]]))return!1;return!0}function E(){return e.owner&&e.owner._instance}function Z(){var n=E();if(n)return n;S(1)}function P(n,t){if(i(t)||n.length!==t.length)return!1;for(var e=0;e<n.length;e++)if(!U(n[e],t[e]))return!1;return!0}function T(n){var t=Z(),r=t.getHookID(),i=t.getHooks();i[r]||(o(n)&&(n=n()),i[r]=[n,function(n){e.i||b();var u=i[r],a=u[2];o(n)&&(n=n(a)),U(n,a)||(u[2]=n,E()===t?t.o=!0:t.h())},n]);var u=i[r];return U(u[0],u[2])||(u[0]=u[2],t.l=!0),u}function H(n,t){N(n,t)}function N(n,t,e){var r=Z(),i=r.getHookID(),o=r.getHooks();if(t=void 0===t?null:t,o[i]){var u=o[i],a=u.v,c=u.p;u.p=t,u._=c,a.current=n}else{var s=function n(t){if(!t&&e)return C((function(){return n(!0)}));var r=n.current;r&&(f.current=r(),n.current=null)},f=function n(t){if(!t&&e)return C((function(){return n(!0)}));var r=n.current;r&&(r(),n.current=null)};s.current=n,o[i]={v:s,j:f,_:t,p:t},r.didMount.push(s),r.willUnmount.push((function(){return f(!0)})),r.didUpdate.push((function(){var n=o[i],t=n.p,e=n.v;null!=t&&P(t,n._)||(f(),e())}))}}function A(n,t){var e=Z(),r=e.getHookID(),o=e.getHooks();if(t=void 0===t?null:t,o[r]){var u=o[r][1];!i(t)&&P(t,u)||(o[r]=[n(),t])}else o[r]=[n(),t];return o[r][0]}function B(n){return c(n)?n:[n]}function F(n,t){for(var e;n&&n._internal;){if(t(n)){e=n;break}n=n._internal.m}return e}var V=0;function q(n){var t;return a(n)&&null!==n&&n.type?t=s(n.type)?new e.O(n):new e.g(n):s(n)||f(n)?t=new e.k(n+""):c(n)?t=new e.I(n):(void 0===n||i(n)||!1===n||!0===n||j(2,n),t=new e.A(n)),t}function L(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n,G(n,t)}function G(n,t){return(G=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n})(n,t)}var $=function(){function n(n,t){this.props=n,this.context=t,this.refs={}}var t=n.prototype;return t.setState=function(n,t){this.updater.setState(this,n,t)},t.forceUpdate=function(n){this.updater.forceUpdate(this,n)},n}(),J=function(n){function t(t,e){var r;return(r=n.call(this,t,e)||this).C=!0,r}return L(t,n),t}($),K=1,Y=function(n){function t(){var t;return(t=n.call(this)||this).P=[],t.D=K++,t}L(t,n);var e=t.prototype;return e.S=function(){return this.U().S()},e.U=function(){return this._internal._renderedComponent},e.h=function(n){this.P=n,this.forceUpdate()},e.render=function(){return this.P},t}($),X={set:function(n,t){n._r||(n._r=t,t.D&&(e.rootInstances[t.D]=t,e.rootComponents[t.D]=t._internal))},get:function(n){return n._r},remove:function(n){var t=this.get(n);t&&(n._r=null,t.D&&(delete e.rootComponents[t.D],delete e.rootInstances[t.D]))},mount:function(n,t,r){var i=r.parent,o=r.hydrate,u=e.driver;null==t&&(t=u.createBody());var a,c={element:n,container:t,hydrate:o};if(u.beforeRender&&u.beforeRender(c),i){var s=i._internal;a=s.H(s._context)}var f=this.get(t);if(f&&f.D)return a&&(f._internal.N=a),f.h(n),u.afterRender&&u.afterRender(c),f;var l=q(I(Y)).R(t,i,a||{});return this.set(t,l),l.h(n),u.afterRender&&u.afterRender(c),l}};function z(n,t,e){var r=n?n.ref:null,i=t?t.ref:null;r!==i&&(r&&nn(n._owner,r,e),i&&Q(t._owner,i,e))}function Q(n,t,e){if(n){var r=e.S();o(t)?t(r):u(t)?t.current=r:n._instance.refs[t]=r}else j(3)}function nn(n,t,e){if(o(t))t(null);else{var r=e.S();u(t)&&t.current===r?t.current=null:n._instance.refs[t]===r&&delete n._instance.refs[t]}}function tn(n,t){var e=i(n),r=i(t);return e||r?e===r:!(!c(n)||!c(t))||(s(n)||f(n)?s(t)||f(t):u(n)&&u(t)&&n.type===t.type&&n.key===t.key)}function en(n,t,e){var r=t&&t.key,i="."+e.toString(36);if(s(r)){var o="$"+r;return void 0===n[o]?o:i}return i}function rn(n){for(var t=n;t=n.m&&n.m._internal;)if(t instanceof e.g)n=t;else{for(var r=Object.keys(t.T),i=n.V-1;i>=0;i--){var o=t.T[r[i]].W();if(!c(o))return o;if(o.length>0)return o[o.length-1]}if(!(t instanceof e.I))return null;n=t}}var on=function(){function n(n){this.Z=n}var t=n.prototype;return t.$=function(n,t,r){this._parent=n,this.m=t,this._context=r,this._mountID=e.t++},t.q=function(){this.Z=this._nativeNode=this._parent=this.m=this._context=null,this._instance&&(this._instance=this._instance._internal=null)},t.R=function(n,t,e,r){this.$(n,t,e),this.B(r);var i={};return i._internal=this,i},t.unmountComponent=function(n){this._nativeNode&&!n&&e.driver.removeChild(this._nativeNode,this._parent),this.q()},t.u=function(){var n=this.Z,t=n&&n.type;return t&&t.displayName||t&&t.name||t||n},t.B=function(n){var t=this.W(),r=this._parent;n?n(t,r):e.driver.appendChild(t,r)},t.W=function(){return null==this._nativeNode?this._nativeNode=this.F():this._nativeNode},t.S=function(){return this.W()},n}(),un=Object.assign,an=/^on[A-Z]/,cn=function(n){function t(){return n.apply(this,arguments)||this}L(t,n);var r=t.prototype;return r.R=function(n,t,e,r){this.$(n,t,e);var i=this.Z,o=i.props,u=i.type,a=o.children,c=o.append||"tree";this.G=un({},o.style);var s={type:u,props:o};return s._internal=this,this._instance=s,"tree"===c?(this.J(a,e),this.B(r)):(this.B(r),this.J(a,e)),i&&i.ref&&Q(i._owner,i.ref,this),s},r.J=function(n,t){if(null==n)return n;var e=this.W();return this.K(e,B(n),t)},r.K=function(n,t,e,r){for(var i=this.T={},o=[],u=0,a=t.length;u<a;u++){var c=t[u],s=q(c);i[en(i,c,u)]=s,s.V=u;var f=s.R(n,this._instance,e,r);o.push(f)}return o},r.L=function(n){var t=this.T;if(t){for(var e in t)t[e].unmountComponent(n);this.T=null}},r.unmountComponent=function(n){if(this._nativeNode){var t=this.Z.ref;t&&nn(this.Z._owner,t,this),X.remove(this._nativeNode),n||e.driver.removeChild(this._nativeNode,this._parent)}this.L(!0),this.G=null,this.q()},r.M=function(n,t,e,r){this.Z=t,z(n,t,this);var i=n.props,o=t.props;this.X(i,o),null==i.children||c(i.children)&&0===i.children.length?this.J(o.children,r):this.Y(o.children,r)},r.X=function(n,t){var r,i,u,a=e.driver,c=this.W();for(r in n)if("children"!==r&&null!=n[r]&&!t.hasOwnProperty(r))if("style"===r){var s=this.G;for(i in s)(u=u||{})[i]="";this.G=null}else if(an.test(r)){var f=n[r];o(f)&&a.removeEventListener(c,r.slice(2).toLowerCase(),f)}else a.removeAttribute(c,r,n[r]);for(r in t){var l=t[r],h="style"===r?this.G:null!=n?n[r]:void 0;if("children"!==r&&h!==l&&(null!=l||null!=h))if("style"===r)if(l?l=this.G=un({},l):this.G=null,null!=h){for(i in h)l&&(l[i]||0===l[i])||((u=u||{})[i]="");for(i in l)h[i]!==l[i]&&((u=u||{})[i]=l[i])}else u=l;else if(an.test(r)){var p=r.slice(2).toLowerCase();o(h)&&a.removeEventListener(c,p,h,t),o(l)&&a.addEventListener(c,p,l,t)}else null!=l?a.setAttribute(c,r,l):a.removeAttribute(c,r,n[r])}u&&a.setStyle(c,u)},r.Y=function(n,t){var r=this.T,o=e.driver;if(null!=n||null!=r){var u={};if(null!=n)for(var a=0,s=(n=B(n)).length;a<s;a++){var f=n[a],l=en(u,f,a),h=r&&r[l],p=h&&h.Z,v=h&&h._context;null!=h&&tn(p,f)?(p===f&&v===t||h.M(p,f,t,t),u[l]=h):(h&&(h.nn=!0),u[l]=q(f))}var d=this.W(),m=c(d),_=null,y=null,g=!1,x=!1,w=null,C=!(!o.removeChildren||!(i(n)||n&&!n.length)||m);if(null!=r){for(var b in r){var k=r[b],R=k.nn||!u[b];_?R&&k.unmountComponent(C):(x=R,c(y=(_=k).W())&&(g=0===y.length,y=y[0]))}(m&&0===d.length||g)&&(w=rn(this))}var S=function(n,t){for(var e=0,r=(n=B(n)).length;e<r;e++)w?o.insertAfter(n[r-1-e],w):y?o.insertBefore(n[e],y):t&&o.appendChild(n[e],t)},j=0;for(var D in u){var I=u[D],O=r&&r[D];if(O===I){var W=O.W();O.V!==j&&S(W)}else m&&(d=this._parent),I.R(d,this._instance,t,S);I.V=j++,c(w=I.W())&&(w=w[w.length-1])}x&&_.unmountComponent(C),C&&o.removeChildren(this._nativeNode),this.T=u}},r.F=function(){var n=this._instance,t=e.driver.createElement(n.type,n.props,this);return X.set(t,n),t},t}(on),sn=function(n){function t(t,e){var r;(r=n.call(this)||this).tn=!0,r.rn=t,r.un=0,r.fn=0,r.on={},r.o=!1,r.l=!1,r.en=null,r.sn={},r.didMount=[],r.didUpdate=[],r.willUnmount=[],r.state=h,t._forwardRef&&(r.cn=r._forwardRef=e);var i=t.hn;return i&&(r.shouldComponentUpdate=function(n){for(var t=!0,e=i.length-1;e>-1&&!(t=i[e](r.props,n));e--);return!t||r.cn!==r._forwardRef}),r}L(t,n);var e=t.prototype;return e.getHooks=function(){return this.on},e.getHookID=function(){return++this.un},e.useContext=function(n){var t=this,e=n._contextID,r=this.sn[e];if(!r){var i=n.an(this);if(r=this.sn[e]={ln:i},i){var o=function(n){r.vn!==n&&(t.l=!0,t.h())};i.pn(o),this.willUnmount.push((function(){return i.dn(o)}))}}return r.vn=r.ln?r.ln.getValue():n._defaultValue},e.componentWillMount=function(){this.l=!0},e.componentDidMount=function(){O(this.didMount)},e.componentWillReceiveProps=function(){this.l=!0},e.componentDidUpdate=function(){O(this.didUpdate)},e.componentWillUnmount=function(){O(this.willUnmount)},e.h=function(){this.setState(h)},e.render=function(){this.un=0,this.fn=0,this.o=!1;for(var n=this.rn(this.props,this._forwardRef?this._forwardRef:this.context);this.o;)this.fn++,this.fn>24&&S(4),this.un=0,this.o=!1,n=this.rn(this.props,this._forwardRef?this._forwardRef:this.context);return this.l&&(this.en=n,this.l=!1),this.en},t}($),fn=[];function ln(n){return n._n}function hn(n){var t=n._internal;if(t){e.i=!0;var r=t.Z,i=t._context,o=t.N||i;t.N=void 0,(ln(t)||t.xn)&&(t.M(r,r,i,o),g(_)),e.i=!1}}function pn(n,t){return t._internal._mountID-n._internal._mountID}function vn(){if(e.i)return x(vn);var n,t=fn;if(t.length>0)for(b(),fn=[],t.length>1&&(t=t.filter((function(n){return!!n._internal})).sort(pn));n=t.pop();)hn(n)}function dn(n,t){if(fn.indexOf(n)<0&&fn.push(n),t){if(fn.length>1)return;x(vn)}else vn()}function mn(n,t,e){var r=n._internal;if(r){e&&function(n,t){(function(n){return n.wn}(n)||function(n){return n.wn=[]}(n)).push(t)}(r,e);var i=r._renderedComponent;t?(n.tn&&(r.xn=!0),function(n,t){(ln(n)||function(n){return n._n=[]}(n)).push(t)}(r,t),!r.yn&&i&&dn(n,!0)):(r.xn=!0,i&&dn(n))}}var _n={setState:function(n,t,r){e.i||b(),mn(n,t,r)},forceUpdate:function(n,t){mn(n,null,t)}};function yn(n,t,e){try{return n()}catch(n){e?e(n):function(n,t){var e=F(n,(function(n){return n.componentDidCatch||n.constructor&&n.constructor.getDerivedStateFromError}));e?k((function(){var n=e._internal;n&&yn((function(){if(e.componentDidCatch&&e.componentDidCatch(t),e.constructor&&e.constructor.getDerivedStateFromError){var n=e.constructor.getDerivedStateFromError(t);e.setState(n)}}),n.m)})):y((function(){throw t}),0)}(t,n)}}function gn(n,t){k((function(){yn(n,t)}))}function xn(n,t){n&&gn((function(){O(n,t)}),t)}var wn=function(n){function t(){return n.apply(this,arguments)||this}L(t,n);var r=t.prototype;return r.R=function(n,t,r,i){this.$(n,t,r);var u,a,c=this.Z,s=c.type,f=c.ref,l=c.props,h=s.prototype,p=this.bn(r);if(yn((function(){h&&h.render?u=new s(l,p):o(s)?u=new sn(s,f):S(6,s)}),t),u){u.props=l,u.context=p,u.refs={},u.updater=_n,u._internal=this,this._instance=u;var v=u.state;void 0===v&&(u.state=v=null),u.componentWillMount&&yn((function(){u.componentWillMount()}),u),e.owner=this,u.state=this.jn(l,p);var d=this.wn;return this.wn=null,yn((function(){a=u.render()}),u),e.owner=null,this._renderedComponent=q(a),this._renderedComponent.R(this._parent,u,this.H(r),i),!c.type._forwardRef&&f&&Q(c._owner,f,this),u.componentDidMount&&gn((function(){u.componentDidMount()}),u),xn(d,u),u}},r.unmountComponent=function(n){var t=this._instance;if(t&&t.componentWillUnmount&&yn((function(){t.componentWillUnmount()}),t),null!=this._renderedComponent){var e=this.Z,r=e.ref;!e.type._forwardRef&&r&&nn(e._owner,r,this),this._renderedComponent.unmountComponent(n),this._renderedComponent=null}this._n=null,this.xn=!1,this.q()},r.bn=function(n){var t={},e=this.Z.type.contextTypes;if(e)for(var r in e)t[r]=n[r];return t},r.H=function(n){var t=this._instance,e=t.getChildContext&&t.getChildContext();return e?un({},n,e):n},r.jn=function(n,t){var e=this._instance,r=this._n;if(!r)return e.state;this._n=null;for(var i=un({},e.state),u=0;u<r.length;u++){var a=r[u];un(i,o(a)?a.call(e,i,n,t):a)}return i},r.M=function(n,t,e,r){var i=this,o=this._instance;o&&yn((function(){var e,u,a;i._context===r?u=o.context:(u=i.bn(r),e=!0),a=t.props,n!==t&&(e=!0),e&&o.componentWillReceiveProps&&(i.yn=!0,o.componentWillReceiveProps(a,u),i.yn=!1),i.Z.type._forwardRef?(o.cn=n.ref,o._forwardRef=t.ref):z(n,t,i);var c=!0,s=o.props,f=o.state,l=i.jn(a,u),h=i.wn;if(i.wn=null,i.xn||(o.shouldComponentUpdate?c=o.shouldComponentUpdate(a,l,u):o.C&&(c=!M(s,a)||!M(f,l))),c){i.xn=!1;var p=o.context;o.componentWillUpdate&&o.componentWillUpdate(a,l,u),i.Z=t,i._context=r,o.props=a,o.state=l,o.context=u,i.mn(r),o.componentDidUpdate&&gn((function(){o.componentDidUpdate(s,f,p)}),o)}else i.Z=t,i._context=r,o.props=a,o.state=l,o.context=u;xn(h,o)}),o)},r.mn=function(n){var t,r=this._renderedComponent,i=r.Z,o=this._instance;if(e.owner=this,t=o.render(),e.owner=null,tn(i,t)){var u=r._context,a=this.H(n);i===t&&u===a||r.M(i,t,u,a)}else{var s=null,f=r.W();c(f)&&0===f.length&&null==o.D&&(s=rn(r)),r.unmountComponent(!0),this._renderedComponent=q(t),this._renderedComponent.R(this._parent,o,this.H(n),(function(n,t){var r=e.driver;f=B(f),n=B(n);for(var i=0;i<n.length;i++){var o=n[i];f[i]?r.replaceChild(o,f[i]):s?r.insertAfter(o,s):r.appendChild(o,t),s=o}for(var u=n.length;u<f.length;u++)r.removeChild(f[u])}))}},r.W=function(){var n=this._renderedComponent;if(n)return n.W()},r.S=function(){var n=this._instance;return n.tn?null:n},t}(on),Cn=function(n){function t(){return n.apply(this,arguments)||this}L(t,n);var r=t.prototype;return r.M=function(n,t){n!==(t=""+t)&&(this.Z=t,e.driver.updateText(this.W(),t))},r.F=function(){return e.driver.createText(this.Z,this)},t}(on),bn=function(n){function t(){return n.apply(this,arguments)||this}L(t,n);var r=t.prototype;return r.R=function(n,t,r,i){this.$(n,t,r);var o=this._instance={};o._internal=this;var u=[];if(this.K(this._parent,this.Z,r,(function(n){n=B(n);for(var t=0;t<n.length;t++)u.push(n[t])})),i)i(u,n);else for(var a=0;a<u.length;a++)e.driver.appendChild(u[a],n);return o},r.unmountComponent=function(n){if(!n)for(var t=this.W(),r=0,i=t.length;r<i;r++)e.driver.removeChild(t[r]);this.L(!0),this.q()},r.M=function(n,t,e,r){this.Z=t,this.Y(this.Z,r)},r.W=function(){var n=this.T||{};return[].concat.apply([],Object.keys(n).map((function(t){return n[t].W()})))},t}(cn),kn=function(n){function t(){return n.apply(this,arguments)||this}L(t,n);var r=t.prototype;return r.F=function(){return e.driver.createEmpty(this)},r.M=function(){},t}(on);e.A=kn,e.O=cn,e.k=Cn,e.I=bn,e.g=wn;var Rn={Host:e,Instance:X,Element:r,flattenChildren:v};t.Component=$,t.Fragment=function(n){return n.children},t.PureComponent=J,t.createContext=function(n){var t="_c"+V++;function e(n){return F(n,(function(n){return n.On===t}))}return{Provider:function(){function e(){this.On=t,this.gn=[]}var r=e.prototype;return r.pn=function(n){this.gn.push(n)},r.dn=function(n){this.gn=this.gn.filter((function(t){return t!==n}))},r._getChildContext=function(){var n;return(n={})[t]=this,n},r.getValue=function(){return void 0!==this.props.value?this.props.value:n},r.componentDidUpdate=function(n){this.props.value!==n.value&&O(this.gn,null,this.getValue())},r.render=function(){return this.props.children},e}(),Consumer:function(r,i){var u=this,a=T((function(){return i[t]||e(u)}))[0],c=a?a.getValue():n,s=T(c),f=s[1];if(c===s[0]){H((function(){if(a)return a.pn(f),function(){a.dn(f)}}),[]);var l=B(r.children)[0];return o(l)?l(c):void 0}f(c)},_contextID:t,_defaultValue:n,an:e}},t.createElement=I,t.createRef=function(){return{current:null}},t.forwardRef=function(n){return n._forwardRef=!0,n},t.memo=function(n,t){return t=t||M,n.hn?n.hn.push(t):n.hn=[t],n},t.render=function(n,t,r,i){o(r)&&(i=r,r=null),(e.driver=(r=r||h).driver||e.driver)||S(5);var u=X.mount(n,t,r).S();return i&&i.call(u),u},t.shared=Rn,t.useCallback=function(n,t){return A((function(){return n}),t)},t.useContext=function(n){return Z().useContext(n)},t.useEffect=function(n,t){N(n,t,!0)},t.useImperativeHandle=function(n,t,e){H((function(){return o(n)?(n(t()),function(){return n(null)}):null!=n?(n.current=t(),function(){n.current=null}):void 0}),c(e)?e.concat([n]):null)},t.useLayoutEffect=H,t.useMemo=A,t.useReducer=function(n,t,r){var i=Z(),u=i.getHookID(),a=i.getHooks(),c=a[u];if(!c){var s=o(r)?r(t):t;return a[u]=[s,function(n){e.i||b();var t=a[u][2];if(E()===i)t.kn.push(n),i.o=!0;else{var r=t.In,o=(0,t.An)(r,n);if(U(o,r))return;t.In=o,t.kn.push(n),i.h()}},{kn:[],An:n,In:s}]}var f=c[2],l=c[0];if(i.fn>0)for(var h=0;h<f.kn.length;h++)l=n(l,f.kn[h]);else l=f.In;return U(l,c[0])||(c[0]=l,i.l=!0),f.An=n,f.In=l,f.kn.length=0,a[u]},t.useRef=function(n){var t=Z(),e=t.getHookID(),r=t.getHooks();return r[e]||(r[e]={current:n}),r[e]},t.useState=T,t.version="1.2.2"}]); |
@@ -1,1 +0,1 @@ | ||
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=5)}([function(t,e){t.exports=require("prop-types")},function(t,e){t.exports=require("rax")},function(t,e){t.exports=require("rax-text")},function(t,e){t.exports=require("rax-view")},function(t,e){t.exports=require("rax-image")},function(t,e,n){t.exports=n(6)},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n(0),o=n.n(i),a=n(2),u=n.n(a),c=n(3),m=n.n(c),l=n(4),s=n.n(l);n(7);function p(t,e){return(p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){return t&&"[object Function]"==={}.toString.call(t)}function d(t){var e=t.num,n=t.timeWrapStyle,i=t.timeBackground,o=t.timeBackgroundStyle,a=t.timeStyle,c=t.secondStyle,l=e.toString();e<0?l="00":e<10&&(l="0"+e);var p=l.split(""),f=p.length-1;return Object(r.createElement)(m.a,{className:"rax-countdown-item",style:n},i?Object(r.createElement)(s.a,{className:"rax-countdown-background",source:i,style:o}):null,p.map((function(t,e){return Object(r.createElement)(u.a,{key:"time_"+e,style:e===f?c:a},t)})))}var y=function(t){var e,n;function i(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).state={timeRemaining:0},e.timeoutId=0,e.tick=function(){var t=e.props,n=t.onComplete,r=t.onTick,i=t.interval,o=e.state.timeRemaining,a=1e3>o;e.timeoutId&&clearTimeout(e.timeoutId),a&&f(n)?n():e.timeoutId=!a&&setTimeout((function(){return e.setState({timeRemaining:o-i},(function(){return f(r)&&r(o)}))}),i)},e}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,p(e,n);var o=i.prototype;return o.componentWillMount=function(){var t=this.props.timeRemaining;this.setState({timeRemaining:t})},o.componentDidMount=function(){this.tick()},o.componentDidUpdate=function(){this.tick()},o.componentWillReceiveProps=function(t){t.timeRemaining!==this.props.timeRemaining&&(this.timeoutId&&clearTimeout(this.timeoutId),this.setState({timeRemaining:t.timeRemaining}))},o.componentWillUnmount=function(){this.timeoutId&&clearTimeout(this.timeoutId)},o.shouldComponentUpdate=function(t,e){return this.props.timeRemaining!==t.timeRemaining||this.state.timeRemaining!==e.timeRemaining},o.render=function(){var t=this.state.timeRemaining,e=this.props,n=e.formatFunc,i=e.timeStyle,o=e.timeBackgroundStyle,a=e.timeWrapStyle,c=e.timeBackground,l=e.secondStyle,s=e.textStyle,p=e.tpl;if(n)return n(t);for(var f=Math.floor(t/1e3),y={d:parseInt(f/3600/24),h:parseInt(f/3600)%24,m:parseInt(f/60)%60,s:parseInt(f%60)},g=new RegExp("{[d,h,m,s]}","g"),b=[],h=null;null!==(h=g.exec(p));)b.push(h.index,h.index);0!==b.length&&b.push(-1);var v=0;return Object(r.createElement)(m.a,{className:"rax-countdown-main"},b.map((function(t,e){if(-1===t){var n=p.slice(v);return n?Object(r.createElement)(u.a,{style:s,key:"text_"+e},n):null}var m=p[t+1];switch(m){case"d":case"h":case"m":case"s":if(e%2==0){var f=p.slice(v,t);return f?Object(r.createElement)(u.a,{style:s,key:"text_"+e},f):null}return v=t+3,Object(r.createElement)(d,{num:y[m],timeWrapStyle:a,timeBackground:c,timeBackgroundStyle:o,timeStyle:i,secondStyle:l,key:"time_"+e});default:return null}})))},i}(r.Component);y.propTypes={formatFunc:o.a.func,onTick:o.a.func,onComplete:o.a.func,tpl:o.a.string,timeRemaining:o.a.number,secondStyle:o.a.object,timeStyle:o.a.object,textStyle:o.a.object,timeWrapStyle:o.a.object,timeBackground:o.a.shape({uri:o.a.string}),timeBackgroundStyle:o.a.object,interval:o.a.number},y.defaultProps={tpl:"{d}\u5929{h}\u65f6{m}\u5206{s}\u79d2",timeRemaining:0,interval:1e3},e.default=y},function(t,e,n){}]); | ||
!function(n){var t={};function e(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var i in n)e.d(r,i,function(t){return n[t]}.bind(null,i));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="/",e(e.s=5)}([function(n,t){n.exports=require("prop-types")},function(n,t,e){n.exports=e(7)},function(n,t){n.exports=require("rax-text")},function(n,t){n.exports=require("rax-view")},function(n,t){n.exports=require("rax-image")},function(n,t,e){n.exports=e(6)},function(n,t,e){"use strict";e.r(t);var r=e(1),i=e(0),o=e.n(i),u=e(2),a=e.n(u),c=e(3),s=e.n(c),f=e(4),l=e.n(f);e(8);function h(n,t){return h=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n},h(n,t)}function p(n){return n&&"[object Function]"==={}.toString.call(n)}function v(n){var t=n.num,e=n.timeWrapStyle,i=n.timeBackground,o=n.timeBackgroundStyle,u=n.timeStyle,c=n.secondStyle,f=t.toString();t<0?f="00":t<10&&(f="0"+t);var h=f.split(""),p=h.length-1;return Object(r.createElement)(s.a,{className:"rax-countdown-item",style:e},i?Object(r.createElement)(l.a,{className:"rax-countdown-background",source:i,style:o}):null,h.map((function(n,t){return Object(r.createElement)(a.a,{key:"time_"+t,style:t===p?c:u},n)})))}var d=function(n){var t,e;function i(){for(var t,e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return(t=n.call.apply(n,[this].concat(r))||this).state={timeRemaining:0},t.timeoutId=0,t.tick=function(){var n=t.props,e=n.onComplete,r=n.onTick,i=n.interval,o=t.state.timeRemaining,u=1e3>o;t.timeoutId&&clearTimeout(t.timeoutId),u&&p(e)?e():t.timeoutId=!u&&setTimeout((function(){return t.setState({timeRemaining:o-i},(function(){return p(r)&&r(o)}))}),i)},t}e=n,(t=i).prototype=Object.create(e.prototype),t.prototype.constructor=t,h(t,e);var o=i.prototype;return o.componentWillMount=function(){var n=this.props.timeRemaining;this.setState({timeRemaining:n})},o.componentDidMount=function(){this.tick()},o.componentDidUpdate=function(){this.tick()},o.componentWillReceiveProps=function(n){n.timeRemaining!==this.props.timeRemaining&&(this.timeoutId&&clearTimeout(this.timeoutId),this.setState({timeRemaining:n.timeRemaining}))},o.componentWillUnmount=function(){this.timeoutId&&clearTimeout(this.timeoutId)},o.shouldComponentUpdate=function(n,t){return this.props.timeRemaining!==n.timeRemaining||this.state.timeRemaining!==t.timeRemaining},o.render=function(){var n=this.state.timeRemaining,t=this.props,e=t.formatFunc,i=t.timeStyle,o=t.timeBackgroundStyle,u=t.timeWrapStyle,c=t.timeBackground,f=t.secondStyle,l=t.textStyle,h=t.tpl;if(e)return e(n);for(var p=Math.floor(n/1e3),d={d:parseInt(p/3600/24),h:parseInt(p/3600)%24,m:parseInt(p/60)%60,s:parseInt(p%60)},m=new RegExp("{[d,h,m,s]}","g"),_=[],y=null;null!==(y=m.exec(h));)_.push(y.index,y.index);0!==_.length&&_.push(-1);var g=0;return Object(r.createElement)(s.a,{className:"rax-countdown-main"},_.map((function(n,t){if(-1===n){var e=h.slice(g);return e?Object(r.createElement)(a.a,{style:l,key:"text_"+t},e):null}var s=h[n+1];switch(s){case"d":case"h":case"m":case"s":if(t%2==0){var p=h.slice(g,n);return p?Object(r.createElement)(a.a,{style:l,key:"text_"+t},p):null}return g=n+3,Object(r.createElement)(v,{num:d[s],timeWrapStyle:u,timeBackground:c,timeBackgroundStyle:o,timeStyle:i,secondStyle:f,key:"time_"+t});default:return null}})))},i}(r.Component);d.propTypes={formatFunc:o.a.func,onTick:o.a.func,onComplete:o.a.func,tpl:o.a.string,timeRemaining:o.a.number,secondStyle:o.a.object,timeStyle:o.a.object,textStyle:o.a.object,timeWrapStyle:o.a.object,timeBackground:o.a.shape({uri:o.a.string}),timeBackgroundStyle:o.a.object,interval:o.a.number},d.defaultProps={tpl:"{d}\u5929{h}\u65f6{m}\u5206{s}\u79d2",timeRemaining:0,interval:1e3},t.default=d},function(n,t){var e={t:1,i:!1,driver:null,rootComponents:{},rootInstances:{},owner:null};function r(n,t,e,r,i){return{type:n,key:t,ref:e,props:r,_owner:i}}function i(n){return null===n}function o(n){return"function"==typeof n}function u(n){return"object"==typeof n}function a(n){return"[object Object]"===h.toString.call(n)}function c(n){return Array.isArray(n)}function s(n){return"string"==typeof n}function f(n){return"number"==typeof n}var l=function(){},h={};function p(n,t){if(c(n))for(var e=0,r=n.length;e<r;e++)p(n[e],t);else t.push(n)}function v(n){if(null==n)return n;var t=[];return p(n,t),t.length-1?t:t[0]}var d=[],m=[],_=[],y=setTimeout;function g(n){for(var t;t=n.shift();)t()}function w(n){0===d.length&&y(C),d.push(n)}function C(){g(d)}function x(n){0===m.length&&y(b),m.push(n)}function b(){g(m)}function k(n){_.push(n)}function R(n,t,r){var i,o=void 0===r?"":" got: "+function(n){return a(n)?Object.keys(n):n}(r);return Error(n+": #"+t+", "+((i=e.owner)?"check <"+i.u()+">":"no owner")+"."+o)}function S(n,t){throw R("Error",n,t)}function j(n,t){var e=R("Warn",n,t);y((function(){throw e}),0)}var I={key:!0,ref:!0};function W(n,t,i){var o,u={},a=null,s=null;if(null!=t)for(o in s=void 0===t.ref?null:t.ref,a=void 0===t.key?null:""+t.key,t)I[o]||(u[o]=t[o]);var f=arguments.length-2;if(f>0)if(1!==f||c(i)){var h=i;if(f>1){h=Array(f);for(var p=0;p<f;p++)h[p]=arguments[p+2]}u.children=v(h)}else u.children=i;if(n&&n.defaultProps){var d=n.defaultProps;for(o in d)void 0===u[o]&&(u[o]=d[o])}return null==n&&(n=l,j(0)),new r(n,a,s,u,e.owner)}function D(n,t,e){for(var r=0,i=n&&n.length;r<i;r++)n[r].call(t,e)}var O=h.hasOwnProperty;function U(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function M(n,t){if(U(n,t))return!0;if(!u(n)||i(n)||!u(t)||i(t))return!1;var e=Object.keys(n);if(e.length!==Object.keys(t).length)return!1;for(var r=0;r<e.length;r++)if(!O.call(t,e[r])||!U(n[e[r]],t[e[r]]))return!1;return!0}function E(){return e.owner&&e.owner._instance}function Z(){var n=E();if(n)return n;S(1)}function P(n,t){if(i(t)||n.length!==t.length)return!1;for(var e=0;e<n.length;e++)if(!U(n[e],t[e]))return!1;return!0}function T(n){var t=Z(),r=t.getHookID(),i=t.getHooks();i[r]||(o(n)&&(n=n()),i[r]=[n,function(n){e.i||b();var u=i[r],a=u[2];o(n)&&(n=n(a)),U(n,a)||(u[2]=n,E()===t?t.o=!0:t.h())},n]);var u=i[r];return U(u[0],u[2])||(u[0]=u[2],t.l=!0),u}function H(n,t){N(n,t)}function N(n,t,e){var r=Z(),i=r.getHookID(),o=r.getHooks();if(t=void 0===t?null:t,o[i]){var u=o[i],a=u.v,c=u.p;u.p=t,u._=c,a.current=n}else{var s=function n(t){if(!t&&e)return x((function(){return n(!0)}));var r=n.current;r&&(f.current=r(),n.current=null)},f=function n(t){if(!t&&e)return x((function(){return n(!0)}));var r=n.current;r&&(r(),n.current=null)};s.current=n,o[i]={v:s,j:f,_:t,p:t},r.didMount.push(s),r.willUnmount.push((function(){return f(!0)})),r.didUpdate.push((function(){var n=o[i],t=n.p,e=n.v;null!=t&&P(t,n._)||(f(),e())}))}}function A(n,t){var e=Z(),r=e.getHookID(),o=e.getHooks();if(t=void 0===t?null:t,o[r]){var u=o[r][1];!i(t)&&P(t,u)||(o[r]=[n(),t])}else o[r]=[n(),t];return o[r][0]}function B(n){return c(n)?n:[n]}function F(n,t){for(var e;n&&n._internal;){if(t(n)){e=n;break}n=n._internal.m}return e}var V=0;function q(n){var t;return a(n)&&null!==n&&n.type?t=s(n.type)?new e.O(n):new e.g(n):s(n)||f(n)?t=new e.k(n+""):c(n)?t=new e.I(n):(void 0===n||i(n)||!1===n||!0===n||j(2,n),t=new e.A(n)),t}function L(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n,G(n,t)}function G(n,t){return(G=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n})(n,t)}var $=function(){function n(n,t){this.props=n,this.context=t,this.refs={}}var t=n.prototype;return t.setState=function(n,t){this.updater.setState(this,n,t)},t.forceUpdate=function(n){this.updater.forceUpdate(this,n)},n}(),J=function(n){function t(t,e){var r;return(r=n.call(this,t,e)||this).C=!0,r}return L(t,n),t}($),K=1,Y=function(n){function t(){var t;return(t=n.call(this)||this).P=[],t.D=K++,t}L(t,n);var e=t.prototype;return e.S=function(){return this.U().S()},e.U=function(){return this._internal._renderedComponent},e.h=function(n){this.P=n,this.forceUpdate()},e.render=function(){return this.P},t}($),X={set:function(n,t){n._r||(n._r=t,t.D&&(e.rootInstances[t.D]=t,e.rootComponents[t.D]=t._internal))},get:function(n){return n._r},remove:function(n){var t=this.get(n);t&&(n._r=null,t.D&&(delete e.rootComponents[t.D],delete e.rootInstances[t.D]))},mount:function(n,t,r){var i=r.parent,o=r.hydrate,u=e.driver;null==t&&(t=u.createBody());var a,c={element:n,container:t,hydrate:o};if(u.beforeRender&&u.beforeRender(c),i){var s=i._internal;a=s.H(s._context)}var f=this.get(t);if(f&&f.D)return a&&(f._internal.N=a),f.h(n),u.afterRender&&u.afterRender(c),f;var l=q(W(Y)).R(t,i,a||{});return this.set(t,l),l.h(n),u.afterRender&&u.afterRender(c),l}};function z(n,t,e){var r=n?n.ref:null,i=t?t.ref:null;r!==i&&(r&&nn(n._owner,r,e),i&&Q(t._owner,i,e))}function Q(n,t,e){if(n){var r=e.S();o(t)?t(r):u(t)?t.current=r:n._instance.refs[t]=r}else j(3)}function nn(n,t,e){if(o(t))t(null);else{var r=e.S();u(t)&&t.current===r?t.current=null:n._instance.refs[t]===r&&delete n._instance.refs[t]}}function tn(n,t){var e=i(n),r=i(t);return e||r?e===r:!(!c(n)||!c(t))||(s(n)||f(n)?s(t)||f(t):u(n)&&u(t)&&n.type===t.type&&n.key===t.key)}function en(n,t,e){var r=t&&t.key,i="."+e.toString(36);if(s(r)){var o="$"+r;return void 0===n[o]?o:i}return i}function rn(n){for(var t=n;t=n.m&&n.m._internal;)if(t instanceof e.g)n=t;else{for(var r=Object.keys(t.T),i=n.V-1;i>=0;i--){var o=t.T[r[i]].W();if(!c(o))return o;if(o.length>0)return o[o.length-1]}if(!(t instanceof e.I))return null;n=t}}var on=function(){function n(n){this.Z=n}var t=n.prototype;return t.$=function(n,t,r){this._parent=n,this.m=t,this._context=r,this._mountID=e.t++},t.q=function(){this.Z=this._nativeNode=this._parent=this.m=this._context=null,this._instance&&(this._instance=this._instance._internal=null)},t.R=function(n,t,e,r){this.$(n,t,e),this.B(r);var i={};return i._internal=this,i},t.unmountComponent=function(n){this._nativeNode&&!n&&e.driver.removeChild(this._nativeNode,this._parent),this.q()},t.u=function(){var n=this.Z,t=n&&n.type;return t&&t.displayName||t&&t.name||t||n},t.B=function(n){var t=this.W(),r=this._parent;n?n(t,r):e.driver.appendChild(t,r)},t.W=function(){return null==this._nativeNode?this._nativeNode=this.F():this._nativeNode},t.S=function(){return this.W()},n}(),un=Object.assign,an=/^on[A-Z]/,cn=function(n){function t(){return n.apply(this,arguments)||this}L(t,n);var r=t.prototype;return r.R=function(n,t,e,r){this.$(n,t,e);var i=this.Z,o=i.props,u=i.type,a=o.children,c=o.append||"tree";this.G=un({},o.style);var s={type:u,props:o};return s._internal=this,this._instance=s,"tree"===c?(this.J(a,e),this.B(r)):(this.B(r),this.J(a,e)),i&&i.ref&&Q(i._owner,i.ref,this),s},r.J=function(n,t){if(null==n)return n;var e=this.W();return this.K(e,B(n),t)},r.K=function(n,t,e,r){for(var i=this.T={},o=[],u=0,a=t.length;u<a;u++){var c=t[u],s=q(c);i[en(i,c,u)]=s,s.V=u;var f=s.R(n,this._instance,e,r);o.push(f)}return o},r.L=function(n){var t=this.T;if(t){for(var e in t)t[e].unmountComponent(n);this.T=null}},r.unmountComponent=function(n){if(this._nativeNode){var t=this.Z.ref;t&&nn(this.Z._owner,t,this),X.remove(this._nativeNode),n||e.driver.removeChild(this._nativeNode,this._parent)}this.L(!0),this.G=null,this.q()},r.M=function(n,t,e,r){this.Z=t,z(n,t,this);var i=n.props,o=t.props;this.X(i,o),null==i.children||c(i.children)&&0===i.children.length?this.J(o.children,r):this.Y(o.children,r)},r.X=function(n,t){var r,i,u,a=e.driver,c=this.W();for(r in n)if("children"!==r&&null!=n[r]&&!t.hasOwnProperty(r))if("style"===r){var s=this.G;for(i in s)(u=u||{})[i]="";this.G=null}else if(an.test(r)){var f=n[r];o(f)&&a.removeEventListener(c,r.slice(2).toLowerCase(),f)}else a.removeAttribute(c,r,n[r]);for(r in t){var l=t[r],h="style"===r?this.G:null!=n?n[r]:void 0;if("children"!==r&&h!==l&&(null!=l||null!=h))if("style"===r)if(l?l=this.G=un({},l):this.G=null,null!=h){for(i in h)l&&(l[i]||0===l[i])||((u=u||{})[i]="");for(i in l)h[i]!==l[i]&&((u=u||{})[i]=l[i])}else u=l;else if(an.test(r)){var p=r.slice(2).toLowerCase();o(h)&&a.removeEventListener(c,p,h,t),o(l)&&a.addEventListener(c,p,l,t)}else null!=l?a.setAttribute(c,r,l):a.removeAttribute(c,r,n[r])}u&&a.setStyle(c,u)},r.Y=function(n,t){var r=this.T,o=e.driver;if(null!=n||null!=r){var u={};if(null!=n)for(var a=0,s=(n=B(n)).length;a<s;a++){var f=n[a],l=en(u,f,a),h=r&&r[l],p=h&&h.Z,v=h&&h._context;null!=h&&tn(p,f)?(p===f&&v===t||h.M(p,f,t,t),u[l]=h):(h&&(h.nn=!0),u[l]=q(f))}var d=this.W(),m=c(d),_=null,y=null,g=!1,w=!1,C=null,x=!(!o.removeChildren||!(i(n)||n&&!n.length)||m);if(null!=r){for(var b in r){var k=r[b],R=k.nn||!u[b];_?R&&k.unmountComponent(x):(w=R,c(y=(_=k).W())&&(g=0===y.length,y=y[0]))}(m&&0===d.length||g)&&(C=rn(this))}var S=function(n,t){for(var e=0,r=(n=B(n)).length;e<r;e++)C?o.insertAfter(n[r-1-e],C):y?o.insertBefore(n[e],y):t&&o.appendChild(n[e],t)},j=0;for(var I in u){var W=u[I],D=r&&r[I];if(D===W){var O=D.W();D.V!==j&&S(O)}else m&&(d=this._parent),W.R(d,this._instance,t,S);W.V=j++,c(C=W.W())&&(C=C[C.length-1])}w&&_.unmountComponent(x),x&&o.removeChildren(this._nativeNode),this.T=u}},r.F=function(){var n=this._instance,t=e.driver.createElement(n.type,n.props,this);return X.set(t,n),t},t}(on),sn=function(n){function t(t,e){var r;(r=n.call(this)||this).tn=!0,r.rn=t,r.un=0,r.fn=0,r.on={},r.o=!1,r.l=!1,r.en=null,r.sn={},r.didMount=[],r.didUpdate=[],r.willUnmount=[],r.state=h,t._forwardRef&&(r.cn=r._forwardRef=e);var i=t.hn;return i&&(r.shouldComponentUpdate=function(n){for(var t=!0,e=i.length-1;e>-1&&!(t=i[e](r.props,n));e--);return!t||r.cn!==r._forwardRef}),r}L(t,n);var e=t.prototype;return e.getHooks=function(){return this.on},e.getHookID=function(){return++this.un},e.useContext=function(n){var t=this,e=n._contextID,r=this.sn[e];if(!r){var i=n.an(this);if(r=this.sn[e]={ln:i},i){var o=function(n){r.vn!==n&&(t.l=!0,t.h())};i.pn(o),this.willUnmount.push((function(){return i.dn(o)}))}}return r.vn=r.ln?r.ln.getValue():n._defaultValue},e.componentWillMount=function(){this.l=!0},e.componentDidMount=function(){D(this.didMount)},e.componentWillReceiveProps=function(){this.l=!0},e.componentDidUpdate=function(){D(this.didUpdate)},e.componentWillUnmount=function(){D(this.willUnmount)},e.h=function(){this.setState(h)},e.render=function(){this.un=0,this.fn=0,this.o=!1;for(var n=this.rn(this.props,this._forwardRef?this._forwardRef:this.context);this.o;)this.fn++,this.fn>24&&S(4),this.un=0,this.o=!1,n=this.rn(this.props,this._forwardRef?this._forwardRef:this.context);return this.l&&(this.en=n,this.l=!1),this.en},t}($),fn=[];function ln(n){return n._n}function hn(n){var t=n._internal;if(t){e.i=!0;var r=t.Z,i=t._context,o=t.N||i;t.N=void 0,(ln(t)||t.xn)&&(t.M(r,r,i,o),g(_)),e.i=!1}}function pn(n,t){return t._internal._mountID-n._internal._mountID}function vn(){if(e.i)return w(vn);var n,t=fn;if(t.length>0)for(b(),fn=[],t.length>1&&(t=t.filter((function(n){return!!n._internal})).sort(pn));n=t.pop();)hn(n)}function dn(n,t){if(fn.indexOf(n)<0&&fn.push(n),t){if(fn.length>1)return;w(vn)}else vn()}function mn(n,t,e){var r=n._internal;if(r){e&&function(n,t){(function(n){return n.wn}(n)||function(n){return n.wn=[]}(n)).push(t)}(r,e);var i=r._renderedComponent;t?(n.tn&&(r.xn=!0),function(n,t){(ln(n)||function(n){return n._n=[]}(n)).push(t)}(r,t),!r.yn&&i&&dn(n,!0)):(r.xn=!0,i&&dn(n))}}var _n={setState:function(n,t,r){e.i||b(),mn(n,t,r)},forceUpdate:function(n,t){mn(n,null,t)}};function yn(n,t,e){try{return n()}catch(n){e?e(n):function(n,t){var e=F(n,(function(n){return n.componentDidCatch||n.constructor&&n.constructor.getDerivedStateFromError}));e?k((function(){var n=e._internal;n&&yn((function(){if(e.componentDidCatch&&e.componentDidCatch(t),e.constructor&&e.constructor.getDerivedStateFromError){var n=e.constructor.getDerivedStateFromError(t);e.setState(n)}}),n.m)})):y((function(){throw t}),0)}(t,n)}}function gn(n,t){k((function(){yn(n,t)}))}function wn(n,t){n&&gn((function(){D(n,t)}),t)}var Cn=function(n){function t(){return n.apply(this,arguments)||this}L(t,n);var r=t.prototype;return r.R=function(n,t,r,i){this.$(n,t,r);var u,a,c=this.Z,s=c.type,f=c.ref,l=c.props,h=s.prototype,p=this.bn(r);if(yn((function(){h&&h.render?u=new s(l,p):o(s)?u=new sn(s,f):S(6,s)}),t),u){u.props=l,u.context=p,u.refs={},u.updater=_n,u._internal=this,this._instance=u;var v=u.state;void 0===v&&(u.state=v=null),u.componentWillMount&&yn((function(){u.componentWillMount()}),u),e.owner=this,u.state=this.jn(l,p);var d=this.wn;return this.wn=null,yn((function(){a=u.render()}),u),e.owner=null,this._renderedComponent=q(a),this._renderedComponent.R(this._parent,u,this.H(r),i),!c.type._forwardRef&&f&&Q(c._owner,f,this),u.componentDidMount&&gn((function(){u.componentDidMount()}),u),wn(d,u),u}},r.unmountComponent=function(n){var t=this._instance;if(t&&t.componentWillUnmount&&yn((function(){t.componentWillUnmount()}),t),null!=this._renderedComponent){var e=this.Z,r=e.ref;!e.type._forwardRef&&r&&nn(e._owner,r,this),this._renderedComponent.unmountComponent(n),this._renderedComponent=null}this._n=null,this.xn=!1,this.q()},r.bn=function(n){var t={},e=this.Z.type.contextTypes;if(e)for(var r in e)t[r]=n[r];return t},r.H=function(n){var t=this._instance,e=t.getChildContext&&t.getChildContext();return e?un({},n,e):n},r.jn=function(n,t){var e=this._instance,r=this._n;if(!r)return e.state;this._n=null;for(var i=un({},e.state),u=0;u<r.length;u++){var a=r[u];un(i,o(a)?a.call(e,i,n,t):a)}return i},r.M=function(n,t,e,r){var i=this,o=this._instance;o&&yn((function(){var e,u,a;i._context===r?u=o.context:(u=i.bn(r),e=!0),a=t.props,n!==t&&(e=!0),e&&o.componentWillReceiveProps&&(i.yn=!0,o.componentWillReceiveProps(a,u),i.yn=!1),i.Z.type._forwardRef?(o.cn=n.ref,o._forwardRef=t.ref):z(n,t,i);var c=!0,s=o.props,f=o.state,l=i.jn(a,u),h=i.wn;if(i.wn=null,i.xn||(o.shouldComponentUpdate?c=o.shouldComponentUpdate(a,l,u):o.C&&(c=!M(s,a)||!M(f,l))),c){i.xn=!1;var p=o.context;o.componentWillUpdate&&o.componentWillUpdate(a,l,u),i.Z=t,i._context=r,o.props=a,o.state=l,o.context=u,i.mn(r),o.componentDidUpdate&&gn((function(){o.componentDidUpdate(s,f,p)}),o)}else i.Z=t,i._context=r,o.props=a,o.state=l,o.context=u;wn(h,o)}),o)},r.mn=function(n){var t,r=this._renderedComponent,i=r.Z,o=this._instance;if(e.owner=this,t=o.render(),e.owner=null,tn(i,t)){var u=r._context,a=this.H(n);i===t&&u===a||r.M(i,t,u,a)}else{var s=null,f=r.W();c(f)&&0===f.length&&null==o.D&&(s=rn(r)),r.unmountComponent(!0),this._renderedComponent=q(t),this._renderedComponent.R(this._parent,o,this.H(n),(function(n,t){var r=e.driver;f=B(f),n=B(n);for(var i=0;i<n.length;i++){var o=n[i];f[i]?r.replaceChild(o,f[i]):s?r.insertAfter(o,s):r.appendChild(o,t),s=o}for(var u=n.length;u<f.length;u++)r.removeChild(f[u])}))}},r.W=function(){var n=this._renderedComponent;if(n)return n.W()},r.S=function(){var n=this._instance;return n.tn?null:n},t}(on),xn=function(n){function t(){return n.apply(this,arguments)||this}L(t,n);var r=t.prototype;return r.M=function(n,t){n!==(t=""+t)&&(this.Z=t,e.driver.updateText(this.W(),t))},r.F=function(){return e.driver.createText(this.Z,this)},t}(on),bn=function(n){function t(){return n.apply(this,arguments)||this}L(t,n);var r=t.prototype;return r.R=function(n,t,r,i){this.$(n,t,r);var o=this._instance={};o._internal=this;var u=[];if(this.K(this._parent,this.Z,r,(function(n){n=B(n);for(var t=0;t<n.length;t++)u.push(n[t])})),i)i(u,n);else for(var a=0;a<u.length;a++)e.driver.appendChild(u[a],n);return o},r.unmountComponent=function(n){if(!n)for(var t=this.W(),r=0,i=t.length;r<i;r++)e.driver.removeChild(t[r]);this.L(!0),this.q()},r.M=function(n,t,e,r){this.Z=t,this.Y(this.Z,r)},r.W=function(){var n=this.T||{};return[].concat.apply([],Object.keys(n).map((function(t){return n[t].W()})))},t}(cn),kn=function(n){function t(){return n.apply(this,arguments)||this}L(t,n);var r=t.prototype;return r.F=function(){return e.driver.createEmpty(this)},r.M=function(){},t}(on);e.A=kn,e.O=cn,e.k=xn,e.I=bn,e.g=Cn;var Rn={Host:e,Instance:X,Element:r,flattenChildren:v};t.Component=$,t.Fragment=function(n){return n.children},t.PureComponent=J,t.createContext=function(n){var t="_c"+V++;function e(n){return F(n,(function(n){return n.On===t}))}return{Provider:function(){function e(){this.On=t,this.gn=[]}var r=e.prototype;return r.pn=function(n){this.gn.push(n)},r.dn=function(n){this.gn=this.gn.filter((function(t){return t!==n}))},r._getChildContext=function(){var n;return(n={})[t]=this,n},r.getValue=function(){return void 0!==this.props.value?this.props.value:n},r.componentDidUpdate=function(n){this.props.value!==n.value&&D(this.gn,null,this.getValue())},r.render=function(){return this.props.children},e}(),Consumer:function(r,i){var u=this,a=T((function(){return i[t]||e(u)}))[0],c=a?a.getValue():n,s=T(c),f=s[1];if(c===s[0]){H((function(){if(a)return a.pn(f),function(){a.dn(f)}}),[]);var l=B(r.children)[0];return o(l)?l(c):void 0}f(c)},_contextID:t,_defaultValue:n,an:e}},t.createElement=W,t.createRef=function(){return{current:null}},t.forwardRef=function(n){return n._forwardRef=!0,n},t.memo=function(n,t){return t=t||M,n.hn?n.hn.push(t):n.hn=[t],n},t.render=function(n,t,r,i){o(r)&&(i=r,r=null),(e.driver=(r=r||h).driver||e.driver)||S(5);var u=X.mount(n,t,r).S();return i&&i.call(u),u},t.shared=Rn,t.useCallback=function(n,t){return A((function(){return n}),t)},t.useContext=function(n){return Z().useContext(n)},t.useEffect=function(n,t){N(n,t,!0)},t.useImperativeHandle=function(n,t,e){H((function(){return o(n)?(n(t()),function(){return n(null)}):null!=n?(n.current=t(),function(){n.current=null}):void 0}),c(e)?e.concat([n]):null)},t.useLayoutEffect=H,t.useMemo=A,t.useReducer=function(n,t,r){var i=Z(),u=i.getHookID(),a=i.getHooks(),c=a[u];if(!c){var s=o(r)?r(t):t;return a[u]=[s,function(n){e.i||b();var t=a[u][2];if(E()===i)t.kn.push(n),i.o=!0;else{var r=t.In,o=(0,t.An)(r,n);if(U(o,r))return;t.In=o,t.kn.push(n),i.h()}},{kn:[],An:n,In:s}]}var f=c[2],l=c[0];if(i.fn>0)for(var h=0;h<f.kn.length;h++)l=n(l,f.kn[h]);else l=f.In;return U(l,c[0])||(c[0]=l,i.l=!0),f.An=n,f.In=l,f.kn.length=0,a[u]},t.useRef=function(n){var t=Z(),e=t.getHookID(),r=t.getHooks();return r[e]||(r[e]={current:n}),r[e]},t.useState=T,t.version="1.2.2"},function(n,t,e){}]); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.raxCountdown=t():e.raxCountdown=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=5)}([function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("rax")},function(e,t){e.exports=require("rax-text")},function(e,t){e.exports=require("rax-view")},function(e,t){e.exports=require("rax-image")},function(e,t,n){e.exports=n(6)},function(e,t,n){"use strict";n.r(t);var r=n(1),i=n(0),o=n.n(i),a=n(2),u=n.n(a),c=n(3),m=n.n(c),l=n(4),s=n.n(l);n(7);function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){return e&&"[object Function]"==={}.toString.call(e)}function d(e){var t=e.num,n=e.timeWrapStyle,i=e.timeBackground,o=e.timeBackgroundStyle,a=e.timeStyle,c=e.secondStyle,l=t.toString();t<0?l="00":t<10&&(l="0"+t);var p=l.split(""),f=p.length-1;return Object(r.createElement)(m.a,{className:"rax-countdown-item",style:n},i?Object(r.createElement)(s.a,{className:"rax-countdown-background",source:i,style:o}):null,p.map((function(e,t){return Object(r.createElement)(u.a,{key:"time_"+t,style:t===f?c:a},e)})))}var y=function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={timeRemaining:0},t.timeoutId=0,t.tick=function(){var e=t.props,n=e.onComplete,r=e.onTick,i=e.interval,o=t.state.timeRemaining,a=1e3>o;t.timeoutId&&clearTimeout(t.timeoutId),a&&f(n)?n():t.timeoutId=!a&&setTimeout((function(){return t.setState({timeRemaining:o-i},(function(){return f(r)&&r(o)}))}),i)},t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var o=i.prototype;return o.componentWillMount=function(){var e=this.props.timeRemaining;this.setState({timeRemaining:e})},o.componentDidMount=function(){this.tick()},o.componentDidUpdate=function(){this.tick()},o.componentWillReceiveProps=function(e){e.timeRemaining!==this.props.timeRemaining&&(this.timeoutId&&clearTimeout(this.timeoutId),this.setState({timeRemaining:e.timeRemaining}))},o.componentWillUnmount=function(){this.timeoutId&&clearTimeout(this.timeoutId)},o.shouldComponentUpdate=function(e,t){return this.props.timeRemaining!==e.timeRemaining||this.state.timeRemaining!==t.timeRemaining},o.render=function(){var e=this.state.timeRemaining,t=this.props,n=t.formatFunc,i=t.timeStyle,o=t.timeBackgroundStyle,a=t.timeWrapStyle,c=t.timeBackground,l=t.secondStyle,s=t.textStyle,p=t.tpl;if(n)return n(e);for(var f=Math.floor(e/1e3),y={d:parseInt(f/3600/24),h:parseInt(f/3600)%24,m:parseInt(f/60)%60,s:parseInt(f%60)},g=new RegExp("{[d,h,m,s]}","g"),b=[],x=null;null!==(x=g.exec(p));)b.push(x.index,x.index);0!==b.length&&b.push(-1);var h=0;return Object(r.createElement)(m.a,{className:"rax-countdown-main"},b.map((function(e,t){if(-1===e){var n=p.slice(h);return n?Object(r.createElement)(u.a,{style:s,key:"text_"+t},n):null}var m=p[e+1];switch(m){case"d":case"h":case"m":case"s":if(t%2==0){var f=p.slice(h,e);return f?Object(r.createElement)(u.a,{style:s,key:"text_"+t},f):null}return h=e+3,Object(r.createElement)(d,{num:y[m],timeWrapStyle:a,timeBackground:c,timeBackgroundStyle:o,timeStyle:i,secondStyle:l,key:"time_"+t});default:return null}})))},i}(r.Component);y.propTypes={formatFunc:o.a.func,onTick:o.a.func,onComplete:o.a.func,tpl:o.a.string,timeRemaining:o.a.number,secondStyle:o.a.object,timeStyle:o.a.object,textStyle:o.a.object,timeWrapStyle:o.a.object,timeBackground:o.a.shape({uri:o.a.string}),timeBackgroundStyle:o.a.object,interval:o.a.number},y.defaultProps={tpl:"{d}\u5929{h}\u65f6{m}\u5206{s}\u79d2",timeRemaining:0,interval:1e3},t.default=y},function(e,t,n){}])})); | ||
!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.raxCountdown=t():n.raxCountdown=t()}(window,(function(){return function(n){var t={};function e(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var i in n)e.d(r,i,function(t){return n[t]}.bind(null,i));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="/",e(e.s=5)}([function(n,t){n.exports=require("prop-types")},function(n,t,e){n.exports=e(7)},function(n,t){n.exports=require("rax-text")},function(n,t){n.exports=require("rax-view")},function(n,t){n.exports=require("rax-image")},function(n,t,e){n.exports=e(6)},function(n,t,e){"use strict";e.r(t);var r=e(1),i=e(0),o=e.n(i),u=e(2),a=e.n(u),c=e(3),s=e.n(c),f=e(4),l=e.n(f);e(8);function h(n,t){return h=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n},h(n,t)}function p(n){return n&&"[object Function]"==={}.toString.call(n)}function v(n){var t=n.num,e=n.timeWrapStyle,i=n.timeBackground,o=n.timeBackgroundStyle,u=n.timeStyle,c=n.secondStyle,f=t.toString();t<0?f="00":t<10&&(f="0"+t);var h=f.split(""),p=h.length-1;return Object(r.createElement)(s.a,{className:"rax-countdown-item",style:e},i?Object(r.createElement)(l.a,{className:"rax-countdown-background",source:i,style:o}):null,h.map((function(n,t){return Object(r.createElement)(a.a,{key:"time_"+t,style:t===p?c:u},n)})))}var d=function(n){var t,e;function i(){for(var t,e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return(t=n.call.apply(n,[this].concat(r))||this).state={timeRemaining:0},t.timeoutId=0,t.tick=function(){var n=t.props,e=n.onComplete,r=n.onTick,i=n.interval,o=t.state.timeRemaining,u=1e3>o;t.timeoutId&&clearTimeout(t.timeoutId),u&&p(e)?e():t.timeoutId=!u&&setTimeout((function(){return t.setState({timeRemaining:o-i},(function(){return p(r)&&r(o)}))}),i)},t}e=n,(t=i).prototype=Object.create(e.prototype),t.prototype.constructor=t,h(t,e);var o=i.prototype;return o.componentWillMount=function(){var n=this.props.timeRemaining;this.setState({timeRemaining:n})},o.componentDidMount=function(){this.tick()},o.componentDidUpdate=function(){this.tick()},o.componentWillReceiveProps=function(n){n.timeRemaining!==this.props.timeRemaining&&(this.timeoutId&&clearTimeout(this.timeoutId),this.setState({timeRemaining:n.timeRemaining}))},o.componentWillUnmount=function(){this.timeoutId&&clearTimeout(this.timeoutId)},o.shouldComponentUpdate=function(n,t){return this.props.timeRemaining!==n.timeRemaining||this.state.timeRemaining!==t.timeRemaining},o.render=function(){var n=this.state.timeRemaining,t=this.props,e=t.formatFunc,i=t.timeStyle,o=t.timeBackgroundStyle,u=t.timeWrapStyle,c=t.timeBackground,f=t.secondStyle,l=t.textStyle,h=t.tpl;if(e)return e(n);for(var p=Math.floor(n/1e3),d={d:parseInt(p/3600/24),h:parseInt(p/3600)%24,m:parseInt(p/60)%60,s:parseInt(p%60)},m=new RegExp("{[d,h,m,s]}","g"),_=[],y=null;null!==(y=m.exec(h));)_.push(y.index,y.index);0!==_.length&&_.push(-1);var g=0;return Object(r.createElement)(s.a,{className:"rax-countdown-main"},_.map((function(n,t){if(-1===n){var e=h.slice(g);return e?Object(r.createElement)(a.a,{style:l,key:"text_"+t},e):null}var s=h[n+1];switch(s){case"d":case"h":case"m":case"s":if(t%2==0){var p=h.slice(g,n);return p?Object(r.createElement)(a.a,{style:l,key:"text_"+t},p):null}return g=n+3,Object(r.createElement)(v,{num:d[s],timeWrapStyle:u,timeBackground:c,timeBackgroundStyle:o,timeStyle:i,secondStyle:f,key:"time_"+t});default:return null}})))},i}(r.Component);d.propTypes={formatFunc:o.a.func,onTick:o.a.func,onComplete:o.a.func,tpl:o.a.string,timeRemaining:o.a.number,secondStyle:o.a.object,timeStyle:o.a.object,textStyle:o.a.object,timeWrapStyle:o.a.object,timeBackground:o.a.shape({uri:o.a.string}),timeBackgroundStyle:o.a.object,interval:o.a.number},d.defaultProps={tpl:"{d}\u5929{h}\u65f6{m}\u5206{s}\u79d2",timeRemaining:0,interval:1e3},t.default=d},function(n,t){var e={t:1,i:!1,driver:null,rootComponents:{},rootInstances:{},owner:null};function r(n,t,e,r,i){return{type:n,key:t,ref:e,props:r,_owner:i}}function i(n){return null===n}function o(n){return"function"==typeof n}function u(n){return"object"==typeof n}function a(n){return"[object Object]"===h.toString.call(n)}function c(n){return Array.isArray(n)}function s(n){return"string"==typeof n}function f(n){return"number"==typeof n}var l=function(){},h={};function p(n,t){if(c(n))for(var e=0,r=n.length;e<r;e++)p(n[e],t);else t.push(n)}function v(n){if(null==n)return n;var t=[];return p(n,t),t.length-1?t:t[0]}var d=[],m=[],_=[],y=setTimeout;function g(n){for(var t;t=n.shift();)t()}function x(n){0===d.length&&y(w),d.push(n)}function w(){g(d)}function C(n){0===m.length&&y(b),m.push(n)}function b(){g(m)}function k(n){_.push(n)}function R(n,t,r){var i,o=void 0===r?"":" got: "+function(n){return a(n)?Object.keys(n):n}(r);return Error(n+": #"+t+", "+((i=e.owner)?"check <"+i.u()+">":"no owner")+"."+o)}function S(n,t){throw R("Error",n,t)}function j(n,t){var e=R("Warn",n,t);y((function(){throw e}),0)}var I={key:!0,ref:!0};function W(n,t,i){var o,u={},a=null,s=null;if(null!=t)for(o in s=void 0===t.ref?null:t.ref,a=void 0===t.key?null:""+t.key,t)I[o]||(u[o]=t[o]);var f=arguments.length-2;if(f>0)if(1!==f||c(i)){var h=i;if(f>1){h=Array(f);for(var p=0;p<f;p++)h[p]=arguments[p+2]}u.children=v(h)}else u.children=i;if(n&&n.defaultProps){var d=n.defaultProps;for(o in d)void 0===u[o]&&(u[o]=d[o])}return null==n&&(n=l,j(0)),new r(n,a,s,u,e.owner)}function D(n,t,e){for(var r=0,i=n&&n.length;r<i;r++)n[r].call(t,e)}var O=h.hasOwnProperty;function U(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function M(n,t){if(U(n,t))return!0;if(!u(n)||i(n)||!u(t)||i(t))return!1;var e=Object.keys(n);if(e.length!==Object.keys(t).length)return!1;for(var r=0;r<e.length;r++)if(!O.call(t,e[r])||!U(n[e[r]],t[e[r]]))return!1;return!0}function E(){return e.owner&&e.owner._instance}function Z(){var n=E();if(n)return n;S(1)}function P(n,t){if(i(t)||n.length!==t.length)return!1;for(var e=0;e<n.length;e++)if(!U(n[e],t[e]))return!1;return!0}function T(n){var t=Z(),r=t.getHookID(),i=t.getHooks();i[r]||(o(n)&&(n=n()),i[r]=[n,function(n){e.i||b();var u=i[r],a=u[2];o(n)&&(n=n(a)),U(n,a)||(u[2]=n,E()===t?t.o=!0:t.h())},n]);var u=i[r];return U(u[0],u[2])||(u[0]=u[2],t.l=!0),u}function H(n,t){N(n,t)}function N(n,t,e){var r=Z(),i=r.getHookID(),o=r.getHooks();if(t=void 0===t?null:t,o[i]){var u=o[i],a=u.v,c=u.p;u.p=t,u._=c,a.current=n}else{var s=function n(t){if(!t&&e)return C((function(){return n(!0)}));var r=n.current;r&&(f.current=r(),n.current=null)},f=function n(t){if(!t&&e)return C((function(){return n(!0)}));var r=n.current;r&&(r(),n.current=null)};s.current=n,o[i]={v:s,j:f,_:t,p:t},r.didMount.push(s),r.willUnmount.push((function(){return f(!0)})),r.didUpdate.push((function(){var n=o[i],t=n.p,e=n.v;null!=t&&P(t,n._)||(f(),e())}))}}function A(n,t){var e=Z(),r=e.getHookID(),o=e.getHooks();if(t=void 0===t?null:t,o[r]){var u=o[r][1];!i(t)&&P(t,u)||(o[r]=[n(),t])}else o[r]=[n(),t];return o[r][0]}function B(n){return c(n)?n:[n]}function F(n,t){for(var e;n&&n._internal;){if(t(n)){e=n;break}n=n._internal.m}return e}var V=0;function q(n){var t;return a(n)&&null!==n&&n.type?t=s(n.type)?new e.O(n):new e.g(n):s(n)||f(n)?t=new e.k(n+""):c(n)?t=new e.I(n):(void 0===n||i(n)||!1===n||!0===n||j(2,n),t=new e.A(n)),t}function L(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n,G(n,t)}function G(n,t){return(G=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n})(n,t)}var $=function(){function n(n,t){this.props=n,this.context=t,this.refs={}}var t=n.prototype;return t.setState=function(n,t){this.updater.setState(this,n,t)},t.forceUpdate=function(n){this.updater.forceUpdate(this,n)},n}(),J=function(n){function t(t,e){var r;return(r=n.call(this,t,e)||this).C=!0,r}return L(t,n),t}($),K=1,Y=function(n){function t(){var t;return(t=n.call(this)||this).P=[],t.D=K++,t}L(t,n);var e=t.prototype;return e.S=function(){return this.U().S()},e.U=function(){return this._internal._renderedComponent},e.h=function(n){this.P=n,this.forceUpdate()},e.render=function(){return this.P},t}($),X={set:function(n,t){n._r||(n._r=t,t.D&&(e.rootInstances[t.D]=t,e.rootComponents[t.D]=t._internal))},get:function(n){return n._r},remove:function(n){var t=this.get(n);t&&(n._r=null,t.D&&(delete e.rootComponents[t.D],delete e.rootInstances[t.D]))},mount:function(n,t,r){var i=r.parent,o=r.hydrate,u=e.driver;null==t&&(t=u.createBody());var a,c={element:n,container:t,hydrate:o};if(u.beforeRender&&u.beforeRender(c),i){var s=i._internal;a=s.H(s._context)}var f=this.get(t);if(f&&f.D)return a&&(f._internal.N=a),f.h(n),u.afterRender&&u.afterRender(c),f;var l=q(W(Y)).R(t,i,a||{});return this.set(t,l),l.h(n),u.afterRender&&u.afterRender(c),l}};function z(n,t,e){var r=n?n.ref:null,i=t?t.ref:null;r!==i&&(r&&nn(n._owner,r,e),i&&Q(t._owner,i,e))}function Q(n,t,e){if(n){var r=e.S();o(t)?t(r):u(t)?t.current=r:n._instance.refs[t]=r}else j(3)}function nn(n,t,e){if(o(t))t(null);else{var r=e.S();u(t)&&t.current===r?t.current=null:n._instance.refs[t]===r&&delete n._instance.refs[t]}}function tn(n,t){var e=i(n),r=i(t);return e||r?e===r:!(!c(n)||!c(t))||(s(n)||f(n)?s(t)||f(t):u(n)&&u(t)&&n.type===t.type&&n.key===t.key)}function en(n,t,e){var r=t&&t.key,i="."+e.toString(36);if(s(r)){var o="$"+r;return void 0===n[o]?o:i}return i}function rn(n){for(var t=n;t=n.m&&n.m._internal;)if(t instanceof e.g)n=t;else{for(var r=Object.keys(t.T),i=n.V-1;i>=0;i--){var o=t.T[r[i]].W();if(!c(o))return o;if(o.length>0)return o[o.length-1]}if(!(t instanceof e.I))return null;n=t}}var on=function(){function n(n){this.Z=n}var t=n.prototype;return t.$=function(n,t,r){this._parent=n,this.m=t,this._context=r,this._mountID=e.t++},t.q=function(){this.Z=this._nativeNode=this._parent=this.m=this._context=null,this._instance&&(this._instance=this._instance._internal=null)},t.R=function(n,t,e,r){this.$(n,t,e),this.B(r);var i={};return i._internal=this,i},t.unmountComponent=function(n){this._nativeNode&&!n&&e.driver.removeChild(this._nativeNode,this._parent),this.q()},t.u=function(){var n=this.Z,t=n&&n.type;return t&&t.displayName||t&&t.name||t||n},t.B=function(n){var t=this.W(),r=this._parent;n?n(t,r):e.driver.appendChild(t,r)},t.W=function(){return null==this._nativeNode?this._nativeNode=this.F():this._nativeNode},t.S=function(){return this.W()},n}(),un=Object.assign,an=/^on[A-Z]/,cn=function(n){function t(){return n.apply(this,arguments)||this}L(t,n);var r=t.prototype;return r.R=function(n,t,e,r){this.$(n,t,e);var i=this.Z,o=i.props,u=i.type,a=o.children,c=o.append||"tree";this.G=un({},o.style);var s={type:u,props:o};return s._internal=this,this._instance=s,"tree"===c?(this.J(a,e),this.B(r)):(this.B(r),this.J(a,e)),i&&i.ref&&Q(i._owner,i.ref,this),s},r.J=function(n,t){if(null==n)return n;var e=this.W();return this.K(e,B(n),t)},r.K=function(n,t,e,r){for(var i=this.T={},o=[],u=0,a=t.length;u<a;u++){var c=t[u],s=q(c);i[en(i,c,u)]=s,s.V=u;var f=s.R(n,this._instance,e,r);o.push(f)}return o},r.L=function(n){var t=this.T;if(t){for(var e in t)t[e].unmountComponent(n);this.T=null}},r.unmountComponent=function(n){if(this._nativeNode){var t=this.Z.ref;t&&nn(this.Z._owner,t,this),X.remove(this._nativeNode),n||e.driver.removeChild(this._nativeNode,this._parent)}this.L(!0),this.G=null,this.q()},r.M=function(n,t,e,r){this.Z=t,z(n,t,this);var i=n.props,o=t.props;this.X(i,o),null==i.children||c(i.children)&&0===i.children.length?this.J(o.children,r):this.Y(o.children,r)},r.X=function(n,t){var r,i,u,a=e.driver,c=this.W();for(r in n)if("children"!==r&&null!=n[r]&&!t.hasOwnProperty(r))if("style"===r){var s=this.G;for(i in s)(u=u||{})[i]="";this.G=null}else if(an.test(r)){var f=n[r];o(f)&&a.removeEventListener(c,r.slice(2).toLowerCase(),f)}else a.removeAttribute(c,r,n[r]);for(r in t){var l=t[r],h="style"===r?this.G:null!=n?n[r]:void 0;if("children"!==r&&h!==l&&(null!=l||null!=h))if("style"===r)if(l?l=this.G=un({},l):this.G=null,null!=h){for(i in h)l&&(l[i]||0===l[i])||((u=u||{})[i]="");for(i in l)h[i]!==l[i]&&((u=u||{})[i]=l[i])}else u=l;else if(an.test(r)){var p=r.slice(2).toLowerCase();o(h)&&a.removeEventListener(c,p,h,t),o(l)&&a.addEventListener(c,p,l,t)}else null!=l?a.setAttribute(c,r,l):a.removeAttribute(c,r,n[r])}u&&a.setStyle(c,u)},r.Y=function(n,t){var r=this.T,o=e.driver;if(null!=n||null!=r){var u={};if(null!=n)for(var a=0,s=(n=B(n)).length;a<s;a++){var f=n[a],l=en(u,f,a),h=r&&r[l],p=h&&h.Z,v=h&&h._context;null!=h&&tn(p,f)?(p===f&&v===t||h.M(p,f,t,t),u[l]=h):(h&&(h.nn=!0),u[l]=q(f))}var d=this.W(),m=c(d),_=null,y=null,g=!1,x=!1,w=null,C=!(!o.removeChildren||!(i(n)||n&&!n.length)||m);if(null!=r){for(var b in r){var k=r[b],R=k.nn||!u[b];_?R&&k.unmountComponent(C):(x=R,c(y=(_=k).W())&&(g=0===y.length,y=y[0]))}(m&&0===d.length||g)&&(w=rn(this))}var S=function(n,t){for(var e=0,r=(n=B(n)).length;e<r;e++)w?o.insertAfter(n[r-1-e],w):y?o.insertBefore(n[e],y):t&&o.appendChild(n[e],t)},j=0;for(var I in u){var W=u[I],D=r&&r[I];if(D===W){var O=D.W();D.V!==j&&S(O)}else m&&(d=this._parent),W.R(d,this._instance,t,S);W.V=j++,c(w=W.W())&&(w=w[w.length-1])}x&&_.unmountComponent(C),C&&o.removeChildren(this._nativeNode),this.T=u}},r.F=function(){var n=this._instance,t=e.driver.createElement(n.type,n.props,this);return X.set(t,n),t},t}(on),sn=function(n){function t(t,e){var r;(r=n.call(this)||this).tn=!0,r.rn=t,r.un=0,r.fn=0,r.on={},r.o=!1,r.l=!1,r.en=null,r.sn={},r.didMount=[],r.didUpdate=[],r.willUnmount=[],r.state=h,t._forwardRef&&(r.cn=r._forwardRef=e);var i=t.hn;return i&&(r.shouldComponentUpdate=function(n){for(var t=!0,e=i.length-1;e>-1&&!(t=i[e](r.props,n));e--);return!t||r.cn!==r._forwardRef}),r}L(t,n);var e=t.prototype;return e.getHooks=function(){return this.on},e.getHookID=function(){return++this.un},e.useContext=function(n){var t=this,e=n._contextID,r=this.sn[e];if(!r){var i=n.an(this);if(r=this.sn[e]={ln:i},i){var o=function(n){r.vn!==n&&(t.l=!0,t.h())};i.pn(o),this.willUnmount.push((function(){return i.dn(o)}))}}return r.vn=r.ln?r.ln.getValue():n._defaultValue},e.componentWillMount=function(){this.l=!0},e.componentDidMount=function(){D(this.didMount)},e.componentWillReceiveProps=function(){this.l=!0},e.componentDidUpdate=function(){D(this.didUpdate)},e.componentWillUnmount=function(){D(this.willUnmount)},e.h=function(){this.setState(h)},e.render=function(){this.un=0,this.fn=0,this.o=!1;for(var n=this.rn(this.props,this._forwardRef?this._forwardRef:this.context);this.o;)this.fn++,this.fn>24&&S(4),this.un=0,this.o=!1,n=this.rn(this.props,this._forwardRef?this._forwardRef:this.context);return this.l&&(this.en=n,this.l=!1),this.en},t}($),fn=[];function ln(n){return n._n}function hn(n){var t=n._internal;if(t){e.i=!0;var r=t.Z,i=t._context,o=t.N||i;t.N=void 0,(ln(t)||t.xn)&&(t.M(r,r,i,o),g(_)),e.i=!1}}function pn(n,t){return t._internal._mountID-n._internal._mountID}function vn(){if(e.i)return x(vn);var n,t=fn;if(t.length>0)for(b(),fn=[],t.length>1&&(t=t.filter((function(n){return!!n._internal})).sort(pn));n=t.pop();)hn(n)}function dn(n,t){if(fn.indexOf(n)<0&&fn.push(n),t){if(fn.length>1)return;x(vn)}else vn()}function mn(n,t,e){var r=n._internal;if(r){e&&function(n,t){(function(n){return n.wn}(n)||function(n){return n.wn=[]}(n)).push(t)}(r,e);var i=r._renderedComponent;t?(n.tn&&(r.xn=!0),function(n,t){(ln(n)||function(n){return n._n=[]}(n)).push(t)}(r,t),!r.yn&&i&&dn(n,!0)):(r.xn=!0,i&&dn(n))}}var _n={setState:function(n,t,r){e.i||b(),mn(n,t,r)},forceUpdate:function(n,t){mn(n,null,t)}};function yn(n,t,e){try{return n()}catch(n){e?e(n):function(n,t){var e=F(n,(function(n){return n.componentDidCatch||n.constructor&&n.constructor.getDerivedStateFromError}));e?k((function(){var n=e._internal;n&&yn((function(){if(e.componentDidCatch&&e.componentDidCatch(t),e.constructor&&e.constructor.getDerivedStateFromError){var n=e.constructor.getDerivedStateFromError(t);e.setState(n)}}),n.m)})):y((function(){throw t}),0)}(t,n)}}function gn(n,t){k((function(){yn(n,t)}))}function xn(n,t){n&&gn((function(){D(n,t)}),t)}var wn=function(n){function t(){return n.apply(this,arguments)||this}L(t,n);var r=t.prototype;return r.R=function(n,t,r,i){this.$(n,t,r);var u,a,c=this.Z,s=c.type,f=c.ref,l=c.props,h=s.prototype,p=this.bn(r);if(yn((function(){h&&h.render?u=new s(l,p):o(s)?u=new sn(s,f):S(6,s)}),t),u){u.props=l,u.context=p,u.refs={},u.updater=_n,u._internal=this,this._instance=u;var v=u.state;void 0===v&&(u.state=v=null),u.componentWillMount&&yn((function(){u.componentWillMount()}),u),e.owner=this,u.state=this.jn(l,p);var d=this.wn;return this.wn=null,yn((function(){a=u.render()}),u),e.owner=null,this._renderedComponent=q(a),this._renderedComponent.R(this._parent,u,this.H(r),i),!c.type._forwardRef&&f&&Q(c._owner,f,this),u.componentDidMount&&gn((function(){u.componentDidMount()}),u),xn(d,u),u}},r.unmountComponent=function(n){var t=this._instance;if(t&&t.componentWillUnmount&&yn((function(){t.componentWillUnmount()}),t),null!=this._renderedComponent){var e=this.Z,r=e.ref;!e.type._forwardRef&&r&&nn(e._owner,r,this),this._renderedComponent.unmountComponent(n),this._renderedComponent=null}this._n=null,this.xn=!1,this.q()},r.bn=function(n){var t={},e=this.Z.type.contextTypes;if(e)for(var r in e)t[r]=n[r];return t},r.H=function(n){var t=this._instance,e=t.getChildContext&&t.getChildContext();return e?un({},n,e):n},r.jn=function(n,t){var e=this._instance,r=this._n;if(!r)return e.state;this._n=null;for(var i=un({},e.state),u=0;u<r.length;u++){var a=r[u];un(i,o(a)?a.call(e,i,n,t):a)}return i},r.M=function(n,t,e,r){var i=this,o=this._instance;o&&yn((function(){var e,u,a;i._context===r?u=o.context:(u=i.bn(r),e=!0),a=t.props,n!==t&&(e=!0),e&&o.componentWillReceiveProps&&(i.yn=!0,o.componentWillReceiveProps(a,u),i.yn=!1),i.Z.type._forwardRef?(o.cn=n.ref,o._forwardRef=t.ref):z(n,t,i);var c=!0,s=o.props,f=o.state,l=i.jn(a,u),h=i.wn;if(i.wn=null,i.xn||(o.shouldComponentUpdate?c=o.shouldComponentUpdate(a,l,u):o.C&&(c=!M(s,a)||!M(f,l))),c){i.xn=!1;var p=o.context;o.componentWillUpdate&&o.componentWillUpdate(a,l,u),i.Z=t,i._context=r,o.props=a,o.state=l,o.context=u,i.mn(r),o.componentDidUpdate&&gn((function(){o.componentDidUpdate(s,f,p)}),o)}else i.Z=t,i._context=r,o.props=a,o.state=l,o.context=u;xn(h,o)}),o)},r.mn=function(n){var t,r=this._renderedComponent,i=r.Z,o=this._instance;if(e.owner=this,t=o.render(),e.owner=null,tn(i,t)){var u=r._context,a=this.H(n);i===t&&u===a||r.M(i,t,u,a)}else{var s=null,f=r.W();c(f)&&0===f.length&&null==o.D&&(s=rn(r)),r.unmountComponent(!0),this._renderedComponent=q(t),this._renderedComponent.R(this._parent,o,this.H(n),(function(n,t){var r=e.driver;f=B(f),n=B(n);for(var i=0;i<n.length;i++){var o=n[i];f[i]?r.replaceChild(o,f[i]):s?r.insertAfter(o,s):r.appendChild(o,t),s=o}for(var u=n.length;u<f.length;u++)r.removeChild(f[u])}))}},r.W=function(){var n=this._renderedComponent;if(n)return n.W()},r.S=function(){var n=this._instance;return n.tn?null:n},t}(on),Cn=function(n){function t(){return n.apply(this,arguments)||this}L(t,n);var r=t.prototype;return r.M=function(n,t){n!==(t=""+t)&&(this.Z=t,e.driver.updateText(this.W(),t))},r.F=function(){return e.driver.createText(this.Z,this)},t}(on),bn=function(n){function t(){return n.apply(this,arguments)||this}L(t,n);var r=t.prototype;return r.R=function(n,t,r,i){this.$(n,t,r);var o=this._instance={};o._internal=this;var u=[];if(this.K(this._parent,this.Z,r,(function(n){n=B(n);for(var t=0;t<n.length;t++)u.push(n[t])})),i)i(u,n);else for(var a=0;a<u.length;a++)e.driver.appendChild(u[a],n);return o},r.unmountComponent=function(n){if(!n)for(var t=this.W(),r=0,i=t.length;r<i;r++)e.driver.removeChild(t[r]);this.L(!0),this.q()},r.M=function(n,t,e,r){this.Z=t,this.Y(this.Z,r)},r.W=function(){var n=this.T||{};return[].concat.apply([],Object.keys(n).map((function(t){return n[t].W()})))},t}(cn),kn=function(n){function t(){return n.apply(this,arguments)||this}L(t,n);var r=t.prototype;return r.F=function(){return e.driver.createEmpty(this)},r.M=function(){},t}(on);e.A=kn,e.O=cn,e.k=Cn,e.I=bn,e.g=wn;var Rn={Host:e,Instance:X,Element:r,flattenChildren:v};t.Component=$,t.Fragment=function(n){return n.children},t.PureComponent=J,t.createContext=function(n){var t="_c"+V++;function e(n){return F(n,(function(n){return n.On===t}))}return{Provider:function(){function e(){this.On=t,this.gn=[]}var r=e.prototype;return r.pn=function(n){this.gn.push(n)},r.dn=function(n){this.gn=this.gn.filter((function(t){return t!==n}))},r._getChildContext=function(){var n;return(n={})[t]=this,n},r.getValue=function(){return void 0!==this.props.value?this.props.value:n},r.componentDidUpdate=function(n){this.props.value!==n.value&&D(this.gn,null,this.getValue())},r.render=function(){return this.props.children},e}(),Consumer:function(r,i){var u=this,a=T((function(){return i[t]||e(u)}))[0],c=a?a.getValue():n,s=T(c),f=s[1];if(c===s[0]){H((function(){if(a)return a.pn(f),function(){a.dn(f)}}),[]);var l=B(r.children)[0];return o(l)?l(c):void 0}f(c)},_contextID:t,_defaultValue:n,an:e}},t.createElement=W,t.createRef=function(){return{current:null}},t.forwardRef=function(n){return n._forwardRef=!0,n},t.memo=function(n,t){return t=t||M,n.hn?n.hn.push(t):n.hn=[t],n},t.render=function(n,t,r,i){o(r)&&(i=r,r=null),(e.driver=(r=r||h).driver||e.driver)||S(5);var u=X.mount(n,t,r).S();return i&&i.call(u),u},t.shared=Rn,t.useCallback=function(n,t){return A((function(){return n}),t)},t.useContext=function(n){return Z().useContext(n)},t.useEffect=function(n,t){N(n,t,!0)},t.useImperativeHandle=function(n,t,e){H((function(){return o(n)?(n(t()),function(){return n(null)}):null!=n?(n.current=t(),function(){n.current=null}):void 0}),c(e)?e.concat([n]):null)},t.useLayoutEffect=H,t.useMemo=A,t.useReducer=function(n,t,r){var i=Z(),u=i.getHookID(),a=i.getHooks(),c=a[u];if(!c){var s=o(r)?r(t):t;return a[u]=[s,function(n){e.i||b();var t=a[u][2];if(E()===i)t.kn.push(n),i.o=!0;else{var r=t.In,o=(0,t.An)(r,n);if(U(o,r))return;t.In=o,t.kn.push(n),i.h()}},{kn:[],An:n,In:s}]}var f=c[2],l=c[0];if(i.fn>0)for(var h=0;h<f.kn.length;h++)l=n(l,f.kn[h]);else l=f.In;return U(l,c[0])||(c[0]=l,i.l=!0),f.An=n,f.In=l,f.kn.length=0,a[u]},t.useRef=function(n){var t=Z(),e=t.getHookID(),r=t.getHooks();return r[e]||(r[e]={current:n}),r[e]},t.useState=T,t.version="1.2.2"},function(n,t,e){}])})); |
{ | ||
"name": "rax-countdown", | ||
"version": "1.1.7", | ||
"version": "1.2.0", | ||
"description": "Countdown component for Rax.", | ||
@@ -37,6 +37,6 @@ "license": "BSD-3-Clause", | ||
"dependencies": { | ||
"prop-types": "^15.7.2", | ||
"rax-image": "^1.0.0", | ||
"prop-types": "^15.7.2", | ||
"rax-text": "^1.0.0", | ||
"rax-view": "^1.0.0" | ||
"rax-text": "^2.0.0", | ||
"rax-view": "^2.0.0" | ||
}, | ||
@@ -47,5 +47,6 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@types/rax": "^1.0.0", | ||
"rax-test-renderer": "^1.0.0", | ||
"@types/ali-app": "^1.0.0", | ||
"@types/jest": "^24.0.12", | ||
"@types/rax": "^1.0.0", | ||
"@typescript-eslint/eslint-plugin": "^1.7.0", | ||
@@ -59,6 +60,4 @@ "@typescript-eslint/parser": "^1.7.0", | ||
"eslint-config-rax": "^0.0.0", | ||
"rax": "^1.0.0", | ||
"rax-test-renderer": "^1.0.0", | ||
"typescript": "^3.9.2" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
154967
13
48
1344
+ Addedrax-text@2.2.0(transitive)
+ Addedrax-view@2.3.0(transitive)
- Removedrax-text@1.4.0(transitive)
- Removedrax-view@1.2.0(transitive)
Updatedrax-text@^2.0.0
Updatedrax-view@^2.0.0