PluginProbe
Elementor Website Builder – more than just a page builder / 3.28.4
Elementor Website Builder – more than just a page builder v3.28.4
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / assets / js / admin-notifications.js

admin-notifications.js in Elementor Website Builder – more than just a page builder 3.28.4, at assets/js/admin-notifications.js

8,503 lines 307.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.28.0 - 22-04-2025 */
2 /******/ (() => { // webpackBootstrap
3 /******/ var __webpack_modules__ = ({
4
5 /***/ "../node_modules/@elementor/query/dist/index.js":
6 /*!******************************************************!*\
7 !*** ../node_modules/@elementor/query/dist/index.js ***!
8 \******************************************************/
9 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10
11 "use strict";
12
13 var __defProp = Object.defineProperty;
14 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
15 var __getOwnPropNames = Object.getOwnPropertyNames;
16 var __hasOwnProp = Object.prototype.hasOwnProperty;
17 var __export = (target, all) => {
18 for (var name in all)
19 __defProp(target, name, { get: all[name], enumerable: true });
20 };
21 var __copyProps = (to, from, except, desc) => {
22 if (from && typeof from === "object" || typeof from === "function") {
23 for (let key of __getOwnPropNames(from))
24 if (!__hasOwnProp.call(to, key) && key !== except)
25 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
26 }
27 return to;
28 };
29 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
31 // src/index.ts
32 var src_exports = {};
33 __export(src_exports, {
34 QueryClient: () => import_react_query2.QueryClient,
35 QueryClientProvider: () => import_react_query2.QueryClientProvider,
36 createQueryClient: () => createQueryClient,
37 useInfiniteQuery: () => import_react_query2.useInfiniteQuery,
38 useMutation: () => import_react_query2.useMutation,
39 useQuery: () => import_react_query2.useQuery,
40 useQueryClient: () => import_react_query2.useQueryClient
41 });
42 module.exports = __toCommonJS(src_exports);
43 var import_react_query = __webpack_require__(/*! @tanstack/react-query */ "../node_modules/@tanstack/react-query/build/modern/index.cjs");
44 var import_react_query2 = __webpack_require__(/*! @tanstack/react-query */ "../node_modules/@tanstack/react-query/build/modern/index.cjs");
45 function createQueryClient() {
46 return new import_react_query.QueryClient({
47 defaultOptions: {
48 queries: {
49 refetchOnWindowFocus: false,
50 refetchOnReconnect: false
51 }
52 }
53 });
54 }
55 // Annotate the CommonJS export names for ESM import in node:
56 0 && (0);
57 //# sourceMappingURL=index.js.map
58
59 /***/ }),
60
61 /***/ "../modules/notifications/assets/js/api/index.js":
62 /*!*******************************************************!*\
63 !*** ../modules/notifications/assets/js/api/index.js ***!
64 \*******************************************************/
65 /***/ ((__unused_webpack_module, exports) => {
66
67 "use strict";
68
69
70 Object.defineProperty(exports, "__esModule", ({
71 value: true
72 }));
73 exports.getNotifications = void 0;
74 var request = function request(endpoint) {
75 var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
76 return new Promise(function (resolve, reject) {
77 elementorCommon.ajax.addRequest(endpoint, {
78 success: resolve,
79 error: reject,
80 data: data
81 });
82 });
83 };
84 var getNotifications = exports.getNotifications = function getNotifications() {
85 return request('notifications_get');
86 };
87
88 /***/ }),
89
90 /***/ "../modules/notifications/assets/js/components/bar-button-notification.js":
91 /*!********************************************************************************!*\
92 !*** ../modules/notifications/assets/js/components/bar-button-notification.js ***!
93 \********************************************************************************/
94 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
95
96 "use strict";
97 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
98
99
100 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
101 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
102 Object.defineProperty(exports, "__esModule", ({
103 value: true
104 }));
105 exports.BarButtonNotification = void 0;
106 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
107 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
108 var _whatsNew = __webpack_require__(/*! ./whats-new */ "../modules/notifications/assets/js/components/whats-new.js");
109 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
110 function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
111 function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
112 var BarButtonNotification = exports.BarButtonNotification = function BarButtonNotification(props) {
113 var defaultIsRead = props.defaultIsRead;
114 var _useState = (0, _react.useState)(false),
115 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
116 isOpen = _useState2[0],
117 setIsOpen = _useState2[1];
118 var _useState3 = (0, _react.useState)(defaultIsRead),
119 _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
120 isRead = _useState4[0],
121 setIsRead = _useState4[1];
122
123 // TODO: This is a temporary solution until we have a proper admin bar component.
124 return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("button", {
125 className: "e-admin-top-bar__bar-button",
126 style: {
127 backgroundColor: 'transparent',
128 border: 'none'
129 },
130 onClick: function onClick(event) {
131 event.preventDefault();
132 setIsOpen(true);
133 }
134 }, /*#__PURE__*/_react.default.createElement(_ui.Badge, {
135 color: "primary",
136 variant: "dot",
137 invisible: isRead,
138 sx: {
139 mx: 0.5
140 }
141 }, /*#__PURE__*/_react.default.createElement("i", {
142 className: "e-admin-top-bar__bar-button-icon eicon-speakerphone"
143 })), /*#__PURE__*/_react.default.createElement("span", {
144 className: "e-admin-top-bar__bar-button-title"
145 }, props.children)), /*#__PURE__*/_react.default.createElement(_whatsNew.WhatsNew, {
146 isOpen: isOpen,
147 setIsOpen: setIsOpen,
148 setIsRead: setIsRead
149 }));
150 };
151 BarButtonNotification.propTypes = {
152 defaultIsRead: PropTypes.bool,
153 children: PropTypes.any.isRequired
154 };
155
156 /***/ }),
157
158 /***/ "../modules/notifications/assets/js/components/whats-new-drawer-content.js":
159 /*!*********************************************************************************!*\
160 !*** ../modules/notifications/assets/js/components/whats-new-drawer-content.js ***!
161 \*********************************************************************************/
162 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
163
164 "use strict";
165 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
166
167
168 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
169 Object.defineProperty(exports, "__esModule", ({
170 value: true
171 }));
172 exports.WhatsNewDrawerContent = void 0;
173 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
174 var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js");
175 var _api = __webpack_require__(/*! ../api */ "../modules/notifications/assets/js/api/index.js");
176 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
177 var _whatsNewItem = __webpack_require__(/*! ./whats-new-item */ "../modules/notifications/assets/js/components/whats-new-item.js");
178 var WhatsNewDrawerContent = exports.WhatsNewDrawerContent = function WhatsNewDrawerContent(_ref) {
179 var setIsOpen = _ref.setIsOpen;
180 var _useQuery = (0, _query.useQuery)({
181 queryKey: ['e-notifications'],
182 queryFn: _api.getNotifications
183 }),
184 isPending = _useQuery.isPending,
185 error = _useQuery.error,
186 items = _useQuery.data;
187 if (isPending) {
188 return /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_ui.LinearProgress, {
189 color: "secondary"
190 }));
191 }
192 if (error) {
193 return /*#__PURE__*/_react.default.createElement(_ui.Box, null, "An error has occurred: ", error);
194 }
195 return items.map(function (item, itemIndex) {
196 return /*#__PURE__*/_react.default.createElement(_whatsNewItem.WhatsNewItem, {
197 key: itemIndex,
198 item: item,
199 itemIndex: itemIndex,
200 itemsLength: items.length,
201 setIsOpen: setIsOpen
202 });
203 });
204 };
205 WhatsNewDrawerContent.propTypes = {
206 setIsOpen: PropTypes.func.isRequired
207 };
208
209 /***/ }),
210
211 /***/ "../modules/notifications/assets/js/components/whats-new-item-chips.js":
212 /*!*****************************************************************************!*\
213 !*** ../modules/notifications/assets/js/components/whats-new-item-chips.js ***!
214 \*****************************************************************************/
215 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
216
217 "use strict";
218 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
219
220
221 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
222 Object.defineProperty(exports, "__esModule", ({
223 value: true
224 }));
225 exports.WhatsNewItemChips = void 0;
226 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
227 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
228 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
229 var WhatsNewItemChips = exports.WhatsNewItemChips = function WhatsNewItemChips(_ref) {
230 var chipPlan = _ref.chipPlan,
231 chipTags = _ref.chipTags,
232 itemIndex = _ref.itemIndex;
233 var chips = [];
234 if (chipPlan) {
235 chips.push({
236 color: 'promotion',
237 size: 'small',
238 label: chipPlan
239 });
240 }
241 if (chipTags) {
242 chipTags.forEach(function (chipTag) {
243 chips.push({
244 variant: 'outlined',
245 size: 'small',
246 label: chipTag
247 });
248 });
249 }
250 if (!chips.length) {
251 return null;
252 }
253 return /*#__PURE__*/_react.default.createElement(_ui.Stack, {
254 direction: "row",
255 flexWrap: "wrap",
256 gap: 1,
257 sx: {
258 pb: 1
259 }
260 }, chips.map(function (chip, chipIndex) {
261 return /*#__PURE__*/_react.default.createElement(_ui.Chip, (0, _extends2.default)({
262 key: "chip-".concat(itemIndex).concat(chipIndex)
263 }, chip));
264 }));
265 };
266 WhatsNewItemChips.propTypes = {
267 chipPlan: PropTypes.string,
268 chipTags: PropTypes.array,
269 itemIndex: PropTypes.number.isRequired
270 };
271
272 /***/ }),
273
274 /***/ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js":
275 /*!*********************************************************************************!*\
276 !*** ../modules/notifications/assets/js/components/whats-new-item-thumbnail.js ***!
277 \*********************************************************************************/
278 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
279
280 "use strict";
281 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
282
283
284 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
285 Object.defineProperty(exports, "__esModule", ({
286 value: true
287 }));
288 exports.WhatsNewItemThumbnail = void 0;
289 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
290 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
291 var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js");
292 var WhatsNewItemThumbnail = exports.WhatsNewItemThumbnail = function WhatsNewItemThumbnail(_ref) {
293 var imageSrc = _ref.imageSrc,
294 title = _ref.title,
295 link = _ref.link;
296 return /*#__PURE__*/_react.default.createElement(_ui.Box, {
297 sx: {
298 pb: 2
299 }
300 }, /*#__PURE__*/_react.default.createElement(_wrapperWithLink.WrapperWithLink, {
301 link: link
302 }, /*#__PURE__*/_react.default.createElement("img", {
303 src: imageSrc,
304 alt: title,
305 style: {
306 maxWidth: '100%'
307 }
308 })));
309 };
310 WhatsNewItemThumbnail.propTypes = {
311 imageSrc: PropTypes.string.isRequired,
312 title: PropTypes.string.isRequired,
313 link: PropTypes.string
314 };
315
316 /***/ }),
317
318 /***/ "../modules/notifications/assets/js/components/whats-new-item-topic-line.js":
319 /*!**********************************************************************************!*\
320 !*** ../modules/notifications/assets/js/components/whats-new-item-topic-line.js ***!
321 \**********************************************************************************/
322 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
323
324 "use strict";
325 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
326
327
328 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
329 Object.defineProperty(exports, "__esModule", ({
330 value: true
331 }));
332 exports.WhatsNewItemTopicLine = void 0;
333 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
334 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
335 var WhatsNewItemTopicLine = exports.WhatsNewItemTopicLine = function WhatsNewItemTopicLine(_ref) {
336 var topic = _ref.topic,
337 date = _ref.date;
338 return /*#__PURE__*/_react.default.createElement(_ui.Stack, {
339 direction: "row",
340 divider: /*#__PURE__*/_react.default.createElement(_ui.Divider, {
341 orientation: "vertical",
342 flexItem: true
343 }),
344 spacing: 1,
345 color: "text.tertiary",
346 sx: {
347 pb: 1
348 }
349 }, topic && /*#__PURE__*/_react.default.createElement(_ui.Box, null, topic), date && /*#__PURE__*/_react.default.createElement(_ui.Box, null, date));
350 };
351 WhatsNewItemTopicLine.propTypes = {
352 topic: PropTypes.string,
353 date: PropTypes.string
354 };
355
356 /***/ }),
357
358 /***/ "../modules/notifications/assets/js/components/whats-new-item.js":
359 /*!***********************************************************************!*\
360 !*** ../modules/notifications/assets/js/components/whats-new-item.js ***!
361 \***********************************************************************/
362 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
363
364 "use strict";
365 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
366
367
368 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
369 Object.defineProperty(exports, "__esModule", ({
370 value: true
371 }));
372 exports.WhatsNewItem = void 0;
373 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
374 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
375 var _whatsNewItemTopicLine = __webpack_require__(/*! ./whats-new-item-topic-line */ "../modules/notifications/assets/js/components/whats-new-item-topic-line.js");
376 var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js");
377 var _whatsNewItemThumbnail = __webpack_require__(/*! ./whats-new-item-thumbnail */ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js");
378 var _whatsNewItemChips = __webpack_require__(/*! ./whats-new-item-chips */ "../modules/notifications/assets/js/components/whats-new-item-chips.js");
379 var WhatsNewItem = exports.WhatsNewItem = function WhatsNewItem(_ref) {
380 var item = _ref.item,
381 itemIndex = _ref.itemIndex,
382 itemsLength = _ref.itemsLength,
383 setIsOpen = _ref.setIsOpen;
384 return /*#__PURE__*/_react.default.createElement(_ui.Box, {
385 key: itemIndex,
386 display: "flex",
387 flexDirection: "column",
388 sx: {
389 pt: 2
390 }
391 }, (item.topic || item.date) && /*#__PURE__*/_react.default.createElement(_whatsNewItemTopicLine.WhatsNewItemTopicLine, {
392 topic: item.topic,
393 date: item.date
394 }), /*#__PURE__*/_react.default.createElement(_wrapperWithLink.WrapperWithLink, {
395 link: item.link
396 }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
397 variant: "subtitle1",
398 sx: {
399 pb: 2
400 }
401 }, item.title)), item.imageSrc && /*#__PURE__*/_react.default.createElement(_whatsNewItemThumbnail.WhatsNewItemThumbnail, {
402 imageSrc: item.imageSrc,
403 link: item.link,
404 title: item.title
405 }), /*#__PURE__*/_react.default.createElement(_whatsNewItemChips.WhatsNewItemChips, {
406 chipPlan: item.chipPlan,
407 chipTags: item.chipTags,
408 itemIndex: itemIndex
409 }), item.description && /*#__PURE__*/_react.default.createElement(_ui.Typography, {
410 variant: "body2",
411 color: "text.secondary",
412 sx: {
413 pb: 2
414 }
415 }, item.description, item.readMoreText && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ' ', /*#__PURE__*/_react.default.createElement(_ui.Link, {
416 href: item.link,
417 color: "info.main",
418 target: "_blank"
419 }, item.readMoreText))), item.cta && item.ctaLink && /*#__PURE__*/_react.default.createElement(_ui.Box, {
420 sx: {
421 pb: 2
422 }
423 }, /*#__PURE__*/_react.default.createElement(_ui.Button, {
424 href: item.ctaLink,
425 target: item.ctaLink.startsWith('#') ? '_self' : '_blank',
426 variant: "contained",
427 size: "small",
428 color: "promotion",
429 onClick: item.ctaLink.startsWith('#') ? function () {
430 return setIsOpen(false);
431 } : function () {}
432 }, item.cta)), itemIndex !== itemsLength - 1 && /*#__PURE__*/_react.default.createElement(_ui.Divider, {
433 sx: {
434 my: 1
435 }
436 }));
437 };
438 WhatsNewItem.propTypes = {
439 item: PropTypes.object.isRequired,
440 itemIndex: PropTypes.number.isRequired,
441 itemsLength: PropTypes.number.isRequired,
442 setIsOpen: PropTypes.func.isRequired
443 };
444
445 /***/ }),
446
447 /***/ "../modules/notifications/assets/js/components/whats-new-top-bar.js":
448 /*!**************************************************************************!*\
449 !*** ../modules/notifications/assets/js/components/whats-new-top-bar.js ***!
450 \**************************************************************************/
451 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
452
453 "use strict";
454 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
455
456
457 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
458 Object.defineProperty(exports, "__esModule", ({
459 value: true
460 }));
461 exports.WhatsNewTopBar = void 0;
462 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
463 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
464 var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
465 var _xIcon = __webpack_require__(/*! ../icons/x-icon */ "../modules/notifications/assets/js/icons/x-icon.js");
466 var WhatsNewTopBar = exports.WhatsNewTopBar = function WhatsNewTopBar(props) {
467 var setIsOpen = props.setIsOpen;
468 return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.AppBar, {
469 elevation: 0,
470 position: "sticky",
471 sx: {
472 backgroundColor: 'background.default'
473 }
474 }, /*#__PURE__*/_react.default.createElement(_ui.Toolbar, {
475 variant: "dense"
476 }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
477 variant: "overline",
478 sx: {
479 flexGrow: 1
480 }
481 }, (0, _i18n.__)('What\'s New', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.IconButton, {
482 "aria-label": 'close',
483 size: "small",
484 onClick: function onClick() {
485 return setIsOpen(false);
486 }
487 }, /*#__PURE__*/_react.default.createElement(_xIcon.XIcon, null)))), /*#__PURE__*/_react.default.createElement(_ui.Divider, null));
488 };
489 WhatsNewTopBar.propTypes = {
490 setIsOpen: PropTypes.func.isRequired
491 };
492
493 /***/ }),
494
495 /***/ "../modules/notifications/assets/js/components/whats-new.js":
496 /*!******************************************************************!*\
497 !*** ../modules/notifications/assets/js/components/whats-new.js ***!
498 \******************************************************************/
499 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
500
501 "use strict";
502 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
503
504
505 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
506 Object.defineProperty(exports, "__esModule", ({
507 value: true
508 }));
509 exports.WhatsNew = void 0;
510 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
511 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
512 var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js");
513 var _whatsNewTopBar = __webpack_require__(/*! ./whats-new-top-bar */ "../modules/notifications/assets/js/components/whats-new-top-bar.js");
514 var _whatsNewDrawerContent = __webpack_require__(/*! ./whats-new-drawer-content */ "../modules/notifications/assets/js/components/whats-new-drawer-content.js");
515 function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
516 function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
517 var queryClient = new _query.QueryClient({
518 defaultOptions: {
519 queries: {
520 refetchOnWindowFocus: false,
521 retry: false,
522 staleTime: 1000 * 60 * 30 // 30 minutes
523 }
524 }
525 });
526 var WhatsNew = exports.WhatsNew = function WhatsNew(props) {
527 var _window$elementor, _window$elementor$get;
528 var isOpen = props.isOpen,
529 setIsOpen = props.setIsOpen,
530 setIsRead = props.setIsRead,
531 _props$anchorPosition = props.anchorPosition,
532 anchorPosition = _props$anchorPosition === void 0 ? 'right' : _props$anchorPosition;
533 (0, _react.useEffect)(function () {
534 if (!isOpen) {
535 return;
536 }
537 setIsRead(true);
538 }, [isOpen, setIsRead]);
539 return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_query.QueryClientProvider, {
540 client: queryClient
541 }, /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, {
542 rtl: elementorCommon.config.isRTL
543 }, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, {
544 colorScheme: ((_window$elementor = window.elementor) === null || _window$elementor === void 0 || (_window$elementor$get = _window$elementor.getPreferences) === null || _window$elementor$get === void 0 ? void 0 : _window$elementor$get.call(_window$elementor, 'ui_theme')) || 'auto'
545 }, /*#__PURE__*/_react.default.createElement(_ui.Drawer, {
546 anchor: anchorPosition,
547 open: isOpen,
548 onClose: function onClose() {
549 return setIsOpen(false);
550 },
551 ModalProps: {
552 style: {
553 // Above the WordPress Admin Top Bar.
554 zIndex: 999999
555 }
556 }
557 }, /*#__PURE__*/_react.default.createElement(_ui.Box, {
558 sx: {
559 width: 320,
560 backgroundColor: 'background.default'
561 },
562 role: "presentation"
563 }, /*#__PURE__*/_react.default.createElement(_whatsNewTopBar.WhatsNewTopBar, {
564 setIsOpen: setIsOpen
565 }), /*#__PURE__*/_react.default.createElement(_ui.Box, {
566 sx: {
567 padding: '16px'
568 }
569 }, /*#__PURE__*/_react.default.createElement(_whatsNewDrawerContent.WhatsNewDrawerContent, {
570 setIsOpen: setIsOpen
571 }))))))));
572 };
573 WhatsNew.propTypes = {
574 isOpen: PropTypes.bool.isRequired,
575 setIsOpen: PropTypes.func.isRequired,
576 setIsRead: PropTypes.func.isRequired,
577 anchorPosition: PropTypes.oneOf(['left', 'top', 'right', 'bottom'])
578 };
579
580 /***/ }),
581
582 /***/ "../modules/notifications/assets/js/components/wrapper-with-link.js":
583 /*!**************************************************************************!*\
584 !*** ../modules/notifications/assets/js/components/wrapper-with-link.js ***!
585 \**************************************************************************/
586 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
587
588 "use strict";
589 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
590
591
592 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
593 Object.defineProperty(exports, "__esModule", ({
594 value: true
595 }));
596 exports.WrapperWithLink = void 0;
597 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
598 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
599 var WrapperWithLink = exports.WrapperWithLink = function WrapperWithLink(props) {
600 var link = props.link,
601 children = props.children;
602 if (!link) {
603 return children;
604 }
605 return /*#__PURE__*/_react.default.createElement(_ui.Link, {
606 href: link,
607 target: "_blank",
608 underline: "none",
609 color: "inherit",
610 sx: {
611 '&:hover': {
612 color: 'inherit'
613 }
614 }
615 }, children);
616 };
617 WrapperWithLink.propTypes = {
618 link: PropTypes.string,
619 children: PropTypes.any.isRequired
620 };
621
622 /***/ }),
623
624 /***/ "../modules/notifications/assets/js/icons/x-icon.js":
625 /*!**********************************************************!*\
626 !*** ../modules/notifications/assets/js/icons/x-icon.js ***!
627 \**********************************************************/
628 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
629
630 "use strict";
631
632
633 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
634 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
635 Object.defineProperty(exports, "__esModule", ({
636 value: true
637 }));
638 exports.XIcon = void 0;
639 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
640 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
641 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
642 function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
643 function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
644 var XIcon = exports.XIcon = (0, _react.forwardRef)(function (props, ref) {
645 return /*#__PURE__*/_react.default.createElement(_ui.SvgIcon, (0, _extends2.default)({
646 viewBox: "0 0 24 24"
647 }, props, {
648 ref: ref
649 }), /*#__PURE__*/_react.default.createElement("path", {
650 fillRule: "evenodd",
651 clipRule: "evenodd",
652 d: "M18.5303 5.46967C18.8232 5.76256 18.8232 6.23744 18.5303 6.53033L6.53033 18.5303C6.23744 18.8232 5.76256 18.8232 5.46967 18.5303C5.17678 18.2374 5.17678 17.7626 5.46967 17.4697L17.4697 5.46967C17.7626 5.17678 18.2374 5.17678 18.5303 5.46967Z"
653 }), /*#__PURE__*/_react.default.createElement("path", {
654 fillRule: "evenodd",
655 clipRule: "evenodd",
656 d: "M5.46967 5.46967C5.76256 5.17678 6.23744 5.17678 6.53033 5.46967L18.5303 17.4697C18.8232 17.7626 18.8232 18.2374 18.5303 18.5303C18.2374 18.8232 17.7626 18.8232 17.4697 18.5303L5.46967 6.53033C5.17678 6.23744 5.17678 5.76256 5.46967 5.46967Z"
657 }));
658 });
659
660 /***/ }),
661
662 /***/ "../node_modules/object-assign/index.js":
663 /*!**********************************************!*\
664 !*** ../node_modules/object-assign/index.js ***!
665 \**********************************************/
666 /***/ ((module) => {
667
668 "use strict";
669 /*
670 object-assign
671 (c) Sindre Sorhus
672 @license MIT
673 */
674
675
676 /* eslint-disable no-unused-vars */
677 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
678 var hasOwnProperty = Object.prototype.hasOwnProperty;
679 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
680
681 function toObject(val) {
682 if (val === null || val === undefined) {
683 throw new TypeError('Object.assign cannot be called with null or undefined');
684 }
685
686 return Object(val);
687 }
688
689 function shouldUseNative() {
690 try {
691 if (!Object.assign) {
692 return false;
693 }
694
695 // Detect buggy property enumeration order in older V8 versions.
696
697 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
698 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
699 test1[5] = 'de';
700 if (Object.getOwnPropertyNames(test1)[0] === '5') {
701 return false;
702 }
703
704 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
705 var test2 = {};
706 for (var i = 0; i < 10; i++) {
707 test2['_' + String.fromCharCode(i)] = i;
708 }
709 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
710 return test2[n];
711 });
712 if (order2.join('') !== '0123456789') {
713 return false;
714 }
715
716 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
717 var test3 = {};
718 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
719 test3[letter] = letter;
720 });
721 if (Object.keys(Object.assign({}, test3)).join('') !==
722 'abcdefghijklmnopqrst') {
723 return false;
724 }
725
726 return true;
727 } catch (err) {
728 // We don't expect any of the above to throw, but better to be safe.
729 return false;
730 }
731 }
732
733 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
734 var from;
735 var to = toObject(target);
736 var symbols;
737
738 for (var s = 1; s < arguments.length; s++) {
739 from = Object(arguments[s]);
740
741 for (var key in from) {
742 if (hasOwnProperty.call(from, key)) {
743 to[key] = from[key];
744 }
745 }
746
747 if (getOwnPropertySymbols) {
748 symbols = getOwnPropertySymbols(from);
749 for (var i = 0; i < symbols.length; i++) {
750 if (propIsEnumerable.call(from, symbols[i])) {
751 to[symbols[i]] = from[symbols[i]];
752 }
753 }
754 }
755 }
756
757 return to;
758 };
759
760
761 /***/ }),
762
763 /***/ "../node_modules/prop-types/checkPropTypes.js":
764 /*!****************************************************!*\
765 !*** ../node_modules/prop-types/checkPropTypes.js ***!
766 \****************************************************/
767 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
768
769 "use strict";
770 /**
771 * Copyright (c) 2013-present, Facebook, Inc.
772 *
773 * This source code is licensed under the MIT license found in the
774 * LICENSE file in the root directory of this source tree.
775 */
776
777
778
779 var printWarning = function() {};
780
781 if (true) {
782 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
783 var loggedTypeFailures = {};
784 var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
785
786 printWarning = function(text) {
787 var message = 'Warning: ' + text;
788 if (typeof console !== 'undefined') {
789 console.error(message);
790 }
791 try {
792 // --- Welcome to debugging React ---
793 // This error was thrown as a convenience so that you can use this stack
794 // to find the callsite that caused this warning to fire.
795 throw new Error(message);
796 } catch (x) { /**/ }
797 };
798 }
799
800 /**
801 * Assert that the values match with the type specs.
802 * Error messages are memorized and will only be shown once.
803 *
804 * @param {object} typeSpecs Map of name to a ReactPropType
805 * @param {object} values Runtime values that need to be type-checked
806 * @param {string} location e.g. "prop", "context", "child context"
807 * @param {string} componentName Name of the component for error messages.
808 * @param {?Function} getStack Returns the component stack.
809 * @private
810 */
811 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
812 if (true) {
813 for (var typeSpecName in typeSpecs) {
814 if (has(typeSpecs, typeSpecName)) {
815 var error;
816 // Prop type validation may throw. In case they do, we don't want to
817 // fail the render phase where it didn't fail before. So we log it.
818 // After these have been cleaned up, we'll let them throw.
819 try {
820 // This is intentionally an invariant that gets caught. It's the same
821 // behavior as without this statement except with a better message.
822 if (typeof typeSpecs[typeSpecName] !== 'function') {
823 var err = Error(
824 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
825 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
826 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
827 );
828 err.name = 'Invariant Violation';
829 throw err;
830 }
831 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
832 } catch (ex) {
833 error = ex;
834 }
835 if (error && !(error instanceof Error)) {
836 printWarning(
837 (componentName || 'React class') + ': type specification of ' +
838 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
839 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
840 'You may have forgotten to pass an argument to the type checker ' +
841 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
842 'shape all require an argument).'
843 );
844 }
845 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
846 // Only monitor this failure once because there tends to be a lot of the
847 // same error.
848 loggedTypeFailures[error.message] = true;
849
850 var stack = getStack ? getStack() : '';
851
852 printWarning(
853 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
854 );
855 }
856 }
857 }
858 }
859 }
860
861 /**
862 * Resets warning cache when testing.
863 *
864 * @private
865 */
866 checkPropTypes.resetWarningCache = function() {
867 if (true) {
868 loggedTypeFailures = {};
869 }
870 }
871
872 module.exports = checkPropTypes;
873
874
875 /***/ }),
876
877 /***/ "../node_modules/prop-types/factoryWithTypeCheckers.js":
878 /*!*************************************************************!*\
879 !*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***!
880 \*************************************************************/
881 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
882
883 "use strict";
884 /**
885 * Copyright (c) 2013-present, Facebook, Inc.
886 *
887 * This source code is licensed under the MIT license found in the
888 * LICENSE file in the root directory of this source tree.
889 */
890
891
892
893 var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
894 var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js");
895
896 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
897 var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
898 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js");
899
900 var printWarning = function() {};
901
902 if (true) {
903 printWarning = function(text) {
904 var message = 'Warning: ' + text;
905 if (typeof console !== 'undefined') {
906 console.error(message);
907 }
908 try {
909 // --- Welcome to debugging React ---
910 // This error was thrown as a convenience so that you can use this stack
911 // to find the callsite that caused this warning to fire.
912 throw new Error(message);
913 } catch (x) {}
914 };
915 }
916
917 function emptyFunctionThatReturnsNull() {
918 return null;
919 }
920
921 module.exports = function(isValidElement, throwOnDirectAccess) {
922 /* global Symbol */
923 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
924 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
925
926 /**
927 * Returns the iterator method function contained on the iterable object.
928 *
929 * Be sure to invoke the function with the iterable as context:
930 *
931 * var iteratorFn = getIteratorFn(myIterable);
932 * if (iteratorFn) {
933 * var iterator = iteratorFn.call(myIterable);
934 * ...
935 * }
936 *
937 * @param {?object} maybeIterable
938 * @return {?function}
939 */
940 function getIteratorFn(maybeIterable) {
941 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
942 if (typeof iteratorFn === 'function') {
943 return iteratorFn;
944 }
945 }
946
947 /**
948 * Collection of methods that allow declaration and validation of props that are
949 * supplied to React components. Example usage:
950 *
951 * var Props = require('ReactPropTypes');
952 * var MyArticle = React.createClass({
953 * propTypes: {
954 * // An optional string prop named "description".
955 * description: Props.string,
956 *
957 * // A required enum prop named "category".
958 * category: Props.oneOf(['News','Photos']).isRequired,
959 *
960 * // A prop named "dialog" that requires an instance of Dialog.
961 * dialog: Props.instanceOf(Dialog).isRequired
962 * },
963 * render: function() { ... }
964 * });
965 *
966 * A more formal specification of how these methods are used:
967 *
968 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
969 * decl := ReactPropTypes.{type}(.isRequired)?
970 *
971 * Each and every declaration produces a function with the same signature. This
972 * allows the creation of custom validation functions. For example:
973 *
974 * var MyLink = React.createClass({
975 * propTypes: {
976 * // An optional string or URI prop named "href".
977 * href: function(props, propName, componentName) {
978 * var propValue = props[propName];
979 * if (propValue != null && typeof propValue !== 'string' &&
980 * !(propValue instanceof URI)) {
981 * return new Error(
982 * 'Expected a string or an URI for ' + propName + ' in ' +
983 * componentName
984 * );
985 * }
986 * }
987 * },
988 * render: function() {...}
989 * });
990 *
991 * @internal
992 */
993
994 var ANONYMOUS = '<<anonymous>>';
995
996 // Important!
997 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
998 var ReactPropTypes = {
999 array: createPrimitiveTypeChecker('array'),
1000 bigint: createPrimitiveTypeChecker('bigint'),
1001 bool: createPrimitiveTypeChecker('boolean'),
1002 func: createPrimitiveTypeChecker('function'),
1003 number: createPrimitiveTypeChecker('number'),
1004 object: createPrimitiveTypeChecker('object'),
1005 string: createPrimitiveTypeChecker('string'),
1006 symbol: createPrimitiveTypeChecker('symbol'),
1007
1008 any: createAnyTypeChecker(),
1009 arrayOf: createArrayOfTypeChecker,
1010 element: createElementTypeChecker(),
1011 elementType: createElementTypeTypeChecker(),
1012 instanceOf: createInstanceTypeChecker,
1013 node: createNodeChecker(),
1014 objectOf: createObjectOfTypeChecker,
1015 oneOf: createEnumTypeChecker,
1016 oneOfType: createUnionTypeChecker,
1017 shape: createShapeTypeChecker,
1018 exact: createStrictShapeTypeChecker,
1019 };
1020
1021 /**
1022 * inlined Object.is polyfill to avoid requiring consumers ship their own
1023 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
1024 */
1025 /*eslint-disable no-self-compare*/
1026 function is(x, y) {
1027 // SameValue algorithm
1028 if (x === y) {
1029 // Steps 1-5, 7-10
1030 // Steps 6.b-6.e: +0 != -0
1031 return x !== 0 || 1 / x === 1 / y;
1032 } else {
1033 // Step 6.a: NaN == NaN
1034 return x !== x && y !== y;
1035 }
1036 }
1037 /*eslint-enable no-self-compare*/
1038
1039 /**
1040 * We use an Error-like object for backward compatibility as people may call
1041 * PropTypes directly and inspect their output. However, we don't use real
1042 * Errors anymore. We don't inspect their stack anyway, and creating them
1043 * is prohibitively expensive if they are created too often, such as what
1044 * happens in oneOfType() for any type before the one that matched.
1045 */
1046 function PropTypeError(message, data) {
1047 this.message = message;
1048 this.data = data && typeof data === 'object' ? data: {};
1049 this.stack = '';
1050 }
1051 // Make `instanceof Error` still work for returned errors.
1052 PropTypeError.prototype = Error.prototype;
1053
1054 function createChainableTypeChecker(validate) {
1055 if (true) {
1056 var manualPropTypeCallCache = {};
1057 var manualPropTypeWarningCount = 0;
1058 }
1059 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
1060 componentName = componentName || ANONYMOUS;
1061 propFullName = propFullName || propName;
1062
1063 if (secret !== ReactPropTypesSecret) {
1064 if (throwOnDirectAccess) {
1065 // New behavior only for users of `prop-types` package
1066 var err = new Error(
1067 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1068 'Use `PropTypes.checkPropTypes()` to call them. ' +
1069 'Read more at http://fb.me/use-check-prop-types'
1070 );
1071 err.name = 'Invariant Violation';
1072 throw err;
1073 } else if ( true && typeof console !== 'undefined') {
1074 // Old behavior for people using React.PropTypes
1075 var cacheKey = componentName + ':' + propName;
1076 if (
1077 !manualPropTypeCallCache[cacheKey] &&
1078 // Avoid spamming the console because they are often not actionable except for lib authors
1079 manualPropTypeWarningCount < 3
1080 ) {
1081 printWarning(
1082 'You are manually calling a React.PropTypes validation ' +
1083 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
1084 'and will throw in the standalone `prop-types` package. ' +
1085 'You may be seeing this warning due to a third-party PropTypes ' +
1086 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
1087 );
1088 manualPropTypeCallCache[cacheKey] = true;
1089 manualPropTypeWarningCount++;
1090 }
1091 }
1092 }
1093 if (props[propName] == null) {
1094 if (isRequired) {
1095 if (props[propName] === null) {
1096 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
1097 }
1098 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
1099 }
1100 return null;
1101 } else {
1102 return validate(props, propName, componentName, location, propFullName);
1103 }
1104 }
1105
1106 var chainedCheckType = checkType.bind(null, false);
1107 chainedCheckType.isRequired = checkType.bind(null, true);
1108
1109 return chainedCheckType;
1110 }
1111
1112 function createPrimitiveTypeChecker(expectedType) {
1113 function validate(props, propName, componentName, location, propFullName, secret) {
1114 var propValue = props[propName];
1115 var propType = getPropType(propValue);
1116 if (propType !== expectedType) {
1117 // `propValue` being instance of, say, date/regexp, pass the 'object'
1118 // check, but we can offer a more precise error message here rather than
1119 // 'of type `object`'.
1120 var preciseType = getPreciseType(propValue);
1121
1122 return new PropTypeError(
1123 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
1124 {expectedType: expectedType}
1125 );
1126 }
1127 return null;
1128 }
1129 return createChainableTypeChecker(validate);
1130 }
1131
1132 function createAnyTypeChecker() {
1133 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
1134 }
1135
1136 function createArrayOfTypeChecker(typeChecker) {
1137 function validate(props, propName, componentName, location, propFullName) {
1138 if (typeof typeChecker !== 'function') {
1139 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
1140 }
1141 var propValue = props[propName];
1142 if (!Array.isArray(propValue)) {
1143 var propType = getPropType(propValue);
1144 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
1145 }
1146 for (var i = 0; i < propValue.length; i++) {
1147 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
1148 if (error instanceof Error) {
1149 return error;
1150 }
1151 }
1152 return null;
1153 }
1154 return createChainableTypeChecker(validate);
1155 }
1156
1157 function createElementTypeChecker() {
1158 function validate(props, propName, componentName, location, propFullName) {
1159 var propValue = props[propName];
1160 if (!isValidElement(propValue)) {
1161 var propType = getPropType(propValue);
1162 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
1163 }
1164 return null;
1165 }
1166 return createChainableTypeChecker(validate);
1167 }
1168
1169 function createElementTypeTypeChecker() {
1170 function validate(props, propName, componentName, location, propFullName) {
1171 var propValue = props[propName];
1172 if (!ReactIs.isValidElementType(propValue)) {
1173 var propType = getPropType(propValue);
1174 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
1175 }
1176 return null;
1177 }
1178 return createChainableTypeChecker(validate);
1179 }
1180
1181 function createInstanceTypeChecker(expectedClass) {
1182 function validate(props, propName, componentName, location, propFullName) {
1183 if (!(props[propName] instanceof expectedClass)) {
1184 var expectedClassName = expectedClass.name || ANONYMOUS;
1185 var actualClassName = getClassName(props[propName]);
1186 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
1187 }
1188 return null;
1189 }
1190 return createChainableTypeChecker(validate);
1191 }
1192
1193 function createEnumTypeChecker(expectedValues) {
1194 if (!Array.isArray(expectedValues)) {
1195 if (true) {
1196 if (arguments.length > 1) {
1197 printWarning(
1198 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
1199 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
1200 );
1201 } else {
1202 printWarning('Invalid argument supplied to oneOf, expected an array.');
1203 }
1204 }
1205 return emptyFunctionThatReturnsNull;
1206 }
1207
1208 function validate(props, propName, componentName, location, propFullName) {
1209 var propValue = props[propName];
1210 for (var i = 0; i < expectedValues.length; i++) {
1211 if (is(propValue, expectedValues[i])) {
1212 return null;
1213 }
1214 }
1215
1216 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
1217 var type = getPreciseType(value);
1218 if (type === 'symbol') {
1219 return String(value);
1220 }
1221 return value;
1222 });
1223 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
1224 }
1225 return createChainableTypeChecker(validate);
1226 }
1227
1228 function createObjectOfTypeChecker(typeChecker) {
1229 function validate(props, propName, componentName, location, propFullName) {
1230 if (typeof typeChecker !== 'function') {
1231 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
1232 }
1233 var propValue = props[propName];
1234 var propType = getPropType(propValue);
1235 if (propType !== 'object') {
1236 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
1237 }
1238 for (var key in propValue) {
1239 if (has(propValue, key)) {
1240 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1241 if (error instanceof Error) {
1242 return error;
1243 }
1244 }
1245 }
1246 return null;
1247 }
1248 return createChainableTypeChecker(validate);
1249 }
1250
1251 function createUnionTypeChecker(arrayOfTypeCheckers) {
1252 if (!Array.isArray(arrayOfTypeCheckers)) {
1253 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
1254 return emptyFunctionThatReturnsNull;
1255 }
1256
1257 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1258 var checker = arrayOfTypeCheckers[i];
1259 if (typeof checker !== 'function') {
1260 printWarning(
1261 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
1262 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
1263 );
1264 return emptyFunctionThatReturnsNull;
1265 }
1266 }
1267
1268 function validate(props, propName, componentName, location, propFullName) {
1269 var expectedTypes = [];
1270 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1271 var checker = arrayOfTypeCheckers[i];
1272 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
1273 if (checkerResult == null) {
1274 return null;
1275 }
1276 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
1277 expectedTypes.push(checkerResult.data.expectedType);
1278 }
1279 }
1280 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
1281 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
1282 }
1283 return createChainableTypeChecker(validate);
1284 }
1285
1286 function createNodeChecker() {
1287 function validate(props, propName, componentName, location, propFullName) {
1288 if (!isNode(props[propName])) {
1289 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
1290 }
1291 return null;
1292 }
1293 return createChainableTypeChecker(validate);
1294 }
1295
1296 function invalidValidatorError(componentName, location, propFullName, key, type) {
1297 return new PropTypeError(
1298 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
1299 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
1300 );
1301 }
1302
1303 function createShapeTypeChecker(shapeTypes) {
1304 function validate(props, propName, componentName, location, propFullName) {
1305 var propValue = props[propName];
1306 var propType = getPropType(propValue);
1307 if (propType !== 'object') {
1308 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1309 }
1310 for (var key in shapeTypes) {
1311 var checker = shapeTypes[key];
1312 if (typeof checker !== 'function') {
1313 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1314 }
1315 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1316 if (error) {
1317 return error;
1318 }
1319 }
1320 return null;
1321 }
1322 return createChainableTypeChecker(validate);
1323 }
1324
1325 function createStrictShapeTypeChecker(shapeTypes) {
1326 function validate(props, propName, componentName, location, propFullName) {
1327 var propValue = props[propName];
1328 var propType = getPropType(propValue);
1329 if (propType !== 'object') {
1330 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1331 }
1332 // We need to check all keys in case some are required but missing from props.
1333 var allKeys = assign({}, props[propName], shapeTypes);
1334 for (var key in allKeys) {
1335 var checker = shapeTypes[key];
1336 if (has(shapeTypes, key) && typeof checker !== 'function') {
1337 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1338 }
1339 if (!checker) {
1340 return new PropTypeError(
1341 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
1342 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
1343 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
1344 );
1345 }
1346 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1347 if (error) {
1348 return error;
1349 }
1350 }
1351 return null;
1352 }
1353
1354 return createChainableTypeChecker(validate);
1355 }
1356
1357 function isNode(propValue) {
1358 switch (typeof propValue) {
1359 case 'number':
1360 case 'string':
1361 case 'undefined':
1362 return true;
1363 case 'boolean':
1364 return !propValue;
1365 case 'object':
1366 if (Array.isArray(propValue)) {
1367 return propValue.every(isNode);
1368 }
1369 if (propValue === null || isValidElement(propValue)) {
1370 return true;
1371 }
1372
1373 var iteratorFn = getIteratorFn(propValue);
1374 if (iteratorFn) {
1375 var iterator = iteratorFn.call(propValue);
1376 var step;
1377 if (iteratorFn !== propValue.entries) {
1378 while (!(step = iterator.next()).done) {
1379 if (!isNode(step.value)) {
1380 return false;
1381 }
1382 }
1383 } else {
1384 // Iterator will provide entry [k,v] tuples rather than values.
1385 while (!(step = iterator.next()).done) {
1386 var entry = step.value;
1387 if (entry) {
1388 if (!isNode(entry[1])) {
1389 return false;
1390 }
1391 }
1392 }
1393 }
1394 } else {
1395 return false;
1396 }
1397
1398 return true;
1399 default:
1400 return false;
1401 }
1402 }
1403
1404 function isSymbol(propType, propValue) {
1405 // Native Symbol.
1406 if (propType === 'symbol') {
1407 return true;
1408 }
1409
1410 // falsy value can't be a Symbol
1411 if (!propValue) {
1412 return false;
1413 }
1414
1415 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1416 if (propValue['@@toStringTag'] === 'Symbol') {
1417 return true;
1418 }
1419
1420 // Fallback for non-spec compliant Symbols which are polyfilled.
1421 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1422 return true;
1423 }
1424
1425 return false;
1426 }
1427
1428 // Equivalent of `typeof` but with special handling for array and regexp.
1429 function getPropType(propValue) {
1430 var propType = typeof propValue;
1431 if (Array.isArray(propValue)) {
1432 return 'array';
1433 }
1434 if (propValue instanceof RegExp) {
1435 // Old webkits (at least until Android 4.0) return 'function' rather than
1436 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1437 // passes PropTypes.object.
1438 return 'object';
1439 }
1440 if (isSymbol(propType, propValue)) {
1441 return 'symbol';
1442 }
1443 return propType;
1444 }
1445
1446 // This handles more types than `getPropType`. Only used for error messages.
1447 // See `createPrimitiveTypeChecker`.
1448 function getPreciseType(propValue) {
1449 if (typeof propValue === 'undefined' || propValue === null) {
1450 return '' + propValue;
1451 }
1452 var propType = getPropType(propValue);
1453 if (propType === 'object') {
1454 if (propValue instanceof Date) {
1455 return 'date';
1456 } else if (propValue instanceof RegExp) {
1457 return 'regexp';
1458 }
1459 }
1460 return propType;
1461 }
1462
1463 // Returns a string that is postfixed to a warning about an invalid type.
1464 // For example, "undefined" or "of type array"
1465 function getPostfixForTypeWarning(value) {
1466 var type = getPreciseType(value);
1467 switch (type) {
1468 case 'array':
1469 case 'object':
1470 return 'an ' + type;
1471 case 'boolean':
1472 case 'date':
1473 case 'regexp':
1474 return 'a ' + type;
1475 default:
1476 return type;
1477 }
1478 }
1479
1480 // Returns class name of the object, if any.
1481 function getClassName(propValue) {
1482 if (!propValue.constructor || !propValue.constructor.name) {
1483 return ANONYMOUS;
1484 }
1485 return propValue.constructor.name;
1486 }
1487
1488 ReactPropTypes.checkPropTypes = checkPropTypes;
1489 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1490 ReactPropTypes.PropTypes = ReactPropTypes;
1491
1492 return ReactPropTypes;
1493 };
1494
1495
1496 /***/ }),
1497
1498 /***/ "../node_modules/prop-types/index.js":
1499 /*!*******************************************!*\
1500 !*** ../node_modules/prop-types/index.js ***!
1501 \*******************************************/
1502 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1503
1504 /**
1505 * Copyright (c) 2013-present, Facebook, Inc.
1506 *
1507 * This source code is licensed under the MIT license found in the
1508 * LICENSE file in the root directory of this source tree.
1509 */
1510
1511 if (true) {
1512 var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
1513
1514 // By explicitly using `prop-types` you are opting into new development behavior.
1515 // http://fb.me/prop-types-in-prod
1516 var throwOnDirectAccess = true;
1517 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
1518 } else {}
1519
1520
1521 /***/ }),
1522
1523 /***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js":
1524 /*!**************************************************************!*\
1525 !*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
1526 \**************************************************************/
1527 /***/ ((module) => {
1528
1529 "use strict";
1530 /**
1531 * Copyright (c) 2013-present, Facebook, Inc.
1532 *
1533 * This source code is licensed under the MIT license found in the
1534 * LICENSE file in the root directory of this source tree.
1535 */
1536
1537
1538
1539 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
1540
1541 module.exports = ReactPropTypesSecret;
1542
1543
1544 /***/ }),
1545
1546 /***/ "../node_modules/prop-types/lib/has.js":
1547 /*!*********************************************!*\
1548 !*** ../node_modules/prop-types/lib/has.js ***!
1549 \*********************************************/
1550 /***/ ((module) => {
1551
1552 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
1553
1554
1555 /***/ }),
1556
1557 /***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js":
1558 /*!************************************************************************************!*\
1559 !*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***!
1560 \************************************************************************************/
1561 /***/ ((__unused_webpack_module, exports) => {
1562
1563 "use strict";
1564 /** @license React v16.13.1
1565 * react-is.development.js
1566 *
1567 * Copyright (c) Facebook, Inc. and its affiliates.
1568 *
1569 * This source code is licensed under the MIT license found in the
1570 * LICENSE file in the root directory of this source tree.
1571 */
1572
1573
1574
1575
1576
1577 if (true) {
1578 (function() {
1579 'use strict';
1580
1581 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
1582 // nor polyfill, then a plain number is used for performance.
1583 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
1584 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
1585 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
1586 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
1587 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
1588 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
1589 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
1590 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
1591 // (unstable) APIs that have been removed. Can we remove the symbols?
1592
1593 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
1594 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
1595 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
1596 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
1597 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
1598 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
1599 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
1600 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
1601 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
1602 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
1603 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
1604
1605 function isValidElementType(type) {
1606 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1607 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);
1608 }
1609
1610 function typeOf(object) {
1611 if (typeof object === 'object' && object !== null) {
1612 var $$typeof = object.$$typeof;
1613
1614 switch ($$typeof) {
1615 case REACT_ELEMENT_TYPE:
1616 var type = object.type;
1617
1618 switch (type) {
1619 case REACT_ASYNC_MODE_TYPE:
1620 case REACT_CONCURRENT_MODE_TYPE:
1621 case REACT_FRAGMENT_TYPE:
1622 case REACT_PROFILER_TYPE:
1623 case REACT_STRICT_MODE_TYPE:
1624 case REACT_SUSPENSE_TYPE:
1625 return type;
1626
1627 default:
1628 var $$typeofType = type && type.$$typeof;
1629
1630 switch ($$typeofType) {
1631 case REACT_CONTEXT_TYPE:
1632 case REACT_FORWARD_REF_TYPE:
1633 case REACT_LAZY_TYPE:
1634 case REACT_MEMO_TYPE:
1635 case REACT_PROVIDER_TYPE:
1636 return $$typeofType;
1637
1638 default:
1639 return $$typeof;
1640 }
1641
1642 }
1643
1644 case REACT_PORTAL_TYPE:
1645 return $$typeof;
1646 }
1647 }
1648
1649 return undefined;
1650 } // AsyncMode is deprecated along with isAsyncMode
1651
1652 var AsyncMode = REACT_ASYNC_MODE_TYPE;
1653 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
1654 var ContextConsumer = REACT_CONTEXT_TYPE;
1655 var ContextProvider = REACT_PROVIDER_TYPE;
1656 var Element = REACT_ELEMENT_TYPE;
1657 var ForwardRef = REACT_FORWARD_REF_TYPE;
1658 var Fragment = REACT_FRAGMENT_TYPE;
1659 var Lazy = REACT_LAZY_TYPE;
1660 var Memo = REACT_MEMO_TYPE;
1661 var Portal = REACT_PORTAL_TYPE;
1662 var Profiler = REACT_PROFILER_TYPE;
1663 var StrictMode = REACT_STRICT_MODE_TYPE;
1664 var Suspense = REACT_SUSPENSE_TYPE;
1665 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
1666
1667 function isAsyncMode(object) {
1668 {
1669 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
1670 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
1671
1672 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.');
1673 }
1674 }
1675
1676 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
1677 }
1678 function isConcurrentMode(object) {
1679 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
1680 }
1681 function isContextConsumer(object) {
1682 return typeOf(object) === REACT_CONTEXT_TYPE;
1683 }
1684 function isContextProvider(object) {
1685 return typeOf(object) === REACT_PROVIDER_TYPE;
1686 }
1687 function isElement(object) {
1688 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1689 }
1690 function isForwardRef(object) {
1691 return typeOf(object) === REACT_FORWARD_REF_TYPE;
1692 }
1693 function isFragment(object) {
1694 return typeOf(object) === REACT_FRAGMENT_TYPE;
1695 }
1696 function isLazy(object) {
1697 return typeOf(object) === REACT_LAZY_TYPE;
1698 }
1699 function isMemo(object) {
1700 return typeOf(object) === REACT_MEMO_TYPE;
1701 }
1702 function isPortal(object) {
1703 return typeOf(object) === REACT_PORTAL_TYPE;
1704 }
1705 function isProfiler(object) {
1706 return typeOf(object) === REACT_PROFILER_TYPE;
1707 }
1708 function isStrictMode(object) {
1709 return typeOf(object) === REACT_STRICT_MODE_TYPE;
1710 }
1711 function isSuspense(object) {
1712 return typeOf(object) === REACT_SUSPENSE_TYPE;
1713 }
1714
1715 exports.AsyncMode = AsyncMode;
1716 exports.ConcurrentMode = ConcurrentMode;
1717 exports.ContextConsumer = ContextConsumer;
1718 exports.ContextProvider = ContextProvider;
1719 exports.Element = Element;
1720 exports.ForwardRef = ForwardRef;
1721 exports.Fragment = Fragment;
1722 exports.Lazy = Lazy;
1723 exports.Memo = Memo;
1724 exports.Portal = Portal;
1725 exports.Profiler = Profiler;
1726 exports.StrictMode = StrictMode;
1727 exports.Suspense = Suspense;
1728 exports.isAsyncMode = isAsyncMode;
1729 exports.isConcurrentMode = isConcurrentMode;
1730 exports.isContextConsumer = isContextConsumer;
1731 exports.isContextProvider = isContextProvider;
1732 exports.isElement = isElement;
1733 exports.isForwardRef = isForwardRef;
1734 exports.isFragment = isFragment;
1735 exports.isLazy = isLazy;
1736 exports.isMemo = isMemo;
1737 exports.isPortal = isPortal;
1738 exports.isProfiler = isProfiler;
1739 exports.isStrictMode = isStrictMode;
1740 exports.isSuspense = isSuspense;
1741 exports.isValidElementType = isValidElementType;
1742 exports.typeOf = typeOf;
1743 })();
1744 }
1745
1746
1747 /***/ }),
1748
1749 /***/ "../node_modules/prop-types/node_modules/react-is/index.js":
1750 /*!*****************************************************************!*\
1751 !*** ../node_modules/prop-types/node_modules/react-is/index.js ***!
1752 \*****************************************************************/
1753 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1754
1755 "use strict";
1756
1757
1758 if (false) {} else {
1759 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js");
1760 }
1761
1762
1763 /***/ }),
1764
1765 /***/ "../node_modules/react/cjs/react-jsx-runtime.development.js":
1766 /*!******************************************************************!*\
1767 !*** ../node_modules/react/cjs/react-jsx-runtime.development.js ***!
1768 \******************************************************************/
1769 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1770
1771 "use strict";
1772 /**
1773 * @license React
1774 * react-jsx-runtime.development.js
1775 *
1776 * Copyright (c) Facebook, Inc. and its affiliates.
1777 *
1778 * This source code is licensed under the MIT license found in the
1779 * LICENSE file in the root directory of this source tree.
1780 */
1781
1782
1783
1784 if (true) {
1785 (function() {
1786 'use strict';
1787
1788 var React = __webpack_require__(/*! react */ "react");
1789
1790 // ATTENTION
1791 // When adding new symbols to this file,
1792 // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
1793 // The Symbol used to tag the ReactElement-like types.
1794 var REACT_ELEMENT_TYPE = Symbol.for('react.element');
1795 var REACT_PORTAL_TYPE = Symbol.for('react.portal');
1796 var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
1797 var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
1798 var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
1799 var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
1800 var REACT_CONTEXT_TYPE = Symbol.for('react.context');
1801 var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
1802 var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
1803 var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
1804 var REACT_MEMO_TYPE = Symbol.for('react.memo');
1805 var REACT_LAZY_TYPE = Symbol.for('react.lazy');
1806 var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
1807 var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
1808 var FAUX_ITERATOR_SYMBOL = '@@iterator';
1809 function getIteratorFn(maybeIterable) {
1810 if (maybeIterable === null || typeof maybeIterable !== 'object') {
1811 return null;
1812 }
1813
1814 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
1815
1816 if (typeof maybeIterator === 'function') {
1817 return maybeIterator;
1818 }
1819
1820 return null;
1821 }
1822
1823 var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1824
1825 function error(format) {
1826 {
1827 {
1828 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1829 args[_key2 - 1] = arguments[_key2];
1830 }
1831
1832 printWarning('error', format, args);
1833 }
1834 }
1835 }
1836
1837 function printWarning(level, format, args) {
1838 // When changing this logic, you might want to also
1839 // update consoleWithStackDev.www.js as well.
1840 {
1841 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
1842 var stack = ReactDebugCurrentFrame.getStackAddendum();
1843
1844 if (stack !== '') {
1845 format += '%s';
1846 args = args.concat([stack]);
1847 } // eslint-disable-next-line react-internal/safe-string-coercion
1848
1849
1850 var argsWithFormat = args.map(function (item) {
1851 return String(item);
1852 }); // Careful: RN currently depends on this prefix
1853
1854 argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
1855 // breaks IE9: https://github.com/facebook/react/issues/13610
1856 // eslint-disable-next-line react-internal/no-production-logging
1857
1858 Function.prototype.apply.call(console[level], console, argsWithFormat);
1859 }
1860 }
1861
1862 // -----------------------------------------------------------------------------
1863
1864 var enableScopeAPI = false; // Experimental Create Event Handle API.
1865 var enableCacheElement = false;
1866 var enableTransitionTracing = false; // No known bugs, but needs performance testing
1867
1868 var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
1869 // stuff. Intended to enable React core members to more easily debug scheduling
1870 // issues in DEV builds.
1871
1872 var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
1873
1874 var REACT_MODULE_REFERENCE;
1875
1876 {
1877 REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
1878 }
1879
1880 function isValidElementType(type) {
1881 if (typeof type === 'string' || typeof type === 'function') {
1882 return true;
1883 } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
1884
1885
1886 if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
1887 return true;
1888 }
1889
1890 if (typeof type === 'object' && type !== null) {
1891 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 || // This needs to include all possible module reference object
1892 // types supported by any Flight configuration anywhere since
1893 // we don't know which Flight build this will end up being used
1894 // with.
1895 type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
1896 return true;
1897 }
1898 }
1899
1900 return false;
1901 }
1902
1903 function getWrappedName(outerType, innerType, wrapperName) {
1904 var displayName = outerType.displayName;
1905
1906 if (displayName) {
1907 return displayName;
1908 }
1909
1910 var functionName = innerType.displayName || innerType.name || '';
1911 return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
1912 } // Keep in sync with react-reconciler/getComponentNameFromFiber
1913
1914
1915 function getContextName(type) {
1916 return type.displayName || 'Context';
1917 } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
1918
1919
1920 function getComponentNameFromType(type) {
1921 if (type == null) {
1922 // Host root, text node or just invalid type.
1923 return null;
1924 }
1925
1926 {
1927 if (typeof type.tag === 'number') {
1928 error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
1929 }
1930 }
1931
1932 if (typeof type === 'function') {
1933 return type.displayName || type.name || null;
1934 }
1935
1936 if (typeof type === 'string') {
1937 return type;
1938 }
1939
1940 switch (type) {
1941 case REACT_FRAGMENT_TYPE:
1942 return 'Fragment';
1943
1944 case REACT_PORTAL_TYPE:
1945 return 'Portal';
1946
1947 case REACT_PROFILER_TYPE:
1948 return 'Profiler';
1949
1950 case REACT_STRICT_MODE_TYPE:
1951 return 'StrictMode';
1952
1953 case REACT_SUSPENSE_TYPE:
1954 return 'Suspense';
1955
1956 case REACT_SUSPENSE_LIST_TYPE:
1957 return 'SuspenseList';
1958
1959 }
1960
1961 if (typeof type === 'object') {
1962 switch (type.$$typeof) {
1963 case REACT_CONTEXT_TYPE:
1964 var context = type;
1965 return getContextName(context) + '.Consumer';
1966
1967 case REACT_PROVIDER_TYPE:
1968 var provider = type;
1969 return getContextName(provider._context) + '.Provider';
1970
1971 case REACT_FORWARD_REF_TYPE:
1972 return getWrappedName(type, type.render, 'ForwardRef');
1973
1974 case REACT_MEMO_TYPE:
1975 var outerName = type.displayName || null;
1976
1977 if (outerName !== null) {
1978 return outerName;
1979 }
1980
1981 return getComponentNameFromType(type.type) || 'Memo';
1982
1983 case REACT_LAZY_TYPE:
1984 {
1985 var lazyComponent = type;
1986 var payload = lazyComponent._payload;
1987 var init = lazyComponent._init;
1988
1989 try {
1990 return getComponentNameFromType(init(payload));
1991 } catch (x) {
1992 return null;
1993 }
1994 }
1995
1996 // eslint-disable-next-line no-fallthrough
1997 }
1998 }
1999
2000 return null;
2001 }
2002
2003 var assign = Object.assign;
2004
2005 // Helpers to patch console.logs to avoid logging during side-effect free
2006 // replaying on render function. This currently only patches the object
2007 // lazily which won't cover if the log function was extracted eagerly.
2008 // We could also eagerly patch the method.
2009 var disabledDepth = 0;
2010 var prevLog;
2011 var prevInfo;
2012 var prevWarn;
2013 var prevError;
2014 var prevGroup;
2015 var prevGroupCollapsed;
2016 var prevGroupEnd;
2017
2018 function disabledLog() {}
2019
2020 disabledLog.__reactDisabledLog = true;
2021 function disableLogs() {
2022 {
2023 if (disabledDepth === 0) {
2024 /* eslint-disable react-internal/no-production-logging */
2025 prevLog = console.log;
2026 prevInfo = console.info;
2027 prevWarn = console.warn;
2028 prevError = console.error;
2029 prevGroup = console.group;
2030 prevGroupCollapsed = console.groupCollapsed;
2031 prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
2032
2033 var props = {
2034 configurable: true,
2035 enumerable: true,
2036 value: disabledLog,
2037 writable: true
2038 }; // $FlowFixMe Flow thinks console is immutable.
2039
2040 Object.defineProperties(console, {
2041 info: props,
2042 log: props,
2043 warn: props,
2044 error: props,
2045 group: props,
2046 groupCollapsed: props,
2047 groupEnd: props
2048 });
2049 /* eslint-enable react-internal/no-production-logging */
2050 }
2051
2052 disabledDepth++;
2053 }
2054 }
2055 function reenableLogs() {
2056 {
2057 disabledDepth--;
2058
2059 if (disabledDepth === 0) {
2060 /* eslint-disable react-internal/no-production-logging */
2061 var props = {
2062 configurable: true,
2063 enumerable: true,
2064 writable: true
2065 }; // $FlowFixMe Flow thinks console is immutable.
2066
2067 Object.defineProperties(console, {
2068 log: assign({}, props, {
2069 value: prevLog
2070 }),
2071 info: assign({}, props, {
2072 value: prevInfo
2073 }),
2074 warn: assign({}, props, {
2075 value: prevWarn
2076 }),
2077 error: assign({}, props, {
2078 value: prevError
2079 }),
2080 group: assign({}, props, {
2081 value: prevGroup
2082 }),
2083 groupCollapsed: assign({}, props, {
2084 value: prevGroupCollapsed
2085 }),
2086 groupEnd: assign({}, props, {
2087 value: prevGroupEnd
2088 })
2089 });
2090 /* eslint-enable react-internal/no-production-logging */
2091 }
2092
2093 if (disabledDepth < 0) {
2094 error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
2095 }
2096 }
2097 }
2098
2099 var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
2100 var prefix;
2101 function describeBuiltInComponentFrame(name, source, ownerFn) {
2102 {
2103 if (prefix === undefined) {
2104 // Extract the VM specific prefix used by each line.
2105 try {
2106 throw Error();
2107 } catch (x) {
2108 var match = x.stack.trim().match(/\n( *(at )?)/);
2109 prefix = match && match[1] || '';
2110 }
2111 } // We use the prefix to ensure our stacks line up with native stack frames.
2112
2113
2114 return '\n' + prefix + name;
2115 }
2116 }
2117 var reentry = false;
2118 var componentFrameCache;
2119
2120 {
2121 var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
2122 componentFrameCache = new PossiblyWeakMap();
2123 }
2124
2125 function describeNativeComponentFrame(fn, construct) {
2126 // If something asked for a stack inside a fake render, it should get ignored.
2127 if ( !fn || reentry) {
2128 return '';
2129 }
2130
2131 {
2132 var frame = componentFrameCache.get(fn);
2133
2134 if (frame !== undefined) {
2135 return frame;
2136 }
2137 }
2138
2139 var control;
2140 reentry = true;
2141 var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
2142
2143 Error.prepareStackTrace = undefined;
2144 var previousDispatcher;
2145
2146 {
2147 previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
2148 // for warnings.
2149
2150 ReactCurrentDispatcher.current = null;
2151 disableLogs();
2152 }
2153
2154 try {
2155 // This should throw.
2156 if (construct) {
2157 // Something should be setting the props in the constructor.
2158 var Fake = function () {
2159 throw Error();
2160 }; // $FlowFixMe
2161
2162
2163 Object.defineProperty(Fake.prototype, 'props', {
2164 set: function () {
2165 // We use a throwing setter instead of frozen or non-writable props
2166 // because that won't throw in a non-strict mode function.
2167 throw Error();
2168 }
2169 });
2170
2171 if (typeof Reflect === 'object' && Reflect.construct) {
2172 // We construct a different control for this case to include any extra
2173 // frames added by the construct call.
2174 try {
2175 Reflect.construct(Fake, []);
2176 } catch (x) {
2177 control = x;
2178 }
2179
2180 Reflect.construct(fn, [], Fake);
2181 } else {
2182 try {
2183 Fake.call();
2184 } catch (x) {
2185 control = x;
2186 }
2187
2188 fn.call(Fake.prototype);
2189 }
2190 } else {
2191 try {
2192 throw Error();
2193 } catch (x) {
2194 control = x;
2195 }
2196
2197 fn();
2198 }
2199 } catch (sample) {
2200 // This is inlined manually because closure doesn't do it for us.
2201 if (sample && control && typeof sample.stack === 'string') {
2202 // This extracts the first frame from the sample that isn't also in the control.
2203 // Skipping one frame that we assume is the frame that calls the two.
2204 var sampleLines = sample.stack.split('\n');
2205 var controlLines = control.stack.split('\n');
2206 var s = sampleLines.length - 1;
2207 var c = controlLines.length - 1;
2208
2209 while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
2210 // We expect at least one stack frame to be shared.
2211 // Typically this will be the root most one. However, stack frames may be
2212 // cut off due to maximum stack limits. In this case, one maybe cut off
2213 // earlier than the other. We assume that the sample is longer or the same
2214 // and there for cut off earlier. So we should find the root most frame in
2215 // the sample somewhere in the control.
2216 c--;
2217 }
2218
2219 for (; s >= 1 && c >= 0; s--, c--) {
2220 // Next we find the first one that isn't the same which should be the
2221 // frame that called our sample function and the control.
2222 if (sampleLines[s] !== controlLines[c]) {
2223 // In V8, the first line is describing the message but other VMs don't.
2224 // If we're about to return the first line, and the control is also on the same
2225 // line, that's a pretty good indicator that our sample threw at same line as
2226 // the control. I.e. before we entered the sample frame. So we ignore this result.
2227 // This can happen if you passed a class to function component, or non-function.
2228 if (s !== 1 || c !== 1) {
2229 do {
2230 s--;
2231 c--; // We may still have similar intermediate frames from the construct call.
2232 // The next one that isn't the same should be our match though.
2233
2234 if (c < 0 || sampleLines[s] !== controlLines[c]) {
2235 // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
2236 var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
2237 // but we have a user-provided "displayName"
2238 // splice it in to make the stack more readable.
2239
2240
2241 if (fn.displayName && _frame.includes('<anonymous>')) {
2242 _frame = _frame.replace('<anonymous>', fn.displayName);
2243 }
2244
2245 {
2246 if (typeof fn === 'function') {
2247 componentFrameCache.set(fn, _frame);
2248 }
2249 } // Return the line we found.
2250
2251
2252 return _frame;
2253 }
2254 } while (s >= 1 && c >= 0);
2255 }
2256
2257 break;
2258 }
2259 }
2260 }
2261 } finally {
2262 reentry = false;
2263
2264 {
2265 ReactCurrentDispatcher.current = previousDispatcher;
2266 reenableLogs();
2267 }
2268
2269 Error.prepareStackTrace = previousPrepareStackTrace;
2270 } // Fallback to just using the name if we couldn't make it throw.
2271
2272
2273 var name = fn ? fn.displayName || fn.name : '';
2274 var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
2275
2276 {
2277 if (typeof fn === 'function') {
2278 componentFrameCache.set(fn, syntheticFrame);
2279 }
2280 }
2281
2282 return syntheticFrame;
2283 }
2284 function describeFunctionComponentFrame(fn, source, ownerFn) {
2285 {
2286 return describeNativeComponentFrame(fn, false);
2287 }
2288 }
2289
2290 function shouldConstruct(Component) {
2291 var prototype = Component.prototype;
2292 return !!(prototype && prototype.isReactComponent);
2293 }
2294
2295 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
2296
2297 if (type == null) {
2298 return '';
2299 }
2300
2301 if (typeof type === 'function') {
2302 {
2303 return describeNativeComponentFrame(type, shouldConstruct(type));
2304 }
2305 }
2306
2307 if (typeof type === 'string') {
2308 return describeBuiltInComponentFrame(type);
2309 }
2310
2311 switch (type) {
2312 case REACT_SUSPENSE_TYPE:
2313 return describeBuiltInComponentFrame('Suspense');
2314
2315 case REACT_SUSPENSE_LIST_TYPE:
2316 return describeBuiltInComponentFrame('SuspenseList');
2317 }
2318
2319 if (typeof type === 'object') {
2320 switch (type.$$typeof) {
2321 case REACT_FORWARD_REF_TYPE:
2322 return describeFunctionComponentFrame(type.render);
2323
2324 case REACT_MEMO_TYPE:
2325 // Memo may contain any component type so we recursively resolve it.
2326 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
2327
2328 case REACT_LAZY_TYPE:
2329 {
2330 var lazyComponent = type;
2331 var payload = lazyComponent._payload;
2332 var init = lazyComponent._init;
2333
2334 try {
2335 // Lazy may contain any component type so we recursively resolve it.
2336 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
2337 } catch (x) {}
2338 }
2339 }
2340 }
2341
2342 return '';
2343 }
2344
2345 var hasOwnProperty = Object.prototype.hasOwnProperty;
2346
2347 var loggedTypeFailures = {};
2348 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2349
2350 function setCurrentlyValidatingElement(element) {
2351 {
2352 if (element) {
2353 var owner = element._owner;
2354 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2355 ReactDebugCurrentFrame.setExtraStackFrame(stack);
2356 } else {
2357 ReactDebugCurrentFrame.setExtraStackFrame(null);
2358 }
2359 }
2360 }
2361
2362 function checkPropTypes(typeSpecs, values, location, componentName, element) {
2363 {
2364 // $FlowFixMe This is okay but Flow doesn't know it.
2365 var has = Function.call.bind(hasOwnProperty);
2366
2367 for (var typeSpecName in typeSpecs) {
2368 if (has(typeSpecs, typeSpecName)) {
2369 var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
2370 // fail the render phase where it didn't fail before. So we log it.
2371 // After these have been cleaned up, we'll let them throw.
2372
2373 try {
2374 // This is intentionally an invariant that gets caught. It's the same
2375 // behavior as without this statement except with a better message.
2376 if (typeof typeSpecs[typeSpecName] !== 'function') {
2377 // eslint-disable-next-line react-internal/prod-error-codes
2378 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`.');
2379 err.name = 'Invariant Violation';
2380 throw err;
2381 }
2382
2383 error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
2384 } catch (ex) {
2385 error$1 = ex;
2386 }
2387
2388 if (error$1 && !(error$1 instanceof Error)) {
2389 setCurrentlyValidatingElement(element);
2390
2391 error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
2392
2393 setCurrentlyValidatingElement(null);
2394 }
2395
2396 if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
2397 // Only monitor this failure once because there tends to be a lot of the
2398 // same error.
2399 loggedTypeFailures[error$1.message] = true;
2400 setCurrentlyValidatingElement(element);
2401
2402 error('Failed %s type: %s', location, error$1.message);
2403
2404 setCurrentlyValidatingElement(null);
2405 }
2406 }
2407 }
2408 }
2409 }
2410
2411 var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
2412
2413 function isArray(a) {
2414 return isArrayImpl(a);
2415 }
2416
2417 /*
2418 * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
2419 * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
2420 *
2421 * The functions in this module will throw an easier-to-understand,
2422 * easier-to-debug exception with a clear errors message message explaining the
2423 * problem. (Instead of a confusing exception thrown inside the implementation
2424 * of the `value` object).
2425 */
2426 // $FlowFixMe only called in DEV, so void return is not possible.
2427 function typeName(value) {
2428 {
2429 // toStringTag is needed for namespaced types like Temporal.Instant
2430 var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
2431 var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
2432 return type;
2433 }
2434 } // $FlowFixMe only called in DEV, so void return is not possible.
2435
2436
2437 function willCoercionThrow(value) {
2438 {
2439 try {
2440 testStringCoercion(value);
2441 return false;
2442 } catch (e) {
2443 return true;
2444 }
2445 }
2446 }
2447
2448 function testStringCoercion(value) {
2449 // If you ended up here by following an exception call stack, here's what's
2450 // happened: you supplied an object or symbol value to React (as a prop, key,
2451 // DOM attribute, CSS property, string ref, etc.) and when React tried to
2452 // coerce it to a string using `'' + value`, an exception was thrown.
2453 //
2454 // The most common types that will cause this exception are `Symbol` instances
2455 // and Temporal objects like `Temporal.Instant`. But any object that has a
2456 // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
2457 // exception. (Library authors do this to prevent users from using built-in
2458 // numeric operators like `+` or comparison operators like `>=` because custom
2459 // methods are needed to perform accurate arithmetic or comparison.)
2460 //
2461 // To fix the problem, coerce this object or symbol value to a string before
2462 // passing it to React. The most reliable way is usually `String(value)`.
2463 //
2464 // To find which value is throwing, check the browser or debugger console.
2465 // Before this exception was thrown, there should be `console.error` output
2466 // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
2467 // problem and how that type was used: key, atrribute, input value prop, etc.
2468 // In most cases, this console output also shows the component and its
2469 // ancestor components where the exception happened.
2470 //
2471 // eslint-disable-next-line react-internal/safe-string-coercion
2472 return '' + value;
2473 }
2474 function checkKeyStringCoercion(value) {
2475 {
2476 if (willCoercionThrow(value)) {
2477 error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
2478
2479 return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
2480 }
2481 }
2482 }
2483
2484 var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
2485 var RESERVED_PROPS = {
2486 key: true,
2487 ref: true,
2488 __self: true,
2489 __source: true
2490 };
2491 var specialPropKeyWarningShown;
2492 var specialPropRefWarningShown;
2493 var didWarnAboutStringRefs;
2494
2495 {
2496 didWarnAboutStringRefs = {};
2497 }
2498
2499 function hasValidRef(config) {
2500 {
2501 if (hasOwnProperty.call(config, 'ref')) {
2502 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
2503
2504 if (getter && getter.isReactWarning) {
2505 return false;
2506 }
2507 }
2508 }
2509
2510 return config.ref !== undefined;
2511 }
2512
2513 function hasValidKey(config) {
2514 {
2515 if (hasOwnProperty.call(config, 'key')) {
2516 var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
2517
2518 if (getter && getter.isReactWarning) {
2519 return false;
2520 }
2521 }
2522 }
2523
2524 return config.key !== undefined;
2525 }
2526
2527 function warnIfStringRefCannotBeAutoConverted(config, self) {
2528 {
2529 if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
2530 var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
2531
2532 if (!didWarnAboutStringRefs[componentName]) {
2533 error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
2534
2535 didWarnAboutStringRefs[componentName] = true;
2536 }
2537 }
2538 }
2539 }
2540
2541 function defineKeyPropWarningGetter(props, displayName) {
2542 {
2543 var warnAboutAccessingKey = function () {
2544 if (!specialPropKeyWarningShown) {
2545 specialPropKeyWarningShown = true;
2546
2547 error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
2548 }
2549 };
2550
2551 warnAboutAccessingKey.isReactWarning = true;
2552 Object.defineProperty(props, 'key', {
2553 get: warnAboutAccessingKey,
2554 configurable: true
2555 });
2556 }
2557 }
2558
2559 function defineRefPropWarningGetter(props, displayName) {
2560 {
2561 var warnAboutAccessingRef = function () {
2562 if (!specialPropRefWarningShown) {
2563 specialPropRefWarningShown = true;
2564
2565 error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
2566 }
2567 };
2568
2569 warnAboutAccessingRef.isReactWarning = true;
2570 Object.defineProperty(props, 'ref', {
2571 get: warnAboutAccessingRef,
2572 configurable: true
2573 });
2574 }
2575 }
2576 /**
2577 * Factory method to create a new React element. This no longer adheres to
2578 * the class pattern, so do not use new to call it. Also, instanceof check
2579 * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
2580 * if something is a React Element.
2581 *
2582 * @param {*} type
2583 * @param {*} props
2584 * @param {*} key
2585 * @param {string|object} ref
2586 * @param {*} owner
2587 * @param {*} self A *temporary* helper to detect places where `this` is
2588 * different from the `owner` when React.createElement is called, so that we
2589 * can warn. We want to get rid of owner and replace string `ref`s with arrow
2590 * functions, and as long as `this` and owner are the same, there will be no
2591 * change in behavior.
2592 * @param {*} source An annotation object (added by a transpiler or otherwise)
2593 * indicating filename, line number, and/or other information.
2594 * @internal
2595 */
2596
2597
2598 var ReactElement = function (type, key, ref, self, source, owner, props) {
2599 var element = {
2600 // This tag allows us to uniquely identify this as a React Element
2601 $$typeof: REACT_ELEMENT_TYPE,
2602 // Built-in properties that belong on the element
2603 type: type,
2604 key: key,
2605 ref: ref,
2606 props: props,
2607 // Record the component responsible for creating this element.
2608 _owner: owner
2609 };
2610
2611 {
2612 // The validation flag is currently mutative. We put it on
2613 // an external backing store so that we can freeze the whole object.
2614 // This can be replaced with a WeakMap once they are implemented in
2615 // commonly used development environments.
2616 element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
2617 // the validation flag non-enumerable (where possible, which should
2618 // include every environment we run tests in), so the test framework
2619 // ignores it.
2620
2621 Object.defineProperty(element._store, 'validated', {
2622 configurable: false,
2623 enumerable: false,
2624 writable: true,
2625 value: false
2626 }); // self and source are DEV only properties.
2627
2628 Object.defineProperty(element, '_self', {
2629 configurable: false,
2630 enumerable: false,
2631 writable: false,
2632 value: self
2633 }); // Two elements created in two different places should be considered
2634 // equal for testing purposes and therefore we hide it from enumeration.
2635
2636 Object.defineProperty(element, '_source', {
2637 configurable: false,
2638 enumerable: false,
2639 writable: false,
2640 value: source
2641 });
2642
2643 if (Object.freeze) {
2644 Object.freeze(element.props);
2645 Object.freeze(element);
2646 }
2647 }
2648
2649 return element;
2650 };
2651 /**
2652 * https://github.com/reactjs/rfcs/pull/107
2653 * @param {*} type
2654 * @param {object} props
2655 * @param {string} key
2656 */
2657
2658 function jsxDEV(type, config, maybeKey, source, self) {
2659 {
2660 var propName; // Reserved names are extracted
2661
2662 var props = {};
2663 var key = null;
2664 var ref = null; // Currently, key can be spread in as a prop. This causes a potential
2665 // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
2666 // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
2667 // but as an intermediary step, we will use jsxDEV for everything except
2668 // <div {...props} key="Hi" />, because we aren't currently able to tell if
2669 // key is explicitly declared to be undefined or not.
2670
2671 if (maybeKey !== undefined) {
2672 {
2673 checkKeyStringCoercion(maybeKey);
2674 }
2675
2676 key = '' + maybeKey;
2677 }
2678
2679 if (hasValidKey(config)) {
2680 {
2681 checkKeyStringCoercion(config.key);
2682 }
2683
2684 key = '' + config.key;
2685 }
2686
2687 if (hasValidRef(config)) {
2688 ref = config.ref;
2689 warnIfStringRefCannotBeAutoConverted(config, self);
2690 } // Remaining properties are added to a new props object
2691
2692
2693 for (propName in config) {
2694 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
2695 props[propName] = config[propName];
2696 }
2697 } // Resolve default props
2698
2699
2700 if (type && type.defaultProps) {
2701 var defaultProps = type.defaultProps;
2702
2703 for (propName in defaultProps) {
2704 if (props[propName] === undefined) {
2705 props[propName] = defaultProps[propName];
2706 }
2707 }
2708 }
2709
2710 if (key || ref) {
2711 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
2712
2713 if (key) {
2714 defineKeyPropWarningGetter(props, displayName);
2715 }
2716
2717 if (ref) {
2718 defineRefPropWarningGetter(props, displayName);
2719 }
2720 }
2721
2722 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
2723 }
2724 }
2725
2726 var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
2727 var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
2728
2729 function setCurrentlyValidatingElement$1(element) {
2730 {
2731 if (element) {
2732 var owner = element._owner;
2733 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2734 ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
2735 } else {
2736 ReactDebugCurrentFrame$1.setExtraStackFrame(null);
2737 }
2738 }
2739 }
2740
2741 var propTypesMisspellWarningShown;
2742
2743 {
2744 propTypesMisspellWarningShown = false;
2745 }
2746 /**
2747 * Verifies the object is a ReactElement.
2748 * See https://reactjs.org/docs/react-api.html#isvalidelement
2749 * @param {?object} object
2750 * @return {boolean} True if `object` is a ReactElement.
2751 * @final
2752 */
2753
2754
2755 function isValidElement(object) {
2756 {
2757 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
2758 }
2759 }
2760
2761 function getDeclarationErrorAddendum() {
2762 {
2763 if (ReactCurrentOwner$1.current) {
2764 var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
2765
2766 if (name) {
2767 return '\n\nCheck the render method of `' + name + '`.';
2768 }
2769 }
2770
2771 return '';
2772 }
2773 }
2774
2775 function getSourceInfoErrorAddendum(source) {
2776 {
2777 if (source !== undefined) {
2778 var fileName = source.fileName.replace(/^.*[\\\/]/, '');
2779 var lineNumber = source.lineNumber;
2780 return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
2781 }
2782
2783 return '';
2784 }
2785 }
2786 /**
2787 * Warn if there's no key explicitly set on dynamic arrays of children or
2788 * object keys are not valid. This allows us to keep track of children between
2789 * updates.
2790 */
2791
2792
2793 var ownerHasKeyUseWarning = {};
2794
2795 function getCurrentComponentErrorInfo(parentType) {
2796 {
2797 var info = getDeclarationErrorAddendum();
2798
2799 if (!info) {
2800 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
2801
2802 if (parentName) {
2803 info = "\n\nCheck the top-level render call using <" + parentName + ">.";
2804 }
2805 }
2806
2807 return info;
2808 }
2809 }
2810 /**
2811 * Warn if the element doesn't have an explicit key assigned to it.
2812 * This element is in an array. The array could grow and shrink or be
2813 * reordered. All children that haven't already been validated are required to
2814 * have a "key" property assigned to it. Error statuses are cached so a warning
2815 * will only be shown once.
2816 *
2817 * @internal
2818 * @param {ReactElement} element Element that requires a key.
2819 * @param {*} parentType element's parent's type.
2820 */
2821
2822
2823 function validateExplicitKey(element, parentType) {
2824 {
2825 if (!element._store || element._store.validated || element.key != null) {
2826 return;
2827 }
2828
2829 element._store.validated = true;
2830 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
2831
2832 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
2833 return;
2834 }
2835
2836 ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
2837 // property, it may be the creator of the child that's responsible for
2838 // assigning it a key.
2839
2840 var childOwner = '';
2841
2842 if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
2843 // Give the component that originally created this child.
2844 childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
2845 }
2846
2847 setCurrentlyValidatingElement$1(element);
2848
2849 error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
2850
2851 setCurrentlyValidatingElement$1(null);
2852 }
2853 }
2854 /**
2855 * Ensure that every element either is passed in a static location, in an
2856 * array with an explicit keys property defined, or in an object literal
2857 * with valid key property.
2858 *
2859 * @internal
2860 * @param {ReactNode} node Statically passed child of any type.
2861 * @param {*} parentType node's parent's type.
2862 */
2863
2864
2865 function validateChildKeys(node, parentType) {
2866 {
2867 if (typeof node !== 'object') {
2868 return;
2869 }
2870
2871 if (isArray(node)) {
2872 for (var i = 0; i < node.length; i++) {
2873 var child = node[i];
2874
2875 if (isValidElement(child)) {
2876 validateExplicitKey(child, parentType);
2877 }
2878 }
2879 } else if (isValidElement(node)) {
2880 // This element was passed in a valid location.
2881 if (node._store) {
2882 node._store.validated = true;
2883 }
2884 } else if (node) {
2885 var iteratorFn = getIteratorFn(node);
2886
2887 if (typeof iteratorFn === 'function') {
2888 // Entry iterators used to provide implicit keys,
2889 // but now we print a separate warning for them later.
2890 if (iteratorFn !== node.entries) {
2891 var iterator = iteratorFn.call(node);
2892 var step;
2893
2894 while (!(step = iterator.next()).done) {
2895 if (isValidElement(step.value)) {
2896 validateExplicitKey(step.value, parentType);
2897 }
2898 }
2899 }
2900 }
2901 }
2902 }
2903 }
2904 /**
2905 * Given an element, validate that its props follow the propTypes definition,
2906 * provided by the type.
2907 *
2908 * @param {ReactElement} element
2909 */
2910
2911
2912 function validatePropTypes(element) {
2913 {
2914 var type = element.type;
2915
2916 if (type === null || type === undefined || typeof type === 'string') {
2917 return;
2918 }
2919
2920 var propTypes;
2921
2922 if (typeof type === 'function') {
2923 propTypes = type.propTypes;
2924 } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
2925 // Inner props are checked in the reconciler.
2926 type.$$typeof === REACT_MEMO_TYPE)) {
2927 propTypes = type.propTypes;
2928 } else {
2929 return;
2930 }
2931
2932 if (propTypes) {
2933 // Intentionally inside to avoid triggering lazy initializers:
2934 var name = getComponentNameFromType(type);
2935 checkPropTypes(propTypes, element.props, 'prop', name, element);
2936 } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
2937 propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
2938
2939 var _name = getComponentNameFromType(type);
2940
2941 error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
2942 }
2943
2944 if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
2945 error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
2946 }
2947 }
2948 }
2949 /**
2950 * Given a fragment, validate that it can only be provided with fragment props
2951 * @param {ReactElement} fragment
2952 */
2953
2954
2955 function validateFragmentProps(fragment) {
2956 {
2957 var keys = Object.keys(fragment.props);
2958
2959 for (var i = 0; i < keys.length; i++) {
2960 var key = keys[i];
2961
2962 if (key !== 'children' && key !== 'key') {
2963 setCurrentlyValidatingElement$1(fragment);
2964
2965 error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
2966
2967 setCurrentlyValidatingElement$1(null);
2968 break;
2969 }
2970 }
2971
2972 if (fragment.ref !== null) {
2973 setCurrentlyValidatingElement$1(fragment);
2974
2975 error('Invalid attribute `ref` supplied to `React.Fragment`.');
2976
2977 setCurrentlyValidatingElement$1(null);
2978 }
2979 }
2980 }
2981
2982 var didWarnAboutKeySpread = {};
2983 function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
2984 {
2985 var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
2986 // succeed and there will likely be errors in render.
2987
2988 if (!validType) {
2989 var info = '';
2990
2991 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
2992 info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
2993 }
2994
2995 var sourceInfo = getSourceInfoErrorAddendum(source);
2996
2997 if (sourceInfo) {
2998 info += sourceInfo;
2999 } else {
3000 info += getDeclarationErrorAddendum();
3001 }
3002
3003 var typeString;
3004
3005 if (type === null) {
3006 typeString = 'null';
3007 } else if (isArray(type)) {
3008 typeString = 'array';
3009 } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
3010 typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
3011 info = ' Did you accidentally export a JSX literal instead of a component?';
3012 } else {
3013 typeString = typeof type;
3014 }
3015
3016 error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
3017 }
3018
3019 var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
3020 // TODO: Drop this when these are no longer allowed as the type argument.
3021
3022 if (element == null) {
3023 return element;
3024 } // Skip key warning if the type isn't valid since our key validation logic
3025 // doesn't expect a non-string/function type and can throw confusing errors.
3026 // We don't want exception behavior to differ between dev and prod.
3027 // (Rendering will throw with a helpful message and as soon as the type is
3028 // fixed, the key warnings will appear.)
3029
3030
3031 if (validType) {
3032 var children = props.children;
3033
3034 if (children !== undefined) {
3035 if (isStaticChildren) {
3036 if (isArray(children)) {
3037 for (var i = 0; i < children.length; i++) {
3038 validateChildKeys(children[i], type);
3039 }
3040
3041 if (Object.freeze) {
3042 Object.freeze(children);
3043 }
3044 } else {
3045 error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
3046 }
3047 } else {
3048 validateChildKeys(children, type);
3049 }
3050 }
3051 }
3052
3053 {
3054 if (hasOwnProperty.call(props, 'key')) {
3055 var componentName = getComponentNameFromType(type);
3056 var keys = Object.keys(props).filter(function (k) {
3057 return k !== 'key';
3058 });
3059 var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
3060
3061 if (!didWarnAboutKeySpread[componentName + beforeExample]) {
3062 var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
3063
3064 error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
3065
3066 didWarnAboutKeySpread[componentName + beforeExample] = true;
3067 }
3068 }
3069 }
3070
3071 if (type === REACT_FRAGMENT_TYPE) {
3072 validateFragmentProps(element);
3073 } else {
3074 validatePropTypes(element);
3075 }
3076
3077 return element;
3078 }
3079 } // These two functions exist to still get child warnings in dev
3080 // even with the prod transform. This means that jsxDEV is purely
3081 // opt-in behavior for better messages but that we won't stop
3082 // giving you warnings if you use production apis.
3083
3084 function jsxWithValidationStatic(type, props, key) {
3085 {
3086 return jsxWithValidation(type, props, key, true);
3087 }
3088 }
3089 function jsxWithValidationDynamic(type, props, key) {
3090 {
3091 return jsxWithValidation(type, props, key, false);
3092 }
3093 }
3094
3095 var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
3096 // for now we can ship identical prod functions
3097
3098 var jsxs = jsxWithValidationStatic ;
3099
3100 exports.Fragment = REACT_FRAGMENT_TYPE;
3101 exports.jsx = jsx;
3102 exports.jsxs = jsxs;
3103 })();
3104 }
3105
3106
3107 /***/ }),
3108
3109 /***/ "../node_modules/react/jsx-runtime.js":
3110 /*!********************************************!*\
3111 !*** ../node_modules/react/jsx-runtime.js ***!
3112 \********************************************/
3113 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3114
3115 "use strict";
3116
3117
3118 if (false) {} else {
3119 module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "../node_modules/react/cjs/react-jsx-runtime.development.js");
3120 }
3121
3122
3123 /***/ }),
3124
3125 /***/ "react":
3126 /*!************************!*\
3127 !*** external "React" ***!
3128 \************************/
3129 /***/ ((module) => {
3130
3131 "use strict";
3132 module.exports = React;
3133
3134 /***/ }),
3135
3136 /***/ "@elementor/ui":
3137 /*!*********************************!*\
3138 !*** external "elementorV2.ui" ***!
3139 \*********************************/
3140 /***/ ((module) => {
3141
3142 "use strict";
3143 module.exports = elementorV2.ui;
3144
3145 /***/ }),
3146
3147 /***/ "@wordpress/i18n":
3148 /*!**************************!*\
3149 !*** external "wp.i18n" ***!
3150 \**************************/
3151 /***/ ((module) => {
3152
3153 "use strict";
3154 module.exports = wp.i18n;
3155
3156 /***/ }),
3157
3158 /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
3159 /*!******************************************************************!*\
3160 !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
3161 \******************************************************************/
3162 /***/ ((module) => {
3163
3164 function _arrayLikeToArray(r, a) {
3165 (null == a || a > r.length) && (a = r.length);
3166 for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
3167 return n;
3168 }
3169 module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
3170
3171 /***/ }),
3172
3173 /***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
3174 /*!****************************************************************!*\
3175 !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
3176 \****************************************************************/
3177 /***/ ((module) => {
3178
3179 function _arrayWithHoles(r) {
3180 if (Array.isArray(r)) return r;
3181 }
3182 module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
3183
3184 /***/ }),
3185
3186 /***/ "../node_modules/@babel/runtime/helpers/extends.js":
3187 /*!*********************************************************!*\
3188 !*** ../node_modules/@babel/runtime/helpers/extends.js ***!
3189 \*********************************************************/
3190 /***/ ((module) => {
3191
3192 function _extends() {
3193 return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {
3194 for (var e = 1; e < arguments.length; e++) {
3195 var t = arguments[e];
3196 for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
3197 }
3198 return n;
3199 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments);
3200 }
3201 module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
3202
3203 /***/ }),
3204
3205 /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
3206 /*!***********************************************************************!*\
3207 !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
3208 \***********************************************************************/
3209 /***/ ((module) => {
3210
3211 function _interopRequireDefault(e) {
3212 return e && e.__esModule ? e : {
3213 "default": e
3214 };
3215 }
3216 module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
3217
3218 /***/ }),
3219
3220 /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
3221 /*!**********************************************************************!*\
3222 !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
3223 \**********************************************************************/
3224 /***/ ((module) => {
3225
3226 function _iterableToArrayLimit(r, l) {
3227 var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
3228 if (null != t) {
3229 var e,
3230 n,
3231 i,
3232 u,
3233 a = [],
3234 f = !0,
3235 o = !1;
3236 try {
3237 if (i = (t = t.call(r)).next, 0 === l) {
3238 if (Object(t) !== t) return;
3239 f = !1;
3240 } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
3241 } catch (r) {
3242 o = !0, n = r;
3243 } finally {
3244 try {
3245 if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
3246 } finally {
3247 if (o) throw n;
3248 }
3249 }
3250 return a;
3251 }
3252 }
3253 module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
3254
3255 /***/ }),
3256
3257 /***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
3258 /*!*****************************************************************!*\
3259 !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
3260 \*****************************************************************/
3261 /***/ ((module) => {
3262
3263 function _nonIterableRest() {
3264 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3265 }
3266 module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
3267
3268 /***/ }),
3269
3270 /***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
3271 /*!***************************************************************!*\
3272 !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
3273 \***************************************************************/
3274 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3275
3276 var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
3277 var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
3278 var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
3279 var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
3280 function _slicedToArray(r, e) {
3281 return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
3282 }
3283 module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
3284
3285 /***/ }),
3286
3287 /***/ "../node_modules/@babel/runtime/helpers/typeof.js":
3288 /*!********************************************************!*\
3289 !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
3290 \********************************************************/
3291 /***/ ((module) => {
3292
3293 function _typeof(o) {
3294 "@babel/helpers - typeof";
3295
3296 return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
3297 return typeof o;
3298 } : function (o) {
3299 return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
3300 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
3301 }
3302 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
3303
3304 /***/ }),
3305
3306 /***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
3307 /*!****************************************************************************!*\
3308 !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
3309 \****************************************************************************/
3310 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3311
3312 var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
3313 function _unsupportedIterableToArray(r, a) {
3314 if (r) {
3315 if ("string" == typeof r) return arrayLikeToArray(r, a);
3316 var t = {}.toString.call(r).slice(8, -1);
3317 return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;
3318 }
3319 }
3320 module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
3321
3322 /***/ }),
3323
3324 /***/ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs":
3325 /*!**************************************************************************!*\
3326 !*** ../node_modules/@tanstack/query-core/build/modern/focusManager.cjs ***!
3327 \**************************************************************************/
3328 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3329
3330 "use strict";
3331
3332 var __defProp = Object.defineProperty;
3333 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3334 var __getOwnPropNames = Object.getOwnPropertyNames;
3335 var __hasOwnProp = Object.prototype.hasOwnProperty;
3336 var __export = (target, all) => {
3337 for (var name in all)
3338 __defProp(target, name, { get: all[name], enumerable: true });
3339 };
3340 var __copyProps = (to, from, except, desc) => {
3341 if (from && typeof from === "object" || typeof from === "function") {
3342 for (let key of __getOwnPropNames(from))
3343 if (!__hasOwnProp.call(to, key) && key !== except)
3344 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3345 }
3346 return to;
3347 };
3348 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3349
3350 // src/focusManager.ts
3351 var focusManager_exports = {};
3352 __export(focusManager_exports, {
3353 FocusManager: () => FocusManager,
3354 focusManager: () => focusManager
3355 });
3356 module.exports = __toCommonJS(focusManager_exports);
3357 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
3358 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3359 var FocusManager = class extends import_subscribable.Subscribable {
3360 #focused;
3361 #cleanup;
3362 #setup;
3363 constructor() {
3364 super();
3365 this.#setup = (onFocus) => {
3366 if (!import_utils.isServer && window.addEventListener) {
3367 const listener = () => onFocus();
3368 window.addEventListener("visibilitychange", listener, false);
3369 return () => {
3370 window.removeEventListener("visibilitychange", listener);
3371 };
3372 }
3373 return;
3374 };
3375 }
3376 onSubscribe() {
3377 if (!this.#cleanup) {
3378 this.setEventListener(this.#setup);
3379 }
3380 }
3381 onUnsubscribe() {
3382 if (!this.hasListeners()) {
3383 this.#cleanup?.();
3384 this.#cleanup = void 0;
3385 }
3386 }
3387 setEventListener(setup) {
3388 this.#setup = setup;
3389 this.#cleanup?.();
3390 this.#cleanup = setup((focused) => {
3391 if (typeof focused === "boolean") {
3392 this.setFocused(focused);
3393 } else {
3394 this.onFocus();
3395 }
3396 });
3397 }
3398 setFocused(focused) {
3399 const changed = this.#focused !== focused;
3400 if (changed) {
3401 this.#focused = focused;
3402 this.onFocus();
3403 }
3404 }
3405 onFocus() {
3406 const isFocused = this.isFocused();
3407 this.listeners.forEach((listener) => {
3408 listener(isFocused);
3409 });
3410 }
3411 isFocused() {
3412 if (typeof this.#focused === "boolean") {
3413 return this.#focused;
3414 }
3415 return globalThis.document?.visibilityState !== "hidden";
3416 }
3417 };
3418 var focusManager = new FocusManager();
3419 // Annotate the CommonJS export names for ESM import in node:
3420 0 && (0);
3421 //# sourceMappingURL=focusManager.cjs.map
3422
3423 /***/ }),
3424
3425 /***/ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs":
3426 /*!***********************************************************************!*\
3427 !*** ../node_modules/@tanstack/query-core/build/modern/hydration.cjs ***!
3428 \***********************************************************************/
3429 /***/ ((module) => {
3430
3431 "use strict";
3432
3433 var __defProp = Object.defineProperty;
3434 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3435 var __getOwnPropNames = Object.getOwnPropertyNames;
3436 var __hasOwnProp = Object.prototype.hasOwnProperty;
3437 var __export = (target, all) => {
3438 for (var name in all)
3439 __defProp(target, name, { get: all[name], enumerable: true });
3440 };
3441 var __copyProps = (to, from, except, desc) => {
3442 if (from && typeof from === "object" || typeof from === "function") {
3443 for (let key of __getOwnPropNames(from))
3444 if (!__hasOwnProp.call(to, key) && key !== except)
3445 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3446 }
3447 return to;
3448 };
3449 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3450
3451 // src/hydration.ts
3452 var hydration_exports = {};
3453 __export(hydration_exports, {
3454 defaultShouldDehydrateMutation: () => defaultShouldDehydrateMutation,
3455 defaultShouldDehydrateQuery: () => defaultShouldDehydrateQuery,
3456 dehydrate: () => dehydrate,
3457 hydrate: () => hydrate
3458 });
3459 module.exports = __toCommonJS(hydration_exports);
3460 function defaultTransformerFn(data) {
3461 return data;
3462 }
3463 function dehydrateMutation(mutation) {
3464 return {
3465 mutationKey: mutation.options.mutationKey,
3466 state: mutation.state,
3467 ...mutation.options.scope && { scope: mutation.options.scope },
3468 ...mutation.meta && { meta: mutation.meta }
3469 };
3470 }
3471 function dehydrateQuery(query, serializeData) {
3472 return {
3473 state: {
3474 ...query.state,
3475 ...query.state.data !== void 0 && {
3476 data: serializeData(query.state.data)
3477 }
3478 },
3479 queryKey: query.queryKey,
3480 queryHash: query.queryHash,
3481 ...query.state.status === "pending" && {
3482 promise: query.promise?.then(serializeData).catch((error) => {
3483 if (true) {
3484 console.error(
3485 `A query that was dehydrated as pending ended up rejecting. [${query.queryHash}]: ${error}; The error will be redacted in production builds`
3486 );
3487 }
3488 return Promise.reject(new Error("redacted"));
3489 })
3490 },
3491 ...query.meta && { meta: query.meta }
3492 };
3493 }
3494 function defaultShouldDehydrateMutation(mutation) {
3495 return mutation.state.isPaused;
3496 }
3497 function defaultShouldDehydrateQuery(query) {
3498 return query.state.status === "success";
3499 }
3500 function dehydrate(client, options = {}) {
3501 const filterMutation = options.shouldDehydrateMutation ?? client.getDefaultOptions().dehydrate?.shouldDehydrateMutation ?? defaultShouldDehydrateMutation;
3502 const mutations = client.getMutationCache().getAll().flatMap(
3503 (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : []
3504 );
3505 const filterQuery = options.shouldDehydrateQuery ?? client.getDefaultOptions().dehydrate?.shouldDehydrateQuery ?? defaultShouldDehydrateQuery;
3506 const serializeData = options.serializeData ?? client.getDefaultOptions().dehydrate?.serializeData ?? defaultTransformerFn;
3507 const queries = client.getQueryCache().getAll().flatMap(
3508 (query) => filterQuery(query) ? [dehydrateQuery(query, serializeData)] : []
3509 );
3510 return { mutations, queries };
3511 }
3512 function hydrate(client, dehydratedState, options) {
3513 if (typeof dehydratedState !== "object" || dehydratedState === null) {
3514 return;
3515 }
3516 const mutationCache = client.getMutationCache();
3517 const queryCache = client.getQueryCache();
3518 const deserializeData = options?.defaultOptions?.deserializeData ?? client.getDefaultOptions().hydrate?.deserializeData ?? defaultTransformerFn;
3519 const mutations = dehydratedState.mutations || [];
3520 const queries = dehydratedState.queries || [];
3521 mutations.forEach(({ state, ...mutationOptions }) => {
3522 mutationCache.build(
3523 client,
3524 {
3525 ...client.getDefaultOptions().hydrate?.mutations,
3526 ...options?.defaultOptions?.mutations,
3527 ...mutationOptions
3528 },
3529 state
3530 );
3531 });
3532 queries.forEach(({ queryKey, state, queryHash, meta, promise }) => {
3533 let query = queryCache.get(queryHash);
3534 const data = state.data === void 0 ? state.data : deserializeData(state.data);
3535 if (query) {
3536 if (query.state.dataUpdatedAt < state.dataUpdatedAt) {
3537 const { fetchStatus: _ignored, ...serializedState } = state;
3538 query.setState({
3539 ...serializedState,
3540 data
3541 });
3542 }
3543 } else {
3544 query = queryCache.build(
3545 client,
3546 {
3547 ...client.getDefaultOptions().hydrate?.queries,
3548 ...options?.defaultOptions?.queries,
3549 queryKey,
3550 queryHash,
3551 meta
3552 },
3553 // Reset fetch status to idle to avoid
3554 // query being stuck in fetching state upon hydration
3555 {
3556 ...state,
3557 data,
3558 fetchStatus: "idle"
3559 }
3560 );
3561 }
3562 if (promise) {
3563 const initialPromise = Promise.resolve(promise).then(deserializeData);
3564 void query.fetch(void 0, { initialPromise });
3565 }
3566 });
3567 }
3568 // Annotate the CommonJS export names for ESM import in node:
3569 0 && (0);
3570 //# sourceMappingURL=hydration.cjs.map
3571
3572 /***/ }),
3573
3574 /***/ "../node_modules/@tanstack/query-core/build/modern/index.cjs":
3575 /*!*******************************************************************!*\
3576 !*** ../node_modules/@tanstack/query-core/build/modern/index.cjs ***!
3577 \*******************************************************************/
3578 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3579
3580 "use strict";
3581
3582 var __defProp = Object.defineProperty;
3583 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3584 var __getOwnPropNames = Object.getOwnPropertyNames;
3585 var __hasOwnProp = Object.prototype.hasOwnProperty;
3586 var __export = (target, all) => {
3587 for (var name in all)
3588 __defProp(target, name, { get: all[name], enumerable: true });
3589 };
3590 var __copyProps = (to, from, except, desc) => {
3591 if (from && typeof from === "object" || typeof from === "function") {
3592 for (let key of __getOwnPropNames(from))
3593 if (!__hasOwnProp.call(to, key) && key !== except)
3594 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3595 }
3596 return to;
3597 };
3598 var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
3599 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3600
3601 // src/index.ts
3602 var src_exports = {};
3603 __export(src_exports, {
3604 CancelledError: () => import_retryer.CancelledError,
3605 InfiniteQueryObserver: () => import_infiniteQueryObserver.InfiniteQueryObserver,
3606 Mutation: () => import_mutation.Mutation,
3607 MutationCache: () => import_mutationCache.MutationCache,
3608 MutationObserver: () => import_mutationObserver.MutationObserver,
3609 QueriesObserver: () => import_queriesObserver.QueriesObserver,
3610 Query: () => import_query.Query,
3611 QueryCache: () => import_queryCache.QueryCache,
3612 QueryClient: () => import_queryClient.QueryClient,
3613 QueryObserver: () => import_queryObserver.QueryObserver,
3614 defaultShouldDehydrateMutation: () => import_hydration.defaultShouldDehydrateMutation,
3615 defaultShouldDehydrateQuery: () => import_hydration.defaultShouldDehydrateQuery,
3616 dehydrate: () => import_hydration.dehydrate,
3617 focusManager: () => import_focusManager.focusManager,
3618 hashKey: () => import_utils.hashKey,
3619 hydrate: () => import_hydration.hydrate,
3620 isCancelledError: () => import_retryer2.isCancelledError,
3621 isServer: () => import_utils.isServer,
3622 keepPreviousData: () => import_utils.keepPreviousData,
3623 matchMutation: () => import_utils.matchMutation,
3624 matchQuery: () => import_utils.matchQuery,
3625 notifyManager: () => import_notifyManager.notifyManager,
3626 onlineManager: () => import_onlineManager.onlineManager,
3627 replaceEqualDeep: () => import_utils.replaceEqualDeep,
3628 skipToken: () => import_utils.skipToken
3629 });
3630 module.exports = __toCommonJS(src_exports);
3631 var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
3632 var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs");
3633 var import_queryClient = __webpack_require__(/*! ./queryClient.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs");
3634 var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
3635 var import_queriesObserver = __webpack_require__(/*! ./queriesObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs");
3636 var import_infiniteQueryObserver = __webpack_require__(/*! ./infiniteQueryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs");
3637 var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs");
3638 var import_mutationObserver = __webpack_require__(/*! ./mutationObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs");
3639 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
3640 var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
3641 var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
3642 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3643 var import_retryer2 = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
3644 var import_hydration = __webpack_require__(/*! ./hydration.cjs */ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs");
3645 __reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/query-core/build/modern/types.cjs"), module.exports);
3646 var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs");
3647 var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs");
3648 // Annotate the CommonJS export names for ESM import in node:
3649 0 && (0);
3650 //# sourceMappingURL=index.cjs.map
3651
3652 /***/ }),
3653
3654 /***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs":
3655 /*!***********************************************************************************!*\
3656 !*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs ***!
3657 \***********************************************************************************/
3658 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3659
3660 "use strict";
3661
3662 var __defProp = Object.defineProperty;
3663 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3664 var __getOwnPropNames = Object.getOwnPropertyNames;
3665 var __hasOwnProp = Object.prototype.hasOwnProperty;
3666 var __export = (target, all) => {
3667 for (var name in all)
3668 __defProp(target, name, { get: all[name], enumerable: true });
3669 };
3670 var __copyProps = (to, from, except, desc) => {
3671 if (from && typeof from === "object" || typeof from === "function") {
3672 for (let key of __getOwnPropNames(from))
3673 if (!__hasOwnProp.call(to, key) && key !== except)
3674 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3675 }
3676 return to;
3677 };
3678 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3679
3680 // src/infiniteQueryBehavior.ts
3681 var infiniteQueryBehavior_exports = {};
3682 __export(infiniteQueryBehavior_exports, {
3683 hasNextPage: () => hasNextPage,
3684 hasPreviousPage: () => hasPreviousPage,
3685 infiniteQueryBehavior: () => infiniteQueryBehavior
3686 });
3687 module.exports = __toCommonJS(infiniteQueryBehavior_exports);
3688 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3689 function infiniteQueryBehavior(pages) {
3690 return {
3691 onFetch: (context, query) => {
3692 const options = context.options;
3693 const direction = context.fetchOptions?.meta?.fetchMore?.direction;
3694 const oldPages = context.state.data?.pages || [];
3695 const oldPageParams = context.state.data?.pageParams || [];
3696 let result = { pages: [], pageParams: [] };
3697 let currentPage = 0;
3698 const fetchFn = async () => {
3699 let cancelled = false;
3700 const addSignalProperty = (object) => {
3701 Object.defineProperty(object, "signal", {
3702 enumerable: true,
3703 get: () => {
3704 if (context.signal.aborted) {
3705 cancelled = true;
3706 } else {
3707 context.signal.addEventListener("abort", () => {
3708 cancelled = true;
3709 });
3710 }
3711 return context.signal;
3712 }
3713 });
3714 };
3715 const queryFn = (0, import_utils.ensureQueryFn)(context.options, context.fetchOptions);
3716 const fetchPage = async (data, param, previous) => {
3717 if (cancelled) {
3718 return Promise.reject();
3719 }
3720 if (param == null && data.pages.length) {
3721 return Promise.resolve(data);
3722 }
3723 const queryFnContext = {
3724 queryKey: context.queryKey,
3725 pageParam: param,
3726 direction: previous ? "backward" : "forward",
3727 meta: context.options.meta
3728 };
3729 addSignalProperty(queryFnContext);
3730 const page = await queryFn(
3731 queryFnContext
3732 );
3733 const { maxPages } = context.options;
3734 const addTo = previous ? import_utils.addToStart : import_utils.addToEnd;
3735 return {
3736 pages: addTo(data.pages, page, maxPages),
3737 pageParams: addTo(data.pageParams, param, maxPages)
3738 };
3739 };
3740 if (direction && oldPages.length) {
3741 const previous = direction === "backward";
3742 const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;
3743 const oldData = {
3744 pages: oldPages,
3745 pageParams: oldPageParams
3746 };
3747 const param = pageParamFn(options, oldData);
3748 result = await fetchPage(oldData, param, previous);
3749 } else {
3750 const remainingPages = pages ?? oldPages.length;
3751 do {
3752 const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);
3753 if (currentPage > 0 && param == null) {
3754 break;
3755 }
3756 result = await fetchPage(result, param);
3757 currentPage++;
3758 } while (currentPage < remainingPages);
3759 }
3760 return result;
3761 };
3762 if (context.options.persister) {
3763 context.fetchFn = () => {
3764 return context.options.persister?.(
3765 fetchFn,
3766 {
3767 queryKey: context.queryKey,
3768 meta: context.options.meta,
3769 signal: context.signal
3770 },
3771 query
3772 );
3773 };
3774 } else {
3775 context.fetchFn = fetchFn;
3776 }
3777 }
3778 };
3779 }
3780 function getNextPageParam(options, { pages, pageParams }) {
3781 const lastIndex = pages.length - 1;
3782 return pages.length > 0 ? options.getNextPageParam(
3783 pages[lastIndex],
3784 pages,
3785 pageParams[lastIndex],
3786 pageParams
3787 ) : void 0;
3788 }
3789 function getPreviousPageParam(options, { pages, pageParams }) {
3790 return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;
3791 }
3792 function hasNextPage(options, data) {
3793 if (!data)
3794 return false;
3795 return getNextPageParam(options, data) != null;
3796 }
3797 function hasPreviousPage(options, data) {
3798 if (!data || !options.getPreviousPageParam)
3799 return false;
3800 return getPreviousPageParam(options, data) != null;
3801 }
3802 // Annotate the CommonJS export names for ESM import in node:
3803 0 && (0);
3804 //# sourceMappingURL=infiniteQueryBehavior.cjs.map
3805
3806 /***/ }),
3807
3808 /***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs":
3809 /*!***********************************************************************************!*\
3810 !*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs ***!
3811 \***********************************************************************************/
3812 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3813
3814 "use strict";
3815
3816 var __defProp = Object.defineProperty;
3817 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3818 var __getOwnPropNames = Object.getOwnPropertyNames;
3819 var __hasOwnProp = Object.prototype.hasOwnProperty;
3820 var __export = (target, all) => {
3821 for (var name in all)
3822 __defProp(target, name, { get: all[name], enumerable: true });
3823 };
3824 var __copyProps = (to, from, except, desc) => {
3825 if (from && typeof from === "object" || typeof from === "function") {
3826 for (let key of __getOwnPropNames(from))
3827 if (!__hasOwnProp.call(to, key) && key !== except)
3828 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3829 }
3830 return to;
3831 };
3832 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3833
3834 // src/infiniteQueryObserver.ts
3835 var infiniteQueryObserver_exports = {};
3836 __export(infiniteQueryObserver_exports, {
3837 InfiniteQueryObserver: () => InfiniteQueryObserver
3838 });
3839 module.exports = __toCommonJS(infiniteQueryObserver_exports);
3840 var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
3841 var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs");
3842 var InfiniteQueryObserver = class extends import_queryObserver.QueryObserver {
3843 constructor(client, options) {
3844 super(client, options);
3845 }
3846 bindMethods() {
3847 super.bindMethods();
3848 this.fetchNextPage = this.fetchNextPage.bind(this);
3849 this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
3850 }
3851 setOptions(options, notifyOptions) {
3852 super.setOptions(
3853 {
3854 ...options,
3855 behavior: (0, import_infiniteQueryBehavior.infiniteQueryBehavior)()
3856 },
3857 notifyOptions
3858 );
3859 }
3860 getOptimisticResult(options) {
3861 options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)();
3862 return super.getOptimisticResult(options);
3863 }
3864 fetchNextPage(options) {
3865 return this.fetch({
3866 ...options,
3867 meta: {
3868 fetchMore: { direction: "forward" }
3869 }
3870 });
3871 }
3872 fetchPreviousPage(options) {
3873 return this.fetch({
3874 ...options,
3875 meta: {
3876 fetchMore: { direction: "backward" }
3877 }
3878 });
3879 }
3880 createResult(query, options) {
3881 const { state } = query;
3882 const parentResult = super.createResult(query, options);
3883 const { isFetching, isRefetching, isError, isRefetchError } = parentResult;
3884 const fetchDirection = state.fetchMeta?.fetchMore?.direction;
3885 const isFetchNextPageError = isError && fetchDirection === "forward";
3886 const isFetchingNextPage = isFetching && fetchDirection === "forward";
3887 const isFetchPreviousPageError = isError && fetchDirection === "backward";
3888 const isFetchingPreviousPage = isFetching && fetchDirection === "backward";
3889 const result = {
3890 ...parentResult,
3891 fetchNextPage: this.fetchNextPage,
3892 fetchPreviousPage: this.fetchPreviousPage,
3893 hasNextPage: (0, import_infiniteQueryBehavior.hasNextPage)(options, state.data),
3894 hasPreviousPage: (0, import_infiniteQueryBehavior.hasPreviousPage)(options, state.data),
3895 isFetchNextPageError,
3896 isFetchingNextPage,
3897 isFetchPreviousPageError,
3898 isFetchingPreviousPage,
3899 isRefetchError: isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError,
3900 isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage
3901 };
3902 return result;
3903 }
3904 };
3905 // Annotate the CommonJS export names for ESM import in node:
3906 0 && (0);
3907 //# sourceMappingURL=infiniteQueryObserver.cjs.map
3908
3909 /***/ }),
3910
3911 /***/ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs":
3912 /*!**********************************************************************!*\
3913 !*** ../node_modules/@tanstack/query-core/build/modern/mutation.cjs ***!
3914 \**********************************************************************/
3915 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3916
3917 "use strict";
3918
3919 var __defProp = Object.defineProperty;
3920 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3921 var __getOwnPropNames = Object.getOwnPropertyNames;
3922 var __hasOwnProp = Object.prototype.hasOwnProperty;
3923 var __export = (target, all) => {
3924 for (var name in all)
3925 __defProp(target, name, { get: all[name], enumerable: true });
3926 };
3927 var __copyProps = (to, from, except, desc) => {
3928 if (from && typeof from === "object" || typeof from === "function") {
3929 for (let key of __getOwnPropNames(from))
3930 if (!__hasOwnProp.call(to, key) && key !== except)
3931 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3932 }
3933 return to;
3934 };
3935 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3936
3937 // src/mutation.ts
3938 var mutation_exports = {};
3939 __export(mutation_exports, {
3940 Mutation: () => Mutation,
3941 getDefaultState: () => getDefaultState
3942 });
3943 module.exports = __toCommonJS(mutation_exports);
3944 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
3945 var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs");
3946 var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
3947 var Mutation = class extends import_removable.Removable {
3948 #observers;
3949 #mutationCache;
3950 #retryer;
3951 constructor(config) {
3952 super();
3953 this.mutationId = config.mutationId;
3954 this.#mutationCache = config.mutationCache;
3955 this.#observers = [];
3956 this.state = config.state || getDefaultState();
3957 this.setOptions(config.options);
3958 this.scheduleGc();
3959 }
3960 setOptions(options) {
3961 this.options = options;
3962 this.updateGcTime(this.options.gcTime);
3963 }
3964 get meta() {
3965 return this.options.meta;
3966 }
3967 addObserver(observer) {
3968 if (!this.#observers.includes(observer)) {
3969 this.#observers.push(observer);
3970 this.clearGcTimeout();
3971 this.#mutationCache.notify({
3972 type: "observerAdded",
3973 mutation: this,
3974 observer
3975 });
3976 }
3977 }
3978 removeObserver(observer) {
3979 this.#observers = this.#observers.filter((x) => x !== observer);
3980 this.scheduleGc();
3981 this.#mutationCache.notify({
3982 type: "observerRemoved",
3983 mutation: this,
3984 observer
3985 });
3986 }
3987 optionalRemove() {
3988 if (!this.#observers.length) {
3989 if (this.state.status === "pending") {
3990 this.scheduleGc();
3991 } else {
3992 this.#mutationCache.remove(this);
3993 }
3994 }
3995 }
3996 continue() {
3997 return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
3998 this.execute(this.state.variables);
3999 }
4000 async execute(variables) {
4001 this.#retryer = (0, import_retryer.createRetryer)({
4002 fn: () => {
4003 if (!this.options.mutationFn) {
4004 return Promise.reject(new Error("No mutationFn found"));
4005 }
4006 return this.options.mutationFn(variables);
4007 },
4008 onFail: (failureCount, error) => {
4009 this.#dispatch({ type: "failed", failureCount, error });
4010 },
4011 onPause: () => {
4012 this.#dispatch({ type: "pause" });
4013 },
4014 onContinue: () => {
4015 this.#dispatch({ type: "continue" });
4016 },
4017 retry: this.options.retry ?? 0,
4018 retryDelay: this.options.retryDelay,
4019 networkMode: this.options.networkMode,
4020 canRun: () => this.#mutationCache.canRun(this)
4021 });
4022 const restored = this.state.status === "pending";
4023 const isPaused = !this.#retryer.canStart();
4024 try {
4025 if (!restored) {
4026 this.#dispatch({ type: "pending", variables, isPaused });
4027 await this.#mutationCache.config.onMutate?.(
4028 variables,
4029 this
4030 );
4031 const context = await this.options.onMutate?.(variables);
4032 if (context !== this.state.context) {
4033 this.#dispatch({
4034 type: "pending",
4035 context,
4036 variables,
4037 isPaused
4038 });
4039 }
4040 }
4041 const data = await this.#retryer.start();
4042 await this.#mutationCache.config.onSuccess?.(
4043 data,
4044 variables,
4045 this.state.context,
4046 this
4047 );
4048 await this.options.onSuccess?.(data, variables, this.state.context);
4049 await this.#mutationCache.config.onSettled?.(
4050 data,
4051 null,
4052 this.state.variables,
4053 this.state.context,
4054 this
4055 );
4056 await this.options.onSettled?.(data, null, variables, this.state.context);
4057 this.#dispatch({ type: "success", data });
4058 return data;
4059 } catch (error) {
4060 try {
4061 await this.#mutationCache.config.onError?.(
4062 error,
4063 variables,
4064 this.state.context,
4065 this
4066 );
4067 await this.options.onError?.(
4068 error,
4069 variables,
4070 this.state.context
4071 );
4072 await this.#mutationCache.config.onSettled?.(
4073 void 0,
4074 error,
4075 this.state.variables,
4076 this.state.context,
4077 this
4078 );
4079 await this.options.onSettled?.(
4080 void 0,
4081 error,
4082 variables,
4083 this.state.context
4084 );
4085 throw error;
4086 } finally {
4087 this.#dispatch({ type: "error", error });
4088 }
4089 } finally {
4090 this.#mutationCache.runNext(this);
4091 }
4092 }
4093 #dispatch(action) {
4094 const reducer = (state) => {
4095 switch (action.type) {
4096 case "failed":
4097 return {
4098 ...state,
4099 failureCount: action.failureCount,
4100 failureReason: action.error
4101 };
4102 case "pause":
4103 return {
4104 ...state,
4105 isPaused: true
4106 };
4107 case "continue":
4108 return {
4109 ...state,
4110 isPaused: false
4111 };
4112 case "pending":
4113 return {
4114 ...state,
4115 context: action.context,
4116 data: void 0,
4117 failureCount: 0,
4118 failureReason: null,
4119 error: null,
4120 isPaused: action.isPaused,
4121 status: "pending",
4122 variables: action.variables,
4123 submittedAt: Date.now()
4124 };
4125 case "success":
4126 return {
4127 ...state,
4128 data: action.data,
4129 failureCount: 0,
4130 failureReason: null,
4131 error: null,
4132 status: "success",
4133 isPaused: false
4134 };
4135 case "error":
4136 return {
4137 ...state,
4138 data: void 0,
4139 error: action.error,
4140 failureCount: state.failureCount + 1,
4141 failureReason: action.error,
4142 isPaused: false,
4143 status: "error"
4144 };
4145 }
4146 };
4147 this.state = reducer(this.state);
4148 import_notifyManager.notifyManager.batch(() => {
4149 this.#observers.forEach((observer) => {
4150 observer.onMutationUpdate(action);
4151 });
4152 this.#mutationCache.notify({
4153 mutation: this,
4154 type: "updated",
4155 action
4156 });
4157 });
4158 }
4159 };
4160 function getDefaultState() {
4161 return {
4162 context: void 0,
4163 data: void 0,
4164 error: null,
4165 failureCount: 0,
4166 failureReason: null,
4167 isPaused: false,
4168 status: "idle",
4169 variables: void 0,
4170 submittedAt: 0
4171 };
4172 }
4173 // Annotate the CommonJS export names for ESM import in node:
4174 0 && (0);
4175 //# sourceMappingURL=mutation.cjs.map
4176
4177 /***/ }),
4178
4179 /***/ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs":
4180 /*!***************************************************************************!*\
4181 !*** ../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs ***!
4182 \***************************************************************************/
4183 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4184
4185 "use strict";
4186
4187 var __defProp = Object.defineProperty;
4188 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4189 var __getOwnPropNames = Object.getOwnPropertyNames;
4190 var __hasOwnProp = Object.prototype.hasOwnProperty;
4191 var __export = (target, all) => {
4192 for (var name in all)
4193 __defProp(target, name, { get: all[name], enumerable: true });
4194 };
4195 var __copyProps = (to, from, except, desc) => {
4196 if (from && typeof from === "object" || typeof from === "function") {
4197 for (let key of __getOwnPropNames(from))
4198 if (!__hasOwnProp.call(to, key) && key !== except)
4199 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4200 }
4201 return to;
4202 };
4203 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4204
4205 // src/mutationCache.ts
4206 var mutationCache_exports = {};
4207 __export(mutationCache_exports, {
4208 MutationCache: () => MutationCache
4209 });
4210 module.exports = __toCommonJS(mutationCache_exports);
4211 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4212 var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs");
4213 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4214 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
4215 var MutationCache = class extends import_subscribable.Subscribable {
4216 constructor(config = {}) {
4217 super();
4218 this.config = config;
4219 this.#mutations = /* @__PURE__ */ new Map();
4220 this.#mutationId = Date.now();
4221 }
4222 #mutations;
4223 #mutationId;
4224 build(client, options, state) {
4225 const mutation = new import_mutation.Mutation({
4226 mutationCache: this,
4227 mutationId: ++this.#mutationId,
4228 options: client.defaultMutationOptions(options),
4229 state
4230 });
4231 this.add(mutation);
4232 return mutation;
4233 }
4234 add(mutation) {
4235 const scope = scopeFor(mutation);
4236 const mutations = this.#mutations.get(scope) ?? [];
4237 mutations.push(mutation);
4238 this.#mutations.set(scope, mutations);
4239 this.notify({ type: "added", mutation });
4240 }
4241 remove(mutation) {
4242 const scope = scopeFor(mutation);
4243 if (this.#mutations.has(scope)) {
4244 const mutations = this.#mutations.get(scope)?.filter((x) => x !== mutation);
4245 if (mutations) {
4246 if (mutations.length === 0) {
4247 this.#mutations.delete(scope);
4248 } else {
4249 this.#mutations.set(scope, mutations);
4250 }
4251 }
4252 }
4253 this.notify({ type: "removed", mutation });
4254 }
4255 canRun(mutation) {
4256 const firstPendingMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m.state.status === "pending");
4257 return !firstPendingMutation || firstPendingMutation === mutation;
4258 }
4259 runNext(mutation) {
4260 const foundMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m !== mutation && m.state.isPaused);
4261 return foundMutation?.continue() ?? Promise.resolve();
4262 }
4263 clear() {
4264 import_notifyManager.notifyManager.batch(() => {
4265 this.getAll().forEach((mutation) => {
4266 this.remove(mutation);
4267 });
4268 });
4269 }
4270 getAll() {
4271 return [...this.#mutations.values()].flat();
4272 }
4273 find(filters) {
4274 const defaultedFilters = { exact: true, ...filters };
4275 return this.getAll().find(
4276 (mutation) => (0, import_utils.matchMutation)(defaultedFilters, mutation)
4277 );
4278 }
4279 findAll(filters = {}) {
4280 return this.getAll().filter((mutation) => (0, import_utils.matchMutation)(filters, mutation));
4281 }
4282 notify(event) {
4283 import_notifyManager.notifyManager.batch(() => {
4284 this.listeners.forEach((listener) => {
4285 listener(event);
4286 });
4287 });
4288 }
4289 resumePausedMutations() {
4290 const pausedMutations = this.getAll().filter((x) => x.state.isPaused);
4291 return import_notifyManager.notifyManager.batch(
4292 () => Promise.all(
4293 pausedMutations.map((mutation) => mutation.continue().catch(import_utils.noop))
4294 )
4295 );
4296 }
4297 };
4298 function scopeFor(mutation) {
4299 return mutation.options.scope?.id ?? String(mutation.mutationId);
4300 }
4301 // Annotate the CommonJS export names for ESM import in node:
4302 0 && (0);
4303 //# sourceMappingURL=mutationCache.cjs.map
4304
4305 /***/ }),
4306
4307 /***/ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs":
4308 /*!******************************************************************************!*\
4309 !*** ../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs ***!
4310 \******************************************************************************/
4311 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4312
4313 "use strict";
4314
4315 var __defProp = Object.defineProperty;
4316 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4317 var __getOwnPropNames = Object.getOwnPropertyNames;
4318 var __hasOwnProp = Object.prototype.hasOwnProperty;
4319 var __export = (target, all) => {
4320 for (var name in all)
4321 __defProp(target, name, { get: all[name], enumerable: true });
4322 };
4323 var __copyProps = (to, from, except, desc) => {
4324 if (from && typeof from === "object" || typeof from === "function") {
4325 for (let key of __getOwnPropNames(from))
4326 if (!__hasOwnProp.call(to, key) && key !== except)
4327 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4328 }
4329 return to;
4330 };
4331 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4332
4333 // src/mutationObserver.ts
4334 var mutationObserver_exports = {};
4335 __export(mutationObserver_exports, {
4336 MutationObserver: () => MutationObserver
4337 });
4338 module.exports = __toCommonJS(mutationObserver_exports);
4339 var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs");
4340 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4341 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
4342 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4343 var MutationObserver = class extends import_subscribable.Subscribable {
4344 #client;
4345 #currentResult = void 0;
4346 #currentMutation;
4347 #mutateOptions;
4348 constructor(client, options) {
4349 super();
4350 this.#client = client;
4351 this.setOptions(options);
4352 this.bindMethods();
4353 this.#updateResult();
4354 }
4355 bindMethods() {
4356 this.mutate = this.mutate.bind(this);
4357 this.reset = this.reset.bind(this);
4358 }
4359 setOptions(options) {
4360 const prevOptions = this.options;
4361 this.options = this.#client.defaultMutationOptions(options);
4362 if (!(0, import_utils.shallowEqualObjects)(this.options, prevOptions)) {
4363 this.#client.getMutationCache().notify({
4364 type: "observerOptionsUpdated",
4365 mutation: this.#currentMutation,
4366 observer: this
4367 });
4368 }
4369 if (prevOptions?.mutationKey && this.options.mutationKey && (0, import_utils.hashKey)(prevOptions.mutationKey) !== (0, import_utils.hashKey)(this.options.mutationKey)) {
4370 this.reset();
4371 } else if (this.#currentMutation?.state.status === "pending") {
4372 this.#currentMutation.setOptions(this.options);
4373 }
4374 }
4375 onUnsubscribe() {
4376 if (!this.hasListeners()) {
4377 this.#currentMutation?.removeObserver(this);
4378 }
4379 }
4380 onMutationUpdate(action) {
4381 this.#updateResult();
4382 this.#notify(action);
4383 }
4384 getCurrentResult() {
4385 return this.#currentResult;
4386 }
4387 reset() {
4388 this.#currentMutation?.removeObserver(this);
4389 this.#currentMutation = void 0;
4390 this.#updateResult();
4391 this.#notify();
4392 }
4393 mutate(variables, options) {
4394 this.#mutateOptions = options;
4395 this.#currentMutation?.removeObserver(this);
4396 this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);
4397 this.#currentMutation.addObserver(this);
4398 return this.#currentMutation.execute(variables);
4399 }
4400 #updateResult() {
4401 const state = this.#currentMutation?.state ?? (0, import_mutation.getDefaultState)();
4402 this.#currentResult = {
4403 ...state,
4404 isPending: state.status === "pending",
4405 isSuccess: state.status === "success",
4406 isError: state.status === "error",
4407 isIdle: state.status === "idle",
4408 mutate: this.mutate,
4409 reset: this.reset
4410 };
4411 }
4412 #notify(action) {
4413 import_notifyManager.notifyManager.batch(() => {
4414 if (this.#mutateOptions && this.hasListeners()) {
4415 const variables = this.#currentResult.variables;
4416 const context = this.#currentResult.context;
4417 if (action?.type === "success") {
4418 this.#mutateOptions.onSuccess?.(action.data, variables, context);
4419 this.#mutateOptions.onSettled?.(action.data, null, variables, context);
4420 } else if (action?.type === "error") {
4421 this.#mutateOptions.onError?.(action.error, variables, context);
4422 this.#mutateOptions.onSettled?.(
4423 void 0,
4424 action.error,
4425 variables,
4426 context
4427 );
4428 }
4429 }
4430 this.listeners.forEach((listener) => {
4431 listener(this.#currentResult);
4432 });
4433 });
4434 }
4435 };
4436 // Annotate the CommonJS export names for ESM import in node:
4437 0 && (0);
4438 //# sourceMappingURL=mutationObserver.cjs.map
4439
4440 /***/ }),
4441
4442 /***/ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs":
4443 /*!***************************************************************************!*\
4444 !*** ../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs ***!
4445 \***************************************************************************/
4446 /***/ ((module) => {
4447
4448 "use strict";
4449
4450 var __defProp = Object.defineProperty;
4451 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4452 var __getOwnPropNames = Object.getOwnPropertyNames;
4453 var __hasOwnProp = Object.prototype.hasOwnProperty;
4454 var __export = (target, all) => {
4455 for (var name in all)
4456 __defProp(target, name, { get: all[name], enumerable: true });
4457 };
4458 var __copyProps = (to, from, except, desc) => {
4459 if (from && typeof from === "object" || typeof from === "function") {
4460 for (let key of __getOwnPropNames(from))
4461 if (!__hasOwnProp.call(to, key) && key !== except)
4462 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4463 }
4464 return to;
4465 };
4466 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4467
4468 // src/notifyManager.ts
4469 var notifyManager_exports = {};
4470 __export(notifyManager_exports, {
4471 createNotifyManager: () => createNotifyManager,
4472 notifyManager: () => notifyManager
4473 });
4474 module.exports = __toCommonJS(notifyManager_exports);
4475 function createNotifyManager() {
4476 let queue = [];
4477 let transactions = 0;
4478 let notifyFn = (callback) => {
4479 callback();
4480 };
4481 let batchNotifyFn = (callback) => {
4482 callback();
4483 };
4484 let scheduleFn = (cb) => setTimeout(cb, 0);
4485 const schedule = (callback) => {
4486 if (transactions) {
4487 queue.push(callback);
4488 } else {
4489 scheduleFn(() => {
4490 notifyFn(callback);
4491 });
4492 }
4493 };
4494 const flush = () => {
4495 const originalQueue = queue;
4496 queue = [];
4497 if (originalQueue.length) {
4498 scheduleFn(() => {
4499 batchNotifyFn(() => {
4500 originalQueue.forEach((callback) => {
4501 notifyFn(callback);
4502 });
4503 });
4504 });
4505 }
4506 };
4507 return {
4508 batch: (callback) => {
4509 let result;
4510 transactions++;
4511 try {
4512 result = callback();
4513 } finally {
4514 transactions--;
4515 if (!transactions) {
4516 flush();
4517 }
4518 }
4519 return result;
4520 },
4521 /**
4522 * All calls to the wrapped function will be batched.
4523 */
4524 batchCalls: (callback) => {
4525 return (...args) => {
4526 schedule(() => {
4527 callback(...args);
4528 });
4529 };
4530 },
4531 schedule,
4532 /**
4533 * Use this method to set a custom notify function.
4534 * This can be used to for example wrap notifications with `React.act` while running tests.
4535 */
4536 setNotifyFunction: (fn) => {
4537 notifyFn = fn;
4538 },
4539 /**
4540 * Use this method to set a custom function to batch notifications together into a single tick.
4541 * By default React Query will use the batch function provided by ReactDOM or React Native.
4542 */
4543 setBatchNotifyFunction: (fn) => {
4544 batchNotifyFn = fn;
4545 },
4546 setScheduler: (fn) => {
4547 scheduleFn = fn;
4548 }
4549 };
4550 }
4551 var notifyManager = createNotifyManager();
4552 // Annotate the CommonJS export names for ESM import in node:
4553 0 && (0);
4554 //# sourceMappingURL=notifyManager.cjs.map
4555
4556 /***/ }),
4557
4558 /***/ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs":
4559 /*!***************************************************************************!*\
4560 !*** ../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs ***!
4561 \***************************************************************************/
4562 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4563
4564 "use strict";
4565
4566 var __defProp = Object.defineProperty;
4567 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4568 var __getOwnPropNames = Object.getOwnPropertyNames;
4569 var __hasOwnProp = Object.prototype.hasOwnProperty;
4570 var __export = (target, all) => {
4571 for (var name in all)
4572 __defProp(target, name, { get: all[name], enumerable: true });
4573 };
4574 var __copyProps = (to, from, except, desc) => {
4575 if (from && typeof from === "object" || typeof from === "function") {
4576 for (let key of __getOwnPropNames(from))
4577 if (!__hasOwnProp.call(to, key) && key !== except)
4578 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4579 }
4580 return to;
4581 };
4582 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4583
4584 // src/onlineManager.ts
4585 var onlineManager_exports = {};
4586 __export(onlineManager_exports, {
4587 OnlineManager: () => OnlineManager,
4588 onlineManager: () => onlineManager
4589 });
4590 module.exports = __toCommonJS(onlineManager_exports);
4591 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
4592 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4593 var OnlineManager = class extends import_subscribable.Subscribable {
4594 #online = true;
4595 #cleanup;
4596 #setup;
4597 constructor() {
4598 super();
4599 this.#setup = (onOnline) => {
4600 if (!import_utils.isServer && window.addEventListener) {
4601 const onlineListener = () => onOnline(true);
4602 const offlineListener = () => onOnline(false);
4603 window.addEventListener("online", onlineListener, false);
4604 window.addEventListener("offline", offlineListener, false);
4605 return () => {
4606 window.removeEventListener("online", onlineListener);
4607 window.removeEventListener("offline", offlineListener);
4608 };
4609 }
4610 return;
4611 };
4612 }
4613 onSubscribe() {
4614 if (!this.#cleanup) {
4615 this.setEventListener(this.#setup);
4616 }
4617 }
4618 onUnsubscribe() {
4619 if (!this.hasListeners()) {
4620 this.#cleanup?.();
4621 this.#cleanup = void 0;
4622 }
4623 }
4624 setEventListener(setup) {
4625 this.#setup = setup;
4626 this.#cleanup?.();
4627 this.#cleanup = setup(this.setOnline.bind(this));
4628 }
4629 setOnline(online) {
4630 const changed = this.#online !== online;
4631 if (changed) {
4632 this.#online = online;
4633 this.listeners.forEach((listener) => {
4634 listener(online);
4635 });
4636 }
4637 }
4638 isOnline() {
4639 return this.#online;
4640 }
4641 };
4642 var onlineManager = new OnlineManager();
4643 // Annotate the CommonJS export names for ESM import in node:
4644 0 && (0);
4645 //# sourceMappingURL=onlineManager.cjs.map
4646
4647 /***/ }),
4648
4649 /***/ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs":
4650 /*!*****************************************************************************!*\
4651 !*** ../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs ***!
4652 \*****************************************************************************/
4653 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4654
4655 "use strict";
4656
4657 var __defProp = Object.defineProperty;
4658 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4659 var __getOwnPropNames = Object.getOwnPropertyNames;
4660 var __hasOwnProp = Object.prototype.hasOwnProperty;
4661 var __export = (target, all) => {
4662 for (var name in all)
4663 __defProp(target, name, { get: all[name], enumerable: true });
4664 };
4665 var __copyProps = (to, from, except, desc) => {
4666 if (from && typeof from === "object" || typeof from === "function") {
4667 for (let key of __getOwnPropNames(from))
4668 if (!__hasOwnProp.call(to, key) && key !== except)
4669 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4670 }
4671 return to;
4672 };
4673 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4674
4675 // src/queriesObserver.ts
4676 var queriesObserver_exports = {};
4677 __export(queriesObserver_exports, {
4678 QueriesObserver: () => QueriesObserver
4679 });
4680 module.exports = __toCommonJS(queriesObserver_exports);
4681 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4682 var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
4683 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
4684 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4685 function difference(array1, array2) {
4686 return array1.filter((x) => !array2.includes(x));
4687 }
4688 function replaceAt(array, index, value) {
4689 const copy = array.slice(0);
4690 copy[index] = value;
4691 return copy;
4692 }
4693 var QueriesObserver = class extends import_subscribable.Subscribable {
4694 #client;
4695 #result;
4696 #queries;
4697 #options;
4698 #observers;
4699 #combinedResult;
4700 #lastCombine;
4701 #lastResult;
4702 constructor(client, queries, options) {
4703 super();
4704 this.#client = client;
4705 this.#options = options;
4706 this.#queries = [];
4707 this.#observers = [];
4708 this.#result = [];
4709 this.setQueries(queries);
4710 }
4711 onSubscribe() {
4712 if (this.listeners.size === 1) {
4713 this.#observers.forEach((observer) => {
4714 observer.subscribe((result) => {
4715 this.#onUpdate(observer, result);
4716 });
4717 });
4718 }
4719 }
4720 onUnsubscribe() {
4721 if (!this.listeners.size) {
4722 this.destroy();
4723 }
4724 }
4725 destroy() {
4726 this.listeners = /* @__PURE__ */ new Set();
4727 this.#observers.forEach((observer) => {
4728 observer.destroy();
4729 });
4730 }
4731 setQueries(queries, options, notifyOptions) {
4732 this.#queries = queries;
4733 this.#options = options;
4734 if (true) {
4735 const queryHashes = queries.map((query) => query.queryHash);
4736 if (new Set(queryHashes).size !== queryHashes.length) {
4737 console.warn(
4738 "[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior."
4739 );
4740 }
4741 }
4742 import_notifyManager.notifyManager.batch(() => {
4743 const prevObservers = this.#observers;
4744 const newObserverMatches = this.#findMatchingObservers(this.#queries);
4745 newObserverMatches.forEach(
4746 (match) => match.observer.setOptions(match.defaultedQueryOptions, notifyOptions)
4747 );
4748 const newObservers = newObserverMatches.map((match) => match.observer);
4749 const newResult = newObservers.map(
4750 (observer) => observer.getCurrentResult()
4751 );
4752 const hasIndexChange = newObservers.some(
4753 (observer, index) => observer !== prevObservers[index]
4754 );
4755 if (prevObservers.length === newObservers.length && !hasIndexChange) {
4756 return;
4757 }
4758 this.#observers = newObservers;
4759 this.#result = newResult;
4760 if (!this.hasListeners()) {
4761 return;
4762 }
4763 difference(prevObservers, newObservers).forEach((observer) => {
4764 observer.destroy();
4765 });
4766 difference(newObservers, prevObservers).forEach((observer) => {
4767 observer.subscribe((result) => {
4768 this.#onUpdate(observer, result);
4769 });
4770 });
4771 this.#notify();
4772 });
4773 }
4774 getCurrentResult() {
4775 return this.#result;
4776 }
4777 getQueries() {
4778 return this.#observers.map((observer) => observer.getCurrentQuery());
4779 }
4780 getObservers() {
4781 return this.#observers;
4782 }
4783 getOptimisticResult(queries, combine) {
4784 const matches = this.#findMatchingObservers(queries);
4785 const result = matches.map(
4786 (match) => match.observer.getOptimisticResult(match.defaultedQueryOptions)
4787 );
4788 return [
4789 result,
4790 (r) => {
4791 return this.#combineResult(r ?? result, combine);
4792 },
4793 () => {
4794 return this.#trackResult(result, queries);
4795 }
4796 ];
4797 }
4798 #trackResult(result, queries) {
4799 const matches = this.#findMatchingObservers(queries);
4800 return matches.map((match, index) => {
4801 const observerResult = result[index];
4802 return !match.defaultedQueryOptions.notifyOnChangeProps ? match.observer.trackResult(observerResult, (accessedProp) => {
4803 matches.forEach((m) => {
4804 m.observer.trackProp(accessedProp);
4805 });
4806 }) : observerResult;
4807 });
4808 }
4809 #combineResult(input, combine) {
4810 if (combine) {
4811 if (!this.#combinedResult || this.#result !== this.#lastResult || combine !== this.#lastCombine) {
4812 this.#lastCombine = combine;
4813 this.#lastResult = this.#result;
4814 this.#combinedResult = (0, import_utils.replaceEqualDeep)(
4815 this.#combinedResult,
4816 combine(input)
4817 );
4818 }
4819 return this.#combinedResult;
4820 }
4821 return input;
4822 }
4823 #findMatchingObservers(queries) {
4824 const prevObserversMap = new Map(
4825 this.#observers.map((observer) => [observer.options.queryHash, observer])
4826 );
4827 const observers = [];
4828 queries.forEach((options) => {
4829 const defaultedOptions = this.#client.defaultQueryOptions(options);
4830 const match = prevObserversMap.get(defaultedOptions.queryHash);
4831 if (match) {
4832 observers.push({
4833 defaultedQueryOptions: defaultedOptions,
4834 observer: match
4835 });
4836 } else {
4837 observers.push({
4838 defaultedQueryOptions: defaultedOptions,
4839 observer: new import_queryObserver.QueryObserver(this.#client, defaultedOptions)
4840 });
4841 }
4842 });
4843 return observers;
4844 }
4845 #onUpdate(observer, result) {
4846 const index = this.#observers.indexOf(observer);
4847 if (index !== -1) {
4848 this.#result = replaceAt(this.#result, index, result);
4849 this.#notify();
4850 }
4851 }
4852 #notify() {
4853 if (this.hasListeners()) {
4854 const previousResult = this.#combinedResult;
4855 const newResult = this.#combineResult(
4856 this.#trackResult(this.#result, this.#queries),
4857 this.#options?.combine
4858 );
4859 if (previousResult !== newResult) {
4860 import_notifyManager.notifyManager.batch(() => {
4861 this.listeners.forEach((listener) => {
4862 listener(this.#result);
4863 });
4864 });
4865 }
4866 }
4867 }
4868 };
4869 // Annotate the CommonJS export names for ESM import in node:
4870 0 && (0);
4871 //# sourceMappingURL=queriesObserver.cjs.map
4872
4873 /***/ }),
4874
4875 /***/ "../node_modules/@tanstack/query-core/build/modern/query.cjs":
4876 /*!*******************************************************************!*\
4877 !*** ../node_modules/@tanstack/query-core/build/modern/query.cjs ***!
4878 \*******************************************************************/
4879 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4880
4881 "use strict";
4882
4883 var __defProp = Object.defineProperty;
4884 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4885 var __getOwnPropNames = Object.getOwnPropertyNames;
4886 var __hasOwnProp = Object.prototype.hasOwnProperty;
4887 var __export = (target, all) => {
4888 for (var name in all)
4889 __defProp(target, name, { get: all[name], enumerable: true });
4890 };
4891 var __copyProps = (to, from, except, desc) => {
4892 if (from && typeof from === "object" || typeof from === "function") {
4893 for (let key of __getOwnPropNames(from))
4894 if (!__hasOwnProp.call(to, key) && key !== except)
4895 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4896 }
4897 return to;
4898 };
4899 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4900
4901 // src/query.ts
4902 var query_exports = {};
4903 __export(query_exports, {
4904 Query: () => Query,
4905 fetchState: () => fetchState
4906 });
4907 module.exports = __toCommonJS(query_exports);
4908 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4909 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4910 var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
4911 var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs");
4912 var Query = class extends import_removable.Removable {
4913 #initialState;
4914 #revertState;
4915 #cache;
4916 #retryer;
4917 #defaultOptions;
4918 #abortSignalConsumed;
4919 constructor(config) {
4920 super();
4921 this.#abortSignalConsumed = false;
4922 this.#defaultOptions = config.defaultOptions;
4923 this.setOptions(config.options);
4924 this.observers = [];
4925 this.#cache = config.cache;
4926 this.queryKey = config.queryKey;
4927 this.queryHash = config.queryHash;
4928 this.#initialState = getDefaultState(this.options);
4929 this.state = config.state ?? this.#initialState;
4930 this.scheduleGc();
4931 }
4932 get meta() {
4933 return this.options.meta;
4934 }
4935 get promise() {
4936 return this.#retryer?.promise;
4937 }
4938 setOptions(options) {
4939 this.options = { ...this.#defaultOptions, ...options };
4940 this.updateGcTime(this.options.gcTime);
4941 }
4942 optionalRemove() {
4943 if (!this.observers.length && this.state.fetchStatus === "idle") {
4944 this.#cache.remove(this);
4945 }
4946 }
4947 setData(newData, options) {
4948 const data = (0, import_utils.replaceData)(this.state.data, newData, this.options);
4949 this.#dispatch({
4950 data,
4951 type: "success",
4952 dataUpdatedAt: options?.updatedAt,
4953 manual: options?.manual
4954 });
4955 return data;
4956 }
4957 setState(state, setStateOptions) {
4958 this.#dispatch({ type: "setState", state, setStateOptions });
4959 }
4960 cancel(options) {
4961 const promise = this.#retryer?.promise;
4962 this.#retryer?.cancel(options);
4963 return promise ? promise.then(import_utils.noop).catch(import_utils.noop) : Promise.resolve();
4964 }
4965 destroy() {
4966 super.destroy();
4967 this.cancel({ silent: true });
4968 }
4969 reset() {
4970 this.destroy();
4971 this.setState(this.#initialState);
4972 }
4973 isActive() {
4974 return this.observers.some(
4975 (observer) => (0, import_utils.resolveEnabled)(observer.options.enabled, this) !== false
4976 );
4977 }
4978 isDisabled() {
4979 if (this.getObserversCount() > 0) {
4980 return !this.isActive();
4981 }
4982 return this.options.queryFn === import_utils.skipToken || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
4983 }
4984 isStale() {
4985 if (this.state.isInvalidated) {
4986 return true;
4987 }
4988 if (this.getObserversCount() > 0) {
4989 return this.observers.some(
4990 (observer) => observer.getCurrentResult().isStale
4991 );
4992 }
4993 return this.state.data === void 0;
4994 }
4995 isStaleByTime(staleTime = 0) {
4996 return this.state.isInvalidated || this.state.data === void 0 || !(0, import_utils.timeUntilStale)(this.state.dataUpdatedAt, staleTime);
4997 }
4998 onFocus() {
4999 const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus());
5000 observer?.refetch({ cancelRefetch: false });
5001 this.#retryer?.continue();
5002 }
5003 onOnline() {
5004 const observer = this.observers.find((x) => x.shouldFetchOnReconnect());
5005 observer?.refetch({ cancelRefetch: false });
5006 this.#retryer?.continue();
5007 }
5008 addObserver(observer) {
5009 if (!this.observers.includes(observer)) {
5010 this.observers.push(observer);
5011 this.clearGcTimeout();
5012 this.#cache.notify({ type: "observerAdded", query: this, observer });
5013 }
5014 }
5015 removeObserver(observer) {
5016 if (this.observers.includes(observer)) {
5017 this.observers = this.observers.filter((x) => x !== observer);
5018 if (!this.observers.length) {
5019 if (this.#retryer) {
5020 if (this.#abortSignalConsumed) {
5021 this.#retryer.cancel({ revert: true });
5022 } else {
5023 this.#retryer.cancelRetry();
5024 }
5025 }
5026 this.scheduleGc();
5027 }
5028 this.#cache.notify({ type: "observerRemoved", query: this, observer });
5029 }
5030 }
5031 getObserversCount() {
5032 return this.observers.length;
5033 }
5034 invalidate() {
5035 if (!this.state.isInvalidated) {
5036 this.#dispatch({ type: "invalidate" });
5037 }
5038 }
5039 fetch(options, fetchOptions) {
5040 if (this.state.fetchStatus !== "idle") {
5041 if (this.state.data !== void 0 && fetchOptions?.cancelRefetch) {
5042 this.cancel({ silent: true });
5043 } else if (this.#retryer) {
5044 this.#retryer.continueRetry();
5045 return this.#retryer.promise;
5046 }
5047 }
5048 if (options) {
5049 this.setOptions(options);
5050 }
5051 if (!this.options.queryFn) {
5052 const observer = this.observers.find((x) => x.options.queryFn);
5053 if (observer) {
5054 this.setOptions(observer.options);
5055 }
5056 }
5057 if (true) {
5058 if (!Array.isArray(this.options.queryKey)) {
5059 console.error(
5060 `As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`
5061 );
5062 }
5063 }
5064 const abortController = new AbortController();
5065 const addSignalProperty = (object) => {
5066 Object.defineProperty(object, "signal", {
5067 enumerable: true,
5068 get: () => {
5069 this.#abortSignalConsumed = true;
5070 return abortController.signal;
5071 }
5072 });
5073 };
5074 const fetchFn = () => {
5075 const queryFn = (0, import_utils.ensureQueryFn)(this.options, fetchOptions);
5076 const queryFnContext = {
5077 queryKey: this.queryKey,
5078 meta: this.meta
5079 };
5080 addSignalProperty(queryFnContext);
5081 this.#abortSignalConsumed = false;
5082 if (this.options.persister) {
5083 return this.options.persister(
5084 queryFn,
5085 queryFnContext,
5086 this
5087 );
5088 }
5089 return queryFn(queryFnContext);
5090 };
5091 const context = {
5092 fetchOptions,
5093 options: this.options,
5094 queryKey: this.queryKey,
5095 state: this.state,
5096 fetchFn
5097 };
5098 addSignalProperty(context);
5099 this.options.behavior?.onFetch(
5100 context,
5101 this
5102 );
5103 this.#revertState = this.state;
5104 if (this.state.fetchStatus === "idle" || this.state.fetchMeta !== context.fetchOptions?.meta) {
5105 this.#dispatch({ type: "fetch", meta: context.fetchOptions?.meta });
5106 }
5107 const onError = (error) => {
5108 if (!((0, import_retryer.isCancelledError)(error) && error.silent)) {
5109 this.#dispatch({
5110 type: "error",
5111 error
5112 });
5113 }
5114 if (!(0, import_retryer.isCancelledError)(error)) {
5115 this.#cache.config.onError?.(
5116 error,
5117 this
5118 );
5119 this.#cache.config.onSettled?.(
5120 this.state.data,
5121 error,
5122 this
5123 );
5124 }
5125 this.scheduleGc();
5126 };
5127 this.#retryer = (0, import_retryer.createRetryer)({
5128 initialPromise: fetchOptions?.initialPromise,
5129 fn: context.fetchFn,
5130 abort: abortController.abort.bind(abortController),
5131 onSuccess: (data) => {
5132 if (data === void 0) {
5133 if (true) {
5134 console.error(
5135 `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
5136 );
5137 }
5138 onError(new Error(`${this.queryHash} data is undefined`));
5139 return;
5140 }
5141 try {
5142 this.setData(data);
5143 } catch (error) {
5144 onError(error);
5145 return;
5146 }
5147 this.#cache.config.onSuccess?.(data, this);
5148 this.#cache.config.onSettled?.(
5149 data,
5150 this.state.error,
5151 this
5152 );
5153 this.scheduleGc();
5154 },
5155 onError,
5156 onFail: (failureCount, error) => {
5157 this.#dispatch({ type: "failed", failureCount, error });
5158 },
5159 onPause: () => {
5160 this.#dispatch({ type: "pause" });
5161 },
5162 onContinue: () => {
5163 this.#dispatch({ type: "continue" });
5164 },
5165 retry: context.options.retry,
5166 retryDelay: context.options.retryDelay,
5167 networkMode: context.options.networkMode,
5168 canRun: () => true
5169 });
5170 return this.#retryer.start();
5171 }
5172 #dispatch(action) {
5173 const reducer = (state) => {
5174 switch (action.type) {
5175 case "failed":
5176 return {
5177 ...state,
5178 fetchFailureCount: action.failureCount,
5179 fetchFailureReason: action.error
5180 };
5181 case "pause":
5182 return {
5183 ...state,
5184 fetchStatus: "paused"
5185 };
5186 case "continue":
5187 return {
5188 ...state,
5189 fetchStatus: "fetching"
5190 };
5191 case "fetch":
5192 return {
5193 ...state,
5194 ...fetchState(state.data, this.options),
5195 fetchMeta: action.meta ?? null
5196 };
5197 case "success":
5198 return {
5199 ...state,
5200 data: action.data,
5201 dataUpdateCount: state.dataUpdateCount + 1,
5202 dataUpdatedAt: action.dataUpdatedAt ?? Date.now(),
5203 error: null,
5204 isInvalidated: false,
5205 status: "success",
5206 ...!action.manual && {
5207 fetchStatus: "idle",
5208 fetchFailureCount: 0,
5209 fetchFailureReason: null
5210 }
5211 };
5212 case "error":
5213 const error = action.error;
5214 if ((0, import_retryer.isCancelledError)(error) && error.revert && this.#revertState) {
5215 return { ...this.#revertState, fetchStatus: "idle" };
5216 }
5217 return {
5218 ...state,
5219 error,
5220 errorUpdateCount: state.errorUpdateCount + 1,
5221 errorUpdatedAt: Date.now(),
5222 fetchFailureCount: state.fetchFailureCount + 1,
5223 fetchFailureReason: error,
5224 fetchStatus: "idle",
5225 status: "error"
5226 };
5227 case "invalidate":
5228 return {
5229 ...state,
5230 isInvalidated: true
5231 };
5232 case "setState":
5233 return {
5234 ...state,
5235 ...action.state
5236 };
5237 }
5238 };
5239 this.state = reducer(this.state);
5240 import_notifyManager.notifyManager.batch(() => {
5241 this.observers.forEach((observer) => {
5242 observer.onQueryUpdate();
5243 });
5244 this.#cache.notify({ query: this, type: "updated", action });
5245 });
5246 }
5247 };
5248 function fetchState(data, options) {
5249 return {
5250 fetchFailureCount: 0,
5251 fetchFailureReason: null,
5252 fetchStatus: (0, import_retryer.canFetch)(options.networkMode) ? "fetching" : "paused",
5253 ...data === void 0 && {
5254 error: null,
5255 status: "pending"
5256 }
5257 };
5258 }
5259 function getDefaultState(options) {
5260 const data = typeof options.initialData === "function" ? options.initialData() : options.initialData;
5261 const hasData = data !== void 0;
5262 const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;
5263 return {
5264 data,
5265 dataUpdateCount: 0,
5266 dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0,
5267 error: null,
5268 errorUpdateCount: 0,
5269 errorUpdatedAt: 0,
5270 fetchFailureCount: 0,
5271 fetchFailureReason: null,
5272 fetchMeta: null,
5273 isInvalidated: false,
5274 status: hasData ? "success" : "pending",
5275 fetchStatus: "idle"
5276 };
5277 }
5278 // Annotate the CommonJS export names for ESM import in node:
5279 0 && (0);
5280 //# sourceMappingURL=query.cjs.map
5281
5282 /***/ }),
5283
5284 /***/ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs":
5285 /*!************************************************************************!*\
5286 !*** ../node_modules/@tanstack/query-core/build/modern/queryCache.cjs ***!
5287 \************************************************************************/
5288 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5289
5290 "use strict";
5291
5292 var __defProp = Object.defineProperty;
5293 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5294 var __getOwnPropNames = Object.getOwnPropertyNames;
5295 var __hasOwnProp = Object.prototype.hasOwnProperty;
5296 var __export = (target, all) => {
5297 for (var name in all)
5298 __defProp(target, name, { get: all[name], enumerable: true });
5299 };
5300 var __copyProps = (to, from, except, desc) => {
5301 if (from && typeof from === "object" || typeof from === "function") {
5302 for (let key of __getOwnPropNames(from))
5303 if (!__hasOwnProp.call(to, key) && key !== except)
5304 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5305 }
5306 return to;
5307 };
5308 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5309
5310 // src/queryCache.ts
5311 var queryCache_exports = {};
5312 __export(queryCache_exports, {
5313 QueryCache: () => QueryCache
5314 });
5315 module.exports = __toCommonJS(queryCache_exports);
5316 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
5317 var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs");
5318 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
5319 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
5320 var QueryCache = class extends import_subscribable.Subscribable {
5321 constructor(config = {}) {
5322 super();
5323 this.config = config;
5324 this.#queries = /* @__PURE__ */ new Map();
5325 }
5326 #queries;
5327 build(client, options, state) {
5328 const queryKey = options.queryKey;
5329 const queryHash = options.queryHash ?? (0, import_utils.hashQueryKeyByOptions)(queryKey, options);
5330 let query = this.get(queryHash);
5331 if (!query) {
5332 query = new import_query.Query({
5333 cache: this,
5334 queryKey,
5335 queryHash,
5336 options: client.defaultQueryOptions(options),
5337 state,
5338 defaultOptions: client.getQueryDefaults(queryKey)
5339 });
5340 this.add(query);
5341 }
5342 return query;
5343 }
5344 add(query) {
5345 if (!this.#queries.has(query.queryHash)) {
5346 this.#queries.set(query.queryHash, query);
5347 this.notify({
5348 type: "added",
5349 query
5350 });
5351 }
5352 }
5353 remove(query) {
5354 const queryInMap = this.#queries.get(query.queryHash);
5355 if (queryInMap) {
5356 query.destroy();
5357 if (queryInMap === query) {
5358 this.#queries.delete(query.queryHash);
5359 }
5360 this.notify({ type: "removed", query });
5361 }
5362 }
5363 clear() {
5364 import_notifyManager.notifyManager.batch(() => {
5365 this.getAll().forEach((query) => {
5366 this.remove(query);
5367 });
5368 });
5369 }
5370 get(queryHash) {
5371 return this.#queries.get(queryHash);
5372 }
5373 getAll() {
5374 return [...this.#queries.values()];
5375 }
5376 find(filters) {
5377 const defaultedFilters = { exact: true, ...filters };
5378 return this.getAll().find(
5379 (query) => (0, import_utils.matchQuery)(defaultedFilters, query)
5380 );
5381 }
5382 findAll(filters = {}) {
5383 const queries = this.getAll();
5384 return Object.keys(filters).length > 0 ? queries.filter((query) => (0, import_utils.matchQuery)(filters, query)) : queries;
5385 }
5386 notify(event) {
5387 import_notifyManager.notifyManager.batch(() => {
5388 this.listeners.forEach((listener) => {
5389 listener(event);
5390 });
5391 });
5392 }
5393 onFocus() {
5394 import_notifyManager.notifyManager.batch(() => {
5395 this.getAll().forEach((query) => {
5396 query.onFocus();
5397 });
5398 });
5399 }
5400 onOnline() {
5401 import_notifyManager.notifyManager.batch(() => {
5402 this.getAll().forEach((query) => {
5403 query.onOnline();
5404 });
5405 });
5406 }
5407 };
5408 // Annotate the CommonJS export names for ESM import in node:
5409 0 && (0);
5410 //# sourceMappingURL=queryCache.cjs.map
5411
5412 /***/ }),
5413
5414 /***/ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs":
5415 /*!*************************************************************************!*\
5416 !*** ../node_modules/@tanstack/query-core/build/modern/queryClient.cjs ***!
5417 \*************************************************************************/
5418 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5419
5420 "use strict";
5421
5422 var __defProp = Object.defineProperty;
5423 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5424 var __getOwnPropNames = Object.getOwnPropertyNames;
5425 var __hasOwnProp = Object.prototype.hasOwnProperty;
5426 var __export = (target, all) => {
5427 for (var name in all)
5428 __defProp(target, name, { get: all[name], enumerable: true });
5429 };
5430 var __copyProps = (to, from, except, desc) => {
5431 if (from && typeof from === "object" || typeof from === "function") {
5432 for (let key of __getOwnPropNames(from))
5433 if (!__hasOwnProp.call(to, key) && key !== except)
5434 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5435 }
5436 return to;
5437 };
5438 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5439
5440 // src/queryClient.ts
5441 var queryClient_exports = {};
5442 __export(queryClient_exports, {
5443 QueryClient: () => QueryClient
5444 });
5445 module.exports = __toCommonJS(queryClient_exports);
5446 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
5447 var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs");
5448 var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs");
5449 var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
5450 var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
5451 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
5452 var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs");
5453 var QueryClient = class {
5454 #queryCache;
5455 #mutationCache;
5456 #defaultOptions;
5457 #queryDefaults;
5458 #mutationDefaults;
5459 #mountCount;
5460 #unsubscribeFocus;
5461 #unsubscribeOnline;
5462 constructor(config = {}) {
5463 this.#queryCache = config.queryCache || new import_queryCache.QueryCache();
5464 this.#mutationCache = config.mutationCache || new import_mutationCache.MutationCache();
5465 this.#defaultOptions = config.defaultOptions || {};
5466 this.#queryDefaults = /* @__PURE__ */ new Map();
5467 this.#mutationDefaults = /* @__PURE__ */ new Map();
5468 this.#mountCount = 0;
5469 }
5470 mount() {
5471 this.#mountCount++;
5472 if (this.#mountCount !== 1)
5473 return;
5474 this.#unsubscribeFocus = import_focusManager.focusManager.subscribe(async (focused) => {
5475 if (focused) {
5476 await this.resumePausedMutations();
5477 this.#queryCache.onFocus();
5478 }
5479 });
5480 this.#unsubscribeOnline = import_onlineManager.onlineManager.subscribe(async (online) => {
5481 if (online) {
5482 await this.resumePausedMutations();
5483 this.#queryCache.onOnline();
5484 }
5485 });
5486 }
5487 unmount() {
5488 this.#mountCount--;
5489 if (this.#mountCount !== 0)
5490 return;
5491 this.#unsubscribeFocus?.();
5492 this.#unsubscribeFocus = void 0;
5493 this.#unsubscribeOnline?.();
5494 this.#unsubscribeOnline = void 0;
5495 }
5496 isFetching(filters) {
5497 return this.#queryCache.findAll({ ...filters, fetchStatus: "fetching" }).length;
5498 }
5499 isMutating(filters) {
5500 return this.#mutationCache.findAll({ ...filters, status: "pending" }).length;
5501 }
5502 getQueryData(queryKey) {
5503 const options = this.defaultQueryOptions({ queryKey });
5504 return this.#queryCache.get(options.queryHash)?.state.data;
5505 }
5506 ensureQueryData(options) {
5507 const defaultedOptions = this.defaultQueryOptions(options);
5508 const query = this.#queryCache.build(this, defaultedOptions);
5509 const cachedData = query.state.data;
5510 if (cachedData === void 0) {
5511 return this.fetchQuery(options);
5512 }
5513 if (options.revalidateIfStale && query.isStaleByTime((0, import_utils.resolveStaleTime)(defaultedOptions.staleTime, query))) {
5514 void this.prefetchQuery(defaultedOptions);
5515 }
5516 return Promise.resolve(cachedData);
5517 }
5518 getQueriesData(filters) {
5519 return this.#queryCache.findAll(filters).map(({ queryKey, state }) => {
5520 const data = state.data;
5521 return [queryKey, data];
5522 });
5523 }
5524 setQueryData(queryKey, updater, options) {
5525 const defaultedOptions = this.defaultQueryOptions({ queryKey });
5526 const query = this.#queryCache.get(
5527 defaultedOptions.queryHash
5528 );
5529 const prevData = query?.state.data;
5530 const data = (0, import_utils.functionalUpdate)(updater, prevData);
5531 if (data === void 0) {
5532 return void 0;
5533 }
5534 return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true });
5535 }
5536 setQueriesData(filters, updater, options) {
5537 return import_notifyManager.notifyManager.batch(
5538 () => this.#queryCache.findAll(filters).map(({ queryKey }) => [
5539 queryKey,
5540 this.setQueryData(queryKey, updater, options)
5541 ])
5542 );
5543 }
5544 getQueryState(queryKey) {
5545 const options = this.defaultQueryOptions({ queryKey });
5546 return this.#queryCache.get(
5547 options.queryHash
5548 )?.state;
5549 }
5550 removeQueries(filters) {
5551 const queryCache = this.#queryCache;
5552 import_notifyManager.notifyManager.batch(() => {
5553 queryCache.findAll(filters).forEach((query) => {
5554 queryCache.remove(query);
5555 });
5556 });
5557 }
5558 resetQueries(filters, options) {
5559 const queryCache = this.#queryCache;
5560 const refetchFilters = {
5561 type: "active",
5562 ...filters
5563 };
5564 return import_notifyManager.notifyManager.batch(() => {
5565 queryCache.findAll(filters).forEach((query) => {
5566 query.reset();
5567 });
5568 return this.refetchQueries(refetchFilters, options);
5569 });
5570 }
5571 cancelQueries(filters, cancelOptions = {}) {
5572 const defaultedCancelOptions = { revert: true, ...cancelOptions };
5573 const promises = import_notifyManager.notifyManager.batch(
5574 () => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions))
5575 );
5576 return Promise.all(promises).then(import_utils.noop).catch(import_utils.noop);
5577 }
5578 invalidateQueries(filters, options = {}) {
5579 return import_notifyManager.notifyManager.batch(() => {
5580 this.#queryCache.findAll(filters).forEach((query) => {
5581 query.invalidate();
5582 });
5583 if (filters?.refetchType === "none") {
5584 return Promise.resolve();
5585 }
5586 const refetchFilters = {
5587 ...filters,
5588 type: filters?.refetchType ?? filters?.type ?? "active"
5589 };
5590 return this.refetchQueries(refetchFilters, options);
5591 });
5592 }
5593 refetchQueries(filters, options = {}) {
5594 const fetchOptions = {
5595 ...options,
5596 cancelRefetch: options.cancelRefetch ?? true
5597 };
5598 const promises = import_notifyManager.notifyManager.batch(
5599 () => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled()).map((query) => {
5600 let promise = query.fetch(void 0, fetchOptions);
5601 if (!fetchOptions.throwOnError) {
5602 promise = promise.catch(import_utils.noop);
5603 }
5604 return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
5605 })
5606 );
5607 return Promise.all(promises).then(import_utils.noop);
5608 }
5609 fetchQuery(options) {
5610 const defaultedOptions = this.defaultQueryOptions(options);
5611 if (defaultedOptions.retry === void 0) {
5612 defaultedOptions.retry = false;
5613 }
5614 const query = this.#queryCache.build(this, defaultedOptions);
5615 return query.isStaleByTime(
5616 (0, import_utils.resolveStaleTime)(defaultedOptions.staleTime, query)
5617 ) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);
5618 }
5619 prefetchQuery(options) {
5620 return this.fetchQuery(options).then(import_utils.noop).catch(import_utils.noop);
5621 }
5622 fetchInfiniteQuery(options) {
5623 options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(options.pages);
5624 return this.fetchQuery(options);
5625 }
5626 prefetchInfiniteQuery(options) {
5627 return this.fetchInfiniteQuery(options).then(import_utils.noop).catch(import_utils.noop);
5628 }
5629 ensureInfiniteQueryData(options) {
5630 options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(options.pages);
5631 return this.ensureQueryData(options);
5632 }
5633 resumePausedMutations() {
5634 if (import_onlineManager.onlineManager.isOnline()) {
5635 return this.#mutationCache.resumePausedMutations();
5636 }
5637 return Promise.resolve();
5638 }
5639 getQueryCache() {
5640 return this.#queryCache;
5641 }
5642 getMutationCache() {
5643 return this.#mutationCache;
5644 }
5645 getDefaultOptions() {
5646 return this.#defaultOptions;
5647 }
5648 setDefaultOptions(options) {
5649 this.#defaultOptions = options;
5650 }
5651 setQueryDefaults(queryKey, options) {
5652 this.#queryDefaults.set((0, import_utils.hashKey)(queryKey), {
5653 queryKey,
5654 defaultOptions: options
5655 });
5656 }
5657 getQueryDefaults(queryKey) {
5658 const defaults = [...this.#queryDefaults.values()];
5659 const result = {};
5660 defaults.forEach((queryDefault) => {
5661 if ((0, import_utils.partialMatchKey)(queryKey, queryDefault.queryKey)) {
5662 Object.assign(result, queryDefault.defaultOptions);
5663 }
5664 });
5665 return result;
5666 }
5667 setMutationDefaults(mutationKey, options) {
5668 this.#mutationDefaults.set((0, import_utils.hashKey)(mutationKey), {
5669 mutationKey,
5670 defaultOptions: options
5671 });
5672 }
5673 getMutationDefaults(mutationKey) {
5674 const defaults = [...this.#mutationDefaults.values()];
5675 let result = {};
5676 defaults.forEach((queryDefault) => {
5677 if ((0, import_utils.partialMatchKey)(mutationKey, queryDefault.mutationKey)) {
5678 result = { ...result, ...queryDefault.defaultOptions };
5679 }
5680 });
5681 return result;
5682 }
5683 defaultQueryOptions(options) {
5684 if (options._defaulted) {
5685 return options;
5686 }
5687 const defaultedOptions = {
5688 ...this.#defaultOptions.queries,
5689 ...this.getQueryDefaults(options.queryKey),
5690 ...options,
5691 _defaulted: true
5692 };
5693 if (!defaultedOptions.queryHash) {
5694 defaultedOptions.queryHash = (0, import_utils.hashQueryKeyByOptions)(
5695 defaultedOptions.queryKey,
5696 defaultedOptions
5697 );
5698 }
5699 if (defaultedOptions.refetchOnReconnect === void 0) {
5700 defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always";
5701 }
5702 if (defaultedOptions.throwOnError === void 0) {
5703 defaultedOptions.throwOnError = !!defaultedOptions.suspense;
5704 }
5705 if (!defaultedOptions.networkMode && defaultedOptions.persister) {
5706 defaultedOptions.networkMode = "offlineFirst";
5707 }
5708 if (defaultedOptions.queryFn === import_utils.skipToken) {
5709 defaultedOptions.enabled = false;
5710 }
5711 return defaultedOptions;
5712 }
5713 defaultMutationOptions(options) {
5714 if (options?._defaulted) {
5715 return options;
5716 }
5717 return {
5718 ...this.#defaultOptions.mutations,
5719 ...options?.mutationKey && this.getMutationDefaults(options.mutationKey),
5720 ...options,
5721 _defaulted: true
5722 };
5723 }
5724 clear() {
5725 this.#queryCache.clear();
5726 this.#mutationCache.clear();
5727 }
5728 };
5729 // Annotate the CommonJS export names for ESM import in node:
5730 0 && (0);
5731 //# sourceMappingURL=queryClient.cjs.map
5732
5733 /***/ }),
5734
5735 /***/ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs":
5736 /*!***************************************************************************!*\
5737 !*** ../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs ***!
5738 \***************************************************************************/
5739 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5740
5741 "use strict";
5742
5743 var __defProp = Object.defineProperty;
5744 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5745 var __getOwnPropNames = Object.getOwnPropertyNames;
5746 var __hasOwnProp = Object.prototype.hasOwnProperty;
5747 var __export = (target, all) => {
5748 for (var name in all)
5749 __defProp(target, name, { get: all[name], enumerable: true });
5750 };
5751 var __copyProps = (to, from, except, desc) => {
5752 if (from && typeof from === "object" || typeof from === "function") {
5753 for (let key of __getOwnPropNames(from))
5754 if (!__hasOwnProp.call(to, key) && key !== except)
5755 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5756 }
5757 return to;
5758 };
5759 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5760
5761 // src/queryObserver.ts
5762 var queryObserver_exports = {};
5763 __export(queryObserver_exports, {
5764 QueryObserver: () => QueryObserver
5765 });
5766 module.exports = __toCommonJS(queryObserver_exports);
5767 var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
5768 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
5769 var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs");
5770 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
5771 var import_thenable = __webpack_require__(/*! ./thenable.cjs */ "../node_modules/@tanstack/query-core/build/modern/thenable.cjs");
5772 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
5773 var QueryObserver = class extends import_subscribable.Subscribable {
5774 constructor(client, options) {
5775 super();
5776 this.options = options;
5777 this.#client = client;
5778 this.#selectError = null;
5779 this.#currentThenable = (0, import_thenable.pendingThenable)();
5780 if (!this.options.experimental_prefetchInRender) {
5781 this.#currentThenable.reject(
5782 new Error("experimental_prefetchInRender feature flag is not enabled")
5783 );
5784 }
5785 this.bindMethods();
5786 this.setOptions(options);
5787 }
5788 #client;
5789 #currentQuery = void 0;
5790 #currentQueryInitialState = void 0;
5791 #currentResult = void 0;
5792 #currentResultState;
5793 #currentResultOptions;
5794 #currentThenable;
5795 #selectError;
5796 #selectFn;
5797 #selectResult;
5798 // This property keeps track of the last query with defined data.
5799 // It will be used to pass the previous data and query to the placeholder function between renders.
5800 #lastQueryWithDefinedData;
5801 #staleTimeoutId;
5802 #refetchIntervalId;
5803 #currentRefetchInterval;
5804 #trackedProps = /* @__PURE__ */ new Set();
5805 bindMethods() {
5806 this.refetch = this.refetch.bind(this);
5807 }
5808 onSubscribe() {
5809 if (this.listeners.size === 1) {
5810 this.#currentQuery.addObserver(this);
5811 if (shouldFetchOnMount(this.#currentQuery, this.options)) {
5812 this.#executeFetch();
5813 } else {
5814 this.updateResult();
5815 }
5816 this.#updateTimers();
5817 }
5818 }
5819 onUnsubscribe() {
5820 if (!this.hasListeners()) {
5821 this.destroy();
5822 }
5823 }
5824 shouldFetchOnReconnect() {
5825 return shouldFetchOn(
5826 this.#currentQuery,
5827 this.options,
5828 this.options.refetchOnReconnect
5829 );
5830 }
5831 shouldFetchOnWindowFocus() {
5832 return shouldFetchOn(
5833 this.#currentQuery,
5834 this.options,
5835 this.options.refetchOnWindowFocus
5836 );
5837 }
5838 destroy() {
5839 this.listeners = /* @__PURE__ */ new Set();
5840 this.#clearStaleTimeout();
5841 this.#clearRefetchInterval();
5842 this.#currentQuery.removeObserver(this);
5843 }
5844 setOptions(options, notifyOptions) {
5845 const prevOptions = this.options;
5846 const prevQuery = this.#currentQuery;
5847 this.options = this.#client.defaultQueryOptions(options);
5848 if (this.options.enabled !== void 0 && typeof this.options.enabled !== "boolean" && typeof this.options.enabled !== "function" && typeof (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) !== "boolean") {
5849 throw new Error(
5850 "Expected enabled to be a boolean or a callback that returns a boolean"
5851 );
5852 }
5853 this.#updateQuery();
5854 this.#currentQuery.setOptions(this.options);
5855 if (prevOptions._defaulted && !(0, import_utils.shallowEqualObjects)(this.options, prevOptions)) {
5856 this.#client.getQueryCache().notify({
5857 type: "observerOptionsUpdated",
5858 query: this.#currentQuery,
5859 observer: this
5860 });
5861 }
5862 const mounted = this.hasListeners();
5863 if (mounted && shouldFetchOptionally(
5864 this.#currentQuery,
5865 prevQuery,
5866 this.options,
5867 prevOptions
5868 )) {
5869 this.#executeFetch();
5870 }
5871 this.updateResult(notifyOptions);
5872 if (mounted && (this.#currentQuery !== prevQuery || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) !== (0, import_utils.resolveEnabled)(prevOptions.enabled, this.#currentQuery) || (0, import_utils.resolveStaleTime)(this.options.staleTime, this.#currentQuery) !== (0, import_utils.resolveStaleTime)(prevOptions.staleTime, this.#currentQuery))) {
5873 this.#updateStaleTimeout();
5874 }
5875 const nextRefetchInterval = this.#computeRefetchInterval();
5876 if (mounted && (this.#currentQuery !== prevQuery || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) !== (0, import_utils.resolveEnabled)(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) {
5877 this.#updateRefetchInterval(nextRefetchInterval);
5878 }
5879 }
5880 getOptimisticResult(options) {
5881 const query = this.#client.getQueryCache().build(this.#client, options);
5882 const result = this.createResult(query, options);
5883 if (shouldAssignObserverCurrentProperties(this, result)) {
5884 this.#currentResult = result;
5885 this.#currentResultOptions = this.options;
5886 this.#currentResultState = this.#currentQuery.state;
5887 }
5888 return result;
5889 }
5890 getCurrentResult() {
5891 return this.#currentResult;
5892 }
5893 trackResult(result, onPropTracked) {
5894 const trackedResult = {};
5895 Object.keys(result).forEach((key) => {
5896 Object.defineProperty(trackedResult, key, {
5897 configurable: false,
5898 enumerable: true,
5899 get: () => {
5900 this.trackProp(key);
5901 onPropTracked?.(key);
5902 return result[key];
5903 }
5904 });
5905 });
5906 return trackedResult;
5907 }
5908 trackProp(key) {
5909 this.#trackedProps.add(key);
5910 }
5911 getCurrentQuery() {
5912 return this.#currentQuery;
5913 }
5914 refetch({ ...options } = {}) {
5915 return this.fetch({
5916 ...options
5917 });
5918 }
5919 fetchOptimistic(options) {
5920 const defaultedOptions = this.#client.defaultQueryOptions(options);
5921 const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);
5922 return query.fetch().then(() => this.createResult(query, defaultedOptions));
5923 }
5924 fetch(fetchOptions) {
5925 return this.#executeFetch({
5926 ...fetchOptions,
5927 cancelRefetch: fetchOptions.cancelRefetch ?? true
5928 }).then(() => {
5929 this.updateResult();
5930 return this.#currentResult;
5931 });
5932 }
5933 #executeFetch(fetchOptions) {
5934 this.#updateQuery();
5935 let promise = this.#currentQuery.fetch(
5936 this.options,
5937 fetchOptions
5938 );
5939 if (!fetchOptions?.throwOnError) {
5940 promise = promise.catch(import_utils.noop);
5941 }
5942 return promise;
5943 }
5944 #updateStaleTimeout() {
5945 this.#clearStaleTimeout();
5946 const staleTime = (0, import_utils.resolveStaleTime)(
5947 this.options.staleTime,
5948 this.#currentQuery
5949 );
5950 if (import_utils.isServer || this.#currentResult.isStale || !(0, import_utils.isValidTimeout)(staleTime)) {
5951 return;
5952 }
5953 const time = (0, import_utils.timeUntilStale)(this.#currentResult.dataUpdatedAt, staleTime);
5954 const timeout = time + 1;
5955 this.#staleTimeoutId = setTimeout(() => {
5956 if (!this.#currentResult.isStale) {
5957 this.updateResult();
5958 }
5959 }, timeout);
5960 }
5961 #computeRefetchInterval() {
5962 return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;
5963 }
5964 #updateRefetchInterval(nextInterval) {
5965 this.#clearRefetchInterval();
5966 this.#currentRefetchInterval = nextInterval;
5967 if (import_utils.isServer || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) === false || !(0, import_utils.isValidTimeout)(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {
5968 return;
5969 }
5970 this.#refetchIntervalId = setInterval(() => {
5971 if (this.options.refetchIntervalInBackground || import_focusManager.focusManager.isFocused()) {
5972 this.#executeFetch();
5973 }
5974 }, this.#currentRefetchInterval);
5975 }
5976 #updateTimers() {
5977 this.#updateStaleTimeout();
5978 this.#updateRefetchInterval(this.#computeRefetchInterval());
5979 }
5980 #clearStaleTimeout() {
5981 if (this.#staleTimeoutId) {
5982 clearTimeout(this.#staleTimeoutId);
5983 this.#staleTimeoutId = void 0;
5984 }
5985 }
5986 #clearRefetchInterval() {
5987 if (this.#refetchIntervalId) {
5988 clearInterval(this.#refetchIntervalId);
5989 this.#refetchIntervalId = void 0;
5990 }
5991 }
5992 createResult(query, options) {
5993 const prevQuery = this.#currentQuery;
5994 const prevOptions = this.options;
5995 const prevResult = this.#currentResult;
5996 const prevResultState = this.#currentResultState;
5997 const prevResultOptions = this.#currentResultOptions;
5998 const queryChange = query !== prevQuery;
5999 const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState;
6000 const { state } = query;
6001 let newState = { ...state };
6002 let isPlaceholderData = false;
6003 let data;
6004 if (options._optimisticResults) {
6005 const mounted = this.hasListeners();
6006 const fetchOnMount = !mounted && shouldFetchOnMount(query, options);
6007 const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);
6008 if (fetchOnMount || fetchOptionally) {
6009 newState = {
6010 ...newState,
6011 ...(0, import_query.fetchState)(state.data, query.options)
6012 };
6013 }
6014 if (options._optimisticResults === "isRestoring") {
6015 newState.fetchStatus = "idle";
6016 }
6017 }
6018 let { error, errorUpdatedAt, status } = newState;
6019 if (options.select && newState.data !== void 0) {
6020 if (prevResult && newState.data === prevResultState?.data && options.select === this.#selectFn) {
6021 data = this.#selectResult;
6022 } else {
6023 try {
6024 this.#selectFn = options.select;
6025 data = options.select(newState.data);
6026 data = (0, import_utils.replaceData)(prevResult?.data, data, options);
6027 this.#selectResult = data;
6028 this.#selectError = null;
6029 } catch (selectError) {
6030 this.#selectError = selectError;
6031 }
6032 }
6033 } else {
6034 data = newState.data;
6035 }
6036 if (options.placeholderData !== void 0 && data === void 0 && status === "pending") {
6037 let placeholderData;
6038 if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {
6039 placeholderData = prevResult.data;
6040 } else {
6041 placeholderData = typeof options.placeholderData === "function" ? options.placeholderData(
6042 this.#lastQueryWithDefinedData?.state.data,
6043 this.#lastQueryWithDefinedData
6044 ) : options.placeholderData;
6045 if (options.select && placeholderData !== void 0) {
6046 try {
6047 placeholderData = options.select(placeholderData);
6048 this.#selectError = null;
6049 } catch (selectError) {
6050 this.#selectError = selectError;
6051 }
6052 }
6053 }
6054 if (placeholderData !== void 0) {
6055 status = "success";
6056 data = (0, import_utils.replaceData)(
6057 prevResult?.data,
6058 placeholderData,
6059 options
6060 );
6061 isPlaceholderData = true;
6062 }
6063 }
6064 if (this.#selectError) {
6065 error = this.#selectError;
6066 data = this.#selectResult;
6067 errorUpdatedAt = Date.now();
6068 status = "error";
6069 }
6070 const isFetching = newState.fetchStatus === "fetching";
6071 const isPending = status === "pending";
6072 const isError = status === "error";
6073 const isLoading = isPending && isFetching;
6074 const hasData = data !== void 0;
6075 const result = {
6076 status,
6077 fetchStatus: newState.fetchStatus,
6078 isPending,
6079 isSuccess: status === "success",
6080 isError,
6081 isInitialLoading: isLoading,
6082 isLoading,
6083 data,
6084 dataUpdatedAt: newState.dataUpdatedAt,
6085 error,
6086 errorUpdatedAt,
6087 failureCount: newState.fetchFailureCount,
6088 failureReason: newState.fetchFailureReason,
6089 errorUpdateCount: newState.errorUpdateCount,
6090 isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0,
6091 isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,
6092 isFetching,
6093 isRefetching: isFetching && !isPending,
6094 isLoadingError: isError && !hasData,
6095 isPaused: newState.fetchStatus === "paused",
6096 isPlaceholderData,
6097 isRefetchError: isError && hasData,
6098 isStale: isStale(query, options),
6099 refetch: this.refetch,
6100 promise: this.#currentThenable
6101 };
6102 const nextResult = result;
6103 if (this.options.experimental_prefetchInRender) {
6104 const finalizeThenableIfPossible = (thenable) => {
6105 if (nextResult.status === "error") {
6106 thenable.reject(nextResult.error);
6107 } else if (nextResult.data !== void 0) {
6108 thenable.resolve(nextResult.data);
6109 }
6110 };
6111 const recreateThenable = () => {
6112 const pending = this.#currentThenable = nextResult.promise = (0, import_thenable.pendingThenable)();
6113 finalizeThenableIfPossible(pending);
6114 };
6115 const prevThenable = this.#currentThenable;
6116 switch (prevThenable.status) {
6117 case "pending":
6118 if (query.queryHash === prevQuery.queryHash) {
6119 finalizeThenableIfPossible(prevThenable);
6120 }
6121 break;
6122 case "fulfilled":
6123 if (nextResult.status === "error" || nextResult.data !== prevThenable.value) {
6124 recreateThenable();
6125 }
6126 break;
6127 case "rejected":
6128 if (nextResult.status !== "error" || nextResult.error !== prevThenable.reason) {
6129 recreateThenable();
6130 }
6131 break;
6132 }
6133 }
6134 return nextResult;
6135 }
6136 updateResult(notifyOptions) {
6137 const prevResult = this.#currentResult;
6138 const nextResult = this.createResult(this.#currentQuery, this.options);
6139 this.#currentResultState = this.#currentQuery.state;
6140 this.#currentResultOptions = this.options;
6141 if (this.#currentResultState.data !== void 0) {
6142 this.#lastQueryWithDefinedData = this.#currentQuery;
6143 }
6144 if ((0, import_utils.shallowEqualObjects)(nextResult, prevResult)) {
6145 return;
6146 }
6147 this.#currentResult = nextResult;
6148 const defaultNotifyOptions = {};
6149 const shouldNotifyListeners = () => {
6150 if (!prevResult) {
6151 return true;
6152 }
6153 const { notifyOnChangeProps } = this.options;
6154 const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps;
6155 if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !this.#trackedProps.size) {
6156 return true;
6157 }
6158 const includedProps = new Set(
6159 notifyOnChangePropsValue ?? this.#trackedProps
6160 );
6161 if (this.options.throwOnError) {
6162 includedProps.add("error");
6163 }
6164 return Object.keys(this.#currentResult).some((key) => {
6165 const typedKey = key;
6166 const changed = this.#currentResult[typedKey] !== prevResult[typedKey];
6167 return changed && includedProps.has(typedKey);
6168 });
6169 };
6170 if (notifyOptions?.listeners !== false && shouldNotifyListeners()) {
6171 defaultNotifyOptions.listeners = true;
6172 }
6173 this.#notify({ ...defaultNotifyOptions, ...notifyOptions });
6174 }
6175 #updateQuery() {
6176 const query = this.#client.getQueryCache().build(this.#client, this.options);
6177 if (query === this.#currentQuery) {
6178 return;
6179 }
6180 const prevQuery = this.#currentQuery;
6181 this.#currentQuery = query;
6182 this.#currentQueryInitialState = query.state;
6183 if (this.hasListeners()) {
6184 prevQuery?.removeObserver(this);
6185 query.addObserver(this);
6186 }
6187 }
6188 onQueryUpdate() {
6189 this.updateResult();
6190 if (this.hasListeners()) {
6191 this.#updateTimers();
6192 }
6193 }
6194 #notify(notifyOptions) {
6195 import_notifyManager.notifyManager.batch(() => {
6196 if (notifyOptions.listeners) {
6197 this.listeners.forEach((listener) => {
6198 listener(this.#currentResult);
6199 });
6200 }
6201 this.#client.getQueryCache().notify({
6202 query: this.#currentQuery,
6203 type: "observerResultsUpdated"
6204 });
6205 });
6206 }
6207 };
6208 function shouldLoadOnMount(query, options) {
6209 return (0, import_utils.resolveEnabled)(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && options.retryOnMount === false);
6210 }
6211 function shouldFetchOnMount(query, options) {
6212 return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);
6213 }
6214 function shouldFetchOn(query, options, field) {
6215 if ((0, import_utils.resolveEnabled)(options.enabled, query) !== false) {
6216 const value = typeof field === "function" ? field(query) : field;
6217 return value === "always" || value !== false && isStale(query, options);
6218 }
6219 return false;
6220 }
6221 function shouldFetchOptionally(query, prevQuery, options, prevOptions) {
6222 return (query !== prevQuery || (0, import_utils.resolveEnabled)(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
6223 }
6224 function isStale(query, options) {
6225 return (0, import_utils.resolveEnabled)(options.enabled, query) !== false && query.isStaleByTime((0, import_utils.resolveStaleTime)(options.staleTime, query));
6226 }
6227 function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
6228 if (!(0, import_utils.shallowEqualObjects)(observer.getCurrentResult(), optimisticResult)) {
6229 return true;
6230 }
6231 return false;
6232 }
6233 // Annotate the CommonJS export names for ESM import in node:
6234 0 && (0);
6235 //# sourceMappingURL=queryObserver.cjs.map
6236
6237 /***/ }),
6238
6239 /***/ "../node_modules/@tanstack/query-core/build/modern/removable.cjs":
6240 /*!***********************************************************************!*\
6241 !*** ../node_modules/@tanstack/query-core/build/modern/removable.cjs ***!
6242 \***********************************************************************/
6243 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6244
6245 "use strict";
6246
6247 var __defProp = Object.defineProperty;
6248 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6249 var __getOwnPropNames = Object.getOwnPropertyNames;
6250 var __hasOwnProp = Object.prototype.hasOwnProperty;
6251 var __export = (target, all) => {
6252 for (var name in all)
6253 __defProp(target, name, { get: all[name], enumerable: true });
6254 };
6255 var __copyProps = (to, from, except, desc) => {
6256 if (from && typeof from === "object" || typeof from === "function") {
6257 for (let key of __getOwnPropNames(from))
6258 if (!__hasOwnProp.call(to, key) && key !== except)
6259 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6260 }
6261 return to;
6262 };
6263 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6264
6265 // src/removable.ts
6266 var removable_exports = {};
6267 __export(removable_exports, {
6268 Removable: () => Removable
6269 });
6270 module.exports = __toCommonJS(removable_exports);
6271 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
6272 var Removable = class {
6273 #gcTimeout;
6274 destroy() {
6275 this.clearGcTimeout();
6276 }
6277 scheduleGc() {
6278 this.clearGcTimeout();
6279 if ((0, import_utils.isValidTimeout)(this.gcTime)) {
6280 this.#gcTimeout = setTimeout(() => {
6281 this.optionalRemove();
6282 }, this.gcTime);
6283 }
6284 }
6285 updateGcTime(newGcTime) {
6286 this.gcTime = Math.max(
6287 this.gcTime || 0,
6288 newGcTime ?? (import_utils.isServer ? Infinity : 5 * 60 * 1e3)
6289 );
6290 }
6291 clearGcTimeout() {
6292 if (this.#gcTimeout) {
6293 clearTimeout(this.#gcTimeout);
6294 this.#gcTimeout = void 0;
6295 }
6296 }
6297 };
6298 // Annotate the CommonJS export names for ESM import in node:
6299 0 && (0);
6300 //# sourceMappingURL=removable.cjs.map
6301
6302 /***/ }),
6303
6304 /***/ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs":
6305 /*!*********************************************************************!*\
6306 !*** ../node_modules/@tanstack/query-core/build/modern/retryer.cjs ***!
6307 \*********************************************************************/
6308 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6309
6310 "use strict";
6311
6312 var __defProp = Object.defineProperty;
6313 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6314 var __getOwnPropNames = Object.getOwnPropertyNames;
6315 var __hasOwnProp = Object.prototype.hasOwnProperty;
6316 var __export = (target, all) => {
6317 for (var name in all)
6318 __defProp(target, name, { get: all[name], enumerable: true });
6319 };
6320 var __copyProps = (to, from, except, desc) => {
6321 if (from && typeof from === "object" || typeof from === "function") {
6322 for (let key of __getOwnPropNames(from))
6323 if (!__hasOwnProp.call(to, key) && key !== except)
6324 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6325 }
6326 return to;
6327 };
6328 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6329
6330 // src/retryer.ts
6331 var retryer_exports = {};
6332 __export(retryer_exports, {
6333 CancelledError: () => CancelledError,
6334 canFetch: () => canFetch,
6335 createRetryer: () => createRetryer,
6336 isCancelledError: () => isCancelledError
6337 });
6338 module.exports = __toCommonJS(retryer_exports);
6339 var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
6340 var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
6341 var import_thenable = __webpack_require__(/*! ./thenable.cjs */ "../node_modules/@tanstack/query-core/build/modern/thenable.cjs");
6342 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
6343 function defaultRetryDelay(failureCount) {
6344 return Math.min(1e3 * 2 ** failureCount, 3e4);
6345 }
6346 function canFetch(networkMode) {
6347 return (networkMode ?? "online") === "online" ? import_onlineManager.onlineManager.isOnline() : true;
6348 }
6349 var CancelledError = class extends Error {
6350 constructor(options) {
6351 super("CancelledError");
6352 this.revert = options?.revert;
6353 this.silent = options?.silent;
6354 }
6355 };
6356 function isCancelledError(value) {
6357 return value instanceof CancelledError;
6358 }
6359 function createRetryer(config) {
6360 let isRetryCancelled = false;
6361 let failureCount = 0;
6362 let isResolved = false;
6363 let continueFn;
6364 const thenable = (0, import_thenable.pendingThenable)();
6365 const cancel = (cancelOptions) => {
6366 if (!isResolved) {
6367 reject(new CancelledError(cancelOptions));
6368 config.abort?.();
6369 }
6370 };
6371 const cancelRetry = () => {
6372 isRetryCancelled = true;
6373 };
6374 const continueRetry = () => {
6375 isRetryCancelled = false;
6376 };
6377 const canContinue = () => import_focusManager.focusManager.isFocused() && (config.networkMode === "always" || import_onlineManager.onlineManager.isOnline()) && config.canRun();
6378 const canStart = () => canFetch(config.networkMode) && config.canRun();
6379 const resolve = (value) => {
6380 if (!isResolved) {
6381 isResolved = true;
6382 config.onSuccess?.(value);
6383 continueFn?.();
6384 thenable.resolve(value);
6385 }
6386 };
6387 const reject = (value) => {
6388 if (!isResolved) {
6389 isResolved = true;
6390 config.onError?.(value);
6391 continueFn?.();
6392 thenable.reject(value);
6393 }
6394 };
6395 const pause = () => {
6396 return new Promise((continueResolve) => {
6397 continueFn = (value) => {
6398 if (isResolved || canContinue()) {
6399 continueResolve(value);
6400 }
6401 };
6402 config.onPause?.();
6403 }).then(() => {
6404 continueFn = void 0;
6405 if (!isResolved) {
6406 config.onContinue?.();
6407 }
6408 });
6409 };
6410 const run = () => {
6411 if (isResolved) {
6412 return;
6413 }
6414 let promiseOrValue;
6415 const initialPromise = failureCount === 0 ? config.initialPromise : void 0;
6416 try {
6417 promiseOrValue = initialPromise ?? config.fn();
6418 } catch (error) {
6419 promiseOrValue = Promise.reject(error);
6420 }
6421 Promise.resolve(promiseOrValue).then(resolve).catch((error) => {
6422 if (isResolved) {
6423 return;
6424 }
6425 const retry = config.retry ?? (import_utils.isServer ? 0 : 3);
6426 const retryDelay = config.retryDelay ?? defaultRetryDelay;
6427 const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay;
6428 const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error);
6429 if (isRetryCancelled || !shouldRetry) {
6430 reject(error);
6431 return;
6432 }
6433 failureCount++;
6434 config.onFail?.(failureCount, error);
6435 (0, import_utils.sleep)(delay).then(() => {
6436 return canContinue() ? void 0 : pause();
6437 }).then(() => {
6438 if (isRetryCancelled) {
6439 reject(error);
6440 } else {
6441 run();
6442 }
6443 });
6444 });
6445 };
6446 return {
6447 promise: thenable,
6448 cancel,
6449 continue: () => {
6450 continueFn?.();
6451 return thenable;
6452 },
6453 cancelRetry,
6454 continueRetry,
6455 canStart,
6456 start: () => {
6457 if (canStart()) {
6458 run();
6459 } else {
6460 pause().then(run);
6461 }
6462 return thenable;
6463 }
6464 };
6465 }
6466 // Annotate the CommonJS export names for ESM import in node:
6467 0 && (0);
6468 //# sourceMappingURL=retryer.cjs.map
6469
6470 /***/ }),
6471
6472 /***/ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs":
6473 /*!**************************************************************************!*\
6474 !*** ../node_modules/@tanstack/query-core/build/modern/subscribable.cjs ***!
6475 \**************************************************************************/
6476 /***/ ((module) => {
6477
6478 "use strict";
6479
6480 var __defProp = Object.defineProperty;
6481 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6482 var __getOwnPropNames = Object.getOwnPropertyNames;
6483 var __hasOwnProp = Object.prototype.hasOwnProperty;
6484 var __export = (target, all) => {
6485 for (var name in all)
6486 __defProp(target, name, { get: all[name], enumerable: true });
6487 };
6488 var __copyProps = (to, from, except, desc) => {
6489 if (from && typeof from === "object" || typeof from === "function") {
6490 for (let key of __getOwnPropNames(from))
6491 if (!__hasOwnProp.call(to, key) && key !== except)
6492 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6493 }
6494 return to;
6495 };
6496 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6497
6498 // src/subscribable.ts
6499 var subscribable_exports = {};
6500 __export(subscribable_exports, {
6501 Subscribable: () => Subscribable
6502 });
6503 module.exports = __toCommonJS(subscribable_exports);
6504 var Subscribable = class {
6505 constructor() {
6506 this.listeners = /* @__PURE__ */ new Set();
6507 this.subscribe = this.subscribe.bind(this);
6508 }
6509 subscribe(listener) {
6510 this.listeners.add(listener);
6511 this.onSubscribe();
6512 return () => {
6513 this.listeners.delete(listener);
6514 this.onUnsubscribe();
6515 };
6516 }
6517 hasListeners() {
6518 return this.listeners.size > 0;
6519 }
6520 onSubscribe() {
6521 }
6522 onUnsubscribe() {
6523 }
6524 };
6525 // Annotate the CommonJS export names for ESM import in node:
6526 0 && (0);
6527 //# sourceMappingURL=subscribable.cjs.map
6528
6529 /***/ }),
6530
6531 /***/ "../node_modules/@tanstack/query-core/build/modern/thenable.cjs":
6532 /*!**********************************************************************!*\
6533 !*** ../node_modules/@tanstack/query-core/build/modern/thenable.cjs ***!
6534 \**********************************************************************/
6535 /***/ ((module) => {
6536
6537 "use strict";
6538
6539 var __defProp = Object.defineProperty;
6540 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6541 var __getOwnPropNames = Object.getOwnPropertyNames;
6542 var __hasOwnProp = Object.prototype.hasOwnProperty;
6543 var __export = (target, all) => {
6544 for (var name in all)
6545 __defProp(target, name, { get: all[name], enumerable: true });
6546 };
6547 var __copyProps = (to, from, except, desc) => {
6548 if (from && typeof from === "object" || typeof from === "function") {
6549 for (let key of __getOwnPropNames(from))
6550 if (!__hasOwnProp.call(to, key) && key !== except)
6551 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6552 }
6553 return to;
6554 };
6555 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6556
6557 // src/thenable.ts
6558 var thenable_exports = {};
6559 __export(thenable_exports, {
6560 pendingThenable: () => pendingThenable
6561 });
6562 module.exports = __toCommonJS(thenable_exports);
6563 function pendingThenable() {
6564 let resolve;
6565 let reject;
6566 const thenable = new Promise((_resolve, _reject) => {
6567 resolve = _resolve;
6568 reject = _reject;
6569 });
6570 thenable.status = "pending";
6571 thenable.catch(() => {
6572 });
6573 function finalize(data) {
6574 Object.assign(thenable, data);
6575 delete thenable.resolve;
6576 delete thenable.reject;
6577 }
6578 thenable.resolve = (value) => {
6579 finalize({
6580 status: "fulfilled",
6581 value
6582 });
6583 resolve(value);
6584 };
6585 thenable.reject = (reason) => {
6586 finalize({
6587 status: "rejected",
6588 reason
6589 });
6590 reject(reason);
6591 };
6592 return thenable;
6593 }
6594 // Annotate the CommonJS export names for ESM import in node:
6595 0 && (0);
6596 //# sourceMappingURL=thenable.cjs.map
6597
6598 /***/ }),
6599
6600 /***/ "../node_modules/@tanstack/query-core/build/modern/types.cjs":
6601 /*!*******************************************************************!*\
6602 !*** ../node_modules/@tanstack/query-core/build/modern/types.cjs ***!
6603 \*******************************************************************/
6604 /***/ ((module) => {
6605
6606 "use strict";
6607
6608 var __defProp = Object.defineProperty;
6609 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6610 var __getOwnPropNames = Object.getOwnPropertyNames;
6611 var __hasOwnProp = Object.prototype.hasOwnProperty;
6612 var __copyProps = (to, from, except, desc) => {
6613 if (from && typeof from === "object" || typeof from === "function") {
6614 for (let key of __getOwnPropNames(from))
6615 if (!__hasOwnProp.call(to, key) && key !== except)
6616 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6617 }
6618 return to;
6619 };
6620 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6621
6622 // src/types.ts
6623 var types_exports = {};
6624 module.exports = __toCommonJS(types_exports);
6625 //# sourceMappingURL=types.cjs.map
6626
6627 /***/ }),
6628
6629 /***/ "../node_modules/@tanstack/query-core/build/modern/utils.cjs":
6630 /*!*******************************************************************!*\
6631 !*** ../node_modules/@tanstack/query-core/build/modern/utils.cjs ***!
6632 \*******************************************************************/
6633 /***/ ((module) => {
6634
6635 "use strict";
6636
6637 var __defProp = Object.defineProperty;
6638 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6639 var __getOwnPropNames = Object.getOwnPropertyNames;
6640 var __hasOwnProp = Object.prototype.hasOwnProperty;
6641 var __export = (target, all) => {
6642 for (var name in all)
6643 __defProp(target, name, { get: all[name], enumerable: true });
6644 };
6645 var __copyProps = (to, from, except, desc) => {
6646 if (from && typeof from === "object" || typeof from === "function") {
6647 for (let key of __getOwnPropNames(from))
6648 if (!__hasOwnProp.call(to, key) && key !== except)
6649 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6650 }
6651 return to;
6652 };
6653 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6654
6655 // src/utils.ts
6656 var utils_exports = {};
6657 __export(utils_exports, {
6658 addToEnd: () => addToEnd,
6659 addToStart: () => addToStart,
6660 ensureQueryFn: () => ensureQueryFn,
6661 functionalUpdate: () => functionalUpdate,
6662 hashKey: () => hashKey,
6663 hashQueryKeyByOptions: () => hashQueryKeyByOptions,
6664 isPlainArray: () => isPlainArray,
6665 isPlainObject: () => isPlainObject,
6666 isServer: () => isServer,
6667 isValidTimeout: () => isValidTimeout,
6668 keepPreviousData: () => keepPreviousData,
6669 matchMutation: () => matchMutation,
6670 matchQuery: () => matchQuery,
6671 noop: () => noop,
6672 partialMatchKey: () => partialMatchKey,
6673 replaceData: () => replaceData,
6674 replaceEqualDeep: () => replaceEqualDeep,
6675 resolveEnabled: () => resolveEnabled,
6676 resolveStaleTime: () => resolveStaleTime,
6677 shallowEqualObjects: () => shallowEqualObjects,
6678 skipToken: () => skipToken,
6679 sleep: () => sleep,
6680 timeUntilStale: () => timeUntilStale
6681 });
6682 module.exports = __toCommonJS(utils_exports);
6683 var isServer = typeof window === "undefined" || "Deno" in globalThis;
6684 function noop() {
6685 }
6686 function functionalUpdate(updater, input) {
6687 return typeof updater === "function" ? updater(input) : updater;
6688 }
6689 function isValidTimeout(value) {
6690 return typeof value === "number" && value >= 0 && value !== Infinity;
6691 }
6692 function timeUntilStale(updatedAt, staleTime) {
6693 return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);
6694 }
6695 function resolveStaleTime(staleTime, query) {
6696 return typeof staleTime === "function" ? staleTime(query) : staleTime;
6697 }
6698 function resolveEnabled(enabled, query) {
6699 return typeof enabled === "function" ? enabled(query) : enabled;
6700 }
6701 function matchQuery(filters, query) {
6702 const {
6703 type = "all",
6704 exact,
6705 fetchStatus,
6706 predicate,
6707 queryKey,
6708 stale
6709 } = filters;
6710 if (queryKey) {
6711 if (exact) {
6712 if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {
6713 return false;
6714 }
6715 } else if (!partialMatchKey(query.queryKey, queryKey)) {
6716 return false;
6717 }
6718 }
6719 if (type !== "all") {
6720 const isActive = query.isActive();
6721 if (type === "active" && !isActive) {
6722 return false;
6723 }
6724 if (type === "inactive" && isActive) {
6725 return false;
6726 }
6727 }
6728 if (typeof stale === "boolean" && query.isStale() !== stale) {
6729 return false;
6730 }
6731 if (fetchStatus && fetchStatus !== query.state.fetchStatus) {
6732 return false;
6733 }
6734 if (predicate && !predicate(query)) {
6735 return false;
6736 }
6737 return true;
6738 }
6739 function matchMutation(filters, mutation) {
6740 const { exact, status, predicate, mutationKey } = filters;
6741 if (mutationKey) {
6742 if (!mutation.options.mutationKey) {
6743 return false;
6744 }
6745 if (exact) {
6746 if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) {
6747 return false;
6748 }
6749 } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {
6750 return false;
6751 }
6752 }
6753 if (status && mutation.state.status !== status) {
6754 return false;
6755 }
6756 if (predicate && !predicate(mutation)) {
6757 return false;
6758 }
6759 return true;
6760 }
6761 function hashQueryKeyByOptions(queryKey, options) {
6762 const hashFn = options?.queryKeyHashFn || hashKey;
6763 return hashFn(queryKey);
6764 }
6765 function hashKey(queryKey) {
6766 return JSON.stringify(
6767 queryKey,
6768 (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {
6769 result[key] = val[key];
6770 return result;
6771 }, {}) : val
6772 );
6773 }
6774 function partialMatchKey(a, b) {
6775 if (a === b) {
6776 return true;
6777 }
6778 if (typeof a !== typeof b) {
6779 return false;
6780 }
6781 if (a && b && typeof a === "object" && typeof b === "object") {
6782 return !Object.keys(b).some((key) => !partialMatchKey(a[key], b[key]));
6783 }
6784 return false;
6785 }
6786 function replaceEqualDeep(a, b) {
6787 if (a === b) {
6788 return a;
6789 }
6790 const array = isPlainArray(a) && isPlainArray(b);
6791 if (array || isPlainObject(a) && isPlainObject(b)) {
6792 const aItems = array ? a : Object.keys(a);
6793 const aSize = aItems.length;
6794 const bItems = array ? b : Object.keys(b);
6795 const bSize = bItems.length;
6796 const copy = array ? [] : {};
6797 let equalItems = 0;
6798 for (let i = 0; i < bSize; i++) {
6799 const key = array ? i : bItems[i];
6800 if ((!array && aItems.includes(key) || array) && a[key] === void 0 && b[key] === void 0) {
6801 copy[key] = void 0;
6802 equalItems++;
6803 } else {
6804 copy[key] = replaceEqualDeep(a[key], b[key]);
6805 if (copy[key] === a[key] && a[key] !== void 0) {
6806 equalItems++;
6807 }
6808 }
6809 }
6810 return aSize === bSize && equalItems === aSize ? a : copy;
6811 }
6812 return b;
6813 }
6814 function shallowEqualObjects(a, b) {
6815 if (!b || Object.keys(a).length !== Object.keys(b).length) {
6816 return false;
6817 }
6818 for (const key in a) {
6819 if (a[key] !== b[key]) {
6820 return false;
6821 }
6822 }
6823 return true;
6824 }
6825 function isPlainArray(value) {
6826 return Array.isArray(value) && value.length === Object.keys(value).length;
6827 }
6828 function isPlainObject(o) {
6829 if (!hasObjectPrototype(o)) {
6830 return false;
6831 }
6832 const ctor = o.constructor;
6833 if (ctor === void 0) {
6834 return true;
6835 }
6836 const prot = ctor.prototype;
6837 if (!hasObjectPrototype(prot)) {
6838 return false;
6839 }
6840 if (!prot.hasOwnProperty("isPrototypeOf")) {
6841 return false;
6842 }
6843 if (Object.getPrototypeOf(o) !== Object.prototype) {
6844 return false;
6845 }
6846 return true;
6847 }
6848 function hasObjectPrototype(o) {
6849 return Object.prototype.toString.call(o) === "[object Object]";
6850 }
6851 function sleep(timeout) {
6852 return new Promise((resolve) => {
6853 setTimeout(resolve, timeout);
6854 });
6855 }
6856 function replaceData(prevData, data, options) {
6857 if (typeof options.structuralSharing === "function") {
6858 return options.structuralSharing(prevData, data);
6859 } else if (options.structuralSharing !== false) {
6860 if (true) {
6861 try {
6862 return replaceEqualDeep(prevData, data);
6863 } catch (error) {
6864 console.error(
6865 `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${options.queryHash}]: ${error}`
6866 );
6867 }
6868 }
6869 return replaceEqualDeep(prevData, data);
6870 }
6871 return data;
6872 }
6873 function keepPreviousData(previousData) {
6874 return previousData;
6875 }
6876 function addToEnd(items, item, max = 0) {
6877 const newItems = [...items, item];
6878 return max && newItems.length > max ? newItems.slice(1) : newItems;
6879 }
6880 function addToStart(items, item, max = 0) {
6881 const newItems = [item, ...items];
6882 return max && newItems.length > max ? newItems.slice(0, -1) : newItems;
6883 }
6884 var skipToken = Symbol();
6885 function ensureQueryFn(options, fetchOptions) {
6886 if (true) {
6887 if (options.queryFn === skipToken) {
6888 console.error(
6889 `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`
6890 );
6891 }
6892 }
6893 if (!options.queryFn && fetchOptions?.initialPromise) {
6894 return () => fetchOptions.initialPromise;
6895 }
6896 if (!options.queryFn || options.queryFn === skipToken) {
6897 return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`));
6898 }
6899 return options.queryFn;
6900 }
6901 // Annotate the CommonJS export names for ESM import in node:
6902 0 && (0);
6903 //# sourceMappingURL=utils.cjs.map
6904
6905 /***/ }),
6906
6907 /***/ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs":
6908 /*!********************************************************************************!*\
6909 !*** ../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs ***!
6910 \********************************************************************************/
6911 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6912
6913 "use strict";
6914
6915 "use client";
6916 var __create = Object.create;
6917 var __defProp = Object.defineProperty;
6918 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6919 var __getOwnPropNames = Object.getOwnPropertyNames;
6920 var __getProtoOf = Object.getPrototypeOf;
6921 var __hasOwnProp = Object.prototype.hasOwnProperty;
6922 var __export = (target, all) => {
6923 for (var name in all)
6924 __defProp(target, name, { get: all[name], enumerable: true });
6925 };
6926 var __copyProps = (to, from, except, desc) => {
6927 if (from && typeof from === "object" || typeof from === "function") {
6928 for (let key of __getOwnPropNames(from))
6929 if (!__hasOwnProp.call(to, key) && key !== except)
6930 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6931 }
6932 return to;
6933 };
6934 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
6935 // If the importer is in node compatibility mode or this is not an ESM
6936 // file that has been converted to a CommonJS file using a Babel-
6937 // compatible transform (i.e. "__esModule" has not been set), then set
6938 // "default" to the CommonJS "module.exports" for node compatibility.
6939 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
6940 mod
6941 ));
6942 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6943
6944 // src/HydrationBoundary.tsx
6945 var HydrationBoundary_exports = {};
6946 __export(HydrationBoundary_exports, {
6947 HydrationBoundary: () => HydrationBoundary
6948 });
6949 module.exports = __toCommonJS(HydrationBoundary_exports);
6950 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
6951 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6952 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
6953 var HydrationBoundary = ({
6954 children,
6955 options = {},
6956 state,
6957 queryClient
6958 }) => {
6959 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
6960 const [hydrationQueue, setHydrationQueue] = React.useState();
6961 const optionsRef = React.useRef(options);
6962 optionsRef.current = options;
6963 React.useMemo(() => {
6964 if (state) {
6965 if (typeof state !== "object") {
6966 return;
6967 }
6968 const queryCache = client.getQueryCache();
6969 const queries = state.queries || [];
6970 const newQueries = [];
6971 const existingQueries = [];
6972 for (const dehydratedQuery of queries) {
6973 const existingQuery = queryCache.get(dehydratedQuery.queryHash);
6974 if (!existingQuery) {
6975 newQueries.push(dehydratedQuery);
6976 } else {
6977 const hydrationIsNewer = dehydratedQuery.state.dataUpdatedAt > existingQuery.state.dataUpdatedAt;
6978 const queryAlreadyQueued = hydrationQueue?.find(
6979 (query) => query.queryHash === dehydratedQuery.queryHash
6980 );
6981 if (hydrationIsNewer && (!queryAlreadyQueued || dehydratedQuery.state.dataUpdatedAt > queryAlreadyQueued.state.dataUpdatedAt)) {
6982 existingQueries.push(dehydratedQuery);
6983 }
6984 }
6985 }
6986 if (newQueries.length > 0) {
6987 (0, import_query_core.hydrate)(client, { queries: newQueries }, optionsRef.current);
6988 }
6989 if (existingQueries.length > 0) {
6990 setHydrationQueue(
6991 (prev) => prev ? [...prev, ...existingQueries] : existingQueries
6992 );
6993 }
6994 }
6995 }, [client, hydrationQueue, state]);
6996 React.useEffect(() => {
6997 if (hydrationQueue) {
6998 (0, import_query_core.hydrate)(client, { queries: hydrationQueue }, optionsRef.current);
6999 setHydrationQueue(void 0);
7000 }
7001 }, [client, hydrationQueue]);
7002 return children;
7003 };
7004 // Annotate the CommonJS export names for ESM import in node:
7005 0 && (0);
7006 //# sourceMappingURL=HydrationBoundary.cjs.map
7007
7008 /***/ }),
7009
7010 /***/ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs":
7011 /*!**********************************************************************************!*\
7012 !*** ../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs ***!
7013 \**********************************************************************************/
7014 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7015
7016 "use strict";
7017
7018 "use client";
7019 var __create = Object.create;
7020 var __defProp = Object.defineProperty;
7021 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7022 var __getOwnPropNames = Object.getOwnPropertyNames;
7023 var __getProtoOf = Object.getPrototypeOf;
7024 var __hasOwnProp = Object.prototype.hasOwnProperty;
7025 var __export = (target, all) => {
7026 for (var name in all)
7027 __defProp(target, name, { get: all[name], enumerable: true });
7028 };
7029 var __copyProps = (to, from, except, desc) => {
7030 if (from && typeof from === "object" || typeof from === "function") {
7031 for (let key of __getOwnPropNames(from))
7032 if (!__hasOwnProp.call(to, key) && key !== except)
7033 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7034 }
7035 return to;
7036 };
7037 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7038 // If the importer is in node compatibility mode or this is not an ESM
7039 // file that has been converted to a CommonJS file using a Babel-
7040 // compatible transform (i.e. "__esModule" has not been set), then set
7041 // "default" to the CommonJS "module.exports" for node compatibility.
7042 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7043 mod
7044 ));
7045 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7046
7047 // src/QueryClientProvider.tsx
7048 var QueryClientProvider_exports = {};
7049 __export(QueryClientProvider_exports, {
7050 QueryClientContext: () => QueryClientContext,
7051 QueryClientProvider: () => QueryClientProvider,
7052 useQueryClient: () => useQueryClient
7053 });
7054 module.exports = __toCommonJS(QueryClientProvider_exports);
7055 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7056 var import_jsx_runtime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
7057 var QueryClientContext = React.createContext(
7058 void 0
7059 );
7060 var useQueryClient = (queryClient) => {
7061 const client = React.useContext(QueryClientContext);
7062 if (queryClient) {
7063 return queryClient;
7064 }
7065 if (!client) {
7066 throw new Error("No QueryClient set, use QueryClientProvider to set one");
7067 }
7068 return client;
7069 };
7070 var QueryClientProvider = ({
7071 client,
7072 children
7073 }) => {
7074 React.useEffect(() => {
7075 client.mount();
7076 return () => {
7077 client.unmount();
7078 };
7079 }, [client]);
7080 return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryClientContext.Provider, { value: client, children });
7081 };
7082 // Annotate the CommonJS export names for ESM import in node:
7083 0 && (0);
7084 //# sourceMappingURL=QueryClientProvider.cjs.map
7085
7086 /***/ }),
7087
7088 /***/ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs":
7089 /*!**************************************************************************************!*\
7090 !*** ../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs ***!
7091 \**************************************************************************************/
7092 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7093
7094 "use strict";
7095
7096 "use client";
7097 var __create = Object.create;
7098 var __defProp = Object.defineProperty;
7099 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7100 var __getOwnPropNames = Object.getOwnPropertyNames;
7101 var __getProtoOf = Object.getPrototypeOf;
7102 var __hasOwnProp = Object.prototype.hasOwnProperty;
7103 var __export = (target, all) => {
7104 for (var name in all)
7105 __defProp(target, name, { get: all[name], enumerable: true });
7106 };
7107 var __copyProps = (to, from, except, desc) => {
7108 if (from && typeof from === "object" || typeof from === "function") {
7109 for (let key of __getOwnPropNames(from))
7110 if (!__hasOwnProp.call(to, key) && key !== except)
7111 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7112 }
7113 return to;
7114 };
7115 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7116 // If the importer is in node compatibility mode or this is not an ESM
7117 // file that has been converted to a CommonJS file using a Babel-
7118 // compatible transform (i.e. "__esModule" has not been set), then set
7119 // "default" to the CommonJS "module.exports" for node compatibility.
7120 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7121 mod
7122 ));
7123 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7124
7125 // src/QueryErrorResetBoundary.tsx
7126 var QueryErrorResetBoundary_exports = {};
7127 __export(QueryErrorResetBoundary_exports, {
7128 QueryErrorResetBoundary: () => QueryErrorResetBoundary,
7129 useQueryErrorResetBoundary: () => useQueryErrorResetBoundary
7130 });
7131 module.exports = __toCommonJS(QueryErrorResetBoundary_exports);
7132 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7133 var import_jsx_runtime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
7134 function createValue() {
7135 let isReset = false;
7136 return {
7137 clearReset: () => {
7138 isReset = false;
7139 },
7140 reset: () => {
7141 isReset = true;
7142 },
7143 isReset: () => {
7144 return isReset;
7145 }
7146 };
7147 }
7148 var QueryErrorResetBoundaryContext = React.createContext(createValue());
7149 var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
7150 var QueryErrorResetBoundary = ({
7151 children
7152 }) => {
7153 const [value] = React.useState(() => createValue());
7154 return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === "function" ? children(value) : children });
7155 };
7156 // Annotate the CommonJS export names for ESM import in node:
7157 0 && (0);
7158 //# sourceMappingURL=QueryErrorResetBoundary.cjs.map
7159
7160 /***/ }),
7161
7162 /***/ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs":
7163 /*!*********************************************************************************!*\
7164 !*** ../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs ***!
7165 \*********************************************************************************/
7166 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7167
7168 "use strict";
7169
7170 "use client";
7171 var __create = Object.create;
7172 var __defProp = Object.defineProperty;
7173 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7174 var __getOwnPropNames = Object.getOwnPropertyNames;
7175 var __getProtoOf = Object.getPrototypeOf;
7176 var __hasOwnProp = Object.prototype.hasOwnProperty;
7177 var __export = (target, all) => {
7178 for (var name in all)
7179 __defProp(target, name, { get: all[name], enumerable: true });
7180 };
7181 var __copyProps = (to, from, except, desc) => {
7182 if (from && typeof from === "object" || typeof from === "function") {
7183 for (let key of __getOwnPropNames(from))
7184 if (!__hasOwnProp.call(to, key) && key !== except)
7185 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7186 }
7187 return to;
7188 };
7189 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7190 // If the importer is in node compatibility mode or this is not an ESM
7191 // file that has been converted to a CommonJS file using a Babel-
7192 // compatible transform (i.e. "__esModule" has not been set), then set
7193 // "default" to the CommonJS "module.exports" for node compatibility.
7194 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7195 mod
7196 ));
7197 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7198
7199 // src/errorBoundaryUtils.ts
7200 var errorBoundaryUtils_exports = {};
7201 __export(errorBoundaryUtils_exports, {
7202 ensurePreventErrorBoundaryRetry: () => ensurePreventErrorBoundaryRetry,
7203 getHasError: () => getHasError,
7204 useClearResetErrorBoundary: () => useClearResetErrorBoundary
7205 });
7206 module.exports = __toCommonJS(errorBoundaryUtils_exports);
7207 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7208 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
7209 var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
7210 if (options.suspense || options.throwOnError || options.experimental_prefetchInRender) {
7211 if (!errorResetBoundary.isReset()) {
7212 options.retryOnMount = false;
7213 }
7214 }
7215 };
7216 var useClearResetErrorBoundary = (errorResetBoundary) => {
7217 React.useEffect(() => {
7218 errorResetBoundary.clearReset();
7219 }, [errorResetBoundary]);
7220 };
7221 var getHasError = ({
7222 result,
7223 errorResetBoundary,
7224 throwOnError,
7225 query
7226 }) => {
7227 return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (0, import_utils.shouldThrowError)(throwOnError, [result.error, query]);
7228 };
7229 // Annotate the CommonJS export names for ESM import in node:
7230 0 && (0);
7231 //# sourceMappingURL=errorBoundaryUtils.cjs.map
7232
7233 /***/ }),
7234
7235 /***/ "../node_modules/@tanstack/react-query/build/modern/index.cjs":
7236 /*!********************************************************************!*\
7237 !*** ../node_modules/@tanstack/react-query/build/modern/index.cjs ***!
7238 \********************************************************************/
7239 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7240
7241 "use strict";
7242
7243 var __defProp = Object.defineProperty;
7244 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7245 var __getOwnPropNames = Object.getOwnPropertyNames;
7246 var __hasOwnProp = Object.prototype.hasOwnProperty;
7247 var __export = (target, all) => {
7248 for (var name in all)
7249 __defProp(target, name, { get: all[name], enumerable: true });
7250 };
7251 var __copyProps = (to, from, except, desc) => {
7252 if (from && typeof from === "object" || typeof from === "function") {
7253 for (let key of __getOwnPropNames(from))
7254 if (!__hasOwnProp.call(to, key) && key !== except)
7255 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7256 }
7257 return to;
7258 };
7259 var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
7260 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7261
7262 // src/index.ts
7263 var src_exports = {};
7264 __export(src_exports, {
7265 HydrationBoundary: () => import_HydrationBoundary.HydrationBoundary,
7266 IsRestoringProvider: () => import_isRestoring.IsRestoringProvider,
7267 QueryClientContext: () => import_QueryClientProvider.QueryClientContext,
7268 QueryClientProvider: () => import_QueryClientProvider.QueryClientProvider,
7269 QueryErrorResetBoundary: () => import_QueryErrorResetBoundary.QueryErrorResetBoundary,
7270 infiniteQueryOptions: () => import_infiniteQueryOptions.infiniteQueryOptions,
7271 queryOptions: () => import_queryOptions.queryOptions,
7272 useInfiniteQuery: () => import_useInfiniteQuery.useInfiniteQuery,
7273 useIsFetching: () => import_useIsFetching.useIsFetching,
7274 useIsMutating: () => import_useMutationState.useIsMutating,
7275 useIsRestoring: () => import_isRestoring.useIsRestoring,
7276 useMutation: () => import_useMutation.useMutation,
7277 useMutationState: () => import_useMutationState.useMutationState,
7278 usePrefetchInfiniteQuery: () => import_usePrefetchInfiniteQuery.usePrefetchInfiniteQuery,
7279 usePrefetchQuery: () => import_usePrefetchQuery.usePrefetchQuery,
7280 useQueries: () => import_useQueries.useQueries,
7281 useQuery: () => import_useQuery.useQuery,
7282 useQueryClient: () => import_QueryClientProvider.useQueryClient,
7283 useQueryErrorResetBoundary: () => import_QueryErrorResetBoundary.useQueryErrorResetBoundary,
7284 useSuspenseInfiniteQuery: () => import_useSuspenseInfiniteQuery.useSuspenseInfiniteQuery,
7285 useSuspenseQueries: () => import_useSuspenseQueries.useSuspenseQueries,
7286 useSuspenseQuery: () => import_useSuspenseQuery.useSuspenseQuery
7287 });
7288 module.exports = __toCommonJS(src_exports);
7289 __reExport(src_exports, __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"), module.exports);
7290 __reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/react-query/build/modern/types.cjs"), module.exports);
7291 var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs");
7292 var import_useQuery = __webpack_require__(/*! ./useQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs");
7293 var import_useSuspenseQuery = __webpack_require__(/*! ./useSuspenseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs");
7294 var import_useSuspenseInfiniteQuery = __webpack_require__(/*! ./useSuspenseInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs");
7295 var import_useSuspenseQueries = __webpack_require__(/*! ./useSuspenseQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs");
7296 var import_usePrefetchQuery = __webpack_require__(/*! ./usePrefetchQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs");
7297 var import_usePrefetchInfiniteQuery = __webpack_require__(/*! ./usePrefetchInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs");
7298 var import_queryOptions = __webpack_require__(/*! ./queryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs");
7299 var import_infiniteQueryOptions = __webpack_require__(/*! ./infiniteQueryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs");
7300 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
7301 var import_HydrationBoundary = __webpack_require__(/*! ./HydrationBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs");
7302 var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
7303 var import_useIsFetching = __webpack_require__(/*! ./useIsFetching.cjs */ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs");
7304 var import_useMutationState = __webpack_require__(/*! ./useMutationState.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs");
7305 var import_useMutation = __webpack_require__(/*! ./useMutation.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs");
7306 var import_useInfiniteQuery = __webpack_require__(/*! ./useInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs");
7307 var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
7308 // Annotate the CommonJS export names for ESM import in node:
7309 0 && (0);
7310 //# sourceMappingURL=index.cjs.map
7311
7312 /***/ }),
7313
7314 /***/ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs":
7315 /*!***********************************************************************************!*\
7316 !*** ../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs ***!
7317 \***********************************************************************************/
7318 /***/ ((module) => {
7319
7320 "use strict";
7321
7322 var __defProp = Object.defineProperty;
7323 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7324 var __getOwnPropNames = Object.getOwnPropertyNames;
7325 var __hasOwnProp = Object.prototype.hasOwnProperty;
7326 var __export = (target, all) => {
7327 for (var name in all)
7328 __defProp(target, name, { get: all[name], enumerable: true });
7329 };
7330 var __copyProps = (to, from, except, desc) => {
7331 if (from && typeof from === "object" || typeof from === "function") {
7332 for (let key of __getOwnPropNames(from))
7333 if (!__hasOwnProp.call(to, key) && key !== except)
7334 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7335 }
7336 return to;
7337 };
7338 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7339
7340 // src/infiniteQueryOptions.ts
7341 var infiniteQueryOptions_exports = {};
7342 __export(infiniteQueryOptions_exports, {
7343 infiniteQueryOptions: () => infiniteQueryOptions
7344 });
7345 module.exports = __toCommonJS(infiniteQueryOptions_exports);
7346 function infiniteQueryOptions(options) {
7347 return options;
7348 }
7349 // Annotate the CommonJS export names for ESM import in node:
7350 0 && (0);
7351 //# sourceMappingURL=infiniteQueryOptions.cjs.map
7352
7353 /***/ }),
7354
7355 /***/ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs":
7356 /*!**************************************************************************!*\
7357 !*** ../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs ***!
7358 \**************************************************************************/
7359 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7360
7361 "use strict";
7362
7363 "use client";
7364 var __create = Object.create;
7365 var __defProp = Object.defineProperty;
7366 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7367 var __getOwnPropNames = Object.getOwnPropertyNames;
7368 var __getProtoOf = Object.getPrototypeOf;
7369 var __hasOwnProp = Object.prototype.hasOwnProperty;
7370 var __export = (target, all) => {
7371 for (var name in all)
7372 __defProp(target, name, { get: all[name], enumerable: true });
7373 };
7374 var __copyProps = (to, from, except, desc) => {
7375 if (from && typeof from === "object" || typeof from === "function") {
7376 for (let key of __getOwnPropNames(from))
7377 if (!__hasOwnProp.call(to, key) && key !== except)
7378 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7379 }
7380 return to;
7381 };
7382 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7383 // If the importer is in node compatibility mode or this is not an ESM
7384 // file that has been converted to a CommonJS file using a Babel-
7385 // compatible transform (i.e. "__esModule" has not been set), then set
7386 // "default" to the CommonJS "module.exports" for node compatibility.
7387 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7388 mod
7389 ));
7390 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7391
7392 // src/isRestoring.ts
7393 var isRestoring_exports = {};
7394 __export(isRestoring_exports, {
7395 IsRestoringProvider: () => IsRestoringProvider,
7396 useIsRestoring: () => useIsRestoring
7397 });
7398 module.exports = __toCommonJS(isRestoring_exports);
7399 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7400 var IsRestoringContext = React.createContext(false);
7401 var useIsRestoring = () => React.useContext(IsRestoringContext);
7402 var IsRestoringProvider = IsRestoringContext.Provider;
7403 // Annotate the CommonJS export names for ESM import in node:
7404 0 && (0);
7405 //# sourceMappingURL=isRestoring.cjs.map
7406
7407 /***/ }),
7408
7409 /***/ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs":
7410 /*!***************************************************************************!*\
7411 !*** ../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs ***!
7412 \***************************************************************************/
7413 /***/ ((module) => {
7414
7415 "use strict";
7416
7417 var __defProp = Object.defineProperty;
7418 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7419 var __getOwnPropNames = Object.getOwnPropertyNames;
7420 var __hasOwnProp = Object.prototype.hasOwnProperty;
7421 var __export = (target, all) => {
7422 for (var name in all)
7423 __defProp(target, name, { get: all[name], enumerable: true });
7424 };
7425 var __copyProps = (to, from, except, desc) => {
7426 if (from && typeof from === "object" || typeof from === "function") {
7427 for (let key of __getOwnPropNames(from))
7428 if (!__hasOwnProp.call(to, key) && key !== except)
7429 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7430 }
7431 return to;
7432 };
7433 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7434
7435 // src/queryOptions.ts
7436 var queryOptions_exports = {};
7437 __export(queryOptions_exports, {
7438 queryOptions: () => queryOptions
7439 });
7440 module.exports = __toCommonJS(queryOptions_exports);
7441 function queryOptions(options) {
7442 return options;
7443 }
7444 // Annotate the CommonJS export names for ESM import in node:
7445 0 && (0);
7446 //# sourceMappingURL=queryOptions.cjs.map
7447
7448 /***/ }),
7449
7450 /***/ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs":
7451 /*!***********************************************************************!*\
7452 !*** ../node_modules/@tanstack/react-query/build/modern/suspense.cjs ***!
7453 \***********************************************************************/
7454 /***/ ((module) => {
7455
7456 "use strict";
7457
7458 var __defProp = Object.defineProperty;
7459 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7460 var __getOwnPropNames = Object.getOwnPropertyNames;
7461 var __hasOwnProp = Object.prototype.hasOwnProperty;
7462 var __export = (target, all) => {
7463 for (var name in all)
7464 __defProp(target, name, { get: all[name], enumerable: true });
7465 };
7466 var __copyProps = (to, from, except, desc) => {
7467 if (from && typeof from === "object" || typeof from === "function") {
7468 for (let key of __getOwnPropNames(from))
7469 if (!__hasOwnProp.call(to, key) && key !== except)
7470 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7471 }
7472 return to;
7473 };
7474 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7475
7476 // src/suspense.ts
7477 var suspense_exports = {};
7478 __export(suspense_exports, {
7479 defaultThrowOnError: () => defaultThrowOnError,
7480 ensureSuspenseTimers: () => ensureSuspenseTimers,
7481 fetchOptimistic: () => fetchOptimistic,
7482 shouldSuspend: () => shouldSuspend,
7483 willFetch: () => willFetch
7484 });
7485 module.exports = __toCommonJS(suspense_exports);
7486 var defaultThrowOnError = (_error, query) => query.state.data === void 0;
7487 var ensureSuspenseTimers = (defaultedOptions) => {
7488 if (defaultedOptions.suspense) {
7489 if (defaultedOptions.staleTime === void 0) {
7490 defaultedOptions.staleTime = 1e3;
7491 }
7492 if (typeof defaultedOptions.gcTime === "number") {
7493 defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, 1e3);
7494 }
7495 }
7496 };
7497 var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
7498 var shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;
7499 var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
7500 errorResetBoundary.clearReset();
7501 });
7502 // Annotate the CommonJS export names for ESM import in node:
7503 0 && (0);
7504 //# sourceMappingURL=suspense.cjs.map
7505
7506 /***/ }),
7507
7508 /***/ "../node_modules/@tanstack/react-query/build/modern/types.cjs":
7509 /*!********************************************************************!*\
7510 !*** ../node_modules/@tanstack/react-query/build/modern/types.cjs ***!
7511 \********************************************************************/
7512 /***/ ((module) => {
7513
7514 "use strict";
7515
7516 var __defProp = Object.defineProperty;
7517 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7518 var __getOwnPropNames = Object.getOwnPropertyNames;
7519 var __hasOwnProp = Object.prototype.hasOwnProperty;
7520 var __copyProps = (to, from, except, desc) => {
7521 if (from && typeof from === "object" || typeof from === "function") {
7522 for (let key of __getOwnPropNames(from))
7523 if (!__hasOwnProp.call(to, key) && key !== except)
7524 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7525 }
7526 return to;
7527 };
7528 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7529
7530 // src/types.ts
7531 var types_exports = {};
7532 module.exports = __toCommonJS(types_exports);
7533 //# sourceMappingURL=types.cjs.map
7534
7535 /***/ }),
7536
7537 /***/ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs":
7538 /*!***************************************************************************!*\
7539 !*** ../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs ***!
7540 \***************************************************************************/
7541 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7542
7543 "use strict";
7544
7545 "use client";
7546 var __create = Object.create;
7547 var __defProp = Object.defineProperty;
7548 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7549 var __getOwnPropNames = Object.getOwnPropertyNames;
7550 var __getProtoOf = Object.getPrototypeOf;
7551 var __hasOwnProp = Object.prototype.hasOwnProperty;
7552 var __export = (target, all) => {
7553 for (var name in all)
7554 __defProp(target, name, { get: all[name], enumerable: true });
7555 };
7556 var __copyProps = (to, from, except, desc) => {
7557 if (from && typeof from === "object" || typeof from === "function") {
7558 for (let key of __getOwnPropNames(from))
7559 if (!__hasOwnProp.call(to, key) && key !== except)
7560 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7561 }
7562 return to;
7563 };
7564 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7565 // If the importer is in node compatibility mode or this is not an ESM
7566 // file that has been converted to a CommonJS file using a Babel-
7567 // compatible transform (i.e. "__esModule" has not been set), then set
7568 // "default" to the CommonJS "module.exports" for node compatibility.
7569 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7570 mod
7571 ));
7572 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7573
7574 // src/useBaseQuery.ts
7575 var useBaseQuery_exports = {};
7576 __export(useBaseQuery_exports, {
7577 useBaseQuery: () => useBaseQuery
7578 });
7579 module.exports = __toCommonJS(useBaseQuery_exports);
7580 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7581 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
7582 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
7583 var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
7584 var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs");
7585 var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
7586 var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
7587 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
7588 function useBaseQuery(options, Observer, queryClient) {
7589 if (true) {
7590 if (typeof options !== "object" || Array.isArray(options)) {
7591 throw new Error(
7592 'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
7593 );
7594 }
7595 }
7596 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
7597 const isRestoring = (0, import_isRestoring.useIsRestoring)();
7598 const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)();
7599 const defaultedOptions = client.defaultQueryOptions(options);
7600 client.getDefaultOptions().queries?._experimental_beforeQuery?.(
7601 defaultedOptions
7602 );
7603 defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
7604 (0, import_suspense.ensureSuspenseTimers)(defaultedOptions);
7605 (0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(defaultedOptions, errorResetBoundary);
7606 (0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary);
7607 const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
7608 const [observer] = React.useState(
7609 () => new Observer(
7610 client,
7611 defaultedOptions
7612 )
7613 );
7614 const result = observer.getOptimisticResult(defaultedOptions);
7615 React.useSyncExternalStore(
7616 React.useCallback(
7617 (onStoreChange) => {
7618 const unsubscribe = isRestoring ? import_utils.noop : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange));
7619 observer.updateResult();
7620 return unsubscribe;
7621 },
7622 [observer, isRestoring]
7623 ),
7624 () => observer.getCurrentResult(),
7625 () => observer.getCurrentResult()
7626 );
7627 React.useEffect(() => {
7628 observer.setOptions(defaultedOptions, { listeners: false });
7629 }, [defaultedOptions, observer]);
7630 if ((0, import_suspense.shouldSuspend)(defaultedOptions, result)) {
7631 throw (0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary);
7632 }
7633 if ((0, import_errorBoundaryUtils.getHasError)({
7634 result,
7635 errorResetBoundary,
7636 throwOnError: defaultedOptions.throwOnError,
7637 query: client.getQueryCache().get(defaultedOptions.queryHash)
7638 })) {
7639 throw result.error;
7640 }
7641 ;
7642 client.getDefaultOptions().queries?._experimental_afterQuery?.(
7643 defaultedOptions,
7644 result
7645 );
7646 if (defaultedOptions.experimental_prefetchInRender && !import_query_core.isServer && (0, import_suspense.willFetch)(result, isRestoring)) {
7647 const promise = isNewCacheEntry ? (
7648 // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
7649 (0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary)
7650 ) : (
7651 // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
7652 client.getQueryCache().get(defaultedOptions.queryHash)?.promise
7653 );
7654 promise?.catch(import_utils.noop).finally(() => {
7655 observer.updateResult();
7656 });
7657 }
7658 return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
7659 }
7660 // Annotate the CommonJS export names for ESM import in node:
7661 0 && (0);
7662 //# sourceMappingURL=useBaseQuery.cjs.map
7663
7664 /***/ }),
7665
7666 /***/ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs":
7667 /*!*******************************************************************************!*\
7668 !*** ../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs ***!
7669 \*******************************************************************************/
7670 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7671
7672 "use strict";
7673
7674 "use client";
7675 var __defProp = Object.defineProperty;
7676 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7677 var __getOwnPropNames = Object.getOwnPropertyNames;
7678 var __hasOwnProp = Object.prototype.hasOwnProperty;
7679 var __export = (target, all) => {
7680 for (var name in all)
7681 __defProp(target, name, { get: all[name], enumerable: true });
7682 };
7683 var __copyProps = (to, from, except, desc) => {
7684 if (from && typeof from === "object" || typeof from === "function") {
7685 for (let key of __getOwnPropNames(from))
7686 if (!__hasOwnProp.call(to, key) && key !== except)
7687 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7688 }
7689 return to;
7690 };
7691 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7692
7693 // src/useInfiniteQuery.ts
7694 var useInfiniteQuery_exports = {};
7695 __export(useInfiniteQuery_exports, {
7696 useInfiniteQuery: () => useInfiniteQuery
7697 });
7698 module.exports = __toCommonJS(useInfiniteQuery_exports);
7699 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
7700 var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
7701 function useInfiniteQuery(options, queryClient) {
7702 return (0, import_useBaseQuery.useBaseQuery)(
7703 options,
7704 import_query_core.InfiniteQueryObserver,
7705 queryClient
7706 );
7707 }
7708 // Annotate the CommonJS export names for ESM import in node:
7709 0 && (0);
7710 //# sourceMappingURL=useInfiniteQuery.cjs.map
7711
7712 /***/ }),
7713
7714 /***/ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs":
7715 /*!****************************************************************************!*\
7716 !*** ../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs ***!
7717 \****************************************************************************/
7718 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7719
7720 "use strict";
7721
7722 "use client";
7723 var __create = Object.create;
7724 var __defProp = Object.defineProperty;
7725 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7726 var __getOwnPropNames = Object.getOwnPropertyNames;
7727 var __getProtoOf = Object.getPrototypeOf;
7728 var __hasOwnProp = Object.prototype.hasOwnProperty;
7729 var __export = (target, all) => {
7730 for (var name in all)
7731 __defProp(target, name, { get: all[name], enumerable: true });
7732 };
7733 var __copyProps = (to, from, except, desc) => {
7734 if (from && typeof from === "object" || typeof from === "function") {
7735 for (let key of __getOwnPropNames(from))
7736 if (!__hasOwnProp.call(to, key) && key !== except)
7737 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7738 }
7739 return to;
7740 };
7741 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7742 // If the importer is in node compatibility mode or this is not an ESM
7743 // file that has been converted to a CommonJS file using a Babel-
7744 // compatible transform (i.e. "__esModule" has not been set), then set
7745 // "default" to the CommonJS "module.exports" for node compatibility.
7746 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7747 mod
7748 ));
7749 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7750
7751 // src/useIsFetching.ts
7752 var useIsFetching_exports = {};
7753 __export(useIsFetching_exports, {
7754 useIsFetching: () => useIsFetching
7755 });
7756 module.exports = __toCommonJS(useIsFetching_exports);
7757 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7758 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
7759 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
7760 function useIsFetching(filters, queryClient) {
7761 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
7762 const queryCache = client.getQueryCache();
7763 return React.useSyncExternalStore(
7764 React.useCallback(
7765 (onStoreChange) => queryCache.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
7766 [queryCache]
7767 ),
7768 () => client.isFetching(filters),
7769 () => client.isFetching(filters)
7770 );
7771 }
7772 // Annotate the CommonJS export names for ESM import in node:
7773 0 && (0);
7774 //# sourceMappingURL=useIsFetching.cjs.map
7775
7776 /***/ }),
7777
7778 /***/ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs":
7779 /*!**************************************************************************!*\
7780 !*** ../node_modules/@tanstack/react-query/build/modern/useMutation.cjs ***!
7781 \**************************************************************************/
7782 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7783
7784 "use strict";
7785
7786 "use client";
7787 var __create = Object.create;
7788 var __defProp = Object.defineProperty;
7789 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7790 var __getOwnPropNames = Object.getOwnPropertyNames;
7791 var __getProtoOf = Object.getPrototypeOf;
7792 var __hasOwnProp = Object.prototype.hasOwnProperty;
7793 var __export = (target, all) => {
7794 for (var name in all)
7795 __defProp(target, name, { get: all[name], enumerable: true });
7796 };
7797 var __copyProps = (to, from, except, desc) => {
7798 if (from && typeof from === "object" || typeof from === "function") {
7799 for (let key of __getOwnPropNames(from))
7800 if (!__hasOwnProp.call(to, key) && key !== except)
7801 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7802 }
7803 return to;
7804 };
7805 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7806 // If the importer is in node compatibility mode or this is not an ESM
7807 // file that has been converted to a CommonJS file using a Babel-
7808 // compatible transform (i.e. "__esModule" has not been set), then set
7809 // "default" to the CommonJS "module.exports" for node compatibility.
7810 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7811 mod
7812 ));
7813 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7814
7815 // src/useMutation.ts
7816 var useMutation_exports = {};
7817 __export(useMutation_exports, {
7818 useMutation: () => useMutation
7819 });
7820 module.exports = __toCommonJS(useMutation_exports);
7821 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7822 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
7823 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
7824 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
7825 function useMutation(options, queryClient) {
7826 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
7827 const [observer] = React.useState(
7828 () => new import_query_core.MutationObserver(
7829 client,
7830 options
7831 )
7832 );
7833 React.useEffect(() => {
7834 observer.setOptions(options);
7835 }, [observer, options]);
7836 const result = React.useSyncExternalStore(
7837 React.useCallback(
7838 (onStoreChange) => observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
7839 [observer]
7840 ),
7841 () => observer.getCurrentResult(),
7842 () => observer.getCurrentResult()
7843 );
7844 const mutate = React.useCallback(
7845 (variables, mutateOptions) => {
7846 observer.mutate(variables, mutateOptions).catch(import_utils.noop);
7847 },
7848 [observer]
7849 );
7850 if (result.error && (0, import_utils.shouldThrowError)(observer.options.throwOnError, [result.error])) {
7851 throw result.error;
7852 }
7853 return { ...result, mutate, mutateAsync: result.mutate };
7854 }
7855 // Annotate the CommonJS export names for ESM import in node:
7856 0 && (0);
7857 //# sourceMappingURL=useMutation.cjs.map
7858
7859 /***/ }),
7860
7861 /***/ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs":
7862 /*!*******************************************************************************!*\
7863 !*** ../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs ***!
7864 \*******************************************************************************/
7865 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7866
7867 "use strict";
7868
7869 "use client";
7870 var __create = Object.create;
7871 var __defProp = Object.defineProperty;
7872 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7873 var __getOwnPropNames = Object.getOwnPropertyNames;
7874 var __getProtoOf = Object.getPrototypeOf;
7875 var __hasOwnProp = Object.prototype.hasOwnProperty;
7876 var __export = (target, all) => {
7877 for (var name in all)
7878 __defProp(target, name, { get: all[name], enumerable: true });
7879 };
7880 var __copyProps = (to, from, except, desc) => {
7881 if (from && typeof from === "object" || typeof from === "function") {
7882 for (let key of __getOwnPropNames(from))
7883 if (!__hasOwnProp.call(to, key) && key !== except)
7884 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7885 }
7886 return to;
7887 };
7888 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7889 // If the importer is in node compatibility mode or this is not an ESM
7890 // file that has been converted to a CommonJS file using a Babel-
7891 // compatible transform (i.e. "__esModule" has not been set), then set
7892 // "default" to the CommonJS "module.exports" for node compatibility.
7893 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7894 mod
7895 ));
7896 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7897
7898 // src/useMutationState.ts
7899 var useMutationState_exports = {};
7900 __export(useMutationState_exports, {
7901 useIsMutating: () => useIsMutating,
7902 useMutationState: () => useMutationState
7903 });
7904 module.exports = __toCommonJS(useMutationState_exports);
7905 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7906 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
7907 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
7908 function useIsMutating(filters, queryClient) {
7909 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
7910 return useMutationState(
7911 { filters: { ...filters, status: "pending" } },
7912 client
7913 ).length;
7914 }
7915 function getResult(mutationCache, options) {
7916 return mutationCache.findAll(options.filters).map(
7917 (mutation) => options.select ? options.select(mutation) : mutation.state
7918 );
7919 }
7920 function useMutationState(options = {}, queryClient) {
7921 const mutationCache = (0, import_QueryClientProvider.useQueryClient)(queryClient).getMutationCache();
7922 const optionsRef = React.useRef(options);
7923 const result = React.useRef(null);
7924 if (!result.current) {
7925 result.current = getResult(mutationCache, options);
7926 }
7927 React.useEffect(() => {
7928 optionsRef.current = options;
7929 });
7930 return React.useSyncExternalStore(
7931 React.useCallback(
7932 (onStoreChange) => mutationCache.subscribe(() => {
7933 const nextResult = (0, import_query_core.replaceEqualDeep)(
7934 result.current,
7935 getResult(mutationCache, optionsRef.current)
7936 );
7937 if (result.current !== nextResult) {
7938 result.current = nextResult;
7939 import_query_core.notifyManager.schedule(onStoreChange);
7940 }
7941 }),
7942 [mutationCache]
7943 ),
7944 () => result.current,
7945 () => result.current
7946 );
7947 }
7948 // Annotate the CommonJS export names for ESM import in node:
7949 0 && (0);
7950 //# sourceMappingURL=useMutationState.cjs.map
7951
7952 /***/ }),
7953
7954 /***/ "../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs":
7955 /*!***************************************************************************************!*\
7956 !*** ../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs ***!
7957 \***************************************************************************************/
7958 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7959
7960 "use strict";
7961
7962 var __defProp = Object.defineProperty;
7963 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7964 var __getOwnPropNames = Object.getOwnPropertyNames;
7965 var __hasOwnProp = Object.prototype.hasOwnProperty;
7966 var __export = (target, all) => {
7967 for (var name in all)
7968 __defProp(target, name, { get: all[name], enumerable: true });
7969 };
7970 var __copyProps = (to, from, except, desc) => {
7971 if (from && typeof from === "object" || typeof from === "function") {
7972 for (let key of __getOwnPropNames(from))
7973 if (!__hasOwnProp.call(to, key) && key !== except)
7974 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7975 }
7976 return to;
7977 };
7978 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7979
7980 // src/usePrefetchInfiniteQuery.tsx
7981 var usePrefetchInfiniteQuery_exports = {};
7982 __export(usePrefetchInfiniteQuery_exports, {
7983 usePrefetchInfiniteQuery: () => usePrefetchInfiniteQuery
7984 });
7985 module.exports = __toCommonJS(usePrefetchInfiniteQuery_exports);
7986 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
7987 function usePrefetchInfiniteQuery(options, queryClient) {
7988 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
7989 if (!client.getQueryState(options.queryKey)) {
7990 client.prefetchInfiniteQuery(options);
7991 }
7992 }
7993 // Annotate the CommonJS export names for ESM import in node:
7994 0 && (0);
7995 //# sourceMappingURL=usePrefetchInfiniteQuery.cjs.map
7996
7997 /***/ }),
7998
7999 /***/ "../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs":
8000 /*!*******************************************************************************!*\
8001 !*** ../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs ***!
8002 \*******************************************************************************/
8003 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8004
8005 "use strict";
8006
8007 var __defProp = Object.defineProperty;
8008 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8009 var __getOwnPropNames = Object.getOwnPropertyNames;
8010 var __hasOwnProp = Object.prototype.hasOwnProperty;
8011 var __export = (target, all) => {
8012 for (var name in all)
8013 __defProp(target, name, { get: all[name], enumerable: true });
8014 };
8015 var __copyProps = (to, from, except, desc) => {
8016 if (from && typeof from === "object" || typeof from === "function") {
8017 for (let key of __getOwnPropNames(from))
8018 if (!__hasOwnProp.call(to, key) && key !== except)
8019 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8020 }
8021 return to;
8022 };
8023 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8024
8025 // src/usePrefetchQuery.tsx
8026 var usePrefetchQuery_exports = {};
8027 __export(usePrefetchQuery_exports, {
8028 usePrefetchQuery: () => usePrefetchQuery
8029 });
8030 module.exports = __toCommonJS(usePrefetchQuery_exports);
8031 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
8032 function usePrefetchQuery(options, queryClient) {
8033 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
8034 if (!client.getQueryState(options.queryKey)) {
8035 client.prefetchQuery(options);
8036 }
8037 }
8038 // Annotate the CommonJS export names for ESM import in node:
8039 0 && (0);
8040 //# sourceMappingURL=usePrefetchQuery.cjs.map
8041
8042 /***/ }),
8043
8044 /***/ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs":
8045 /*!*************************************************************************!*\
8046 !*** ../node_modules/@tanstack/react-query/build/modern/useQueries.cjs ***!
8047 \*************************************************************************/
8048 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8049
8050 "use strict";
8051
8052 "use client";
8053 var __create = Object.create;
8054 var __defProp = Object.defineProperty;
8055 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8056 var __getOwnPropNames = Object.getOwnPropertyNames;
8057 var __getProtoOf = Object.getPrototypeOf;
8058 var __hasOwnProp = Object.prototype.hasOwnProperty;
8059 var __export = (target, all) => {
8060 for (var name in all)
8061 __defProp(target, name, { get: all[name], enumerable: true });
8062 };
8063 var __copyProps = (to, from, except, desc) => {
8064 if (from && typeof from === "object" || typeof from === "function") {
8065 for (let key of __getOwnPropNames(from))
8066 if (!__hasOwnProp.call(to, key) && key !== except)
8067 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8068 }
8069 return to;
8070 };
8071 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
8072 // If the importer is in node compatibility mode or this is not an ESM
8073 // file that has been converted to a CommonJS file using a Babel-
8074 // compatible transform (i.e. "__esModule" has not been set), then set
8075 // "default" to the CommonJS "module.exports" for node compatibility.
8076 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
8077 mod
8078 ));
8079 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8080
8081 // src/useQueries.ts
8082 var useQueries_exports = {};
8083 __export(useQueries_exports, {
8084 useQueries: () => useQueries
8085 });
8086 module.exports = __toCommonJS(useQueries_exports);
8087 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
8088 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8089 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
8090 var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
8091 var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
8092 var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs");
8093 var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
8094 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
8095 function useQueries({
8096 queries,
8097 ...options
8098 }, queryClient) {
8099 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
8100 const isRestoring = (0, import_isRestoring.useIsRestoring)();
8101 const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)();
8102 const defaultedQueries = React.useMemo(
8103 () => queries.map((opts) => {
8104 const defaultedOptions = client.defaultQueryOptions(
8105 opts
8106 );
8107 defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
8108 return defaultedOptions;
8109 }),
8110 [queries, client, isRestoring]
8111 );
8112 defaultedQueries.forEach((query) => {
8113 (0, import_suspense.ensureSuspenseTimers)(query);
8114 (0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(query, errorResetBoundary);
8115 });
8116 (0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary);
8117 const [observer] = React.useState(
8118 () => new import_query_core.QueriesObserver(
8119 client,
8120 defaultedQueries,
8121 options
8122 )
8123 );
8124 const [optimisticResult, getCombinedResult, trackResult] = observer.getOptimisticResult(
8125 defaultedQueries,
8126 options.combine
8127 );
8128 React.useSyncExternalStore(
8129 React.useCallback(
8130 (onStoreChange) => isRestoring ? import_utils.noop : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
8131 [observer, isRestoring]
8132 ),
8133 () => observer.getCurrentResult(),
8134 () => observer.getCurrentResult()
8135 );
8136 React.useEffect(() => {
8137 observer.setQueries(
8138 defaultedQueries,
8139 options,
8140 {
8141 listeners: false
8142 }
8143 );
8144 }, [defaultedQueries, options, observer]);
8145 const shouldAtLeastOneSuspend = optimisticResult.some(
8146 (result, index) => (0, import_suspense.shouldSuspend)(defaultedQueries[index], result)
8147 );
8148 const suspensePromises = shouldAtLeastOneSuspend ? optimisticResult.flatMap((result, index) => {
8149 const opts = defaultedQueries[index];
8150 if (opts) {
8151 const queryObserver = new import_query_core.QueryObserver(client, opts);
8152 if ((0, import_suspense.shouldSuspend)(opts, result)) {
8153 return (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary);
8154 } else if ((0, import_suspense.willFetch)(result, isRestoring)) {
8155 void (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary);
8156 }
8157 }
8158 return [];
8159 }) : [];
8160 if (suspensePromises.length > 0) {
8161 throw Promise.all(suspensePromises);
8162 }
8163 const firstSingleResultWhichShouldThrow = optimisticResult.find(
8164 (result, index) => {
8165 const query = defaultedQueries[index];
8166 return query && (0, import_errorBoundaryUtils.getHasError)({
8167 result,
8168 errorResetBoundary,
8169 throwOnError: query.throwOnError,
8170 query: client.getQueryCache().get(query.queryHash)
8171 });
8172 }
8173 );
8174 if (firstSingleResultWhichShouldThrow?.error) {
8175 throw firstSingleResultWhichShouldThrow.error;
8176 }
8177 return getCombinedResult(trackResult());
8178 }
8179 // Annotate the CommonJS export names for ESM import in node:
8180 0 && (0);
8181 //# sourceMappingURL=useQueries.cjs.map
8182
8183 /***/ }),
8184
8185 /***/ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs":
8186 /*!***********************************************************************!*\
8187 !*** ../node_modules/@tanstack/react-query/build/modern/useQuery.cjs ***!
8188 \***********************************************************************/
8189 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8190
8191 "use strict";
8192
8193 "use client";
8194 var __defProp = Object.defineProperty;
8195 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8196 var __getOwnPropNames = Object.getOwnPropertyNames;
8197 var __hasOwnProp = Object.prototype.hasOwnProperty;
8198 var __export = (target, all) => {
8199 for (var name in all)
8200 __defProp(target, name, { get: all[name], enumerable: true });
8201 };
8202 var __copyProps = (to, from, except, desc) => {
8203 if (from && typeof from === "object" || typeof from === "function") {
8204 for (let key of __getOwnPropNames(from))
8205 if (!__hasOwnProp.call(to, key) && key !== except)
8206 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8207 }
8208 return to;
8209 };
8210 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8211
8212 // src/useQuery.ts
8213 var useQuery_exports = {};
8214 __export(useQuery_exports, {
8215 useQuery: () => useQuery
8216 });
8217 module.exports = __toCommonJS(useQuery_exports);
8218 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8219 var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
8220 function useQuery(options, queryClient) {
8221 return (0, import_useBaseQuery.useBaseQuery)(options, import_query_core.QueryObserver, queryClient);
8222 }
8223 // Annotate the CommonJS export names for ESM import in node:
8224 0 && (0);
8225 //# sourceMappingURL=useQuery.cjs.map
8226
8227 /***/ }),
8228
8229 /***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs":
8230 /*!***************************************************************************************!*\
8231 !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs ***!
8232 \***************************************************************************************/
8233 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8234
8235 "use strict";
8236
8237 "use client";
8238 var __defProp = Object.defineProperty;
8239 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8240 var __getOwnPropNames = Object.getOwnPropertyNames;
8241 var __hasOwnProp = Object.prototype.hasOwnProperty;
8242 var __export = (target, all) => {
8243 for (var name in all)
8244 __defProp(target, name, { get: all[name], enumerable: true });
8245 };
8246 var __copyProps = (to, from, except, desc) => {
8247 if (from && typeof from === "object" || typeof from === "function") {
8248 for (let key of __getOwnPropNames(from))
8249 if (!__hasOwnProp.call(to, key) && key !== except)
8250 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8251 }
8252 return to;
8253 };
8254 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8255
8256 // src/useSuspenseInfiniteQuery.ts
8257 var useSuspenseInfiniteQuery_exports = {};
8258 __export(useSuspenseInfiniteQuery_exports, {
8259 useSuspenseInfiniteQuery: () => useSuspenseInfiniteQuery
8260 });
8261 module.exports = __toCommonJS(useSuspenseInfiniteQuery_exports);
8262 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8263 var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
8264 var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
8265 function useSuspenseInfiniteQuery(options, queryClient) {
8266 if (true) {
8267 if (options.queryFn === import_query_core.skipToken) {
8268 console.error("skipToken is not allowed for useSuspenseInfiniteQuery");
8269 }
8270 }
8271 return (0, import_useBaseQuery.useBaseQuery)(
8272 {
8273 ...options,
8274 enabled: true,
8275 suspense: true,
8276 throwOnError: import_suspense.defaultThrowOnError
8277 },
8278 import_query_core.InfiniteQueryObserver,
8279 queryClient
8280 );
8281 }
8282 // Annotate the CommonJS export names for ESM import in node:
8283 0 && (0);
8284 //# sourceMappingURL=useSuspenseInfiniteQuery.cjs.map
8285
8286 /***/ }),
8287
8288 /***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs":
8289 /*!*********************************************************************************!*\
8290 !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs ***!
8291 \*********************************************************************************/
8292 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8293
8294 "use strict";
8295
8296 "use client";
8297 var __defProp = Object.defineProperty;
8298 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8299 var __getOwnPropNames = Object.getOwnPropertyNames;
8300 var __hasOwnProp = Object.prototype.hasOwnProperty;
8301 var __export = (target, all) => {
8302 for (var name in all)
8303 __defProp(target, name, { get: all[name], enumerable: true });
8304 };
8305 var __copyProps = (to, from, except, desc) => {
8306 if (from && typeof from === "object" || typeof from === "function") {
8307 for (let key of __getOwnPropNames(from))
8308 if (!__hasOwnProp.call(to, key) && key !== except)
8309 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8310 }
8311 return to;
8312 };
8313 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8314
8315 // src/useSuspenseQueries.ts
8316 var useSuspenseQueries_exports = {};
8317 __export(useSuspenseQueries_exports, {
8318 useSuspenseQueries: () => useSuspenseQueries
8319 });
8320 module.exports = __toCommonJS(useSuspenseQueries_exports);
8321 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8322 var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs");
8323 var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
8324 function useSuspenseQueries(options, queryClient) {
8325 return (0, import_useQueries.useQueries)(
8326 {
8327 ...options,
8328 queries: options.queries.map((query) => {
8329 if (true) {
8330 if (query.queryFn === import_query_core.skipToken) {
8331 console.error("skipToken is not allowed for useSuspenseQueries");
8332 }
8333 }
8334 return {
8335 ...query,
8336 suspense: true,
8337 throwOnError: import_suspense.defaultThrowOnError,
8338 enabled: true,
8339 placeholderData: void 0
8340 };
8341 })
8342 },
8343 queryClient
8344 );
8345 }
8346 // Annotate the CommonJS export names for ESM import in node:
8347 0 && (0);
8348 //# sourceMappingURL=useSuspenseQueries.cjs.map
8349
8350 /***/ }),
8351
8352 /***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs":
8353 /*!*******************************************************************************!*\
8354 !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs ***!
8355 \*******************************************************************************/
8356 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8357
8358 "use strict";
8359
8360 "use client";
8361 var __defProp = Object.defineProperty;
8362 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8363 var __getOwnPropNames = Object.getOwnPropertyNames;
8364 var __hasOwnProp = Object.prototype.hasOwnProperty;
8365 var __export = (target, all) => {
8366 for (var name in all)
8367 __defProp(target, name, { get: all[name], enumerable: true });
8368 };
8369 var __copyProps = (to, from, except, desc) => {
8370 if (from && typeof from === "object" || typeof from === "function") {
8371 for (let key of __getOwnPropNames(from))
8372 if (!__hasOwnProp.call(to, key) && key !== except)
8373 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8374 }
8375 return to;
8376 };
8377 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8378
8379 // src/useSuspenseQuery.ts
8380 var useSuspenseQuery_exports = {};
8381 __export(useSuspenseQuery_exports, {
8382 useSuspenseQuery: () => useSuspenseQuery
8383 });
8384 module.exports = __toCommonJS(useSuspenseQuery_exports);
8385 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8386 var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
8387 var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
8388 function useSuspenseQuery(options, queryClient) {
8389 if (true) {
8390 if (options.queryFn === import_query_core.skipToken) {
8391 console.error("skipToken is not allowed for useSuspenseQuery");
8392 }
8393 }
8394 return (0, import_useBaseQuery.useBaseQuery)(
8395 {
8396 ...options,
8397 enabled: true,
8398 suspense: true,
8399 throwOnError: import_suspense.defaultThrowOnError,
8400 placeholderData: void 0
8401 },
8402 import_query_core.QueryObserver,
8403 queryClient
8404 );
8405 }
8406 // Annotate the CommonJS export names for ESM import in node:
8407 0 && (0);
8408 //# sourceMappingURL=useSuspenseQuery.cjs.map
8409
8410 /***/ }),
8411
8412 /***/ "../node_modules/@tanstack/react-query/build/modern/utils.cjs":
8413 /*!********************************************************************!*\
8414 !*** ../node_modules/@tanstack/react-query/build/modern/utils.cjs ***!
8415 \********************************************************************/
8416 /***/ ((module) => {
8417
8418 "use strict";
8419
8420 var __defProp = Object.defineProperty;
8421 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8422 var __getOwnPropNames = Object.getOwnPropertyNames;
8423 var __hasOwnProp = Object.prototype.hasOwnProperty;
8424 var __export = (target, all) => {
8425 for (var name in all)
8426 __defProp(target, name, { get: all[name], enumerable: true });
8427 };
8428 var __copyProps = (to, from, except, desc) => {
8429 if (from && typeof from === "object" || typeof from === "function") {
8430 for (let key of __getOwnPropNames(from))
8431 if (!__hasOwnProp.call(to, key) && key !== except)
8432 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8433 }
8434 return to;
8435 };
8436 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8437
8438 // src/utils.ts
8439 var utils_exports = {};
8440 __export(utils_exports, {
8441 noop: () => noop,
8442 shouldThrowError: () => shouldThrowError
8443 });
8444 module.exports = __toCommonJS(utils_exports);
8445 function shouldThrowError(throwError, params) {
8446 if (typeof throwError === "function") {
8447 return throwError(...params);
8448 }
8449 return !!throwError;
8450 }
8451 function noop() {
8452 }
8453 // Annotate the CommonJS export names for ESM import in node:
8454 0 && (0);
8455 //# sourceMappingURL=utils.cjs.map
8456
8457 /***/ })
8458
8459 /******/ });
8460 /************************************************************************/
8461 /******/ // The module cache
8462 /******/ var __webpack_module_cache__ = {};
8463 /******/
8464 /******/ // The require function
8465 /******/ function __webpack_require__(moduleId) {
8466 /******/ // Check if module is in cache
8467 /******/ var cachedModule = __webpack_module_cache__[moduleId];
8468 /******/ if (cachedModule !== undefined) {
8469 /******/ return cachedModule.exports;
8470 /******/ }
8471 /******/ // Create a new module (and put it into the cache)
8472 /******/ var module = __webpack_module_cache__[moduleId] = {
8473 /******/ // no module.id needed
8474 /******/ // no module.loaded needed
8475 /******/ exports: {}
8476 /******/ };
8477 /******/
8478 /******/ // Execute the module function
8479 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
8480 /******/
8481 /******/ // Return the exports of the module
8482 /******/ return module.exports;
8483 /******/ }
8484 /******/
8485 /************************************************************************/
8486 var __webpack_exports__ = {};
8487 // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
8488 (() => {
8489 "use strict";
8490 /*!***************************************************!*\
8491 !*** ../modules/notifications/assets/js/admin.js ***!
8492 \***************************************************/
8493
8494
8495 var _barButtonNotification = __webpack_require__(/*! ./components/bar-button-notification */ "../modules/notifications/assets/js/components/bar-button-notification.js");
8496 window.elementorNotificationCenter = {
8497 BarButtonNotification: _barButtonNotification.BarButtonNotification
8498 };
8499 })();
8500
8501 /******/ })()
8502 ;
8503 //# sourceMappingURL=admin-notifications.js.map