| 1 |
/*! elementor - v3.31.0 - 11-08-2025 */ |
| 2 |
/******/ (() => { // webpackBootstrap |
| 3 |
/******/ var __webpack_modules__ = ({ |
| 4 |
|
| 5 |
/***/ "../modules/notifications/assets/js/api/index.js": |
| 6 |
/*!*******************************************************!*\ |
| 7 |
!*** ../modules/notifications/assets/js/api/index.js ***! |
| 8 |
\*******************************************************/ |
| 9 |
/***/ ((__unused_webpack_module, exports) => { |
| 10 |
|
| 11 |
"use strict"; |
| 12 |
|
| 13 |
|
| 14 |
Object.defineProperty(exports, "__esModule", ({ |
| 15 |
value: true |
| 16 |
})); |
| 17 |
exports.getNotifications = void 0; |
| 18 |
var request = function request(endpoint) { |
| 19 |
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; |
| 20 |
return new Promise(function (resolve, reject) { |
| 21 |
elementorCommon.ajax.addRequest(endpoint, { |
| 22 |
success: resolve, |
| 23 |
error: reject, |
| 24 |
data: data |
| 25 |
}); |
| 26 |
}); |
| 27 |
}; |
| 28 |
var getNotifications = exports.getNotifications = function getNotifications() { |
| 29 |
return request('notifications_get'); |
| 30 |
}; |
| 31 |
|
| 32 |
/***/ }), |
| 33 |
|
| 34 |
/***/ "../modules/notifications/assets/js/components/bar-button-notification.js": |
| 35 |
/*!********************************************************************************!*\ |
| 36 |
!*** ../modules/notifications/assets/js/components/bar-button-notification.js ***! |
| 37 |
\********************************************************************************/ |
| 38 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 39 |
|
| 40 |
"use strict"; |
| 41 |
/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); |
| 42 |
|
| 43 |
|
| 44 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 45 |
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 46 |
Object.defineProperty(exports, "__esModule", ({ |
| 47 |
value: true |
| 48 |
})); |
| 49 |
exports.BarButtonNotification = void 0; |
| 50 |
var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 51 |
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 52 |
var _whatsNew = __webpack_require__(/*! ./whats-new */ "../modules/notifications/assets/js/components/whats-new.js"); |
| 53 |
var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 54 |
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } |
| 55 |
var BarButtonNotification = exports.BarButtonNotification = function BarButtonNotification(props) { |
| 56 |
var defaultIsRead = props.defaultIsRead; |
| 57 |
var _useState = (0, _react.useState)(false), |
| 58 |
_useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 59 |
isOpen = _useState2[0], |
| 60 |
setIsOpen = _useState2[1]; |
| 61 |
var _useState3 = (0, _react.useState)(defaultIsRead), |
| 62 |
_useState4 = (0, _slicedToArray2.default)(_useState3, 2), |
| 63 |
isRead = _useState4[0], |
| 64 |
setIsRead = _useState4[1]; |
| 65 |
|
| 66 |
// TODO: This is a temporary solution until we have a proper admin bar component. |
| 67 |
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("button", { |
| 68 |
className: "e-admin-top-bar__bar-button", |
| 69 |
style: { |
| 70 |
backgroundColor: 'transparent', |
| 71 |
border: 'none' |
| 72 |
}, |
| 73 |
onClick: function onClick(event) { |
| 74 |
event.preventDefault(); |
| 75 |
setIsOpen(true); |
| 76 |
} |
| 77 |
}, /*#__PURE__*/_react.default.createElement(_ui.Badge, { |
| 78 |
color: "primary", |
| 79 |
variant: "dot", |
| 80 |
invisible: isRead, |
| 81 |
sx: { |
| 82 |
mx: 0.5 |
| 83 |
} |
| 84 |
}, /*#__PURE__*/_react.default.createElement("i", { |
| 85 |
className: "e-admin-top-bar__bar-button-icon eicon-speakerphone" |
| 86 |
})), /*#__PURE__*/_react.default.createElement("span", { |
| 87 |
className: "e-admin-top-bar__bar-button-title" |
| 88 |
}, props.children)), /*#__PURE__*/_react.default.createElement(_whatsNew.WhatsNew, { |
| 89 |
isOpen: isOpen, |
| 90 |
setIsOpen: setIsOpen, |
| 91 |
setIsRead: setIsRead |
| 92 |
})); |
| 93 |
}; |
| 94 |
BarButtonNotification.propTypes = { |
| 95 |
defaultIsRead: PropTypes.bool, |
| 96 |
children: PropTypes.any.isRequired |
| 97 |
}; |
| 98 |
|
| 99 |
/***/ }), |
| 100 |
|
| 101 |
/***/ "../modules/notifications/assets/js/components/whats-new-drawer-content.js": |
| 102 |
/*!*********************************************************************************!*\ |
| 103 |
!*** ../modules/notifications/assets/js/components/whats-new-drawer-content.js ***! |
| 104 |
\*********************************************************************************/ |
| 105 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 106 |
|
| 107 |
"use strict"; |
| 108 |
/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); |
| 109 |
|
| 110 |
|
| 111 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 112 |
Object.defineProperty(exports, "__esModule", ({ |
| 113 |
value: true |
| 114 |
})); |
| 115 |
exports.WhatsNewDrawerContent = void 0; |
| 116 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 117 |
var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query"); |
| 118 |
var _api = __webpack_require__(/*! ../api */ "../modules/notifications/assets/js/api/index.js"); |
| 119 |
var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 120 |
var _whatsNewItem = __webpack_require__(/*! ./whats-new-item */ "../modules/notifications/assets/js/components/whats-new-item.js"); |
| 121 |
var WhatsNewDrawerContent = exports.WhatsNewDrawerContent = function WhatsNewDrawerContent(_ref) { |
| 122 |
var setIsOpen = _ref.setIsOpen; |
| 123 |
var _useQuery = (0, _query.useQuery)({ |
| 124 |
queryKey: ['e-notifications'], |
| 125 |
queryFn: _api.getNotifications |
| 126 |
}), |
| 127 |
isPending = _useQuery.isPending, |
| 128 |
error = _useQuery.error, |
| 129 |
items = _useQuery.data; |
| 130 |
if (isPending) { |
| 131 |
return /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_ui.LinearProgress, { |
| 132 |
color: "secondary" |
| 133 |
})); |
| 134 |
} |
| 135 |
if (error) { |
| 136 |
return /*#__PURE__*/_react.default.createElement(_ui.Box, null, "An error has occurred: ", error); |
| 137 |
} |
| 138 |
return items.map(function (item, itemIndex) { |
| 139 |
return /*#__PURE__*/_react.default.createElement(_whatsNewItem.WhatsNewItem, { |
| 140 |
key: itemIndex, |
| 141 |
item: item, |
| 142 |
itemIndex: itemIndex, |
| 143 |
itemsLength: items.length, |
| 144 |
setIsOpen: setIsOpen |
| 145 |
}); |
| 146 |
}); |
| 147 |
}; |
| 148 |
WhatsNewDrawerContent.propTypes = { |
| 149 |
setIsOpen: PropTypes.func.isRequired |
| 150 |
}; |
| 151 |
|
| 152 |
/***/ }), |
| 153 |
|
| 154 |
/***/ "../modules/notifications/assets/js/components/whats-new-item-chips.js": |
| 155 |
/*!*****************************************************************************!*\ |
| 156 |
!*** ../modules/notifications/assets/js/components/whats-new-item-chips.js ***! |
| 157 |
\*****************************************************************************/ |
| 158 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 159 |
|
| 160 |
"use strict"; |
| 161 |
/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); |
| 162 |
|
| 163 |
|
| 164 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 165 |
Object.defineProperty(exports, "__esModule", ({ |
| 166 |
value: true |
| 167 |
})); |
| 168 |
exports.WhatsNewItemChips = void 0; |
| 169 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 170 |
var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js")); |
| 171 |
var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 172 |
var WhatsNewItemChips = exports.WhatsNewItemChips = function WhatsNewItemChips(_ref) { |
| 173 |
var chipPlan = _ref.chipPlan, |
| 174 |
chipTags = _ref.chipTags, |
| 175 |
itemIndex = _ref.itemIndex; |
| 176 |
var chips = []; |
| 177 |
if (chipPlan) { |
| 178 |
chips.push({ |
| 179 |
color: 'promotion', |
| 180 |
size: 'small', |
| 181 |
label: chipPlan |
| 182 |
}); |
| 183 |
} |
| 184 |
if (chipTags) { |
| 185 |
chipTags.forEach(function (chipTag) { |
| 186 |
chips.push({ |
| 187 |
variant: 'outlined', |
| 188 |
size: 'small', |
| 189 |
label: chipTag |
| 190 |
}); |
| 191 |
}); |
| 192 |
} |
| 193 |
if (!chips.length) { |
| 194 |
return null; |
| 195 |
} |
| 196 |
return /*#__PURE__*/_react.default.createElement(_ui.Stack, { |
| 197 |
direction: "row", |
| 198 |
flexWrap: "wrap", |
| 199 |
gap: 1, |
| 200 |
sx: { |
| 201 |
pb: 1 |
| 202 |
} |
| 203 |
}, chips.map(function (chip, chipIndex) { |
| 204 |
return /*#__PURE__*/_react.default.createElement(_ui.Chip, (0, _extends2.default)({ |
| 205 |
key: "chip-".concat(itemIndex).concat(chipIndex) |
| 206 |
}, chip)); |
| 207 |
})); |
| 208 |
}; |
| 209 |
WhatsNewItemChips.propTypes = { |
| 210 |
chipPlan: PropTypes.string, |
| 211 |
chipTags: PropTypes.array, |
| 212 |
itemIndex: PropTypes.number.isRequired |
| 213 |
}; |
| 214 |
|
| 215 |
/***/ }), |
| 216 |
|
| 217 |
/***/ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js": |
| 218 |
/*!*********************************************************************************!*\ |
| 219 |
!*** ../modules/notifications/assets/js/components/whats-new-item-thumbnail.js ***! |
| 220 |
\*********************************************************************************/ |
| 221 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 222 |
|
| 223 |
"use strict"; |
| 224 |
/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); |
| 225 |
|
| 226 |
|
| 227 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 228 |
Object.defineProperty(exports, "__esModule", ({ |
| 229 |
value: true |
| 230 |
})); |
| 231 |
exports.WhatsNewItemThumbnail = void 0; |
| 232 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 233 |
var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 234 |
var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js"); |
| 235 |
var WhatsNewItemThumbnail = exports.WhatsNewItemThumbnail = function WhatsNewItemThumbnail(_ref) { |
| 236 |
var imageSrc = _ref.imageSrc, |
| 237 |
title = _ref.title, |
| 238 |
link = _ref.link; |
| 239 |
return /*#__PURE__*/_react.default.createElement(_ui.Box, { |
| 240 |
sx: { |
| 241 |
pb: 2 |
| 242 |
} |
| 243 |
}, /*#__PURE__*/_react.default.createElement(_wrapperWithLink.WrapperWithLink, { |
| 244 |
link: link |
| 245 |
}, /*#__PURE__*/_react.default.createElement("img", { |
| 246 |
src: imageSrc, |
| 247 |
alt: title, |
| 248 |
style: { |
| 249 |
maxWidth: '100%' |
| 250 |
} |
| 251 |
}))); |
| 252 |
}; |
| 253 |
WhatsNewItemThumbnail.propTypes = { |
| 254 |
imageSrc: PropTypes.string.isRequired, |
| 255 |
title: PropTypes.string.isRequired, |
| 256 |
link: PropTypes.string |
| 257 |
}; |
| 258 |
|
| 259 |
/***/ }), |
| 260 |
|
| 261 |
/***/ "../modules/notifications/assets/js/components/whats-new-item-topic-line.js": |
| 262 |
/*!**********************************************************************************!*\ |
| 263 |
!*** ../modules/notifications/assets/js/components/whats-new-item-topic-line.js ***! |
| 264 |
\**********************************************************************************/ |
| 265 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 266 |
|
| 267 |
"use strict"; |
| 268 |
/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); |
| 269 |
|
| 270 |
|
| 271 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 272 |
Object.defineProperty(exports, "__esModule", ({ |
| 273 |
value: true |
| 274 |
})); |
| 275 |
exports.WhatsNewItemTopicLine = void 0; |
| 276 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 277 |
var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 278 |
var WhatsNewItemTopicLine = exports.WhatsNewItemTopicLine = function WhatsNewItemTopicLine(_ref) { |
| 279 |
var topic = _ref.topic, |
| 280 |
date = _ref.date; |
| 281 |
return /*#__PURE__*/_react.default.createElement(_ui.Stack, { |
| 282 |
direction: "row", |
| 283 |
divider: /*#__PURE__*/_react.default.createElement(_ui.Divider, { |
| 284 |
orientation: "vertical", |
| 285 |
flexItem: true |
| 286 |
}), |
| 287 |
spacing: 1, |
| 288 |
color: "text.tertiary", |
| 289 |
sx: { |
| 290 |
pb: 1 |
| 291 |
} |
| 292 |
}, topic && /*#__PURE__*/_react.default.createElement(_ui.Box, null, topic), date && /*#__PURE__*/_react.default.createElement(_ui.Box, null, date)); |
| 293 |
}; |
| 294 |
WhatsNewItemTopicLine.propTypes = { |
| 295 |
topic: PropTypes.string, |
| 296 |
date: PropTypes.string |
| 297 |
}; |
| 298 |
|
| 299 |
/***/ }), |
| 300 |
|
| 301 |
/***/ "../modules/notifications/assets/js/components/whats-new-item.js": |
| 302 |
/*!***********************************************************************!*\ |
| 303 |
!*** ../modules/notifications/assets/js/components/whats-new-item.js ***! |
| 304 |
\***********************************************************************/ |
| 305 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 306 |
|
| 307 |
"use strict"; |
| 308 |
/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); |
| 309 |
|
| 310 |
|
| 311 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 312 |
Object.defineProperty(exports, "__esModule", ({ |
| 313 |
value: true |
| 314 |
})); |
| 315 |
exports.WhatsNewItem = void 0; |
| 316 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 317 |
var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 318 |
var _whatsNewItemTopicLine = __webpack_require__(/*! ./whats-new-item-topic-line */ "../modules/notifications/assets/js/components/whats-new-item-topic-line.js"); |
| 319 |
var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js"); |
| 320 |
var _whatsNewItemThumbnail = __webpack_require__(/*! ./whats-new-item-thumbnail */ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js"); |
| 321 |
var _whatsNewItemChips = __webpack_require__(/*! ./whats-new-item-chips */ "../modules/notifications/assets/js/components/whats-new-item-chips.js"); |
| 322 |
var WhatsNewItem = exports.WhatsNewItem = function WhatsNewItem(_ref) { |
| 323 |
var item = _ref.item, |
| 324 |
itemIndex = _ref.itemIndex, |
| 325 |
itemsLength = _ref.itemsLength, |
| 326 |
setIsOpen = _ref.setIsOpen; |
| 327 |
return /*#__PURE__*/_react.default.createElement(_ui.Box, { |
| 328 |
key: itemIndex, |
| 329 |
display: "flex", |
| 330 |
flexDirection: "column", |
| 331 |
sx: { |
| 332 |
pt: 2 |
| 333 |
} |
| 334 |
}, (item.topic || item.date) && /*#__PURE__*/_react.default.createElement(_whatsNewItemTopicLine.WhatsNewItemTopicLine, { |
| 335 |
topic: item.topic, |
| 336 |
date: item.date |
| 337 |
}), /*#__PURE__*/_react.default.createElement(_wrapperWithLink.WrapperWithLink, { |
| 338 |
link: item.link |
| 339 |
}, /*#__PURE__*/_react.default.createElement(_ui.Typography, { |
| 340 |
variant: "subtitle1", |
| 341 |
sx: { |
| 342 |
pb: 2 |
| 343 |
} |
| 344 |
}, item.title)), item.imageSrc && /*#__PURE__*/_react.default.createElement(_whatsNewItemThumbnail.WhatsNewItemThumbnail, { |
| 345 |
imageSrc: item.imageSrc, |
| 346 |
link: item.link, |
| 347 |
title: item.title |
| 348 |
}), /*#__PURE__*/_react.default.createElement(_whatsNewItemChips.WhatsNewItemChips, { |
| 349 |
chipPlan: item.chipPlan, |
| 350 |
chipTags: item.chipTags, |
| 351 |
itemIndex: itemIndex |
| 352 |
}), item.description && /*#__PURE__*/_react.default.createElement(_ui.Typography, { |
| 353 |
variant: "body2", |
| 354 |
color: "text.secondary", |
| 355 |
sx: { |
| 356 |
pb: 2 |
| 357 |
} |
| 358 |
}, item.description, item.readMoreText && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ' ', /*#__PURE__*/_react.default.createElement(_ui.Link, { |
| 359 |
href: item.link, |
| 360 |
color: "info.main", |
| 361 |
target: "_blank" |
| 362 |
}, item.readMoreText))), item.cta && item.ctaLink && /*#__PURE__*/_react.default.createElement(_ui.Box, { |
| 363 |
sx: { |
| 364 |
pb: 2 |
| 365 |
} |
| 366 |
}, /*#__PURE__*/_react.default.createElement(_ui.Button, { |
| 367 |
href: item.ctaLink, |
| 368 |
target: item.ctaLink.startsWith('#') ? '_self' : '_blank', |
| 369 |
variant: "contained", |
| 370 |
size: "small", |
| 371 |
color: "promotion", |
| 372 |
onClick: item.ctaLink.startsWith('#') ? function () { |
| 373 |
return setIsOpen(false); |
| 374 |
} : function () {} |
| 375 |
}, item.cta)), itemIndex !== itemsLength - 1 && /*#__PURE__*/_react.default.createElement(_ui.Divider, { |
| 376 |
sx: { |
| 377 |
my: 1 |
| 378 |
} |
| 379 |
})); |
| 380 |
}; |
| 381 |
WhatsNewItem.propTypes = { |
| 382 |
item: PropTypes.object.isRequired, |
| 383 |
itemIndex: PropTypes.number.isRequired, |
| 384 |
itemsLength: PropTypes.number.isRequired, |
| 385 |
setIsOpen: PropTypes.func.isRequired |
| 386 |
}; |
| 387 |
|
| 388 |
/***/ }), |
| 389 |
|
| 390 |
/***/ "../modules/notifications/assets/js/components/whats-new-top-bar.js": |
| 391 |
/*!**************************************************************************!*\ |
| 392 |
!*** ../modules/notifications/assets/js/components/whats-new-top-bar.js ***! |
| 393 |
\**************************************************************************/ |
| 394 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 395 |
|
| 396 |
"use strict"; |
| 397 |
/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); |
| 398 |
|
| 399 |
|
| 400 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 401 |
Object.defineProperty(exports, "__esModule", ({ |
| 402 |
value: true |
| 403 |
})); |
| 404 |
exports.WhatsNewTopBar = void 0; |
| 405 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 406 |
var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 407 |
var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 408 |
var _xIcon = __webpack_require__(/*! ../icons/x-icon */ "../modules/notifications/assets/js/icons/x-icon.js"); |
| 409 |
var WhatsNewTopBar = exports.WhatsNewTopBar = function WhatsNewTopBar(props) { |
| 410 |
var setIsOpen = props.setIsOpen; |
| 411 |
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.AppBar, { |
| 412 |
elevation: 0, |
| 413 |
position: "sticky", |
| 414 |
sx: { |
| 415 |
backgroundColor: 'background.default' |
| 416 |
} |
| 417 |
}, /*#__PURE__*/_react.default.createElement(_ui.Toolbar, { |
| 418 |
variant: "dense" |
| 419 |
}, /*#__PURE__*/_react.default.createElement(_ui.Typography, { |
| 420 |
variant: "overline", |
| 421 |
sx: { |
| 422 |
flexGrow: 1 |
| 423 |
} |
| 424 |
}, (0, _i18n.__)('What\'s New', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.IconButton, { |
| 425 |
"aria-label": 'close', |
| 426 |
size: "small", |
| 427 |
onClick: function onClick() { |
| 428 |
return setIsOpen(false); |
| 429 |
} |
| 430 |
}, /*#__PURE__*/_react.default.createElement(_xIcon.XIcon, null)))), /*#__PURE__*/_react.default.createElement(_ui.Divider, null)); |
| 431 |
}; |
| 432 |
WhatsNewTopBar.propTypes = { |
| 433 |
setIsOpen: PropTypes.func.isRequired |
| 434 |
}; |
| 435 |
|
| 436 |
/***/ }), |
| 437 |
|
| 438 |
/***/ "../modules/notifications/assets/js/components/whats-new.js": |
| 439 |
/*!******************************************************************!*\ |
| 440 |
!*** ../modules/notifications/assets/js/components/whats-new.js ***! |
| 441 |
\******************************************************************/ |
| 442 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 443 |
|
| 444 |
"use strict"; |
| 445 |
/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); |
| 446 |
|
| 447 |
|
| 448 |
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 449 |
Object.defineProperty(exports, "__esModule", ({ |
| 450 |
value: true |
| 451 |
})); |
| 452 |
exports.WhatsNew = void 0; |
| 453 |
var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 454 |
var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 455 |
var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query"); |
| 456 |
var _whatsNewTopBar = __webpack_require__(/*! ./whats-new-top-bar */ "../modules/notifications/assets/js/components/whats-new-top-bar.js"); |
| 457 |
var _whatsNewDrawerContent = __webpack_require__(/*! ./whats-new-drawer-content */ "../modules/notifications/assets/js/components/whats-new-drawer-content.js"); |
| 458 |
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } |
| 459 |
var queryClient = new _query.QueryClient({ |
| 460 |
defaultOptions: { |
| 461 |
queries: { |
| 462 |
refetchOnWindowFocus: false, |
| 463 |
retry: false, |
| 464 |
staleTime: 1000 * 60 * 30 // 30 minutes |
| 465 |
} |
| 466 |
} |
| 467 |
}); |
| 468 |
var WhatsNew = exports.WhatsNew = function WhatsNew(props) { |
| 469 |
var _window$elementor, _window$elementor$get; |
| 470 |
var isOpen = props.isOpen, |
| 471 |
setIsOpen = props.setIsOpen, |
| 472 |
setIsRead = props.setIsRead, |
| 473 |
_props$anchorPosition = props.anchorPosition, |
| 474 |
anchorPosition = _props$anchorPosition === void 0 ? 'right' : _props$anchorPosition; |
| 475 |
(0, _react.useEffect)(function () { |
| 476 |
if (!isOpen) { |
| 477 |
return; |
| 478 |
} |
| 479 |
setIsRead(true); |
| 480 |
}, [isOpen, setIsRead]); |
| 481 |
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_query.QueryClientProvider, { |
| 482 |
client: queryClient |
| 483 |
}, /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, { |
| 484 |
rtl: elementorCommon.config.isRTL |
| 485 |
}, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, { |
| 486 |
colorScheme: ((_window$elementor = window.elementor) === null || _window$elementor === void 0 || (_window$elementor$get = _window$elementor.getPreferences) === null || _window$elementor$get === void 0 ? void 0 : _window$elementor$get.call(_window$elementor, 'ui_theme')) || 'auto' |
| 487 |
}, /*#__PURE__*/_react.default.createElement(_ui.Drawer, { |
| 488 |
anchor: anchorPosition, |
| 489 |
open: isOpen, |
| 490 |
onClose: function onClose() { |
| 491 |
return setIsOpen(false); |
| 492 |
}, |
| 493 |
ModalProps: { |
| 494 |
style: { |
| 495 |
// Above the WordPress Admin Top Bar. |
| 496 |
zIndex: 999999 |
| 497 |
} |
| 498 |
} |
| 499 |
}, /*#__PURE__*/_react.default.createElement(_ui.Box, { |
| 500 |
sx: { |
| 501 |
width: 320, |
| 502 |
backgroundColor: 'background.default' |
| 503 |
}, |
| 504 |
role: "presentation" |
| 505 |
}, /*#__PURE__*/_react.default.createElement(_whatsNewTopBar.WhatsNewTopBar, { |
| 506 |
setIsOpen: setIsOpen |
| 507 |
}), /*#__PURE__*/_react.default.createElement(_ui.Box, { |
| 508 |
sx: { |
| 509 |
padding: '16px' |
| 510 |
} |
| 511 |
}, /*#__PURE__*/_react.default.createElement(_whatsNewDrawerContent.WhatsNewDrawerContent, { |
| 512 |
setIsOpen: setIsOpen |
| 513 |
})))))))); |
| 514 |
}; |
| 515 |
WhatsNew.propTypes = { |
| 516 |
isOpen: PropTypes.bool.isRequired, |
| 517 |
setIsOpen: PropTypes.func.isRequired, |
| 518 |
setIsRead: PropTypes.func.isRequired, |
| 519 |
anchorPosition: PropTypes.oneOf(['left', 'top', 'right', 'bottom']) |
| 520 |
}; |
| 521 |
|
| 522 |
/***/ }), |
| 523 |
|
| 524 |
/***/ "../modules/notifications/assets/js/components/wrapper-with-link.js": |
| 525 |
/*!**************************************************************************!*\ |
| 526 |
!*** ../modules/notifications/assets/js/components/wrapper-with-link.js ***! |
| 527 |
\**************************************************************************/ |
| 528 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 529 |
|
| 530 |
"use strict"; |
| 531 |
/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); |
| 532 |
|
| 533 |
|
| 534 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 535 |
Object.defineProperty(exports, "__esModule", ({ |
| 536 |
value: true |
| 537 |
})); |
| 538 |
exports.WrapperWithLink = void 0; |
| 539 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 540 |
var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 541 |
var WrapperWithLink = exports.WrapperWithLink = function WrapperWithLink(props) { |
| 542 |
var link = props.link, |
| 543 |
children = props.children; |
| 544 |
if (!link) { |
| 545 |
return children; |
| 546 |
} |
| 547 |
return /*#__PURE__*/_react.default.createElement(_ui.Link, { |
| 548 |
href: link, |
| 549 |
target: "_blank", |
| 550 |
underline: "none", |
| 551 |
color: "inherit", |
| 552 |
sx: { |
| 553 |
'&:hover': { |
| 554 |
color: 'inherit' |
| 555 |
} |
| 556 |
} |
| 557 |
}, children); |
| 558 |
}; |
| 559 |
WrapperWithLink.propTypes = { |
| 560 |
link: PropTypes.string, |
| 561 |
children: PropTypes.any.isRequired |
| 562 |
}; |
| 563 |
|
| 564 |
/***/ }), |
| 565 |
|
| 566 |
/***/ "../modules/notifications/assets/js/icons/x-icon.js": |
| 567 |
/*!**********************************************************!*\ |
| 568 |
!*** ../modules/notifications/assets/js/icons/x-icon.js ***! |
| 569 |
\**********************************************************/ |
| 570 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 571 |
|
| 572 |
"use strict"; |
| 573 |
|
| 574 |
|
| 575 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 576 |
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 577 |
Object.defineProperty(exports, "__esModule", ({ |
| 578 |
value: true |
| 579 |
})); |
| 580 |
exports.XIcon = void 0; |
| 581 |
var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 582 |
var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js")); |
| 583 |
var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 584 |
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } |
| 585 |
var XIcon = exports.XIcon = (0, _react.forwardRef)(function (props, ref) { |
| 586 |
return /*#__PURE__*/_react.default.createElement(_ui.SvgIcon, (0, _extends2.default)({ |
| 587 |
viewBox: "0 0 24 24" |
| 588 |
}, props, { |
| 589 |
ref: ref |
| 590 |
}), /*#__PURE__*/_react.default.createElement("path", { |
| 591 |
fillRule: "evenodd", |
| 592 |
clipRule: "evenodd", |
| 593 |
d: "M18.5303 5.46967C18.8232 5.76256 18.8232 6.23744 18.5303 6.53033L6.53033 18.5303C6.23744 18.8232 5.76256 18.8232 5.46967 18.5303C5.17678 18.2374 5.17678 17.7626 5.46967 17.4697L17.4697 5.46967C17.7626 5.17678 18.2374 5.17678 18.5303 5.46967Z" |
| 594 |
}), /*#__PURE__*/_react.default.createElement("path", { |
| 595 |
fillRule: "evenodd", |
| 596 |
clipRule: "evenodd", |
| 597 |
d: "M5.46967 5.46967C5.76256 5.17678 6.23744 5.17678 6.53033 5.46967L18.5303 17.4697C18.8232 17.7626 18.8232 18.2374 18.5303 18.5303C18.2374 18.8232 17.7626 18.8232 17.4697 18.5303L5.46967 6.53033C5.17678 6.23744 5.17678 5.76256 5.46967 5.46967Z" |
| 598 |
})); |
| 599 |
}); |
| 600 |
|
| 601 |
/***/ }), |
| 602 |
|
| 603 |
/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": |
| 604 |
/*!******************************************************************!*\ |
| 605 |
!*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! |
| 606 |
\******************************************************************/ |
| 607 |
/***/ ((module) => { |
| 608 |
|
| 609 |
function _arrayLikeToArray(r, a) { |
| 610 |
(null == a || a > r.length) && (a = r.length); |
| 611 |
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; |
| 612 |
return n; |
| 613 |
} |
| 614 |
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 615 |
|
| 616 |
/***/ }), |
| 617 |
|
| 618 |
/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": |
| 619 |
/*!****************************************************************!*\ |
| 620 |
!*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! |
| 621 |
\****************************************************************/ |
| 622 |
/***/ ((module) => { |
| 623 |
|
| 624 |
function _arrayWithHoles(r) { |
| 625 |
if (Array.isArray(r)) return r; |
| 626 |
} |
| 627 |
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 628 |
|
| 629 |
/***/ }), |
| 630 |
|
| 631 |
/***/ "../node_modules/@babel/runtime/helpers/extends.js": |
| 632 |
/*!*********************************************************!*\ |
| 633 |
!*** ../node_modules/@babel/runtime/helpers/extends.js ***! |
| 634 |
\*********************************************************/ |
| 635 |
/***/ ((module) => { |
| 636 |
|
| 637 |
function _extends() { |
| 638 |
return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) { |
| 639 |
for (var e = 1; e < arguments.length; e++) { |
| 640 |
var t = arguments[e]; |
| 641 |
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); |
| 642 |
} |
| 643 |
return n; |
| 644 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments); |
| 645 |
} |
| 646 |
module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 647 |
|
| 648 |
/***/ }), |
| 649 |
|
| 650 |
/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": |
| 651 |
/*!***********************************************************************!*\ |
| 652 |
!*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! |
| 653 |
\***********************************************************************/ |
| 654 |
/***/ ((module) => { |
| 655 |
|
| 656 |
function _interopRequireDefault(e) { |
| 657 |
return e && e.__esModule ? e : { |
| 658 |
"default": e |
| 659 |
}; |
| 660 |
} |
| 661 |
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 662 |
|
| 663 |
/***/ }), |
| 664 |
|
| 665 |
/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": |
| 666 |
/*!**********************************************************************!*\ |
| 667 |
!*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! |
| 668 |
\**********************************************************************/ |
| 669 |
/***/ ((module) => { |
| 670 |
|
| 671 |
function _iterableToArrayLimit(r, l) { |
| 672 |
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; |
| 673 |
if (null != t) { |
| 674 |
var e, |
| 675 |
n, |
| 676 |
i, |
| 677 |
u, |
| 678 |
a = [], |
| 679 |
f = !0, |
| 680 |
o = !1; |
| 681 |
try { |
| 682 |
if (i = (t = t.call(r)).next, 0 === l) { |
| 683 |
if (Object(t) !== t) return; |
| 684 |
f = !1; |
| 685 |
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); |
| 686 |
} catch (r) { |
| 687 |
o = !0, n = r; |
| 688 |
} finally { |
| 689 |
try { |
| 690 |
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; |
| 691 |
} finally { |
| 692 |
if (o) throw n; |
| 693 |
} |
| 694 |
} |
| 695 |
return a; |
| 696 |
} |
| 697 |
} |
| 698 |
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 699 |
|
| 700 |
/***/ }), |
| 701 |
|
| 702 |
/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": |
| 703 |
/*!*****************************************************************!*\ |
| 704 |
!*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! |
| 705 |
\*****************************************************************/ |
| 706 |
/***/ ((module) => { |
| 707 |
|
| 708 |
function _nonIterableRest() { |
| 709 |
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 710 |
} |
| 711 |
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 712 |
|
| 713 |
/***/ }), |
| 714 |
|
| 715 |
/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": |
| 716 |
/*!***************************************************************!*\ |
| 717 |
!*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! |
| 718 |
\***************************************************************/ |
| 719 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 720 |
|
| 721 |
var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); |
| 722 |
var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); |
| 723 |
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); |
| 724 |
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); |
| 725 |
function _slicedToArray(r, e) { |
| 726 |
return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); |
| 727 |
} |
| 728 |
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 729 |
|
| 730 |
/***/ }), |
| 731 |
|
| 732 |
/***/ "../node_modules/@babel/runtime/helpers/typeof.js": |
| 733 |
/*!********************************************************!*\ |
| 734 |
!*** ../node_modules/@babel/runtime/helpers/typeof.js ***! |
| 735 |
\********************************************************/ |
| 736 |
/***/ ((module) => { |
| 737 |
|
| 738 |
function _typeof(o) { |
| 739 |
"@babel/helpers - typeof"; |
| 740 |
|
| 741 |
return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { |
| 742 |
return typeof o; |
| 743 |
} : function (o) { |
| 744 |
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; |
| 745 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); |
| 746 |
} |
| 747 |
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 748 |
|
| 749 |
/***/ }), |
| 750 |
|
| 751 |
/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": |
| 752 |
/*!****************************************************************************!*\ |
| 753 |
!*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! |
| 754 |
\****************************************************************************/ |
| 755 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 756 |
|
| 757 |
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); |
| 758 |
function _unsupportedIterableToArray(r, a) { |
| 759 |
if (r) { |
| 760 |
if ("string" == typeof r) return arrayLikeToArray(r, a); |
| 761 |
var t = {}.toString.call(r).slice(8, -1); |
| 762 |
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0; |
| 763 |
} |
| 764 |
} |
| 765 |
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 766 |
|
| 767 |
/***/ }), |
| 768 |
|
| 769 |
/***/ "../node_modules/object-assign/index.js": |
| 770 |
/*!**********************************************!*\ |
| 771 |
!*** ../node_modules/object-assign/index.js ***! |
| 772 |
\**********************************************/ |
| 773 |
/***/ ((module) => { |
| 774 |
|
| 775 |
"use strict"; |
| 776 |
/* |
| 777 |
object-assign |
| 778 |
(c) Sindre Sorhus |
| 779 |
@license MIT |
| 780 |
*/ |
| 781 |
|
| 782 |
|
| 783 |
/* eslint-disable no-unused-vars */ |
| 784 |
var getOwnPropertySymbols = Object.getOwnPropertySymbols; |
| 785 |
var hasOwnProperty = Object.prototype.hasOwnProperty; |
| 786 |
var propIsEnumerable = Object.prototype.propertyIsEnumerable; |
| 787 |
|
| 788 |
function toObject(val) { |
| 789 |
if (val === null || val === undefined) { |
| 790 |
throw new TypeError('Object.assign cannot be called with null or undefined'); |
| 791 |
} |
| 792 |
|
| 793 |
return Object(val); |
| 794 |
} |
| 795 |
|
| 796 |
function shouldUseNative() { |
| 797 |
try { |
| 798 |
if (!Object.assign) { |
| 799 |
return false; |
| 800 |
} |
| 801 |
|
| 802 |
// Detect buggy property enumeration order in older V8 versions. |
| 803 |
|
| 804 |
// https://bugs.chromium.org/p/v8/issues/detail?id=4118 |
| 805 |
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers |
| 806 |
test1[5] = 'de'; |
| 807 |
if (Object.getOwnPropertyNames(test1)[0] === '5') { |
| 808 |
return false; |
| 809 |
} |
| 810 |
|
| 811 |
// https://bugs.chromium.org/p/v8/issues/detail?id=3056 |
| 812 |
var test2 = {}; |
| 813 |
for (var i = 0; i < 10; i++) { |
| 814 |
test2['_' + String.fromCharCode(i)] = i; |
| 815 |
} |
| 816 |
var order2 = Object.getOwnPropertyNames(test2).map(function (n) { |
| 817 |
return test2[n]; |
| 818 |
}); |
| 819 |
if (order2.join('') !== '0123456789') { |
| 820 |
return false; |
| 821 |
} |
| 822 |
|
| 823 |
// https://bugs.chromium.org/p/v8/issues/detail?id=3056 |
| 824 |
var test3 = {}; |
| 825 |
'abcdefghijklmnopqrst'.split('').forEach(function (letter) { |
| 826 |
test3[letter] = letter; |
| 827 |
}); |
| 828 |
if (Object.keys(Object.assign({}, test3)).join('') !== |
| 829 |
'abcdefghijklmnopqrst') { |
| 830 |
return false; |
| 831 |
} |
| 832 |
|
| 833 |
return true; |
| 834 |
} catch (err) { |
| 835 |
// We don't expect any of the above to throw, but better to be safe. |
| 836 |
return false; |
| 837 |
} |
| 838 |
} |
| 839 |
|
| 840 |
module.exports = shouldUseNative() ? Object.assign : function (target, source) { |
| 841 |
var from; |
| 842 |
var to = toObject(target); |
| 843 |
var symbols; |
| 844 |
|
| 845 |
for (var s = 1; s < arguments.length; s++) { |
| 846 |
from = Object(arguments[s]); |
| 847 |
|
| 848 |
for (var key in from) { |
| 849 |
if (hasOwnProperty.call(from, key)) { |
| 850 |
to[key] = from[key]; |
| 851 |
} |
| 852 |
} |
| 853 |
|
| 854 |
if (getOwnPropertySymbols) { |
| 855 |
symbols = getOwnPropertySymbols(from); |
| 856 |
for (var i = 0; i < symbols.length; i++) { |
| 857 |
if (propIsEnumerable.call(from, symbols[i])) { |
| 858 |
to[symbols[i]] = from[symbols[i]]; |
| 859 |
} |
| 860 |
} |
| 861 |
} |
| 862 |
} |
| 863 |
|
| 864 |
return to; |
| 865 |
}; |
| 866 |
|
| 867 |
|
| 868 |
/***/ }), |
| 869 |
|
| 870 |
/***/ "../node_modules/prop-types/checkPropTypes.js": |
| 871 |
/*!****************************************************!*\ |
| 872 |
!*** ../node_modules/prop-types/checkPropTypes.js ***! |
| 873 |
\****************************************************/ |
| 874 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 875 |
|
| 876 |
"use strict"; |
| 877 |
/** |
| 878 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 879 |
* |
| 880 |
* This source code is licensed under the MIT license found in the |
| 881 |
* LICENSE file in the root directory of this source tree. |
| 882 |
*/ |
| 883 |
|
| 884 |
|
| 885 |
|
| 886 |
var printWarning = function() {}; |
| 887 |
|
| 888 |
if (true) { |
| 889 |
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"); |
| 890 |
var loggedTypeFailures = {}; |
| 891 |
var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js"); |
| 892 |
|
| 893 |
printWarning = function(text) { |
| 894 |
var message = 'Warning: ' + text; |
| 895 |
if (typeof console !== 'undefined') { |
| 896 |
console.error(message); |
| 897 |
} |
| 898 |
try { |
| 899 |
// --- Welcome to debugging React --- |
| 900 |
// This error was thrown as a convenience so that you can use this stack |
| 901 |
// to find the callsite that caused this warning to fire. |
| 902 |
throw new Error(message); |
| 903 |
} catch (x) { /**/ } |
| 904 |
}; |
| 905 |
} |
| 906 |
|
| 907 |
/** |
| 908 |
* Assert that the values match with the type specs. |
| 909 |
* Error messages are memorized and will only be shown once. |
| 910 |
* |
| 911 |
* @param {object} typeSpecs Map of name to a ReactPropType |
| 912 |
* @param {object} values Runtime values that need to be type-checked |
| 913 |
* @param {string} location e.g. "prop", "context", "child context" |
| 914 |
* @param {string} componentName Name of the component for error messages. |
| 915 |
* @param {?Function} getStack Returns the component stack. |
| 916 |
* @private |
| 917 |
*/ |
| 918 |
function checkPropTypes(typeSpecs, values, location, componentName, getStack) { |
| 919 |
if (true) { |
| 920 |
for (var typeSpecName in typeSpecs) { |
| 921 |
if (has(typeSpecs, typeSpecName)) { |
| 922 |
var error; |
| 923 |
// Prop type validation may throw. In case they do, we don't want to |
| 924 |
// fail the render phase where it didn't fail before. So we log it. |
| 925 |
// After these have been cleaned up, we'll let them throw. |
| 926 |
try { |
| 927 |
// This is intentionally an invariant that gets caught. It's the same |
| 928 |
// behavior as without this statement except with a better message. |
| 929 |
if (typeof typeSpecs[typeSpecName] !== 'function') { |
| 930 |
var err = Error( |
| 931 |
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + |
| 932 |
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + |
| 933 |
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.' |
| 934 |
); |
| 935 |
err.name = 'Invariant Violation'; |
| 936 |
throw err; |
| 937 |
} |
| 938 |
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); |
| 939 |
} catch (ex) { |
| 940 |
error = ex; |
| 941 |
} |
| 942 |
if (error && !(error instanceof Error)) { |
| 943 |
printWarning( |
| 944 |
(componentName || 'React class') + ': type specification of ' + |
| 945 |
location + ' `' + typeSpecName + '` is invalid; the type checker ' + |
| 946 |
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + |
| 947 |
'You may have forgotten to pass an argument to the type checker ' + |
| 948 |
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + |
| 949 |
'shape all require an argument).' |
| 950 |
); |
| 951 |
} |
| 952 |
if (error instanceof Error && !(error.message in loggedTypeFailures)) { |
| 953 |
// Only monitor this failure once because there tends to be a lot of the |
| 954 |
// same error. |
| 955 |
loggedTypeFailures[error.message] = true; |
| 956 |
|
| 957 |
var stack = getStack ? getStack() : ''; |
| 958 |
|
| 959 |
printWarning( |
| 960 |
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') |
| 961 |
); |
| 962 |
} |
| 963 |
} |
| 964 |
} |
| 965 |
} |
| 966 |
} |
| 967 |
|
| 968 |
/** |
| 969 |
* Resets warning cache when testing. |
| 970 |
* |
| 971 |
* @private |
| 972 |
*/ |
| 973 |
checkPropTypes.resetWarningCache = function() { |
| 974 |
if (true) { |
| 975 |
loggedTypeFailures = {}; |
| 976 |
} |
| 977 |
} |
| 978 |
|
| 979 |
module.exports = checkPropTypes; |
| 980 |
|
| 981 |
|
| 982 |
/***/ }), |
| 983 |
|
| 984 |
/***/ "../node_modules/prop-types/factoryWithTypeCheckers.js": |
| 985 |
/*!*************************************************************!*\ |
| 986 |
!*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***! |
| 987 |
\*************************************************************/ |
| 988 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 989 |
|
| 990 |
"use strict"; |
| 991 |
/** |
| 992 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 993 |
* |
| 994 |
* This source code is licensed under the MIT license found in the |
| 995 |
* LICENSE file in the root directory of this source tree. |
| 996 |
*/ |
| 997 |
|
| 998 |
|
| 999 |
|
| 1000 |
var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js"); |
| 1001 |
var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js"); |
| 1002 |
|
| 1003 |
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"); |
| 1004 |
var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js"); |
| 1005 |
var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js"); |
| 1006 |
|
| 1007 |
var printWarning = function() {}; |
| 1008 |
|
| 1009 |
if (true) { |
| 1010 |
printWarning = function(text) { |
| 1011 |
var message = 'Warning: ' + text; |
| 1012 |
if (typeof console !== 'undefined') { |
| 1013 |
console.error(message); |
| 1014 |
} |
| 1015 |
try { |
| 1016 |
// --- Welcome to debugging React --- |
| 1017 |
// This error was thrown as a convenience so that you can use this stack |
| 1018 |
// to find the callsite that caused this warning to fire. |
| 1019 |
throw new Error(message); |
| 1020 |
} catch (x) {} |
| 1021 |
}; |
| 1022 |
} |
| 1023 |
|
| 1024 |
function emptyFunctionThatReturnsNull() { |
| 1025 |
return null; |
| 1026 |
} |
| 1027 |
|
| 1028 |
module.exports = function(isValidElement, throwOnDirectAccess) { |
| 1029 |
/* global Symbol */ |
| 1030 |
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; |
| 1031 |
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. |
| 1032 |
|
| 1033 |
/** |
| 1034 |
* Returns the iterator method function contained on the iterable object. |
| 1035 |
* |
| 1036 |
* Be sure to invoke the function with the iterable as context: |
| 1037 |
* |
| 1038 |
* var iteratorFn = getIteratorFn(myIterable); |
| 1039 |
* if (iteratorFn) { |
| 1040 |
* var iterator = iteratorFn.call(myIterable); |
| 1041 |
* ... |
| 1042 |
* } |
| 1043 |
* |
| 1044 |
* @param {?object} maybeIterable |
| 1045 |
* @return {?function} |
| 1046 |
*/ |
| 1047 |
function getIteratorFn(maybeIterable) { |
| 1048 |
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); |
| 1049 |
if (typeof iteratorFn === 'function') { |
| 1050 |
return iteratorFn; |
| 1051 |
} |
| 1052 |
} |
| 1053 |
|
| 1054 |
/** |
| 1055 |
* Collection of methods that allow declaration and validation of props that are |
| 1056 |
* supplied to React components. Example usage: |
| 1057 |
* |
| 1058 |
* var Props = require('ReactPropTypes'); |
| 1059 |
* var MyArticle = React.createClass({ |
| 1060 |
* propTypes: { |
| 1061 |
* // An optional string prop named "description". |
| 1062 |
* description: Props.string, |
| 1063 |
* |
| 1064 |
* // A required enum prop named "category". |
| 1065 |
* category: Props.oneOf(['News','Photos']).isRequired, |
| 1066 |
* |
| 1067 |
* // A prop named "dialog" that requires an instance of Dialog. |
| 1068 |
* dialog: Props.instanceOf(Dialog).isRequired |
| 1069 |
* }, |
| 1070 |
* render: function() { ... } |
| 1071 |
* }); |
| 1072 |
* |
| 1073 |
* A more formal specification of how these methods are used: |
| 1074 |
* |
| 1075 |
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) |
| 1076 |
* decl := ReactPropTypes.{type}(.isRequired)? |
| 1077 |
* |
| 1078 |
* Each and every declaration produces a function with the same signature. This |
| 1079 |
* allows the creation of custom validation functions. For example: |
| 1080 |
* |
| 1081 |
* var MyLink = React.createClass({ |
| 1082 |
* propTypes: { |
| 1083 |
* // An optional string or URI prop named "href". |
| 1084 |
* href: function(props, propName, componentName) { |
| 1085 |
* var propValue = props[propName]; |
| 1086 |
* if (propValue != null && typeof propValue !== 'string' && |
| 1087 |
* !(propValue instanceof URI)) { |
| 1088 |
* return new Error( |
| 1089 |
* 'Expected a string or an URI for ' + propName + ' in ' + |
| 1090 |
* componentName |
| 1091 |
* ); |
| 1092 |
* } |
| 1093 |
* } |
| 1094 |
* }, |
| 1095 |
* render: function() {...} |
| 1096 |
* }); |
| 1097 |
* |
| 1098 |
* @internal |
| 1099 |
*/ |
| 1100 |
|
| 1101 |
var ANONYMOUS = '<<anonymous>>'; |
| 1102 |
|
| 1103 |
// Important! |
| 1104 |
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`. |
| 1105 |
var ReactPropTypes = { |
| 1106 |
array: createPrimitiveTypeChecker('array'), |
| 1107 |
bigint: createPrimitiveTypeChecker('bigint'), |
| 1108 |
bool: createPrimitiveTypeChecker('boolean'), |
| 1109 |
func: createPrimitiveTypeChecker('function'), |
| 1110 |
number: createPrimitiveTypeChecker('number'), |
| 1111 |
object: createPrimitiveTypeChecker('object'), |
| 1112 |
string: createPrimitiveTypeChecker('string'), |
| 1113 |
symbol: createPrimitiveTypeChecker('symbol'), |
| 1114 |
|
| 1115 |
any: createAnyTypeChecker(), |
| 1116 |
arrayOf: createArrayOfTypeChecker, |
| 1117 |
element: createElementTypeChecker(), |
| 1118 |
elementType: createElementTypeTypeChecker(), |
| 1119 |
instanceOf: createInstanceTypeChecker, |
| 1120 |
node: createNodeChecker(), |
| 1121 |
objectOf: createObjectOfTypeChecker, |
| 1122 |
oneOf: createEnumTypeChecker, |
| 1123 |
oneOfType: createUnionTypeChecker, |
| 1124 |
shape: createShapeTypeChecker, |
| 1125 |
exact: createStrictShapeTypeChecker, |
| 1126 |
}; |
| 1127 |
|
| 1128 |
/** |
| 1129 |
* inlined Object.is polyfill to avoid requiring consumers ship their own |
| 1130 |
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is |
| 1131 |
*/ |
| 1132 |
/*eslint-disable no-self-compare*/ |
| 1133 |
function is(x, y) { |
| 1134 |
// SameValue algorithm |
| 1135 |
if (x === y) { |
| 1136 |
// Steps 1-5, 7-10 |
| 1137 |
// Steps 6.b-6.e: +0 != -0 |
| 1138 |
return x !== 0 || 1 / x === 1 / y; |
| 1139 |
} else { |
| 1140 |
// Step 6.a: NaN == NaN |
| 1141 |
return x !== x && y !== y; |
| 1142 |
} |
| 1143 |
} |
| 1144 |
/*eslint-enable no-self-compare*/ |
| 1145 |
|
| 1146 |
/** |
| 1147 |
* We use an Error-like object for backward compatibility as people may call |
| 1148 |
* PropTypes directly and inspect their output. However, we don't use real |
| 1149 |
* Errors anymore. We don't inspect their stack anyway, and creating them |
| 1150 |
* is prohibitively expensive if they are created too often, such as what |
| 1151 |
* happens in oneOfType() for any type before the one that matched. |
| 1152 |
*/ |
| 1153 |
function PropTypeError(message, data) { |
| 1154 |
this.message = message; |
| 1155 |
this.data = data && typeof data === 'object' ? data: {}; |
| 1156 |
this.stack = ''; |
| 1157 |
} |
| 1158 |
// Make `instanceof Error` still work for returned errors. |
| 1159 |
PropTypeError.prototype = Error.prototype; |
| 1160 |
|
| 1161 |
function createChainableTypeChecker(validate) { |
| 1162 |
if (true) { |
| 1163 |
var manualPropTypeCallCache = {}; |
| 1164 |
var manualPropTypeWarningCount = 0; |
| 1165 |
} |
| 1166 |
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { |
| 1167 |
componentName = componentName || ANONYMOUS; |
| 1168 |
propFullName = propFullName || propName; |
| 1169 |
|
| 1170 |
if (secret !== ReactPropTypesSecret) { |
| 1171 |
if (throwOnDirectAccess) { |
| 1172 |
// New behavior only for users of `prop-types` package |
| 1173 |
var err = new Error( |
| 1174 |
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + |
| 1175 |
'Use `PropTypes.checkPropTypes()` to call them. ' + |
| 1176 |
'Read more at http://fb.me/use-check-prop-types' |
| 1177 |
); |
| 1178 |
err.name = 'Invariant Violation'; |
| 1179 |
throw err; |
| 1180 |
} else if ( true && typeof console !== 'undefined') { |
| 1181 |
// Old behavior for people using React.PropTypes |
| 1182 |
var cacheKey = componentName + ':' + propName; |
| 1183 |
if ( |
| 1184 |
!manualPropTypeCallCache[cacheKey] && |
| 1185 |
// Avoid spamming the console because they are often not actionable except for lib authors |
| 1186 |
manualPropTypeWarningCount < 3 |
| 1187 |
) { |
| 1188 |
printWarning( |
| 1189 |
'You are manually calling a React.PropTypes validation ' + |
| 1190 |
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + |
| 1191 |
'and will throw in the standalone `prop-types` package. ' + |
| 1192 |
'You may be seeing this warning due to a third-party PropTypes ' + |
| 1193 |
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' |
| 1194 |
); |
| 1195 |
manualPropTypeCallCache[cacheKey] = true; |
| 1196 |
manualPropTypeWarningCount++; |
| 1197 |
} |
| 1198 |
} |
| 1199 |
} |
| 1200 |
if (props[propName] == null) { |
| 1201 |
if (isRequired) { |
| 1202 |
if (props[propName] === null) { |
| 1203 |
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); |
| 1204 |
} |
| 1205 |
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); |
| 1206 |
} |
| 1207 |
return null; |
| 1208 |
} else { |
| 1209 |
return validate(props, propName, componentName, location, propFullName); |
| 1210 |
} |
| 1211 |
} |
| 1212 |
|
| 1213 |
var chainedCheckType = checkType.bind(null, false); |
| 1214 |
chainedCheckType.isRequired = checkType.bind(null, true); |
| 1215 |
|
| 1216 |
return chainedCheckType; |
| 1217 |
} |
| 1218 |
|
| 1219 |
function createPrimitiveTypeChecker(expectedType) { |
| 1220 |
function validate(props, propName, componentName, location, propFullName, secret) { |
| 1221 |
var propValue = props[propName]; |
| 1222 |
var propType = getPropType(propValue); |
| 1223 |
if (propType !== expectedType) { |
| 1224 |
// `propValue` being instance of, say, date/regexp, pass the 'object' |
| 1225 |
// check, but we can offer a more precise error message here rather than |
| 1226 |
// 'of type `object`'. |
| 1227 |
var preciseType = getPreciseType(propValue); |
| 1228 |
|
| 1229 |
return new PropTypeError( |
| 1230 |
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), |
| 1231 |
{expectedType: expectedType} |
| 1232 |
); |
| 1233 |
} |
| 1234 |
return null; |
| 1235 |
} |
| 1236 |
return createChainableTypeChecker(validate); |
| 1237 |
} |
| 1238 |
|
| 1239 |
function createAnyTypeChecker() { |
| 1240 |
return createChainableTypeChecker(emptyFunctionThatReturnsNull); |
| 1241 |
} |
| 1242 |
|
| 1243 |
function createArrayOfTypeChecker(typeChecker) { |
| 1244 |
function validate(props, propName, componentName, location, propFullName) { |
| 1245 |
if (typeof typeChecker !== 'function') { |
| 1246 |
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); |
| 1247 |
} |
| 1248 |
var propValue = props[propName]; |
| 1249 |
if (!Array.isArray(propValue)) { |
| 1250 |
var propType = getPropType(propValue); |
| 1251 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); |
| 1252 |
} |
| 1253 |
for (var i = 0; i < propValue.length; i++) { |
| 1254 |
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); |
| 1255 |
if (error instanceof Error) { |
| 1256 |
return error; |
| 1257 |
} |
| 1258 |
} |
| 1259 |
return null; |
| 1260 |
} |
| 1261 |
return createChainableTypeChecker(validate); |
| 1262 |
} |
| 1263 |
|
| 1264 |
function createElementTypeChecker() { |
| 1265 |
function validate(props, propName, componentName, location, propFullName) { |
| 1266 |
var propValue = props[propName]; |
| 1267 |
if (!isValidElement(propValue)) { |
| 1268 |
var propType = getPropType(propValue); |
| 1269 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); |
| 1270 |
} |
| 1271 |
return null; |
| 1272 |
} |
| 1273 |
return createChainableTypeChecker(validate); |
| 1274 |
} |
| 1275 |
|
| 1276 |
function createElementTypeTypeChecker() { |
| 1277 |
function validate(props, propName, componentName, location, propFullName) { |
| 1278 |
var propValue = props[propName]; |
| 1279 |
if (!ReactIs.isValidElementType(propValue)) { |
| 1280 |
var propType = getPropType(propValue); |
| 1281 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); |
| 1282 |
} |
| 1283 |
return null; |
| 1284 |
} |
| 1285 |
return createChainableTypeChecker(validate); |
| 1286 |
} |
| 1287 |
|
| 1288 |
function createInstanceTypeChecker(expectedClass) { |
| 1289 |
function validate(props, propName, componentName, location, propFullName) { |
| 1290 |
if (!(props[propName] instanceof expectedClass)) { |
| 1291 |
var expectedClassName = expectedClass.name || ANONYMOUS; |
| 1292 |
var actualClassName = getClassName(props[propName]); |
| 1293 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); |
| 1294 |
} |
| 1295 |
return null; |
| 1296 |
} |
| 1297 |
return createChainableTypeChecker(validate); |
| 1298 |
} |
| 1299 |
|
| 1300 |
function createEnumTypeChecker(expectedValues) { |
| 1301 |
if (!Array.isArray(expectedValues)) { |
| 1302 |
if (true) { |
| 1303 |
if (arguments.length > 1) { |
| 1304 |
printWarning( |
| 1305 |
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + |
| 1306 |
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' |
| 1307 |
); |
| 1308 |
} else { |
| 1309 |
printWarning('Invalid argument supplied to oneOf, expected an array.'); |
| 1310 |
} |
| 1311 |
} |
| 1312 |
return emptyFunctionThatReturnsNull; |
| 1313 |
} |
| 1314 |
|
| 1315 |
function validate(props, propName, componentName, location, propFullName) { |
| 1316 |
var propValue = props[propName]; |
| 1317 |
for (var i = 0; i < expectedValues.length; i++) { |
| 1318 |
if (is(propValue, expectedValues[i])) { |
| 1319 |
return null; |
| 1320 |
} |
| 1321 |
} |
| 1322 |
|
| 1323 |
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { |
| 1324 |
var type = getPreciseType(value); |
| 1325 |
if (type === 'symbol') { |
| 1326 |
return String(value); |
| 1327 |
} |
| 1328 |
return value; |
| 1329 |
}); |
| 1330 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); |
| 1331 |
} |
| 1332 |
return createChainableTypeChecker(validate); |
| 1333 |
} |
| 1334 |
|
| 1335 |
function createObjectOfTypeChecker(typeChecker) { |
| 1336 |
function validate(props, propName, componentName, location, propFullName) { |
| 1337 |
if (typeof typeChecker !== 'function') { |
| 1338 |
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); |
| 1339 |
} |
| 1340 |
var propValue = props[propName]; |
| 1341 |
var propType = getPropType(propValue); |
| 1342 |
if (propType !== 'object') { |
| 1343 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); |
| 1344 |
} |
| 1345 |
for (var key in propValue) { |
| 1346 |
if (has(propValue, key)) { |
| 1347 |
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
| 1348 |
if (error instanceof Error) { |
| 1349 |
return error; |
| 1350 |
} |
| 1351 |
} |
| 1352 |
} |
| 1353 |
return null; |
| 1354 |
} |
| 1355 |
return createChainableTypeChecker(validate); |
| 1356 |
} |
| 1357 |
|
| 1358 |
function createUnionTypeChecker(arrayOfTypeCheckers) { |
| 1359 |
if (!Array.isArray(arrayOfTypeCheckers)) { |
| 1360 |
true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0; |
| 1361 |
return emptyFunctionThatReturnsNull; |
| 1362 |
} |
| 1363 |
|
| 1364 |
for (var i = 0; i < arrayOfTypeCheckers.length; i++) { |
| 1365 |
var checker = arrayOfTypeCheckers[i]; |
| 1366 |
if (typeof checker !== 'function') { |
| 1367 |
printWarning( |
| 1368 |
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + |
| 1369 |
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' |
| 1370 |
); |
| 1371 |
return emptyFunctionThatReturnsNull; |
| 1372 |
} |
| 1373 |
} |
| 1374 |
|
| 1375 |
function validate(props, propName, componentName, location, propFullName) { |
| 1376 |
var expectedTypes = []; |
| 1377 |
for (var i = 0; i < arrayOfTypeCheckers.length; i++) { |
| 1378 |
var checker = arrayOfTypeCheckers[i]; |
| 1379 |
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret); |
| 1380 |
if (checkerResult == null) { |
| 1381 |
return null; |
| 1382 |
} |
| 1383 |
if (checkerResult.data && has(checkerResult.data, 'expectedType')) { |
| 1384 |
expectedTypes.push(checkerResult.data.expectedType); |
| 1385 |
} |
| 1386 |
} |
| 1387 |
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': ''; |
| 1388 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.')); |
| 1389 |
} |
| 1390 |
return createChainableTypeChecker(validate); |
| 1391 |
} |
| 1392 |
|
| 1393 |
function createNodeChecker() { |
| 1394 |
function validate(props, propName, componentName, location, propFullName) { |
| 1395 |
if (!isNode(props[propName])) { |
| 1396 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); |
| 1397 |
} |
| 1398 |
return null; |
| 1399 |
} |
| 1400 |
return createChainableTypeChecker(validate); |
| 1401 |
} |
| 1402 |
|
| 1403 |
function invalidValidatorError(componentName, location, propFullName, key, type) { |
| 1404 |
return new PropTypeError( |
| 1405 |
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + |
| 1406 |
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.' |
| 1407 |
); |
| 1408 |
} |
| 1409 |
|
| 1410 |
function createShapeTypeChecker(shapeTypes) { |
| 1411 |
function validate(props, propName, componentName, location, propFullName) { |
| 1412 |
var propValue = props[propName]; |
| 1413 |
var propType = getPropType(propValue); |
| 1414 |
if (propType !== 'object') { |
| 1415 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); |
| 1416 |
} |
| 1417 |
for (var key in shapeTypes) { |
| 1418 |
var checker = shapeTypes[key]; |
| 1419 |
if (typeof checker !== 'function') { |
| 1420 |
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); |
| 1421 |
} |
| 1422 |
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
| 1423 |
if (error) { |
| 1424 |
return error; |
| 1425 |
} |
| 1426 |
} |
| 1427 |
return null; |
| 1428 |
} |
| 1429 |
return createChainableTypeChecker(validate); |
| 1430 |
} |
| 1431 |
|
| 1432 |
function createStrictShapeTypeChecker(shapeTypes) { |
| 1433 |
function validate(props, propName, componentName, location, propFullName) { |
| 1434 |
var propValue = props[propName]; |
| 1435 |
var propType = getPropType(propValue); |
| 1436 |
if (propType !== 'object') { |
| 1437 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); |
| 1438 |
} |
| 1439 |
// We need to check all keys in case some are required but missing from props. |
| 1440 |
var allKeys = assign({}, props[propName], shapeTypes); |
| 1441 |
for (var key in allKeys) { |
| 1442 |
var checker = shapeTypes[key]; |
| 1443 |
if (has(shapeTypes, key) && typeof checker !== 'function') { |
| 1444 |
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); |
| 1445 |
} |
| 1446 |
if (!checker) { |
| 1447 |
return new PropTypeError( |
| 1448 |
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + |
| 1449 |
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') + |
| 1450 |
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') |
| 1451 |
); |
| 1452 |
} |
| 1453 |
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
| 1454 |
if (error) { |
| 1455 |
return error; |
| 1456 |
} |
| 1457 |
} |
| 1458 |
return null; |
| 1459 |
} |
| 1460 |
|
| 1461 |
return createChainableTypeChecker(validate); |
| 1462 |
} |
| 1463 |
|
| 1464 |
function isNode(propValue) { |
| 1465 |
switch (typeof propValue) { |
| 1466 |
case 'number': |
| 1467 |
case 'string': |
| 1468 |
case 'undefined': |
| 1469 |
return true; |
| 1470 |
case 'boolean': |
| 1471 |
return !propValue; |
| 1472 |
case 'object': |
| 1473 |
if (Array.isArray(propValue)) { |
| 1474 |
return propValue.every(isNode); |
| 1475 |
} |
| 1476 |
if (propValue === null || isValidElement(propValue)) { |
| 1477 |
return true; |
| 1478 |
} |
| 1479 |
|
| 1480 |
var iteratorFn = getIteratorFn(propValue); |
| 1481 |
if (iteratorFn) { |
| 1482 |
var iterator = iteratorFn.call(propValue); |
| 1483 |
var step; |
| 1484 |
if (iteratorFn !== propValue.entries) { |
| 1485 |
while (!(step = iterator.next()).done) { |
| 1486 |
if (!isNode(step.value)) { |
| 1487 |
return false; |
| 1488 |
} |
| 1489 |
} |
| 1490 |
} else { |
| 1491 |
// Iterator will provide entry [k,v] tuples rather than values. |
| 1492 |
while (!(step = iterator.next()).done) { |
| 1493 |
var entry = step.value; |
| 1494 |
if (entry) { |
| 1495 |
if (!isNode(entry[1])) { |
| 1496 |
return false; |
| 1497 |
} |
| 1498 |
} |
| 1499 |
} |
| 1500 |
} |
| 1501 |
} else { |
| 1502 |
return false; |
| 1503 |
} |
| 1504 |
|
| 1505 |
return true; |
| 1506 |
default: |
| 1507 |
return false; |
| 1508 |
} |
| 1509 |
} |
| 1510 |
|
| 1511 |
function isSymbol(propType, propValue) { |
| 1512 |
// Native Symbol. |
| 1513 |
if (propType === 'symbol') { |
| 1514 |
return true; |
| 1515 |
} |
| 1516 |
|
| 1517 |
// falsy value can't be a Symbol |
| 1518 |
if (!propValue) { |
| 1519 |
return false; |
| 1520 |
} |
| 1521 |
|
| 1522 |
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' |
| 1523 |
if (propValue['@@toStringTag'] === 'Symbol') { |
| 1524 |
return true; |
| 1525 |
} |
| 1526 |
|
| 1527 |
// Fallback for non-spec compliant Symbols which are polyfilled. |
| 1528 |
if (typeof Symbol === 'function' && propValue instanceof Symbol) { |
| 1529 |
return true; |
| 1530 |
} |
| 1531 |
|
| 1532 |
return false; |
| 1533 |
} |
| 1534 |
|
| 1535 |
// Equivalent of `typeof` but with special handling for array and regexp. |
| 1536 |
function getPropType(propValue) { |
| 1537 |
var propType = typeof propValue; |
| 1538 |
if (Array.isArray(propValue)) { |
| 1539 |
return 'array'; |
| 1540 |
} |
| 1541 |
if (propValue instanceof RegExp) { |
| 1542 |
// Old webkits (at least until Android 4.0) return 'function' rather than |
| 1543 |
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/ |
| 1544 |
// passes PropTypes.object. |
| 1545 |
return 'object'; |
| 1546 |
} |
| 1547 |
if (isSymbol(propType, propValue)) { |
| 1548 |
return 'symbol'; |
| 1549 |
} |
| 1550 |
return propType; |
| 1551 |
} |
| 1552 |
|
| 1553 |
// This handles more types than `getPropType`. Only used for error messages. |
| 1554 |
// See `createPrimitiveTypeChecker`. |
| 1555 |
function getPreciseType(propValue) { |
| 1556 |
if (typeof propValue === 'undefined' || propValue === null) { |
| 1557 |
return '' + propValue; |
| 1558 |
} |
| 1559 |
var propType = getPropType(propValue); |
| 1560 |
if (propType === 'object') { |
| 1561 |
if (propValue instanceof Date) { |
| 1562 |
return 'date'; |
| 1563 |
} else if (propValue instanceof RegExp) { |
| 1564 |
return 'regexp'; |
| 1565 |
} |
| 1566 |
} |
| 1567 |
return propType; |
| 1568 |
} |
| 1569 |
|
| 1570 |
// Returns a string that is postfixed to a warning about an invalid type. |
| 1571 |
// For example, "undefined" or "of type array" |
| 1572 |
function getPostfixForTypeWarning(value) { |
| 1573 |
var type = getPreciseType(value); |
| 1574 |
switch (type) { |
| 1575 |
case 'array': |
| 1576 |
case 'object': |
| 1577 |
return 'an ' + type; |
| 1578 |
case 'boolean': |
| 1579 |
case 'date': |
| 1580 |
case 'regexp': |
| 1581 |
return 'a ' + type; |
| 1582 |
default: |
| 1583 |
return type; |
| 1584 |
} |
| 1585 |
} |
| 1586 |
|
| 1587 |
// Returns class name of the object, if any. |
| 1588 |
function getClassName(propValue) { |
| 1589 |
if (!propValue.constructor || !propValue.constructor.name) { |
| 1590 |
return ANONYMOUS; |
| 1591 |
} |
| 1592 |
return propValue.constructor.name; |
| 1593 |
} |
| 1594 |
|
| 1595 |
ReactPropTypes.checkPropTypes = checkPropTypes; |
| 1596 |
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; |
| 1597 |
ReactPropTypes.PropTypes = ReactPropTypes; |
| 1598 |
|
| 1599 |
return ReactPropTypes; |
| 1600 |
}; |
| 1601 |
|
| 1602 |
|
| 1603 |
/***/ }), |
| 1604 |
|
| 1605 |
/***/ "../node_modules/prop-types/index.js": |
| 1606 |
/*!*******************************************!*\ |
| 1607 |
!*** ../node_modules/prop-types/index.js ***! |
| 1608 |
\*******************************************/ |
| 1609 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1610 |
|
| 1611 |
/** |
| 1612 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 1613 |
* |
| 1614 |
* This source code is licensed under the MIT license found in the |
| 1615 |
* LICENSE file in the root directory of this source tree. |
| 1616 |
*/ |
| 1617 |
|
| 1618 |
if (true) { |
| 1619 |
var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js"); |
| 1620 |
|
| 1621 |
// By explicitly using `prop-types` you are opting into new development behavior. |
| 1622 |
// http://fb.me/prop-types-in-prod |
| 1623 |
var throwOnDirectAccess = true; |
| 1624 |
module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess); |
| 1625 |
} else // removed by dead control flow |
| 1626 |
{} |
| 1627 |
|
| 1628 |
|
| 1629 |
/***/ }), |
| 1630 |
|
| 1631 |
/***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js": |
| 1632 |
/*!**************************************************************!*\ |
| 1633 |
!*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***! |
| 1634 |
\**************************************************************/ |
| 1635 |
/***/ ((module) => { |
| 1636 |
|
| 1637 |
"use strict"; |
| 1638 |
/** |
| 1639 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 1640 |
* |
| 1641 |
* This source code is licensed under the MIT license found in the |
| 1642 |
* LICENSE file in the root directory of this source tree. |
| 1643 |
*/ |
| 1644 |
|
| 1645 |
|
| 1646 |
|
| 1647 |
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; |
| 1648 |
|
| 1649 |
module.exports = ReactPropTypesSecret; |
| 1650 |
|
| 1651 |
|
| 1652 |
/***/ }), |
| 1653 |
|
| 1654 |
/***/ "../node_modules/prop-types/lib/has.js": |
| 1655 |
/*!*********************************************!*\ |
| 1656 |
!*** ../node_modules/prop-types/lib/has.js ***! |
| 1657 |
\*********************************************/ |
| 1658 |
/***/ ((module) => { |
| 1659 |
|
| 1660 |
module.exports = Function.call.bind(Object.prototype.hasOwnProperty); |
| 1661 |
|
| 1662 |
|
| 1663 |
/***/ }), |
| 1664 |
|
| 1665 |
/***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js": |
| 1666 |
/*!************************************************************************************!*\ |
| 1667 |
!*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***! |
| 1668 |
\************************************************************************************/ |
| 1669 |
/***/ ((__unused_webpack_module, exports) => { |
| 1670 |
|
| 1671 |
"use strict"; |
| 1672 |
/** @license React v16.13.1 |
| 1673 |
* react-is.development.js |
| 1674 |
* |
| 1675 |
* Copyright (c) Facebook, Inc. and its affiliates. |
| 1676 |
* |
| 1677 |
* This source code is licensed under the MIT license found in the |
| 1678 |
* LICENSE file in the root directory of this source tree. |
| 1679 |
*/ |
| 1680 |
|
| 1681 |
|
| 1682 |
|
| 1683 |
|
| 1684 |
|
| 1685 |
if (true) { |
| 1686 |
(function() { |
| 1687 |
'use strict'; |
| 1688 |
|
| 1689 |
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol |
| 1690 |
// nor polyfill, then a plain number is used for performance. |
| 1691 |
var hasSymbol = typeof Symbol === 'function' && Symbol.for; |
| 1692 |
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; |
| 1693 |
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; |
| 1694 |
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; |
| 1695 |
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; |
| 1696 |
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; |
| 1697 |
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; |
| 1698 |
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary |
| 1699 |
// (unstable) APIs that have been removed. Can we remove the symbols? |
| 1700 |
|
| 1701 |
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; |
| 1702 |
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; |
| 1703 |
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; |
| 1704 |
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; |
| 1705 |
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; |
| 1706 |
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; |
| 1707 |
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; |
| 1708 |
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; |
| 1709 |
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; |
| 1710 |
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; |
| 1711 |
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; |
| 1712 |
|
| 1713 |
function isValidElementType(type) { |
| 1714 |
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. |
| 1715 |
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); |
| 1716 |
} |
| 1717 |
|
| 1718 |
function typeOf(object) { |
| 1719 |
if (typeof object === 'object' && object !== null) { |
| 1720 |
var $$typeof = object.$$typeof; |
| 1721 |
|
| 1722 |
switch ($$typeof) { |
| 1723 |
case REACT_ELEMENT_TYPE: |
| 1724 |
var type = object.type; |
| 1725 |
|
| 1726 |
switch (type) { |
| 1727 |
case REACT_ASYNC_MODE_TYPE: |
| 1728 |
case REACT_CONCURRENT_MODE_TYPE: |
| 1729 |
case REACT_FRAGMENT_TYPE: |
| 1730 |
case REACT_PROFILER_TYPE: |
| 1731 |
case REACT_STRICT_MODE_TYPE: |
| 1732 |
case REACT_SUSPENSE_TYPE: |
| 1733 |
return type; |
| 1734 |
|
| 1735 |
default: |
| 1736 |
var $$typeofType = type && type.$$typeof; |
| 1737 |
|
| 1738 |
switch ($$typeofType) { |
| 1739 |
case REACT_CONTEXT_TYPE: |
| 1740 |
case REACT_FORWARD_REF_TYPE: |
| 1741 |
case REACT_LAZY_TYPE: |
| 1742 |
case REACT_MEMO_TYPE: |
| 1743 |
case REACT_PROVIDER_TYPE: |
| 1744 |
return $$typeofType; |
| 1745 |
|
| 1746 |
default: |
| 1747 |
return $$typeof; |
| 1748 |
} |
| 1749 |
|
| 1750 |
} |
| 1751 |
|
| 1752 |
case REACT_PORTAL_TYPE: |
| 1753 |
return $$typeof; |
| 1754 |
} |
| 1755 |
} |
| 1756 |
|
| 1757 |
return undefined; |
| 1758 |
} // AsyncMode is deprecated along with isAsyncMode |
| 1759 |
|
| 1760 |
var AsyncMode = REACT_ASYNC_MODE_TYPE; |
| 1761 |
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; |
| 1762 |
var ContextConsumer = REACT_CONTEXT_TYPE; |
| 1763 |
var ContextProvider = REACT_PROVIDER_TYPE; |
| 1764 |
var Element = REACT_ELEMENT_TYPE; |
| 1765 |
var ForwardRef = REACT_FORWARD_REF_TYPE; |
| 1766 |
var Fragment = REACT_FRAGMENT_TYPE; |
| 1767 |
var Lazy = REACT_LAZY_TYPE; |
| 1768 |
var Memo = REACT_MEMO_TYPE; |
| 1769 |
var Portal = REACT_PORTAL_TYPE; |
| 1770 |
var Profiler = REACT_PROFILER_TYPE; |
| 1771 |
var StrictMode = REACT_STRICT_MODE_TYPE; |
| 1772 |
var Suspense = REACT_SUSPENSE_TYPE; |
| 1773 |
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated |
| 1774 |
|
| 1775 |
function isAsyncMode(object) { |
| 1776 |
{ |
| 1777 |
if (!hasWarnedAboutDeprecatedIsAsyncMode) { |
| 1778 |
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint |
| 1779 |
|
| 1780 |
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); |
| 1781 |
} |
| 1782 |
} |
| 1783 |
|
| 1784 |
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; |
| 1785 |
} |
| 1786 |
function isConcurrentMode(object) { |
| 1787 |
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; |
| 1788 |
} |
| 1789 |
function isContextConsumer(object) { |
| 1790 |
return typeOf(object) === REACT_CONTEXT_TYPE; |
| 1791 |
} |
| 1792 |
function isContextProvider(object) { |
| 1793 |
return typeOf(object) === REACT_PROVIDER_TYPE; |
| 1794 |
} |
| 1795 |
function isElement(object) { |
| 1796 |
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; |
| 1797 |
} |
| 1798 |
function isForwardRef(object) { |
| 1799 |
return typeOf(object) === REACT_FORWARD_REF_TYPE; |
| 1800 |
} |
| 1801 |
function isFragment(object) { |
| 1802 |
return typeOf(object) === REACT_FRAGMENT_TYPE; |
| 1803 |
} |
| 1804 |
function isLazy(object) { |
| 1805 |
return typeOf(object) === REACT_LAZY_TYPE; |
| 1806 |
} |
| 1807 |
function isMemo(object) { |
| 1808 |
return typeOf(object) === REACT_MEMO_TYPE; |
| 1809 |
} |
| 1810 |
function isPortal(object) { |
| 1811 |
return typeOf(object) === REACT_PORTAL_TYPE; |
| 1812 |
} |
| 1813 |
function isProfiler(object) { |
| 1814 |
return typeOf(object) === REACT_PROFILER_TYPE; |
| 1815 |
} |
| 1816 |
function isStrictMode(object) { |
| 1817 |
return typeOf(object) === REACT_STRICT_MODE_TYPE; |
| 1818 |
} |
| 1819 |
function isSuspense(object) { |
| 1820 |
return typeOf(object) === REACT_SUSPENSE_TYPE; |
| 1821 |
} |
| 1822 |
|
| 1823 |
exports.AsyncMode = AsyncMode; |
| 1824 |
exports.ConcurrentMode = ConcurrentMode; |
| 1825 |
exports.ContextConsumer = ContextConsumer; |
| 1826 |
exports.ContextProvider = ContextProvider; |
| 1827 |
exports.Element = Element; |
| 1828 |
exports.ForwardRef = ForwardRef; |
| 1829 |
exports.Fragment = Fragment; |
| 1830 |
exports.Lazy = Lazy; |
| 1831 |
exports.Memo = Memo; |
| 1832 |
exports.Portal = Portal; |
| 1833 |
exports.Profiler = Profiler; |
| 1834 |
exports.StrictMode = StrictMode; |
| 1835 |
exports.Suspense = Suspense; |
| 1836 |
exports.isAsyncMode = isAsyncMode; |
| 1837 |
exports.isConcurrentMode = isConcurrentMode; |
| 1838 |
exports.isContextConsumer = isContextConsumer; |
| 1839 |
exports.isContextProvider = isContextProvider; |
| 1840 |
exports.isElement = isElement; |
| 1841 |
exports.isForwardRef = isForwardRef; |
| 1842 |
exports.isFragment = isFragment; |
| 1843 |
exports.isLazy = isLazy; |
| 1844 |
exports.isMemo = isMemo; |
| 1845 |
exports.isPortal = isPortal; |
| 1846 |
exports.isProfiler = isProfiler; |
| 1847 |
exports.isStrictMode = isStrictMode; |
| 1848 |
exports.isSuspense = isSuspense; |
| 1849 |
exports.isValidElementType = isValidElementType; |
| 1850 |
exports.typeOf = typeOf; |
| 1851 |
})(); |
| 1852 |
} |
| 1853 |
|
| 1854 |
|
| 1855 |
/***/ }), |
| 1856 |
|
| 1857 |
/***/ "../node_modules/prop-types/node_modules/react-is/index.js": |
| 1858 |
/*!*****************************************************************!*\ |
| 1859 |
!*** ../node_modules/prop-types/node_modules/react-is/index.js ***! |
| 1860 |
\*****************************************************************/ |
| 1861 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1862 |
|
| 1863 |
"use strict"; |
| 1864 |
|
| 1865 |
|
| 1866 |
if (false) // removed by dead control flow |
| 1867 |
{} else { |
| 1868 |
module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"); |
| 1869 |
} |
| 1870 |
|
| 1871 |
|
| 1872 |
/***/ }), |
| 1873 |
|
| 1874 |
/***/ "@elementor/query": |
| 1875 |
/*!************************************!*\ |
| 1876 |
!*** external "elementorV2.query" ***! |
| 1877 |
\************************************/ |
| 1878 |
/***/ ((module) => { |
| 1879 |
|
| 1880 |
"use strict"; |
| 1881 |
module.exports = elementorV2.query; |
| 1882 |
|
| 1883 |
/***/ }), |
| 1884 |
|
| 1885 |
/***/ "@elementor/ui": |
| 1886 |
/*!*********************************!*\ |
| 1887 |
!*** external "elementorV2.ui" ***! |
| 1888 |
\*********************************/ |
| 1889 |
/***/ ((module) => { |
| 1890 |
|
| 1891 |
"use strict"; |
| 1892 |
module.exports = elementorV2.ui; |
| 1893 |
|
| 1894 |
/***/ }), |
| 1895 |
|
| 1896 |
/***/ "@wordpress/i18n": |
| 1897 |
/*!**************************!*\ |
| 1898 |
!*** external "wp.i18n" ***! |
| 1899 |
\**************************/ |
| 1900 |
/***/ ((module) => { |
| 1901 |
|
| 1902 |
"use strict"; |
| 1903 |
module.exports = wp.i18n; |
| 1904 |
|
| 1905 |
/***/ }), |
| 1906 |
|
| 1907 |
/***/ "react": |
| 1908 |
/*!************************!*\ |
| 1909 |
!*** external "React" ***! |
| 1910 |
\************************/ |
| 1911 |
/***/ ((module) => { |
| 1912 |
|
| 1913 |
"use strict"; |
| 1914 |
module.exports = React; |
| 1915 |
|
| 1916 |
/***/ }) |
| 1917 |
|
| 1918 |
/******/ }); |
| 1919 |
/************************************************************************/ |
| 1920 |
/******/ // The module cache |
| 1921 |
/******/ var __webpack_module_cache__ = {}; |
| 1922 |
/******/ |
| 1923 |
/******/ // The require function |
| 1924 |
/******/ function __webpack_require__(moduleId) { |
| 1925 |
/******/ // Check if module is in cache |
| 1926 |
/******/ var cachedModule = __webpack_module_cache__[moduleId]; |
| 1927 |
/******/ if (cachedModule !== undefined) { |
| 1928 |
/******/ return cachedModule.exports; |
| 1929 |
/******/ } |
| 1930 |
/******/ // Create a new module (and put it into the cache) |
| 1931 |
/******/ var module = __webpack_module_cache__[moduleId] = { |
| 1932 |
/******/ // no module.id needed |
| 1933 |
/******/ // no module.loaded needed |
| 1934 |
/******/ exports: {} |
| 1935 |
/******/ }; |
| 1936 |
/******/ |
| 1937 |
/******/ // Execute the module function |
| 1938 |
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 1939 |
/******/ |
| 1940 |
/******/ // Return the exports of the module |
| 1941 |
/******/ return module.exports; |
| 1942 |
/******/ } |
| 1943 |
/******/ |
| 1944 |
/************************************************************************/ |
| 1945 |
var __webpack_exports__ = {}; |
| 1946 |
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. |
| 1947 |
(() => { |
| 1948 |
"use strict"; |
| 1949 |
/*!***************************************************!*\ |
| 1950 |
!*** ../modules/notifications/assets/js/admin.js ***! |
| 1951 |
\***************************************************/ |
| 1952 |
|
| 1953 |
|
| 1954 |
var _barButtonNotification = __webpack_require__(/*! ./components/bar-button-notification */ "../modules/notifications/assets/js/components/bar-button-notification.js"); |
| 1955 |
window.elementorNotificationCenter = { |
| 1956 |
BarButtonNotification: _barButtonNotification.BarButtonNotification |
| 1957 |
}; |
| 1958 |
})(); |
| 1959 |
|
| 1960 |
/******/ })() |
| 1961 |
; |
| 1962 |
//# sourceMappingURL=admin-notifications.js.map |