forgeplus/public/react/build/static/js/12.732d3701.chunk.js

1 line
28 KiB
JavaScript

(this.webpackJsonp=this.webpackJsonp||[]).push([[12],{AUBz:function(e,t,n){"use strict";n.r(t);n("SchZ"),n("OQrj")},OQrj:function(e,t,n){},R3zJ:function(e,t,n){"use strict";n.d(t,"b",(function(){return a}));var r=function(e){if("undefined"!=typeof window&&window.document&&window.document.documentElement){var t=Array.isArray(e)?e:[e],n=window.document.documentElement;return t.some((function(e){return e in n.style}))}return!1},a=r(["flex","webkitFlex","Flex","msFlex"]);t.a=r},ZTPi:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return Qe}));var r=n("q1tI"),a=n.n(r),o=n("i8i4"),i=n("QbLZ"),s=n.n(i),c=n("YEIV"),l=n.n(c),f=n("jo6Y"),u=n.n(f),p=n("iCc5"),d=n.n(p),v=n("V7oC"),h=n.n(v),b=n("FYw3"),y=n.n(b),m=n("mRg0"),g=n.n(m),x=n("17x9"),P=n.n(x),C=n("TSYQ"),k=n.n(C),E=n("n1GQ"),T=n.n(E),O=n("VCL8"),w=37,R=38,S=39,N=40;function B(e){var t=[];return a.a.Children.forEach(e,(function(e){e&&t.push(e)})),t}function _(e,t){for(var n=B(e),r=0;r<n.length;r++)if(n[r].key===t)return r;return-1}function j(e,t){e.transform=t,e.webkitTransform=t,e.mozTransform=t}function K(e){return("transform"in e||"webkitTransform"in e||"MozTransform"in e)&&window.atob}function W(e){return"left"===e||"right"===e}function A(e,t){return+window.getComputedStyle(e).getPropertyValue(t).replace("px","")}function I(e){return Object.keys(e).reduce((function(t,n){return"aria-"!==n.substr(0,5)&&"data-"!==n.substr(0,5)&&"role"!==n||(t[n]=e[n]),t}),{})}function D(e,t){return+e.getPropertyValue(t).replace("px","")}function z(e,t,n,r,a){var o=A(a,"padding-"+e);if(!r||!r.parentNode)return o;var i=r.parentNode.childNodes;return Array.prototype.some.call(i,(function(a){var i=window.getComputedStyle(a);return a!==r?(o+=D(i,"margin-"+e),o+=a[t],o+=D(i,"margin-"+n),"content-box"===i.boxSizing&&(o+=D(i,"border-"+e+"-width")+D(i,"border-"+n+"-width")),!1):(o+=D(i,"margin-"+e),!0)})),o}var H=n("4IlW"),M=n("foW8"),q=n.n(M)()({}),F=q.Provider,L=q.Consumer,U={width:0,height:0,overflow:"hidden",position:"absolute"},Q=function(e){function t(){var e,n,r,a;d()(this,t);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return n=r=y()(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.onKeyDown=function(e){var t=e.target,n=e.which,a=e.shiftKey,o=r.props,i=o.nextElement,s=o.prevElement;n===H.a.TAB&&document.activeElement===t&&(!a&&i&&i.focus(),a&&s&&s.focus())},a=n,y()(r,a)}return g()(t,e),h()(t,[{key:"render",value:function(){var e=this.props.setRef;return a.a.createElement("div",{tabIndex:0,ref:e,style:U,onKeyDown:this.onKeyDown,role:"presentation"})}}]),t}(a.a.Component);Q.propTypes={setRef:P.a.func,prevElement:P.a.object,nextElement:P.a.object};var G=Q,V=function(e){function t(){return d()(this,t),y()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return g()(t,e),h()(t,[{key:"render",value:function(){var e,t=this.props,n=t.id,r=t.className,o=t.destroyInactiveTabPane,i=t.active,c=t.forceRender,f=t.rootPrefixCls,p=t.style,d=t.children,v=t.placeholder,h=u()(t,["id","className","destroyInactiveTabPane","active","forceRender","rootPrefixCls","style","children","placeholder"]);this._isActived=this._isActived||i;var b=f+"-tabpane",y=k()((e={},l()(e,b,1),l()(e,b+"-inactive",!i),l()(e,b+"-active",i),l()(e,r,r),e)),m=(o?i:this._isActived)||c;return a.a.createElement(L,null,(function(e){var t=e.sentinelStart,r=e.sentinelEnd,o=e.setPanelSentinelStart,c=e.setPanelSentinelEnd,l=void 0,f=void 0;return i&&m&&(l=a.a.createElement(G,{setRef:o,prevElement:t}),f=a.a.createElement(G,{setRef:c,nextElement:r})),a.a.createElement("div",s()({style:p,role:"tabpanel","aria-hidden":i?"false":"true",className:y,id:n},I(h)),l,m?d:v,f)}))}}]),t}(a.a.Component),Y=V;function Z(e){var t=void 0;return a.a.Children.forEach(e.children,(function(e){!e||t||e.props.disabled||(t=e.key)})),t}V.propTypes={className:P.a.string,active:P.a.bool,style:P.a.any,destroyInactiveTabPane:P.a.bool,forceRender:P.a.bool,placeholder:P.a.node,rootPrefixCls:P.a.string,children:P.a.node,id:P.a.string},V.defaultProps={placeholder:null};var J=function(e){function t(e){d()(this,t);var n=y()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));X.call(n);var r=void 0;return r="activeKey"in e?e.activeKey:"defaultActiveKey"in e?e.defaultActiveKey:Z(e),n.state={activeKey:r},n}return g()(t,e),h()(t,[{key:"componentWillUnmount",value:function(){this.destroy=!0,T.a.cancel(this.sentinelId)}},{key:"updateSentinelContext",value:function(){var e=this;this.destroy||(T.a.cancel(this.sentinelId),this.sentinelId=T()((function(){e.destroy||e.forceUpdate()})))}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,r=t.navWrapper,o=t.tabBarPosition,i=t.className,c=t.renderTabContent,f=t.renderTabBar,p=t.destroyInactiveTabPane,d=t.direction,v=u()(t,["prefixCls","navWrapper","tabBarPosition","className","renderTabContent","renderTabBar","destroyInactiveTabPane","direction"]),h=k()((e={},l()(e,n,1),l()(e,n+"-"+o,1),l()(e,i,!!i),l()(e,n+"-rtl","rtl"===d),e));this.tabBar=f();var b=a.a.cloneElement(this.tabBar,{prefixCls:n,navWrapper:r,key:"tabBar",onKeyDown:this.onNavKeyDown,tabBarPosition:o,onTabClick:this.onTabClick,panels:t.children,activeKey:this.state.activeKey,direction:this.props.direction}),y=a.a.cloneElement(c(),{prefixCls:n,tabBarPosition:o,activeKey:this.state.activeKey,destroyInactiveTabPane:p,children:t.children,onChange:this.setActiveKey,key:"tabContent",direction:this.props.direction}),m=a.a.createElement(G,{key:"sentinelStart",setRef:this.setSentinelStart,nextElement:this.panelSentinelStart}),g=a.a.createElement(G,{key:"sentinelEnd",setRef:this.setSentinelEnd,prevElement:this.panelSentinelEnd}),x=[];return"bottom"===o?x.push(m,y,g,b):x.push(b,m,y,g),a.a.createElement(F,{value:{sentinelStart:this.sentinelStart,sentinelEnd:this.sentinelEnd,setPanelSentinelStart:this.setPanelSentinelStart,setPanelSentinelEnd:this.setPanelSentinelEnd}},a.a.createElement("div",s()({className:h,style:t.style},I(v),{onScroll:this.onScroll}),x))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};return"activeKey"in e?n.activeKey=e.activeKey:function(e,t){return a.a.Children.map(e.children,(function(e){return e&&e.key})).indexOf(t)>=0}(e,t.activeKey)||(n.activeKey=Z(e)),Object.keys(n).length>0?n:null}}]),t}(a.a.Component),X=function(){var e=this;this.onTabClick=function(t,n){e.tabBar.props.onTabClick&&e.tabBar.props.onTabClick(t,n),e.setActiveKey(t)},this.onNavKeyDown=function(t){var n=t.keyCode;if(n===S||n===N){t.preventDefault();var r=e.getNextActiveKey(!0);e.onTabClick(r)}else if(n===w||n===R){t.preventDefault();var a=e.getNextActiveKey(!1);e.onTabClick(a)}},this.onScroll=function(e){var t=e.target;t===e.currentTarget&&t.scrollLeft>0&&(t.scrollLeft=0)},this.setSentinelStart=function(t){e.sentinelStart=t},this.setSentinelEnd=function(t){e.sentinelEnd=t},this.setPanelSentinelStart=function(t){t!==e.panelSentinelStart&&e.updateSentinelContext(),e.panelSentinelStart=t},this.setPanelSentinelEnd=function(t){t!==e.panelSentinelEnd&&e.updateSentinelContext(),e.panelSentinelEnd=t},this.setActiveKey=function(t){e.state.activeKey!==t&&("activeKey"in e.props||e.setState({activeKey:t}),e.props.onChange(t))},this.getNextActiveKey=function(t){var n=e.state.activeKey,r=[];a.a.Children.forEach(e.props.children,(function(e){e&&!e.props.disabled&&(t?r.push(e):r.unshift(e))}));var o=r.length,i=o&&r[0].key;return r.forEach((function(e,t){e.key===n&&(i=t===o-1?r[0].key:r[t+1].key)})),i}};J.propTypes={destroyInactiveTabPane:P.a.bool,renderTabBar:P.a.func.isRequired,renderTabContent:P.a.func.isRequired,navWrapper:P.a.func,onChange:P.a.func,children:P.a.node,prefixCls:P.a.string,className:P.a.string,tabBarPosition:P.a.string,style:P.a.object,activeKey:P.a.string,defaultActiveKey:P.a.string,direction:P.a.string},J.defaultProps={prefixCls:"rc-tabs",destroyInactiveTabPane:!1,onChange:function(){},navWrapper:function(e){return e},tabBarPosition:"top",children:null,style:{},direction:"ltr"},J.TabPane=Y,Object(O.polyfill)(J);var $=J,ee=function(e){function t(){return d()(this,t),y()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return g()(t,e),h()(t,[{key:"getTabPanes",value:function(){var e=this.props,t=e.activeKey,n=e.children,r=[];return a.a.Children.forEach(n,(function(n){if(n){var o=n.key,i=t===o;r.push(a.a.cloneElement(n,{active:i,destroyInactiveTabPane:e.destroyInactiveTabPane,rootPrefixCls:e.prefixCls}))}})),r}},{key:"render",value:function(){var e,t,n=this.props,r=n.prefixCls,o=n.children,i=n.activeKey,c=n.className,f=n.tabBarPosition,u=n.animated,p=n.animatedWithMargin,d=n.direction,v=n.style,h=k()((e={},l()(e,r+"-content",!0),l()(e,u?r+"-content-animated":r+"-content-no-animated",!0),e),c);if(u){var b=_(o,i);if(-1!==b){var y=p?function(e,t){var n=W(t)?"marginTop":"marginLeft";return l()({},n,100*-e+"%")}(b,f):{transform:t=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ltr",r=W(t)?"translateY":"translateX";return W(t)||"rtl"!==n?r+"("+100*-e+"%) translateZ(0)":r+"("+100*e+"%) translateZ(0)"}(b,f,d),WebkitTransform:t,MozTransform:t};v=s()({},v,y)}else v=s()({},v,{display:"none"})}return a.a.createElement("div",{className:h,style:v},this.getTabPanes())}}]),t}(a.a.Component),te=ee;ee.propTypes={animated:P.a.bool,animatedWithMargin:P.a.bool,prefixCls:P.a.string,children:P.a.node,activeKey:P.a.string,style:P.a.any,tabBarPosition:P.a.string,className:P.a.string,destroyInactiveTabPane:P.a.bool,direction:P.a.string},ee.defaultProps={animated:!0};var ne=$,re=n("BGR+");function ae(e,t){var n=e.props,r=n.styles,a=n.panels,o=n.activeKey,i=n.direction,s=e.props.getRef("root"),c=e.props.getRef("nav")||s,l=e.props.getRef("inkBar"),f=e.props.getRef("activeTab"),u=l.style,p=e.props.tabBarPosition,d=_(a,o);if(t&&(u.display="none"),f){var v=f,h=K(u);if(j(u,""),u.width="",u.height="",u.left="",u.top="",u.bottom="",u.right="","top"===p||"bottom"===p){var b=function(e,t){return z("left","offsetWidth","right",e,t)}(v,c),y=v.offsetWidth;y===s.offsetWidth?y=0:r.inkBar&&void 0!==r.inkBar.width&&(y=parseFloat(r.inkBar.width,10))&&(b+=(v.offsetWidth-y)/2),"rtl"===i&&(b=A(v,"margin-left")-b),h?j(u,"translate3d("+b+"px,0,0)"):u.left=b+"px",u.width=y+"px"}else{var m=function(e,t){return z("top","offsetHeight","bottom",e,t)}(v,c),g=v.offsetHeight;r.inkBar&&void 0!==r.inkBar.height&&(g=parseFloat(r.inkBar.height,10))&&(m+=(v.offsetHeight-g)/2),h?(j(u,"translate3d(0,"+m+"px,0)"),u.top="0"):u.top=m+"px",u.height=g+"px"}}u.display=-1!==d?"block":"none"}var oe=function(e){function t(){return d()(this,t),y()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return g()(t,e),h()(t,[{key:"componentDidMount",value:function(){var e=this;this.timeout=setTimeout((function(){ae(e,!0)}),0)}},{key:"componentDidUpdate",value:function(){ae(this)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout)}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,r=t.styles,o=t.inkBarAnimated,i=n+"-ink-bar",s=k()((e={},l()(e,i,!0),l()(e,o?i+"-animated":i+"-no-animated",!0),e));return a.a.createElement("div",{style:r.inkBar,className:s,key:"inkBar",ref:this.props.saveRef("inkBar")})}}]),t}(a.a.Component),ie=oe;oe.propTypes={prefixCls:P.a.string,styles:P.a.object,inkBarAnimated:P.a.bool,saveRef:P.a.func,direction:P.a.string},oe.defaultProps={prefixCls:"",inkBarAnimated:!0,styles:{},saveRef:function(){}};var se=n("2W6z"),ce=n.n(se),le=function(e){function t(){return d()(this,t),y()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return g()(t,e),h()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.panels,r=t.activeKey,o=t.prefixCls,i=t.tabBarGutter,c=t.saveRef,f=t.tabBarPosition,u=t.renderTabBarNode,p=t.direction,d=[];return a.a.Children.forEach(n,(function(t,v){if(t){var h=t.key,b=r===h?o+"-tab-active":"";b+=" "+o+"-tab";var y={};t.props.disabled?b+=" "+o+"-tab-disabled":y={onClick:e.props.onTabClick.bind(e,h)};var m={};r===h&&(m.ref=c("activeTab"));var g=i&&v===n.length-1?0:i,x="rtl"===p?"marginLeft":"marginRight",P=l()({},W(f)?"marginBottom":x,g);ce()("tab"in t.props,"There must be `tab` property on children of Tabs.");var C=a.a.createElement("div",s()({role:"tab","aria-disabled":t.props.disabled?"true":"false","aria-selected":r===h?"true":"false"},y,{className:b,key:h,style:P},m),t.props.tab);u&&(C=u(C)),d.push(C)}})),a.a.createElement("div",{ref:c("navTabsContainer")},d)}}]),t}(a.a.Component),fe=le;le.propTypes={activeKey:P.a.string,panels:P.a.node,prefixCls:P.a.string,tabBarGutter:P.a.number,onTabClick:P.a.func,saveRef:P.a.func,renderTabBarNode:P.a.func,tabBarPosition:P.a.string,direction:P.a.string},le.defaultProps={panels:[],prefixCls:[],tabBarGutter:null,onTabClick:function(){},saveRef:function(){}};var ue=function(e){function t(){return d()(this,t),y()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return g()(t,e),h()(t,[{key:"render",value:function(){var e=this.props,t=e.prefixCls,n=e.onKeyDown,o=e.className,i=e.extraContent,c=e.style,f=e.tabBarPosition,p=e.children,d=u()(e,["prefixCls","onKeyDown","className","extraContent","style","tabBarPosition","children"]),v=k()(t+"-bar",l()({},o,!!o)),h="top"===f||"bottom"===f,b=h?{float:"right"}:{},y=i&&i.props?i.props.style:{},m=p;return i&&(m=[Object(r.cloneElement)(i,{key:"extra",style:s()({},b,y)}),Object(r.cloneElement)(p,{key:"content"})],m=h?m:m.reverse()),a.a.createElement("div",s()({role:"tablist",className:v,tabIndex:"0",ref:this.props.saveRef("root"),onKeyDown:n,style:c},I(d)),m)}}]),t}(a.a.Component),pe=ue;ue.propTypes={prefixCls:P.a.string,className:P.a.string,style:P.a.object,tabBarPosition:P.a.oneOf(["left","right","top","bottom"]),children:P.a.node,extraContent:P.a.node,onKeyDown:P.a.func,saveRef:P.a.func},ue.defaultProps={prefixCls:"",className:"",style:{},tabBarPosition:"top",extraContent:null,children:null,onKeyDown:function(){},saveRef:function(){}};var de=n("sEfC"),ve=n.n(de),he=n("bdgK"),be=function(e){function t(e){d()(this,t);var n=y()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.prevTransitionEnd=function(e){if("opacity"===e.propertyName){var t=n.props.getRef("container");n.scrollToActiveTab({target:t,currentTarget:t})}},n.scrollToActiveTab=function(e){var t=n.props.getRef("activeTab"),r=n.props.getRef("navWrap");if((!e||e.target===e.currentTarget)&&t){var a=n.isNextPrevShown()&&n.lastNextPrevShown;if(n.lastNextPrevShown=n.isNextPrevShown(),a){var o=n.getScrollWH(t),i=n.getOffsetWH(r),s=n.offset,c=n.getOffsetLT(r),l=n.getOffsetLT(t);c>l?(s+=c-l,n.setOffset(s)):c+i<l+o&&(s-=l+o-(c+i),n.setOffset(s))}}},n.prev=function(e){n.props.onPrevClick(e);var t=n.props.getRef("navWrap"),r=n.getOffsetWH(t),a=n.offset;n.setOffset(a+r)},n.next=function(e){n.props.onNextClick(e);var t=n.props.getRef("navWrap"),r=n.getOffsetWH(t),a=n.offset;n.setOffset(a-r)},n.offset=0,n.state={next:!1,prev:!1},n}return g()(t,e),h()(t,[{key:"componentDidMount",value:function(){var e=this;this.componentDidUpdate(),this.debouncedResize=ve()((function(){e.setNextPrev(),e.scrollToActiveTab()}),200),this.resizeObserver=new he.default(this.debouncedResize),this.resizeObserver.observe(this.props.getRef("container"))}},{key:"componentDidUpdate",value:function(e){var t=this.props;if(e&&e.tabBarPosition!==t.tabBarPosition)this.setOffset(0);else{var n=this.setNextPrev();this.isNextPrevShown(this.state)!==this.isNextPrevShown(n)?this.setState({},this.scrollToActiveTab):e&&t.activeKey===e.activeKey||this.scrollToActiveTab()}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.debouncedResize&&this.debouncedResize.cancel&&this.debouncedResize.cancel()}},{key:"setNextPrev",value:function(){var e=this.props.getRef("nav"),t=this.props.getRef("navTabsContainer"),n=this.getScrollWH(t||e),r=this.getOffsetWH(this.props.getRef("container"))+1,a=this.getOffsetWH(this.props.getRef("navWrap")),o=this.offset,i=r-n,s=this.state,c=s.next,l=s.prev;if(i>=0)c=!1,this.setOffset(0,!1),o=0;else if(i<o)c=!0;else{c=!1;var f=a-n;this.setOffset(f,!1),o=f}return l=o<0,this.setNext(c),this.setPrev(l),{next:c,prev:l}}},{key:"getOffsetWH",value:function(e){var t=this.props.tabBarPosition,n="offsetWidth";return"left"!==t&&"right"!==t||(n="offsetHeight"),e[n]}},{key:"getScrollWH",value:function(e){var t=this.props.tabBarPosition,n="scrollWidth";return"left"!==t&&"right"!==t||(n="scrollHeight"),e[n]}},{key:"getOffsetLT",value:function(e){var t=this.props.tabBarPosition,n="left";return"left"!==t&&"right"!==t||(n="top"),e.getBoundingClientRect()[n]}},{key:"setOffset",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Math.min(0,e);if(this.offset!==n){this.offset=n;var r={},a=this.props.tabBarPosition,o=this.props.getRef("nav").style,i=K(o);"left"===a||"right"===a?r=i?{value:"translate3d(0,"+n+"px,0)"}:{name:"top",value:n+"px"}:i?("rtl"===this.props.direction&&(n=-n),r={value:"translate3d("+n+"px,0,0)"}):r={name:"left",value:n+"px"},i?j(o,r.value):o[r.name]=r.value,t&&this.setNextPrev()}}},{key:"setPrev",value:function(e){this.state.prev!==e&&this.setState({prev:e})}},{key:"setNext",value:function(e){this.state.next!==e&&this.setState({next:e})}},{key:"isNextPrevShown",value:function(e){return e?e.next||e.prev:this.state.next||this.state.prev}},{key:"render",value:function(){var e,t,n,r,o=this.state,i=o.next,s=o.prev,c=this.props,f=c.prefixCls,u=c.scrollAnimated,p=c.navWrapper,d=c.prevIcon,v=c.nextIcon,h=s||i,b=a.a.createElement("span",{onClick:s?this.prev:null,unselectable:"unselectable",className:k()((e={},l()(e,f+"-tab-prev",1),l()(e,f+"-tab-btn-disabled",!s),l()(e,f+"-tab-arrow-show",h),e)),onTransitionEnd:this.prevTransitionEnd},d||a.a.createElement("span",{className:f+"-tab-prev-icon"})),y=a.a.createElement("span",{onClick:i?this.next:null,unselectable:"unselectable",className:k()((t={},l()(t,f+"-tab-next",1),l()(t,f+"-tab-btn-disabled",!i),l()(t,f+"-tab-arrow-show",h),t))},v||a.a.createElement("span",{className:f+"-tab-next-icon"})),m=f+"-nav",g=k()((n={},l()(n,m,!0),l()(n,u?m+"-animated":m+"-no-animated",!0),n));return a.a.createElement("div",{className:k()((r={},l()(r,f+"-nav-container",1),l()(r,f+"-nav-container-scrolling",h),r)),key:"container",ref:this.props.saveRef("container")},b,y,a.a.createElement("div",{className:f+"-nav-wrap",ref:this.props.saveRef("navWrap")},a.a.createElement("div",{className:f+"-nav-scroll"},a.a.createElement("div",{className:g,ref:this.props.saveRef("nav")},p(this.props.children)))))}}]),t}(a.a.Component),ye=be;be.propTypes={activeKey:P.a.string,getRef:P.a.func.isRequired,saveRef:P.a.func.isRequired,tabBarPosition:P.a.oneOf(["left","right","top","bottom"]),prefixCls:P.a.string,scrollAnimated:P.a.bool,onPrevClick:P.a.func,onNextClick:P.a.func,navWrapper:P.a.func,children:P.a.node,prevIcon:P.a.node,nextIcon:P.a.node,direction:P.a.node},be.defaultProps={tabBarPosition:"left",prefixCls:"",scrollAnimated:!0,onPrevClick:function(){},onNextClick:function(){},navWrapper:function(e){return e}};var me=function(e){function t(){var e,n,r,a;d()(this,t);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return n=r=y()(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.getRef=function(e){return r[e]},r.saveRef=function(e){return function(t){t&&(r[e]=t)}},a=n,y()(r,a)}return g()(t,e),h()(t,[{key:"render",value:function(){return this.props.children(this.saveRef,this.getRef)}}]),t}(a.a.Component),ge=me;me.propTypes={children:P.a.func},me.defaultProps={children:function(){return null}};var xe=function(e){function t(){return d()(this,t),y()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return g()(t,e),h()(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=u()(e,["children"]);return a.a.createElement(ge,null,(function(e,r){return a.a.createElement(pe,s()({saveRef:e},n),a.a.createElement(ye,s()({saveRef:e,getRef:r},n),a.a.createElement(fe,s()({saveRef:e,renderTabBarNode:t},n)),a.a.createElement(ie,s()({saveRef:e,getRef:r},n))))}))}}]),t}(a.a.Component),Pe=xe;xe.propTypes={children:P.a.func};var Ce=n("CtXQ");function ke(){return(ke=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Te(e){return(Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Oe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function we(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Re(e,t){return(Re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Se(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Be(e);if(t){var a=Be(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Ne(this,n)}}function Ne(e,t){return!t||"object"!==Te(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Be(e){return(Be=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _e=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Re(e,t)}(i,e);var t,n,a,o=Se(i);function i(){return Oe(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"render",value:function(){var e,t,n=this.props,a=n.tabBarStyle,o=n.animated,i=n.renderTabBar,s=n.tabBarExtraContent,c=n.tabPosition,l=n.prefixCls,f=n.className,u=n.size,p=n.type,d="object"===Te(o)?o.inkBar:o,v="left"===c||"right"===c,h=v?"up":"left",b=v?"down":"right",y=r.createElement("span",{className:"".concat(l,"-tab-prev-icon")},r.createElement(Ce.default,{type:h,className:"".concat(l,"-tab-prev-icon-target")})),m=r.createElement("span",{className:"".concat(l,"-tab-next-icon")},r.createElement(Ce.default,{type:b,className:"".concat(l,"-tab-next-icon-target")})),g=k()("".concat(l,"-").concat(c,"-bar"),(Ee(e={},"".concat(l,"-").concat(u,"-bar"),!!u),Ee(e,"".concat(l,"-card-bar"),p&&p.indexOf("card")>=0),e),f),x=ke(ke({},this.props),{children:null,inkBarAnimated:d,extraContent:s,style:a,prevIcon:y,nextIcon:m,className:g});return t=i?i(x,Pe):r.createElement(Pe,x),r.cloneElement(t)}}])&&we(t.prototype,n),a&&we(t,a),i}(r.Component);_e.defaultProps={animated:!0,type:"line"};var je=n("H84U"),Ke=n("6CfX"),We=n("R3zJ");function Ae(){return(Ae=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function De(e){return(De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function He(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Me(e,t){return(Me=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Le(e);if(t){var a=Le(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Fe(this,n)}}function Fe(e,t){return!t||"object"!==De(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Le(e){return(Le=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ue=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},Qe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Me(e,t)}(s,e);var t,n,a,i=qe(s);function s(){var e;return ze(this,s),(e=i.apply(this,arguments)).removeTab=function(t,n){if(n.stopPropagation(),t){var r=e.props.onEdit;r&&r(t,"remove")}},e.handleChange=function(t){var n=e.props.onChange;n&&n(t)},e.createNewTab=function(t){var n=e.props.onEdit;n&&n(t,"add")},e.renderTabs=function(t){var n,a=t.getPrefixCls,o=e.props,i=o.prefixCls,s=o.className,c=void 0===s?"":s,l=o.size,f=o.type,u=void 0===f?"line":f,p=o.tabPosition,d=o.children,v=o.animated,h=void 0===v||v,b=o.hideAdd,y=e.props.tabBarExtraContent,m="object"===De(h)?h.tabPane:h;"line"!==u&&(m="animated"in e.props&&m),Object(Ke.a)(!(u.indexOf("card")>=0&&("small"===l||"large"===l)),"Tabs","`type=card|editable-card` doesn't have small or large size, it's by design.");var g=a("tabs",i),x=k()(c,(Ie(n={},"".concat(g,"-vertical"),"left"===p||"right"===p),Ie(n,"".concat(g,"-").concat(l),!!l),Ie(n,"".concat(g,"-card"),u.indexOf("card")>=0),Ie(n,"".concat(g,"-").concat(u),!0),Ie(n,"".concat(g,"-no-animation"),!m),n)),P=[];"editable-card"===u&&(P=[],r.Children.forEach(d,(function(t,n){if(!r.isValidElement(t))return t;var a=t.props.closable,o=(a=void 0===a||a)?r.createElement(Ce.default,{type:"close",className:"".concat(g,"-close-x"),onClick:function(n){return e.removeTab(t.key,n)}}):null;P.push(r.cloneElement(t,{tab:r.createElement("div",{className:a?void 0:"".concat(g,"-tab-unclosable")},t.props.tab,o),key:t.key||n}))})),b||(y=r.createElement("span",null,r.createElement(Ce.default,{type:"plus",className:"".concat(g,"-new-tab"),onClick:e.createNewTab}),y))),y=y?r.createElement("div",{className:"".concat(g,"-extra-content")},y):null;var C=Ue(e.props,[]),E=k()("".concat(g,"-").concat(p,"-content"),u.indexOf("card")>=0&&"".concat(g,"-card-content"));return r.createElement(ne,Ae({},e.props,{prefixCls:g,className:x,tabBarPosition:p,renderTabBar:function(){return r.createElement(_e,Ae({},Object(re.a)(C,["className"]),{tabBarExtraContent:y}))},renderTabContent:function(){return r.createElement(te,{className:E,animated:m,animatedWithMargin:!0})},onChange:e.handleChange}),P.length>0?P:d)},e}return t=s,(n=[{key:"componentDidMount",value:function(){var e=o.findDOMNode(this);e&&!We.b&&-1===e.className.indexOf(" no-flex")&&(e.className+=" no-flex")}},{key:"render",value:function(){return r.createElement(je.a,null,this.renderTabs)}}])&&He(t.prototype,n),a&&He(t,a),s}(r.Component);Qe.TabPane=Y,Qe.defaultProps={hideAdd:!1,tabPosition:"top"}},n1GQ:function(e,t,n){(function(t){for(var r=n("bQgK"),a="undefined"==typeof window?t:window,o=["moz","webkit"],i="AnimationFrame",s=a["request"+i],c=a["cancel"+i]||a["cancelRequest"+i],l=0;!s&&l<o.length;l++)s=a[o[l]+"Request"+i],c=a[o[l]+"Cancel"+i]||a[o[l]+"CancelRequest"+i];if(!s||!c){var f=0,u=0,p=[];s=function(e){if(0===p.length){var t=r(),n=Math.max(0,1e3/60-(t-f));f=n+t,setTimeout((function(){var e=p.slice(0);p.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(f)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(n))}return p.push({handle:++u,callback:e,cancelled:!1}),u},c=function(e){for(var t=0;t<p.length;t++)p[t].handle===e&&(p[t].cancelled=!0)}}e.exports=function(e){return s.call(a,e)},e.exports.cancel=function(){c.apply(a,arguments)},e.exports.polyfill=function(e){e||(e=a),e.requestAnimationFrame=s,e.cancelAnimationFrame=c}}).call(this,n("yLpj"))}}]);