@arco-design/mobile-react 2.27.2 → 2.27.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/tabs/index.js +5 -2
- package/cjs/tabs/style/css/index.css +4 -0
- package/cjs/tabs/style/index.less +5 -0
- package/cjs/tabs/tab-pane.js +49 -12
- package/cjs/tabs/type.d.ts +7 -1
- package/dist/index.js +79 -38
- package/dist/index.min.js +2 -2
- package/dist/style.css +4 -0
- package/dist/style.min.css +1 -1
- package/esm/tabs/index.js +5 -2
- package/esm/tabs/style/css/index.css +4 -0
- package/esm/tabs/style/index.less +5 -0
- package/esm/tabs/tab-pane.js +49 -11
- package/esm/tabs/type.d.ts +7 -1
- package/package.json +3 -3
- package/umd/tabs/index.js +5 -2
- package/umd/tabs/style/css/index.css +4 -0
- package/umd/tabs/style/index.less +5 -0
- package/umd/tabs/tab-pane.js +49 -12
- package/umd/tabs/type.d.ts +7 -1
package/dist/index.min.js
CHANGED
@@ -16,7 +16,7 @@ e.exports=function(){function e(e){var t=typeof e;return null!==e&&("object"===t
|
|
16
16
|
*/
|
17
17
|
e.exports=function(){function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function t(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,o=void 0,i=void 0,a=function(e,t){y[r]=e,y[r+1]=t,2===(r+=2)&&(i?i(E):C())};function l(e){i=e}function u(e){a=e}var c="undefined"!=typeof window?window:void 0,s=c||{},d=s.MutationObserver||s.WebKitMutationObserver,f="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),v="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function m(){return function(){return process.nextTick(E)}}function h(){return void 0!==o?function(){o(E)}:b()}function p(){var e=0,t=new d(E),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function g(){var e=new MessageChannel;return e.port1.onmessage=E,function(){return e.port2.postMessage(0)}}function b(){var e=setTimeout;return function(){return e(E,1)}}var y=new Array(1e3);function E(){for(var e=0;e<r;e+=2)(0,y[e])(y[e+1]),y[e]=void 0,y[e+1]=void 0;r=0}function w(){try{var e=Function("return this")().require("vertx");return o=e.runOnLoop||e.runOnContext,h()}catch(e){return b()}}var C=void 0;function x(e,t){var n=this,r=new this.constructor(k);void 0===r[N]&&Y(r);var o=n._state;if(o){var i=arguments[o-1];a((function(){return j(o,r,i,n._result)}))}else F(n,r,e,t);return r}function T(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(k);return A(n,e),n}C=f?m():d?p():v?g():void 0===c?w():b();var N=Math.random().toString(36).substring(2);function k(){}var S=void 0,R=1,M=2;function L(){return new TypeError("You cannot resolve a promise with itself")}function O(){return new TypeError("A promises callback cannot return that same promise.")}function _(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function I(e,t,n){a((function(e){var r=!1,o=_(n,t,(function(n){r||(r=!0,t!==n?A(e,n):H(e,n))}),(function(t){r||(r=!0,V(e,t))}),"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,V(e,o))}),e)}function B(e,t){t._state===R?H(e,t._result):t._state===M?V(e,t._result):F(t,void 0,(function(t){return A(e,t)}),(function(t){return V(e,t)}))}function D(e,n,r){n.constructor===e.constructor&&r===x&&n.constructor.resolve===T?B(e,n):void 0===r?H(e,n):t(r)?I(e,n,r):H(e,n)}function A(t,n){if(t===n)V(t,L());else if(e(n)){var r=void 0;try{r=n.then}catch(e){return void V(t,e)}D(t,n,r)}else H(t,n)}function P(e){e._onerror&&e._onerror(e._result),z(e)}function H(e,t){e._state===S&&(e._result=t,e._state=R,0!==e._subscribers.length&&a(z,e))}function V(e,t){e._state===S&&(e._state=M,e._result=t,a(P,e))}function F(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+R]=n,o[i+M]=r,0===i&&e._state&&a(z,e)}function z(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)r=t[a],o=t[a+n],r?j(n,r,o,i):o(i);e._subscribers.length=0}}function j(e,n,r,o){var i=t(r),a=void 0,l=void 0,u=!0;if(i){try{a=r(o)}catch(e){u=!1,l=e}if(n===a)return void V(n,O())}else a=o;n._state!==S||(i&&u?A(n,a):!1===u?V(n,l):e===R?H(n,a):e===M&&V(n,a))}function q(e,t){try{t((function(t){A(e,t)}),(function(t){V(e,t)}))}catch(t){V(e,t)}}var W=0;function X(){return W++}function Y(e){e[N]=W++,e._state=void 0,e._result=void 0,e._subscribers=[]}function G(){return new Error("Array Methods must be provided an Array")}var U=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(k),this.promise[N]||Y(this.promise),n(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?H(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&H(this.promise,this._result))):V(this.promise,G())}return e.prototype._enumerate=function(e){for(var t=0;this._state===S&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===T){var o=void 0,i=void 0,a=!1;try{o=e.then}catch(e){a=!0,i=e}if(o===x&&e._state!==S)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===ee){var l=new n(k);a?V(l,i):D(l,e,o),this._willSettleAt(l,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===S&&(this._remaining--,e===M?V(r,n):this._result[t]=n),0===this._remaining&&H(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;F(e,void 0,(function(e){return n._settledAt(R,t,e)}),(function(e){return n._settledAt(M,t,e)}))},e}();function K(e){return new U(this,e).promise}function Z(e){var t=this;return n(e)?new t((function(n,r){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(n,r)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))}function $(e){var t=new this(k);return V(t,e),t}function J(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Q(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var ee=function(){function e(t){this[N]=X(),this._result=this._state=void 0,this._subscribers=[],k!==t&&("function"!=typeof t&&J(),this instanceof e?q(this,t):Q())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var n=this,r=n.constructor;return t(e)?n.then((function(t){return r.resolve(e()).then((function(){return t}))}),(function(t){return r.resolve(e()).then((function(){throw t}))})):n.then(e,e)},e}();function te(){var e=void 0;if(void 0!==ve)e=ve;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=ee}return ee.prototype.then=x,ee.all=K,ee.race=Z,ee.resolve=T,ee.reject=$,ee._setScheduler=l,ee._setAsap=u,ee._asap=a,ee.polyfill=te,ee.Promise=ee,ee}()}));function $o(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,a=e.style,l=c(e,["className","useCurrentColor","style"]);return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("svg",u({className:t+"-icon "+t+"-icon-minus "+n,width:"1em",height:"1em",style:a,fill:o?"currentColor":"#000",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},l),i.default.createElement("defs",null),i.default.createElement("path",{d:"M115.2 467.2h819.2c6.4 0 6.4 6.4 6.4 6.4V544c0 6.4-6.4 6.4-6.4 6.4H96c-6.4 0-6.4-6.4-6.4-6.4v-64c0-6.4 6.4-6.4 6.4-6.4 6.4-6.4 6.4-6.4 19.2-6.4z"}))}))}function Jo(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,a=e.style,l=c(e,["className","useCurrentColor","style"]);return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("svg",u({className:t+"-icon "+t+"-icon-search "+n,width:"1em",height:"1em",style:a,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},l),i.default.createElement("path",{fill:o?"currentColor":"#000",d:"M469.333 106.667C669.632 106.667 832 269.035 832 469.333c0 75.712-23.19 146.006-62.87 204.16l144.683 144.683a21.333 21.333 0 010 30.165l-36.202 36.203a21.333 21.333 0 01-30.166 0L706.56 743.68A361.259 361.259 0 01469.333 832c-200.298 0-362.666-162.368-362.666-362.667s162.368-362.666 362.666-362.666zm0 89.6c-150.826 0-273.066 122.24-273.066 273.066S318.507 742.4 469.333 742.4 742.4 620.16 742.4 469.333 620.16 196.267 469.333 196.267z"}))}))}function Qo(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,a=e.style,l=c(e,["className","useCurrentColor","style"]);return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("svg",u({className:t+"-icon "+t+"-icon-close "+n,width:"1em",height:"1em",style:a,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},l),i.default.createElement("path",{fill:o?"currentColor":"#000",d:"M509.568 447.083L796.16 160.469a21.333 21.333 0 0130.165 0l30.166 30.166a21.333 21.333 0 010 30.186L569.899 507.435l286.613 286.592a21.333 21.333 0 010 30.165l-30.165 30.165a21.333 21.333 0 01-30.166 0L509.568 567.765 222.933 854.38a21.333 21.333 0 01-30.186 0l-30.166-30.166a21.333 21.333 0 010-30.165l286.614-286.613L162.603 220.8a21.333 21.333 0 010-30.187l30.165-30.165a21.333 21.333 0 0130.187 0l286.613 286.613z"}))}))}function ei(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,a=e.style,l=c(e,["className","useCurrentColor","style"]);return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("svg",u({className:t+"-icon "+t+"-icon-add "+n,width:"1em",height:"1em",style:a,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},l),i.default.createElement("path",{fill:o?"currentColor":"#000",d:"M527.317 85.333c9.515 0 12.95.982 16.427 2.859a19.337 19.337 0 018.064 8.064c1.877 3.477 2.859 6.912 2.859 16.427v356.65h356.65c9.515 0 12.95.982 16.427 2.859a19.337 19.337 0 018.064 8.064c1.877 3.477 2.859 6.912 2.859 16.427v30.634c0 9.515-.982 12.95-2.859 16.427a19.392 19.392 0 01-8.064 8.064c-3.477 1.877-6.912 2.859-16.427 2.859h-356.65v356.65c0 9.515-.982 12.95-2.859 16.427a19.392 19.392 0 01-8.064 8.064c-3.477 1.877-6.912 2.859-16.427 2.859h-30.634c-9.515 0-12.95-.982-16.427-2.859a19.392 19.392 0 01-8.064-8.064c-1.877-3.477-2.859-6.912-2.859-16.427l-.021-356.65h-356.63c-9.514 0-12.949-.982-16.426-2.859a19.392 19.392 0 01-8.064-8.064c-1.877-3.477-2.859-6.912-2.859-16.427v-30.634c0-9.515.982-12.95 2.859-16.427a19.392 19.392 0 018.064-8.064c3.477-1.877 6.912-2.859 16.427-2.859l356.65-.021v-356.63c0-9.514.982-12.949 2.859-16.426a19.392 19.392 0 018.064-8.064c3.477-1.877 6.912-2.859 16.427-2.859h30.634z"}))}))}function ti(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,a=e.style,l=c(e,["className","useCurrentColor","style"]);return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("svg",u({className:t+"-icon "+t+"-icon-success-circle "+n,width:"1em",height:"1em",style:a,fill:o?"currentColor":"#000",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},l),i.default.createElement("path",{d:"M12 24C5.4 24 0 18.6 0 12S5.4 0 12 0s12 5.4 12 12-5.4 12-12 12zm0-22.5C6.2 1.5 1.5 6.2 1.5 12S6.2 22.5 12 22.5 22.5 17.8 22.5 12 17.8 1.5 12 1.5z"}),i.default.createElement("path",{d:"M17.5 8c-.3-.3-.7-.3-1 0l-6.3 6.3-3-3c-.3-.3-.7-.3-1 0-.3.3-.3.7 0 1l3.5 3.5c.1.1.3.2.4.2s.4-.1.5-.2L17.5 9c.2-.3.2-.7 0-1z"}))}))}function ni(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,a=e.style,l=c(e,["className","useCurrentColor","style"]);return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("svg",u({className:t+"-icon "+t+"-icon-warn-circle "+n,width:"1em",height:"1em",style:a,fill:o?"currentColor":"#000",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},l),i.default.createElement("path",{d:"M12 24C5.4 24 0 18.6 0 12S5.4 0 12 0s12 5.4 12 12-5.4 12-12 12zm0-22.5C6.2 1.5 1.5 6.2 1.5 12S6.2 22.5 12 22.5 22.5 17.8 22.5 12 17.8 1.5 12 1.5z"}),i.default.createElement("path",{d:"M11.8 15.2h.3c.4 0 .7-.3.7-.7V7.2c0-.4-.3-.7-.7-.7h-.3c-.4 0-.7.3-.7.7v7.3c0 .4.3.7.7.7zM12.2 16.5h-.3c-.4 0-.7.3-.7.7v.3c0 .4.3.7.7.7h.3c.4 0 .7-.3.7-.7v-.3c0-.4-.3-.7-.7-.7z"}))}))}function ri(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,a=e.style,l=c(e,["className","useCurrentColor","style"]);return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("svg",u({className:t+"-icon "+t+"-icon-error-circle "+n,width:"1em",height:"1em",style:a,fill:o?"currentColor":"#000",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},l),i.default.createElement("path",{d:"M12 24C5.4 24 0 18.6 0 12S5.4 0 12 0s12 5.4 12 12-5.4 12-12 12zm0-22.5C6.2 1.5 1.5 6.2 1.5 12S6.2 22.5 12 22.5 22.5 17.8 22.5 12 17.8 1.5 12 1.5z"}),i.default.createElement("path",{d:"M13.1 12l3.7-3.7c.3-.3.3-.7 0-1l-.1-.1c-.3-.3-.7-.3-1 0L12 10.9 8.3 7.2c-.3-.3-.7-.3-1 0l-.1.1c-.3.3-.3.7 0 1l3.7 3.7-3.7 3.7c-.3.3-.3.7 0 1l.1.1c.2.1.3.2.5.2s.4-.1.5-.2l3.7-3.7 3.7 3.7c.3.3.7.3 1 0l.1-.1c.3-.3.3-.7 0-1L13.1 12z"}))}))}function oi(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,a=e.style,l=c(e,["className","useCurrentColor","style"]);return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("svg",u({className:t+"-icon "+t+"-icon-check-bold "+n,width:"1em",height:"1em",style:a,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -0.97 10.07 10.07"},l),i.default.createElement("g",{"data-name":"图层 2"},i.default.createElement("path",{d:"M9.22.12a.49.49 0 00-.7.06L3.86 5.69 1.4 3.57a.51.51 0 00-.71.06l-.57.66A.49.49 0 00.17 5L3 7.38v.07l.69.55a.53.53 0 00.71 0l.6-.71a.22.22 0 000-.08l5-5.82a.51.51 0 00-.11-.71z",fill:o?"currentColor":"#000",fillRule:"evenodd","data-name":"图层 1"})))}))}function ii(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,a=e.style,l=c(e,["className","useCurrentColor","style"]);return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("svg",u({className:t+"-icon "+t+"-icon-close-bold "+n,width:"1em",height:"1em",style:a,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6.92 6.92"},l),i.default.createElement("g",{"data-name":"图层 2"},i.default.createElement("path",{d:"M6.16.15l.62.62a.5.5 0 010 .7l-2 2 2 2a.51.51 0 010 .71l-.62.62a.51.51 0 01-.71 0l-2-2-2 2a.5.5 0 01-.7 0l-.6-.64a.5.5 0 010-.71l2-2-2-2a.48.48 0 010-.7l.62-.6a.48.48 0 01.7 0l2 2 2-2a.5.5 0 01.69 0z",fill:o?"currentColor":"#000",fillRule:"evenodd","data-name":"图层 1"})))}))}function ai(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,a=e.style,l=c(e,["className","useCurrentColor","style"]);return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("svg",u({className:t+"-icon "+t+"-icon-keyboard "+n,width:"1em",height:"1em",style:a,version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0",y:"0",viewBox:"0 0 26 26",xmlSpace:"preserve"},l),i.default.createElement("path",{d:"M15.9 21.7l-2.5 2.5c-.2.2-.5.2-.7 0l-2.5-2.5c-.3-.3-.1-.9.4-.9h5C16 20.9 16.2 21.4 15.9 21.7zM23.1 19.5H2.9c-1.1 0-2-.9-2-2V4.8c0-1.1.9-2 2-2h20.1c1.1 0 2 .9 2 2v12.7C25.1 18.6 24.2 19.5 23.1 19.5zM2.9 4.8L2.9 4.8v12.7h20.1V4.8H2.9z",fill:o?"currentColor":"#1d2129"}),i.default.createElement("path",{d:"M10.6,6.6H8.2V9h2.4V6.6z M4.5,6.6H7V9H4.5V6.6z M8.8,10.2H6.4v2.4h2.4V10.2z M16,10.2h-2.4v2.4H16V10.2z M10,10.2h2.4v2.4H10V10.2z M19.6,10.2h-2.4v2.4h2.4V10.2z M11.8,6.6h2.4V9h-2.4V6.6z M17.8,6.6h-2.4V9h2.4V6.6z M19,6.6h2.4V9H19\tV6.6z M17.8,13.8H8.2v1.8h9.7V13.8z",fillRule:"evenodd",clipRule:"evenodd",fill:o?"currentColor":"#1d2129"}))}))}function li(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,a=e.style,l=c(e,["className","useCurrentColor","style"]);return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("svg",u({className:t+"-icon "+t+"-icon-keyboard-delete "+n,width:"1em",height:"1em",style:a,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 26"},l),i.default.createElement("path",{d:"M23.1,21.4H8.3c-0.6,0-1.2-0.3-1.6-0.8l-4.9-6.4c-0.5-0.7-0.5-1.7,0-2.4l4.9-6.4c0.4-0.5,1-0.8,1.6-0.8h14.8\tc1.1,0,2,0.9,2,2v12.7C25.1,20.5,24.2,21.4,23.1,21.4z M8.3,6.6L3.4,13l4.9,6.4h14.8V6.6H8.3z",fill:o?"currentColor":"#1d2129"}),i.default.createElement("path",{d:"M11.3,9.4c0.4-0.4,1-0.4,1.3,0l2.5,2.5l2.5-2.5c0.4-0.4,1-0.4,1.3,0c0.4,0.4,0.4,1,0,1.3l-2.5,2.5l2.3,2.3\tc0.4,0.4,0.4,1,0,1.3c-0.4,0.4-1,0.4-1.3,0l-2.3-2.3L12.7,17c-0.4,0.4-1,0.4-1.3,0c-0.4-0.4-0.4-1,0-1.3l2.4-2.4l-2.5-2.5\tC10.9,10.4,10.9,9.8,11.3,9.4z",fillRule:"evenodd",clipRule:"evenodd",fill:o?"currentColor":"#1d2129"}))}))}function ui(){return i.default.createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none"},i.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 0C14.2239 0 14 0.223857 14 0.5V14H0.5C0.223858 14 0 14.2239 0 14.5V15.5C0 15.7761 0.223857 16 0.5 16H14V29.5C14 29.7761 14.2239 30 14.5 30H15.5C15.7761 30 16 29.7761 16 29.5V16H29.5C29.7761 16 30 15.7761 30 15.5V14.5C30 14.2239 29.7761 14 29.5 14H16V0.5C16 0.223858 15.7761 0 15.5 0H14.5Z",fill:"#C9CDD4"}))}var ci=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.accept,c=void 0===l?"image/*":l,s=e.multiple,d=void 0!==s&&s,v=e.capture,m=e.columns,h=void 0===m?3:m,p=e.gutter,g=void 0===p?8:p,b=e.limit,y=void 0===b?0:b,w=e.images,C=void 0===w?[]:w,x=e.maxSize,T=e.disabled,N=e.deleteIcon,k=e.selectIcon,S=e.hideDelete,R=void 0!==S&&S,M=e.hideSelect,L=void 0!==M&&M,O=e.alwaysShowSelect,_=void 0!==O&&O,I=e.imageProps,B=e.renderLoading,D=e.renderError,A=e.onLongPress,P=e.onClick,H=e.onChange,V=void 0===H?function(){return null}:H,F=e.onMaxSizeExceed,z=e.onLimitExceed,j=e.upload,q=e.selectAdapter,W=e.onSelectClick,X=e.onDeleteClick,Y=t.useRef(null),G=t.useRef(null),U=t.useRef([]);t.useImperativeHandle(n,(function(){return{dom:Y.current}}));var K,Z=function(e,t){var n=Array.prototype.filter.call(e.target.files||[],(function(e){return!(x&&e.size>1024*x)||(F&&F(e),!1)}))||[];t||(e.target.value=""),0!==y&&n.length+C.length>y&&(z&&z(n),n.length=y-C.length),Zo.Promise.all(n.map((function(e){return function(e){return new Zo.Promise((function(t,n){if(e.url)t(e.url);else{var r=new FileReader;r.onload=function(e){var r,o=null===(r=e.target)||void 0===r?void 0:r.result;o||n(new Error("file parse error")),t(o)},r.onerror=function(){n(new Error("file parse error"))},r.readAsDataURL(e)}}))}(e)}))).then((function(e){var t=e.map((function(e,t){return{url:e,status:"function"==typeof j?"loading":"loaded",file:n[t]}}));U.current=f(C,t),V(f(U.current)),"function"==typeof j&&n.forEach((function(e){j(U.current.find((function(t){return t.file===e}))).then((function(t){var n=U.current.findIndex((function(t){return t.file===e}));U.current[n]=u(u(u({},U.current[n]),t),{status:void 0})})).catch((function(){var t=U.current.findIndex((function(t){return t.file===e}));U.current[t].status="error"})).finally((function(){V(f(U.current))}))}))}))},$=function(e,t,n){clearTimeout(K),0!==K&&(null==P||P(e,t,n))},Q=function(e){var t;e.target!==G.current&&(W&&W(),q?q().then((function(e){var t=e.files;return Z({target:{files:t}},!0)})):null===(t=G.current)||void 0===t||t.click())},ee=function(e,t){var n,r=function(n){return D?"function"==typeof D?D(n):D:i.default.createElement("div",{className:e+"-image-picker-error"},i.default.createElement("p",null,t.ImagePicker.loadError))},o=function(e){return B?"function"==typeof B?B(e):B:null},a=(y&&y<C.length?C.slice(0,y):C).map((function(t,n){var a=t.url,l=t.status;return{img:i.default.createElement("div",{key:n+"-"+a,className:e+"-image-picker-image"},i.default.createElement("div",{onTouchStart:function(e){return function(e,t,n){K=setTimeout((function(){K=0,null==A||A(e,t,n)}),750)}(e,t,n)},onClick:function(e){return $(e,t,n)},className:e+"-image-picker-image-container"},i.default.createElement(Dt,u({showLoading:!0,showError:!0},I||{},{src:a,errorArea:r(n),loadingArea:o(n),status:l||(null==I?void 0:I.status)})),i.default.createElement("div",{className:e+"-image-picker-image-mask"})),!R&&i.default.createElement("div",{className:e+"-image-picker-close",onClick:function(){return function(e){X&&X(e),V(C.filter((function(t,n){return n!==e})))}(n)}},N||i.default.createElement("div",{className:e+"-image-picker-close-icon"},i.default.createElement(Qo,null)))),title:""}})),l=!L&&C.length<(y||1/0),s=T||_&&!l;return(l||_)&&a.push({img:i.default.createElement("div",{className:E(e+"-image-picker-add",(n={},n[e+"-image-picker-add-disabled"]=s,n)),onClick:Q},i.default.createElement("div",{className:e+"-image-picker-add-container"},k||i.default.createElement("div",{className:e+"-image-picker-add-icon"},i.default.createElement(ui,null)),q?null:i.default.createElement("input",{capture:v,accept:c,multiple:d,type:"file",onChange:function(e){return Z(e)},ref:G}))),title:""}),a};return i.default.createElement(ke,null,(function(e){var t,n=e.prefixCls,r=e.locale,l=void 0===r?J:r;return i.default.createElement("div",{className:E(n+"-image-picker",o,(t={},t[n+"-image-picker-disabled"]=T,t)),style:a,ref:Y},i.default.createElement("div",{className:n+"-image-picker-container"},i.default.createElement(To,{data:ee(n,l),gutter:g,columns:h})))}))})),si=G(ci,"ImagePicker");
|
18
18
|
/*!
|
19
|
-
* @arco-design/transformable v1.0.
|
19
|
+
* @arco-design/transformable v1.0.1
|
20
20
|
* (c) 2022 ludan.kibbon
|
21
21
|
*/
|
22
|
-
function di(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fi(){return fi=Object.assign?Object.assign.bind():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},fi.apply(this,arguments)}var vi=17,mi="always",hi="hybrid",pi="animation",gi="translate-first",bi="scale-first";function yi(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Ei(e){return e instanceof Number?[e]:[].concat(e instanceof Array?e:e.valueOf())}var wi=function(){function e(t){var n=this;di(this,"operatorAdd",(function(t){var r=(t=Ei(t)).length>=n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e+(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),di(this,"operatorSub",(function(t){var r=(t=Ei(t)).length>n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e-(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),di(this,"operatorMul",(function(t){var r=(t=Ei(t)).length>n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e*(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),di(this,"operatorDiv",(function(t){var r=(t=Ei(t)).length>n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e/(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),this.x=Ei(t)||[]}var t=e.prototype;return t.get=function(e){return this.x[e]},t.v=function(){return[].concat(this.x)},t.size=function(){return this.x.length},t.valueOf=function(){return this.x.valueOf()},t.toString=function(){return this.x.toString()},t.mul=function(e){if((e=this.convert(e)).length!==this.x.length)throw new Error("Can not process vector inner-product, input vector dim "+e.length+" don't match resource vector dim "+this.x.length);var t=0;return this.x.forEach((function(n,r){return t+=n+e[r]})),t},e}();function Ci(e,t){return"number"==typeof e?{R:e,I:0}:e.isComplex?e:{R:t,I:0}}var xi=function(){function e(t,n){var r=this;void 0===n&&(n=0),di(this,"operatorAdd",(function(t){return t=Ci(t,0),new e(r.R+t.R,r.I+t.I)})),di(this,"operatorSub",(function(t){return t=Ci(t,0),new e(r.R-t.R,r.I-t.I)})),di(this,"operatorMul",(function(t){return t=Ci(t,1),new e(r.R*t.R-r.I*t.I,r.I*t.R+r.R*t.I)})),di(this,"operatorDiv",(function(t){t=Ci(t,1);var n=Math.pow(t.R,2)+Math.pow(t.I,2);return new e((r.R*t.R+r.I*t.I)/n,(r.I*t.R-r.R*t.I)/n)})),di(this,"operatorPow",(function(t){var n=r.z();if(0===n)return new e(0);var o=Math.acos(r.R/n)*t;return new e((n=Math.pow(n,t))*Math.cos(o),n*Math.sin(o))})),"number"==typeof t?(this.R=Number(t),this.I=Number(n)):t.isComplex&&(this.R=t.r(),this.I=t.i()),this.isComplex=!0}var t=e.prototype;return t.valueOf=function(){return this.R.valueOf()},t.toString=function(){return this.R.toFixed(3)+"+"+this.I.toFixed(3)+"i"},t.isNaN=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){return isNaN(this.R)||isNaN(this.I)})),t.isReal=function(){return 0===this.I&&!this.isNaN()},t.inRangeR=function(e,t){return this.R<=t&&this.R>=e},t.inRangeI=function(e,t){return this.I<=t&&this.I>=e},t.setR=function(e){this.R=Number(e)},t.setI=function(e){this.I=Number(e)},t.r=function(){return this.R},t.i=function(){return this.I},t.z=function(){return Math.sqrt(Math.pow(this.R,2)+Math.pow(this.I,2))},t.theta=function(){var e=this.z();return Math.acos(this.R/e)},e}(),Ti={add:function(e,t){return e.operatorAdd?e.operatorAdd(t):e+t},sub:function(e,t){return e.operatorSub?e.operatorSub(t):e-t},mul:function(e,t){return e.operatorMul?e.operatorMul(t):e*t},div:function(e,t){return e.operatorDiv?e.operatorDiv(t):e/t},pow:function(e,t){return e.operatorPow?e.operatorPow(t):Math.pow(e,t)},binaryAnd:function(e,t){return e.operatorBinaryAnd?e.operatorBinaryAnd(t):e&t},binaryOr:function(e,t){return e.operatorBinaryOr?e.operatorBinaryOr(t):e|t},binaryXor:function(e,t){return e.operatorBinaryXor?e.operatorBinaryXor(t):e^t},binaryLShift:function(e,t){return e.operatorBinaryLShift?e.operatorBinaryLShift(t):e<<t},binaryRShift:function(e,t){return e.operatorBinaryRShift?e.operatorBinaryRShift(t):e>>t},less:function(e,t){return e.operatorLess?e.operatorLess(t):t.operatorGreater?t.operatorGreater(e):e.operatorGreaterEqual?!e.operatorGreaterEqual(t):e<t},greater:function(e,t){return e.operatorGreater?e.operatorGreater(t):t.operatorLess?t.operatorLess(e):e.operatorLessEqual?!e.operatorLessEqual(t):e>t},lessEqual:function(e,t){return e.operatorLessEqual?e.operatorLessEqual(t):t.operatorGreaterEqual?t.operatorGreaterEqual(e):e.operatorGreater?!e.operatorGreater(t):e<=t},greaterEqual:function(e,t){return e.operatorGreaterEqual?e.operatorGreaterEqual(t):t.operatorLessEqual?t.operatorLessEqual(e):e.operatorLess?!e.operatorLess(t):e>=t},equal:function(e,t){return e.operatorEqual?e.operatorEqual(t):e.operatorNotEqual?!e.operatorNotEqual(t):t.operatorEqual?t.operatorEqual(e):t.operatorNotEqual?!t.operatorNotEqual(e):e==t},notEqual:function(e,t){return e.operatorNotEqual?e.operatorNotEqual(t):e.operatorEqual?!e.operatorEqual(t):t.operatorNotEqual?t.operatorNotEqual(e):t.operatorEqual?!t.operatorEqual(e):e!=t}};function Ni(e){return e>=0?Math.sqrt(e):new xi(0,Math.sqrt(-e))}var ki=Math.sqrt(3),Si=Math.pow(2,1/3),Ri=Ni(-1),Mi=new xi(0).operatorSub(Ri);function Li(e,t,n,r){if(void 0===r&&(r=!0),t===n&&0===t)return Math.pow(e,Ti.div(1,3));var o=function(e,t,n){var r=-3*t+3*n-1,o=-(2*t-n)/r,i=-9*Math.pow(t,2)+9*n*t+9*t-9*Math.pow(n,2),a=3*r,l=Si*a,u=54*Math.pow(t,3)-243*e*Math.pow(t,2)-81*n*Math.pow(t,2)+162*Math.pow(t,2)-81*Math.pow(n,2)*t-162*e*t+486*e*n*t-81*n*t+54*Math.pow(n,3)-243*e*Math.pow(n,2)-27*e+162*e*n;return[4*Math.pow(i,3)+Math.pow(u,2),u,o,i,a,l]}(e,t,n),i=o[0],a=o[1],l=o[2],u=o[3],c=o[4],s=o[5],d=Ti.pow(new xi(Ti.add(Ni(i),a)),Ti.div(1,3)),f=Ti.add(Ti.sub(Ti.div(d,s),Ti.div(new xi(Ti.mul(Si,u)),Ti.mul(d,c))),l),v=[];Ti.lessEqual(i,1e-12)?([f,Ti.add(Ti.add(Ti.div(Ti.mul(Ti.sub(Ti.mul(Ri,ki),1),d),Ti.mul(2,s)),Ti.div(Ti.mul(Ti.add(Ti.mul(Ri,ki),1),u),Ti.mul(Ti.mul(d,s),Si))),l),Ti.add(Ti.add(Ti.div(Ti.mul(Ti.sub(Ti.mul(Mi,ki),1),d),Ti.mul(2,s)),Ti.div(Ti.mul(Ti.add(Ti.mul(Mi,ki),1),u),Ti.mul(Ti.mul(d,s),Si))),l)].forEach((function(e){e.inRangeR(0,1)&&v.push(e.r())})),v.sort()):v.push(f.r());return r?v[0]:v}var Oi={add:function(e,t){return e.operatorAdd?e.operatorAdd(t):e+t},sub:function(e,t){return e.operatorSub?e.operatorSub(t):e-t},mul:function(e,t){return e.operatorMul?e.operatorMul(t):e*t},div:function(e,t){return e.operatorDiv?e.operatorDiv(t):e/t},pow:function(e,t){return e.operatorPow?e.operatorPow(t):Math.pow(e,t)},binaryAnd:function(e,t){return e.operatorBinaryAnd?e.operatorBinaryAnd(t):e&t},binaryOr:function(e,t){return e.operatorBinaryOr?e.operatorBinaryOr(t):e|t},binaryXor:function(e,t){return e.operatorBinaryXor?e.operatorBinaryXor(t):e^t},binaryLShift:function(e,t){return e.operatorBinaryLShift?e.operatorBinaryLShift(t):e<<t},binaryRShift:function(e,t){return e.operatorBinaryRShift?e.operatorBinaryRShift(t):e>>t},less:function(e,t){return e.operatorLess?e.operatorLess(t):t.operatorGreater?t.operatorGreater(e):e.operatorGreaterEqual?!e.operatorGreaterEqual(t):e<t},greater:function(e,t){return e.operatorGreater?e.operatorGreater(t):t.operatorLess?t.operatorLess(e):e.operatorLessEqual?!e.operatorLessEqual(t):e>t},lessEqual:function(e,t){return e.operatorLessEqual?e.operatorLessEqual(t):t.operatorGreaterEqual?t.operatorGreaterEqual(e):e.operatorGreater?!e.operatorGreater(t):e<=t},greaterEqual:function(e,t){return e.operatorGreaterEqual?e.operatorGreaterEqual(t):t.operatorLessEqual?t.operatorLessEqual(e):e.operatorLess?!e.operatorLess(t):e>=t},equal:function(e,t){return e.operatorEqual?e.operatorEqual(t):e.operatorNotEqual?!e.operatorNotEqual(t):t.operatorEqual?t.operatorEqual(e):t.operatorNotEqual?!t.operatorNotEqual(e):e==t},notEqual:function(e,t){return e.operatorNotEqual?e.operatorNotEqual(t):e.operatorEqual?!e.operatorEqual(t):t.operatorNotEqual?t.operatorNotEqual(e):t.operatorEqual?!t.operatorEqual(e):e!=t}};function _i(e,t,n){void 0===n&&(n="x");var r=e[0],o=e[1],i=e[2],a=e[3],l="x"===n?Li(t,r,i):"y"===n?Li(t,o,a):t,u=function(e,t){return Oi.add(Oi.mul(Oi.sub(t,e),l),e)},c=new wi([0,0]),s=new wi([r,o]),d=new wi([i,a]),f=new wi([1,1]),v=u(c,s),m=u(s,d),h=u(d,f),p=u(v,m),g=u(m,h),b=u(p,g),y=[v,p].map((function(e){return Oi.div(e,Oi.add(b,1e-9))})),E=y[0],w=y[1],C=[g,h].map((function(e){return Oi.div(Oi.sub(e,b),Oi.add(Oi.sub(f,b),1e-9))})),x=C[0],T=C[1];return[[].concat(E.v(),w.v()),[].concat(x.v(),T.v())]}function Ii(e,t,n){return 3*e*n*Math.pow(1-n,2)+3*t*(1-n)*Math.pow(n,2)+Math.pow(n,3)}function Bi(e,t,n){void 0===n&&(n="x");var r=e[0],o=e[1],i=e[2],a=e[3],l=0===t?0:1===t?1:"x"===n?Li(t,r,i):"y"===n?Li(t,o,a):t;return["x"===n?t:Ii(r,i,l),"y"===n?t:Ii(o,a,l)]}function Di(e){return window.requestAnimationFrame?window.requestAnimationFrame(e):setTimeout(e,vi)}function Ai(e){return window.requestAnimationFrame?window.cancelAnimationFrame(e):clearTimeout(e,vi)}var Pi=function(){function e(e){var t=this;void 0===e&&(e={}),di(this,"setBounce",(function(e){!isNaN(e)&&(t.bouncing=Number(e))})),di(this,"setDamp",(function(e){void 0===e&&(e=0),!isNaN(e)&&(t.damp=Number(e))})),di(this,"setTransform",(function(e,n){if(void 0===e&&(e={}),void 0===n&&(n={}),t.fixedX&&e.translateX&&delete e.translateX,t.fixedY&&e.translateY&&delete e.translateY,n.merge){["translateX","translateY","scale"].forEach((function(n){void 0!==e[n]&&(t.transform[n]=parseFloat(e[n]))}));var r=e.transformOrigin;r instanceof Array&&2===r.length&&(t.transform.transformOrigin=r.map((function(e){return parseFloat(e)})))}else t.transform=fi({},e);return n.silent||t.update(),t})),di(this,"on",(function(e,n){if(n&&"function"==typeof n){var r="on"+e[0].toUpperCase()+e.slice(1);t[r]?t[r]="onTransform"===r?function(){return n(fi({},t.transform),{complete:!t.busy(),dirty:t.dirty()})}:n:console.warn("[Transform]Unsupport event:",e)}return t})),di(this,"restore",(function(e){if(!e){var n=t.transform;Di((function(){t.onRestore(n)}))}t.dragMode===mi?t.zoomTo(1,{fitEdge:!0}):t.setTransform({},{merge:!1,silent:e})})),di(this,"getTransform",(function(e){switch(e){case"css":return t.toCSS();case"style":return t.toStyle();default:return fi({},t.transform)}})),di(this,"dirty",(function(){var e=t.transform,n=e.translateX,r=void 0===n?0:n,o=e.translateY,i=void 0===o?0:o,a=e.scale;return 0!==r||0!==i||1!==(void 0===a?1:a)})),di(this,"busy",(function(){return!t.disableContentTouch||t.cancelSwipe||t.animating})),di(this,"isTapStop",(function(){return t.isTapStopped})),di(this,"apply",(function(){if(t.dom){var e=t.toCSS();t.dom.style.transform=e.transform||"",t.dom.style.webkitTransform=e.transform||"",t.dom.style.transformOrigin=e.transformOrigin||"center center",t.dom.style.webkitTransformOrigin=e.transformOrigin||"center center"}t.onTransform(),t.timer=0})),di(this,"update",(function(){Ai(t.timer),t.timer=Di(t.apply),t.lastTransform=fi({},t.transform)})),di(this,"cancel",(function(){Ai(t.timer),t.transform=fi({},t.lastTransform)})),di(this,"toTop",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(1,1)[1];return Math.round(Math.abs(r/n))})),di(this,"toBottom",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(1,-1)[1];return Math.round(Math.abs(r/n))})),di(this,"toLeft",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(1,1)[0];return Math.round(Math.abs(r/n))})),di(this,"toRight",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(-1,1)[0];return Math.round(Math.abs(r/n))})),di(this,"getOriginXY",(function(e){var n=e[0],r=e[1],o=t._getTransformedBounding(),i=o.left,a=o.top,l=t.transform.scale,u=void 0===l?1:l;return[(n-i)/u,(r-a)/u]})),di(this,"setScreenCenter",(function(e,n,r){var o=t.getOriginXY([e,n]),i=o[0],a=o[1];return t.setCenter(i,a,r)})),di(this,"setCenter",(function(e,n,r){var o=t.transform,i=t.fixedX,a=t.fixedY,l=t.boundingRect,u=t.viewport,c=o.translateX,s=void 0===c?0:c,d=o.translateY,f=void 0===d?0:d,v=o.scale,m=void 0===v?1:v,h=o.transformOrigin,p=l||u,g=p.top,b=p.bottom,y=p.left,E=p.right;if(h||(h=[(E-y)/2,(b-g)/2]),!i){var w=e-h[0];e=h[0]+w,o.translateX=s+w*(m-1)/m,h[0]=e}if(!a){var C=n-h[1];n=h[1]+C,o.translateY=f+C*(m-1)/m,h[1]=n}o.transformOrigin=h,r&&t.update()})),di(this,"zoomToScreenCenter",(function(e,n,r){void 0===r&&(r={});var o=n[0],i=n[1];t.setScreenCenter(o,i,!0),Di((function(){return Di((function(){t.zoomTo(e,fi({fitEdge:!0},r))}))}))})),di(this,"zoomToCenter",(function(e,n,r){void 0===r&&(r={});var o=n[0],i=n[1];t.setCenter(o,i,!0),Di((function(){return Di((function(){t.zoomTo(e,fi({fitEdge:!0},r))}))}))})),di(this,"zoomTo",(function(e,n){void 0===n&&(n={});var r=n,o=r.transition,i=void 0===o?"all":o,a=r.easingFunc,l=void 0===a?"ease-out":a,u=r.duration,c=void 0===u?0:u,s=r.silent,d=void 0===s||s,f=r.fitEdge,v=void 0!==f&&f,m=r.callback,h=t.maxScale,p=void 0===h?1:h,g=t.minScale,b=void 0===g?1:g,y=t.transform,E=y.scale,w=void 0===E?1:E,C=y.translateX,x=void 0===C?0:C,T=y.translateY,N=void 0===T?0:T,k=Math.max(Math.min(e,p),b),S=k/w;t.transform.scale=k,t.transform.translateX=x/S,t.transform.translateY=N/S,v&&t.fit(!1),t.dom&&c?(t.dom.style.transition=i+" "+c+"ms "+l,t.animating=!0,setTimeout((function(){t.dom.style.transition="",t.animating=!1,!d&&t.onZoomEnd(null,k),"function"==typeof m&&m(k)}),c)):"function"==typeof m&&m(k),t.update()})),di(this,"zoom",(function(e,n){void 0===e&&(e=1),void 0===n&&(n={});var r=t.transform.scale,o=void 0===r?1:r;t.zoomTo(o*e,n)})),di(this,"drag",(function(e,n,r,o,i){var a=t.transform,l=t.interActBound,u=t.fixedX,c=t.fixedY,s=t.bounceRateX,d=t.bounceRateY,f=a.translateX,v=void 0===f?0:f,m=a.translateY,h=void 0===m?0:m,p=a.scale,g=void 0===p?1:p;u&&(e=0),c&&(n=0);var b=t._remainToEdge(e,n,l),y=b[0],E=b[1],w=(y+e)*e>0,C=(E+n)*n>0,x=0,T=0,N=Math.abs(e)>Math.abs(n),k=N&&w||!N&&C;e&&(x=o?e:t._getDragV(e,y,w,r?s:0),t.transform.translateX=v+x/g),n&&(T=i?n:t._getDragV(n,E,C,r?d:0),t.transform.translateY=h+T/g);var S=[u?0:-y,c?0:-E];if(t.update(),t.interActBound){var R=l.left,M=l.right,L=l.top,O=l.bottom;t.interActBound={left:R+x,right:M+x,top:L+T,bottom:O+T}}return{toEdge:k,remain:S}})),di(this,"fit",(function(e,n,r){void 0===e&&(e=!0);var o=!1,i=t.transform,a=i.translateX,l=void 0===a?0:a,u=i.translateY,c=void 0===u?0:u,s=i.scale,d=void 0===s?1:s,f=t._outOfEdge(),v=f.outX,m=f.outY,h=f.outLeft,p=f.outRight,g=f.outTop,b=f.outBottom;return!n&&v&&(p&&(t.transform.translateX=l+p/d),h&&(t.transform.translateX=l+h/d),o=!0),!r&&m&&(b&&(t.transform.translateY=c+b/d),g&&(t.transform.translateY=c+g/d),o=!0),o&&e&&t.bounce(),t.update(),o})),di(this,"fitX",(function(e){return void 0===e&&(e=!0),t.fit(e,!1,!0)})),di(this,"fitY",(function(e){return void 0===e&&(e=!0),t.fit(e,!0,!1)})),di(this,"swipe",(function(e){if(t.damp){var n=yi(e);if(isNaN(n))return;t.cancelSwipe&&t.cancelSwipe();var r=0,o=Math.ceil(n/t.damp),i=t.transform,a=i.translateX,l=void 0===a?0:a,u=i.translateY,c=void 0===u?0:u,s=i.scale,d=void 0===s?1:s,f=[].concat(t.cubic.scroll),v=[].concat(t.cubic.bounce);if(t.dom){var m=850,h=[null,f],p=0,g=0,b=0,y=[[0,[l*d,c*d]]],E=function(){p=0,t.cancelSwipe()},w=e[0]*o/2,C=e[1]*o/2,x=t.bounceRateX,T=t.bounceRateY,N=t._outOfEdge(),k=N.outX,S=N.outY,R=t.drag(w,C,!1,x,T).remain,M=t._outOfEdge(),L=M.outX,O=M.outY;(L||O)&&(h[1]=v);var _=.33*window.innerWidth,I=.33*window.innerHeight;if(t.swipeMode===pi){t.cancel();var B=t._setSwipeBounceByAnimation(C,R[1],O,S,T,m,h[1],I),D=t._setSwipeBounceByAnimation(w,R[0],L,k,x,m,h[1],_),A=D.length>1,P=B.length>1;[D,B].forEach((function(e,t){return e.forEach((function(e){e[1]+=y[0][1][t];for(var n=0;n<y.length;n+=1){if(e[0]===y[n][0])return void(y[n][1][t]=e[1]);if(e[0]<y[n][0]){var r=[null,null];return r[t]=e[1],void y.splice(n,0,[e[0],r])}}var o=[null,null];o[t]=e[1],y.push([e[0],o])}))}));var H=y[y.length-1][0],V={};y.forEach((function(e,t){var n=e[0];e[1].map((function(r,o){if(null===r){for(var i=y[t-1][1][o],a=y[t-1][0],l=i,u=a,c=t+1;c<y.length;c+=1)if(null!==y[c][1][o]){l=y[c][1][o],u=y[c][0];break}if(a!==u){var s=[];[a,n,u].forEach((function(e,t){s[t]=V[e]?V[e]:Bi(h[1],e/H,"x")[1]})),e[1][o]=i+(l-i)*(s[1]-s[0])/(s[2]-s[0])}else e[1][o]=i}}))})),y.forEach((function(e){e[1]="transform: "+t.toCSS({translateX:e[1][0]/d,translateY:e[1][1]/d,scale:d}).transform})),t._appendAnimation(y,"cubic-bezier("+h[1].join(","),H),p=setTimeout(E,H+vi),t.cancelSwipe=function(){t._stopAnimation(),t._syncDom(),t.dom.style.animation="",p&&(clearTimeout(p),(A||P)&&t.fit(!1)),t.cancelSwipe=null,t.onSwipeEnd(t.transform)}}else t.dom.style.transition="transform "+m+"ms cubic-bezier("+h[1].join(",")+")",r=Di((function(){p=setTimeout(E,m);var e=function(e){var t=e(m,h)||{};m=t.swipeSpan||m,h=t.cubicBezier||h,clearTimeout(p),p=setTimeout(E,m)};L&&(k&&w*R[0]>0?t.fitX(!1):(h[1]=[].concat(v),g=t._setSwipeBounce(w,R[0],x,e,"x",_))),O&&(S&&C*R[1]>0?t.fitY(!1):(h[1]=[].concat(v),b=t._setSwipeBounce(C,R[1],T,e,"y",I)))})),t.cancelSwipe=function(){r&&Ai(r),p&&(g&&clearTimeout(g),b&&clearTimeout(b),clearTimeout(p),t._syncDom(),(g||b)&&t.fit(!1)),t.dom.style.transition="",t.cancelSwipe=null,t.onSwipeEnd(t.transform)}}else{var F=e[0]/o,z=e[1]/o;r=Di((function e(){var n=(o-.5)*F,i=(o-.5)*z;t.drag(n,i),(o-=1)>0?(r=Di(e),t.cancelSwipe=function(){r&&Ai(r),t.cancelSwipe=null,t.onSwipeEnd(t.transform)}):(r=0,t.cancelSwipe())}))}}})),di(this,"bounce",(function(){var e=t.bouncing;e&&t.dom&&(t.dom.style.transition="all "+e+"ms cubic-bezier(.14, 1, .34, 1)",t.animating=!0,setTimeout((function(){t.animating=!1,t.dom.style.transition=""}),e))})),di(this,"touchStart",(function(e){if(t.disableContentTouch=!0,t.active&&!t.animating)if(t.scaling=!1,t.dragging=!1,t.cancelSwipe?(t.cancelSwipe(),t.isTapStopped=!0):t.dirty()||(t.useDomBoundary&&t.setBoundary(t.dom.getBoundingClientRect()),t.onSchedule()),e.touches.length>1){var n=t.transform.scale,r=void 0===n?1:n;t.disableContentTouch=!1;var o=t.getOriginXY([(e.touches[1].clientX+e.touches[0].clientX)/2,(e.touches[1].clientY+e.touches[0].clientY)/2]),i=o[0],a=o[1];t.pinchStartCenter=[i,a],t.setCenter(i,a),t.pinchStartLen=yi([e.touches[1].clientX-e.touches[0].clientX,e.touches[1].clientY-e.touches[0].clientY]),t.scaling=!0,t.onZoomStart(e,r,t.pinchStartCenter)}else if(t.dragMode===mi||t.dragMode===hi&&t.dirty()){t.disableContentTouch=!1,t.dragStartTime=+new Date,t.lastDragStartTime=0;var l=e.touches&&e.touches[0]?e.touches[0].clientX:0,u=e.touches&&e.touches[0]?e.touches[0].clientY:0;t.dragStartV=[l,u],t.lastDragStartV=[],t.dragX=l,t.dragY=u}})),di(this,"touchMove",(function(e){if(!t.disableContentTouch){var n=e.changedTouches,r=void 0===n?[]:n;if(t.scaling){if(e.touches.length>1){var o=yi([e.touches[1].clientX-e.touches[0].clientX,e.touches[1].clientY-e.touches[0].clientY]);t.zoom(o/t.pinchStartLen),t.pinchStartLen=o}}else{var i=r[0]?r[0].clientX:0,a=r[0]?r[0].clientY:0,l=i-t.dragX,u=a-t.dragY,c=t.drag(l,u,t.dragging).toEdge;t.dragX=i,t.dragY=a;var s=+new Date;s>t.dragStartTime+100&&(t.lastDragStartV=t.dragStartV,t.lastDragStartTime=t.dragStartTime,t.dragStartTime=s,t.dragStartV=[i,a]),t.dragging||(t.dragging=!0,c?t.disableContentTouch=!0:(t.onDragStart(e),t.interActBound=t._getTransformedBounding(!0)))}t.preventScroll&&e.preventDefault()}})),di(this,"touchEnd",(function(e){if(!t.disableContentTouch&&0===e.touches.length){var n=t.transform.scale,r=void 0===n?1:n;if(t.scaling)t.onZoomEnd(e,r,t.pinchStartCenter),r<1?t.restore():t.fit();else if(t.dragging){var o=+new Date-t.dragStartTime,i=t.dragStartV;o<50&&t.lastDragStartTime&&(o=+new Date-t.lastDragStartTime,i=t.lastDragStartV);var a=[e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].clientX:0,e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].clientY:0],l=[vi*(a[0]-i[0])/o,vi*(a[1]-i[1])/o];t.onDragEnd(e),yi(l)>t.motionThreshold?t.swipe(l):t.fit()}Di((function(){t.disableContentTouch=!0,t.pinchStartLen=0,t.interActBound=null,t.isTapStopped=!1}))}})),di(this,"_outOfEdge",(function(){var e=t._getTransformedBounding(),n=e.left,r=e.right,o=e.top,i=e.bottom,a=t.edges,l=a.left-n,u=a.right-r,c=a.top-o,s=a.bottom-i,d=l<0?l:0,f=u>0?u:0,v=c<0?c:0,m=s>0?s:0;return{outX:!(!d&&!f),outY:!(!v&&!m),outLeft:d,outRight:f,outTop:v,outBottom:m}})),di(this,"_remainToEdge",(function(e,n,r){var o=[0,0],i=t.edges,a=r||t._getTransformedBounding(),l=a.left,u=a.right,c=a.top,s=a.bottom,d=e>0?i.left:i.right,f=n>0?i.top:i.bottom,v=e>0?l:u,m=n>0?c:s;return o[0]=v-d,o[1]=m-f,o})),di(this,"_computeEdge",(function(){var e=t.viewport,n=e.left,r=e.right,o=e.top,i=e.bottom;if(t.boundingRect){var a=t.boundingRect,l=a.left,u=a.right,c=a.top,s=a.bottom;t.edges={left:Math.max(l,n),top:Math.max(c,o),right:Math.min(u,r),bottom:Math.min(s,i)}}else t.edges=fi({},t.viewport)})),this.dom=null,this.useDomBoundary=!1,this.viewport={left:0,right:window.innerWidth,top:0,bottom:window.innerHeight},this.maxScale=2,this.minScale=.5,this.fixedX=!1,this.fixedY=!1,this.active=!0,this.preventScroll=!0,this.dragMode=hi,this.swipeMode=pi,this.transformMode=gi,this.transform={},this.onZoomStart=function(){},this.onZoomEnd=function(){},this.onDragStart=function(){},this.onDragEnd=function(){},this.onSwipeEnd=function(){},this.onTransform=function(){},this.onRestore=function(){},this.onSchedule=function(){},this.cubic={scroll:[.33,1,.66,1],bounce:[.17,1,.17,1]},this.bouncing=300,this.bounceRateX=0,this.bounceRateY=0,this.damp=2,this.motionThreshold=10,this.config(e),this.boundingRect=null,this.disableContentTouch=!0,this.scaling=!1,this.pinchStartCenter=[],this.pinchStartLen=0,this.dragging=!1,this.dragX=0,this.dragY=0,this.dragStartTime=0,this.dragStartV=[0,0],this.edges={},this.timer=0,this.animating=!1,this.cancelSwipe=null,this.isTapStopped=!1,this.interActBound=null,this._computeEdge(),this.lastTransform={},this.animationStyleDom=null}var t=e.prototype;return t.enable=function(){return this.active=!0,this},t.disable=function(){return this.active=!1,this},t.config=function(e){void 0===e&&(e={});var t=e,n=t.viewport,r=t.dom,o=t.useDomBoundary,i=t.maxScale,a=t.minScale,l=t.fixedX,u=t.fixedY,c=t.bounceRateX,s=t.bounceRateY,d=t.active,f=t.preventScroll,v=t.transform,m=t.damp,h=t.dragMode,p=t.swipeMode,g=t.cubic,b=t.transformMode,y=t.motionThreshold,E=t.bounce,w=t.onZoomStart,C=t.onZoomEnd,x=t.onDragStart,T=t.onDragEnd,N=t.onSwipeEnd,k=t.onTransform,S=t.onRestore,R=t.onSchedule;return n&&this.setViewport(n),r&&this.setDom(r,o),i&&this.setMaxScale(i),a&&this.setMinScale(a),h&&this.setDragMode(h),p&&this.setSwipeMode(p),b&&this.setTransformMode(b),g&&this.setCubic(g),void 0!==y&&this.setMotionThreshold(y),void 0!==c&&this.setBounceRateX(c),void 0!==s&&this.setBounceRateY(s),void 0!==l&&this.setFixedX(l),void 0!==u&&this.setFixedY(u),void 0!==d&&(this.active=Boolean(d)),void 0!==f&&(this.preventScroll=Boolean(f)),v&&this.setTransform(v),void 0!==m&&this.setDamp(m),void 0!==E&&this.setBounce(E),this.on("transform",k).on("restore",S).on("schedule",R).on("zoomStart",w).on("zoomEnd",C).on("dragStart",x).on("dragEnd",T).on("swipeEnd",N),this},t.setDom=function(e,t){var n=this;return void 0===t&&(t=!0),e&&(this.useDomBoundary=t,this.dom!==e&&(this.removeDom(),this.dom=e,e.addEventListener("touchstart",this.touchStart),e.addEventListener("touchmove",this.touchMove),e.addEventListener("touchend",this.touchEnd),e.addEventListener("touchcancel",this.touchEnd),e.style.willChange="transform",e.style.transition="",e.style.transform="",e.style.webkitTransform="",e.style.transformOrigin="",e.style.webkitTransformOrigin="",this.transform={},this.lastTransform={},t&&Di((function(){n.boundingRect||n.setBoundary(e.getBoundingClientRect())})))),this},t.setBoundary=function(e,t){void 0===t&&(t=!1);var n=t?this._getRawBounding(e):e,r=n.left,o=n.right,i=n.top,a=n.bottom;return this.boundingRect=fi({},this.boundingRect||this.viewport,{left:r,right:o,top:i,bottom:a}),this._computeEdge(),this},t.removeDom=function(){return this.dom&&(this.dom.removeEventListener("touchstart",this.touchStart),this.dom.removeEventListener("touchmove",this.touchMove),this.dom.removeEventListener("touchend",this.touchEnd),this.dom.removeEventListener("touchcancel",this.touchEnd)),this},t.setMaxScale=function(e){return isNaN(e)||(this.maxScale=Math.max(Number(e),1)),this},t.setMinScale=function(e){return isNaN(e)||(this.minScale=Math.min(Number(e),1)),this},t.setMotionThreshold=function(e){return isNaN(e)||(this.motionThreshold=e),this},t.setCubic=function(e){for(var t in void 0===e&&(e={}),e)e[t]instanceof Array&&4===e[t].length&&(this.cubic[t]=e[t].map((function(e){return isNaN(Number(e))?Number(e):0})));return this},t.setDragMode=function(e){this.dragMode=e},t.setSwipeMode=function(e){this.swipeMode=e},t.setTransformMode=function(e){this.transformMode=e},t.setBounceRateX=function(e){return isNaN(e)||(this.bounceRateX=Math.min(Number(e),1)),this},t.setBounceRateY=function(e){return isNaN(e)||(this.bounceRateY=Math.min(Number(e),1)),this},t.setViewport=function(e){var t=this;void 0===e&&(e={});var n=!1;return["left","right","top","bottom"].forEach((function(r){var o=Number(e[r]);isNaN(o)||(t.viewport[r]=o,n=!0)})),n&&this._computeEdge(),this},t.setFixedX=function(e){if(this.fixedX=!!e,e){var t=this.transform.transformOrigin;if(t){var n=this.boundingRect||this.viewport,r=n.left,o=n.right;t[0]=(o-r)/2}this.setTransform({translateX:0},{merge:!0})}return this},t.setFixedY=function(e){if(this.fixedY=!!e,e){var t=this.transform.transformOrigin;if(t){var n=this.boundingRect||this.viewport,r=n.top,o=n.bottom;t[1]=(o-r)/2}this.setTransform({translateY:0},{merge:!0})}return this},t.toStyle=function(){var e=this.toCSS(),t=e.transform,n=e.transformOrigin,r="";return t&&(r+="transform: "+t),n&&(r+="transform-origin: "+n),r},t.toCSS=function(e){var t="",n="center";if(e||this.dirty()){var r=e||this.transform;if(this.transformMode===gi){var o=this.transform.scale,i=void 0===o?1:o;["translateX","translateY"].forEach((function(e){void 0!==r[e]&&(t+=e+"("+r[e]*i+"px)")})),t+="scale("+i+")"}else if(this.transformMode===bi)["scale","translateX","translateY"].forEach((function(e,n){var o=n?"px":"";void 0!==r[e]&&(t+=e+"("+r[e]+o+")")}));else{var a=r.scale,l=void 0===a?1:a,u=r.translateX,c=void 0===u?0:u,s=r.translateY;t="matrix("+l+", 0, 0, "+l+", "+c*l+", "+(void 0===s?0:s)*l+")"}}return this.transform.transformOrigin&&(n=this.transform.transformOrigin.map((function(e){return Math.round(e)+"px"})).join(" ")),{transform:t,transformOrigin:n}},t._getTransformedBounding=function(){var e=this.boundingRect,t=this.viewport,n=this.transform,r=e||t,o=r.left,i=r.top,a=r.right,l=r.bottom,u=n.scale,c=void 0===u?1:u,s=n.transformOrigin,d=void 0===s?[(a-o)/2,(l-i)/2]:s,f=n.translateX,v=void 0===f?0:f,m=n.translateY,h=void 0===m?0:m,p=d[0],g=d[1],b=(v-p)*c+p,y=(h-g)*c+g;return{left:o+b,right:o+b+(a-o)*c,top:i+y,bottom:i+y+(l-i)*c}},t._getRawBounding=function(e){var t=this.transform,n=e.left,r=e.top,o=e.right,i=e.bottom,a=t.scale,l=void 0===a?1:a,u=t.transformOrigin,c=void 0===u?[(o-n)/2,(i-r)/2]:u,s=t.translateX,d=void 0===s?0:s,f=t.translateY,v=void 0===f?0:f,m=c[0],h=c[1],p=(d-m)*l+m,g=(v-h)*l+h;return{left:n-p,right:n-p+(o-n)/l,top:r-g,bottom:r-g+(i-r)/l}},t._getDragV=function(e,t,n,r){var o=0,i=0;if(n)if(r){var a=t*e>0;o=a?e*r:(t+e)*r,i=a?o:-t+o}else i=-t;else i=e;return i},t._setSwipeBounceByAnimation=function(e,t,n,r,o,i,a,l){void 0===l&&(l=1/0);var u=[],c=e*t<0;if(n)if(r&&!c)u.push([i,t]);else{var s=(c?e*o:(e-t)*o)/2;Math.abs(s)>l&&(s*=Math.abs(l/s));var d=s+(c?0:t),f=2*Math.abs(s)+Math.abs(t),v=Bi(a,Math.abs(d)/f,"y")[0],m=Math.floor(i*v);v>.1||u.push([m,d]),u.push([i,t])}else e=Math.min(Math.abs(e),Math.abs(t))*Math.abs(e)/e,u.push([i,e]);return u},t._setSwipeBounce=function(e,t,n,r,o,i){var a=this;void 0===o&&(o="x"),void 0===i&&(i=1/0);var l=e*t<0,u=l?e*n:(e-t)*n;Math.abs(u)>i&&(u*=Math.abs(i/u));var c=(u+(l?0:t))/e,s=0;return r((function(e,t){var n=Bi(t[1],c,"y"),i=Math.max(Math.floor(n[0]*e/vi),2)*vi,l=e-i;s=setTimeout((function(){r((function(e,t){var n=1-l/e,r=0,i=function(){"x"===o?a.fitX(!1):"y"===o&&a.fitY(!1),a.dom&&(a.dom.style.transition="transform "+(l-r)+"ms cubic-bezier("+t[1].map((function(e){return e.toFixed(3)})).join(",")+")")};return n>0?(t=_i(t[1],n,"x"),i()):(n=vi/e,r=vi,t=_i(t[1],n,"x"),Di(i)),{cubicBezier:t,swipeSpan:l}}))}),i)})),s},t._syncDom=function(){if(this.dom){var e=window.getComputedStyle(this.dom).getPropertyValue("transform").split(")")[0].split(", ").map((function(e){return parseFloat(e)})),t=e[3],n=void 0===t?1:t,r=e[4],o=void 0===r?0:r,i=e[5],a=void 0===i?0:i;this.setTransform({scale:n,translateX:Math.round(o)/n,translateY:Math.round(a)/n},{merge:!0})}},t._appendStyle=function(e){if(this.animationStyleDom){var t=this.animationStyleDom.firstChild;t&&this.animationStyleDom.removeChild(t)}else{var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");n.appendChild(r),r.type="text/css",this.animationStyleDom=r}this.animationStyleDom.styleSheet?this.animationStyleDom.styleSheet.cssText=e:this.animationStyleDom.appendChild(document.createTextNode(e))},t._appendAnimation=function(e,t,n){for(var r=this,o="__transformable_key_"+parseInt(1e16*(.5+.5*Math.random())).toString(16),i=[],a=0;a<e.length;a+=1){var l=e[a],u=l[0],c=l[1],s=Math.floor(u/n*100);i.push(s+"% { "+c+" }")}var d="@keyframes "+o+" {\n "+i.join("\n")+"\n }";this._appendStyle(d),this.dom&&Di((function(){r.dom.style.animation=o+" "+n+"ms "+t,r.dom.style.animationFillMode="forwards"}))},t._stopAnimation=function(){this.dom&&(this.dom.style.animationPlayState="paused")},e}();var Hi=t.forwardRef((function(e,n){var r,o,a=e.style,l=e.className,s=e.images,d=e.loop,f=void 0!==d&&d,v=e.openIndex,m=e.fit,h=e.noselect,p=void 0===h||h,g=e.displayDuration,b=void 0===g?350:g,y=e.spaceBetween,w=void 0===y?0:y,C=e.showLoading,x=void 0===C||C,T=e.loadingArea,N=e.errorArea,k=e.showError,S=void 0===k||k,R=e.retryTime,M=e.staticLabel,O=e.replaceFallbackWhenLoaded,_=e.scrollBezier,I=e.lazyloadCount,B=void 0===I?1:I,D=e.swipeToClose,A=void 0===D||D,P=e.getMinScale,H=e.getMaxScale,V=e.getDoubleClickScale,F=e.getContainer,z=e.getThumbBounds,j=e.renderIndicator,q=e.onChange,W=e.onAfterChange,X=e.onImageClick,Y=e.onImageDoubleClick,G=e.onImageLongTap,U=e.close,K=e.onClose,Z=e.onTouchStart,$=e.onTouchMove,J=e.onTouchEnd,Q=e.indicatorPos,ee=void 0===Q?"start":Q,te=c(e,["style","className","images","loop","openIndex","fit","noselect","displayDuration","spaceBetween","showLoading","loadingArea","errorArea","showError","retryTime","staticLabel","replaceFallbackWhenLoaded","scrollBezier","lazyloadCount","swipeToClose","getMinScale","getMaxScale","getDoubleClickScale","getContainer","getThumbBounds","renderIndicator","onChange","onAfterChange","onImageClick","onImageDoubleClick","onImageLongTap","close","onClose","onTouchStart","onTouchMove","onTouchEnd","indicatorPos"]),ne=Ie(),re=t.useRef(null),oe=t.useRef([]),ie=t.useRef(null),ae=t.useRef([]),le=t.useRef(null),ue=t.useRef(null),ce=t.useRef(null),se=t.useRef([]),de=t.useRef(0),fe=t.useRef(!1),ve=t.useRef(!1),me=t.useRef(!1),he=t.useRef(!1),pe=t.useRef(v),ge=t.useRef(0),be=t.useRef(0),ye=t.useRef(!1),Ee=t.useRef(!1),Ce=t.useState({}),xe=Ce[0],Te=Ce[1],Ne=Le([]),Se=Ne[0],Re=Ne[1],Me=Ne[2],Oe=t.useState(null),_e=Oe[0],Ae=Oe[1],Pe=null===(r=Se[v])||void 0===r?void 0:r.loaded,He=null===(o=Se[v])||void 0===o?void 0:o.animated,Ve=v>=0&&v<s.length,Fe=Be(!0),ze=Fe.windowWidth,je=Fe.windowHeight;function qe(e){try{e&&document.body.removeChild(e)}catch(e){}}function We(e){var t,n=null===(t=oe.current[e])||void 0===t?void 0:t.dom,r=null==n?void 0:n.parentElement;n&&r&&(ae.current[e]?ae.current[e].setDom(r):ae.current[e]=new Pi({dom:r,motionThreshold:0,dragMode:"always",transformMode:"matrix",useDomBoundary:!1,cubic:{scroll:_},onTransform:function(){var t,n,r,o,i=se.current[e],a=(null===(n=null===(t=ae.current[e])||void 0===t?void 0:t.getTransform)||void 0===n?void 0:n.call(t))||{},l=null===(r=Re.current[e])||void 0===r?void 0:r.originWidth,u=null===(o=Re.current[e])||void 0===o?void 0:o.originHeight,c=a.scale||1;if(i&&l&&u&&be.current!==c){be.current=c;var s=Xe(i)?"":" translateY(-50%)";i.style.width=l*c+"px",i.style.height=u*c+"px";var d="scale("+1/c+") translateZ(0)"+s;i.style.transform=d,i.style.webkitTransform=d,i.style.transformOrigin="top left",i.style.webkitTransformOrigin="top left"}},onRestore:function(){be.current=0},onZoomEnd:function(t,n,r){Te((function(t){var n;return u(u({},t),((n={})[e]=!1,n))}));var o=se.current[e],i=ae.current[e];if(o&&i&&!(i.getTransform().scale<1)){var a=o.getBoundingClientRect();a.width>ze&&a.height>je?(r&&r.length&&i.setCenter.apply(i,r),i.setFixedX(!1),i.setFixedY(!1)):a.height<=je?i.fixedY||(i.setFixedY(!0),i.bounce()):a.width<=ze&&(i.fixedX||(i.setFixedX(!0),i.bounce()))}},minScale:Ye(e),maxScale:Ge(e)}),function(e){var t=oe.current[e],n=null==t?void 0:t.dom;if((null==n?void 0:n.parentElement)&&(null==t?void 0:t.image)){var r=t.image.getBoundingClientRect(),o=n.parentElement.getBoundingClientRect();ae.current[e]&&ae.current[e].setBoundary({left:Math.min(r.left,o.left),right:Math.max(r.right,o.right),top:Math.min(r.top,o.top),bottom:Math.max(r.bottom,o.bottom)},!0)}}(e))}function Xe(e){return Boolean(e&&!e.classList.contains("preview-fit-contain-y"))}function Ye(e){var t=void 0===e?pe.current:e,n=se.current[t];return n?P?P(n,t):.7:1}function Ge(e){var t=void 0===e?pe.current:e,n=se.current[t];if(!n)return 1;if(H)return H(n,t);var r=n.naturalWidth;return r>n.naturalHeight?r/ze*5:Math.max(5,r/ze)}function Ue(e){var t,n,r=void 0===e?pe.current:e;return null===(n=null===(t=ae.current[r])||void 0===t?void 0:t.busy)||void 0===n?void 0:n.call(t)}function Ke(){var e,t,n=ae.current[pe.current],r=null===(e=null==n?void 0:n.toLeft)||void 0===e?void 0:e.call(n),o=null===(t=null==n?void 0:n.toRight)||void 0===t?void 0:t.call(n);return{side:!r||!o,left:!r,right:!o}}function Ze(e){if(Z&&Z(e,pe.current))return!0;var t=e.touches;return de.current=e.touches&&e.touches[0]?e.touches[0].clientX:0,ve.current=!1,me.current=!1,1===t.length?(ye.current||(he.current=!0),ue.current=window.setTimeout((function(){he.current&&(he.current=!1,ve.current=!0,G&&G(pe.current,se.current[pe.current],e))}),300)):he.current=!1,function(){var e,t;return null===(t=null===(e=ae.current[pe.current])||void 0===e?void 0:e.isTapStop)||void 0===t?void 0:t.call(e)}()&&(ve.current=!0),Ue()?(fe.current=Ke().side,!fe.current):void 0}function $e(e){if(ve.current=!0,he.current=!1,ue.current&&clearTimeout(ue.current),$&&$(e,pe.current))return!0;var t=(e.changedTouches[0].clientX||0)-de.current;if(Ue()){var n=Ke();return!fe.current||!(n.left&&t>0||n.right&&t<0)}}function Qe(e){if(J&&J(e,pe.current))return!0;var t=A&&ge.current>=(function(){var e,t;return null===(t=null===(e=ae.current[pe.current])||void 0===e?void 0:e.dirty)||void 0===t?void 0:t.call(e)}()?6:3);return ge.current=0,he.current=!1,ue.current&&clearTimeout(ue.current),t?(rt(e),!0):!(!Ue()||Ke().side)||void 0}function et(e){if(!me.current){me.current=!0,le.current&&(clearTimeout(le.current),le.current=null);var t=pe.current;Y&&Y(t,e);var n=ae.current[t];if(n){var r=function(e){var t=pe.current,n=se.current[t];if(!n)return 1;var r=Ge(t);if(V)return V(e,r,n,t);var o=n.naturalWidth,i=n.naturalHeight,a=o>i?o/ze*je/i:1,l=2;a>=2&&(l=Math.min(r,a));var u=Number(e.toFixed(3)),c=Number(l.toFixed(3));return u>=1&&u<c?c:1}(n.getTransform().scale||1);if(1===r)Xe(se.current[t])?n.zoomToScreenCenter(1,[ze/2,je/2],{duration:200,callback:function(){return n.restore()}}):(n.bounce(),n.restore());else n.zoomToScreenCenter(r,[ze/2,je/2],{duration:200,silent:!1})}}}t.useImperativeHandle(n,(function(){return{dom:re.current,imageDoms:se.current}})),De(Ve,re.current,(function(){return[]}),"top",(function(e,t){Ue()||"y"!==t||(ge.current+=1)})),t.useEffect((function(){if(Ve)pe.current=v,ye.current=!1,ie.current&&ie.current.changeIndex(v,!0),Me(s.map((function(e,t){var n;return{firstLoaded:(null===(n=Re.current[t])||void 0===n?void 0:n.firstLoaded)||!1,animated:t!==v}}))),function(e){var t,n=null===(t=Re.current[e])||void 0===t?void 0:t.firstLoaded,r=O&&n?s[e].src:s[e].fallbackSrc;if(!z||!s[e]||!r)return void at(e);var o=z(e);if(!o||!o.width||!o.height)return void at(e);var i=new Image;ce.current=i,i.classList.add("image-preview-fake-trans-image"),lt(i,o,o),i.src=r,i.style.objectPosition=s[e].thumbPosition||"top center",i.style.opacity="0",i.style.transitionDuration=b+"ms",i.style.webkitTransitionDuration=b+"ms",document.body.appendChild(i),function(e,t,n,r){if(!t)return void r(null);Ae({src:t,fit:s[e].fit,index:e,movingImage:n,onLoad:function(e,t){setTimeout((function(){r(t.getBoundingClientRect())}),20)},onError:function(){return r(null)}})}(e,r,i,(function(t){if(!t||!t.width||!t.height)return qe(i),void at(e);we((function(){i.style.opacity="1",lt(i,t,o),setTimeout((function(){Te((function(t){var n;return u(u({},t),((n={})[e]=!0,n))}))}),Math.max(0,b-80)),setTimeout((function(){at(e)}),b+30)}))}))}(v);else{ue.current&&clearTimeout(ue.current),he.current=!1,Me(Re.current.map((function(e){return u(u({},e),{animated:!1,loaded:!1})}))),ae.current=[],qe(document.querySelector(".image-preview-fake-trans-image")),Ae(null),Te({});var e=Ee.current;setTimeout((function(){e&&K&&K()}),b)}Ee.current=!0}),[Ve]),t.useEffect((function(){Ve&&Pe&&He&&setTimeout((function(){qe(ce.current),ce.current=null}),100)}),[Ve,Pe,He]),t.useEffect((function(){_e?function(e,t,n){void 0===e&&(e=function(){return document.body});var r=e();r&&(r.style.overflow="hidden",r.style.touchAction="none",(t?window:r).addEventListener("touchmove",n||L,{passive:!1,capture:!0}))}():we((function(){!function(e,t,n){void 0===e&&(e=function(){return document.body});var r=e();r&&(r.style.overflow="",r.style.touchAction="",(t?window:r).removeEventListener("touchmove",n||L,{capture:!0}))}()}))}),[_e]),t.useEffect((function(){(ae.current||[]).forEach((function(e,t){e&&e.setMinScale(Ye(t))}))}),[P]),t.useEffect((function(){(ae.current||[]).forEach((function(e,t){e&&e.setMaxScale(Ge(t))}))}),[H]);var nt=function(e,n,r){void 0===r&&(r=200);var o=t.useState(0),i=o[0],a=o[1],l=t.useRef();return t.useEffect((function(){var t=setTimeout((function(){1===i&&e(l.current),a(0)}),r);return 2===i&&n(l.current),function(){return clearTimeout(t)}}),[i]),function(e){l.current=e,a((function(e){return e+1}))}}((function(e){ve.current||(le.current=window.setTimeout((function(){me.current||X&&X(pe.current,e)||rt(e)}),300))}),et);function rt(e){ye.current||(ye.current=!0,U(e))}function ot(e,t){var n=Re.current.slice();n[e]=u(u({},n[e]||{}),t),Me(n)}function at(e){ot(e,{animated:!0}),Ae(null)}function lt(e,t,n){e.style.width=n.width+"px";var r="translate3d("+t.left+"px, "+t.top+"px, 0) scale("+t.width/n.width;e.style.transform=r,e.style.webkitTransform=r,e.style.transformOrigin="left top",e.style.webkitTransformOrigin="left top"}function ut(e,t,n){return i.default.createElement(jt,u({autoPlay:!1,loop:f,lazyloadCount:B},e),(t||[]).map((function(e,t){var r=i.default.createElement("div",{key:t,className:"preview-image-wrap",style:{padding:"0 "+w+"px"}},i.default.createElement(Dt,u({className:"preview-image",fit:e.fit||m||"preview-y",boxWidth:ze-2*w,boxHeight:je,bottomOverlap:null},n(e,t))));return e.extraNode?i.default.createElement("div",{className:"preview-image-wrap-container",key:"outer-"+t},r,e.extraNode):r})))}function ct(e){var t=Se[e]||{},n=t.loaded,r=t.animated;return E("preview-image",{"preview-hidden":!(e!==v||n&&r)})}function st(e,t,n){return j?j(e,t,n):Pe?i.default.createElement(it,null,i.default.createElement("div",{className:"image-preview-indicator"},e+1,"/",t)):null}function dt(e,t,n){var r=Se[t]||{},o=r.originWidth,a=r.originHeight,l=r.originLeft,c=r.originTop,s=r.hasOverflow?{}:Je({transform:"translateY(-50%)"}),d=n?{objectFit:n}:{};return"ios"===ne&&xe[t]&&o&&a?i.default.createElement("img",{src:e,style:u(u({position:"absolute",width:o,height:a,left:l,top:c},d),s)}):null}function ft(e){return e===v?i.default.createElement(it,null,i.default.createElement("div",{className:"image-preview-loading-area"},T||i.default.createElement(tt,{type:"circle",className:"loading-icon",radius:7}))):T}return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement(it,{getContainer:F},i.default.createElement(Tt,{in:Ve,timeout:b,type:"fade",mountOnEnter:!0,unmountOnExit:!0},i.default.createElement("div",{className:E(t+"-image-preview","all-border-box",{noselect:p},l),style:a,ref:re,onClick:nt,onDoubleClick:et},ut(u({indicatorPos:ee,initialIndex:v,ref:ie,renderIndicator:st,onChange:function(e){pe.current=e,q&&q(e)},onAfterChange:function(e,t){W&&W(e),function(e){var t=ae.current[e];t&&t.restore()}(t),we((function(){We(pe.current)}))},onTouchMove:$e,onTouchStart:Ze,onTouchEnd:Qe},te),s,(function(e,t){return{src:e.src,ref:function(e){oe.current[t]=e},showLoading:x,loadingArea:ft(t),errorArea:N,showError:S,retryTime:R,staticLabel:M,animateDuration:_e?0:void 0,style:{overflow:"visible"},className:ct(t),bottomOverlap:dt(e.fallbackSrc||e.src,t,e.fit||m),onLoad:function(e,n){se.current[t]=n,ot(t,{loaded:!0,firstLoaded:!0,originWidth:n.offsetWidth,originHeight:n.offsetHeight,originTop:n.offsetTop,originLeft:n.offsetLeft,hasOverflow:Xe(n)}),t===v?We(t):Te((function(e){var n;return u(u({},e),((n={})[t]=!0,n))}))},onError:function(){(se.current[t]=null,t===v)&&(qe(null==_e?void 0:_e.movingImage),ot(t,{animated:!0,loaded:!0}),Ae(null))}}})),_e?i.default.createElement("div",{className:"image-preview-fake-rect"},ut({initialIndex:0},[{src:_e.src,fit:_e.fit}],(function(){return{staticLabel:M,src:_e.src,animateDuration:0,onLoad:_e.onLoad,onError:_e.onError}}))):null)),_e?i.default.createElement("div",{className:"image-preview-lock-modal",onClick:rt}):null)}))}));var Vi=G(Hi,function(e){return{open:(t=e,function(e,n){var r=u(u({unmountOnExit:!0},e||{}),{close:function(){}}),o=u({},r),i=P("_ARCO_IMAGE_PREVIEW_DIV_"+(r.key||"")+"_",r.getContainer).child,a=!1,l=new Nt(t,i,n).render;function c(){a=!0,o.openIndex=-1,l(o)}return o.close=c,o.onClose=function(){r.onClose&&r.onClose(),r.unmountOnExit&&H(i)},o.openIndex=-1,l(o),setTimeout((function(){a||(o.openIndex=r.openIndex,l(o))}),20),{close:c,update:function(e){o=u(u({},o),e||{}),l(o)}}})};var t}(Se(Hi))),Fi=t.createContext({sticky:!0,getScrollContainer:function(){return null},updateRef:function(){}}),zi=t.forwardRef((function(e,n){var r=e.position,o=void 0===r?"top":r,a=e.topOffset,l=void 0===a?0:a,c=e.bottomOffset,s=void 0===c?0:c,d=e.followOffset,f=void 0===d?0:d,v=e.children,m=e.className,h=e.style,p=e.zIndex,g=void 0===p?100:p,b=e.portalWhenSticky,y=void 0!==b&&b,w=e.stickyStyle,C=void 0===w?"fixed":w,x=e.stickyCssStyle,T=e.getPortalContainer,N=e.getContainer,k=e.getScrollContainer,S=e.onStickyStateChange,R=e.onTopChange,M=Le(!1),L=M[0],O=M[1],I=M[2],B=Le(!1),D=B[0],A=B[1],P=B[2],H=t.useState({}),F=H[0],z=H[1],q=t.useRef(null),W=t.useRef(null),X=t.useRef(0),Y=t.useRef(null),G=t.useRef(null),U=t.useRef(!1),K=t.useCallback((function(e){var t=e.followTop,n=e.followBottom;if(q.current){var r="top"===o||"both"===o,i="bottom"===o||"both"===o,a=W.current.getBoundingClientRect(),c=q.current.getBoundingClientRect(),d=c.height;X.current=c.height;var v=j(G.current).containerRect,m=v.top,h=v.bottom,p=v.height,b=Math.round(a.top-m),y=Math.round(a.top+d-h),E=n-f-d-l-m,w=p-t-f-d-s;P(Boolean(O.current));var T=!!r&&(b<=l&&n>m+f),N=!!i&&(y>=-s&&t<h-f),k=T||N,M=("absolute"===C?0:m)+l,L=("absolute"===C?0:window.innerHeight-h)+s,_={};k&&(_=u(u(u(u({transform:"translateZ(0)",WebkitTransform:"translateZ(0)",position:"absolute"===C?"absolute":"fixed",zIndex:g},T?{top:E>0?M:M+E}:{}),N?{bottom:w>0?L:L+w}:{}),{left:a.left,width:a.width}),x||{})),null==R||R(Math.max(0,c.top-m-l)),I(k),z(_),k!==A.current&&S&&S({isTopSticky:T,isBottomSticky:N,isSticky:k,wasSticky:A.current})}}),[o,l,s,f,g,C,S,R,x]),Z=t.useCallback((function(){U.current||(_((function(){if(U.current=!1,Y.current){var e=Y.current.getBoundingClientRect(),t=e.top,n=e.bottom;K({followTop:t,followBottom:n})}})),U.current=!0)}),[K]);t.useEffect((function(){var e=V(N);Y.current=e||document.body;var t=k?V(k):window;if(t){G.current=t;return t.addEventListener("scroll",Z),Z(),function(){!function(e){e.removeEventListener("scroll",Z)}(t)}}}),[N,k,Z]),t.useEffect((function(){W.current&&(W.current.style.height=(O.current?X.current:0)+"px")}),[L,D]),t.useImperativeHandle(n,(function(){return{dom:q.current,recalculatePosition:Z}}),[Z]);var $=t.useMemo((function(){return u(u({},h||{}),F)}),[F,h]);function J(e){return i.default.createElement("div",{className:E(e+"-sticky",m),ref:q,style:$},v)}return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("div",null,i.default.createElement("div",{ref:W}),y&&L?i.default.createElement(it,{getContainer:T},J(t)):J(t))}))})),ji=t.forwardRef((function(e,n){var r=e.index,o=e.list,a=e.className,l=e.style,u=e.children,c=e.listKey,s=e.onGroupItemClick,d=e.renderGroupItem,f=e.renderStickyItem,v=t.useContext(Te).prefixCls,m=t.useContext(Fi),h=m.sticky,p=m.getScrollContainer,g=m.activeIndex,b=m.updateRef,y=t.useRef(null);t.useImperativeHandle(n,(function(){return{dom:y.current}}));var w=function(e,t){var n;return null!==(n=null==c?void 0:c(e,t))&&void 0!==n?n:t};return i.default.createElement("div",{className:E(v+"-index-bar-group",a),style:l,"data-index":r,ref:y},function(){var e;if(f)return f(r);var t=i.default.createElement("div",{className:E(v+"-index-bar-group-title",(e={},e[v+"-index-bar-group-active"]=g===r,e))},r),n=y.current;return h?i.default.createElement(zi,{getContainer:function(){return n},stickyStyle:"absolute",getScrollContainer:p,ref:function(e){return e&&b(r,e)}},t):t}(),function(){var e;return null!==(e=null!=u?u:null==o?void 0:o.map((function(e,t){return i.default.createElement("div",{className:v+"-index-bar-group-item",key:w(e,t),onClick:function(){return null==s?void 0:s(r,e,t)}},d?d(r,e,t):e.content)})))&&void 0!==e?e:null}())}));function qi(e){var n,r=e.indexes,o=e.prefixCls,a=e.onTouching,l=e.onClick,u=e.activeIndex,c=e.tipType,s=e.renderSideBar,d=e.renderSideBarItem,f=void 0===d?function(e){return e}:d,v=e.renderTip,m=t.useState(!1),h=m[0],p=m[1],g=function(e){p(e),a(e)},b=function(){return g(!1)},y=function(e,t){return v?v(e):i.default.createElement("div",{className:o+"-index-bar-sidebar-"+t},e)},w=i.default.createElement("div",{className:E(o+"-index-bar-sidebar",(n={},n[o+"-index-bar-sidebar-touching"]=h,n)),onTouchStart:function(){return g(!0)},onTouchEnd:function(){return b()},onTouchCancel:function(){return b()},onTouchMove:function(e){var t,n;if(h&&(null===(t=e.touches)||void 0===t?void 0:t.length)){var r=e.touches[0],o=r.clientX,i=r.clientY,a=document.elementFromPoint(o,i);a&&(null===(n=a.dataset)||void 0===n?void 0:n.index)&&l(a.dataset.index)}}},"toast"===c&&h&&u&&y(u,"toast"),r.map((function(e){var t;return i.default.createElement("div",{className:E(o+"-index-bar-sidebar-item",(t={},t[o+"-index-bar-sidebar-active"]=u===e,t)),key:e,onTouchStart:function(){return l(e)},"data-index":e},"sweat"===c&&h&&u===e&&y(e,"sweat"),i.default.createElement("div",{className:o+"-index-bar-sidebar-item-wrapper"},f(e)))})));return s?s(w):w}function Wi(e,t){var n=typeof t;return typeof e===n?e:"number"===n?Number(e):e.toString()}function Xi(e){return"number"==typeof e||"string"==typeof e}var Yi=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.children,u=e.sticky,c=void 0===u||u,s=e.groups,d=void 0===s?[]:s,f=e.tipType,v=void 0===f?"toast":f,m=e.defaultIndex,h=e.scrollBezier,p=e.scrollDuration,g=void 0===p?0:p,b=e.disableSidebar,y=void 0!==b&&b,w=e.onChange,C=e.onGroupItemClick,x=e.renderSideBar,T=e.renderSideBarItem,N=e.renderTip,k=e.renderStickyItem,S=e.renderGroupItem,R=t.useRef(null),M=t.useRef(null),L=function(e){var n=[];return t.Children.forEach(e,(function(e){t.isValidElement(e)&&e.type===ji?n.push(e):console.warn("<IndexBar /> only accept <IndexBar.Group /> as the children")})),n}(l),O=t.useMemo((function(){return d.length?d.map((function(e){return e.index})):L.map((function(e){return e.props.index}))}),[l,d]),_=t.useRef({}),B=t.useState((function(){return null!=m?m:null==O?void 0:O[0]})),D=B[0],A=B[1],P=t.useMemo((function(){return{sticky:c,getScrollContainer:function(){return M.current},activeIndex:D,updateRef:function(e,t){_.current[e]=t}}}),[c,D]),H=t.useRef(!1),V=function(e,t){A((function(n){var r=Wi(e,n);return r!==n&&(null==w||w(r,t)),r}))},F=function(e){var t=e.index,n=e.type,r=e.rightNow,o=void 0!==r&&r,i=null!=t?t:null==O?void 0:O[0],a=M.current;if(Xi(t)&&a){var l=function(e,t){for(var n=null,r=e.children,o=0;o<r.length;o++){var i=r[o],a=null==i?void 0:i.dataset;if(a&&a.index&&Wi(a.index,t)===t){n=i;break}}return n}(a,i);if(l){V(i,n);var u=o?0:g,c=l.offsetTop;"manual"===n&&(H.current=!0,setTimeout((function(){H.current=!1}),u)),u>0?I(a.scrollTop,c,(function(e){return a.scrollTop=e}),u,h):a.scrollTop=c}}};t.useImperativeHandle(n,(function(){return{dom:R.current,scrollToIndex:function(e,t){Xi(e)&&F({index:e,rightNow:t,type:"manual"})},recalculatePosition:function(e){var t=null!=e?e:D;if(t){var n=_.current[t];n&&n.recalculatePosition&&n.recalculatePosition()}}}}));return t.useEffect((function(){var e,t=jo((function(){if(M.current&&!H.current)for(var e=M.current.scrollTop,t=0;t<M.current.children.length;t++){var n=M.current.children[t];if(n&&n.dataset&&void 0!==n.dataset.index&&n.offsetTop+n.clientHeight>=e){V(n.dataset.index,"swipe");break}}}),100);return D&&F({index:D,rightNow:!0,type:"manual"}),null===(e=M.current)||void 0===e||e.addEventListener("scroll",t),function(){var e;null===(e=M.current)||void 0===e||e.removeEventListener("scroll",t)}}),[]),i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement(Fi.Provider,{value:P},i.default.createElement("div",{className:E(t+"-index-bar",o),style:a,ref:R},i.default.createElement("div",{className:t+"-index-bar-container",ref:M},L.length?L:null==d?void 0:d.map((function(e){return i.default.createElement(ji,{index:e.index,key:e.index,list:e.list,onGroupItemClick:C,renderGroupItem:S,renderStickyItem:k})}))),!y&&i.default.createElement(qi,{tipType:v,activeIndex:D,prefixCls:t,indexes:O,onTouching:function(e){return H.current=e},onClick:function(e){return F({index:e,type:"sidebar"})},renderSideBar:x,renderSideBarItem:T,renderTip:N})))}))})),Gi=G(Yi,{Group:ji}),Ui=[1,2,3,4,5,6,7,8,9,0],Ki=t.forwardRef((function(e,n){var r=e.normalKeyClass,o=e.normalKeyStyle,a=e.className,l=void 0===a?"":a,s=e.style,d=e.type,f=void 0===d?"number":d,v=e.randomOrder,m=void 0!==v&&v,h=e.title,p=e.rightColumns,g=e.confirmClosable,b=e.confirmButton,y=e.deleteButton,w=e.keyboardButton,C=e.close,x=e.onConfirm,T=e.onDelete,N=e.onChange,k=c(e,["normalKeyClass","normalKeyStyle","className","style","type","randomOrder","title","rightColumns","confirmClosable","confirmButton","deleteButton","keyboardButton","close","onConfirm","onDelete","onChange"]),S=t.useRef(null),R=t.useRef(null),M=t.useContext(Te),L=M.prefixCls,O=M.locale,_=void 0===O?J:O,I=L+"-keyboard",B=t.useMemo((function(){var e=m?Ui.sort((function(){return Math.random()-.5})):Ui,t=e.slice(-1)[0],n=e.slice(0,-1).reduce((function(e,t){return(!e[e.length-1]||e[e.length-1].length>=3)&&e.push([]),e[e.length-1].push(t),e}),[]);switch(f){case"confirm":n.push([t,"."]);break;case"tool":n.push([".",t,{type:"delete"}]);break;default:n.push([{type:"keyboard"},t,{type:"delete"}])}return n}),[f]),D=t.useMemo((function(){switch(f){case"number":default:return[];case"confirm":return[{type:"delete"}];case"tool":return["+","-","×","÷"]}}),[f]),A=t.useCallback((function(){return"confirm"!==f?null:i.default.createElement("div",{onClick:function(){g&&C(),null==x||x()},className:E(I+"-key",I+"-key-confirm")},b||_.Keyboard.confirm)}),[f]);t.useEffect((function(){var e=function(e){R.current&&(R.current.contains(e.target)||e.target===R.current||C())};return document.addEventListener("click",e),function(){document.removeEventListener("click",e)}}),[]),t.useImperativeHandle(n,(function(){return u({keyboard:R.current},S.current)}));var P=function(e,t,n){var a="string"==typeof e||"number"==typeof e?{type:"content",content:e,value:e}:e;return i.default.createElement("button",{onClick:function(){return function(e){switch(e.type){case"delete":null==T||T();break;case"keyboard":C();break;default:null==N||N(e.value)}}(a)},className:E(I+"-key",r,n),key:t,style:o},function(e){switch(e.type){case"delete":return y||i.default.createElement(li,null);case"keyboard":return w||i.default.createElement(ai,null);default:return e.content}}(a))};return i.default.createElement(_t,u({ref:S,maskClass:I+"-popup",close:C},k),i.default.createElement("div",{className:E(I,""+l),style:s,ref:R},h,i.default.createElement("div",{className:I+"-wrapper"},i.default.createElement("div",{className:I+"-key-wrapper"},B.map((function(e,t){return i.default.createElement("div",{className:I+"-row",key:t},e.map((function(e,n){var r;return P(e,String(n),((r={})[I+"-key-special"]="confirm"===f&&t===B.length-1&&0===n,r))})))}))),p||(D.length>0?i.default.createElement("div",{className:I+"-col"},D.map((function(e,t){return P(e,String(t))})),A()):null))))})),Zi=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.beforeReadyArea,u=e.loadingArea,c=e.noMoreArea,s=e.prepareArea,d=e.retryArea,f=e.defaultStatus,v=void 0===f?"prepare":f,m=e.status,h=e.getScrollContainer,p=e.trigger,g=void 0===p?"scroll":p,b=e.threshold,y=void 0===b?200:b,E=e.throttle,w=void 0===E?0:E,C=e.getDataAtFirst,x=void 0===C||C,T=e.getData,N=e.blockWhenLoading,k=void 0===N||N,S=e.onStatusChange,R=e.onClick,M=e.onEndReached,L=t.useRef(null),O="scroll"===g&&x,_=t.useState(v),I=_[0],B=_[1],D=t.useRef(!1),A=m||I,P=t.useRef(A),H=t.useCallback((function(e,t){B(e),S&&S(e,t)}),[S]),V=t.useCallback((function(e){k&&"loading"===P.current||(H("loading",e),null==T||T((function(e){H(e,"manual")})))}),[k,H,T]);t.useEffect((function(){k&&"loading"===A||(D.current=!1),P.current=A}),[A]),Oe((function(){"scroll"===g&&"prepare"===A&&q(0,y)&&V("pageEnd")}),[A]),t.useEffect((function(){O&&"prepare"===P.current&&V("requestAtFirst")}),[g]);var j=t.useCallback((function(){q(z("scrollTop",h),y+1)?D.current||(D.current=!0,M&&M(),["nomore","retry","before-ready"].includes(P.current)||V("scrollEnd")):D.current=!1}),[h,y,V,M]);function q(e,t){return z("scrollHeight",h)-e-z("clientHeight",h)<=t}function W(e){("click"===g&&"prepare"===P.current||"retry"===P.current)&&V("click"),R&&R(e)}return t.useEffect((function(){var e=null,t=w?jo(j,w):j;if("scroll"===g){var n=F(h);n&&(n.addEventListener("scroll",t),e=n)}return function(){e&&e.removeEventListener("scroll",t)}}),[g,h,j,w]),t.useImperativeHandle(n,(function(){return{dom:L.current,changeStatus:H}}),[H]),i.default.createElement(ke,null,(function(e){var t=e.prefixCls,n=e.locale,r=void 0===n?J:n;return i.default.createElement("div",{className:t+"-load-more status-"+A+" "+o,ref:L,style:a,onClick:W},function(e){switch(A){case"before-ready":return l;case"prepare":return void 0===s?i.default.createElement("div",{className:"load-more-text prepare"},"scroll"===g?e.LoadMore.prepareScrollText:e.LoadMore.prepareClickText,e.LoadMore.loadMoreText):s;case"loading":return void 0===u?i.default.createElement("div",{className:"load-more-text loading"},e.LoadMore.loadingText):u;case"nomore":return void 0===c?i.default.createElement("div",{className:"load-more-text nomore"},e.LoadMore.noDataText):c;case"retry":return void 0===d?i.default.createElement("div",{className:"load-more-text retry"},e.LoadMore.failLoadText):d;default:return null}}(r))}))}));function $i(e){var t=e.color,n=void 0===t?"currentColor":t;return i.default.createElement("div",{className:"c-svg-arrow nav-bar-back"},i.default.createElement("svg",{height:"100%",viewBox:"0 0 16 16"},i.default.createElement("path",{id:"path-1_1_",d:"M2.1,8l5.4,5.4c0.1,0.1,0.1,0.3,0,0.5L7,14.4c-0.1,0.1-0.3,0.1-0.5,0L0.7,8.5c-0.3-0.3-0.3-0.7,0-0.9\n l5.9-5.9c0.1-0.1,0.3-0.1,0.5,0l0.5,0.5c0.1,0.1,0.1,0.3,0,0.5L2.1,8z",fill:n})))}var Ji=t.forwardRef((function(e,n){var r=e.children,o=e.title,a=void 0===o?"":o,l=e.onClickLeft,c=e.leftContent,s=void 0===c?i.default.createElement($i,null):c,d=e.onClickRight,f=e.rightContent,v=e.onShowChange,m=e.style,h=e.className,p=void 0===h?"":h,g=e.wrapClass,b=e.placeholder,y=void 0===b||b,w=e.fixed,C=void 0===w||w,x=e.hasBottomLine,T=void 0===x||x,N=e.statusBarHeight,k=void 0===N?0:N,S=e.extra,R=e.getScrollContainer,M=e.showOffset,L=void 0===M?0:M,O=e.onScrollChange,_=e.getComputedStyleByScroll,I=e.ariaLabel,B=void 0===I?"":I,D=e.ariaRole,A=void 0===D?"banner":D,P=t.useRef(null),H=t.useState(L>0),V=H[0],j=H[1],q=V?"transparent":"",W=t.useState({}),X=W[0],Y=W[1],G=Ie();t.useImperativeHandle(n,(function(){return{navBar:P.current,dom:P.current}})),t.useEffect((function(){null==v||v(!V)}),[V]);var U=function(){!function(e){if(j(e<L),null==O||O(e),_){var t=_(e);Y(t)}}(z("scrollTop",R)||0)};function K(e){l&&l(e)}function Z(e){d&&d(e)}return t.useEffect((function(){var e=L||_||O,t=F(R);return U(),e&&t&&t.addEventListener("scroll",U,!1),function(){e&&t&&t.removeEventListener("scroll",U,!1)}}),[L,_,O,R]),i.default.createElement(ke,null,(function(e){var t,n,o=e.prefixCls;return i.default.createElement("div",{ref:P,className:E(g,o+"-nav-bar",(t={},t[o+"-nav-bar-fixed"]=C,t[o+"-nav-bar-float"]=!y,t[o+"-nav-bar-hide"]=V,t)),style:u(u({paddingTop:C&&k?k+"px":"0px"},m||{}),q?{background:q}:{}),"aria-label":B,role:A},i.default.createElement("div",{className:E(p,G,o+"-nav-bar-wrapper",(n={},n[o+"-nav-bar-wrapper-fixed"]=C,n[o+"-nav-bar-wrapper-border"]=T,n)),style:u({paddingTop:k?k+"px":"0px"},X)},i.default.createElement("div",{className:o+"-nav-bar-inner all-border-box"},s?i.default.createElement("div",{className:o+"-nav-bar-left",onClick:K},s):null,r||i.default.createElement("div",{className:o+"-nav-bar-title"},i.default.createElement("div",{className:o+"-nav-bar-title-text"},a)),f?i.default.createElement("div",{className:o+"-nav-bar-right",onClick:Z},f):null),S))}))})),Qi=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.children,u=e.leftContent,c=e.rightContent,s=e.marquee,d=void 0===s?"overflow":s,f=e.closeable,v=void 0===f||f,m=e.closeIcon,h=void 0===m?i.default.createElement(Qo,null):m,p=e.wrapable,g=void 0===p||p,b=e.speed,y=void 0===b?50:b,w=e.delay,C=void 0===w?1e3:w,x=e.autoSetGradientStyle,T=void 0===x||x,N=e.onClick,k=e.onClose,S=t.useContext(Te).useRtl,R=t.useRef(null),M=t.useRef(null),L=t.useRef(null),O=t.useRef(null),_=t.useState(!1),I=_[0],B=_[1],D=t.useMemo((function(){var e=[];return"none"===d&&g||e.push("no-wrap"),"none"===d&&e.push(g?"wrapable":"ellipsis"),e}),[d,g]),A=t.useMemo((function(){if(!T)return{};var e,t=(null==a?void 0:a.backgroundColor)||(null==a?void 0:a.background),n=(e=String(t)||"")?U[e]?U[e]+"00":/^#[A-Fa-f0-9]{6}$/.test(e)?e+"00":/^rgb\(.*?\)$/.test(e)?e.replace(/rgb\((.*?)\)/,"rgba($1, 0)"):"":"";return n?{background:"linear-gradient(to right, "+t+", "+n+")"}:{}}),[a]);function P(){R.current&&H(R.current)}function V(e){e.stopPropagation(),null==k||k(e),P()}function F(){we((function(){setTimeout((function(){!function(){if(!M.current||!L.current)return;var e=L.current,t="always"===d,n=M.current.offsetWidth,r=L.current.offsetWidth;"overflow"===d&&n<r&&(t=!0);if(B(t),function(){O.current&&(clearTimeout(O.current),O.current=null)}(),t){var o=r/y;e.style.animationDuration=o+"s",O.current=window.setTimeout((function(){B(!1),e.style.animationDuration=n/y+o+"s",e.style.animationIterationCount="infinite";var t=S?"paddingRight":"paddingLeft";e.style[t]=n+"px",we((function(){B(!0)}))}),1e3*o)}}()}),I?0:C)}))}return t.useImperativeHandle(n,(function(){return{dom:R.current,close:P,updateData:F}}),[F]),t.useEffect((function(){F()}),[S]),i.default.createElement(ke,null,(function(e){var t,n=e.prefixCls;return t=n+"-notice-bar",i.default.createElement("div",{className:E(t,o,D),style:a,ref:R,onClick:N},u?i.default.createElement("div",{className:t+"-left-part"},u):null,i.default.createElement("div",{className:t+"-content",ref:M},I?i.default.createElement("i",{className:t+"-gradient left",style:A}):null,i.default.createElement("div",{className:E(t+"-content-inner",{animate:I}),ref:L},l),I?i.default.createElement("i",{className:t+"-gradient right",style:A}):null),c?i.default.createElement("div",{className:t+"-right-part"},c):null,v?i.default.createElement("div",{className:t+"-close",onClick:V},h):null)}))}));function ea(e,t){return function(n,r){var o="string"==typeof n?{content:n,type:"info"}:n;void 0!==t&&(o.type=t);var i=document.createElement("div"),a=o.getContainer;a?a().appendChild(i):document.body.appendChild(i);var l=new Nt(e,i,r),c=l.render,s=l.unmount;var d=u(u({},o),{close:v,onClose:function(){var e=o.onClose;e&&e(),s(),i.parentNode&&i.parentNode.removeChild(i)},getContainer:function(){return i},visible:!1}),f=!1;function v(){f=!0,d.visible=!1,c(d)}return c(d),we((function(){f||(d.visible=!0,c(d))})),{update:function(e){d=u(u({},d),e),c(d)},close:v}}}var ta=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,l=e.style,c=e.visible,s=void 0!==c&&c,d=e.transitionDuration,f=void 0===d?300:d,v=e.content,m=e.duration,h=void 0===m?3e3:m,p=e.onClose,g=e.type,b=void 0===g?"info":g,y=e.close,E=e.getContainer,w=t.useRef(null),C=t.useRef(null),x=t.useRef(),T=t.useRef(),N=t.useState(!s),k=N[0],S=N[1],R=t.useState(0),M=R[0],L=R[1];function O(){if(C.current){var e=C.current.getBoundingClientRect().height;L(e)}}t.useImperativeHandle(n,(function(){return{dom:w.current,updateLayout:O}})),t.useEffect((function(){return s&&O(),s&&h&&(clearTimeout(x.current),x.current=window.setTimeout((function(){null==y||y()}),h)),function(){s&&clearTimeout(x.current)}}),[s,h]),Oe((function(){s||(T.current=window.setTimeout((function(){p&&p()}),f))}),[s]),t.useEffect((function(){return we((function(){S(!0)})),function(){clearTimeout(T.current)}}),[]);var _=function(e){return i.default.createElement("div",{className:e+"-notify "+e+"-notify-"+b+" "+o,style:u(u(u({},l),k?Je({transitionDuration:f+"ms"}):{}),{height:s?M:0}),ref:w},(t=e+"-notify",v?i.default.createElement("div",{className:t+"-content "+(s?t+"-content-transition-Y0":t+"-content-transition-Y100"),ref:C,style:u({},k?Je({transitionDuration:f+"ms"}):{})},v):null));var t};return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return E?a.default.createPortal(_(t),E()):_(t)}))}));var na=G(ta,function(e){return{info:ea(e),success:ea(e,"success"),error:ea(e,"error"),warn:ea(e,"warn")}}(Se(ta)));function ra(){return i.default.createElement("svg",{width:"8",height:"14",viewBox:"0 0 8 14",fill:"none"},i.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.40514 12.7583C7.6004 12.563 7.6004 12.2465 7.40514 12.0512L2.40095 7.04701L7.36396 2.084C7.55922 1.88874 7.55922 1.57216 7.36396 1.37689L7.01041 1.02334C6.81515 0.828077 6.49856 0.828077 6.3033 1.02334L0.646447 6.68019C0.470402 6.85624 0.453075 7.1309 0.594469 7.32636C0.617837 7.37275 0.64889 7.41626 0.687628 7.455L6.34448 13.1119C6.53974 13.3071 6.85633 13.3071 7.05159 13.1119L7.40514 12.7583Z",fill:"currentColor"}))}var oa=t.forwardRef((function(e,n){var r,o=t.useContext(Te),a=o.prefixCls,l=o.locale,u=e.className,c=void 0===u?"":u,s=e.style,d=e.current,f=void 0===d?1:d,v=e.pageSize,m=void 0===v?10:v,h=e.total,p=void 0===h?5:h,g=e.icon,b=void 0!==g&&g,y=e.justify,w=void 0===y?"side":y,C=e.hideOnOnePage,x=void 0!==C&&C,T=e.nextFieldType,N=void 0===T?"default":T,k=e.renderPrevField,S=e.renderNextField,R=e.type,M=void 0===R?"default":R,L=e.prevFieldText,O=void 0===L?null==l?void 0:l.Pagination.previousPage:L,_=e.nextFieldText,I=void 0===_?null==l?void 0:l.Pagination.nextPage:_,B=e.onChange,D=Ie(),A=t.useMemo((function(){return Math.ceil(p/m)}),[p,m]),P=t.useRef(null);t.useImperativeHandle(n,(function(){return{dom:P.current}}));var H=function(e){return"prev"===e?Array.isArray(b)&&Boolean(b.length)?i.default.createElement("span",{className:"btn-icon"},b[0]):"[object Object]"===Object.prototype.toString.call(b)?i.default.createElement("span",{className:"btn-icon"},b):b?i.default.createElement("span",{className:"btn-icon"},i.default.createElement(ra,null)):null:Array.isArray(b)&&Boolean(b.length)?i.default.createElement("span",{className:"btn-icon"},b.length>=2?b[1]:b[0]):"[object Object]"===Object.prototype.toString.call(b)?i.default.createElement("span",{className:"btn-icon next"},b):b?i.default.createElement("span",{className:"btn-icon next"},i.default.createElement(ra,null)):null},V=a+"-pagination";return x&&1===A?i.default.createElement("div",{className:E(V,c)}):i.default.createElement("div",{ref:P,className:E(V,D,(r={},r[V+"-simple"]="none"===M,r),c),style:s},function(e){var t;if("none"===M)return null;var n=E(e+"-prev-field",((t={})["flex-"+w]=!0,t));return void 0===k?i.default.createElement("div",{className:n},i.default.createElement("div",{className:E(e+"-field","prev",{text:"text"===M,button:"text"!==M,disabled:1===f}),onClick:function(){f<=1||null==B||B({pageSize:m,pageNum:A,current:Math.max(1,f-1)})}},H("prev"),Boolean(O)&&i.default.createElement("span",{className:"btn-text"},O))):i.default.createElement("div",{className:n},k?k({current:f,pageSize:m,pageNum:A}):null)}(V),i.default.createElement("div",{className:V+"-item"},i.default.createElement("span",{className:V+"-item-active"},f)," / ",A),function(e){var t,n;if("none"===M)return null;var r=E(e+"-next-field",((t={})["flex-"+w]=!0,t));if(void 0===S)return i.default.createElement("div",{className:r},i.default.createElement("div",{className:E(e+"-field","next",(n={text:"text"===M,button:"text"!==M},n["default"===N?M:"primary"]=f<A,n.disabled=f>=A,n)),onClick:function(){f>=A||null==B||B({pageSize:m,pageNum:A,current:Math.min(f+1,A)})}},Boolean(I)&&i.default.createElement("span",{className:"btn-text"},I),H("next")));var o=S&&S({current:f,pageSize:m,pageNum:A});return i.default.createElement("div",{className:r},o)}(V))}));var ia=t.forwardRef((function(e,n){var r=t.useContext(Te).prefixCls,o=e.className,a=e.needShadow,l=e.content,u=e.direction,c=e.position,s=e.minWidth,d=e.maxWidth,f=e.arrowWidth,v=e.transformOrigin,m=e.mode,h=e.showCloseIcon,p=void 0!==h&&h,g=e.textSuffix,b=void 0===g?null:g,y=e.renderArrow,w=e.onClickCloseIcon,C=e.onClickTextSuffix,x=t.useRef(null),T=t.useRef(null),N=Me(!1),k=N[0],S=N[1];t.useImperativeHandle(n,(function(){return{dom:x.current,content:T.current}})),t.useEffect((function(){var e=c.top,t=c.bottom,n=c.height,r=c.left,o=c.width;(r||o||e||n||t)&&(k||setTimeout((function(){S(!0)}),0))}),[c,k]);var R,M,L,O;return i.default.createElement("div",{ref:x,className:E(r+"-popover-inner","popover-inner","all-border-box",m+"-mode",o,{show:k,"with-shadow":a,"with-suffix":p||b,"custom-content":"string"!=typeof l}),style:(M=c.top,L=c.bottom,O={height:c.height+"px",left:c.left+"px",minWidth:s,maxWidth:d},M?O.top=M+"px":L&&(O.bottom=L+"px"),O.transformOrigin=v.x+" "+v.y,Je(O))},i.default.createElement("div",{className:"popover-bg"},y?y({arrowWidth:f,arrowLeft:c.arrowLeft,direction:u}):i.default.createElement("div",{className:"popover-arrow "+u,style:(R=c.arrowLeft,{width:f,height:f,marginLeft:R?R+"px":null,marginRight:R?R+"px":null})},i.default.createElement("div",{className:"popover-arrow-content"}))),i.default.createElement("div",{className:E("popover-content",u,{"show-close-icon":p}),ref:T},"string"==typeof l?i.default.createElement(i.default.Fragment,null,i.default.createElement("div",{className:"content-text"},l),p&&i.default.createElement(i.default.Fragment,null,i.default.createElement("div",{className:"icon-divider"}),i.default.createElement("div",{className:"text-close-icon",onClick:w},i.default.createElement(Qo,null))),b&&i.default.createElement("div",{className:"text-suffix",onClick:C},b)):l))})),aa={left:null,top:null,bottom:null,width:null,height:null,arrowLeft:0},la={top:14,right:14,bottom:14,left:14},ua=!0,ca=function(e,n,r,o){var i=e.direction,a=void 0===i?"topRight":i,l=e.verticalOffset,s=void 0===l?10:l,d=e.horizontalOffset,f=void 0===d?8:d,v=e.edgeOffset,m=void 0===v?14:v,p=e.arrowWidth,g=void 0===p?9:p,b=e.mode,y=void 0===b?"follow":b,E=e.useAutoDirection,w=void 0===E?ua:E,C=t.useState(aa),x=C[0],T=C[1],N=t.useMemo((function(){var e=x.top,t=x.bottom,n=x.height,r=x.left,o=x.width;return!(r||o||e||n||t)}),[x]),k=t.useState({x:"0",y:"0"}),S=k[0],R=k[1],M=Le(a),L=M[0],O=M[1],_=M[2],I=t.useCallback((function(e){return et(h(m)?m[e]:m,la[e])}),[m]),B=t.useCallback((function(e){return et(h(w)?w[e]:w,ua)}),[w]);function D(e){var t=e.childRect,n=e.config,r=u(u({},n),{adjustOffset:0});r.arrowLeft=function(e){var t=e.childRect,n=e.config;return-1!==L.indexOf("Left")||-1!==L.indexOf("Right")?(t.width-g)/2+f:(n.width-g)/2}({childRect:t,config:n});var i=screen.availWidth,a=[I("top"),I("right"),I("bottom"),I("left")],l=a[0],c=a[1],d=a[2],v=a[3],m=[B("vertical"),B("horizontal")],h=m[0];if(m[1])if(-1!==L.indexOf("Right")){if((C=Number(n.width)-t.left-t.width)>0){var p=C+v;r.left=Number(r.left)+p,r.arrowLeft+=p,r.adjustOffset=p}if(i-t.right<c){p=-((C=c)-(i-t.right));r.left=Number(r.left)+p,r.adjustOffset=p}}else if(-1!==L.indexOf("Center")){var b=(Number(n.width)-t.width)/2,E=b-(i-t.right),w=b-t.left;if(E>0){p=-(E+c);r.left=Number(r.left)+p,r.arrowLeft-=p,r.adjustOffset=p}if(w>0){p=w+v;r.left=Number(r.left)+p,r.arrowLeft-=p,r.adjustOffset=p}}else if(-1!==L.indexOf("Left")){var C;if((C=Number(n.width)-t.width-(i-t.right))>0){p=-(C+c);r.left=Number(r.left)+p,r.arrowLeft-=p,r.adjustOffset=p}t.left<v&&(C=v,r.left=Number(r.left)+C,r.adjustOffset=v)}if(h){var x=t.bottom-(r.bottom&&r.height?r.bottom+r.height:0),T=t.top+(r.top&&r.height?r.top+r.height:0);-1!==L.indexOf("top")&&x<l?(r.top=s+t.height,r.bottom=null,W("bottom")):-1!==L.indexOf("bottom")&&T+d>window.innerHeight&&(r.top=null,r.bottom=s+t.height,W("top"))}if("global"===y){var N=o.current;if(!N)return r;var k=N.getBoundingClientRect(),S=k.top,R=k.left,M=k.bottom;if(null!==r.left&&(r.left+=R),null!==r.top&&(r.top+=S),null!==r.bottom){var O=window.innerHeight||document.documentElement.clientHeight;r.bottom=O-(M-r.bottom)}}return r}function A(e,t){var n=D({childRect:e,config:t}),r=n.adjustOffset,o=c(n,["adjustOffset"]),i=function(e,t){var n=e.arrowLeft,r=e.width||0,o=e.height||0,i=g/2,a=O.current.indexOf("top")>-1?i+o+"px":"-"+i+"px";return{x:O.current.indexOf("Left")>-1?n+i+"px":O.current.indexOf("Right")>-1?r-(n+i)+"px":r/2-t+"px",y:a}}(o,r);R(i),T(o)}t.useEffect((function(){_(a)}),[a]);var P=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;A(r,{left:-(t-r.width-f),width:t,top:null,height:n,bottom:s+r.height,arrowLeft:0})},H=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;A(r,{left:-(t-r.width)/2,width:t,top:null,height:n,bottom:s+r.height,arrowLeft:0})},V=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;A(r,{left:-f,width:t,top:null,height:n,bottom:s+r.height,arrowLeft:0})},F=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;A(r,{left:-(t-r.width-f),width:t,bottom:null,height:n,top:s+r.height,arrowLeft:0})},z=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;A(r,{left:-(t-r.width)/2,width:t,bottom:null,height:n,top:s+r.height,arrowLeft:0})},j=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;A(r,{left:-f,width:t,bottom:null,height:n,arrowLeft:0,top:s+r.height})},q=t.useCallback((function(){var e,t=null===(e=n.current)||void 0===e?void 0:e.content;if(t){var o=t.offsetWidth,i=t.offsetHeight;if(0!==o&&0!==i){var a=r.current;if(a){var l={popoverWidth:o,popoverHeight:i,childRect:a.getBoundingClientRect()};switch(L){case"topRight":P(l);break;case"topCenter":H(l);break;case"topLeft":V(l);break;case"bottomRight":F(l);break;case"bottomCenter":z(l);break;case"bottomLeft":j(l)}}}}}),[r,L,n,P,H,V,F,z,j]),W=function(e){if(-1===L.indexOf(e)){var t=L.replace(/top|bottom/,e);_(t),O.current=t}},X=t.useCallback((function(){var e=n.current;if(e){var t=e.content;if(t){var r=t.getBoundingClientRect(),o=r.top,i=r.bottom;(-1!==L.indexOf("top")&&o<I("top")||-1!==L.indexOf("bottom")&&i+I("bottom")>window.innerHeight)&&q()}}}),[L,n,q,I]);return{direction:L,position:x,isCalcPosition:N,arrowWidth:g,transformOrigin:S,computedChildAndPopoverOffset:q,resetPosition:function(){T(aa),_(a)},onAdjustDirection:W,adjustVerticalDirection:X}},sa=0,da=function(e,n,r,o,i,a){var l=e.clickOtherToClose,u=void 0===l||l,c=e.touchOtherToClose,s=void 0===c?void 0!==e.touchToClose&&e.touchToClose:c,d=e.duration,f=void 0===d?0:d,v=e.useAutoDirection,m=void 0===v||v,p=e.verticalScrollThrottle,g=void 0===p?100:p,b=e.preventBodyClick,y=void 0!==b&&b,E=e.getVerticalScrollContainer,w=void 0===E?function(){return document}:E,C=t.useRef(0),x=et(h(m)?m.vertical:m,ua),T=function(){i(!1),window.clearTimeout(C.current),C.current=0,k()},N=t.useMemo((function(){return jo(a,g)}),[a,g]);t.useEffect((function(){var e=w();return o.current&&e&&x&&e.addEventListener("scroll",N),function(){e&&e.removeEventListener("scroll",N)}}),[N,w,x,o]);var k=t.useCallback((function(){document.body.removeEventListener("click",S,!0),document.body.removeEventListener("touchstart",R);var e=w();e&&(e.removeEventListener("scroll",N),e.removeEventListener("scroll",M))}),[N]),S=t.useCallback((function(e){var t;O(n.current,e.target)||O((null===(t=r.current)||void 0===t?void 0:t.dom)||null,e.target)||(y&&(e.stopPropagation(),e.preventDefault()),T())}),[y]),R=t.useCallback((function(e){var t,i,a,l;(null===(t=e.targetTouches[0])||void 0===t?void 0:t.target)&&n.current&&(null===(i=r.current)||void 0===i?void 0:i.dom)&&o.current&&(O(n.current,null===(a=e.targetTouches[0])||void 0===a?void 0:a.target)||O(r.current.dom,null===(l=e.targetTouches[0])||void 0===l?void 0:l.target)||(y&&function(){clearTimeout(sa);var e=function e(t){t.stopPropagation(),t.preventDefault(),document.body.removeEventListener("click",e,!0),clearTimeout(sa)};document.body.addEventListener("click",e,!0),sa=window.setTimeout((function(){document.body.removeEventListener("click",e,!0)}),500)}(),T()))}),[y]),M=t.useCallback((function(){o.current&&s&&T()}),[s]);t.useEffect((function(){var e=w();return e&&s&&o.current&&e.addEventListener("scroll",M),function(){e&&e.removeEventListener("scroll",M)}}),[M,s]);return{popoverDisappear:T,mayRemoveEventListenerOnBody:k,startCloseTimer:function(){0!==f&&(C.current=window.setTimeout((function(){i(!1),k()}),f))},mayAddEventOnBody:function(){if(s){document.body.addEventListener("touchstart",R);var e=w();e&&e.addEventListener("scroll",M)}else u&&document.body.addEventListener("click",S,!0)}}},fa=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.innerPopoverClassName,l=void 0===a?"":a,u=e.style,c=void 0===u?{}:u,s=e.theme,d=void 0===s?"black":s,f=e.needShadow,v=void 0!==f&&f,m=e.content,h=void 0===m?"":m,p=e.transitionTimeout,g=void 0===p?300:p,b=e.minWidth,y=void 0===b?"10px":b,w=e.maxWidth,C=void 0===w?"90vw":w,x=e.transitionName,T=void 0===x?"fade":x,N=e.clickSelfToClose,k=void 0===N||N,S=e.touchSelfToClose,R=void 0===S?void 0!==e.touchToClose&&e.touchToClose:S,M=e.defaultVisible,L=void 0!==M&&M,O=e.visible,_=e.children,I=e.bordered,B=void 0===I?"white"===e.theme:I,D=e.showCloseIcon,A=void 0!==D&&D,P=e.textSuffix,H=void 0===P?null:P,V=e.mode,F=void 0===V?"follow":V,z=e.showMask,j=void 0!==z&&z,q=e.maskTransitionTimeout,W=void 0===q?{enter:450,exit:240}:q,X=e.renderArrow,Y=e.onChange,G=e.onClickCloseIcon,U=e.onClickTextSuffix,K=e.onClickMask,Z=t.useContext(Te).prefixCls,$=t.useState(!1),J=$[0],Q=$[1],ee=t.useRef(J),te=t.useRef(null),ne=t.useRef(null),re=t.useRef(null),oe=ca(e,re,ne,te),ie=oe.direction,ae=oe.position,le=oe.isCalcPosition,ue=oe.transformOrigin,ce=oe.computedChildAndPopoverOffset,se=oe.arrowWidth,de=oe.resetPosition,fe=oe.adjustVerticalDirection,ve=function(e){void 0===e&&(e=!0),e&&!le||(null==Y||Y(e),void 0===O&&Q(e))},me=da(e,te,re,ee,ve,fe),he=me.popoverDisappear,pe=me.mayAddEventOnBody,ge=me.startCloseTimer,be=me.mayRemoveEventListenerOnBody;function ye(){J&&ce()}t.useImperativeHandle(n,(function(){var e;return{dom:te.current,child:ne.current,innerPopover:re.current,innerPopoverDom:(null===(e=re.current)||void 0===e?void 0:e.dom)||null,updatePosition:ye}})),t.useEffect((function(){return(L||O)&&Q(!0),function(){be()}}),[]),t.useEffect((function(){void 0!==O&&Q(Boolean(O))}),[O]),t.useEffect((function(){ee.current&&ce()}),[_,h,ie,F]),t.useEffect((function(){J&&function(){if(ge(),setTimeout(pe,0),!le)return;setTimeout((function(){ce()}),0)}(),ee.current=J,J||(be(),setTimeout((function(){!ee.current&&de()}),("object"==typeof g?g.exit:g)||300))}),[J]);var Ee=function(){return i.default.createElement(ia,{className:E(d+"-theme",l,{bordered:B}),ref:re,direction:ie,minWidth:y,maxWidth:C,position:ae,arrowWidth:se,transformOrigin:ue,needShadow:v,content:h,mode:F,showCloseIcon:A,textSuffix:H,renderArrow:X,onClickCloseIcon:G,onClickTextSuffix:U})};return i.default.createElement(i.default.Fragment,null,j&&i.default.createElement(it,null,i.default.createElement(Tt,{in:J&&!le,timeout:W,type:"fade",mountOnEnter:!0,unmountOnExit:!0},i.default.createElement("div",{className:Z+"-popover-mask",onClick:K}))),i.default.createElement("div",{className:E(Z+"-popover",o,d+"-theme",F+"-mode",{bordered:B,"custom-content":"string"!=typeof h}),style:c,ref:te,onClick:function(){var e=ee.current;e?e&&k&&!R&&he():ve(!0)},onTouchStart:function(){R&&ee.current&&he()}},i.default.createElement(it,{getContainer:function(){return"global"===F?document.body:te.current}},J&&le&&Ee(),i.default.createElement(Tt,{in:J&&!le,timeout:g,type:T,mountOnEnter:!0,unmountOnExit:!0},Ee())),i.default.createElement("div",{ref:ne,className:"popover-child-inner"},_)))})),va=function(e){return t.forwardRef((function(n,r){var o=n.menu,a=n.menuLayout,l=void 0===a?"vertical":a,s=n.onSelect,d=n.onClickMenuItem,f=n.className,v=void 0===f?"":f,m=n.useClickStatus,h=void 0!==m&&m,p=n.clickStatusDuration,g=void 0===p?300:p,b=n.clickSelfToClose,y=void 0===b||b,w=n.touchSelfToClose,C=void 0===w?void 0!==n.touchToClose&&n.touchToClose:w,x=n.defaultVisible,T=void 0!==x&&x,N=n.visible,k=n.onChange,S=c(n,["menu","menuLayout","onSelect","onClickMenuItem","className","useClickStatus","clickStatusDuration","clickSelfToClose","touchSelfToClose","defaultVisible","visible","onChange"]),R=t.useContext(Te).prefixCls,M=t.useState(-1),L=M[0],O=M[1],_=t.useRef(0),I=t.useMemo((function(){return o.map((function(e){return"string"==typeof e?{text:e}:e}))}),[o]),B=t.useState(void 0===N?T:N),D=B[0],A=B[1];t.useEffect((function(){A(Boolean(N))}),[N]);var P=t.useRef(null);t.useImperativeHandle(r,(function(){return P.current}));var H=t.useMemo((function(){return i.default.createElement("div",{className:E(R+"-popover-menu-content",l+"-menu")},I.map((function(e,t){var n="string"==typeof e.text?e.text:"menu_item_"+t,r=e.text,a=e.value,l=void 0===a?n:a,u=e.disabled,c=void 0!==u&&u,f=e.icon;return i.default.createElement("div",{className:E(R+"-popover-menu-item",{disabled:c,active:L===t}),key:l,onTouchStart:function(){h&&!c&&(clearTimeout(_.current),O(t),_.current=window.setTimeout((function(){O(-1),_.current=0}),g))},onClick:function(){d&&d(l,o[t]),c||s&&s(l,o[t])}},f&&i.default.createElement("div",{className:E(R+"-popover-menu-icon")},f),i.default.createElement("div",{className:E(R+"-popover-menu-text")},r))})))}),[R,l,I,L,h,g,d,s]);return i.default.createElement(e,u({ref:P,visible:D,clickSelfToClose:y,touchSelfToClose:C,onChange:function(e){var t=function(){k&&"function"==typeof k&&k(e),void 0===N&&A(e)};!e&&h?window.setTimeout(t,Math.max(0,g-300)):t()}},S,{content:H,className:E(v,R+"-popover-menu")}))}))}(fa),ma=G(fa,{Menu:va});var ha=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.visible,l=e.children,s=e.maskStyle,d=e.contentStyle,f=e.direction,v=void 0===f?"bottom":f,m=e.percentToClose,h=void 0===m?.3:m,p=e.distanceToClose,g=void 0===p?10:p,b=e.speedToClose,y=void 0===b?200:b,w=e.allowSwipeDirections,C=e.exitDirection,x=e.onTouchMove,T=e.onTouchStart,N=e.onTouchEnd,k=e.onOpen,S=e.onClose,R=e.close,M=c(e,["className","visible","children","maskStyle","contentStyle","direction","percentToClose","distanceToClose","speedToClose","allowSwipeDirections","exitDirection","onTouchMove","onTouchStart","onTouchEnd","onOpen","onClose","close"]),L=t.useState(a),O=L[0],_=L[1],I=Le({direction:"X",value:0}),B=I[0],D=I[1],A=I[2],P=t.useState(!1),H=P[0],V=P[1],F=t.useRef(null),z=t.useRef(0),j=t.useRef(0),q=t.useRef(0),W=t.useRef(!1),X=t.useCallback((function(e){var t,n=null===(t=F.current)||void 0===t?void 0:t.content,r=(null==n?void 0:n.offsetWidth)||0,o=(null==n?void 0:n.offsetHeight)||0;return"X"===e?r:o}),[]),Y=t.useCallback((function(e){var t=e.direction,n=e.value,r=X(t);return r?Math.max(0,Math.min(1,Math.abs(n)/r)):0}),[]),G=t.useMemo((function(){return Y(B)}),[B]),U=t.useMemo((function(){return void 0!==w?w:[v]}),[w,v]),K=t.useCallback((function(e){var t,n,r,o;T&&T(e)||(V(!1),W.current=!0,z.current=(null===(n=null===(t=e.touches)||void 0===t?void 0:t[0])||void 0===n?void 0:n.clientX)||0,j.current=(null===(o=null===(r=e.touches)||void 0===r?void 0:r[0])||void 0===o?void 0:o.clientY)||0,q.current=(new Date).getTime())}),[T]),Z=t.useCallback((function(e,t,n){return"X"===e?t>0?"right":"left":n>0?"bottom":"top"}),[]),$=t.useCallback((function(e,t,n){var r,o,i,a,l;if((!x||!x(e,t,n))&&(t||(W.current=!1),W.current&&e.target!==(null===(r=F.current)||void 0===r?void 0:r.mask))){var u=(null===(i=null===(o=e.changedTouches)||void 0===o?void 0:o[0])||void 0===i?void 0:i.clientX)||0,c=(null===(l=null===(a=e.changedTouches)||void 0===a?void 0:a[0])||void 0===l?void 0:l.clientY)||0,s=u<0?0:u-z.current,d=c-j.current,f=Z("x"===n?"X":"Y",s,d),v=U.includes(f)?f:"",m=C||v,h=["top","bottom"].includes(m)?"Y":"X",p=["bottom","right"].includes(m)?1:-1;switch(v){case"top":case"bottom":A({direction:h,value:Math.abs(d)*p});break;case"left":case"right":A({direction:h,value:Math.abs(s)*p})}}}),[x,U,C]),J=t.useCallback((function(e,t){var n=Z(e,t,t);return("left"===n||"top"===n?-1:1)*X(e)}),[]),Q=t.useCallback((function(e){if((!N||!N(e))&&W.current){W.current=!1;var t=(new Date).getTime(),n=D.current,r=n.direction,o=n.value,i=Y(D.current),a=o/(t-q.current)*1e3;i>0&&i>=h&&Math.abs(o)>g||Math.abs(a)>y?(V(!1),R(e),we((function(){A({direction:r,value:J(r,o)})}))):(V(!0),A({direction:"X",value:0})),q.current=0}}),[N,h,g,y,R]);return t.useImperativeHandle(n,(function(){return F.current})),t.useEffect((function(){var e,t=null===(e=F.current)||void 0===e?void 0:e.content;return O&&t&&(t.addEventListener("touchstart",K),t.addEventListener("touchend",Q),t.addEventListener("touchcancel",Q)),function(){var e,t=null===(e=F.current)||void 0===e?void 0:e.content;O&&t&&(t.removeEventListener("touchstart",K),t.removeEventListener("touchend",Q),t.removeEventListener("touchcancel",Q))}}),[O,K,Q]),i.default.createElement(ke,null,(function(e){var t,n=e.prefixCls;return i.default.createElement(_t,u({ref:F,visible:a,close:R,className:E(n+"-popup-swiper",o,{"has-trans":H}),direction:v,onTouchMove:$,onOpen:function(){_(!0),null==k||k()},onClose:function(e){_(!1),A({direction:"X",value:0}),null==S||S(e)},maskStyle:u(u({},s||{}),{opacity:G?1-G:void 0}),contentStyle:(t=Je({transform:B.value?"translate"+B.direction+"("+B.value+"px) translateZ(2px)":void 0}),u(u({},d||{}),t))},M),l)}))}));var pa,ga=G(ha,function(e){return{open:(t=e,St(t,"ARCO_POPUP_SWIPER"))};var t}(Se(ha))),ba=t.forwardRef((function(e,n){var r=e.mode,o=void 0===r?"base":r,a=Math.min(100,Math.max(e.percentage,0)),l=e.top,c=e.percentPosition,s=void 0===c?"right":c,d=e.className,f=void 0===d?"":d,v=e.style,m=e.showPercent,h=void 0===m?"base"===o:m,p=e.renderPercent,g=e.trackColor,b=e.progressColor,y=e.disabled,w=void 0!==y&&y,C=e.trackStroke,x=e.progressStroke,T=e.duration,N=void 0===T?300:T,k=e.step,S=void 0===k?1:k,R=e.filleted,M=void 0===R||R,L=e.mountedTransition,O=void 0===L||L,_=e.mountedBezier,I=void 0===_?[.34,.69,.1,1]:_,B=t.useRef(null),D=ze(O,a,N,I,S),A=D[0],P=D[1];function H(e){return h?"follow"===e?void 0!==p?p(A):i.default.createElement("div",{className:E("text-follow",{"inner-disabled inner-block-disabled":w}),style:{background:b}},A,"%"):e===s?i.default.createElement("div",{style:{color:b},className:E("text","text-"+s,{"text-disabled":w&&("left"===s||"right"===s)})},void 0!==p?p(A):A+"%"):null:null}function V(e){var t=e.prefixCls;return i.default.createElement("div",{role:"progressbar","aria-valuenow":a,"aria-valuemax":100,"aria-valuemin":0,className:E(t+"-progress",{"progress-fixed":"nav"===o},{"progress-disabled":w},f),style:u({top:l},v),ref:B},i.default.createElement("div",{className:"progress-wrapper"},H("left"),i.default.createElement("div",{style:{background:g,height:C},className:E("progress-track","position-"+s,{filleted:M},{"nav-mode":"nav"===o})},i.default.createElement("div",{style:Je({background:b,width:A+"%",height:x,transition:P?"width linear "+N/1e3+"s":""}),className:E("progress-bar",{"bar-disabled":w,filleted:M})},"follow"===s?i.default.createElement("div",{className:"wrapper"},H("follow")):null)),H("right"),H("innerLeft")))}return t.useImperativeHandle(n,(function(){return{dom:B.current}})),i.default.createElement(ke,null,V)}));!function(e){e[e.Static=0]="Static",e[e.Pulling=1]="Pulling",e[e.Loosing=2]="Loosing",e[e.Loading=3]="Loading",e[e.Finish=4]="Finish"}(pa||(pa={}));var ya=function(e){var n=e.onRefresh,r=e.loosingMinHeight,o=t.useState(pa.Static),i=o[0],a=o[1],l=t.useRef(!1),u=t.useRef(null),c=t.useRef(null),s=t.useState(!1),d=s[0],f=s[1],v=t.useMemo((function(){var e,t;return null!==(t=null===(e=u.current)||void 0===e?void 0:e.getBoundingClientRect().height)&&void 0!==t?t:40}),[i]),m=t.useMemo((function(){return r||v}),[v,r]),h=t.useCallback((function(){return l.current=!0,Zo.Promise.all([null==n?void 0:n(),new Zo.Promise((function(e){setTimeout((function(){e()}),500)}))])}),[n]);return{status:i,setStatus:a,touching:d,setTouching:f,loadingRef:l,labelRef:u,domRef:c,loosingHeight:m,handleRefresh:h,tipsHeight:v}},Ea=function(e){var n=e.domRef,r=e.handleTouchStart,o=e.handleTouchMove,i=e.handleTouchEnd;t.useEffect((function(){var e;return null===(e=n.current)||void 0===e||e.addEventListener("touchstart",r,{passive:!1}),function(){var e;null===(e=n.current)||void 0===e||e.removeEventListener("touchstart",r)}}),[o]),t.useEffect((function(){var e;return null===(e=n.current)||void 0===e||e.addEventListener("touchmove",o,{passive:!1}),function(){var e;null===(e=n.current)||void 0===e||e.removeEventListener("touchmove",o)}}),[o]),t.useEffect((function(){var e,t;return null===(e=n.current)||void 0===e||e.addEventListener("touchend",i),null===(t=n.current)||void 0===t||t.addEventListener("touchcancel",i),function(){var e,t;null===(e=n.current)||void 0===e||e.removeEventListener("touchend",i),null===(t=n.current)||void 0===t||t.removeEventListener("touchcancel",i)}}),[i])},wa=function(e){var n=e.allowPullWhenNotTop,r=e.domRef,o=t.useCallback((function(){var e,t,o,i=null!==(o=null===(t=null===(e=r.current)||void 0===e?void 0:e.getBoundingClientRect())||void 0===t?void 0:t.height)&&void 0!==o?o:0;return r.current&&!(!n&&(r.current.scrollTop<0||r.current.scrollTop>r.current.scrollHeight-i))}),[n]);return{ifShouldHandle:o}},Ca=t.forwardRef((function(e,n){var r,o=t.useContext(Te),a=o.prefixCls,l=o.locale,c=void 0===l?J:l,s=t.useRef(0),d=e.className,f=e.style,v=e.children,m=e.loadingText,h=void 0===m?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement(tt,{type:"circle",radius:4}),i.default.createElement("span",null,c.PullRefresh.loadingText)):m,p=e.pullingText,g=void 0===p?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,c.PullRefresh.pullingText)):p,b=e.finishText,y=void 0===b?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,c.PullRefresh.finishText)):b,w=e.initialText,C=e.finishDelay,x=void 0===C?300:C,T=e.disabled,N=void 0!==T&&T,k=e.loosingMinHeight,S=e.useHideAsNestedScroll,R=void 0===S||S,M=e.allowPullWhenNotTop,L=void 0!==M&&M,O=e.onRefresh,_=t.useRef(0),I=t.useRef(pa.Static),B=t.useState({}),D=B[0],A=B[1],P=t.useState(0),H=P[0],V=P[1],F=ya({loosingMinHeight:k,onRefresh:O}),z=F.loadingRef,j=F.status,q=F.setStatus,W=F.labelRef,X=F.domRef,Y=F.touching,G=F.setTouching,U=F.loosingHeight,K=F.tipsHeight,Z=F.handleRefresh,$=wa({domRef:X,allowPullWhenNotTop:L}).ifShouldHandle,Q=t.useMemo((function(){var e,t;return R&&!Y&&j===pa.Pulling&&(null!==(t=null===(e=null==X?void 0:X.current)||void 0===e?void 0:e.scrollTop)&&void 0!==t?t:0)>0||N?u(u({},D),{opacity:0}):D}),[D,R,Y,N]),ee=((r={})[pa.Static]=void 0===w?g:w,r[pa.Pulling]=g,r[pa.Loading]=h,r[pa.Finish]=y,r),te=t.useCallback((function(e,t){void 0===t&&(t=function(){}),s.current===e&&A({position:"relative",height:"0px",top:0,transition:"height .45s"}),setTimeout((function(){s.current===e&&(X.current&&(X.current.style.overflow="auto"),q(pa.Pulling),A({position:"absolute",top:"-"+K+"px",height:K+"px",transition:"height 0s"}),I.current=pa.Static,z.current=!1,t())}),450)}),[K]),ne=t.useCallback((function(){!N&&!z.current&&X.current&&$()&&(G(!0),X.current&&0===X.current.scrollTop&&(X.current.scrollTop=1))}),[N,$]),re=function(){return new Promise((function(e){if(X.current){X.current.style.overflow="hidden";var t=(new Date).getTime();q(pa.Loading),A({position:"relative",top:0,height:K+"px",transition:"height 0s"}),s.current=t,Z().then((function(){ee[pa.Finish]?(q(pa.Finish),setTimeout((function(){te(t,e)}),x)):te(t,e)}))}}))},oe=t.useCallback((function(){N||z.current||!X.current||(G(!1),I.current===pa.Loosing&&re())}),[N,K]),ie=t.useCallback((function(){N||z.current||!X.current||setTimeout((function(){var e,t,n,r,o=-(null!==(t=null===(e=X.current)||void 0===e?void 0:e.scrollTop)&&void 0!==t?t:0)>U;o&&(_.current=null!==(r=null===(n=X.current)||void 0===n?void 0:n.scrollTop)&&void 0!==r?r:0),I.current=o?pa.Loosing:pa.Pulling}))}),[N,U]),ae=t.useCallback((function(){if(X.current){var e=X.current.getBoundingClientRect().height;V(e)}}),[]);return Re(ae),t.useImperativeHandle(n,(function(){return{dom:X.current,refresh:re,updateIOSHeight:ae}})),t.useEffect((function(){ae(),te(s.current)}),[]),Ea({domRef:X,handleTouchStart:ne,handleTouchMove:ie,handleTouchEnd:oe}),i.default.createElement("div",{className:E(a+"-pull-refresh all-border-box is-ios",d,{"is-disabled":N||!Y&&R}),ref:X,style:H>0?u({height:H},f||{}):f},i.default.createElement("div",{className:E(a+"-pull-refresh-content-wrapper")},i.default.createElement("div",{className:E(a+"-pull-refresh-label-wrapper"),style:Q},i.default.createElement("div",{className:E(a+"-pull-refresh-label"),ref:W},ee[j])),i.default.createElement("div",{className:E(a+"-pull-refresh-content"),style:H>0?{minHeight:H+1+"px"}:{}},v)))})),xa=t.forwardRef((function(e,n){var r,o=t.useContext(Te),a=o.prefixCls,l=o.locale,u=void 0===l?J:l,c=e.className,s=e.style,d=e.children,f=e.loosingText,v=void 0===f?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,u.PullRefresh.loosingText)):f,m=e.loadingText,h=void 0===m?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement(tt,{type:"circle",radius:4}),i.default.createElement("span",null,u.PullRefresh.loadingText)):m,p=e.pullingText,g=void 0===p?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,u.PullRefresh.pullingText)):p,b=e.finishText,y=void 0===b?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,u.PullRefresh.finishText)):b,w=e.initialText,C=e.finishDelay,x=void 0===C?300:C,T=e.loosingMinHeight,N=e.dampRate,k=void 0===N?4:N,S=e.disabled,R=void 0!==S&&S,M=e.useHideAsNestedScroll,L=void 0===M||M,O=e.onRefresh,_=e.allowPullWhenNotTop,I=void 0!==_&&_,B=t.useState({}),D=B[0],A=B[1],P=t.useRef(null),H=t.useRef(0),V=t.useRef(!1),F=ya({loosingMinHeight:T,onRefresh:O}),z=F.loadingRef,j=F.status,q=F.setStatus,W=F.labelRef,X=F.domRef,Y=F.touching,G=F.setTouching,U=F.loosingHeight,K=F.handleRefresh,Z=F.tipsHeight,$=wa({domRef:X,allowPullWhenNotTop:I}).ifShouldHandle,Q=t.useMemo((function(){var e,t;return L&&!Y&&j===pa.Pulling&&(null!==(t=null===(e=null==X?void 0:X.current)||void 0===e?void 0:e.scrollTop)&&void 0!==t?t:0)>0?{opacity:0}:{}}),[L,Y]),ee=((r={})[pa.Static]=void 0===w?g:w,r[pa.Pulling]=g,r[pa.Loosing]=v||g,r[pa.Loading]=h,r[pa.Finish]=y,r),te=function(e,t,n){if(e<5){if(e<0)return void(H.current=0);if(0===t)return setTimeout((function(){A({transition:"all 0s"})})),void(H.current=0)}var r=function(e,t,n){return e>t?t+(e-t)/n:e}(e,U,k);H.current=r,A({transform:r?"translateY("+r+"px)":"",transition:"all "+t/1e3+"s"}),setTimeout((function(){null==n||n()}),t)},ne=function(e){void 0===e&&(e=function(){}),te(0,300,(function(){X.current&&X.current.scrollTop<0&&(X.current.scrollTop=0),z.current=!1,q(pa.Static),e()}))},re=t.useCallback((function(e){var t;if(!(R||P.current||z.current)&&X.current&&$()){G(!0),0===X.current.scrollTop&&(X.current.scrollTop=1);var n=e.touches[0],r=n.pageX,o=n.pageY;r&&o&&(P.current={start:null===(t=X.current)||void 0===t?void 0:t.scrollTop,x:r,y:o}),q(pa.Pulling)}}),[R,$]),oe=function(){return new Promise((function(e){q(pa.Loading),we((function(){te(Z,300),K().then((function(){ee[pa.Finish]?(q(pa.Finish),setTimeout((function(){ne(e)}),x)):ne(e)}))}))}))},ie=t.useCallback((function(){(0!==H.current||$())&&(V.current=!1,G(!1),R||!P.current||z.current||(P.current=null,j===pa.Loosing?oe():ne()))}),[R,j,Z,$]),ae=t.useCallback((function(e){if(V.current=!0,!R&&!z.current&&X.current&&P.current){var t=e.touches[0].pageY-P.current.y-P.current.start;0===H.current&&X.current.scrollTop>0||0===H.current&&t<0||(q((function(){return t>U?pa.Loosing:pa.Pulling})),te(t,0),e.stopPropagation(),e.cancelable&&e.preventDefault())}}),[R,U]);return t.useEffect((function(){var e,t=function(){V.current&&X.current&&(X.current.scrollTop<0||H.current)&&(X.current.scrollTop=0)};return null===(e=X.current)||void 0===e||e.addEventListener("scroll",t),function(){var e;null===(e=X.current)||void 0===e||e.removeEventListener("scroll",t)}}),[]),t.useImperativeHandle(n,(function(){return{dom:X.current,refresh:oe,updateIOSHeight:function(){console.warn('updateIOSHeight 仅在 type="ios" 时可用')}}})),Ea({domRef:X,handleTouchStart:re,handleTouchMove:ae,handleTouchEnd:ie}),i.default.createElement("div",{className:E(a+"-pull-refresh all-border-box is-android",c,{"is-disabled":(R||!Y&&L)&&j!==pa.Loading}),style:s,ref:X},i.default.createElement("div",{className:E(a+"-pull-refresh-place"),style:Je(D)},i.default.createElement("div",{className:E(a+"-pull-refresh-label"),ref:W,style:Q},ee[j]),i.default.createElement("div",{className:E(a+"-pull-refresh-content",{"is-loading":[pa.Loading,pa.Finish].includes(j)})},d)))})),Ta=t.forwardRef((function(e,t){var n=e.type,r=e.useIosOptimize,o=e.children,a=c(e,["type","useIosOptimize","children"]),l=Ie(),s="ios"===n||r&&"ios"===(n||l)?Ca:xa;return i.default.createElement(s,u({},u(u({},a),{ref:t})),o)}));function Na(e,t){var n=e.keyword,r=e.highlightClassName,o=e.highlightStyle;return i.default.createElement("span",{className:r,style:o,key:t},n)}function ka(e){var t,n,r=e.prefixCls,o=e.associationItems,a=void 0===o?[]:o,l=e.highlightClassName,s=e.highlightMode,d=void 0===s?"none":s,f=e.highlightStyle,v=e.onAssociationClick,m=e.onAssociationItemClick,h=e.renderAssociation,p=e.renderAssociationItem,g=e.keyword,b=e.visible,y=r+"-association",w=y+"-item-highlight",C=function(e){if(!e||!g||"none"===d)return e;var t={keyword:g,content:e,highlightClassName:l||w,highlightStyle:f};return"contain"===d?function(e){var t=e.content,n=void 0===t?"":t,r=e.keyword,o=void 0===r?"":r,i=n.split(o),a=i.reduce((function(t,n,r){return t.push(n),r!==i.length-1&&t.push(Na(e,r)),t}),[]);return a}(t):"prefix"===d?function(e){for(var t=e.content,n=void 0===t?"":t,r=e.keyword,o=void 0===r?"":r,i=c(e,["content","keyword"]),a=-1,l=0;l<o.length&&!(l>=n.length||n[l]!==o[l]);l++)a=l;return a>-1?[Na(u(u({},i),{keyword:n.substring(0,a+1)}),0),n.substring(a+1)]:n}(t):"function"==typeof d?d(e,g,w):e},x=function(e,t){var n=e.content,r=n;return"string"==typeof n&&"none"!==d&&(r=C(n)),p&&(r=p(e,t,r)),i.default.createElement("div",{key:t,className:y+"-item",onClick:function(){return null==m?void 0:m(e,t)}},r)};return i.default.createElement("div",{className:E(y,(t={},t[y+"-visible"]=b,t)),onClick:v},(n=a.map(x),h?h(n):n))}function Sa(e){var n=e.className,r=e.onCancel,o=e.focusing,a=e.currentInputValue,l=e.text,u=t.useState(o||Boolean(a)),c=u[0],s=u[1];return t.useEffect((function(){s(o||Boolean(a))}),[o,a]),c?i.default.createElement("span",{className:n,onClick:function(){null==r||r(),we((function(){s(!1)}))}},l):null}var Ra=t.forwardRef((function(e,n){var r=t.useContext(Te),o=r.prefixCls,a=r.locale,l=o+"-search-bar",s=e.inputClass,d=e.inputStyle,f=e.type,v=void 0===f?"search":f,m=e.nativeProps,h=e.id,p=e.name,g=e.maxLength,b=e.placeholder,y=void 0===b?null==a?void 0:a.SearchBar.placeholder:b,w=e.readOnly,C=e.onKeyUp,x=e.onKeyPress,T=e.disabled,N=e.pattern,k=e.prefix,S=void 0===k?i.default.createElement(Jo,{className:l+"-search-icon"}):k,R=e.append,M=e.textAlign,L=void 0===M?"left":M,O=e.actionButton,_=e.clearable,I=void 0===_||_,B=e.clearShowType,D=void 0===B?"value":B,A=e.shape,P=void 0===A?"square":A,H=e.className,V=e.enableAssociation,F=void 0!==V&&V,z=e.associationVisible,j=e.associationShowType,q=void 0===j?"default":j,W=e.associationItems,X=e.highlightClassName,Y=e.highlightMode,G=e.highlightStyle,U=e.onCancel,K=e.onAssociationClick,Z=e.onAssociationItemClick,$=e.renderAssociation,J=e.renderAssociationItem,Q=c(e,["inputClass","inputStyle","type","nativeProps","id","name","maxLength","placeholder","readOnly","onKeyUp","onKeyPress","disabled","pattern","prefix","append","textAlign","actionButton","clearable","clearShowType","shape","className","enableAssociation","associationVisible","associationShowType","associationItems","highlightClassName","highlightMode","highlightStyle","onCancel","onAssociationClick","onAssociationItemClick","renderAssociation","renderAssociationItem"]),ee=t.useRef(null),te=to(u({className:E(H,l+"-"+P),prefix:S,clearable:I,append:function(e,t){var n=null;n="function"==typeof R?R(e,t):R;var r=void 0===O?i.default.createElement(Sa,{focusing:e,currentInputValue:t,className:l+"-cancel-btn",onCancel:U,text:null==a?void 0:a.SearchBar.cancelBtn}):O;return i.default.createElement(i.default.Fragment,null,n,r,F?i.default.createElement(ka,{prefixCls:l,keyword:t,visible:me,associationItems:W,highlightClassName:X,highlightMode:Y,highlightStyle:G,onAssociationClick:K,onAssociationItemClick:Z,renderAssociation:$,renderAssociationItem:J}):null)},clearShowType:D},Q),ee),ne=te.inputValue,re=te.handleChange,oe=te.handleInput,ie=te.handleKeyDown,ae=te.handleFocus,le=te.handleBlur,ue=te.handleClick,ce=te.renderWrapper,se=te.wrapRef,de=t.useState("always"===q||("value"===q||"default"===q)&&Boolean(ne)),fe=de[0],ve=de[1],me=null!=z?z:fe;t.useImperativeHandle(n,(function(){return{dom:se.current,input:ee.current,toggleAssociation:function(e){ve(null!=e?e:!fe)}}}));var he=function(e,t){"always"===q?ve(!0):"focus"===q?ve(e):"default"===q?ve(e&&Boolean(t)):"value"===q&&ve(Boolean(t))},pe=function(e){he(!0,e.target.value),ae(e)},ge=function(e){he(!1,e.target.value),le(e)},be=function(e){var t=e.target.value;he(Boolean(t),t),re(e)},ye=function(){return ce(l,v,i.default.createElement("input",u({},m,{id:h,name:p,maxLength:g,placeholder:y,readOnly:w,onFocus:pe,onBlur:ge,onKeyUp:C,onKeyPress:x,ref:ee,className:E(l+"-input",s,l+"-input-"+L),style:d,value:ne,type:v,disabled:T,pattern:N,onChange:be,onInput:oe,onKeyDown:ie,onClick:ue})))};return i.default.createElement(ke,null,ye)}));function Ma(e,t,n){var r=1e17,o=e*r,i=t*r;return"-"===n?(o-i)/r:(o+i)/r}var La=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.inputStyle,u=e.inputClass,c=void 0===u?"":u,s=e.value,d=e.defaultValue,f=void 0===d?1:d,v=e.allowEmpty,m=void 0!==v&&v,h=e.digits,p=void 0===h?0:h,g=e.disabled,b=void 0!==g&&g,y=e.inputReadonly,w=void 0!==y&&y,C=e.max,x=void 0===C?1/0:C,T=e.min,N=void 0===T?1:T,k=e.equalLimitDisabled,S=void 0!==k&&k,R=e.step,M=void 0===R?1:R,L=e.theme,O=void 0===L?"default":L,_=e.formatter,I=e.addButton,B=e.minusButton,D=e.renderContent,A=e.onBlur,P=e.onChange,H=e.onFocus,V=e.onAddButtonClick,F=e.onMinusButtonClick,z=e.onClick,j=e.onInput,q=function(e){var n=e.defaultValue,r=e.formatter,o=e.max,i=e.min,a=e.value,l=e.digits,u=t.useState(n),c=u[0],s=u[1],d=void 0!==a?a:c;return{updateValue:function(e){var t="function"==typeof e?e(c):e;r?new Promise((function(e){e(r(Number(t)))})).then((function(e){var t=Math.max(i,Math.min(o,e));s(t)})):s(t)},actualInputValue:d,showValue:d===Number.MIN_VALUE?"":l>0?parseFloat(String(d)).toFixed(l):d}}({defaultValue:f,formatter:_,min:N,max:x,value:s,digits:p}),W=q.updateValue,X=q.actualInputValue,Y=q.showValue,G=function(e){var n=e.actualInputValue,r=e.min,o=e.max,i=e.step,a=e.disabled,l=e.equalLimitDisabled,u=e.updateValue,c=e.onAddButtonClick,s=e.onMinusButtonClick,d=t.useState((function(){return n===r||a})),f=d[0],v=d[1],m=t.useState((function(){return n===o||a})),h=m[0],p=m[1];return t.useEffect((function(){v(n<=r),p(n>=o)}),[n]),{minusButtonDisable:f,addButtonDisable:h,handleMinusButtonClick:function(e){f||(u((function(e){var t=Ma(e,i,"-");return t<r?l?e:r:t})),s&&s(e))},handleAddButtonClick:function(e){h||(u((function(e){var t=Ma(Number(e),i,"+");return t>o?l?e:o:t})),c&&c(e))}}}({actualInputValue:X,min:N,max:x,step:M,disabled:b,digits:p,equalLimitDisabled:S,updateValue:W,onAddButtonClick:V,onMinusButtonClick:F}),U=G.minusButtonDisable,K=G.addButtonDisable,Z=G.handleAddButtonClick,$=G.handleMinusButtonClick,J=function(e){var t=e.defaultValue,n=e.min,r=e.max,o=e.digits,i=e.actualInputValue,a=e.allowEmpty,l=e.updateValue,u=e.onBlur,c=e.onChange,s=e.onInput;return Oe((function(){c&&c(i)}),[i]),{handleInput:function(e){var t=e.target.value,n=Number(t),r=t.indexOf(".");if(o>0&&-1!==r){var u=t.slice(r+1).length;l(u>o?i:n)}else l(a&&""===t?Number.MIN_VALUE:n);s&&s(e)},handleBlur:function(e){var o=e.target.value,i=Number(o);l(a&&""===o?Number.MIN_VALUE:a||""!==o?Math.max(n,Math.min(r,i)):t),u&&u(e)}}}({defaultValue:f,min:N,max:x,digits:p,actualInputValue:X,allowEmpty:m,updateValue:W,onBlur:A,onChange:P,onInput:j}),Q=J.handleInput,ee=J.handleBlur,te=t.useRef(null),ne=t.useRef(null);return t.useImperativeHandle(n,(function(){return{dom:te.current,input:ne.current,changeValue:function(e){var t=null!=e?e:f;t=Math.min(x,Math.max(t,N)),W(t)}}})),i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("div",{className:E(t+"-stepper",t+"-"+O,o),style:a,ref:te,onClick:z},i.default.createElement("div",{"aria-label":"decrease",onClick:$},B||i.default.createElement("div",{className:E(t+"-stepper-minus-button")},i.default.createElement($o,{className:E(t+"-stepper-minus-button-icon",{disabled:U})}))),D?D(X):i.default.createElement("input",{style:l,className:E(t+"-stepper-input",c),onFocus:H,onInput:Q,onBlur:ee,disabled:b,value:Y,readOnly:w,ref:ne,type:"number",role:"spinbutton","aria-valuenow":Number(Y),"aria-valuemax":x,"aria-valuemin":N}),i.default.createElement("div",{"aria-label":"increase",onClick:Z},I||i.default.createElement("div",{className:E(t+"-stepper-add-button")},i.default.createElement(ei,{className:E(t+"-stepper-add-button-icon",{disabled:K})}))))}))})),Oa=G(La,"Stepper"),_a=t.forwardRef((function(e,n){var r=e.title,o=e.description,a=e.icon,l=t.useContext(Ia),u=l.iconType,c=l.current,s=l.direction,d=l.index,f=void 0===d?0:d,v=l.status,m=l.align,h=l.changeIndex,p=e.status||v,g=e.align||m,b=t.useRef(null);t.useImperativeHandle(n,(function(){return{dom:b.current}}));var y=t.useMemo((function(){return p||(c<f?"wait":c===f?"process":"finish")}),[p,f,c]);return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("div",{ref:b,className:E(t+"-steps-item",t+"-steps-item-align-"+g,y,s,u),onClick:function(){return h(f)}},i.default.createElement("div",{className:E(t+"-steps-item-tail",t+"-steps-item-tail-status-"+y,t+"-steps-item-tail-align-"+g,y+"-tail-color-with-config")}),a?i.default.createElement("div",{className:E(t+"-steps-item-custom-icon",y+"-custom-icon-bg-color-with-config")},a):i.default.createElement("div",{className:E(t+"-steps-item-icon",y+"-bg-color-with-config")},"number"===u?function(e){var t;return"finish"===y?t=i.default.createElement(oi,null):"error"===y&&(t=i.default.createElement(ii,null)),t||i.default.createElement("span",{className:E(e+"-steps-item-icon-num")},f+1)}(t):i.default.createElement("span",{className:E(t+"-steps-item-icon-dot")})),r||o?i.default.createElement("div",{className:E(t+"-steps-item-content",t+"-steps-item-content-align-"+g)},r?i.default.createElement("div",{className:E(t+"-steps-item-title",y+"-title-color-with-config")},r):null,o?i.default.createElement("div",{className:E(t+"-steps-item-description")},o):null):null)}))})),Ia=t.createContext({changeIndex:function(){}}),Ba=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.children,c=e.direction,s=void 0===c?"horizontal":c,d=e.align,f=e.iconType,v=void 0===f?"number":f,m=e.current,h=e.defaultIndex,p=void 0===h?0:h,g=e.status,b=void 0===g?"process":g,y=e.items,E=e.onClick,w=e.onChange,C=void 0!==d?d:"vertical"===s?"start":"center",x=t.useState(Number(p)),T=x[0],N=x[1],k=Le(void 0===m?T:m),S=k[0],R=k[1],M=k[2],L=t.useRef(null),O=Ie();function _(e){null==E||E(e),N(e),e!==R.current&&(null==w||w(e))}t.useImperativeHandle(n,(function(){return{dom:L.current}})),t.useEffect((function(){M(void 0===m?T:m)}),[m,T]);var I=t.useCallback((function(e,t){return i.default.createElement(Ia.Provider,{value:{iconType:v,current:S,direction:s,index:t,status:S===t?b:void 0,align:C,changeIndex:_},key:t},e)}),[v,S,s,C]);return i.default.createElement(ke,null,(function(e){var n=e.prefixCls;return i.default.createElement("div",{className:n+"-steps all-border-box "+o+" "+s+" "+O,style:a,ref:L},y?y.map((function(e,t){return I(i.default.createElement(_a,u({},e,{key:t})),t)})):t.Children.toArray(l).map((function(e,t){return I(e,t)})))}))})),Da=G(Ba,{Step:_a});function Aa(e){var t=e.action,n=e.prefixCls,r=e.index,o=e.type,a=e.close,l=t.text,c=t.style,s=t.className,d=t.onClick,f=t.icon,v=t.children;return i.default.createElement("div",{className:E(n+"-"+o+" "+n+"-info-container",s),style:u({zIndex:r},c),onClick:function(){var e=(null==d?void 0:d())||null;e&&"boolean"!=typeof e?e&&e.then&&e.then((function(e){return!e&&a()})):!e&&a()}},v||i.default.createElement("div",{className:n+"-info"},f?i.default.createElement("div",{className:n+"-info-icon"},f):null,l?i.default.createElement("div",{className:n+"-info-text"},l):null))}var Pa=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.children,c=e.leftActions,s=e.rightActions,d=e.disabled,f=void 0!==d&&d,v=e.threshold,m=void 0===v?.15:v,h=e.closeOnTouchOutside,p=e.transitionDuration,g=void 0===p?300:p,b=e.dampRate,y=void 0===b?15:b,w=e.openStyleType,C=void 0===w?"layer":w,x=e.onClose,T=e.onOpen,N=t.useRef(null),k=t.useRef(null),S=t.useRef(null),R=t.useRef(!1),M=t.useRef(0),L=t.useState([]),O=L[0],_=L[1],I=t.useRef(0),B=t.useState([]),D=B[0],A=B[1],P=_e(y),H=t.useRef(!1),V=t.useRef(null),F=Le(!1),z=F[0],j=F[1],q=F[2],W=Le(0),X=W[0],Y=W[1],G=W[2],U=t.useContext(Te).prefixCls,K=t.useRef(0),Z=t.useRef(0),$=t.useRef(0),J=t.useRef(0),Q="layer"===C,ee=t.useMemo((function(){return Je({transitionDuration:z?"0ms":g+"ms"})}),[z,g]);function te(e){K.current=Y.current,Z.current=0,$.current=0,J.current=0,V.current=null,Z.current=e.touches[0].pageX,$.current=e.touches[0].pageY}function ne(e){var t,n,r,o,i=e.changedTouches[0].pageX-Z.current,a=e.changedTouches[0].pageY-$.current;if(null===V.current&&(V.current=Math.abs(i)<Math.abs(a)),V.current)return q(!1),void G(0);e.cancelable&&e.preventDefault(),J.current=i,H.current=!0,q(!0),G((t=J.current+K.current,n=-I.current,r=M.current,o=Math.abs(t)/P.current,Math.min(Math.max(t,n-o),r+o)))}function re(){if(j.current&&!V.current){var e=Y.current>0?"left":"right";t=e,n=R.current?1-m:m,(r="left"===t?M.current:I.current)&&Math.abs(Y.current)>r*n?ae(t):ie(t),q(!1),we((function(){H.current=!1}))}var t,n,r}function oe(e){if(!e.current)return{totalWidth:0,widthArr:[]};var t=0,n=[],r=e.current.getElementsByClassName(U+"-swipe-action-menu-action-info-container");return Array.prototype.forEach.call(r,(function(e){var r,o=null!==(r=e.getBoundingClientRect().width)&&void 0!==r?r:0;t+=o,n.push(o)})),{totalWidth:t,widthArr:n}}function ie(e){if(G(0),R.current){if(R.current=!1,!e&&0!==Y.current)return void le(Y.current>0?"left":"right");le(e)}}function ae(e){void 0===e&&(e="right"),R.current||(R.current=!0,function(e){setTimeout((function(){null==T||T(e)}),g)}(e)),G("left"===e?M.current:-I.current)}function le(e){setTimeout((function(){null==x||x(e)}),g)}function ue(e){return 100*(O.slice(e+1).reduce((function(e,t){return e+t}),0)/M.current||0)+"%"}function ce(e){return 100*(D.slice(0,e).reduce((function(e,t){return e+t}),0)/I.current||0)+"%"}return t.useEffect((function(){var e=N.current;return!f&&e&&(e.addEventListener("touchstart",te),e.addEventListener("touchmove",ne),e.addEventListener("touchend",re)),function(){!f&&e&&(e.removeEventListener("touchstart",te),e.removeEventListener("touchmove",ne),e.removeEventListener("touchend",re))}}),[f]),t.useEffect((function(){var e=oe(k),t=e.totalWidth,n=e.widthArr;M.current=t,_(n);var r=oe(S),o=r.totalWidth,i=r.widthArr;I.current=o,A(i)}),[c,s]),t.useEffect((function(){var e=function(e){var t;!(null===(t=N.current)||void 0===t?void 0:t.contains(e.target))&&R.current&&ie()};return h&&document.addEventListener("touchstart",e),function(){h&&document.removeEventListener("touchstart",e)}}),[h]),t.useImperativeHandle(n,(function(){return{dom:N.current,close:ie,open:ae}})),i.default.createElement("div",{className:E(U+"-swipe-action",o,0===X?"action-close":"action-open"),style:Je(u(u(u({},a||{}),ee),{transform:"translateX("+X+"px)"})),ref:N,onClick:function(e){var t,n;!R.current||H.current||(null===(t=k.current)||void 0===t?void 0:t.contains(e.target))||(null===(n=S.current)||void 0===n?void 0:n.contains(e.target))||ie()}},i.default.createElement("div",{className:E(U+"-swipe-action-menu-left",U+"-swipe-action-menu",X>0?"action-open":"action-close"),ref:k,style:Q&&X>=0?u({width:X},ee):{}},null==c?void 0:c.map((function(e,t){return i.default.createElement(Aa,{action:u(u({},e||{}),{style:u(u({},Q?{right:ue(t)}:{}),e.style||{}),className:E(e.className,"open-style-"+C)}),prefixCls:U+"-swipe-action-menu-action",index:c.length-t,type:"left",close:ie,key:t})}))),i.default.createElement("div",{className:U+"-swipe-action-content"},l),i.default.createElement("div",{className:E(U+"-swipe-action-menu-right",U+"-swipe-action-menu",X<0?"action-open":"action-close"),ref:S,style:Q&&X<=0?u({width:-1*X},ee):{}},null==s?void 0:s.map((function(e,t){return i.default.createElement(Aa,{action:u(u({},e||{}),{style:u(u({},Q?{left:ce(t)}:{}),e.style||{}),className:E(e.className,"open-style-"+C)}),prefixCls:U+"-swipe-action-menu-action",index:t+1,type:"right",close:ie,key:t})}))))})),Ha=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.maxElementOffset,l=void 0===a?56:a,u=e.maxLabelOffset,c=void 0===u?40:u,s=e.onConfirm,d=e.disabled,f=void 0!==d&&d,v=e.circleSize,m=void 0===v?80:v,h=e.minConfirmOffset,p=void 0===h?30:h,g=e.labelAnimationFunction,b=void 0===g?"cubic-bezier(0.14, 1, 0.34, 1)":g,y=e.labelAnimationDuration,w=void 0===y?250:y,C=e.children,x=e.normalText,T=void 0===x?"":x,N=e.activeText,k=void 0===N?"":N,S=e.initPos,R=void 0===S?0:S,M=e.bounceWhenBumpBoundary,L=void 0!==M&&M,O=e.bounceDampRate,_=void 0===O?3:O,I=e.bounceAnimateDuration,B=void 0===I?300:I,D=e.damping,A=e.bounceDistanceProcessor,P=e.getScrollContainer,H=e.getBounceContainer,V=e.onTouchStart,F=e.onTouchEnd,z=e.onTouchCancel,j=e.onTouchMove,q=e.renderLabel,W=t.useContext(Te).locale,X=void 0===W?J:W,Y=t.useState(f),G=Y[0],U=Y[1],K=t.useState(0),Z=K[0],$=K[1],Q=t.useRef(null),ee=t.useRef(null),te=t.useRef(null),ne=t.useRef(!1),re=t.useRef(!1),oe=t.useRef(!1),ie=t.useRef(0),ae=t.useRef(null),le=ae.current;return Pe(le,"touchstart",V),Pe(le,"touchend",F),Pe(le,"touchcancel",z),Pe(le,"touchmove",j),t.useEffect((function(){var e,t;if(!f&&Q.current&&!G&&(0===Q.current.childNodes.length?U(!0):1===Q.current.childNodes.length?t=null!==(e=null==P?void 0:P())&&void 0!==e?e:Q.current.firstChild:((t=Q.current).style.width="100%",t.style.overflowX="scroll",t.style.display="inline-flex",t.style.webkitOverflowScrolling="touch"),t)){var n=ee.current,r=te.current;if(n){var o=(null==H?void 0:H())||t;n.style.display="none";var i=0,a=0,u=0,d=function(e){var t=e.touches[0];i=t.clientX||0},v=function(e){t.scrollLeft||(t.scrollLeft=1);var s=(a=e.touches[0].clientX||0)-i;ie.current=s;var d=Ce(Math.abs(s),D);s>0&&t.scrollLeft<=1&&L&&(e.stopPropagation(),e.cancelBubble&&e.preventDefault(),oe.current=!0,u=(A||function(e){return Math.min(e,o.offsetWidth)/_})(s),Qe(o,{transition:"none",transform:"translateX("+u+"px) translateZ(0)"}));if(s<0&&(t.scrollLeft+t.clientWidth>=t.scrollWidth-1||!t.scrollLeft)&&!re.current&&(ne.current=!0,n.style.display="flex"),ne.current&&s<0){e.stopPropagation(),e.cancelable&&e.preventDefault();var f=d>l?l:d,v=d>c?c:d;$(v),r&&(r.innerHTML=d>=p?k||X.SwipeLoad.activeText:T||X.SwipeLoad.normalText),Qe(n,{transition:"none",transform:"translateX(-"+v+"px) translateZ(0)"}),Qe(t,{transition:"none",transform:"translateX(-"+f+"px) translateZ(0)"})}s>0&&t.scrollLeft+t.clientWidth<=t.scrollWidth-1&&(ne.current=!1,n.style.display="none"),s<0&&t.scrollLeft+t.clientWidth<=t.scrollWidth-1?re.current=!1:re.current=!0},m=function(){var e=a-i;ie.current=e;var r=Ce(Math.abs(e)),l=function(){if(ne.current){ne.current=!1;var e="all "+w+"ms "+b,r="translateX(0px) translateZ(0)";Qe(t,{transition:e,transform:r}),Qe(n,{transition:e,transform:r})}oe.current&&(oe.current=!1,Qe(o,{transition:"all "+B+"ms",transform:"translateX(0px) translateZ(0)"})),re.current=!1,setTimeout((function(){n.style.display="none"}),w)};if(r>=p&&(t.scrollLeft+t.clientWidth>=t.scrollWidth-1||!t.scrollLeft)&&ne.current)return s(),void setTimeout((function(){l()}),250);l()};return t.addEventListener("touchstart",d),t.addEventListener("touchmove",v),t.addEventListener("touchend",m),function(){t.removeEventListener("touchstart",d),t.removeEventListener("touchmove",v),t.removeEventListener("touchend",m)}}}}),[f,P,H,L,_,B]),t.useImperativeHandle(n,(function(){return{dom:ae.current}})),i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("div",{className:t+"-swipe-load "+o,ref:ae},i.default.createElement("div",{className:E(t+"-list-area"),ref:Q},C),q?i.default.createElement("div",{className:E(t+"-custom-loading-area"),ref:ee,style:{position:"absolute",right:R+"px"}},q.length?q(Z):q()):i.default.createElement("div",{className:E(t+"-loading-area"),ref:ee,style:{width:m+"px",height:m+"px",position:"absolute",right:"-"+m+"px"}},i.default.createElement("div",{className:E(t+"-loading-label"),ref:te})))}))})),Va=t.forwardRef((function(e,n){var r=Ie(),o=e.className,a=e.style,l=e.platform,u=void 0===l?r:l,c=e.checked,s=e.disabled,d=void 0!==s&&s,f=e.defaultChecked,v=void 0!==f&&f,m=e.text,h=e.shape,p=void 0===h?"fully":h,g=e.innerArea,b=e.onChange,y=e.onTouchStart,w=e.onTouchEnd,C=e.onClick,x=t.useState(0),T=x[0],N=x[1],k=!1;k="checked"in e?Boolean(c):v;var S=t.useState(k),R=S[0],M=S[1],L=t.useRef(null);function O(e){if(y&&y(e),!d){var t=e.touches&&e.touches[0]?e.touches[0].clientX:0;N(t)}}function _(t){if(w&&w(t),!d){var n=(t.changedTouches&&t.changedTouches[0]?t.changedTouches[0].clientX:0)-T,r=!1;r=n>0||!(n<0)&&!R,"checked"in e||M(r),b&&b(r)}}return t.useImperativeHandle(n,(function(){return{dom:L.current}})),t.useEffect((function(){"checked"in e&&M(Boolean(c))}),[c]),i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("div",{role:"switch","aria-checked":R,"aria-disabled":d,tabIndex:0,ref:L,className:E(t+"-switch all-border-box",o,"type-"+u,"system-"+r,p,{checked:R,disabled:d}),style:a,onTouchStart:O,onTouchEnd:_,onClick:C},m?i.default.createElement("span",{className:t+"-switch-text"},R?m.off||"":m.on||""):null,i.default.createElement("div",{className:t+"-switch-inner"},g||null))}))})),Fa=G(Va,"Switch"),za=t.createContext({changeIndex:function(){},active:!1,index:0,activeCustomStyle:{}});var ja=t.forwardRef((function(e,n){var r=t.useContext(za),o=r.active,a=r.changeIndex,l=r.index,c=r.activeCustomStyle,s=e.onClick,d=e.className,f=e.style,v=t.useRef(null);t.useImperativeHandle(n,(function(){return{dom:v.current}}));var m=function(e){null==s||s(e),a(l)};return i.default.createElement(ke,null,(function(t){var n,r=t.prefixCls;return i.default.createElement("div",{className:E(r+"-tab-bar-item",(n={},n[r+"-tab-bar-item-active"]=o,n),d),style:u(u({},f),o?c:{}),ref:v,onClick:function(e){return m(e)}},function(t){var n,r=e.icon?i.default.createElement("div",{className:E(t+"-tab-bar-item-icon")},"function"==typeof e.icon?e.icon(o):e.icon):null,a=e.title?i.default.createElement("div",{className:E(t+"-tab-bar-item-title",(n={},n[t+"-tab-bar-item-only-title"]=!r,n))},"function"==typeof e.title?e.title(o):e.title):null,l=e.extra&&"function"==typeof e.extra?e.extra(o):e.extra,u=e.child&&i.default.createElement("div",{className:E(t+"-tab-bar-item-children")},"function"==typeof e.child?e.child(o):e.child),c=r||l?i.default.createElement("div",{className:E(t+"-extra-wrap")},r,l):null;return u||i.default.createElement(i.default.Fragment,null,c,a)}(r))}))})),qa=function(e){return t.forwardRef((function(n,r){var o=n.defaultActiveIndex,a=void 0===o?0:o,l=n.activeIndex,c=n.className,s=n.fixed,d=void 0===s||s,f=n.style,v=n.dataSource,m=n.children,h=n.onChange,p=n.activeCustomStyle,g=t.useState(a),b=g[0],y=g[1],w=Le(void 0===l?b:l),C=w[0],x=w[1],T=w[2];t.useEffect((function(){T(void 0===l?b:l)}),[l,b]);var N=t.useRef(null);t.useImperativeHandle(r,(function(){return{dom:N.current,changeIndex:S}}));var k=t.useCallback((function(e,t){return i.default.createElement(za.Provider,{value:{active:t===C,changeIndex:S,index:t,activeCustomStyle:p},key:t},e)}),[C]);function S(e){y(e),e!==x.current&&(null==h||h(e))}return i.default.createElement(ke,null,(function(n){var r,o=n.prefixCls;return i.default.createElement("div",{className:E(o+"-tab-bar",c,(r={},r[o+"-tab-bar-fixed"]=d,r)),style:f,ref:N},v?v.map((function(t,n){return k(i.default.createElement(e,u({key:n},t)),n)})):t.Children.toArray(m).map((function(e,t){return k(e,t)})))}))}))}(ja),Wa=G(qa,{Item:ja}),Xa=t.forwardRef((function(e,n){var r=e.prefix,o=e.useCaterpillar,a=e.distance,l=e.tabDirection,c=e.underlineInnerStyle,s=e.duration,d=e.cellTrans,f=e.showLine,v=e.activeIndex,m=e.wrapWidth,h=e.wrapHeight,p=e.jumpingDis,g=e.translateZ,b=e.caterpillarMaxScale,y=e.caterpillarProperty,w=e.underlineSize,C=e.underlineThick,x=e.underlineAdaptive,T=e.renderUnderline,N=e.getTabRect,k=e.getTabCenterLeft,S=t.useState({}),R=S[0],M=S[1],L=Le(!1),O=L[0],_=L[1],I=L[2],B=t.useState(0),D=B[0],A=B[1],P=t.useRef(null),H=t.useRef(0),V=Ie(),F="vertical"===l,z=b||2,j=g?" translateZ(0)":"";t.useImperativeHandle(n,(function(){return{setCaterpillarAnimate:$,resetUnderlineStyle:Z}}),[$,Z]);var q=t.useMemo((function(){return o?"size"===y?"tabsCaterpillar"+(F?"W":"H")+z:b?"tabsCaterpillar"+(F?"X":"Y")+b:"":""}),[o,F,b,y]);function X(e){var t,n;return x?N(e).width:(F?null===(t=P.current)||void 0===t?void 0:t.offsetWidth:null===(n=P.current)||void 0===n?void 0:n.offsetHeight)||0}function G(e){if(x)return N(e).left;var t=X(e);return k(e)-t/2}function U(e){var t=Math.abs(e);return t>.5?2*(1-t)*(z-1)+1:2*t*(z-1)+1}function K(){var e,t;if(!P.current)return{};var n=G(v),r=a>0?v-1:a<0?v+1:v,i=G(r),l=m?a/m:0,c=l*(n-i),s=F?"X":"Y",d=!o||p||x?{}:"size"===y?((e={})[F?"width":"height"]=100*U(l)+"%",e.willChange="width",e):{transform:"scale"+s+"("+U(l)+")"},f={},h={};if(x){var g=X(v),b=l*(g-X(r));(t={})[F?"width":"height"]=a>0?g-b:g+b,t.willChange="width",f=t,h=F?{width:"auto"}:{height:"auto"}}return{outer:u(u({transform:"translate"+s+"("+(a>0?n-c:n+c)+"px)"+j},F?{width:w,height:C}:{height:w,width:C}),h),inner:u(u({},d),f)}}function Z(){M(function(){var e={};x||(o&&(e.animationDuration=s+"ms"),_.current&&q&&(e.animationName=q),D&&(e.animationDelay="-"+D+"ms"));var t=K();return{outer:Je(u({transitionDuration:d?s+"ms":"0ms"},t.outer||{})),inner:Je(u(u({},e),t.inner||{}))}}())}function $(e){if(void 0===e&&(e=0),s){var t=(s||0)*Math.abs(e);A(t),we((function(){I(!0)})),H.current&&clearTimeout(H.current),H.current=window.setTimeout((function(){I(!1),A(0)}),(s||0)-t+20)}}return t.useEffect((function(){if(q){var e=F?"X":"Y";if("size"!==y)return Y(q,"{\n 0% {\n transform: scale"+e+"(1)"+j+";\n -webkit-transform: scale"+e+"(1)"+j+";\n }\n 50% {\n transform: scale"+e+"("+b+")"+j+";\n -webkit-transform: scale"+e+"("+b+")"+j+";\n }\n 100% {\n transform: scale"+e+"(1)"+j+";\n -webkit-transform: scale"+e+"(1)"+j+";\n }\n }"),function(){W(q)};var t=F?"width":"height";Y(q,"{\n 0% {\n "+t+": 100%;\n }\n 50% {\n "+t+": "+100*z+"%;\n }\n 100% {\n "+t+": 100%;\n }\n }")}}),[q]),t.useEffect((function(){p&&o&&"ios"!==V&&$(m?p/m:0)}),[p]),t.useEffect((function(){Z()}),[o,O,d,s,l,m,h,a,q,D,w,C,x]),T?i.default.createElement(i.default.Fragment,null,T(R,f,P)):i.default.createElement("div",{className:E(r+"-underline",{show:f}),ref:P,style:R.outer},i.default.createElement("div",{className:E(r+"-underline-inner",{caterpillar:O,"custom-animate":q,"caterpillar-moving":O||o&&a},l),style:u(u({},R.inner||{}),c||{})}))})),Ya=t.forwardRef((function(e,n){var r=e.tabs,o=e.prefixCls,a=e.activeIndex,l=e.activeIndexRef,c=e.tabDirection,s=e.type,d=e.onTabClick,f=e.changeIndex,v=e.tabBarPosition,m=e.tabBarArrange,h=e.tabBarScroll,p=e.tabBarFixed,g=e.renderUnderline,b=e.duration,y=e.transitionDuration,w=e.useCaterpillar,C=e.wrapWidth,x=e.wrapHeight,T=e.cellTrans,N=e.distance,k=e.jumpingDis,S=e.tabBarExtra,R=e.onTabBarOverflowChange,M=e.tabBarGutter,L=e.tabBarPadding,O=e.underlineSize,_=e.underlineThick,B=e.underlineInnerStyle,D=e.caterpillarMaxScale,A=e.caterpillarProperty,P=e.onTabBarScroll,H=e.hideTabBarBeforeMounted,V=e.overflowThreshold,F=void 0===V?5:V,z=e.tabBarScrollBezier,j=e.tabBarScrollDuration,q=e.tabBarScrollChance,W=e.tabBarHasDivider,X=e.showUnderline,Y=e.underlineAdaptive,G=e.disabled,U=e.renderTabBarItem,K=e.renderTabBarInner,Z=e.tabBarStyle,$=e.tabBarClass,J=e.translateZ,Q=e.tabBarStopPropagation,ee=o+"-tab-cell",te=t.useRef(null),ne=t.useRef(null),re=t.useRef([]),oe=t.useState(!1),ie=oe[0],ae=oe[1],le=t.useState(!1),ue=le[0],ce=le[1],se=t.useState((function(){return r.length<F?m:"start"})),de=se[0],fe=se[1],ve=t.useState((function(){return void 0===H?r.length<F||0===a:!H})),me=ve[0],he=ve[1],pe="vertical"===c,ge=-1!==(s||"").indexOf("line"),be="card"===s,ye=be?void 0:L,Ee=be?void 0:M,Ce=void 0===W?ge:W,xe=pe?C:x,Te=Ie();function Ne(e){xe&&ue&&ke(Re(l.current)-xe/2,e)}function ke(e,t){if(te.current){var n=!1;if("android"===Te&&void 0===z&&void 0===j)try{var r=pe?{left:e}:{top:e};te.current.scrollTo(u(u({},r),t?{}:{behavior:"smooth"}))}catch(e){n=!0}else n=!0;n&&I(pe?te.current.scrollLeft:te.current.scrollTop,e,(function(e){te.current&&(pe?te.current.scrollLeft=e:te.current.scrollTop=e)}),t?0:j,z)}}function Se(e){var t=re.current[e]||{};return{left:(pe?t.left:t.top)||0,width:(pe?t.width:t.height)||0}}function Re(e){var t=Se(e);return t.left+t.width/2}function Me(e){return"object"==typeof ye?ye[e]:ye}function Le(e){return pe?0===e?{marginRight:Ee,marginLeft:Me("left")}:{marginRight:e===r.length-1?void 0:Ee}:{}}t.useEffect((function(){we((function(){!function(){var e=!1;te.current&&(e=pe?te.current.scrollWidth>te.current.offsetWidth:te.current.scrollHeight>te.current.offsetHeight);e!==ue&&R&&R(e);ce(e)}(),fe(void 0),he(!0),ae(!0)}))}),[te.current,xe,r]),t.useEffect((function(){we((function(){var e;null===(e=ne.current)||void 0===e||e.resetUnderlineStyle()}))}),[a,r,Me("left"),Me("right"),M,c]),t.useImperativeHandle(n,(function(){return{dom:te.current,scrollTo:ke,scrollToCenter:Ne,hasOverflow:ue,setCaterpillarAnimate:function(e){var t;return null===(t=ne.current)||void 0===t?void 0:t.setCaterpillarAnimate(e)},resetUnderlineStyle:function(){var e;return null===(e=ne.current)||void 0===e?void 0:e.resetUnderlineStyle()}}}),[Ne,ke,ue]),t.useEffect((function(){xe&&"none"!==q&&setTimeout((function(){Ne()}),"after-jump"===q?Math.max(y||0,b||0):0)}),[a,xe]),t.useEffect((function(){"none"!==q&&Ne(!0);var e=function(e){return e.stopPropagation()};return pe&&ue&&te.current&&Q&&(te.current.addEventListener("touchstart",e),te.current.addEventListener("touchmove",e)),function(){pe&&ue&&te.current&&Q&&(te.current.removeEventListener("touchstart",e),te.current.removeEventListener("touchmove",e))}}),[ue]);var Oe=i.default.createElement(i.default.Fragment,null,r.map((function(e,t){return i.default.createElement("div",{key:t,className:E(ee,c,s,Te,{active:t===a},{"no-shrink":h},{last:t===r.length-1},{custom:Boolean(U)}),style:Le(t),onClick:function(n){G||(f(t,"click"),d&&d(e,t,n))},ref:function(e){e&&!N&&(re.current[t]={top:e.offsetTop,left:e.offsetLeft,width:e.offsetWidth,height:e.offsetHeight})}},function(e,t){return U?U(e,t,{active:t===a}):"string"==typeof e?e:e.title}(e,t))})),ye&&!be&&pe?i.default.createElement("div",{className:"fake-padding",style:{width:Me("right"),height:"100%"}}):null);return i.default.createElement("div",{className:E(ee+"-container-wrap",c,"type-"+s,$,Te),style:Z},i.default.createElement("div",{className:E(ee+"-container-inner",c,"pos-"+v,"type-"+s,{fixed:p},{"has-divider":Ce})},i.default.createElement("div",{className:E(ee+"-container",c,"pos-"+v,"arrange-"+(de||m),"type-"+s,{overflow:ue},{shown:me}),ref:te,onScroll:P},K?K(Oe):Oe,function(){if(!X||!ge)return null;var e={prefix:ee,showLine:ie,useCaterpillar:w,distance:N,tabDirection:c,underlineInnerStyle:B,cellTrans:T,duration:b,activeIndex:a,wrapWidth:C,wrapHeight:x,jumpingDis:k,caterpillarMaxScale:D,caterpillarProperty:A,translateZ:J,underlineSize:O,underlineThick:_,underlineAdaptive:Y,renderUnderline:g};return i.default.createElement(Xa,u({ref:ne,getTabCenterLeft:Re,getTabRect:Se},e))}()),S))})),Ga=t.forwardRef((function(e,n){var r,o=e.prefixCls,a=e.panes,l=e.tabDirection,c=e.activeIndex,s=e.activeIndexRef,d=e.distance,f=e.wrapWidth,v=e.wrapHeight,m=e.handlePaneTouchEnd,h=e.transitionDuration,p=e.paneTrans,g=e.swipeable,b=e.lazyloadCount,y=e.hideContentStyle,w=e.renderHideContent,C=e.mode,x=e.tabPaneStyle,T=e.tabPaneClass,N=e.tabPaneExtra,k=e.getScrollContainer,S=e.scrollThrottle,R=e.scrollOffset,M=void 0===R?0:R,L=e.goLastWhenScrollBottom,O=e.scrollVertical,_=e.translateZ,B=e.fullScreen,D=e.autoHeight,A=e.changeIndex,P=e.onScroll,H=t.useRef(null),V=t.useRef([]),F=t.useRef(!1),z=t.useRef(0),q=t.useState([c,c]),W=q[0],X=q[1],Y=o+"-tab-pane",G=g?m:void 0,U=t.useState("auto"),K=U[0],Z=U[1];t.useImperativeHandle(n,(function(){return{dom:H.current,getTransition:Q,scrollToIndex:ee,setCurrentHeight:J}})),t.useEffect((function(){"swipe"===C&&setTimeout((function(){!function(){if("number"==typeof b)return void X([c-b,c+b]);X([0,1/0])}()}),Q())}),[b,c,C]);var $=t.useMemo((function(){if("scroll"!==C)return function(){};var e=function(){if(null==P||P(),!F.current){var e=k?k():window;if(e){for(var t=te(e),n=t.containerTop,r=t.containerBottom,o=0;o<a.length;o+=1){var i=0===o?-1/0:ne(V.current[o]),l=o===a.length-1?1/0:ne(V.current[o+1]);if(n>=i-M&&n<l-M){A(o,"scroll");break}}if(L){var u=a.length-1;r===ne(V.current[u],"bottom")&&A(u,"scroll")}}}};return S?jo(e,S):e}),[C,S,k,a.length,M,L,O,P]);function J(){if(H.current&&D&&"swipe"===C&&"vertical"===l){var e=(V.current[s.current]||{}).offsetHeight||"auto";Z(e)}}function Q(){return p&&h||0}function ee(e,t){var n=te((null==k?void 0:k())||window),r=n.isGlobal,o=n.scrollEle,i=n.containerTop,a=ne(V.current[e])-i-M,l=O?"scrollTop":"scrollLeft",u=r?Math.max(document.documentElement[l],document.body[l]):o[l],c=O?"scrollHeight":"scrollWidth",s=O?"offsetHeight":"offsetWidth",d=r?Math.max(document.documentElement[c],document.body[c])-u-(O?window.innerHeight:window.innerWidth):o[c]-u-o[s],f=Math.min(d,a);clearTimeout(z.current),F.current=!0;var v=t?0:h||0;I(u,u+f,(function(e){r?(document.documentElement[l]=e,document.body[l]=e):o[l]=e}),v);z.current=window.setTimeout((function(){F.current=!1}),v+(S||0)+100)}function te(e){var t=j(e),n=t.isGlobal,r=t.scrollEle,o=t.containerRect;return{isGlobal:n,scrollEle:r,containerTop:Math.floor(O?o.top:o.left),containerBottom:Math.floor(O?o.bottom:o.right)}}function ne(e,t){void 0===t&&(t="top");var n=(O?{top:"top",bottom:"bottom"}:{top:"left",bottom:"right"})[t],r=(null==e?void 0:e.getBoundingClientRect())||{};return r[n]?Math.floor(r[n]):0}return t.useEffect((function(){var e=(null==k?void 0:k())||window;return e&&"scroll"===C&&e.addEventListener("scroll",$),function(){e&&"scroll"===C&&e.removeEventListener("scroll",$)}}),[$]),i.default.createElement("div",{className:E(Y+"-container",l,"mode-"+C,T,{"full-screen":B},(r={},r["mode-scroll-"+(O?"vertical":"horizontal")]="scroll"===C,r)),style:function(){var e=x||{};if("scroll"===C)return e;var t=_?" translateZ(0)":"",n="vertical"===l?{width:100*a.length+"%",transform:"translateX("+(d-f*c)+"px)"+t}:{height:100*a.length+"%",transform:"translateY("+(d-v*c)+"px)"+t},r=K&&"auto"!==K?{height:K}:{};return Je(u(u(u(u({},n),{transitionDuration:Q()+"ms"}),r),e))}(),ref:H,onTouchEnd:G,onTouchCancel:G},a.map((function(e,t){return function(e,t){var n={key:t,className:E(Y,"mode-"+C,{"full-screen":B}),ref:function(e){return V.current[t]=e}};return"scroll"===C||t>=W[0]&&t<=W[1]?i.default.createElement("div",u({},n),e):w?i.default.createElement("div",u({},n,{style:y||{}}),w(t,e)):null===y?i.default.createElement("div",u({},n)):i.default.createElement("div",u({},n,{style:y}),e)}(e,t)})),N?i.default.createElement("div",{className:Y+"-extra"},N):null)})),Ua=t.forwardRef((function(e,n){var r=e.className,o=e.style,a=e.tabs,l=void 0===a?[]:a,c=e.tabBarPosition,s=void 0===c?"top":c,d=e.activeTab,f=e.defaultActiveTab,v=void 0===f?0:f,m=e.children,h=e.onChange,p=e.onAfterChange,g=e.onTabClick,b=e.onTabBarOverflowChange,y=e.onTouchStart,w=e.onTouchMove,C=e.onTouchEnd,x=e.onTabBarScroll,T=e.onDistanceChange,N=e.onScroll,k=e.type,S=void 0===k?"line":k,R=e.swipeable,M=void 0===R||R,L=e.disabled,O=e.tabBarArrange,_=void 0===O?"center":O,I=e.tabBarScroll,B=void 0===I||I,D=e.tabBarFixed,A=e.tabBarExtra,P=e.tabBarScrollBezier,H=e.tabBarScrollDuration,V=e.tabBarScrollChance,F=void 0===V?"jump":V,z=e.tabBarHasDivider,j=e.tabBarResetWhenScroll,q=void 0===j?"touchmove":j,W=e.stopPropagation,X=void 0===W||W,Y=e.getInnerScrollContainer,G=e.mode,U=void 0===G?"swipe":G,K=e.getScrollContainer,Z=e.scrollThrottle,$=void 0===Z?300:Z,J=e.scrollOffset,Q=void 0===J?0:J,ee=e.scrollWhenMounted,te=e.goLastWhenScrollBottom,ne=void 0===te||te,re=e.scrollVertical,oe=void 0===re||re,ie=e.renderUnderline,ae=e.renderTabBar,le=e.renderTabBarItem,ue=e.renderTabBarInner,ce=e.duration,se=void 0===ce?240:ce,de=e.transitionDuration,fe=void 0===de?300:de,ve=e.useCaterpillar,me=void 0!==ve&&ve,he=e.distanceToChangeTab,pe=void 0===he?10:he,ge=e.percentToChangeTab,be=void 0===ge?.3:ge,ye=e.speedToChangeTab,Ee=void 0===ye?200:ye,Ce=e.disableClickTransition,xe=void 0===Ce||Ce,Te=e.lazyloadCount,Ne=e.hideContentStyle,Se=void 0===Ne?null:Ne,Me=e.renderHideContent,_e=e.hideTabBarBeforeMounted,Be=e.overflowThreshold,De=void 0===Be?5:Be,Pe=e.tabBarGutter,He=e.tabBarPadding,Ve=e.underlineSize,Fe=e.underlineThick,ze=e.underlineInnerStyle,je=e.caterpillarMaxScale,qe=e.caterpillarProperty,We=void 0===qe?"scale":qe,Xe=e.showUnderline,Ye=void 0===Xe||Xe,Ge=e.underlineAdaptive,Ue=void 0!==Ge&&Ge,Ke=e.stopTouchThreshold,Ze=void 0===Ke?0:Ke,$e=e.touchSideDisableThreshold,Je=void 0===$e?0:$e,Qe=e.onTouchStopped,et=e.tabBarStyle,tt=e.tabPaneStyle,nt=e.tabBarClass,rt=e.tabPaneClass,ot=e.tabPaneExtra,it=e.translateZ,at=void 0===it||it,lt=e.fullScreen,ut=e.autoHeight,ct=e.tabBarStopPropagation,st=void 0===ct||ct,dt=t.useRef(null),ft=t.useRef(null),vt=t.useRef(null),mt=t.useState(v),ht=mt[0],pt=mt[1],gt=t.useState(0),bt=gt[0],yt=gt[1],Et=t.useState(0),wt=Et[0],Ct=Et[1],xt=t.useState(0),Tt=xt[0],Nt=xt[1],kt=t.useState(!1),St=kt[0],Rt=kt[1],Mt=t.useState(!1),Lt=Mt[0],Ot=Mt[1],_t=Le(void 0===d?ht:d),It=_t[0],Bt=_t[1],Dt=_t[2],At=Le(0),Pt=At[0],Ht=At[1],Vt=At[2],Ft=t.useRef(!1),zt=t.useRef(!1),jt=t.useRef(0),qt=t.useRef(0),Wt=t.useRef(0),Xt=t.useRef(null),Yt=t.useRef(!1),Gt=t.useRef(""),Ut=t.useRef(!1),Kt=Ie(),Zt=function(){var e=m?[m]:[];m&&"[object Array]"===Object.prototype.toString.call(m)&&(e=m);return e.slice(0,l.length)}(),$t=-1!==["top","bottom"].indexOf(s)?"vertical":"horizontal",Jt="swipe"===U&&!L&&M&&"vertical"===$t&&l.length>1;t.useImperativeHandle(n,(function(){return{dom:dt.current,bar:ft.current,pane:vt.current,barOverflow:!!ft.current&&ft.current.hasOverflow,updateLayout:nn,changeIndex:function(e,t){return rn(e,"manual",t)},scrollToIndex:vt.current?vt.current.scrollToIndex:function(){}}})),Re(nn),Ae(Y),t.useEffect((function(){pe>0&&pe<1&&console.warn("[Tabs Props Warning] The value of the prop `distanceToChangeTab` is too small("+pe+"). Do you meant to use the prop `percentToChangeTab`?")}),[pe]),t.useEffect((function(){var e;(nn(),"scroll"===U)&&((void 0===ee?0!==It:ee)&&(null===(e=vt.current)||void 0===e||e.scrollToIndex(It,!0)))}),[]),t.useEffect((function(){vt.current&&vt.current.setCurrentHeight()}),[m,It,ut]),t.useEffect((function(){Dt(void 0===d?ht:d)}),[d,ht]),Oe((function(){Rt(!0),Gt.current="manual"}),[d]),Oe((function(){T&&T(Pt,wt,It)}),[Pt,wt,It]),Oe((function(){var e,t;"scroll"!==Gt.current&&"scroll"===U&&(null===(e=vt.current)||void 0===e||e.scrollToIndex(It)),"click"===Gt.current&&me&&(null===(t=ft.current)||void 0===t||t.setCaterpillarAnimate());var n=Gt.current;Gt.current="",we((function(){setTimeout((function(){p&&p(l[It],It,n)}),vt.current?vt.current.getTransition():0)}))}),[It]);var Qt=t.useCallback((function(e){if(!(y&&y(e,Bt.current)||Ft.current)){zt.current=!0,Rt(!1),Ot(!1);var t=e.touches[0];jt.current=t.clientX||0,qt.current=t.clientY||0,Xt.current=null,Ft.current=!1,Wt.current=(new Date).getTime(),Yt.current=!1}}),[y]),en=t.useCallback((function(e){if(!(w&&w(e,Bt.current)||jt.current<Je))if(X&&e.stopPropagation(),zt.current&&!Ft.current){var t=e.changedTouches[0],n=t.clientX||0,r=t.clientY||0,o="ios"===Kt&&n<0?0:n-jt.current,i=r-qt.current,a=Math.abs(o),u=Math.abs(i);if(null===Xt.current&&(Xt.current=a<u),Xt.current)return"touchmove"!==q||Ut.current||(ft.current&&ft.current.scrollToCenter(),Ut.current=!0),void Vt(0);if(0===Bt.current&&o>0||Bt.current===l.length-1&&o<0)return!Yt.current&&a>Ze&&(Yt.current=!0,Qe&&Qe(o>=0?-1:1)),void Vt(0);e.cancelable&&e.preventDefault(),Vt(o)}else e.cancelable&&e.preventDefault()}),[w,Qe,Ze,l.length,Je,q,X]);function tn(e){if((!C||!C(e.nativeEvent,Bt.current))&&(X&&e.stopPropagation(),Ut.current=!1,Xt.current&&"touchend"===q&&ft.current&&ft.current.scrollToCenter(),zt.current&&!Ft.current&&!Xt.current)){zt.current=!1,Rt(!0),Ot(!0);var t=(new Date).getTime(),n=Ht.current,r=n/(t-Wt.current)*1e3,o=wt*be,i=Bt.current,a=Math.abs(n)>o&&Math.abs(n)>pe||Math.abs(r)>Ee,l=i;n>0&&a?l=i-1:n<0&&a&&(l=i+1),we((function(){!function(e){Ft.current=!0,e!==Bt.current&&yt(Ht.current);rn(e,"swipe"),Wt.current=0,setTimeout((function(){Ft.current=!1,yt(0)}),fe)}(l)}))}}function nn(){ft.current&&ft.current.resetUnderlineStyle(),Ct(dt.current?dt.current.offsetWidth:0),Nt(dt.current?dt.current.offsetHeight:0),vt.current&&vt.current.setCurrentHeight()}function rn(e,t,n){Ot(!(n||"click"===t&&xe)),Gt.current=t||"",Rt(!0),pt(e),Vt(0),e!==Bt.current&&h&&h(l[e],e,t)}return t.useEffect((function(){return vt.current&&vt.current.dom&&Jt&&(vt.current.dom.addEventListener("touchstart",Qt),vt.current.dom.addEventListener("touchmove",en)),function(){vt.current&&vt.current.dom&&Jt&&(vt.current.dom.removeEventListener("touchstart",Qt),vt.current.dom.removeEventListener("touchmove",en))}}),[Qt,en,Jt]),i.default.createElement(ke,null,(function(e){var t=e.prefixCls,n=t+"-tabs",a={prefixCls:t,activeIndex:It,activeIndexRef:Bt,tabDirection:$t,changeIndex:rn,duration:se,transitionDuration:fe,wrapWidth:wt,wrapHeight:Tt,distance:Pt,mode:U,translateZ:at,fullScreen:lt},c=u({ref:ft,tabs:l,onTabClick:g,type:S,tabBarPosition:s,tabBarArrange:_,tabBarScroll:B,renderUnderline:ie,useCaterpillar:me,cellTrans:St,jumpingDis:bt,tabBarExtra:A,onTabBarOverflowChange:b,tabBarGutter:Pe,tabBarPadding:He,tabBarFixed:D,tabBarScrollBezier:P,tabBarScrollDuration:H,tabBarScrollChance:F,tabBarHasDivider:z,underlineSize:Ve,underlineThick:Fe,underlineInnerStyle:ze,caterpillarMaxScale:je,caterpillarProperty:We,onTabBarScroll:x,hideTabBarBeforeMounted:_e,overflowThreshold:De,showUnderline:Ye,underlineAdaptive:Ue,disabled:L,renderTabBarItem:le,renderTabBarInner:ue,tabBarStyle:et,tabBarClass:nt,tabBarStopPropagation:st},a),d=i.default.createElement(Ya,u({},c));return i.default.createElement("div",{className:E(n+" "+n+"-"+s+" "+n+"-"+$t+" all-border-box",{"full-screen":lt},r||""),style:o,ref:dt},ae?ae(d,c):d,i.default.createElement(Ga,u({ref:vt,panes:Zt,handlePaneTouchEnd:tn,paneTrans:Lt,swipeable:Jt,lazyloadCount:Te,hideContentStyle:Se,renderHideContent:Me,tabPaneStyle:tt,getScrollContainer:K,scrollThrottle:$,scrollOffset:Q,goLastWhenScrollBottom:ne,scrollVertical:oe,tabPaneClass:rt,tabPaneExtra:ot,autoHeight:ut,onScroll:N},a)))}))})),Ka=t.forwardRef((function(e,n){var r=e.className,o=e.style,a=e.type,l=void 0===a?"primary":a,c=e.icon,s=e.children,d=e.size,f=void 0===d?"medium":d,v=e.color,m=e.bgColor,h=e.borderColor,p=e.borderStyle,g=void 0===p?"solid":p,b=e.halfBorder,y=void 0===b||b,w=e.closeable,C=e.closeIcon,x=e.closeColor,T=e.filleted,N=e.onClose,k=e.onClick,S=t.useRef(null),R=Ie();return t.useImperativeHandle(n,(function(){return{dom:S.current}})),i.default.createElement(ke,null,(function(e){var t=e.prefixCls+"-tag";return i.default.createElement("div",{className:E(t,"all-border-box",r,t+"-"+l,{"half-border":y},R,"size-"+f,{filleted:T}),style:u({color:v,background:m,borderColor:h,borderStyle:g},o||{}),ref:S,onClick:k},c,i.default.createElement("span",{className:"tag-text"},s),w?i.default.createElement("div",{onClick:function(e){e.stopPropagation(),N&&N(e)},className:"tag-close-wrap"},C||i.default.createElement(Qo,{className:"tag-close-icon",color:x})):null)}))}));var Za=function(e){return t.forwardRef((function(n,r){var o=n.className,a=n.style,l=n.list,c=n.type,s=n.showAddButton,d=void 0===s||s,f=n.addArea,v=n.horizontalPadding,m=n.verticalPadding,h=n.onAdd,p=n.onClose,g=t.useRef(null);function b(e,t){var n=e.style||{},r=t!==l.length-1||d?{marginRight:v}:{};return u(u(u({},n),r),{marginBottom:m})}return t.useImperativeHandle(r,(function(){return{dom:g.current}})),i.default.createElement(ke,null,(function(t){var n,r=t.prefixCls,s=t.locale,v=r+"-tag-list";return i.default.createElement("div",{className:E(v,o),style:(n={},m&&"string"==typeof m?n={marginBottom:"-"+m}:m&&"number"==typeof m&&(n={marginBottom:-1*m}),u(u({},a||{}),n)),ref:g},l.map((function(t,n){return i.default.createElement(e,u({key:n},t,{style:b(t,n),type:c,onClose:function(e){t.onClose&&t.onClose(e),p&&p(n,e)}}))})),d?i.default.createElement("div",{className:"tag-list-add-wrap",onClick:h},void 0!==f?f:i.default.createElement(Ka,{type:c,className:"tag-list-add",borderStyle:"dashed",icon:i.default.createElement(ei,null),style:{marginBottom:m}},null==s?void 0:s.Tag.addTag)):null)}))}))}(Ka),$a=G(Ka,{List:Za});function Ja(e,t){return function(n,r){var o="string"==typeof n?{content:n,type:"info"}:n;void 0!==t&&(o.type=t,o.loading="loading"===t);var i=document.createElement("div");document.body.appendChild(i);var a=new Nt(e,i,r),l=a.render,c=a.unmount;var s=u(u({},o),{close:f,getContainer:function(){return i},onClose:function(){var e=o.onClose;e&&e(),c(),i.parentNode&&i.parentNode.removeChild(i)},visible:!1}),d=!1;function f(){d=!0,s.visible=!1,l(s)}return l(s),we((function(){d||(s.visible=!0,l(s))})),{update:function(e){s=u(u({},s),e),l(s)},close:f,hide:f}}}var Qa=t.forwardRef((function(e,n){var r=e.className,o=e.getContainer,a=e.visible,l=void 0!==a&&a,u=e.onClose,c=e.close,s=e.type,d=void 0===s?"info":s,f=e.icon,v=e.layout,m=void 0===v?"vertical":v,h=e.duration,p=void 0===h?3e3:h,g=e.transitionDuration,b=void 0===g?300:g,y=e.content,w=e.loading,C=void 0!==w&&w,x=e.loadingIcon,T=e.disableBodyTouch,N=void 0!==T&&T,k=e.loadingInner,S=e.direction,R=void 0===S?"center":S,M=e.typeIconMap,L=e.initialBodyOverflow,O=t.useRef(),_=t.useRef(null),I=t.useRef(!1),B=d&&"info"!==d;function D(){p&&(clearTimeout(O.current),O.current=window.setTimeout((function(){c&&c()}),p))}function A(e){N&&e.preventDefault()}function P(e){var t,n,r;return i.default.createElement("div",{className:E(e+"-wrapper","from-"+R,{"no-event":!N}),onClick:A},i.default.createElement("div",{className:E(e+"-inner",m,(t={},t[e+"-inner-mixin"]=(C||B||f)&&"vertical"===m,t))},C&&i.default.createElement("div",{className:e+"-loading-wrapper"},void 0!==x?x:i.default.createElement(tt,{className:"loading-icon",type:"arc",stroke:2,radius:k?19:11}),k?i.default.createElement("span",{className:e+"-loading-inner"},k):null),!C&&B?(n=M||{},r={success:i.default.createElement(ti,null),error:i.default.createElement(ri,null),warn:i.default.createElement(ni,null)},n[d]||r[d]||null):null,C||B||!f?null:f,y?i.default.createElement("div",{className:e+"-content"},y):null))}return t.useImperativeHandle(n,(function(){return{dom:_.current}})),Fe(l,N,L),t.useEffect((function(){var e=I.current;l?D():(clearTimeout(O.current),e&&setTimeout((function(){u&&u()}),b)),I.current=!0}),[l]),t.useEffect((function(){D()}),[p]),i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement(it,{getContainer:o},i.default.createElement("div",{className:E(t+"-toast","all-border-box",r),ref:_},i.default.createElement(Tt,{in:l,timeout:b,type:"fade"},P(t+"-toast"))))}))}));var el=G(Qa,function(e){return{toast:Ja(e),info:Ja(e,"info"),success:Ja(e,"success"),error:Ja(e,"error"),loading:Ja(e,"loading"),warn:Ja(e,"warn")}}(Se(Qa)));e.ActionSheet=Bt,e.Avatar=Ft,e.Badge=zt,e.Button=ot,e.Carousel=jt,e.Cell=Ut,e.Checkbox=ln,e.CircleProgress=un,e.Collapse=hn,e.ContextProvider=Ne,e.CountDown=An,e.DatePicker=Jn,e.Dialog=ar,e.Divider=Qn,e.Dropdown=sr,e.DropdownMenu=mr,e.Ellipsis=qr,e.Form=Qr,e.Grid=To,e.Image=Dt,e.ImagePicker=si,e.ImagePreview=Vi,e.IndexBar=Gi,e.Input=ro,e.Keyboard=Ki,e.LoadMore=Zi,e.Loading=tt,e.Masking=Lt,e.NavBar=Ji,e.NoticeBar=Qi,e.Notify=na,e.Pagination=oa,e.Picker=qn,e.PickerView=zn,e.Popover=ma,e.Popup=_t,e.PopupSwiper=ga,e.Portal=it,e.Progress=ba,e.PullRefresh=Ta,e.Radio=co,e.Rate=ho,e.SearchBar=Ra,e.ShowMonitor=Ko,e.Slider=xo,e.Stepper=Oa,e.Steps=Da,e.Sticky=zi,e.SwipeAction=Pa,e.SwipeLoad=Ha,e.Switch=Fa,e.TabBar=Wa,e.Tabs=Ua,e.Tag=$a,e.Textarea=io,e.Toast=el,e.Transition=Tt,Object.defineProperty(e,"__esModule",{value:!0})}));
|
22
|
+
function di(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fi(){return fi=Object.assign?Object.assign.bind():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},fi.apply(this,arguments)}var vi=17,mi="always",hi="hybrid",pi="animation",gi="translate-first",bi="scale-first";function yi(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Ei(e){return e instanceof Number?[e]:[].concat(e instanceof Array?e:e.valueOf())}var wi=function(){function e(t){var n=this;di(this,"operatorAdd",(function(t){var r=(t=Ei(t)).length>=n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e+(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),di(this,"operatorSub",(function(t){var r=(t=Ei(t)).length>n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e-(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),di(this,"operatorMul",(function(t){var r=(t=Ei(t)).length>n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e*(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),di(this,"operatorDiv",(function(t){var r=(t=Ei(t)).length>n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e/(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),this.x=Ei(t)||[]}var t=e.prototype;return t.get=function(e){return this.x[e]},t.v=function(){return[].concat(this.x)},t.size=function(){return this.x.length},t.valueOf=function(){return this.x.valueOf()},t.toString=function(){return this.x.toString()},t.mul=function(e){if((e=this.convert(e)).length!==this.x.length)throw new Error("Can not process vector inner-product, input vector dim "+e.length+" don't match resource vector dim "+this.x.length);var t=0;return this.x.forEach((function(n,r){return t+=n+e[r]})),t},e}();function Ci(e,t){return"number"==typeof e?{R:e,I:0}:e.isComplex?e:{R:t,I:0}}var xi=function(){function e(t,n){var r=this;void 0===n&&(n=0),di(this,"operatorAdd",(function(t){return t=Ci(t,0),new e(r.R+t.R,r.I+t.I)})),di(this,"operatorSub",(function(t){return t=Ci(t,0),new e(r.R-t.R,r.I-t.I)})),di(this,"operatorMul",(function(t){return t=Ci(t,1),new e(r.R*t.R-r.I*t.I,r.I*t.R+r.R*t.I)})),di(this,"operatorDiv",(function(t){t=Ci(t,1);var n=Math.pow(t.R,2)+Math.pow(t.I,2);return new e((r.R*t.R+r.I*t.I)/n,(r.I*t.R-r.R*t.I)/n)})),di(this,"operatorPow",(function(t){var n=r.z();if(0===n)return new e(0);var o=Math.acos(r.R/n)*t;return new e((n=Math.pow(n,t))*Math.cos(o),n*Math.sin(o))})),"number"==typeof t?(this.R=Number(t),this.I=Number(n)):t.isComplex&&(this.R=t.r(),this.I=t.i()),this.isComplex=!0}var t=e.prototype;return t.valueOf=function(){return this.R.valueOf()},t.toString=function(){return this.R.toFixed(3)+"+"+this.I.toFixed(3)+"i"},t.isNaN=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){return isNaN(this.R)||isNaN(this.I)})),t.isReal=function(){return 0===this.I&&!this.isNaN()},t.inRangeR=function(e,t){return this.R<=t&&this.R>=e},t.inRangeI=function(e,t){return this.I<=t&&this.I>=e},t.setR=function(e){this.R=Number(e)},t.setI=function(e){this.I=Number(e)},t.r=function(){return this.R},t.i=function(){return this.I},t.z=function(){return Math.sqrt(Math.pow(this.R,2)+Math.pow(this.I,2))},t.theta=function(){var e=this.z();return Math.acos(this.R/e)},e}(),Ti={add:function(e,t){return e.operatorAdd?e.operatorAdd(t):e+t},sub:function(e,t){return e.operatorSub?e.operatorSub(t):e-t},mul:function(e,t){return e.operatorMul?e.operatorMul(t):e*t},div:function(e,t){return e.operatorDiv?e.operatorDiv(t):e/t},pow:function(e,t){return e.operatorPow?e.operatorPow(t):Math.pow(e,t)},binaryAnd:function(e,t){return e.operatorBinaryAnd?e.operatorBinaryAnd(t):e&t},binaryOr:function(e,t){return e.operatorBinaryOr?e.operatorBinaryOr(t):e|t},binaryXor:function(e,t){return e.operatorBinaryXor?e.operatorBinaryXor(t):e^t},binaryLShift:function(e,t){return e.operatorBinaryLShift?e.operatorBinaryLShift(t):e<<t},binaryRShift:function(e,t){return e.operatorBinaryRShift?e.operatorBinaryRShift(t):e>>t},less:function(e,t){return e.operatorLess?e.operatorLess(t):t.operatorGreater?t.operatorGreater(e):e.operatorGreaterEqual?!e.operatorGreaterEqual(t):e<t},greater:function(e,t){return e.operatorGreater?e.operatorGreater(t):t.operatorLess?t.operatorLess(e):e.operatorLessEqual?!e.operatorLessEqual(t):e>t},lessEqual:function(e,t){return e.operatorLessEqual?e.operatorLessEqual(t):t.operatorGreaterEqual?t.operatorGreaterEqual(e):e.operatorGreater?!e.operatorGreater(t):e<=t},greaterEqual:function(e,t){return e.operatorGreaterEqual?e.operatorGreaterEqual(t):t.operatorLessEqual?t.operatorLessEqual(e):e.operatorLess?!e.operatorLess(t):e>=t},equal:function(e,t){return e.operatorEqual?e.operatorEqual(t):e.operatorNotEqual?!e.operatorNotEqual(t):t.operatorEqual?t.operatorEqual(e):t.operatorNotEqual?!t.operatorNotEqual(e):e==t},notEqual:function(e,t){return e.operatorNotEqual?e.operatorNotEqual(t):e.operatorEqual?!e.operatorEqual(t):t.operatorNotEqual?t.operatorNotEqual(e):t.operatorEqual?!t.operatorEqual(e):e!=t}};function Ni(e){return e>=0?Math.sqrt(e):new xi(0,Math.sqrt(-e))}var ki=Math.sqrt(3),Si=Math.pow(2,1/3),Ri=Ni(-1),Mi=new xi(0).operatorSub(Ri);function Li(e,t,n,r){if(void 0===r&&(r=!0),t===n&&0===t)return Math.pow(e,Ti.div(1,3));var o=function(e,t,n){var r=-3*t+3*n-1,o=-(2*t-n)/r,i=-9*Math.pow(t,2)+9*n*t+9*t-9*Math.pow(n,2),a=3*r,l=Si*a,u=54*Math.pow(t,3)-243*e*Math.pow(t,2)-81*n*Math.pow(t,2)+162*Math.pow(t,2)-81*Math.pow(n,2)*t-162*e*t+486*e*n*t-81*n*t+54*Math.pow(n,3)-243*e*Math.pow(n,2)-27*e+162*e*n;return[4*Math.pow(i,3)+Math.pow(u,2),u,o,i,a,l]}(e,t,n),i=o[0],a=o[1],l=o[2],u=o[3],c=o[4],s=o[5],d=Ti.pow(new xi(Ti.add(Ni(i),a)),Ti.div(1,3)),f=Ti.add(Ti.sub(Ti.div(d,s),Ti.div(new xi(Ti.mul(Si,u)),Ti.mul(d,c))),l),v=[];Ti.lessEqual(i,1e-12)?([f,Ti.add(Ti.add(Ti.div(Ti.mul(Ti.sub(Ti.mul(Ri,ki),1),d),Ti.mul(2,s)),Ti.div(Ti.mul(Ti.add(Ti.mul(Ri,ki),1),u),Ti.mul(Ti.mul(d,s),Si))),l),Ti.add(Ti.add(Ti.div(Ti.mul(Ti.sub(Ti.mul(Mi,ki),1),d),Ti.mul(2,s)),Ti.div(Ti.mul(Ti.add(Ti.mul(Mi,ki),1),u),Ti.mul(Ti.mul(d,s),Si))),l)].forEach((function(e){e.inRangeR(0,1)&&v.push(e.r())})),v.sort()):v.push(f.r());return r?v[0]:v}var Oi={add:function(e,t){return e.operatorAdd?e.operatorAdd(t):e+t},sub:function(e,t){return e.operatorSub?e.operatorSub(t):e-t},mul:function(e,t){return e.operatorMul?e.operatorMul(t):e*t},div:function(e,t){return e.operatorDiv?e.operatorDiv(t):e/t},pow:function(e,t){return e.operatorPow?e.operatorPow(t):Math.pow(e,t)},binaryAnd:function(e,t){return e.operatorBinaryAnd?e.operatorBinaryAnd(t):e&t},binaryOr:function(e,t){return e.operatorBinaryOr?e.operatorBinaryOr(t):e|t},binaryXor:function(e,t){return e.operatorBinaryXor?e.operatorBinaryXor(t):e^t},binaryLShift:function(e,t){return e.operatorBinaryLShift?e.operatorBinaryLShift(t):e<<t},binaryRShift:function(e,t){return e.operatorBinaryRShift?e.operatorBinaryRShift(t):e>>t},less:function(e,t){return e.operatorLess?e.operatorLess(t):t.operatorGreater?t.operatorGreater(e):e.operatorGreaterEqual?!e.operatorGreaterEqual(t):e<t},greater:function(e,t){return e.operatorGreater?e.operatorGreater(t):t.operatorLess?t.operatorLess(e):e.operatorLessEqual?!e.operatorLessEqual(t):e>t},lessEqual:function(e,t){return e.operatorLessEqual?e.operatorLessEqual(t):t.operatorGreaterEqual?t.operatorGreaterEqual(e):e.operatorGreater?!e.operatorGreater(t):e<=t},greaterEqual:function(e,t){return e.operatorGreaterEqual?e.operatorGreaterEqual(t):t.operatorLessEqual?t.operatorLessEqual(e):e.operatorLess?!e.operatorLess(t):e>=t},equal:function(e,t){return e.operatorEqual?e.operatorEqual(t):e.operatorNotEqual?!e.operatorNotEqual(t):t.operatorEqual?t.operatorEqual(e):t.operatorNotEqual?!t.operatorNotEqual(e):e==t},notEqual:function(e,t){return e.operatorNotEqual?e.operatorNotEqual(t):e.operatorEqual?!e.operatorEqual(t):t.operatorNotEqual?t.operatorNotEqual(e):t.operatorEqual?!t.operatorEqual(e):e!=t}};function _i(e,t,n){void 0===n&&(n="x");var r=e[0],o=e[1],i=e[2],a=e[3],l="x"===n?Li(t,r,i):"y"===n?Li(t,o,a):t,u=function(e,t){return Oi.add(Oi.mul(Oi.sub(t,e),l),e)},c=new wi([0,0]),s=new wi([r,o]),d=new wi([i,a]),f=new wi([1,1]),v=u(c,s),m=u(s,d),h=u(d,f),p=u(v,m),g=u(m,h),b=u(p,g),y=[v,p].map((function(e){return Oi.div(e,Oi.add(b,1e-9))})),E=y[0],w=y[1],C=[g,h].map((function(e){return Oi.div(Oi.sub(e,b),Oi.add(Oi.sub(f,b),1e-9))})),x=C[0],T=C[1];return[[].concat(E.v(),w.v()),[].concat(x.v(),T.v())]}function Ii(e,t,n){return 3*e*n*Math.pow(1-n,2)+3*t*(1-n)*Math.pow(n,2)+Math.pow(n,3)}function Bi(e,t,n){void 0===n&&(n="x");var r=e[0],o=e[1],i=e[2],a=e[3],l=0===t?0:1===t?1:"x"===n?Li(t,r,i):"y"===n?Li(t,o,a):t;return["x"===n?t:Ii(r,i,l),"y"===n?t:Ii(o,a,l)]}function Di(e){return window.requestAnimationFrame?window.requestAnimationFrame(e):setTimeout(e,vi)}function Ai(e){return window.requestAnimationFrame?window.cancelAnimationFrame(e):clearTimeout(e,vi)}var Pi=function(){function e(e){var t=this;void 0===e&&(e={}),di(this,"setBounce",(function(e){!isNaN(e)&&(t.bouncing=Number(e))})),di(this,"setDamp",(function(e){void 0===e&&(e=0),!isNaN(e)&&(t.damp=Number(e))})),di(this,"setTransform",(function(e,n){if(void 0===e&&(e={}),void 0===n&&(n={}),t.fixedX&&e.translateX&&delete e.translateX,t.fixedY&&e.translateY&&delete e.translateY,n.merge){["translateX","translateY","scale"].forEach((function(n){void 0!==e[n]&&(t.transform[n]=parseFloat(e[n]))}));var r=e.transformOrigin;r instanceof Array&&2===r.length&&(t.transform.transformOrigin=r.map((function(e){return parseFloat(e)})))}else t.transform=fi({},e);return n.silent||t.update(),t})),di(this,"on",(function(e,n){if(n&&"function"==typeof n){var r="on"+e[0].toUpperCase()+e.slice(1);t[r]?t[r]="onTransform"===r?function(){return n(fi({},t.transform),{complete:!t.busy(),dirty:t.dirty()})}:n:console.warn("[Transform]Unsupport event:",e)}return t})),di(this,"restore",(function(e){if(!e){var n=t.transform;Di((function(){t.onRestore(n)}))}t.dragMode===mi?t.zoomTo(1,{fitEdge:!0}):t.setTransform({},{merge:!1,silent:e})})),di(this,"getTransform",(function(e){switch(e){case"css":return t.toCSS();case"style":return t.toStyle();default:return fi({},t.transform)}})),di(this,"dirty",(function(){var e=t.transform,n=e.translateX,r=void 0===n?0:n,o=e.translateY,i=void 0===o?0:o,a=e.scale;return 0!==r||0!==i||1!==(void 0===a?1:a)})),di(this,"busy",(function(){return!t.disableContentTouch||t.cancelSwipe||t.animating})),di(this,"isTapStop",(function(){return t.isTapStopped})),di(this,"apply",(function(){if(t.dom){var e=t.toCSS();t.dom.style.transform=e.transform||"",t.dom.style.webkitTransform=e.transform||"",t.dom.style.transformOrigin=e.transformOrigin||"center center",t.dom.style.webkitTransformOrigin=e.transformOrigin||"center center"}t.onTransform(),t.timer=0})),di(this,"update",(function(){Ai(t.timer),t.timer=Di(t.apply),t.lastTransform=fi({},t.transform)})),di(this,"cancel",(function(){Ai(t.timer),t.transform=fi({},t.lastTransform)})),di(this,"toTop",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(1,1)[1];return Math.round(Math.abs(r/n))})),di(this,"toBottom",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(1,-1)[1];return Math.round(Math.abs(r/n))})),di(this,"toLeft",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(1,1)[0];return Math.round(Math.abs(r/n))})),di(this,"toRight",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(-1,1)[0];return Math.round(Math.abs(r/n))})),di(this,"getOriginXY",(function(e){var n=e[0],r=e[1],o=t._getTransformedBounding(),i=o.left,a=o.top,l=t.transform.scale,u=void 0===l?1:l;return[(n-i)/u,(r-a)/u]})),di(this,"setScreenCenter",(function(e,n,r){var o=t.getOriginXY([e,n]),i=o[0],a=o[1];return t.setCenter(i,a,r)})),di(this,"setCenter",(function(e,n,r){var o=t.transform,i=t.fixedX,a=t.fixedY,l=t.boundingRect,u=t.viewport,c=o.translateX,s=void 0===c?0:c,d=o.translateY,f=void 0===d?0:d,v=o.scale,m=void 0===v?1:v,h=o.transformOrigin,p=l||u,g=p.top,b=p.bottom,y=p.left,E=p.right;if(h||(h=[(E-y)/2,(b-g)/2]),!i){var w=e-h[0];e=h[0]+w,o.translateX=s+w*(m-1)/m,h[0]=e}if(!a){var C=n-h[1];n=h[1]+C,o.translateY=f+C*(m-1)/m,h[1]=n}o.transformOrigin=h,r&&t.update()})),di(this,"zoomToScreenCenter",(function(e,n,r){void 0===r&&(r={});var o=n[0],i=n[1];t.setScreenCenter(o,i,!0),Di((function(){return Di((function(){t.zoomTo(e,fi({fitEdge:!0},r))}))}))})),di(this,"zoomToCenter",(function(e,n,r){void 0===r&&(r={});var o=n[0],i=n[1];t.setCenter(o,i,!0),Di((function(){return Di((function(){t.zoomTo(e,fi({fitEdge:!0},r))}))}))})),di(this,"zoomTo",(function(e,n){void 0===n&&(n={});var r=n,o=r.transition,i=void 0===o?"all":o,a=r.easingFunc,l=void 0===a?"ease-out":a,u=r.duration,c=void 0===u?0:u,s=r.silent,d=void 0===s||s,f=r.fitEdge,v=void 0!==f&&f,m=r.callback,h=t.maxScale,p=void 0===h?1:h,g=t.minScale,b=void 0===g?1:g,y=t.transform,E=y.scale,w=void 0===E?1:E,C=y.translateX,x=void 0===C?0:C,T=y.translateY,N=void 0===T?0:T,k=Math.max(Math.min(e,p),b),S=k/w;t.transform.scale=k,t.transform.translateX=x/S,t.transform.translateY=N/S,v&&t.fit(!1),t.dom&&c?(t.dom.style.transition=i+" "+c+"ms "+l,t.animating=!0,setTimeout((function(){t.dom.style.transition="",t.animating=!1,!d&&t.onZoomEnd(null,k),"function"==typeof m&&m(k)}),c)):"function"==typeof m&&m(k),t.update()})),di(this,"zoom",(function(e,n){void 0===e&&(e=1),void 0===n&&(n={});var r=t.transform.scale,o=void 0===r?1:r;t.zoomTo(o*e,n)})),di(this,"drag",(function(e,n,r,o,i){var a=t.transform,l=t.interActBound,u=t.fixedX,c=t.fixedY,s=t.bounceRateX,d=t.bounceRateY,f=a.translateX,v=void 0===f?0:f,m=a.translateY,h=void 0===m?0:m,p=a.scale,g=void 0===p?1:p;u&&(e=0),c&&(n=0);var b=t._remainToEdge(e,n,l),y=b[0],E=b[1],w=(y+e)*e>0,C=(E+n)*n>0,x=0,T=0,N=Math.abs(e)>Math.abs(n),k=N&&w||!N&&C;e&&(x=o?e:t._getDragV(e,y,w,r?s:0),t.transform.translateX=v+x/g),n&&(T=i?n:t._getDragV(n,E,C,r?d:0),t.transform.translateY=h+T/g);var S=[u?0:-y,c?0:-E];if(t.update(),t.interActBound){var R=l.left,M=l.right,L=l.top,O=l.bottom;t.interActBound={left:R+x,right:M+x,top:L+T,bottom:O+T}}return{toEdge:k,remain:S}})),di(this,"fit",(function(e,n,r){void 0===e&&(e=!0);var o=!1,i=t.transform,a=i.translateX,l=void 0===a?0:a,u=i.translateY,c=void 0===u?0:u,s=i.scale,d=void 0===s?1:s,f=t._outOfEdge(),v=f.outX,m=f.outY,h=f.outLeft,p=f.outRight,g=f.outTop,b=f.outBottom;return!n&&v&&(p&&(t.transform.translateX=l+p/d),h&&(t.transform.translateX=l+h/d),o=!0),!r&&m&&(b&&(t.transform.translateY=c+b/d),g&&(t.transform.translateY=c+g/d),o=!0),o&&e&&t.bounce(),t.update(),o})),di(this,"fitX",(function(e){return void 0===e&&(e=!0),t.fit(e,!1,!0)})),di(this,"fitY",(function(e){return void 0===e&&(e=!0),t.fit(e,!0,!1)})),di(this,"swipe",(function(e){if(t.damp){var n=yi(e);if(isNaN(n))return;t.cancelSwipe&&t.cancelSwipe();var r=0,o=Math.ceil(n/t.damp),i=t.transform,a=i.translateX,l=void 0===a?0:a,u=i.translateY,c=void 0===u?0:u,s=i.scale,d=void 0===s?1:s,f=[].concat(t.cubic.scroll),v=[].concat(t.cubic.bounce);if(t.dom){var m=850,h=[null,f],p=0,g=0,b=0,y=[[0,[l*d,c*d]]],E=function(){p=0,t.cancelSwipe()},w=e[0]*o/2,C=e[1]*o/2,x=t.bounceRateX,T=t.bounceRateY,N=t._outOfEdge(),k=N.outX,S=N.outY,R=t.drag(w,C,!1,x,T).remain,M=t._outOfEdge(),L=M.outX,O=M.outY;(L||O)&&(h[1]=v);var _=.33*window.innerWidth,I=.33*window.innerHeight;if(t.swipeMode===pi){t.cancel();var B=t._setSwipeBounceByAnimation(C,R[1],O,S,T,m,h[1],I),D=t._setSwipeBounceByAnimation(w,R[0],L,k,x,m,h[1],_),A=D.length>1,P=B.length>1;[D,B].forEach((function(e,t){return e.forEach((function(e){e[1]+=y[0][1][t];for(var n=0;n<y.length;n+=1){if(e[0]===y[n][0])return void(y[n][1][t]=e[1]);if(e[0]<y[n][0]){var r=[null,null];return r[t]=e[1],void y.splice(n,0,[e[0],r])}}var o=[null,null];o[t]=e[1],y.push([e[0],o])}))}));var H=y[y.length-1][0],V={};y.forEach((function(e,t){var n=e[0];e[1].map((function(r,o){if(null===r){for(var i=y[t-1][1][o],a=y[t-1][0],l=i,u=a,c=t+1;c<y.length;c+=1)if(null!==y[c][1][o]){l=y[c][1][o],u=y[c][0];break}if(a!==u){var s=[];[a,n,u].forEach((function(e,t){s[t]=V[e]?V[e]:Bi(h[1],e/H,"x")[1]})),e[1][o]=i+(l-i)*(s[1]-s[0])/(s[2]-s[0])}else e[1][o]=i}}))})),y.forEach((function(e){e[1]="transform: "+t.toCSS({translateX:e[1][0]/d,translateY:e[1][1]/d,scale:d}).transform})),t._appendAnimation(y,"cubic-bezier("+h[1].join(","),H),p=setTimeout(E,H+vi),t.cancelSwipe=function(){t._stopAnimation(),t._syncDom(),t.dom.style.animation="",p&&(clearTimeout(p),(A||P)&&t.fit(!1)),t.cancelSwipe=null,t.onSwipeEnd(t.transform)}}else t.dom.style.transition="transform "+m+"ms cubic-bezier("+h[1].join(",")+")",r=Di((function(){p=setTimeout(E,m);var e=function(e){var t=e(m,h)||{};m=t.swipeSpan||m,h=t.cubicBezier||h,clearTimeout(p),p=setTimeout(E,m)};L&&(k&&w*R[0]>0?t.fitX(!1):(h[1]=[].concat(v),g=t._setSwipeBounce(w,R[0],x,e,"x",_))),O&&(S&&C*R[1]>0?t.fitY(!1):(h[1]=[].concat(v),b=t._setSwipeBounce(C,R[1],T,e,"y",I)))})),t.cancelSwipe=function(){r&&Ai(r),p&&(g&&clearTimeout(g),b&&clearTimeout(b),clearTimeout(p),t._syncDom(),(g||b)&&t.fit(!1)),t.dom.style.transition="",t.cancelSwipe=null,t.onSwipeEnd(t.transform)}}else{var F=e[0]/o,z=e[1]/o;r=Di((function e(){var n=(o-.5)*F,i=(o-.5)*z;t.drag(n,i),(o-=1)>0?(r=Di(e),t.cancelSwipe=function(){r&&Ai(r),t.cancelSwipe=null,t.onSwipeEnd(t.transform)}):(r=0,t.cancelSwipe())}))}}})),di(this,"bounce",(function(){var e=t.bouncing;e&&t.dom&&(t.dom.style.transition="all "+e+"ms cubic-bezier(.14, 1, .34, 1)",t.animating=!0,setTimeout((function(){t.animating=!1,t.dom.style.transition=""}),e))})),di(this,"touchStart",(function(e){if(t.disableContentTouch=!0,t.active&&!t.animating)if(t.scaling=!1,t.dragging=!1,t.cancelSwipe?(t.cancelSwipe(),t.isTapStopped=!0):t.dirty()||(t.useDomBoundary&&t.setBoundary(t.dom.getBoundingClientRect()),t.onSchedule()),e.touches.length>1){var n=t.transform.scale,r=void 0===n?1:n;t.disableContentTouch=!1;var o=t.getOriginXY([(e.touches[1].clientX+e.touches[0].clientX)/2,(e.touches[1].clientY+e.touches[0].clientY)/2]),i=o[0],a=o[1];t.pinchStartCenter=[i,a],t.setCenter(i,a),t.pinchStartLen=yi([e.touches[1].clientX-e.touches[0].clientX,e.touches[1].clientY-e.touches[0].clientY]),t.scaling=!0,t.onZoomStart(e,r,t.pinchStartCenter)}else if(t.dragMode===mi||t.dragMode===hi&&t.dirty()){t.disableContentTouch=!1,t.dragStartTime=+new Date,t.lastDragStartTime=0;var l=e.touches&&e.touches[0]?e.touches[0].clientX:0,u=e.touches&&e.touches[0]?e.touches[0].clientY:0;t.dragStartV=[l,u],t.lastDragStartV=[],t.dragX=l,t.dragY=u}})),di(this,"touchMove",(function(e){if(!t.disableContentTouch){var n=e.changedTouches,r=void 0===n?[]:n;if(t.scaling){if(e.touches.length>1){var o=yi([e.touches[1].clientX-e.touches[0].clientX,e.touches[1].clientY-e.touches[0].clientY]);t.zoom(o/t.pinchStartLen),t.pinchStartLen=o}}else{var i=r[0]?r[0].clientX:0,a=r[0]?r[0].clientY:0,l=i-t.dragX,u=a-t.dragY,c=t.drag(l,u,t.dragging).toEdge;t.dragX=i,t.dragY=a;var s=+new Date;s>t.dragStartTime+100&&(t.lastDragStartV=t.dragStartV,t.lastDragStartTime=t.dragStartTime,t.dragStartTime=s,t.dragStartV=[i,a]),t.dragging||(t.dragging=!0,c?t.disableContentTouch=!0:(t.onDragStart(e),t.interActBound=t._getTransformedBounding(!0)))}t.preventScroll&&e.preventDefault()}})),di(this,"touchEnd",(function(e){if(!t.disableContentTouch&&0===e.touches.length){var n=t.transform.scale,r=void 0===n?1:n;if(t.scaling)t.onZoomEnd(e,r,t.pinchStartCenter),r<1?t.restore():t.fit();else if(t.dragging){var o=+new Date-t.dragStartTime,i=t.dragStartV;o<50&&t.lastDragStartTime&&(o=+new Date-t.lastDragStartTime,i=t.lastDragStartV);var a=[e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].clientX:0,e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].clientY:0],l=[vi*(a[0]-i[0])/o,vi*(a[1]-i[1])/o];t.onDragEnd(e),yi(l)>t.motionThreshold?t.swipe(l):t.fit()}Di((function(){t.disableContentTouch=!0,t.pinchStartLen=0,t.interActBound=null,t.isTapStopped=!1}))}})),di(this,"_outOfEdge",(function(){var e=t._getTransformedBounding(),n=e.left,r=e.right,o=e.top,i=e.bottom,a=t.edges,l=a.left-n,u=a.right-r,c=a.top-o,s=a.bottom-i,d=l<0?l:0,f=u>0?u:0,v=c<0?c:0,m=s>0?s:0;return{outX:!(!d&&!f),outY:!(!v&&!m),outLeft:d,outRight:f,outTop:v,outBottom:m}})),di(this,"_remainToEdge",(function(e,n,r){var o=[0,0],i=t.edges,a=r||t._getTransformedBounding(),l=a.left,u=a.right,c=a.top,s=a.bottom,d=e>0?i.left:i.right,f=n>0?i.top:i.bottom,v=e>0?l:u,m=n>0?c:s;return o[0]=v-d,o[1]=m-f,o})),di(this,"_computeEdge",(function(){var e=t.viewport,n=e.left,r=e.right,o=e.top,i=e.bottom;if(t.boundingRect){var a=t.boundingRect,l=a.left,u=a.right,c=a.top,s=a.bottom;t.edges={left:Math.max(l,n),top:Math.max(c,o),right:Math.min(u,r),bottom:Math.min(s,i)}}else t.edges=fi({},t.viewport)})),this.dom=null,this.useDomBoundary=!1,this.viewport={left:0,right:window.innerWidth,top:0,bottom:window.innerHeight},this.maxScale=2,this.minScale=.5,this.fixedX=!1,this.fixedY=!1,this.active=!0,this.preventScroll=!0,this.dragMode=hi,this.swipeMode=pi,this.transformMode=gi,this.transform={},this.onZoomStart=function(){},this.onZoomEnd=function(){},this.onDragStart=function(){},this.onDragEnd=function(){},this.onSwipeEnd=function(){},this.onTransform=function(){},this.onRestore=function(){},this.onSchedule=function(){},this.cubic={scroll:[.33,1,.66,1],bounce:[.17,1,.17,1]},this.bouncing=300,this.bounceRateX=0,this.bounceRateY=0,this.damp=2,this.motionThreshold=10,this.config(e),this.boundingRect=null,this.disableContentTouch=!0,this.scaling=!1,this.pinchStartCenter=[],this.pinchStartLen=0,this.dragging=!1,this.dragX=0,this.dragY=0,this.dragStartTime=0,this.dragStartV=[0,0],this.edges={},this.timer=0,this.animating=!1,this.cancelSwipe=null,this.isTapStopped=!1,this.interActBound=null,this._computeEdge(),this.lastTransform={},this.animationStyleDom=null}var t=e.prototype;return t.enable=function(){return this.active=!0,this},t.disable=function(){return this.active=!1,this},t.config=function(e){void 0===e&&(e={});var t=e,n=t.viewport,r=t.dom,o=t.useDomBoundary,i=t.maxScale,a=t.minScale,l=t.fixedX,u=t.fixedY,c=t.bounceRateX,s=t.bounceRateY,d=t.active,f=t.preventScroll,v=t.transform,m=t.damp,h=t.dragMode,p=t.swipeMode,g=t.cubic,b=t.transformMode,y=t.motionThreshold,E=t.bounce,w=t.onZoomStart,C=t.onZoomEnd,x=t.onDragStart,T=t.onDragEnd,N=t.onSwipeEnd,k=t.onTransform,S=t.onRestore,R=t.onSchedule;return n&&this.setViewport(n),r&&this.setDom(r,o),i&&this.setMaxScale(i),a&&this.setMinScale(a),h&&this.setDragMode(h),p&&this.setSwipeMode(p),b&&this.setTransformMode(b),g&&this.setCubic(g),void 0!==y&&this.setMotionThreshold(y),void 0!==c&&this.setBounceRateX(c),void 0!==s&&this.setBounceRateY(s),void 0!==l&&this.setFixedX(l),void 0!==u&&this.setFixedY(u),void 0!==d&&(this.active=Boolean(d)),void 0!==f&&(this.preventScroll=Boolean(f)),v&&this.setTransform(v),void 0!==m&&this.setDamp(m),void 0!==E&&this.setBounce(E),this.on("transform",k).on("restore",S).on("schedule",R).on("zoomStart",w).on("zoomEnd",C).on("dragStart",x).on("dragEnd",T).on("swipeEnd",N),this},t.setDom=function(e,t){var n=this;return void 0===t&&(t=!0),e&&(this.useDomBoundary=t,this.dom!==e&&(this.removeDom(),this.dom=e,e.addEventListener("touchstart",this.touchStart),e.addEventListener("touchmove",this.touchMove),e.addEventListener("touchend",this.touchEnd),e.addEventListener("touchcancel",this.touchEnd),e.style.willChange="transform",e.style.transition="",e.style.transform="",e.style.webkitTransform="",e.style.transformOrigin="",e.style.webkitTransformOrigin="",this.transform={},this.lastTransform={},t&&Di((function(){n.boundingRect||n.setBoundary(e.getBoundingClientRect())})))),this},t.setBoundary=function(e,t){void 0===t&&(t=!1);var n=t?this._getRawBounding(e):e,r=n.left,o=n.right,i=n.top,a=n.bottom;return this.boundingRect=fi({},this.boundingRect||this.viewport,{left:r,right:o,top:i,bottom:a}),this._computeEdge(),this},t.removeDom=function(){return this.dom&&(this.dom.removeEventListener("touchstart",this.touchStart),this.dom.removeEventListener("touchmove",this.touchMove),this.dom.removeEventListener("touchend",this.touchEnd),this.dom.removeEventListener("touchcancel",this.touchEnd)),this},t.setMaxScale=function(e){return isNaN(e)||(this.maxScale=Math.max(Number(e),1)),this},t.setMinScale=function(e){return isNaN(e)||(this.minScale=Math.min(Number(e),1)),this},t.setMotionThreshold=function(e){return isNaN(e)||(this.motionThreshold=e),this},t.setCubic=function(e){for(var t in void 0===e&&(e={}),e)e[t]instanceof Array&&4===e[t].length&&(this.cubic[t]=e[t].map((function(e){return isNaN(Number(e))?Number(e):0})));return this},t.setDragMode=function(e){this.dragMode=e},t.setSwipeMode=function(e){this.swipeMode=e},t.setTransformMode=function(e){this.transformMode=e},t.setBounceRateX=function(e){return isNaN(e)||(this.bounceRateX=Math.min(Number(e),1)),this},t.setBounceRateY=function(e){return isNaN(e)||(this.bounceRateY=Math.min(Number(e),1)),this},t.setViewport=function(e){var t=this;void 0===e&&(e={});var n=!1;return["left","right","top","bottom"].forEach((function(r){var o=Number(e[r]);isNaN(o)||(t.viewport[r]=o,n=!0)})),n&&this._computeEdge(),this},t.setFixedX=function(e){if(this.fixedX=!!e,e){var t=this.transform.transformOrigin;if(t){var n=this.boundingRect||this.viewport,r=n.left,o=n.right;t[0]=(o-r)/2}this.setTransform({translateX:0},{merge:!0})}return this},t.setFixedY=function(e){if(this.fixedY=!!e,e){var t=this.transform.transformOrigin;if(t){var n=this.boundingRect||this.viewport,r=n.top,o=n.bottom;t[1]=(o-r)/2}this.setTransform({translateY:0},{merge:!0})}return this},t.toStyle=function(){var e=this.toCSS(),t=e.transform,n=e.transformOrigin,r="";return t&&(r+="transform: "+t),n&&(r+="transform-origin: "+n),r},t.toCSS=function(e){var t="",n="center";if(e||this.dirty()){var r=e||this.transform;if(this.transformMode===gi){var o=this.transform.scale,i=void 0===o?1:o;["translateX","translateY"].forEach((function(e){void 0!==r[e]&&(t+=e+"("+r[e]*i+"px)")})),t+="scale("+i+")"}else if(this.transformMode===bi)["scale","translateX","translateY"].forEach((function(e,n){var o=n?"px":"";void 0!==r[e]&&(t+=e+"("+r[e]+o+")")}));else{var a=r.scale,l=void 0===a?1:a,u=r.translateX,c=void 0===u?0:u,s=r.translateY;t="matrix("+l+", 0, 0, "+l+", "+c*l+", "+(void 0===s?0:s)*l+")"}}return this.transform.transformOrigin&&(n=this.transform.transformOrigin.map((function(e){return Math.round(e)+"px"})).join(" ")),{transform:t,transformOrigin:n}},t._getTransformedBounding=function(){var e=this.boundingRect,t=this.viewport,n=this.transform,r=e||t,o=r.left,i=r.top,a=r.right,l=r.bottom,u=n.scale,c=void 0===u?1:u,s=n.transformOrigin,d=void 0===s?[(a-o)/2,(l-i)/2]:s,f=n.translateX,v=void 0===f?0:f,m=n.translateY,h=void 0===m?0:m,p=d[0],g=d[1],b=(v-p)*c+p,y=(h-g)*c+g;return{left:o+b,right:o+b+(a-o)*c,top:i+y,bottom:i+y+(l-i)*c}},t._getRawBounding=function(e){var t=this.transform,n=e.left,r=e.top,o=e.right,i=e.bottom,a=t.scale,l=void 0===a?1:a,u=t.transformOrigin,c=void 0===u?[(o-n)/2,(i-r)/2]:u,s=t.translateX,d=void 0===s?0:s,f=t.translateY,v=void 0===f?0:f,m=c[0],h=c[1],p=(d-m)*l+m,g=(v-h)*l+h;return{left:n-p,right:n-p+(o-n)/l,top:r-g,bottom:r-g+(i-r)/l}},t._getDragV=function(e,t,n,r){var o=0,i=0;if(n)if(r){var a=t*e>0;o=a?e*r:(t+e)*r,i=a?o:-t+o}else i=-t;else i=e;return i},t._setSwipeBounceByAnimation=function(e,t,n,r,o,i,a,l){void 0===l&&(l=1/0);var u=[],c=e*t<0;if(n)if(r&&!c)u.push([i,t]);else{var s=(c?e*o:(e-t)*o)/2;Math.abs(s)>l&&(s*=Math.abs(l/s));var d=s+(c?0:t),f=2*Math.abs(s)+Math.abs(t),v=Bi(a,Math.abs(d)/f,"y")[0],m=Math.floor(i*v);v>.1||u.push([m,d]),u.push([i,t])}else e=Math.min(Math.abs(e),Math.abs(t))*Math.abs(e)/e,u.push([i,e]);return u},t._setSwipeBounce=function(e,t,n,r,o,i){var a=this;void 0===o&&(o="x"),void 0===i&&(i=1/0);var l=e*t<0,u=l?e*n:(e-t)*n;Math.abs(u)>i&&(u*=Math.abs(i/u));var c=(u+(l?0:t))/e,s=0;return r((function(e,t){var n=Bi(t[1],c,"y"),i=Math.max(Math.floor(n[0]*e/vi),2)*vi,l=e-i;s=setTimeout((function(){r((function(e,t){var n=1-l/e,r=0,i=function(){"x"===o?a.fitX(!1):"y"===o&&a.fitY(!1),a.dom&&(a.dom.style.transition="transform "+(l-r)+"ms cubic-bezier("+t[1].map((function(e){return e.toFixed(3)})).join(",")+")")};return n>0?(t=_i(t[1],n,"x"),i()):(n=vi/e,r=vi,t=_i(t[1],n,"x"),Di(i)),{cubicBezier:t,swipeSpan:l}}))}),i)})),s},t._syncDom=function(){if(this.dom){var e=window.getComputedStyle(this.dom).getPropertyValue("transform").split(")")[0].split(", ").map((function(e){return parseFloat(e)})),t=e[3],n=void 0===t?1:t,r=e[4],o=void 0===r?0:r,i=e[5],a=void 0===i?0:i;this.setTransform({scale:n,translateX:Math.round(o)/n,translateY:Math.round(a)/n},{merge:!0})}},t._appendStyle=function(e){if(this.animationStyleDom){var t=this.animationStyleDom.firstChild;t&&this.animationStyleDom.removeChild(t)}else{var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");n.appendChild(r),r.type="text/css",this.animationStyleDom=r}this.animationStyleDom.styleSheet?this.animationStyleDom.styleSheet.cssText=e:this.animationStyleDom.appendChild(document.createTextNode(e))},t._appendAnimation=function(e,t,n){for(var r=this,o="__transformable_key_"+parseInt(1e16*(.5+.5*Math.random())).toString(16),i=[],a=0;a<e.length;a+=1){var l=e[a],u=l[0],c=l[1],s=Math.floor(u/n*100);i.push(s+"% { "+c+" }")}var d="@keyframes "+o+" {\n "+i.join("\n")+"\n }";this._appendStyle(d),this.dom&&Di((function(){r.dom.style.animation=o+" "+n+"ms "+t,r.dom.style.animationFillMode="forwards"}))},t._stopAnimation=function(){this.dom&&(this.dom.style.animationPlayState="paused")},e}();var Hi=t.forwardRef((function(e,n){var r,o,a=e.style,l=e.className,s=e.images,d=e.loop,f=void 0!==d&&d,v=e.openIndex,m=e.fit,h=e.noselect,p=void 0===h||h,g=e.displayDuration,b=void 0===g?350:g,y=e.spaceBetween,w=void 0===y?0:y,C=e.showLoading,x=void 0===C||C,T=e.loadingArea,N=e.errorArea,k=e.showError,S=void 0===k||k,R=e.retryTime,M=e.staticLabel,O=e.replaceFallbackWhenLoaded,_=e.scrollBezier,I=e.lazyloadCount,B=void 0===I?1:I,D=e.swipeToClose,A=void 0===D||D,P=e.getMinScale,H=e.getMaxScale,V=e.getDoubleClickScale,F=e.getContainer,z=e.getThumbBounds,j=e.renderIndicator,q=e.onChange,W=e.onAfterChange,X=e.onImageClick,Y=e.onImageDoubleClick,G=e.onImageLongTap,U=e.close,K=e.onClose,Z=e.onTouchStart,$=e.onTouchMove,J=e.onTouchEnd,Q=e.indicatorPos,ee=void 0===Q?"start":Q,te=c(e,["style","className","images","loop","openIndex","fit","noselect","displayDuration","spaceBetween","showLoading","loadingArea","errorArea","showError","retryTime","staticLabel","replaceFallbackWhenLoaded","scrollBezier","lazyloadCount","swipeToClose","getMinScale","getMaxScale","getDoubleClickScale","getContainer","getThumbBounds","renderIndicator","onChange","onAfterChange","onImageClick","onImageDoubleClick","onImageLongTap","close","onClose","onTouchStart","onTouchMove","onTouchEnd","indicatorPos"]),ne=Ie(),re=t.useRef(null),oe=t.useRef([]),ie=t.useRef(null),ae=t.useRef([]),le=t.useRef(null),ue=t.useRef(null),ce=t.useRef(null),se=t.useRef([]),de=t.useRef(0),fe=t.useRef(!1),ve=t.useRef(!1),me=t.useRef(!1),he=t.useRef(!1),pe=t.useRef(v),ge=t.useRef(0),be=t.useRef(0),ye=t.useRef(!1),Ee=t.useRef(!1),Ce=t.useState({}),xe=Ce[0],Te=Ce[1],Ne=Le([]),Se=Ne[0],Re=Ne[1],Me=Ne[2],Oe=t.useState(null),_e=Oe[0],Ae=Oe[1],Pe=null===(r=Se[v])||void 0===r?void 0:r.loaded,He=null===(o=Se[v])||void 0===o?void 0:o.animated,Ve=v>=0&&v<s.length,Fe=Be(!0),ze=Fe.windowWidth,je=Fe.windowHeight;function qe(e){try{e&&document.body.removeChild(e)}catch(e){}}function We(e){var t,n=null===(t=oe.current[e])||void 0===t?void 0:t.dom,r=null==n?void 0:n.parentElement;n&&r&&(ae.current[e]?ae.current[e].setDom(r):ae.current[e]=new Pi({dom:r,motionThreshold:0,dragMode:"always",transformMode:"matrix",useDomBoundary:!1,cubic:{scroll:_},onTransform:function(){var t,n,r,o,i=se.current[e],a=(null===(n=null===(t=ae.current[e])||void 0===t?void 0:t.getTransform)||void 0===n?void 0:n.call(t))||{},l=null===(r=Re.current[e])||void 0===r?void 0:r.originWidth,u=null===(o=Re.current[e])||void 0===o?void 0:o.originHeight,c=a.scale||1;if(i&&l&&u&&be.current!==c){be.current=c;var s=Xe(i)?"":" translateY(-50%)";i.style.width=l*c+"px",i.style.height=u*c+"px";var d="scale("+1/c+") translateZ(0)"+s;i.style.transform=d,i.style.webkitTransform=d,i.style.transformOrigin="top left",i.style.webkitTransformOrigin="top left"}},onRestore:function(){be.current=0},onZoomEnd:function(t,n,r){Te((function(t){var n;return u(u({},t),((n={})[e]=!1,n))}));var o=se.current[e],i=ae.current[e];if(o&&i&&!(i.getTransform().scale<1)){var a=o.getBoundingClientRect();a.width>ze&&a.height>je?(r&&r.length&&i.setCenter.apply(i,r),i.setFixedX(!1),i.setFixedY(!1)):a.height<=je?i.fixedY||(i.setFixedY(!0),i.bounce()):a.width<=ze&&(i.fixedX||(i.setFixedX(!0),i.bounce()))}},minScale:Ye(e),maxScale:Ge(e)}),function(e){var t=oe.current[e],n=null==t?void 0:t.dom;if((null==n?void 0:n.parentElement)&&(null==t?void 0:t.image)){var r=t.image.getBoundingClientRect(),o=n.parentElement.getBoundingClientRect();ae.current[e]&&ae.current[e].setBoundary({left:Math.min(r.left,o.left),right:Math.max(r.right,o.right),top:Math.min(r.top,o.top),bottom:Math.max(r.bottom,o.bottom)},!0)}}(e))}function Xe(e){return Boolean(e&&!e.classList.contains("preview-fit-contain-y"))}function Ye(e){var t=void 0===e?pe.current:e,n=se.current[t];return n?P?P(n,t):.7:1}function Ge(e){var t=void 0===e?pe.current:e,n=se.current[t];if(!n)return 1;if(H)return H(n,t);var r=n.naturalWidth;return r>n.naturalHeight?r/ze*5:Math.max(5,r/ze)}function Ue(e){var t,n,r=void 0===e?pe.current:e;return null===(n=null===(t=ae.current[r])||void 0===t?void 0:t.busy)||void 0===n?void 0:n.call(t)}function Ke(){var e,t,n=ae.current[pe.current],r=null===(e=null==n?void 0:n.toLeft)||void 0===e?void 0:e.call(n),o=null===(t=null==n?void 0:n.toRight)||void 0===t?void 0:t.call(n);return{side:!r||!o,left:!r,right:!o}}function Ze(e){if(Z&&Z(e,pe.current))return!0;var t=e.touches;return de.current=e.touches&&e.touches[0]?e.touches[0].clientX:0,ve.current=!1,me.current=!1,1===t.length?(ye.current||(he.current=!0),ue.current=window.setTimeout((function(){he.current&&(he.current=!1,ve.current=!0,G&&G(pe.current,se.current[pe.current],e))}),300)):he.current=!1,function(){var e,t;return null===(t=null===(e=ae.current[pe.current])||void 0===e?void 0:e.isTapStop)||void 0===t?void 0:t.call(e)}()&&(ve.current=!0),Ue()?(fe.current=Ke().side,!fe.current):void 0}function $e(e){if(ve.current=!0,he.current=!1,ue.current&&clearTimeout(ue.current),$&&$(e,pe.current))return!0;var t=(e.changedTouches[0].clientX||0)-de.current;if(Ue()){var n=Ke();return!fe.current||!(n.left&&t>0||n.right&&t<0)}}function Qe(e){if(J&&J(e,pe.current))return!0;var t=A&&ge.current>=(function(){var e,t;return null===(t=null===(e=ae.current[pe.current])||void 0===e?void 0:e.dirty)||void 0===t?void 0:t.call(e)}()?6:3);return ge.current=0,he.current=!1,ue.current&&clearTimeout(ue.current),t?(rt(e),!0):!(!Ue()||Ke().side)||void 0}function et(e){if(!me.current){me.current=!0,le.current&&(clearTimeout(le.current),le.current=null);var t=pe.current;Y&&Y(t,e);var n=ae.current[t];if(n){var r=function(e){var t=pe.current,n=se.current[t];if(!n)return 1;var r=Ge(t);if(V)return V(e,r,n,t);var o=n.naturalWidth,i=n.naturalHeight,a=o>i?o/ze*je/i:1,l=2;a>=2&&(l=Math.min(r,a));var u=Number(e.toFixed(3)),c=Number(l.toFixed(3));return u>=1&&u<c?c:1}(n.getTransform().scale||1);if(1===r)Xe(se.current[t])?n.zoomToScreenCenter(1,[ze/2,je/2],{duration:200,callback:function(){return n.restore()}}):(n.bounce(),n.restore());else n.zoomToScreenCenter(r,[ze/2,je/2],{duration:200,silent:!1})}}}t.useImperativeHandle(n,(function(){return{dom:re.current,imageDoms:se.current}})),De(Ve,re.current,(function(){return[]}),"top",(function(e,t){Ue()||"y"!==t||(ge.current+=1)})),t.useEffect((function(){if(Ve)pe.current=v,ye.current=!1,ie.current&&ie.current.changeIndex(v,!0),Me(s.map((function(e,t){var n;return{firstLoaded:(null===(n=Re.current[t])||void 0===n?void 0:n.firstLoaded)||!1,animated:t!==v}}))),function(e){var t,n=null===(t=Re.current[e])||void 0===t?void 0:t.firstLoaded,r=O&&n?s[e].src:s[e].fallbackSrc;if(!z||!s[e]||!r)return void at(e);var o=z(e);if(!o||!o.width||!o.height)return void at(e);var i=new Image;ce.current=i,i.classList.add("image-preview-fake-trans-image"),lt(i,o,o),i.src=r,i.style.objectPosition=s[e].thumbPosition||"top center",i.style.opacity="0",i.style.transitionDuration=b+"ms",i.style.webkitTransitionDuration=b+"ms",document.body.appendChild(i),function(e,t,n,r){if(!t)return void r(null);Ae({src:t,fit:s[e].fit,index:e,movingImage:n,onLoad:function(e,t){setTimeout((function(){r(t.getBoundingClientRect())}),20)},onError:function(){return r(null)}})}(e,r,i,(function(t){if(!t||!t.width||!t.height)return qe(i),void at(e);we((function(){i.style.opacity="1",lt(i,t,o),setTimeout((function(){Te((function(t){var n;return u(u({},t),((n={})[e]=!0,n))}))}),Math.max(0,b-80)),setTimeout((function(){at(e)}),b+30)}))}))}(v);else{ue.current&&clearTimeout(ue.current),he.current=!1,Me(Re.current.map((function(e){return u(u({},e),{animated:!1,loaded:!1})}))),ae.current=[],qe(document.querySelector(".image-preview-fake-trans-image")),Ae(null),Te({});var e=Ee.current;setTimeout((function(){e&&K&&K()}),b)}Ee.current=!0}),[Ve]),t.useEffect((function(){Ve&&Pe&&He&&setTimeout((function(){qe(ce.current),ce.current=null}),100)}),[Ve,Pe,He]),t.useEffect((function(){_e?function(e,t,n){void 0===e&&(e=function(){return document.body});var r=e();r&&(r.style.overflow="hidden",r.style.touchAction="none",(t?window:r).addEventListener("touchmove",n||L,{passive:!1,capture:!0}))}():we((function(){!function(e,t,n){void 0===e&&(e=function(){return document.body});var r=e();r&&(r.style.overflow="",r.style.touchAction="",(t?window:r).removeEventListener("touchmove",n||L,{capture:!0}))}()}))}),[_e]),t.useEffect((function(){(ae.current||[]).forEach((function(e,t){e&&e.setMinScale(Ye(t))}))}),[P]),t.useEffect((function(){(ae.current||[]).forEach((function(e,t){e&&e.setMaxScale(Ge(t))}))}),[H]);var nt=function(e,n,r){void 0===r&&(r=200);var o=t.useState(0),i=o[0],a=o[1],l=t.useRef();return t.useEffect((function(){var t=setTimeout((function(){1===i&&e(l.current),a(0)}),r);return 2===i&&n(l.current),function(){return clearTimeout(t)}}),[i]),function(e){l.current=e,a((function(e){return e+1}))}}((function(e){ve.current||(le.current=window.setTimeout((function(){me.current||X&&X(pe.current,e)||rt(e)}),300))}),et);function rt(e){ye.current||(ye.current=!0,U(e))}function ot(e,t){var n=Re.current.slice();n[e]=u(u({},n[e]||{}),t),Me(n)}function at(e){ot(e,{animated:!0}),Ae(null)}function lt(e,t,n){e.style.width=n.width+"px";var r="translate3d("+t.left+"px, "+t.top+"px, 0) scale("+t.width/n.width;e.style.transform=r,e.style.webkitTransform=r,e.style.transformOrigin="left top",e.style.webkitTransformOrigin="left top"}function ut(e,t,n){return i.default.createElement(jt,u({autoPlay:!1,loop:f,lazyloadCount:B},e),(t||[]).map((function(e,t){var r=i.default.createElement("div",{key:t,className:"preview-image-wrap",style:{padding:"0 "+w+"px"}},i.default.createElement(Dt,u({className:"preview-image",fit:e.fit||m||"preview-y",boxWidth:ze-2*w,boxHeight:je,bottomOverlap:null},n(e,t))));return e.extraNode?i.default.createElement("div",{className:"preview-image-wrap-container",key:"outer-"+t},r,e.extraNode):r})))}function ct(e){var t=Se[e]||{},n=t.loaded,r=t.animated;return E("preview-image",{"preview-hidden":!(e!==v||n&&r)})}function st(e,t,n){return j?j(e,t,n):Pe?i.default.createElement(it,null,i.default.createElement("div",{className:"image-preview-indicator"},e+1,"/",t)):null}function dt(e,t,n){var r=Se[t]||{},o=r.originWidth,a=r.originHeight,l=r.originLeft,c=r.originTop,s=r.hasOverflow?{}:Je({transform:"translateY(-50%)"}),d=n?{objectFit:n}:{};return"ios"===ne&&xe[t]&&o&&a?i.default.createElement("img",{src:e,style:u(u({position:"absolute",width:o,height:a,left:l,top:c},d),s)}):null}function ft(e){return e===v?i.default.createElement(it,null,i.default.createElement("div",{className:"image-preview-loading-area"},T||i.default.createElement(tt,{type:"circle",className:"loading-icon",radius:7}))):T}return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement(it,{getContainer:F},i.default.createElement(Tt,{in:Ve,timeout:b,type:"fade",mountOnEnter:!0,unmountOnExit:!0},i.default.createElement("div",{className:E(t+"-image-preview","all-border-box",{noselect:p},l),style:a,ref:re,onClick:nt,onDoubleClick:et},ut(u({indicatorPos:ee,initialIndex:v,ref:ie,renderIndicator:st,onChange:function(e){pe.current=e,q&&q(e)},onAfterChange:function(e,t){W&&W(e),function(e){var t=ae.current[e];t&&t.restore()}(t),we((function(){We(pe.current)}))},onTouchMove:$e,onTouchStart:Ze,onTouchEnd:Qe},te),s,(function(e,t){return{src:e.src,ref:function(e){oe.current[t]=e},showLoading:x,loadingArea:ft(t),errorArea:N,showError:S,retryTime:R,staticLabel:M,animateDuration:_e?0:void 0,style:{overflow:"visible"},className:ct(t),bottomOverlap:dt(e.fallbackSrc||e.src,t,e.fit||m),onLoad:function(e,n){se.current[t]=n,ot(t,{loaded:!0,firstLoaded:!0,originWidth:n.offsetWidth,originHeight:n.offsetHeight,originTop:n.offsetTop,originLeft:n.offsetLeft,hasOverflow:Xe(n)}),t===v?We(t):Te((function(e){var n;return u(u({},e),((n={})[t]=!0,n))}))},onError:function(){(se.current[t]=null,t===v)&&(qe(null==_e?void 0:_e.movingImage),ot(t,{animated:!0,loaded:!0}),Ae(null))}}})),_e?i.default.createElement("div",{className:"image-preview-fake-rect"},ut({initialIndex:0},[{src:_e.src,fit:_e.fit}],(function(){return{staticLabel:M,src:_e.src,animateDuration:0,onLoad:_e.onLoad,onError:_e.onError}}))):null)),_e?i.default.createElement("div",{className:"image-preview-lock-modal",onClick:rt}):null)}))}));var Vi=G(Hi,function(e){return{open:(t=e,function(e,n){var r=u(u({unmountOnExit:!0},e||{}),{close:function(){}}),o=u({},r),i=P("_ARCO_IMAGE_PREVIEW_DIV_"+(r.key||"")+"_",r.getContainer).child,a=!1,l=new Nt(t,i,n).render;function c(){a=!0,o.openIndex=-1,l(o)}return o.close=c,o.onClose=function(){r.onClose&&r.onClose(),r.unmountOnExit&&H(i)},o.openIndex=-1,l(o),setTimeout((function(){a||(o.openIndex=r.openIndex,l(o))}),20),{close:c,update:function(e){o=u(u({},o),e||{}),l(o)}}})};var t}(Se(Hi))),Fi=t.createContext({sticky:!0,getScrollContainer:function(){return null},updateRef:function(){}}),zi=t.forwardRef((function(e,n){var r=e.position,o=void 0===r?"top":r,a=e.topOffset,l=void 0===a?0:a,c=e.bottomOffset,s=void 0===c?0:c,d=e.followOffset,f=void 0===d?0:d,v=e.children,m=e.className,h=e.style,p=e.zIndex,g=void 0===p?100:p,b=e.portalWhenSticky,y=void 0!==b&&b,w=e.stickyStyle,C=void 0===w?"fixed":w,x=e.stickyCssStyle,T=e.getPortalContainer,N=e.getContainer,k=e.getScrollContainer,S=e.onStickyStateChange,R=e.onTopChange,M=Le(!1),L=M[0],O=M[1],I=M[2],B=Le(!1),D=B[0],A=B[1],P=B[2],H=t.useState({}),F=H[0],z=H[1],q=t.useRef(null),W=t.useRef(null),X=t.useRef(0),Y=t.useRef(null),G=t.useRef(null),U=t.useRef(!1),K=t.useCallback((function(e){var t=e.followTop,n=e.followBottom;if(q.current){var r="top"===o||"both"===o,i="bottom"===o||"both"===o,a=W.current.getBoundingClientRect(),c=q.current.getBoundingClientRect(),d=c.height;X.current=c.height;var v=j(G.current).containerRect,m=v.top,h=v.bottom,p=v.height,b=Math.round(a.top-m),y=Math.round(a.top+d-h),E=n-f-d-l-m,w=p-t-f-d-s;P(Boolean(O.current));var T=!!r&&(b<=l&&n>m+f),N=!!i&&(y>=-s&&t<h-f),k=T||N,M=("absolute"===C?0:m)+l,L=("absolute"===C?0:window.innerHeight-h)+s,_={};k&&(_=u(u(u(u({transform:"translateZ(0)",WebkitTransform:"translateZ(0)",position:"absolute"===C?"absolute":"fixed",zIndex:g},T?{top:E>0?M:M+E}:{}),N?{bottom:w>0?L:L+w}:{}),{left:a.left,width:a.width}),x||{})),null==R||R(Math.max(0,c.top-m-l)),I(k),z(_),k!==A.current&&S&&S({isTopSticky:T,isBottomSticky:N,isSticky:k,wasSticky:A.current})}}),[o,l,s,f,g,C,S,R,x]),Z=t.useCallback((function(){U.current||(_((function(){if(U.current=!1,Y.current){var e=Y.current.getBoundingClientRect(),t=e.top,n=e.bottom;K({followTop:t,followBottom:n})}})),U.current=!0)}),[K]);t.useEffect((function(){var e=V(N);Y.current=e||document.body;var t=k?V(k):window;if(t){G.current=t;return t.addEventListener("scroll",Z),Z(),function(){!function(e){e.removeEventListener("scroll",Z)}(t)}}}),[N,k,Z]),t.useEffect((function(){W.current&&(W.current.style.height=(O.current?X.current:0)+"px")}),[L,D]),t.useImperativeHandle(n,(function(){return{dom:q.current,recalculatePosition:Z}}),[Z]);var $=t.useMemo((function(){return u(u({},h||{}),F)}),[F,h]);function J(e){return i.default.createElement("div",{className:E(e+"-sticky",m),ref:q,style:$},v)}return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("div",null,i.default.createElement("div",{ref:W}),y&&L?i.default.createElement(it,{getContainer:T},J(t)):J(t))}))})),ji=t.forwardRef((function(e,n){var r=e.index,o=e.list,a=e.className,l=e.style,u=e.children,c=e.listKey,s=e.onGroupItemClick,d=e.renderGroupItem,f=e.renderStickyItem,v=t.useContext(Te).prefixCls,m=t.useContext(Fi),h=m.sticky,p=m.getScrollContainer,g=m.activeIndex,b=m.updateRef,y=t.useRef(null);t.useImperativeHandle(n,(function(){return{dom:y.current}}));var w=function(e,t){var n;return null!==(n=null==c?void 0:c(e,t))&&void 0!==n?n:t};return i.default.createElement("div",{className:E(v+"-index-bar-group",a),style:l,"data-index":r,ref:y},function(){var e;if(f)return f(r);var t=i.default.createElement("div",{className:E(v+"-index-bar-group-title",(e={},e[v+"-index-bar-group-active"]=g===r,e))},r),n=y.current;return h?i.default.createElement(zi,{getContainer:function(){return n},stickyStyle:"absolute",getScrollContainer:p,ref:function(e){return e&&b(r,e)}},t):t}(),function(){var e;return null!==(e=null!=u?u:null==o?void 0:o.map((function(e,t){return i.default.createElement("div",{className:v+"-index-bar-group-item",key:w(e,t),onClick:function(){return null==s?void 0:s(r,e,t)}},d?d(r,e,t):e.content)})))&&void 0!==e?e:null}())}));function qi(e){var n,r=e.indexes,o=e.prefixCls,a=e.onTouching,l=e.onClick,u=e.activeIndex,c=e.tipType,s=e.renderSideBar,d=e.renderSideBarItem,f=void 0===d?function(e){return e}:d,v=e.renderTip,m=t.useState(!1),h=m[0],p=m[1],g=function(e){p(e),a(e)},b=function(){return g(!1)},y=function(e,t){return v?v(e):i.default.createElement("div",{className:o+"-index-bar-sidebar-"+t},e)},w=i.default.createElement("div",{className:E(o+"-index-bar-sidebar",(n={},n[o+"-index-bar-sidebar-touching"]=h,n)),onTouchStart:function(){return g(!0)},onTouchEnd:function(){return b()},onTouchCancel:function(){return b()},onTouchMove:function(e){var t,n;if(h&&(null===(t=e.touches)||void 0===t?void 0:t.length)){var r=e.touches[0],o=r.clientX,i=r.clientY,a=document.elementFromPoint(o,i);a&&(null===(n=a.dataset)||void 0===n?void 0:n.index)&&l(a.dataset.index)}}},"toast"===c&&h&&u&&y(u,"toast"),r.map((function(e){var t;return i.default.createElement("div",{className:E(o+"-index-bar-sidebar-item",(t={},t[o+"-index-bar-sidebar-active"]=u===e,t)),key:e,onTouchStart:function(){return l(e)},"data-index":e},"sweat"===c&&h&&u===e&&y(e,"sweat"),i.default.createElement("div",{className:o+"-index-bar-sidebar-item-wrapper"},f(e)))})));return s?s(w):w}function Wi(e,t){var n=typeof t;return typeof e===n?e:"number"===n?Number(e):e.toString()}function Xi(e){return"number"==typeof e||"string"==typeof e}var Yi=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.children,u=e.sticky,c=void 0===u||u,s=e.groups,d=void 0===s?[]:s,f=e.tipType,v=void 0===f?"toast":f,m=e.defaultIndex,h=e.scrollBezier,p=e.scrollDuration,g=void 0===p?0:p,b=e.disableSidebar,y=void 0!==b&&b,w=e.onChange,C=e.onGroupItemClick,x=e.renderSideBar,T=e.renderSideBarItem,N=e.renderTip,k=e.renderStickyItem,S=e.renderGroupItem,R=t.useRef(null),M=t.useRef(null),L=function(e){var n=[];return t.Children.forEach(e,(function(e){t.isValidElement(e)&&e.type===ji?n.push(e):console.warn("<IndexBar /> only accept <IndexBar.Group /> as the children")})),n}(l),O=t.useMemo((function(){return d.length?d.map((function(e){return e.index})):L.map((function(e){return e.props.index}))}),[l,d]),_=t.useRef({}),B=t.useState((function(){return null!=m?m:null==O?void 0:O[0]})),D=B[0],A=B[1],P=t.useMemo((function(){return{sticky:c,getScrollContainer:function(){return M.current},activeIndex:D,updateRef:function(e,t){_.current[e]=t}}}),[c,D]),H=t.useRef(!1),V=function(e,t){A((function(n){var r=Wi(e,n);return r!==n&&(null==w||w(r,t)),r}))},F=function(e){var t=e.index,n=e.type,r=e.rightNow,o=void 0!==r&&r,i=null!=t?t:null==O?void 0:O[0],a=M.current;if(Xi(t)&&a){var l=function(e,t){for(var n=null,r=e.children,o=0;o<r.length;o++){var i=r[o],a=null==i?void 0:i.dataset;if(a&&a.index&&Wi(a.index,t)===t){n=i;break}}return n}(a,i);if(l){V(i,n);var u=o?0:g,c=l.offsetTop;"manual"===n&&(H.current=!0,setTimeout((function(){H.current=!1}),u)),u>0?I(a.scrollTop,c,(function(e){return a.scrollTop=e}),u,h):a.scrollTop=c}}};t.useImperativeHandle(n,(function(){return{dom:R.current,scrollToIndex:function(e,t){Xi(e)&&F({index:e,rightNow:t,type:"manual"})},recalculatePosition:function(e){var t=null!=e?e:D;if(t){var n=_.current[t];n&&n.recalculatePosition&&n.recalculatePosition()}}}}));return t.useEffect((function(){var e,t=jo((function(){if(M.current&&!H.current)for(var e=M.current.scrollTop,t=0;t<M.current.children.length;t++){var n=M.current.children[t];if(n&&n.dataset&&void 0!==n.dataset.index&&n.offsetTop+n.clientHeight>=e){V(n.dataset.index,"swipe");break}}}),100);return D&&F({index:D,rightNow:!0,type:"manual"}),null===(e=M.current)||void 0===e||e.addEventListener("scroll",t),function(){var e;null===(e=M.current)||void 0===e||e.removeEventListener("scroll",t)}}),[]),i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement(Fi.Provider,{value:P},i.default.createElement("div",{className:E(t+"-index-bar",o),style:a,ref:R},i.default.createElement("div",{className:t+"-index-bar-container",ref:M},L.length?L:null==d?void 0:d.map((function(e){return i.default.createElement(ji,{index:e.index,key:e.index,list:e.list,onGroupItemClick:C,renderGroupItem:S,renderStickyItem:k})}))),!y&&i.default.createElement(qi,{tipType:v,activeIndex:D,prefixCls:t,indexes:O,onTouching:function(e){return H.current=e},onClick:function(e){return F({index:e,type:"sidebar"})},renderSideBar:x,renderSideBarItem:T,renderTip:N})))}))})),Gi=G(Yi,{Group:ji}),Ui=[1,2,3,4,5,6,7,8,9,0],Ki=t.forwardRef((function(e,n){var r=e.normalKeyClass,o=e.normalKeyStyle,a=e.className,l=void 0===a?"":a,s=e.style,d=e.type,f=void 0===d?"number":d,v=e.randomOrder,m=void 0!==v&&v,h=e.title,p=e.rightColumns,g=e.confirmClosable,b=e.confirmButton,y=e.deleteButton,w=e.keyboardButton,C=e.close,x=e.onConfirm,T=e.onDelete,N=e.onChange,k=c(e,["normalKeyClass","normalKeyStyle","className","style","type","randomOrder","title","rightColumns","confirmClosable","confirmButton","deleteButton","keyboardButton","close","onConfirm","onDelete","onChange"]),S=t.useRef(null),R=t.useRef(null),M=t.useContext(Te),L=M.prefixCls,O=M.locale,_=void 0===O?J:O,I=L+"-keyboard",B=t.useMemo((function(){var e=m?Ui.sort((function(){return Math.random()-.5})):Ui,t=e.slice(-1)[0],n=e.slice(0,-1).reduce((function(e,t){return(!e[e.length-1]||e[e.length-1].length>=3)&&e.push([]),e[e.length-1].push(t),e}),[]);switch(f){case"confirm":n.push([t,"."]);break;case"tool":n.push([".",t,{type:"delete"}]);break;default:n.push([{type:"keyboard"},t,{type:"delete"}])}return n}),[f]),D=t.useMemo((function(){switch(f){case"number":default:return[];case"confirm":return[{type:"delete"}];case"tool":return["+","-","×","÷"]}}),[f]),A=t.useCallback((function(){return"confirm"!==f?null:i.default.createElement("div",{onClick:function(){g&&C(),null==x||x()},className:E(I+"-key",I+"-key-confirm")},b||_.Keyboard.confirm)}),[f]);t.useEffect((function(){var e=function(e){R.current&&(R.current.contains(e.target)||e.target===R.current||C())};return document.addEventListener("click",e),function(){document.removeEventListener("click",e)}}),[]),t.useImperativeHandle(n,(function(){return u({keyboard:R.current},S.current)}));var P=function(e,t,n){var a="string"==typeof e||"number"==typeof e?{type:"content",content:e,value:e}:e;return i.default.createElement("button",{onClick:function(){return function(e){switch(e.type){case"delete":null==T||T();break;case"keyboard":C();break;default:null==N||N(e.value)}}(a)},className:E(I+"-key",r,n),key:t,style:o},function(e){switch(e.type){case"delete":return y||i.default.createElement(li,null);case"keyboard":return w||i.default.createElement(ai,null);default:return e.content}}(a))};return i.default.createElement(_t,u({ref:S,maskClass:I+"-popup",close:C},k),i.default.createElement("div",{className:E(I,""+l),style:s,ref:R},h,i.default.createElement("div",{className:I+"-wrapper"},i.default.createElement("div",{className:I+"-key-wrapper"},B.map((function(e,t){return i.default.createElement("div",{className:I+"-row",key:t},e.map((function(e,n){var r;return P(e,String(n),((r={})[I+"-key-special"]="confirm"===f&&t===B.length-1&&0===n,r))})))}))),p||(D.length>0?i.default.createElement("div",{className:I+"-col"},D.map((function(e,t){return P(e,String(t))})),A()):null))))})),Zi=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.beforeReadyArea,u=e.loadingArea,c=e.noMoreArea,s=e.prepareArea,d=e.retryArea,f=e.defaultStatus,v=void 0===f?"prepare":f,m=e.status,h=e.getScrollContainer,p=e.trigger,g=void 0===p?"scroll":p,b=e.threshold,y=void 0===b?200:b,E=e.throttle,w=void 0===E?0:E,C=e.getDataAtFirst,x=void 0===C||C,T=e.getData,N=e.blockWhenLoading,k=void 0===N||N,S=e.onStatusChange,R=e.onClick,M=e.onEndReached,L=t.useRef(null),O="scroll"===g&&x,_=t.useState(v),I=_[0],B=_[1],D=t.useRef(!1),A=m||I,P=t.useRef(A),H=t.useCallback((function(e,t){B(e),S&&S(e,t)}),[S]),V=t.useCallback((function(e){k&&"loading"===P.current||(H("loading",e),null==T||T((function(e){H(e,"manual")})))}),[k,H,T]);t.useEffect((function(){k&&"loading"===A||(D.current=!1),P.current=A}),[A]),Oe((function(){"scroll"===g&&"prepare"===A&&q(0,y)&&V("pageEnd")}),[A]),t.useEffect((function(){O&&"prepare"===P.current&&V("requestAtFirst")}),[g]);var j=t.useCallback((function(){q(z("scrollTop",h),y+1)?D.current||(D.current=!0,M&&M(),["nomore","retry","before-ready"].includes(P.current)||V("scrollEnd")):D.current=!1}),[h,y,V,M]);function q(e,t){return z("scrollHeight",h)-e-z("clientHeight",h)<=t}function W(e){("click"===g&&"prepare"===P.current||"retry"===P.current)&&V("click"),R&&R(e)}return t.useEffect((function(){var e=null,t=w?jo(j,w):j;if("scroll"===g){var n=F(h);n&&(n.addEventListener("scroll",t),e=n)}return function(){e&&e.removeEventListener("scroll",t)}}),[g,h,j,w]),t.useImperativeHandle(n,(function(){return{dom:L.current,changeStatus:H}}),[H]),i.default.createElement(ke,null,(function(e){var t=e.prefixCls,n=e.locale,r=void 0===n?J:n;return i.default.createElement("div",{className:t+"-load-more status-"+A+" "+o,ref:L,style:a,onClick:W},function(e){switch(A){case"before-ready":return l;case"prepare":return void 0===s?i.default.createElement("div",{className:"load-more-text prepare"},"scroll"===g?e.LoadMore.prepareScrollText:e.LoadMore.prepareClickText,e.LoadMore.loadMoreText):s;case"loading":return void 0===u?i.default.createElement("div",{className:"load-more-text loading"},e.LoadMore.loadingText):u;case"nomore":return void 0===c?i.default.createElement("div",{className:"load-more-text nomore"},e.LoadMore.noDataText):c;case"retry":return void 0===d?i.default.createElement("div",{className:"load-more-text retry"},e.LoadMore.failLoadText):d;default:return null}}(r))}))}));function $i(e){var t=e.color,n=void 0===t?"currentColor":t;return i.default.createElement("div",{className:"c-svg-arrow nav-bar-back"},i.default.createElement("svg",{height:"100%",viewBox:"0 0 16 16"},i.default.createElement("path",{id:"path-1_1_",d:"M2.1,8l5.4,5.4c0.1,0.1,0.1,0.3,0,0.5L7,14.4c-0.1,0.1-0.3,0.1-0.5,0L0.7,8.5c-0.3-0.3-0.3-0.7,0-0.9\n l5.9-5.9c0.1-0.1,0.3-0.1,0.5,0l0.5,0.5c0.1,0.1,0.1,0.3,0,0.5L2.1,8z",fill:n})))}var Ji=t.forwardRef((function(e,n){var r=e.children,o=e.title,a=void 0===o?"":o,l=e.onClickLeft,c=e.leftContent,s=void 0===c?i.default.createElement($i,null):c,d=e.onClickRight,f=e.rightContent,v=e.onShowChange,m=e.style,h=e.className,p=void 0===h?"":h,g=e.wrapClass,b=e.placeholder,y=void 0===b||b,w=e.fixed,C=void 0===w||w,x=e.hasBottomLine,T=void 0===x||x,N=e.statusBarHeight,k=void 0===N?0:N,S=e.extra,R=e.getScrollContainer,M=e.showOffset,L=void 0===M?0:M,O=e.onScrollChange,_=e.getComputedStyleByScroll,I=e.ariaLabel,B=void 0===I?"":I,D=e.ariaRole,A=void 0===D?"banner":D,P=t.useRef(null),H=t.useState(L>0),V=H[0],j=H[1],q=V?"transparent":"",W=t.useState({}),X=W[0],Y=W[1],G=Ie();t.useImperativeHandle(n,(function(){return{navBar:P.current,dom:P.current}})),t.useEffect((function(){null==v||v(!V)}),[V]);var U=function(){!function(e){if(j(e<L),null==O||O(e),_){var t=_(e);Y(t)}}(z("scrollTop",R)||0)};function K(e){l&&l(e)}function Z(e){d&&d(e)}return t.useEffect((function(){var e=L||_||O,t=F(R);return U(),e&&t&&t.addEventListener("scroll",U,!1),function(){e&&t&&t.removeEventListener("scroll",U,!1)}}),[L,_,O,R]),i.default.createElement(ke,null,(function(e){var t,n,o=e.prefixCls;return i.default.createElement("div",{ref:P,className:E(g,o+"-nav-bar",(t={},t[o+"-nav-bar-fixed"]=C,t[o+"-nav-bar-float"]=!y,t[o+"-nav-bar-hide"]=V,t)),style:u(u({paddingTop:C&&k?k+"px":"0px"},m||{}),q?{background:q}:{}),"aria-label":B,role:A},i.default.createElement("div",{className:E(p,G,o+"-nav-bar-wrapper",(n={},n[o+"-nav-bar-wrapper-fixed"]=C,n[o+"-nav-bar-wrapper-border"]=T,n)),style:u({paddingTop:k?k+"px":"0px"},X)},i.default.createElement("div",{className:o+"-nav-bar-inner all-border-box"},s?i.default.createElement("div",{className:o+"-nav-bar-left",onClick:K},s):null,r||i.default.createElement("div",{className:o+"-nav-bar-title"},i.default.createElement("div",{className:o+"-nav-bar-title-text"},a)),f?i.default.createElement("div",{className:o+"-nav-bar-right",onClick:Z},f):null),S))}))})),Qi=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.children,u=e.leftContent,c=e.rightContent,s=e.marquee,d=void 0===s?"overflow":s,f=e.closeable,v=void 0===f||f,m=e.closeIcon,h=void 0===m?i.default.createElement(Qo,null):m,p=e.wrapable,g=void 0===p||p,b=e.speed,y=void 0===b?50:b,w=e.delay,C=void 0===w?1e3:w,x=e.autoSetGradientStyle,T=void 0===x||x,N=e.onClick,k=e.onClose,S=t.useContext(Te).useRtl,R=t.useRef(null),M=t.useRef(null),L=t.useRef(null),O=t.useRef(null),_=t.useState(!1),I=_[0],B=_[1],D=t.useMemo((function(){var e=[];return"none"===d&&g||e.push("no-wrap"),"none"===d&&e.push(g?"wrapable":"ellipsis"),e}),[d,g]),A=t.useMemo((function(){if(!T)return{};var e,t=(null==a?void 0:a.backgroundColor)||(null==a?void 0:a.background),n=(e=String(t)||"")?U[e]?U[e]+"00":/^#[A-Fa-f0-9]{6}$/.test(e)?e+"00":/^rgb\(.*?\)$/.test(e)?e.replace(/rgb\((.*?)\)/,"rgba($1, 0)"):"":"";return n?{background:"linear-gradient(to right, "+t+", "+n+")"}:{}}),[a]);function P(){R.current&&H(R.current)}function V(e){e.stopPropagation(),null==k||k(e),P()}function F(){we((function(){setTimeout((function(){!function(){if(!M.current||!L.current)return;var e=L.current,t="always"===d,n=M.current.offsetWidth,r=L.current.offsetWidth;"overflow"===d&&n<r&&(t=!0);if(B(t),function(){O.current&&(clearTimeout(O.current),O.current=null)}(),t){var o=r/y;e.style.animationDuration=o+"s",O.current=window.setTimeout((function(){B(!1),e.style.animationDuration=n/y+o+"s",e.style.animationIterationCount="infinite";var t=S?"paddingRight":"paddingLeft";e.style[t]=n+"px",we((function(){B(!0)}))}),1e3*o)}}()}),I?0:C)}))}return t.useImperativeHandle(n,(function(){return{dom:R.current,close:P,updateData:F}}),[F]),t.useEffect((function(){F()}),[S]),i.default.createElement(ke,null,(function(e){var t,n=e.prefixCls;return t=n+"-notice-bar",i.default.createElement("div",{className:E(t,o,D),style:a,ref:R,onClick:N},u?i.default.createElement("div",{className:t+"-left-part"},u):null,i.default.createElement("div",{className:t+"-content",ref:M},I?i.default.createElement("i",{className:t+"-gradient left",style:A}):null,i.default.createElement("div",{className:E(t+"-content-inner",{animate:I}),ref:L},l),I?i.default.createElement("i",{className:t+"-gradient right",style:A}):null),c?i.default.createElement("div",{className:t+"-right-part"},c):null,v?i.default.createElement("div",{className:t+"-close",onClick:V},h):null)}))}));function ea(e,t){return function(n,r){var o="string"==typeof n?{content:n,type:"info"}:n;void 0!==t&&(o.type=t);var i=document.createElement("div"),a=o.getContainer;a?a().appendChild(i):document.body.appendChild(i);var l=new Nt(e,i,r),c=l.render,s=l.unmount;var d=u(u({},o),{close:v,onClose:function(){var e=o.onClose;e&&e(),s(),i.parentNode&&i.parentNode.removeChild(i)},getContainer:function(){return i},visible:!1}),f=!1;function v(){f=!0,d.visible=!1,c(d)}return c(d),we((function(){f||(d.visible=!0,c(d))})),{update:function(e){d=u(u({},d),e),c(d)},close:v}}}var ta=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,l=e.style,c=e.visible,s=void 0!==c&&c,d=e.transitionDuration,f=void 0===d?300:d,v=e.content,m=e.duration,h=void 0===m?3e3:m,p=e.onClose,g=e.type,b=void 0===g?"info":g,y=e.close,E=e.getContainer,w=t.useRef(null),C=t.useRef(null),x=t.useRef(),T=t.useRef(),N=t.useState(!s),k=N[0],S=N[1],R=t.useState(0),M=R[0],L=R[1];function O(){if(C.current){var e=C.current.getBoundingClientRect().height;L(e)}}t.useImperativeHandle(n,(function(){return{dom:w.current,updateLayout:O}})),t.useEffect((function(){return s&&O(),s&&h&&(clearTimeout(x.current),x.current=window.setTimeout((function(){null==y||y()}),h)),function(){s&&clearTimeout(x.current)}}),[s,h]),Oe((function(){s||(T.current=window.setTimeout((function(){p&&p()}),f))}),[s]),t.useEffect((function(){return we((function(){S(!0)})),function(){clearTimeout(T.current)}}),[]);var _=function(e){return i.default.createElement("div",{className:e+"-notify "+e+"-notify-"+b+" "+o,style:u(u(u({},l),k?Je({transitionDuration:f+"ms"}):{}),{height:s?M:0}),ref:w},(t=e+"-notify",v?i.default.createElement("div",{className:t+"-content "+(s?t+"-content-transition-Y0":t+"-content-transition-Y100"),ref:C,style:u({},k?Je({transitionDuration:f+"ms"}):{})},v):null));var t};return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return E?a.default.createPortal(_(t),E()):_(t)}))}));var na=G(ta,function(e){return{info:ea(e),success:ea(e,"success"),error:ea(e,"error"),warn:ea(e,"warn")}}(Se(ta)));function ra(){return i.default.createElement("svg",{width:"8",height:"14",viewBox:"0 0 8 14",fill:"none"},i.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.40514 12.7583C7.6004 12.563 7.6004 12.2465 7.40514 12.0512L2.40095 7.04701L7.36396 2.084C7.55922 1.88874 7.55922 1.57216 7.36396 1.37689L7.01041 1.02334C6.81515 0.828077 6.49856 0.828077 6.3033 1.02334L0.646447 6.68019C0.470402 6.85624 0.453075 7.1309 0.594469 7.32636C0.617837 7.37275 0.64889 7.41626 0.687628 7.455L6.34448 13.1119C6.53974 13.3071 6.85633 13.3071 7.05159 13.1119L7.40514 12.7583Z",fill:"currentColor"}))}var oa=t.forwardRef((function(e,n){var r,o=t.useContext(Te),a=o.prefixCls,l=o.locale,u=e.className,c=void 0===u?"":u,s=e.style,d=e.current,f=void 0===d?1:d,v=e.pageSize,m=void 0===v?10:v,h=e.total,p=void 0===h?5:h,g=e.icon,b=void 0!==g&&g,y=e.justify,w=void 0===y?"side":y,C=e.hideOnOnePage,x=void 0!==C&&C,T=e.nextFieldType,N=void 0===T?"default":T,k=e.renderPrevField,S=e.renderNextField,R=e.type,M=void 0===R?"default":R,L=e.prevFieldText,O=void 0===L?null==l?void 0:l.Pagination.previousPage:L,_=e.nextFieldText,I=void 0===_?null==l?void 0:l.Pagination.nextPage:_,B=e.onChange,D=Ie(),A=t.useMemo((function(){return Math.ceil(p/m)}),[p,m]),P=t.useRef(null);t.useImperativeHandle(n,(function(){return{dom:P.current}}));var H=function(e){return"prev"===e?Array.isArray(b)&&Boolean(b.length)?i.default.createElement("span",{className:"btn-icon"},b[0]):"[object Object]"===Object.prototype.toString.call(b)?i.default.createElement("span",{className:"btn-icon"},b):b?i.default.createElement("span",{className:"btn-icon"},i.default.createElement(ra,null)):null:Array.isArray(b)&&Boolean(b.length)?i.default.createElement("span",{className:"btn-icon"},b.length>=2?b[1]:b[0]):"[object Object]"===Object.prototype.toString.call(b)?i.default.createElement("span",{className:"btn-icon next"},b):b?i.default.createElement("span",{className:"btn-icon next"},i.default.createElement(ra,null)):null},V=a+"-pagination";return x&&1===A?i.default.createElement("div",{className:E(V,c)}):i.default.createElement("div",{ref:P,className:E(V,D,(r={},r[V+"-simple"]="none"===M,r),c),style:s},function(e){var t;if("none"===M)return null;var n=E(e+"-prev-field",((t={})["flex-"+w]=!0,t));return void 0===k?i.default.createElement("div",{className:n},i.default.createElement("div",{className:E(e+"-field","prev",{text:"text"===M,button:"text"!==M,disabled:1===f}),onClick:function(){f<=1||null==B||B({pageSize:m,pageNum:A,current:Math.max(1,f-1)})}},H("prev"),Boolean(O)&&i.default.createElement("span",{className:"btn-text"},O))):i.default.createElement("div",{className:n},k?k({current:f,pageSize:m,pageNum:A}):null)}(V),i.default.createElement("div",{className:V+"-item"},i.default.createElement("span",{className:V+"-item-active"},f)," / ",A),function(e){var t,n;if("none"===M)return null;var r=E(e+"-next-field",((t={})["flex-"+w]=!0,t));if(void 0===S)return i.default.createElement("div",{className:r},i.default.createElement("div",{className:E(e+"-field","next",(n={text:"text"===M,button:"text"!==M},n["default"===N?M:"primary"]=f<A,n.disabled=f>=A,n)),onClick:function(){f>=A||null==B||B({pageSize:m,pageNum:A,current:Math.min(f+1,A)})}},Boolean(I)&&i.default.createElement("span",{className:"btn-text"},I),H("next")));var o=S&&S({current:f,pageSize:m,pageNum:A});return i.default.createElement("div",{className:r},o)}(V))}));var ia=t.forwardRef((function(e,n){var r=t.useContext(Te).prefixCls,o=e.className,a=e.needShadow,l=e.content,u=e.direction,c=e.position,s=e.minWidth,d=e.maxWidth,f=e.arrowWidth,v=e.transformOrigin,m=e.mode,h=e.showCloseIcon,p=void 0!==h&&h,g=e.textSuffix,b=void 0===g?null:g,y=e.renderArrow,w=e.onClickCloseIcon,C=e.onClickTextSuffix,x=t.useRef(null),T=t.useRef(null),N=Me(!1),k=N[0],S=N[1];t.useImperativeHandle(n,(function(){return{dom:x.current,content:T.current}})),t.useEffect((function(){var e=c.top,t=c.bottom,n=c.height,r=c.left,o=c.width;(r||o||e||n||t)&&(k||setTimeout((function(){S(!0)}),0))}),[c,k]);var R,M,L,O;return i.default.createElement("div",{ref:x,className:E(r+"-popover-inner","popover-inner","all-border-box",m+"-mode",o,{show:k,"with-shadow":a,"with-suffix":p||b,"custom-content":"string"!=typeof l}),style:(M=c.top,L=c.bottom,O={height:c.height+"px",left:c.left+"px",minWidth:s,maxWidth:d},M?O.top=M+"px":L&&(O.bottom=L+"px"),O.transformOrigin=v.x+" "+v.y,Je(O))},i.default.createElement("div",{className:"popover-bg"},y?y({arrowWidth:f,arrowLeft:c.arrowLeft,direction:u}):i.default.createElement("div",{className:"popover-arrow "+u,style:(R=c.arrowLeft,{width:f,height:f,marginLeft:R?R+"px":null,marginRight:R?R+"px":null})},i.default.createElement("div",{className:"popover-arrow-content"}))),i.default.createElement("div",{className:E("popover-content",u,{"show-close-icon":p}),ref:T},"string"==typeof l?i.default.createElement(i.default.Fragment,null,i.default.createElement("div",{className:"content-text"},l),p&&i.default.createElement(i.default.Fragment,null,i.default.createElement("div",{className:"icon-divider"}),i.default.createElement("div",{className:"text-close-icon",onClick:w},i.default.createElement(Qo,null))),b&&i.default.createElement("div",{className:"text-suffix",onClick:C},b)):l))})),aa={left:null,top:null,bottom:null,width:null,height:null,arrowLeft:0},la={top:14,right:14,bottom:14,left:14},ua=!0,ca=function(e,n,r,o){var i=e.direction,a=void 0===i?"topRight":i,l=e.verticalOffset,s=void 0===l?10:l,d=e.horizontalOffset,f=void 0===d?8:d,v=e.edgeOffset,m=void 0===v?14:v,p=e.arrowWidth,g=void 0===p?9:p,b=e.mode,y=void 0===b?"follow":b,E=e.useAutoDirection,w=void 0===E?ua:E,C=t.useState(aa),x=C[0],T=C[1],N=t.useMemo((function(){var e=x.top,t=x.bottom,n=x.height,r=x.left,o=x.width;return!(r||o||e||n||t)}),[x]),k=t.useState({x:"0",y:"0"}),S=k[0],R=k[1],M=Le(a),L=M[0],O=M[1],_=M[2],I=t.useCallback((function(e){return et(h(m)?m[e]:m,la[e])}),[m]),B=t.useCallback((function(e){return et(h(w)?w[e]:w,ua)}),[w]);function D(e){var t=e.childRect,n=e.config,r=u(u({},n),{adjustOffset:0});r.arrowLeft=function(e){var t=e.childRect,n=e.config;return-1!==L.indexOf("Left")||-1!==L.indexOf("Right")?(t.width-g)/2+f:(n.width-g)/2}({childRect:t,config:n});var i=screen.availWidth,a=[I("top"),I("right"),I("bottom"),I("left")],l=a[0],c=a[1],d=a[2],v=a[3],m=[B("vertical"),B("horizontal")],h=m[0];if(m[1])if(-1!==L.indexOf("Right")){if((C=Number(n.width)-t.left-t.width)>0){var p=C+v;r.left=Number(r.left)+p,r.arrowLeft+=p,r.adjustOffset=p}if(i-t.right<c){p=-((C=c)-(i-t.right));r.left=Number(r.left)+p,r.adjustOffset=p}}else if(-1!==L.indexOf("Center")){var b=(Number(n.width)-t.width)/2,E=b-(i-t.right),w=b-t.left;if(E>0){p=-(E+c);r.left=Number(r.left)+p,r.arrowLeft-=p,r.adjustOffset=p}if(w>0){p=w+v;r.left=Number(r.left)+p,r.arrowLeft-=p,r.adjustOffset=p}}else if(-1!==L.indexOf("Left")){var C;if((C=Number(n.width)-t.width-(i-t.right))>0){p=-(C+c);r.left=Number(r.left)+p,r.arrowLeft-=p,r.adjustOffset=p}t.left<v&&(C=v,r.left=Number(r.left)+C,r.adjustOffset=v)}if(h){var x=t.bottom-(r.bottom&&r.height?r.bottom+r.height:0),T=t.top+(r.top&&r.height?r.top+r.height:0);-1!==L.indexOf("top")&&x<l?(r.top=s+t.height,r.bottom=null,W("bottom")):-1!==L.indexOf("bottom")&&T+d>window.innerHeight&&(r.top=null,r.bottom=s+t.height,W("top"))}if("global"===y){var N=o.current;if(!N)return r;var k=N.getBoundingClientRect(),S=k.top,R=k.left,M=k.bottom;if(null!==r.left&&(r.left+=R),null!==r.top&&(r.top+=S),null!==r.bottom){var O=window.innerHeight||document.documentElement.clientHeight;r.bottom=O-(M-r.bottom)}}return r}function A(e,t){var n=D({childRect:e,config:t}),r=n.adjustOffset,o=c(n,["adjustOffset"]),i=function(e,t){var n=e.arrowLeft,r=e.width||0,o=e.height||0,i=g/2,a=O.current.indexOf("top")>-1?i+o+"px":"-"+i+"px";return{x:O.current.indexOf("Left")>-1?n+i+"px":O.current.indexOf("Right")>-1?r-(n+i)+"px":r/2-t+"px",y:a}}(o,r);R(i),T(o)}t.useEffect((function(){_(a)}),[a]);var P=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;A(r,{left:-(t-r.width-f),width:t,top:null,height:n,bottom:s+r.height,arrowLeft:0})},H=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;A(r,{left:-(t-r.width)/2,width:t,top:null,height:n,bottom:s+r.height,arrowLeft:0})},V=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;A(r,{left:-f,width:t,top:null,height:n,bottom:s+r.height,arrowLeft:0})},F=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;A(r,{left:-(t-r.width-f),width:t,bottom:null,height:n,top:s+r.height,arrowLeft:0})},z=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;A(r,{left:-(t-r.width)/2,width:t,bottom:null,height:n,top:s+r.height,arrowLeft:0})},j=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;A(r,{left:-f,width:t,bottom:null,height:n,arrowLeft:0,top:s+r.height})},q=t.useCallback((function(){var e,t=null===(e=n.current)||void 0===e?void 0:e.content;if(t){var o=t.offsetWidth,i=t.offsetHeight;if(0!==o&&0!==i){var a=r.current;if(a){var l={popoverWidth:o,popoverHeight:i,childRect:a.getBoundingClientRect()};switch(L){case"topRight":P(l);break;case"topCenter":H(l);break;case"topLeft":V(l);break;case"bottomRight":F(l);break;case"bottomCenter":z(l);break;case"bottomLeft":j(l)}}}}}),[r,L,n,P,H,V,F,z,j]),W=function(e){if(-1===L.indexOf(e)){var t=L.replace(/top|bottom/,e);_(t),O.current=t}},X=t.useCallback((function(){var e=n.current;if(e){var t=e.content;if(t){var r=t.getBoundingClientRect(),o=r.top,i=r.bottom;(-1!==L.indexOf("top")&&o<I("top")||-1!==L.indexOf("bottom")&&i+I("bottom")>window.innerHeight)&&q()}}}),[L,n,q,I]);return{direction:L,position:x,isCalcPosition:N,arrowWidth:g,transformOrigin:S,computedChildAndPopoverOffset:q,resetPosition:function(){T(aa),_(a)},onAdjustDirection:W,adjustVerticalDirection:X}},sa=0,da=function(e,n,r,o,i,a){var l=e.clickOtherToClose,u=void 0===l||l,c=e.touchOtherToClose,s=void 0===c?void 0!==e.touchToClose&&e.touchToClose:c,d=e.duration,f=void 0===d?0:d,v=e.useAutoDirection,m=void 0===v||v,p=e.verticalScrollThrottle,g=void 0===p?100:p,b=e.preventBodyClick,y=void 0!==b&&b,E=e.getVerticalScrollContainer,w=void 0===E?function(){return document}:E,C=t.useRef(0),x=et(h(m)?m.vertical:m,ua),T=function(){i(!1),window.clearTimeout(C.current),C.current=0,k()},N=t.useMemo((function(){return jo(a,g)}),[a,g]);t.useEffect((function(){var e=w();return o.current&&e&&x&&e.addEventListener("scroll",N),function(){e&&e.removeEventListener("scroll",N)}}),[N,w,x,o]);var k=t.useCallback((function(){document.body.removeEventListener("click",S,!0),document.body.removeEventListener("touchstart",R);var e=w();e&&(e.removeEventListener("scroll",N),e.removeEventListener("scroll",M))}),[N]),S=t.useCallback((function(e){var t;O(n.current,e.target)||O((null===(t=r.current)||void 0===t?void 0:t.dom)||null,e.target)||(y&&(e.stopPropagation(),e.preventDefault()),T())}),[y]),R=t.useCallback((function(e){var t,i,a,l;(null===(t=e.targetTouches[0])||void 0===t?void 0:t.target)&&n.current&&(null===(i=r.current)||void 0===i?void 0:i.dom)&&o.current&&(O(n.current,null===(a=e.targetTouches[0])||void 0===a?void 0:a.target)||O(r.current.dom,null===(l=e.targetTouches[0])||void 0===l?void 0:l.target)||(y&&function(){clearTimeout(sa);var e=function e(t){t.stopPropagation(),t.preventDefault(),document.body.removeEventListener("click",e,!0),clearTimeout(sa)};document.body.addEventListener("click",e,!0),sa=window.setTimeout((function(){document.body.removeEventListener("click",e,!0)}),500)}(),T()))}),[y]),M=t.useCallback((function(){o.current&&s&&T()}),[s]);t.useEffect((function(){var e=w();return e&&s&&o.current&&e.addEventListener("scroll",M),function(){e&&e.removeEventListener("scroll",M)}}),[M,s]);return{popoverDisappear:T,mayRemoveEventListenerOnBody:k,startCloseTimer:function(){0!==f&&(C.current=window.setTimeout((function(){i(!1),k()}),f))},mayAddEventOnBody:function(){if(s){document.body.addEventListener("touchstart",R);var e=w();e&&e.addEventListener("scroll",M)}else u&&document.body.addEventListener("click",S,!0)}}},fa=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.innerPopoverClassName,l=void 0===a?"":a,u=e.style,c=void 0===u?{}:u,s=e.theme,d=void 0===s?"black":s,f=e.needShadow,v=void 0!==f&&f,m=e.content,h=void 0===m?"":m,p=e.transitionTimeout,g=void 0===p?300:p,b=e.minWidth,y=void 0===b?"10px":b,w=e.maxWidth,C=void 0===w?"90vw":w,x=e.transitionName,T=void 0===x?"fade":x,N=e.clickSelfToClose,k=void 0===N||N,S=e.touchSelfToClose,R=void 0===S?void 0!==e.touchToClose&&e.touchToClose:S,M=e.defaultVisible,L=void 0!==M&&M,O=e.visible,_=e.children,I=e.bordered,B=void 0===I?"white"===e.theme:I,D=e.showCloseIcon,A=void 0!==D&&D,P=e.textSuffix,H=void 0===P?null:P,V=e.mode,F=void 0===V?"follow":V,z=e.showMask,j=void 0!==z&&z,q=e.maskTransitionTimeout,W=void 0===q?{enter:450,exit:240}:q,X=e.renderArrow,Y=e.onChange,G=e.onClickCloseIcon,U=e.onClickTextSuffix,K=e.onClickMask,Z=t.useContext(Te).prefixCls,$=t.useState(!1),J=$[0],Q=$[1],ee=t.useRef(J),te=t.useRef(null),ne=t.useRef(null),re=t.useRef(null),oe=ca(e,re,ne,te),ie=oe.direction,ae=oe.position,le=oe.isCalcPosition,ue=oe.transformOrigin,ce=oe.computedChildAndPopoverOffset,se=oe.arrowWidth,de=oe.resetPosition,fe=oe.adjustVerticalDirection,ve=function(e){void 0===e&&(e=!0),e&&!le||(null==Y||Y(e),void 0===O&&Q(e))},me=da(e,te,re,ee,ve,fe),he=me.popoverDisappear,pe=me.mayAddEventOnBody,ge=me.startCloseTimer,be=me.mayRemoveEventListenerOnBody;function ye(){J&&ce()}t.useImperativeHandle(n,(function(){var e;return{dom:te.current,child:ne.current,innerPopover:re.current,innerPopoverDom:(null===(e=re.current)||void 0===e?void 0:e.dom)||null,updatePosition:ye}})),t.useEffect((function(){return(L||O)&&Q(!0),function(){be()}}),[]),t.useEffect((function(){void 0!==O&&Q(Boolean(O))}),[O]),t.useEffect((function(){ee.current&&ce()}),[_,h,ie,F]),t.useEffect((function(){J&&function(){if(ge(),setTimeout(pe,0),!le)return;setTimeout((function(){ce()}),0)}(),ee.current=J,J||(be(),setTimeout((function(){!ee.current&&de()}),("object"==typeof g?g.exit:g)||300))}),[J]);var Ee=function(){return i.default.createElement(ia,{className:E(d+"-theme",l,{bordered:B}),ref:re,direction:ie,minWidth:y,maxWidth:C,position:ae,arrowWidth:se,transformOrigin:ue,needShadow:v,content:h,mode:F,showCloseIcon:A,textSuffix:H,renderArrow:X,onClickCloseIcon:G,onClickTextSuffix:U})};return i.default.createElement(i.default.Fragment,null,j&&i.default.createElement(it,null,i.default.createElement(Tt,{in:J&&!le,timeout:W,type:"fade",mountOnEnter:!0,unmountOnExit:!0},i.default.createElement("div",{className:Z+"-popover-mask",onClick:K}))),i.default.createElement("div",{className:E(Z+"-popover",o,d+"-theme",F+"-mode",{bordered:B,"custom-content":"string"!=typeof h}),style:c,ref:te,onClick:function(){var e=ee.current;e?e&&k&&!R&&he():ve(!0)},onTouchStart:function(){R&&ee.current&&he()}},i.default.createElement(it,{getContainer:function(){return"global"===F?document.body:te.current}},J&&le&&Ee(),i.default.createElement(Tt,{in:J&&!le,timeout:g,type:T,mountOnEnter:!0,unmountOnExit:!0},Ee())),i.default.createElement("div",{ref:ne,className:"popover-child-inner"},_)))})),va=function(e){return t.forwardRef((function(n,r){var o=n.menu,a=n.menuLayout,l=void 0===a?"vertical":a,s=n.onSelect,d=n.onClickMenuItem,f=n.className,v=void 0===f?"":f,m=n.useClickStatus,h=void 0!==m&&m,p=n.clickStatusDuration,g=void 0===p?300:p,b=n.clickSelfToClose,y=void 0===b||b,w=n.touchSelfToClose,C=void 0===w?void 0!==n.touchToClose&&n.touchToClose:w,x=n.defaultVisible,T=void 0!==x&&x,N=n.visible,k=n.onChange,S=c(n,["menu","menuLayout","onSelect","onClickMenuItem","className","useClickStatus","clickStatusDuration","clickSelfToClose","touchSelfToClose","defaultVisible","visible","onChange"]),R=t.useContext(Te).prefixCls,M=t.useState(-1),L=M[0],O=M[1],_=t.useRef(0),I=t.useMemo((function(){return o.map((function(e){return"string"==typeof e?{text:e}:e}))}),[o]),B=t.useState(void 0===N?T:N),D=B[0],A=B[1];t.useEffect((function(){A(Boolean(N))}),[N]);var P=t.useRef(null);t.useImperativeHandle(r,(function(){return P.current}));var H=t.useMemo((function(){return i.default.createElement("div",{className:E(R+"-popover-menu-content",l+"-menu")},I.map((function(e,t){var n="string"==typeof e.text?e.text:"menu_item_"+t,r=e.text,a=e.value,l=void 0===a?n:a,u=e.disabled,c=void 0!==u&&u,f=e.icon;return i.default.createElement("div",{className:E(R+"-popover-menu-item",{disabled:c,active:L===t}),key:l,onTouchStart:function(){h&&!c&&(clearTimeout(_.current),O(t),_.current=window.setTimeout((function(){O(-1),_.current=0}),g))},onClick:function(){d&&d(l,o[t]),c||s&&s(l,o[t])}},f&&i.default.createElement("div",{className:E(R+"-popover-menu-icon")},f),i.default.createElement("div",{className:E(R+"-popover-menu-text")},r))})))}),[R,l,I,L,h,g,d,s]);return i.default.createElement(e,u({ref:P,visible:D,clickSelfToClose:y,touchSelfToClose:C,onChange:function(e){var t=function(){k&&"function"==typeof k&&k(e),void 0===N&&A(e)};!e&&h?window.setTimeout(t,Math.max(0,g-300)):t()}},S,{content:H,className:E(v,R+"-popover-menu")}))}))}(fa),ma=G(fa,{Menu:va});var ha=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.visible,l=e.children,s=e.maskStyle,d=e.contentStyle,f=e.direction,v=void 0===f?"bottom":f,m=e.percentToClose,h=void 0===m?.3:m,p=e.distanceToClose,g=void 0===p?10:p,b=e.speedToClose,y=void 0===b?200:b,w=e.allowSwipeDirections,C=e.exitDirection,x=e.onTouchMove,T=e.onTouchStart,N=e.onTouchEnd,k=e.onOpen,S=e.onClose,R=e.close,M=c(e,["className","visible","children","maskStyle","contentStyle","direction","percentToClose","distanceToClose","speedToClose","allowSwipeDirections","exitDirection","onTouchMove","onTouchStart","onTouchEnd","onOpen","onClose","close"]),L=t.useState(a),O=L[0],_=L[1],I=Le({direction:"X",value:0}),B=I[0],D=I[1],A=I[2],P=t.useState(!1),H=P[0],V=P[1],F=t.useRef(null),z=t.useRef(0),j=t.useRef(0),q=t.useRef(0),W=t.useRef(!1),X=t.useCallback((function(e){var t,n=null===(t=F.current)||void 0===t?void 0:t.content,r=(null==n?void 0:n.offsetWidth)||0,o=(null==n?void 0:n.offsetHeight)||0;return"X"===e?r:o}),[]),Y=t.useCallback((function(e){var t=e.direction,n=e.value,r=X(t);return r?Math.max(0,Math.min(1,Math.abs(n)/r)):0}),[]),G=t.useMemo((function(){return Y(B)}),[B]),U=t.useMemo((function(){return void 0!==w?w:[v]}),[w,v]),K=t.useCallback((function(e){var t,n,r,o;T&&T(e)||(V(!1),W.current=!0,z.current=(null===(n=null===(t=e.touches)||void 0===t?void 0:t[0])||void 0===n?void 0:n.clientX)||0,j.current=(null===(o=null===(r=e.touches)||void 0===r?void 0:r[0])||void 0===o?void 0:o.clientY)||0,q.current=(new Date).getTime())}),[T]),Z=t.useCallback((function(e,t,n){return"X"===e?t>0?"right":"left":n>0?"bottom":"top"}),[]),$=t.useCallback((function(e,t,n){var r,o,i,a,l;if((!x||!x(e,t,n))&&(t||(W.current=!1),W.current&&e.target!==(null===(r=F.current)||void 0===r?void 0:r.mask))){var u=(null===(i=null===(o=e.changedTouches)||void 0===o?void 0:o[0])||void 0===i?void 0:i.clientX)||0,c=(null===(l=null===(a=e.changedTouches)||void 0===a?void 0:a[0])||void 0===l?void 0:l.clientY)||0,s=u<0?0:u-z.current,d=c-j.current,f=Z("x"===n?"X":"Y",s,d),v=U.includes(f)?f:"",m=C||v,h=["top","bottom"].includes(m)?"Y":"X",p=["bottom","right"].includes(m)?1:-1;switch(v){case"top":case"bottom":A({direction:h,value:Math.abs(d)*p});break;case"left":case"right":A({direction:h,value:Math.abs(s)*p})}}}),[x,U,C]),J=t.useCallback((function(e,t){var n=Z(e,t,t);return("left"===n||"top"===n?-1:1)*X(e)}),[]),Q=t.useCallback((function(e){if((!N||!N(e))&&W.current){W.current=!1;var t=(new Date).getTime(),n=D.current,r=n.direction,o=n.value,i=Y(D.current),a=o/(t-q.current)*1e3;i>0&&i>=h&&Math.abs(o)>g||Math.abs(a)>y?(V(!1),R(e),we((function(){A({direction:r,value:J(r,o)})}))):(V(!0),A({direction:"X",value:0})),q.current=0}}),[N,h,g,y,R]);return t.useImperativeHandle(n,(function(){return F.current})),t.useEffect((function(){var e,t=null===(e=F.current)||void 0===e?void 0:e.content;return O&&t&&(t.addEventListener("touchstart",K),t.addEventListener("touchend",Q),t.addEventListener("touchcancel",Q)),function(){var e,t=null===(e=F.current)||void 0===e?void 0:e.content;O&&t&&(t.removeEventListener("touchstart",K),t.removeEventListener("touchend",Q),t.removeEventListener("touchcancel",Q))}}),[O,K,Q]),i.default.createElement(ke,null,(function(e){var t,n=e.prefixCls;return i.default.createElement(_t,u({ref:F,visible:a,close:R,className:E(n+"-popup-swiper",o,{"has-trans":H}),direction:v,onTouchMove:$,onOpen:function(){_(!0),null==k||k()},onClose:function(e){_(!1),A({direction:"X",value:0}),null==S||S(e)},maskStyle:u(u({},s||{}),{opacity:G?1-G:void 0}),contentStyle:(t=Je({transform:B.value?"translate"+B.direction+"("+B.value+"px) translateZ(2px)":void 0}),u(u({},d||{}),t))},M),l)}))}));var pa,ga=G(ha,function(e){return{open:(t=e,St(t,"ARCO_POPUP_SWIPER"))};var t}(Se(ha))),ba=t.forwardRef((function(e,n){var r=e.mode,o=void 0===r?"base":r,a=Math.min(100,Math.max(e.percentage,0)),l=e.top,c=e.percentPosition,s=void 0===c?"right":c,d=e.className,f=void 0===d?"":d,v=e.style,m=e.showPercent,h=void 0===m?"base"===o:m,p=e.renderPercent,g=e.trackColor,b=e.progressColor,y=e.disabled,w=void 0!==y&&y,C=e.trackStroke,x=e.progressStroke,T=e.duration,N=void 0===T?300:T,k=e.step,S=void 0===k?1:k,R=e.filleted,M=void 0===R||R,L=e.mountedTransition,O=void 0===L||L,_=e.mountedBezier,I=void 0===_?[.34,.69,.1,1]:_,B=t.useRef(null),D=ze(O,a,N,I,S),A=D[0],P=D[1];function H(e){return h?"follow"===e?void 0!==p?p(A):i.default.createElement("div",{className:E("text-follow",{"inner-disabled inner-block-disabled":w}),style:{background:b}},A,"%"):e===s?i.default.createElement("div",{style:{color:b},className:E("text","text-"+s,{"text-disabled":w&&("left"===s||"right"===s)})},void 0!==p?p(A):A+"%"):null:null}function V(e){var t=e.prefixCls;return i.default.createElement("div",{role:"progressbar","aria-valuenow":a,"aria-valuemax":100,"aria-valuemin":0,className:E(t+"-progress",{"progress-fixed":"nav"===o},{"progress-disabled":w},f),style:u({top:l},v),ref:B},i.default.createElement("div",{className:"progress-wrapper"},H("left"),i.default.createElement("div",{style:{background:g,height:C},className:E("progress-track","position-"+s,{filleted:M},{"nav-mode":"nav"===o})},i.default.createElement("div",{style:Je({background:b,width:A+"%",height:x,transition:P?"width linear "+N/1e3+"s":""}),className:E("progress-bar",{"bar-disabled":w,filleted:M})},"follow"===s?i.default.createElement("div",{className:"wrapper"},H("follow")):null)),H("right"),H("innerLeft")))}return t.useImperativeHandle(n,(function(){return{dom:B.current}})),i.default.createElement(ke,null,V)}));!function(e){e[e.Static=0]="Static",e[e.Pulling=1]="Pulling",e[e.Loosing=2]="Loosing",e[e.Loading=3]="Loading",e[e.Finish=4]="Finish"}(pa||(pa={}));var ya=function(e){var n=e.onRefresh,r=e.loosingMinHeight,o=t.useState(pa.Static),i=o[0],a=o[1],l=t.useRef(!1),u=t.useRef(null),c=t.useRef(null),s=t.useState(!1),d=s[0],f=s[1],v=t.useMemo((function(){var e,t;return null!==(t=null===(e=u.current)||void 0===e?void 0:e.getBoundingClientRect().height)&&void 0!==t?t:40}),[i]),m=t.useMemo((function(){return r||v}),[v,r]),h=t.useCallback((function(){return l.current=!0,Zo.Promise.all([null==n?void 0:n(),new Zo.Promise((function(e){setTimeout((function(){e()}),500)}))])}),[n]);return{status:i,setStatus:a,touching:d,setTouching:f,loadingRef:l,labelRef:u,domRef:c,loosingHeight:m,handleRefresh:h,tipsHeight:v}},Ea=function(e){var n=e.domRef,r=e.handleTouchStart,o=e.handleTouchMove,i=e.handleTouchEnd;t.useEffect((function(){var e;return null===(e=n.current)||void 0===e||e.addEventListener("touchstart",r,{passive:!1}),function(){var e;null===(e=n.current)||void 0===e||e.removeEventListener("touchstart",r)}}),[o]),t.useEffect((function(){var e;return null===(e=n.current)||void 0===e||e.addEventListener("touchmove",o,{passive:!1}),function(){var e;null===(e=n.current)||void 0===e||e.removeEventListener("touchmove",o)}}),[o]),t.useEffect((function(){var e,t;return null===(e=n.current)||void 0===e||e.addEventListener("touchend",i),null===(t=n.current)||void 0===t||t.addEventListener("touchcancel",i),function(){var e,t;null===(e=n.current)||void 0===e||e.removeEventListener("touchend",i),null===(t=n.current)||void 0===t||t.removeEventListener("touchcancel",i)}}),[i])},wa=function(e){var n=e.allowPullWhenNotTop,r=e.domRef,o=t.useCallback((function(){var e,t,o,i=null!==(o=null===(t=null===(e=r.current)||void 0===e?void 0:e.getBoundingClientRect())||void 0===t?void 0:t.height)&&void 0!==o?o:0;return r.current&&!(!n&&(r.current.scrollTop<0||r.current.scrollTop>r.current.scrollHeight-i))}),[n]);return{ifShouldHandle:o}},Ca=t.forwardRef((function(e,n){var r,o=t.useContext(Te),a=o.prefixCls,l=o.locale,c=void 0===l?J:l,s=t.useRef(0),d=e.className,f=e.style,v=e.children,m=e.loadingText,h=void 0===m?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement(tt,{type:"circle",radius:4}),i.default.createElement("span",null,c.PullRefresh.loadingText)):m,p=e.pullingText,g=void 0===p?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,c.PullRefresh.pullingText)):p,b=e.finishText,y=void 0===b?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,c.PullRefresh.finishText)):b,w=e.initialText,C=e.finishDelay,x=void 0===C?300:C,T=e.disabled,N=void 0!==T&&T,k=e.loosingMinHeight,S=e.useHideAsNestedScroll,R=void 0===S||S,M=e.allowPullWhenNotTop,L=void 0!==M&&M,O=e.onRefresh,_=t.useRef(0),I=t.useRef(pa.Static),B=t.useState({}),D=B[0],A=B[1],P=t.useState(0),H=P[0],V=P[1],F=ya({loosingMinHeight:k,onRefresh:O}),z=F.loadingRef,j=F.status,q=F.setStatus,W=F.labelRef,X=F.domRef,Y=F.touching,G=F.setTouching,U=F.loosingHeight,K=F.tipsHeight,Z=F.handleRefresh,$=wa({domRef:X,allowPullWhenNotTop:L}).ifShouldHandle,Q=t.useMemo((function(){var e,t;return R&&!Y&&j===pa.Pulling&&(null!==(t=null===(e=null==X?void 0:X.current)||void 0===e?void 0:e.scrollTop)&&void 0!==t?t:0)>0||N?u(u({},D),{opacity:0}):D}),[D,R,Y,N]),ee=((r={})[pa.Static]=void 0===w?g:w,r[pa.Pulling]=g,r[pa.Loading]=h,r[pa.Finish]=y,r),te=t.useCallback((function(e,t){void 0===t&&(t=function(){}),s.current===e&&A({position:"relative",height:"0px",top:0,transition:"height .45s"}),setTimeout((function(){s.current===e&&(X.current&&(X.current.style.overflow="auto"),q(pa.Pulling),A({position:"absolute",top:"-"+K+"px",height:K+"px",transition:"height 0s"}),I.current=pa.Static,z.current=!1,t())}),450)}),[K]),ne=t.useCallback((function(){!N&&!z.current&&X.current&&$()&&(G(!0),X.current&&0===X.current.scrollTop&&(X.current.scrollTop=1))}),[N,$]),re=function(){return new Promise((function(e){if(X.current){X.current.style.overflow="hidden";var t=(new Date).getTime();q(pa.Loading),A({position:"relative",top:0,height:K+"px",transition:"height 0s"}),s.current=t,Z().then((function(){ee[pa.Finish]?(q(pa.Finish),setTimeout((function(){te(t,e)}),x)):te(t,e)}))}}))},oe=t.useCallback((function(){N||z.current||!X.current||(G(!1),I.current===pa.Loosing&&re())}),[N,K]),ie=t.useCallback((function(){N||z.current||!X.current||setTimeout((function(){var e,t,n,r,o=-(null!==(t=null===(e=X.current)||void 0===e?void 0:e.scrollTop)&&void 0!==t?t:0)>U;o&&(_.current=null!==(r=null===(n=X.current)||void 0===n?void 0:n.scrollTop)&&void 0!==r?r:0),I.current=o?pa.Loosing:pa.Pulling}))}),[N,U]),ae=t.useCallback((function(){if(X.current){var e=X.current.getBoundingClientRect().height;V(e)}}),[]);return Re(ae),t.useImperativeHandle(n,(function(){return{dom:X.current,refresh:re,updateIOSHeight:ae}})),t.useEffect((function(){ae(),te(s.current)}),[]),Ea({domRef:X,handleTouchStart:ne,handleTouchMove:ie,handleTouchEnd:oe}),i.default.createElement("div",{className:E(a+"-pull-refresh all-border-box is-ios",d,{"is-disabled":N||!Y&&R}),ref:X,style:H>0?u({height:H},f||{}):f},i.default.createElement("div",{className:E(a+"-pull-refresh-content-wrapper")},i.default.createElement("div",{className:E(a+"-pull-refresh-label-wrapper"),style:Q},i.default.createElement("div",{className:E(a+"-pull-refresh-label"),ref:W},ee[j])),i.default.createElement("div",{className:E(a+"-pull-refresh-content"),style:H>0?{minHeight:H+1+"px"}:{}},v)))})),xa=t.forwardRef((function(e,n){var r,o=t.useContext(Te),a=o.prefixCls,l=o.locale,u=void 0===l?J:l,c=e.className,s=e.style,d=e.children,f=e.loosingText,v=void 0===f?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,u.PullRefresh.loosingText)):f,m=e.loadingText,h=void 0===m?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement(tt,{type:"circle",radius:4}),i.default.createElement("span",null,u.PullRefresh.loadingText)):m,p=e.pullingText,g=void 0===p?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,u.PullRefresh.pullingText)):p,b=e.finishText,y=void 0===b?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,u.PullRefresh.finishText)):b,w=e.initialText,C=e.finishDelay,x=void 0===C?300:C,T=e.loosingMinHeight,N=e.dampRate,k=void 0===N?4:N,S=e.disabled,R=void 0!==S&&S,M=e.useHideAsNestedScroll,L=void 0===M||M,O=e.onRefresh,_=e.allowPullWhenNotTop,I=void 0!==_&&_,B=t.useState({}),D=B[0],A=B[1],P=t.useRef(null),H=t.useRef(0),V=t.useRef(!1),F=ya({loosingMinHeight:T,onRefresh:O}),z=F.loadingRef,j=F.status,q=F.setStatus,W=F.labelRef,X=F.domRef,Y=F.touching,G=F.setTouching,U=F.loosingHeight,K=F.handleRefresh,Z=F.tipsHeight,$=wa({domRef:X,allowPullWhenNotTop:I}).ifShouldHandle,Q=t.useMemo((function(){var e,t;return L&&!Y&&j===pa.Pulling&&(null!==(t=null===(e=null==X?void 0:X.current)||void 0===e?void 0:e.scrollTop)&&void 0!==t?t:0)>0?{opacity:0}:{}}),[L,Y]),ee=((r={})[pa.Static]=void 0===w?g:w,r[pa.Pulling]=g,r[pa.Loosing]=v||g,r[pa.Loading]=h,r[pa.Finish]=y,r),te=function(e,t,n){if(e<5){if(e<0)return void(H.current=0);if(0===t)return setTimeout((function(){A({transition:"all 0s"})})),void(H.current=0)}var r=function(e,t,n){return e>t?t+(e-t)/n:e}(e,U,k);H.current=r,A({transform:r?"translateY("+r+"px)":"",transition:"all "+t/1e3+"s"}),setTimeout((function(){null==n||n()}),t)},ne=function(e){void 0===e&&(e=function(){}),te(0,300,(function(){X.current&&X.current.scrollTop<0&&(X.current.scrollTop=0),z.current=!1,q(pa.Static),e()}))},re=t.useCallback((function(e){var t;if(!(R||P.current||z.current)&&X.current&&$()){G(!0),0===X.current.scrollTop&&(X.current.scrollTop=1);var n=e.touches[0],r=n.pageX,o=n.pageY;r&&o&&(P.current={start:null===(t=X.current)||void 0===t?void 0:t.scrollTop,x:r,y:o}),q(pa.Pulling)}}),[R,$]),oe=function(){return new Promise((function(e){q(pa.Loading),we((function(){te(Z,300),K().then((function(){ee[pa.Finish]?(q(pa.Finish),setTimeout((function(){ne(e)}),x)):ne(e)}))}))}))},ie=t.useCallback((function(){(0!==H.current||$())&&(V.current=!1,G(!1),R||!P.current||z.current||(P.current=null,j===pa.Loosing?oe():ne()))}),[R,j,Z,$]),ae=t.useCallback((function(e){if(V.current=!0,!R&&!z.current&&X.current&&P.current){var t=e.touches[0].pageY-P.current.y-P.current.start;0===H.current&&X.current.scrollTop>0||0===H.current&&t<0||(q((function(){return t>U?pa.Loosing:pa.Pulling})),te(t,0),e.stopPropagation(),e.cancelable&&e.preventDefault())}}),[R,U]);return t.useEffect((function(){var e,t=function(){V.current&&X.current&&(X.current.scrollTop<0||H.current)&&(X.current.scrollTop=0)};return null===(e=X.current)||void 0===e||e.addEventListener("scroll",t),function(){var e;null===(e=X.current)||void 0===e||e.removeEventListener("scroll",t)}}),[]),t.useImperativeHandle(n,(function(){return{dom:X.current,refresh:oe,updateIOSHeight:function(){console.warn('updateIOSHeight 仅在 type="ios" 时可用')}}})),Ea({domRef:X,handleTouchStart:re,handleTouchMove:ae,handleTouchEnd:ie}),i.default.createElement("div",{className:E(a+"-pull-refresh all-border-box is-android",c,{"is-disabled":(R||!Y&&L)&&j!==pa.Loading}),style:s,ref:X},i.default.createElement("div",{className:E(a+"-pull-refresh-place"),style:Je(D)},i.default.createElement("div",{className:E(a+"-pull-refresh-label"),ref:W,style:Q},ee[j]),i.default.createElement("div",{className:E(a+"-pull-refresh-content",{"is-loading":[pa.Loading,pa.Finish].includes(j)})},d)))})),Ta=t.forwardRef((function(e,t){var n=e.type,r=e.useIosOptimize,o=e.children,a=c(e,["type","useIosOptimize","children"]),l=Ie(),s="ios"===n||r&&"ios"===(n||l)?Ca:xa;return i.default.createElement(s,u({},u(u({},a),{ref:t})),o)}));function Na(e,t){var n=e.keyword,r=e.highlightClassName,o=e.highlightStyle;return i.default.createElement("span",{className:r,style:o,key:t},n)}function ka(e){var t,n,r=e.prefixCls,o=e.associationItems,a=void 0===o?[]:o,l=e.highlightClassName,s=e.highlightMode,d=void 0===s?"none":s,f=e.highlightStyle,v=e.onAssociationClick,m=e.onAssociationItemClick,h=e.renderAssociation,p=e.renderAssociationItem,g=e.keyword,b=e.visible,y=r+"-association",w=y+"-item-highlight",C=function(e){if(!e||!g||"none"===d)return e;var t={keyword:g,content:e,highlightClassName:l||w,highlightStyle:f};return"contain"===d?function(e){var t=e.content,n=void 0===t?"":t,r=e.keyword,o=void 0===r?"":r,i=n.split(o),a=i.reduce((function(t,n,r){return t.push(n),r!==i.length-1&&t.push(Na(e,r)),t}),[]);return a}(t):"prefix"===d?function(e){for(var t=e.content,n=void 0===t?"":t,r=e.keyword,o=void 0===r?"":r,i=c(e,["content","keyword"]),a=-1,l=0;l<o.length&&!(l>=n.length||n[l]!==o[l]);l++)a=l;return a>-1?[Na(u(u({},i),{keyword:n.substring(0,a+1)}),0),n.substring(a+1)]:n}(t):"function"==typeof d?d(e,g,w):e},x=function(e,t){var n=e.content,r=n;return"string"==typeof n&&"none"!==d&&(r=C(n)),p&&(r=p(e,t,r)),i.default.createElement("div",{key:t,className:y+"-item",onClick:function(){return null==m?void 0:m(e,t)}},r)};return i.default.createElement("div",{className:E(y,(t={},t[y+"-visible"]=b,t)),onClick:v},(n=a.map(x),h?h(n):n))}function Sa(e){var n=e.className,r=e.onCancel,o=e.focusing,a=e.currentInputValue,l=e.text,u=t.useState(o||Boolean(a)),c=u[0],s=u[1];return t.useEffect((function(){s(o||Boolean(a))}),[o,a]),c?i.default.createElement("span",{className:n,onClick:function(){null==r||r(),we((function(){s(!1)}))}},l):null}var Ra=t.forwardRef((function(e,n){var r=t.useContext(Te),o=r.prefixCls,a=r.locale,l=o+"-search-bar",s=e.inputClass,d=e.inputStyle,f=e.type,v=void 0===f?"search":f,m=e.nativeProps,h=e.id,p=e.name,g=e.maxLength,b=e.placeholder,y=void 0===b?null==a?void 0:a.SearchBar.placeholder:b,w=e.readOnly,C=e.onKeyUp,x=e.onKeyPress,T=e.disabled,N=e.pattern,k=e.prefix,S=void 0===k?i.default.createElement(Jo,{className:l+"-search-icon"}):k,R=e.append,M=e.textAlign,L=void 0===M?"left":M,O=e.actionButton,_=e.clearable,I=void 0===_||_,B=e.clearShowType,D=void 0===B?"value":B,A=e.shape,P=void 0===A?"square":A,H=e.className,V=e.enableAssociation,F=void 0!==V&&V,z=e.associationVisible,j=e.associationShowType,q=void 0===j?"default":j,W=e.associationItems,X=e.highlightClassName,Y=e.highlightMode,G=e.highlightStyle,U=e.onCancel,K=e.onAssociationClick,Z=e.onAssociationItemClick,$=e.renderAssociation,J=e.renderAssociationItem,Q=c(e,["inputClass","inputStyle","type","nativeProps","id","name","maxLength","placeholder","readOnly","onKeyUp","onKeyPress","disabled","pattern","prefix","append","textAlign","actionButton","clearable","clearShowType","shape","className","enableAssociation","associationVisible","associationShowType","associationItems","highlightClassName","highlightMode","highlightStyle","onCancel","onAssociationClick","onAssociationItemClick","renderAssociation","renderAssociationItem"]),ee=t.useRef(null),te=to(u({className:E(H,l+"-"+P),prefix:S,clearable:I,append:function(e,t){var n=null;n="function"==typeof R?R(e,t):R;var r=void 0===O?i.default.createElement(Sa,{focusing:e,currentInputValue:t,className:l+"-cancel-btn",onCancel:U,text:null==a?void 0:a.SearchBar.cancelBtn}):O;return i.default.createElement(i.default.Fragment,null,n,r,F?i.default.createElement(ka,{prefixCls:l,keyword:t,visible:me,associationItems:W,highlightClassName:X,highlightMode:Y,highlightStyle:G,onAssociationClick:K,onAssociationItemClick:Z,renderAssociation:$,renderAssociationItem:J}):null)},clearShowType:D},Q),ee),ne=te.inputValue,re=te.handleChange,oe=te.handleInput,ie=te.handleKeyDown,ae=te.handleFocus,le=te.handleBlur,ue=te.handleClick,ce=te.renderWrapper,se=te.wrapRef,de=t.useState("always"===q||("value"===q||"default"===q)&&Boolean(ne)),fe=de[0],ve=de[1],me=null!=z?z:fe;t.useImperativeHandle(n,(function(){return{dom:se.current,input:ee.current,toggleAssociation:function(e){ve(null!=e?e:!fe)}}}));var he=function(e,t){"always"===q?ve(!0):"focus"===q?ve(e):"default"===q?ve(e&&Boolean(t)):"value"===q&&ve(Boolean(t))},pe=function(e){he(!0,e.target.value),ae(e)},ge=function(e){he(!1,e.target.value),le(e)},be=function(e){var t=e.target.value;he(Boolean(t),t),re(e)},ye=function(){return ce(l,v,i.default.createElement("input",u({},m,{id:h,name:p,maxLength:g,placeholder:y,readOnly:w,onFocus:pe,onBlur:ge,onKeyUp:C,onKeyPress:x,ref:ee,className:E(l+"-input",s,l+"-input-"+L),style:d,value:ne,type:v,disabled:T,pattern:N,onChange:be,onInput:oe,onKeyDown:ie,onClick:ue})))};return i.default.createElement(ke,null,ye)}));function Ma(e,t,n){var r=1e17,o=e*r,i=t*r;return"-"===n?(o-i)/r:(o+i)/r}var La=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.inputStyle,u=e.inputClass,c=void 0===u?"":u,s=e.value,d=e.defaultValue,f=void 0===d?1:d,v=e.allowEmpty,m=void 0!==v&&v,h=e.digits,p=void 0===h?0:h,g=e.disabled,b=void 0!==g&&g,y=e.inputReadonly,w=void 0!==y&&y,C=e.max,x=void 0===C?1/0:C,T=e.min,N=void 0===T?1:T,k=e.equalLimitDisabled,S=void 0!==k&&k,R=e.step,M=void 0===R?1:R,L=e.theme,O=void 0===L?"default":L,_=e.formatter,I=e.addButton,B=e.minusButton,D=e.renderContent,A=e.onBlur,P=e.onChange,H=e.onFocus,V=e.onAddButtonClick,F=e.onMinusButtonClick,z=e.onClick,j=e.onInput,q=function(e){var n=e.defaultValue,r=e.formatter,o=e.max,i=e.min,a=e.value,l=e.digits,u=t.useState(n),c=u[0],s=u[1],d=void 0!==a?a:c;return{updateValue:function(e){var t="function"==typeof e?e(c):e;r?new Promise((function(e){e(r(Number(t)))})).then((function(e){var t=Math.max(i,Math.min(o,e));s(t)})):s(t)},actualInputValue:d,showValue:d===Number.MIN_VALUE?"":l>0?parseFloat(String(d)).toFixed(l):d}}({defaultValue:f,formatter:_,min:N,max:x,value:s,digits:p}),W=q.updateValue,X=q.actualInputValue,Y=q.showValue,G=function(e){var n=e.actualInputValue,r=e.min,o=e.max,i=e.step,a=e.disabled,l=e.equalLimitDisabled,u=e.updateValue,c=e.onAddButtonClick,s=e.onMinusButtonClick,d=t.useState((function(){return n===r||a})),f=d[0],v=d[1],m=t.useState((function(){return n===o||a})),h=m[0],p=m[1];return t.useEffect((function(){v(n<=r),p(n>=o)}),[n]),{minusButtonDisable:f,addButtonDisable:h,handleMinusButtonClick:function(e){f||(u((function(e){var t=Ma(e,i,"-");return t<r?l?e:r:t})),s&&s(e))},handleAddButtonClick:function(e){h||(u((function(e){var t=Ma(Number(e),i,"+");return t>o?l?e:o:t})),c&&c(e))}}}({actualInputValue:X,min:N,max:x,step:M,disabled:b,digits:p,equalLimitDisabled:S,updateValue:W,onAddButtonClick:V,onMinusButtonClick:F}),U=G.minusButtonDisable,K=G.addButtonDisable,Z=G.handleAddButtonClick,$=G.handleMinusButtonClick,J=function(e){var t=e.defaultValue,n=e.min,r=e.max,o=e.digits,i=e.actualInputValue,a=e.allowEmpty,l=e.updateValue,u=e.onBlur,c=e.onChange,s=e.onInput;return Oe((function(){c&&c(i)}),[i]),{handleInput:function(e){var t=e.target.value,n=Number(t),r=t.indexOf(".");if(o>0&&-1!==r){var u=t.slice(r+1).length;l(u>o?i:n)}else l(a&&""===t?Number.MIN_VALUE:n);s&&s(e)},handleBlur:function(e){var o=e.target.value,i=Number(o);l(a&&""===o?Number.MIN_VALUE:a||""!==o?Math.max(n,Math.min(r,i)):t),u&&u(e)}}}({defaultValue:f,min:N,max:x,digits:p,actualInputValue:X,allowEmpty:m,updateValue:W,onBlur:A,onChange:P,onInput:j}),Q=J.handleInput,ee=J.handleBlur,te=t.useRef(null),ne=t.useRef(null);return t.useImperativeHandle(n,(function(){return{dom:te.current,input:ne.current,changeValue:function(e){var t=null!=e?e:f;t=Math.min(x,Math.max(t,N)),W(t)}}})),i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("div",{className:E(t+"-stepper",t+"-"+O,o),style:a,ref:te,onClick:z},i.default.createElement("div",{"aria-label":"decrease",onClick:$},B||i.default.createElement("div",{className:E(t+"-stepper-minus-button")},i.default.createElement($o,{className:E(t+"-stepper-minus-button-icon",{disabled:U})}))),D?D(X):i.default.createElement("input",{style:l,className:E(t+"-stepper-input",c),onFocus:H,onInput:Q,onBlur:ee,disabled:b,value:Y,readOnly:w,ref:ne,type:"number",role:"spinbutton","aria-valuenow":Number(Y),"aria-valuemax":x,"aria-valuemin":N}),i.default.createElement("div",{"aria-label":"increase",onClick:Z},I||i.default.createElement("div",{className:E(t+"-stepper-add-button")},i.default.createElement(ei,{className:E(t+"-stepper-add-button-icon",{disabled:K})}))))}))})),Oa=G(La,"Stepper"),_a=t.forwardRef((function(e,n){var r=e.title,o=e.description,a=e.icon,l=t.useContext(Ia),u=l.iconType,c=l.current,s=l.direction,d=l.index,f=void 0===d?0:d,v=l.status,m=l.align,h=l.changeIndex,p=e.status||v,g=e.align||m,b=t.useRef(null);t.useImperativeHandle(n,(function(){return{dom:b.current}}));var y=t.useMemo((function(){return p||(c<f?"wait":c===f?"process":"finish")}),[p,f,c]);return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("div",{ref:b,className:E(t+"-steps-item",t+"-steps-item-align-"+g,y,s,u),onClick:function(){return h(f)}},i.default.createElement("div",{className:E(t+"-steps-item-tail",t+"-steps-item-tail-status-"+y,t+"-steps-item-tail-align-"+g,y+"-tail-color-with-config")}),a?i.default.createElement("div",{className:E(t+"-steps-item-custom-icon",y+"-custom-icon-bg-color-with-config")},a):i.default.createElement("div",{className:E(t+"-steps-item-icon",y+"-bg-color-with-config")},"number"===u?function(e){var t;return"finish"===y?t=i.default.createElement(oi,null):"error"===y&&(t=i.default.createElement(ii,null)),t||i.default.createElement("span",{className:E(e+"-steps-item-icon-num")},f+1)}(t):i.default.createElement("span",{className:E(t+"-steps-item-icon-dot")})),r||o?i.default.createElement("div",{className:E(t+"-steps-item-content",t+"-steps-item-content-align-"+g)},r?i.default.createElement("div",{className:E(t+"-steps-item-title",y+"-title-color-with-config")},r):null,o?i.default.createElement("div",{className:E(t+"-steps-item-description")},o):null):null)}))})),Ia=t.createContext({changeIndex:function(){}}),Ba=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.children,c=e.direction,s=void 0===c?"horizontal":c,d=e.align,f=e.iconType,v=void 0===f?"number":f,m=e.current,h=e.defaultIndex,p=void 0===h?0:h,g=e.status,b=void 0===g?"process":g,y=e.items,E=e.onClick,w=e.onChange,C=void 0!==d?d:"vertical"===s?"start":"center",x=t.useState(Number(p)),T=x[0],N=x[1],k=Le(void 0===m?T:m),S=k[0],R=k[1],M=k[2],L=t.useRef(null),O=Ie();function _(e){null==E||E(e),N(e),e!==R.current&&(null==w||w(e))}t.useImperativeHandle(n,(function(){return{dom:L.current}})),t.useEffect((function(){M(void 0===m?T:m)}),[m,T]);var I=t.useCallback((function(e,t){return i.default.createElement(Ia.Provider,{value:{iconType:v,current:S,direction:s,index:t,status:S===t?b:void 0,align:C,changeIndex:_},key:t},e)}),[v,S,s,C]);return i.default.createElement(ke,null,(function(e){var n=e.prefixCls;return i.default.createElement("div",{className:n+"-steps all-border-box "+o+" "+s+" "+O,style:a,ref:L},y?y.map((function(e,t){return I(i.default.createElement(_a,u({},e,{key:t})),t)})):t.Children.toArray(l).map((function(e,t){return I(e,t)})))}))})),Da=G(Ba,{Step:_a});function Aa(e){var t=e.action,n=e.prefixCls,r=e.index,o=e.type,a=e.close,l=t.text,c=t.style,s=t.className,d=t.onClick,f=t.icon,v=t.children;return i.default.createElement("div",{className:E(n+"-"+o+" "+n+"-info-container",s),style:u({zIndex:r},c),onClick:function(){var e=(null==d?void 0:d())||null;e&&"boolean"!=typeof e?e&&e.then&&e.then((function(e){return!e&&a()})):!e&&a()}},v||i.default.createElement("div",{className:n+"-info"},f?i.default.createElement("div",{className:n+"-info-icon"},f):null,l?i.default.createElement("div",{className:n+"-info-text"},l):null))}var Pa=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.children,c=e.leftActions,s=e.rightActions,d=e.disabled,f=void 0!==d&&d,v=e.threshold,m=void 0===v?.15:v,h=e.closeOnTouchOutside,p=e.transitionDuration,g=void 0===p?300:p,b=e.dampRate,y=void 0===b?15:b,w=e.openStyleType,C=void 0===w?"layer":w,x=e.onClose,T=e.onOpen,N=t.useRef(null),k=t.useRef(null),S=t.useRef(null),R=t.useRef(!1),M=t.useRef(0),L=t.useState([]),O=L[0],_=L[1],I=t.useRef(0),B=t.useState([]),D=B[0],A=B[1],P=_e(y),H=t.useRef(!1),V=t.useRef(null),F=Le(!1),z=F[0],j=F[1],q=F[2],W=Le(0),X=W[0],Y=W[1],G=W[2],U=t.useContext(Te).prefixCls,K=t.useRef(0),Z=t.useRef(0),$=t.useRef(0),J=t.useRef(0),Q="layer"===C,ee=t.useMemo((function(){return Je({transitionDuration:z?"0ms":g+"ms"})}),[z,g]);function te(e){K.current=Y.current,Z.current=0,$.current=0,J.current=0,V.current=null,Z.current=e.touches[0].pageX,$.current=e.touches[0].pageY}function ne(e){var t,n,r,o,i=e.changedTouches[0].pageX-Z.current,a=e.changedTouches[0].pageY-$.current;if(null===V.current&&(V.current=Math.abs(i)<Math.abs(a)),V.current)return q(!1),void G(0);e.cancelable&&e.preventDefault(),J.current=i,H.current=!0,q(!0),G((t=J.current+K.current,n=-I.current,r=M.current,o=Math.abs(t)/P.current,Math.min(Math.max(t,n-o),r+o)))}function re(){if(j.current&&!V.current){var e=Y.current>0?"left":"right";t=e,n=R.current?1-m:m,(r="left"===t?M.current:I.current)&&Math.abs(Y.current)>r*n?ae(t):ie(t),q(!1),we((function(){H.current=!1}))}var t,n,r}function oe(e){if(!e.current)return{totalWidth:0,widthArr:[]};var t=0,n=[],r=e.current.getElementsByClassName(U+"-swipe-action-menu-action-info-container");return Array.prototype.forEach.call(r,(function(e){var r,o=null!==(r=e.getBoundingClientRect().width)&&void 0!==r?r:0;t+=o,n.push(o)})),{totalWidth:t,widthArr:n}}function ie(e){if(G(0),R.current){if(R.current=!1,!e&&0!==Y.current)return void le(Y.current>0?"left":"right");le(e)}}function ae(e){void 0===e&&(e="right"),R.current||(R.current=!0,function(e){setTimeout((function(){null==T||T(e)}),g)}(e)),G("left"===e?M.current:-I.current)}function le(e){setTimeout((function(){null==x||x(e)}),g)}function ue(e){return 100*(O.slice(e+1).reduce((function(e,t){return e+t}),0)/M.current||0)+"%"}function ce(e){return 100*(D.slice(0,e).reduce((function(e,t){return e+t}),0)/I.current||0)+"%"}return t.useEffect((function(){var e=N.current;return!f&&e&&(e.addEventListener("touchstart",te),e.addEventListener("touchmove",ne),e.addEventListener("touchend",re)),function(){!f&&e&&(e.removeEventListener("touchstart",te),e.removeEventListener("touchmove",ne),e.removeEventListener("touchend",re))}}),[f]),t.useEffect((function(){var e=oe(k),t=e.totalWidth,n=e.widthArr;M.current=t,_(n);var r=oe(S),o=r.totalWidth,i=r.widthArr;I.current=o,A(i)}),[c,s]),t.useEffect((function(){var e=function(e){var t;!(null===(t=N.current)||void 0===t?void 0:t.contains(e.target))&&R.current&&ie()};return h&&document.addEventListener("touchstart",e),function(){h&&document.removeEventListener("touchstart",e)}}),[h]),t.useImperativeHandle(n,(function(){return{dom:N.current,close:ie,open:ae}})),i.default.createElement("div",{className:E(U+"-swipe-action",o,0===X?"action-close":"action-open"),style:Je(u(u(u({},a||{}),ee),{transform:"translateX("+X+"px)"})),ref:N,onClick:function(e){var t,n;!R.current||H.current||(null===(t=k.current)||void 0===t?void 0:t.contains(e.target))||(null===(n=S.current)||void 0===n?void 0:n.contains(e.target))||ie()}},i.default.createElement("div",{className:E(U+"-swipe-action-menu-left",U+"-swipe-action-menu",X>0?"action-open":"action-close"),ref:k,style:Q&&X>=0?u({width:X},ee):{}},null==c?void 0:c.map((function(e,t){return i.default.createElement(Aa,{action:u(u({},e||{}),{style:u(u({},Q?{right:ue(t)}:{}),e.style||{}),className:E(e.className,"open-style-"+C)}),prefixCls:U+"-swipe-action-menu-action",index:c.length-t,type:"left",close:ie,key:t})}))),i.default.createElement("div",{className:U+"-swipe-action-content"},l),i.default.createElement("div",{className:E(U+"-swipe-action-menu-right",U+"-swipe-action-menu",X<0?"action-open":"action-close"),ref:S,style:Q&&X<=0?u({width:-1*X},ee):{}},null==s?void 0:s.map((function(e,t){return i.default.createElement(Aa,{action:u(u({},e||{}),{style:u(u({},Q?{left:ce(t)}:{}),e.style||{}),className:E(e.className,"open-style-"+C)}),prefixCls:U+"-swipe-action-menu-action",index:t+1,type:"right",close:ie,key:t})}))))})),Ha=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.maxElementOffset,l=void 0===a?56:a,u=e.maxLabelOffset,c=void 0===u?40:u,s=e.onConfirm,d=e.disabled,f=void 0!==d&&d,v=e.circleSize,m=void 0===v?80:v,h=e.minConfirmOffset,p=void 0===h?30:h,g=e.labelAnimationFunction,b=void 0===g?"cubic-bezier(0.14, 1, 0.34, 1)":g,y=e.labelAnimationDuration,w=void 0===y?250:y,C=e.children,x=e.normalText,T=void 0===x?"":x,N=e.activeText,k=void 0===N?"":N,S=e.initPos,R=void 0===S?0:S,M=e.bounceWhenBumpBoundary,L=void 0!==M&&M,O=e.bounceDampRate,_=void 0===O?3:O,I=e.bounceAnimateDuration,B=void 0===I?300:I,D=e.damping,A=e.bounceDistanceProcessor,P=e.getScrollContainer,H=e.getBounceContainer,V=e.onTouchStart,F=e.onTouchEnd,z=e.onTouchCancel,j=e.onTouchMove,q=e.renderLabel,W=t.useContext(Te).locale,X=void 0===W?J:W,Y=t.useState(f),G=Y[0],U=Y[1],K=t.useState(0),Z=K[0],$=K[1],Q=t.useRef(null),ee=t.useRef(null),te=t.useRef(null),ne=t.useRef(!1),re=t.useRef(!1),oe=t.useRef(!1),ie=t.useRef(0),ae=t.useRef(null),le=ae.current;return Pe(le,"touchstart",V),Pe(le,"touchend",F),Pe(le,"touchcancel",z),Pe(le,"touchmove",j),t.useEffect((function(){var e,t;if(!f&&Q.current&&!G&&(0===Q.current.childNodes.length?U(!0):1===Q.current.childNodes.length?t=null!==(e=null==P?void 0:P())&&void 0!==e?e:Q.current.firstChild:((t=Q.current).style.width="100%",t.style.overflowX="scroll",t.style.display="inline-flex",t.style.webkitOverflowScrolling="touch"),t)){var n=ee.current,r=te.current;if(n){var o=(null==H?void 0:H())||t;n.style.display="none";var i=0,a=0,u=0,d=function(e){var t=e.touches[0];i=t.clientX||0},v=function(e){t.scrollLeft||(t.scrollLeft=1);var s=(a=e.touches[0].clientX||0)-i;ie.current=s;var d=Ce(Math.abs(s),D);s>0&&t.scrollLeft<=1&&L&&(e.stopPropagation(),e.cancelBubble&&e.preventDefault(),oe.current=!0,u=(A||function(e){return Math.min(e,o.offsetWidth)/_})(s),Qe(o,{transition:"none",transform:"translateX("+u+"px) translateZ(0)"}));if(s<0&&(t.scrollLeft+t.clientWidth>=t.scrollWidth-1||!t.scrollLeft)&&!re.current&&(ne.current=!0,n.style.display="flex"),ne.current&&s<0){e.stopPropagation(),e.cancelable&&e.preventDefault();var f=d>l?l:d,v=d>c?c:d;$(v),r&&(r.innerHTML=d>=p?k||X.SwipeLoad.activeText:T||X.SwipeLoad.normalText),Qe(n,{transition:"none",transform:"translateX(-"+v+"px) translateZ(0)"}),Qe(t,{transition:"none",transform:"translateX(-"+f+"px) translateZ(0)"})}s>0&&t.scrollLeft+t.clientWidth<=t.scrollWidth-1&&(ne.current=!1,n.style.display="none"),s<0&&t.scrollLeft+t.clientWidth<=t.scrollWidth-1?re.current=!1:re.current=!0},m=function(){var e=a-i;ie.current=e;var r=Ce(Math.abs(e)),l=function(){if(ne.current){ne.current=!1;var e="all "+w+"ms "+b,r="translateX(0px) translateZ(0)";Qe(t,{transition:e,transform:r}),Qe(n,{transition:e,transform:r})}oe.current&&(oe.current=!1,Qe(o,{transition:"all "+B+"ms",transform:"translateX(0px) translateZ(0)"})),re.current=!1,setTimeout((function(){n.style.display="none"}),w)};if(r>=p&&(t.scrollLeft+t.clientWidth>=t.scrollWidth-1||!t.scrollLeft)&&ne.current)return s(),void setTimeout((function(){l()}),250);l()};return t.addEventListener("touchstart",d),t.addEventListener("touchmove",v),t.addEventListener("touchend",m),function(){t.removeEventListener("touchstart",d),t.removeEventListener("touchmove",v),t.removeEventListener("touchend",m)}}}}),[f,P,H,L,_,B]),t.useImperativeHandle(n,(function(){return{dom:ae.current}})),i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("div",{className:t+"-swipe-load "+o,ref:ae},i.default.createElement("div",{className:E(t+"-list-area"),ref:Q},C),q?i.default.createElement("div",{className:E(t+"-custom-loading-area"),ref:ee,style:{position:"absolute",right:R+"px"}},q.length?q(Z):q()):i.default.createElement("div",{className:E(t+"-loading-area"),ref:ee,style:{width:m+"px",height:m+"px",position:"absolute",right:"-"+m+"px"}},i.default.createElement("div",{className:E(t+"-loading-label"),ref:te})))}))})),Va=t.forwardRef((function(e,n){var r=Ie(),o=e.className,a=e.style,l=e.platform,u=void 0===l?r:l,c=e.checked,s=e.disabled,d=void 0!==s&&s,f=e.defaultChecked,v=void 0!==f&&f,m=e.text,h=e.shape,p=void 0===h?"fully":h,g=e.innerArea,b=e.onChange,y=e.onTouchStart,w=e.onTouchEnd,C=e.onClick,x=t.useState(0),T=x[0],N=x[1],k=!1;k="checked"in e?Boolean(c):v;var S=t.useState(k),R=S[0],M=S[1],L=t.useRef(null);function O(e){if(y&&y(e),!d){var t=e.touches&&e.touches[0]?e.touches[0].clientX:0;N(t)}}function _(t){if(w&&w(t),!d){var n=(t.changedTouches&&t.changedTouches[0]?t.changedTouches[0].clientX:0)-T,r=!1;r=n>0||!(n<0)&&!R,"checked"in e||M(r),b&&b(r)}}return t.useImperativeHandle(n,(function(){return{dom:L.current}})),t.useEffect((function(){"checked"in e&&M(Boolean(c))}),[c]),i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("div",{role:"switch","aria-checked":R,"aria-disabled":d,tabIndex:0,ref:L,className:E(t+"-switch all-border-box",o,"type-"+u,"system-"+r,p,{checked:R,disabled:d}),style:a,onTouchStart:O,onTouchEnd:_,onClick:C},m?i.default.createElement("span",{className:t+"-switch-text"},R?m.off||"":m.on||""):null,i.default.createElement("div",{className:t+"-switch-inner"},g||null))}))})),Fa=G(Va,"Switch"),za=t.createContext({changeIndex:function(){},active:!1,index:0,activeCustomStyle:{}});var ja=t.forwardRef((function(e,n){var r=t.useContext(za),o=r.active,a=r.changeIndex,l=r.index,c=r.activeCustomStyle,s=e.onClick,d=e.className,f=e.style,v=t.useRef(null);t.useImperativeHandle(n,(function(){return{dom:v.current}}));var m=function(e){null==s||s(e),a(l)};return i.default.createElement(ke,null,(function(t){var n,r=t.prefixCls;return i.default.createElement("div",{className:E(r+"-tab-bar-item",(n={},n[r+"-tab-bar-item-active"]=o,n),d),style:u(u({},f),o?c:{}),ref:v,onClick:function(e){return m(e)}},function(t){var n,r=e.icon?i.default.createElement("div",{className:E(t+"-tab-bar-item-icon")},"function"==typeof e.icon?e.icon(o):e.icon):null,a=e.title?i.default.createElement("div",{className:E(t+"-tab-bar-item-title",(n={},n[t+"-tab-bar-item-only-title"]=!r,n))},"function"==typeof e.title?e.title(o):e.title):null,l=e.extra&&"function"==typeof e.extra?e.extra(o):e.extra,u=e.child&&i.default.createElement("div",{className:E(t+"-tab-bar-item-children")},"function"==typeof e.child?e.child(o):e.child),c=r||l?i.default.createElement("div",{className:E(t+"-extra-wrap")},r,l):null;return u||i.default.createElement(i.default.Fragment,null,c,a)}(r))}))})),qa=function(e){return t.forwardRef((function(n,r){var o=n.defaultActiveIndex,a=void 0===o?0:o,l=n.activeIndex,c=n.className,s=n.fixed,d=void 0===s||s,f=n.style,v=n.dataSource,m=n.children,h=n.onChange,p=n.activeCustomStyle,g=t.useState(a),b=g[0],y=g[1],w=Le(void 0===l?b:l),C=w[0],x=w[1],T=w[2];t.useEffect((function(){T(void 0===l?b:l)}),[l,b]);var N=t.useRef(null);t.useImperativeHandle(r,(function(){return{dom:N.current,changeIndex:S}}));var k=t.useCallback((function(e,t){return i.default.createElement(za.Provider,{value:{active:t===C,changeIndex:S,index:t,activeCustomStyle:p},key:t},e)}),[C]);function S(e){y(e),e!==x.current&&(null==h||h(e))}return i.default.createElement(ke,null,(function(n){var r,o=n.prefixCls;return i.default.createElement("div",{className:E(o+"-tab-bar",c,(r={},r[o+"-tab-bar-fixed"]=d,r)),style:f,ref:N},v?v.map((function(t,n){return k(i.default.createElement(e,u({key:n},t)),n)})):t.Children.toArray(m).map((function(e,t){return k(e,t)})))}))}))}(ja),Wa=G(qa,{Item:ja}),Xa=t.forwardRef((function(e,n){var r=e.prefix,o=e.useCaterpillar,a=e.distance,l=e.tabDirection,c=e.underlineInnerStyle,s=e.duration,d=e.cellTrans,f=e.showLine,v=e.activeIndex,m=e.wrapWidth,h=e.wrapHeight,p=e.jumpingDis,g=e.translateZ,b=e.caterpillarMaxScale,y=e.caterpillarProperty,w=e.underlineSize,C=e.underlineThick,x=e.underlineAdaptive,T=e.renderUnderline,N=e.getTabRect,k=e.getTabCenterLeft,S=t.useState({}),R=S[0],M=S[1],L=Le(!1),O=L[0],_=L[1],I=L[2],B=t.useState(0),D=B[0],A=B[1],P=t.useRef(null),H=t.useRef(0),V=Ie(),F="vertical"===l,z=b||2,j=g?" translateZ(0)":"";t.useImperativeHandle(n,(function(){return{setCaterpillarAnimate:$,resetUnderlineStyle:Z}}),[$,Z]);var q=t.useMemo((function(){return o?"size"===y?"tabsCaterpillar"+(F?"W":"H")+z:b?"tabsCaterpillar"+(F?"X":"Y")+b:"":""}),[o,F,b,y]);function X(e){var t,n;return x?N(e).width:(F?null===(t=P.current)||void 0===t?void 0:t.offsetWidth:null===(n=P.current)||void 0===n?void 0:n.offsetHeight)||0}function G(e){if(x)return N(e).left;var t=X(e);return k(e)-t/2}function U(e){var t=Math.abs(e);return t>.5?2*(1-t)*(z-1)+1:2*t*(z-1)+1}function K(){var e,t;if(!P.current)return{};var n=G(v),r=a>0?v-1:a<0?v+1:v,i=G(r),l=m?a/m:0,c=l*(n-i),s=F?"X":"Y",d=!o||p||x?{}:"size"===y?((e={})[F?"width":"height"]=100*U(l)+"%",e.willChange="width",e):{transform:"scale"+s+"("+U(l)+")"},f={},h={};if(x){var g=X(v),b=l*(g-X(r));(t={})[F?"width":"height"]=a>0?g-b:g+b,t.willChange="width",f=t,h=F?{width:"auto"}:{height:"auto"}}return{outer:u(u({transform:"translate"+s+"("+(a>0?n-c:n+c)+"px)"+j},F?{width:w,height:C}:{height:w,width:C}),h),inner:u(u({},d),f)}}function Z(){M(function(){var e={};x||(o&&(e.animationDuration=s+"ms"),_.current&&q&&(e.animationName=q),D&&(e.animationDelay="-"+D+"ms"));var t=K();return{outer:Je(u({transitionDuration:d?s+"ms":"0ms"},t.outer||{})),inner:Je(u(u({},e),t.inner||{}))}}())}function $(e){if(void 0===e&&(e=0),s){var t=(s||0)*Math.abs(e);A(t),we((function(){I(!0)})),H.current&&clearTimeout(H.current),H.current=window.setTimeout((function(){I(!1),A(0)}),(s||0)-t+20)}}return t.useEffect((function(){if(q){var e=F?"X":"Y";if("size"!==y)return Y(q,"{\n 0% {\n transform: scale"+e+"(1)"+j+";\n -webkit-transform: scale"+e+"(1)"+j+";\n }\n 50% {\n transform: scale"+e+"("+b+")"+j+";\n -webkit-transform: scale"+e+"("+b+")"+j+";\n }\n 100% {\n transform: scale"+e+"(1)"+j+";\n -webkit-transform: scale"+e+"(1)"+j+";\n }\n }"),function(){W(q)};var t=F?"width":"height";Y(q,"{\n 0% {\n "+t+": 100%;\n }\n 50% {\n "+t+": "+100*z+"%;\n }\n 100% {\n "+t+": 100%;\n }\n }")}}),[q]),t.useEffect((function(){p&&o&&"ios"!==V&&$(m?p/m:0)}),[p]),t.useEffect((function(){Z()}),[o,O,d,s,l,m,h,a,q,D,w,C,x]),T?i.default.createElement(i.default.Fragment,null,T(R,f,P)):i.default.createElement("div",{className:E(r+"-underline",{show:f}),ref:P,style:R.outer},i.default.createElement("div",{className:E(r+"-underline-inner",{caterpillar:O,"custom-animate":q,"caterpillar-moving":O||o&&a},l),style:u(u({},R.inner||{}),c||{})}))})),Ya=t.forwardRef((function(e,n){var r=e.tabs,o=e.prefixCls,a=e.activeIndex,l=e.activeIndexRef,c=e.tabDirection,s=e.type,d=e.onTabClick,f=e.changeIndex,v=e.tabBarPosition,m=e.tabBarArrange,h=e.tabBarScroll,p=e.tabBarFixed,g=e.renderUnderline,b=e.duration,y=e.transitionDuration,w=e.useCaterpillar,C=e.wrapWidth,x=e.wrapHeight,T=e.cellTrans,N=e.distance,k=e.jumpingDis,S=e.tabBarExtra,R=e.onTabBarOverflowChange,M=e.tabBarGutter,L=e.tabBarPadding,O=e.underlineSize,_=e.underlineThick,B=e.underlineInnerStyle,D=e.caterpillarMaxScale,A=e.caterpillarProperty,P=e.onTabBarScroll,H=e.hideTabBarBeforeMounted,V=e.overflowThreshold,F=void 0===V?5:V,z=e.tabBarScrollBezier,j=e.tabBarScrollDuration,q=e.tabBarScrollChance,W=e.tabBarHasDivider,X=e.showUnderline,Y=e.underlineAdaptive,G=e.disabled,U=e.renderTabBarItem,K=e.renderTabBarInner,Z=e.tabBarStyle,$=e.tabBarClass,J=e.translateZ,Q=e.tabBarStopPropagation,ee=o+"-tab-cell",te=t.useRef(null),ne=t.useRef(null),re=t.useRef([]),oe=t.useState(!1),ie=oe[0],ae=oe[1],le=t.useState(!1),ue=le[0],ce=le[1],se=t.useState((function(){return r.length<F?m:"start"})),de=se[0],fe=se[1],ve=t.useState((function(){return void 0===H?r.length<F||0===a:!H})),me=ve[0],he=ve[1],pe="vertical"===c,ge=-1!==(s||"").indexOf("line"),be="card"===s,ye=be?void 0:L,Ee=be?void 0:M,Ce=void 0===W?ge:W,xe=pe?C:x,Te=Ie();function Ne(e){xe&&ue&&ke(Re(l.current)-xe/2,e)}function ke(e,t){if(te.current){var n=!1;if("android"===Te&&void 0===z&&void 0===j)try{var r=pe?{left:e}:{top:e};te.current.scrollTo(u(u({},r),t?{}:{behavior:"smooth"}))}catch(e){n=!0}else n=!0;n&&I(pe?te.current.scrollLeft:te.current.scrollTop,e,(function(e){te.current&&(pe?te.current.scrollLeft=e:te.current.scrollTop=e)}),t?0:j,z)}}function Se(e){var t=re.current[e]||{};return{left:(pe?t.left:t.top)||0,width:(pe?t.width:t.height)||0}}function Re(e){var t=Se(e);return t.left+t.width/2}function Me(e){return"object"==typeof ye?ye[e]:ye}function Le(e){return pe?0===e?{marginRight:Ee,marginLeft:Me("left")}:{marginRight:e===r.length-1?void 0:Ee}:{}}t.useEffect((function(){we((function(){!function(){var e=!1;te.current&&(e=pe?te.current.scrollWidth>te.current.offsetWidth:te.current.scrollHeight>te.current.offsetHeight);e!==ue&&R&&R(e);ce(e)}(),fe(void 0),he(!0),ae(!0)}))}),[te.current,xe,r]),t.useEffect((function(){we((function(){var e;null===(e=ne.current)||void 0===e||e.resetUnderlineStyle()}))}),[a,r,Me("left"),Me("right"),M,c]),t.useImperativeHandle(n,(function(){return{dom:te.current,scrollTo:ke,scrollToCenter:Ne,hasOverflow:ue,setCaterpillarAnimate:function(e){var t;return null===(t=ne.current)||void 0===t?void 0:t.setCaterpillarAnimate(e)},resetUnderlineStyle:function(){var e;return null===(e=ne.current)||void 0===e?void 0:e.resetUnderlineStyle()}}}),[Ne,ke,ue]),t.useEffect((function(){xe&&"none"!==q&&setTimeout((function(){Ne()}),"after-jump"===q?Math.max(y||0,b||0):0)}),[a,xe]),t.useEffect((function(){"none"!==q&&Ne(!0);var e=function(e){return e.stopPropagation()};return pe&&ue&&te.current&&Q&&(te.current.addEventListener("touchstart",e),te.current.addEventListener("touchmove",e)),function(){pe&&ue&&te.current&&Q&&(te.current.removeEventListener("touchstart",e),te.current.removeEventListener("touchmove",e))}}),[ue]);var Oe=i.default.createElement(i.default.Fragment,null,r.map((function(e,t){return i.default.createElement("div",{key:t,className:E(ee,c,s,Te,{active:t===a},{"no-shrink":h},{last:t===r.length-1},{custom:Boolean(U)}),style:Le(t),onClick:function(n){G||(f(t,"click"),d&&d(e,t,n))},ref:function(e){e&&!N&&(re.current[t]={top:e.offsetTop,left:e.offsetLeft,width:e.offsetWidth,height:e.offsetHeight})}},function(e,t){return U?U(e,t,{active:t===a}):"string"==typeof e?e:e.title}(e,t))})),ye&&!be&&pe?i.default.createElement("div",{className:"fake-padding",style:{width:Me("right"),height:"100%"}}):null);return i.default.createElement("div",{className:E(ee+"-container-wrap",c,"type-"+s,$,Te),style:Z},i.default.createElement("div",{className:E(ee+"-container-inner",c,"pos-"+v,"type-"+s,{fixed:p},{"has-divider":Ce})},i.default.createElement("div",{className:E(ee+"-container",c,"pos-"+v,"arrange-"+(de||m),"type-"+s,{overflow:ue},{shown:me}),ref:te,onScroll:P},K?K(Oe):Oe,function(){if(!X||!ge)return null;var e={prefix:ee,showLine:ie,useCaterpillar:w,distance:N,tabDirection:c,underlineInnerStyle:B,cellTrans:T,duration:b,activeIndex:a,wrapWidth:C,wrapHeight:x,jumpingDis:k,caterpillarMaxScale:D,caterpillarProperty:A,translateZ:J,underlineSize:O,underlineThick:_,underlineAdaptive:Y,renderUnderline:g};return i.default.createElement(Xa,u({ref:ne,getTabCenterLeft:Re,getTabRect:Se},e))}()),S))})),Ga=t.forwardRef((function(e,n){var r,o=e.prefixCls,a=e.panes,l=e.tabDirection,c=e.activeIndex,s=e.activeIndexRef,d=e.distance,f=e.wrapWidth,v=e.wrapHeight,m=e.handlePaneTouchEnd,h=e.transitionDuration,p=e.paneTrans,g=e.swipeable,b=e.lazyloadCount,y=e.hideContentStyle,w=e.renderHideContent,C=e.mode,x=e.tabPaneStyle,T=e.tabPaneClass,N=e.tabPaneExtra,k=e.getScrollContainer,S=e.scrollThrottle,R=e.scrollOffset,M=void 0===R?0:R,L=e.goLastWhenScrollBottom,O=e.scrollVertical,_=e.translateZ,B=e.fullScreen,D=e.autoHeight,A=e.swipeEnergySaving,P=e.changeIndex,H=e.onScroll,V=t.useRef(null),F=t.useRef([]),z=t.useRef(!1),q=t.useRef(0),W=t.useState([c,c]),X=W[0],Y=W[1],G=t.useState(c),U=G[0],K=G[1],Z=o+"-tab-pane",$=g?m:void 0,J=t.useState("auto"),Q=J[0],ee=J[1];t.useImperativeHandle(n,(function(){return{dom:V.current,getTransition:re,scrollToIndex:oe,setCurrentHeight:ne}})),t.useEffect((function(){"swipe"===C&&setTimeout((function(){!function(){if(K(c),"number"==typeof b)return void Y([c-b,c+b]);Y([0,1/0])}()}),re())}),[b,c,C]);var te=t.useMemo((function(){if("scroll"!==C)return function(){};var e=function(){if(null==H||H(),!z.current){var e=k?k():window;if(e){for(var t=ie(e),n=t.containerTop,r=t.containerBottom,o=0;o<a.length;o+=1){var i=0===o?-1/0:ae(F.current[o]),l=o===a.length-1?1/0:ae(F.current[o+1]);if(n>=i-M&&n<l-M){P(o,"scroll");break}}if(L){var u=a.length-1;r===ae(F.current[u],"bottom")&&P(u,"scroll")}}}};return S?jo(e,S):e}),[C,S,k,a.length,M,L,O,H]);function ne(){if(V.current&&D&&"swipe"===C&&"vertical"===l){var e=(F.current[s.current]||{}).offsetHeight||"auto";ee(e)}}function re(){return p&&h||0}function oe(e,t){var n=ie((null==k?void 0:k())||window),r=n.isGlobal,o=n.scrollEle,i=n.containerTop,a=ae(F.current[e])-i-M,l=O?"scrollTop":"scrollLeft",u=r?Math.max(document.documentElement[l],document.body[l]):o[l],c=O?"scrollHeight":"scrollWidth",s=O?"offsetHeight":"offsetWidth",d=r?Math.max(document.documentElement[c],document.body[c])-u-(O?window.innerHeight:window.innerWidth):o[c]-u-o[s],f=Math.min(d,a);clearTimeout(q.current),z.current=!0;var v=t?0:h||0;I(u,u+f,(function(e){r?(document.documentElement[l]=e,document.body[l]=e):o[l]=e}),v);q.current=window.setTimeout((function(){z.current=!1}),v+(S||0)+100)}function ie(e){var t=j(e),n=t.isGlobal,r=t.scrollEle,o=t.containerRect;return{isGlobal:n,scrollEle:r,containerTop:Math.floor(O?o.top:o.left),containerBottom:Math.floor(O?o.bottom:o.right)}}function ae(e,t){void 0===t&&(t="top");var n=(O?{top:"top",bottom:"bottom"}:{top:"left",bottom:"right"})[t],r=(null==e?void 0:e.getBoundingClientRect())||{};return r[n]?Math.floor(r[n]):0}function le(e,t){var n={key:t,className:E(Z,"mode-"+C,{"full-screen":B}),ref:function(e){return F.current[t]=e}},r=function(e){if("scroll"!==C&&A){if(e!==U)return{position:"absolute",left:"-100%",top:"-100%"};var t=_?" translateZ(0)":"";return Je(u(u({},"vertical"===l?{transform:"translateX("+(d-f*(c-e))+"px)"+t}:{transform:"translateY("+(d-v*(c-e))+"px)"+t}),{transitionDuration:re()+"ms"}))}}(t);if("scroll"===C||t>=X[0]&&t<=X[1])return i.default.createElement("div",u({},n,{style:r}),e);var o=u(u({},r),y||{});return w?i.default.createElement("div",u({},n,{style:o}),w(t,e)):null===y?i.default.createElement("div",u({},n,{style:r})):i.default.createElement("div",u({},n,{style:o}),e)}return t.useEffect((function(){var e=(null==k?void 0:k())||window;return e&&"scroll"===C&&e.addEventListener("scroll",te),function(){e&&"scroll"===C&&e.removeEventListener("scroll",te)}}),[te]),i.default.createElement("div",{className:E(Z+"-container",l,A?"mode-"+C+"-energy-saving":"mode-"+C,T,{"full-screen":B},(r={},r["mode-scroll-"+(O?"vertical":"horizontal")]="scroll"===C,r)),style:function(){var e=x||{};if("scroll"===C)return e;var t=_?" translateZ(0)":"",n="vertical"===l?{width:100*a.length+"%",transform:"translateX("+(d-f*c)+"px)"+t}:{height:100*a.length+"%",transform:"translateY("+(d-v*c)+"px)"+t},r=Q&&"auto"!==Q?{height:Q}:{};return Je(u(u(u(u({},A?{}:n),{transitionDuration:re()+"ms"}),r),e))}(),ref:V,onTouchEnd:$,onTouchCancel:$},a.map((function(e,t){return le(e,t)})),N?i.default.createElement("div",{className:Z+"-extra"},N):null)})),Ua=t.forwardRef((function(e,n){var r=e.className,o=e.style,a=e.tabs,l=void 0===a?[]:a,c=e.tabBarPosition,s=void 0===c?"top":c,d=e.activeTab,f=e.defaultActiveTab,v=void 0===f?0:f,m=e.children,h=e.onChange,p=e.onAfterChange,g=e.onTabClick,b=e.onTabBarOverflowChange,y=e.onTouchStart,w=e.onTouchMove,C=e.onTouchEnd,x=e.onTabBarScroll,T=e.onDistanceChange,N=e.onScroll,k=e.type,S=void 0===k?"line":k,R=e.swipeable,M=void 0===R||R,L=e.disabled,O=e.tabBarArrange,_=void 0===O?"center":O,I=e.tabBarScroll,B=void 0===I||I,D=e.tabBarFixed,A=e.tabBarExtra,P=e.tabBarScrollBezier,H=e.tabBarScrollDuration,V=e.tabBarScrollChance,F=void 0===V?"jump":V,z=e.tabBarHasDivider,j=e.tabBarResetWhenScroll,q=void 0===j?"touchmove":j,W=e.stopPropagation,X=void 0===W||W,Y=e.getInnerScrollContainer,G=e.mode,U=void 0===G?"swipe":G,K=e.getScrollContainer,Z=e.scrollThrottle,$=void 0===Z?300:Z,J=e.scrollOffset,Q=void 0===J?0:J,ee=e.scrollWhenMounted,te=e.goLastWhenScrollBottom,ne=void 0===te||te,re=e.scrollVertical,oe=void 0===re||re,ie=e.renderUnderline,ae=e.renderTabBar,le=e.renderTabBarItem,ue=e.renderTabBarInner,ce=e.duration,se=void 0===ce?240:ce,de=e.transitionDuration,fe=void 0===de?300:de,ve=e.useCaterpillar,me=void 0!==ve&&ve,he=e.distanceToChangeTab,pe=void 0===he?10:he,ge=e.percentToChangeTab,be=void 0===ge?.3:ge,ye=e.speedToChangeTab,Ee=void 0===ye?200:ye,Ce=e.disableClickTransition,xe=void 0===Ce||Ce,Te=e.lazyloadCount,Ne=e.hideContentStyle,Se=void 0===Ne?null:Ne,Me=e.renderHideContent,_e=e.hideTabBarBeforeMounted,Be=e.overflowThreshold,De=void 0===Be?5:Be,Pe=e.tabBarGutter,He=e.tabBarPadding,Ve=e.underlineSize,Fe=e.underlineThick,ze=e.underlineInnerStyle,je=e.caterpillarMaxScale,qe=e.caterpillarProperty,We=void 0===qe?"scale":qe,Xe=e.showUnderline,Ye=void 0===Xe||Xe,Ge=e.underlineAdaptive,Ue=void 0!==Ge&&Ge,Ke=e.stopTouchThreshold,Ze=void 0===Ke?0:Ke,$e=e.touchSideDisableThreshold,Je=void 0===$e?0:$e,Qe=e.onTouchStopped,et=e.tabBarStyle,tt=e.tabPaneStyle,nt=e.tabBarClass,rt=e.tabPaneClass,ot=e.tabPaneExtra,it=e.translateZ,at=void 0===it||it,lt=e.fullScreen,ut=e.autoHeight,ct=e.tabBarStopPropagation,st=void 0===ct||ct,dt=e.swipeEnergySaving,ft=void 0!==dt&&dt,vt=t.useRef(null),mt=t.useRef(null),ht=t.useRef(null),pt=t.useState(v),gt=pt[0],bt=pt[1],yt=t.useState(0),Et=yt[0],wt=yt[1],Ct=t.useState(0),xt=Ct[0],Tt=Ct[1],Nt=t.useState(0),kt=Nt[0],St=Nt[1],Rt=t.useState(!1),Mt=Rt[0],Lt=Rt[1],Ot=t.useState(!1),_t=Ot[0],It=Ot[1],Bt=Le(void 0===d?gt:d),Dt=Bt[0],At=Bt[1],Pt=Bt[2],Ht=Le(0),Vt=Ht[0],Ft=Ht[1],zt=Ht[2],jt=t.useRef(!1),qt=t.useRef(!1),Wt=t.useRef(0),Xt=t.useRef(0),Yt=t.useRef(0),Gt=t.useRef(null),Ut=t.useRef(!1),Kt=t.useRef(""),Zt=t.useRef(!1),$t=Ie(),Jt=function(){var e=m?[m]:[];m&&"[object Array]"===Object.prototype.toString.call(m)&&(e=m);return e.slice(0,l.length)}(),Qt=-1!==["top","bottom"].indexOf(s)?"vertical":"horizontal",en="swipe"===U&&!L&&M&&"vertical"===Qt&&l.length>1;t.useImperativeHandle(n,(function(){return{dom:vt.current,bar:mt.current,pane:ht.current,barOverflow:!!mt.current&&mt.current.hasOverflow,updateLayout:on,changeIndex:function(e,t){return an(e,"manual",t)},scrollToIndex:ht.current?ht.current.scrollToIndex:function(){}}})),Re(on),Ae(Y),t.useEffect((function(){pe>0&&pe<1&&console.warn("[Tabs Props Warning] The value of the prop `distanceToChangeTab` is too small("+pe+"). Do you meant to use the prop `percentToChangeTab`?")}),[pe]),t.useEffect((function(){var e;(on(),"scroll"===U)&&((void 0===ee?0!==Dt:ee)&&(null===(e=ht.current)||void 0===e||e.scrollToIndex(Dt,!0)))}),[]),t.useEffect((function(){ht.current&&ht.current.setCurrentHeight()}),[m,Dt,ut]),t.useEffect((function(){Pt(void 0===d?gt:d)}),[d,gt]),Oe((function(){Lt(!0),Kt.current="manual"}),[d]),Oe((function(){T&&T(Vt,xt,Dt)}),[Vt,xt,Dt]),Oe((function(){var e,t;"scroll"!==Kt.current&&"scroll"===U&&(null===(e=ht.current)||void 0===e||e.scrollToIndex(Dt)),"click"===Kt.current&&me&&(null===(t=mt.current)||void 0===t||t.setCaterpillarAnimate());var n=Kt.current;Kt.current="",we((function(){setTimeout((function(){p&&p(l[Dt],Dt,n)}),ht.current?ht.current.getTransition():0)}))}),[Dt]);var tn=t.useCallback((function(e){if(!(y&&y(e,At.current)||jt.current)){qt.current=!0,Lt(!1),It(!1);var t=e.touches[0];Wt.current=t.clientX||0,Xt.current=t.clientY||0,Gt.current=null,jt.current=!1,Yt.current=(new Date).getTime(),Ut.current=!1}}),[y]),nn=t.useCallback((function(e){if(!(w&&w(e,At.current)||Wt.current<Je))if(X&&e.stopPropagation(),qt.current&&!jt.current){var t=e.changedTouches[0],n=t.clientX||0,r=t.clientY||0,o="ios"===$t&&n<0?0:n-Wt.current,i=r-Xt.current,a=Math.abs(o),u=Math.abs(i);if(null===Gt.current&&(Gt.current=a<u),Gt.current)return"touchmove"!==q||Zt.current||(mt.current&&mt.current.scrollToCenter(),Zt.current=!0),void zt(0);if(0===At.current&&o>0||At.current===l.length-1&&o<0)return!Ut.current&&a>Ze&&(Ut.current=!0,Qe&&Qe(o>=0?-1:1)),void zt(0);e.cancelable&&e.preventDefault(),zt(o)}else e.cancelable&&e.preventDefault()}),[w,Qe,Ze,l.length,Je,q,X]);function rn(e){if((!C||!C(e.nativeEvent,At.current))&&(X&&e.stopPropagation(),Zt.current=!1,Gt.current&&"touchend"===q&&mt.current&&mt.current.scrollToCenter(),qt.current&&!jt.current&&!Gt.current)){qt.current=!1,Lt(!0),It(!0);var t=(new Date).getTime(),n=Ft.current,r=n/(t-Yt.current)*1e3,o=xt*be,i=At.current,a=Math.abs(n)>o&&Math.abs(n)>pe||Math.abs(r)>Ee,l=i;n>0&&a?l=i-1:n<0&&a&&(l=i+1),we((function(){!function(e){jt.current=!0,e!==At.current&&wt(Ft.current);an(e,"swipe"),Yt.current=0,setTimeout((function(){jt.current=!1,wt(0)}),fe)}(l)}))}}function on(){mt.current&&mt.current.resetUnderlineStyle(),Tt(vt.current?vt.current.offsetWidth:0),St(vt.current?vt.current.offsetHeight:0),ht.current&&ht.current.setCurrentHeight()}function an(e,t,n){It(!(n||"click"===t&&xe)),Kt.current=t||"",Lt(!0),bt(e),zt(0),e!==At.current&&h&&h(l[e],e,t)}return t.useEffect((function(){return ht.current&&ht.current.dom&&en&&(ht.current.dom.addEventListener("touchstart",tn),ht.current.dom.addEventListener("touchmove",nn)),function(){ht.current&&ht.current.dom&&en&&(ht.current.dom.removeEventListener("touchstart",tn),ht.current.dom.removeEventListener("touchmove",nn))}}),[tn,nn,en]),i.default.createElement(ke,null,(function(e){var t=e.prefixCls,n=t+"-tabs",a={prefixCls:t,activeIndex:Dt,activeIndexRef:At,tabDirection:Qt,changeIndex:an,duration:se,transitionDuration:fe,wrapWidth:xt,wrapHeight:kt,distance:Vt,mode:U,translateZ:at,fullScreen:lt},c=u({ref:mt,tabs:l,onTabClick:g,type:S,tabBarPosition:s,tabBarArrange:_,tabBarScroll:B,renderUnderline:ie,useCaterpillar:me,cellTrans:Mt,jumpingDis:Et,tabBarExtra:A,onTabBarOverflowChange:b,tabBarGutter:Pe,tabBarPadding:He,tabBarFixed:D,tabBarScrollBezier:P,tabBarScrollDuration:H,tabBarScrollChance:F,tabBarHasDivider:z,underlineSize:Ve,underlineThick:Fe,underlineInnerStyle:ze,caterpillarMaxScale:je,caterpillarProperty:We,onTabBarScroll:x,hideTabBarBeforeMounted:_e,overflowThreshold:De,showUnderline:Ye,underlineAdaptive:Ue,disabled:L,renderTabBarItem:le,renderTabBarInner:ue,tabBarStyle:et,tabBarClass:nt,tabBarStopPropagation:st},a),d=i.default.createElement(Ya,u({},c));return i.default.createElement("div",{className:E(n+" "+n+"-"+s+" "+n+"-"+Qt+" all-border-box",{"full-screen":lt},r||""),style:o,ref:vt},ae?ae(d,c):d,i.default.createElement(Ga,u({ref:ht,panes:Jt,handlePaneTouchEnd:rn,paneTrans:_t,swipeable:en,lazyloadCount:Te,hideContentStyle:Se,renderHideContent:Me,tabPaneStyle:tt,getScrollContainer:K,scrollThrottle:$,scrollOffset:Q,goLastWhenScrollBottom:ne,scrollVertical:oe,tabPaneClass:rt,tabPaneExtra:ot,autoHeight:ut,onScroll:N,swipeEnergySaving:ft},a)))}))})),Ka=t.forwardRef((function(e,n){var r=e.className,o=e.style,a=e.type,l=void 0===a?"primary":a,c=e.icon,s=e.children,d=e.size,f=void 0===d?"medium":d,v=e.color,m=e.bgColor,h=e.borderColor,p=e.borderStyle,g=void 0===p?"solid":p,b=e.halfBorder,y=void 0===b||b,w=e.closeable,C=e.closeIcon,x=e.closeColor,T=e.filleted,N=e.onClose,k=e.onClick,S=t.useRef(null),R=Ie();return t.useImperativeHandle(n,(function(){return{dom:S.current}})),i.default.createElement(ke,null,(function(e){var t=e.prefixCls+"-tag";return i.default.createElement("div",{className:E(t,"all-border-box",r,t+"-"+l,{"half-border":y},R,"size-"+f,{filleted:T}),style:u({color:v,background:m,borderColor:h,borderStyle:g},o||{}),ref:S,onClick:k},c,i.default.createElement("span",{className:"tag-text"},s),w?i.default.createElement("div",{onClick:function(e){e.stopPropagation(),N&&N(e)},className:"tag-close-wrap"},C||i.default.createElement(Qo,{className:"tag-close-icon",color:x})):null)}))}));var Za=function(e){return t.forwardRef((function(n,r){var o=n.className,a=n.style,l=n.list,c=n.type,s=n.showAddButton,d=void 0===s||s,f=n.addArea,v=n.horizontalPadding,m=n.verticalPadding,h=n.onAdd,p=n.onClose,g=t.useRef(null);function b(e,t){var n=e.style||{},r=t!==l.length-1||d?{marginRight:v}:{};return u(u(u({},n),r),{marginBottom:m})}return t.useImperativeHandle(r,(function(){return{dom:g.current}})),i.default.createElement(ke,null,(function(t){var n,r=t.prefixCls,s=t.locale,v=r+"-tag-list";return i.default.createElement("div",{className:E(v,o),style:(n={},m&&"string"==typeof m?n={marginBottom:"-"+m}:m&&"number"==typeof m&&(n={marginBottom:-1*m}),u(u({},a||{}),n)),ref:g},l.map((function(t,n){return i.default.createElement(e,u({key:n},t,{style:b(t,n),type:c,onClose:function(e){t.onClose&&t.onClose(e),p&&p(n,e)}}))})),d?i.default.createElement("div",{className:"tag-list-add-wrap",onClick:h},void 0!==f?f:i.default.createElement(Ka,{type:c,className:"tag-list-add",borderStyle:"dashed",icon:i.default.createElement(ei,null),style:{marginBottom:m}},null==s?void 0:s.Tag.addTag)):null)}))}))}(Ka),$a=G(Ka,{List:Za});function Ja(e,t){return function(n,r){var o="string"==typeof n?{content:n,type:"info"}:n;void 0!==t&&(o.type=t,o.loading="loading"===t);var i=document.createElement("div");document.body.appendChild(i);var a=new Nt(e,i,r),l=a.render,c=a.unmount;var s=u(u({},o),{close:f,getContainer:function(){return i},onClose:function(){var e=o.onClose;e&&e(),c(),i.parentNode&&i.parentNode.removeChild(i)},visible:!1}),d=!1;function f(){d=!0,s.visible=!1,l(s)}return l(s),we((function(){d||(s.visible=!0,l(s))})),{update:function(e){s=u(u({},s),e),l(s)},close:f,hide:f}}}var Qa=t.forwardRef((function(e,n){var r=e.className,o=e.getContainer,a=e.visible,l=void 0!==a&&a,u=e.onClose,c=e.close,s=e.type,d=void 0===s?"info":s,f=e.icon,v=e.layout,m=void 0===v?"vertical":v,h=e.duration,p=void 0===h?3e3:h,g=e.transitionDuration,b=void 0===g?300:g,y=e.content,w=e.loading,C=void 0!==w&&w,x=e.loadingIcon,T=e.disableBodyTouch,N=void 0!==T&&T,k=e.loadingInner,S=e.direction,R=void 0===S?"center":S,M=e.typeIconMap,L=e.initialBodyOverflow,O=t.useRef(),_=t.useRef(null),I=t.useRef(!1),B=d&&"info"!==d;function D(){p&&(clearTimeout(O.current),O.current=window.setTimeout((function(){c&&c()}),p))}function A(e){N&&e.preventDefault()}function P(e){var t,n,r;return i.default.createElement("div",{className:E(e+"-wrapper","from-"+R,{"no-event":!N}),onClick:A},i.default.createElement("div",{className:E(e+"-inner",m,(t={},t[e+"-inner-mixin"]=(C||B||f)&&"vertical"===m,t))},C&&i.default.createElement("div",{className:e+"-loading-wrapper"},void 0!==x?x:i.default.createElement(tt,{className:"loading-icon",type:"arc",stroke:2,radius:k?19:11}),k?i.default.createElement("span",{className:e+"-loading-inner"},k):null),!C&&B?(n=M||{},r={success:i.default.createElement(ti,null),error:i.default.createElement(ri,null),warn:i.default.createElement(ni,null)},n[d]||r[d]||null):null,C||B||!f?null:f,y?i.default.createElement("div",{className:e+"-content"},y):null))}return t.useImperativeHandle(n,(function(){return{dom:_.current}})),Fe(l,N,L),t.useEffect((function(){var e=I.current;l?D():(clearTimeout(O.current),e&&setTimeout((function(){u&&u()}),b)),I.current=!0}),[l]),t.useEffect((function(){D()}),[p]),i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement(it,{getContainer:o},i.default.createElement("div",{className:E(t+"-toast","all-border-box",r),ref:_},i.default.createElement(Tt,{in:l,timeout:b,type:"fade"},P(t+"-toast"))))}))}));var el=G(Qa,function(e){return{toast:Ja(e),info:Ja(e,"info"),success:Ja(e,"success"),error:Ja(e,"error"),loading:Ja(e,"loading"),warn:Ja(e,"warn")}}(Se(Qa)));e.ActionSheet=Bt,e.Avatar=Ft,e.Badge=zt,e.Button=ot,e.Carousel=jt,e.Cell=Ut,e.Checkbox=ln,e.CircleProgress=un,e.Collapse=hn,e.ContextProvider=Ne,e.CountDown=An,e.DatePicker=Jn,e.Dialog=ar,e.Divider=Qn,e.Dropdown=sr,e.DropdownMenu=mr,e.Ellipsis=qr,e.Form=Qr,e.Grid=To,e.Image=Dt,e.ImagePicker=si,e.ImagePreview=Vi,e.IndexBar=Gi,e.Input=ro,e.Keyboard=Ki,e.LoadMore=Zi,e.Loading=tt,e.Masking=Lt,e.NavBar=Ji,e.NoticeBar=Qi,e.Notify=na,e.Pagination=oa,e.Picker=qn,e.PickerView=zn,e.Popover=ma,e.Popup=_t,e.PopupSwiper=ga,e.Portal=it,e.Progress=ba,e.PullRefresh=Ta,e.Radio=co,e.Rate=ho,e.SearchBar=Ra,e.ShowMonitor=Ko,e.Slider=xo,e.Stepper=Oa,e.Steps=Da,e.Sticky=zi,e.SwipeAction=Pa,e.SwipeLoad=Ha,e.Switch=Fa,e.TabBar=Wa,e.Tabs=Ua,e.Tag=$a,e.Textarea=io,e.Toast=el,e.Transition=Tt,Object.defineProperty(e,"__esModule",{value:!0})}));
|