4768 lines
185 KiB
JavaScript
4768 lines
185 KiB
JavaScript
|
/******/ (() => { // webpackBootstrap
|
||
|
/******/ var __webpack_modules__ = ({
|
||
|
|
||
|
/***/ "../assets/js/app/hooks/use-active-thread.js":
|
||
|
/*!***************************************************!*\
|
||
|
!*** ../assets/js/app/hooks/use-active-thread.js ***!
|
||
|
\***************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ NEW_THREAD: () => (/* binding */ NEW_THREAD),
|
||
|
/* harmony export */ THREAD: () => (/* binding */ THREAD),
|
||
|
/* harmony export */ "default": () => (/* binding */ useActiveThread)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-redux */ "../../../node_modules/react-redux/es/index.js");
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
||
|
|
||
|
|
||
|
const THREAD = 'thread';
|
||
|
const NEW_THREAD = 'new-thread';
|
||
|
function useActiveThread() {
|
||
|
const activeThread = (0,react_redux__WEBPACK_IMPORTED_MODULE_0__.useSelector)(state => state.notes.active);
|
||
|
|
||
|
/**
|
||
|
* Set the current active thread.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
const setActive = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(({
|
||
|
type,
|
||
|
data
|
||
|
}) => {
|
||
|
const allowedTypes = [THREAD, NEW_THREAD];
|
||
|
if (!allowedTypes.includes(type)) {
|
||
|
throw new Error('`setActive()` type must be one of: ' + allowedTypes.join(', '));
|
||
|
}
|
||
|
return window.top.$e.run('notes/set-active', {
|
||
|
type,
|
||
|
data
|
||
|
});
|
||
|
}, []);
|
||
|
|
||
|
/**
|
||
|
* Clear the current active thread state.
|
||
|
*
|
||
|
* @param {number|null} id - Always clear if `id = null`, or clear only if `id` is provided and is the active thread.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
const clearActive = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((id = null) => {
|
||
|
return window.top.$e.run('notes/clear-active', {
|
||
|
id
|
||
|
});
|
||
|
}, []);
|
||
|
|
||
|
/**
|
||
|
* Determine of a thread is currently active.
|
||
|
*
|
||
|
* @return {boolean}
|
||
|
*/
|
||
|
const isThreadActive = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(noteId => {
|
||
|
return THREAD === activeThread?.type && activeThread?.data.noteId === noteId;
|
||
|
}, [activeThread]);
|
||
|
return {
|
||
|
activeThread,
|
||
|
setActive,
|
||
|
clearActive,
|
||
|
isThreadActive
|
||
|
};
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/app/models/base-model.js":
|
||
|
/*!*********************************************!*\
|
||
|
!*** ../assets/js/app/models/base-model.js ***!
|
||
|
\*********************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (/* binding */ BaseModel)
|
||
|
/* harmony export */ });
|
||
|
class BaseModel {
|
||
|
/**
|
||
|
* Using init and not the default constructor because there is a problem to fill the instance
|
||
|
* dynamically in the constructor.
|
||
|
*
|
||
|
* @param {Object} data all the properties
|
||
|
* @return {BaseModel} Instance of base model
|
||
|
*/
|
||
|
init(data = {}) {
|
||
|
Object.entries(data).forEach(([key, value]) => {
|
||
|
this[key] = value;
|
||
|
});
|
||
|
return this;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/app/models/document.js":
|
||
|
/*!*******************************************!*\
|
||
|
!*** ../assets/js/app/models/document.js ***!
|
||
|
\*******************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (/* binding */ Document)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _base_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base-model */ "../assets/js/app/models/base-model.js");
|
||
|
|
||
|
class Document extends _base_model__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
||
|
id;
|
||
|
type;
|
||
|
typeTitle;
|
||
|
|
||
|
/**
|
||
|
* Create a document from server response
|
||
|
*
|
||
|
* @param {Object} data
|
||
|
*/
|
||
|
static createFromResponse(data) {
|
||
|
return new Document().init({
|
||
|
id: data.id,
|
||
|
type: data.type,
|
||
|
typeTitle: data.type_title
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/app/models/note.js":
|
||
|
/*!***************************************!*\
|
||
|
!*** ../assets/js/app/models/note.js ***!
|
||
|
\***************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (/* binding */ Note)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _base_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base-model */ "../assets/js/app/models/base-model.js");
|
||
|
/* harmony import */ var _user__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./user */ "../assets/js/app/models/user.js");
|
||
|
/* harmony import */ var _document__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./document */ "../assets/js/app/models/document.js");
|
||
|
|
||
|
|
||
|
|
||
|
class Note extends _base_model__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
||
|
id = null;
|
||
|
parentId = 0;
|
||
|
elementId = null;
|
||
|
content = '';
|
||
|
position = {
|
||
|
x: 0,
|
||
|
y: 0
|
||
|
};
|
||
|
repliesCount = 0;
|
||
|
unreadRepliesCount = 0;
|
||
|
replies = [];
|
||
|
author = null;
|
||
|
readers = [];
|
||
|
isRead = false;
|
||
|
isResolved = false;
|
||
|
routeUrl = '';
|
||
|
routeTitle = '';
|
||
|
userCan = {};
|
||
|
createdAt = null;
|
||
|
updatedAt = null;
|
||
|
lastActivityAt = null;
|
||
|
|
||
|
// Private props
|
||
|
_formattedLastActivityAt = '';
|
||
|
_formattedCreatedAt = '';
|
||
|
|
||
|
/**
|
||
|
* Create a note from server response
|
||
|
*
|
||
|
* @param {Object} data
|
||
|
*/
|
||
|
static createFromResponse(data) {
|
||
|
return new Note().init({
|
||
|
id: data.id,
|
||
|
parentId: data.parent_id,
|
||
|
elementId: data.element_id,
|
||
|
content: data.content,
|
||
|
position: data.position,
|
||
|
repliesCount: data.replies_count,
|
||
|
unreadRepliesCount: data.unread_replies_count,
|
||
|
replies: data.replies.map(reply => Note.createFromResponse(reply)),
|
||
|
author: data.author ? _user__WEBPACK_IMPORTED_MODULE_1__["default"].createFromResponse(data.author) : _user__WEBPACK_IMPORTED_MODULE_1__["default"].createDeleted(data.author_display_name),
|
||
|
document: data.document ? _document__WEBPACK_IMPORTED_MODULE_2__["default"].createFromResponse(data.document) : null,
|
||
|
readers: data.readers ? data.readers.map(reader => _user__WEBPACK_IMPORTED_MODULE_1__["default"].createFromResponse(reader)) : [],
|
||
|
isRead: data.is_read,
|
||
|
isResolved: data.is_resolved,
|
||
|
routeUrl: data.route_url,
|
||
|
routeTitle: data.route_title,
|
||
|
userCan: data.user_can,
|
||
|
createdAt: new Date(data.created_at),
|
||
|
updatedAt: new Date(data.updated_at),
|
||
|
lastActivityAt: new Date(data.last_activity_at)
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* TODO: Change to WP site settings format.
|
||
|
*
|
||
|
* @return {string} Last activity date formatted.
|
||
|
*/
|
||
|
getFormattedLastActivityAt() {
|
||
|
if (!this._formattedLastActivityAt) {
|
||
|
this._formattedLastActivityAt = this.lastActivityAt.toLocaleString();
|
||
|
}
|
||
|
return this._formattedLastActivityAt;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* TODO: Change to WP site settings format.
|
||
|
*
|
||
|
* @return {string} Created at date formatted.
|
||
|
*/
|
||
|
getFormattedCreatedAt() {
|
||
|
if (!this._formattedCreatedAt) {
|
||
|
this._formattedCreatedAt = this.createdAt.toLocaleString();
|
||
|
}
|
||
|
return this._formattedCreatedAt;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get the note deep link.
|
||
|
*
|
||
|
* @return {string} url
|
||
|
*/
|
||
|
getURL() {
|
||
|
const id = this.isReply() ? this.parentId : this.id;
|
||
|
return this.constructor.getURL(id);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get a note deep link by ID.
|
||
|
*
|
||
|
* @param {number} id
|
||
|
*
|
||
|
* @return {string} url
|
||
|
*/
|
||
|
static getURL(id) {
|
||
|
const {
|
||
|
route
|
||
|
} = window.top.$e.components.get('notes').config;
|
||
|
return route.note_url_pattern.replace('{{NOTE_ID}}', id);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Check if the current note or one of its replies are unread.
|
||
|
*
|
||
|
* @return {boolean} is unread thread
|
||
|
*/
|
||
|
isUnreadThread() {
|
||
|
return this.isThread() && (!this.isRead || this.unreadRepliesCount > 0);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Determine if the Note is a Thread.
|
||
|
*
|
||
|
* @return {boolean} - Is thread.
|
||
|
*/
|
||
|
isThread() {
|
||
|
return 0 === this.parentId;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Determine if the Note is a Reply.
|
||
|
*
|
||
|
* @return {boolean} - Is reply.
|
||
|
*/
|
||
|
isReply() {
|
||
|
return !this.isThread();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/app/models/user.js":
|
||
|
/*!***************************************!*\
|
||
|
!*** ../assets/js/app/models/user.js ***!
|
||
|
\***************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (/* binding */ User)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _base_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base-model */ "../assets/js/app/models/base-model.js");
|
||
|
/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
|
||
|
|
||
|
class User extends _base_model__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
||
|
id = null;
|
||
|
name = '';
|
||
|
slug = '';
|
||
|
avatarUrls = {
|
||
|
24: null,
|
||
|
48: null,
|
||
|
96: null
|
||
|
};
|
||
|
capabilities = {};
|
||
|
|
||
|
/**
|
||
|
* Create a user from server response
|
||
|
*
|
||
|
* @param {Object} data
|
||
|
*/
|
||
|
static createFromResponse(data) {
|
||
|
return new User().init({
|
||
|
id: data.id,
|
||
|
name: data.name,
|
||
|
slug: data.slug,
|
||
|
avatarUrls: data.avatar_urls,
|
||
|
capabilities: {
|
||
|
notes: {
|
||
|
read: data.capabilities?.notes?.can_read
|
||
|
},
|
||
|
post: {
|
||
|
edit: data.capabilities?.post?.can_edit
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* A factory to create a User model when a user was deleted or not exist for some reason.
|
||
|
*
|
||
|
* @param {string} name
|
||
|
* @return {BaseModel} user
|
||
|
*/
|
||
|
static createDeleted(name = '') {
|
||
|
const {
|
||
|
avatar_defaults: avatarUrls
|
||
|
} = window.top.$e.components.get('notes').config.urls;
|
||
|
return new User().init({
|
||
|
name: [name, __('(deleted user)', 'elementor-pro')].join(' '),
|
||
|
avatarUrls
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/commands/clear-active.js":
|
||
|
/*!*********************************************!*\
|
||
|
!*** ../assets/js/commands/clear-active.js ***!
|
||
|
\*********************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ ClearActive: () => (/* binding */ ClearActive),
|
||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
|
/* harmony export */ });
|
||
|
class ClearActive extends $e.modules.CommandBase {
|
||
|
apply({
|
||
|
id = null
|
||
|
} = {}) {
|
||
|
const {
|
||
|
store
|
||
|
} = window.top.$e,
|
||
|
{
|
||
|
actions
|
||
|
} = store.get('notes');
|
||
|
store.dispatch(actions.clearActive(id));
|
||
|
}
|
||
|
}
|
||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ClearActive);
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/commands/close.js":
|
||
|
/*!**************************************!*\
|
||
|
!*** ../assets/js/commands/close.js ***!
|
||
|
\**************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ Close: () => (/* binding */ Close),
|
||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
|
/* harmony export */ });
|
||
|
class Close extends $e.modules.CommandBase {
|
||
|
apply() {
|
||
|
this.component.close();
|
||
|
}
|
||
|
}
|
||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Close);
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/commands/copy-link.js":
|
||
|
/*!******************************************!*\
|
||
|
!*** ../assets/js/commands/copy-link.js ***!
|
||
|
\******************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ CopyLink: () => (/* binding */ CopyLink),
|
||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _app_models_note__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../app/models/note */ "../assets/js/app/models/note.js");
|
||
|
/* harmony import */ var _services_copy_to_clipboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../services/copy-to-clipboard */ "../assets/js/services/copy-to-clipboard/index.js");
|
||
|
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Copy note deep link by ID.
|
||
|
*/
|
||
|
class CopyLink extends $e.modules.CommandBase {
|
||
|
validateArgs(args = {}) {
|
||
|
this.requireArgumentType('id', 'number', args);
|
||
|
}
|
||
|
apply(args) {
|
||
|
return (0,_services_copy_to_clipboard__WEBPACK_IMPORTED_MODULE_1__.copyToClipboard)(_app_models_note__WEBPACK_IMPORTED_MODULE_0__["default"].getURL(args.id));
|
||
|
}
|
||
|
}
|
||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CopyLink);
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/commands/filter.js":
|
||
|
/*!***************************************!*\
|
||
|
!*** ../assets/js/commands/filter.js ***!
|
||
|
\***************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ Filter: () => (/* binding */ Filter),
|
||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
|
/* harmony export */ });
|
||
|
/**
|
||
|
* Set / modify the global Notes filter state.
|
||
|
*/
|
||
|
class Filter extends $e.modules.CommandBase {
|
||
|
validateArgs(args = {}) {
|
||
|
this.requireArgument('filters', args);
|
||
|
}
|
||
|
apply(args) {
|
||
|
const {
|
||
|
store
|
||
|
} = window.top.$e,
|
||
|
{
|
||
|
actions
|
||
|
} = store.get('notes'),
|
||
|
action = args.overwrite ? actions.setFilters : actions.modifyFilters;
|
||
|
store.dispatch(action(args.filters));
|
||
|
}
|
||
|
}
|
||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Filter);
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/commands/index.js":
|
||
|
/*!**************************************!*\
|
||
|
!*** ../assets/js/commands/index.js ***!
|
||
|
\**************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ ClearActive: () => (/* reexport safe */ _clear_active__WEBPACK_IMPORTED_MODULE_0__.ClearActive),
|
||
|
/* harmony export */ Close: () => (/* reexport safe */ _close__WEBPACK_IMPORTED_MODULE_1__.Close),
|
||
|
/* harmony export */ CopyLink: () => (/* reexport safe */ _copy_link__WEBPACK_IMPORTED_MODULE_2__.CopyLink),
|
||
|
/* harmony export */ Filter: () => (/* reexport safe */ _filter__WEBPACK_IMPORTED_MODULE_3__.Filter),
|
||
|
/* harmony export */ Open: () => (/* reexport safe */ _open__WEBPACK_IMPORTED_MODULE_4__.Open),
|
||
|
/* harmony export */ SetActive: () => (/* reexport safe */ _set_active__WEBPACK_IMPORTED_MODULE_5__.SetActive),
|
||
|
/* harmony export */ Toggle: () => (/* reexport safe */ _toggle__WEBPACK_IMPORTED_MODULE_6__.Toggle)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _clear_active__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./clear-active */ "../assets/js/commands/clear-active.js");
|
||
|
/* harmony import */ var _close__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./close */ "../assets/js/commands/close.js");
|
||
|
/* harmony import */ var _copy_link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./copy-link */ "../assets/js/commands/copy-link.js");
|
||
|
/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./filter */ "../assets/js/commands/filter.js");
|
||
|
/* harmony import */ var _open__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./open */ "../assets/js/commands/open.js");
|
||
|
/* harmony import */ var _set_active__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./set-active */ "../assets/js/commands/set-active.js");
|
||
|
/* harmony import */ var _toggle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./toggle */ "../assets/js/commands/toggle.js");
|
||
|
// A-Z.
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/commands/open.js":
|
||
|
/*!*************************************!*\
|
||
|
!*** ../assets/js/commands/open.js ***!
|
||
|
\*************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ Open: () => (/* binding */ Open),
|
||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _app_hooks_use_active_thread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../app/hooks/use-active-thread */ "../assets/js/app/hooks/use-active-thread.js");
|
||
|
|
||
|
class Open extends $e.modules.CommandBase {
|
||
|
static getInfo() {
|
||
|
return {
|
||
|
isSafe: true,
|
||
|
isSafeWithArgs: true
|
||
|
};
|
||
|
}
|
||
|
apply(args) {
|
||
|
window.top.$e.route(this.component.getNamespace());
|
||
|
const noteId = parseInt(args.id || '0');
|
||
|
|
||
|
// Activate a specific thread if provided.
|
||
|
if (noteId > 0) {
|
||
|
window.top.$e.run('notes/set-active', {
|
||
|
type: _app_hooks_use_active_thread__WEBPACK_IMPORTED_MODULE_0__.THREAD,
|
||
|
data: {
|
||
|
noteId
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Open);
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/commands/set-active.js":
|
||
|
/*!*******************************************!*\
|
||
|
!*** ../assets/js/commands/set-active.js ***!
|
||
|
\*******************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ SetActive: () => (/* binding */ SetActive),
|
||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
|
/* harmony export */ });
|
||
|
class SetActive extends $e.modules.CommandBase {
|
||
|
validateArgs(args = {}) {
|
||
|
this.requireArgument('type', args);
|
||
|
this.requireArgument('data', args);
|
||
|
}
|
||
|
apply({
|
||
|
type,
|
||
|
data
|
||
|
}) {
|
||
|
const {
|
||
|
store
|
||
|
} = window.top.$e;
|
||
|
if (store.getState().notes.formsInWritingMode.length > 0) {
|
||
|
return;
|
||
|
}
|
||
|
const {
|
||
|
actions
|
||
|
} = store.get('notes');
|
||
|
store.dispatch(actions.setActive({
|
||
|
type,
|
||
|
data
|
||
|
}));
|
||
|
}
|
||
|
}
|
||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SetActive);
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/commands/toggle.js":
|
||
|
/*!***************************************!*\
|
||
|
!*** ../assets/js/commands/toggle.js ***!
|
||
|
\***************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ Toggle: () => (/* binding */ Toggle),
|
||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
|
/* harmony export */ });
|
||
|
class Toggle extends $e.modules.CommandBase {
|
||
|
apply() {
|
||
|
if (this.component.isOpen) {
|
||
|
window.top.$e.run('notes/close');
|
||
|
} else {
|
||
|
window.top.$e.run('notes/open');
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Toggle);
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/data-commands/index.js":
|
||
|
/*!*******************************************!*\
|
||
|
!*** ../assets/js/data-commands/index.js ***!
|
||
|
\*******************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ Index: () => (/* binding */ Index),
|
||
|
/* harmony export */ ReadStatus: () => (/* reexport safe */ _read_status__WEBPACK_IMPORTED_MODULE_0__.ReadStatus),
|
||
|
/* harmony export */ Summary: () => (/* reexport safe */ _summary__WEBPACK_IMPORTED_MODULE_1__.Summary),
|
||
|
/* harmony export */ Users: () => (/* reexport safe */ _users__WEBPACK_IMPORTED_MODULE_2__.Users)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _read_status__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./read-status */ "../assets/js/data-commands/read-status.js");
|
||
|
/* harmony import */ var _summary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./summary */ "../assets/js/data-commands/summary.js");
|
||
|
/* harmony import */ var _users__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./users */ "../assets/js/data-commands/users.js");
|
||
|
|
||
|
|
||
|
|
||
|
class Index extends $e.modules.CommandData {
|
||
|
static getEndpointFormat() {
|
||
|
return 'notes/{id}';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/data-commands/read-status.js":
|
||
|
/*!*************************************************!*\
|
||
|
!*** ../assets/js/data-commands/read-status.js ***!
|
||
|
\*************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ ReadStatus: () => (/* binding */ ReadStatus)
|
||
|
/* harmony export */ });
|
||
|
class ReadStatus extends $e.modules.CommandData {
|
||
|
static getEndpointFormat() {
|
||
|
return 'notes/read-status';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/data-commands/summary.js":
|
||
|
/*!*********************************************!*\
|
||
|
!*** ../assets/js/data-commands/summary.js ***!
|
||
|
\*********************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ Summary: () => (/* binding */ Summary)
|
||
|
/* harmony export */ });
|
||
|
class Summary extends $e.modules.CommandData {
|
||
|
static getEndpointFormat() {
|
||
|
return 'notes/summary';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/data-commands/users.js":
|
||
|
/*!*******************************************!*\
|
||
|
!*** ../assets/js/data-commands/users.js ***!
|
||
|
\*******************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ Users: () => (/* binding */ Users)
|
||
|
/* harmony export */ });
|
||
|
class Users extends $e.modules.CommandData {
|
||
|
static getEndpointFormat() {
|
||
|
return 'notes/users';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/e-component.js":
|
||
|
/*!***********************************!*\
|
||
|
!*** ../assets/js/e-component.js ***!
|
||
|
\***********************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (/* binding */ EComponent)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _commands___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./commands/ */ "../assets/js/commands/index.js");
|
||
|
/* harmony import */ var _data_commands___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data-commands/ */ "../assets/js/data-commands/index.js");
|
||
|
/* harmony import */ var _hooks___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hooks/ */ "../assets/js/hooks/index.js");
|
||
|
/* harmony import */ var _notes_context_menu__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./notes-context-menu */ "../assets/js/notes-context-menu.js");
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
class EComponent extends $e.modules.ComponentBase {
|
||
|
static NOTES_MODE_OPEN = 'open';
|
||
|
static NOTES_MODE_CLOSE = 'close';
|
||
|
|
||
|
/**
|
||
|
* Config for the current components (to share across related apps).
|
||
|
*
|
||
|
* @type {Object}
|
||
|
*/
|
||
|
config = {};
|
||
|
constructor(args) {
|
||
|
super(args);
|
||
|
|
||
|
// Get config from the marks script
|
||
|
// some configuration can only be known in the preview (iframe or frontend) like the 'route.title'.
|
||
|
window.addEventListener('message', event => {
|
||
|
if (event.data.name !== 'elementor-pro/notes/config') {
|
||
|
return;
|
||
|
}
|
||
|
this.config = {
|
||
|
...this.config,
|
||
|
...event.data.payload
|
||
|
};
|
||
|
|
||
|
// Hash commands already called in the editor.
|
||
|
if (!this.isInEditor()) {
|
||
|
window.top.$e.extras.hashCommands.runOnce();
|
||
|
}
|
||
|
this.contextMenuNotesGroup();
|
||
|
});
|
||
|
|
||
|
// Toggle notes mode when clicking the admin-bar item (initiated in `module.php`).
|
||
|
window.addEventListener('DOMContentLoaded', () => {
|
||
|
const adminBarButton = document.getElementById('wp-admin-bar-elementor_notes');
|
||
|
if (!adminBarButton) {
|
||
|
return;
|
||
|
}
|
||
|
adminBarButton.addEventListener('click', e => {
|
||
|
e.preventDefault();
|
||
|
window.top.$e.run('notes/toggle');
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return {string} the namespace of the component
|
||
|
*/
|
||
|
getNamespace() {
|
||
|
return 'notes';
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return {Object} All the routes of the component
|
||
|
*/
|
||
|
defaultRoutes() {
|
||
|
return {
|
||
|
'': () => {/* Nothing to do, it's already rendered. */}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return {*} All the commands of the components
|
||
|
*/
|
||
|
defaultCommands() {
|
||
|
// Fake commands for usage-tracking.
|
||
|
const trackingCommands = ['create', 'reply', 'edit', 'delete', 'resolve', 're-open', 'cancel-create', 'cancel-reply', 'cancel-edit', 'choose-mention', 'open-note-actions', 'close-note-actions', 'open-panel-filters', 'close-panel-filters', 'refresh-panel'].reduce((allCommands, command) => ({
|
||
|
...allCommands,
|
||
|
[command]: () => {}
|
||
|
}), {});
|
||
|
return {
|
||
|
...this.importCommands(_commands___WEBPACK_IMPORTED_MODULE_0__),
|
||
|
...trackingCommands
|
||
|
};
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return {*} All the data commands of the components
|
||
|
*/
|
||
|
defaultData() {
|
||
|
return this.importCommands(_data_commands___WEBPACK_IMPORTED_MODULE_1__);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return {*} All the hooks
|
||
|
*/
|
||
|
defaultHooks() {
|
||
|
return this.importHooks(_hooks___WEBPACK_IMPORTED_MODULE_2__);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return {Object} All the shortcuts of the component.
|
||
|
*/
|
||
|
defaultShortcuts() {
|
||
|
return {
|
||
|
toggle: {
|
||
|
keys: 'shift+c',
|
||
|
exclude: ['input', 'textarea']
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return {Object} All the states of the component.
|
||
|
*/
|
||
|
defaultStates() {
|
||
|
return {
|
||
|
'': {
|
||
|
initialState: {
|
||
|
/**
|
||
|
* @typedef {Object} Active
|
||
|
* @property {'thread'|'new-thread'} type - What is currently active (thread or a new thread).
|
||
|
* @property {Object} data - The active element data.
|
||
|
* @property {string} data.noteId - ID of the currently active note (used for existing threads).
|
||
|
* @property {string} data.elementId - ID of the currently active element (used for new threads).
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* @type {Active|null} active
|
||
|
*/
|
||
|
active: null,
|
||
|
formsInWritingMode: [],
|
||
|
// List of form IDs that are currently used by the user.
|
||
|
filters: {
|
||
|
is_resolved: null,
|
||
|
only_unread: null,
|
||
|
only_relevant: null
|
||
|
}
|
||
|
},
|
||
|
reducers: {
|
||
|
setFilters: (state, {
|
||
|
payload
|
||
|
}) => {
|
||
|
return {
|
||
|
...state,
|
||
|
filters: payload
|
||
|
};
|
||
|
},
|
||
|
modifyFilters: (state, {
|
||
|
payload
|
||
|
}) => {
|
||
|
return {
|
||
|
...state,
|
||
|
filters: {
|
||
|
...state.filters,
|
||
|
...payload
|
||
|
}
|
||
|
};
|
||
|
},
|
||
|
setActive: (state, {
|
||
|
payload
|
||
|
}) => {
|
||
|
return {
|
||
|
...state,
|
||
|
active: {
|
||
|
type: payload.type,
|
||
|
data: payload.data
|
||
|
},
|
||
|
formsInWritingMode: []
|
||
|
};
|
||
|
},
|
||
|
clearActive: (state, {
|
||
|
payload: id
|
||
|
} = {}) => {
|
||
|
// Allow clearing active only for specific note ID.
|
||
|
const shouldClear = !id || state.active?.data?.noteId === id;
|
||
|
if (!shouldClear) {
|
||
|
return state;
|
||
|
}
|
||
|
return {
|
||
|
...state,
|
||
|
active: null,
|
||
|
formsInWritingMode: []
|
||
|
};
|
||
|
},
|
||
|
addFormToWritingMode(state, {
|
||
|
payload
|
||
|
}) {
|
||
|
return {
|
||
|
...state,
|
||
|
formsInWritingMode: [...state.formsInWritingMode, payload]
|
||
|
};
|
||
|
},
|
||
|
removeFormFromWritingMode(state, {
|
||
|
payload
|
||
|
}) {
|
||
|
return {
|
||
|
...state,
|
||
|
formsInWritingMode: state.formsInWritingMode.filter(id => id !== payload)
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* When open the component this method will be triggered.
|
||
|
*
|
||
|
* @return {boolean} Should disable the opening or not.
|
||
|
*/
|
||
|
open() {
|
||
|
if (this.isOpen) {
|
||
|
return false;
|
||
|
}
|
||
|
if (this.isInEditor()) {
|
||
|
this.updateEditorState(this.constructor.NOTES_MODE_OPEN);
|
||
|
}
|
||
|
|
||
|
// Send event to the iframe to open the notes mode.
|
||
|
this.getPreviewFrame().postMessage({
|
||
|
name: 'elementor-pro/notes/open'
|
||
|
}, '*');
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* When close the component this method will be triggered.
|
||
|
*
|
||
|
* @return {boolean} Should disable the closing or not.
|
||
|
*/
|
||
|
close() {
|
||
|
if (!super.close()) {
|
||
|
return false;
|
||
|
}
|
||
|
if (this.isInEditor()) {
|
||
|
this.updateEditorState(this.constructor.NOTES_MODE_CLOSE);
|
||
|
}
|
||
|
|
||
|
// Send event to the iframe to close the notes mode.
|
||
|
this.getPreviewFrame().postMessage({
|
||
|
name: 'elementor-pro/notes/close'
|
||
|
}, '*');
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return {boolean} Is the current view is the editor
|
||
|
*/
|
||
|
isInEditor() {
|
||
|
return !!window.elementor;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Update the editor edit mode base on mode ('open' or 'close').
|
||
|
*
|
||
|
* @param {string} mode
|
||
|
*/
|
||
|
updateEditorState(mode) {
|
||
|
switch (mode) {
|
||
|
case this.constructor.NOTES_MODE_OPEN:
|
||
|
elementor.getPanelView().modeSwitcher.currentView.setMode('preview');
|
||
|
elementor.channels.dataEditMode.once('switch', () => {
|
||
|
if (!this.isOpen) {
|
||
|
return;
|
||
|
}
|
||
|
window.top.$e.run('notes/close');
|
||
|
});
|
||
|
break;
|
||
|
case this.constructor.NOTES_MODE_CLOSE:
|
||
|
elementor.getPanelView().modeSwitcher.currentView.setMode('editor');
|
||
|
break;
|
||
|
default:
|
||
|
throw new Error(`mode '${mode}' is not supported.`);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get the Preview frame, in edit mode it is the iframe and on the frontend it is the current window.
|
||
|
*
|
||
|
* @return {Window} The preview frame.
|
||
|
*/
|
||
|
getPreviewFrame() {
|
||
|
return this.isInEditor() ? elementor.$preview[0].contentWindow : window;
|
||
|
}
|
||
|
contextMenuNotesGroup() {
|
||
|
if (!this.isInEditor()) {
|
||
|
return;
|
||
|
}
|
||
|
new _notes_context_menu__WEBPACK_IMPORTED_MODULE_3__["default"]();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/hooks/index.js":
|
||
|
/*!***********************************!*\
|
||
|
!*** ../assets/js/hooks/index.js ***!
|
||
|
\***********************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ NotesAddPanelMenuItem: () => (/* reexport safe */ _ui_panel_state_ready_notes_add_panel_menu_item__WEBPACK_IMPORTED_MODULE_0__.NotesAddPanelMenuItem)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _ui_panel_state_ready_notes_add_panel_menu_item__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ui/panel/state-ready/notes-add-panel-menu-item */ "../assets/js/hooks/ui/panel/state-ready/notes-add-panel-menu-item.js");
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/hooks/ui/panel/state-ready/notes-add-panel-menu-item.js":
|
||
|
/*!****************************************************************************!*\
|
||
|
!*** ../assets/js/hooks/ui/panel/state-ready/notes-add-panel-menu-item.js ***!
|
||
|
\****************************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ NotesAddPanelMenuItem: () => (/* binding */ NotesAddPanelMenuItem),
|
||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
|
/* harmony export */ });
|
||
|
/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
|
||
|
class NotesAddPanelMenuItem extends $e.modules.hookUI.After {
|
||
|
getCommand() {
|
||
|
return 'panel/state-ready';
|
||
|
}
|
||
|
getId() {
|
||
|
return 'notes-add-panel-menu-item';
|
||
|
}
|
||
|
apply() {
|
||
|
elementor.modules.layouts.panel.pages.menu.Menu.addItem({
|
||
|
name: 'notes',
|
||
|
icon: 'eicon-commenting-o',
|
||
|
title: __('Notes', 'elementor-pro'),
|
||
|
callback: () => window.top.$e.run('notes/open')
|
||
|
}, 'navigate_from_page', 'finder');
|
||
|
}
|
||
|
}
|
||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NotesAddPanelMenuItem);
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/notes-context-menu.js":
|
||
|
/*!******************************************!*\
|
||
|
!*** ../assets/js/notes-context-menu.js ***!
|
||
|
\******************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
||
|
/* harmony export */ notesContextMenu: () => (/* binding */ notesContextMenu)
|
||
|
/* harmony export */ });
|
||
|
/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
|
||
|
class notesContextMenu {
|
||
|
constructor() {
|
||
|
const elTypes = ['widget', 'section', 'column', 'container'];
|
||
|
elTypes.forEach(type => {
|
||
|
elementor.hooks.addFilter(`elements/${type}/contextMenuGroups`, this.notesContextMenuAddGroup);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Enable the 'Notes' context menu item
|
||
|
*
|
||
|
* @since 3.8.0
|
||
|
*
|
||
|
* @param {Array} groups
|
||
|
* @return {Array} The updated groups.
|
||
|
*/
|
||
|
notesContextMenuAddGroup(groups) {
|
||
|
const notesGroup = _.findWhere(groups, {
|
||
|
name: 'notes'
|
||
|
}),
|
||
|
notesGroupIndex = groups.indexOf(notesGroup),
|
||
|
notesActionItem = {
|
||
|
name: 'open_notes',
|
||
|
title: __('Notes', 'elementor-pro'),
|
||
|
shortcut: '⇧+C',
|
||
|
isEnabled: () => true,
|
||
|
callback: () => $e.route('notes')
|
||
|
};
|
||
|
if (elementorPro.config.should_show_promotion) {
|
||
|
const iconLink = '<i class="eicon-advanced"></i>' + '<a class="elementor-context-menu-list__item__shortcut--link-fullwidth" href="https://go.elementor.com/go-pro-advanced-notes-context-menu/" target="_blank" rel="noopener noreferrer"></a>';
|
||
|
notesActionItem.shortcut = jQuery(iconLink);
|
||
|
notesActionItem.isEnabled = () => false;
|
||
|
delete notesActionItem.callback;
|
||
|
}
|
||
|
|
||
|
// Create the Notes group if it doesn't exist
|
||
|
if (-1 === notesGroupIndex) {
|
||
|
const deleteGroup = _.findWhere(groups, {
|
||
|
name: 'delete'
|
||
|
}),
|
||
|
deleteGroupIndex = groups.indexOf(deleteGroup),
|
||
|
newGroupPosition = -1 !== deleteGroupIndex ? deleteGroupIndex : groups.length;
|
||
|
groups.splice(newGroupPosition, 0, {
|
||
|
name: 'notes',
|
||
|
actions: [notesActionItem]
|
||
|
});
|
||
|
return groups;
|
||
|
}
|
||
|
const openNotesAction = _.findWhere(notesGroup.actions, {
|
||
|
name: 'open_notes'
|
||
|
}),
|
||
|
openNotesActionIndex = notesGroup.actions.indexOf(openNotesAction);
|
||
|
groups[notesGroupIndex].actions[openNotesActionIndex] = notesActionItem;
|
||
|
return groups;
|
||
|
}
|
||
|
}
|
||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (notesContextMenu);
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../assets/js/services/copy-to-clipboard/index.js":
|
||
|
/*!********************************************************!*\
|
||
|
!*** ../assets/js/services/copy-to-clipboard/index.js ***!
|
||
|
\********************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ canCopyToClipboard: () => (/* binding */ canCopyToClipboard),
|
||
|
/* harmony export */ copyToClipboard: () => (/* binding */ copyToClipboard)
|
||
|
/* harmony export */ });
|
||
|
/**
|
||
|
* Check if there is access to the clipboard API
|
||
|
* (Usually, when a website doesn't have an SSL certificate, the browser won't expose the clipboard API).
|
||
|
*
|
||
|
* @return {boolean} can copy to clipboard?
|
||
|
*/
|
||
|
function canCopyToClipboard() {
|
||
|
return !!navigator?.clipboard;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Will copy value to the clipboard
|
||
|
*
|
||
|
* @param {string} value
|
||
|
*/
|
||
|
function copyToClipboard(value) {
|
||
|
if (!canCopyToClipboard()) {
|
||
|
throw new Error('Cannot copy to clipboard, please make sure you are using SSL in your website.');
|
||
|
}
|
||
|
navigator.clipboard.writeText(value);
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":
|
||
|
/*!*****************************************************************************************!*\
|
||
|
!*** ../../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***!
|
||
|
\*****************************************************************************************/
|
||
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
|
||
|
|
||
|
var reactIs = __webpack_require__(/*! react-is */ "../../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js");
|
||
|
|
||
|
/**
|
||
|
* Copyright 2015, Yahoo! Inc.
|
||
|
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
||
|
*/
|
||
|
var REACT_STATICS = {
|
||
|
childContextTypes: true,
|
||
|
contextType: true,
|
||
|
contextTypes: true,
|
||
|
defaultProps: true,
|
||
|
displayName: true,
|
||
|
getDefaultProps: true,
|
||
|
getDerivedStateFromError: true,
|
||
|
getDerivedStateFromProps: true,
|
||
|
mixins: true,
|
||
|
propTypes: true,
|
||
|
type: true
|
||
|
};
|
||
|
var KNOWN_STATICS = {
|
||
|
name: true,
|
||
|
length: true,
|
||
|
prototype: true,
|
||
|
caller: true,
|
||
|
callee: true,
|
||
|
arguments: true,
|
||
|
arity: true
|
||
|
};
|
||
|
var FORWARD_REF_STATICS = {
|
||
|
'$$typeof': true,
|
||
|
render: true,
|
||
|
defaultProps: true,
|
||
|
displayName: true,
|
||
|
propTypes: true
|
||
|
};
|
||
|
var MEMO_STATICS = {
|
||
|
'$$typeof': true,
|
||
|
compare: true,
|
||
|
defaultProps: true,
|
||
|
displayName: true,
|
||
|
propTypes: true,
|
||
|
type: true
|
||
|
};
|
||
|
var TYPE_STATICS = {};
|
||
|
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
||
|
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
||
|
|
||
|
function getStatics(component) {
|
||
|
// React v16.11 and below
|
||
|
if (reactIs.isMemo(component)) {
|
||
|
return MEMO_STATICS;
|
||
|
} // React v16.12 and above
|
||
|
|
||
|
|
||
|
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
||
|
}
|
||
|
|
||
|
var defineProperty = Object.defineProperty;
|
||
|
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
||
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
||
|
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||
|
var getPrototypeOf = Object.getPrototypeOf;
|
||
|
var objectPrototype = Object.prototype;
|
||
|
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
||
|
if (typeof sourceComponent !== 'string') {
|
||
|
// don't hoist over string (html) components
|
||
|
if (objectPrototype) {
|
||
|
var inheritedComponent = getPrototypeOf(sourceComponent);
|
||
|
|
||
|
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
||
|
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var keys = getOwnPropertyNames(sourceComponent);
|
||
|
|
||
|
if (getOwnPropertySymbols) {
|
||
|
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
||
|
}
|
||
|
|
||
|
var targetStatics = getStatics(targetComponent);
|
||
|
var sourceStatics = getStatics(sourceComponent);
|
||
|
|
||
|
for (var i = 0; i < keys.length; ++i) {
|
||
|
var key = keys[i];
|
||
|
|
||
|
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
||
|
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
||
|
|
||
|
try {
|
||
|
// Avoid failures from read-only properties
|
||
|
defineProperty(targetComponent, key, descriptor);
|
||
|
} catch (e) {}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return targetComponent;
|
||
|
}
|
||
|
|
||
|
module.exports = hoistNonReactStatics;
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js":
|
||
|
/*!*******************************************************************************************************!*\
|
||
|
!*** ../../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js ***!
|
||
|
\*******************************************************************************************************/
|
||
|
/***/ ((__unused_webpack_module, exports) => {
|
||
|
|
||
|
"use strict";
|
||
|
/** @license React v16.13.1
|
||
|
* react-is.development.js
|
||
|
*
|
||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
if (true) {
|
||
|
(function() {
|
||
|
'use strict';
|
||
|
|
||
|
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
||
|
// nor polyfill, then a plain number is used for performance.
|
||
|
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
||
|
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
||
|
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
||
|
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
||
|
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
||
|
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
||
|
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
||
|
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
||
|
// (unstable) APIs that have been removed. Can we remove the symbols?
|
||
|
|
||
|
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
||
|
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
||
|
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
||
|
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
||
|
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
||
|
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
||
|
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
||
|
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
||
|
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
||
|
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
||
|
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
||
|
|
||
|
function isValidElementType(type) {
|
||
|
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
||
|
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);
|
||
|
}
|
||
|
|
||
|
function typeOf(object) {
|
||
|
if (typeof object === 'object' && object !== null) {
|
||
|
var $$typeof = object.$$typeof;
|
||
|
|
||
|
switch ($$typeof) {
|
||
|
case REACT_ELEMENT_TYPE:
|
||
|
var type = object.type;
|
||
|
|
||
|
switch (type) {
|
||
|
case REACT_ASYNC_MODE_TYPE:
|
||
|
case REACT_CONCURRENT_MODE_TYPE:
|
||
|
case REACT_FRAGMENT_TYPE:
|
||
|
case REACT_PROFILER_TYPE:
|
||
|
case REACT_STRICT_MODE_TYPE:
|
||
|
case REACT_SUSPENSE_TYPE:
|
||
|
return type;
|
||
|
|
||
|
default:
|
||
|
var $$typeofType = type && type.$$typeof;
|
||
|
|
||
|
switch ($$typeofType) {
|
||
|
case REACT_CONTEXT_TYPE:
|
||
|
case REACT_FORWARD_REF_TYPE:
|
||
|
case REACT_LAZY_TYPE:
|
||
|
case REACT_MEMO_TYPE:
|
||
|
case REACT_PROVIDER_TYPE:
|
||
|
return $$typeofType;
|
||
|
|
||
|
default:
|
||
|
return $$typeof;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
case REACT_PORTAL_TYPE:
|
||
|
return $$typeof;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return undefined;
|
||
|
} // AsyncMode is deprecated along with isAsyncMode
|
||
|
|
||
|
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
||
|
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
||
|
var ContextConsumer = REACT_CONTEXT_TYPE;
|
||
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
||
|
var Element = REACT_ELEMENT_TYPE;
|
||
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
||
|
var Fragment = REACT_FRAGMENT_TYPE;
|
||
|
var Lazy = REACT_LAZY_TYPE;
|
||
|
var Memo = REACT_MEMO_TYPE;
|
||
|
var Portal = REACT_PORTAL_TYPE;
|
||
|
var Profiler = REACT_PROFILER_TYPE;
|
||
|
var StrictMode = REACT_STRICT_MODE_TYPE;
|
||
|
var Suspense = REACT_SUSPENSE_TYPE;
|
||
|
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
||
|
|
||
|
function isAsyncMode(object) {
|
||
|
{
|
||
|
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
||
|
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
||
|
|
||
|
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.');
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
||
|
}
|
||
|
function isConcurrentMode(object) {
|
||
|
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
||
|
}
|
||
|
function isContextConsumer(object) {
|
||
|
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||
|
}
|
||
|
function isContextProvider(object) {
|
||
|
return typeOf(object) === REACT_PROVIDER_TYPE;
|
||
|
}
|
||
|
function isElement(object) {
|
||
|
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
||
|
}
|
||
|
function isForwardRef(object) {
|
||
|
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
||
|
}
|
||
|
function isFragment(object) {
|
||
|
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
||
|
}
|
||
|
function isLazy(object) {
|
||
|
return typeOf(object) === REACT_LAZY_TYPE;
|
||
|
}
|
||
|
function isMemo(object) {
|
||
|
return typeOf(object) === REACT_MEMO_TYPE;
|
||
|
}
|
||
|
function isPortal(object) {
|
||
|
return typeOf(object) === REACT_PORTAL_TYPE;
|
||
|
}
|
||
|
function isProfiler(object) {
|
||
|
return typeOf(object) === REACT_PROFILER_TYPE;
|
||
|
}
|
||
|
function isStrictMode(object) {
|
||
|
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
||
|
}
|
||
|
function isSuspense(object) {
|
||
|
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
||
|
}
|
||
|
|
||
|
exports.AsyncMode = AsyncMode;
|
||
|
exports.ConcurrentMode = ConcurrentMode;
|
||
|
exports.ContextConsumer = ContextConsumer;
|
||
|
exports.ContextProvider = ContextProvider;
|
||
|
exports.Element = Element;
|
||
|
exports.ForwardRef = ForwardRef;
|
||
|
exports.Fragment = Fragment;
|
||
|
exports.Lazy = Lazy;
|
||
|
exports.Memo = Memo;
|
||
|
exports.Portal = Portal;
|
||
|
exports.Profiler = Profiler;
|
||
|
exports.StrictMode = StrictMode;
|
||
|
exports.Suspense = Suspense;
|
||
|
exports.isAsyncMode = isAsyncMode;
|
||
|
exports.isConcurrentMode = isConcurrentMode;
|
||
|
exports.isContextConsumer = isContextConsumer;
|
||
|
exports.isContextProvider = isContextProvider;
|
||
|
exports.isElement = isElement;
|
||
|
exports.isForwardRef = isForwardRef;
|
||
|
exports.isFragment = isFragment;
|
||
|
exports.isLazy = isLazy;
|
||
|
exports.isMemo = isMemo;
|
||
|
exports.isPortal = isPortal;
|
||
|
exports.isProfiler = isProfiler;
|
||
|
exports.isStrictMode = isStrictMode;
|
||
|
exports.isSuspense = isSuspense;
|
||
|
exports.isValidElementType = isValidElementType;
|
||
|
exports.typeOf = typeOf;
|
||
|
})();
|
||
|
}
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js":
|
||
|
/*!************************************************************************************!*\
|
||
|
!*** ../../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js ***!
|
||
|
\************************************************************************************/
|
||
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
|
||
|
|
||
|
if (false) {} else {
|
||
|
module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js");
|
||
|
}
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/object-assign/index.js":
|
||
|
/*!****************************************************!*\
|
||
|
!*** ../../../node_modules/object-assign/index.js ***!
|
||
|
\****************************************************/
|
||
|
/***/ ((module) => {
|
||
|
|
||
|
"use strict";
|
||
|
/*
|
||
|
object-assign
|
||
|
(c) Sindre Sorhus
|
||
|
@license MIT
|
||
|
*/
|
||
|
|
||
|
|
||
|
/* eslint-disable no-unused-vars */
|
||
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
||
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||
|
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
||
|
|
||
|
function toObject(val) {
|
||
|
if (val === null || val === undefined) {
|
||
|
throw new TypeError('Object.assign cannot be called with null or undefined');
|
||
|
}
|
||
|
|
||
|
return Object(val);
|
||
|
}
|
||
|
|
||
|
function shouldUseNative() {
|
||
|
try {
|
||
|
if (!Object.assign) {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
// Detect buggy property enumeration order in older V8 versions.
|
||
|
|
||
|
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
||
|
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
||
|
test1[5] = 'de';
|
||
|
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
||
|
var test2 = {};
|
||
|
for (var i = 0; i < 10; i++) {
|
||
|
test2['_' + String.fromCharCode(i)] = i;
|
||
|
}
|
||
|
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
||
|
return test2[n];
|
||
|
});
|
||
|
if (order2.join('') !== '0123456789') {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
||
|
var test3 = {};
|
||
|
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
||
|
test3[letter] = letter;
|
||
|
});
|
||
|
if (Object.keys(Object.assign({}, test3)).join('') !==
|
||
|
'abcdefghijklmnopqrst') {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
return true;
|
||
|
} catch (err) {
|
||
|
// We don't expect any of the above to throw, but better to be safe.
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
||
|
var from;
|
||
|
var to = toObject(target);
|
||
|
var symbols;
|
||
|
|
||
|
for (var s = 1; s < arguments.length; s++) {
|
||
|
from = Object(arguments[s]);
|
||
|
|
||
|
for (var key in from) {
|
||
|
if (hasOwnProperty.call(from, key)) {
|
||
|
to[key] = from[key];
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if (getOwnPropertySymbols) {
|
||
|
symbols = getOwnPropertySymbols(from);
|
||
|
for (var i = 0; i < symbols.length; i++) {
|
||
|
if (propIsEnumerable.call(from, symbols[i])) {
|
||
|
to[symbols[i]] = from[symbols[i]];
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return to;
|
||
|
};
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/prop-types/checkPropTypes.js":
|
||
|
/*!**********************************************************!*\
|
||
|
!*** ../../../node_modules/prop-types/checkPropTypes.js ***!
|
||
|
\**********************************************************/
|
||
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
/**
|
||
|
* Copyright (c) 2013-present, Facebook, Inc.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/
|
||
|
|
||
|
|
||
|
|
||
|
var printWarning = function() {};
|
||
|
|
||
|
if (true) {
|
||
|
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../../../node_modules/prop-types/lib/ReactPropTypesSecret.js");
|
||
|
var loggedTypeFailures = {};
|
||
|
var has = __webpack_require__(/*! ./lib/has */ "../../../node_modules/prop-types/lib/has.js");
|
||
|
|
||
|
printWarning = function(text) {
|
||
|
var message = 'Warning: ' + text;
|
||
|
if (typeof console !== 'undefined') {
|
||
|
console.error(message);
|
||
|
}
|
||
|
try {
|
||
|
// --- Welcome to debugging React ---
|
||
|
// This error was thrown as a convenience so that you can use this stack
|
||
|
// to find the callsite that caused this warning to fire.
|
||
|
throw new Error(message);
|
||
|
} catch (x) { /**/ }
|
||
|
};
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Assert that the values match with the type specs.
|
||
|
* Error messages are memorized and will only be shown once.
|
||
|
*
|
||
|
* @param {object} typeSpecs Map of name to a ReactPropType
|
||
|
* @param {object} values Runtime values that need to be type-checked
|
||
|
* @param {string} location e.g. "prop", "context", "child context"
|
||
|
* @param {string} componentName Name of the component for error messages.
|
||
|
* @param {?Function} getStack Returns the component stack.
|
||
|
* @private
|
||
|
*/
|
||
|
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
||
|
if (true) {
|
||
|
for (var typeSpecName in typeSpecs) {
|
||
|
if (has(typeSpecs, typeSpecName)) {
|
||
|
var error;
|
||
|
// Prop type validation may throw. In case they do, we don't want to
|
||
|
// fail the render phase where it didn't fail before. So we log it.
|
||
|
// After these have been cleaned up, we'll let them throw.
|
||
|
try {
|
||
|
// This is intentionally an invariant that gets caught. It's the same
|
||
|
// behavior as without this statement except with a better message.
|
||
|
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
||
|
var err = Error(
|
||
|
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
||
|
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
||
|
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
||
|
);
|
||
|
err.name = 'Invariant Violation';
|
||
|
throw err;
|
||
|
}
|
||
|
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
||
|
} catch (ex) {
|
||
|
error = ex;
|
||
|
}
|
||
|
if (error && !(error instanceof Error)) {
|
||
|
printWarning(
|
||
|
(componentName || 'React class') + ': type specification of ' +
|
||
|
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
||
|
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
||
|
'You may have forgotten to pass an argument to the type checker ' +
|
||
|
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
||
|
'shape all require an argument).'
|
||
|
);
|
||
|
}
|
||
|
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
||
|
// Only monitor this failure once because there tends to be a lot of the
|
||
|
// same error.
|
||
|
loggedTypeFailures[error.message] = true;
|
||
|
|
||
|
var stack = getStack ? getStack() : '';
|
||
|
|
||
|
printWarning(
|
||
|
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Resets warning cache when testing.
|
||
|
*
|
||
|
* @private
|
||
|
*/
|
||
|
checkPropTypes.resetWarningCache = function() {
|
||
|
if (true) {
|
||
|
loggedTypeFailures = {};
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = checkPropTypes;
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/prop-types/factoryWithTypeCheckers.js":
|
||
|
/*!*******************************************************************!*\
|
||
|
!*** ../../../node_modules/prop-types/factoryWithTypeCheckers.js ***!
|
||
|
\*******************************************************************/
|
||
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
/**
|
||
|
* Copyright (c) 2013-present, Facebook, Inc.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/
|
||
|
|
||
|
|
||
|
|
||
|
var ReactIs = __webpack_require__(/*! react-is */ "../../../node_modules/prop-types/node_modules/react-is/index.js");
|
||
|
var assign = __webpack_require__(/*! object-assign */ "../../../node_modules/object-assign/index.js");
|
||
|
|
||
|
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../../../node_modules/prop-types/lib/ReactPropTypesSecret.js");
|
||
|
var has = __webpack_require__(/*! ./lib/has */ "../../../node_modules/prop-types/lib/has.js");
|
||
|
var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../../../node_modules/prop-types/checkPropTypes.js");
|
||
|
|
||
|
var printWarning = function() {};
|
||
|
|
||
|
if (true) {
|
||
|
printWarning = function(text) {
|
||
|
var message = 'Warning: ' + text;
|
||
|
if (typeof console !== 'undefined') {
|
||
|
console.error(message);
|
||
|
}
|
||
|
try {
|
||
|
// --- Welcome to debugging React ---
|
||
|
// This error was thrown as a convenience so that you can use this stack
|
||
|
// to find the callsite that caused this warning to fire.
|
||
|
throw new Error(message);
|
||
|
} catch (x) {}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
function emptyFunctionThatReturnsNull() {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
module.exports = function(isValidElement, throwOnDirectAccess) {
|
||
|
/* global Symbol */
|
||
|
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
||
|
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
||
|
|
||
|
/**
|
||
|
* Returns the iterator method function contained on the iterable object.
|
||
|
*
|
||
|
* Be sure to invoke the function with the iterable as context:
|
||
|
*
|
||
|
* var iteratorFn = getIteratorFn(myIterable);
|
||
|
* if (iteratorFn) {
|
||
|
* var iterator = iteratorFn.call(myIterable);
|
||
|
* ...
|
||
|
* }
|
||
|
*
|
||
|
* @param {?object} maybeIterable
|
||
|
* @return {?function}
|
||
|
*/
|
||
|
function getIteratorFn(maybeIterable) {
|
||
|
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
||
|
if (typeof iteratorFn === 'function') {
|
||
|
return iteratorFn;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Collection of methods that allow declaration and validation of props that are
|
||
|
* supplied to React components. Example usage:
|
||
|
*
|
||
|
* var Props = require('ReactPropTypes');
|
||
|
* var MyArticle = React.createClass({
|
||
|
* propTypes: {
|
||
|
* // An optional string prop named "description".
|
||
|
* description: Props.string,
|
||
|
*
|
||
|
* // A required enum prop named "category".
|
||
|
* category: Props.oneOf(['News','Photos']).isRequired,
|
||
|
*
|
||
|
* // A prop named "dialog" that requires an instance of Dialog.
|
||
|
* dialog: Props.instanceOf(Dialog).isRequired
|
||
|
* },
|
||
|
* render: function() { ... }
|
||
|
* });
|
||
|
*
|
||
|
* A more formal specification of how these methods are used:
|
||
|
*
|
||
|
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
||
|
* decl := ReactPropTypes.{type}(.isRequired)?
|
||
|
*
|
||
|
* Each and every declaration produces a function with the same signature. This
|
||
|
* allows the creation of custom validation functions. For example:
|
||
|
*
|
||
|
* var MyLink = React.createClass({
|
||
|
* propTypes: {
|
||
|
* // An optional string or URI prop named "href".
|
||
|
* href: function(props, propName, componentName) {
|
||
|
* var propValue = props[propName];
|
||
|
* if (propValue != null && typeof propValue !== 'string' &&
|
||
|
* !(propValue instanceof URI)) {
|
||
|
* return new Error(
|
||
|
* 'Expected a string or an URI for ' + propName + ' in ' +
|
||
|
* componentName
|
||
|
* );
|
||
|
* }
|
||
|
* }
|
||
|
* },
|
||
|
* render: function() {...}
|
||
|
* });
|
||
|
*
|
||
|
* @internal
|
||
|
*/
|
||
|
|
||
|
var ANONYMOUS = '<<anonymous>>';
|
||
|
|
||
|
// Important!
|
||
|
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
||
|
var ReactPropTypes = {
|
||
|
array: createPrimitiveTypeChecker('array'),
|
||
|
bigint: createPrimitiveTypeChecker('bigint'),
|
||
|
bool: createPrimitiveTypeChecker('boolean'),
|
||
|
func: createPrimitiveTypeChecker('function'),
|
||
|
number: createPrimitiveTypeChecker('number'),
|
||
|
object: createPrimitiveTypeChecker('object'),
|
||
|
string: createPrimitiveTypeChecker('string'),
|
||
|
symbol: createPrimitiveTypeChecker('symbol'),
|
||
|
|
||
|
any: createAnyTypeChecker(),
|
||
|
arrayOf: createArrayOfTypeChecker,
|
||
|
element: createElementTypeChecker(),
|
||
|
elementType: createElementTypeTypeChecker(),
|
||
|
instanceOf: createInstanceTypeChecker,
|
||
|
node: createNodeChecker(),
|
||
|
objectOf: createObjectOfTypeChecker,
|
||
|
oneOf: createEnumTypeChecker,
|
||
|
oneOfType: createUnionTypeChecker,
|
||
|
shape: createShapeTypeChecker,
|
||
|
exact: createStrictShapeTypeChecker,
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
||
|
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
||
|
*/
|
||
|
/*eslint-disable no-self-compare*/
|
||
|
function is(x, y) {
|
||
|
// SameValue algorithm
|
||
|
if (x === y) {
|
||
|
// Steps 1-5, 7-10
|
||
|
// Steps 6.b-6.e: +0 != -0
|
||
|
return x !== 0 || 1 / x === 1 / y;
|
||
|
} else {
|
||
|
// Step 6.a: NaN == NaN
|
||
|
return x !== x && y !== y;
|
||
|
}
|
||
|
}
|
||
|
/*eslint-enable no-self-compare*/
|
||
|
|
||
|
/**
|
||
|
* We use an Error-like object for backward compatibility as people may call
|
||
|
* PropTypes directly and inspect their output. However, we don't use real
|
||
|
* Errors anymore. We don't inspect their stack anyway, and creating them
|
||
|
* is prohibitively expensive if they are created too often, such as what
|
||
|
* happens in oneOfType() for any type before the one that matched.
|
||
|
*/
|
||
|
function PropTypeError(message, data) {
|
||
|
this.message = message;
|
||
|
this.data = data && typeof data === 'object' ? data: {};
|
||
|
this.stack = '';
|
||
|
}
|
||
|
// Make `instanceof Error` still work for returned errors.
|
||
|
PropTypeError.prototype = Error.prototype;
|
||
|
|
||
|
function createChainableTypeChecker(validate) {
|
||
|
if (true) {
|
||
|
var manualPropTypeCallCache = {};
|
||
|
var manualPropTypeWarningCount = 0;
|
||
|
}
|
||
|
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
||
|
componentName = componentName || ANONYMOUS;
|
||
|
propFullName = propFullName || propName;
|
||
|
|
||
|
if (secret !== ReactPropTypesSecret) {
|
||
|
if (throwOnDirectAccess) {
|
||
|
// New behavior only for users of `prop-types` package
|
||
|
var err = new Error(
|
||
|
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
||
|
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
||
|
'Read more at http://fb.me/use-check-prop-types'
|
||
|
);
|
||
|
err.name = 'Invariant Violation';
|
||
|
throw err;
|
||
|
} else if ( true && typeof console !== 'undefined') {
|
||
|
// Old behavior for people using React.PropTypes
|
||
|
var cacheKey = componentName + ':' + propName;
|
||
|
if (
|
||
|
!manualPropTypeCallCache[cacheKey] &&
|
||
|
// Avoid spamming the console because they are often not actionable except for lib authors
|
||
|
manualPropTypeWarningCount < 3
|
||
|
) {
|
||
|
printWarning(
|
||
|
'You are manually calling a React.PropTypes validation ' +
|
||
|
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
||
|
'and will throw in the standalone `prop-types` package. ' +
|
||
|
'You may be seeing this warning due to a third-party PropTypes ' +
|
||
|
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
||
|
);
|
||
|
manualPropTypeCallCache[cacheKey] = true;
|
||
|
manualPropTypeWarningCount++;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if (props[propName] == null) {
|
||
|
if (isRequired) {
|
||
|
if (props[propName] === null) {
|
||
|
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
||
|
}
|
||
|
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
||
|
}
|
||
|
return null;
|
||
|
} else {
|
||
|
return validate(props, propName, componentName, location, propFullName);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var chainedCheckType = checkType.bind(null, false);
|
||
|
chainedCheckType.isRequired = checkType.bind(null, true);
|
||
|
|
||
|
return chainedCheckType;
|
||
|
}
|
||
|
|
||
|
function createPrimitiveTypeChecker(expectedType) {
|
||
|
function validate(props, propName, componentName, location, propFullName, secret) {
|
||
|
var propValue = props[propName];
|
||
|
var propType = getPropType(propValue);
|
||
|
if (propType !== expectedType) {
|
||
|
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
||
|
// check, but we can offer a more precise error message here rather than
|
||
|
// 'of type `object`'.
|
||
|
var preciseType = getPreciseType(propValue);
|
||
|
|
||
|
return new PropTypeError(
|
||
|
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
||
|
{expectedType: expectedType}
|
||
|
);
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
return createChainableTypeChecker(validate);
|
||
|
}
|
||
|
|
||
|
function createAnyTypeChecker() {
|
||
|
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
||
|
}
|
||
|
|
||
|
function createArrayOfTypeChecker(typeChecker) {
|
||
|
function validate(props, propName, componentName, location, propFullName) {
|
||
|
if (typeof typeChecker !== 'function') {
|
||
|
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
||
|
}
|
||
|
var propValue = props[propName];
|
||
|
if (!Array.isArray(propValue)) {
|
||
|
var propType = getPropType(propValue);
|
||
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
||
|
}
|
||
|
for (var i = 0; i < propValue.length; i++) {
|
||
|
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
||
|
if (error instanceof Error) {
|
||
|
return error;
|
||
|
}
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
return createChainableTypeChecker(validate);
|
||
|
}
|
||
|
|
||
|
function createElementTypeChecker() {
|
||
|
function validate(props, propName, componentName, location, propFullName) {
|
||
|
var propValue = props[propName];
|
||
|
if (!isValidElement(propValue)) {
|
||
|
var propType = getPropType(propValue);
|
||
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
return createChainableTypeChecker(validate);
|
||
|
}
|
||
|
|
||
|
function createElementTypeTypeChecker() {
|
||
|
function validate(props, propName, componentName, location, propFullName) {
|
||
|
var propValue = props[propName];
|
||
|
if (!ReactIs.isValidElementType(propValue)) {
|
||
|
var propType = getPropType(propValue);
|
||
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
return createChainableTypeChecker(validate);
|
||
|
}
|
||
|
|
||
|
function createInstanceTypeChecker(expectedClass) {
|
||
|
function validate(props, propName, componentName, location, propFullName) {
|
||
|
if (!(props[propName] instanceof expectedClass)) {
|
||
|
var expectedClassName = expectedClass.name || ANONYMOUS;
|
||
|
var actualClassName = getClassName(props[propName]);
|
||
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
return createChainableTypeChecker(validate);
|
||
|
}
|
||
|
|
||
|
function createEnumTypeChecker(expectedValues) {
|
||
|
if (!Array.isArray(expectedValues)) {
|
||
|
if (true) {
|
||
|
if (arguments.length > 1) {
|
||
|
printWarning(
|
||
|
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
||
|
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
||
|
);
|
||
|
} else {
|
||
|
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
||
|
}
|
||
|
}
|
||
|
return emptyFunctionThatReturnsNull;
|
||
|
}
|
||
|
|
||
|
function validate(props, propName, componentName, location, propFullName) {
|
||
|
var propValue = props[propName];
|
||
|
for (var i = 0; i < expectedValues.length; i++) {
|
||
|
if (is(propValue, expectedValues[i])) {
|
||
|
return null;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
||
|
var type = getPreciseType(value);
|
||
|
if (type === 'symbol') {
|
||
|
return String(value);
|
||
|
}
|
||
|
return value;
|
||
|
});
|
||
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
||
|
}
|
||
|
return createChainableTypeChecker(validate);
|
||
|
}
|
||
|
|
||
|
function createObjectOfTypeChecker(typeChecker) {
|
||
|
function validate(props, propName, componentName, location, propFullName) {
|
||
|
if (typeof typeChecker !== 'function') {
|
||
|
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
||
|
}
|
||
|
var propValue = props[propName];
|
||
|
var propType = getPropType(propValue);
|
||
|
if (propType !== 'object') {
|
||
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
||
|
}
|
||
|
for (var key in propValue) {
|
||
|
if (has(propValue, key)) {
|
||
|
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
||
|
if (error instanceof Error) {
|
||
|
return error;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
return createChainableTypeChecker(validate);
|
||
|
}
|
||
|
|
||
|
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
||
|
if (!Array.isArray(arrayOfTypeCheckers)) {
|
||
|
true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
|
||
|
return emptyFunctionThatReturnsNull;
|
||
|
}
|
||
|
|
||
|
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
||
|
var checker = arrayOfTypeCheckers[i];
|
||
|
if (typeof checker !== 'function') {
|
||
|
printWarning(
|
||
|
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
||
|
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
||
|
);
|
||
|
return emptyFunctionThatReturnsNull;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function validate(props, propName, componentName, location, propFullName) {
|
||
|
var expectedTypes = [];
|
||
|
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
||
|
var checker = arrayOfTypeCheckers[i];
|
||
|
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
||
|
if (checkerResult == null) {
|
||
|
return null;
|
||
|
}
|
||
|
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
||
|
expectedTypes.push(checkerResult.data.expectedType);
|
||
|
}
|
||
|
}
|
||
|
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
|
||
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
||
|
}
|
||
|
return createChainableTypeChecker(validate);
|
||
|
}
|
||
|
|
||
|
function createNodeChecker() {
|
||
|
function validate(props, propName, componentName, location, propFullName) {
|
||
|
if (!isNode(props[propName])) {
|
||
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
return createChainableTypeChecker(validate);
|
||
|
}
|
||
|
|
||
|
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
||
|
return new PropTypeError(
|
||
|
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
||
|
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
||
|
);
|
||
|
}
|
||
|
|
||
|
function createShapeTypeChecker(shapeTypes) {
|
||
|
function validate(props, propName, componentName, location, propFullName) {
|
||
|
var propValue = props[propName];
|
||
|
var propType = getPropType(propValue);
|
||
|
if (propType !== 'object') {
|
||
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
||
|
}
|
||
|
for (var key in shapeTypes) {
|
||
|
var checker = shapeTypes[key];
|
||
|
if (typeof checker !== 'function') {
|
||
|
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
||
|
}
|
||
|
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
||
|
if (error) {
|
||
|
return error;
|
||
|
}
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
return createChainableTypeChecker(validate);
|
||
|
}
|
||
|
|
||
|
function createStrictShapeTypeChecker(shapeTypes) {
|
||
|
function validate(props, propName, componentName, location, propFullName) {
|
||
|
var propValue = props[propName];
|
||
|
var propType = getPropType(propValue);
|
||
|
if (propType !== 'object') {
|
||
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
||
|
}
|
||
|
// We need to check all keys in case some are required but missing from props.
|
||
|
var allKeys = assign({}, props[propName], shapeTypes);
|
||
|
for (var key in allKeys) {
|
||
|
var checker = shapeTypes[key];
|
||
|
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
||
|
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
||
|
}
|
||
|
if (!checker) {
|
||
|
return new PropTypeError(
|
||
|
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
||
|
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
||
|
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
||
|
);
|
||
|
}
|
||
|
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
||
|
if (error) {
|
||
|
return error;
|
||
|
}
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
return createChainableTypeChecker(validate);
|
||
|
}
|
||
|
|
||
|
function isNode(propValue) {
|
||
|
switch (typeof propValue) {
|
||
|
case 'number':
|
||
|
case 'string':
|
||
|
case 'undefined':
|
||
|
return true;
|
||
|
case 'boolean':
|
||
|
return !propValue;
|
||
|
case 'object':
|
||
|
if (Array.isArray(propValue)) {
|
||
|
return propValue.every(isNode);
|
||
|
}
|
||
|
if (propValue === null || isValidElement(propValue)) {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
var iteratorFn = getIteratorFn(propValue);
|
||
|
if (iteratorFn) {
|
||
|
var iterator = iteratorFn.call(propValue);
|
||
|
var step;
|
||
|
if (iteratorFn !== propValue.entries) {
|
||
|
while (!(step = iterator.next()).done) {
|
||
|
if (!isNode(step.value)) {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
} else {
|
||
|
// Iterator will provide entry [k,v] tuples rather than values.
|
||
|
while (!(step = iterator.next()).done) {
|
||
|
var entry = step.value;
|
||
|
if (entry) {
|
||
|
if (!isNode(entry[1])) {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
} else {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
return true;
|
||
|
default:
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function isSymbol(propType, propValue) {
|
||
|
// Native Symbol.
|
||
|
if (propType === 'symbol') {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
// falsy value can't be a Symbol
|
||
|
if (!propValue) {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
||
|
if (propValue['@@toStringTag'] === 'Symbol') {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
// Fallback for non-spec compliant Symbols which are polyfilled.
|
||
|
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
// Equivalent of `typeof` but with special handling for array and regexp.
|
||
|
function getPropType(propValue) {
|
||
|
var propType = typeof propValue;
|
||
|
if (Array.isArray(propValue)) {
|
||
|
return 'array';
|
||
|
}
|
||
|
if (propValue instanceof RegExp) {
|
||
|
// Old webkits (at least until Android 4.0) return 'function' rather than
|
||
|
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
||
|
// passes PropTypes.object.
|
||
|
return 'object';
|
||
|
}
|
||
|
if (isSymbol(propType, propValue)) {
|
||
|
return 'symbol';
|
||
|
}
|
||
|
return propType;
|
||
|
}
|
||
|
|
||
|
// This handles more types than `getPropType`. Only used for error messages.
|
||
|
// See `createPrimitiveTypeChecker`.
|
||
|
function getPreciseType(propValue) {
|
||
|
if (typeof propValue === 'undefined' || propValue === null) {
|
||
|
return '' + propValue;
|
||
|
}
|
||
|
var propType = getPropType(propValue);
|
||
|
if (propType === 'object') {
|
||
|
if (propValue instanceof Date) {
|
||
|
return 'date';
|
||
|
} else if (propValue instanceof RegExp) {
|
||
|
return 'regexp';
|
||
|
}
|
||
|
}
|
||
|
return propType;
|
||
|
}
|
||
|
|
||
|
// Returns a string that is postfixed to a warning about an invalid type.
|
||
|
// For example, "undefined" or "of type array"
|
||
|
function getPostfixForTypeWarning(value) {
|
||
|
var type = getPreciseType(value);
|
||
|
switch (type) {
|
||
|
case 'array':
|
||
|
case 'object':
|
||
|
return 'an ' + type;
|
||
|
case 'boolean':
|
||
|
case 'date':
|
||
|
case 'regexp':
|
||
|
return 'a ' + type;
|
||
|
default:
|
||
|
return type;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Returns class name of the object, if any.
|
||
|
function getClassName(propValue) {
|
||
|
if (!propValue.constructor || !propValue.constructor.name) {
|
||
|
return ANONYMOUS;
|
||
|
}
|
||
|
return propValue.constructor.name;
|
||
|
}
|
||
|
|
||
|
ReactPropTypes.checkPropTypes = checkPropTypes;
|
||
|
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
||
|
ReactPropTypes.PropTypes = ReactPropTypes;
|
||
|
|
||
|
return ReactPropTypes;
|
||
|
};
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/prop-types/index.js":
|
||
|
/*!*************************************************!*\
|
||
|
!*** ../../../node_modules/prop-types/index.js ***!
|
||
|
\*************************************************/
|
||
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||
|
|
||
|
/**
|
||
|
* Copyright (c) 2013-present, Facebook, Inc.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/
|
||
|
|
||
|
if (true) {
|
||
|
var ReactIs = __webpack_require__(/*! react-is */ "../../../node_modules/prop-types/node_modules/react-is/index.js");
|
||
|
|
||
|
// By explicitly using `prop-types` you are opting into new development behavior.
|
||
|
// http://fb.me/prop-types-in-prod
|
||
|
var throwOnDirectAccess = true;
|
||
|
module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../../../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
|
||
|
} else {}
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/prop-types/lib/ReactPropTypesSecret.js":
|
||
|
/*!********************************************************************!*\
|
||
|
!*** ../../../node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
|
||
|
\********************************************************************/
|
||
|
/***/ ((module) => {
|
||
|
|
||
|
"use strict";
|
||
|
/**
|
||
|
* Copyright (c) 2013-present, Facebook, Inc.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/
|
||
|
|
||
|
|
||
|
|
||
|
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
||
|
|
||
|
module.exports = ReactPropTypesSecret;
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/prop-types/lib/has.js":
|
||
|
/*!***************************************************!*\
|
||
|
!*** ../../../node_modules/prop-types/lib/has.js ***!
|
||
|
\***************************************************/
|
||
|
/***/ ((module) => {
|
||
|
|
||
|
module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js":
|
||
|
/*!******************************************************************************************!*\
|
||
|
!*** ../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***!
|
||
|
\******************************************************************************************/
|
||
|
/***/ ((__unused_webpack_module, exports) => {
|
||
|
|
||
|
"use strict";
|
||
|
/** @license React v16.13.1
|
||
|
* react-is.development.js
|
||
|
*
|
||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
if (true) {
|
||
|
(function() {
|
||
|
'use strict';
|
||
|
|
||
|
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
||
|
// nor polyfill, then a plain number is used for performance.
|
||
|
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
||
|
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
||
|
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
||
|
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
||
|
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
||
|
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
||
|
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
||
|
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
||
|
// (unstable) APIs that have been removed. Can we remove the symbols?
|
||
|
|
||
|
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
||
|
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
||
|
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
||
|
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
||
|
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
||
|
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
||
|
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
||
|
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
||
|
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
||
|
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
||
|
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
||
|
|
||
|
function isValidElementType(type) {
|
||
|
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
||
|
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);
|
||
|
}
|
||
|
|
||
|
function typeOf(object) {
|
||
|
if (typeof object === 'object' && object !== null) {
|
||
|
var $$typeof = object.$$typeof;
|
||
|
|
||
|
switch ($$typeof) {
|
||
|
case REACT_ELEMENT_TYPE:
|
||
|
var type = object.type;
|
||
|
|
||
|
switch (type) {
|
||
|
case REACT_ASYNC_MODE_TYPE:
|
||
|
case REACT_CONCURRENT_MODE_TYPE:
|
||
|
case REACT_FRAGMENT_TYPE:
|
||
|
case REACT_PROFILER_TYPE:
|
||
|
case REACT_STRICT_MODE_TYPE:
|
||
|
case REACT_SUSPENSE_TYPE:
|
||
|
return type;
|
||
|
|
||
|
default:
|
||
|
var $$typeofType = type && type.$$typeof;
|
||
|
|
||
|
switch ($$typeofType) {
|
||
|
case REACT_CONTEXT_TYPE:
|
||
|
case REACT_FORWARD_REF_TYPE:
|
||
|
case REACT_LAZY_TYPE:
|
||
|
case REACT_MEMO_TYPE:
|
||
|
case REACT_PROVIDER_TYPE:
|
||
|
return $$typeofType;
|
||
|
|
||
|
default:
|
||
|
return $$typeof;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
case REACT_PORTAL_TYPE:
|
||
|
return $$typeof;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return undefined;
|
||
|
} // AsyncMode is deprecated along with isAsyncMode
|
||
|
|
||
|
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
||
|
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
||
|
var ContextConsumer = REACT_CONTEXT_TYPE;
|
||
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
||
|
var Element = REACT_ELEMENT_TYPE;
|
||
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
||
|
var Fragment = REACT_FRAGMENT_TYPE;
|
||
|
var Lazy = REACT_LAZY_TYPE;
|
||
|
var Memo = REACT_MEMO_TYPE;
|
||
|
var Portal = REACT_PORTAL_TYPE;
|
||
|
var Profiler = REACT_PROFILER_TYPE;
|
||
|
var StrictMode = REACT_STRICT_MODE_TYPE;
|
||
|
var Suspense = REACT_SUSPENSE_TYPE;
|
||
|
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
||
|
|
||
|
function isAsyncMode(object) {
|
||
|
{
|
||
|
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
||
|
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
||
|
|
||
|
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.');
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
||
|
}
|
||
|
function isConcurrentMode(object) {
|
||
|
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
||
|
}
|
||
|
function isContextConsumer(object) {
|
||
|
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||
|
}
|
||
|
function isContextProvider(object) {
|
||
|
return typeOf(object) === REACT_PROVIDER_TYPE;
|
||
|
}
|
||
|
function isElement(object) {
|
||
|
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
||
|
}
|
||
|
function isForwardRef(object) {
|
||
|
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
||
|
}
|
||
|
function isFragment(object) {
|
||
|
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
||
|
}
|
||
|
function isLazy(object) {
|
||
|
return typeOf(object) === REACT_LAZY_TYPE;
|
||
|
}
|
||
|
function isMemo(object) {
|
||
|
return typeOf(object) === REACT_MEMO_TYPE;
|
||
|
}
|
||
|
function isPortal(object) {
|
||
|
return typeOf(object) === REACT_PORTAL_TYPE;
|
||
|
}
|
||
|
function isProfiler(object) {
|
||
|
return typeOf(object) === REACT_PROFILER_TYPE;
|
||
|
}
|
||
|
function isStrictMode(object) {
|
||
|
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
||
|
}
|
||
|
function isSuspense(object) {
|
||
|
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
||
|
}
|
||
|
|
||
|
exports.AsyncMode = AsyncMode;
|
||
|
exports.ConcurrentMode = ConcurrentMode;
|
||
|
exports.ContextConsumer = ContextConsumer;
|
||
|
exports.ContextProvider = ContextProvider;
|
||
|
exports.Element = Element;
|
||
|
exports.ForwardRef = ForwardRef;
|
||
|
exports.Fragment = Fragment;
|
||
|
exports.Lazy = Lazy;
|
||
|
exports.Memo = Memo;
|
||
|
exports.Portal = Portal;
|
||
|
exports.Profiler = Profiler;
|
||
|
exports.StrictMode = StrictMode;
|
||
|
exports.Suspense = Suspense;
|
||
|
exports.isAsyncMode = isAsyncMode;
|
||
|
exports.isConcurrentMode = isConcurrentMode;
|
||
|
exports.isContextConsumer = isContextConsumer;
|
||
|
exports.isContextProvider = isContextProvider;
|
||
|
exports.isElement = isElement;
|
||
|
exports.isForwardRef = isForwardRef;
|
||
|
exports.isFragment = isFragment;
|
||
|
exports.isLazy = isLazy;
|
||
|
exports.isMemo = isMemo;
|
||
|
exports.isPortal = isPortal;
|
||
|
exports.isProfiler = isProfiler;
|
||
|
exports.isStrictMode = isStrictMode;
|
||
|
exports.isSuspense = isSuspense;
|
||
|
exports.isValidElementType = isValidElementType;
|
||
|
exports.typeOf = typeOf;
|
||
|
})();
|
||
|
}
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/prop-types/node_modules/react-is/index.js":
|
||
|
/*!***********************************************************************!*\
|
||
|
!*** ../../../node_modules/prop-types/node_modules/react-is/index.js ***!
|
||
|
\***********************************************************************/
|
||
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
|
||
|
|
||
|
if (false) {} else {
|
||
|
module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js");
|
||
|
}
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/components/Context.js":
|
||
|
/*!******************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/components/Context.js ***!
|
||
|
\******************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ ReactReduxContext: () => (/* binding */ ReactReduxContext),
|
||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||
|
|
||
|
var ReactReduxContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext(null);
|
||
|
|
||
|
if (true) {
|
||
|
ReactReduxContext.displayName = 'ReactRedux';
|
||
|
}
|
||
|
|
||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ReactReduxContext);
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/components/Provider.js":
|
||
|
/*!*******************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/components/Provider.js ***!
|
||
|
\*******************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
|
||
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
|
||
|
/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Context */ "../../../node_modules/react-redux/es/components/Context.js");
|
||
|
/* harmony import */ var _utils_Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Subscription */ "../../../node_modules/react-redux/es/utils/Subscription.js");
|
||
|
/* harmony import */ var _utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/useIsomorphicLayoutEffect */ "../../../node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js");
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
function Provider(_ref) {
|
||
|
var store = _ref.store,
|
||
|
context = _ref.context,
|
||
|
children = _ref.children;
|
||
|
var contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
||
|
var subscription = (0,_utils_Subscription__WEBPACK_IMPORTED_MODULE_2__.createSubscription)(store);
|
||
|
return {
|
||
|
store: store,
|
||
|
subscription: subscription
|
||
|
};
|
||
|
}, [store]);
|
||
|
var previousState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
||
|
return store.getState();
|
||
|
}, [store]);
|
||
|
(0,_utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_3__.useIsomorphicLayoutEffect)(function () {
|
||
|
var subscription = contextValue.subscription;
|
||
|
subscription.onStateChange = subscription.notifyNestedSubs;
|
||
|
subscription.trySubscribe();
|
||
|
|
||
|
if (previousState !== store.getState()) {
|
||
|
subscription.notifyNestedSubs();
|
||
|
}
|
||
|
|
||
|
return function () {
|
||
|
subscription.tryUnsubscribe();
|
||
|
subscription.onStateChange = null;
|
||
|
};
|
||
|
}, [contextValue, previousState]);
|
||
|
var Context = context || _Context__WEBPACK_IMPORTED_MODULE_1__.ReactReduxContext;
|
||
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Context.Provider, {
|
||
|
value: contextValue
|
||
|
}, children);
|
||
|
}
|
||
|
|
||
|
if (true) {
|
||
|
Provider.propTypes = {
|
||
|
store: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
|
||
|
subscribe: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired,
|
||
|
dispatch: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired,
|
||
|
getState: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired
|
||
|
}),
|
||
|
context: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object),
|
||
|
children: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().any)
|
||
|
};
|
||
|
}
|
||
|
|
||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Provider);
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/components/connectAdvanced.js":
|
||
|
/*!**************************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/components/connectAdvanced.js ***!
|
||
|
\**************************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (/* binding */ connectAdvanced)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "../../../node_modules/@babel/runtime/helpers/esm/extends.js");
|
||
|
/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");
|
||
|
/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! hoist-non-react-statics */ "../../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js");
|
||
|
/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__);
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
||
|
/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-is */ "../../../node_modules/react-redux/node_modules/react-is/index.js");
|
||
|
/* harmony import */ var _utils_Subscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/Subscription */ "../../../node_modules/react-redux/es/utils/Subscription.js");
|
||
|
/* harmony import */ var _utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/useIsomorphicLayoutEffect */ "../../../node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js");
|
||
|
/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Context */ "../../../node_modules/react-redux/es/components/Context.js");
|
||
|
|
||
|
|
||
|
var _excluded = ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef", "forwardRef", "context"],
|
||
|
_excluded2 = ["reactReduxForwardedRef"];
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
// Define some constant arrays just to avoid re-creating these
|
||
|
|
||
|
var EMPTY_ARRAY = [];
|
||
|
var NO_SUBSCRIPTION_ARRAY = [null, null];
|
||
|
|
||
|
var stringifyComponent = function stringifyComponent(Comp) {
|
||
|
try {
|
||
|
return JSON.stringify(Comp);
|
||
|
} catch (err) {
|
||
|
return String(Comp);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
function storeStateUpdatesReducer(state, action) {
|
||
|
var updateCount = state[1];
|
||
|
return [action.payload, updateCount + 1];
|
||
|
}
|
||
|
|
||
|
function useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) {
|
||
|
(0,_utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_6__.useIsomorphicLayoutEffect)(function () {
|
||
|
return effectFunc.apply(void 0, effectArgs);
|
||
|
}, dependencies);
|
||
|
}
|
||
|
|
||
|
function captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, actualChildProps, childPropsFromStoreUpdate, notifyNestedSubs) {
|
||
|
// We want to capture the wrapper props and child props we used for later comparisons
|
||
|
lastWrapperProps.current = wrapperProps;
|
||
|
lastChildProps.current = actualChildProps;
|
||
|
renderIsScheduled.current = false; // If the render was from a store update, clear out that reference and cascade the subscriber update
|
||
|
|
||
|
if (childPropsFromStoreUpdate.current) {
|
||
|
childPropsFromStoreUpdate.current = null;
|
||
|
notifyNestedSubs();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, childPropsFromStoreUpdate, notifyNestedSubs, forceComponentUpdateDispatch) {
|
||
|
// If we're not subscribed to the store, nothing to do here
|
||
|
if (!shouldHandleStateChanges) return; // Capture values for checking if and when this component unmounts
|
||
|
|
||
|
var didUnsubscribe = false;
|
||
|
var lastThrownError = null; // We'll run this callback every time a store subscription update propagates to this component
|
||
|
|
||
|
var checkForUpdates = function checkForUpdates() {
|
||
|
if (didUnsubscribe) {
|
||
|
// Don't run stale listeners.
|
||
|
// Redux doesn't guarantee unsubscriptions happen until next dispatch.
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
var latestStoreState = store.getState();
|
||
|
var newChildProps, error;
|
||
|
|
||
|
try {
|
||
|
// Actually run the selector with the most recent store state and wrapper props
|
||
|
// to determine what the child props should be
|
||
|
newChildProps = childPropsSelector(latestStoreState, lastWrapperProps.current);
|
||
|
} catch (e) {
|
||
|
error = e;
|
||
|
lastThrownError = e;
|
||
|
}
|
||
|
|
||
|
if (!error) {
|
||
|
lastThrownError = null;
|
||
|
} // If the child props haven't changed, nothing to do here - cascade the subscription update
|
||
|
|
||
|
|
||
|
if (newChildProps === lastChildProps.current) {
|
||
|
if (!renderIsScheduled.current) {
|
||
|
notifyNestedSubs();
|
||
|
}
|
||
|
} else {
|
||
|
// Save references to the new child props. Note that we track the "child props from store update"
|
||
|
// as a ref instead of a useState/useReducer because we need a way to determine if that value has
|
||
|
// been processed. If this went into useState/useReducer, we couldn't clear out the value without
|
||
|
// forcing another re-render, which we don't want.
|
||
|
lastChildProps.current = newChildProps;
|
||
|
childPropsFromStoreUpdate.current = newChildProps;
|
||
|
renderIsScheduled.current = true; // If the child props _did_ change (or we caught an error), this wrapper component needs to re-render
|
||
|
|
||
|
forceComponentUpdateDispatch({
|
||
|
type: 'STORE_UPDATED',
|
||
|
payload: {
|
||
|
error: error
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}; // Actually subscribe to the nearest connected ancestor (or store)
|
||
|
|
||
|
|
||
|
subscription.onStateChange = checkForUpdates;
|
||
|
subscription.trySubscribe(); // Pull data from the store after first render in case the store has
|
||
|
// changed since we began.
|
||
|
|
||
|
checkForUpdates();
|
||
|
|
||
|
var unsubscribeWrapper = function unsubscribeWrapper() {
|
||
|
didUnsubscribe = true;
|
||
|
subscription.tryUnsubscribe();
|
||
|
subscription.onStateChange = null;
|
||
|
|
||
|
if (lastThrownError) {
|
||
|
// It's possible that we caught an error due to a bad mapState function, but the
|
||
|
// parent re-rendered without this component and we're about to unmount.
|
||
|
// This shouldn't happen as long as we do top-down subscriptions correctly, but
|
||
|
// if we ever do those wrong, this throw will surface the error in our tests.
|
||
|
// In that case, throw the error from here so it doesn't get lost.
|
||
|
throw lastThrownError;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
return unsubscribeWrapper;
|
||
|
}
|
||
|
|
||
|
var initStateUpdates = function initStateUpdates() {
|
||
|
return [null, 0];
|
||
|
};
|
||
|
|
||
|
function connectAdvanced(
|
||
|
/*
|
||
|
selectorFactory is a func that is responsible for returning the selector function used to
|
||
|
compute new props from state, props, and dispatch. For example:
|
||
|
export default connectAdvanced((dispatch, options) => (state, props) => ({
|
||
|
thing: state.things[props.thingId],
|
||
|
saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),
|
||
|
}))(YourComponent)
|
||
|
Access to dispatch is provided to the factory so selectorFactories can bind actionCreators
|
||
|
outside of their selector as an optimization. Options passed to connectAdvanced are passed to
|
||
|
the selectorFactory, along with displayName and WrappedComponent, as the second argument.
|
||
|
Note that selectorFactory is responsible for all caching/memoization of inbound and outbound
|
||
|
props. Do not use connectAdvanced directly without memoizing results between calls to your
|
||
|
selector, otherwise the Connect component will re-render on every state or props change.
|
||
|
*/
|
||
|
selectorFactory, // options object:
|
||
|
_ref) {
|
||
|
if (_ref === void 0) {
|
||
|
_ref = {};
|
||
|
}
|
||
|
|
||
|
var _ref2 = _ref,
|
||
|
_ref2$getDisplayName = _ref2.getDisplayName,
|
||
|
getDisplayName = _ref2$getDisplayName === void 0 ? function (name) {
|
||
|
return "ConnectAdvanced(" + name + ")";
|
||
|
} : _ref2$getDisplayName,
|
||
|
_ref2$methodName = _ref2.methodName,
|
||
|
methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName,
|
||
|
_ref2$renderCountProp = _ref2.renderCountProp,
|
||
|
renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp,
|
||
|
_ref2$shouldHandleSta = _ref2.shouldHandleStateChanges,
|
||
|
shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta,
|
||
|
_ref2$storeKey = _ref2.storeKey,
|
||
|
storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey,
|
||
|
_ref2$withRef = _ref2.withRef,
|
||
|
withRef = _ref2$withRef === void 0 ? false : _ref2$withRef,
|
||
|
_ref2$forwardRef = _ref2.forwardRef,
|
||
|
forwardRef = _ref2$forwardRef === void 0 ? false : _ref2$forwardRef,
|
||
|
_ref2$context = _ref2.context,
|
||
|
context = _ref2$context === void 0 ? _Context__WEBPACK_IMPORTED_MODULE_7__.ReactReduxContext : _ref2$context,
|
||
|
connectOptions = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref2, _excluded);
|
||
|
|
||
|
if (true) {
|
||
|
if (renderCountProp !== undefined) {
|
||
|
throw new Error("renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension");
|
||
|
}
|
||
|
|
||
|
if (withRef) {
|
||
|
throw new Error('withRef is removed. To access the wrapped instance, use a ref on the connected component');
|
||
|
}
|
||
|
|
||
|
var customStoreWarningMessage = 'To use a custom Redux store for specific components, create a custom React context with ' + "React.createContext(), and pass the context object to React Redux's Provider and specific components" + ' like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. ' + 'You may also pass a {context : MyContext} option to connect';
|
||
|
|
||
|
if (storeKey !== 'store') {
|
||
|
throw new Error('storeKey has been removed and does not do anything. ' + customStoreWarningMessage);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var Context = context;
|
||
|
return function wrapWithConnect(WrappedComponent) {
|
||
|
if ( true && !(0,react_is__WEBPACK_IMPORTED_MODULE_4__.isValidElementType)(WrappedComponent)) {
|
||
|
throw new Error("You must pass a component to the function returned by " + (methodName + ". Instead received " + stringifyComponent(WrappedComponent)));
|
||
|
}
|
||
|
|
||
|
var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
||
|
var displayName = getDisplayName(wrappedComponentName);
|
||
|
|
||
|
var selectorFactoryOptions = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, connectOptions, {
|
||
|
getDisplayName: getDisplayName,
|
||
|
methodName: methodName,
|
||
|
renderCountProp: renderCountProp,
|
||
|
shouldHandleStateChanges: shouldHandleStateChanges,
|
||
|
storeKey: storeKey,
|
||
|
displayName: displayName,
|
||
|
wrappedComponentName: wrappedComponentName,
|
||
|
WrappedComponent: WrappedComponent
|
||
|
});
|
||
|
|
||
|
var pure = connectOptions.pure;
|
||
|
|
||
|
function createChildSelector(store) {
|
||
|
return selectorFactory(store.dispatch, selectorFactoryOptions);
|
||
|
} // If we aren't running in "pure" mode, we don't want to memoize values.
|
||
|
// To avoid conditionally calling hooks, we fall back to a tiny wrapper
|
||
|
// that just executes the given callback immediately.
|
||
|
|
||
|
|
||
|
var usePureOnlyMemo = pure ? react__WEBPACK_IMPORTED_MODULE_3__.useMemo : function (callback) {
|
||
|
return callback();
|
||
|
};
|
||
|
|
||
|
function ConnectFunction(props) {
|
||
|
var _useMemo = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () {
|
||
|
// Distinguish between actual "data" props that were passed to the wrapper component,
|
||
|
// and values needed to control behavior (forwarded refs, alternate context instances).
|
||
|
// To maintain the wrapperProps object reference, memoize this destructuring.
|
||
|
var reactReduxForwardedRef = props.reactReduxForwardedRef,
|
||
|
wrapperProps = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(props, _excluded2);
|
||
|
|
||
|
return [props.context, reactReduxForwardedRef, wrapperProps];
|
||
|
}, [props]),
|
||
|
propsContext = _useMemo[0],
|
||
|
reactReduxForwardedRef = _useMemo[1],
|
||
|
wrapperProps = _useMemo[2];
|
||
|
|
||
|
var ContextToUse = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () {
|
||
|
// Users may optionally pass in a custom context instance to use instead of our ReactReduxContext.
|
||
|
// Memoize the check that determines which context instance we should use.
|
||
|
return propsContext && propsContext.Consumer && (0,react_is__WEBPACK_IMPORTED_MODULE_4__.isContextConsumer)( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(propsContext.Consumer, null)) ? propsContext : Context;
|
||
|
}, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available
|
||
|
|
||
|
var contextValue = (0,react__WEBPACK_IMPORTED_MODULE_3__.useContext)(ContextToUse); // The store _must_ exist as either a prop or in context.
|
||
|
// We'll check to see if it _looks_ like a Redux store first.
|
||
|
// This allows us to pass through a `store` prop that is just a plain value.
|
||
|
|
||
|
var didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch);
|
||
|
var didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store);
|
||
|
|
||
|
if ( true && !didStoreComeFromProps && !didStoreComeFromContext) {
|
||
|
throw new Error("Could not find \"store\" in the context of " + ("\"" + displayName + "\". Either wrap the root component in a <Provider>, ") + "or pass a custom React context provider to <Provider> and the corresponding " + ("React context consumer to " + displayName + " in connect options."));
|
||
|
} // Based on the previous check, one of these must be true
|
||
|
|
||
|
|
||
|
var store = didStoreComeFromProps ? props.store : contextValue.store;
|
||
|
var childPropsSelector = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () {
|
||
|
// The child props selector needs the store reference as an input.
|
||
|
// Re-create this selector whenever the store changes.
|
||
|
return createChildSelector(store);
|
||
|
}, [store]);
|
||
|
|
||
|
var _useMemo2 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () {
|
||
|
if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; // This Subscription's source should match where store came from: props vs. context. A component
|
||
|
// connected to the store via props shouldn't use subscription from context, or vice versa.
|
||
|
|
||
|
// This Subscription's source should match where store came from: props vs. context. A component
|
||
|
// connected to the store via props shouldn't use subscription from context, or vice versa.
|
||
|
var subscription = (0,_utils_Subscription__WEBPACK_IMPORTED_MODULE_5__.createSubscription)(store, didStoreComeFromProps ? null : contextValue.subscription); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in
|
||
|
// the middle of the notification loop, where `subscription` will then be null. This can
|
||
|
// probably be avoided if Subscription's listeners logic is changed to not call listeners
|
||
|
// that have been unsubscribed in the middle of the notification loop.
|
||
|
|
||
|
// `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in
|
||
|
// the middle of the notification loop, where `subscription` will then be null. This can
|
||
|
// probably be avoided if Subscription's listeners logic is changed to not call listeners
|
||
|
// that have been unsubscribed in the middle of the notification loop.
|
||
|
var notifyNestedSubs = subscription.notifyNestedSubs.bind(subscription);
|
||
|
return [subscription, notifyNestedSubs];
|
||
|
}, [store, didStoreComeFromProps, contextValue]),
|
||
|
subscription = _useMemo2[0],
|
||
|
notifyNestedSubs = _useMemo2[1]; // Determine what {store, subscription} value should be put into nested context, if necessary,
|
||
|
// and memoize that value to avoid unnecessary context updates.
|
||
|
|
||
|
|
||
|
var overriddenContextValue = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () {
|
||
|
if (didStoreComeFromProps) {
|
||
|
// This component is directly subscribed to a store from props.
|
||
|
// We don't want descendants reading from this store - pass down whatever
|
||
|
// the existing context value is from the nearest connected ancestor.
|
||
|
return contextValue;
|
||
|
} // Otherwise, put this component's subscription instance into context, so that
|
||
|
// connected descendants won't update until after this component is done
|
||
|
|
||
|
|
||
|
return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, contextValue, {
|
||
|
subscription: subscription
|
||
|
});
|
||
|
}, [didStoreComeFromProps, contextValue, subscription]); // We need to force this wrapper component to re-render whenever a Redux store update
|
||
|
// causes a change to the calculated child component props (or we caught an error in mapState)
|
||
|
|
||
|
var _useReducer = (0,react__WEBPACK_IMPORTED_MODULE_3__.useReducer)(storeStateUpdatesReducer, EMPTY_ARRAY, initStateUpdates),
|
||
|
_useReducer$ = _useReducer[0],
|
||
|
previousStateUpdateResult = _useReducer$[0],
|
||
|
forceComponentUpdateDispatch = _useReducer[1]; // Propagate any mapState/mapDispatch errors upwards
|
||
|
|
||
|
|
||
|
if (previousStateUpdateResult && previousStateUpdateResult.error) {
|
||
|
throw previousStateUpdateResult.error;
|
||
|
} // Set up refs to coordinate values between the subscription effect and the render logic
|
||
|
|
||
|
|
||
|
var lastChildProps = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)();
|
||
|
var lastWrapperProps = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(wrapperProps);
|
||
|
var childPropsFromStoreUpdate = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)();
|
||
|
var renderIsScheduled = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(false);
|
||
|
var actualChildProps = usePureOnlyMemo(function () {
|
||
|
// Tricky logic here:
|
||
|
// - This render may have been triggered by a Redux store update that produced new child props
|
||
|
// - However, we may have gotten new wrapper props after that
|
||
|
// If we have new child props, and the same wrapper props, we know we should use the new child props as-is.
|
||
|
// But, if we have new wrapper props, those might change the child props, so we have to recalculate things.
|
||
|
// So, we'll use the child props from store update only if the wrapper props are the same as last time.
|
||
|
if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) {
|
||
|
return childPropsFromStoreUpdate.current;
|
||
|
} // TODO We're reading the store directly in render() here. Bad idea?
|
||
|
// This will likely cause Bad Things (TM) to happen in Concurrent Mode.
|
||
|
// Note that we do this because on renders _not_ caused by store updates, we need the latest store state
|
||
|
// to determine what the child props should be.
|
||
|
|
||
|
|
||
|
return childPropsSelector(store.getState(), wrapperProps);
|
||
|
}, [store, previousStateUpdateResult, wrapperProps]); // We need this to execute synchronously every time we re-render. However, React warns
|
||
|
// about useLayoutEffect in SSR, so we try to detect environment and fall back to
|
||
|
// just useEffect instead to avoid the warning, since neither will run anyway.
|
||
|
|
||
|
useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, actualChildProps, childPropsFromStoreUpdate, notifyNestedSubs]); // Our re-subscribe logic only runs when the store/subscription setup changes
|
||
|
|
||
|
useIsomorphicLayoutEffectWithArgs(subscribeUpdates, [shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, childPropsFromStoreUpdate, notifyNestedSubs, forceComponentUpdateDispatch], [store, subscription, childPropsSelector]); // Now that all that's done, we can finally try to actually render the child component.
|
||
|
// We memoize the elements for the rendered child component as an optimization.
|
||
|
|
||
|
var renderedWrappedComponent = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () {
|
||
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(WrappedComponent, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, actualChildProps, {
|
||
|
ref: reactReduxForwardedRef
|
||
|
}));
|
||
|
}, [reactReduxForwardedRef, WrappedComponent, actualChildProps]); // If React sees the exact same element reference as last time, it bails out of re-rendering
|
||
|
// that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate.
|
||
|
|
||
|
var renderedChild = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () {
|
||
|
if (shouldHandleStateChanges) {
|
||
|
// If this component is subscribed to store updates, we need to pass its own
|
||
|
// subscription instance down to our descendants. That means rendering the same
|
||
|
// Context instance, and putting a different value into the context.
|
||
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(ContextToUse.Provider, {
|
||
|
value: overriddenContextValue
|
||
|
}, renderedWrappedComponent);
|
||
|
}
|
||
|
|
||
|
return renderedWrappedComponent;
|
||
|
}, [ContextToUse, renderedWrappedComponent, overriddenContextValue]);
|
||
|
return renderedChild;
|
||
|
} // If we're in "pure" mode, ensure our wrapper component only re-renders when incoming props have changed.
|
||
|
|
||
|
|
||
|
var Connect = pure ? react__WEBPACK_IMPORTED_MODULE_3___default().memo(ConnectFunction) : ConnectFunction;
|
||
|
Connect.WrappedComponent = WrappedComponent;
|
||
|
Connect.displayName = ConnectFunction.displayName = displayName;
|
||
|
|
||
|
if (forwardRef) {
|
||
|
var forwarded = react__WEBPACK_IMPORTED_MODULE_3___default().forwardRef(function forwardConnectRef(props, ref) {
|
||
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(Connect, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, {
|
||
|
reactReduxForwardedRef: ref
|
||
|
}));
|
||
|
});
|
||
|
forwarded.displayName = displayName;
|
||
|
forwarded.WrappedComponent = WrappedComponent;
|
||
|
return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default()(forwarded, WrappedComponent);
|
||
|
}
|
||
|
|
||
|
return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default()(Connect, WrappedComponent);
|
||
|
};
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/connect/connect.js":
|
||
|
/*!***************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/connect/connect.js ***!
|
||
|
\***************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ createConnect: () => (/* binding */ createConnect),
|
||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "../../../node_modules/@babel/runtime/helpers/esm/extends.js");
|
||
|
/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");
|
||
|
/* harmony import */ var _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/connectAdvanced */ "../../../node_modules/react-redux/es/components/connectAdvanced.js");
|
||
|
/* harmony import */ var _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/shallowEqual */ "../../../node_modules/react-redux/es/utils/shallowEqual.js");
|
||
|
/* harmony import */ var _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mapDispatchToProps */ "../../../node_modules/react-redux/es/connect/mapDispatchToProps.js");
|
||
|
/* harmony import */ var _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./mapStateToProps */ "../../../node_modules/react-redux/es/connect/mapStateToProps.js");
|
||
|
/* harmony import */ var _mergeProps__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./mergeProps */ "../../../node_modules/react-redux/es/connect/mergeProps.js");
|
||
|
/* harmony import */ var _selectorFactory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./selectorFactory */ "../../../node_modules/react-redux/es/connect/selectorFactory.js");
|
||
|
|
||
|
|
||
|
var _excluded = ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"];
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
/*
|
||
|
connect is a facade over connectAdvanced. It turns its args into a compatible
|
||
|
selectorFactory, which has the signature:
|
||
|
|
||
|
(dispatch, options) => (nextState, nextOwnProps) => nextFinalProps
|
||
|
|
||
|
connect passes its args to connectAdvanced as options, which will in turn pass them to
|
||
|
selectorFactory each time a Connect component instance is instantiated or hot reloaded.
|
||
|
|
||
|
selectorFactory returns a final props selector from its mapStateToProps,
|
||
|
mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,
|
||
|
mergePropsFactories, and pure args.
|
||
|
|
||
|
The resulting final props selector is called by the Connect component instance whenever
|
||
|
it receives new props or store state.
|
||
|
*/
|
||
|
|
||
|
function match(arg, factories, name) {
|
||
|
for (var i = factories.length - 1; i >= 0; i--) {
|
||
|
var result = factories[i](arg);
|
||
|
if (result) return result;
|
||
|
}
|
||
|
|
||
|
return function (dispatch, options) {
|
||
|
throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + ".");
|
||
|
};
|
||
|
}
|
||
|
|
||
|
function strictEqual(a, b) {
|
||
|
return a === b;
|
||
|
} // createConnect with default args builds the 'official' connect behavior. Calling it with
|
||
|
// different options opens up some testing and extensibility scenarios
|
||
|
|
||
|
|
||
|
function createConnect(_temp) {
|
||
|
var _ref = _temp === void 0 ? {} : _temp,
|
||
|
_ref$connectHOC = _ref.connectHOC,
|
||
|
connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__["default"] : _ref$connectHOC,
|
||
|
_ref$mapStateToPropsF = _ref.mapStateToPropsFactories,
|
||
|
mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__["default"] : _ref$mapStateToPropsF,
|
||
|
_ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,
|
||
|
mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__["default"] : _ref$mapDispatchToPro,
|
||
|
_ref$mergePropsFactor = _ref.mergePropsFactories,
|
||
|
mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__["default"] : _ref$mergePropsFactor,
|
||
|
_ref$selectorFactory = _ref.selectorFactory,
|
||
|
selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__["default"] : _ref$selectorFactory;
|
||
|
|
||
|
return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {
|
||
|
if (_ref2 === void 0) {
|
||
|
_ref2 = {};
|
||
|
}
|
||
|
|
||
|
var _ref3 = _ref2,
|
||
|
_ref3$pure = _ref3.pure,
|
||
|
pure = _ref3$pure === void 0 ? true : _ref3$pure,
|
||
|
_ref3$areStatesEqual = _ref3.areStatesEqual,
|
||
|
areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,
|
||
|
_ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,
|
||
|
areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__["default"] : _ref3$areOwnPropsEqua,
|
||
|
_ref3$areStatePropsEq = _ref3.areStatePropsEqual,
|
||
|
areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__["default"] : _ref3$areStatePropsEq,
|
||
|
_ref3$areMergedPropsE = _ref3.areMergedPropsEqual,
|
||
|
areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__["default"] : _ref3$areMergedPropsE,
|
||
|
extraOptions = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref3, _excluded);
|
||
|
|
||
|
var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');
|
||
|
var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');
|
||
|
var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');
|
||
|
return connectHOC(selectorFactory, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({
|
||
|
// used in error messages
|
||
|
methodName: 'connect',
|
||
|
// used to compute Connect's displayName from the wrapped component's displayName.
|
||
|
getDisplayName: function getDisplayName(name) {
|
||
|
return "Connect(" + name + ")";
|
||
|
},
|
||
|
// if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes
|
||
|
shouldHandleStateChanges: Boolean(mapStateToProps),
|
||
|
// passed through to selectorFactory
|
||
|
initMapStateToProps: initMapStateToProps,
|
||
|
initMapDispatchToProps: initMapDispatchToProps,
|
||
|
initMergeProps: initMergeProps,
|
||
|
pure: pure,
|
||
|
areStatesEqual: areStatesEqual,
|
||
|
areOwnPropsEqual: areOwnPropsEqual,
|
||
|
areStatePropsEqual: areStatePropsEqual,
|
||
|
areMergedPropsEqual: areMergedPropsEqual
|
||
|
}, extraOptions));
|
||
|
};
|
||
|
}
|
||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/createConnect());
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/connect/mapDispatchToProps.js":
|
||
|
/*!**************************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/connect/mapDispatchToProps.js ***!
|
||
|
\**************************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
||
|
/* harmony export */ whenMapDispatchToPropsIsFunction: () => (/* binding */ whenMapDispatchToPropsIsFunction),
|
||
|
/* harmony export */ whenMapDispatchToPropsIsMissing: () => (/* binding */ whenMapDispatchToPropsIsMissing),
|
||
|
/* harmony export */ whenMapDispatchToPropsIsObject: () => (/* binding */ whenMapDispatchToPropsIsObject)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _utils_bindActionCreators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/bindActionCreators */ "../../../node_modules/react-redux/es/utils/bindActionCreators.js");
|
||
|
/* harmony import */ var _wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./wrapMapToProps */ "../../../node_modules/react-redux/es/connect/wrapMapToProps.js");
|
||
|
|
||
|
|
||
|
function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {
|
||
|
return typeof mapDispatchToProps === 'function' ? (0,_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__.wrapMapToPropsFunc)(mapDispatchToProps, 'mapDispatchToProps') : undefined;
|
||
|
}
|
||
|
function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {
|
||
|
return !mapDispatchToProps ? (0,_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__.wrapMapToPropsConstant)(function (dispatch) {
|
||
|
return {
|
||
|
dispatch: dispatch
|
||
|
};
|
||
|
}) : undefined;
|
||
|
}
|
||
|
function whenMapDispatchToPropsIsObject(mapDispatchToProps) {
|
||
|
return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? (0,_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__.wrapMapToPropsConstant)(function (dispatch) {
|
||
|
return (0,_utils_bindActionCreators__WEBPACK_IMPORTED_MODULE_0__["default"])(mapDispatchToProps, dispatch);
|
||
|
}) : undefined;
|
||
|
}
|
||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ([whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]);
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/connect/mapStateToProps.js":
|
||
|
/*!***********************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/connect/mapStateToProps.js ***!
|
||
|
\***********************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
||
|
/* harmony export */ whenMapStateToPropsIsFunction: () => (/* binding */ whenMapStateToPropsIsFunction),
|
||
|
/* harmony export */ whenMapStateToPropsIsMissing: () => (/* binding */ whenMapStateToPropsIsMissing)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./wrapMapToProps */ "../../../node_modules/react-redux/es/connect/wrapMapToProps.js");
|
||
|
|
||
|
function whenMapStateToPropsIsFunction(mapStateToProps) {
|
||
|
return typeof mapStateToProps === 'function' ? (0,_wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__.wrapMapToPropsFunc)(mapStateToProps, 'mapStateToProps') : undefined;
|
||
|
}
|
||
|
function whenMapStateToPropsIsMissing(mapStateToProps) {
|
||
|
return !mapStateToProps ? (0,_wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__.wrapMapToPropsConstant)(function () {
|
||
|
return {};
|
||
|
}) : undefined;
|
||
|
}
|
||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ([whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]);
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/connect/mergeProps.js":
|
||
|
/*!******************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/connect/mergeProps.js ***!
|
||
|
\******************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
||
|
/* harmony export */ defaultMergeProps: () => (/* binding */ defaultMergeProps),
|
||
|
/* harmony export */ whenMergePropsIsFunction: () => (/* binding */ whenMergePropsIsFunction),
|
||
|
/* harmony export */ whenMergePropsIsOmitted: () => (/* binding */ whenMergePropsIsOmitted),
|
||
|
/* harmony export */ wrapMergePropsFunc: () => (/* binding */ wrapMergePropsFunc)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "../../../node_modules/@babel/runtime/helpers/esm/extends.js");
|
||
|
/* harmony import */ var _utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/verifyPlainObject */ "../../../node_modules/react-redux/es/utils/verifyPlainObject.js");
|
||
|
|
||
|
|
||
|
function defaultMergeProps(stateProps, dispatchProps, ownProps) {
|
||
|
return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, ownProps, stateProps, dispatchProps);
|
||
|
}
|
||
|
function wrapMergePropsFunc(mergeProps) {
|
||
|
return function initMergePropsProxy(dispatch, _ref) {
|
||
|
var displayName = _ref.displayName,
|
||
|
pure = _ref.pure,
|
||
|
areMergedPropsEqual = _ref.areMergedPropsEqual;
|
||
|
var hasRunOnce = false;
|
||
|
var mergedProps;
|
||
|
return function mergePropsProxy(stateProps, dispatchProps, ownProps) {
|
||
|
var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);
|
||
|
|
||
|
if (hasRunOnce) {
|
||
|
if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;
|
||
|
} else {
|
||
|
hasRunOnce = true;
|
||
|
mergedProps = nextMergedProps;
|
||
|
if (true) (0,_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_1__["default"])(mergedProps, displayName, 'mergeProps');
|
||
|
}
|
||
|
|
||
|
return mergedProps;
|
||
|
};
|
||
|
};
|
||
|
}
|
||
|
function whenMergePropsIsFunction(mergeProps) {
|
||
|
return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;
|
||
|
}
|
||
|
function whenMergePropsIsOmitted(mergeProps) {
|
||
|
return !mergeProps ? function () {
|
||
|
return defaultMergeProps;
|
||
|
} : undefined;
|
||
|
}
|
||
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ([whenMergePropsIsFunction, whenMergePropsIsOmitted]);
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/connect/selectorFactory.js":
|
||
|
/*!***********************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/connect/selectorFactory.js ***!
|
||
|
\***********************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (/* binding */ finalPropsSelectorFactory),
|
||
|
/* harmony export */ impureFinalPropsSelectorFactory: () => (/* binding */ impureFinalPropsSelectorFactory),
|
||
|
/* harmony export */ pureFinalPropsSelectorFactory: () => (/* binding */ pureFinalPropsSelectorFactory)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");
|
||
|
/* harmony import */ var _verifySubselectors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./verifySubselectors */ "../../../node_modules/react-redux/es/connect/verifySubselectors.js");
|
||
|
|
||
|
var _excluded = ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"];
|
||
|
|
||
|
function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {
|
||
|
return function impureFinalPropsSelector(state, ownProps) {
|
||
|
return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);
|
||
|
};
|
||
|
}
|
||
|
function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {
|
||
|
var areStatesEqual = _ref.areStatesEqual,
|
||
|
areOwnPropsEqual = _ref.areOwnPropsEqual,
|
||
|
areStatePropsEqual = _ref.areStatePropsEqual;
|
||
|
var hasRunAtLeastOnce = false;
|
||
|
var state;
|
||
|
var ownProps;
|
||
|
var stateProps;
|
||
|
var dispatchProps;
|
||
|
var mergedProps;
|
||
|
|
||
|
function handleFirstCall(firstState, firstOwnProps) {
|
||
|
state = firstState;
|
||
|
ownProps = firstOwnProps;
|
||
|
stateProps = mapStateToProps(state, ownProps);
|
||
|
dispatchProps = mapDispatchToProps(dispatch, ownProps);
|
||
|
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
|
||
|
hasRunAtLeastOnce = true;
|
||
|
return mergedProps;
|
||
|
}
|
||
|
|
||
|
function handleNewPropsAndNewState() {
|
||
|
stateProps = mapStateToProps(state, ownProps);
|
||
|
if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
|
||
|
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
|
||
|
return mergedProps;
|
||
|
}
|
||
|
|
||
|
function handleNewProps() {
|
||
|
if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);
|
||
|
if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
|
||
|
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
|
||
|
return mergedProps;
|
||
|
}
|
||
|
|
||
|
function handleNewState() {
|
||
|
var nextStateProps = mapStateToProps(state, ownProps);
|
||
|
var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);
|
||
|
stateProps = nextStateProps;
|
||
|
if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
|
||
|
return mergedProps;
|
||
|
}
|
||
|
|
||
|
function handleSubsequentCalls(nextState, nextOwnProps) {
|
||
|
var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);
|
||
|
var stateChanged = !areStatesEqual(nextState, state, nextOwnProps, ownProps);
|
||
|
state = nextState;
|
||
|
ownProps = nextOwnProps;
|
||
|
if (propsChanged && stateChanged) return handleNewPropsAndNewState();
|
||
|
if (propsChanged) return handleNewProps();
|
||
|
if (stateChanged) return handleNewState();
|
||
|
return mergedProps;
|
||
|
}
|
||
|
|
||
|
return function pureFinalPropsSelector(nextState, nextOwnProps) {
|
||
|
return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);
|
||
|
};
|
||
|
} // TODO: Add more comments
|
||
|
// If pure is true, the selector returned by selectorFactory will memoize its results,
|
||
|
// allowing connectAdvanced's shouldComponentUpdate to return false if final
|
||
|
// props have not changed. If false, the selector will always return a new
|
||
|
// object and shouldComponentUpdate will always return true.
|
||
|
|
||
|
function finalPropsSelectorFactory(dispatch, _ref2) {
|
||
|
var initMapStateToProps = _ref2.initMapStateToProps,
|
||
|
initMapDispatchToProps = _ref2.initMapDispatchToProps,
|
||
|
initMergeProps = _ref2.initMergeProps,
|
||
|
options = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref2, _excluded);
|
||
|
|
||
|
var mapStateToProps = initMapStateToProps(dispatch, options);
|
||
|
var mapDispatchToProps = initMapDispatchToProps(dispatch, options);
|
||
|
var mergeProps = initMergeProps(dispatch, options);
|
||
|
|
||
|
if (true) {
|
||
|
(0,_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__["default"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);
|
||
|
}
|
||
|
|
||
|
var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;
|
||
|
return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/connect/verifySubselectors.js":
|
||
|
/*!**************************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/connect/verifySubselectors.js ***!
|
||
|
\**************************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (/* binding */ verifySubselectors)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _utils_warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/warning */ "../../../node_modules/react-redux/es/utils/warning.js");
|
||
|
|
||
|
|
||
|
function verify(selector, methodName, displayName) {
|
||
|
if (!selector) {
|
||
|
throw new Error("Unexpected value for " + methodName + " in " + displayName + ".");
|
||
|
} else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') {
|
||
|
if (!Object.prototype.hasOwnProperty.call(selector, 'dependsOnOwnProps')) {
|
||
|
(0,_utils_warning__WEBPACK_IMPORTED_MODULE_0__["default"])("The selector for " + methodName + " of " + displayName + " did not specify a value for dependsOnOwnProps.");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {
|
||
|
verify(mapStateToProps, 'mapStateToProps', displayName);
|
||
|
verify(mapDispatchToProps, 'mapDispatchToProps', displayName);
|
||
|
verify(mergeProps, 'mergeProps', displayName);
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/connect/wrapMapToProps.js":
|
||
|
/*!**********************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/connect/wrapMapToProps.js ***!
|
||
|
\**********************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ getDependsOnOwnProps: () => (/* binding */ getDependsOnOwnProps),
|
||
|
/* harmony export */ wrapMapToPropsConstant: () => (/* binding */ wrapMapToPropsConstant),
|
||
|
/* harmony export */ wrapMapToPropsFunc: () => (/* binding */ wrapMapToPropsFunc)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/verifyPlainObject */ "../../../node_modules/react-redux/es/utils/verifyPlainObject.js");
|
||
|
|
||
|
function wrapMapToPropsConstant(getConstant) {
|
||
|
return function initConstantSelector(dispatch, options) {
|
||
|
var constant = getConstant(dispatch, options);
|
||
|
|
||
|
function constantSelector() {
|
||
|
return constant;
|
||
|
}
|
||
|
|
||
|
constantSelector.dependsOnOwnProps = false;
|
||
|
return constantSelector;
|
||
|
};
|
||
|
} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args
|
||
|
// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine
|
||
|
// whether mapToProps needs to be invoked when props have changed.
|
||
|
//
|
||
|
// A length of one signals that mapToProps does not depend on props from the parent component.
|
||
|
// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and
|
||
|
// therefore not reporting its length accurately..
|
||
|
|
||
|
function getDependsOnOwnProps(mapToProps) {
|
||
|
return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;
|
||
|
} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,
|
||
|
// this function wraps mapToProps in a proxy function which does several things:
|
||
|
//
|
||
|
// * Detects whether the mapToProps function being called depends on props, which
|
||
|
// is used by selectorFactory to decide if it should reinvoke on props changes.
|
||
|
//
|
||
|
// * On first call, handles mapToProps if returns another function, and treats that
|
||
|
// new function as the true mapToProps for subsequent calls.
|
||
|
//
|
||
|
// * On first call, verifies the first result is a plain object, in order to warn
|
||
|
// the developer that their mapToProps function is not returning a valid result.
|
||
|
//
|
||
|
|
||
|
function wrapMapToPropsFunc(mapToProps, methodName) {
|
||
|
return function initProxySelector(dispatch, _ref) {
|
||
|
var displayName = _ref.displayName;
|
||
|
|
||
|
var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {
|
||
|
return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);
|
||
|
}; // allow detectFactoryAndVerify to get ownProps
|
||
|
|
||
|
|
||
|
proxy.dependsOnOwnProps = true;
|
||
|
|
||
|
proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {
|
||
|
proxy.mapToProps = mapToProps;
|
||
|
proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);
|
||
|
var props = proxy(stateOrDispatch, ownProps);
|
||
|
|
||
|
if (typeof props === 'function') {
|
||
|
proxy.mapToProps = props;
|
||
|
proxy.dependsOnOwnProps = getDependsOnOwnProps(props);
|
||
|
props = proxy(stateOrDispatch, ownProps);
|
||
|
}
|
||
|
|
||
|
if (true) (0,_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__["default"])(props, displayName, methodName);
|
||
|
return props;
|
||
|
};
|
||
|
|
||
|
return proxy;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/exports.js":
|
||
|
/*!*******************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/exports.js ***!
|
||
|
\*******************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ Provider: () => (/* reexport safe */ _components_Provider__WEBPACK_IMPORTED_MODULE_0__["default"]),
|
||
|
/* harmony export */ ReactReduxContext: () => (/* reexport safe */ _components_Context__WEBPACK_IMPORTED_MODULE_2__.ReactReduxContext),
|
||
|
/* harmony export */ connect: () => (/* reexport safe */ _connect_connect__WEBPACK_IMPORTED_MODULE_3__["default"]),
|
||
|
/* harmony export */ connectAdvanced: () => (/* reexport safe */ _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_1__["default"]),
|
||
|
/* harmony export */ createDispatchHook: () => (/* reexport safe */ _hooks_useDispatch__WEBPACK_IMPORTED_MODULE_4__.createDispatchHook),
|
||
|
/* harmony export */ createSelectorHook: () => (/* reexport safe */ _hooks_useSelector__WEBPACK_IMPORTED_MODULE_5__.createSelectorHook),
|
||
|
/* harmony export */ createStoreHook: () => (/* reexport safe */ _hooks_useStore__WEBPACK_IMPORTED_MODULE_6__.createStoreHook),
|
||
|
/* harmony export */ shallowEqual: () => (/* reexport safe */ _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_7__["default"]),
|
||
|
/* harmony export */ useDispatch: () => (/* reexport safe */ _hooks_useDispatch__WEBPACK_IMPORTED_MODULE_4__.useDispatch),
|
||
|
/* harmony export */ useSelector: () => (/* reexport safe */ _hooks_useSelector__WEBPACK_IMPORTED_MODULE_5__.useSelector),
|
||
|
/* harmony export */ useStore: () => (/* reexport safe */ _hooks_useStore__WEBPACK_IMPORTED_MODULE_6__.useStore)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _components_Provider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/Provider */ "../../../node_modules/react-redux/es/components/Provider.js");
|
||
|
/* harmony import */ var _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/connectAdvanced */ "../../../node_modules/react-redux/es/components/connectAdvanced.js");
|
||
|
/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/Context */ "../../../node_modules/react-redux/es/components/Context.js");
|
||
|
/* harmony import */ var _connect_connect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./connect/connect */ "../../../node_modules/react-redux/es/connect/connect.js");
|
||
|
/* harmony import */ var _hooks_useDispatch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useDispatch */ "../../../node_modules/react-redux/es/hooks/useDispatch.js");
|
||
|
/* harmony import */ var _hooks_useSelector__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useSelector */ "../../../node_modules/react-redux/es/hooks/useSelector.js");
|
||
|
/* harmony import */ var _hooks_useStore__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hooks/useStore */ "../../../node_modules/react-redux/es/hooks/useStore.js");
|
||
|
/* harmony import */ var _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/shallowEqual */ "../../../node_modules/react-redux/es/utils/shallowEqual.js");
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/hooks/useDispatch.js":
|
||
|
/*!*****************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/hooks/useDispatch.js ***!
|
||
|
\*****************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ createDispatchHook: () => (/* binding */ createDispatchHook),
|
||
|
/* harmony export */ useDispatch: () => (/* binding */ useDispatch)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/Context */ "../../../node_modules/react-redux/es/components/Context.js");
|
||
|
/* harmony import */ var _useStore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useStore */ "../../../node_modules/react-redux/es/hooks/useStore.js");
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Hook factory, which creates a `useDispatch` hook bound to a given context.
|
||
|
*
|
||
|
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
|
||
|
* @returns {Function} A `useDispatch` hook bound to the specified context.
|
||
|
*/
|
||
|
|
||
|
function createDispatchHook(context) {
|
||
|
if (context === void 0) {
|
||
|
context = _components_Context__WEBPACK_IMPORTED_MODULE_0__.ReactReduxContext;
|
||
|
}
|
||
|
|
||
|
var useStore = context === _components_Context__WEBPACK_IMPORTED_MODULE_0__.ReactReduxContext ? _useStore__WEBPACK_IMPORTED_MODULE_1__.useStore : (0,_useStore__WEBPACK_IMPORTED_MODULE_1__.createStoreHook)(context);
|
||
|
return function useDispatch() {
|
||
|
var store = useStore();
|
||
|
return store.dispatch;
|
||
|
};
|
||
|
}
|
||
|
/**
|
||
|
* A hook to access the redux `dispatch` function.
|
||
|
*
|
||
|
* @returns {any|function} redux store's `dispatch` function
|
||
|
*
|
||
|
* @example
|
||
|
*
|
||
|
* import React, { useCallback } from 'react'
|
||
|
* import { useDispatch } from 'react-redux'
|
||
|
*
|
||
|
* export const CounterComponent = ({ value }) => {
|
||
|
* const dispatch = useDispatch()
|
||
|
* const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), [])
|
||
|
* return (
|
||
|
* <div>
|
||
|
* <span>{value}</span>
|
||
|
* <button onClick={increaseCounter}>Increase counter</button>
|
||
|
* </div>
|
||
|
* )
|
||
|
* }
|
||
|
*/
|
||
|
|
||
|
var useDispatch = /*#__PURE__*/createDispatchHook();
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/hooks/useReduxContext.js":
|
||
|
/*!*********************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/hooks/useReduxContext.js ***!
|
||
|
\*********************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ useReduxContext: () => (/* binding */ useReduxContext)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||
|
/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/Context */ "../../../node_modules/react-redux/es/components/Context.js");
|
||
|
|
||
|
|
||
|
/**
|
||
|
* A hook to access the value of the `ReactReduxContext`. This is a low-level
|
||
|
* hook that you should usually not need to call directly.
|
||
|
*
|
||
|
* @returns {any} the value of the `ReactReduxContext`
|
||
|
*
|
||
|
* @example
|
||
|
*
|
||
|
* import React from 'react'
|
||
|
* import { useReduxContext } from 'react-redux'
|
||
|
*
|
||
|
* export const CounterComponent = ({ value }) => {
|
||
|
* const { store } = useReduxContext()
|
||
|
* return <div>{store.getState()}</div>
|
||
|
* }
|
||
|
*/
|
||
|
|
||
|
function useReduxContext() {
|
||
|
var contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_components_Context__WEBPACK_IMPORTED_MODULE_1__.ReactReduxContext);
|
||
|
|
||
|
if ( true && !contextValue) {
|
||
|
throw new Error('could not find react-redux context value; please ensure the component is wrapped in a <Provider>');
|
||
|
}
|
||
|
|
||
|
return contextValue;
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/hooks/useSelector.js":
|
||
|
/*!*****************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/hooks/useSelector.js ***!
|
||
|
\*****************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ createSelectorHook: () => (/* binding */ createSelectorHook),
|
||
|
/* harmony export */ useSelector: () => (/* binding */ useSelector)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||
|
/* harmony import */ var _useReduxContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useReduxContext */ "../../../node_modules/react-redux/es/hooks/useReduxContext.js");
|
||
|
/* harmony import */ var _utils_Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Subscription */ "../../../node_modules/react-redux/es/utils/Subscription.js");
|
||
|
/* harmony import */ var _utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/useIsomorphicLayoutEffect */ "../../../node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js");
|
||
|
/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../components/Context */ "../../../node_modules/react-redux/es/components/Context.js");
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
var refEquality = function refEquality(a, b) {
|
||
|
return a === b;
|
||
|
};
|
||
|
|
||
|
function useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub) {
|
||
|
var _useReducer = (0,react__WEBPACK_IMPORTED_MODULE_0__.useReducer)(function (s) {
|
||
|
return s + 1;
|
||
|
}, 0),
|
||
|
forceRender = _useReducer[1];
|
||
|
|
||
|
var subscription = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
||
|
return (0,_utils_Subscription__WEBPACK_IMPORTED_MODULE_2__.createSubscription)(store, contextSub);
|
||
|
}, [store, contextSub]);
|
||
|
var latestSubscriptionCallbackError = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
||
|
var latestSelector = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
||
|
var latestStoreState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
||
|
var latestSelectedState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
||
|
var storeState = store.getState();
|
||
|
var selectedState;
|
||
|
|
||
|
try {
|
||
|
if (selector !== latestSelector.current || storeState !== latestStoreState.current || latestSubscriptionCallbackError.current) {
|
||
|
var newSelectedState = selector(storeState); // ensure latest selected state is reused so that a custom equality function can result in identical references
|
||
|
|
||
|
if (latestSelectedState.current === undefined || !equalityFn(newSelectedState, latestSelectedState.current)) {
|
||
|
selectedState = newSelectedState;
|
||
|
} else {
|
||
|
selectedState = latestSelectedState.current;
|
||
|
}
|
||
|
} else {
|
||
|
selectedState = latestSelectedState.current;
|
||
|
}
|
||
|
} catch (err) {
|
||
|
if (latestSubscriptionCallbackError.current) {
|
||
|
err.message += "\nThe error may be correlated with this previous error:\n" + latestSubscriptionCallbackError.current.stack + "\n\n";
|
||
|
}
|
||
|
|
||
|
throw err;
|
||
|
}
|
||
|
|
||
|
(0,_utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_3__.useIsomorphicLayoutEffect)(function () {
|
||
|
latestSelector.current = selector;
|
||
|
latestStoreState.current = storeState;
|
||
|
latestSelectedState.current = selectedState;
|
||
|
latestSubscriptionCallbackError.current = undefined;
|
||
|
});
|
||
|
(0,_utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_3__.useIsomorphicLayoutEffect)(function () {
|
||
|
function checkForUpdates() {
|
||
|
try {
|
||
|
var newStoreState = store.getState(); // Avoid calling selector multiple times if the store's state has not changed
|
||
|
|
||
|
if (newStoreState === latestStoreState.current) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
var _newSelectedState = latestSelector.current(newStoreState);
|
||
|
|
||
|
if (equalityFn(_newSelectedState, latestSelectedState.current)) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
latestSelectedState.current = _newSelectedState;
|
||
|
latestStoreState.current = newStoreState;
|
||
|
} catch (err) {
|
||
|
// we ignore all errors here, since when the component
|
||
|
// is re-rendered, the selectors are called again, and
|
||
|
// will throw again, if neither props nor store state
|
||
|
// changed
|
||
|
latestSubscriptionCallbackError.current = err;
|
||
|
}
|
||
|
|
||
|
forceRender();
|
||
|
}
|
||
|
|
||
|
subscription.onStateChange = checkForUpdates;
|
||
|
subscription.trySubscribe();
|
||
|
checkForUpdates();
|
||
|
return function () {
|
||
|
return subscription.tryUnsubscribe();
|
||
|
};
|
||
|
}, [store, subscription]);
|
||
|
return selectedState;
|
||
|
}
|
||
|
/**
|
||
|
* Hook factory, which creates a `useSelector` hook bound to a given context.
|
||
|
*
|
||
|
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
|
||
|
* @returns {Function} A `useSelector` hook bound to the specified context.
|
||
|
*/
|
||
|
|
||
|
|
||
|
function createSelectorHook(context) {
|
||
|
if (context === void 0) {
|
||
|
context = _components_Context__WEBPACK_IMPORTED_MODULE_4__.ReactReduxContext;
|
||
|
}
|
||
|
|
||
|
var useReduxContext = context === _components_Context__WEBPACK_IMPORTED_MODULE_4__.ReactReduxContext ? _useReduxContext__WEBPACK_IMPORTED_MODULE_1__.useReduxContext : function () {
|
||
|
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(context);
|
||
|
};
|
||
|
return function useSelector(selector, equalityFn) {
|
||
|
if (equalityFn === void 0) {
|
||
|
equalityFn = refEquality;
|
||
|
}
|
||
|
|
||
|
if (true) {
|
||
|
if (!selector) {
|
||
|
throw new Error("You must pass a selector to useSelector");
|
||
|
}
|
||
|
|
||
|
if (typeof selector !== 'function') {
|
||
|
throw new Error("You must pass a function as a selector to useSelector");
|
||
|
}
|
||
|
|
||
|
if (typeof equalityFn !== 'function') {
|
||
|
throw new Error("You must pass a function as an equality function to useSelector");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var _useReduxContext = useReduxContext(),
|
||
|
store = _useReduxContext.store,
|
||
|
contextSub = _useReduxContext.subscription;
|
||
|
|
||
|
var selectedState = useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub);
|
||
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useDebugValue)(selectedState);
|
||
|
return selectedState;
|
||
|
};
|
||
|
}
|
||
|
/**
|
||
|
* A hook to access the redux store's state. This hook takes a selector function
|
||
|
* as an argument. The selector is called with the store state.
|
||
|
*
|
||
|
* This hook takes an optional equality comparison function as the second parameter
|
||
|
* that allows you to customize the way the selected state is compared to determine
|
||
|
* whether the component needs to be re-rendered.
|
||
|
*
|
||
|
* @param {Function} selector the selector function
|
||
|
* @param {Function=} equalityFn the function that will be used to determine equality
|
||
|
*
|
||
|
* @returns {any} the selected state
|
||
|
*
|
||
|
* @example
|
||
|
*
|
||
|
* import React from 'react'
|
||
|
* import { useSelector } from 'react-redux'
|
||
|
*
|
||
|
* export const CounterComponent = () => {
|
||
|
* const counter = useSelector(state => state.counter)
|
||
|
* return <div>{counter}</div>
|
||
|
* }
|
||
|
*/
|
||
|
|
||
|
var useSelector = /*#__PURE__*/createSelectorHook();
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/hooks/useStore.js":
|
||
|
/*!**************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/hooks/useStore.js ***!
|
||
|
\**************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ createStoreHook: () => (/* binding */ createStoreHook),
|
||
|
/* harmony export */ useStore: () => (/* binding */ useStore)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||
|
/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/Context */ "../../../node_modules/react-redux/es/components/Context.js");
|
||
|
/* harmony import */ var _useReduxContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./useReduxContext */ "../../../node_modules/react-redux/es/hooks/useReduxContext.js");
|
||
|
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Hook factory, which creates a `useStore` hook bound to a given context.
|
||
|
*
|
||
|
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
|
||
|
* @returns {Function} A `useStore` hook bound to the specified context.
|
||
|
*/
|
||
|
|
||
|
function createStoreHook(context) {
|
||
|
if (context === void 0) {
|
||
|
context = _components_Context__WEBPACK_IMPORTED_MODULE_1__.ReactReduxContext;
|
||
|
}
|
||
|
|
||
|
var useReduxContext = context === _components_Context__WEBPACK_IMPORTED_MODULE_1__.ReactReduxContext ? _useReduxContext__WEBPACK_IMPORTED_MODULE_2__.useReduxContext : function () {
|
||
|
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(context);
|
||
|
};
|
||
|
return function useStore() {
|
||
|
var _useReduxContext = useReduxContext(),
|
||
|
store = _useReduxContext.store;
|
||
|
|
||
|
return store;
|
||
|
};
|
||
|
}
|
||
|
/**
|
||
|
* A hook to access the redux store.
|
||
|
*
|
||
|
* @returns {any} the redux store
|
||
|
*
|
||
|
* @example
|
||
|
*
|
||
|
* import React from 'react'
|
||
|
* import { useStore } from 'react-redux'
|
||
|
*
|
||
|
* export const ExampleComponent = () => {
|
||
|
* const store = useStore()
|
||
|
* return <div>{store.getState()}</div>
|
||
|
* }
|
||
|
*/
|
||
|
|
||
|
var useStore = /*#__PURE__*/createStoreHook();
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/index.js":
|
||
|
/*!*****************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/index.js ***!
|
||
|
\*****************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ Provider: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_0__.Provider),
|
||
|
/* harmony export */ ReactReduxContext: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_0__.ReactReduxContext),
|
||
|
/* harmony export */ batch: () => (/* reexport safe */ _utils_reactBatchedUpdates__WEBPACK_IMPORTED_MODULE_1__.unstable_batchedUpdates),
|
||
|
/* harmony export */ connect: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_0__.connect),
|
||
|
/* harmony export */ connectAdvanced: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_0__.connectAdvanced),
|
||
|
/* harmony export */ createDispatchHook: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_0__.createDispatchHook),
|
||
|
/* harmony export */ createSelectorHook: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_0__.createSelectorHook),
|
||
|
/* harmony export */ createStoreHook: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_0__.createStoreHook),
|
||
|
/* harmony export */ shallowEqual: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_0__.shallowEqual),
|
||
|
/* harmony export */ useDispatch: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_0__.useDispatch),
|
||
|
/* harmony export */ useSelector: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_0__.useSelector),
|
||
|
/* harmony export */ useStore: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_0__.useStore)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _exports__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exports */ "../../../node_modules/react-redux/es/exports.js");
|
||
|
/* harmony import */ var _utils_reactBatchedUpdates__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/reactBatchedUpdates */ "../../../node_modules/react-redux/es/utils/reactBatchedUpdates.js");
|
||
|
/* harmony import */ var _utils_batch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/batch */ "../../../node_modules/react-redux/es/utils/batch.js");
|
||
|
|
||
|
|
||
|
// Enable batched updates in our subscriptions for use
|
||
|
// with standard React renderers (ReactDOM, React Native)
|
||
|
|
||
|
(0,_utils_batch__WEBPACK_IMPORTED_MODULE_2__.setBatch)(_utils_reactBatchedUpdates__WEBPACK_IMPORTED_MODULE_1__.unstable_batchedUpdates);
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/utils/Subscription.js":
|
||
|
/*!******************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/utils/Subscription.js ***!
|
||
|
\******************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ createSubscription: () => (/* binding */ createSubscription)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _batch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./batch */ "../../../node_modules/react-redux/es/utils/batch.js");
|
||
|
// encapsulates the subscription logic for connecting a component to the redux store, as
|
||
|
// well as nesting subscriptions of descendant components, so that we can ensure the
|
||
|
// ancestor components re-render before descendants
|
||
|
|
||
|
function createListenerCollection() {
|
||
|
var batch = (0,_batch__WEBPACK_IMPORTED_MODULE_0__.getBatch)();
|
||
|
var first = null;
|
||
|
var last = null;
|
||
|
return {
|
||
|
clear: function clear() {
|
||
|
first = null;
|
||
|
last = null;
|
||
|
},
|
||
|
notify: function notify() {
|
||
|
batch(function () {
|
||
|
var listener = first;
|
||
|
|
||
|
while (listener) {
|
||
|
listener.callback();
|
||
|
listener = listener.next;
|
||
|
}
|
||
|
});
|
||
|
},
|
||
|
get: function get() {
|
||
|
var listeners = [];
|
||
|
var listener = first;
|
||
|
|
||
|
while (listener) {
|
||
|
listeners.push(listener);
|
||
|
listener = listener.next;
|
||
|
}
|
||
|
|
||
|
return listeners;
|
||
|
},
|
||
|
subscribe: function subscribe(callback) {
|
||
|
var isSubscribed = true;
|
||
|
var listener = last = {
|
||
|
callback: callback,
|
||
|
next: null,
|
||
|
prev: last
|
||
|
};
|
||
|
|
||
|
if (listener.prev) {
|
||
|
listener.prev.next = listener;
|
||
|
} else {
|
||
|
first = listener;
|
||
|
}
|
||
|
|
||
|
return function unsubscribe() {
|
||
|
if (!isSubscribed || first === null) return;
|
||
|
isSubscribed = false;
|
||
|
|
||
|
if (listener.next) {
|
||
|
listener.next.prev = listener.prev;
|
||
|
} else {
|
||
|
last = listener.prev;
|
||
|
}
|
||
|
|
||
|
if (listener.prev) {
|
||
|
listener.prev.next = listener.next;
|
||
|
} else {
|
||
|
first = listener.next;
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
var nullListeners = {
|
||
|
notify: function notify() {},
|
||
|
get: function get() {
|
||
|
return [];
|
||
|
}
|
||
|
};
|
||
|
function createSubscription(store, parentSub) {
|
||
|
var unsubscribe;
|
||
|
var listeners = nullListeners;
|
||
|
|
||
|
function addNestedSub(listener) {
|
||
|
trySubscribe();
|
||
|
return listeners.subscribe(listener);
|
||
|
}
|
||
|
|
||
|
function notifyNestedSubs() {
|
||
|
listeners.notify();
|
||
|
}
|
||
|
|
||
|
function handleChangeWrapper() {
|
||
|
if (subscription.onStateChange) {
|
||
|
subscription.onStateChange();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function isSubscribed() {
|
||
|
return Boolean(unsubscribe);
|
||
|
}
|
||
|
|
||
|
function trySubscribe() {
|
||
|
if (!unsubscribe) {
|
||
|
unsubscribe = parentSub ? parentSub.addNestedSub(handleChangeWrapper) : store.subscribe(handleChangeWrapper);
|
||
|
listeners = createListenerCollection();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function tryUnsubscribe() {
|
||
|
if (unsubscribe) {
|
||
|
unsubscribe();
|
||
|
unsubscribe = undefined;
|
||
|
listeners.clear();
|
||
|
listeners = nullListeners;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var subscription = {
|
||
|
addNestedSub: addNestedSub,
|
||
|
notifyNestedSubs: notifyNestedSubs,
|
||
|
handleChangeWrapper: handleChangeWrapper,
|
||
|
isSubscribed: isSubscribed,
|
||
|
trySubscribe: trySubscribe,
|
||
|
tryUnsubscribe: tryUnsubscribe,
|
||
|
getListeners: function getListeners() {
|
||
|
return listeners;
|
||
|
}
|
||
|
};
|
||
|
return subscription;
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/utils/batch.js":
|
||
|
/*!***********************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/utils/batch.js ***!
|
||
|
\***********************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ getBatch: () => (/* binding */ getBatch),
|
||
|
/* harmony export */ setBatch: () => (/* binding */ setBatch)
|
||
|
/* harmony export */ });
|
||
|
// Default to a dummy "batch" implementation that just runs the callback
|
||
|
function defaultNoopBatch(callback) {
|
||
|
callback();
|
||
|
}
|
||
|
|
||
|
var batch = defaultNoopBatch; // Allow injecting another batching function later
|
||
|
|
||
|
var setBatch = function setBatch(newBatch) {
|
||
|
return batch = newBatch;
|
||
|
}; // Supply a getter just to skip dealing with ESM bindings
|
||
|
|
||
|
var getBatch = function getBatch() {
|
||
|
return batch;
|
||
|
};
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/utils/bindActionCreators.js":
|
||
|
/*!************************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/utils/bindActionCreators.js ***!
|
||
|
\************************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (/* binding */ bindActionCreators)
|
||
|
/* harmony export */ });
|
||
|
function bindActionCreators(actionCreators, dispatch) {
|
||
|
var boundActionCreators = {};
|
||
|
|
||
|
var _loop = function _loop(key) {
|
||
|
var actionCreator = actionCreators[key];
|
||
|
|
||
|
if (typeof actionCreator === 'function') {
|
||
|
boundActionCreators[key] = function () {
|
||
|
return dispatch(actionCreator.apply(void 0, arguments));
|
||
|
};
|
||
|
}
|
||
|
};
|
||
|
|
||
|
for (var key in actionCreators) {
|
||
|
_loop(key);
|
||
|
}
|
||
|
|
||
|
return boundActionCreators;
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/utils/isPlainObject.js":
|
||
|
/*!*******************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/utils/isPlainObject.js ***!
|
||
|
\*******************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (/* binding */ isPlainObject)
|
||
|
/* harmony export */ });
|
||
|
/**
|
||
|
* @param {any} obj The object to inspect.
|
||
|
* @returns {boolean} True if the argument appears to be a plain object.
|
||
|
*/
|
||
|
function isPlainObject(obj) {
|
||
|
if (typeof obj !== 'object' || obj === null) return false;
|
||
|
var proto = Object.getPrototypeOf(obj);
|
||
|
if (proto === null) return true;
|
||
|
var baseProto = proto;
|
||
|
|
||
|
while (Object.getPrototypeOf(baseProto) !== null) {
|
||
|
baseProto = Object.getPrototypeOf(baseProto);
|
||
|
}
|
||
|
|
||
|
return proto === baseProto;
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/utils/reactBatchedUpdates.js":
|
||
|
/*!*************************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/utils/reactBatchedUpdates.js ***!
|
||
|
\*************************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ unstable_batchedUpdates: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.unstable_batchedUpdates)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom */ "react-dom");
|
||
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_0__);
|
||
|
/* eslint-disable import/no-unresolved */
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/utils/shallowEqual.js":
|
||
|
/*!******************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/utils/shallowEqual.js ***!
|
||
|
\******************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (/* binding */ shallowEqual)
|
||
|
/* harmony export */ });
|
||
|
function is(x, y) {
|
||
|
if (x === y) {
|
||
|
return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
||
|
} else {
|
||
|
return x !== x && y !== y;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function shallowEqual(objA, objB) {
|
||
|
if (is(objA, objB)) return true;
|
||
|
|
||
|
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
var keysA = Object.keys(objA);
|
||
|
var keysB = Object.keys(objB);
|
||
|
if (keysA.length !== keysB.length) return false;
|
||
|
|
||
|
for (var i = 0; i < keysA.length; i++) {
|
||
|
if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js":
|
||
|
/*!*******************************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js ***!
|
||
|
\*******************************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ useIsomorphicLayoutEffect: () => (/* binding */ useIsomorphicLayoutEffect)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||
|
// React currently throws a warning when using useLayoutEffect on the server.
|
||
|
// To get around it, we can conditionally useEffect on the server (no-op) and
|
||
|
// useLayoutEffect in the browser. We need useLayoutEffect to ensure the store
|
||
|
// subscription callback always has the selector from the latest render commit
|
||
|
// available, otherwise a store update may happen between render and the effect,
|
||
|
// which may cause missed updates; we also must ensure the store subscription
|
||
|
// is created synchronously, otherwise a store update may occur before the
|
||
|
// subscription is created and an inconsistent state may be observed
|
||
|
|
||
|
var useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect;
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/utils/verifyPlainObject.js":
|
||
|
/*!***********************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/utils/verifyPlainObject.js ***!
|
||
|
\***********************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (/* binding */ verifyPlainObject)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isPlainObject */ "../../../node_modules/react-redux/es/utils/isPlainObject.js");
|
||
|
/* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./warning */ "../../../node_modules/react-redux/es/utils/warning.js");
|
||
|
|
||
|
|
||
|
function verifyPlainObject(value, displayName, methodName) {
|
||
|
if (!(0,_isPlainObject__WEBPACK_IMPORTED_MODULE_0__["default"])(value)) {
|
||
|
(0,_warning__WEBPACK_IMPORTED_MODULE_1__["default"])(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + ".");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/es/utils/warning.js":
|
||
|
/*!*************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/es/utils/warning.js ***!
|
||
|
\*************************************************************/
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (/* binding */ warning)
|
||
|
/* harmony export */ });
|
||
|
/**
|
||
|
* Prints a warning in the console if it exists.
|
||
|
*
|
||
|
* @param {String} message The warning message.
|
||
|
* @returns {void}
|
||
|
*/
|
||
|
function warning(message) {
|
||
|
/* eslint-disable no-console */
|
||
|
if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
||
|
console.error(message);
|
||
|
}
|
||
|
/* eslint-enable no-console */
|
||
|
|
||
|
|
||
|
try {
|
||
|
// This error was thrown as a convenience so that if you enable
|
||
|
// "break on all exceptions" in your console,
|
||
|
// it would pause the execution at this line.
|
||
|
throw new Error(message);
|
||
|
/* eslint-disable no-empty */
|
||
|
} catch (e) {}
|
||
|
/* eslint-enable no-empty */
|
||
|
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/node_modules/react-is/cjs/react-is.development.js":
|
||
|
/*!*******************************************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/node_modules/react-is/cjs/react-is.development.js ***!
|
||
|
\*******************************************************************************************/
|
||
|
/***/ ((__unused_webpack_module, exports) => {
|
||
|
|
||
|
"use strict";
|
||
|
/** @license React v17.0.2
|
||
|
* react-is.development.js
|
||
|
*
|
||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/
|
||
|
|
||
|
|
||
|
|
||
|
if (true) {
|
||
|
(function() {
|
||
|
'use strict';
|
||
|
|
||
|
// ATTENTION
|
||
|
// When adding new symbols to this file,
|
||
|
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
||
|
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
||
|
// nor polyfill, then a plain number is used for performance.
|
||
|
var REACT_ELEMENT_TYPE = 0xeac7;
|
||
|
var REACT_PORTAL_TYPE = 0xeaca;
|
||
|
var REACT_FRAGMENT_TYPE = 0xeacb;
|
||
|
var REACT_STRICT_MODE_TYPE = 0xeacc;
|
||
|
var REACT_PROFILER_TYPE = 0xead2;
|
||
|
var REACT_PROVIDER_TYPE = 0xeacd;
|
||
|
var REACT_CONTEXT_TYPE = 0xeace;
|
||
|
var REACT_FORWARD_REF_TYPE = 0xead0;
|
||
|
var REACT_SUSPENSE_TYPE = 0xead1;
|
||
|
var REACT_SUSPENSE_LIST_TYPE = 0xead8;
|
||
|
var REACT_MEMO_TYPE = 0xead3;
|
||
|
var REACT_LAZY_TYPE = 0xead4;
|
||
|
var REACT_BLOCK_TYPE = 0xead9;
|
||
|
var REACT_SERVER_BLOCK_TYPE = 0xeada;
|
||
|
var REACT_FUNDAMENTAL_TYPE = 0xead5;
|
||
|
var REACT_SCOPE_TYPE = 0xead7;
|
||
|
var REACT_OPAQUE_ID_TYPE = 0xeae0;
|
||
|
var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
|
||
|
var REACT_OFFSCREEN_TYPE = 0xeae2;
|
||
|
var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
|
||
|
|
||
|
if (typeof Symbol === 'function' && Symbol.for) {
|
||
|
var symbolFor = Symbol.for;
|
||
|
REACT_ELEMENT_TYPE = symbolFor('react.element');
|
||
|
REACT_PORTAL_TYPE = symbolFor('react.portal');
|
||
|
REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
|
||
|
REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
|
||
|
REACT_PROFILER_TYPE = symbolFor('react.profiler');
|
||
|
REACT_PROVIDER_TYPE = symbolFor('react.provider');
|
||
|
REACT_CONTEXT_TYPE = symbolFor('react.context');
|
||
|
REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
|
||
|
REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
|
||
|
REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
|
||
|
REACT_MEMO_TYPE = symbolFor('react.memo');
|
||
|
REACT_LAZY_TYPE = symbolFor('react.lazy');
|
||
|
REACT_BLOCK_TYPE = symbolFor('react.block');
|
||
|
REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
|
||
|
REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
|
||
|
REACT_SCOPE_TYPE = symbolFor('react.scope');
|
||
|
REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
|
||
|
REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
|
||
|
REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
|
||
|
REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
|
||
|
}
|
||
|
|
||
|
// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
|
||
|
|
||
|
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
||
|
|
||
|
function isValidElementType(type) {
|
||
|
if (typeof type === 'string' || typeof type === 'function') {
|
||
|
return true;
|
||
|
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
||
|
|
||
|
|
||
|
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
if (typeof type === 'object' && type !== null) {
|
||
|
if (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_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
function typeOf(object) {
|
||
|
if (typeof object === 'object' && object !== null) {
|
||
|
var $$typeof = object.$$typeof;
|
||
|
|
||
|
switch ($$typeof) {
|
||
|
case REACT_ELEMENT_TYPE:
|
||
|
var type = object.type;
|
||
|
|
||
|
switch (type) {
|
||
|
case REACT_FRAGMENT_TYPE:
|
||
|
case REACT_PROFILER_TYPE:
|
||
|
case REACT_STRICT_MODE_TYPE:
|
||
|
case REACT_SUSPENSE_TYPE:
|
||
|
case REACT_SUSPENSE_LIST_TYPE:
|
||
|
return type;
|
||
|
|
||
|
default:
|
||
|
var $$typeofType = type && type.$$typeof;
|
||
|
|
||
|
switch ($$typeofType) {
|
||
|
case REACT_CONTEXT_TYPE:
|
||
|
case REACT_FORWARD_REF_TYPE:
|
||
|
case REACT_LAZY_TYPE:
|
||
|
case REACT_MEMO_TYPE:
|
||
|
case REACT_PROVIDER_TYPE:
|
||
|
return $$typeofType;
|
||
|
|
||
|
default:
|
||
|
return $$typeof;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
case REACT_PORTAL_TYPE:
|
||
|
return $$typeof;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return undefined;
|
||
|
}
|
||
|
var ContextConsumer = REACT_CONTEXT_TYPE;
|
||
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
||
|
var Element = REACT_ELEMENT_TYPE;
|
||
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
||
|
var Fragment = REACT_FRAGMENT_TYPE;
|
||
|
var Lazy = REACT_LAZY_TYPE;
|
||
|
var Memo = REACT_MEMO_TYPE;
|
||
|
var Portal = REACT_PORTAL_TYPE;
|
||
|
var Profiler = REACT_PROFILER_TYPE;
|
||
|
var StrictMode = REACT_STRICT_MODE_TYPE;
|
||
|
var Suspense = REACT_SUSPENSE_TYPE;
|
||
|
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
||
|
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
|
||
|
|
||
|
function isAsyncMode(object) {
|
||
|
{
|
||
|
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
||
|
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
||
|
|
||
|
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return false;
|
||
|
}
|
||
|
function isConcurrentMode(object) {
|
||
|
{
|
||
|
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
|
||
|
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
|
||
|
|
||
|
console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return false;
|
||
|
}
|
||
|
function isContextConsumer(object) {
|
||
|
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||
|
}
|
||
|
function isContextProvider(object) {
|
||
|
return typeOf(object) === REACT_PROVIDER_TYPE;
|
||
|
}
|
||
|
function isElement(object) {
|
||
|
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
||
|
}
|
||
|
function isForwardRef(object) {
|
||
|
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
||
|
}
|
||
|
function isFragment(object) {
|
||
|
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
||
|
}
|
||
|
function isLazy(object) {
|
||
|
return typeOf(object) === REACT_LAZY_TYPE;
|
||
|
}
|
||
|
function isMemo(object) {
|
||
|
return typeOf(object) === REACT_MEMO_TYPE;
|
||
|
}
|
||
|
function isPortal(object) {
|
||
|
return typeOf(object) === REACT_PORTAL_TYPE;
|
||
|
}
|
||
|
function isProfiler(object) {
|
||
|
return typeOf(object) === REACT_PROFILER_TYPE;
|
||
|
}
|
||
|
function isStrictMode(object) {
|
||
|
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
||
|
}
|
||
|
function isSuspense(object) {
|
||
|
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
||
|
}
|
||
|
|
||
|
exports.ContextConsumer = ContextConsumer;
|
||
|
exports.ContextProvider = ContextProvider;
|
||
|
exports.Element = Element;
|
||
|
exports.ForwardRef = ForwardRef;
|
||
|
exports.Fragment = Fragment;
|
||
|
exports.Lazy = Lazy;
|
||
|
exports.Memo = Memo;
|
||
|
exports.Portal = Portal;
|
||
|
exports.Profiler = Profiler;
|
||
|
exports.StrictMode = StrictMode;
|
||
|
exports.Suspense = Suspense;
|
||
|
exports.isAsyncMode = isAsyncMode;
|
||
|
exports.isConcurrentMode = isConcurrentMode;
|
||
|
exports.isContextConsumer = isContextConsumer;
|
||
|
exports.isContextProvider = isContextProvider;
|
||
|
exports.isElement = isElement;
|
||
|
exports.isForwardRef = isForwardRef;
|
||
|
exports.isFragment = isFragment;
|
||
|
exports.isLazy = isLazy;
|
||
|
exports.isMemo = isMemo;
|
||
|
exports.isPortal = isPortal;
|
||
|
exports.isProfiler = isProfiler;
|
||
|
exports.isStrictMode = isStrictMode;
|
||
|
exports.isSuspense = isSuspense;
|
||
|
exports.isValidElementType = isValidElementType;
|
||
|
exports.typeOf = typeOf;
|
||
|
})();
|
||
|
}
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/react-redux/node_modules/react-is/index.js":
|
||
|
/*!************************************************************************!*\
|
||
|
!*** ../../../node_modules/react-redux/node_modules/react-is/index.js ***!
|
||
|
\************************************************************************/
|
||
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
|
||
|
|
||
|
if (false) {} else {
|
||
|
module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../../../node_modules/react-redux/node_modules/react-is/cjs/react-is.development.js");
|
||
|
}
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "react":
|
||
|
/*!************************!*\
|
||
|
!*** external "React" ***!
|
||
|
\************************/
|
||
|
/***/ ((module) => {
|
||
|
|
||
|
"use strict";
|
||
|
module.exports = React;
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "react-dom":
|
||
|
/*!***************************!*\
|
||
|
!*** external "ReactDOM" ***!
|
||
|
\***************************/
|
||
|
/***/ ((module) => {
|
||
|
|
||
|
"use strict";
|
||
|
module.exports = ReactDOM;
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "@wordpress/i18n":
|
||
|
/*!**************************!*\
|
||
|
!*** external "wp.i18n" ***!
|
||
|
\**************************/
|
||
|
/***/ ((module) => {
|
||
|
|
||
|
"use strict";
|
||
|
module.exports = wp.i18n;
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/@babel/runtime/helpers/esm/extends.js":
|
||
|
/*!*******************************************************************!*\
|
||
|
!*** ../../../node_modules/@babel/runtime/helpers/esm/extends.js ***!
|
||
|
\*******************************************************************/
|
||
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (/* binding */ _extends)
|
||
|
/* harmony export */ });
|
||
|
function _extends() {
|
||
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
||
|
for (var i = 1; i < arguments.length; i++) {
|
||
|
var source = arguments[i];
|
||
|
for (var key in source) {
|
||
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||
|
target[key] = source[key];
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return target;
|
||
|
};
|
||
|
return _extends.apply(this, arguments);
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js":
|
||
|
/*!****************************************************************************************!*\
|
||
|
!*** ../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js ***!
|
||
|
\****************************************************************************************/
|
||
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
"use strict";
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (/* binding */ _objectWithoutPropertiesLoose)
|
||
|
/* harmony export */ });
|
||
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
||
|
if (source == null) return {};
|
||
|
var target = {};
|
||
|
var sourceKeys = Object.keys(source);
|
||
|
var key, i;
|
||
|
for (i = 0; i < sourceKeys.length; i++) {
|
||
|
key = sourceKeys[i];
|
||
|
if (excluded.indexOf(key) >= 0) continue;
|
||
|
target[key] = source[key];
|
||
|
}
|
||
|
return target;
|
||
|
}
|
||
|
|
||
|
/***/ })
|
||
|
|
||
|
/******/ });
|
||
|
/************************************************************************/
|
||
|
/******/ // The module cache
|
||
|
/******/ var __webpack_module_cache__ = {};
|
||
|
/******/
|
||
|
/******/ // The require function
|
||
|
/******/ function __webpack_require__(moduleId) {
|
||
|
/******/ // Check if module is in cache
|
||
|
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||
|
/******/ if (cachedModule !== undefined) {
|
||
|
/******/ return cachedModule.exports;
|
||
|
/******/ }
|
||
|
/******/ // Create a new module (and put it into the cache)
|
||
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||
|
/******/ // no module.id needed
|
||
|
/******/ // no module.loaded needed
|
||
|
/******/ exports: {}
|
||
|
/******/ };
|
||
|
/******/
|
||
|
/******/ // Execute the module function
|
||
|
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||
|
/******/
|
||
|
/******/ // Return the exports of the module
|
||
|
/******/ return module.exports;
|
||
|
/******/ }
|
||
|
/******/
|
||
|
/************************************************************************/
|
||
|
/******/ /* webpack/runtime/compat get default export */
|
||
|
/******/ (() => {
|
||
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||
|
/******/ __webpack_require__.n = (module) => {
|
||
|
/******/ var getter = module && module.__esModule ?
|
||
|
/******/ () => (module['default']) :
|
||
|
/******/ () => (module);
|
||
|
/******/ __webpack_require__.d(getter, { a: getter });
|
||
|
/******/ return getter;
|
||
|
/******/ };
|
||
|
/******/ })();
|
||
|
/******/
|
||
|
/******/ /* webpack/runtime/define property getters */
|
||
|
/******/ (() => {
|
||
|
/******/ // define getter functions for harmony exports
|
||
|
/******/ __webpack_require__.d = (exports, definition) => {
|
||
|
/******/ for(var key in definition) {
|
||
|
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||
|
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||
|
/******/ }
|
||
|
/******/ }
|
||
|
/******/ };
|
||
|
/******/ })();
|
||
|
/******/
|
||
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||
|
/******/ (() => {
|
||
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||
|
/******/ })();
|
||
|
/******/
|
||
|
/******/ /* webpack/runtime/make namespace object */
|
||
|
/******/ (() => {
|
||
|
/******/ // define __esModule on exports
|
||
|
/******/ __webpack_require__.r = (exports) => {
|
||
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||
|
/******/ }
|
||
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||
|
/******/ };
|
||
|
/******/ })();
|
||
|
/******/
|
||
|
/************************************************************************/
|
||
|
var __webpack_exports__ = {};
|
||
|
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
||
|
(() => {
|
||
|
"use strict";
|
||
|
/*!*****************************!*\
|
||
|
!*** ../assets/js/notes.js ***!
|
||
|
\*****************************/
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony import */ var _e_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./e-component */ "../assets/js/e-component.js");
|
||
|
|
||
|
window.top.$e.components.register(new _e_component__WEBPACK_IMPORTED_MODULE_0__["default"]());
|
||
|
})();
|
||
|
|
||
|
/******/ })()
|
||
|
;
|
||
|
//# sourceMappingURL=notes.js.map
|