antd-hz
Version:
华卓科技基于 antd 5.0 定制的组件库
1,317 lines (1,198 loc) • 4.33 MB
JavaScript
/*!
*
* antd-hz v0.0.36
*
* Copyright 2015-present, Alipay, Inc.
* All rights reserved.
*
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"), require("react-dom"), require("dayjs"));
else if(typeof define === 'function' && define.amd)
define(["react", "react-dom", "dayjs"], factory);
else if(typeof exports === 'object')
exports["antd-hz"] = factory(require("react"), require("react-dom"), require("dayjs"));
else
root["antd-hz"] = factory(root["React"], root["ReactDOM"], root["dayjs"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom__, __WEBPACK_EXTERNAL_MODULE_dayjs__) {
return /******/ (function() { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./components sync recursive ^\\.\\/[^_][\\w-]+\\/style\\/index\\.tsx?$":
/*!***************************************************************!*\
!*** ./components/ sync ^\.\/[^_][\w-]+\/style\/index\.tsx?$ ***!
\***************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var map = {
"./affix/style/index.ts": "./components/affix/style/index.ts",
"./alert/style/index.ts": "./components/alert/style/index.ts",
"./anchor/style/index.ts": "./components/anchor/style/index.ts",
"./app/style/index.ts": "./components/app/style/index.ts",
"./avatar/style/index.ts": "./components/avatar/style/index.ts",
"./back-top/style/index.ts": "./components/back-top/style/index.ts",
"./badge/style/index.ts": "./components/badge/style/index.ts",
"./breadcrumb/style/index.ts": "./components/breadcrumb/style/index.ts",
"./button/style/index.ts": "./components/button/style/index.ts",
"./calendar/style/index.ts": "./components/calendar/style/index.ts",
"./card/style/index.ts": "./components/card/style/index.ts",
"./carousel/style/index.ts": "./components/carousel/style/index.ts",
"./cascader/style/index.ts": "./components/cascader/style/index.ts",
"./checkbox/style/index.ts": "./components/checkbox/style/index.ts",
"./col/style/index.ts": "./components/col/style/index.ts",
"./collapse/style/index.ts": "./components/collapse/style/index.ts",
"./color-picker/style/index.ts": "./components/color-picker/style/index.ts",
"./config-provider/style/index.ts": "./components/config-provider/style/index.ts",
"./date-picker/style/index.ts": "./components/date-picker/style/index.ts",
"./descriptions/style/index.ts": "./components/descriptions/style/index.ts",
"./divider/style/index.ts": "./components/divider/style/index.ts",
"./drawer/style/index.ts": "./components/drawer/style/index.ts",
"./dropdown/style/index.ts": "./components/dropdown/style/index.ts",
"./empty/style/index.ts": "./components/empty/style/index.ts",
"./flex/style/index.ts": "./components/flex/style/index.ts",
"./float-button/style/index.ts": "./components/float-button/style/index.ts",
"./form/style/index.ts": "./components/form/style/index.ts",
"./grid/style/index.ts": "./components/grid/style/index.ts",
"./image/style/index.ts": "./components/image/style/index.ts",
"./input-number/style/index.ts": "./components/input-number/style/index.ts",
"./input/style/index.ts": "./components/input/style/index.ts",
"./layout/style/index.ts": "./components/layout/style/index.ts",
"./list/style/index.ts": "./components/list/style/index.ts",
"./mentions/style/index.ts": "./components/mentions/style/index.ts",
"./menu/style/index.ts": "./components/menu/style/index.ts",
"./message/style/index.ts": "./components/message/style/index.ts",
"./modal/style/index.ts": "./components/modal/style/index.ts",
"./notification/style/index.ts": "./components/notification/style/index.ts",
"./pagination/style/index.ts": "./components/pagination/style/index.ts",
"./popconfirm/style/index.ts": "./components/popconfirm/style/index.ts",
"./popover/style/index.ts": "./components/popover/style/index.ts",
"./progress/style/index.ts": "./components/progress/style/index.ts",
"./qr-code/style/index.ts": "./components/qr-code/style/index.ts",
"./qrcode/style/index.ts": "./components/qrcode/style/index.ts",
"./radio/style/index.ts": "./components/radio/style/index.ts",
"./rate/style/index.ts": "./components/rate/style/index.ts",
"./result/style/index.ts": "./components/result/style/index.ts",
"./row/style/index.ts": "./components/row/style/index.ts",
"./segmented/style/index.ts": "./components/segmented/style/index.ts",
"./select/style/index.ts": "./components/select/style/index.ts",
"./skeleton/style/index.ts": "./components/skeleton/style/index.ts",
"./slider/style/index.ts": "./components/slider/style/index.ts",
"./space/style/index.ts": "./components/space/style/index.ts",
"./spin/style/index.ts": "./components/spin/style/index.ts",
"./statistic/style/index.ts": "./components/statistic/style/index.ts",
"./steps/style/index.ts": "./components/steps/style/index.ts",
"./switch/style/index.ts": "./components/switch/style/index.ts",
"./table/style/index.ts": "./components/table/style/index.ts",
"./tabs/style/index.ts": "./components/tabs/style/index.ts",
"./tag/style/index.ts": "./components/tag/style/index.ts",
"./timeline/style/index.ts": "./components/timeline/style/index.ts",
"./tooltip/style/index.ts": "./components/tooltip/style/index.ts",
"./tour/style/index.ts": "./components/tour/style/index.ts",
"./transfer/style/index.ts": "./components/transfer/style/index.ts",
"./tree-select/style/index.ts": "./components/tree-select/style/index.ts",
"./tree/style/index.ts": "./components/tree/style/index.ts",
"./typography/style/index.ts": "./components/typography/style/index.ts",
"./upload/style/index.ts": "./components/upload/style/index.ts"
};
function webpackContext(req) {
var id = webpackContextResolve(req);
return __webpack_require__(id);
}
function webpackContextResolve(req) {
if(!__webpack_require__.o(map, req)) {
var e = new Error("Cannot find module '" + req + "'");
e.code = 'MODULE_NOT_FOUND';
throw e;
}
return map[req];
}
webpackContext.keys = function webpackContextKeys() {
return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = "./components sync recursive ^\\.\\/[^_][\\w-]+\\/style\\/index\\.tsx?$";
/***/ }),
/***/ "./node_modules/@ant-design/colors/es/index.js":
/*!*****************************************************************!*\
!*** ./node_modules/@ant-design/colors/es/index.js + 3 modules ***!
\*****************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
blue: function() { return /* reexport */ blue; },
generate: function() { return /* reexport */ generate; },
gold: function() { return /* reexport */ gold; },
presetPrimaryColors: function() { return /* reexport */ presetPrimaryColors; }
});
// UNUSED EXPORTS: blueDark, cyan, cyanDark, geekblue, geekblueDark, goldDark, gray, green, greenDark, grey, greyDark, lime, limeDark, magenta, magentaDark, orange, orangeDark, presetDarkPalettes, presetPalettes, purple, purpleDark, red, redDark, volcano, volcanoDark, yellow, yellowDark
// EXTERNAL MODULE: ./node_modules/@ctrl/tinycolor/dist/module/conversion.js
var conversion = __webpack_require__("./node_modules/@ctrl/tinycolor/dist/module/conversion.js");
// EXTERNAL MODULE: ./node_modules/@ctrl/tinycolor/dist/module/format-input.js
var format_input = __webpack_require__("./node_modules/@ctrl/tinycolor/dist/module/format-input.js");
;// CONCATENATED MODULE: ./node_modules/@ant-design/colors/es/generate.js
var hueStep = 2; // 色相阶梯
var saturationStep = 0.16; // 饱和度阶梯,浅色部分
var saturationStep2 = 0.05; // 饱和度阶梯,深色部分
var brightnessStep1 = 0.05; // 亮度阶梯,浅色部分
var brightnessStep2 = 0.15; // 亮度阶梯,深色部分
var lightColorCount = 5; // 浅色数量,主色上
var darkColorCount = 4; // 深色数量,主色下
// 暗色主题颜色映射关系表
var darkColorMap = [{
index: 7,
opacity: 0.15
}, {
index: 6,
opacity: 0.25
}, {
index: 5,
opacity: 0.3
}, {
index: 5,
opacity: 0.45
}, {
index: 5,
opacity: 0.65
}, {
index: 5,
opacity: 0.85
}, {
index: 4,
opacity: 0.9
}, {
index: 3,
opacity: 0.95
}, {
index: 2,
opacity: 0.97
}, {
index: 1,
opacity: 0.98
}];
// Wrapper function ported from TinyColor.prototype.toHsv
// Keep it here because of `hsv.h * 360`
function toHsv(_ref) {
var r = _ref.r,
g = _ref.g,
b = _ref.b;
var hsv = (0,conversion.rgbToHsv)(r, g, b);
return {
h: hsv.h * 360,
s: hsv.s,
v: hsv.v
};
}
// Wrapper function ported from TinyColor.prototype.toHexString
// Keep it here because of the prefix `#`
function toHex(_ref2) {
var r = _ref2.r,
g = _ref2.g,
b = _ref2.b;
return "#".concat((0,conversion.rgbToHex)(r, g, b, false));
}
// Wrapper function ported from TinyColor.prototype.mix, not treeshakable.
// Amount in range [0, 1]
// Assume color1 & color2 has no alpha, since the following src code did so.
function mix(rgb1, rgb2, amount) {
var p = amount / 100;
var rgb = {
r: (rgb2.r - rgb1.r) * p + rgb1.r,
g: (rgb2.g - rgb1.g) * p + rgb1.g,
b: (rgb2.b - rgb1.b) * p + rgb1.b
};
return rgb;
}
function getHue(hsv, i, light) {
var hue;
// 根据色相不同,色相转向不同
if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
} else {
hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
}
if (hue < 0) {
hue += 360;
} else if (hue >= 360) {
hue -= 360;
}
return hue;
}
function getSaturation(hsv, i, light) {
// grey color don't change saturation
if (hsv.h === 0 && hsv.s === 0) {
return hsv.s;
}
var saturation;
if (light) {
saturation = hsv.s - saturationStep * i;
} else if (i === darkColorCount) {
saturation = hsv.s + saturationStep;
} else {
saturation = hsv.s + saturationStep2 * i;
}
// 边界值修正
if (saturation > 1) {
saturation = 1;
}
// 第一格的 s 限制在 0.06-0.1 之间
if (light && i === lightColorCount && saturation > 0.1) {
saturation = 0.1;
}
if (saturation < 0.06) {
saturation = 0.06;
}
return Number(saturation.toFixed(2));
}
function getValue(hsv, i, light) {
var value;
if (light) {
value = hsv.v + brightnessStep1 * i;
} else {
value = hsv.v - brightnessStep2 * i;
}
if (value > 1) {
value = 1;
}
return Number(value.toFixed(2));
}
function generate(color) {
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var patterns = [];
var pColor = (0,format_input.inputToRGB)(color);
for (var i = lightColorCount; i > 0; i -= 1) {
var hsv = toHsv(pColor);
var colorString = toHex((0,format_input.inputToRGB)({
h: getHue(hsv, i, true),
s: getSaturation(hsv, i, true),
v: getValue(hsv, i, true)
}));
patterns.push(colorString);
}
patterns.push(toHex(pColor));
for (var _i = 1; _i <= darkColorCount; _i += 1) {
var _hsv = toHsv(pColor);
var _colorString = toHex((0,format_input.inputToRGB)({
h: getHue(_hsv, _i),
s: getSaturation(_hsv, _i),
v: getValue(_hsv, _i)
}));
patterns.push(_colorString);
}
// dark theme patterns
if (opts.theme === 'dark') {
return darkColorMap.map(function (_ref3) {
var index = _ref3.index,
opacity = _ref3.opacity;
var darkColorString = toHex(mix((0,format_input.inputToRGB)(opts.backgroundColor || '#141414'), (0,format_input.inputToRGB)(patterns[index]), opacity * 100));
return darkColorString;
});
}
return patterns;
}
;// CONCATENATED MODULE: ./node_modules/@ant-design/colors/es/presets.js
// Generated by script. Do NOT modify!
var presetPrimaryColors = {
"red": "#F5222D",
"volcano": "#FA541C",
"orange": "#FA8C16",
"gold": "#FAAD14",
"yellow": "#FADB14",
"lime": "#A0D911",
"green": "#52C41A",
"cyan": "#13C2C2",
"blue": "#1677FF",
"geekblue": "#2F54EB",
"purple": "#722ED1",
"magenta": "#EB2F96",
"grey": "#666666"
};
var red = ["#fff1f0", "#ffccc7", "#ffa39e", "#ff7875", "#ff4d4f", "#f5222d", "#cf1322", "#a8071a", "#820014", "#5c0011"];
red.primary = red[5];
var volcano = ["#fff2e8", "#ffd8bf", "#ffbb96", "#ff9c6e", "#ff7a45", "#fa541c", "#d4380d", "#ad2102", "#871400", "#610b00"];
volcano.primary = volcano[5];
var orange = ["#fff7e6", "#ffe7ba", "#ffd591", "#ffc069", "#ffa940", "#fa8c16", "#d46b08", "#ad4e00", "#873800", "#612500"];
orange.primary = orange[5];
var gold = ["#fffbe6", "#fff1b8", "#ffe58f", "#ffd666", "#ffc53d", "#faad14", "#d48806", "#ad6800", "#874d00", "#613400"];
gold.primary = gold[5];
var yellow = ["#feffe6", "#ffffb8", "#fffb8f", "#fff566", "#ffec3d", "#fadb14", "#d4b106", "#ad8b00", "#876800", "#614700"];
yellow.primary = yellow[5];
var lime = ["#fcffe6", "#f4ffb8", "#eaff8f", "#d3f261", "#bae637", "#a0d911", "#7cb305", "#5b8c00", "#3f6600", "#254000"];
lime.primary = lime[5];
var green = ["#f6ffed", "#d9f7be", "#b7eb8f", "#95de64", "#73d13d", "#52c41a", "#389e0d", "#237804", "#135200", "#092b00"];
green.primary = green[5];
var cyan = ["#e6fffb", "#b5f5ec", "#87e8de", "#5cdbd3", "#36cfc9", "#13c2c2", "#08979c", "#006d75", "#00474f", "#002329"];
cyan.primary = cyan[5];
var blue = ["#e6f4ff", "#bae0ff", "#91caff", "#69b1ff", "#4096ff", "#1677ff", "#0958d9", "#003eb3", "#002c8c", "#001d66"];
blue.primary = blue[5];
var geekblue = ["#f0f5ff", "#d6e4ff", "#adc6ff", "#85a5ff", "#597ef7", "#2f54eb", "#1d39c4", "#10239e", "#061178", "#030852"];
geekblue.primary = geekblue[5];
var purple = ["#f9f0ff", "#efdbff", "#d3adf7", "#b37feb", "#9254de", "#722ed1", "#531dab", "#391085", "#22075e", "#120338"];
purple.primary = purple[5];
var magenta = ["#fff0f6", "#ffd6e7", "#ffadd2", "#ff85c0", "#f759ab", "#eb2f96", "#c41d7f", "#9e1068", "#780650", "#520339"];
magenta.primary = magenta[5];
var grey = ["#a6a6a6", "#999999", "#8c8c8c", "#808080", "#737373", "#666666", "#404040", "#1a1a1a", "#000000", "#000000"];
grey.primary = grey[5];
var gray = grey;
var presetPalettes = {
red: red,
volcano: volcano,
orange: orange,
gold: gold,
yellow: yellow,
lime: lime,
green: green,
cyan: cyan,
blue: blue,
geekblue: geekblue,
purple: purple,
magenta: magenta,
grey: grey
};
var redDark = ["#2a1215", "#431418", "#58181c", "#791a1f", "#a61d24", "#d32029", "#e84749", "#f37370", "#f89f9a", "#fac8c3"];
redDark.primary = redDark[5];
var volcanoDark = ["#2b1611", "#441d12", "#592716", "#7c3118", "#aa3e19", "#d84a1b", "#e87040", "#f3956a", "#f8b692", "#fad4bc"];
volcanoDark.primary = volcanoDark[5];
var orangeDark = ["#2b1d11", "#442a11", "#593815", "#7c4a15", "#aa6215", "#d87a16", "#e89a3c", "#f3b765", "#f8cf8d", "#fae3b7"];
orangeDark.primary = orangeDark[5];
var goldDark = ["#2b2111", "#443111", "#594214", "#7c5914", "#aa7714", "#d89614", "#e8b339", "#f3cc62", "#f8df8b", "#faedb5"];
goldDark.primary = goldDark[5];
var yellowDark = ["#2b2611", "#443b11", "#595014", "#7c6e14", "#aa9514", "#d8bd14", "#e8d639", "#f3ea62", "#f8f48b", "#fafab5"];
yellowDark.primary = yellowDark[5];
var limeDark = ["#1f2611", "#2e3c10", "#3e4f13", "#536d13", "#6f9412", "#8bbb11", "#a9d134", "#c9e75d", "#e4f88b", "#f0fab5"];
limeDark.primary = limeDark[5];
var greenDark = ["#162312", "#1d3712", "#274916", "#306317", "#3c8618", "#49aa19", "#6abe39", "#8fd460", "#b2e58b", "#d5f2bb"];
greenDark.primary = greenDark[5];
var cyanDark = ["#112123", "#113536", "#144848", "#146262", "#138585", "#13a8a8", "#33bcb7", "#58d1c9", "#84e2d8", "#b2f1e8"];
cyanDark.primary = cyanDark[5];
var blueDark = ["#111a2c", "#112545", "#15325b", "#15417e", "#1554ad", "#1668dc", "#3c89e8", "#65a9f3", "#8dc5f8", "#b7dcfa"];
blueDark.primary = blueDark[5];
var geekblueDark = ["#131629", "#161d40", "#1c2755", "#203175", "#263ea0", "#2b4acb", "#5273e0", "#7f9ef3", "#a8c1f8", "#d2e0fa"];
geekblueDark.primary = geekblueDark[5];
var purpleDark = ["#1a1325", "#24163a", "#301c4d", "#3e2069", "#51258f", "#642ab5", "#854eca", "#ab7ae0", "#cda8f0", "#ebd7fa"];
purpleDark.primary = purpleDark[5];
var magentaDark = ["#291321", "#40162f", "#551c3b", "#75204f", "#a02669", "#cb2b83", "#e0529c", "#f37fb7", "#f8a8cc", "#fad2e3"];
magentaDark.primary = magentaDark[5];
var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a", "#6a6a6a", "#7b7b7b", "#888888", "#969696"];
greyDark.primary = greyDark[5];
var presetDarkPalettes = {
red: redDark,
volcano: volcanoDark,
orange: orangeDark,
gold: goldDark,
yellow: yellowDark,
lime: limeDark,
green: greenDark,
cyan: cyanDark,
blue: blueDark,
geekblue: geekblueDark,
purple: purpleDark,
magenta: magentaDark,
grey: greyDark
};
;// CONCATENATED MODULE: ./node_modules/@ant-design/colors/es/types.js
;// CONCATENATED MODULE: ./node_modules/@ant-design/colors/es/index.js
/***/ }),
/***/ "./node_modules/@ant-design/cssinjs/es/hooks/useHMR.js":
/*!*************************************************************!*\
!*** ./node_modules/@ant-design/cssinjs/es/hooks/useHMR.js ***!
\*************************************************************/
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* module decorator */ module = __webpack_require__.hmd(module);
function useProdHMR() {
return false;
}
var webpackHMR = false;
function useDevHMR() {
return webpackHMR;
}
/* harmony default export */ __webpack_exports__["default"] = ( false ? 0 : useDevHMR);
// Webpack `module.hot.accept` do not support any deps update trigger
// We have to hack handler to force mark as HRM
if ( true && module && module.hot && 0) { var originWebpackHotUpdate, win; }
/***/ }),
/***/ "./node_modules/@ant-design/cssinjs/es/index.js":
/*!*******************************************************************!*\
!*** ./node_modules/@ant-design/cssinjs/es/index.js + 38 modules ***!
\*******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Keyframes: function() { return /* reexport */ Keyframes; },
NaNLinter: function() { return /* reexport */ NaNLinter; },
StyleProvider: function() { return /* reexport */ StyleProvider; },
Theme: function() { return /* reexport */ Theme; },
_experimental: function() { return /* binding */ _experimental; },
createCache: function() { return /* reexport */ createCache; },
createTheme: function() { return /* reexport */ createTheme; },
extractStyle: function() { return /* reexport */ extractStyle; },
genCalc: function() { return /* reexport */ calc; },
getComputedToken: function() { return /* reexport */ getComputedToken; },
legacyLogicalPropertiesTransformer: function() { return /* reexport */ legacyLogicalProperties; },
legacyNotSelectorLinter: function() { return /* reexport */ legacyNotSelectorLinter; },
logicalPropertiesLinter: function() { return /* reexport */ logicalPropertiesLinter; },
parentSelectorLinter: function() { return /* reexport */ parentSelectorLinter; },
px2remTransformer: function() { return /* reexport */ px2rem; },
token2CSSVar: function() { return /* reexport */ token2CSSVar; },
unit: function() { return /* reexport */ util_unit; },
useCSSVarRegister: function() { return /* reexport */ hooks_useCSSVarRegister; },
useCacheToken: function() { return /* reexport */ useCacheToken; },
useStyleRegister: function() { return /* reexport */ useStyleRegister; }
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
;// CONCATENATED MODULE: ./node_modules/@emotion/hash/dist/hash.browser.esm.js
/* eslint-disable */
// Inspired by https://github.com/garycourt/murmurhash-js
// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
function murmur2(str) {
// 'm' and 'r' are mixing constants generated offline.
// They're not really 'magic', they just happen to work well.
// const m = 0x5bd1e995;
// const r = 24;
// Initialize the hash
var h = 0; // Mix 4 bytes at a time into the hash
var k,
i = 0,
len = str.length;
for (; len >= 4; ++i, len -= 4) {
k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
k =
/* Math.imul(k, m): */
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
k ^=
/* k >>> r: */
k >>> 24;
h =
/* Math.imul(k, m): */
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
/* Math.imul(h, m): */
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
} // Handle the last few bytes of the input array
switch (len) {
case 3:
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
case 2:
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
case 1:
h ^= str.charCodeAt(i) & 0xff;
h =
/* Math.imul(h, m): */
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
} // Do a few final mixes of the hash to ensure the last few
// bytes are well-incorporated.
h ^= h >>> 13;
h =
/* Math.imul(h, m): */
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
return ((h ^ h >>> 15) >>> 0).toString(36);
}
/* harmony default export */ var hash_browser_esm = (murmur2);
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/dynamicCSS.js
var dynamicCSS = __webpack_require__("./node_modules/rc-util/es/Dom/dynamicCSS.js");
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__("react");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
var objectWithoutProperties = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMemo.js
var useMemo = __webpack_require__("./node_modules/rc-util/es/hooks/useMemo.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/isEqual.js
var isEqual = __webpack_require__("./node_modules/rc-util/es/isEqual.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createClass.js");
;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs/es/Cache.js
// [times, realValue]
var SPLIT = '%';
/** Connect key with `SPLIT` */
function pathKey(keys) {
return keys.join(SPLIT);
}
var Entity = /*#__PURE__*/function () {
function Entity(instanceId) {
(0,classCallCheck["default"])(this, Entity);
(0,defineProperty["default"])(this, "instanceId", void 0);
/** @private Internal cache map. Do not access this directly */
(0,defineProperty["default"])(this, "cache", new Map());
this.instanceId = instanceId;
}
(0,createClass["default"])(Entity, [{
key: "get",
value: function get(keys) {
return this.opGet(pathKey(keys));
}
/** A fast get cache with `get` concat. */
}, {
key: "opGet",
value: function opGet(keyPathStr) {
return this.cache.get(keyPathStr) || null;
}
}, {
key: "update",
value: function update(keys, valueFn) {
return this.opUpdate(pathKey(keys), valueFn);
}
/** A fast get cache with `get` concat. */
}, {
key: "opUpdate",
value: function opUpdate(keyPathStr, valueFn) {
var prevValue = this.cache.get(keyPathStr);
var nextValue = valueFn(prevValue);
if (nextValue === null) {
this.cache.delete(keyPathStr);
} else {
this.cache.set(keyPathStr, nextValue);
}
}
}]);
return Entity;
}();
/* harmony default export */ var Cache = (Entity);
;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs/es/StyleContext.js
var _excluded = ["children"];
var ATTR_TOKEN = 'data-token-hash';
var ATTR_MARK = 'data-css-hash';
var ATTR_CACHE_PATH = 'data-cache-path';
// Mark css-in-js instance in style element
var CSS_IN_JS_INSTANCE = '__cssinjs_instance__';
function createCache() {
var cssinjsInstanceId = Math.random().toString(12).slice(2);
// Tricky SSR: Move all inline style to the head.
// PS: We do not recommend tricky mode.
if (typeof document !== 'undefined' && document.head && document.body) {
var styles = document.body.querySelectorAll("style[".concat(ATTR_MARK, "]")) || [];
var firstChild = document.head.firstChild;
Array.from(styles).forEach(function (style) {
style[CSS_IN_JS_INSTANCE] = style[CSS_IN_JS_INSTANCE] || cssinjsInstanceId;
// Not force move if no head
if (style[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {
document.head.insertBefore(style, firstChild);
}
});
// Deduplicate of moved styles
var styleHash = {};
Array.from(document.querySelectorAll("style[".concat(ATTR_MARK, "]"))).forEach(function (style) {
var hash = style.getAttribute(ATTR_MARK);
if (styleHash[hash]) {
if (style[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {
var _style$parentNode;
(_style$parentNode = style.parentNode) === null || _style$parentNode === void 0 || _style$parentNode.removeChild(style);
}
} else {
styleHash[hash] = true;
}
});
}
return new Cache(cssinjsInstanceId);
}
var StyleContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
hashPriority: 'low',
cache: createCache(),
defaultCache: true
});
var StyleProvider = function StyleProvider(props) {
var children = props.children,
restProps = (0,objectWithoutProperties["default"])(props, _excluded);
var parentContext = external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(StyleContext);
var context = (0,useMemo["default"])(function () {
var mergedContext = (0,objectSpread2["default"])({}, parentContext);
Object.keys(restProps).forEach(function (key) {
var value = restProps[key];
if (restProps[key] !== undefined) {
mergedContext[key] = value;
}
});
var cache = restProps.cache;
mergedContext.cache = mergedContext.cache || createCache();
mergedContext.defaultCache = !cache && parentContext.defaultCache;
return mergedContext;
}, [parentContext, restProps], function (prev, next) {
return !(0,isEqual["default"])(prev[0], next[0], true) || !(0,isEqual["default"])(prev[1], next[1], true);
});
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(StyleContext.Provider, {
value: context
}, children);
};
/* harmony default export */ var es_StyleContext = (StyleContext);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/typeof.js");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/canUseDom.js
var canUseDom = __webpack_require__("./node_modules/rc-util/es/Dom/canUseDom.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
var assertThisInitialized = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
var inherits = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/inherits.js");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js
var createSuper = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/createSuper.js");
;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs/es/theme/calc/calculator.js
var AbstractCalculator = /*#__PURE__*/(0,createClass["default"])(function AbstractCalculator() {
(0,classCallCheck["default"])(this, AbstractCalculator);
});
/* harmony default export */ var calculator = (AbstractCalculator);
;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs/es/theme/calc/CSSCalculator.js
var CALC_UNIT = 'CALC_UNIT';
var regexp = new RegExp(CALC_UNIT, 'g');
function unit(value) {
if (typeof value === 'number') {
return "".concat(value).concat(CALC_UNIT);
}
return value;
}
var CSSCalculator = /*#__PURE__*/function (_AbstractCalculator) {
(0,inherits["default"])(CSSCalculator, _AbstractCalculator);
var _super = (0,createSuper["default"])(CSSCalculator);
function CSSCalculator(num, unitlessCssVar) {
var _this;
(0,classCallCheck["default"])(this, CSSCalculator);
_this = _super.call(this);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "result", '');
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "unitlessCssVar", void 0);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "lowPriority", void 0);
var numType = (0,esm_typeof["default"])(num);
_this.unitlessCssVar = unitlessCssVar;
if (num instanceof CSSCalculator) {
_this.result = "(".concat(num.result, ")");
} else if (numType === 'number') {
_this.result = unit(num);
} else if (numType === 'string') {
_this.result = num;
}
return _this;
}
(0,createClass["default"])(CSSCalculator, [{
key: "add",
value: function add(num) {
if (num instanceof CSSCalculator) {
this.result = "".concat(this.result, " + ").concat(num.getResult());
} else if (typeof num === 'number' || typeof num === 'string') {
this.result = "".concat(this.result, " + ").concat(unit(num));
}
this.lowPriority = true;
return this;
}
}, {
key: "sub",
value: function sub(num) {
if (num instanceof CSSCalculator) {
this.result = "".concat(this.result, " - ").concat(num.getResult());
} else if (typeof num === 'number' || typeof num === 'string') {
this.result = "".concat(this.result, " - ").concat(unit(num));
}
this.lowPriority = true;
return this;
}
}, {
key: "mul",
value: function mul(num) {
if (this.lowPriority) {
this.result = "(".concat(this.result, ")");
}
if (num instanceof CSSCalculator) {
this.result = "".concat(this.result, " * ").concat(num.getResult(true));
} else if (typeof num === 'number' || typeof num === 'string') {
this.result = "".concat(this.result, " * ").concat(num);
}
this.lowPriority = false;
return this;
}
}, {
key: "div",
value: function div(num) {
if (this.lowPriority) {
this.result = "(".concat(this.result, ")");
}
if (num instanceof CSSCalculator) {
this.result = "".concat(this.result, " / ").concat(num.getResult(true));
} else if (typeof num === 'number' || typeof num === 'string') {
this.result = "".concat(this.result, " / ").concat(num);
}
this.lowPriority = false;
return this;
}
}, {
key: "getResult",
value: function getResult(force) {
return this.lowPriority || force ? "(".concat(this.result, ")") : this.result;
}
}, {
key: "equal",
value: function equal(options) {
var _this2 = this;
var _ref = options || {},
cssUnit = _ref.unit;
var mergedUnit = true;
if (typeof cssUnit === 'boolean') {
mergedUnit = cssUnit;
} else if (Array.from(this.unitlessCssVar).some(function (cssVar) {
return _this2.result.includes(cssVar);
})) {
mergedUnit = false;
}
this.result = this.result.replace(regexp, mergedUnit ? 'px' : '');
if (typeof this.lowPriority !== 'undefined') {
return "calc(".concat(this.result, ")");
}
return this.result;
}
}]);
return CSSCalculator;
}(calculator);
;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs/es/theme/calc/NumCalculator.js
var NumCalculator = /*#__PURE__*/function (_AbstractCalculator) {
(0,inherits["default"])(NumCalculator, _AbstractCalculator);
var _super = (0,createSuper["default"])(NumCalculator);
function NumCalculator(num) {
var _this;
(0,classCallCheck["default"])(this, NumCalculator);
_this = _super.call(this);
(0,defineProperty["default"])((0,assertThisInitialized["default"])(_this), "result", 0);
if (num instanceof NumCalculator) {
_this.result = num.result;
} else if (typeof num === 'number') {
_this.result = num;
}
return _this;
}
(0,createClass["default"])(NumCalculator, [{
key: "add",
value: function add(num) {
if (num instanceof NumCalculator) {
this.result += num.result;
} else if (typeof num === 'number') {
this.result += num;
}
return this;
}
}, {
key: "sub",
value: function sub(num) {
if (num instanceof NumCalculator) {
this.result -= num.result;
} else if (typeof num === 'number') {
this.result -= num;
}
return this;
}
}, {
key: "mul",
value: function mul(num) {
if (num instanceof NumCalculator) {
this.result *= num.result;
} else if (typeof num === 'number') {
this.result *= num;
}
return this;
}
}, {
key: "div",
value: function div(num) {
if (num instanceof NumCalculator) {
this.result /= num.result;
} else if (typeof num === 'number') {
this.result /= num;
}
return this;
}
}, {
key: "equal",
value: function equal() {
return this.result;
}
}]);
return NumCalculator;
}(calculator);
;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs/es/theme/calc/index.js
var genCalc = function genCalc(type, unitlessCssVar) {
var Calculator = type === 'css' ? CSSCalculator : NumCalculator;
return function (num) {
return new Calculator(num, unitlessCssVar);
};
};
/* harmony default export */ var calc = (genCalc);
;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs/es/theme/ThemeCache.js
// ================================== Cache ==================================
function sameDerivativeOption(left, right) {
if (left.length !== right.length) {
return false;
}
for (var i = 0; i < left.length; i++) {
if (left[i] !== right[i]) {
return false;
}
}
return true;
}
var ThemeCache = /*#__PURE__*/function () {
function ThemeCache() {
(0,classCallCheck["default"])(this, ThemeCache);
(0,defineProperty["default"])(this, "cache", void 0);
(0,defineProperty["default"])(this, "keys", void 0);
(0,defineProperty["default"])(this, "cacheCallTimes", void 0);
this.cache = new Map();
this.keys = [];
this.cacheCallTimes = 0;
}
(0,createClass["default"])(ThemeCache, [{
key: "size",
value: function size() {
return this.keys.length;
}
}, {
key: "internalGet",
value: function internalGet(derivativeOption) {
var _cache2, _cache3;
var updateCallTimes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var cache = {
map: this.cache
};
derivativeOption.forEach(function (derivative) {
if (!cache) {
cache = undefined;
} else {
var _cache;
cache = (_cache = cache) === null || _cache === void 0 || (_cache = _cache.map) === null || _cache === void 0 ? void 0 : _cache.get(derivative);
}
});
if ((_cache2 = cache) !== null && _cache2 !== void 0 && _cache2.value && updateCallTimes) {
cache.value[1] = this.cacheCallTimes++;
}
return (_cache3 = cache) === null || _cache3 === void 0 ? void 0 : _cache3.value;
}
}, {
key: "get",
value: function get(derivativeOption) {
var _this$internalGet;
return (_this$internalGet = this.internalGet(derivativeOption, true)) === null || _this$internalGet === void 0 ? void 0 : _this$internalGet[0];
}
}, {
key: "has",
value: function has(derivativeOption) {
return !!this.internalGet(derivativeOption);
}
}, {
key: "set",
value: function set(derivativeOption, value) {
var _this = this;
// New cache
if (!this.has(derivativeOption)) {
if (this.size() + 1 > ThemeCache.MAX_CACHE_SIZE + ThemeCache.MAX_CACHE_OFFSET) {
var _this$keys$reduce = this.keys.reduce(function (result, key) {
var _result = (0,slicedToArray["default"])(result, 2),
callTimes = _result[1];
if (_this.internalGet(key)[1] < callTimes) {
return [key, _this.internalGet(key)[1]];
}
return result;
}, [this.keys[0], this.cacheCallTimes]),
_this$keys$reduce2 = (0,slicedToArray["default"])(_this$keys$reduce, 1),
targetKey = _this$keys$reduce2[0];
this.delete(targetKey);
}
this.keys.push(derivativeOption);
}
var cache = this.cache;
derivativeOption.forEach(function (derivative, index) {
if (index === derivativeOption.length - 1) {
cache.set(derivative, {
value: [value, _this.cacheCallTimes++]
});
} else {
var cacheValue = cache.get(derivative);
if (!cacheValue) {
cache.set(derivative, {
map: new Map()
});
} else if (!cacheValue.map) {
cacheValue.map = new Map();
}
cache = cache.get(derivative).map;
}
});
}
}, {
key: "deleteByPath",
value: function deleteByPath(currentCache, derivatives) {
var cache = currentCache.get(derivatives[0]);
if (derivatives.length === 1) {
var _cache$value;
if (!cache.map) {
currentCache.delete(derivatives[0]);
} else {
currentCache.set(derivatives[0], {
map: cache.map
});
}
return (_cache$value = cache.value) === null || _cache$value === void 0 ? void 0 : _cache$value[0];
}
var result = this.deleteByPath(cache.map, derivatives.slice(1));
if ((!cache.map || cache.map.size === 0) && !cache.value) {
currentCache.delete(derivatives[0]);
}
return result;
}
}, {
key: "delete",
value: function _delete(derivativeOption) {
// If cache exists
if (this.has(derivativeOption)) {
this.keys = this.keys.filter(function (item) {
return !sameDerivativeOption(item, derivativeOption);
});
return this.deleteByPath(this.cache, derivativeOption);
}
return undefined;
}
}]);
return ThemeCache;
}();
(0,defineProperty["default"])(ThemeCache, "MAX_CACHE_SIZE", 20);
(0,defineProperty["default"])(ThemeCache, "MAX_CACHE_OFFSET", 5);
// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
var warning = __webpack_require__("./node_modules/rc-util/es/warning.js");
;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs/es/theme/Theme.js
var uuid = 0;
/**
* Theme with algorithms to derive tokens from design tokens.
* Use `createTheme` first which will help to manage the theme instance cache.
*/
var Theme = /*#__PURE__*/function () {
function Theme(derivatives) {
(0,classCallCheck["default"])(this, Theme);
(0,defineProperty["default"])(this, "derivatives", void 0);
(0,defineProperty["default"])(this, "id", void 0);
this.derivatives = Array.isArray(derivatives) ? derivatives : [derivatives];
this.id = uuid;
if (derivatives.length === 0) {
(0,warning.warning)(derivatives.length > 0, '[Ant Design CSS-in-JS] Theme should have at least one derivative function.');
}
uuid += 1;
}
(0,createClass["default"])(Theme, [{
key: "getDerivativeToken",
value: function getDerivativeToken(token) {
return this.derivatives.reduce(function (result, derivative) {
return derivative(token, result);
}, undefined);
}
}]);
return Theme;
}();
;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs/es/theme/createTheme.js
var cacheThemes = new ThemeCache();
/**
* Same as new Theme, but will always return same one if `derivative` not changed.
*/
function createTheme(derivatives) {
var derivativeArr = Array.isArray(derivatives) ? derivatives : [derivatives];
// Create new theme if not exist
if (!cacheThemes.has(derivativeArr)) {
cacheThemes.set(derivativeArr, new Theme(derivativeArr));
}
// Get theme from cache and return
return cacheThemes.get(derivativeArr);
}
;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs/es/theme/index.js
;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs/es/util/index.js
// Create a cache for memo concat
var resultCache = new WeakMap();
var RESULT_VALUE = {};
function memoResult(callback, deps) {
var current = resultCache;
for (var i = 0; i < deps.length; i += 1) {
var dep = deps[i];
if (!current.has(dep)) {
current.set(dep, new WeakMap());
}
current = current.get(dep);
}
if (!current.has(RESULT_VALUE)) {
current.set(RESULT_VALUE, callback());
}
return current.get(RESULT_VALUE);
}
// Create a cache here to avoid always loop generate
var flattenTokenCache = new WeakMap();
/**
* Flatten token to string, this will auto cache the result when token not change
*/
function flattenToken(token) {
var hashed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var str = flattenTokenCache.get(token) || '';
if (!str) {
Object.keys(token).forEach(function (key) {
var value = token[key];
str += key;
if (value instanceof Theme) {
str += value.id;
} else if (value && (0,esm_typeof["default"])(value) === 'object') {
str += flattenToken(value, hashed);
} else {
str += value;
}
});
// https://github.com/ant-design/ant-design/issues/48386
// Should hash the string to avoid style tag name too long
if (hashed) {
str = hash_browser_esm(str);
}
// Put in cache
flattenTokenCache.set(token, str);
}
return str;
}
/**
* Convert derivative token to key string
*/
function token2key(token, salt) {
return hash_browser_esm("".concat(salt, "_").concat(flattenToken(token, true)));
}
var randomSelectorKey = "random-".concat(Date.now(), "-").concat(Math.random()).replace(/\./g, '');
// Magic `content` for detect selector support
var checkContent = '_bAmBoO_';
function supportSelector(styleStr, handleElement, supportCheck) {
if ((0,canUseDom["default"])()) {
var _getComputedStyle$con, _ele$parentNode;
(0,dynamicCSS.updateCSS)(styleStr, randomSelectorKey);
var _ele = document.createElement('div');
_ele.style.position = 'fixed';
_ele.style.left = '0';
_ele.style.top = '0';
handleElement === null || handleElement === void 0 || handleElement(_ele);
document.body.appendChild(_ele);
if (true) {
_ele.innerHTML = 'Test';
_ele.style.zIndex = '9999999';
}
var support = supportCheck ? supportCheck(_ele) : (_getComputedStyle$con = getComputedStyle(_ele).content) === null || _getComputedStyle$con === void 0 ? void 0 : _getComputedStyle$con.includes(checkContent);
(_ele$parentNode = _ele.parentNode) === null || _ele$parentNode === void 0 || _ele$parentNode.removeChild(_ele);
(0,dynamicCSS.removeCSS)(randomSelectorKey);
return support;
}
return false;
}
var canLayer = undefined;
function supportLayer() {
if (canLayer === undefined) {
canLayer = supportSelector("@layer ".concat(randomSelectorKey, " { .").concat(randomSelectorKey, " { content: \"").concat(checkContent, "\"!important; } }"), function (ele) {
ele.className = randomSelectorKey;
});
}
return canLayer;
}
var canWhere = undefined;
function supportWhere() {
if (canWhere === undefined) {
canWhere = supportSelector(":where(.".concat(randomSelectorKey, ") { content: \"").concat(checkContent, "\"!important; }"), function (ele) {
ele.className = randomSelectorKey;
});
}
return canWhere;
}
var canLogic = undefined;
function supportLogicProps() {
if (canLogic === undefined) {
canLogic = supportSelector(".".concat(randomSelectorKey, " { inset-block: 93px !important; }"), function (ele) {
ele.className = randomSelectorKey;
}, function (ele) {
return getComputedStyle(ele).bottom === '93px';
});
}
return canLogic;
}
var isClientSide = (0,canUseDom["default"])();
function util_unit(num) {
if (typeof num === 'number') {
return "".concat(num, "px");
}
return num;
}
function toStyleStr(style, tokenKey, styleId) {
var customizeAttrs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var plain = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
if (plain) {
return style;
}
var attrs = (0,objectSpread2["default"])((0,objectSpread2["default"])({}, customizeAttrs), {}, (0,defineProperty["default"])((0,defineProperty["default"])({}, ATTR_TOKEN, tokenKey), ATTR_MARK, styleId));
var attrStr = Object.keys(attrs).map(function (attr) {
var val = attrs[attr];
return val ? "".concat(attr, "=\"").concat(val, "\"") : null;
}).filter(function (v) {
return v;
}).join(' ');
return "<style ".concat(attrStr, ">").concat(style, "</style>");
}
;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs/es/util/css-variables.js
var token2CSSVar = function token2CSSVar(token) {
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
return "--".concat(prefix ? "".concat(prefix, "-") : '').concat(token).replace(/([a-z0-9])([A-Z])/g, '$1-$2').replace(/([A-Z]+)([A-Z][a-z0-9]+)/g, '$1-$2').replace(/([a-z])([A-Z0-9])/g, '$1-$2').toLowerCase();
};
var serializeCSSVar = function serializeCSSVar(cssVars, hashId, options) {
if (!Object.keys(cssVars).length) {
return '';
}
return ".".concat(hashId).concat(options !== null && options !== void 0 && options.scope ? ".".concat(options.scope) : '', "{").concat(Object.entries(cssVars).map(function (_ref) {
var _ref2 = (0,slicedToArray["default"])(_ref, 2),
key = _ref2[0],
value = _ref2[1];
return "".concat(key, ":").concat(value, ";");
}).join(''), "}");
};
var transformToken = function transformToken(token, themeKey, config) {
var cssVars = {};
var result = {};
Object.entries(token).forEach(function (_ref3) {
var _config$preserve, _config$ignore;
var _ref4 = (0,slicedToArray["default"])(_ref3, 2),
key = _ref4[0],
value = _ref4[1];
if (config !== null && config !== void 0 && (_config$preserve = config.preserve) !== null && _config$preserve !== void 0 && _config$preserve[key]) {
result[key] = value;
} else if ((typeof value === 'string' || typeof value === 'number') && !(config !== null && config !== void 0 && (_config$ignore = config.ignore) !== null && _config$ignore !== void 0 && _config$ignore[key])) {
var _config$unitless;
var cssVar = token2CSSVar(key, config === null || config === void 0 ? void 0 : config.prefix);
cssVars[cssVar] = typeof value === 'number' && !(config !== null && config !== void 0 && (_config$unitless = config.unitless) !== null && _config$unitless !== void 0 && _config$unitless[key]) ? "".concat(value, "px") : String(value);
result[key] = "var(".concat(cssVar, ")");
}
});
return [result, serializeCSSVar(cssVars, themeKey, {
scope: config === null || config === void 0 ? void 0 : config.scope
})];
};
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useLayoutEffect.js
var useLayoutEffect = __webpack_require__("./node_modules/rc-util/es/hooks/useLayoutEffect.js");
;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.js
// import canUseDom from 'rc-util/lib/Dom/canUseDom';
// We need fully clone React function here
// to avoid webpack warning React 17 do not export `useId`
var fullClone = (0,objectSpread2["default"])({}, external_root_React_commonjs2_react_commonjs_react_amd_react_);
var useInsertionEffect = fullClone.useInsertionEffect;
/**
* Polyfill `useInsertionEffect` for React < 18
* @param renderEffect will be executed in `useMemo`, and do not have callback
* @param effect will be executed in `useLayoutEffect`
* @param deps
*/
var useInsertionEffectPolyfill = function useInsertionEffectPolyfill(renderEffect, effect, deps) {
external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(renderEffect, deps);
(0,useLayoutEffect["default"])(function () {
return effect(true);
}, deps);
};
/**
* Compatible `useInsertionEffect`
* will use `useInsertionEffect` if React version >= 18,
* otherwise use `useInsertionEffectPolyfill`.
*/
var useCompatibleInsertionEffect = useInsertionEffect ? function (renderEffect, effect, deps) {
return useInsertionEffect(function () {