mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2026-01-07 12:28:13 +00:00
6003 lines
199 KiB
JavaScript
6003 lines
199 KiB
JavaScript
(window.webpackJsonp = window.webpackJsonp || []).push([
|
||
[148],
|
||
{
|
||
'1j5w': function(Ae, x, s) {
|
||
'use strict';
|
||
s.d(x, 'e', function() {
|
||
return oe;
|
||
}),
|
||
s.d(x, 'b', function() {
|
||
return Te;
|
||
}),
|
||
s.d(x, 'd', function() {
|
||
return Te;
|
||
}),
|
||
s.d(x, 'c', function() {
|
||
return le;
|
||
}),
|
||
s.d(x, 'a', function() {
|
||
return et;
|
||
});
|
||
var f = s('VTBJ'),
|
||
W = s('1OyB'),
|
||
w = s('vuIU'),
|
||
S = s('JX7q'),
|
||
v = s('Ji7U'),
|
||
B = s('LK+K'),
|
||
y = s('q1tI'),
|
||
P = (function() {
|
||
var M = function(E, l) {
|
||
return (
|
||
(M =
|
||
Object.setPrototypeOf ||
|
||
({ __proto__: [] } instanceof Array &&
|
||
function(e, a) {
|
||
e.__proto__ = a;
|
||
}) ||
|
||
function(e, a) {
|
||
for (var u in a) a.hasOwnProperty(u) && (e[u] = a[u]);
|
||
}),
|
||
M(E, l)
|
||
);
|
||
};
|
||
return function(p, E) {
|
||
M(p, E);
|
||
function l() {
|
||
this.constructor = p;
|
||
}
|
||
p.prototype = E === null ? Object.create(E) : ((l.prototype = E.prototype), new l());
|
||
};
|
||
})(),
|
||
_ = y.createContext(null),
|
||
H = (function(M) {
|
||
P(p, M);
|
||
function p() {
|
||
return (M !== null && M.apply(this, arguments)) || this;
|
||
}
|
||
return (
|
||
(p.prototype.render = function() {
|
||
return y.createElement(_.Provider, { value: this.props.store }, this.props.children);
|
||
}),
|
||
p
|
||
);
|
||
})(y.Component),
|
||
Y = s('Gytx'),
|
||
Q = s.n(Y),
|
||
Se = s('2mql'),
|
||
Oe = s.n(Se),
|
||
V = (function() {
|
||
var M = function(E, l) {
|
||
return (
|
||
(M =
|
||
Object.setPrototypeOf ||
|
||
({ __proto__: [] } instanceof Array &&
|
||
function(e, a) {
|
||
e.__proto__ = a;
|
||
}) ||
|
||
function(e, a) {
|
||
for (var u in a) a.hasOwnProperty(u) && (e[u] = a[u]);
|
||
}),
|
||
M(E, l)
|
||
);
|
||
};
|
||
return function(p, E) {
|
||
M(p, E);
|
||
function l() {
|
||
this.constructor = p;
|
||
}
|
||
p.prototype = E === null ? Object.create(E) : ((l.prototype = E.prototype), new l());
|
||
};
|
||
})(),
|
||
ye = function() {
|
||
return (
|
||
(ye =
|
||
Object.assign ||
|
||
function(M) {
|
||
for (var p, E = 1, l = arguments.length; E < l; E++) {
|
||
p = arguments[E];
|
||
for (var e in p) Object.prototype.hasOwnProperty.call(p, e) && (M[e] = p[e]);
|
||
}
|
||
return M;
|
||
}),
|
||
ye.apply(this, arguments)
|
||
);
|
||
};
|
||
function Ie(M) {
|
||
return M.displayName || M.name || 'Component';
|
||
}
|
||
var Ee = function() {
|
||
return {};
|
||
};
|
||
function nt(M, p) {
|
||
p === void 0 && (p = {});
|
||
var E = !!M,
|
||
l = M || Ee;
|
||
return function(a) {
|
||
var u = (function(N) {
|
||
V(T, N);
|
||
function T(b, C) {
|
||
var D = N.call(this, b, C) || this;
|
||
return (
|
||
(D.unsubscribe = null),
|
||
(D.handleChange = function() {
|
||
if (!D.unsubscribe) return;
|
||
var ne = l(D.store.getState(), D.props);
|
||
D.setState({ subscribed: ne });
|
||
}),
|
||
(D.store = D.context),
|
||
(D.state = { subscribed: l(D.store.getState(), b), store: D.store, props: b }),
|
||
D
|
||
);
|
||
}
|
||
return (
|
||
(T.getDerivedStateFromProps = function(b, C) {
|
||
return M && M.length === 2 && b !== C.props
|
||
? { subscribed: l(C.store.getState(), b), props: b }
|
||
: { props: b };
|
||
}),
|
||
(T.prototype.componentDidMount = function() {
|
||
this.trySubscribe();
|
||
}),
|
||
(T.prototype.componentWillUnmount = function() {
|
||
this.tryUnsubscribe();
|
||
}),
|
||
(T.prototype.shouldComponentUpdate = function(b, C) {
|
||
return !Q()(this.props, b) || !Q()(this.state.subscribed, C.subscribed);
|
||
}),
|
||
(T.prototype.trySubscribe = function() {
|
||
E &&
|
||
((this.unsubscribe = this.store.subscribe(this.handleChange)),
|
||
this.handleChange());
|
||
}),
|
||
(T.prototype.tryUnsubscribe = function() {
|
||
this.unsubscribe && (this.unsubscribe(), (this.unsubscribe = null));
|
||
}),
|
||
(T.prototype.render = function() {
|
||
var b = ye(ye(ye({}, this.props), this.state.subscribed), { store: this.store });
|
||
return y.createElement(a, ye({}, b, { ref: this.props.miniStoreForwardedRef }));
|
||
}),
|
||
(T.displayName = 'Connect(' + Ie(a) + ')'),
|
||
(T.contextType = _),
|
||
T
|
||
);
|
||
})(y.Component);
|
||
if (p.forwardRef) {
|
||
var g = y.forwardRef(function(N, T) {
|
||
return y.createElement(u, ye({}, N, { miniStoreForwardedRef: T }));
|
||
});
|
||
return Oe()(g, a);
|
||
}
|
||
return Oe()(u, a);
|
||
};
|
||
}
|
||
var z = function() {
|
||
return (
|
||
(z =
|
||
Object.assign ||
|
||
function(M) {
|
||
for (var p, E = 1, l = arguments.length; E < l; E++) {
|
||
p = arguments[E];
|
||
for (var e in p) Object.prototype.hasOwnProperty.call(p, e) && (M[e] = p[e]);
|
||
}
|
||
return M;
|
||
}),
|
||
z.apply(this, arguments)
|
||
);
|
||
};
|
||
function Ce(M) {
|
||
var p = M,
|
||
E = [];
|
||
function l(u) {
|
||
p = z(z({}, p), u);
|
||
for (var g = 0; g < E.length; g++) E[g]();
|
||
}
|
||
function e() {
|
||
return p;
|
||
}
|
||
function a(u) {
|
||
return (
|
||
E.push(u),
|
||
function() {
|
||
var N = E.indexOf(u);
|
||
E.splice(N, 1);
|
||
}
|
||
);
|
||
}
|
||
return { setState: l, getState: e, subscribe: a };
|
||
}
|
||
var Je = s('BGR+'),
|
||
Xe = s('wx14'),
|
||
me = s('rePB'),
|
||
Ze = s('4IlW'),
|
||
it = s('2GS6'),
|
||
jt = s('Zm9Q'),
|
||
kt = s('TSYQ'),
|
||
at = s.n(kt),
|
||
_t = s('U8pU'),
|
||
Wt = s('ODXe'),
|
||
Bt = /iPhone/i,
|
||
ht = /iPod/i,
|
||
Ht = /iPad/i,
|
||
gt = /\bAndroid(?:.+)Mobile\b/i,
|
||
Nt = /Android/i,
|
||
rt = /\bAndroid(?:.+)SD4930UR\b/i,
|
||
At = /\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,
|
||
qe = /Windows Phone/i,
|
||
Xt = /\bWindows(?:.+)ARM\b/i,
|
||
Ft = /BlackBerry/i,
|
||
Rt = /BB10/i,
|
||
zt = /Opera Mini/i,
|
||
Vt = /\b(CriOS|Chrome)(?:.+)Mobile/i,
|
||
$t = /Mobile(?:.+)Firefox\b/i;
|
||
function X(M, p) {
|
||
return M.test(p);
|
||
}
|
||
function Lt(M) {
|
||
var p = M || (typeof navigator != 'undefined' ? navigator.userAgent : ''),
|
||
E = p.split('[FBAN');
|
||
if (typeof E[1] != 'undefined') {
|
||
var l = E,
|
||
e = Object(Wt.a)(l, 1);
|
||
p = e[0];
|
||
}
|
||
if (((E = p.split('Twitter')), typeof E[1] != 'undefined')) {
|
||
var a = E,
|
||
u = Object(Wt.a)(a, 1);
|
||
p = u[0];
|
||
}
|
||
var g = {
|
||
apple: {
|
||
phone: X(Bt, p) && !X(qe, p),
|
||
ipod: X(ht, p),
|
||
tablet: !X(Bt, p) && X(Ht, p) && !X(qe, p),
|
||
device: (X(Bt, p) || X(ht, p) || X(Ht, p)) && !X(qe, p),
|
||
},
|
||
amazon: { phone: X(rt, p), tablet: !X(rt, p) && X(At, p), device: X(rt, p) || X(At, p) },
|
||
android: {
|
||
phone: (!X(qe, p) && X(rt, p)) || (!X(qe, p) && X(gt, p)),
|
||
tablet: !X(qe, p) && !X(rt, p) && !X(gt, p) && (X(At, p) || X(Nt, p)),
|
||
device:
|
||
(!X(qe, p) && (X(rt, p) || X(At, p) || X(gt, p) || X(Nt, p))) || X(/\bokhttp\b/i, p),
|
||
},
|
||
windows: { phone: X(qe, p), tablet: X(Xt, p), device: X(qe, p) || X(Xt, p) },
|
||
other: {
|
||
blackberry: X(Ft, p),
|
||
blackberry10: X(Rt, p),
|
||
opera: X(zt, p),
|
||
firefox: X($t, p),
|
||
chrome: X(Vt, p),
|
||
device: X(Ft, p) || X(Rt, p) || X(zt, p) || X($t, p) || X(Vt, p),
|
||
},
|
||
any: null,
|
||
phone: null,
|
||
tablet: null,
|
||
};
|
||
return (
|
||
(g.any = g.apple.device || g.android.device || g.windows.device || g.other.device),
|
||
(g.phone = g.apple.phone || g.android.phone || g.windows.phone),
|
||
(g.tablet = g.apple.tablet || g.android.tablet || g.windows.tablet),
|
||
g
|
||
);
|
||
}
|
||
var St = Object(f.a)(Object(f.a)({}, Lt()), {}, { isMobile: Lt }),
|
||
en = St;
|
||
function Ue() {}
|
||
function Dt(M, p, E) {
|
||
var l = p || '';
|
||
return M.key || ''.concat(l, 'item_').concat(E);
|
||
}
|
||
function dt(M) {
|
||
return ''.concat(M, '-menu-');
|
||
}
|
||
function de(M, p) {
|
||
var E = -1;
|
||
y.Children.forEach(M, function(l) {
|
||
(E += 1),
|
||
l && l.type && l.type.isMenuItemGroup
|
||
? y.Children.forEach(l.props.children, function(e) {
|
||
(E += 1), p(e, E);
|
||
})
|
||
: p(l, E);
|
||
});
|
||
}
|
||
function Re(M, p, E) {
|
||
if (!M || E.find) return;
|
||
y.Children.forEach(M, function(l) {
|
||
if (l) {
|
||
var e = l.type;
|
||
if (!e || !(e.isSubMenu || e.isMenuItem || e.isMenuItemGroup)) return;
|
||
p.indexOf(l.key) !== -1
|
||
? (E.find = !0)
|
||
: l.props.children && Re(l.props.children, p, E);
|
||
}
|
||
});
|
||
}
|
||
var ft = [
|
||
'defaultSelectedKeys',
|
||
'selectedKeys',
|
||
'defaultOpenKeys',
|
||
'openKeys',
|
||
'mode',
|
||
'getPopupContainer',
|
||
'onSelect',
|
||
'onDeselect',
|
||
'onDestroy',
|
||
'openTransitionName',
|
||
'openAnimation',
|
||
'subMenuOpenDelay',
|
||
'subMenuCloseDelay',
|
||
'forceSubMenuRender',
|
||
'triggerSubMenuAction',
|
||
'level',
|
||
'selectable',
|
||
'multiple',
|
||
'onOpenChange',
|
||
'visible',
|
||
'focusable',
|
||
'defaultActiveFirst',
|
||
'prefixCls',
|
||
'inlineIndent',
|
||
'parentMenu',
|
||
'title',
|
||
'rootPrefixCls',
|
||
'eventKey',
|
||
'active',
|
||
'onItemHover',
|
||
'onTitleMouseEnter',
|
||
'onTitleMouseLeave',
|
||
'onTitleClick',
|
||
'popupAlign',
|
||
'popupOffset',
|
||
'isOpen',
|
||
'renderMenuItem',
|
||
'manualRef',
|
||
'subMenuKey',
|
||
'disabled',
|
||
'index',
|
||
'isSelected',
|
||
'store',
|
||
'activeKey',
|
||
'builtinPlacements',
|
||
'overflowedIndicator',
|
||
'motion',
|
||
'attribute',
|
||
'value',
|
||
'popupClassName',
|
||
'inlineCollapsed',
|
||
'menu',
|
||
'theme',
|
||
'itemIcon',
|
||
'expandIcon',
|
||
],
|
||
tn = function(p) {
|
||
var E = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1,
|
||
l =
|
||
p && typeof p.getBoundingClientRect == 'function' && p.getBoundingClientRect().width;
|
||
if (l) {
|
||
if (E) {
|
||
var e = getComputedStyle(p),
|
||
a = e.marginLeft,
|
||
u = e.marginRight;
|
||
l += +a.replace('px', '') + +u.replace('px', '');
|
||
}
|
||
l = +l.toFixed(6);
|
||
}
|
||
return l || 0;
|
||
},
|
||
Gt = function(p, E, l) {
|
||
p && Object(_t.a)(p.style) === 'object' && (p.style[E] = l);
|
||
},
|
||
fn = function() {
|
||
return en.any;
|
||
},
|
||
Yt = s('KQm4'),
|
||
Qt = s('Ff2n'),
|
||
pt = s('i8i4'),
|
||
ln = s('bdgK'),
|
||
yn = s('uciX'),
|
||
h = s('8XRh'),
|
||
j = { adjustX: 1, adjustY: 1 },
|
||
R = {
|
||
topLeft: { points: ['bl', 'tl'], overflow: j, offset: [0, -7] },
|
||
bottomLeft: { points: ['tl', 'bl'], overflow: j, offset: [0, 7] },
|
||
leftTop: { points: ['tr', 'tl'], overflow: j, offset: [-4, 0] },
|
||
rightTop: { points: ['tl', 'tr'], overflow: j, offset: [4, 0] },
|
||
},
|
||
k = {
|
||
topLeft: { points: ['bl', 'tl'], overflow: j, offset: [0, -7] },
|
||
bottomLeft: { points: ['tl', 'bl'], overflow: j, offset: [0, 7] },
|
||
rightTop: { points: ['tr', 'tl'], overflow: j, offset: [-4, 0] },
|
||
leftTop: { points: ['tl', 'tr'], overflow: j, offset: [4, 0] },
|
||
},
|
||
I = R,
|
||
L = 0,
|
||
q = {
|
||
horizontal: 'bottomLeft',
|
||
vertical: 'rightTop',
|
||
'vertical-left': 'rightTop',
|
||
'vertical-right': 'leftTop',
|
||
},
|
||
ee = function(p, E, l) {
|
||
var e = dt(E),
|
||
a = p.getState();
|
||
p.setState({
|
||
defaultActiveFirst: Object(f.a)(
|
||
Object(f.a)({}, a.defaultActiveFirst),
|
||
{},
|
||
Object(me.a)({}, e, l),
|
||
),
|
||
});
|
||
},
|
||
$ = (function(M) {
|
||
Object(v.a)(E, M);
|
||
var p = Object(B.a)(E);
|
||
function E(l) {
|
||
var e;
|
||
Object(W.a)(this, E),
|
||
(e = p.call(this, l)),
|
||
(e.onDestroy = function(b) {
|
||
e.props.onDestroy(b);
|
||
}),
|
||
(e.onKeyDown = function(b) {
|
||
var C = b.keyCode,
|
||
D = e.menuInstance,
|
||
ne = e.props,
|
||
te = ne.isOpen,
|
||
ge = ne.store;
|
||
if (C === Ze.a.ENTER) return e.onTitleClick(b), ee(ge, e.props.eventKey, !0), !0;
|
||
if (C === Ze.a.RIGHT)
|
||
return (
|
||
te ? D.onKeyDown(b) : (e.triggerOpenChange(!0), ee(ge, e.props.eventKey, !0)),
|
||
!0
|
||
);
|
||
if (C === Ze.a.LEFT) {
|
||
var ue;
|
||
if (te) ue = D.onKeyDown(b);
|
||
else return;
|
||
return ue || (e.triggerOpenChange(!1), (ue = !0)), ue;
|
||
}
|
||
return te && (C === Ze.a.UP || C === Ze.a.DOWN) ? D.onKeyDown(b) : void 0;
|
||
}),
|
||
(e.onOpenChange = function(b) {
|
||
e.props.onOpenChange(b);
|
||
}),
|
||
(e.onPopupVisibleChange = function(b) {
|
||
e.triggerOpenChange(b, b ? 'mouseenter' : 'mouseleave');
|
||
}),
|
||
(e.onMouseEnter = function(b) {
|
||
var C = e.props,
|
||
D = C.eventKey,
|
||
ne = C.onMouseEnter,
|
||
te = C.store;
|
||
ee(te, e.props.eventKey, !1), ne({ key: D, domEvent: b });
|
||
}),
|
||
(e.onMouseLeave = function(b) {
|
||
var C = e.props,
|
||
D = C.parentMenu,
|
||
ne = C.eventKey,
|
||
te = C.onMouseLeave;
|
||
(D.subMenuInstance = Object(S.a)(e)), te({ key: ne, domEvent: b });
|
||
}),
|
||
(e.onTitleMouseEnter = function(b) {
|
||
var C = e.props,
|
||
D = C.eventKey,
|
||
ne = C.onItemHover,
|
||
te = C.onTitleMouseEnter;
|
||
ne({ key: D, hover: !0 }), te({ key: D, domEvent: b });
|
||
}),
|
||
(e.onTitleMouseLeave = function(b) {
|
||
var C = e.props,
|
||
D = C.parentMenu,
|
||
ne = C.eventKey,
|
||
te = C.onItemHover,
|
||
ge = C.onTitleMouseLeave;
|
||
(D.subMenuInstance = Object(S.a)(e)),
|
||
te({ key: ne, hover: !1 }),
|
||
ge({ key: ne, domEvent: b });
|
||
}),
|
||
(e.onTitleClick = function(b) {
|
||
var C = Object(S.a)(e),
|
||
D = C.props;
|
||
if (
|
||
(D.onTitleClick({ key: D.eventKey, domEvent: b }),
|
||
D.triggerSubMenuAction === 'hover')
|
||
)
|
||
return;
|
||
e.triggerOpenChange(!D.isOpen, 'click'), ee(D.store, e.props.eventKey, !1);
|
||
}),
|
||
(e.onSubMenuClick = function(b) {
|
||
typeof e.props.onClick == 'function' && e.props.onClick(e.addKeyPath(b));
|
||
}),
|
||
(e.onSelect = function(b) {
|
||
e.props.onSelect(b);
|
||
}),
|
||
(e.onDeselect = function(b) {
|
||
e.props.onDeselect(b);
|
||
}),
|
||
(e.getPrefixCls = function() {
|
||
return ''.concat(e.props.rootPrefixCls, '-submenu');
|
||
}),
|
||
(e.getActiveClassName = function() {
|
||
return ''.concat(e.getPrefixCls(), '-active');
|
||
}),
|
||
(e.getDisabledClassName = function() {
|
||
return ''.concat(e.getPrefixCls(), '-disabled');
|
||
}),
|
||
(e.getSelectedClassName = function() {
|
||
return ''.concat(e.getPrefixCls(), '-selected');
|
||
}),
|
||
(e.getOpenClassName = function() {
|
||
return ''.concat(e.props.rootPrefixCls, '-submenu-open');
|
||
}),
|
||
(e.saveMenuInstance = function(b) {
|
||
e.menuInstance = b;
|
||
}),
|
||
(e.addKeyPath = function(b) {
|
||
return Object(f.a)(
|
||
Object(f.a)({}, b),
|
||
{},
|
||
{ keyPath: (b.keyPath || []).concat(e.props.eventKey) },
|
||
);
|
||
}),
|
||
(e.triggerOpenChange = function(b, C) {
|
||
var D = e.props.eventKey,
|
||
ne = function() {
|
||
e.onOpenChange({ key: D, item: Object(S.a)(e), trigger: C, open: b });
|
||
};
|
||
C === 'mouseenter'
|
||
? (e.mouseenterTimeout = setTimeout(function() {
|
||
ne();
|
||
}, 0))
|
||
: ne();
|
||
}),
|
||
(e.isChildrenSelected = function() {
|
||
var b = { find: !1 };
|
||
return Re(e.props.children, e.props.selectedKeys, b), b.find;
|
||
}),
|
||
(e.isOpen = function() {
|
||
return e.props.openKeys.indexOf(e.props.eventKey) !== -1;
|
||
}),
|
||
(e.adjustWidth = function() {
|
||
if (!e.subMenuTitle || !e.menuInstance) return;
|
||
var b = pt.findDOMNode(e.menuInstance);
|
||
if (b.offsetWidth >= e.subMenuTitle.offsetWidth) return;
|
||
b.style.minWidth = ''.concat(e.subMenuTitle.offsetWidth, 'px');
|
||
}),
|
||
(e.saveSubMenuTitle = function(b) {
|
||
e.subMenuTitle = b;
|
||
}),
|
||
(e.getBaseProps = function() {
|
||
var b = Object(S.a)(e),
|
||
C = b.props;
|
||
return {
|
||
mode: C.mode === 'horizontal' ? 'vertical' : C.mode,
|
||
visible: e.props.isOpen,
|
||
level: C.level + 1,
|
||
inlineIndent: C.inlineIndent,
|
||
focusable: !1,
|
||
onClick: e.onSubMenuClick,
|
||
onSelect: e.onSelect,
|
||
onDeselect: e.onDeselect,
|
||
onDestroy: e.onDestroy,
|
||
selectedKeys: C.selectedKeys,
|
||
eventKey: ''.concat(C.eventKey, '-menu-'),
|
||
openKeys: C.openKeys,
|
||
motion: C.motion,
|
||
onOpenChange: e.onOpenChange,
|
||
subMenuOpenDelay: C.subMenuOpenDelay,
|
||
parentMenu: Object(S.a)(e),
|
||
subMenuCloseDelay: C.subMenuCloseDelay,
|
||
forceSubMenuRender: C.forceSubMenuRender,
|
||
triggerSubMenuAction: C.triggerSubMenuAction,
|
||
builtinPlacements: C.builtinPlacements,
|
||
defaultActiveFirst: C.store.getState().defaultActiveFirst[dt(C.eventKey)],
|
||
multiple: C.multiple,
|
||
prefixCls: C.rootPrefixCls,
|
||
id: e.internalMenuId,
|
||
manualRef: e.saveMenuInstance,
|
||
itemIcon: C.itemIcon,
|
||
expandIcon: C.expandIcon,
|
||
direction: C.direction,
|
||
};
|
||
}),
|
||
(e.getMotion = function(b, C) {
|
||
var D = Object(S.a)(e),
|
||
ne = D.haveRendered,
|
||
te = e.props,
|
||
ge = te.motion,
|
||
ue = te.rootPrefixCls,
|
||
ot = Object(f.a)(
|
||
Object(f.a)({}, ge),
|
||
{},
|
||
{
|
||
leavedClassName: ''.concat(ue, '-hidden'),
|
||
removeOnLeave: !1,
|
||
motionAppear: ne || !C || b !== 'inline',
|
||
},
|
||
);
|
||
return ot;
|
||
});
|
||
var a = l.store,
|
||
u = l.eventKey,
|
||
g = a.getState(),
|
||
N = g.defaultActiveFirst;
|
||
e.isRootMenu = !1;
|
||
var T = !1;
|
||
return N && (T = N[u]), ee(a, u, T), e;
|
||
}
|
||
return (
|
||
Object(w.a)(E, [
|
||
{
|
||
key: 'componentDidMount',
|
||
value: function() {
|
||
this.componentDidUpdate();
|
||
},
|
||
},
|
||
{
|
||
key: 'componentDidUpdate',
|
||
value: function() {
|
||
var e = this,
|
||
a = this.props,
|
||
u = a.mode,
|
||
g = a.parentMenu,
|
||
N = a.manualRef,
|
||
T = a.isOpen;
|
||
if (
|
||
(N && N(this), u !== 'horizontal' || !(g == null ? void 0 : g.isRootMenu) || !T)
|
||
)
|
||
return;
|
||
this.minWidthTimeout = setTimeout(function() {
|
||
return e.adjustWidth();
|
||
}, 0);
|
||
},
|
||
},
|
||
{
|
||
key: 'componentWillUnmount',
|
||
value: function() {
|
||
var e = this.props,
|
||
a = e.onDestroy,
|
||
u = e.eventKey;
|
||
a && a(u),
|
||
this.minWidthTimeout && clearTimeout(this.minWidthTimeout),
|
||
this.mouseenterTimeout && clearTimeout(this.mouseenterTimeout);
|
||
},
|
||
},
|
||
{
|
||
key: 'renderChildren',
|
||
value: function(e) {
|
||
var a = this,
|
||
u = this.getBaseProps(),
|
||
g = this.getMotion(u.mode, u.visible);
|
||
if (
|
||
((this.haveRendered = !0),
|
||
(this.haveOpened = this.haveOpened || u.visible || u.forceSubMenuRender),
|
||
!this.haveOpened)
|
||
)
|
||
return y.createElement('div', null);
|
||
var N = u.direction;
|
||
return y.createElement(
|
||
h.default,
|
||
Object.assign({ visible: u.visible }, g),
|
||
function(T) {
|
||
var b = T.className,
|
||
C = T.style,
|
||
D = at()(
|
||
''.concat(u.prefixCls, '-sub'),
|
||
b,
|
||
Object(me.a)({}, ''.concat(u.prefixCls, '-rtl'), N === 'rtl'),
|
||
);
|
||
return y.createElement(
|
||
je,
|
||
Object.assign({}, u, { id: a.internalMenuId, className: D, style: C }),
|
||
e,
|
||
);
|
||
},
|
||
);
|
||
},
|
||
},
|
||
{
|
||
key: 'render',
|
||
value: function() {
|
||
var e,
|
||
a,
|
||
u = Object(f.a)({}, this.props),
|
||
g = u.isOpen,
|
||
N = this.getPrefixCls(),
|
||
T = u.mode === 'inline',
|
||
b = at()(
|
||
N,
|
||
''.concat(N, '-').concat(u.mode),
|
||
((e = {}),
|
||
Object(me.a)(e, u.className, !!u.className),
|
||
Object(me.a)(e, this.getOpenClassName(), g),
|
||
Object(me.a)(e, this.getActiveClassName(), u.active || (g && !T)),
|
||
Object(me.a)(e, this.getDisabledClassName(), u.disabled),
|
||
Object(me.a)(e, this.getSelectedClassName(), this.isChildrenSelected()),
|
||
e),
|
||
);
|
||
this.internalMenuId ||
|
||
(u.eventKey
|
||
? (this.internalMenuId = ''.concat(u.eventKey, '$Menu'))
|
||
: ((L += 1), (this.internalMenuId = '$__$'.concat(L, '$Menu'))));
|
||
var C = {},
|
||
D = {},
|
||
ne = {};
|
||
u.disabled ||
|
||
((C = { onMouseLeave: this.onMouseLeave, onMouseEnter: this.onMouseEnter }),
|
||
(D = { onClick: this.onTitleClick }),
|
||
(ne = {
|
||
onMouseEnter: this.onTitleMouseEnter,
|
||
onMouseLeave: this.onTitleMouseLeave,
|
||
}));
|
||
var te = {},
|
||
ge = u.direction;
|
||
T &&
|
||
(ge === 'rtl'
|
||
? (te.paddingRight = u.inlineIndent * u.level)
|
||
: (te.paddingLeft = u.inlineIndent * u.level));
|
||
var ue = {};
|
||
this.props.isOpen && (ue = { 'aria-owns': this.internalMenuId });
|
||
var ot = null;
|
||
u.mode !== 'horizontal' &&
|
||
((ot = this.props.expandIcon),
|
||
typeof this.props.expandIcon == 'function' &&
|
||
(ot = y.createElement(this.props.expandIcon, Object(f.a)({}, this.props))));
|
||
var xt = y.createElement(
|
||
'div',
|
||
Object.assign(
|
||
{
|
||
ref: this.saveSubMenuTitle,
|
||
style: te,
|
||
className: ''.concat(N, '-title'),
|
||
role: 'button',
|
||
},
|
||
ne,
|
||
D,
|
||
{ 'aria-expanded': g },
|
||
ue,
|
||
{
|
||
'aria-haspopup': 'true',
|
||
title: typeof u.title == 'string' ? u.title : void 0,
|
||
},
|
||
),
|
||
u.title,
|
||
ot || y.createElement('i', { className: ''.concat(N, '-arrow') }),
|
||
),
|
||
bt = this.renderChildren(u.children),
|
||
tt = ((a = u.parentMenu) === null || a === void 0
|
||
? void 0
|
||
: a.isRootMenu)
|
||
? u.parentMenu.props.getPopupContainer
|
||
: function(Jt) {
|
||
return Jt.parentNode;
|
||
},
|
||
It = q[u.mode],
|
||
nn = u.popupOffset ? { offset: u.popupOffset } : {},
|
||
Ut = u.mode === 'inline' ? '' : u.popupClassName;
|
||
Ut += ge === 'rtl' ? ' '.concat(N, '-rtl') : '';
|
||
var mt = u.disabled,
|
||
pn = u.triggerSubMenuAction,
|
||
un = u.subMenuOpenDelay,
|
||
cn = u.forceSubMenuRender,
|
||
mn = u.subMenuCloseDelay,
|
||
on = u.builtinPlacements;
|
||
ft.forEach(function(Jt) {
|
||
return delete u[Jt];
|
||
}),
|
||
delete u.onClick;
|
||
var an = ge === 'rtl' ? Object.assign({}, k, on) : Object.assign({}, R, on);
|
||
return (
|
||
delete u.direction,
|
||
y.createElement(
|
||
'li',
|
||
Object.assign({}, u, C, { className: b, role: 'menuitem' }),
|
||
T && xt,
|
||
T && bt,
|
||
!T &&
|
||
y.createElement(
|
||
yn.a,
|
||
{
|
||
prefixCls: N,
|
||
popupClassName: at()(''.concat(N, '-popup'), Ut),
|
||
getPopupContainer: tt,
|
||
builtinPlacements: an,
|
||
popupPlacement: It,
|
||
popupVisible: g,
|
||
popupAlign: nn,
|
||
popup: bt,
|
||
action: mt ? [] : [pn],
|
||
mouseEnterDelay: un,
|
||
mouseLeaveDelay: mn,
|
||
onPopupVisibleChange: this.onPopupVisibleChange,
|
||
forceRender: cn,
|
||
},
|
||
xt,
|
||
),
|
||
)
|
||
);
|
||
},
|
||
},
|
||
]),
|
||
E
|
||
);
|
||
})(y.Component);
|
||
$.defaultProps = {
|
||
onMouseEnter: Ue,
|
||
onMouseLeave: Ue,
|
||
onTitleMouseEnter: Ue,
|
||
onTitleMouseLeave: Ue,
|
||
onTitleClick: Ue,
|
||
manualRef: Ue,
|
||
mode: 'vertical',
|
||
title: '',
|
||
};
|
||
var fe = nt(function(M, p) {
|
||
var E = M.openKeys,
|
||
l = M.activeKey,
|
||
e = M.selectedKeys,
|
||
a = p.eventKey,
|
||
u = p.subMenuKey;
|
||
return { isOpen: E.indexOf(a) > -1, active: l[u] === a, selectedKeys: e };
|
||
})($);
|
||
fe.isSubMenu = !0;
|
||
var oe = fe,
|
||
re = 'menuitem-overflowed',
|
||
ve = 0.5,
|
||
De = (function(M) {
|
||
Object(v.a)(E, M);
|
||
var p = Object(B.a)(E);
|
||
function E() {
|
||
var l;
|
||
return (
|
||
Object(W.a)(this, E),
|
||
(l = p.apply(this, arguments)),
|
||
(l.resizeObserver = null),
|
||
(l.mutationObserver = null),
|
||
(l.originalTotalWidth = 0),
|
||
(l.overflowedItems = []),
|
||
(l.menuItemSizes = []),
|
||
(l.cancelFrameId = null),
|
||
(l.state = { lastVisibleIndex: void 0 }),
|
||
(l.getMenuItemNodes = function() {
|
||
var e = l.props.prefixCls,
|
||
a = pt.findDOMNode(Object(S.a)(l));
|
||
return a
|
||
? [].slice.call(a.children).filter(function(u) {
|
||
return (
|
||
u.className.split(' ').indexOf(''.concat(e, '-overflowed-submenu')) < 0
|
||
);
|
||
})
|
||
: [];
|
||
}),
|
||
(l.getOverflowedSubMenuItem = function(e, a, u) {
|
||
var g = l.props,
|
||
N = g.overflowedIndicator,
|
||
T = g.level,
|
||
b = g.mode,
|
||
C = g.prefixCls,
|
||
D = g.theme;
|
||
if (T !== 1 || b !== 'horizontal') return null;
|
||
var ne = l.props.children[0],
|
||
te = ne.props,
|
||
ge = te.children,
|
||
ue = te.title,
|
||
ot = te.style,
|
||
xt = Object(Qt.a)(te, ['children', 'title', 'style']),
|
||
bt = Object(f.a)({}, ot),
|
||
tt = ''.concat(e, '-overflowed-indicator'),
|
||
It = ''.concat(e, '-overflowed-indicator');
|
||
a.length === 0 && u !== !0
|
||
? (bt = Object(f.a)(Object(f.a)({}, bt), {}, { display: 'none' }))
|
||
: u &&
|
||
((bt = Object(f.a)(
|
||
Object(f.a)({}, bt),
|
||
{},
|
||
{ visibility: 'hidden', position: 'absolute' },
|
||
)),
|
||
(tt = ''.concat(tt, '-placeholder')),
|
||
(It = ''.concat(It, '-placeholder')));
|
||
var nn = D ? ''.concat(C, '-').concat(D) : '',
|
||
Ut = {};
|
||
return (
|
||
ft.forEach(function(mt) {
|
||
xt[mt] !== void 0 && (Ut[mt] = xt[mt]);
|
||
}),
|
||
y.createElement(
|
||
oe,
|
||
Object.assign(
|
||
{
|
||
title: N,
|
||
className: ''.concat(C, '-overflowed-submenu'),
|
||
popupClassName: nn,
|
||
},
|
||
Ut,
|
||
{ key: tt, eventKey: It, disabled: !1, style: bt },
|
||
),
|
||
a,
|
||
)
|
||
);
|
||
}),
|
||
(l.setChildrenWidthAndResize = function() {
|
||
if (l.props.mode !== 'horizontal') return;
|
||
var e = pt.findDOMNode(Object(S.a)(l));
|
||
if (!e) return;
|
||
var a = e.children;
|
||
if (!a || a.length === 0) return;
|
||
var u = e.children[a.length - 1];
|
||
Gt(u, 'display', 'inline-block');
|
||
var g = l.getMenuItemNodes(),
|
||
N = g.filter(function(T) {
|
||
return T.className.split(' ').indexOf(re) >= 0;
|
||
});
|
||
N.forEach(function(T) {
|
||
Gt(T, 'display', 'inline-block');
|
||
}),
|
||
(l.menuItemSizes = g.map(function(T) {
|
||
return tn(T, !0);
|
||
})),
|
||
N.forEach(function(T) {
|
||
Gt(T, 'display', 'none');
|
||
}),
|
||
(l.overflowedIndicatorWidth = tn(e.children[e.children.length - 1], !0)),
|
||
(l.originalTotalWidth = l.menuItemSizes.reduce(function(T, b) {
|
||
return T + b;
|
||
}, 0)),
|
||
l.handleResize(),
|
||
Gt(u, 'display', 'none');
|
||
}),
|
||
(l.handleResize = function() {
|
||
if (l.props.mode !== 'horizontal') return;
|
||
var e = pt.findDOMNode(Object(S.a)(l));
|
||
if (!e) return;
|
||
var a = tn(e);
|
||
l.overflowedItems = [];
|
||
var u = 0,
|
||
g;
|
||
l.originalTotalWidth > a + ve &&
|
||
((g = -1),
|
||
l.menuItemSizes.forEach(function(N) {
|
||
(u += N), u + l.overflowedIndicatorWidth <= a && (g += 1);
|
||
})),
|
||
l.setState({ lastVisibleIndex: g });
|
||
}),
|
||
l
|
||
);
|
||
}
|
||
return (
|
||
Object(w.a)(E, [
|
||
{
|
||
key: 'componentDidMount',
|
||
value: function() {
|
||
var e = this;
|
||
if (
|
||
(this.setChildrenWidthAndResize(),
|
||
this.props.level === 1 && this.props.mode === 'horizontal')
|
||
) {
|
||
var a = pt.findDOMNode(this);
|
||
if (!a) return;
|
||
(this.resizeObserver = new ln.a(function(u) {
|
||
u.forEach(function() {
|
||
var g = e.cancelFrameId;
|
||
cancelAnimationFrame(g),
|
||
(e.cancelFrameId = requestAnimationFrame(e.setChildrenWidthAndResize));
|
||
});
|
||
})),
|
||
[].slice
|
||
.call(a.children)
|
||
.concat(a)
|
||
.forEach(function(u) {
|
||
e.resizeObserver.observe(u);
|
||
}),
|
||
typeof MutationObserver != 'undefined' &&
|
||
((this.mutationObserver = new MutationObserver(function() {
|
||
e.resizeObserver.disconnect(),
|
||
[].slice
|
||
.call(a.children)
|
||
.concat(a)
|
||
.forEach(function(u) {
|
||
e.resizeObserver.observe(u);
|
||
}),
|
||
e.setChildrenWidthAndResize();
|
||
})),
|
||
this.mutationObserver.observe(a, {
|
||
attributes: !1,
|
||
childList: !0,
|
||
subTree: !1,
|
||
}));
|
||
}
|
||
},
|
||
},
|
||
{
|
||
key: 'componentWillUnmount',
|
||
value: function() {
|
||
this.resizeObserver && this.resizeObserver.disconnect(),
|
||
this.mutationObserver && this.mutationObserver.disconnect(),
|
||
cancelAnimationFrame(this.cancelFrameId);
|
||
},
|
||
},
|
||
{
|
||
key: 'renderChildren',
|
||
value: function(e) {
|
||
var a = this,
|
||
u = this.state.lastVisibleIndex;
|
||
return (e || []).reduce(function(g, N, T) {
|
||
var b = N;
|
||
if (a.props.mode === 'horizontal') {
|
||
var C = a.getOverflowedSubMenuItem(N.props.eventKey, []);
|
||
u !== void 0 &&
|
||
a.props.className.indexOf(''.concat(a.props.prefixCls, '-root')) !== -1 &&
|
||
(T > u &&
|
||
(b = y.cloneElement(N, {
|
||
style: { display: 'none' },
|
||
eventKey: ''.concat(N.props.eventKey, '-hidden'),
|
||
className: ''.concat(re),
|
||
})),
|
||
T === u + 1 &&
|
||
((a.overflowedItems = e.slice(u + 1).map(function(ne) {
|
||
return y.cloneElement(ne, {
|
||
key: ne.props.eventKey,
|
||
mode: 'vertical-left',
|
||
});
|
||
})),
|
||
(C = a.getOverflowedSubMenuItem(N.props.eventKey, a.overflowedItems))));
|
||
var D = [].concat(Object(Yt.a)(g), [C, b]);
|
||
return (
|
||
T === e.length - 1 &&
|
||
D.push(a.getOverflowedSubMenuItem(N.props.eventKey, [], !0)),
|
||
D
|
||
);
|
||
}
|
||
return [].concat(Object(Yt.a)(g), [b]);
|
||
}, []);
|
||
},
|
||
},
|
||
{
|
||
key: 'render',
|
||
value: function() {
|
||
var e = this.props,
|
||
a = e.visible,
|
||
u = e.prefixCls,
|
||
g = e.overflowedIndicator,
|
||
N = e.mode,
|
||
T = e.level,
|
||
b = e.tag,
|
||
C = e.children,
|
||
D = e.theme,
|
||
ne = Object(Qt.a)(e, [
|
||
'visible',
|
||
'prefixCls',
|
||
'overflowedIndicator',
|
||
'mode',
|
||
'level',
|
||
'tag',
|
||
'children',
|
||
'theme',
|
||
]),
|
||
te = b;
|
||
return y.createElement(te, Object.assign({}, ne), this.renderChildren(C));
|
||
},
|
||
},
|
||
]),
|
||
E
|
||
);
|
||
})(y.Component);
|
||
De.defaultProps = { tag: 'div', className: '' };
|
||
var se = De;
|
||
function pe(M) {
|
||
return M.length
|
||
? M.every(function(p) {
|
||
return !!p.props.disabled;
|
||
})
|
||
: !0;
|
||
}
|
||
function We(M, p, E) {
|
||
var l = M.getState();
|
||
M.setState({
|
||
activeKey: Object(f.a)(Object(f.a)({}, l.activeKey), {}, Object(me.a)({}, p, E)),
|
||
});
|
||
}
|
||
function he(M) {
|
||
return M.eventKey || '0-menu-';
|
||
}
|
||
function Me(M, p) {
|
||
var E = p,
|
||
l = M.children,
|
||
e = M.eventKey;
|
||
if (E) {
|
||
var a;
|
||
if (
|
||
(de(l, function(u, g) {
|
||
u && u.props && !u.props.disabled && E === Dt(u, e, g) && (a = !0);
|
||
}),
|
||
a)
|
||
)
|
||
return E;
|
||
}
|
||
return (
|
||
(E = null),
|
||
M.defaultActiveFirst &&
|
||
de(l, function(u, g) {
|
||
!E && u && !u.props.disabled && (E = Dt(u, e, g));
|
||
}),
|
||
E
|
||
);
|
||
}
|
||
function U(M) {
|
||
if (M) {
|
||
var p = this.instanceArray.indexOf(M);
|
||
p !== -1 ? (this.instanceArray[p] = M) : this.instanceArray.push(M);
|
||
}
|
||
}
|
||
var we = (function(M) {
|
||
Object(v.a)(E, M);
|
||
var p = Object(B.a)(E);
|
||
function E(l) {
|
||
var e;
|
||
return (
|
||
Object(W.a)(this, E),
|
||
(e = p.call(this, l)),
|
||
(e.onKeyDown = function(a, u) {
|
||
var g = a.keyCode,
|
||
N;
|
||
if (
|
||
(e.getFlatInstanceArray().forEach(function(b) {
|
||
b && b.props.active && b.onKeyDown && (N = b.onKeyDown(a));
|
||
}),
|
||
N)
|
||
)
|
||
return 1;
|
||
var T = null;
|
||
return (
|
||
(g === Ze.a.UP || g === Ze.a.DOWN) && (T = e.step(g === Ze.a.UP ? -1 : 1)),
|
||
T
|
||
? (a.preventDefault(),
|
||
We(e.props.store, he(e.props), T.props.eventKey),
|
||
typeof u == 'function' && u(T),
|
||
1)
|
||
: void 0
|
||
);
|
||
}),
|
||
(e.onItemHover = function(a) {
|
||
var u = a.key,
|
||
g = a.hover;
|
||
We(e.props.store, he(e.props), g ? u : null);
|
||
}),
|
||
(e.onDeselect = function(a) {
|
||
e.props.onDeselect(a);
|
||
}),
|
||
(e.onSelect = function(a) {
|
||
e.props.onSelect(a);
|
||
}),
|
||
(e.onClick = function(a) {
|
||
e.props.onClick(a);
|
||
}),
|
||
(e.onOpenChange = function(a) {
|
||
e.props.onOpenChange(a);
|
||
}),
|
||
(e.onDestroy = function(a) {
|
||
e.props.onDestroy(a);
|
||
}),
|
||
(e.getFlatInstanceArray = function() {
|
||
return e.instanceArray;
|
||
}),
|
||
(e.step = function(a) {
|
||
var u = e.getFlatInstanceArray(),
|
||
g = e.props.store.getState().activeKey[he(e.props)],
|
||
N = u.length;
|
||
if (!N) return null;
|
||
a < 0 && (u = u.concat().reverse());
|
||
var T = -1;
|
||
if (
|
||
(u.every(function(ne, te) {
|
||
return ne && ne.props.eventKey === g ? ((T = te), !1) : !0;
|
||
}),
|
||
!e.props.defaultActiveFirst && T !== -1 && pe(u.slice(T, N - 1)))
|
||
)
|
||
return;
|
||
var b = (T + 1) % N,
|
||
C = b;
|
||
do {
|
||
var D = u[C];
|
||
if (!D || D.props.disabled) C = (C + 1) % N;
|
||
else return D;
|
||
} while (C !== b);
|
||
return null;
|
||
}),
|
||
(e.renderCommonMenuItem = function(a, u, g) {
|
||
var N = e.props.store.getState(),
|
||
T = Object(S.a)(e),
|
||
b = T.props,
|
||
C = Dt(a, b.eventKey, u),
|
||
D = a.props;
|
||
if (!D || typeof a.type == 'string') return a;
|
||
var ne = C === N.activeKey,
|
||
te = Object(f.a)(
|
||
Object(f.a)(
|
||
{
|
||
mode: D.mode || b.mode,
|
||
level: b.level,
|
||
inlineIndent: b.inlineIndent,
|
||
renderMenuItem: e.renderMenuItem,
|
||
rootPrefixCls: b.prefixCls,
|
||
index: u,
|
||
parentMenu: b.parentMenu,
|
||
manualRef: D.disabled ? void 0 : Object(it.a)(a.ref, U.bind(Object(S.a)(e))),
|
||
eventKey: C,
|
||
active: !D.disabled && ne,
|
||
multiple: b.multiple,
|
||
onClick: function(ue) {
|
||
(D.onClick || Ue)(ue), e.onClick(ue);
|
||
},
|
||
onItemHover: e.onItemHover,
|
||
motion: b.motion,
|
||
subMenuOpenDelay: b.subMenuOpenDelay,
|
||
subMenuCloseDelay: b.subMenuCloseDelay,
|
||
forceSubMenuRender: b.forceSubMenuRender,
|
||
onOpenChange: e.onOpenChange,
|
||
onDeselect: e.onDeselect,
|
||
onSelect: e.onSelect,
|
||
builtinPlacements: b.builtinPlacements,
|
||
itemIcon: D.itemIcon || e.props.itemIcon,
|
||
expandIcon: D.expandIcon || e.props.expandIcon,
|
||
},
|
||
g,
|
||
),
|
||
{},
|
||
{ direction: b.direction },
|
||
);
|
||
return (
|
||
(b.mode === 'inline' || fn()) && (te.triggerSubMenuAction = 'click'),
|
||
y.cloneElement(a, Object(f.a)(Object(f.a)({}, te), {}, { key: C || u }))
|
||
);
|
||
}),
|
||
(e.renderMenuItem = function(a, u, g) {
|
||
if (!a) return null;
|
||
var N = e.props.store.getState(),
|
||
T = {
|
||
openKeys: N.openKeys,
|
||
selectedKeys: N.selectedKeys,
|
||
triggerSubMenuAction: e.props.triggerSubMenuAction,
|
||
subMenuKey: g,
|
||
};
|
||
return e.renderCommonMenuItem(a, u, T);
|
||
}),
|
||
l.store.setState({
|
||
activeKey: Object(f.a)(
|
||
Object(f.a)({}, l.store.getState().activeKey),
|
||
{},
|
||
Object(me.a)({}, l.eventKey, Me(l, l.activeKey)),
|
||
),
|
||
}),
|
||
(e.instanceArray = []),
|
||
e
|
||
);
|
||
}
|
||
return (
|
||
Object(w.a)(E, [
|
||
{
|
||
key: 'componentDidMount',
|
||
value: function() {
|
||
this.props.manualRef && this.props.manualRef(this);
|
||
},
|
||
},
|
||
{
|
||
key: 'shouldComponentUpdate',
|
||
value: function(e) {
|
||
return (
|
||
this.props.visible ||
|
||
e.visible ||
|
||
this.props.className !== e.className ||
|
||
!Q()(this.props.style, e.style)
|
||
);
|
||
},
|
||
},
|
||
{
|
||
key: 'componentDidUpdate',
|
||
value: function(e) {
|
||
var a = this.props,
|
||
u = 'activeKey' in a ? a.activeKey : a.store.getState().activeKey[he(a)],
|
||
g = Me(a, u);
|
||
if (g !== u) We(a.store, he(a), g);
|
||
else if ('activeKey' in e) {
|
||
var N = Me(e, e.activeKey);
|
||
g !== N && We(a.store, he(a), g);
|
||
}
|
||
},
|
||
},
|
||
{
|
||
key: 'render',
|
||
value: function() {
|
||
var e = this,
|
||
a = Object(Xe.a)({}, this.props);
|
||
this.instanceArray = [];
|
||
var u = at()(a.prefixCls, a.className, ''.concat(a.prefixCls, '-').concat(a.mode)),
|
||
g = { className: u, role: a.role || 'menu' };
|
||
a.id && (g.id = a.id),
|
||
a.focusable && ((g.tabIndex = 0), (g.onKeyDown = this.onKeyDown));
|
||
var N = a.prefixCls,
|
||
T = a.eventKey,
|
||
b = a.visible,
|
||
C = a.level,
|
||
D = a.mode,
|
||
ne = a.overflowedIndicator,
|
||
te = a.theme;
|
||
return (
|
||
ft.forEach(function(ge) {
|
||
return delete a[ge];
|
||
}),
|
||
delete a.onClick,
|
||
y.createElement(
|
||
se,
|
||
Object.assign(
|
||
{},
|
||
a,
|
||
{
|
||
prefixCls: N,
|
||
mode: D,
|
||
tag: 'ul',
|
||
level: C,
|
||
theme: te,
|
||
visible: b,
|
||
overflowedIndicator: ne,
|
||
},
|
||
g,
|
||
),
|
||
Object(jt.a)(a.children).map(function(ge, ue) {
|
||
return e.renderMenuItem(ge, ue, T || '0-menu-');
|
||
}),
|
||
)
|
||
);
|
||
},
|
||
},
|
||
]),
|
||
E
|
||
);
|
||
})(y.Component);
|
||
we.defaultProps = {
|
||
prefixCls: 'rc-menu',
|
||
className: '',
|
||
mode: 'vertical',
|
||
level: 1,
|
||
inlineIndent: 24,
|
||
visible: !0,
|
||
focusable: !0,
|
||
style: {},
|
||
manualRef: Ue,
|
||
};
|
||
var Le = nt()(we),
|
||
je = Le,
|
||
Ve = s('Kwbf');
|
||
function Ke(M, p, E) {
|
||
var l = M.prefixCls,
|
||
e = M.motion,
|
||
a = M.defaultMotions,
|
||
u = a === void 0 ? {} : a,
|
||
g = M.openAnimation,
|
||
N = M.openTransitionName,
|
||
T = p.switchingModeFromInline;
|
||
if (e) return e;
|
||
if (Object(_t.a)(g) === 'object' && g)
|
||
Object(Ve.a)(
|
||
!1,
|
||
'Object type of `openAnimation` is removed. Please use `motion` instead.',
|
||
);
|
||
else if (typeof g == 'string') return { motionName: ''.concat(l, '-open-').concat(g) };
|
||
if (N) return { motionName: N };
|
||
var b = u[E];
|
||
return b || (T ? null : u.other);
|
||
}
|
||
var st = (function(M) {
|
||
Object(v.a)(E, M);
|
||
var p = Object(B.a)(E);
|
||
function E(l) {
|
||
var e;
|
||
Object(W.a)(this, E),
|
||
(e = p.call(this, l)),
|
||
(e.inlineOpenKeys = []),
|
||
(e.onSelect = function(g) {
|
||
var N = Object(S.a)(e),
|
||
T = N.props;
|
||
if (T.selectable) {
|
||
var b = e.store.getState(),
|
||
C = b.selectedKeys,
|
||
D = g.key;
|
||
T.multiple ? (C = C.concat([D])) : (C = [D]),
|
||
'selectedKeys' in T || e.store.setState({ selectedKeys: C }),
|
||
T.onSelect(Object(f.a)(Object(f.a)({}, g), {}, { selectedKeys: C }));
|
||
}
|
||
}),
|
||
(e.onClick = function(g) {
|
||
var N = e.getRealMenuMode(),
|
||
T = Object(S.a)(e),
|
||
b = T.store,
|
||
C = T.props.onOpenChange;
|
||
N !== 'inline' && !('openKeys' in e.props) && (b.setState({ openKeys: [] }), C([])),
|
||
e.props.onClick(g);
|
||
}),
|
||
(e.onKeyDown = function(g, N) {
|
||
e.innerMenu.getWrappedInstance().onKeyDown(g, N);
|
||
}),
|
||
(e.onOpenChange = function(g) {
|
||
var N = Object(S.a)(e),
|
||
T = N.props,
|
||
b = e.store.getState().openKeys.concat(),
|
||
C = !1,
|
||
D = function(te) {
|
||
var ge = !1;
|
||
if (te.open) (ge = b.indexOf(te.key) === -1), ge && b.push(te.key);
|
||
else {
|
||
var ue = b.indexOf(te.key);
|
||
(ge = ue !== -1), ge && b.splice(ue, 1);
|
||
}
|
||
C = C || ge;
|
||
};
|
||
Array.isArray(g) ? g.forEach(D) : D(g),
|
||
C &&
|
||
('openKeys' in e.props || e.store.setState({ openKeys: b }), T.onOpenChange(b));
|
||
}),
|
||
(e.onDeselect = function(g) {
|
||
var N = Object(S.a)(e),
|
||
T = N.props;
|
||
if (T.selectable) {
|
||
var b = e.store.getState().selectedKeys.concat(),
|
||
C = g.key,
|
||
D = b.indexOf(C);
|
||
D !== -1 && b.splice(D, 1),
|
||
'selectedKeys' in T || e.store.setState({ selectedKeys: b }),
|
||
T.onDeselect(Object(f.a)(Object(f.a)({}, g), {}, { selectedKeys: b }));
|
||
}
|
||
}),
|
||
(e.onMouseEnter = function(g) {
|
||
e.restoreModeVerticalFromInline();
|
||
var N = e.props.onMouseEnter;
|
||
N && N(g);
|
||
}),
|
||
(e.onTransitionEnd = function(g) {
|
||
var N = g.propertyName === 'width' && g.target === g.currentTarget,
|
||
T = g.target.className,
|
||
b =
|
||
Object.prototype.toString.call(T) === '[object SVGAnimatedString]'
|
||
? T.animVal
|
||
: T,
|
||
C = g.propertyName === 'font-size' && b.indexOf('anticon') >= 0;
|
||
(N || C) && e.restoreModeVerticalFromInline();
|
||
}),
|
||
(e.setInnerMenu = function(g) {
|
||
e.innerMenu = g;
|
||
}),
|
||
(e.isRootMenu = !0);
|
||
var a = l.defaultSelectedKeys,
|
||
u = l.defaultOpenKeys;
|
||
return (
|
||
'selectedKeys' in l && (a = l.selectedKeys || []),
|
||
'openKeys' in l && (u = l.openKeys || []),
|
||
(e.store = Ce({
|
||
selectedKeys: a,
|
||
openKeys: u,
|
||
activeKey: { '0-menu-': Me(l, l.activeKey) },
|
||
})),
|
||
(e.state = { switchingModeFromInline: !1 }),
|
||
e
|
||
);
|
||
}
|
||
return (
|
||
Object(w.a)(E, [
|
||
{
|
||
key: 'componentDidMount',
|
||
value: function() {
|
||
this.updateMiniStore(), this.updateMenuDisplay();
|
||
},
|
||
},
|
||
{
|
||
key: 'componentDidUpdate',
|
||
value: function(e) {
|
||
this.updateOpentKeysWhenSwitchMode(e), this.updateMiniStore();
|
||
var a = this.props,
|
||
u = a.siderCollapsed,
|
||
g = a.inlineCollapsed,
|
||
N = a.onOpenChange;
|
||
((!e.inlineCollapsed && g) || (!e.siderCollapsed && u)) && N([]),
|
||
this.updateMenuDisplay();
|
||
},
|
||
},
|
||
{
|
||
key: 'updateOpentKeysWhenSwitchMode',
|
||
value: function(e) {
|
||
var a = this.props,
|
||
u = this.store,
|
||
g = this.inlineOpenKeys,
|
||
N = u.getState(),
|
||
T = {};
|
||
e.mode === 'inline' &&
|
||
a.mode !== 'inline' &&
|
||
this.setState({ switchingModeFromInline: !0 }),
|
||
'openKeys' in a ||
|
||
(((a.inlineCollapsed && !e.inlineCollapsed) ||
|
||
(a.siderCollapsed && !e.siderCollapsed)) &&
|
||
(this.setState({ switchingModeFromInline: !0 }),
|
||
(this.inlineOpenKeys = N.openKeys.concat()),
|
||
(T.openKeys = [])),
|
||
((!a.inlineCollapsed && e.inlineCollapsed) ||
|
||
(!a.siderCollapsed && e.siderCollapsed)) &&
|
||
((T.openKeys = g), (this.inlineOpenKeys = []))),
|
||
Object.keys(T).length && u.setState(T);
|
||
},
|
||
},
|
||
{
|
||
key: 'updateMenuDisplay',
|
||
value: function() {
|
||
var e = this.props.collapsedWidth,
|
||
a = this.store,
|
||
u = this.prevOpenKeys,
|
||
g = this.getInlineCollapsed() && (e === 0 || e === '0' || e === '0px');
|
||
g
|
||
? ((this.prevOpenKeys = a.getState().openKeys.concat()),
|
||
this.store.setState({ openKeys: [] }))
|
||
: u && (this.store.setState({ openKeys: u }), (this.prevOpenKeys = null));
|
||
},
|
||
},
|
||
{
|
||
key: 'getRealMenuMode',
|
||
value: function() {
|
||
var e = this.props.mode,
|
||
a = this.state.switchingModeFromInline,
|
||
u = this.getInlineCollapsed();
|
||
return a && u ? 'inline' : u ? 'vertical' : e;
|
||
},
|
||
},
|
||
{
|
||
key: 'getInlineCollapsed',
|
||
value: function() {
|
||
var e = this.props,
|
||
a = e.inlineCollapsed,
|
||
u = e.siderCollapsed;
|
||
return u !== void 0 ? u : a;
|
||
},
|
||
},
|
||
{
|
||
key: 'restoreModeVerticalFromInline',
|
||
value: function() {
|
||
var e = this.state.switchingModeFromInline;
|
||
e && this.setState({ switchingModeFromInline: !1 });
|
||
},
|
||
},
|
||
{
|
||
key: 'updateMiniStore',
|
||
value: function() {
|
||
'selectedKeys' in this.props &&
|
||
this.store.setState({ selectedKeys: this.props.selectedKeys || [] }),
|
||
'openKeys' in this.props &&
|
||
this.store.setState({ openKeys: this.props.openKeys || [] });
|
||
},
|
||
},
|
||
{
|
||
key: 'render',
|
||
value: function() {
|
||
var e = Object(f.a)(
|
||
{},
|
||
Object(Je.default)(this.props, [
|
||
'collapsedWidth',
|
||
'siderCollapsed',
|
||
'defaultMotions',
|
||
]),
|
||
),
|
||
a = this.getRealMenuMode();
|
||
return (
|
||
(e.className += ' '.concat(e.prefixCls, '-root')),
|
||
e.direction === 'rtl' && (e.className += ' '.concat(e.prefixCls, '-rtl')),
|
||
(e = Object(f.a)(
|
||
Object(f.a)({}, e),
|
||
{},
|
||
{
|
||
mode: a,
|
||
onClick: this.onClick,
|
||
onOpenChange: this.onOpenChange,
|
||
onDeselect: this.onDeselect,
|
||
onSelect: this.onSelect,
|
||
onMouseEnter: this.onMouseEnter,
|
||
onTransitionEnd: this.onTransitionEnd,
|
||
parentMenu: this,
|
||
motion: Ke(this.props, this.state, a),
|
||
},
|
||
)),
|
||
delete e.openAnimation,
|
||
delete e.openTransitionName,
|
||
y.createElement(
|
||
H,
|
||
{ store: this.store },
|
||
y.createElement(
|
||
je,
|
||
Object.assign({}, e, { ref: this.setInnerMenu }),
|
||
this.props.children,
|
||
),
|
||
)
|
||
);
|
||
},
|
||
},
|
||
]),
|
||
E
|
||
);
|
||
})(y.Component);
|
||
st.defaultProps = {
|
||
selectable: !0,
|
||
onClick: Ue,
|
||
onSelect: Ue,
|
||
onOpenChange: Ue,
|
||
onDeselect: Ue,
|
||
defaultSelectedKeys: [],
|
||
defaultOpenKeys: [],
|
||
subMenuOpenDelay: 0.1,
|
||
subMenuCloseDelay: 0.1,
|
||
triggerSubMenuAction: 'hover',
|
||
prefixCls: 'rc-menu',
|
||
className: '',
|
||
mode: 'vertical',
|
||
style: {},
|
||
builtinPlacements: {},
|
||
overflowedIndicator: y.createElement('span', null, '···'),
|
||
};
|
||
var Be = st,
|
||
ie = (function(M) {
|
||
Object(v.a)(E, M);
|
||
var p = Object(B.a)(E);
|
||
function E() {
|
||
var l;
|
||
return (
|
||
Object(W.a)(this, E),
|
||
(l = p.apply(this, arguments)),
|
||
(l.onKeyDown = function(e) {
|
||
var a = e.keyCode;
|
||
return a === Ze.a.ENTER ? (l.onClick(e), !0) : void 0;
|
||
}),
|
||
(l.onMouseLeave = function(e) {
|
||
var a = l.props,
|
||
u = a.eventKey,
|
||
g = a.onItemHover,
|
||
N = a.onMouseLeave;
|
||
g({ key: u, hover: !1 }), N({ key: u, domEvent: e });
|
||
}),
|
||
(l.onMouseEnter = function(e) {
|
||
var a = l.props,
|
||
u = a.eventKey,
|
||
g = a.onItemHover,
|
||
N = a.onMouseEnter;
|
||
g({ key: u, hover: !0 }), N({ key: u, domEvent: e });
|
||
}),
|
||
(l.onClick = function(e) {
|
||
var a = l.props,
|
||
u = a.eventKey,
|
||
g = a.multiple,
|
||
N = a.onClick,
|
||
T = a.onSelect,
|
||
b = a.onDeselect,
|
||
C = a.isSelected,
|
||
D = { key: u, keyPath: [u], item: Object(S.a)(l), domEvent: e };
|
||
N(D), g ? (C ? b(D) : T(D)) : C || T(D);
|
||
}),
|
||
(l.saveNode = function(e) {
|
||
l.node = e;
|
||
}),
|
||
l
|
||
);
|
||
}
|
||
return (
|
||
Object(w.a)(E, [
|
||
{
|
||
key: 'componentDidMount',
|
||
value: function() {
|
||
this.callRef();
|
||
},
|
||
},
|
||
{
|
||
key: 'componentDidUpdate',
|
||
value: function() {
|
||
this.callRef();
|
||
},
|
||
},
|
||
{
|
||
key: 'componentWillUnmount',
|
||
value: function() {
|
||
var e = this.props;
|
||
e.onDestroy && e.onDestroy(e.eventKey);
|
||
},
|
||
},
|
||
{
|
||
key: 'getPrefixCls',
|
||
value: function() {
|
||
return ''.concat(this.props.rootPrefixCls, '-item');
|
||
},
|
||
},
|
||
{
|
||
key: 'getActiveClassName',
|
||
value: function() {
|
||
return ''.concat(this.getPrefixCls(), '-active');
|
||
},
|
||
},
|
||
{
|
||
key: 'getSelectedClassName',
|
||
value: function() {
|
||
return ''.concat(this.getPrefixCls(), '-selected');
|
||
},
|
||
},
|
||
{
|
||
key: 'getDisabledClassName',
|
||
value: function() {
|
||
return ''.concat(this.getPrefixCls(), '-disabled');
|
||
},
|
||
},
|
||
{
|
||
key: 'callRef',
|
||
value: function() {
|
||
this.props.manualRef && this.props.manualRef(this);
|
||
},
|
||
},
|
||
{
|
||
key: 'render',
|
||
value: function() {
|
||
var e,
|
||
a = Object(f.a)({}, this.props),
|
||
u = at()(
|
||
this.getPrefixCls(),
|
||
a.className,
|
||
((e = {}),
|
||
Object(me.a)(e, this.getActiveClassName(), !a.disabled && a.active),
|
||
Object(me.a)(e, this.getSelectedClassName(), a.isSelected),
|
||
Object(me.a)(e, this.getDisabledClassName(), a.disabled),
|
||
e),
|
||
),
|
||
g = Object(f.a)(
|
||
Object(f.a)({}, a.attribute),
|
||
{},
|
||
{
|
||
title: typeof a.title == 'string' ? a.title : void 0,
|
||
className: u,
|
||
role: a.role || 'menuitem',
|
||
'aria-disabled': a.disabled,
|
||
},
|
||
);
|
||
a.role === 'option'
|
||
? (g = Object(f.a)(
|
||
Object(f.a)({}, g),
|
||
{},
|
||
{ role: 'option', 'aria-selected': a.isSelected },
|
||
))
|
||
: (a.role === null || a.role === 'none') && (g.role = 'none');
|
||
var N = {
|
||
onClick: a.disabled ? null : this.onClick,
|
||
onMouseLeave: a.disabled ? null : this.onMouseLeave,
|
||
onMouseEnter: a.disabled ? null : this.onMouseEnter,
|
||
},
|
||
T = Object(f.a)({}, a.style);
|
||
a.mode === 'inline' &&
|
||
(a.direction === 'rtl'
|
||
? (T.paddingRight = a.inlineIndent * a.level)
|
||
: (T.paddingLeft = a.inlineIndent * a.level)),
|
||
ft.forEach(function(C) {
|
||
return delete a[C];
|
||
}),
|
||
delete a.direction;
|
||
var b = this.props.itemIcon;
|
||
return (
|
||
typeof this.props.itemIcon == 'function' &&
|
||
(b = y.createElement(this.props.itemIcon, this.props)),
|
||
y.createElement(
|
||
'li',
|
||
Object.assign(
|
||
{},
|
||
Object(Je.default)(a, [
|
||
'onClick',
|
||
'onMouseEnter',
|
||
'onMouseLeave',
|
||
'onSelect',
|
||
]),
|
||
g,
|
||
N,
|
||
{ style: T, ref: this.saveNode },
|
||
),
|
||
a.children,
|
||
b,
|
||
)
|
||
);
|
||
},
|
||
},
|
||
]),
|
||
E
|
||
);
|
||
})(y.Component);
|
||
(ie.isMenuItem = !0),
|
||
(ie.defaultProps = { onSelect: Ue, onMouseEnter: Ue, onMouseLeave: Ue, manualRef: Ue });
|
||
var Z = nt(function(M, p) {
|
||
var E = M.activeKey,
|
||
l = M.selectedKeys,
|
||
e = p.eventKey,
|
||
a = p.subMenuKey;
|
||
return { active: E[a] === e, isSelected: l.indexOf(e) !== -1 };
|
||
})(ie),
|
||
Te = Z,
|
||
xe = (function(M) {
|
||
Object(v.a)(E, M);
|
||
var p = Object(B.a)(E);
|
||
function E() {
|
||
var l;
|
||
return (
|
||
Object(W.a)(this, E),
|
||
(l = p.apply(this, arguments)),
|
||
(l.renderInnerMenuItem = function(e) {
|
||
var a = l.props,
|
||
u = a.renderMenuItem,
|
||
g = a.index;
|
||
return u(e, g, l.props.subMenuKey);
|
||
}),
|
||
l
|
||
);
|
||
}
|
||
return (
|
||
Object(w.a)(E, [
|
||
{
|
||
key: 'render',
|
||
value: function() {
|
||
var e = Object(Xe.a)({}, this.props),
|
||
a = e.className,
|
||
u = a === void 0 ? '' : a,
|
||
g = e.rootPrefixCls,
|
||
N = ''.concat(g, '-item-group-title'),
|
||
T = ''.concat(g, '-item-group-list'),
|
||
b = e.title,
|
||
C = e.children;
|
||
return (
|
||
ft.forEach(function(D) {
|
||
return delete e[D];
|
||
}),
|
||
delete e.onClick,
|
||
delete e.direction,
|
||
y.createElement(
|
||
'li',
|
||
Object.assign({}, e, {
|
||
className: ''.concat(u, ' ').concat(g, '-item-group'),
|
||
}),
|
||
y.createElement(
|
||
'div',
|
||
{ className: N, title: typeof b == 'string' ? b : void 0 },
|
||
b,
|
||
),
|
||
y.createElement(
|
||
'ul',
|
||
{ className: T },
|
||
y.Children.map(C, this.renderInnerMenuItem),
|
||
),
|
||
)
|
||
);
|
||
},
|
||
},
|
||
]),
|
||
E
|
||
);
|
||
})(y.Component);
|
||
(xe.isMenuItemGroup = !0), (xe.defaultProps = { disabled: !0 });
|
||
var le = xe,
|
||
ke = function(p) {
|
||
var E = p.className,
|
||
l = p.rootPrefixCls,
|
||
e = p.style;
|
||
return y.createElement('li', {
|
||
className: ''.concat(E, ' ').concat(l, '-item-divider'),
|
||
style: e,
|
||
});
|
||
};
|
||
ke.defaultProps = { disabled: !0, className: '', style: {} };
|
||
var et = ke,
|
||
Ne = (x.f = Be);
|
||
},
|
||
'3flX': function(Ae, x, s) {
|
||
'use strict';
|
||
var f = s('q1tI'),
|
||
W = {
|
||
icon: {
|
||
tag: 'svg',
|
||
attrs: { viewBox: '64 64 896 896', focusable: 'false' },
|
||
children: [
|
||
{
|
||
tag: 'path',
|
||
attrs: {
|
||
d:
|
||
'M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z',
|
||
},
|
||
},
|
||
],
|
||
},
|
||
name: 'mobile',
|
||
theme: 'outlined',
|
||
},
|
||
w = W,
|
||
S = s('6VBw'),
|
||
v = function(P, _) {
|
||
return f.createElement(S.a, Object.assign({}, P, { ref: _, icon: w }));
|
||
};
|
||
v.displayName = 'MobileOutlined';
|
||
var B = (x.a = f.forwardRef(v));
|
||
},
|
||
'4IlW': function(Ae, x, s) {
|
||
'use strict';
|
||
var f = {
|
||
MAC_ENTER: 3,
|
||
BACKSPACE: 8,
|
||
TAB: 9,
|
||
NUM_CENTER: 12,
|
||
ENTER: 13,
|
||
SHIFT: 16,
|
||
CTRL: 17,
|
||
ALT: 18,
|
||
PAUSE: 19,
|
||
CAPS_LOCK: 20,
|
||
ESC: 27,
|
||
SPACE: 32,
|
||
PAGE_UP: 33,
|
||
PAGE_DOWN: 34,
|
||
END: 35,
|
||
HOME: 36,
|
||
LEFT: 37,
|
||
UP: 38,
|
||
RIGHT: 39,
|
||
DOWN: 40,
|
||
PRINT_SCREEN: 44,
|
||
INSERT: 45,
|
||
DELETE: 46,
|
||
ZERO: 48,
|
||
ONE: 49,
|
||
TWO: 50,
|
||
THREE: 51,
|
||
FOUR: 52,
|
||
FIVE: 53,
|
||
SIX: 54,
|
||
SEVEN: 55,
|
||
EIGHT: 56,
|
||
NINE: 57,
|
||
QUESTION_MARK: 63,
|
||
A: 65,
|
||
B: 66,
|
||
C: 67,
|
||
D: 68,
|
||
E: 69,
|
||
F: 70,
|
||
G: 71,
|
||
H: 72,
|
||
I: 73,
|
||
J: 74,
|
||
K: 75,
|
||
L: 76,
|
||
M: 77,
|
||
N: 78,
|
||
O: 79,
|
||
P: 80,
|
||
Q: 81,
|
||
R: 82,
|
||
S: 83,
|
||
T: 84,
|
||
U: 85,
|
||
V: 86,
|
||
W: 87,
|
||
X: 88,
|
||
Y: 89,
|
||
Z: 90,
|
||
META: 91,
|
||
WIN_KEY_RIGHT: 92,
|
||
CONTEXT_MENU: 93,
|
||
NUM_ZERO: 96,
|
||
NUM_ONE: 97,
|
||
NUM_TWO: 98,
|
||
NUM_THREE: 99,
|
||
NUM_FOUR: 100,
|
||
NUM_FIVE: 101,
|
||
NUM_SIX: 102,
|
||
NUM_SEVEN: 103,
|
||
NUM_EIGHT: 104,
|
||
NUM_NINE: 105,
|
||
NUM_MULTIPLY: 106,
|
||
NUM_PLUS: 107,
|
||
NUM_MINUS: 109,
|
||
NUM_PERIOD: 110,
|
||
NUM_DIVISION: 111,
|
||
F1: 112,
|
||
F2: 113,
|
||
F3: 114,
|
||
F4: 115,
|
||
F5: 116,
|
||
F6: 117,
|
||
F7: 118,
|
||
F8: 119,
|
||
F9: 120,
|
||
F10: 121,
|
||
F11: 122,
|
||
F12: 123,
|
||
NUMLOCK: 144,
|
||
SEMICOLON: 186,
|
||
DASH: 189,
|
||
EQUALS: 187,
|
||
COMMA: 188,
|
||
PERIOD: 190,
|
||
SLASH: 191,
|
||
APOSTROPHE: 192,
|
||
SINGLE_QUOTE: 222,
|
||
OPEN_SQUARE_BRACKET: 219,
|
||
BACKSLASH: 220,
|
||
CLOSE_SQUARE_BRACKET: 221,
|
||
WIN_KEY: 224,
|
||
MAC_FF_META: 224,
|
||
WIN_IME: 229,
|
||
isTextModifyingKeyEvent: function(w) {
|
||
var S = w.keyCode;
|
||
if ((w.altKey && !w.ctrlKey) || w.metaKey || (S >= f.F1 && S <= f.F12)) return !1;
|
||
switch (S) {
|
||
case f.ALT:
|
||
case f.CAPS_LOCK:
|
||
case f.CONTEXT_MENU:
|
||
case f.CTRL:
|
||
case f.DOWN:
|
||
case f.END:
|
||
case f.ESC:
|
||
case f.HOME:
|
||
case f.INSERT:
|
||
case f.LEFT:
|
||
case f.MAC_FF_META:
|
||
case f.META:
|
||
case f.NUMLOCK:
|
||
case f.NUM_CENTER:
|
||
case f.PAGE_DOWN:
|
||
case f.PAGE_UP:
|
||
case f.PAUSE:
|
||
case f.PRINT_SCREEN:
|
||
case f.RIGHT:
|
||
case f.SHIFT:
|
||
case f.UP:
|
||
case f.WIN_KEY:
|
||
case f.WIN_KEY_RIGHT:
|
||
return !1;
|
||
default:
|
||
return !0;
|
||
}
|
||
},
|
||
isCharacterKey: function(w) {
|
||
if (w >= f.ZERO && w <= f.NINE) return !0;
|
||
if (w >= f.NUM_ZERO && w <= f.NUM_MULTIPLY) return !0;
|
||
if (w >= f.A && w <= f.Z) return !0;
|
||
if (window.navigator.userAgent.indexOf('WebKit') !== -1 && w === 0) return !0;
|
||
switch (w) {
|
||
case f.SPACE:
|
||
case f.QUESTION_MARK:
|
||
case f.NUM_PLUS:
|
||
case f.NUM_MINUS:
|
||
case f.NUM_PERIOD:
|
||
case f.NUM_DIVISION:
|
||
case f.SEMICOLON:
|
||
case f.DASH:
|
||
case f.EQUALS:
|
||
case f.COMMA:
|
||
case f.PERIOD:
|
||
case f.SLASH:
|
||
case f.APOSTROPHE:
|
||
case f.SINGLE_QUOTE:
|
||
case f.OPEN_SQUARE_BRACKET:
|
||
case f.BACKSLASH:
|
||
case f.CLOSE_SQUARE_BRACKET:
|
||
return !0;
|
||
default:
|
||
return !1;
|
||
}
|
||
},
|
||
};
|
||
x.a = f;
|
||
},
|
||
'6VBw': function(Ae, x, s) {
|
||
'use strict';
|
||
var f = s('ODXe'),
|
||
W = s('rePB'),
|
||
w = s('Ff2n'),
|
||
S = s('q1tI'),
|
||
v = s.n(S),
|
||
B = s('TSYQ'),
|
||
y = s.n(B),
|
||
P = s('CJvt'),
|
||
_ = s('xc4C'),
|
||
H = s('Qi1f');
|
||
Object(_.b)('#1890ff');
|
||
var Y = S.forwardRef(function(Q, Se) {
|
||
var Oe = Q.className,
|
||
V = Q.icon,
|
||
ye = Q.spin,
|
||
Ie = Q.rotate,
|
||
Ee = Q.tabIndex,
|
||
nt = Q.onClick,
|
||
z = Q.twoToneColor,
|
||
Ce = Object(w.a)(Q, [
|
||
'className',
|
||
'icon',
|
||
'spin',
|
||
'rotate',
|
||
'tabIndex',
|
||
'onClick',
|
||
'twoToneColor',
|
||
]),
|
||
Je = y()('anticon', Object(W.a)({}, 'anticon-'.concat(V.name), Boolean(V.name)), Oe),
|
||
Xe = y()({ 'anticon-spin': !!ye || V.name === 'loading' }),
|
||
me = Ee;
|
||
me === void 0 && nt && (me = -1);
|
||
var Ze = Ie
|
||
? { msTransform: 'rotate('.concat(Ie, 'deg)'), transform: 'rotate('.concat(Ie, 'deg)') }
|
||
: void 0,
|
||
it = Object(H.d)(z),
|
||
jt = Object(f.a)(it, 2),
|
||
kt = jt[0],
|
||
at = jt[1];
|
||
return S.createElement(
|
||
'span',
|
||
Object.assign({ role: 'img', 'aria-label': V.name }, Ce, {
|
||
ref: Se,
|
||
tabIndex: me,
|
||
onClick: nt,
|
||
className: Je,
|
||
}),
|
||
S.createElement(P.a, {
|
||
className: Xe,
|
||
icon: V,
|
||
primaryColor: kt,
|
||
secondaryColor: at,
|
||
style: Ze,
|
||
}),
|
||
);
|
||
});
|
||
(Y.displayName = 'AntdIcon'), (Y.getTwoToneColor = _.a), (Y.setTwoToneColor = _.b), (x.a = Y);
|
||
},
|
||
'6WrX': function(Ae, x, s) {
|
||
'use strict';
|
||
var f = s('q1tI'),
|
||
W = {
|
||
icon: {
|
||
tag: 'svg',
|
||
attrs: { viewBox: '64 64 896 896', focusable: 'false' },
|
||
children: [
|
||
{ tag: 'defs', attrs: {}, children: [{ tag: 'style', attrs: {} }] },
|
||
{
|
||
tag: 'path',
|
||
attrs: {
|
||
d:
|
||
'M301.3 496.7c-23.8 0-40.2-10.5-41.6-26.9H205c.9 43.4 36.9 70.3 93.9 70.3 59.1 0 95-28.4 95-75.5 0-35.8-20-55.9-64.5-64.5l-29.1-5.6c-23.8-4.7-33.8-11.9-33.8-24.2 0-15 13.3-24.5 33.4-24.5 20.1 0 35.3 11.1 36.6 27h53c-.9-41.7-37.5-70.3-90.3-70.3-54.4 0-89.7 28.9-89.7 73 0 35.5 21.2 58 62.5 65.8l29.7 5.9c25.8 5.2 35.6 11.9 35.6 24.4.1 14.7-14.5 25.1-36 25.1z',
|
||
},
|
||
},
|
||
{
|
||
tag: 'path',
|
||
attrs: {
|
||
d:
|
||
'M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z',
|
||
},
|
||
},
|
||
{
|
||
tag: 'path',
|
||
attrs: {
|
||
d:
|
||
'M828.5 486.7h-95.8V308.5h-57.4V534h153.2zm-298.6 53.4c14.1 0 27.2-2 39.1-5.8l13.3 20.3h53.3L607.9 511c21.1-20 33-51.1 33-89.8 0-73.3-43.3-118.8-110.9-118.8s-111.2 45.3-111.2 118.8c-.1 73.7 43 118.9 111.1 118.9zm0-190c31.6 0 52.7 27.7 52.7 71.1 0 16.7-3.6 30.6-10 40.5l-5.2-6.9h-48.8L542 491c-3.9.9-8 1.4-12.2 1.4-31.7 0-52.8-27.5-52.8-71.2.1-43.6 21.2-71.1 52.9-71.1z',
|
||
},
|
||
},
|
||
],
|
||
},
|
||
name: 'console-sql',
|
||
theme: 'outlined',
|
||
},
|
||
w = W,
|
||
S = s('6VBw'),
|
||
v = function(P, _) {
|
||
return f.createElement(S.a, Object.assign({}, P, { ref: _, icon: w }));
|
||
};
|
||
v.displayName = 'ConsoleSqlOutlined';
|
||
var B = (x.a = f.forwardRef(v));
|
||
},
|
||
'6cGi': function(Ae, x, s) {
|
||
'use strict';
|
||
s.d(x, 'a', function() {
|
||
return _;
|
||
});
|
||
var f = s('q1tI'),
|
||
W = s.n(f);
|
||
function w(H, Y) {
|
||
return P(H) || y(H, Y) || v(H, Y) || S();
|
||
}
|
||
function S() {
|
||
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
||
}
|
||
function v(H, Y) {
|
||
if (!H) return;
|
||
if (typeof H == 'string') return B(H, Y);
|
||
var Q = Object.prototype.toString.call(H).slice(8, -1);
|
||
if (
|
||
(Q === 'Object' && H.constructor && (Q = H.constructor.name), Q === 'Map' || Q === 'Set')
|
||
)
|
||
return Array.from(H);
|
||
if (Q === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Q)) return B(H, Y);
|
||
}
|
||
function B(H, Y) {
|
||
(Y == null || Y > H.length) && (Y = H.length);
|
||
for (var Q = 0, Se = new Array(Y); Q < Y; Q++) Se[Q] = H[Q];
|
||
return Se;
|
||
}
|
||
function y(H, Y) {
|
||
if (typeof Symbol == 'undefined' || !(Symbol.iterator in Object(H))) return;
|
||
var Q = [],
|
||
Se = !0,
|
||
Oe = !1,
|
||
V = void 0;
|
||
try {
|
||
for (
|
||
var ye = H[Symbol.iterator](), Ie;
|
||
!(Se = (Ie = ye.next()).done) && !(Q.push(Ie.value), Y && Q.length === Y);
|
||
Se = !0
|
||
);
|
||
} catch (Ee) {
|
||
(Oe = !0), (V = Ee);
|
||
} finally {
|
||
try {
|
||
!Se && ye.return != null && ye.return();
|
||
} finally {
|
||
if (Oe) throw V;
|
||
}
|
||
}
|
||
return Q;
|
||
}
|
||
function P(H) {
|
||
if (Array.isArray(H)) return H;
|
||
}
|
||
function _(H, Y) {
|
||
var Q = Y || {},
|
||
Se = Q.defaultValue,
|
||
Oe = Q.value,
|
||
V = Q.onChange,
|
||
ye = Q.postState,
|
||
Ie = f.useState(function() {
|
||
return Oe !== void 0
|
||
? Oe
|
||
: Se !== void 0
|
||
? typeof Se == 'function'
|
||
? Se()
|
||
: Se
|
||
: typeof H == 'function'
|
||
? H()
|
||
: H;
|
||
}),
|
||
Ee = w(Ie, 2),
|
||
nt = Ee[0],
|
||
z = Ee[1],
|
||
Ce = Oe !== void 0 ? Oe : nt;
|
||
ye && (Ce = ye(Ce));
|
||
function Je(me) {
|
||
z(me), Ce !== me && V && V(me, Ce);
|
||
}
|
||
var Xe = f.useRef(!0);
|
||
return (
|
||
f.useEffect(
|
||
function() {
|
||
if (Xe.current) {
|
||
Xe.current = !1;
|
||
return;
|
||
}
|
||
Oe === void 0 && z(Oe);
|
||
},
|
||
[Oe],
|
||
),
|
||
[Ce, Je]
|
||
);
|
||
}
|
||
},
|
||
'9ama': function(Ae, x, s) {},
|
||
CJvt: function(Ae, x, s) {
|
||
'use strict';
|
||
var f = s('Ff2n'),
|
||
W = s('VTBJ'),
|
||
w = s('Qi1f'),
|
||
S = { primaryColor: '#333', secondaryColor: '#E6E6E6', calculated: !1 };
|
||
function v(P) {
|
||
var _ = P.primaryColor,
|
||
H = P.secondaryColor;
|
||
(S.primaryColor = _), (S.secondaryColor = H || Object(w.b)(_)), (S.calculated = !!H);
|
||
}
|
||
function B() {
|
||
return Object(W.a)({}, S);
|
||
}
|
||
var y = function(_) {
|
||
var H = _.icon,
|
||
Y = _.className,
|
||
Q = _.onClick,
|
||
Se = _.style,
|
||
Oe = _.primaryColor,
|
||
V = _.secondaryColor,
|
||
ye = Object(f.a)(_, [
|
||
'icon',
|
||
'className',
|
||
'onClick',
|
||
'style',
|
||
'primaryColor',
|
||
'secondaryColor',
|
||
]),
|
||
Ie = S;
|
||
if (
|
||
(Oe && (Ie = { primaryColor: Oe, secondaryColor: V || Object(w.b)(Oe) }),
|
||
Object(w.f)(),
|
||
Object(w.g)(Object(w.c)(H), 'icon should be icon definiton, but got '.concat(H)),
|
||
!Object(w.c)(H))
|
||
)
|
||
return null;
|
||
var Ee = H;
|
||
return (
|
||
Ee &&
|
||
typeof Ee.icon == 'function' &&
|
||
(Ee = Object(W.a)(
|
||
Object(W.a)({}, Ee),
|
||
{},
|
||
{ icon: Ee.icon(Ie.primaryColor, Ie.secondaryColor) },
|
||
)),
|
||
Object(w.a)(
|
||
Ee.icon,
|
||
'svg-'.concat(Ee.name),
|
||
Object(W.a)(
|
||
{
|
||
className: Y,
|
||
onClick: Q,
|
||
style: Se,
|
||
'data-icon': Ee.name,
|
||
width: '1em',
|
||
height: '1em',
|
||
fill: 'currentColor',
|
||
'aria-hidden': 'true',
|
||
},
|
||
ye,
|
||
),
|
||
)
|
||
);
|
||
};
|
||
(y.displayName = 'IconReact'), (y.getTwoToneColors = B), (y.setTwoToneColors = v), (x.a = y);
|
||
},
|
||
Gytx: function(Ae, x) {
|
||
Ae.exports = function(f, W, w, S) {
|
||
var v = w ? w.call(S, f, W) : void 0;
|
||
if (v !== void 0) return !!v;
|
||
if (f === W) return !0;
|
||
if (typeof f != 'object' || !f || typeof W != 'object' || !W) return !1;
|
||
var B = Object.keys(f),
|
||
y = Object.keys(W);
|
||
if (B.length !== y.length) return !1;
|
||
for (var P = Object.prototype.hasOwnProperty.bind(W), _ = 0; _ < B.length; _++) {
|
||
var H = B[_];
|
||
if (!P(H)) return !1;
|
||
var Y = f[H],
|
||
Q = W[H];
|
||
if (((v = w ? w.call(S, Y, Q, H) : void 0), v === !1 || (v === void 0 && Y !== Q)))
|
||
return !1;
|
||
}
|
||
return !0;
|
||
};
|
||
},
|
||
KBXm: function(Ae, x, s) {
|
||
'use strict';
|
||
Object.defineProperty(x, '__esModule', { value: !0 });
|
||
var f = {
|
||
icon: {
|
||
tag: 'svg',
|
||
attrs: { viewBox: '64 64 896 896', focusable: 'false' },
|
||
children: [
|
||
{
|
||
tag: 'path',
|
||
attrs: {
|
||
d:
|
||
'M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z',
|
||
},
|
||
},
|
||
],
|
||
},
|
||
name: 'ellipsis',
|
||
theme: 'outlined',
|
||
};
|
||
x.default = f;
|
||
},
|
||
Qi1f: function(Ae, x, s) {
|
||
'use strict';
|
||
s.d(x, 'g', function() {
|
||
return H;
|
||
}),
|
||
s.d(x, 'c', function() {
|
||
return Y;
|
||
}),
|
||
s.d(x, 'a', function() {
|
||
return Se;
|
||
}),
|
||
s.d(x, 'b', function() {
|
||
return Oe;
|
||
}),
|
||
s.d(x, 'd', function() {
|
||
return V;
|
||
}),
|
||
s.d(x, 'e', function() {
|
||
return ye;
|
||
}),
|
||
s.d(x, 'f', function() {
|
||
return nt;
|
||
});
|
||
var f = s('VTBJ'),
|
||
W = s('U8pU'),
|
||
w = s('HXN9'),
|
||
S = s.n(w),
|
||
v = s('q1tI'),
|
||
B = s.n(v),
|
||
y = s('Kwbf'),
|
||
P = s('Gu+u'),
|
||
_ = s.n(P);
|
||
function H(z, Ce) {
|
||
Object(y.a)(z, '[@ant-design/icons] '.concat(Ce));
|
||
}
|
||
function Y(z) {
|
||
return (
|
||
Object(W.a)(z) === 'object' &&
|
||
typeof z.name == 'string' &&
|
||
typeof z.theme == 'string' &&
|
||
(Object(W.a)(z.icon) === 'object' || typeof z.icon == 'function')
|
||
);
|
||
}
|
||
function Q() {
|
||
var z = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
||
return Object.keys(z).reduce(function(Ce, Je) {
|
||
var Xe = z[Je];
|
||
switch (Je) {
|
||
case 'class':
|
||
(Ce.className = Xe), delete Ce.class;
|
||
break;
|
||
default:
|
||
Ce[Je] = Xe;
|
||
}
|
||
return Ce;
|
||
}, {});
|
||
}
|
||
function Se(z, Ce, Je) {
|
||
return Je
|
||
? B.a.createElement(
|
||
z.tag,
|
||
Object(f.a)(Object(f.a)({ key: Ce }, Q(z.attrs)), Je),
|
||
(z.children || []).map(function(Xe, me) {
|
||
return Se(
|
||
Xe,
|
||
''
|
||
.concat(Ce, '-')
|
||
.concat(z.tag, '-')
|
||
.concat(me),
|
||
);
|
||
}),
|
||
)
|
||
: B.a.createElement(
|
||
z.tag,
|
||
Object(f.a)({ key: Ce }, Q(z.attrs)),
|
||
(z.children || []).map(function(Xe, me) {
|
||
return Se(
|
||
Xe,
|
||
''
|
||
.concat(Ce, '-')
|
||
.concat(z.tag, '-')
|
||
.concat(me),
|
||
);
|
||
}),
|
||
);
|
||
}
|
||
function Oe(z) {
|
||
return Object(w.generate)(z)[0];
|
||
}
|
||
function V(z) {
|
||
return z ? (Array.isArray(z) ? z : [z]) : [];
|
||
}
|
||
var ye = {
|
||
width: '1em',
|
||
height: '1em',
|
||
fill: 'currentColor',
|
||
'aria-hidden': 'true',
|
||
focusable: 'false',
|
||
},
|
||
Ie = `
|
||
.anticon {
|
||
display: inline-block;
|
||
color: inherit;
|
||
font-style: normal;
|
||
line-height: 0;
|
||
text-align: center;
|
||
text-transform: none;
|
||
vertical-align: -0.125em;
|
||
text-rendering: optimizeLegibility;
|
||
-webkit-font-smoothing: antialiased;
|
||
-moz-osx-font-smoothing: grayscale;
|
||
}
|
||
|
||
.anticon > * {
|
||
line-height: 1;
|
||
}
|
||
|
||
.anticon svg {
|
||
display: inline-block;
|
||
}
|
||
|
||
.anticon::before {
|
||
display: none;
|
||
}
|
||
|
||
.anticon .anticon-icon {
|
||
display: block;
|
||
}
|
||
|
||
.anticon[tabindex] {
|
||
cursor: pointer;
|
||
}
|
||
|
||
.anticon-spin::before,
|
||
.anticon-spin {
|
||
display: inline-block;
|
||
-webkit-animation: loadingCircle 1s infinite linear;
|
||
animation: loadingCircle 1s infinite linear;
|
||
}
|
||
|
||
@-webkit-keyframes loadingCircle {
|
||
100% {
|
||
-webkit-transform: rotate(360deg);
|
||
transform: rotate(360deg);
|
||
}
|
||
}
|
||
|
||
@keyframes loadingCircle {
|
||
100% {
|
||
-webkit-transform: rotate(360deg);
|
||
transform: rotate(360deg);
|
||
}
|
||
}
|
||
`,
|
||
Ee = !1,
|
||
nt = function() {
|
||
var Ce = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ie;
|
||
Object(v.useEffect)(function() {
|
||
Ee || (Object(P.insertCss)(Ce, { prepend: !0 }), (Ee = !0));
|
||
}, []);
|
||
};
|
||
},
|
||
SRve: function(Ae, x, s) {
|
||
'use strict';
|
||
Object.defineProperty(x, '__esModule', { value: !0 });
|
||
var f = {
|
||
icon: {
|
||
tag: 'svg',
|
||
attrs: { viewBox: '64 64 896 896', focusable: 'false' },
|
||
children: [
|
||
{ tag: 'defs', attrs: {}, children: [{ tag: 'style', attrs: {} }] },
|
||
{
|
||
tag: 'path',
|
||
attrs: { d: 'M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z' },
|
||
},
|
||
{
|
||
tag: 'path',
|
||
attrs: { d: 'M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z' },
|
||
},
|
||
],
|
||
},
|
||
name: 'plus',
|
||
theme: 'outlined',
|
||
};
|
||
x.default = f;
|
||
},
|
||
ZTPi: function(Ae, x, s) {
|
||
'use strict';
|
||
var f = s('pVnL'),
|
||
W = s.n(f),
|
||
w = s('lSNA'),
|
||
S = s.n(w),
|
||
v = s('q1tI'),
|
||
B = s('rePB'),
|
||
y = s('ODXe'),
|
||
P = s('Ff2n'),
|
||
_ = s('VTBJ'),
|
||
H = s('TSYQ'),
|
||
Y = s.n(H),
|
||
Q = s('Zm9Q'),
|
||
Se = s('6cGi'),
|
||
Oe = s('KQm4'),
|
||
V = s('xEkU'),
|
||
ye = s.n(V),
|
||
Ie = s('t23M');
|
||
function Ee(h) {
|
||
var j = Object(v.useRef)(),
|
||
R = Object(v.useRef)(!1);
|
||
function k() {
|
||
for (var I = arguments.length, L = new Array(I), q = 0; q < I; q++) L[q] = arguments[q];
|
||
R.current ||
|
||
(ye.a.cancel(j.current),
|
||
(j.current = ye()(function() {
|
||
h.apply(void 0, L);
|
||
})));
|
||
}
|
||
return (
|
||
Object(v.useEffect)(function() {
|
||
return function() {
|
||
(R.current = !0), ye.a.cancel(j.current);
|
||
};
|
||
}, []),
|
||
k
|
||
);
|
||
}
|
||
function nt(h) {
|
||
var j = Object(v.useRef)([]),
|
||
R = Object(v.useState)({}),
|
||
k = Object(y.a)(R, 2),
|
||
I = k[1],
|
||
L = Object(v.useRef)(typeof h == 'function' ? h() : h),
|
||
q = Ee(function() {
|
||
var $ = L.current;
|
||
j.current.forEach(function(fe) {
|
||
$ = fe($);
|
||
}),
|
||
(j.current = []),
|
||
(L.current = $),
|
||
I({});
|
||
});
|
||
function ee($) {
|
||
j.current.push($), q();
|
||
}
|
||
return [L.current, ee];
|
||
}
|
||
var z = s('4IlW');
|
||
function Ce(h, j) {
|
||
var R,
|
||
k = h.prefixCls,
|
||
I = h.id,
|
||
L = h.active,
|
||
q = h.rtl,
|
||
ee = h.tab,
|
||
$ = ee.key,
|
||
fe = ee.tab,
|
||
oe = ee.disabled,
|
||
re = ee.closeIcon,
|
||
ve = h.tabBarGutter,
|
||
De = h.tabPosition,
|
||
se = h.closable,
|
||
pe = h.renderWrapper,
|
||
We = h.removeAriaLabel,
|
||
he = h.editable,
|
||
Me = h.onClick,
|
||
U = h.onRemove,
|
||
we = h.onFocus,
|
||
Le = ''.concat(k, '-tab');
|
||
v.useEffect(function() {
|
||
return U;
|
||
}, []);
|
||
var je = {};
|
||
De === 'top' || De === 'bottom'
|
||
? (je[q ? 'marginLeft' : 'marginRight'] = ve)
|
||
: (je.marginBottom = ve);
|
||
var Ve = he && se !== !1 && !oe;
|
||
function Ke(ie) {
|
||
if (oe) return;
|
||
Me(ie);
|
||
}
|
||
function st(ie) {
|
||
ie.preventDefault(), ie.stopPropagation(), he.onEdit('remove', { key: $, event: ie });
|
||
}
|
||
var Be = v.createElement(
|
||
'div',
|
||
{
|
||
key: $,
|
||
ref: j,
|
||
className: Y()(
|
||
Le,
|
||
((R = {}),
|
||
Object(B.a)(R, ''.concat(Le, '-with-remove'), Ve),
|
||
Object(B.a)(R, ''.concat(Le, '-active'), L),
|
||
Object(B.a)(R, ''.concat(Le, '-disabled'), oe),
|
||
R),
|
||
),
|
||
style: je,
|
||
onClick: Ke,
|
||
},
|
||
v.createElement(
|
||
'div',
|
||
{
|
||
role: 'tab',
|
||
'aria-selected': L,
|
||
id: I && ''.concat(I, '-tab-').concat($),
|
||
className: ''.concat(Le, '-btn'),
|
||
'aria-controls': I && ''.concat(I, '-panel-').concat($),
|
||
'aria-disabled': oe,
|
||
tabIndex: oe ? null : 0,
|
||
onClick: function(Z) {
|
||
Z.stopPropagation(), Ke(Z);
|
||
},
|
||
onKeyDown: function(Z) {
|
||
[z.a.SPACE, z.a.ENTER].includes(Z.which) && (Z.preventDefault(), Ke(Z));
|
||
},
|
||
onFocus: we,
|
||
},
|
||
fe,
|
||
),
|
||
Ve &&
|
||
v.createElement(
|
||
'button',
|
||
{
|
||
type: 'button',
|
||
'aria-label': We || 'remove',
|
||
tabIndex: 0,
|
||
className: ''.concat(Le, '-remove'),
|
||
onClick: function(Z) {
|
||
Z.stopPropagation(), st(Z);
|
||
},
|
||
},
|
||
re || he.removeIcon || '×',
|
||
),
|
||
);
|
||
return pe && (Be = pe(Be)), Be;
|
||
}
|
||
var Je = v.forwardRef(Ce),
|
||
Xe = { width: 0, height: 0, left: 0, top: 0 };
|
||
function me(h, j, R) {
|
||
return Object(v.useMemo)(
|
||
function() {
|
||
for (
|
||
var k,
|
||
I = new Map(),
|
||
L = j.get((k = h[0]) === null || k === void 0 ? void 0 : k.key) || Xe,
|
||
q = L.left + L.width,
|
||
ee = 0;
|
||
ee < h.length;
|
||
ee += 1
|
||
) {
|
||
var $ = h[ee].key,
|
||
fe = j.get($);
|
||
if (!fe) {
|
||
var oe;
|
||
fe = j.get((oe = h[ee - 1]) === null || oe === void 0 ? void 0 : oe.key) || Xe;
|
||
}
|
||
var re = I.get($) || Object(_.a)({}, fe);
|
||
(re.right = q - re.left - re.width), I.set($, re);
|
||
}
|
||
return I;
|
||
},
|
||
[
|
||
h
|
||
.map(function(k) {
|
||
return k.key;
|
||
})
|
||
.join('_'),
|
||
j,
|
||
R,
|
||
],
|
||
);
|
||
}
|
||
var Ze = { width: 0, height: 0, left: 0, top: 0, right: 0 };
|
||
function it(h, j, R, k, I) {
|
||
var L = I.tabs,
|
||
q = I.tabPosition,
|
||
ee = I.rtl,
|
||
$,
|
||
fe,
|
||
oe;
|
||
['top', 'bottom'].includes(q)
|
||
? (($ = 'width'), (fe = ee ? 'right' : 'left'), (oe = Math.abs(j.left)))
|
||
: (($ = 'height'), (fe = 'top'), (oe = -j.top));
|
||
var re = j[$],
|
||
ve = R[$],
|
||
De = k[$],
|
||
se = re;
|
||
return (
|
||
ve + De > re && (se = re - De),
|
||
Object(v.useMemo)(
|
||
function() {
|
||
if (!L.length) return [0, 0];
|
||
for (var pe = L.length, We = pe, he = 0; he < pe; he += 1) {
|
||
var Me = h.get(L[he].key) || Ze;
|
||
if (Me[fe] + Me[$] > oe + se) {
|
||
We = he - 1;
|
||
break;
|
||
}
|
||
}
|
||
for (var U = 0, we = pe - 1; we >= 0; we -= 1) {
|
||
var Le = h.get(L[we].key) || Ze;
|
||
if (Le[fe] < oe) {
|
||
U = we + 1;
|
||
break;
|
||
}
|
||
}
|
||
return [U, We];
|
||
},
|
||
[
|
||
h,
|
||
oe,
|
||
se,
|
||
q,
|
||
L.map(function(pe) {
|
||
return pe.key;
|
||
}).join('_'),
|
||
ee,
|
||
],
|
||
)
|
||
);
|
||
}
|
||
var jt = s('1j5w'),
|
||
kt = s('eDIo');
|
||
function at(h, j) {
|
||
var R = h.prefixCls,
|
||
k = h.editable,
|
||
I = h.locale,
|
||
L = h.style;
|
||
return !k || k.showAdd === !1
|
||
? null
|
||
: v.createElement(
|
||
'button',
|
||
{
|
||
ref: j,
|
||
type: 'button',
|
||
className: ''.concat(R, '-nav-add'),
|
||
style: L,
|
||
'aria-label': (I == null ? void 0 : I.addAriaLabel) || 'Add tab',
|
||
onClick: function(ee) {
|
||
k.onEdit('add', { event: ee });
|
||
},
|
||
},
|
||
k.addIcon || '+',
|
||
);
|
||
}
|
||
var _t = v.forwardRef(at);
|
||
function Wt(h, j) {
|
||
var R = h.prefixCls,
|
||
k = h.id,
|
||
I = h.tabs,
|
||
L = h.locale,
|
||
q = h.mobile,
|
||
ee = h.moreIcon,
|
||
$ = ee === void 0 ? 'More' : ee,
|
||
fe = h.moreTransitionName,
|
||
oe = h.style,
|
||
re = h.className,
|
||
ve = h.editable,
|
||
De = h.tabBarGutter,
|
||
se = h.rtl,
|
||
pe = h.onTabClick,
|
||
We = Object(v.useState)(!1),
|
||
he = Object(y.a)(We, 2),
|
||
Me = he[0],
|
||
U = he[1],
|
||
we = Object(v.useState)(null),
|
||
Le = Object(y.a)(we, 2),
|
||
je = Le[0],
|
||
Ve = Le[1],
|
||
Ke = ''.concat(k, '-more-popup'),
|
||
st = ''.concat(R, '-dropdown'),
|
||
Be = je !== null ? ''.concat(Ke, '-').concat(je) : null,
|
||
ie = L == null ? void 0 : L.dropdownAriaLabel,
|
||
Z = v.createElement(
|
||
jt.f,
|
||
{
|
||
onClick: function(M) {
|
||
var p = M.key,
|
||
E = M.domEvent;
|
||
pe(p, E), U(!1);
|
||
},
|
||
id: Ke,
|
||
tabIndex: -1,
|
||
role: 'listbox',
|
||
'aria-activedescendant': Be,
|
||
selectedKeys: [je],
|
||
'aria-label': ie !== void 0 ? ie : 'expanded dropdown',
|
||
},
|
||
I.map(function(Ne) {
|
||
return v.createElement(
|
||
jt.d,
|
||
{
|
||
key: Ne.key,
|
||
id: ''.concat(Ke, '-').concat(Ne.key),
|
||
role: 'option',
|
||
'aria-controls': k && ''.concat(k, '-panel-').concat(Ne.key),
|
||
disabled: Ne.disabled,
|
||
},
|
||
Ne.tab,
|
||
);
|
||
}),
|
||
);
|
||
function Te(Ne) {
|
||
for (
|
||
var M = I.filter(function(a) {
|
||
return !a.disabled;
|
||
}),
|
||
p =
|
||
M.findIndex(function(a) {
|
||
return a.key === je;
|
||
}) || 0,
|
||
E = M.length,
|
||
l = 0;
|
||
l < E;
|
||
l += 1
|
||
) {
|
||
p = (p + Ne + E) % E;
|
||
var e = M[p];
|
||
if (!e.disabled) {
|
||
Ve(e.key);
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
function xe(Ne) {
|
||
var M = Ne.which;
|
||
if (!Me) {
|
||
[z.a.DOWN, z.a.SPACE, z.a.ENTER].includes(M) && (U(!0), Ne.preventDefault());
|
||
return;
|
||
}
|
||
switch (M) {
|
||
case z.a.UP:
|
||
Te(-1), Ne.preventDefault();
|
||
break;
|
||
case z.a.DOWN:
|
||
Te(1), Ne.preventDefault();
|
||
break;
|
||
case z.a.ESC:
|
||
U(!1);
|
||
break;
|
||
case z.a.SPACE:
|
||
case z.a.ENTER:
|
||
je !== null && pe(je, Ne);
|
||
break;
|
||
}
|
||
}
|
||
Object(v.useEffect)(
|
||
function() {
|
||
var Ne = document.getElementById(Be);
|
||
Ne && Ne.scrollIntoView && Ne.scrollIntoView(!1);
|
||
},
|
||
[je],
|
||
),
|
||
Object(v.useEffect)(
|
||
function() {
|
||
Me || Ve(null);
|
||
},
|
||
[Me],
|
||
);
|
||
var le = Object(B.a)({}, se ? 'marginLeft' : 'marginRight', De);
|
||
I.length || ((le.visibility = 'hidden'), (le.order = 1));
|
||
var ke = Y()(Object(B.a)({}, ''.concat(st, '-rtl'), se)),
|
||
et = q
|
||
? null
|
||
: v.createElement(
|
||
kt.a,
|
||
{
|
||
prefixCls: st,
|
||
overlay: Z,
|
||
trigger: ['hover'],
|
||
visible: Me,
|
||
transitionName: fe,
|
||
onVisibleChange: U,
|
||
overlayClassName: ke,
|
||
mouseEnterDelay: 0.1,
|
||
mouseLeaveDelay: 0.1,
|
||
},
|
||
v.createElement(
|
||
'button',
|
||
{
|
||
type: 'button',
|
||
className: ''.concat(R, '-nav-more'),
|
||
style: le,
|
||
tabIndex: -1,
|
||
'aria-hidden': 'true',
|
||
'aria-haspopup': 'listbox',
|
||
'aria-controls': Ke,
|
||
id: ''.concat(k, '-more'),
|
||
'aria-expanded': Me,
|
||
onKeyDown: xe,
|
||
},
|
||
$,
|
||
),
|
||
);
|
||
return v.createElement(
|
||
'div',
|
||
{ className: Y()(''.concat(R, '-nav-operations'), re), style: oe, ref: j },
|
||
et,
|
||
v.createElement(_t, { prefixCls: R, locale: L, editable: ve }),
|
||
);
|
||
}
|
||
var Bt = v.forwardRef(Wt),
|
||
ht = Object(v.createContext)(null),
|
||
Ht = 0.1,
|
||
gt = 0.01,
|
||
Nt = 20,
|
||
rt = Math.pow(0.995, Nt);
|
||
function At() {
|
||
var h = navigator.userAgent || navigator.vendor || window.opera;
|
||
return !!(
|
||
/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(
|
||
h,
|
||
) ||
|
||
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(
|
||
h.substr(0, 4),
|
||
)
|
||
);
|
||
}
|
||
function qe(h, j) {
|
||
var R = Object(v.useState)(),
|
||
k = Object(y.a)(R, 2),
|
||
I = k[0],
|
||
L = k[1],
|
||
q = Object(v.useState)(0),
|
||
ee = Object(y.a)(q, 2),
|
||
$ = ee[0],
|
||
fe = ee[1],
|
||
oe = Object(v.useState)(0),
|
||
re = Object(y.a)(oe, 2),
|
||
ve = re[0],
|
||
De = re[1],
|
||
se = Object(v.useState)(),
|
||
pe = Object(y.a)(se, 2),
|
||
We = pe[0],
|
||
he = pe[1],
|
||
Me = Object(v.useRef)();
|
||
function U(ie) {
|
||
var Z = ie.touches[0],
|
||
Te = Z.screenX,
|
||
xe = Z.screenY;
|
||
L({ x: Te, y: xe }), window.clearInterval(Me.current);
|
||
}
|
||
function we(ie) {
|
||
if (!I) return;
|
||
ie.preventDefault();
|
||
var Z = ie.touches[0],
|
||
Te = Z.screenX,
|
||
xe = Z.screenY;
|
||
L({ x: Te, y: xe });
|
||
var le = Te - I.x,
|
||
ke = xe - I.y;
|
||
j(le, ke);
|
||
var et = Date.now();
|
||
fe(et), De(et - $), he({ x: le, y: ke });
|
||
}
|
||
function Le() {
|
||
if (!I) return;
|
||
if ((L(null), he(null), We)) {
|
||
var ie = We.x / ve,
|
||
Z = We.y / ve,
|
||
Te = Math.abs(ie),
|
||
xe = Math.abs(Z);
|
||
if (Math.max(Te, xe) < Ht) return;
|
||
var le = ie,
|
||
ke = Z;
|
||
Me.current = window.setInterval(function() {
|
||
if (Math.abs(le) < gt && Math.abs(ke) < gt) {
|
||
window.clearInterval(Me.current);
|
||
return;
|
||
}
|
||
(le *= rt), (ke *= rt), j(le * Nt, ke * Nt);
|
||
}, Nt);
|
||
}
|
||
}
|
||
var je = Object(v.useRef)(0),
|
||
Ve = Object(v.useRef)(!1),
|
||
Ke = Object(v.useRef)();
|
||
function st(ie) {
|
||
var Z = ie.deltaX,
|
||
Te = ie.deltaY,
|
||
xe = 0,
|
||
le = Math.abs(Z),
|
||
ke = Math.abs(Te);
|
||
le === ke
|
||
? (xe = Ke.current === 'x' ? Z : Te)
|
||
: le > ke
|
||
? ((xe = Z), (Ke.current = 'x'))
|
||
: ((xe = Te), (Ke.current = 'y'));
|
||
var et = Date.now();
|
||
et - je.current > 100 && (Ve.current = !1),
|
||
(j(-xe, -xe) || Ve.current) && (ie.preventDefault(), (Ve.current = !0)),
|
||
(je.current = et);
|
||
}
|
||
var Be = Object(v.useRef)(null);
|
||
(Be.current = { onTouchStart: U, onTouchMove: we, onTouchEnd: Le, onWheel: st }),
|
||
v.useEffect(function() {
|
||
function ie(le) {
|
||
Be.current.onTouchStart(le);
|
||
}
|
||
function Z(le) {
|
||
Be.current.onTouchMove(le);
|
||
}
|
||
function Te(le) {
|
||
Be.current.onTouchEnd(le);
|
||
}
|
||
function xe(le) {
|
||
Be.current.onWheel(le);
|
||
}
|
||
return (
|
||
document.addEventListener('touchmove', Z, { passive: !1 }),
|
||
document.addEventListener('touchend', Te, { passive: !1 }),
|
||
h.current.addEventListener('touchstart', ie, { passive: !1 }),
|
||
h.current.addEventListener('wheel', xe),
|
||
function() {
|
||
document.removeEventListener('touchmove', Z),
|
||
document.removeEventListener('touchend', Te);
|
||
}
|
||
);
|
||
}, []);
|
||
}
|
||
function Xt() {
|
||
var h = Object(v.useRef)(new Map());
|
||
function j(k) {
|
||
return h.current.has(k) || h.current.set(k, v.createRef()), h.current.get(k);
|
||
}
|
||
function R(k) {
|
||
h.current.delete(k);
|
||
}
|
||
return [j, R];
|
||
}
|
||
function Ft(h, j) {
|
||
var R = v.useRef(h),
|
||
k = v.useState({}),
|
||
I = Object(y.a)(k, 2),
|
||
L = I[1];
|
||
function q(ee) {
|
||
var $ = typeof ee == 'function' ? ee(R.current) : ee;
|
||
$ !== R.current && j($, R.current), (R.current = $), L({});
|
||
}
|
||
return [R.current, q];
|
||
}
|
||
var Rt = function(j) {
|
||
var R = j.position,
|
||
k = j.prefixCls,
|
||
I = j.extra;
|
||
if (!I) return null;
|
||
var L,
|
||
q = I;
|
||
return (
|
||
R === 'right' && (L = q.right || (!q.left && q) || null),
|
||
R === 'left' && (L = q.left || null),
|
||
L ? v.createElement('div', { className: ''.concat(k, '-extra-content') }, L) : null
|
||
);
|
||
};
|
||
function zt(h, j) {
|
||
var R,
|
||
k = v.useContext(ht),
|
||
I = k.prefixCls,
|
||
L = k.tabs,
|
||
q = h.className,
|
||
ee = h.style,
|
||
$ = h.id,
|
||
fe = h.animated,
|
||
oe = h.activeKey,
|
||
re = h.rtl,
|
||
ve = h.extra,
|
||
De = h.editable,
|
||
se = h.locale,
|
||
pe = h.tabPosition,
|
||
We = h.tabBarGutter,
|
||
he = h.children,
|
||
Me = h.onTabClick,
|
||
U = h.onTabScroll,
|
||
we = Object(v.useRef)(),
|
||
Le = Object(v.useRef)(),
|
||
je = Object(v.useRef)(),
|
||
Ve = Object(v.useRef)(),
|
||
Ke = Xt(),
|
||
st = Object(y.a)(Ke, 2),
|
||
Be = st[0],
|
||
ie = st[1],
|
||
Z = pe === 'top' || pe === 'bottom',
|
||
Te = Ft(0, function(be, ae) {
|
||
Z && U && U({ direction: be > ae ? 'left' : 'right' });
|
||
}),
|
||
xe = Object(y.a)(Te, 2),
|
||
le = xe[0],
|
||
ke = xe[1],
|
||
et = Ft(0, function(be, ae) {
|
||
!Z && U && U({ direction: be > ae ? 'top' : 'bottom' });
|
||
}),
|
||
Ne = Object(y.a)(et, 2),
|
||
M = Ne[0],
|
||
p = Ne[1],
|
||
E = Object(v.useState)(0),
|
||
l = Object(y.a)(E, 2),
|
||
e = l[0],
|
||
a = l[1],
|
||
u = Object(v.useState)(0),
|
||
g = Object(y.a)(u, 2),
|
||
N = g[0],
|
||
T = g[1],
|
||
b = Object(v.useState)(0),
|
||
C = Object(y.a)(b, 2),
|
||
D = C[0],
|
||
ne = C[1],
|
||
te = Object(v.useState)(0),
|
||
ge = Object(y.a)(te, 2),
|
||
ue = ge[0],
|
||
ot = ge[1],
|
||
xt = Object(v.useState)(null),
|
||
bt = Object(y.a)(xt, 2),
|
||
tt = bt[0],
|
||
It = bt[1],
|
||
nn = Object(v.useState)(null),
|
||
Ut = Object(y.a)(nn, 2),
|
||
mt = Ut[0],
|
||
pn = Ut[1],
|
||
un = Object(v.useState)(0),
|
||
cn = Object(y.a)(un, 2),
|
||
mn = cn[0],
|
||
on = cn[1],
|
||
an = Object(v.useState)(0),
|
||
Jt = Object(y.a)(an, 2),
|
||
On = Jt[0],
|
||
Cn = Jt[1],
|
||
Mn = nt(new Map()),
|
||
Tn = Object(y.a)(Mn, 2),
|
||
t = Tn[0],
|
||
i = Tn[1],
|
||
n = me(L, t, e),
|
||
r = ''.concat(I, '-nav-operations-hidden'),
|
||
d = 0,
|
||
m = 0;
|
||
Z
|
||
? re
|
||
? ((d = 0), (m = Math.max(0, e - tt)))
|
||
: ((d = Math.min(0, tt - e)), (m = 0))
|
||
: ((d = Math.min(0, mt - N)), (m = 0));
|
||
function o(be) {
|
||
return be < d ? [d, !1] : be > m ? [m, !1] : [be, !0];
|
||
}
|
||
var O = Object(v.useRef)(),
|
||
c = Object(v.useState)(),
|
||
A = Object(y.a)(c, 2),
|
||
F = A[0],
|
||
ce = A[1];
|
||
function J() {
|
||
ce(Date.now());
|
||
}
|
||
function K() {
|
||
window.clearTimeout(O.current);
|
||
}
|
||
qe(we, function(be, ae) {
|
||
var Ye = !1;
|
||
function Et(Zt, qt) {
|
||
Zt(function(Qe) {
|
||
var Ot = o(Qe + qt),
|
||
Tt = Object(y.a)(Ot, 2),
|
||
Pt = Tt[0],
|
||
gn = Tt[1];
|
||
return (Ye = gn), Pt;
|
||
});
|
||
}
|
||
if (Z) {
|
||
if (tt >= e) return Ye;
|
||
Et(ke, be);
|
||
} else {
|
||
if (mt >= N) return Ye;
|
||
Et(p, ae);
|
||
}
|
||
return K(), J(), Ye;
|
||
}),
|
||
Object(v.useEffect)(
|
||
function() {
|
||
return (
|
||
K(),
|
||
F &&
|
||
(O.current = window.setTimeout(function() {
|
||
ce(0);
|
||
}, 100)),
|
||
K
|
||
);
|
||
},
|
||
[F],
|
||
);
|
||
function G() {
|
||
var be = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : oe,
|
||
ae = n.get(be);
|
||
if (!ae) return;
|
||
if (Z) {
|
||
var Ye = le;
|
||
re
|
||
? ae.right < le
|
||
? (Ye = ae.right)
|
||
: ae.right + ae.width > le + tt && (Ye = ae.right + ae.width - tt)
|
||
: ae.left < -le
|
||
? (Ye = -ae.left)
|
||
: ae.left + ae.width > -le + tt && (Ye = -(ae.left + ae.width - tt)),
|
||
p(0),
|
||
ke(o(Ye)[0]);
|
||
} else {
|
||
var Et = M;
|
||
ae.top < -M
|
||
? (Et = -ae.top)
|
||
: ae.top + ae.height > -M + mt && (Et = -(ae.top + ae.height - mt)),
|
||
ke(0),
|
||
p(o(Et)[0]);
|
||
}
|
||
}
|
||
var Pe = it(
|
||
n,
|
||
{ width: tt, height: mt, left: le, top: M },
|
||
{ width: D, height: ue },
|
||
{ width: mn, height: On },
|
||
Object(_.a)(Object(_.a)({}, h), {}, { tabs: L }),
|
||
),
|
||
$e = Object(y.a)(Pe, 2),
|
||
_e = $e[0],
|
||
He = $e[1],
|
||
Fe = L.map(function(be) {
|
||
var ae = be.key;
|
||
return v.createElement(Je, {
|
||
id: $,
|
||
prefixCls: I,
|
||
key: ae,
|
||
rtl: re,
|
||
tab: be,
|
||
closable: be.closable,
|
||
editable: De,
|
||
active: ae === oe,
|
||
tabPosition: pe,
|
||
tabBarGutter: We,
|
||
renderWrapper: he,
|
||
removeAriaLabel: se == null ? void 0 : se.removeAriaLabel,
|
||
ref: Be(ae),
|
||
onClick: function(Et) {
|
||
Me(ae, Et);
|
||
},
|
||
onRemove: function() {
|
||
ie(ae);
|
||
},
|
||
onFocus: function() {
|
||
G(ae), J(), re || (we.current.scrollLeft = 0), (we.current.scrollTop = 0);
|
||
},
|
||
});
|
||
}),
|
||
Ge = Ee(function() {
|
||
var be,
|
||
ae,
|
||
Ye,
|
||
Et,
|
||
Zt,
|
||
qt,
|
||
Qe,
|
||
Ot,
|
||
Tt,
|
||
Pt = ((be = we.current) === null || be === void 0 ? void 0 : be.offsetWidth) || 0,
|
||
gn = ((ae = we.current) === null || ae === void 0 ? void 0 : ae.offsetHeight) || 0,
|
||
Nn = ((Ye = Ve.current) === null || Ye === void 0 ? void 0 : Ye.offsetWidth) || 0,
|
||
An = ((Et = Ve.current) === null || Et === void 0 ? void 0 : Et.offsetHeight) || 0,
|
||
Pn = ((Zt = je.current) === null || Zt === void 0 ? void 0 : Zt.offsetWidth) || 0,
|
||
Rn = ((qt = je.current) === null || qt === void 0 ? void 0 : qt.offsetHeight) || 0;
|
||
It(Pt), pn(gn), on(Nn), Cn(An);
|
||
var Sn =
|
||
(((Qe = Le.current) === null || Qe === void 0 ? void 0 : Qe.offsetWidth) || 0) - Nn,
|
||
Dn =
|
||
(((Ot = Le.current) === null || Ot === void 0 ? void 0 : Ot.offsetHeight) || 0) -
|
||
An;
|
||
a(Sn), T(Dn);
|
||
var wn =
|
||
(Tt = je.current) === null || Tt === void 0 ? void 0 : Tt.className.includes(r);
|
||
ne(Sn - (wn ? 0 : Pn)),
|
||
ot(Dn - (wn ? 0 : Rn)),
|
||
i(function() {
|
||
var jn = new Map();
|
||
return (
|
||
L.forEach(function(Ln) {
|
||
var xn = Ln.key,
|
||
bn = Be(xn).current;
|
||
bn &&
|
||
jn.set(xn, {
|
||
width: bn.offsetWidth,
|
||
height: bn.offsetHeight,
|
||
left: bn.offsetLeft,
|
||
top: bn.offsetTop,
|
||
});
|
||
}),
|
||
jn
|
||
);
|
||
});
|
||
}),
|
||
lt = L.slice(0, _e),
|
||
ze = L.slice(He + 1),
|
||
Ct = [].concat(Object(Oe.a)(lt), Object(Oe.a)(ze)),
|
||
Mt = Object(v.useState)(),
|
||
ut = Object(y.a)(Mt, 2),
|
||
vt = ut[0],
|
||
Kt = ut[1],
|
||
ct = n.get(oe),
|
||
wt = Object(v.useRef)();
|
||
function dn() {
|
||
ye.a.cancel(wt.current);
|
||
}
|
||
Object(v.useEffect)(
|
||
function() {
|
||
var be = {};
|
||
return (
|
||
ct &&
|
||
(Z
|
||
? (re ? (be.right = ct.right) : (be.left = ct.left), (be.width = ct.width))
|
||
: ((be.top = ct.top), (be.height = ct.height))),
|
||
dn(),
|
||
(wt.current = ye()(function() {
|
||
Kt(be);
|
||
})),
|
||
dn
|
||
);
|
||
},
|
||
[ct, Z, re],
|
||
),
|
||
Object(v.useEffect)(
|
||
function() {
|
||
G();
|
||
},
|
||
[oe, ct, n, Z],
|
||
),
|
||
Object(v.useEffect)(
|
||
function() {
|
||
Ge();
|
||
},
|
||
[
|
||
re,
|
||
We,
|
||
oe,
|
||
L.map(function(be) {
|
||
return be.key;
|
||
}).join('_'),
|
||
],
|
||
);
|
||
var vn = !!Ct.length,
|
||
yt = ''.concat(I, '-nav-wrap'),
|
||
rn,
|
||
sn,
|
||
En,
|
||
hn;
|
||
return (
|
||
Z
|
||
? re
|
||
? ((sn = le > 0), (rn = le + tt < e))
|
||
: ((rn = le < 0), (sn = -le + tt < e))
|
||
: ((En = M < 0), (hn = -M + mt < N)),
|
||
v.createElement(
|
||
'div',
|
||
{
|
||
ref: j,
|
||
role: 'tablist',
|
||
className: Y()(''.concat(I, '-nav'), q),
|
||
style: ee,
|
||
onKeyDown: function() {
|
||
J();
|
||
},
|
||
},
|
||
v.createElement(Rt, { position: 'left', extra: ve, prefixCls: I }),
|
||
v.createElement(
|
||
Ie.default,
|
||
{ onResize: Ge },
|
||
v.createElement(
|
||
'div',
|
||
{
|
||
className: Y()(
|
||
yt,
|
||
((R = {}),
|
||
Object(B.a)(R, ''.concat(yt, '-ping-left'), rn),
|
||
Object(B.a)(R, ''.concat(yt, '-ping-right'), sn),
|
||
Object(B.a)(R, ''.concat(yt, '-ping-top'), En),
|
||
Object(B.a)(R, ''.concat(yt, '-ping-bottom'), hn),
|
||
R),
|
||
),
|
||
ref: we,
|
||
},
|
||
v.createElement(
|
||
Ie.default,
|
||
{ onResize: Ge },
|
||
v.createElement(
|
||
'div',
|
||
{
|
||
ref: Le,
|
||
className: ''.concat(I, '-nav-list'),
|
||
style: {
|
||
transform: 'translate('.concat(le, 'px, ').concat(M, 'px)'),
|
||
transition: F ? 'none' : void 0,
|
||
},
|
||
},
|
||
Fe,
|
||
v.createElement(_t, {
|
||
ref: Ve,
|
||
prefixCls: I,
|
||
locale: se,
|
||
editable: De,
|
||
style: { visibility: vn ? 'hidden' : null },
|
||
}),
|
||
v.createElement('div', {
|
||
className: Y()(
|
||
''.concat(I, '-ink-bar'),
|
||
Object(B.a)({}, ''.concat(I, '-ink-bar-animated'), fe.inkBar),
|
||
),
|
||
style: vt,
|
||
}),
|
||
),
|
||
),
|
||
),
|
||
),
|
||
v.createElement(
|
||
Bt,
|
||
Object.assign({}, h, { ref: je, prefixCls: I, tabs: Ct, className: !vn && r }),
|
||
),
|
||
v.createElement(Rt, { position: 'right', extra: ve, prefixCls: I }),
|
||
)
|
||
);
|
||
}
|
||
var Vt = v.forwardRef(zt);
|
||
function $t(h) {
|
||
var j = h.id,
|
||
R = h.activeKey,
|
||
k = h.animated,
|
||
I = h.tabPosition,
|
||
L = h.rtl,
|
||
q = h.destroyInactiveTabPane,
|
||
ee = v.useContext(ht),
|
||
$ = ee.prefixCls,
|
||
fe = ee.tabs,
|
||
oe = k.tabPane,
|
||
re = fe.findIndex(function(ve) {
|
||
return ve.key === R;
|
||
});
|
||
return v.createElement(
|
||
'div',
|
||
{ className: Y()(''.concat($, '-content-holder')) },
|
||
v.createElement(
|
||
'div',
|
||
{
|
||
className: Y()(
|
||
''.concat($, '-content'),
|
||
''.concat($, '-content-').concat(I),
|
||
Object(B.a)({}, ''.concat($, '-content-animated'), oe),
|
||
),
|
||
style:
|
||
re && oe
|
||
? Object(B.a)({}, L ? 'marginRight' : 'marginLeft', '-'.concat(re, '00%'))
|
||
: null,
|
||
},
|
||
fe.map(function(ve) {
|
||
return v.cloneElement(ve.node, {
|
||
key: ve.key,
|
||
prefixCls: $,
|
||
tabKey: ve.key,
|
||
id: j,
|
||
animated: oe,
|
||
active: ve.key === R,
|
||
destroyInactiveTabPane: q,
|
||
});
|
||
}),
|
||
),
|
||
);
|
||
}
|
||
function X(h) {
|
||
var j = h.prefixCls,
|
||
R = h.forceRender,
|
||
k = h.className,
|
||
I = h.style,
|
||
L = h.id,
|
||
q = h.active,
|
||
ee = h.animated,
|
||
$ = h.destroyInactiveTabPane,
|
||
fe = h.tabKey,
|
||
oe = h.children,
|
||
re = v.useState(R),
|
||
ve = Object(y.a)(re, 2),
|
||
De = ve[0],
|
||
se = ve[1];
|
||
v.useEffect(
|
||
function() {
|
||
q ? se(!0) : $ && se(!1);
|
||
},
|
||
[q, $],
|
||
);
|
||
var pe = {};
|
||
return (
|
||
q ||
|
||
(ee
|
||
? ((pe.visibility = 'hidden'), (pe.height = 0), (pe.overflowY = 'hidden'))
|
||
: (pe.display = 'none')),
|
||
v.createElement(
|
||
'div',
|
||
{
|
||
id: L && ''.concat(L, '-panel-').concat(fe),
|
||
role: 'tabpanel',
|
||
tabIndex: q ? 0 : -1,
|
||
'aria-labelledby': L && ''.concat(L, '-tab-').concat(fe),
|
||
'aria-hidden': !q,
|
||
style: Object(_.a)(Object(_.a)({}, pe), I),
|
||
className: Y()(''.concat(j, '-tabpane'), q && ''.concat(j, '-tabpane-active'), k),
|
||
},
|
||
(q || De || R) && oe,
|
||
)
|
||
);
|
||
}
|
||
var Lt = 0;
|
||
function St(h) {
|
||
return Object(Q.a)(h)
|
||
.map(function(j) {
|
||
if (v.isValidElement(j)) {
|
||
var R = j.key !== void 0 ? String(j.key) : void 0;
|
||
return Object(_.a)(Object(_.a)({ key: R }, j.props), {}, { node: j });
|
||
}
|
||
return null;
|
||
})
|
||
.filter(function(j) {
|
||
return j;
|
||
});
|
||
}
|
||
function en(h, j) {
|
||
var R,
|
||
k = h.id,
|
||
I = h.prefixCls,
|
||
L = I === void 0 ? 'rc-tabs' : I,
|
||
q = h.className,
|
||
ee = h.children,
|
||
$ = h.direction,
|
||
fe = h.activeKey,
|
||
oe = h.defaultActiveKey,
|
||
re = h.editable,
|
||
ve = h.animated,
|
||
De = h.tabPosition,
|
||
se = De === void 0 ? 'top' : De,
|
||
pe = h.tabBarGutter,
|
||
We = h.tabBarStyle,
|
||
he = h.tabBarExtraContent,
|
||
Me = h.locale,
|
||
U = h.moreIcon,
|
||
we = h.moreTransitionName,
|
||
Le = h.destroyInactiveTabPane,
|
||
je = h.renderTabBar,
|
||
Ve = h.onChange,
|
||
Ke = h.onTabClick,
|
||
st = h.onTabScroll,
|
||
Be = Object(P.a)(h, [
|
||
'id',
|
||
'prefixCls',
|
||
'className',
|
||
'children',
|
||
'direction',
|
||
'activeKey',
|
||
'defaultActiveKey',
|
||
'editable',
|
||
'animated',
|
||
'tabPosition',
|
||
'tabBarGutter',
|
||
'tabBarStyle',
|
||
'tabBarExtraContent',
|
||
'locale',
|
||
'moreIcon',
|
||
'moreTransitionName',
|
||
'destroyInactiveTabPane',
|
||
'renderTabBar',
|
||
'onChange',
|
||
'onTabClick',
|
||
'onTabScroll',
|
||
]),
|
||
ie = St(ee),
|
||
Z = $ === 'rtl',
|
||
Te;
|
||
ve === !1
|
||
? (Te = { inkBar: !1, tabPane: !1 })
|
||
: (Te = Object(_.a)({ inkBar: !0, tabPane: !1 }, ve !== !0 ? ve : null));
|
||
var xe = Object(v.useState)(!1),
|
||
le = Object(y.a)(xe, 2),
|
||
ke = le[0],
|
||
et = le[1];
|
||
Object(v.useEffect)(function() {
|
||
et(At());
|
||
}, []);
|
||
var Ne = Object(Se.a)(
|
||
function() {
|
||
var ue;
|
||
return (ue = ie[0]) === null || ue === void 0 ? void 0 : ue.key;
|
||
},
|
||
{ value: fe, defaultValue: oe },
|
||
),
|
||
M = Object(y.a)(Ne, 2),
|
||
p = M[0],
|
||
E = M[1],
|
||
l = Object(v.useState)(function() {
|
||
return ie.findIndex(function(ue) {
|
||
return ue.key === p;
|
||
});
|
||
}),
|
||
e = Object(y.a)(l, 2),
|
||
a = e[0],
|
||
u = e[1];
|
||
Object(v.useEffect)(
|
||
function() {
|
||
var ue = ie.findIndex(function(xt) {
|
||
return xt.key === p;
|
||
});
|
||
if (ue === -1) {
|
||
var ot;
|
||
(ue = Math.max(0, Math.min(a, ie.length - 1))),
|
||
E((ot = ie[ue]) === null || ot === void 0 ? void 0 : ot.key);
|
||
}
|
||
u(ue);
|
||
},
|
||
[
|
||
ie
|
||
.map(function(ue) {
|
||
return ue.key;
|
||
})
|
||
.join('_'),
|
||
p,
|
||
a,
|
||
],
|
||
);
|
||
var g = Object(Se.a)(null, { value: k }),
|
||
N = Object(y.a)(g, 2),
|
||
T = N[0],
|
||
b = N[1],
|
||
C = se;
|
||
ke && !['left', 'right'].includes(se) && (C = 'top'),
|
||
Object(v.useEffect)(function() {
|
||
k || (b('rc-tabs-'.concat(Lt)), (Lt += 1));
|
||
}, []);
|
||
function D(ue, ot) {
|
||
Ke == null || Ke(ue, ot), E(ue), Ve == null || Ve(ue);
|
||
}
|
||
var ne = { id: T, activeKey: p, animated: Te, tabPosition: C, rtl: Z, mobile: ke },
|
||
te,
|
||
ge = Object(_.a)(
|
||
Object(_.a)({}, ne),
|
||
{},
|
||
{
|
||
editable: re,
|
||
locale: Me,
|
||
moreIcon: U,
|
||
moreTransitionName: we,
|
||
tabBarGutter: pe,
|
||
onTabClick: D,
|
||
onTabScroll: st,
|
||
extra: he,
|
||
style: We,
|
||
panes: ee,
|
||
},
|
||
);
|
||
return (
|
||
je ? (te = je(ge, Vt)) : (te = v.createElement(Vt, Object.assign({}, ge))),
|
||
v.createElement(
|
||
ht.Provider,
|
||
{ value: { tabs: ie, prefixCls: L } },
|
||
v.createElement(
|
||
'div',
|
||
Object.assign(
|
||
{
|
||
ref: j,
|
||
id: k,
|
||
className: Y()(
|
||
L,
|
||
''.concat(L, '-').concat(C),
|
||
((R = {}),
|
||
Object(B.a)(R, ''.concat(L, '-mobile'), ke),
|
||
Object(B.a)(R, ''.concat(L, '-editable'), re),
|
||
Object(B.a)(R, ''.concat(L, '-rtl'), Z),
|
||
R),
|
||
q,
|
||
),
|
||
},
|
||
Be,
|
||
),
|
||
te,
|
||
v.createElement(
|
||
$t,
|
||
Object.assign({ destroyInactiveTabPane: Le }, ne, { animated: Te }),
|
||
),
|
||
),
|
||
)
|
||
);
|
||
}
|
||
var Ue = v.forwardRef(en);
|
||
Ue.TabPane = X;
|
||
var Dt = Ue,
|
||
dt = Dt,
|
||
de = s('cCPh'),
|
||
Re = s.n(de),
|
||
ft = s('fNCr'),
|
||
tn = s.n(ft),
|
||
Gt = s('V/uB'),
|
||
fn = s.n(Gt),
|
||
Yt = s('uaoM'),
|
||
Qt = s('H84U'),
|
||
pt = function(h, j) {
|
||
var R = {};
|
||
for (var k in h)
|
||
Object.prototype.hasOwnProperty.call(h, k) && j.indexOf(k) < 0 && (R[k] = h[k]);
|
||
if (h != null && typeof Object.getOwnPropertySymbols == 'function')
|
||
for (var I = 0, k = Object.getOwnPropertySymbols(h); I < k.length; I++)
|
||
j.indexOf(k[I]) < 0 &&
|
||
Object.prototype.propertyIsEnumerable.call(h, k[I]) &&
|
||
(R[k[I]] = h[k[I]]);
|
||
return R;
|
||
};
|
||
function ln(h) {
|
||
var j,
|
||
R = h.type,
|
||
k = h.className,
|
||
I = h.size,
|
||
L = h.onEdit,
|
||
q = h.hideAdd,
|
||
ee = h.centered,
|
||
$ = h.addIcon,
|
||
fe = pt(h, ['type', 'className', 'size', 'onEdit', 'hideAdd', 'centered', 'addIcon']),
|
||
oe = fe.prefixCls,
|
||
re = v.useContext(Qt.b),
|
||
ve = re.getPrefixCls,
|
||
De = re.direction,
|
||
se = ve('tabs', oe),
|
||
pe;
|
||
return (
|
||
R === 'editable-card' &&
|
||
(pe = {
|
||
onEdit: function(he, Me) {
|
||
var U = Me.key,
|
||
we = Me.event;
|
||
L == null || L(he === 'add' ? we : U, he);
|
||
},
|
||
removeIcon: v.createElement(fn.a, null),
|
||
addIcon: $ || v.createElement(tn.a, null),
|
||
showAdd: q !== !0,
|
||
}),
|
||
Object(Yt.a)(
|
||
!('onPrevClick' in fe) && !('onNextClick' in fe),
|
||
'Tabs',
|
||
'`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead.',
|
||
),
|
||
v.createElement(
|
||
dt,
|
||
W()({ direction: De }, fe, {
|
||
moreTransitionName: 'slide-up',
|
||
className: Y()(
|
||
((j = {}),
|
||
S()(j, ''.concat(se, '-').concat(I), I),
|
||
S()(j, ''.concat(se, '-card'), ['card', 'editable-card'].includes(R)),
|
||
S()(j, ''.concat(se, '-editable-card'), R === 'editable-card'),
|
||
S()(j, ''.concat(se, '-centered'), ee),
|
||
j),
|
||
k,
|
||
),
|
||
editable: pe,
|
||
moreIcon: v.createElement(Re.a, null),
|
||
prefixCls: se,
|
||
}),
|
||
)
|
||
);
|
||
}
|
||
ln.TabPane = X;
|
||
var yn = (x.a = ln);
|
||
},
|
||
'Znn+': function(Ae, x, s) {
|
||
'use strict';
|
||
var f = s('cIOH'),
|
||
W = s.n(f),
|
||
w = s('9ama'),
|
||
S = s.n(w);
|
||
},
|
||
aJNx: function(Ae, x, s) {
|
||
'use strict';
|
||
var f = s('q1tI'),
|
||
W = {
|
||
icon: {
|
||
tag: 'svg',
|
||
attrs: { viewBox: '64 64 896 896', focusable: 'false' },
|
||
children: [
|
||
{
|
||
tag: 'path',
|
||
attrs: {
|
||
d:
|
||
'M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z',
|
||
},
|
||
},
|
||
],
|
||
},
|
||
name: 'idcard',
|
||
theme: 'outlined',
|
||
},
|
||
w = W,
|
||
S = s('6VBw'),
|
||
v = function(P, _) {
|
||
return f.createElement(S.a, Object.assign({}, P, { ref: _, icon: w }));
|
||
};
|
||
v.displayName = 'IdcardOutlined';
|
||
var B = (x.a = f.forwardRef(v));
|
||
},
|
||
cCPh: function(Ae, x, s) {
|
||
'use strict';
|
||
Object.defineProperty(x, '__esModule', { value: !0 }), (x.default = void 0);
|
||
var f = W(s('jiSn'));
|
||
function W(S) {
|
||
return S && S.__esModule ? S : { default: S };
|
||
}
|
||
var w = f;
|
||
(x.default = w), (Ae.exports = w);
|
||
},
|
||
eDIo: function(Ae, x, s) {
|
||
'use strict';
|
||
var f = s('rePB'),
|
||
W = s('ODXe'),
|
||
w = s('Ff2n'),
|
||
S = s('q1tI'),
|
||
v = s('uciX'),
|
||
B = s('TSYQ'),
|
||
y = s.n(B),
|
||
P = { adjustX: 1, adjustY: 1 },
|
||
_ = [0, 0],
|
||
H = {
|
||
topLeft: { points: ['bl', 'tl'], overflow: P, offset: [0, -4], targetOffset: _ },
|
||
topCenter: { points: ['bc', 'tc'], overflow: P, offset: [0, -4], targetOffset: _ },
|
||
topRight: { points: ['br', 'tr'], overflow: P, offset: [0, -4], targetOffset: _ },
|
||
bottomLeft: { points: ['tl', 'bl'], overflow: P, offset: [0, 4], targetOffset: _ },
|
||
bottomCenter: { points: ['tc', 'bc'], overflow: P, offset: [0, 4], targetOffset: _ },
|
||
bottomRight: { points: ['tr', 'br'], overflow: P, offset: [0, 4], targetOffset: _ },
|
||
},
|
||
Y = H;
|
||
function Q(V, ye) {
|
||
var Ie = V.arrow,
|
||
Ee = Ie === void 0 ? !1 : Ie,
|
||
nt = V.prefixCls,
|
||
z = nt === void 0 ? 'rc-dropdown' : nt,
|
||
Ce = V.transitionName,
|
||
Je = V.animation,
|
||
Xe = V.align,
|
||
me = V.placement,
|
||
Ze = me === void 0 ? 'bottomLeft' : me,
|
||
it = V.placements,
|
||
jt = it === void 0 ? Y : it,
|
||
kt = V.getPopupContainer,
|
||
at = V.showAction,
|
||
_t = V.hideAction,
|
||
Wt = V.overlayClassName,
|
||
Bt = V.overlayStyle,
|
||
ht = V.visible,
|
||
Ht = V.trigger,
|
||
gt = Ht === void 0 ? ['hover'] : Ht,
|
||
Nt = Object(w.a)(V, [
|
||
'arrow',
|
||
'prefixCls',
|
||
'transitionName',
|
||
'animation',
|
||
'align',
|
||
'placement',
|
||
'placements',
|
||
'getPopupContainer',
|
||
'showAction',
|
||
'hideAction',
|
||
'overlayClassName',
|
||
'overlayStyle',
|
||
'visible',
|
||
'trigger',
|
||
]),
|
||
rt = S.useState(),
|
||
At = Object(W.a)(rt, 2),
|
||
qe = At[0],
|
||
Xt = At[1],
|
||
Ft = 'visible' in V ? ht : qe,
|
||
Rt = S.useRef(null);
|
||
S.useImperativeHandle(ye, function() {
|
||
return Rt.current;
|
||
});
|
||
var zt = function() {
|
||
var de = V.overlay,
|
||
Re;
|
||
return typeof de == 'function' ? (Re = de()) : (Re = de), Re;
|
||
},
|
||
Vt = function(de) {
|
||
var Re = V.onOverlayClick,
|
||
ft = zt().props;
|
||
Xt(!1), Re && Re(de), ft.onClick && ft.onClick(de);
|
||
},
|
||
$t = function(de) {
|
||
var Re = V.onVisibleChange;
|
||
Xt(de), typeof Re == 'function' && Re(de);
|
||
},
|
||
X = function() {
|
||
var de = zt(),
|
||
Re = { prefixCls: ''.concat(z, '-menu'), onClick: Vt };
|
||
return (
|
||
typeof de.type == 'string' && delete Re.prefixCls,
|
||
S.createElement(
|
||
S.Fragment,
|
||
null,
|
||
Ee && S.createElement('div', { className: ''.concat(z, '-arrow') }),
|
||
S.cloneElement(de, Re),
|
||
)
|
||
);
|
||
},
|
||
Lt = function() {
|
||
var de = V.overlay;
|
||
return typeof de == 'function' ? X : X();
|
||
},
|
||
St = function() {
|
||
var de = V.minOverlayWidthMatchTrigger,
|
||
Re = V.alignPoint;
|
||
return 'minOverlayWidthMatchTrigger' in V ? de : !Re;
|
||
},
|
||
en = function() {
|
||
var de = V.openClassName;
|
||
return de !== void 0 ? de : ''.concat(z, '-open');
|
||
},
|
||
Ue = function() {
|
||
var de = V.children,
|
||
Re = de.props ? de.props : {},
|
||
ft = y()(Re.className, en());
|
||
return qe && de ? S.cloneElement(de, { className: ft }) : de;
|
||
},
|
||
Dt = _t;
|
||
return (
|
||
!Dt && gt.indexOf('contextMenu') !== -1 && (Dt = ['click']),
|
||
S.createElement(
|
||
v.a,
|
||
Object.assign({}, Nt, {
|
||
prefixCls: z,
|
||
ref: Rt,
|
||
popupClassName: y()(Wt, Object(f.a)({}, ''.concat(z, '-show-arrow'), Ee)),
|
||
popupStyle: Bt,
|
||
builtinPlacements: jt,
|
||
action: gt,
|
||
showAction: at,
|
||
hideAction: Dt || [],
|
||
popupPlacement: Ze,
|
||
popupAlign: Xe,
|
||
popupTransitionName: Ce,
|
||
popupAnimation: Je,
|
||
popupVisible: Ft,
|
||
stretch: St() ? 'minWidth' : '',
|
||
popup: Lt(),
|
||
onPopupVisibleChange: $t,
|
||
getPopupContainer: kt,
|
||
}),
|
||
Ue(),
|
||
)
|
||
);
|
||
}
|
||
var Se = S.forwardRef(Q),
|
||
Oe = (x.a = Se);
|
||
},
|
||
fNCr: function(Ae, x, s) {
|
||
'use strict';
|
||
Object.defineProperty(x, '__esModule', { value: !0 }), (x.default = void 0);
|
||
var f = W(s('tSko'));
|
||
function W(S) {
|
||
return S && S.__esModule ? S : { default: S };
|
||
}
|
||
var w = f;
|
||
(x.default = w), (Ae.exports = w);
|
||
},
|
||
jiSn: function(Ae, x, s) {
|
||
'use strict';
|
||
var f = s('TqRt'),
|
||
W = s('284h');
|
||
Object.defineProperty(x, '__esModule', { value: !0 }), (x.default = void 0);
|
||
var w = W(s('q1tI')),
|
||
S = f(s('KBXm')),
|
||
v = f(s('KQxl')),
|
||
B = function(_, H) {
|
||
return w.createElement(v.default, Object.assign({}, _, { ref: H, icon: S.default }));
|
||
};
|
||
B.displayName = 'EllipsisOutlined';
|
||
var y = w.forwardRef(B);
|
||
x.default = y;
|
||
},
|
||
oN5p: function(Ae, x, s) {
|
||
'use strict';
|
||
var f = s('q1tI'),
|
||
W = {
|
||
icon: {
|
||
tag: 'svg',
|
||
attrs: { viewBox: '64 64 896 896', focusable: 'false' },
|
||
children: [
|
||
{
|
||
tag: 'path',
|
||
attrs: {
|
||
d:
|
||
'M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z',
|
||
},
|
||
},
|
||
],
|
||
},
|
||
name: 'github',
|
||
theme: 'outlined',
|
||
},
|
||
w = W,
|
||
S = s('6VBw'),
|
||
v = function(P, _) {
|
||
return f.createElement(S.a, Object.assign({}, P, { ref: _, icon: w }));
|
||
};
|
||
v.displayName = 'GithubOutlined';
|
||
var B = (x.a = f.forwardRef(v));
|
||
},
|
||
su5N: function(Ae, x, s) {
|
||
'use strict';
|
||
var f = s('q1tI'),
|
||
W = {
|
||
icon: {
|
||
tag: 'svg',
|
||
attrs: { viewBox: '64 64 896 896', focusable: 'false' },
|
||
children: [
|
||
{
|
||
tag: 'path',
|
||
attrs: {
|
||
d:
|
||
'M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z',
|
||
},
|
||
},
|
||
],
|
||
},
|
||
name: 'code',
|
||
theme: 'outlined',
|
||
},
|
||
w = W,
|
||
S = s('6VBw'),
|
||
v = function(P, _) {
|
||
return f.createElement(S.a, Object.assign({}, P, { ref: _, icon: w }));
|
||
};
|
||
v.displayName = 'CodeOutlined';
|
||
var B = (x.a = f.forwardRef(v));
|
||
},
|
||
tSko: function(Ae, x, s) {
|
||
'use strict';
|
||
var f = s('TqRt'),
|
||
W = s('284h');
|
||
Object.defineProperty(x, '__esModule', { value: !0 }), (x.default = void 0);
|
||
var w = W(s('q1tI')),
|
||
S = f(s('SRve')),
|
||
v = f(s('KQxl')),
|
||
B = function(_, H) {
|
||
return w.createElement(v.default, Object.assign({}, _, { ref: H, icon: S.default }));
|
||
};
|
||
B.displayName = 'PlusOutlined';
|
||
var y = w.forwardRef(B);
|
||
x.default = y;
|
||
},
|
||
uciX: function(Ae, x, s) {
|
||
'use strict';
|
||
var f = s('VTBJ'),
|
||
W = s('1OyB'),
|
||
w = s('vuIU'),
|
||
S = s('JX7q'),
|
||
v = s('Ji7U'),
|
||
B = s('LK+K'),
|
||
y = s('q1tI'),
|
||
P = s.n(y),
|
||
_ = s('i8i4'),
|
||
H = s.n(_),
|
||
Y = s('wgJM'),
|
||
Q = s('l4aY'),
|
||
Se = s('m+aA'),
|
||
Oe = s('c+Xe'),
|
||
V = s('zT1h'),
|
||
ye = s('QC+M'),
|
||
Ie = s('TSYQ'),
|
||
Ee = s.n(Ie);
|
||
function nt(t, i, n) {
|
||
return n ? t[0] === i[0] : t[0] === i[0] && t[1] === i[1];
|
||
}
|
||
function z(t, i, n) {
|
||
var r = t[i] || {};
|
||
return Object(f.a)(Object(f.a)({}, r), n);
|
||
}
|
||
function Ce(t, i, n, r) {
|
||
for (var d = n.points, m = Object.keys(t), o = 0; o < m.length; o += 1) {
|
||
var O = m[o];
|
||
if (nt(t[O].points, d, r)) return ''.concat(i, '-placement-').concat(O);
|
||
}
|
||
return '';
|
||
}
|
||
var Je = s('wx14'),
|
||
Xe = s('8XRh');
|
||
function me(t) {
|
||
var i = t.prefixCls,
|
||
n = t.motion,
|
||
r = t.animation,
|
||
d = t.transitionName;
|
||
return (
|
||
n || (r ? { motionName: ''.concat(i, '-').concat(r) } : d ? { motionName: d } : null)
|
||
);
|
||
}
|
||
function Ze(t) {
|
||
var i = t.prefixCls,
|
||
n = t.visible,
|
||
r = t.zIndex,
|
||
d = t.mask,
|
||
m = t.maskMotion,
|
||
o = t.maskAnimation,
|
||
O = t.maskTransitionName;
|
||
if (!d) return null;
|
||
var c = {};
|
||
return (
|
||
(m || O || o) &&
|
||
(c = Object(f.a)(
|
||
{ motionAppear: !0 },
|
||
me({ motion: m, prefixCls: i, transitionName: O, animation: o }),
|
||
)),
|
||
y.createElement(
|
||
Xe.default,
|
||
Object.assign({}, c, { visible: n, removeOnLeave: !0 }),
|
||
function(A) {
|
||
var F = A.className;
|
||
return y.createElement('div', {
|
||
style: { zIndex: r },
|
||
className: Ee()(''.concat(i, '-mask'), F),
|
||
});
|
||
},
|
||
)
|
||
);
|
||
}
|
||
var it = s('ODXe'),
|
||
jt = s('U8pU'),
|
||
kt = s('x/xZ');
|
||
function at(t) {
|
||
return (
|
||
typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
|
||
? (at = function(n) {
|
||
return typeof n;
|
||
})
|
||
: (at = function(n) {
|
||
return n &&
|
||
typeof Symbol == 'function' &&
|
||
n.constructor === Symbol &&
|
||
n !== Symbol.prototype
|
||
? 'symbol'
|
||
: typeof n;
|
||
}),
|
||
at(t)
|
||
);
|
||
}
|
||
function _t(t, i, n) {
|
||
return (
|
||
i in t
|
||
? Object.defineProperty(t, i, {
|
||
value: n,
|
||
enumerable: !0,
|
||
configurable: !0,
|
||
writable: !0,
|
||
})
|
||
: (t[i] = n),
|
||
t
|
||
);
|
||
}
|
||
function Wt(t, i) {
|
||
var n = Object.keys(t);
|
||
if (Object.getOwnPropertySymbols) {
|
||
var r = Object.getOwnPropertySymbols(t);
|
||
i &&
|
||
(r = r.filter(function(d) {
|
||
return Object.getOwnPropertyDescriptor(t, d).enumerable;
|
||
})),
|
||
n.push.apply(n, r);
|
||
}
|
||
return n;
|
||
}
|
||
function Bt(t) {
|
||
for (var i = 1; i < arguments.length; i++) {
|
||
var n = arguments[i] != null ? arguments[i] : {};
|
||
i % 2
|
||
? Wt(n, !0).forEach(function(r) {
|
||
_t(t, r, n[r]);
|
||
})
|
||
: Object.getOwnPropertyDescriptors
|
||
? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
|
||
: Wt(n).forEach(function(r) {
|
||
Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
|
||
});
|
||
}
|
||
return t;
|
||
}
|
||
var ht,
|
||
Ht = { Webkit: '-webkit-', Moz: '-moz-', ms: '-ms-', O: '-o-' };
|
||
function gt() {
|
||
if (ht !== void 0) return ht;
|
||
ht = '';
|
||
var t = document.createElement('p').style,
|
||
i = 'Transform';
|
||
for (var n in Ht) n + i in t && (ht = n);
|
||
return ht;
|
||
}
|
||
function Nt() {
|
||
return gt() ? ''.concat(gt(), 'TransitionProperty') : 'transitionProperty';
|
||
}
|
||
function rt() {
|
||
return gt() ? ''.concat(gt(), 'Transform') : 'transform';
|
||
}
|
||
function At(t, i) {
|
||
var n = Nt();
|
||
n && ((t.style[n] = i), n !== 'transitionProperty' && (t.style.transitionProperty = i));
|
||
}
|
||
function qe(t, i) {
|
||
var n = rt();
|
||
n && ((t.style[n] = i), n !== 'transform' && (t.style.transform = i));
|
||
}
|
||
function Xt(t) {
|
||
return t.style.transitionProperty || t.style[Nt()];
|
||
}
|
||
function Ft(t) {
|
||
var i = window.getComputedStyle(t, null),
|
||
n = i.getPropertyValue('transform') || i.getPropertyValue(rt());
|
||
if (n && n !== 'none') {
|
||
var r = n.replace(/[^0-9\-.,]/g, '').split(',');
|
||
return { x: parseFloat(r[12] || r[4], 0), y: parseFloat(r[13] || r[5], 0) };
|
||
}
|
||
return { x: 0, y: 0 };
|
||
}
|
||
var Rt = /matrix\((.*)\)/,
|
||
zt = /matrix3d\((.*)\)/;
|
||
function Vt(t, i) {
|
||
var n = window.getComputedStyle(t, null),
|
||
r = n.getPropertyValue('transform') || n.getPropertyValue(rt());
|
||
if (r && r !== 'none') {
|
||
var d,
|
||
m = r.match(Rt);
|
||
if (m)
|
||
(m = m[1]),
|
||
(d = m.split(',').map(function(O) {
|
||
return parseFloat(O, 10);
|
||
})),
|
||
(d[4] = i.x),
|
||
(d[5] = i.y),
|
||
qe(t, 'matrix('.concat(d.join(','), ')'));
|
||
else {
|
||
var o = r.match(zt)[1];
|
||
(d = o.split(',').map(function(O) {
|
||
return parseFloat(O, 10);
|
||
})),
|
||
(d[12] = i.x),
|
||
(d[13] = i.y),
|
||
qe(t, 'matrix3d('.concat(d.join(','), ')'));
|
||
}
|
||
} else qe(t, 'translateX('.concat(i.x, 'px) translateY(').concat(i.y, 'px) translateZ(0)'));
|
||
}
|
||
var $t = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,
|
||
X;
|
||
function Lt(t) {
|
||
var i = t.style.display;
|
||
(t.style.display = 'none'), t.offsetHeight, (t.style.display = i);
|
||
}
|
||
function St(t, i, n) {
|
||
var r = n;
|
||
if (at(i) === 'object') {
|
||
for (var d in i) i.hasOwnProperty(d) && St(t, d, i[d]);
|
||
return;
|
||
}
|
||
if (typeof r != 'undefined') {
|
||
typeof r == 'number' && (r = ''.concat(r, 'px')), (t.style[i] = r);
|
||
return;
|
||
}
|
||
return X(t, i);
|
||
}
|
||
function en(t) {
|
||
var i,
|
||
n,
|
||
r,
|
||
d = t.ownerDocument,
|
||
m = d.body,
|
||
o = d && d.documentElement;
|
||
return (
|
||
(i = t.getBoundingClientRect()),
|
||
(n = i.left),
|
||
(r = i.top),
|
||
(n -= o.clientLeft || m.clientLeft || 0),
|
||
(r -= o.clientTop || m.clientTop || 0),
|
||
{ left: n, top: r }
|
||
);
|
||
}
|
||
function Ue(t, i) {
|
||
var n = t['page'.concat(i ? 'Y' : 'X', 'Offset')],
|
||
r = 'scroll'.concat(i ? 'Top' : 'Left');
|
||
if (typeof n != 'number') {
|
||
var d = t.document;
|
||
(n = d.documentElement[r]), typeof n != 'number' && (n = d.body[r]);
|
||
}
|
||
return n;
|
||
}
|
||
function Dt(t) {
|
||
return Ue(t);
|
||
}
|
||
function dt(t) {
|
||
return Ue(t, !0);
|
||
}
|
||
function de(t) {
|
||
var i = en(t),
|
||
n = t.ownerDocument,
|
||
r = n.defaultView || n.parentWindow;
|
||
return (i.left += Dt(r)), (i.top += dt(r)), i;
|
||
}
|
||
function Re(t) {
|
||
return t != null && t == t.window;
|
||
}
|
||
function ft(t) {
|
||
return Re(t) ? t.document : t.nodeType === 9 ? t : t.ownerDocument;
|
||
}
|
||
function tn(t, i, n) {
|
||
var r = n,
|
||
d = '',
|
||
m = ft(t);
|
||
return (
|
||
(r = r || m.defaultView.getComputedStyle(t, null)),
|
||
r && (d = r.getPropertyValue(i) || r[i]),
|
||
d
|
||
);
|
||
}
|
||
var Gt = new RegExp('^('.concat($t, ')(?!px)[a-z%]+$'), 'i'),
|
||
fn = /^(top|right|bottom|left)$/,
|
||
Yt = 'currentStyle',
|
||
Qt = 'runtimeStyle',
|
||
pt = 'left',
|
||
ln = 'px';
|
||
function yn(t, i) {
|
||
var n = t[Yt] && t[Yt][i];
|
||
if (Gt.test(n) && !fn.test(i)) {
|
||
var r = t.style,
|
||
d = r[pt],
|
||
m = t[Qt][pt];
|
||
(t[Qt][pt] = t[Yt][pt]),
|
||
(r[pt] = i === 'fontSize' ? '1em' : n || 0),
|
||
(n = r.pixelLeft + ln),
|
||
(r[pt] = d),
|
||
(t[Qt][pt] = m);
|
||
}
|
||
return n === '' ? 'auto' : n;
|
||
}
|
||
typeof window != 'undefined' && (X = window.getComputedStyle ? tn : yn);
|
||
function h(t, i) {
|
||
return t === 'left' ? (i.useCssRight ? 'right' : t) : i.useCssBottom ? 'bottom' : t;
|
||
}
|
||
function j(t) {
|
||
if (t === 'left') return 'right';
|
||
if (t === 'right') return 'left';
|
||
if (t === 'top') return 'bottom';
|
||
if (t === 'bottom') return 'top';
|
||
}
|
||
function R(t, i, n) {
|
||
St(t, 'position') === 'static' && (t.style.position = 'relative');
|
||
var r = -999,
|
||
d = -999,
|
||
m = h('left', n),
|
||
o = h('top', n),
|
||
O = j(m),
|
||
c = j(o);
|
||
m !== 'left' && (r = 999), o !== 'top' && (d = 999);
|
||
var A = '',
|
||
F = de(t);
|
||
('left' in i || 'top' in i) && ((A = Xt(t) || ''), At(t, 'none')),
|
||
'left' in i && ((t.style[O] = ''), (t.style[m] = ''.concat(r, 'px'))),
|
||
'top' in i && ((t.style[c] = ''), (t.style[o] = ''.concat(d, 'px'))),
|
||
Lt(t);
|
||
var ce = de(t),
|
||
J = {};
|
||
for (var K in i)
|
||
if (i.hasOwnProperty(K)) {
|
||
var G = h(K, n),
|
||
Pe = K === 'left' ? r : d,
|
||
$e = F[K] - ce[K];
|
||
G === K ? (J[G] = Pe + $e) : (J[G] = Pe - $e);
|
||
}
|
||
St(t, J), Lt(t), ('left' in i || 'top' in i) && At(t, A);
|
||
var _e = {};
|
||
for (var He in i)
|
||
if (i.hasOwnProperty(He)) {
|
||
var Fe = h(He, n),
|
||
Ge = i[He] - F[He];
|
||
He === Fe ? (_e[Fe] = J[Fe] + Ge) : (_e[Fe] = J[Fe] - Ge);
|
||
}
|
||
St(t, _e);
|
||
}
|
||
function k(t, i) {
|
||
var n = de(t),
|
||
r = Ft(t),
|
||
d = { x: r.x, y: r.y };
|
||
'left' in i && (d.x = r.x + i.left - n.left),
|
||
'top' in i && (d.y = r.y + i.top - n.top),
|
||
Vt(t, d);
|
||
}
|
||
function I(t, i, n) {
|
||
if (n.ignoreShake) {
|
||
var r = de(t),
|
||
d = r.left.toFixed(0),
|
||
m = r.top.toFixed(0),
|
||
o = i.left.toFixed(0),
|
||
O = i.top.toFixed(0);
|
||
if (d === o && m === O) return;
|
||
}
|
||
n.useCssRight || n.useCssBottom
|
||
? R(t, i, n)
|
||
: n.useCssTransform && rt() in document.body.style
|
||
? k(t, i)
|
||
: R(t, i, n);
|
||
}
|
||
function L(t, i) {
|
||
for (var n = 0; n < t.length; n++) i(t[n]);
|
||
}
|
||
function q(t) {
|
||
return X(t, 'boxSizing') === 'border-box';
|
||
}
|
||
var ee = ['margin', 'border', 'padding'],
|
||
$ = -1,
|
||
fe = 2,
|
||
oe = 1,
|
||
re = 0;
|
||
function ve(t, i, n) {
|
||
var r = {},
|
||
d = t.style,
|
||
m;
|
||
for (m in i) i.hasOwnProperty(m) && ((r[m] = d[m]), (d[m] = i[m]));
|
||
n.call(t);
|
||
for (m in i) i.hasOwnProperty(m) && (d[m] = r[m]);
|
||
}
|
||
function De(t, i, n) {
|
||
var r = 0,
|
||
d,
|
||
m,
|
||
o;
|
||
for (m = 0; m < i.length; m++)
|
||
if (((d = i[m]), d))
|
||
for (o = 0; o < n.length; o++) {
|
||
var O = void 0;
|
||
d === 'border' ? (O = ''.concat(d).concat(n[o], 'Width')) : (O = d + n[o]),
|
||
(r += parseFloat(X(t, O)) || 0);
|
||
}
|
||
return r;
|
||
}
|
||
var se = {
|
||
getParent: function(i) {
|
||
var n = i;
|
||
do n.nodeType === 11 && n.host ? (n = n.host) : (n = n.parentNode);
|
||
while (n && n.nodeType !== 1 && n.nodeType !== 9);
|
||
return n;
|
||
},
|
||
};
|
||
L(['Width', 'Height'], function(t) {
|
||
(se['doc'.concat(t)] = function(i) {
|
||
var n = i.document;
|
||
return Math.max(
|
||
n.documentElement['scroll'.concat(t)],
|
||
n.body['scroll'.concat(t)],
|
||
se['viewport'.concat(t)](n),
|
||
);
|
||
}),
|
||
(se['viewport'.concat(t)] = function(i) {
|
||
var n = 'client'.concat(t),
|
||
r = i.document,
|
||
d = r.body,
|
||
m = r.documentElement,
|
||
o = m[n];
|
||
return (r.compatMode === 'CSS1Compat' && o) || (d && d[n]) || o;
|
||
});
|
||
});
|
||
function pe(t, i, n) {
|
||
var r = n;
|
||
if (Re(t)) return i === 'width' ? se.viewportWidth(t) : se.viewportHeight(t);
|
||
if (t.nodeType === 9) return i === 'width' ? se.docWidth(t) : se.docHeight(t);
|
||
var d = i === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'],
|
||
m = i === 'width' ? t.getBoundingClientRect().width : t.getBoundingClientRect().height,
|
||
o = X(t),
|
||
O = q(t),
|
||
c = 0;
|
||
(m == null || m <= 0) &&
|
||
((m = void 0),
|
||
(c = X(t, i)),
|
||
(c == null || Number(c) < 0) && (c = t.style[i] || 0),
|
||
(c = parseFloat(c) || 0)),
|
||
r === void 0 && (r = O ? oe : $);
|
||
var A = m !== void 0 || O,
|
||
F = m || c;
|
||
return r === $
|
||
? A
|
||
? F - De(t, ['border', 'padding'], d)
|
||
: c
|
||
: A
|
||
? r === oe
|
||
? F
|
||
: F + (r === fe ? -De(t, ['border'], d) : De(t, ['margin'], d))
|
||
: c + De(t, ee.slice(r), d);
|
||
}
|
||
var We = { position: 'absolute', visibility: 'hidden', display: 'block' };
|
||
function he() {
|
||
for (var t = arguments.length, i = new Array(t), n = 0; n < t; n++) i[n] = arguments[n];
|
||
var r,
|
||
d = i[0];
|
||
return (
|
||
d.offsetWidth !== 0
|
||
? (r = pe.apply(void 0, i))
|
||
: ve(d, We, function() {
|
||
r = pe.apply(void 0, i);
|
||
}),
|
||
r
|
||
);
|
||
}
|
||
L(['width', 'height'], function(t) {
|
||
var i = t.charAt(0).toUpperCase() + t.slice(1);
|
||
se['outer'.concat(i)] = function(r, d) {
|
||
return r && he(r, t, d ? re : oe);
|
||
};
|
||
var n = t === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];
|
||
se[t] = function(r, d) {
|
||
var m = d;
|
||
if (m !== void 0) {
|
||
if (r) {
|
||
var o = X(r),
|
||
O = q(r);
|
||
return O && (m += De(r, ['padding', 'border'], n)), St(r, t, m);
|
||
}
|
||
return;
|
||
}
|
||
return r && he(r, t, $);
|
||
};
|
||
});
|
||
function Me(t, i) {
|
||
for (var n in i) i.hasOwnProperty(n) && (t[n] = i[n]);
|
||
return t;
|
||
}
|
||
var U = {
|
||
getWindow: function(i) {
|
||
if (i && i.document && i.setTimeout) return i;
|
||
var n = i.ownerDocument || i;
|
||
return n.defaultView || n.parentWindow;
|
||
},
|
||
getDocument: ft,
|
||
offset: function(i, n, r) {
|
||
if (typeof n != 'undefined') I(i, n, r || {});
|
||
else return de(i);
|
||
},
|
||
isWindow: Re,
|
||
each: L,
|
||
css: St,
|
||
clone: function(i) {
|
||
var n,
|
||
r = {};
|
||
for (n in i) i.hasOwnProperty(n) && (r[n] = i[n]);
|
||
var d = i.overflow;
|
||
if (d) for (n in i) i.hasOwnProperty(n) && (r.overflow[n] = i.overflow[n]);
|
||
return r;
|
||
},
|
||
mix: Me,
|
||
getWindowScrollLeft: function(i) {
|
||
return Dt(i);
|
||
},
|
||
getWindowScrollTop: function(i) {
|
||
return dt(i);
|
||
},
|
||
merge: function() {
|
||
for (var i = {}, n = 0; n < arguments.length; n++)
|
||
U.mix(i, n < 0 || arguments.length <= n ? void 0 : arguments[n]);
|
||
return i;
|
||
},
|
||
viewportWidth: 0,
|
||
viewportHeight: 0,
|
||
};
|
||
Me(U, se);
|
||
var we = U.getParent;
|
||
function Le(t) {
|
||
if (U.isWindow(t) || t.nodeType === 9) return null;
|
||
var i = U.getDocument(t),
|
||
n = i.body,
|
||
r,
|
||
d = U.css(t, 'position'),
|
||
m = d === 'fixed' || d === 'absolute';
|
||
if (!m) return t.nodeName.toLowerCase() === 'html' ? null : we(t);
|
||
for (r = we(t); r && r !== n && r.nodeType !== 9; r = we(r))
|
||
if (((d = U.css(r, 'position')), d !== 'static')) return r;
|
||
return null;
|
||
}
|
||
var je = U.getParent;
|
||
function Ve(t) {
|
||
if (U.isWindow(t) || t.nodeType === 9) return !1;
|
||
var i = U.getDocument(t),
|
||
n = i.body,
|
||
r = null;
|
||
for (r = je(t); r && r !== n; r = je(r)) {
|
||
var d = U.css(r, 'position');
|
||
if (d === 'fixed') return !0;
|
||
}
|
||
return !1;
|
||
}
|
||
function Ke(t, i) {
|
||
for (
|
||
var n = { left: 0, right: Infinity, top: 0, bottom: Infinity },
|
||
r = Le(t),
|
||
d = U.getDocument(t),
|
||
m = d.defaultView || d.parentWindow,
|
||
o = d.body,
|
||
O = d.documentElement;
|
||
r;
|
||
|
||
) {
|
||
if (
|
||
(navigator.userAgent.indexOf('MSIE') === -1 || r.clientWidth !== 0) &&
|
||
r !== o &&
|
||
r !== O &&
|
||
U.css(r, 'overflow') !== 'visible'
|
||
) {
|
||
var c = U.offset(r);
|
||
(c.left += r.clientLeft),
|
||
(c.top += r.clientTop),
|
||
(n.top = Math.max(n.top, c.top)),
|
||
(n.right = Math.min(n.right, c.left + r.clientWidth)),
|
||
(n.bottom = Math.min(n.bottom, c.top + r.clientHeight)),
|
||
(n.left = Math.max(n.left, c.left));
|
||
} else if (r === o || r === O) break;
|
||
r = Le(r);
|
||
}
|
||
var A = null;
|
||
if (!U.isWindow(t) && t.nodeType !== 9) {
|
||
A = t.style.position;
|
||
var F = U.css(t, 'position');
|
||
F === 'absolute' && (t.style.position = 'fixed');
|
||
}
|
||
var ce = U.getWindowScrollLeft(m),
|
||
J = U.getWindowScrollTop(m),
|
||
K = U.viewportWidth(m),
|
||
G = U.viewportHeight(m),
|
||
Pe = O.scrollWidth,
|
||
$e = O.scrollHeight,
|
||
_e = window.getComputedStyle(o);
|
||
if (
|
||
(_e.overflowX === 'hidden' && (Pe = m.innerWidth),
|
||
_e.overflowY === 'hidden' && ($e = m.innerHeight),
|
||
t.style && (t.style.position = A),
|
||
i || Ve(t))
|
||
)
|
||
(n.left = Math.max(n.left, ce)),
|
||
(n.top = Math.max(n.top, J)),
|
||
(n.right = Math.min(n.right, ce + K)),
|
||
(n.bottom = Math.min(n.bottom, J + G));
|
||
else {
|
||
var He = Math.max(Pe, ce + K);
|
||
n.right = Math.min(n.right, He);
|
||
var Fe = Math.max($e, J + G);
|
||
n.bottom = Math.min(n.bottom, Fe);
|
||
}
|
||
return n.top >= 0 && n.left >= 0 && n.bottom > n.top && n.right > n.left ? n : null;
|
||
}
|
||
function st(t, i, n, r) {
|
||
var d = U.clone(t),
|
||
m = { width: i.width, height: i.height };
|
||
return (
|
||
r.adjustX && d.left < n.left && (d.left = n.left),
|
||
r.resizeWidth &&
|
||
d.left >= n.left &&
|
||
d.left + m.width > n.right &&
|
||
(m.width -= d.left + m.width - n.right),
|
||
r.adjustX && d.left + m.width > n.right && (d.left = Math.max(n.right - m.width, n.left)),
|
||
r.adjustY && d.top < n.top && (d.top = n.top),
|
||
r.resizeHeight &&
|
||
d.top >= n.top &&
|
||
d.top + m.height > n.bottom &&
|
||
(m.height -= d.top + m.height - n.bottom),
|
||
r.adjustY &&
|
||
d.top + m.height > n.bottom &&
|
||
(d.top = Math.max(n.bottom - m.height, n.top)),
|
||
U.mix(d, m)
|
||
);
|
||
}
|
||
function Be(t) {
|
||
var i, n, r;
|
||
if (!U.isWindow(t) && t.nodeType !== 9)
|
||
(i = U.offset(t)), (n = U.outerWidth(t)), (r = U.outerHeight(t));
|
||
else {
|
||
var d = U.getWindow(t);
|
||
(i = { left: U.getWindowScrollLeft(d), top: U.getWindowScrollTop(d) }),
|
||
(n = U.viewportWidth(d)),
|
||
(r = U.viewportHeight(d));
|
||
}
|
||
return (i.width = n), (i.height = r), i;
|
||
}
|
||
function ie(t, i) {
|
||
var n = i.charAt(0),
|
||
r = i.charAt(1),
|
||
d = t.width,
|
||
m = t.height,
|
||
o = t.left,
|
||
O = t.top;
|
||
return (
|
||
n === 'c' ? (O += m / 2) : n === 'b' && (O += m),
|
||
r === 'c' ? (o += d / 2) : r === 'r' && (o += d),
|
||
{ left: o, top: O }
|
||
);
|
||
}
|
||
function Z(t, i, n, r, d) {
|
||
var m = ie(i, n[1]),
|
||
o = ie(t, n[0]),
|
||
O = [o.left - m.left, o.top - m.top];
|
||
return {
|
||
left: Math.round(t.left - O[0] + r[0] - d[0]),
|
||
top: Math.round(t.top - O[1] + r[1] - d[1]),
|
||
};
|
||
}
|
||
function Te(t, i, n) {
|
||
return t.left < n.left || t.left + i.width > n.right;
|
||
}
|
||
function xe(t, i, n) {
|
||
return t.top < n.top || t.top + i.height > n.bottom;
|
||
}
|
||
function le(t, i, n) {
|
||
return t.left > n.right || t.left + i.width < n.left;
|
||
}
|
||
function ke(t, i, n) {
|
||
return t.top > n.bottom || t.top + i.height < n.top;
|
||
}
|
||
function et(t, i, n) {
|
||
var r = [];
|
||
return (
|
||
U.each(t, function(d) {
|
||
r.push(
|
||
d.replace(i, function(m) {
|
||
return n[m];
|
||
}),
|
||
);
|
||
}),
|
||
r
|
||
);
|
||
}
|
||
function Ne(t, i) {
|
||
return (t[i] = -t[i]), t;
|
||
}
|
||
function M(t, i) {
|
||
var n;
|
||
return (
|
||
/%$/.test(t)
|
||
? (n = (parseInt(t.substring(0, t.length - 1), 10) / 100) * i)
|
||
: (n = parseInt(t, 10)),
|
||
n || 0
|
||
);
|
||
}
|
||
function p(t, i) {
|
||
(t[0] = M(t[0], i.width)), (t[1] = M(t[1], i.height));
|
||
}
|
||
function E(t, i, n, r) {
|
||
var d = n.points,
|
||
m = n.offset || [0, 0],
|
||
o = n.targetOffset || [0, 0],
|
||
O = n.overflow,
|
||
c = n.source || t;
|
||
(m = [].concat(m)), (o = [].concat(o)), (O = O || {});
|
||
var A = {},
|
||
F = 0,
|
||
ce = !!(O && O.alwaysByViewport),
|
||
J = Ke(c, ce),
|
||
K = Be(c);
|
||
p(m, K), p(o, i);
|
||
var G = Z(K, i, d, m, o),
|
||
Pe = U.merge(K, G);
|
||
if (J && (O.adjustX || O.adjustY) && r) {
|
||
if (O.adjustX && Te(G, K, J)) {
|
||
var $e = et(d, /[lr]/gi, { l: 'r', r: 'l' }),
|
||
_e = Ne(m, 0),
|
||
He = Ne(o, 0),
|
||
Fe = Z(K, i, $e, _e, He);
|
||
le(Fe, K, J) || ((F = 1), (d = $e), (m = _e), (o = He));
|
||
}
|
||
if (O.adjustY && xe(G, K, J)) {
|
||
var Ge = et(d, /[tb]/gi, { t: 'b', b: 't' }),
|
||
lt = Ne(m, 1),
|
||
ze = Ne(o, 1),
|
||
Ct = Z(K, i, Ge, lt, ze);
|
||
ke(Ct, K, J) || ((F = 1), (d = Ge), (m = lt), (o = ze));
|
||
}
|
||
F && ((G = Z(K, i, d, m, o)), U.mix(Pe, G));
|
||
var Mt = Te(G, K, J),
|
||
ut = xe(G, K, J);
|
||
if (Mt || ut) {
|
||
var vt = d;
|
||
Mt && (vt = et(d, /[lr]/gi, { l: 'r', r: 'l' })),
|
||
ut && (vt = et(d, /[tb]/gi, { t: 'b', b: 't' })),
|
||
(d = vt),
|
||
(m = n.offset || [0, 0]),
|
||
(o = n.targetOffset || [0, 0]);
|
||
}
|
||
(A.adjustX = O.adjustX && Mt),
|
||
(A.adjustY = O.adjustY && ut),
|
||
(A.adjustX || A.adjustY) && (Pe = st(G, K, J, A));
|
||
}
|
||
return (
|
||
Pe.width !== K.width && U.css(c, 'width', U.width(c) + Pe.width - K.width),
|
||
Pe.height !== K.height && U.css(c, 'height', U.height(c) + Pe.height - K.height),
|
||
U.offset(
|
||
c,
|
||
{ left: Pe.left, top: Pe.top },
|
||
{
|
||
useCssRight: n.useCssRight,
|
||
useCssBottom: n.useCssBottom,
|
||
useCssTransform: n.useCssTransform,
|
||
ignoreShake: n.ignoreShake,
|
||
},
|
||
),
|
||
{ points: d, offset: m, targetOffset: o, overflow: A }
|
||
);
|
||
}
|
||
function l(t, i) {
|
||
var n = Ke(t, i),
|
||
r = Be(t);
|
||
return (
|
||
!n ||
|
||
r.left + r.width <= n.left ||
|
||
r.top + r.height <= n.top ||
|
||
r.left >= n.right ||
|
||
r.top >= n.bottom
|
||
);
|
||
}
|
||
function e(t, i, n) {
|
||
var r = n.target || i,
|
||
d = Be(r),
|
||
m = !l(r, n.overflow && n.overflow.alwaysByViewport);
|
||
return E(t, d, n, m);
|
||
}
|
||
(e.__getOffsetParent = Le), (e.__getVisibleRectForElement = Ke);
|
||
function a(t, i, n) {
|
||
var r,
|
||
d,
|
||
m = U.getDocument(t),
|
||
o = m.defaultView || m.parentWindow,
|
||
O = U.getWindowScrollLeft(o),
|
||
c = U.getWindowScrollTop(o),
|
||
A = U.viewportWidth(o),
|
||
F = U.viewportHeight(o);
|
||
'pageX' in i ? (r = i.pageX) : (r = O + i.clientX),
|
||
'pageY' in i ? (d = i.pageY) : (d = c + i.clientY);
|
||
var ce = { left: r, top: d, width: 0, height: 0 },
|
||
J = r >= 0 && r <= O + A && d >= 0 && d <= c + F,
|
||
K = [n.points[0], 'cc'];
|
||
return E(t, ce, Bt({}, n, { points: K }), J);
|
||
}
|
||
var u = e,
|
||
g = s('bdgK');
|
||
function N(t, i) {
|
||
return t === i
|
||
? !0
|
||
: !t || !i
|
||
? !1
|
||
: 'pageX' in i && 'pageY' in i
|
||
? t.pageX === i.pageX && t.pageY === i.pageY
|
||
: 'clientX' in i && 'clientY' in i
|
||
? t.clientX === i.clientX && t.clientY === i.clientY
|
||
: !1;
|
||
}
|
||
function T(t, i) {
|
||
t !== document.activeElement &&
|
||
Object(Q.a)(i, t) &&
|
||
typeof t.focus == 'function' &&
|
||
t.focus();
|
||
}
|
||
function b(t, i) {
|
||
var n = null,
|
||
r = null;
|
||
function d(o) {
|
||
var O = Object(it.a)(o, 1),
|
||
c = O[0].target;
|
||
if (!document.documentElement.contains(c)) return;
|
||
var A = c.getBoundingClientRect(),
|
||
F = A.width,
|
||
ce = A.height,
|
||
J = Math.floor(F),
|
||
K = Math.floor(ce);
|
||
(n !== J || r !== K) &&
|
||
Promise.resolve().then(function() {
|
||
i({ width: J, height: K });
|
||
}),
|
||
(n = J),
|
||
(r = K);
|
||
}
|
||
var m = new g.a(d);
|
||
return (
|
||
t && m.observe(t),
|
||
function() {
|
||
m.disconnect();
|
||
}
|
||
);
|
||
}
|
||
var C = function(t, i) {
|
||
var n = P.a.useRef(!1),
|
||
r = P.a.useRef(null);
|
||
function d() {
|
||
window.clearTimeout(r.current);
|
||
}
|
||
function m(o) {
|
||
if (!n.current || o === !0) {
|
||
if (t() === !1) return;
|
||
(n.current = !0),
|
||
d(),
|
||
(r.current = window.setTimeout(function() {
|
||
n.current = !1;
|
||
}, i));
|
||
} else
|
||
d(),
|
||
(r.current = window.setTimeout(function() {
|
||
(n.current = !1), m();
|
||
}, i));
|
||
}
|
||
return [
|
||
m,
|
||
function() {
|
||
(n.current = !1), d();
|
||
},
|
||
];
|
||
};
|
||
function D(t) {
|
||
return typeof t != 'function' ? null : t();
|
||
}
|
||
function ne(t) {
|
||
return Object(jt.a)(t) !== 'object' || !t ? null : t;
|
||
}
|
||
var te = function(i, n) {
|
||
var r = i.children,
|
||
d = i.disabled,
|
||
m = i.target,
|
||
o = i.align,
|
||
O = i.onAlign,
|
||
c = i.monitorWindowResize,
|
||
A = i.monitorBufferTime,
|
||
F = A === void 0 ? 0 : A,
|
||
ce = P.a.useRef({}),
|
||
J = P.a.useRef(),
|
||
K = P.a.Children.only(r),
|
||
G = P.a.useRef({});
|
||
(G.current.disabled = d), (G.current.target = m), (G.current.onAlign = O);
|
||
var Pe = C(function() {
|
||
var ze = G.current,
|
||
Ct = ze.disabled,
|
||
Mt = ze.target;
|
||
if (!Ct && Mt) {
|
||
var ut = J.current,
|
||
vt,
|
||
Kt = D(Mt),
|
||
ct = ne(Mt);
|
||
(ce.current.element = Kt), (ce.current.point = ct);
|
||
var wt = document,
|
||
dn = wt.activeElement;
|
||
return (
|
||
Kt && Object(kt.a)(Kt) ? (vt = e(ut, Kt, o)) : ct && (vt = a(ut, ct, o)),
|
||
T(dn, ut),
|
||
O && vt && O(ut, vt),
|
||
!0
|
||
);
|
||
}
|
||
return !1;
|
||
}, F),
|
||
$e = Object(it.a)(Pe, 2),
|
||
_e = $e[0],
|
||
He = $e[1],
|
||
Fe = P.a.useRef({ cancel: function() {} }),
|
||
Ge = P.a.useRef({ cancel: function() {} });
|
||
P.a.useEffect(function() {
|
||
var ze = D(m),
|
||
Ct = ne(m);
|
||
J.current !== Ge.current.element &&
|
||
(Ge.current.cancel(),
|
||
(Ge.current.element = J.current),
|
||
(Ge.current.cancel = b(J.current, _e))),
|
||
(ce.current.element !== ze || !N(ce.current.point, Ct)) &&
|
||
(_e(),
|
||
Fe.current.element !== ze &&
|
||
(Fe.current.cancel(),
|
||
(Fe.current.element = ze),
|
||
(Fe.current.cancel = b(ze, _e))));
|
||
}),
|
||
P.a.useEffect(
|
||
function() {
|
||
d ? He() : _e();
|
||
},
|
||
[d],
|
||
);
|
||
var lt = P.a.useRef(null);
|
||
return (
|
||
P.a.useEffect(
|
||
function() {
|
||
c
|
||
? lt.current || (lt.current = Object(V.a)(window, 'resize', _e))
|
||
: lt.current && (lt.current.remove(), (lt.current = null));
|
||
},
|
||
[c],
|
||
),
|
||
P.a.useEffect(function() {
|
||
return function() {
|
||
Fe.current.cancel(), Ge.current.cancel(), lt.current && lt.current.remove(), He();
|
||
};
|
||
}, []),
|
||
P.a.useImperativeHandle(n, function() {
|
||
return {
|
||
forceAlign: function() {
|
||
return _e(!0);
|
||
},
|
||
};
|
||
}),
|
||
P.a.isValidElement(K) && (K = P.a.cloneElement(K, { ref: Object(Oe.a)(K.ref, J) })),
|
||
K
|
||
);
|
||
},
|
||
ge = P.a.forwardRef(te);
|
||
ge.displayName = 'Align';
|
||
var ue = ge,
|
||
ot = ue,
|
||
xt = s('o0o1'),
|
||
bt = s.n(xt),
|
||
tt = s('HaE+'),
|
||
It = ['measure', 'align', null, 'motion'],
|
||
nn = function(t, i) {
|
||
var n = Object(y.useState)(null),
|
||
r = Object(it.a)(n, 2),
|
||
d = r[0],
|
||
m = r[1],
|
||
o = Object(y.useRef)();
|
||
function O() {
|
||
Y.a.cancel(o.current);
|
||
}
|
||
function c(A) {
|
||
O(),
|
||
(o.current = Object(Y.a)(function() {
|
||
m(function(F) {
|
||
switch (d) {
|
||
case 'align':
|
||
return 'motion';
|
||
case 'motion':
|
||
return 'stable';
|
||
}
|
||
return F;
|
||
}),
|
||
A == null || A();
|
||
}));
|
||
}
|
||
return (
|
||
Object(y.useEffect)(
|
||
function() {
|
||
m('measure');
|
||
},
|
||
[t],
|
||
),
|
||
Object(y.useEffect)(
|
||
function() {
|
||
switch (d) {
|
||
case 'measure':
|
||
i();
|
||
break;
|
||
}
|
||
d &&
|
||
(o.current = Object(Y.a)(
|
||
Object(tt.a)(
|
||
bt.a.mark(function A() {
|
||
var F, ce;
|
||
return bt.a.wrap(function(K) {
|
||
for (;;)
|
||
switch ((K.prev = K.next)) {
|
||
case 0:
|
||
(F = It.indexOf(d)), (ce = It[F + 1]), ce && F !== -1 && m(ce);
|
||
case 3:
|
||
case 'end':
|
||
return K.stop();
|
||
}
|
||
}, A);
|
||
}),
|
||
),
|
||
));
|
||
},
|
||
[d],
|
||
),
|
||
Object(y.useEffect)(function() {
|
||
return function() {
|
||
O();
|
||
};
|
||
}, []),
|
||
[d, c]
|
||
);
|
||
},
|
||
Ut = function(t) {
|
||
var i = P.a.useState({ width: 0, height: 0 }),
|
||
n = Object(it.a)(i, 2),
|
||
r = n[0],
|
||
d = n[1];
|
||
function m(O) {
|
||
d({ width: O.offsetWidth, height: O.offsetHeight });
|
||
}
|
||
var o = P.a.useMemo(
|
||
function() {
|
||
var O = {};
|
||
if (t) {
|
||
var c = r.width,
|
||
A = r.height;
|
||
t.indexOf('height') !== -1 && A
|
||
? (O.height = A)
|
||
: t.indexOf('minHeight') !== -1 && A && (O.minHeight = A),
|
||
t.indexOf('width') !== -1 && c
|
||
? (O.width = c)
|
||
: t.indexOf('minWidth') !== -1 && c && (O.minWidth = c);
|
||
}
|
||
return O;
|
||
},
|
||
[t, r],
|
||
);
|
||
return [o, m];
|
||
},
|
||
mt = y.forwardRef(function(t, i) {
|
||
var n = t.visible,
|
||
r = t.prefixCls,
|
||
d = t.className,
|
||
m = t.style,
|
||
o = t.children,
|
||
O = t.zIndex,
|
||
c = t.stretch,
|
||
A = t.destroyPopupOnHide,
|
||
F = t.align,
|
||
ce = t.point,
|
||
J = t.getRootDomNode,
|
||
K = t.getClassNameFromAlign,
|
||
G = t.onAlign,
|
||
Pe = t.onMouseEnter,
|
||
$e = t.onMouseLeave,
|
||
_e = t.onMouseDown,
|
||
He = t.onTouchStart,
|
||
Fe = Object(y.useRef)(),
|
||
Ge = Object(y.useRef)(),
|
||
lt = Object(y.useState)(),
|
||
ze = Object(it.a)(lt, 2),
|
||
Ct = ze[0],
|
||
Mt = ze[1],
|
||
ut = Ut(c),
|
||
vt = Object(it.a)(ut, 2),
|
||
Kt = vt[0],
|
||
ct = vt[1];
|
||
function wt() {
|
||
c && ct(J());
|
||
}
|
||
var dn = nn(n, wt),
|
||
vn = Object(it.a)(dn, 2),
|
||
yt = vn[0],
|
||
rn = vn[1],
|
||
sn = Object(y.useRef)();
|
||
function En() {
|
||
return ce || J;
|
||
}
|
||
function hn() {
|
||
var Qe;
|
||
(Qe = Fe.current) === null || Qe === void 0 || Qe.forceAlign();
|
||
}
|
||
function be(Qe, Ot) {
|
||
if (yt === 'align') {
|
||
var Tt = K(Ot);
|
||
Mt(Tt),
|
||
Ct !== Tt
|
||
? Promise.resolve().then(function() {
|
||
hn();
|
||
})
|
||
: rn(function() {
|
||
var Pt;
|
||
(Pt = sn.current) === null || Pt === void 0 || Pt.call(sn);
|
||
}),
|
||
G == null || G(Qe, Ot);
|
||
}
|
||
}
|
||
var ae = Object(f.a)({}, me(t));
|
||
['onAppearEnd', 'onEnterEnd', 'onLeaveEnd'].forEach(function(Qe) {
|
||
var Ot = ae[Qe];
|
||
ae[Qe] = function(Tt, Pt) {
|
||
return rn(), Ot == null ? void 0 : Ot(Tt, Pt);
|
||
};
|
||
});
|
||
function Ye() {
|
||
return new Promise(function(Qe) {
|
||
sn.current = Qe;
|
||
});
|
||
}
|
||
y.useEffect(
|
||
function() {
|
||
!ae.motionName && yt === 'motion' && rn();
|
||
},
|
||
[ae.motionName, yt],
|
||
),
|
||
y.useImperativeHandle(i, function() {
|
||
return {
|
||
forceAlign: hn,
|
||
getElement: function() {
|
||
return Ge.current;
|
||
},
|
||
};
|
||
});
|
||
var Et = Object(f.a)(
|
||
Object(f.a)(Object(f.a)({}, Kt), {}, { zIndex: O }, m),
|
||
{},
|
||
{
|
||
opacity: yt === 'motion' || yt === 'stable' || !n ? void 0 : 0,
|
||
pointerEvents: yt === 'stable' ? void 0 : 'none',
|
||
},
|
||
),
|
||
Zt = !0;
|
||
(F == null ? void 0 : F.points) && (yt === 'align' || yt === 'stable') && (Zt = !1);
|
||
var qt = o;
|
||
return (
|
||
y.Children.count(o) > 1 &&
|
||
(qt = y.createElement('div', { className: ''.concat(r, '-content') }, o)),
|
||
y.createElement(
|
||
Xe.default,
|
||
Object.assign({ visible: n, ref: Ge }, ae, {
|
||
onAppearPrepare: Ye,
|
||
onEnterPrepare: Ye,
|
||
removeOnLeave: A,
|
||
leavedClassName: ''.concat(r, '-hidden'),
|
||
}),
|
||
function(Qe, Ot) {
|
||
var Tt = Qe.className,
|
||
Pt = Qe.style,
|
||
gn = Ee()(r, d, Ct, Tt);
|
||
return y.createElement(
|
||
ot,
|
||
{
|
||
target: En(),
|
||
key: 'popup',
|
||
ref: Fe,
|
||
monitorWindowResize: !0,
|
||
disabled: Zt,
|
||
align: F,
|
||
onAlign: be,
|
||
},
|
||
y.createElement(
|
||
'div',
|
||
{
|
||
ref: Ot,
|
||
className: gn,
|
||
onMouseEnter: Pe,
|
||
onMouseLeave: $e,
|
||
onMouseDown: _e,
|
||
onTouchStart: He,
|
||
style: Object(f.a)(Object(f.a)({}, Pt), Et),
|
||
},
|
||
qt,
|
||
),
|
||
);
|
||
},
|
||
)
|
||
);
|
||
});
|
||
mt.displayName = 'PopupInner';
|
||
var pn = mt,
|
||
un = y.forwardRef(function(t, i) {
|
||
var n = Object(Je.a)({}, t);
|
||
return y.createElement(
|
||
'div',
|
||
null,
|
||
y.createElement(Ze, Object.assign({}, n)),
|
||
y.createElement(pn, Object.assign({}, n, { ref: i })),
|
||
);
|
||
});
|
||
un.displayName = 'Popup';
|
||
var cn = un,
|
||
mn = y.createContext(null),
|
||
on = mn;
|
||
function an() {}
|
||
function Jt() {
|
||
return '';
|
||
}
|
||
function On() {
|
||
return window.document;
|
||
}
|
||
var Cn = [
|
||
'onClick',
|
||
'onMouseDown',
|
||
'onTouchStart',
|
||
'onMouseEnter',
|
||
'onMouseLeave',
|
||
'onFocus',
|
||
'onBlur',
|
||
'onContextMenu',
|
||
];
|
||
function Mn(t) {
|
||
var i = (function(n) {
|
||
Object(v.a)(d, n);
|
||
var r = Object(B.a)(d);
|
||
function d(m) {
|
||
var o;
|
||
Object(W.a)(this, d),
|
||
(o = r.call(this, m)),
|
||
(o.popupRef = P.a.createRef()),
|
||
(o.triggerRef = P.a.createRef()),
|
||
(o.onMouseEnter = function(c) {
|
||
var A = o.props.mouseEnterDelay;
|
||
o.fireEvents('onMouseEnter', c), o.delaySetPopupVisible(!0, A, A ? null : c);
|
||
}),
|
||
(o.onMouseMove = function(c) {
|
||
o.fireEvents('onMouseMove', c), o.setPoint(c);
|
||
}),
|
||
(o.onMouseLeave = function(c) {
|
||
o.fireEvents('onMouseLeave', c),
|
||
o.delaySetPopupVisible(!1, o.props.mouseLeaveDelay);
|
||
}),
|
||
(o.onPopupMouseEnter = function() {
|
||
o.clearDelayTimer();
|
||
}),
|
||
(o.onPopupMouseLeave = function(c) {
|
||
var A;
|
||
if (
|
||
c.relatedTarget &&
|
||
!c.relatedTarget.setTimeout &&
|
||
Object(Q.a)(
|
||
(A = o.popupRef.current) === null || A === void 0 ? void 0 : A.getElement(),
|
||
c.relatedTarget,
|
||
)
|
||
)
|
||
return;
|
||
o.delaySetPopupVisible(!1, o.props.mouseLeaveDelay);
|
||
}),
|
||
(o.onFocus = function(c) {
|
||
o.fireEvents('onFocus', c),
|
||
o.clearDelayTimer(),
|
||
o.isFocusToShow() &&
|
||
((o.focusTime = Date.now()), o.delaySetPopupVisible(!0, o.props.focusDelay));
|
||
}),
|
||
(o.onMouseDown = function(c) {
|
||
o.fireEvents('onMouseDown', c), (o.preClickTime = Date.now());
|
||
}),
|
||
(o.onTouchStart = function(c) {
|
||
o.fireEvents('onTouchStart', c), (o.preTouchTime = Date.now());
|
||
}),
|
||
(o.onBlur = function(c) {
|
||
o.fireEvents('onBlur', c),
|
||
o.clearDelayTimer(),
|
||
o.isBlurToHide() && o.delaySetPopupVisible(!1, o.props.blurDelay);
|
||
}),
|
||
(o.onContextMenu = function(c) {
|
||
c.preventDefault(), o.fireEvents('onContextMenu', c), o.setPopupVisible(!0, c);
|
||
}),
|
||
(o.onContextMenuClose = function() {
|
||
o.isContextMenuToShow() && o.close();
|
||
}),
|
||
(o.onClick = function(c) {
|
||
if ((o.fireEvents('onClick', c), o.focusTime)) {
|
||
var A;
|
||
if (
|
||
(o.preClickTime && o.preTouchTime
|
||
? (A = Math.min(o.preClickTime, o.preTouchTime))
|
||
: o.preClickTime
|
||
? (A = o.preClickTime)
|
||
: o.preTouchTime && (A = o.preTouchTime),
|
||
Math.abs(A - o.focusTime) < 20)
|
||
)
|
||
return;
|
||
o.focusTime = 0;
|
||
}
|
||
(o.preClickTime = 0),
|
||
(o.preTouchTime = 0),
|
||
o.isClickToShow() &&
|
||
(o.isClickToHide() || o.isBlurToHide()) &&
|
||
c &&
|
||
c.preventDefault &&
|
||
c.preventDefault();
|
||
var F = !o.state.popupVisible;
|
||
((o.isClickToHide() && !F) || (F && o.isClickToShow())) &&
|
||
o.setPopupVisible(!o.state.popupVisible, c);
|
||
}),
|
||
(o.onPopupMouseDown = function() {
|
||
if (
|
||
((o.hasPopupMouseDown = !0),
|
||
clearTimeout(o.mouseDownTimeout),
|
||
(o.mouseDownTimeout = window.setTimeout(function() {
|
||
o.hasPopupMouseDown = !1;
|
||
}, 0)),
|
||
o.context)
|
||
) {
|
||
var c;
|
||
(c = o.context).onPopupMouseDown.apply(c, arguments);
|
||
}
|
||
}),
|
||
(o.onDocumentClick = function(c) {
|
||
if (o.props.mask && !o.props.maskClosable) return;
|
||
var A = c.target,
|
||
F = o.getRootDomNode(),
|
||
ce = o.getPopupDomNode();
|
||
!Object(Q.a)(F, A) && !Object(Q.a)(ce, A) && !o.hasPopupMouseDown && o.close();
|
||
}),
|
||
(o.getRootDomNode = function() {
|
||
var c = o.props.getTriggerDOMNode;
|
||
if (c) return c(o.triggerRef.current);
|
||
try {
|
||
var A = Object(Se.a)(o.triggerRef.current);
|
||
if (A) return A;
|
||
} catch (F) {}
|
||
return H.a.findDOMNode(Object(S.a)(o));
|
||
}),
|
||
(o.getPopupClassNameFromAlign = function(c) {
|
||
var A = [],
|
||
F = o.props,
|
||
ce = F.popupPlacement,
|
||
J = F.builtinPlacements,
|
||
K = F.prefixCls,
|
||
G = F.alignPoint,
|
||
Pe = F.getPopupClassNameFromAlign;
|
||
return ce && J && A.push(Ce(J, K, c, G)), Pe && A.push(Pe(c)), A.join(' ');
|
||
}),
|
||
(o.getComponent = function() {
|
||
var c = o.props,
|
||
A = c.prefixCls,
|
||
F = c.destroyPopupOnHide,
|
||
ce = c.popupClassName,
|
||
J = c.onPopupAlign,
|
||
K = c.popupMotion,
|
||
G = c.popupAnimation,
|
||
Pe = c.popupTransitionName,
|
||
$e = c.popupStyle,
|
||
_e = c.mask,
|
||
He = c.maskAnimation,
|
||
Fe = c.maskTransitionName,
|
||
Ge = c.maskMotion,
|
||
lt = c.zIndex,
|
||
ze = c.popup,
|
||
Ct = c.stretch,
|
||
Mt = c.alignPoint,
|
||
ut = o.state,
|
||
vt = ut.popupVisible,
|
||
Kt = ut.point,
|
||
ct = o.getPopupAlign(),
|
||
wt = {};
|
||
return (
|
||
o.isMouseEnterToShow() && (wt.onMouseEnter = o.onPopupMouseEnter),
|
||
o.isMouseLeaveToHide() && (wt.onMouseLeave = o.onPopupMouseLeave),
|
||
(wt.onMouseDown = o.onPopupMouseDown),
|
||
(wt.onTouchStart = o.onPopupMouseDown),
|
||
P.a.createElement(
|
||
cn,
|
||
Object.assign(
|
||
{
|
||
prefixCls: A,
|
||
destroyPopupOnHide: F,
|
||
visible: vt,
|
||
point: Mt && Kt,
|
||
className: ce,
|
||
align: ct,
|
||
onAlign: J,
|
||
animation: G,
|
||
getClassNameFromAlign: o.getPopupClassNameFromAlign,
|
||
},
|
||
wt,
|
||
{
|
||
stretch: Ct,
|
||
getRootDomNode: o.getRootDomNode,
|
||
style: $e,
|
||
mask: _e,
|
||
zIndex: lt,
|
||
transitionName: Pe,
|
||
maskAnimation: He,
|
||
maskTransitionName: Fe,
|
||
maskMotion: Ge,
|
||
ref: o.popupRef,
|
||
motion: K,
|
||
},
|
||
),
|
||
typeof ze == 'function' ? ze() : ze,
|
||
)
|
||
);
|
||
}),
|
||
(o.attachParent = function(c) {
|
||
Y.a.cancel(o.attachId);
|
||
var A = o.props,
|
||
F = A.getPopupContainer,
|
||
ce = A.getDocument,
|
||
J = o.getRootDomNode(),
|
||
K;
|
||
F ? (J || F.length === 0) && (K = F(J)) : (K = ce().body),
|
||
K
|
||
? K.appendChild(c)
|
||
: (o.attachId = Object(Y.a)(function() {
|
||
o.attachParent(c);
|
||
}));
|
||
}),
|
||
(o.getContainer = function() {
|
||
var c = document.createElement('div');
|
||
return (
|
||
(c.style.position = 'absolute'),
|
||
(c.style.top = '0'),
|
||
(c.style.left = '0'),
|
||
(c.style.width = '100%'),
|
||
o.attachParent(c),
|
||
c
|
||
);
|
||
}),
|
||
(o.setPoint = function(c) {
|
||
var A = o.props.alignPoint;
|
||
if (!A || !c) return;
|
||
o.setState({ point: { pageX: c.pageX, pageY: c.pageY } });
|
||
}),
|
||
(o.handlePortalUpdate = function() {
|
||
o.state.prevPopupVisible !== o.state.popupVisible &&
|
||
o.props.afterPopupVisibleChange(o.state.popupVisible);
|
||
});
|
||
var O;
|
||
return (
|
||
'popupVisible' in m ? (O = !!m.popupVisible) : (O = !!m.defaultPopupVisible),
|
||
(o.state = { prevPopupVisible: O, popupVisible: O }),
|
||
Cn.forEach(function(c) {
|
||
o['fire'.concat(c)] = function(A) {
|
||
o.fireEvents(c, A);
|
||
};
|
||
}),
|
||
o
|
||
);
|
||
}
|
||
return (
|
||
Object(w.a)(
|
||
d,
|
||
[
|
||
{
|
||
key: 'componentDidMount',
|
||
value: function() {
|
||
this.componentDidUpdate();
|
||
},
|
||
},
|
||
{
|
||
key: 'componentDidUpdate',
|
||
value: function() {
|
||
var o = this.props,
|
||
O = this.state;
|
||
if (O.popupVisible) {
|
||
var c;
|
||
!this.clickOutsideHandler &&
|
||
(this.isClickToHide() || this.isContextMenuToShow()) &&
|
||
((c = o.getDocument()),
|
||
(this.clickOutsideHandler = Object(V.a)(
|
||
c,
|
||
'mousedown',
|
||
this.onDocumentClick,
|
||
))),
|
||
this.touchOutsideHandler ||
|
||
((c = c || o.getDocument()),
|
||
(this.touchOutsideHandler = Object(V.a)(
|
||
c,
|
||
'touchstart',
|
||
this.onDocumentClick,
|
||
))),
|
||
!this.contextMenuOutsideHandler1 &&
|
||
this.isContextMenuToShow() &&
|
||
((c = c || o.getDocument()),
|
||
(this.contextMenuOutsideHandler1 = Object(V.a)(
|
||
c,
|
||
'scroll',
|
||
this.onContextMenuClose,
|
||
))),
|
||
!this.contextMenuOutsideHandler2 &&
|
||
this.isContextMenuToShow() &&
|
||
(this.contextMenuOutsideHandler2 = Object(V.a)(
|
||
window,
|
||
'blur',
|
||
this.onContextMenuClose,
|
||
));
|
||
return;
|
||
}
|
||
this.clearOutsideHandler();
|
||
},
|
||
},
|
||
{
|
||
key: 'componentWillUnmount',
|
||
value: function() {
|
||
this.clearDelayTimer(),
|
||
this.clearOutsideHandler(),
|
||
clearTimeout(this.mouseDownTimeout);
|
||
},
|
||
},
|
||
{
|
||
key: 'getPopupDomNode',
|
||
value: function() {
|
||
var o;
|
||
return (
|
||
((o = this.popupRef.current) === null || o === void 0
|
||
? void 0
|
||
: o.getElement()) || null
|
||
);
|
||
},
|
||
},
|
||
{
|
||
key: 'getPopupAlign',
|
||
value: function() {
|
||
var o = this.props,
|
||
O = o.popupPlacement,
|
||
c = o.popupAlign,
|
||
A = o.builtinPlacements;
|
||
return O && A ? z(A, O, c) : c;
|
||
},
|
||
},
|
||
{
|
||
key: 'setPopupVisible',
|
||
value: function(o, O) {
|
||
var c = this.props.alignPoint,
|
||
A = this.state.popupVisible;
|
||
this.clearDelayTimer(),
|
||
A !== o &&
|
||
('popupVisible' in this.props ||
|
||
this.setState({ popupVisible: o, prevPopupVisible: A }),
|
||
this.props.onPopupVisibleChange(o)),
|
||
c && O && this.setPoint(O);
|
||
},
|
||
},
|
||
{
|
||
key: 'delaySetPopupVisible',
|
||
value: function(o, O, c) {
|
||
var A = this,
|
||
F = O * 1e3;
|
||
if ((this.clearDelayTimer(), F)) {
|
||
var ce = c ? { pageX: c.pageX, pageY: c.pageY } : null;
|
||
this.delayTimer = window.setTimeout(function() {
|
||
A.setPopupVisible(o, ce), A.clearDelayTimer();
|
||
}, F);
|
||
} else this.setPopupVisible(o, c);
|
||
},
|
||
},
|
||
{
|
||
key: 'clearDelayTimer',
|
||
value: function() {
|
||
this.delayTimer && (clearTimeout(this.delayTimer), (this.delayTimer = null));
|
||
},
|
||
},
|
||
{
|
||
key: 'clearOutsideHandler',
|
||
value: function() {
|
||
this.clickOutsideHandler &&
|
||
(this.clickOutsideHandler.remove(), (this.clickOutsideHandler = null)),
|
||
this.contextMenuOutsideHandler1 &&
|
||
(this.contextMenuOutsideHandler1.remove(),
|
||
(this.contextMenuOutsideHandler1 = null)),
|
||
this.contextMenuOutsideHandler2 &&
|
||
(this.contextMenuOutsideHandler2.remove(),
|
||
(this.contextMenuOutsideHandler2 = null)),
|
||
this.touchOutsideHandler &&
|
||
(this.touchOutsideHandler.remove(), (this.touchOutsideHandler = null));
|
||
},
|
||
},
|
||
{
|
||
key: 'createTwoChains',
|
||
value: function(o) {
|
||
var O = this.props.children.props,
|
||
c = this.props;
|
||
return O[o] && c[o] ? this['fire'.concat(o)] : O[o] || c[o];
|
||
},
|
||
},
|
||
{
|
||
key: 'isClickToShow',
|
||
value: function() {
|
||
var o = this.props,
|
||
O = o.action,
|
||
c = o.showAction;
|
||
return O.indexOf('click') !== -1 || c.indexOf('click') !== -1;
|
||
},
|
||
},
|
||
{
|
||
key: 'isContextMenuToShow',
|
||
value: function() {
|
||
var o = this.props,
|
||
O = o.action,
|
||
c = o.showAction;
|
||
return O.indexOf('contextMenu') !== -1 || c.indexOf('contextMenu') !== -1;
|
||
},
|
||
},
|
||
{
|
||
key: 'isClickToHide',
|
||
value: function() {
|
||
var o = this.props,
|
||
O = o.action,
|
||
c = o.hideAction;
|
||
return O.indexOf('click') !== -1 || c.indexOf('click') !== -1;
|
||
},
|
||
},
|
||
{
|
||
key: 'isMouseEnterToShow',
|
||
value: function() {
|
||
var o = this.props,
|
||
O = o.action,
|
||
c = o.showAction;
|
||
return O.indexOf('hover') !== -1 || c.indexOf('mouseEnter') !== -1;
|
||
},
|
||
},
|
||
{
|
||
key: 'isMouseLeaveToHide',
|
||
value: function() {
|
||
var o = this.props,
|
||
O = o.action,
|
||
c = o.hideAction;
|
||
return O.indexOf('hover') !== -1 || c.indexOf('mouseLeave') !== -1;
|
||
},
|
||
},
|
||
{
|
||
key: 'isFocusToShow',
|
||
value: function() {
|
||
var o = this.props,
|
||
O = o.action,
|
||
c = o.showAction;
|
||
return O.indexOf('focus') !== -1 || c.indexOf('focus') !== -1;
|
||
},
|
||
},
|
||
{
|
||
key: 'isBlurToHide',
|
||
value: function() {
|
||
var o = this.props,
|
||
O = o.action,
|
||
c = o.hideAction;
|
||
return O.indexOf('focus') !== -1 || c.indexOf('blur') !== -1;
|
||
},
|
||
},
|
||
{
|
||
key: 'forcePopupAlign',
|
||
value: function() {
|
||
if (this.state.popupVisible) {
|
||
var o;
|
||
(o = this.popupRef.current) === null || o === void 0 || o.forceAlign();
|
||
}
|
||
},
|
||
},
|
||
{
|
||
key: 'fireEvents',
|
||
value: function(o, O) {
|
||
var c = this.props.children.props[o];
|
||
c && c(O);
|
||
var A = this.props[o];
|
||
A && A(O);
|
||
},
|
||
},
|
||
{
|
||
key: 'close',
|
||
value: function() {
|
||
this.setPopupVisible(!1);
|
||
},
|
||
},
|
||
{
|
||
key: 'render',
|
||
value: function() {
|
||
var o = this.state.popupVisible,
|
||
O = this.props,
|
||
c = O.children,
|
||
A = O.forceRender,
|
||
F = O.alignPoint,
|
||
ce = O.className,
|
||
J = O.autoDestroy,
|
||
K = P.a.Children.only(c),
|
||
G = { key: 'trigger' };
|
||
this.isContextMenuToShow()
|
||
? (G.onContextMenu = this.onContextMenu)
|
||
: (G.onContextMenu = this.createTwoChains('onContextMenu')),
|
||
this.isClickToHide() || this.isClickToShow()
|
||
? ((G.onClick = this.onClick),
|
||
(G.onMouseDown = this.onMouseDown),
|
||
(G.onTouchStart = this.onTouchStart))
|
||
: ((G.onClick = this.createTwoChains('onClick')),
|
||
(G.onMouseDown = this.createTwoChains('onMouseDown')),
|
||
(G.onTouchStart = this.createTwoChains('onTouchStart'))),
|
||
this.isMouseEnterToShow()
|
||
? ((G.onMouseEnter = this.onMouseEnter),
|
||
F && (G.onMouseMove = this.onMouseMove))
|
||
: (G.onMouseEnter = this.createTwoChains('onMouseEnter')),
|
||
this.isMouseLeaveToHide()
|
||
? (G.onMouseLeave = this.onMouseLeave)
|
||
: (G.onMouseLeave = this.createTwoChains('onMouseLeave')),
|
||
this.isFocusToShow() || this.isBlurToHide()
|
||
? ((G.onFocus = this.onFocus), (G.onBlur = this.onBlur))
|
||
: ((G.onFocus = this.createTwoChains('onFocus')),
|
||
(G.onBlur = this.createTwoChains('onBlur')));
|
||
var Pe = Ee()(K && K.props && K.props.className, ce);
|
||
Pe && (G.className = Pe);
|
||
var $e = Object(f.a)({}, G);
|
||
Object(Oe.c)(K) && ($e.ref = Object(Oe.a)(this.triggerRef, K.ref));
|
||
var _e = P.a.cloneElement(K, $e),
|
||
He;
|
||
return (
|
||
(o || this.popupRef.current || A) &&
|
||
(He = P.a.createElement(
|
||
t,
|
||
{
|
||
key: 'portal',
|
||
getContainer: this.getContainer,
|
||
didUpdate: this.handlePortalUpdate,
|
||
},
|
||
this.getComponent(),
|
||
)),
|
||
!o && J && (He = null),
|
||
P.a.createElement(
|
||
on.Provider,
|
||
{ value: { onPopupMouseDown: this.onPopupMouseDown } },
|
||
_e,
|
||
He,
|
||
)
|
||
);
|
||
},
|
||
},
|
||
],
|
||
[
|
||
{
|
||
key: 'getDerivedStateFromProps',
|
||
value: function(o, O) {
|
||
var c = o.popupVisible,
|
||
A = {};
|
||
return (
|
||
c !== void 0 &&
|
||
O.popupVisible !== c &&
|
||
((A.popupVisible = c), (A.prevPopupVisible = O.popupVisible)),
|
||
A
|
||
);
|
||
},
|
||
},
|
||
],
|
||
),
|
||
d
|
||
);
|
||
})(P.a.Component);
|
||
return (
|
||
(i.contextType = on),
|
||
(i.defaultProps = {
|
||
prefixCls: 'rc-trigger-popup',
|
||
getPopupClassNameFromAlign: Jt,
|
||
getDocument: On,
|
||
onPopupVisibleChange: an,
|
||
afterPopupVisibleChange: an,
|
||
onPopupAlign: an,
|
||
popupClassName: '',
|
||
mouseEnterDelay: 0,
|
||
mouseLeaveDelay: 0.1,
|
||
focusDelay: 0,
|
||
blurDelay: 0.15,
|
||
popupStyle: {},
|
||
destroyPopupOnHide: !1,
|
||
popupAlign: {},
|
||
defaultPopupVisible: !1,
|
||
mask: !1,
|
||
maskClosable: !0,
|
||
action: [],
|
||
showAction: [],
|
||
hideAction: [],
|
||
autoDestroy: !1,
|
||
}),
|
||
i
|
||
);
|
||
}
|
||
var Tn = (x.a = Mn(ye.a));
|
||
},
|
||
'x/xZ': function(Ae, x, s) {
|
||
'use strict';
|
||
x.a = function(f) {
|
||
if (!f) return !1;
|
||
if (f.offsetParent) return !0;
|
||
if (f.getBBox) {
|
||
var W = f.getBBox();
|
||
if (W.width || W.height) return !0;
|
||
}
|
||
if (f.getBoundingClientRect) {
|
||
var w = f.getBoundingClientRect();
|
||
if (w.width || w.height) return !0;
|
||
}
|
||
return !1;
|
||
};
|
||
},
|
||
xc4C: function(Ae, x, s) {
|
||
'use strict';
|
||
s.d(x, 'b', function() {
|
||
return S;
|
||
}),
|
||
s.d(x, 'a', function() {
|
||
return v;
|
||
});
|
||
var f = s('ODXe'),
|
||
W = s('CJvt'),
|
||
w = s('Qi1f');
|
||
function S(B) {
|
||
var y = Object(w.d)(B),
|
||
P = Object(f.a)(y, 2),
|
||
_ = P[0],
|
||
H = P[1];
|
||
return W.a.setTwoToneColors({ primaryColor: _, secondaryColor: H });
|
||
}
|
||
function v() {
|
||
var B = W.a.getTwoToneColors();
|
||
return B.calculated ? [B.primaryColor, B.secondaryColor] : B.primaryColor;
|
||
}
|
||
},
|
||
zT1h: function(Ae, x, s) {
|
||
'use strict';
|
||
s.d(x, 'a', function() {
|
||
return w;
|
||
});
|
||
var f = s('i8i4'),
|
||
W = s.n(f);
|
||
function w(S, v, B, y) {
|
||
var P = W.a.unstable_batchedUpdates
|
||
? function(H) {
|
||
W.a.unstable_batchedUpdates(B, H);
|
||
}
|
||
: B;
|
||
return (
|
||
S.addEventListener && S.addEventListener(v, P, y),
|
||
{
|
||
remove: function() {
|
||
S.removeEventListener && S.removeEventListener(v, P);
|
||
},
|
||
}
|
||
);
|
||
}
|
||
},
|
||
},
|
||
]);
|
||
|
||
//# sourceMappingURL=vendors~p__home.js.map
|