2022-07-01 06:28:03 +03:00
|
|
|
function _getRequireWildcardCache(nodeInterop) {
|
2022-04-30 03:56:48 +03:00
|
|
|
if (typeof WeakMap !== "function") return null;
|
2022-07-01 06:28:03 +03:00
|
|
|
|
|
|
|
var cacheBabelInterop = new WeakMap();
|
|
|
|
var cacheNodeInterop = new WeakMap();
|
|
|
|
return (_getRequireWildcardCache = function (nodeInterop) {
|
|
|
|
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
|
|
})(nodeInterop);
|
2022-04-30 03:56:48 +03:00
|
|
|
}
|
2022-07-01 06:28:03 +03:00
|
|
|
|
|
|
|
export default function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
|
if (!nodeInterop && obj && obj.__esModule) {
|
2021-12-05 09:46:09 +03:00
|
|
|
return obj;
|
2022-04-30 03:56:48 +03:00
|
|
|
}
|
2022-07-01 06:28:03 +03:00
|
|
|
|
2022-04-30 03:56:48 +03:00
|
|
|
if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
|
|
|
|
return { default: obj }
|
|
|
|
}
|
2022-07-01 06:28:03 +03:00
|
|
|
|
|
|
|
var cache = _getRequireWildcardCache(nodeInterop);
|
2022-04-30 03:56:48 +03:00
|
|
|
if (cache && cache.has(obj)) {
|
|
|
|
return cache.get(obj);
|
|
|
|
}
|
2021-12-05 09:46:09 +03:00
|
|
|
|
2022-04-30 03:56:48 +03:00
|
|
|
var newObj = {};
|
|
|
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
|
|
for (var key in obj) {
|
2022-07-01 06:28:03 +03:00
|
|
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
2022-04-30 03:56:48 +03:00
|
|
|
var desc = hasPropertyDescriptor
|
|
|
|
? Object.getOwnPropertyDescriptor(obj, key)
|
|
|
|
: null;
|
|
|
|
if (desc && (desc.get || desc.set)) {
|
|
|
|
Object.defineProperty(newObj, key, desc);
|
|
|
|
} else {
|
|
|
|
newObj[key] = obj[key];
|
2021-12-05 09:46:09 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-04-30 03:56:48 +03:00
|
|
|
newObj.default = obj;
|
|
|
|
if (cache) {
|
|
|
|
cache.set(obj, newObj);
|
|
|
|
}
|
|
|
|
return newObj;
|
|
|
|
|
2021-12-05 09:46:09 +03:00
|
|
|
}
|