-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path9887.9b22b69f.async.js
1 lines (1 loc) · 27.9 KB
/
9887.9b22b69f.async.js
1
"use strict";(self.webpackChunk_antv_g6_site=self.webpackChunk_antv_g6_site||[]).push([[9887],{5729:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(17082),r=n(44194),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"},a=n(51937),c=function(e,t){return r.createElement(a.Z,(0,o.Z)((0,o.Z)({},e),{},{ref:t,icon:i}))};var l=r.forwardRef(c)},9862:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(17082),r=n(44194),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"},a=n(51937),c=function(e,t){return r.createElement(a.Z,(0,o.Z)((0,o.Z)({},e),{},{ref:t,icon:i}))};var l=r.forwardRef(c)},13693:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(17082),r=n(44194),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z"}}]},name:"vertical-align-top",theme:"outlined"},a=n(51937),c=function(e,t){return r.createElement(a.Z,(0,o.Z)((0,o.Z)({},e),{},{ref:t,icon:i}))};var l=r.forwardRef(c)},44361:function(e,t,n){function o(e){return null!=e&&e===e.window}function r(e,t){var n,r;if("undefined"==typeof window)return 0;var i=t?"scrollTop":"scrollLeft",a=0;return o(e)?a=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?a=e.documentElement[i]:(e instanceof HTMLElement||e)&&(a=e[i]),e&&!o(e)&&"number"!=typeof a&&(a=null===(r=(null!==(n=e.ownerDocument)&&void 0!==n?n:e).documentElement)||void 0===r?void 0:r[i]),a}n.d(t,{F:function(){return o},Z:function(){return r}})},14380:function(e,t,n){n.d(t,{Z:function(){return a}});var o=n(2281);function r(e,t,n,o){var r=n-t;return(e/=o/2)<1?r/2*e*e*e+t:r/2*((e-=2)*e*e+2)+t}var i=n(44361);function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getContainer,a=void 0===n?function(){return window}:n,c=t.callback,l=t.duration,s=void 0===l?450:l,u=a(),d=(0,i.Z)(u,!0),f=Date.now(),v=function t(){var n=Date.now()-f,a=r(n>s?s:n,d,e,s);(0,i.F)(u)?u.scrollTo(window.pageXOffset,a):u instanceof Document||"HTMLDocument"===u.constructor.name?u.documentElement.scrollTop=a:u.scrollTop=a,n<s?(0,o.Z)(t):"function"==typeof c&&c()};(0,o.Z)(v)}},40476:function(e,t,n){n.d(t,{U:function(){return a},t:function(){return i}});var o=n(56299),r=n(2281);function i(e){var t,n=function(n){return function(){t=null,e.apply(void 0,(0,o.Z)(n))}},i=function(){if(null==t){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];t=(0,r.Z)(n(o))}};return i.cancel=function(){r.Z.cancel(t),t=null},i}function a(){return function(e,t,n){var o=n.value,r=!1;return{configurable:!0,get:function(){if(r||this===e.prototype||this.hasOwnProperty(t))return o;var n=i(o.bind(this));return r=!0,Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),r=!1,n}}}}},22065:function(e,t,n){n.d(t,{Z:function(){return H}});var o=n(11757),r=n(20173),i=n(74592),a=n(32099),c=n(27842),l=n(19567),s=n(42885),u=n(26674),d=n(6918),f=n(51865),v=n.n(f),p=n(70458),m=n(82252),h=n(44194),g=n(4635),y=n(40476),w=n(76700);function C(e){return e!==window?e.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function Z(e,t,n){if(void 0!==n&&t.top>e.top-n)return n+t.top}function k(e,t,n){if(void 0!==n&&t.bottom<e.bottom+n)return n+(window.innerHeight-t.bottom)}var b=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"],E=[];function N(e,t){if(e){var n=E.find((function(t){return t.target===e}));n?n.affixList.push(t):(n={target:e,affixList:[t],eventHandlers:{}},E.push(n),b.forEach((function(t){n.eventHandlers[t]=(0,w.Z)(e,t,(function(){n.affixList.forEach((function(e){e.lazyUpdatePosition()}))}))})))}}function x(e){var t=E.find((function(t){var n=t.affixList.some((function(t){return t===e}));return n&&(t.affixList=t.affixList.filter((function(t){return t!==e}))),n}));t&&0===t.affixList.length&&(E=E.filter((function(e){return e!==t})),b.forEach((function(e){var n=t.eventHandlers[e];n&&n.remove&&n.remove()})))}function T(e,t,n){return t=(0,s.Z)(t),(0,c.Z)(e,(0,l.Z)()?Reflect.construct(t,n||[],(0,s.Z)(e).constructor):t.apply(e,n))}var D,S=function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===("undefined"==typeof Reflect?"undefined":(0,d.Z)(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};function L(){return"undefined"!=typeof window?window:null}!function(e){e[e.None=0]="None",e[e.Prepare=1]="Prepare"}(D||(D={}));var P=function(e){function t(){var e;return(0,i.Z)(this,t),(e=T(this,t,arguments)).state={status:D.None,lastAffix:!1,prevTarget:null},e.getOffsetTop=function(){var t=e.props,n=t.offsetBottom,o=t.offsetTop;return void 0===n&&void 0===o?0:o},e.getOffsetBottom=function(){return e.props.offsetBottom},e.savePlaceholderNode=function(t){e.placeholderNode=t},e.saveFixedNode=function(t){e.fixedNode=t},e.measure=function(){var t=e.state,n=t.status,o=t.lastAffix,r=e.props.onChange,i=e.getTargetFunc();if(n===D.Prepare&&e.fixedNode&&e.placeholderNode&&i){var a=e.getOffsetTop(),c=e.getOffsetBottom(),l=i();if(l){var s={status:D.None},u=C(l),d=C(e.placeholderNode),f=Z(d,u,a),v=k(d,u,c);0===d.top&&0===d.left&&0===d.width&&0===d.height||(void 0!==f?(s.affixStyle={position:"fixed",top:f,width:d.width,height:d.height},s.placeholderStyle={width:d.width,height:d.height}):void 0!==v&&(s.affixStyle={position:"fixed",bottom:v,width:d.width,height:d.height},s.placeholderStyle={width:d.width,height:d.height}),s.lastAffix=!!s.affixStyle,r&&o!==s.lastAffix&&r(s.lastAffix),e.setState(s))}}},e.prepareMeasure=function(){e.setState({status:D.Prepare,affixStyle:void 0,placeholderStyle:void 0})},e}return(0,u.Z)(t,e),(0,a.Z)(t,[{key:"getTargetFunc",value:function(){var e=this.context.getTargetContainer,t=this.props.target;return void 0!==t?t:null!=e?e:L}},{key:"componentDidMount",value:function(){var e=this,t=this.getTargetFunc();t&&(this.timeout=setTimeout((function(){N(t(),e),e.updatePosition()})))}},{key:"componentDidUpdate",value:function(e){var t=this.state.prevTarget,n=this.getTargetFunc(),o=(null==n?void 0:n())||null;t!==o&&(x(this),o&&(N(o,this),this.updatePosition()),this.setState({prevTarget:o})),e.offsetTop===this.props.offsetTop&&e.offsetBottom===this.props.offsetBottom||this.updatePosition(),this.measure()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout),x(this),this.updatePosition.cancel(),this.lazyUpdatePosition.cancel()}},{key:"updatePosition",value:function(){this.prepareMeasure()}},{key:"lazyUpdatePosition",value:function(){var e=this.getTargetFunc(),t=this.state.affixStyle;if(e&&t){var n=this.getOffsetTop(),o=this.getOffsetBottom(),r=e();if(r&&this.placeholderNode){var i=C(r),a=C(this.placeholderNode),c=Z(a,i,n),l=k(a,i,o);if(void 0!==c&&t.top===c||void 0!==l&&t.bottom===l)return}}this.prepareMeasure()}},{key:"render",value:function(){var e=this,t=this.state,n=t.affixStyle,i=t.placeholderStyle,a=this.props,c=a.affixPrefixCls,l=a.children,s=v()((0,r.Z)({},c,!!n)),u=(0,m.Z)(this.props,["prefixCls","offsetTop","offsetBottom","target","onChange","affixPrefixCls"]);return h.createElement(p.Z,{onResize:function(){e.updatePosition()}},h.createElement("div",(0,o.Z)({},u,{ref:this.savePlaceholderNode}),n&&h.createElement("div",{style:i,"aria-hidden":"true"}),h.createElement("div",{className:s,ref:this.saveFixedNode,style:n},h.createElement(p.Z,{onResize:function(){e.updatePosition()}},l))))}}]),t}(h.Component);P.contextType=g.E_,S([(0,y.U)()],P.prototype,"updatePosition",null),S([(0,y.U)()],P.prototype,"lazyUpdatePosition",null);var H=h.forwardRef((function(e,t){var n=e.prefixCls,r=(0,h.useContext(g.E_).getPrefixCls)("affix",n),i=(0,o.Z)((0,o.Z)({},e),{affixPrefixCls:r});return h.createElement(P,(0,o.Z)({},i,{ref:t}))}))},41308:function(e,t,n){var o=n(11757),r=n(20173),i=n(42601),a=n(13693),c=n(51865),l=n.n(c),s=n(85628),u=n(76700),d=n(66744),f=n(82252),v=n(44194),p=n(4635),m=n(44361),h=n(44727),g=n(14380),y=n(40476),w=function(e){var t=e.prefixCls,n=e.rootPrefixCls,o=e.children,r=e.visible,i=v.createElement("div",{className:"".concat(t,"-content")},v.createElement("div",{className:"".concat(t,"-icon")},v.createElement(a.Z,null)));return v.createElement(s.ZP,{visible:r,motionName:"".concat(n,"-fade")},(function(e){var t=e.className;return(0,h.Tm)(o||i,(function(e){var n=e.className;return{className:l()(t,n)}}))}))},C=function(e){var t=(0,d.Z)(!1,{value:e.visible}),n=(0,i.Z)(t,2),a=n[0],c=n[1],s=v.createRef(),h=v.useRef(null),C=function(){return s.current&&s.current.ownerDocument?s.current.ownerDocument:window},Z=(0,y.t)((function(t){var n=e.visibilityHeight,o=void 0===n?400:n,r=(0,m.Z)(t.target,!0);c(r>o)}));v.useEffect((function(){var t;return t=(e.target||C)(),h.current=(0,u.Z)(t,"scroll",(function(e){Z(e)})),Z({target:t}),function(){h.current&&h.current.remove(),Z.cancel()}}),[e.target]);var k=v.useContext(p.E_),b=k.getPrefixCls,E=k.direction,N=e.prefixCls,x=e.className,T=void 0===x?"":x,D=b("back-top",N),S=b(),L=l()(D,(0,r.Z)({},"".concat(D,"-rtl"),"rtl"===E),T),P=(0,f.Z)(e,["prefixCls","className","children","visibilityHeight","target","visible"]);return v.createElement("div",(0,o.Z)({},P,{className:L,onClick:function(t){var n=e.onClick,o=e.target,r=e.duration,i=void 0===r?450:r;(0,g.Z)(0,{getContainer:o||C,duration:i}),"function"==typeof n&&n(t)},ref:s}),v.createElement(w,{prefixCls:D,rootPrefixCls:S,visible:a},e.children))};t.Z=v.memo(C)},94584:function(e,t,n){var o=n(3626),r=n(50931),i=o.ZP;i.Header=o.h4,i.Footer=o.$_,i.Content=o.VY,i.Sider=r.Z,i._InternalSiderContext=r.D,t.Z=i},33989:function(e,t,n){n.d(t,{Z:function(){return J}});var o=n(11757),r=n(73457),i=n(74592),a=n(32099),c=n(26674),l=n(3518),s=n(54665),u=n(20173),d=n(6918),f=n(44194),v=n(2281),p=n(29259),m=n(33229),h=n(10419);var g=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return{};var n=t.element,o=void 0===n?document.body:n,r={},i=Object.keys(e);return i.forEach((function(e){r[e]=o.style[e]})),i.forEach((function(t){o.style[t]=e[t]})),r};var y={},w=function(e){if(document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth||e){var t="ant-scrolling-effect",n=new RegExp("".concat(t),"g"),o=document.body.className;if(e){if(!n.test(o))return;return g(y),y={},void(document.body.className=o.replace(n,"").trim())}var r=(0,h.Z)();if(r&&(y=g({position:"relative",width:"calc(100% - ".concat(r,"px)")}),!n.test(o))){var i="".concat(o," ").concat(t);document.body.className=i.trim()}}},C=n(56299),Z=0,k=[],b="ant-scrolling-effect",E=new RegExp("".concat(b),"g"),N=new Map,x=(0,a.Z)((function e(t){var n=this;(0,i.Z)(this,e),(0,u.Z)(this,"lockTarget",void 0),(0,u.Z)(this,"options",void 0),(0,u.Z)(this,"getContainer",(function(){var e;return null===(e=n.options)||void 0===e?void 0:e.container})),(0,u.Z)(this,"reLock",(function(e){var t=k.find((function(e){return e.target===n.lockTarget}));t&&n.unLock(),n.options=e,t&&(t.options=e,n.lock())})),(0,u.Z)(this,"lock",(function(){var e;if(!k.some((function(e){return e.target===n.lockTarget})))if(k.some((function(e){var t,o=e.options;return(null==o?void 0:o.container)===(null===(t=n.options)||void 0===t?void 0:t.container)})))k=[].concat((0,C.Z)(k),[{target:n.lockTarget,options:n.options}]);else{var t=0,o=(null===(e=n.options)||void 0===e?void 0:e.container)||document.body;(o===document.body&&window.innerWidth-document.documentElement.clientWidth>0||o.scrollHeight>o.clientHeight)&&"hidden"!==getComputedStyle(o).overflow&&(t=(0,h.Z)());var r=o.className;if(0===k.filter((function(e){var t,o=e.options;return(null==o?void 0:o.container)===(null===(t=n.options)||void 0===t?void 0:t.container)})).length&&N.set(o,g({width:0!==t?"calc(100% - ".concat(t,"px)"):void 0,overflow:"hidden",overflowX:"hidden",overflowY:"hidden"},{element:o})),!E.test(r)){var i="".concat(r," ").concat(b);o.className=i.trim()}k=[].concat((0,C.Z)(k),[{target:n.lockTarget,options:n.options}])}})),(0,u.Z)(this,"unLock",(function(){var e,t=k.find((function(e){return e.target===n.lockTarget}));if(k=k.filter((function(e){return e.target!==n.lockTarget})),t&&!k.some((function(e){var n,o=e.options;return(null==o?void 0:o.container)===(null===(n=t.options)||void 0===n?void 0:n.container)}))){var o=(null===(e=n.options)||void 0===e?void 0:e.container)||document.body,r=o.className;E.test(r)&&(g(N.get(o),{element:o}),N.delete(o),o.className=o.className.replace(E,"").trim())}})),this.lockTarget=Z++,this.options=t})),T=0,D=(0,m.Z)();var S={},L=function(e){if(!D)return null;if(e){if("string"==typeof e)return document.querySelectorAll(e)[0];if("function"==typeof e)return e();if("object"===(0,d.Z)(e)&&e instanceof window.HTMLElement)return e}return document.body},P=function(e){(0,c.Z)(n,e);var t=(0,l.Z)(n);function n(e){var o;return(0,i.Z)(this,n),o=t.call(this,e),(0,u.Z)((0,s.Z)(o),"container",void 0),(0,u.Z)((0,s.Z)(o),"componentRef",f.createRef()),(0,u.Z)((0,s.Z)(o),"rafId",void 0),(0,u.Z)((0,s.Z)(o),"scrollLocker",void 0),(0,u.Z)((0,s.Z)(o),"renderComponent",void 0),(0,u.Z)((0,s.Z)(o),"updateScrollLocker",(function(e){var t=(e||{}).visible,n=o.props,r=n.getContainer,i=n.visible;i&&i!==t&&D&&L(r)!==o.scrollLocker.getContainer()&&o.scrollLocker.reLock({container:L(r)})})),(0,u.Z)((0,s.Z)(o),"updateOpenCount",(function(e){var t=e||{},n=t.visible,r=t.getContainer,i=o.props,a=i.visible,c=i.getContainer;a!==n&&D&&L(c)===document.body&&(a&&!n?T+=1:e&&(T-=1)),("function"==typeof c&&"function"==typeof r?c.toString()!==r.toString():c!==r)&&o.removeCurrentContainer()})),(0,u.Z)((0,s.Z)(o),"attachToParent",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e||o.container&&!o.container.parentNode){var t=L(o.props.getContainer);return!!t&&(t.appendChild(o.container),!0)}return!0})),(0,u.Z)((0,s.Z)(o),"getContainer",(function(){return D?(o.container||(o.container=document.createElement("div"),o.attachToParent(!0)),o.setWrapperClassName(),o.container):null})),(0,u.Z)((0,s.Z)(o),"setWrapperClassName",(function(){var e=o.props.wrapperClassName;o.container&&e&&e!==o.container.className&&(o.container.className=e)})),(0,u.Z)((0,s.Z)(o),"removeCurrentContainer",(function(){var e;null===(e=o.container)||void 0===e||null===(e=e.parentNode)||void 0===e||e.removeChild(o.container)})),(0,u.Z)((0,s.Z)(o),"switchScrollingEffect",(function(){1!==T||Object.keys(S).length?T||(g(S),S={},w(!0)):(w(),S=g({overflow:"hidden",overflowX:"hidden",overflowY:"hidden"}))})),o.scrollLocker=new x({container:L(e.getContainer)}),o}return(0,a.Z)(n,[{key:"componentDidMount",value:function(){var e=this;this.updateOpenCount(),this.attachToParent()||(this.rafId=(0,v.Z)((function(){e.forceUpdate()})))}},{key:"componentDidUpdate",value:function(e){this.updateOpenCount(e),this.updateScrollLocker(e),this.setWrapperClassName(),this.attachToParent()}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.visible,n=e.getContainer;D&&L(n)===document.body&&(T=t&&T?T-1:T),this.removeCurrentContainer(),v.Z.cancel(this.rafId)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.forceRender,o=e.visible,r=null,i={getOpenCount:function(){return T},getContainer:this.getContainer,switchScrollingEffect:this.switchScrollingEffect,scrollLocker:this.scrollLocker};return(n||o||this.componentRef.current)&&(r=f.createElement(p.Z,{getContainer:this.getContainer,ref:this.componentRef},t(i))),r}}]),n}(f.Component),H=P,M=n(17082),O=n(51865),R=n.n(O),z=n(11120),A=n(82252);var W={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},F=Object.keys(W).filter((function(e){if("undefined"==typeof document)return!1;var t=document.getElementsByTagName("html")[0];return e in(t?t.style:{})}))[0],B=W[F];function U(e,t,n,o){e.addEventListener?e.addEventListener(t,n,o):e.attachEvent&&e.attachEvent("on".concat(t),n)}function _(e,t,n,o){e.removeEventListener?e.removeEventListener(t,n,o):e.attachEvent&&e.detachEvent("on".concat(t),n)}var X=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},I=!("undefined"!=typeof window&&window.document&&window.document.createElement),V=function e(t,n,o,r){if(!n||n===document||n instanceof Document)return!1;if(n===t.parentNode)return!0;var i=Math.max(Math.abs(o),Math.abs(r))===Math.abs(r),a=Math.max(Math.abs(o),Math.abs(r))===Math.abs(o),c=n.scrollHeight-n.clientHeight,l=n.scrollWidth-n.clientWidth,s=document.defaultView.getComputedStyle(n),u="auto"===s.overflowY||"scroll"===s.overflowY,d="auto"===s.overflowX||"scroll"===s.overflowX,f=c&&u,v=l&&d;return!!(i&&(!f||f&&(n.scrollTop>=c&&r<0||n.scrollTop<=0&&r>0))||a&&(!v||v&&(n.scrollLeft>=l&&o<0||n.scrollLeft<=0&&o>0)))&&e(t,n.parentNode,o,r)},j=["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","scrollLocker","contentWrapperStyle"],Y={},K=function(e){(0,c.Z)(n,e);var t=(0,l.Z)(n);function n(e){var o;return(0,i.Z)(this,n),(o=t.call(this,e)).levelDom=void 0,o.dom=void 0,o.contentWrapper=void 0,o.contentDom=void 0,o.maskDom=void 0,o.handlerDom=void 0,o.drawerId=void 0,o.timeout=void 0,o.passive=void 0,o.startPos=void 0,o.domFocus=function(){o.dom&&o.dom.focus()},o.removeStartHandler=function(e){e.touches.length>1?o.startPos=null:o.startPos={x:e.touches[0].clientX,y:e.touches[0].clientY}},o.removeMoveHandler=function(e){if(!(e.changedTouches.length>1)&&o.startPos){var t=e.currentTarget,n=e.changedTouches[0].clientX-o.startPos.x,r=e.changedTouches[0].clientY-o.startPos.y;(t===o.maskDom||t===o.handlerDom||t===o.contentDom&&V(t,e.target,n,r))&&e.cancelable&&e.preventDefault()}},o.transitionEnd=function(e){var t=e.target;_(t,B,o.transitionEnd),t.style.transition=""},o.onKeyDown=function(e){if(e.keyCode===z.Z.ESC){var t=o.props.onClose;e.stopPropagation(),t&&t(e)}},o.onWrapperTransitionEnd=function(e){var t=o.props,n=t.open,r=t.afterVisibleChange;e.target===o.contentWrapper&&e.propertyName.match(/transform$/)&&(o.dom.style.transition="",!n&&o.getCurrentDrawerSome()&&(document.body.style.overflowX="",o.maskDom&&(o.maskDom.style.left="",o.maskDom.style.width="")),r&&r(!!n))},o.openLevelTransition=function(){var e=o.props,t=e.open,n=e.width,r=e.height,i=o.getHorizontalBoolAndPlacementName(),a=i.isHorizontal,c=i.placementName,l=o.contentDom?o.contentDom.getBoundingClientRect()[a?"width":"height"]:0,s=(a?n:r)||l;o.setLevelAndScrolling(t,c,s)},o.setLevelTransform=function(e,t,n,r){var i=o.props,a=i.placement,c=i.levelMove,l=i.duration,s=i.ease,u=i.showMask;o.levelDom.forEach((function(i){i.style.transition="transform ".concat(l," ").concat(s),U(i,B,o.transitionEnd);var d,f,v,p=e?n:0;if(c){var m=(f={target:i,open:e},v="function"==typeof(d=c)?d(f):d,Array.isArray(v)?2===v.length?v:[v[0],v[1]]:[v]);p=e?m[0]:m[1]||0}var h="number"==typeof p?"".concat(p,"px"):p,g="left"===a||"top"===a?h:"-".concat(h);g=u&&"right"===a&&r?"calc(".concat(g," + ").concat(r,"px)"):g,i.style.transform=p?"".concat(t,"(").concat(g,")"):""}))},o.setLevelAndScrolling=function(e,t,n){var r=o.props.onChange;if(!I){var i=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?(0,h.Z)(!0):0;o.setLevelTransform(e,t,n,i),o.toggleScrollingToDrawerAndBody(i)}r&&r(e)},o.toggleScrollingToDrawerAndBody=function(e){var t=o.props,n=t.getContainer,r=t.showMask,i=t.open,a=n&&n();if(a&&a.parentNode===document.body&&r){var c=["touchstart"],l=[document.body,o.maskDom,o.handlerDom,o.contentDom];i&&"hidden"!==document.body.style.overflow?(e&&o.addScrollingEffect(e),document.body.style.touchAction="none",l.forEach((function(e,t){e&&U(e,c[t]||"touchmove",t?o.removeMoveHandler:o.removeStartHandler,o.passive)}))):o.getCurrentDrawerSome()&&(document.body.style.touchAction="",e&&o.remScrollingEffect(e),l.forEach((function(e,t){e&&_(e,c[t]||"touchmove",t?o.removeMoveHandler:o.removeStartHandler,o.passive)})))}},o.addScrollingEffect=function(e){var t=o.props,n=t.placement,r=t.duration,i=t.ease,a="width ".concat(r," ").concat(i),c="transform ".concat(r," ").concat(i);switch(o.dom.style.transition="none",n){case"right":o.dom.style.transform="translateX(-".concat(e,"px)");break;case"top":case"bottom":o.dom.style.width="calc(100% - ".concat(e,"px)"),o.dom.style.transform="translateZ(0)"}clearTimeout(o.timeout),o.timeout=setTimeout((function(){o.dom&&(o.dom.style.transition="".concat(c,",").concat(a),o.dom.style.width="",o.dom.style.transform="")}))},o.remScrollingEffect=function(e){var t,n=o.props,r=n.placement,i=n.duration,a=n.ease;F&&(document.body.style.overflowX="hidden"),o.dom.style.transition="none";var c="width ".concat(i," ").concat(a),l="transform ".concat(i," ").concat(a);switch(r){case"left":o.dom.style.width="100%",c="width 0s ".concat(a," ").concat(i);break;case"right":o.dom.style.transform="translateX(".concat(e,"px)"),o.dom.style.width="100%",c="width 0s ".concat(a," ").concat(i),o.maskDom&&(o.maskDom.style.left="-".concat(e,"px"),o.maskDom.style.width="calc(100% + ".concat(e,"px)"));break;case"top":case"bottom":o.dom.style.width="calc(100% + ".concat(e,"px)"),o.dom.style.height="100%",o.dom.style.transform="translateZ(0)",t="height 0s ".concat(a," ").concat(i)}clearTimeout(o.timeout),o.timeout=setTimeout((function(){o.dom&&(o.dom.style.transition="".concat(l,",").concat(t?"".concat(t,","):"").concat(c),o.dom.style.transform="",o.dom.style.width="",o.dom.style.height="")}))},o.getCurrentDrawerSome=function(){return!Object.keys(Y).some((function(e){return Y[e]}))},o.getLevelDom=function(e){var t=e.level,n=e.getContainer;if(!I){var r,i=n&&n(),a=i?i.parentNode:null;if(o.levelDom=[],"all"===t)(a?Array.prototype.slice.call(a.children):[]).forEach((function(e){"SCRIPT"!==e.nodeName&&"STYLE"!==e.nodeName&&"LINK"!==e.nodeName&&e!==i&&o.levelDom.push(e)}));else t&&(r=t,Array.isArray(r)?r:[r]).forEach((function(e){document.querySelectorAll(e).forEach((function(e){o.levelDom.push(e)}))}))}},o.getHorizontalBoolAndPlacementName=function(){var e=o.props.placement,t="left"===e||"right"===e;return{isHorizontal:t,placementName:"translate".concat(t?"X":"Y")}},o.state={_self:(0,s.Z)(o)},o}return(0,a.Z)(n,[{key:"componentDidMount",value:function(){var e=this;if(!I){var t=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return t=!0,null}}))}catch(e){}this.passive=!!t&&{passive:!1}}var n,o=this.props,r=o.open,i=o.getContainer,a=o.showMask,c=o.autoFocus,l=i&&i();(this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(9*Math.random()).toString())).toString(16)),this.getLevelDom(this.props),r)&&(l&&l.parentNode===document.body&&(Y[this.drawerId]=r),this.openLevelTransition(),this.forceUpdate((function(){c&&e.domFocus()})),a&&(null===(n=this.props.scrollLocker)||void 0===n||n.lock()))}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.open,o=t.getContainer,r=t.scrollLocker,i=t.showMask,a=t.autoFocus,c=o&&o();n!==e.open&&(c&&c.parentNode===document.body&&(Y[this.drawerId]=!!n),this.openLevelTransition(),n?(a&&this.domFocus(),i&&(null==r||r.lock())):null==r||r.unLock())}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.open,n=e.scrollLocker;delete Y[this.drawerId],t&&(this.setLevelTransform(!1),document.body.style.touchAction=""),null==n||n.unLock()}},{key:"render",value:function(){var e,t=this,n=this.props,i=n.className,a=n.children,c=n.style,l=n.width,s=n.height,d=(n.defaultOpen,n.open),v=n.prefixCls,p=n.placement,m=(n.level,n.levelMove,n.ease,n.duration,n.getContainer,n.handler),h=(n.onChange,n.afterVisibleChange,n.showMask),g=n.maskClosable,y=n.maskStyle,w=n.onClose,C=n.onHandleClick,Z=n.keyboard,k=(n.getOpenCount,n.scrollLocker,n.contentWrapperStyle),b=(0,r.Z)(n,j),E=!!this.dom&&d,N=R()(v,(e={},(0,u.Z)(e,"".concat(v,"-").concat(p),!0),(0,u.Z)(e,"".concat(v,"-open"),E),(0,u.Z)(e,i||"",!!i),(0,u.Z)(e,"no-mask",!h),e)),x=this.getHorizontalBoolAndPlacementName().placementName,T="left"===p||"top"===p?"-100%":"100%",D=E?"":"".concat(x,"(").concat(T,")"),S=m&&f.cloneElement(m,{onClick:function(e){m.props.onClick&&m.props.onClick(),C&&C(e)},ref:function(e){t.handlerDom=e}});return f.createElement("div",(0,o.Z)({},(0,A.Z)(b,["switchScrollingEffect","autoFocus"]),{tabIndex:-1,className:N,style:c,ref:function(e){t.dom=e},onKeyDown:E&&Z?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),h&&f.createElement("div",{className:"".concat(v,"-mask"),onClick:g?w:void 0,style:y,ref:function(e){t.maskDom=e}}),f.createElement("div",{className:"".concat(v,"-content-wrapper"),style:(0,M.Z)({transform:D,msTransform:D,width:X(l)?"".concat(l,"px"):l,height:X(s)?"".concat(s,"px"):s},k),ref:function(e){t.contentWrapper=e}},f.createElement("div",{className:"".concat(v,"-content"),ref:function(e){t.contentDom=e}},a),S))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,o=t._self,r={prevProps:e};if(void 0!==n){var i=e.placement,a=e.level;i!==n.placement&&(o.contentDom=null),a!==n.level&&o.getLevelDom(e)}return r}}]),n}(f.Component),q=["defaultOpen","getContainer","wrapperClassName","forceRender","handler"],$=["visible","afterClose"],G=function(e){(0,c.Z)(n,e);var t=(0,l.Z)(n);function n(e){var o;(0,i.Z)(this,n),(o=t.call(this,e)).dom=void 0,o.onHandleClick=function(e){var t=o.props,n=t.onHandleClick,r=t.open;if(n&&n(e),void 0===r){var i=o.state.open;o.setState({open:!i})}},o.onClose=function(e){var t=o.props,n=t.onClose,r=t.open;n&&n(e),void 0===r&&o.setState({open:!1})};var r=void 0!==e.open?e.open:!!e.defaultOpen;return o.state={open:r},"onMaskClick"in e&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),o}return(0,a.Z)(n,[{key:"render",value:function(){var e=this,t=this.props,n=(t.defaultOpen,t.getContainer),i=t.wrapperClassName,a=t.forceRender,c=t.handler,l=(0,r.Z)(t,q),s=this.state.open;if(!n)return f.createElement("div",{className:i,ref:function(t){e.dom=t}},f.createElement(K,(0,o.Z)({},l,{open:s,handler:c,getContainer:function(){return e.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var u=!!c||a;return f.createElement(H,{visible:s,forceRender:u,getContainer:n,wrapperClassName:i},(function(t){var n=t.visible,i=t.afterClose,a=(0,r.Z)(t,$);return f.createElement(K,(0,o.Z)({},l,a,{open:void 0!==n?n:s,afterVisibleChange:void 0!==i?i:l.afterVisibleChange,handler:c,onClose:e.onClose,onHandleClick:e.onHandleClick}))}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,o={prevProps:e};return void 0!==n&&e.open!==n.open&&(o.open=e.open),o}}]),n}(f.Component);G.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:f.createElement("div",{className:"drawer-handle"},f.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1,autoFocus:!0};var J=G}}]);