|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[21799],{
|
|
|
|
|
|
/***/ 29338:
|
|
|
/*!*****************************************************************************************************!*\
|
|
|
!*** ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/icons/EyeOutlined.js + 1 modules ***!
|
|
|
\*****************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_EyeOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.9@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(79384);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/EyeOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var EyeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, "name": "eye", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_EyeOutlined = (EyeOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(44847);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/icons/EyeOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var EyeOutlined_EyeOutlined = function EyeOutlined(props, ref) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_EyeOutlined
|
|
|
}));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_EyeOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(EyeOutlined_EyeOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 73376:
|
|
|
/*!****************************************************************************************************************!*\
|
|
|
!*** ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/icons/QuestionCircleOutlined.js + 1 modules ***!
|
|
|
\****************************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_QuestionCircleOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.9@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(79384);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/QuestionCircleOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var QuestionCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, "name": "question-circle", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_QuestionCircleOutlined = (QuestionCircleOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(44847);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/icons/QuestionCircleOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var QuestionCircleOutlined_QuestionCircleOutlined = function QuestionCircleOutlined(props, ref) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_QuestionCircleOutlined
|
|
|
}));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_QuestionCircleOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(QuestionCircleOutlined_QuestionCircleOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 78241:
|
|
|
/*!*********************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules ***!
|
|
|
\*********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ es_form; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.9@@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
|
|
|
var toConsumableArray = __webpack_require__(49397);
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-motion@2.9.0@rc-motion/es/index.js + 12 modules
|
|
|
var es = __webpack_require__(44516);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/motion.js
|
|
|
var motion = __webpack_require__(62892);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/context.js
|
|
|
var context = __webpack_require__(32441);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/hooks/useDebounce.js
|
|
|
|
|
|
function useDebounce(value) {
|
|
|
const [cacheValue, setCacheValue] = _react_17_0_2_react.useState(value);
|
|
|
_react_17_0_2_react.useEffect(() => {
|
|
|
const timeout = setTimeout(() => {
|
|
|
setCacheValue(value);
|
|
|
}, value.length ? 0 : 10);
|
|
|
return () => {
|
|
|
clearTimeout(timeout);
|
|
|
};
|
|
|
}, [value]);
|
|
|
return cacheValue;
|
|
|
}
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
|
|
var style = __webpack_require__(17313);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/motion/zoom.js
|
|
|
var zoom = __webpack_require__(29878);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/motion/collapse.js
|
|
|
var collapse = __webpack_require__(8378);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
|
|
var statistic = __webpack_require__(37613);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
|
|
var genComponentStyleHook = __webpack_require__(83116);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/style/explain.js
|
|
|
const genFormValidateMotionStyle = token => {
|
|
|
const {
|
|
|
componentCls
|
|
|
} = token;
|
|
|
const helpCls = `${componentCls}-show-help`;
|
|
|
const helpItemCls = `${componentCls}-show-help-item`;
|
|
|
return {
|
|
|
[helpCls]: {
|
|
|
// Explain holder
|
|
|
transition: `opacity ${token.motionDurationSlow} ${token.motionEaseInOut}`,
|
|
|
'&-appear, &-enter': {
|
|
|
opacity: 0,
|
|
|
'&-active': {
|
|
|
opacity: 1
|
|
|
}
|
|
|
},
|
|
|
'&-leave': {
|
|
|
opacity: 1,
|
|
|
'&-active': {
|
|
|
opacity: 0
|
|
|
}
|
|
|
},
|
|
|
// Explain
|
|
|
[helpItemCls]: {
|
|
|
overflow: 'hidden',
|
|
|
transition: `height ${token.motionDurationSlow} ${token.motionEaseInOut},
|
|
|
opacity ${token.motionDurationSlow} ${token.motionEaseInOut},
|
|
|
transform ${token.motionDurationSlow} ${token.motionEaseInOut} !important`,
|
|
|
[`&${helpItemCls}-appear, &${helpItemCls}-enter`]: {
|
|
|
transform: `translateY(-5px)`,
|
|
|
opacity: 0,
|
|
|
[`&-active`]: {
|
|
|
transform: 'translateY(0)',
|
|
|
opacity: 1
|
|
|
}
|
|
|
},
|
|
|
[`&${helpItemCls}-leave-active`]: {
|
|
|
transform: `translateY(-5px)`
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
/* harmony default export */ var explain = (genFormValidateMotionStyle);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/style/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const resetForm = token => ({
|
|
|
legend: {
|
|
|
display: 'block',
|
|
|
width: '100%',
|
|
|
marginBottom: token.marginLG,
|
|
|
padding: 0,
|
|
|
color: token.colorTextDescription,
|
|
|
fontSize: token.fontSizeLG,
|
|
|
lineHeight: 'inherit',
|
|
|
border: 0,
|
|
|
borderBottom: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`
|
|
|
},
|
|
|
label: {
|
|
|
fontSize: token.fontSize
|
|
|
},
|
|
|
'input[type="search"]': {
|
|
|
boxSizing: 'border-box'
|
|
|
},
|
|
|
// Position radios and checkboxes better
|
|
|
'input[type="radio"], input[type="checkbox"]': {
|
|
|
lineHeight: 'normal'
|
|
|
},
|
|
|
'input[type="file"]': {
|
|
|
display: 'block'
|
|
|
},
|
|
|
// Make range inputs behave like textual form controls
|
|
|
'input[type="range"]': {
|
|
|
display: 'block',
|
|
|
width: '100%'
|
|
|
},
|
|
|
// Make multiple select elements height not fixed
|
|
|
'select[multiple], select[size]': {
|
|
|
height: 'auto'
|
|
|
},
|
|
|
// Focus for file, radio, and checkbox
|
|
|
[`input[type='file']:focus,
|
|
|
input[type='radio']:focus,
|
|
|
input[type='checkbox']:focus`]: {
|
|
|
outline: 0,
|
|
|
boxShadow: `0 0 0 ${token.controlOutlineWidth}px ${token.controlOutline}`
|
|
|
},
|
|
|
// Adjust output element
|
|
|
output: {
|
|
|
display: 'block',
|
|
|
paddingTop: 15,
|
|
|
color: token.colorText,
|
|
|
fontSize: token.fontSize,
|
|
|
lineHeight: token.lineHeight
|
|
|
}
|
|
|
});
|
|
|
const genFormSize = (token, height) => {
|
|
|
const {
|
|
|
formItemCls
|
|
|
} = token;
|
|
|
return {
|
|
|
[formItemCls]: {
|
|
|
[`${formItemCls}-label > label`]: {
|
|
|
height
|
|
|
},
|
|
|
[`${formItemCls}-control-input`]: {
|
|
|
minHeight: height
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
const genFormStyle = token => {
|
|
|
const {
|
|
|
componentCls
|
|
|
} = token;
|
|
|
return {
|
|
|
[token.componentCls]: Object.assign(Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), resetForm(token)), {
|
|
|
[`${componentCls}-text`]: {
|
|
|
display: 'inline-block',
|
|
|
paddingInlineEnd: token.paddingSM
|
|
|
},
|
|
|
// ================================================================
|
|
|
// = Size =
|
|
|
// ================================================================
|
|
|
'&-small': Object.assign({}, genFormSize(token, token.controlHeightSM)),
|
|
|
'&-large': Object.assign({}, genFormSize(token, token.controlHeightLG))
|
|
|
})
|
|
|
};
|
|
|
};
|
|
|
const genFormItemStyle = token => {
|
|
|
const {
|
|
|
formItemCls,
|
|
|
iconCls,
|
|
|
componentCls,
|
|
|
rootPrefixCls,
|
|
|
labelRequiredMarkColor,
|
|
|
labelColor,
|
|
|
labelFontSize,
|
|
|
labelHeight,
|
|
|
labelColonMarginInlineStart,
|
|
|
labelColonMarginInlineEnd,
|
|
|
itemMarginBottom
|
|
|
} = token;
|
|
|
return {
|
|
|
[formItemCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
|
marginBottom: itemMarginBottom,
|
|
|
verticalAlign: 'top',
|
|
|
'&-with-help': {
|
|
|
transition: 'none'
|
|
|
},
|
|
|
[`&-hidden,
|
|
|
&-hidden.${rootPrefixCls}-row`]: {
|
|
|
// https://github.com/ant-design/ant-design/issues/26141
|
|
|
display: 'none'
|
|
|
},
|
|
|
'&-has-warning': {
|
|
|
[`${formItemCls}-split`]: {
|
|
|
color: token.colorError
|
|
|
}
|
|
|
},
|
|
|
'&-has-error': {
|
|
|
[`${formItemCls}-split`]: {
|
|
|
color: token.colorWarning
|
|
|
}
|
|
|
},
|
|
|
// ==============================================================
|
|
|
// = Label =
|
|
|
// ==============================================================
|
|
|
[`${formItemCls}-label`]: {
|
|
|
flexGrow: 0,
|
|
|
overflow: 'hidden',
|
|
|
whiteSpace: 'nowrap',
|
|
|
textAlign: 'end',
|
|
|
verticalAlign: 'middle',
|
|
|
'&-left': {
|
|
|
textAlign: 'start'
|
|
|
},
|
|
|
'&-wrap': {
|
|
|
overflow: 'unset',
|
|
|
lineHeight: `${token.lineHeight} - 0.25em`,
|
|
|
whiteSpace: 'unset'
|
|
|
},
|
|
|
'> label': {
|
|
|
position: 'relative',
|
|
|
display: 'inline-flex',
|
|
|
alignItems: 'center',
|
|
|
maxWidth: '100%',
|
|
|
height: labelHeight,
|
|
|
color: labelColor,
|
|
|
fontSize: labelFontSize,
|
|
|
[`> ${iconCls}`]: {
|
|
|
fontSize: token.fontSize,
|
|
|
verticalAlign: 'top'
|
|
|
},
|
|
|
// Required mark
|
|
|
[`&${formItemCls}-required:not(${formItemCls}-required-mark-optional)::before`]: {
|
|
|
display: 'inline-block',
|
|
|
marginInlineEnd: token.marginXXS,
|
|
|
color: labelRequiredMarkColor,
|
|
|
fontSize: token.fontSize,
|
|
|
fontFamily: 'SimSun, sans-serif',
|
|
|
lineHeight: 1,
|
|
|
content: '"*"',
|
|
|
[`${componentCls}-hide-required-mark &`]: {
|
|
|
display: 'none'
|
|
|
}
|
|
|
},
|
|
|
// Optional mark
|
|
|
[`${formItemCls}-optional`]: {
|
|
|
display: 'inline-block',
|
|
|
marginInlineStart: token.marginXXS,
|
|
|
color: token.colorTextDescription,
|
|
|
[`${componentCls}-hide-required-mark &`]: {
|
|
|
display: 'none'
|
|
|
}
|
|
|
},
|
|
|
// Optional mark
|
|
|
[`${formItemCls}-tooltip`]: {
|
|
|
color: token.colorTextDescription,
|
|
|
cursor: 'help',
|
|
|
writingMode: 'horizontal-tb',
|
|
|
marginInlineStart: token.marginXXS
|
|
|
},
|
|
|
'&::after': {
|
|
|
content: '":"',
|
|
|
position: 'relative',
|
|
|
marginBlock: 0,
|
|
|
marginInlineStart: labelColonMarginInlineStart,
|
|
|
marginInlineEnd: labelColonMarginInlineEnd
|
|
|
},
|
|
|
[`&${formItemCls}-no-colon::after`]: {
|
|
|
content: '"\\a0"'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
// ==============================================================
|
|
|
// = Input =
|
|
|
// ==============================================================
|
|
|
[`${formItemCls}-control`]: {
|
|
|
['--ant-display']: 'flex',
|
|
|
flexDirection: 'column',
|
|
|
flexGrow: 1,
|
|
|
[`&:first-child:not([class^="'${rootPrefixCls}-col-'"]):not([class*="' ${rootPrefixCls}-col-'"])`]: {
|
|
|
width: '100%'
|
|
|
},
|
|
|
'&-input': {
|
|
|
position: 'relative',
|
|
|
display: 'flex',
|
|
|
alignItems: 'center',
|
|
|
minHeight: token.controlHeight,
|
|
|
'&-content': {
|
|
|
flex: 'auto',
|
|
|
maxWidth: '100%'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
// ==============================================================
|
|
|
// = Explain =
|
|
|
// ==============================================================
|
|
|
[formItemCls]: {
|
|
|
'&-explain, &-extra': {
|
|
|
clear: 'both',
|
|
|
color: token.colorTextDescription,
|
|
|
fontSize: token.fontSize,
|
|
|
lineHeight: token.lineHeight
|
|
|
},
|
|
|
'&-explain-connected': {
|
|
|
width: '100%'
|
|
|
},
|
|
|
'&-extra': {
|
|
|
minHeight: token.controlHeightSM,
|
|
|
transition: `color ${token.motionDurationMid} ${token.motionEaseOut}` // sync input color transition
|
|
|
},
|
|
|
|
|
|
'&-explain': {
|
|
|
'&-error': {
|
|
|
color: token.colorError
|
|
|
},
|
|
|
'&-warning': {
|
|
|
color: token.colorWarning
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
[`&-with-help ${formItemCls}-explain`]: {
|
|
|
height: 'auto',
|
|
|
opacity: 1
|
|
|
},
|
|
|
// ==============================================================
|
|
|
// = Feedback Icon =
|
|
|
// ==============================================================
|
|
|
[`${formItemCls}-feedback-icon`]: {
|
|
|
fontSize: token.fontSize,
|
|
|
textAlign: 'center',
|
|
|
visibility: 'visible',
|
|
|
animationName: zoom/* zoomIn */.kr,
|
|
|
animationDuration: token.motionDurationMid,
|
|
|
animationTimingFunction: token.motionEaseOutBack,
|
|
|
pointerEvents: 'none',
|
|
|
'&-success': {
|
|
|
color: token.colorSuccess
|
|
|
},
|
|
|
'&-error': {
|
|
|
color: token.colorError
|
|
|
},
|
|
|
'&-warning': {
|
|
|
color: token.colorWarning
|
|
|
},
|
|
|
'&-validating': {
|
|
|
color: token.colorPrimary
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
};
|
|
|
};
|
|
|
const genHorizontalStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
formItemCls
|
|
|
} = token;
|
|
|
return {
|
|
|
[`${componentCls}-horizontal`]: {
|
|
|
[`${formItemCls}-label`]: {
|
|
|
flexGrow: 0
|
|
|
},
|
|
|
[`${formItemCls}-control`]: {
|
|
|
flex: '1 1 0',
|
|
|
// https://github.com/ant-design/ant-design/issues/32777
|
|
|
// https://github.com/ant-design/ant-design/issues/33773
|
|
|
minWidth: 0
|
|
|
},
|
|
|
// Do not change this to `ant-col-24`! `-24` match all the responsive rules
|
|
|
// https://github.com/ant-design/ant-design/issues/32980
|
|
|
// https://github.com/ant-design/ant-design/issues/34903
|
|
|
// https://github.com/ant-design/ant-design/issues/44538
|
|
|
[`${formItemCls}-label[class$='-24'], ${formItemCls}-label[class*='-24 ']`]: {
|
|
|
[`& + ${formItemCls}-control`]: {
|
|
|
minWidth: 'unset'
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
const genInlineStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
formItemCls
|
|
|
} = token;
|
|
|
return {
|
|
|
[`${componentCls}-inline`]: {
|
|
|
display: 'flex',
|
|
|
flexWrap: 'wrap',
|
|
|
[formItemCls]: {
|
|
|
flex: 'none',
|
|
|
marginInlineEnd: token.margin,
|
|
|
marginBottom: 0,
|
|
|
'&-row': {
|
|
|
flexWrap: 'nowrap'
|
|
|
},
|
|
|
[`> ${formItemCls}-label,
|
|
|
> ${formItemCls}-control`]: {
|
|
|
display: 'inline-block',
|
|
|
verticalAlign: 'top'
|
|
|
},
|
|
|
[`> ${formItemCls}-label`]: {
|
|
|
flex: 'none'
|
|
|
},
|
|
|
[`${componentCls}-text`]: {
|
|
|
display: 'inline-block'
|
|
|
},
|
|
|
[`${formItemCls}-has-feedback`]: {
|
|
|
display: 'inline-block'
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
const makeVerticalLayoutLabel = token => ({
|
|
|
padding: token.verticalLabelPadding,
|
|
|
margin: token.verticalLabelMargin,
|
|
|
whiteSpace: 'initial',
|
|
|
textAlign: 'start',
|
|
|
'> label': {
|
|
|
margin: 0,
|
|
|
'&::after': {
|
|
|
// https://github.com/ant-design/ant-design/issues/43538
|
|
|
visibility: 'hidden'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
const makeVerticalLayout = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
formItemCls,
|
|
|
rootPrefixCls
|
|
|
} = token;
|
|
|
return {
|
|
|
[`${formItemCls} ${formItemCls}-label`]: makeVerticalLayoutLabel(token),
|
|
|
[componentCls]: {
|
|
|
[formItemCls]: {
|
|
|
flexWrap: 'wrap',
|
|
|
[`${formItemCls}-label, ${formItemCls}-control`]: {
|
|
|
// When developer pass `xs: { span }`,
|
|
|
// It should follow the `xs` screen config
|
|
|
// ref: https://github.com/ant-design/ant-design/issues/44386
|
|
|
[`&:not([class*=" ${rootPrefixCls}-col-xs"])`]: {
|
|
|
flex: '0 0 100%',
|
|
|
maxWidth: '100%'
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
const genVerticalStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
formItemCls,
|
|
|
rootPrefixCls
|
|
|
} = token;
|
|
|
return {
|
|
|
[`${componentCls}-vertical`]: {
|
|
|
[formItemCls]: {
|
|
|
'&-row': {
|
|
|
flexDirection: 'column'
|
|
|
},
|
|
|
'&-label > label': {
|
|
|
height: 'auto'
|
|
|
},
|
|
|
[`${componentCls}-item-control`]: {
|
|
|
width: '100%'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
[`${componentCls}-vertical ${formItemCls}-label,
|
|
|
.${rootPrefixCls}-col-24${formItemCls}-label,
|
|
|
.${rootPrefixCls}-col-xl-24${formItemCls}-label`]: makeVerticalLayoutLabel(token),
|
|
|
[`@media (max-width: ${token.screenXSMax}px)`]: [makeVerticalLayout(token), {
|
|
|
[componentCls]: {
|
|
|
[`.${rootPrefixCls}-col-xs-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
|
|
|
}
|
|
|
}],
|
|
|
[`@media (max-width: ${token.screenSMMax}px)`]: {
|
|
|
[componentCls]: {
|
|
|
[`.${rootPrefixCls}-col-sm-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
|
|
|
}
|
|
|
},
|
|
|
[`@media (max-width: ${token.screenMDMax}px)`]: {
|
|
|
[componentCls]: {
|
|
|
[`.${rootPrefixCls}-col-md-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
|
|
|
}
|
|
|
},
|
|
|
[`@media (max-width: ${token.screenLGMax}px)`]: {
|
|
|
[componentCls]: {
|
|
|
[`.${rootPrefixCls}-col-lg-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
// ============================== Export ==============================
|
|
|
const prepareToken = (token, rootPrefixCls) => {
|
|
|
const formToken = (0,statistic/* merge */.TS)(token, {
|
|
|
formItemCls: `${token.componentCls}-item`,
|
|
|
rootPrefixCls
|
|
|
});
|
|
|
return formToken;
|
|
|
};
|
|
|
/* harmony default export */ var form_style = ((0,genComponentStyleHook/* default */.Z)('Form', (token, _ref) => {
|
|
|
let {
|
|
|
rootPrefixCls
|
|
|
} = _ref;
|
|
|
const formToken = prepareToken(token, rootPrefixCls);
|
|
|
return [genFormStyle(formToken), genFormItemStyle(formToken), explain(formToken), genHorizontalStyle(formToken), genInlineStyle(formToken), genVerticalStyle(formToken), (0,collapse/* default */.Z)(formToken), zoom/* zoomIn */.kr];
|
|
|
}, token => ({
|
|
|
labelRequiredMarkColor: token.colorError,
|
|
|
labelColor: token.colorTextHeading,
|
|
|
labelFontSize: token.fontSize,
|
|
|
labelHeight: token.controlHeight,
|
|
|
labelColonMarginInlineStart: token.marginXXS / 2,
|
|
|
labelColonMarginInlineEnd: token.marginXS,
|
|
|
itemMarginBottom: token.marginLG,
|
|
|
verticalLabelPadding: `0 0 ${token.paddingXS}px`,
|
|
|
verticalLabelMargin: 0
|
|
|
}), {
|
|
|
// Let From style before the Grid
|
|
|
// ref https://github.com/ant-design/ant-design/issues/44386
|
|
|
order: -1000
|
|
|
}));
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/ErrorList.js
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const EMPTY_LIST = [];
|
|
|
function toErrorEntity(error, prefix, errorStatus) {
|
|
|
let index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
|
return {
|
|
|
key: typeof error === 'string' ? error : `${prefix}-${index}`,
|
|
|
error,
|
|
|
errorStatus
|
|
|
};
|
|
|
}
|
|
|
const ErrorList = _ref => {
|
|
|
let {
|
|
|
help,
|
|
|
helpStatus,
|
|
|
errors = EMPTY_LIST,
|
|
|
warnings = EMPTY_LIST,
|
|
|
className: rootClassName,
|
|
|
fieldId,
|
|
|
onVisibleChanged
|
|
|
} = _ref;
|
|
|
const {
|
|
|
prefixCls
|
|
|
} = _react_17_0_2_react.useContext(context/* FormItemPrefixContext */.Rk);
|
|
|
const baseClassName = `${prefixCls}-item-explain`;
|
|
|
const [, hashId] = form_style(prefixCls);
|
|
|
const collapseMotion = (0,_react_17_0_2_react.useMemo)(() => (0,motion/* default */.Z)(prefixCls), [prefixCls]);
|
|
|
// We have to debounce here again since somewhere use ErrorList directly still need no shaking
|
|
|
// ref: https://github.com/ant-design/ant-design/issues/36336
|
|
|
const debounceErrors = useDebounce(errors);
|
|
|
const debounceWarnings = useDebounce(warnings);
|
|
|
const fullKeyList = _react_17_0_2_react.useMemo(() => {
|
|
|
if (help !== undefined && help !== null) {
|
|
|
return [toErrorEntity(help, 'help', helpStatus)];
|
|
|
}
|
|
|
return [].concat((0,toConsumableArray/* default */.Z)(debounceErrors.map((error, index) => toErrorEntity(error, 'error', 'error', index))), (0,toConsumableArray/* default */.Z)(debounceWarnings.map((warning, index) => toErrorEntity(warning, 'warning', 'warning', index))));
|
|
|
}, [help, helpStatus, debounceErrors, debounceWarnings]);
|
|
|
const helpProps = {};
|
|
|
if (fieldId) {
|
|
|
helpProps.id = `${fieldId}_help`;
|
|
|
}
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(es["default"], {
|
|
|
motionDeadline: collapseMotion.motionDeadline,
|
|
|
motionName: `${prefixCls}-show-help`,
|
|
|
visible: !!fullKeyList.length,
|
|
|
onVisibleChanged: onVisibleChanged
|
|
|
}, holderProps => {
|
|
|
const {
|
|
|
className: holderClassName,
|
|
|
style: holderStyle
|
|
|
} = holderProps;
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({}, helpProps, {
|
|
|
className: _classnames_2_5_1_classnames_default()(baseClassName, holderClassName, rootClassName, hashId),
|
|
|
style: holderStyle,
|
|
|
role: "alert"
|
|
|
}), /*#__PURE__*/_react_17_0_2_react.createElement(es.CSSMotionList, Object.assign({
|
|
|
keys: fullKeyList
|
|
|
}, (0,motion/* default */.Z)(prefixCls), {
|
|
|
motionName: `${prefixCls}-show-help-item`,
|
|
|
component: false
|
|
|
}), itemProps => {
|
|
|
const {
|
|
|
key,
|
|
|
error,
|
|
|
errorStatus,
|
|
|
className: itemClassName,
|
|
|
style: itemStyle
|
|
|
} = itemProps;
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
|
key: key,
|
|
|
className: _classnames_2_5_1_classnames_default()(itemClassName, {
|
|
|
[`${baseClassName}-${errorStatus}`]: errorStatus
|
|
|
}),
|
|
|
style: itemStyle
|
|
|
}, error);
|
|
|
}));
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var form_ErrorList = (ErrorList);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-field-form@1.38.2@rc-field-form/es/index.js + 15 modules
|
|
|
var _rc_field_form_1_38_2_rc_field_form_es = __webpack_require__(95013);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
|
var config_provider_context = __webpack_require__(36355);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/DisabledContext.js
|
|
|
var DisabledContext = __webpack_require__(1684);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/SizeContext.js
|
|
|
var SizeContext = __webpack_require__(52946);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/hooks/useSize.js
|
|
|
var useSize = __webpack_require__(19716);
|
|
|
// EXTERNAL MODULE: ./node_modules/_scroll-into-view-if-needed@3.1.0@scroll-into-view-if-needed/dist/index.js + 1 modules
|
|
|
var dist = __webpack_require__(6774);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/util.js
|
|
|
// form item name black list. in form ,you can use form.id get the form item element.
|
|
|
// use object hasOwnProperty will get better performance if black list is longer.
|
|
|
const formItemNameBlackList = ['parentNode'];
|
|
|
// default form item id prefix.
|
|
|
const defaultItemNamePrefixCls = 'form_item';
|
|
|
function toArray(candidate) {
|
|
|
if (candidate === undefined || candidate === false) return [];
|
|
|
return Array.isArray(candidate) ? candidate : [candidate];
|
|
|
}
|
|
|
function getFieldId(namePath, formName) {
|
|
|
if (!namePath.length) {
|
|
|
return undefined;
|
|
|
}
|
|
|
const mergedId = namePath.join('_');
|
|
|
if (formName) {
|
|
|
return `${formName}_${mergedId}`;
|
|
|
}
|
|
|
const isIllegalName = formItemNameBlackList.includes(mergedId);
|
|
|
return isIllegalName ? `${defaultItemNamePrefixCls}_${mergedId}` : mergedId;
|
|
|
}
|
|
|
/**
|
|
|
* Get merged status by meta or passed `validateStatus`.
|
|
|
*/
|
|
|
function getStatus(errors, warnings, meta, defaultValidateStatus, hasFeedback, validateStatus) {
|
|
|
let status = defaultValidateStatus;
|
|
|
if (validateStatus !== undefined) {
|
|
|
status = validateStatus;
|
|
|
} else if (meta.validating) {
|
|
|
status = 'validating';
|
|
|
} else if (errors.length) {
|
|
|
status = 'error';
|
|
|
} else if (warnings.length) {
|
|
|
status = 'warning';
|
|
|
} else if (meta.touched || hasFeedback && meta.validated) {
|
|
|
// success feedback should display when pass hasFeedback prop and current value is valid value
|
|
|
status = 'success';
|
|
|
}
|
|
|
return status;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/hooks/useForm.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function toNamePathStr(name) {
|
|
|
const namePath = toArray(name);
|
|
|
return namePath.join('_');
|
|
|
}
|
|
|
function useForm(form) {
|
|
|
const [rcForm] = (0,_rc_field_form_1_38_2_rc_field_form_es.useForm)();
|
|
|
const itemsRef = _react_17_0_2_react.useRef({});
|
|
|
const wrapForm = _react_17_0_2_react.useMemo(() => form !== null && form !== void 0 ? form : Object.assign(Object.assign({}, rcForm), {
|
|
|
__INTERNAL__: {
|
|
|
itemRef: name => node => {
|
|
|
const namePathStr = toNamePathStr(name);
|
|
|
if (node) {
|
|
|
itemsRef.current[namePathStr] = node;
|
|
|
} else {
|
|
|
delete itemsRef.current[namePathStr];
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
scrollToField: function (name) {
|
|
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
|
const namePath = toArray(name);
|
|
|
const fieldId = getFieldId(namePath, wrapForm.__INTERNAL__.name);
|
|
|
const node = fieldId ? document.getElementById(fieldId) : null;
|
|
|
if (node) {
|
|
|
(0,dist/* default */.Z)(node, Object.assign({
|
|
|
scrollMode: 'if-needed',
|
|
|
block: 'nearest'
|
|
|
}, options));
|
|
|
}
|
|
|
},
|
|
|
getFieldInstance: name => {
|
|
|
const namePathStr = toNamePathStr(name);
|
|
|
return itemsRef.current[namePathStr];
|
|
|
}
|
|
|
}), [form, rcForm]);
|
|
|
return [wrapForm];
|
|
|
}
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/validateMessagesContext.js
|
|
|
var validateMessagesContext = __webpack_require__(28726);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/Form.js
|
|
|
"use client";
|
|
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const InternalForm = (props, ref) => {
|
|
|
const contextDisabled = _react_17_0_2_react.useContext(DisabledContext/* default */.Z);
|
|
|
const {
|
|
|
getPrefixCls,
|
|
|
direction,
|
|
|
form: contextForm
|
|
|
} = _react_17_0_2_react.useContext(config_provider_context/* ConfigContext */.E_);
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
className,
|
|
|
rootClassName,
|
|
|
size,
|
|
|
disabled = contextDisabled,
|
|
|
form,
|
|
|
colon,
|
|
|
labelAlign,
|
|
|
labelWrap,
|
|
|
labelCol,
|
|
|
wrapperCol,
|
|
|
hideRequiredMark,
|
|
|
layout = 'horizontal',
|
|
|
scrollToFirstError,
|
|
|
requiredMark,
|
|
|
onFinishFailed,
|
|
|
name,
|
|
|
style,
|
|
|
feedbackIcons
|
|
|
} = props,
|
|
|
restFormProps = __rest(props, ["prefixCls", "className", "rootClassName", "size", "disabled", "form", "colon", "labelAlign", "labelWrap", "labelCol", "wrapperCol", "hideRequiredMark", "layout", "scrollToFirstError", "requiredMark", "onFinishFailed", "name", "style", "feedbackIcons"]);
|
|
|
const mergedSize = (0,useSize/* default */.Z)(size);
|
|
|
const contextValidateMessages = _react_17_0_2_react.useContext(validateMessagesContext/* default */.Z);
|
|
|
if (false) {}
|
|
|
const mergedRequiredMark = (0,_react_17_0_2_react.useMemo)(() => {
|
|
|
if (requiredMark !== undefined) {
|
|
|
return requiredMark;
|
|
|
}
|
|
|
if (contextForm && contextForm.requiredMark !== undefined) {
|
|
|
return contextForm.requiredMark;
|
|
|
}
|
|
|
if (hideRequiredMark) {
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
|
}, [hideRequiredMark, requiredMark, contextForm]);
|
|
|
const mergedColon = colon !== null && colon !== void 0 ? colon : contextForm === null || contextForm === void 0 ? void 0 : contextForm.colon;
|
|
|
const prefixCls = getPrefixCls('form', customizePrefixCls);
|
|
|
// Style
|
|
|
const [wrapSSR, hashId] = form_style(prefixCls);
|
|
|
const formClassName = _classnames_2_5_1_classnames_default()(prefixCls, `${prefixCls}-${layout}`, {
|
|
|
[`${prefixCls}-hide-required-mark`]: mergedRequiredMark === false,
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
|
[`${prefixCls}-${mergedSize}`]: mergedSize
|
|
|
}, hashId, contextForm === null || contextForm === void 0 ? void 0 : contextForm.className, className, rootClassName);
|
|
|
const [wrapForm] = useForm(form);
|
|
|
const {
|
|
|
__INTERNAL__
|
|
|
} = wrapForm;
|
|
|
__INTERNAL__.name = name;
|
|
|
const formContextValue = (0,_react_17_0_2_react.useMemo)(() => ({
|
|
|
name,
|
|
|
labelAlign,
|
|
|
labelCol,
|
|
|
labelWrap,
|
|
|
wrapperCol,
|
|
|
vertical: layout === 'vertical',
|
|
|
colon: mergedColon,
|
|
|
requiredMark: mergedRequiredMark,
|
|
|
itemRef: __INTERNAL__.itemRef,
|
|
|
form: wrapForm,
|
|
|
feedbackIcons
|
|
|
}), [name, labelAlign, labelCol, wrapperCol, layout, mergedColon, mergedRequiredMark, wrapForm, feedbackIcons]);
|
|
|
_react_17_0_2_react.useImperativeHandle(ref, () => wrapForm);
|
|
|
const scrollToField = (options, fieldName) => {
|
|
|
if (options) {
|
|
|
let defaultScrollToFirstError = {
|
|
|
block: 'nearest'
|
|
|
};
|
|
|
if (typeof options === 'object') {
|
|
|
defaultScrollToFirstError = options;
|
|
|
}
|
|
|
wrapForm.scrollToField(fieldName, defaultScrollToFirstError);
|
|
|
}
|
|
|
};
|
|
|
const onInternalFinishFailed = errorInfo => {
|
|
|
onFinishFailed === null || onFinishFailed === void 0 ? void 0 : onFinishFailed(errorInfo);
|
|
|
if (errorInfo.errorFields.length) {
|
|
|
const fieldName = errorInfo.errorFields[0].name;
|
|
|
if (scrollToFirstError !== undefined) {
|
|
|
scrollToField(scrollToFirstError, fieldName);
|
|
|
return;
|
|
|
}
|
|
|
if (contextForm && contextForm.scrollToFirstError !== undefined) {
|
|
|
scrollToField(contextForm.scrollToFirstError, fieldName);
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(DisabledContext/* DisabledContextProvider */.n, {
|
|
|
disabled: disabled
|
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement(SizeContext/* SizeContextProvider */.q, {
|
|
|
size: mergedSize
|
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement(context/* FormProvider */.RV, Object.assign({}, {
|
|
|
// This is not list in API, we pass with spread
|
|
|
validateMessages: contextValidateMessages
|
|
|
}), /*#__PURE__*/_react_17_0_2_react.createElement(context/* FormContext */.q3.Provider, {
|
|
|
value: formContextValue
|
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement(_rc_field_form_1_38_2_rc_field_form_es["default"], Object.assign({
|
|
|
id: name
|
|
|
}, restFormProps, {
|
|
|
name: name,
|
|
|
onFinishFailed: onInternalFinishFailed,
|
|
|
form: wrapForm,
|
|
|
style: Object.assign(Object.assign({}, contextForm === null || contextForm === void 0 ? void 0 : contextForm.style), style),
|
|
|
className: formClassName
|
|
|
})))))));
|
|
|
};
|
|
|
const Form = /*#__PURE__*/_react_17_0_2_react.forwardRef(InternalForm);
|
|
|
if (false) {}
|
|
|
|
|
|
/* harmony default export */ var form_Form = (Form);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/hooks/useState.js
|
|
|
var useState = __webpack_require__(37423);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/ref.js
|
|
|
var ref = __webpack_require__(17763);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
|
|
|
var reactNode = __webpack_require__(92343);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/Children/toArray.js
|
|
|
var Children_toArray = __webpack_require__(6415);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/hooks/useChildren.js
|
|
|
|
|
|
function useChildren(children) {
|
|
|
if (typeof children === 'function') {
|
|
|
return children;
|
|
|
}
|
|
|
const childList = (0,Children_toArray/* default */.Z)(children);
|
|
|
return childList.length <= 1 ? childList[0] : childList;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/hooks/useFormItemStatus.js
|
|
|
|
|
|
|
|
|
|
|
|
const useFormItemStatus = () => {
|
|
|
const {
|
|
|
status,
|
|
|
errors = [],
|
|
|
warnings = []
|
|
|
} = (0,_react_17_0_2_react.useContext)(context/* FormItemInputContext */.aM);
|
|
|
false ? 0 : void 0;
|
|
|
return {
|
|
|
status,
|
|
|
errors,
|
|
|
warnings
|
|
|
};
|
|
|
};
|
|
|
// Only used for compatible package. Not promise this will work on future version.
|
|
|
useFormItemStatus.Context = context/* FormItemInputContext */.aM;
|
|
|
/* harmony default export */ var hooks_useFormItemStatus = (useFormItemStatus);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/raf.js
|
|
|
var raf = __webpack_require__(74570);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/hooks/useFrameState.js
|
|
|
|
|
|
|
|
|
|
|
|
function useFrameState(defaultValue) {
|
|
|
const [value, setValue] = _react_17_0_2_react.useState(defaultValue);
|
|
|
const frameRef = (0,_react_17_0_2_react.useRef)(null);
|
|
|
const batchRef = (0,_react_17_0_2_react.useRef)([]);
|
|
|
const destroyRef = (0,_react_17_0_2_react.useRef)(false);
|
|
|
_react_17_0_2_react.useEffect(() => {
|
|
|
destroyRef.current = false;
|
|
|
return () => {
|
|
|
destroyRef.current = true;
|
|
|
raf/* default */.Z.cancel(frameRef.current);
|
|
|
frameRef.current = null;
|
|
|
};
|
|
|
}, []);
|
|
|
function setFrameValue(updater) {
|
|
|
if (destroyRef.current) {
|
|
|
return;
|
|
|
}
|
|
|
if (frameRef.current === null) {
|
|
|
batchRef.current = [];
|
|
|
frameRef.current = (0,raf/* default */.Z)(() => {
|
|
|
frameRef.current = null;
|
|
|
setValue(prevValue => {
|
|
|
let current = prevValue;
|
|
|
batchRef.current.forEach(func => {
|
|
|
current = func(current);
|
|
|
});
|
|
|
return current;
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
batchRef.current.push(updater);
|
|
|
}
|
|
|
return [value, setFrameValue];
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/hooks/useItemRef.js
|
|
|
|
|
|
|
|
|
|
|
|
function useItemRef() {
|
|
|
const {
|
|
|
itemRef
|
|
|
} = _react_17_0_2_react.useContext(context/* FormContext */.q3);
|
|
|
const cacheRef = _react_17_0_2_react.useRef({});
|
|
|
function getRef(name, children) {
|
|
|
const childrenRef = children && typeof children === 'object' && children.ref;
|
|
|
const nameStr = name.join('_');
|
|
|
if (cacheRef.current.name !== nameStr || cacheRef.current.originRef !== childrenRef) {
|
|
|
cacheRef.current.name = nameStr;
|
|
|
cacheRef.current.originRef = childrenRef;
|
|
|
cacheRef.current.ref = (0,ref/* composeRef */.sQ)(itemRef(name), childrenRef);
|
|
|
}
|
|
|
return cacheRef.current.ref;
|
|
|
}
|
|
|
return getRef;
|
|
|
}
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/Dom/isVisible.js
|
|
|
var isVisible = __webpack_require__(66209);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/hooks/useLayoutEffect.js
|
|
|
var useLayoutEffect = __webpack_require__(64693);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/omit.js
|
|
|
var omit = __webpack_require__(41123);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/grid/row.js
|
|
|
var row = __webpack_require__(27382);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/grid/col.js
|
|
|
var col = __webpack_require__(37028);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/style/fallbackCmp.js
|
|
|
/**
|
|
|
* Fallback of IE.
|
|
|
* Safe to remove.
|
|
|
*/
|
|
|
// Style as inline component
|
|
|
|
|
|
|
|
|
// ============================= Fallback =============================
|
|
|
const genFallbackStyle = token => {
|
|
|
const {
|
|
|
formItemCls
|
|
|
} = token;
|
|
|
return {
|
|
|
'@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)': {
|
|
|
// Fallback for IE, safe to remove we not support it anymore
|
|
|
[`${formItemCls}-control`]: {
|
|
|
display: 'flex'
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
// ============================== Export ==============================
|
|
|
/* harmony default export */ var fallbackCmp = ((0,genComponentStyleHook/* genSubStyleComponent */.b)(['Form', 'item-item'], (token, _ref) => {
|
|
|
let {
|
|
|
rootPrefixCls
|
|
|
} = _ref;
|
|
|
const formToken = prepareToken(token, rootPrefixCls);
|
|
|
return [genFallbackStyle(formToken)];
|
|
|
}));
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/FormItemInput.js
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const FormItemInput = props => {
|
|
|
const {
|
|
|
prefixCls,
|
|
|
status,
|
|
|
wrapperCol,
|
|
|
children,
|
|
|
errors,
|
|
|
warnings,
|
|
|
_internalItemRender: formItemRender,
|
|
|
extra,
|
|
|
help,
|
|
|
fieldId,
|
|
|
marginBottom,
|
|
|
onErrorVisibleChanged
|
|
|
} = props;
|
|
|
const baseClassName = `${prefixCls}-item`;
|
|
|
const formContext = _react_17_0_2_react.useContext(context/* FormContext */.q3);
|
|
|
const mergedWrapperCol = wrapperCol || formContext.wrapperCol || {};
|
|
|
const className = _classnames_2_5_1_classnames_default()(`${baseClassName}-control`, mergedWrapperCol.className);
|
|
|
// Pass to sub FormItem should not with col info
|
|
|
const subFormContext = _react_17_0_2_react.useMemo(() => Object.assign({}, formContext), [formContext]);
|
|
|
delete subFormContext.labelCol;
|
|
|
delete subFormContext.wrapperCol;
|
|
|
const inputDom = /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
|
className: `${baseClassName}-control-input`
|
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
|
className: `${baseClassName}-control-input-content`
|
|
|
}, children));
|
|
|
const formItemContext = _react_17_0_2_react.useMemo(() => ({
|
|
|
prefixCls,
|
|
|
status
|
|
|
}), [prefixCls, status]);
|
|
|
const errorListDom = marginBottom !== null || errors.length || warnings.length ? /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
|
style: {
|
|
|
display: 'flex',
|
|
|
flexWrap: 'nowrap'
|
|
|
}
|
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement(context/* FormItemPrefixContext */.Rk.Provider, {
|
|
|
value: formItemContext
|
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement(form_ErrorList, {
|
|
|
fieldId: fieldId,
|
|
|
errors: errors,
|
|
|
warnings: warnings,
|
|
|
help: help,
|
|
|
helpStatus: status,
|
|
|
className: `${baseClassName}-explain-connected`,
|
|
|
onVisibleChanged: onErrorVisibleChanged
|
|
|
})), !!marginBottom && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
|
style: {
|
|
|
width: 0,
|
|
|
height: marginBottom
|
|
|
}
|
|
|
})) : null;
|
|
|
const extraProps = {};
|
|
|
if (fieldId) {
|
|
|
extraProps.id = `${fieldId}_extra`;
|
|
|
}
|
|
|
// If extra = 0, && will goes wrong
|
|
|
// 0&&error -> 0
|
|
|
const extraDom = extra ? /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({}, extraProps, {
|
|
|
className: `${baseClassName}-extra`
|
|
|
}), extra) : null;
|
|
|
const dom = formItemRender && formItemRender.mark === 'pro_table_render' && formItemRender.render ? formItemRender.render(props, {
|
|
|
input: inputDom,
|
|
|
errorList: errorListDom,
|
|
|
extra: extraDom
|
|
|
}) : /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, inputDom, errorListDom, extraDom);
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(context/* FormContext */.q3.Provider, {
|
|
|
value: subFormContext
|
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement(col/* default */.Z, Object.assign({}, mergedWrapperCol, {
|
|
|
className: className
|
|
|
}), dom), /*#__PURE__*/_react_17_0_2_react.createElement(fallbackCmp, {
|
|
|
prefixCls: prefixCls
|
|
|
}));
|
|
|
};
|
|
|
/* harmony default export */ var form_FormItemInput = (FormItemInput);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/icons/QuestionCircleOutlined.js + 1 modules
|
|
|
var QuestionCircleOutlined = __webpack_require__(73376);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/locale/en_US.js + 1 modules
|
|
|
var en_US = __webpack_require__(31724);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/locale/useLocale.js
|
|
|
var useLocale = __webpack_require__(9763);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
|
var es_tooltip = __webpack_require__(6848);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/FormItemLabel.js
|
|
|
"use client";
|
|
|
|
|
|
var FormItemLabel_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function toTooltipProps(tooltip) {
|
|
|
if (!tooltip) {
|
|
|
return null;
|
|
|
}
|
|
|
if (typeof tooltip === 'object' && ! /*#__PURE__*/_react_17_0_2_react.isValidElement(tooltip)) {
|
|
|
return tooltip;
|
|
|
}
|
|
|
return {
|
|
|
title: tooltip
|
|
|
};
|
|
|
}
|
|
|
const FormItemLabel = _ref => {
|
|
|
let {
|
|
|
prefixCls,
|
|
|
label,
|
|
|
htmlFor,
|
|
|
labelCol,
|
|
|
labelAlign,
|
|
|
colon,
|
|
|
required,
|
|
|
requiredMark,
|
|
|
tooltip
|
|
|
} = _ref;
|
|
|
var _a;
|
|
|
const [formLocale] = (0,useLocale/* default */.Z)('Form');
|
|
|
const {
|
|
|
vertical,
|
|
|
labelAlign: contextLabelAlign,
|
|
|
labelCol: contextLabelCol,
|
|
|
labelWrap,
|
|
|
colon: contextColon
|
|
|
} = _react_17_0_2_react.useContext(context/* FormContext */.q3);
|
|
|
if (!label) {
|
|
|
return null;
|
|
|
}
|
|
|
const mergedLabelCol = labelCol || contextLabelCol || {};
|
|
|
const mergedLabelAlign = labelAlign || contextLabelAlign;
|
|
|
const labelClsBasic = `${prefixCls}-item-label`;
|
|
|
const labelColClassName = _classnames_2_5_1_classnames_default()(labelClsBasic, mergedLabelAlign === 'left' && `${labelClsBasic}-left`, mergedLabelCol.className, {
|
|
|
[`${labelClsBasic}-wrap`]: !!labelWrap
|
|
|
});
|
|
|
let labelChildren = label;
|
|
|
// Keep label is original where there should have no colon
|
|
|
const computedColon = colon === true || contextColon !== false && colon !== false;
|
|
|
const haveColon = computedColon && !vertical;
|
|
|
// Remove duplicated user input colon
|
|
|
if (haveColon && typeof label === 'string' && label.trim() !== '') {
|
|
|
labelChildren = label.replace(/[:|:]\s*$/, '');
|
|
|
}
|
|
|
// Tooltip
|
|
|
const tooltipProps = toTooltipProps(tooltip);
|
|
|
if (tooltipProps) {
|
|
|
const {
|
|
|
icon = /*#__PURE__*/_react_17_0_2_react.createElement(QuestionCircleOutlined/* default */.Z, null)
|
|
|
} = tooltipProps,
|
|
|
restTooltipProps = FormItemLabel_rest(tooltipProps, ["icon"]);
|
|
|
const tooltipNode = /*#__PURE__*/_react_17_0_2_react.createElement(es_tooltip/* default */.Z, Object.assign({}, restTooltipProps), /*#__PURE__*/_react_17_0_2_react.cloneElement(icon, {
|
|
|
className: `${prefixCls}-item-tooltip`,
|
|
|
title: ''
|
|
|
}));
|
|
|
labelChildren = /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, labelChildren, tooltipNode);
|
|
|
}
|
|
|
// Required Mark
|
|
|
const isOptionalMark = requiredMark === 'optional';
|
|
|
const isRenderMark = typeof requiredMark === 'function';
|
|
|
if (isRenderMark) {
|
|
|
labelChildren = requiredMark(labelChildren, {
|
|
|
required: !!required
|
|
|
});
|
|
|
} else if (isOptionalMark && !required) {
|
|
|
labelChildren = /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, labelChildren, /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
|
className: `${prefixCls}-item-optional`,
|
|
|
title: ""
|
|
|
}, (formLocale === null || formLocale === void 0 ? void 0 : formLocale.optional) || ((_a = en_US/* default */.Z.Form) === null || _a === void 0 ? void 0 : _a.optional)));
|
|
|
}
|
|
|
const labelClassName = _classnames_2_5_1_classnames_default()({
|
|
|
[`${prefixCls}-item-required`]: required,
|
|
|
[`${prefixCls}-item-required-mark-optional`]: isOptionalMark || isRenderMark,
|
|
|
[`${prefixCls}-item-no-colon`]: !computedColon
|
|
|
});
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(col/* default */.Z, Object.assign({}, mergedLabelCol, {
|
|
|
className: labelColClassName
|
|
|
}), /*#__PURE__*/_react_17_0_2_react.createElement("label", {
|
|
|
htmlFor: htmlFor,
|
|
|
className: labelClassName,
|
|
|
title: typeof label === 'string' ? label : ''
|
|
|
}, labelChildren));
|
|
|
};
|
|
|
/* harmony default export */ var form_FormItemLabel = (FormItemLabel);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/icons/CheckCircleFilled.js + 1 modules
|
|
|
var CheckCircleFilled = __webpack_require__(50555);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/icons/CloseCircleFilled.js + 1 modules
|
|
|
var CloseCircleFilled = __webpack_require__(43418);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/icons/ExclamationCircleFilled.js + 1 modules
|
|
|
var ExclamationCircleFilled = __webpack_require__(81664);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/icons/LoadingOutlined.js + 1 modules
|
|
|
var LoadingOutlined = __webpack_require__(20555);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/FormItem/StatusProvider.js
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const iconMap = {
|
|
|
success: CheckCircleFilled/* default */.Z,
|
|
|
warning: ExclamationCircleFilled/* default */.Z,
|
|
|
error: CloseCircleFilled/* default */.Z,
|
|
|
validating: LoadingOutlined/* default */.Z
|
|
|
};
|
|
|
function StatusProvider(_ref) {
|
|
|
let {
|
|
|
children,
|
|
|
errors,
|
|
|
warnings,
|
|
|
hasFeedback,
|
|
|
validateStatus,
|
|
|
prefixCls,
|
|
|
meta,
|
|
|
noStyle
|
|
|
} = _ref;
|
|
|
const itemPrefixCls = `${prefixCls}-item`;
|
|
|
const {
|
|
|
feedbackIcons
|
|
|
} = _react_17_0_2_react.useContext(context/* FormContext */.q3);
|
|
|
const mergedValidateStatus = getStatus(errors, warnings, meta, null, !!hasFeedback, validateStatus);
|
|
|
const {
|
|
|
isFormItemInput: parentIsFormItemInput,
|
|
|
status: parentStatus
|
|
|
} = _react_17_0_2_react.useContext(context/* FormItemInputContext */.aM);
|
|
|
// ====================== Context =======================
|
|
|
const formItemStatusContext = _react_17_0_2_react.useMemo(() => {
|
|
|
var _a;
|
|
|
let feedbackIcon;
|
|
|
if (hasFeedback) {
|
|
|
const customIcons = hasFeedback !== true && hasFeedback.icons || feedbackIcons;
|
|
|
const customIconNode = mergedValidateStatus && ((_a = customIcons === null || customIcons === void 0 ? void 0 : customIcons({
|
|
|
status: mergedValidateStatus,
|
|
|
errors,
|
|
|
warnings
|
|
|
})) === null || _a === void 0 ? void 0 : _a[mergedValidateStatus]);
|
|
|
const IconNode = mergedValidateStatus && iconMap[mergedValidateStatus];
|
|
|
feedbackIcon = customIconNode !== false && IconNode ? /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
|
className: _classnames_2_5_1_classnames_default()(`${itemPrefixCls}-feedback-icon`, `${itemPrefixCls}-feedback-icon-${mergedValidateStatus}`)
|
|
|
}, customIconNode || /*#__PURE__*/_react_17_0_2_react.createElement(IconNode, null)) : null;
|
|
|
}
|
|
|
let isFormItemInput = true;
|
|
|
let status = mergedValidateStatus || '';
|
|
|
// No style will follow parent context
|
|
|
if (noStyle) {
|
|
|
isFormItemInput = parentIsFormItemInput;
|
|
|
status = (mergedValidateStatus !== null && mergedValidateStatus !== void 0 ? mergedValidateStatus : parentStatus) || '';
|
|
|
}
|
|
|
return {
|
|
|
status,
|
|
|
errors,
|
|
|
warnings,
|
|
|
hasFeedback: !!hasFeedback,
|
|
|
feedbackIcon,
|
|
|
isFormItemInput
|
|
|
};
|
|
|
}, [mergedValidateStatus, hasFeedback, noStyle, parentIsFormItemInput, parentStatus]);
|
|
|
// ======================= Render =======================
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(context/* FormItemInputContext */.aM.Provider, {
|
|
|
value: formItemStatusContext
|
|
|
}, children);
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/FormItem/ItemHolder.js
|
|
|
"use client";
|
|
|
|
|
|
var ItemHolder_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function ItemHolder(props) {
|
|
|
const {
|
|
|
prefixCls,
|
|
|
className,
|
|
|
rootClassName,
|
|
|
style,
|
|
|
help,
|
|
|
errors,
|
|
|
warnings,
|
|
|
validateStatus,
|
|
|
meta,
|
|
|
hasFeedback,
|
|
|
hidden,
|
|
|
children,
|
|
|
fieldId,
|
|
|
required,
|
|
|
isRequired,
|
|
|
onSubItemMetaChange
|
|
|
} = props,
|
|
|
restProps = ItemHolder_rest(props, ["prefixCls", "className", "rootClassName", "style", "help", "errors", "warnings", "validateStatus", "meta", "hasFeedback", "hidden", "children", "fieldId", "required", "isRequired", "onSubItemMetaChange"]);
|
|
|
const itemPrefixCls = `${prefixCls}-item`;
|
|
|
const {
|
|
|
requiredMark
|
|
|
} = _react_17_0_2_react.useContext(context/* FormContext */.q3);
|
|
|
// ======================== Margin ========================
|
|
|
const itemRef = _react_17_0_2_react.useRef(null);
|
|
|
const debounceErrors = useDebounce(errors);
|
|
|
const debounceWarnings = useDebounce(warnings);
|
|
|
const hasHelp = help !== undefined && help !== null;
|
|
|
const hasError = !!(hasHelp || errors.length || warnings.length);
|
|
|
const isOnScreen = !!itemRef.current && (0,isVisible/* default */.Z)(itemRef.current);
|
|
|
const [marginBottom, setMarginBottom] = _react_17_0_2_react.useState(null);
|
|
|
(0,useLayoutEffect/* default */.Z)(() => {
|
|
|
if (hasError && itemRef.current) {
|
|
|
// The element must be part of the DOMTree to use getComputedStyle
|
|
|
// https://stackoverflow.com/questions/35360711/getcomputedstyle-returns-a-cssstyledeclaration-but-all-properties-are-empty-on-a
|
|
|
const itemStyle = getComputedStyle(itemRef.current);
|
|
|
setMarginBottom(parseInt(itemStyle.marginBottom, 10));
|
|
|
}
|
|
|
}, [hasError, isOnScreen]);
|
|
|
const onErrorVisibleChanged = nextVisible => {
|
|
|
if (!nextVisible) {
|
|
|
setMarginBottom(null);
|
|
|
}
|
|
|
};
|
|
|
// ======================== Status ========================
|
|
|
const getValidateState = function () {
|
|
|
let isDebounce = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
|
const _errors = isDebounce ? debounceErrors : meta.errors;
|
|
|
const _warnings = isDebounce ? debounceWarnings : meta.warnings;
|
|
|
return getStatus(_errors, _warnings, meta, '', !!hasFeedback, validateStatus);
|
|
|
};
|
|
|
const mergedValidateStatus = getValidateState();
|
|
|
// ======================== Render ========================
|
|
|
const itemClassName = _classnames_2_5_1_classnames_default()(itemPrefixCls, className, rootClassName, {
|
|
|
[`${itemPrefixCls}-with-help`]: hasHelp || debounceErrors.length || debounceWarnings.length,
|
|
|
// Status
|
|
|
[`${itemPrefixCls}-has-feedback`]: mergedValidateStatus && hasFeedback,
|
|
|
[`${itemPrefixCls}-has-success`]: mergedValidateStatus === 'success',
|
|
|
[`${itemPrefixCls}-has-warning`]: mergedValidateStatus === 'warning',
|
|
|
[`${itemPrefixCls}-has-error`]: mergedValidateStatus === 'error',
|
|
|
[`${itemPrefixCls}-is-validating`]: mergedValidateStatus === 'validating',
|
|
|
[`${itemPrefixCls}-hidden`]: hidden
|
|
|
});
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
|
className: itemClassName,
|
|
|
style: style,
|
|
|
ref: itemRef
|
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement(row/* default */.Z, Object.assign({
|
|
|
className: `${itemPrefixCls}-row`
|
|
|
}, (0,omit/* default */.Z)(restProps, ['_internalItemRender', 'colon', 'dependencies', 'extra', 'fieldKey', 'getValueFromEvent', 'getValueProps', 'htmlFor', 'id', 'initialValue', 'isListField', 'label', 'labelAlign', 'labelCol', 'labelWrap', 'messageVariables', 'name', 'normalize', 'noStyle', 'preserve', 'requiredMark', 'rules', 'shouldUpdate', 'trigger', 'tooltip', 'validateFirst', 'validateTrigger', 'valuePropName', 'wrapperCol', 'validateDebounce'])), /*#__PURE__*/_react_17_0_2_react.createElement(form_FormItemLabel, Object.assign({
|
|
|
htmlFor: fieldId
|
|
|
}, props, {
|
|
|
requiredMark: requiredMark,
|
|
|
required: required !== null && required !== void 0 ? required : isRequired,
|
|
|
prefixCls: prefixCls
|
|
|
})), /*#__PURE__*/_react_17_0_2_react.createElement(form_FormItemInput, Object.assign({}, props, meta, {
|
|
|
errors: debounceErrors,
|
|
|
warnings: debounceWarnings,
|
|
|
prefixCls: prefixCls,
|
|
|
status: mergedValidateStatus,
|
|
|
help: help,
|
|
|
marginBottom: marginBottom,
|
|
|
onErrorVisibleChanged: onErrorVisibleChanged
|
|
|
}), /*#__PURE__*/_react_17_0_2_react.createElement(context/* NoStyleItemContext */.qI.Provider, {
|
|
|
value: onSubItemMetaChange
|
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement(StatusProvider, {
|
|
|
prefixCls: prefixCls,
|
|
|
meta: meta,
|
|
|
errors: meta.errors,
|
|
|
warnings: meta.warnings,
|
|
|
hasFeedback: hasFeedback,
|
|
|
// Already calculated
|
|
|
validateStatus: mergedValidateStatus
|
|
|
}, children)))), !!marginBottom && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
|
className: `${itemPrefixCls}-margin-offset`,
|
|
|
style: {
|
|
|
marginBottom: -marginBottom
|
|
|
}
|
|
|
}));
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/FormItem/index.js
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const NAME_SPLIT = '__SPLIT__';
|
|
|
const ValidateStatuses = (/* unused pure expression or super */ null && (['success', 'warning', 'error', 'validating', '']));
|
|
|
const MemoInput = /*#__PURE__*/_react_17_0_2_react.memo(_ref => {
|
|
|
let {
|
|
|
children
|
|
|
} = _ref;
|
|
|
return children;
|
|
|
}, (prev, next) => prev.value === next.value && prev.update === next.update && prev.childProps.length === next.childProps.length && prev.childProps.every((value, index) => value === next.childProps[index]));
|
|
|
function hasValidName(name) {
|
|
|
if (name === null) {
|
|
|
false ? 0 : void 0;
|
|
|
}
|
|
|
return !(name === undefined || name === null);
|
|
|
}
|
|
|
function genEmptyMeta() {
|
|
|
return {
|
|
|
errors: [],
|
|
|
warnings: [],
|
|
|
touched: false,
|
|
|
validating: false,
|
|
|
name: [],
|
|
|
validated: false
|
|
|
};
|
|
|
}
|
|
|
function InternalFormItem(props) {
|
|
|
const {
|
|
|
name,
|
|
|
noStyle,
|
|
|
className,
|
|
|
dependencies,
|
|
|
prefixCls: customizePrefixCls,
|
|
|
shouldUpdate,
|
|
|
rules,
|
|
|
children,
|
|
|
required,
|
|
|
label,
|
|
|
messageVariables,
|
|
|
trigger = 'onChange',
|
|
|
validateTrigger,
|
|
|
hidden,
|
|
|
help
|
|
|
} = props;
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = _react_17_0_2_react.useContext(config_provider_context/* ConfigContext */.E_);
|
|
|
const {
|
|
|
name: formName
|
|
|
} = _react_17_0_2_react.useContext(context/* FormContext */.q3);
|
|
|
const mergedChildren = useChildren(children);
|
|
|
const isRenderProps = typeof mergedChildren === 'function';
|
|
|
const notifyParentMetaChange = _react_17_0_2_react.useContext(context/* NoStyleItemContext */.qI);
|
|
|
const {
|
|
|
validateTrigger: contextValidateTrigger
|
|
|
} = _react_17_0_2_react.useContext(_rc_field_form_1_38_2_rc_field_form_es.FieldContext);
|
|
|
const mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : contextValidateTrigger;
|
|
|
const hasName = hasValidName(name);
|
|
|
const prefixCls = getPrefixCls('form', customizePrefixCls);
|
|
|
// Style
|
|
|
const [wrapSSR, hashId] = form_style(prefixCls);
|
|
|
// ========================= MISC =========================
|
|
|
// Get `noStyle` required info
|
|
|
const listContext = _react_17_0_2_react.useContext(_rc_field_form_1_38_2_rc_field_form_es.ListContext);
|
|
|
const fieldKeyPathRef = _react_17_0_2_react.useRef();
|
|
|
// ======================== Errors ========================
|
|
|
// >>>>> Collect sub field errors
|
|
|
const [subFieldErrors, setSubFieldErrors] = useFrameState({});
|
|
|
// >>>>> Current field errors
|
|
|
const [meta, setMeta] = (0,useState/* default */.Z)(() => genEmptyMeta());
|
|
|
const onMetaChange = nextMeta => {
|
|
|
// This keyInfo is not correct when field is removed
|
|
|
// Since origin keyManager no longer keep the origin key anymore
|
|
|
// Which means we need cache origin one and reuse when removed
|
|
|
const keyInfo = listContext === null || listContext === void 0 ? void 0 : listContext.getKey(nextMeta.name);
|
|
|
// Destroy will reset all the meta
|
|
|
setMeta(nextMeta.destroy ? genEmptyMeta() : nextMeta, true);
|
|
|
// Bump to parent since noStyle
|
|
|
if (noStyle && help !== false && notifyParentMetaChange) {
|
|
|
let namePath = nextMeta.name;
|
|
|
if (!nextMeta.destroy) {
|
|
|
if (keyInfo !== undefined) {
|
|
|
const [fieldKey, restPath] = keyInfo;
|
|
|
namePath = [fieldKey].concat((0,toConsumableArray/* default */.Z)(restPath));
|
|
|
fieldKeyPathRef.current = namePath;
|
|
|
}
|
|
|
} else {
|
|
|
// Use origin cache data
|
|
|
namePath = fieldKeyPathRef.current || namePath;
|
|
|
}
|
|
|
notifyParentMetaChange(nextMeta, namePath);
|
|
|
}
|
|
|
};
|
|
|
// >>>>> Collect noStyle Field error to the top FormItem
|
|
|
const onSubItemMetaChange = (subMeta, uniqueKeys) => {
|
|
|
// Only `noStyle` sub item will trigger
|
|
|
setSubFieldErrors(prevSubFieldErrors => {
|
|
|
const clone = Object.assign({}, prevSubFieldErrors);
|
|
|
// name: ['user', 1] + key: [4] = ['user', 4]
|
|
|
const mergedNamePath = [].concat((0,toConsumableArray/* default */.Z)(subMeta.name.slice(0, -1)), (0,toConsumableArray/* default */.Z)(uniqueKeys));
|
|
|
const mergedNameKey = mergedNamePath.join(NAME_SPLIT);
|
|
|
if (subMeta.destroy) {
|
|
|
// Remove
|
|
|
delete clone[mergedNameKey];
|
|
|
} else {
|
|
|
// Update
|
|
|
clone[mergedNameKey] = subMeta;
|
|
|
}
|
|
|
return clone;
|
|
|
});
|
|
|
};
|
|
|
// >>>>> Get merged errors
|
|
|
const [mergedErrors, mergedWarnings] = _react_17_0_2_react.useMemo(() => {
|
|
|
const errorList = (0,toConsumableArray/* default */.Z)(meta.errors);
|
|
|
const warningList = (0,toConsumableArray/* default */.Z)(meta.warnings);
|
|
|
Object.values(subFieldErrors).forEach(subFieldError => {
|
|
|
errorList.push.apply(errorList, (0,toConsumableArray/* default */.Z)(subFieldError.errors || []));
|
|
|
warningList.push.apply(warningList, (0,toConsumableArray/* default */.Z)(subFieldError.warnings || []));
|
|
|
});
|
|
|
return [errorList, warningList];
|
|
|
}, [subFieldErrors, meta.errors, meta.warnings]);
|
|
|
// ===================== Children Ref =====================
|
|
|
const getItemRef = useItemRef();
|
|
|
// ======================== Render ========================
|
|
|
function renderLayout(baseChildren, fieldId, isRequired) {
|
|
|
if (noStyle && !hidden) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(StatusProvider, {
|
|
|
prefixCls: prefixCls,
|
|
|
hasFeedback: props.hasFeedback,
|
|
|
validateStatus: props.validateStatus,
|
|
|
meta: meta,
|
|
|
errors: mergedErrors,
|
|
|
warnings: mergedWarnings,
|
|
|
noStyle: true
|
|
|
}, baseChildren);
|
|
|
}
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(ItemHolder, Object.assign({
|
|
|
key: "row"
|
|
|
}, props, {
|
|
|
className: _classnames_2_5_1_classnames_default()(className, hashId),
|
|
|
prefixCls: prefixCls,
|
|
|
fieldId: fieldId,
|
|
|
isRequired: isRequired,
|
|
|
errors: mergedErrors,
|
|
|
warnings: mergedWarnings,
|
|
|
meta: meta,
|
|
|
onSubItemMetaChange: onSubItemMetaChange
|
|
|
}), baseChildren);
|
|
|
}
|
|
|
if (!hasName && !isRenderProps && !dependencies) {
|
|
|
return wrapSSR(renderLayout(mergedChildren));
|
|
|
}
|
|
|
let variables = {};
|
|
|
if (typeof label === 'string') {
|
|
|
variables.label = label;
|
|
|
} else if (name) {
|
|
|
variables.label = String(name);
|
|
|
}
|
|
|
if (messageVariables) {
|
|
|
variables = Object.assign(Object.assign({}, variables), messageVariables);
|
|
|
}
|
|
|
// >>>>> With Field
|
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(_rc_field_form_1_38_2_rc_field_form_es.Field, Object.assign({}, props, {
|
|
|
messageVariables: variables,
|
|
|
trigger: trigger,
|
|
|
validateTrigger: mergedValidateTrigger,
|
|
|
onMetaChange: onMetaChange
|
|
|
}), (control, renderMeta, context) => {
|
|
|
const mergedName = toArray(name).length && renderMeta ? renderMeta.name : [];
|
|
|
const fieldId = getFieldId(mergedName, formName);
|
|
|
const isRequired = required !== undefined ? required : !!(rules && rules.some(rule => {
|
|
|
if (rule && typeof rule === 'object' && rule.required && !rule.warningOnly) {
|
|
|
return true;
|
|
|
}
|
|
|
if (typeof rule === 'function') {
|
|
|
const ruleEntity = rule(context);
|
|
|
return ruleEntity && ruleEntity.required && !ruleEntity.warningOnly;
|
|
|
}
|
|
|
return false;
|
|
|
}));
|
|
|
// ======================= Children =======================
|
|
|
const mergedControl = Object.assign({}, control);
|
|
|
let childNode = null;
|
|
|
false ? 0 : void 0;
|
|
|
if (Array.isArray(mergedChildren) && hasName) {
|
|
|
false ? 0 : void 0;
|
|
|
childNode = mergedChildren;
|
|
|
} else if (isRenderProps && (!(shouldUpdate || dependencies) || hasName)) {
|
|
|
false ? 0 : void 0;
|
|
|
false ? 0 : void 0;
|
|
|
} else if (dependencies && !isRenderProps && !hasName) {
|
|
|
false ? 0 : void 0;
|
|
|
} else if ((0,reactNode/* isValidElement */.l$)(mergedChildren)) {
|
|
|
false ? 0 : void 0;
|
|
|
const childProps = Object.assign(Object.assign({}, mergedChildren.props), mergedControl);
|
|
|
if (!childProps.id) {
|
|
|
childProps.id = fieldId;
|
|
|
}
|
|
|
if (help || mergedErrors.length > 0 || mergedWarnings.length > 0 || props.extra) {
|
|
|
const describedbyArr = [];
|
|
|
if (help || mergedErrors.length > 0) {
|
|
|
describedbyArr.push(`${fieldId}_help`);
|
|
|
}
|
|
|
if (props.extra) {
|
|
|
describedbyArr.push(`${fieldId}_extra`);
|
|
|
}
|
|
|
childProps['aria-describedby'] = describedbyArr.join(' ');
|
|
|
}
|
|
|
if (mergedErrors.length > 0) {
|
|
|
childProps['aria-invalid'] = 'true';
|
|
|
}
|
|
|
if (isRequired) {
|
|
|
childProps['aria-required'] = 'true';
|
|
|
}
|
|
|
if ((0,ref/* supportRef */.Yr)(mergedChildren)) {
|
|
|
childProps.ref = getItemRef(mergedName, mergedChildren);
|
|
|
}
|
|
|
// We should keep user origin event handler
|
|
|
const triggers = new Set([].concat((0,toConsumableArray/* default */.Z)(toArray(trigger)), (0,toConsumableArray/* default */.Z)(toArray(mergedValidateTrigger))));
|
|
|
triggers.forEach(eventName => {
|
|
|
childProps[eventName] = function () {
|
|
|
var _a2, _c2;
|
|
|
var _a, _b, _c;
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
|
args[_key] = arguments[_key];
|
|
|
}
|
|
|
(_a = mergedControl[eventName]) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [mergedControl].concat(args));
|
|
|
(_c = (_b = mergedChildren.props)[eventName]) === null || _c === void 0 ? void 0 : (_c2 = _c).call.apply(_c2, [_b].concat(args));
|
|
|
};
|
|
|
});
|
|
|
// List of props that need to be watched for changes -> if changes are detected in MemoInput -> rerender
|
|
|
const watchingChildProps = [childProps['aria-required'], childProps['aria-invalid'], childProps['aria-describedby']];
|
|
|
childNode = /*#__PURE__*/_react_17_0_2_react.createElement(MemoInput, {
|
|
|
value: mergedControl[props.valuePropName || 'value'],
|
|
|
update: mergedChildren,
|
|
|
childProps: watchingChildProps
|
|
|
}, (0,reactNode/* cloneElement */.Tm)(mergedChildren, childProps));
|
|
|
} else if (isRenderProps && (shouldUpdate || dependencies) && !hasName) {
|
|
|
childNode = mergedChildren(context);
|
|
|
} else {
|
|
|
false ? 0 : void 0;
|
|
|
childNode = mergedChildren;
|
|
|
}
|
|
|
return renderLayout(childNode, fieldId, isRequired);
|
|
|
}));
|
|
|
}
|
|
|
const FormItem = InternalFormItem;
|
|
|
FormItem.useStatus = hooks_useFormItemStatus;
|
|
|
/* harmony default export */ var form_FormItem = (FormItem);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/FormList.js
|
|
|
"use client";
|
|
|
|
|
|
var FormList_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const FormList = _a => {
|
|
|
var {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
children
|
|
|
} = _a,
|
|
|
props = FormList_rest(_a, ["prefixCls", "children"]);
|
|
|
false ? 0 : void 0;
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = _react_17_0_2_react.useContext(config_provider_context/* ConfigContext */.E_);
|
|
|
const prefixCls = getPrefixCls('form', customizePrefixCls);
|
|
|
const contextValue = _react_17_0_2_react.useMemo(() => ({
|
|
|
prefixCls,
|
|
|
status: 'error'
|
|
|
}), [prefixCls]);
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(_rc_field_form_1_38_2_rc_field_form_es.List, Object.assign({}, props), (fields, operation, meta) => /*#__PURE__*/_react_17_0_2_react.createElement(context/* FormItemPrefixContext */.Rk.Provider, {
|
|
|
value: contextValue
|
|
|
}, children(fields.map(field => Object.assign(Object.assign({}, field), {
|
|
|
fieldKey: field.key
|
|
|
})), operation, {
|
|
|
errors: meta.errors,
|
|
|
warnings: meta.warnings
|
|
|
})));
|
|
|
};
|
|
|
/* harmony default export */ var form_FormList = (FormList);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/hooks/useFormInstance.js
|
|
|
|
|
|
|
|
|
function useFormInstance() {
|
|
|
const {
|
|
|
form
|
|
|
} = (0,_react_17_0_2_react.useContext)(context/* FormContext */.q3);
|
|
|
return form;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const es_form_Form = form_Form;
|
|
|
es_form_Form.Item = form_FormItem;
|
|
|
es_form_Form.List = form_FormList;
|
|
|
es_form_Form.ErrorList = form_ErrorList;
|
|
|
es_form_Form.useForm = useForm;
|
|
|
es_form_Form.useFormInstance = useFormInstance;
|
|
|
es_form_Form.useWatch = _rc_field_form_1_38_2_rc_field_form_es.useWatch;
|
|
|
es_form_Form.Provider = context/* FormProvider */.RV;
|
|
|
es_form_Form.create = () => {
|
|
|
false ? 0 : void 0;
|
|
|
};
|
|
|
/* harmony default export */ var es_form = (es_form_Form);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 60231:
|
|
|
/*!*********************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules ***!
|
|
|
\*********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ input; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(36355);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/context.js
|
|
|
var form_context = __webpack_require__(32441);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/style/index.js
|
|
|
var style = __webpack_require__(9937);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Group.js
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Group = props => {
|
|
|
const {
|
|
|
getPrefixCls,
|
|
|
direction
|
|
|
} = (0,_react_17_0_2_react.useContext)(context/* ConfigContext */.E_);
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
className
|
|
|
} = props;
|
|
|
const prefixCls = getPrefixCls('input-group', customizePrefixCls);
|
|
|
const inputPrefixCls = getPrefixCls('input');
|
|
|
const [wrapSSR, hashId] = (0,style/* default */.ZP)(inputPrefixCls);
|
|
|
const cls = _classnames_2_5_1_classnames_default()(prefixCls, {
|
|
|
[`${prefixCls}-lg`]: props.size === 'large',
|
|
|
[`${prefixCls}-sm`]: props.size === 'small',
|
|
|
[`${prefixCls}-compact`]: props.compact,
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
|
}, hashId, className);
|
|
|
const formItemContext = (0,_react_17_0_2_react.useContext)(form_context/* FormItemInputContext */.aM);
|
|
|
const groupFormItemContext = (0,_react_17_0_2_react.useMemo)(() => Object.assign(Object.assign({}, formItemContext), {
|
|
|
isFormItemInput: false
|
|
|
}), [formItemContext]);
|
|
|
if (false) {}
|
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
|
className: cls,
|
|
|
style: props.style,
|
|
|
onMouseEnter: props.onMouseEnter,
|
|
|
onMouseLeave: props.onMouseLeave,
|
|
|
onFocus: props.onFocus,
|
|
|
onBlur: props.onBlur
|
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement(form_context/* FormItemInputContext */.aM.Provider, {
|
|
|
value: groupFormItemContext
|
|
|
}, props.children)));
|
|
|
};
|
|
|
/* harmony default export */ var input_Group = (Group);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Input.js + 1 modules
|
|
|
var Input = __webpack_require__(9432);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.9@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(79384);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/EyeInvisibleOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var EyeInvisibleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { "tag": "path", "attrs": { "d": "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, "name": "eye-invisible", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_EyeInvisibleOutlined = (EyeInvisibleOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(44847);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/icons/EyeInvisibleOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var EyeInvisibleOutlined_EyeInvisibleOutlined = function EyeInvisibleOutlined(props, ref) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_EyeInvisibleOutlined
|
|
|
}));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_EyeInvisibleOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(EyeInvisibleOutlined_EyeInvisibleOutlined));
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/icons/EyeOutlined.js + 1 modules
|
|
|
var EyeOutlined = __webpack_require__(29338);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/omit.js
|
|
|
var omit = __webpack_require__(41123);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/ref.js
|
|
|
var es_ref = __webpack_require__(17763);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/hooks/useRemovePasswordTimeout.js
|
|
|
var useRemovePasswordTimeout = __webpack_require__(59412);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Password.js
|
|
|
"use client";
|
|
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const defaultIconRender = visible => visible ? /*#__PURE__*/_react_17_0_2_react.createElement(EyeOutlined/* default */.Z, null) : /*#__PURE__*/_react_17_0_2_react.createElement(icons_EyeInvisibleOutlined, null);
|
|
|
const ActionMap = {
|
|
|
click: 'onClick',
|
|
|
hover: 'onMouseOver'
|
|
|
};
|
|
|
const Password = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
|
|
const {
|
|
|
visibilityToggle = true
|
|
|
} = props;
|
|
|
const visibilityControlled = typeof visibilityToggle === 'object' && visibilityToggle.visible !== undefined;
|
|
|
const [visible, setVisible] = (0,_react_17_0_2_react.useState)(() => visibilityControlled ? visibilityToggle.visible : false);
|
|
|
const inputRef = (0,_react_17_0_2_react.useRef)(null);
|
|
|
_react_17_0_2_react.useEffect(() => {
|
|
|
if (visibilityControlled) {
|
|
|
setVisible(visibilityToggle.visible);
|
|
|
}
|
|
|
}, [visibilityControlled, visibilityToggle]);
|
|
|
// Remove Password value
|
|
|
const removePasswordTimeout = (0,useRemovePasswordTimeout/* default */.Z)(inputRef);
|
|
|
const onVisibleChange = () => {
|
|
|
const {
|
|
|
disabled
|
|
|
} = props;
|
|
|
if (disabled) {
|
|
|
return;
|
|
|
}
|
|
|
if (visible) {
|
|
|
removePasswordTimeout();
|
|
|
}
|
|
|
setVisible(prevState => {
|
|
|
var _a;
|
|
|
const newState = !prevState;
|
|
|
if (typeof visibilityToggle === 'object') {
|
|
|
(_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, newState);
|
|
|
}
|
|
|
return newState;
|
|
|
});
|
|
|
};
|
|
|
const getIcon = prefixCls => {
|
|
|
const {
|
|
|
action = 'click',
|
|
|
iconRender = defaultIconRender
|
|
|
} = props;
|
|
|
const iconTrigger = ActionMap[action] || '';
|
|
|
const icon = iconRender(visible);
|
|
|
const iconProps = {
|
|
|
[iconTrigger]: onVisibleChange,
|
|
|
className: `${prefixCls}-icon`,
|
|
|
key: 'passwordIcon',
|
|
|
onMouseDown: e => {
|
|
|
// Prevent focused state lost
|
|
|
// https://github.com/ant-design/ant-design/issues/15173
|
|
|
e.preventDefault();
|
|
|
},
|
|
|
onMouseUp: e => {
|
|
|
// Prevent caret position change
|
|
|
// https://github.com/ant-design/ant-design/issues/23524
|
|
|
e.preventDefault();
|
|
|
}
|
|
|
};
|
|
|
return /*#__PURE__*/_react_17_0_2_react.cloneElement( /*#__PURE__*/_react_17_0_2_react.isValidElement(icon) ? icon : /*#__PURE__*/_react_17_0_2_react.createElement("span", null, icon), iconProps);
|
|
|
};
|
|
|
const {
|
|
|
className,
|
|
|
prefixCls: customizePrefixCls,
|
|
|
inputPrefixCls: customizeInputPrefixCls,
|
|
|
size
|
|
|
} = props,
|
|
|
restProps = __rest(props, ["className", "prefixCls", "inputPrefixCls", "size"]);
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
|
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
|
|
const prefixCls = getPrefixCls('input-password', customizePrefixCls);
|
|
|
const suffixIcon = visibilityToggle && getIcon(prefixCls);
|
|
|
const inputClassName = _classnames_2_5_1_classnames_default()(prefixCls, className, {
|
|
|
[`${prefixCls}-${size}`]: !!size
|
|
|
});
|
|
|
const omittedProps = Object.assign(Object.assign({}, (0,omit/* default */.Z)(restProps, ['suffix', 'iconRender', 'visibilityToggle'])), {
|
|
|
type: visible ? 'text' : 'password',
|
|
|
className: inputClassName,
|
|
|
prefixCls: inputPrefixCls,
|
|
|
suffix: suffixIcon
|
|
|
});
|
|
|
if (size) {
|
|
|
omittedProps.size = size;
|
|
|
}
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(Input/* default */.Z, Object.assign({
|
|
|
ref: (0,es_ref/* composeRef */.sQ)(ref, inputRef)
|
|
|
}, omittedProps));
|
|
|
});
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var input_Password = (Password);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/icons/SearchOutlined.js + 1 modules
|
|
|
var SearchOutlined = __webpack_require__(38528);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
|
|
|
var reactNode = __webpack_require__(92343);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/hooks/useSize.js
|
|
|
var useSize = __webpack_require__(19716);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Compact.js
|
|
|
var Compact = __webpack_require__(33234);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Search.js
|
|
|
"use client";
|
|
|
|
|
|
var Search_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Search = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
inputPrefixCls: customizeInputPrefixCls,
|
|
|
className,
|
|
|
size: customizeSize,
|
|
|
suffix,
|
|
|
enterButton = false,
|
|
|
addonAfter,
|
|
|
loading,
|
|
|
disabled,
|
|
|
onSearch: customOnSearch,
|
|
|
onChange: customOnChange,
|
|
|
onCompositionStart,
|
|
|
onCompositionEnd
|
|
|
} = props,
|
|
|
restProps = Search_rest(props, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]);
|
|
|
const {
|
|
|
getPrefixCls,
|
|
|
direction
|
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
|
const composedRef = _react_17_0_2_react.useRef(false);
|
|
|
const prefixCls = getPrefixCls('input-search', customizePrefixCls);
|
|
|
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
|
|
const {
|
|
|
compactSize
|
|
|
} = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction);
|
|
|
const size = (0,useSize/* default */.Z)(ctx => {
|
|
|
var _a;
|
|
|
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
|
|
|
});
|
|
|
const inputRef = _react_17_0_2_react.useRef(null);
|
|
|
const onChange = e => {
|
|
|
if (e && e.target && e.type === 'click' && customOnSearch) {
|
|
|
customOnSearch(e.target.value, e, {
|
|
|
source: 'clear'
|
|
|
});
|
|
|
}
|
|
|
if (customOnChange) {
|
|
|
customOnChange(e);
|
|
|
}
|
|
|
};
|
|
|
const onMouseDown = e => {
|
|
|
var _a;
|
|
|
if (document.activeElement === ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input)) {
|
|
|
e.preventDefault();
|
|
|
}
|
|
|
};
|
|
|
const onSearch = e => {
|
|
|
var _a, _b;
|
|
|
if (customOnSearch) {
|
|
|
customOnSearch((_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.value, e, {
|
|
|
source: 'input'
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
const onPressEnter = e => {
|
|
|
if (composedRef.current || loading) {
|
|
|
return;
|
|
|
}
|
|
|
onSearch(e);
|
|
|
};
|
|
|
const searchIcon = typeof enterButton === 'boolean' ? /*#__PURE__*/_react_17_0_2_react.createElement(SearchOutlined/* default */.Z, null) : null;
|
|
|
const btnClassName = `${prefixCls}-button`;
|
|
|
let button;
|
|
|
const enterButtonAsElement = enterButton || {};
|
|
|
const isAntdButton = enterButtonAsElement.type && enterButtonAsElement.type.__ANT_BUTTON === true;
|
|
|
if (isAntdButton || enterButtonAsElement.type === 'button') {
|
|
|
button = (0,reactNode/* cloneElement */.Tm)(enterButtonAsElement, Object.assign({
|
|
|
onMouseDown,
|
|
|
onClick: e => {
|
|
|
var _a, _b;
|
|
|
(_b = (_a = enterButtonAsElement === null || enterButtonAsElement === void 0 ? void 0 : enterButtonAsElement.props) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
|
onSearch(e);
|
|
|
},
|
|
|
key: 'enterButton'
|
|
|
}, isAntdButton ? {
|
|
|
className: btnClassName,
|
|
|
size
|
|
|
} : {}));
|
|
|
} else {
|
|
|
button = /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, {
|
|
|
className: btnClassName,
|
|
|
type: enterButton ? 'primary' : undefined,
|
|
|
size: size,
|
|
|
disabled: disabled,
|
|
|
key: "enterButton",
|
|
|
onMouseDown: onMouseDown,
|
|
|
onClick: onSearch,
|
|
|
loading: loading,
|
|
|
icon: searchIcon
|
|
|
}, enterButton);
|
|
|
}
|
|
|
if (addonAfter) {
|
|
|
button = [button, (0,reactNode/* cloneElement */.Tm)(addonAfter, {
|
|
|
key: 'addonAfter'
|
|
|
})];
|
|
|
}
|
|
|
const cls = _classnames_2_5_1_classnames_default()(prefixCls, {
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
|
[`${prefixCls}-${size}`]: !!size,
|
|
|
[`${prefixCls}-with-button`]: !!enterButton
|
|
|
}, className);
|
|
|
const handleOnCompositionStart = e => {
|
|
|
composedRef.current = true;
|
|
|
onCompositionStart === null || onCompositionStart === void 0 ? void 0 : onCompositionStart(e);
|
|
|
};
|
|
|
const handleOnCompositionEnd = e => {
|
|
|
composedRef.current = false;
|
|
|
onCompositionEnd === null || onCompositionEnd === void 0 ? void 0 : onCompositionEnd(e);
|
|
|
};
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(Input/* default */.Z, Object.assign({
|
|
|
ref: (0,es_ref/* composeRef */.sQ)(inputRef, ref),
|
|
|
onPressEnter: onPressEnter
|
|
|
}, restProps, {
|
|
|
size: size,
|
|
|
onCompositionStart: handleOnCompositionStart,
|
|
|
onCompositionEnd: handleOnCompositionEnd,
|
|
|
prefixCls: inputPrefixCls,
|
|
|
addonAfter: button,
|
|
|
suffix: suffix,
|
|
|
onChange: onChange,
|
|
|
className: cls,
|
|
|
disabled: disabled
|
|
|
}));
|
|
|
});
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var input_Search = (Search);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/TextArea.js
|
|
|
var TextArea = __webpack_require__(1643);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const input_Input = Input/* default */.Z;
|
|
|
if (false) {}
|
|
|
input_Input.Group = input_Group;
|
|
|
input_Input.Search = input_Search;
|
|
|
input_Input.TextArea = TextArea/* default */.Z;
|
|
|
input_Input.Password = input_Password;
|
|
|
/* harmony default export */ var input = (input_Input);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 6774:
|
|
|
/*!*************************************************************************************************************!*\
|
|
|
!*** ./node_modules/_scroll-into-view-if-needed@3.1.0@scroll-into-view-if-needed/dist/index.js + 1 modules ***!
|
|
|
\*************************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ dist_e; }
|
|
|
});
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_compute-scroll-into-view@3.1.0@compute-scroll-into-view/dist/index.js
|
|
|
const t=t=>"object"==typeof t&&null!=t&&1===t.nodeType,e=(t,e)=>(!e||"hidden"!==t)&&("visible"!==t&&"clip"!==t),n=(t,n)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const o=getComputedStyle(t,null);return e(o.overflowY,n)||e(o.overflowX,n)||(t=>{const e=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}})(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)})(t)}return!1},o=(t,e,n,o,l,r,i,s)=>r<t&&i>e||r>t&&i<e?0:r<=t&&s<=n||i>=e&&s>=n?r-t-o:i>e&&s<n||r<t&&s>n?i-e+l:0,l=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},dist_r=(e,r)=>{var i,s,d,h;if("undefined"==typeof document)return[];const{scrollMode:c,block:f,inline:u,boundary:a,skipOverflowHiddenElements:g}=r,p="function"==typeof a?a:t=>t!==a;if(!t(e))throw new TypeError("Invalid target");const m=document.scrollingElement||document.documentElement,w=[];let W=e;for(;t(W)&&p(W);){if(W=l(W),W===m){w.push(W);break}null!=W&&W===document.body&&n(W)&&!n(document.documentElement)||null!=W&&n(W,g)&&w.push(W)}const b=null!=(s=null==(i=window.visualViewport)?void 0:i.width)?s:innerWidth,H=null!=(h=null==(d=window.visualViewport)?void 0:d.height)?h:innerHeight,{scrollX:y,scrollY:M}=window,{height:v,width:E,top:x,right:C,bottom:I,left:R}=e.getBoundingClientRect(),{top:T,right:B,bottom:F,left:V}=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(e);let k="start"===f||"nearest"===f?x-T:"end"===f?I+F:x+v/2-T+F,D="center"===u?R+E/2-V+B:"end"===u?C+B:R-V;const L=[];for(let t=0;t<w.length;t++){const e=w[t],{height:n,width:l,top:r,right:i,bottom:s,left:d}=e.getBoundingClientRect();if("if-needed"===c&&x>=0&&R>=0&&I<=H&&C<=b&&x>=r&&I<=s&&R>=d&&C<=i)return L;const h=getComputedStyle(e),a=parseInt(h.borderLeftWidth,10),g=parseInt(h.borderTopWidth,10),p=parseInt(h.borderRightWidth,10),W=parseInt(h.borderBottomWidth,10);let T=0,B=0;const F="offsetWidth"in e?e.offsetWidth-e.clientWidth-a-p:0,V="offsetHeight"in e?e.offsetHeight-e.clientHeight-g-W:0,S="offsetWidth"in e?0===e.offsetWidth?0:l/e.offsetWidth:0,X="offsetHeight"in e?0===e.offsetHeight?0:n/e.offsetHeight:0;if(m===e)T="start"===f?k:"end"===f?k-H:"nearest"===f?o(M,M+H,H,g,W,M+k,M+k+v,v):k-H/2,B="start"===u?D:"center"===u?D-b/2:"end"===u?D-b:o(y,y+b,b,a,p,y+D,y+D+E,E),T=Math.max(0,T+M),B=Math.max(0,B+y);else{T="start"===f?k-r-g:"end"===f?k-s+W+V:"nearest"===f?o(r,s,n,g,W+V,k,k+v,v):k-(r+n/2)+V/2,B="start"===u?D-d-a:"center"===u?D-(d+l/2)+F/2:"end"===u?D-i+p+F:o(d,i,l,a,p+F,D,D+E,E);const{scrollLeft:t,scrollTop:h}=e;T=0===X?0:Math.max(0,Math.min(h+T/X,e.scrollHeight-n/X+V)),B=0===S?0:Math.max(0,Math.min(t+B/S,e.scrollWidth-l/S+F)),k+=h-T,D+=t-B}L.push({el:e,top:T,left:B})}return L};//# sourceMappingURL=index.js.map
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_scroll-into-view-if-needed@3.1.0@scroll-into-view-if-needed/dist/index.js
|
|
|
const dist_o=t=>!1===t?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&0!==Object.keys(t).length)(t)?t:{block:"start",inline:"nearest"};function dist_e(e,r){if(!e.isConnected||!(t=>{let o=t;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(e))return;const n=(t=>{const o=window.getComputedStyle(t);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(e);if((t=>"object"==typeof t&&"function"==typeof t.behavior)(r))return r.behavior(dist_r(e,r));const l="boolean"==typeof r||null==r?void 0:r.behavior;for(const{el:a,top:i,left:s}of dist_r(e,dist_o(r))){const t=i-n.top+n.bottom,o=s-n.left+n.right;a.scroll({top:t,left:o,behavior:l})}}//# sourceMappingURL=index.js.map
|
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |