PluginProbe
Elementor Website Builder – more than just a page builder / 3.19.2
Elementor Website Builder – more than just a page builder v3.19.2
4.3.2 4.3.1 4.3.0 4.3.0-beta3 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 All 455 releases
← All changes | assets/js/admin-notifications.js +5039 -281 4.2.0-beta2 → 3.19.2 View file →
@@ -1,7 +1,63 @@
1 +/*! elementor - v3.19.0 - 07-02-2024 */
1 2 /******/ (() => { // webpackBootstrap
2 3 /******/ var __webpack_modules__ = ({
3 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 + useMutation: () => import_react_query2.useMutation,
38 + useQuery: () => import_react_query2.useQuery,
39 + useQueryClient: () => import_react_query2.useQueryClient
40 +});
41 +module.exports = __toCommonJS(src_exports);
42 +var import_react_query = __webpack_require__(/*! @tanstack/react-query */ "../node_modules/@tanstack/react-query/build/modern/index.cjs");
43 +var import_react_query2 = __webpack_require__(/*! @tanstack/react-query */ "../node_modules/@tanstack/react-query/build/modern/index.cjs");
44 +function createQueryClient() {
45 + return new import_react_query.QueryClient({
46 + defaultOptions: {
47 + queries: {
48 + refetchOnWindowFocus: false,
49 + refetchOnReconnect: false
50 + }
51 + }
52 + });
53 +}
54 +// Annotate the CommonJS export names for ESM import in node:
55 +0 && (0);
56 +//# sourceMappingURL=index.js.map
57 +
58 +/***/ }),
59 +
4 60 /***/ "../modules/notifications/assets/js/api/index.js":
5 61 /*!*******************************************************!*\
6 62 !*** ../modules/notifications/assets/js/api/index.js ***!
7 63 \*******************************************************/
@@ -23,11 +79,12 @@
23 79 data: data
24 80 });
25 81 });
26 82 };
27 -var getNotifications = exports.getNotifications = function getNotifications() {
83 +var getNotifications = function getNotifications() {
28 84 return request('notifications_get');
29 85 };
86 +exports.getNotifications = getNotifications;
30 87
31 88 /***/ }),
32 89
33 90 /***/ "../modules/notifications/assets/js/components/bar-button-notification.js":
@@ -49,10 +106,12 @@
49 106 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
50 107 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
51 108 var _whatsNew = __webpack_require__(/*! ./whats-new */ "../modules/notifications/assets/js/components/whats-new.js");
52 109 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
53 -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
54 -var BarButtonNotification = exports.BarButtonNotification = function BarButtonNotification(props) {
110 +var _giftIcon = __webpack_require__(/*! ../icons/gift-icon */ "../modules/notifications/assets/js/icons/gift-icon.js");
111 +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
112 +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
113 +var BarButtonNotification = function BarButtonNotification(props) {
55 114 var defaultIsRead = props.defaultIsRead;
56 115 var _useState = (0, _react.useState)(false),
57 116 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
58 117 isOpen = _useState2[0],
@@ -79,10 +138,10 @@
79 138 invisible: isRead,
80 139 sx: {
81 140 mx: 0.5
82 141 }
83 - }, /*#__PURE__*/_react.default.createElement("i", {
84 - className: "e-admin-top-bar__bar-button-icon eicon-speakerphone"
142 + }, /*#__PURE__*/_react.default.createElement(_giftIcon.GiftIcon, {
143 + fontSize: "inherit"
85 144 })), /*#__PURE__*/_react.default.createElement("span", {
86 145 className: "e-admin-top-bar__bar-button-title"
87 146 }, props.children)), /*#__PURE__*/_react.default.createElement(_whatsNew.WhatsNew, {
88 147 isOpen: isOpen,
@@ -89,8 +148,9 @@
89 148 setIsOpen: setIsOpen,
90 149 setIsRead: setIsRead
91 150 }));
92 151 };
152 +exports.BarButtonNotification = BarButtonNotification;
93 153 BarButtonNotification.propTypes = {
94 154 defaultIsRead: PropTypes.bool,
95 155 children: PropTypes.any.isRequired
96 156 };
@@ -103,9 +163,8 @@
103 163 \*********************************************************************************/
104 164 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
105 165
106 166 "use strict";
107 -/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
108 167
109 168
110 169 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
111 170 Object.defineProperty(exports, "__esModule", ({
@@ -112,14 +171,13 @@
112 171 value: true
113 172 }));
114 173 exports.WhatsNewDrawerContent = void 0;
115 174 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
116 -var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query");
175 +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js");
117 176 var _api = __webpack_require__(/*! ../api */ "../modules/notifications/assets/js/api/index.js");
118 177 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
119 178 var _whatsNewItem = __webpack_require__(/*! ./whats-new-item */ "../modules/notifications/assets/js/components/whats-new-item.js");
120 -var WhatsNewDrawerContent = exports.WhatsNewDrawerContent = function WhatsNewDrawerContent(_ref) {
121 - var setIsOpen = _ref.setIsOpen;
179 +var WhatsNewDrawerContent = function WhatsNewDrawerContent() {
122 180 var _useQuery = (0, _query.useQuery)({
123 181 queryKey: ['e-notifications'],
124 182 queryFn: _api.getNotifications
125 183 }),
@@ -138,16 +196,13 @@
138 196 return /*#__PURE__*/_react.default.createElement(_whatsNewItem.WhatsNewItem, {
139 197 key: itemIndex,
140 198 item: item,
141 199 itemIndex: itemIndex,
142 - itemsLength: items.length,
143 - setIsOpen: setIsOpen
200 + itemsLength: items.length
144 201 });
145 202 });
146 203 };
147 -WhatsNewDrawerContent.propTypes = {
148 - setIsOpen: PropTypes.func.isRequired
149 -};
204 +exports.WhatsNewDrawerContent = WhatsNewDrawerContent;
150 205
151 206 /***/ }),
152 207
153 208 /***/ "../modules/notifications/assets/js/components/whats-new-item-chips.js":
@@ -167,9 +222,9 @@
167 222 exports.WhatsNewItemChips = void 0;
168 223 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
169 224 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
170 225 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
171 -var WhatsNewItemChips = exports.WhatsNewItemChips = function WhatsNewItemChips(_ref) {
226 +var WhatsNewItemChips = function WhatsNewItemChips(_ref) {
172 227 var chipPlan = _ref.chipPlan,
173 228 chipTags = _ref.chipTags,
174 229 itemIndex = _ref.itemIndex;
175 230 var chips = [];
@@ -204,8 +259,9 @@
204 259 key: "chip-".concat(itemIndex).concat(chipIndex)
205 260 }, chip));
206 261 }));
207 262 };
263 +exports.WhatsNewItemChips = WhatsNewItemChips;
208 264 WhatsNewItemChips.propTypes = {
209 265 chipPlan: PropTypes.string,
210 266 chipTags: PropTypes.array,
211 267 itemIndex: PropTypes.number.isRequired
@@ -212,64 +268,8 @@
212 268 };
213 269
214 270 /***/ }),
215 271
216 -/***/ "../modules/notifications/assets/js/components/whats-new-item-media.js":
217 -/*!*****************************************************************************!*\
218 - !*** ../modules/notifications/assets/js/components/whats-new-item-media.js ***!
219 - \*****************************************************************************/
220 -/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
221 -
222 -"use strict";
223 -
224 -
225 -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
226 -Object.defineProperty(exports, "__esModule", ({
227 - value: true
228 -}));
229 -exports.WhatsNewItemMedia = void 0;
230 -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
231 -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
232 -var _whatsNewItemThumbnail = __webpack_require__(/*! ./whats-new-item-thumbnail */ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js");
233 -/* eslint-disable react/prop-types */
234 -
235 -var WhatsNewItemMedia = exports.WhatsNewItemMedia = function WhatsNewItemMedia(_ref) {
236 - var item = _ref.item;
237 - if (item.youtubeEmbedId) {
238 - var videoId = item.youtubeEmbedId.split('?')[0];
239 - var src = "https://www.youtube.com/embed/".concat(videoId).concat(item.youtubeAutoplay ? '?autoplay=1&mute=1' : '');
240 - var allow = "encrypted-media; picture-in-picture".concat(item.youtubeAutoplay ? '; autoplay' : '');
241 - return /*#__PURE__*/_react.default.createElement(_ui.Box, {
242 - sx: {
243 - pb: 2
244 - }
245 - }, /*#__PURE__*/_react.default.createElement(_ui.Box, {
246 - component: "iframe",
247 - src: src,
248 - title: item.title,
249 - allow: allow,
250 - allowFullScreen: true,
251 - sx: {
252 - aspectRatio: '16/9',
253 - width: '100%',
254 - display: 'block',
255 - border: 'none'
256 - }
257 - }));
258 - }
259 - var mediaSrc = item.gifSrc || item.imageSrc;
260 - if (!mediaSrc) {
261 - return null;
262 - }
263 - return /*#__PURE__*/_react.default.createElement(_whatsNewItemThumbnail.WhatsNewItemThumbnail, {
264 - imageSrc: mediaSrc,
265 - link: item.link,
266 - title: item.title
267 - });
268 -};
269 -
270 -/***/ }),
271 -
272 272 /***/ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js":
273 273 /*!*********************************************************************************!*\
274 274 !*** ../modules/notifications/assets/js/components/whats-new-item-thumbnail.js ***!
275 275 \*********************************************************************************/
@@ -286,9 +286,9 @@
286 286 exports.WhatsNewItemThumbnail = void 0;
287 287 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
288 288 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
289 289 var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js");
290 -var WhatsNewItemThumbnail = exports.WhatsNewItemThumbnail = function WhatsNewItemThumbnail(_ref) {
290 +var WhatsNewItemThumbnail = function WhatsNewItemThumbnail(_ref) {
291 291 var imageSrc = _ref.imageSrc,
292 292 title = _ref.title,
293 293 link = _ref.link;
294 294 return /*#__PURE__*/_react.default.createElement(_ui.Box, {
@@ -304,8 +304,9 @@
304 304 maxWidth: '100%'
305 305 }
306 306 })));
307 307 };
308 +exports.WhatsNewItemThumbnail = WhatsNewItemThumbnail;
308 309 WhatsNewItemThumbnail.propTypes = {
309 310 imageSrc: PropTypes.string.isRequired,
310 311 title: PropTypes.string.isRequired,
311 312 link: PropTypes.string
@@ -329,9 +330,9 @@
329 330 }));
330 331 exports.WhatsNewItemTopicLine = void 0;
331 332 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
332 333 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
333 -var WhatsNewItemTopicLine = exports.WhatsNewItemTopicLine = function WhatsNewItemTopicLine(_ref) {
334 +var WhatsNewItemTopicLine = function WhatsNewItemTopicLine(_ref) {
334 335 var topic = _ref.topic,
335 336 date = _ref.date;
336 337 return /*#__PURE__*/_react.default.createElement(_ui.Stack, {
337 338 direction: "row",
@@ -345,8 +346,9 @@
345 346 pb: 1
346 347 }
347 348 }, topic && /*#__PURE__*/_react.default.createElement(_ui.Box, null, topic), date && /*#__PURE__*/_react.default.createElement(_ui.Box, null, date));
348 349 };
350 +exports.WhatsNewItemTopicLine = WhatsNewItemTopicLine;
349 351 WhatsNewItemTopicLine.propTypes = {
350 352 topic: PropTypes.string,
351 353 date: PropTypes.string
352 354 };
@@ -371,15 +373,14 @@
371 373 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
372 374 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
373 375 var _whatsNewItemTopicLine = __webpack_require__(/*! ./whats-new-item-topic-line */ "../modules/notifications/assets/js/components/whats-new-item-topic-line.js");
374 376 var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js");
375 -var _whatsNewItemMedia = __webpack_require__(/*! ./whats-new-item-media */ "../modules/notifications/assets/js/components/whats-new-item-media.js");
377 +var _whatsNewItemThumbnail = __webpack_require__(/*! ./whats-new-item-thumbnail */ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js");
376 378 var _whatsNewItemChips = __webpack_require__(/*! ./whats-new-item-chips */ "../modules/notifications/assets/js/components/whats-new-item-chips.js");
377 -var WhatsNewItem = exports.WhatsNewItem = function WhatsNewItem(_ref) {
379 +var WhatsNewItem = function WhatsNewItem(_ref) {
378 380 var item = _ref.item,
379 381 itemIndex = _ref.itemIndex,
380 - itemsLength = _ref.itemsLength,
381 - setIsOpen = _ref.setIsOpen;
382 + itemsLength = _ref.itemsLength;
382 383 return /*#__PURE__*/_react.default.createElement(_ui.Box, {
383 384 key: itemIndex,
384 385 display: "flex",
385 386 flexDirection: "column",
@@ -395,10 +396,12 @@
395 396 variant: "subtitle1",
396 397 sx: {
397 398 pb: 2
398 399 }
399 - }, item.title)), /*#__PURE__*/_react.default.createElement(_whatsNewItemMedia.WhatsNewItemMedia, {
400 - item: item
400 + }, item.title)), item.imageSrc && /*#__PURE__*/_react.default.createElement(_whatsNewItemThumbnail.WhatsNewItemThumbnail, {
401 + imageSrc: item.imageSrc,
402 + link: item.link,
403 + title: item.title
401 404 }), /*#__PURE__*/_react.default.createElement(_whatsNewItemChips.WhatsNewItemChips, {
402 405 chipPlan: item.chipPlan,
403 406 chipTags: item.chipTags,
404 407 itemIndex: itemIndex
@@ -417,15 +420,12 @@
417 420 pb: 2
418 421 }
419 422 }, /*#__PURE__*/_react.default.createElement(_ui.Button, {
420 423 href: item.ctaLink,
421 - target: item.ctaLink.startsWith('#') ? '_self' : '_blank',
424 + target: "_blank",
422 425 variant: "contained",
423 426 size: "small",
424 - color: "promotion",
425 - onClick: item.ctaLink.startsWith('#') ? function () {
426 - return setIsOpen(false);
427 - } : function () {}
427 + color: "promotion"
428 428 }, item.cta)), itemIndex !== itemsLength - 1 && /*#__PURE__*/_react.default.createElement(_ui.Divider, {
429 429 sx: {
430 430 my: 1
431 431 }
@@ -430,13 +430,13 @@
430 430 my: 1
431 431 }
432 432 }));
433 433 };
434 +exports.WhatsNewItem = WhatsNewItem;
434 435 WhatsNewItem.propTypes = {
435 436 item: PropTypes.object.isRequired,
436 437 itemIndex: PropTypes.number.isRequired,
437 - itemsLength: PropTypes.number.isRequired,
438 - setIsOpen: PropTypes.func.isRequired
438 + itemsLength: PropTypes.number.isRequired
439 439 };
440 440
441 441 /***/ }),
442 442
@@ -458,9 +458,9 @@
458 458 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
459 459 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
460 460 var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
461 461 var _xIcon = __webpack_require__(/*! ../icons/x-icon */ "../modules/notifications/assets/js/icons/x-icon.js");
462 -var WhatsNewTopBar = exports.WhatsNewTopBar = function WhatsNewTopBar(props) {
462 +var WhatsNewTopBar = function WhatsNewTopBar(props) {
463 463 var setIsOpen = props.setIsOpen;
464 464 return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.AppBar, {
465 465 elevation: 0,
466 466 position: "sticky",
@@ -481,8 +481,9 @@
481 481 return setIsOpen(false);
482 482 }
483 483 }, /*#__PURE__*/_react.default.createElement(_xIcon.XIcon, null)))), /*#__PURE__*/_react.default.createElement(_ui.Divider, null));
484 484 };
485 +exports.WhatsNewTopBar = WhatsNewTopBar;
485 486 WhatsNewTopBar.propTypes = {
486 487 setIsOpen: PropTypes.func.isRequired
487 488 };
488 489
@@ -504,12 +505,13 @@
504 505 }));
505 506 exports.WhatsNew = void 0;
506 507 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
507 508 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
508 -var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query");
509 +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js");
509 510 var _whatsNewTopBar = __webpack_require__(/*! ./whats-new-top-bar */ "../modules/notifications/assets/js/components/whats-new-top-bar.js");
510 511 var _whatsNewDrawerContent = __webpack_require__(/*! ./whats-new-drawer-content */ "../modules/notifications/assets/js/components/whats-new-drawer-content.js");
511 -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
512 +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
513 +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
512 514 var queryClient = new _query.QueryClient({
513 515 defaultOptions: {
514 516 queries: {
515 517 refetchOnWindowFocus: false,
@@ -517,10 +519,10 @@
517 519 staleTime: 1000 * 60 * 30 // 30 minutes
518 520 }
519 521 }
520 522 });
521 -var WhatsNew = exports.WhatsNew = function WhatsNew(props) {
522 - var _window$elementor, _window$elementor$get;
523 +
524 +var WhatsNew = function WhatsNew(props) {
523 525 var isOpen = props.isOpen,
524 526 setIsOpen = props.setIsOpen,
525 527 setIsRead = props.setIsRead,
526 528 _props$anchorPosition = props.anchorPosition,
@@ -532,12 +534,10 @@
532 534 setIsRead(true);
533 535 }, [isOpen, setIsRead]);
534 536 return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_query.QueryClientProvider, {
535 537 client: queryClient
536 - }, /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, {
537 - rtl: elementorCommon.config.isRTL
538 538 }, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, {
539 - 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'
539 + colorScheme: "auto"
540 540 }, /*#__PURE__*/_react.default.createElement(_ui.Drawer, {
541 541 anchor: anchorPosition,
542 542 open: isOpen,
543 543 onClose: function onClose() {
@@ -560,12 +560,11 @@
560 560 }), /*#__PURE__*/_react.default.createElement(_ui.Box, {
561 561 sx: {
562 562 padding: '16px'
563 563 }
564 - }, /*#__PURE__*/_react.default.createElement(_whatsNewDrawerContent.WhatsNewDrawerContent, {
565 - setIsOpen: setIsOpen
566 - }))))))));
564 + }, /*#__PURE__*/_react.default.createElement(_whatsNewDrawerContent.WhatsNewDrawerContent, null)))))));
567 565 };
566 +exports.WhatsNew = WhatsNew;
568 567 WhatsNew.propTypes = {
569 568 isOpen: PropTypes.bool.isRequired,
570 569 setIsOpen: PropTypes.func.isRequired,
571 570 setIsRead: PropTypes.func.isRequired,
@@ -590,9 +589,9 @@
590 589 }));
591 590 exports.WrapperWithLink = void 0;
592 591 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
593 592 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
594 -var WrapperWithLink = exports.WrapperWithLink = function WrapperWithLink(props) {
593 +var WrapperWithLink = function WrapperWithLink(props) {
595 594 var link = props.link,
596 595 children = props.children;
597 596 if (!link) {
598 597 return children;
@@ -608,8 +607,9 @@
608 607 }
609 608 }
610 609 }, children);
611 610 };
611 +exports.WrapperWithLink = WrapperWithLink;
612 612 WrapperWithLink.propTypes = {
613 613 link: PropTypes.string,
614 614 children: PropTypes.any.isRequired
615 615 };
@@ -615,8 +615,43 @@
615 615 };
616 616
617 617 /***/ }),
618 618
619 +/***/ "../modules/notifications/assets/js/icons/gift-icon.js":
620 +/*!*************************************************************!*\
621 + !*** ../modules/notifications/assets/js/icons/gift-icon.js ***!
622 + \*************************************************************/
623 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
624 +
625 +"use strict";
626 +
627 +
628 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
629 +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
630 +Object.defineProperty(exports, "__esModule", ({
631 + value: true
632 +}));
633 +exports.GiftIcon = void 0;
634 +var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
635 +var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
636 +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
637 +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
638 +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
639 +var GiftIcon = (0, _react.forwardRef)(function (props, ref) {
640 + return /*#__PURE__*/_react.default.createElement(_ui.SvgIcon, (0, _extends2.default)({
641 + viewBox: "0 0 24 24"
642 + }, props, {
643 + ref: ref
644 + }), /*#__PURE__*/_react.default.createElement("path", {
645 + fillRule: "evenodd",
646 + clipRule: "evenodd",
647 + d: "M9.65527 4.84484C8.95951 4.07178 8.20923 3.73771 7.51306 3.74984L7.5 3.75007C7.03587 3.75007 6.59075 3.93433 6.26256 4.26252C5.93437 4.59071 5.75 5.03583 5.75 5.49995C5.75 5.96408 5.93437 6.4092 6.26256 6.73739C6.59075 7.06558 7.03587 7.24995 7.5 7.24995C7.50295 7.24995 7.5059 7.24997 7.50884 7.25001H11.0002C10.6592 6.26394 10.1939 5.44328 9.65527 4.84484ZM11.25 8.75001V11.25H4C3.86193 11.25 3.75 11.1381 3.75 11V9.00001C3.75 8.86193 3.86193 8.75001 4 8.75001H11.25ZM4.25 12.75H4C3.0335 12.75 2.25 11.9665 2.25 11V9.00001C2.25 8.03351 3.0335 7.25001 4 7.25001H4.76141C4.43004 6.73144 4.25 6.12498 4.25 5.49995C4.25 4.638 4.59241 3.81135 5.2019 3.20186C5.80984 2.59392 6.63384 2.2517 7.49342 2.24996C8.72414 2.23069 9.86213 2.83242 10.7702 3.84139C11.2484 4.37275 11.6608 5.01284 12 5.73103C12.3392 5.01284 12.7516 4.37275 13.2298 3.84139C14.1379 2.83242 15.2759 2.23069 16.5066 2.24996C17.3662 2.2517 18.1902 2.59392 18.7981 3.20186C19.4076 3.81135 19.75 4.638 19.75 5.49995C19.75 6.12498 19.57 6.73144 19.2386 7.25001H20C20.9665 7.25001 21.75 8.03351 21.75 9.00001V11C21.75 11.9665 20.9665 12.75 20 12.75H19.75V19C19.75 19.7294 19.4603 20.4288 18.9445 20.9445C18.4288 21.4603 17.7293 21.75 17 21.75H7C6.27065 21.75 5.57118 21.4603 5.05546 20.9445C4.53973 20.4288 4.25 19.7294 4.25 19V12.75ZM11.25 20.25H7C6.66848 20.25 6.35054 20.1183 6.11612 19.8839C5.8817 19.6495 5.75 19.3315 5.75 19V12.75H11.25V20.25ZM12.75 20.25H17C17.3315 20.25 17.6495 20.1183 17.8839 19.8839C18.1183 19.6495 18.25 19.3315 18.25 19V12.75H12.75V20.25ZM12.75 11.25V8.75001H20C20.1381 8.75001 20.25 8.86193 20.25 9.00001V11C20.25 11.1381 20.1381 11.25 20 11.25H12.75ZM16.4912 7.25001C16.4941 7.24997 16.497 7.24995 16.5 7.24995C16.9641 7.24995 17.4092 7.06558 17.7374 6.73739C18.0656 6.4092 18.25 5.96408 18.25 5.49995C18.25 5.03583 18.0656 4.59071 17.7374 4.26252C17.4092 3.93433 16.9641 3.74995 16.5 3.74995H16.4869C15.7908 3.73783 15.0405 4.07178 14.3447 4.84484C13.8061 5.44328 13.3408 6.26394 12.9998 7.25001H16.4912Z"
648 + }));
649 +});
650 +exports.GiftIcon = GiftIcon;
651 +
652 +/***/ }),
653 +
619 654 /***/ "../modules/notifications/assets/js/icons/x-icon.js":
620 655 /*!**********************************************************!*\
621 656 !*** ../modules/notifications/assets/js/icons/x-icon.js ***!
622 657 \**********************************************************/
@@ -633,10 +668,11 @@
633 668 exports.XIcon = void 0;
634 669 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
635 670 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
636 671 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
637 -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
638 -var XIcon = exports.XIcon = (0, _react.forwardRef)(function (props, ref) {
672 +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
673 +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
674 +var XIcon = (0, _react.forwardRef)(function (props, ref) {
639 675 return /*#__PURE__*/_react.default.createElement(_ui.SvgIcon, (0, _extends2.default)({
640 676 viewBox: "0 0 24 24"
641 677 }, props, {
642 678 ref: ref
@@ -649,177 +685,12 @@
649 685 clipRule: "evenodd",
650 686 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"
651 687 }));
652 688 });
689 +exports.XIcon = XIcon;
653 690
654 691 /***/ }),
655 692
656 -/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
657 -/*!******************************************************************!*\
658 - !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
659 - \******************************************************************/
660 -/***/ ((module) => {
661 -
662 -function _arrayLikeToArray(r, a) {
663 - (null == a || a > r.length) && (a = r.length);
664 - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
665 - return n;
666 -}
667 -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
668 -
669 -/***/ }),
670 -
671 -/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
672 -/*!****************************************************************!*\
673 - !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
674 - \****************************************************************/
675 -/***/ ((module) => {
676 -
677 -function _arrayWithHoles(r) {
678 - if (Array.isArray(r)) return r;
679 -}
680 -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
681 -
682 -/***/ }),
683 -
684 -/***/ "../node_modules/@babel/runtime/helpers/extends.js":
685 -/*!*********************************************************!*\
686 - !*** ../node_modules/@babel/runtime/helpers/extends.js ***!
687 - \*********************************************************/
688 -/***/ ((module) => {
689 -
690 -function _extends() {
691 - return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {
692 - for (var e = 1; e < arguments.length; e++) {
693 - var t = arguments[e];
694 - for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
695 - }
696 - return n;
697 - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments);
698 -}
699 -module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
700 -
701 -/***/ }),
702 -
703 -/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
704 -/*!***********************************************************************!*\
705 - !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
706 - \***********************************************************************/
707 -/***/ ((module) => {
708 -
709 -function _interopRequireDefault(e) {
710 - return e && e.__esModule ? e : {
711 - "default": e
712 - };
713 -}
714 -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
715 -
716 -/***/ }),
717 -
718 -/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
719 -/*!**********************************************************************!*\
720 - !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
721 - \**********************************************************************/
722 -/***/ ((module) => {
723 -
724 -function _iterableToArrayLimit(r, l) {
725 - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
726 - if (null != t) {
727 - var e,
728 - n,
729 - i,
730 - u,
731 - a = [],
732 - f = !0,
733 - o = !1;
734 - try {
735 - if (i = (t = t.call(r)).next, 0 === l) {
736 - if (Object(t) !== t) return;
737 - f = !1;
738 - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
739 - } catch (r) {
740 - o = !0, n = r;
741 - } finally {
742 - try {
743 - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
744 - } finally {
745 - if (o) throw n;
746 - }
747 - }
748 - return a;
749 - }
750 -}
751 -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
752 -
753 -/***/ }),
754 -
755 -/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
756 -/*!*****************************************************************!*\
757 - !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
758 - \*****************************************************************/
759 -/***/ ((module) => {
760 -
761 -function _nonIterableRest() {
762 - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
763 -}
764 -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
765 -
766 -/***/ }),
767 -
768 -/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
769 -/*!***************************************************************!*\
770 - !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
771 - \***************************************************************/
772 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
773 -
774 -var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
775 -var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
776 -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
777 -var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
778 -function _slicedToArray(r, e) {
779 - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
780 -}
781 -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
782 -
783 -/***/ }),
784 -
785 -/***/ "../node_modules/@babel/runtime/helpers/typeof.js":
786 -/*!********************************************************!*\
787 - !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
788 - \********************************************************/
789 -/***/ ((module) => {
790 -
791 -function _typeof(o) {
792 - "@babel/helpers - typeof";
793 -
794 - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
795 - return typeof o;
796 - } : function (o) {
797 - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
798 - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
799 -}
800 -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
801 -
802 -/***/ }),
803 -
804 -/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
805 -/*!****************************************************************************!*\
806 - !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
807 - \****************************************************************************/
808 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
809 -
810 -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
811 -function _unsupportedIterableToArray(r, a) {
812 - if (r) {
813 - if ("string" == typeof r) return arrayLikeToArray(r, a);
814 - var t = {}.toString.call(r).slice(8, -1);
815 - 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;
816 - }
817 -}
818 -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
819 -
820 -/***/ }),
821 -
822 693 /***/ "../node_modules/object-assign/index.js":
823 694 /*!**********************************************!*\
824 695 !*** ../node_modules/object-assign/index.js ***!
825 696 \**********************************************/
@@ -1674,10 +1545,9 @@
1674 1545 // By explicitly using `prop-types` you are opting into new development behavior.
1675 1546 // http://fb.me/prop-types-in-prod
1676 1547 var throwOnDirectAccess = true;
1677 1548 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
1678 -} else // removed by dead control flow
1679 -{}
1549 +} else {}
1680 1550
1681 1551
1682 1552 /***/ }),
1683 1553
@@ -1915,10 +1785,9 @@
1915 1785
1916 1786 "use strict";
1917 1787
1918 1788
1919 -if (false) // removed by dead control flow
1920 -{} else {
1789 +if (false) {} else {
1921 1790 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js");
1922 1791 }
1923 1792
1924 1793
@@ -1923,16 +1792,16 @@
1923 1792
1924 1793
1925 1794 /***/ }),
1926 1795
1927 -/***/ "@elementor/query":
1928 -/*!************************************!*\
1929 - !*** external "elementorV2.query" ***!
1930 - \************************************/
1796 +/***/ "react":
1797 +/*!************************!*\
1798 + !*** external "React" ***!
1799 + \************************/
1931 1800 /***/ ((module) => {
1932 1801
1933 1802 "use strict";
1934 -module.exports = elementorV2.query;
1803 +module.exports = React;
1935 1804
1936 1805 /***/ }),
1937 1806
1938 1807 /***/ "@elementor/ui":
@@ -1956,17 +1825,4906 @@
1956 1825 module.exports = wp.i18n;
1957 1826
1958 1827 /***/ }),
1959 1828
1960 -/***/ "react":
1961 -/*!************************!*\
1962 - !*** external "React" ***!
1963 - \************************/
1829 +/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
1830 +/*!******************************************************************!*\
1831 + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
1832 + \******************************************************************/
1964 1833 /***/ ((module) => {
1965 1834
1835 +function _arrayLikeToArray(arr, len) {
1836 + if (len == null || len > arr.length) len = arr.length;
1837 + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1838 + return arr2;
1839 +}
1840 +module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
1841 +
1842 +/***/ }),
1843 +
1844 +/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
1845 +/*!****************************************************************!*\
1846 + !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
1847 + \****************************************************************/
1848 +/***/ ((module) => {
1849 +
1850 +function _arrayWithHoles(arr) {
1851 + if (Array.isArray(arr)) return arr;
1852 +}
1853 +module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
1854 +
1855 +/***/ }),
1856 +
1857 +/***/ "../node_modules/@babel/runtime/helpers/extends.js":
1858 +/*!*********************************************************!*\
1859 + !*** ../node_modules/@babel/runtime/helpers/extends.js ***!
1860 + \*********************************************************/
1861 +/***/ ((module) => {
1862 +
1863 +function _extends() {
1864 + module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {
1865 + for (var i = 1; i < arguments.length; i++) {
1866 + var source = arguments[i];
1867 + for (var key in source) {
1868 + if (Object.prototype.hasOwnProperty.call(source, key)) {
1869 + target[key] = source[key];
1870 + }
1871 + }
1872 + }
1873 + return target;
1874 + }, module.exports.__esModule = true, module.exports["default"] = module.exports;
1875 + return _extends.apply(this, arguments);
1876 +}
1877 +module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
1878 +
1879 +/***/ }),
1880 +
1881 +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
1882 +/*!***********************************************************************!*\
1883 + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
1884 + \***********************************************************************/
1885 +/***/ ((module) => {
1886 +
1887 +function _interopRequireDefault(obj) {
1888 + return obj && obj.__esModule ? obj : {
1889 + "default": obj
1890 + };
1891 +}
1892 +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
1893 +
1894 +/***/ }),
1895 +
1896 +/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
1897 +/*!**********************************************************************!*\
1898 + !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
1899 + \**********************************************************************/
1900 +/***/ ((module) => {
1901 +
1902 +function _iterableToArrayLimit(r, l) {
1903 + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
1904 + if (null != t) {
1905 + var e,
1906 + n,
1907 + i,
1908 + u,
1909 + a = [],
1910 + f = !0,
1911 + o = !1;
1912 + try {
1913 + if (i = (t = t.call(r)).next, 0 === l) {
1914 + if (Object(t) !== t) return;
1915 + f = !1;
1916 + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
1917 + } catch (r) {
1918 + o = !0, n = r;
1919 + } finally {
1920 + try {
1921 + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
1922 + } finally {
1923 + if (o) throw n;
1924 + }
1925 + }
1926 + return a;
1927 + }
1928 +}
1929 +module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
1930 +
1931 +/***/ }),
1932 +
1933 +/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
1934 +/*!*****************************************************************!*\
1935 + !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
1936 + \*****************************************************************/
1937 +/***/ ((module) => {
1938 +
1939 +function _nonIterableRest() {
1940 + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1941 +}
1942 +module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
1943 +
1944 +/***/ }),
1945 +
1946 +/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
1947 +/*!***************************************************************!*\
1948 + !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
1949 + \***************************************************************/
1950 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1951 +
1952 +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
1953 +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
1954 +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
1955 +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
1956 +function _slicedToArray(arr, i) {
1957 + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
1958 +}
1959 +module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
1960 +
1961 +/***/ }),
1962 +
1963 +/***/ "../node_modules/@babel/runtime/helpers/typeof.js":
1964 +/*!********************************************************!*\
1965 + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
1966 + \********************************************************/
1967 +/***/ ((module) => {
1968 +
1969 +function _typeof(o) {
1970 + "@babel/helpers - typeof";
1971 +
1972 + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
1973 + return typeof o;
1974 + } : function (o) {
1975 + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
1976 + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
1977 +}
1978 +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
1979 +
1980 +/***/ }),
1981 +
1982 +/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
1983 +/*!****************************************************************************!*\
1984 + !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
1985 + \****************************************************************************/
1986 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1987 +
1988 +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
1989 +function _unsupportedIterableToArray(o, minLen) {
1990 + if (!o) return;
1991 + if (typeof o === "string") return arrayLikeToArray(o, minLen);
1992 + var n = Object.prototype.toString.call(o).slice(8, -1);
1993 + if (n === "Object" && o.constructor) n = o.constructor.name;
1994 + if (n === "Map" || n === "Set") return Array.from(o);
1995 + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
1996 +}
1997 +module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
1998 +
1999 +/***/ }),
2000 +
2001 +/***/ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs":
2002 +/*!**************************************************************************!*\
2003 + !*** ../node_modules/@tanstack/query-core/build/modern/focusManager.cjs ***!
2004 + \**************************************************************************/
2005 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2006 +
1966 2007 "use strict";
1967 -module.exports = React;
1968 2008
2009 +var __defProp = Object.defineProperty;
2010 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2011 +var __getOwnPropNames = Object.getOwnPropertyNames;
2012 +var __hasOwnProp = Object.prototype.hasOwnProperty;
2013 +var __export = (target, all) => {
2014 + for (var name in all)
2015 + __defProp(target, name, { get: all[name], enumerable: true });
2016 +};
2017 +var __copyProps = (to, from, except, desc) => {
2018 + if (from && typeof from === "object" || typeof from === "function") {
2019 + for (let key of __getOwnPropNames(from))
2020 + if (!__hasOwnProp.call(to, key) && key !== except)
2021 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
2022 + }
2023 + return to;
2024 +};
2025 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2026 +
2027 +// src/focusManager.ts
2028 +var focusManager_exports = {};
2029 +__export(focusManager_exports, {
2030 + FocusManager: () => FocusManager,
2031 + focusManager: () => focusManager
2032 +});
2033 +module.exports = __toCommonJS(focusManager_exports);
2034 +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
2035 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
2036 +var FocusManager = class extends import_subscribable.Subscribable {
2037 + #focused;
2038 + #cleanup;
2039 + #setup;
2040 + constructor() {
2041 + super();
2042 + this.#setup = (onFocus) => {
2043 + if (!import_utils.isServer && window.addEventListener) {
2044 + const listener = () => onFocus();
2045 + window.addEventListener("visibilitychange", listener, false);
2046 + return () => {
2047 + window.removeEventListener("visibilitychange", listener);
2048 + };
2049 + }
2050 + return;
2051 + };
2052 + }
2053 + onSubscribe() {
2054 + if (!this.#cleanup) {
2055 + this.setEventListener(this.#setup);
2056 + }
2057 + }
2058 + onUnsubscribe() {
2059 + if (!this.hasListeners()) {
2060 + this.#cleanup?.();
2061 + this.#cleanup = void 0;
2062 + }
2063 + }
2064 + setEventListener(setup) {
2065 + this.#setup = setup;
2066 + this.#cleanup?.();
2067 + this.#cleanup = setup((focused) => {
2068 + if (typeof focused === "boolean") {
2069 + this.setFocused(focused);
2070 + } else {
2071 + this.onFocus();
2072 + }
2073 + });
2074 + }
2075 + setFocused(focused) {
2076 + const changed = this.#focused !== focused;
2077 + if (changed) {
2078 + this.#focused = focused;
2079 + this.onFocus();
2080 + }
2081 + }
2082 + onFocus() {
2083 + this.listeners.forEach((listener) => {
2084 + listener();
2085 + });
2086 + }
2087 + isFocused() {
2088 + if (typeof this.#focused === "boolean") {
2089 + return this.#focused;
2090 + }
2091 + return globalThis.document?.visibilityState !== "hidden";
2092 + }
2093 +};
2094 +var focusManager = new FocusManager();
2095 +// Annotate the CommonJS export names for ESM import in node:
2096 +0 && (0);
2097 +//# sourceMappingURL=focusManager.cjs.map
2098 +
2099 +/***/ }),
2100 +
2101 +/***/ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs":
2102 +/*!***********************************************************************!*\
2103 + !*** ../node_modules/@tanstack/query-core/build/modern/hydration.cjs ***!
2104 + \***********************************************************************/
2105 +/***/ ((module) => {
2106 +
2107 +"use strict";
2108 +
2109 +var __defProp = Object.defineProperty;
2110 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2111 +var __getOwnPropNames = Object.getOwnPropertyNames;
2112 +var __hasOwnProp = Object.prototype.hasOwnProperty;
2113 +var __export = (target, all) => {
2114 + for (var name in all)
2115 + __defProp(target, name, { get: all[name], enumerable: true });
2116 +};
2117 +var __copyProps = (to, from, except, desc) => {
2118 + if (from && typeof from === "object" || typeof from === "function") {
2119 + for (let key of __getOwnPropNames(from))
2120 + if (!__hasOwnProp.call(to, key) && key !== except)
2121 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
2122 + }
2123 + return to;
2124 +};
2125 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2126 +
2127 +// src/hydration.ts
2128 +var hydration_exports = {};
2129 +__export(hydration_exports, {
2130 + defaultShouldDehydrateMutation: () => defaultShouldDehydrateMutation,
2131 + defaultShouldDehydrateQuery: () => defaultShouldDehydrateQuery,
2132 + dehydrate: () => dehydrate,
2133 + hydrate: () => hydrate
2134 +});
2135 +module.exports = __toCommonJS(hydration_exports);
2136 +function dehydrateMutation(mutation) {
2137 + return {
2138 + mutationKey: mutation.options.mutationKey,
2139 + state: mutation.state,
2140 + ...mutation.meta && { meta: mutation.meta }
2141 + };
2142 +}
2143 +function dehydrateQuery(query) {
2144 + return {
2145 + state: query.state,
2146 + queryKey: query.queryKey,
2147 + queryHash: query.queryHash,
2148 + ...query.meta && { meta: query.meta }
2149 + };
2150 +}
2151 +function defaultShouldDehydrateMutation(mutation) {
2152 + return mutation.state.isPaused;
2153 +}
2154 +function defaultShouldDehydrateQuery(query) {
2155 + return query.state.status === "success";
2156 +}
2157 +function dehydrate(client, options = {}) {
2158 + const filterMutation = options.shouldDehydrateMutation ?? defaultShouldDehydrateMutation;
2159 + const mutations = client.getMutationCache().getAll().flatMap(
2160 + (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : []
2161 + );
2162 + const filterQuery = options.shouldDehydrateQuery ?? defaultShouldDehydrateQuery;
2163 + const queries = client.getQueryCache().getAll().flatMap((query) => filterQuery(query) ? [dehydrateQuery(query)] : []);
2164 + return { mutations, queries };
2165 +}
2166 +function hydrate(client, dehydratedState, options) {
2167 + if (typeof dehydratedState !== "object" || dehydratedState === null) {
2168 + return;
2169 + }
2170 + const mutationCache = client.getMutationCache();
2171 + const queryCache = client.getQueryCache();
2172 + const mutations = dehydratedState.mutations || [];
2173 + const queries = dehydratedState.queries || [];
2174 + mutations.forEach((dehydratedMutation) => {
2175 + mutationCache.build(
2176 + client,
2177 + {
2178 + ...options?.defaultOptions?.mutations,
2179 + mutationKey: dehydratedMutation.mutationKey,
2180 + meta: dehydratedMutation.meta
2181 + },
2182 + dehydratedMutation.state
2183 + );
2184 + });
2185 + queries.forEach(({ queryKey, state, queryHash, meta }) => {
2186 + const query = queryCache.get(queryHash);
2187 + if (query) {
2188 + if (query.state.dataUpdatedAt < state.dataUpdatedAt) {
2189 + const { fetchStatus: _ignored, ...dehydratedQueryState } = state;
2190 + query.setState(dehydratedQueryState);
2191 + }
2192 + return;
2193 + }
2194 + queryCache.build(
2195 + client,
2196 + {
2197 + ...options?.defaultOptions?.queries,
2198 + queryKey,
2199 + queryHash,
2200 + meta
2201 + },
2202 + // Reset fetch status to idle to avoid
2203 + // query being stuck in fetching state upon hydration
2204 + {
2205 + ...state,
2206 + fetchStatus: "idle"
2207 + }
2208 + );
2209 + });
2210 +}
2211 +// Annotate the CommonJS export names for ESM import in node:
2212 +0 && (0);
2213 +//# sourceMappingURL=hydration.cjs.map
2214 +
2215 +/***/ }),
2216 +
2217 +/***/ "../node_modules/@tanstack/query-core/build/modern/index.cjs":
2218 +/*!*******************************************************************!*\
2219 + !*** ../node_modules/@tanstack/query-core/build/modern/index.cjs ***!
2220 + \*******************************************************************/
2221 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2222 +
2223 +"use strict";
2224 +
2225 +var __defProp = Object.defineProperty;
2226 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2227 +var __getOwnPropNames = Object.getOwnPropertyNames;
2228 +var __hasOwnProp = Object.prototype.hasOwnProperty;
2229 +var __export = (target, all) => {
2230 + for (var name in all)
2231 + __defProp(target, name, { get: all[name], enumerable: true });
2232 +};
2233 +var __copyProps = (to, from, except, desc) => {
2234 + if (from && typeof from === "object" || typeof from === "function") {
2235 + for (let key of __getOwnPropNames(from))
2236 + if (!__hasOwnProp.call(to, key) && key !== except)
2237 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
2238 + }
2239 + return to;
2240 +};
2241 +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
2242 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2243 +
2244 +// src/index.ts
2245 +var src_exports = {};
2246 +__export(src_exports, {
2247 + CancelledError: () => import_retryer.CancelledError,
2248 + InfiniteQueryObserver: () => import_infiniteQueryObserver.InfiniteQueryObserver,
2249 + MutationCache: () => import_mutationCache.MutationCache,
2250 + MutationObserver: () => import_mutationObserver.MutationObserver,
2251 + QueriesObserver: () => import_queriesObserver.QueriesObserver,
2252 + Query: () => import_query.Query,
2253 + QueryCache: () => import_queryCache.QueryCache,
2254 + QueryClient: () => import_queryClient.QueryClient,
2255 + QueryObserver: () => import_queryObserver.QueryObserver,
2256 + defaultShouldDehydrateMutation: () => import_hydration.defaultShouldDehydrateMutation,
2257 + defaultShouldDehydrateQuery: () => import_hydration.defaultShouldDehydrateQuery,
2258 + dehydrate: () => import_hydration.dehydrate,
2259 + focusManager: () => import_focusManager.focusManager,
2260 + hashKey: () => import_utils.hashKey,
2261 + hydrate: () => import_hydration.hydrate,
2262 + isCancelledError: () => import_retryer2.isCancelledError,
2263 + isServer: () => import_utils.isServer,
2264 + keepPreviousData: () => import_utils.keepPreviousData,
2265 + matchQuery: () => import_utils.matchQuery,
2266 + notifyManager: () => import_notifyManager.notifyManager,
2267 + onlineManager: () => import_onlineManager.onlineManager,
2268 + replaceEqualDeep: () => import_utils.replaceEqualDeep
2269 +});
2270 +module.exports = __toCommonJS(src_exports);
2271 +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
2272 +var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs");
2273 +var import_queryClient = __webpack_require__(/*! ./queryClient.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs");
2274 +var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
2275 +var import_queriesObserver = __webpack_require__(/*! ./queriesObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs");
2276 +var import_infiniteQueryObserver = __webpack_require__(/*! ./infiniteQueryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs");
2277 +var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs");
2278 +var import_mutationObserver = __webpack_require__(/*! ./mutationObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs");
2279 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
2280 +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
2281 +var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
2282 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
2283 +var import_retryer2 = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
2284 +var import_hydration = __webpack_require__(/*! ./hydration.cjs */ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs");
2285 +__reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/query-core/build/modern/types.cjs"), module.exports);
2286 +var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs");
2287 +// Annotate the CommonJS export names for ESM import in node:
2288 +0 && (0);
2289 +//# sourceMappingURL=index.cjs.map
2290 +
2291 +/***/ }),
2292 +
2293 +/***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs":
2294 +/*!***********************************************************************************!*\
2295 + !*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs ***!
2296 + \***********************************************************************************/
2297 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2298 +
2299 +"use strict";
2300 +
2301 +var __defProp = Object.defineProperty;
2302 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2303 +var __getOwnPropNames = Object.getOwnPropertyNames;
2304 +var __hasOwnProp = Object.prototype.hasOwnProperty;
2305 +var __export = (target, all) => {
2306 + for (var name in all)
2307 + __defProp(target, name, { get: all[name], enumerable: true });
2308 +};
2309 +var __copyProps = (to, from, except, desc) => {
2310 + if (from && typeof from === "object" || typeof from === "function") {
2311 + for (let key of __getOwnPropNames(from))
2312 + if (!__hasOwnProp.call(to, key) && key !== except)
2313 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
2314 + }
2315 + return to;
2316 +};
2317 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2318 +
2319 +// src/infiniteQueryBehavior.ts
2320 +var infiniteQueryBehavior_exports = {};
2321 +__export(infiniteQueryBehavior_exports, {
2322 + hasNextPage: () => hasNextPage,
2323 + hasPreviousPage: () => hasPreviousPage,
2324 + infiniteQueryBehavior: () => infiniteQueryBehavior
2325 +});
2326 +module.exports = __toCommonJS(infiniteQueryBehavior_exports);
2327 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
2328 +function infiniteQueryBehavior(pages) {
2329 + return {
2330 + onFetch: (context, query) => {
2331 + const fetchFn = async () => {
2332 + const options = context.options;
2333 + const direction = context.fetchOptions?.meta?.fetchMore?.direction;
2334 + const oldPages = context.state.data?.pages || [];
2335 + const oldPageParams = context.state.data?.pageParams || [];
2336 + const empty = { pages: [], pageParams: [] };
2337 + let cancelled = false;
2338 + const addSignalProperty = (object) => {
2339 + Object.defineProperty(object, "signal", {
2340 + enumerable: true,
2341 + get: () => {
2342 + if (context.signal.aborted) {
2343 + cancelled = true;
2344 + } else {
2345 + context.signal.addEventListener("abort", () => {
2346 + cancelled = true;
2347 + });
2348 + }
2349 + return context.signal;
2350 + }
2351 + });
2352 + };
2353 + const queryFn = context.options.queryFn || (() => Promise.reject(
2354 + new Error(`Missing queryFn: '${context.options.queryHash}'`)
2355 + ));
2356 + const fetchPage = async (data, param, previous) => {
2357 + if (cancelled) {
2358 + return Promise.reject();
2359 + }
2360 + if (param == null && data.pages.length) {
2361 + return Promise.resolve(data);
2362 + }
2363 + const queryFnContext = {
2364 + queryKey: context.queryKey,
2365 + pageParam: param,
2366 + direction: previous ? "backward" : "forward",
2367 + meta: context.options.meta
2368 + };
2369 + addSignalProperty(queryFnContext);
2370 + const page = await queryFn(
2371 + queryFnContext
2372 + );
2373 + const { maxPages } = context.options;
2374 + const addTo = previous ? import_utils.addToStart : import_utils.addToEnd;
2375 + return {
2376 + pages: addTo(data.pages, page, maxPages),
2377 + pageParams: addTo(data.pageParams, param, maxPages)
2378 + };
2379 + };
2380 + let result;
2381 + if (direction && oldPages.length) {
2382 + const previous = direction === "backward";
2383 + const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;
2384 + const oldData = {
2385 + pages: oldPages,
2386 + pageParams: oldPageParams
2387 + };
2388 + const param = pageParamFn(options, oldData);
2389 + result = await fetchPage(oldData, param, previous);
2390 + } else {
2391 + result = await fetchPage(
2392 + empty,
2393 + oldPageParams[0] ?? options.initialPageParam
2394 + );
2395 + const remainingPages = pages ?? oldPages.length;
2396 + for (let i = 1; i < remainingPages; i++) {
2397 + const param = getNextPageParam(options, result);
2398 + result = await fetchPage(result, param);
2399 + }
2400 + }
2401 + return result;
2402 + };
2403 + if (context.options.persister) {
2404 + context.fetchFn = () => {
2405 + return context.options.persister?.(
2406 + fetchFn,
2407 + {
2408 + queryKey: context.queryKey,
2409 + meta: context.options.meta,
2410 + signal: context.signal
2411 + },
2412 + query
2413 + );
2414 + };
2415 + } else {
2416 + context.fetchFn = fetchFn;
2417 + }
2418 + }
2419 + };
2420 +}
2421 +function getNextPageParam(options, { pages, pageParams }) {
2422 + const lastIndex = pages.length - 1;
2423 + return options.getNextPageParam(
2424 + pages[lastIndex],
2425 + pages,
2426 + pageParams[lastIndex],
2427 + pageParams
2428 + );
2429 +}
2430 +function getPreviousPageParam(options, { pages, pageParams }) {
2431 + return options.getPreviousPageParam?.(
2432 + pages[0],
2433 + pages,
2434 + pageParams[0],
2435 + pageParams
2436 + );
2437 +}
2438 +function hasNextPage(options, data) {
2439 + if (!data)
2440 + return false;
2441 + return getNextPageParam(options, data) != null;
2442 +}
2443 +function hasPreviousPage(options, data) {
2444 + if (!data || !options.getPreviousPageParam)
2445 + return false;
2446 + return getPreviousPageParam(options, data) != null;
2447 +}
2448 +// Annotate the CommonJS export names for ESM import in node:
2449 +0 && (0);
2450 +//# sourceMappingURL=infiniteQueryBehavior.cjs.map
2451 +
2452 +/***/ }),
2453 +
2454 +/***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs":
2455 +/*!***********************************************************************************!*\
2456 + !*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs ***!
2457 + \***********************************************************************************/
2458 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2459 +
2460 +"use strict";
2461 +
2462 +var __defProp = Object.defineProperty;
2463 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2464 +var __getOwnPropNames = Object.getOwnPropertyNames;
2465 +var __hasOwnProp = Object.prototype.hasOwnProperty;
2466 +var __export = (target, all) => {
2467 + for (var name in all)
2468 + __defProp(target, name, { get: all[name], enumerable: true });
2469 +};
2470 +var __copyProps = (to, from, except, desc) => {
2471 + if (from && typeof from === "object" || typeof from === "function") {
2472 + for (let key of __getOwnPropNames(from))
2473 + if (!__hasOwnProp.call(to, key) && key !== except)
2474 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
2475 + }
2476 + return to;
2477 +};
2478 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2479 +
2480 +// src/infiniteQueryObserver.ts
2481 +var infiniteQueryObserver_exports = {};
2482 +__export(infiniteQueryObserver_exports, {
2483 + InfiniteQueryObserver: () => InfiniteQueryObserver
2484 +});
2485 +module.exports = __toCommonJS(infiniteQueryObserver_exports);
2486 +var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
2487 +var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs");
2488 +var InfiniteQueryObserver = class extends import_queryObserver.QueryObserver {
2489 + // eslint-disable-next-line @typescript-eslint/no-useless-constructor
2490 + constructor(client, options) {
2491 + super(client, options);
2492 + }
2493 + bindMethods() {
2494 + super.bindMethods();
2495 + this.fetchNextPage = this.fetchNextPage.bind(this);
2496 + this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
2497 + }
2498 + setOptions(options, notifyOptions) {
2499 + super.setOptions(
2500 + {
2501 + ...options,
2502 + behavior: (0, import_infiniteQueryBehavior.infiniteQueryBehavior)()
2503 + },
2504 + notifyOptions
2505 + );
2506 + }
2507 + getOptimisticResult(options) {
2508 + options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)();
2509 + return super.getOptimisticResult(options);
2510 + }
2511 + fetchNextPage(options) {
2512 + return this.fetch({
2513 + ...options,
2514 + meta: {
2515 + fetchMore: { direction: "forward" }
2516 + }
2517 + });
2518 + }
2519 + fetchPreviousPage(options) {
2520 + return this.fetch({
2521 + ...options,
2522 + meta: {
2523 + fetchMore: { direction: "backward" }
2524 + }
2525 + });
2526 + }
2527 + createResult(query, options) {
2528 + const { state } = query;
2529 + const result = super.createResult(query, options);
2530 + const { isFetching, isRefetching } = result;
2531 + const isFetchingNextPage = isFetching && state.fetchMeta?.fetchMore?.direction === "forward";
2532 + const isFetchingPreviousPage = isFetching && state.fetchMeta?.fetchMore?.direction === "backward";
2533 + return {
2534 + ...result,
2535 + fetchNextPage: this.fetchNextPage,
2536 + fetchPreviousPage: this.fetchPreviousPage,
2537 + hasNextPage: (0, import_infiniteQueryBehavior.hasNextPage)(options, state.data),
2538 + hasPreviousPage: (0, import_infiniteQueryBehavior.hasPreviousPage)(options, state.data),
2539 + isFetchingNextPage,
2540 + isFetchingPreviousPage,
2541 + isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage
2542 + };
2543 + }
2544 +};
2545 +// Annotate the CommonJS export names for ESM import in node:
2546 +0 && (0);
2547 +//# sourceMappingURL=infiniteQueryObserver.cjs.map
2548 +
2549 +/***/ }),
2550 +
2551 +/***/ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs":
2552 +/*!**********************************************************************!*\
2553 + !*** ../node_modules/@tanstack/query-core/build/modern/mutation.cjs ***!
2554 + \**********************************************************************/
2555 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2556 +
2557 +"use strict";
2558 +
2559 +var __defProp = Object.defineProperty;
2560 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2561 +var __getOwnPropNames = Object.getOwnPropertyNames;
2562 +var __hasOwnProp = Object.prototype.hasOwnProperty;
2563 +var __export = (target, all) => {
2564 + for (var name in all)
2565 + __defProp(target, name, { get: all[name], enumerable: true });
2566 +};
2567 +var __copyProps = (to, from, except, desc) => {
2568 + if (from && typeof from === "object" || typeof from === "function") {
2569 + for (let key of __getOwnPropNames(from))
2570 + if (!__hasOwnProp.call(to, key) && key !== except)
2571 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
2572 + }
2573 + return to;
2574 +};
2575 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2576 +
2577 +// src/mutation.ts
2578 +var mutation_exports = {};
2579 +__export(mutation_exports, {
2580 + Mutation: () => Mutation,
2581 + getDefaultState: () => getDefaultState
2582 +});
2583 +module.exports = __toCommonJS(mutation_exports);
2584 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
2585 +var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs");
2586 +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
2587 +var Mutation = class extends import_removable.Removable {
2588 + constructor(config) {
2589 + super();
2590 + this.mutationId = config.mutationId;
2591 + this.#defaultOptions = config.defaultOptions;
2592 + this.#mutationCache = config.mutationCache;
2593 + this.#observers = [];
2594 + this.state = config.state || getDefaultState();
2595 + this.setOptions(config.options);
2596 + this.scheduleGc();
2597 + }
2598 + #observers;
2599 + #defaultOptions;
2600 + #mutationCache;
2601 + #retryer;
2602 + setOptions(options) {
2603 + this.options = { ...this.#defaultOptions, ...options };
2604 + this.updateGcTime(this.options.gcTime);
2605 + }
2606 + get meta() {
2607 + return this.options.meta;
2608 + }
2609 + addObserver(observer) {
2610 + if (!this.#observers.includes(observer)) {
2611 + this.#observers.push(observer);
2612 + this.clearGcTimeout();
2613 + this.#mutationCache.notify({
2614 + type: "observerAdded",
2615 + mutation: this,
2616 + observer
2617 + });
2618 + }
2619 + }
2620 + removeObserver(observer) {
2621 + this.#observers = this.#observers.filter((x) => x !== observer);
2622 + this.scheduleGc();
2623 + this.#mutationCache.notify({
2624 + type: "observerRemoved",
2625 + mutation: this,
2626 + observer
2627 + });
2628 + }
2629 + optionalRemove() {
2630 + if (!this.#observers.length) {
2631 + if (this.state.status === "pending") {
2632 + this.scheduleGc();
2633 + } else {
2634 + this.#mutationCache.remove(this);
2635 + }
2636 + }
2637 + }
2638 + continue() {
2639 + return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
2640 + this.execute(this.state.variables);
2641 + }
2642 + async execute(variables) {
2643 + const executeMutation = () => {
2644 + this.#retryer = (0, import_retryer.createRetryer)({
2645 + fn: () => {
2646 + if (!this.options.mutationFn) {
2647 + return Promise.reject(new Error("No mutationFn found"));
2648 + }
2649 + return this.options.mutationFn(variables);
2650 + },
2651 + onFail: (failureCount, error) => {
2652 + this.#dispatch({ type: "failed", failureCount, error });
2653 + },
2654 + onPause: () => {
2655 + this.#dispatch({ type: "pause" });
2656 + },
2657 + onContinue: () => {
2658 + this.#dispatch({ type: "continue" });
2659 + },
2660 + retry: this.options.retry ?? 0,
2661 + retryDelay: this.options.retryDelay,
2662 + networkMode: this.options.networkMode
2663 + });
2664 + return this.#retryer.promise;
2665 + };
2666 + const restored = this.state.status === "pending";
2667 + try {
2668 + if (!restored) {
2669 + this.#dispatch({ type: "pending", variables });
2670 + await this.#mutationCache.config.onMutate?.(
2671 + variables,
2672 + this
2673 + );
2674 + const context = await this.options.onMutate?.(variables);
2675 + if (context !== this.state.context) {
2676 + this.#dispatch({
2677 + type: "pending",
2678 + context,
2679 + variables
2680 + });
2681 + }
2682 + }
2683 + const data = await executeMutation();
2684 + await this.#mutationCache.config.onSuccess?.(
2685 + data,
2686 + variables,
2687 + this.state.context,
2688 + this
2689 + );
2690 + await this.options.onSuccess?.(data, variables, this.state.context);
2691 + await this.#mutationCache.config.onSettled?.(
2692 + data,
2693 + null,
2694 + this.state.variables,
2695 + this.state.context,
2696 + this
2697 + );
2698 + await this.options.onSettled?.(data, null, variables, this.state.context);
2699 + this.#dispatch({ type: "success", data });
2700 + return data;
2701 + } catch (error) {
2702 + try {
2703 + await this.#mutationCache.config.onError?.(
2704 + error,
2705 + variables,
2706 + this.state.context,
2707 + this
2708 + );
2709 + await this.options.onError?.(
2710 + error,
2711 + variables,
2712 + this.state.context
2713 + );
2714 + await this.#mutationCache.config.onSettled?.(
2715 + void 0,
2716 + error,
2717 + this.state.variables,
2718 + this.state.context,
2719 + this
2720 + );
2721 + await this.options.onSettled?.(
2722 + void 0,
2723 + error,
2724 + variables,
2725 + this.state.context
2726 + );
2727 + throw error;
2728 + } finally {
2729 + this.#dispatch({ type: "error", error });
2730 + }
2731 + }
2732 + }
2733 + #dispatch(action) {
2734 + const reducer = (state) => {
2735 + switch (action.type) {
2736 + case "failed":
2737 + return {
2738 + ...state,
2739 + failureCount: action.failureCount,
2740 + failureReason: action.error
2741 + };
2742 + case "pause":
2743 + return {
2744 + ...state,
2745 + isPaused: true
2746 + };
2747 + case "continue":
2748 + return {
2749 + ...state,
2750 + isPaused: false
2751 + };
2752 + case "pending":
2753 + return {
2754 + ...state,
2755 + context: action.context,
2756 + data: void 0,
2757 + failureCount: 0,
2758 + failureReason: null,
2759 + error: null,
2760 + isPaused: !(0, import_retryer.canFetch)(this.options.networkMode),
2761 + status: "pending",
2762 + variables: action.variables,
2763 + submittedAt: Date.now()
2764 + };
2765 + case "success":
2766 + return {
2767 + ...state,
2768 + data: action.data,
2769 + failureCount: 0,
2770 + failureReason: null,
2771 + error: null,
2772 + status: "success",
2773 + isPaused: false
2774 + };
2775 + case "error":
2776 + return {
2777 + ...state,
2778 + data: void 0,
2779 + error: action.error,
2780 + failureCount: state.failureCount + 1,
2781 + failureReason: action.error,
2782 + isPaused: false,
2783 + status: "error"
2784 + };
2785 + }
2786 + };
2787 + this.state = reducer(this.state);
2788 + import_notifyManager.notifyManager.batch(() => {
2789 + this.#observers.forEach((observer) => {
2790 + observer.onMutationUpdate(action);
2791 + });
2792 + this.#mutationCache.notify({
2793 + mutation: this,
2794 + type: "updated",
2795 + action
2796 + });
2797 + });
2798 + }
2799 +};
2800 +function getDefaultState() {
2801 + return {
2802 + context: void 0,
2803 + data: void 0,
2804 + error: null,
2805 + failureCount: 0,
2806 + failureReason: null,
2807 + isPaused: false,
2808 + status: "idle",
2809 + variables: void 0,
2810 + submittedAt: 0
2811 + };
2812 +}
2813 +// Annotate the CommonJS export names for ESM import in node:
2814 +0 && (0);
2815 +//# sourceMappingURL=mutation.cjs.map
2816 +
2817 +/***/ }),
2818 +
2819 +/***/ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs":
2820 +/*!***************************************************************************!*\
2821 + !*** ../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs ***!
2822 + \***************************************************************************/
2823 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2824 +
2825 +"use strict";
2826 +
2827 +var __defProp = Object.defineProperty;
2828 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2829 +var __getOwnPropNames = Object.getOwnPropertyNames;
2830 +var __hasOwnProp = Object.prototype.hasOwnProperty;
2831 +var __export = (target, all) => {
2832 + for (var name in all)
2833 + __defProp(target, name, { get: all[name], enumerable: true });
2834 +};
2835 +var __copyProps = (to, from, except, desc) => {
2836 + if (from && typeof from === "object" || typeof from === "function") {
2837 + for (let key of __getOwnPropNames(from))
2838 + if (!__hasOwnProp.call(to, key) && key !== except)
2839 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
2840 + }
2841 + return to;
2842 +};
2843 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2844 +
2845 +// src/mutationCache.ts
2846 +var mutationCache_exports = {};
2847 +__export(mutationCache_exports, {
2848 + MutationCache: () => MutationCache
2849 +});
2850 +module.exports = __toCommonJS(mutationCache_exports);
2851 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
2852 +var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs");
2853 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
2854 +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
2855 +var MutationCache = class extends import_subscribable.Subscribable {
2856 + constructor(config = {}) {
2857 + super();
2858 + this.config = config;
2859 + this.#mutations = [];
2860 + this.#mutationId = 0;
2861 + }
2862 + #mutations;
2863 + #mutationId;
2864 + #resuming;
2865 + build(client, options, state) {
2866 + const mutation = new import_mutation.Mutation({
2867 + mutationCache: this,
2868 + mutationId: ++this.#mutationId,
2869 + options: client.defaultMutationOptions(options),
2870 + state
2871 + });
2872 + this.add(mutation);
2873 + return mutation;
2874 + }
2875 + add(mutation) {
2876 + this.#mutations.push(mutation);
2877 + this.notify({ type: "added", mutation });
2878 + }
2879 + remove(mutation) {
2880 + this.#mutations = this.#mutations.filter((x) => x !== mutation);
2881 + this.notify({ type: "removed", mutation });
2882 + }
2883 + clear() {
2884 + import_notifyManager.notifyManager.batch(() => {
2885 + this.#mutations.forEach((mutation) => {
2886 + this.remove(mutation);
2887 + });
2888 + });
2889 + }
2890 + getAll() {
2891 + return this.#mutations;
2892 + }
2893 + find(filters) {
2894 + const defaultedFilters = { exact: true, ...filters };
2895 + return this.#mutations.find(
2896 + (mutation) => (0, import_utils.matchMutation)(defaultedFilters, mutation)
2897 + );
2898 + }
2899 + findAll(filters = {}) {
2900 + return this.#mutations.filter(
2901 + (mutation) => (0, import_utils.matchMutation)(filters, mutation)
2902 + );
2903 + }
2904 + notify(event) {
2905 + import_notifyManager.notifyManager.batch(() => {
2906 + this.listeners.forEach((listener) => {
2907 + listener(event);
2908 + });
2909 + });
2910 + }
2911 + resumePausedMutations() {
2912 + this.#resuming = (this.#resuming ?? Promise.resolve()).then(() => {
2913 + const pausedMutations = this.#mutations.filter((x) => x.state.isPaused);
2914 + return import_notifyManager.notifyManager.batch(
2915 + () => pausedMutations.reduce(
2916 + (promise, mutation) => promise.then(() => mutation.continue().catch(import_utils.noop)),
2917 + Promise.resolve()
2918 + )
2919 + );
2920 + }).then(() => {
2921 + this.#resuming = void 0;
2922 + });
2923 + return this.#resuming;
2924 + }
2925 +};
2926 +// Annotate the CommonJS export names for ESM import in node:
2927 +0 && (0);
2928 +//# sourceMappingURL=mutationCache.cjs.map
2929 +
2930 +/***/ }),
2931 +
2932 +/***/ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs":
2933 +/*!******************************************************************************!*\
2934 + !*** ../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs ***!
2935 + \******************************************************************************/
2936 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2937 +
2938 +"use strict";
2939 +
2940 +var __defProp = Object.defineProperty;
2941 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2942 +var __getOwnPropNames = Object.getOwnPropertyNames;
2943 +var __hasOwnProp = Object.prototype.hasOwnProperty;
2944 +var __export = (target, all) => {
2945 + for (var name in all)
2946 + __defProp(target, name, { get: all[name], enumerable: true });
2947 +};
2948 +var __copyProps = (to, from, except, desc) => {
2949 + if (from && typeof from === "object" || typeof from === "function") {
2950 + for (let key of __getOwnPropNames(from))
2951 + if (!__hasOwnProp.call(to, key) && key !== except)
2952 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
2953 + }
2954 + return to;
2955 +};
2956 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2957 +
2958 +// src/mutationObserver.ts
2959 +var mutationObserver_exports = {};
2960 +__export(mutationObserver_exports, {
2961 + MutationObserver: () => MutationObserver
2962 +});
2963 +module.exports = __toCommonJS(mutationObserver_exports);
2964 +var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs");
2965 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
2966 +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
2967 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
2968 +var MutationObserver = class extends import_subscribable.Subscribable {
2969 + constructor(client, options) {
2970 + super();
2971 + this.#currentResult = void 0;
2972 + this.#client = client;
2973 + this.setOptions(options);
2974 + this.bindMethods();
2975 + this.#updateResult();
2976 + }
2977 + #client;
2978 + #currentResult;
2979 + #currentMutation;
2980 + #mutateOptions;
2981 + bindMethods() {
2982 + this.mutate = this.mutate.bind(this);
2983 + this.reset = this.reset.bind(this);
2984 + }
2985 + setOptions(options) {
2986 + const prevOptions = this.options;
2987 + this.options = this.#client.defaultMutationOptions(options);
2988 + if (!(0, import_utils.shallowEqualObjects)(prevOptions, this.options)) {
2989 + this.#client.getMutationCache().notify({
2990 + type: "observerOptionsUpdated",
2991 + mutation: this.#currentMutation,
2992 + observer: this
2993 + });
2994 + }
2995 + this.#currentMutation?.setOptions(this.options);
2996 + }
2997 + onUnsubscribe() {
2998 + if (!this.hasListeners()) {
2999 + this.#currentMutation?.removeObserver(this);
3000 + }
3001 + }
3002 + onMutationUpdate(action) {
3003 + this.#updateResult();
3004 + this.#notify(action);
3005 + }
3006 + getCurrentResult() {
3007 + return this.#currentResult;
3008 + }
3009 + reset() {
3010 + this.#currentMutation = void 0;
3011 + this.#updateResult();
3012 + this.#notify();
3013 + }
3014 + mutate(variables, options) {
3015 + this.#mutateOptions = options;
3016 + this.#currentMutation?.removeObserver(this);
3017 + this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);
3018 + this.#currentMutation.addObserver(this);
3019 + return this.#currentMutation.execute(variables);
3020 + }
3021 + #updateResult() {
3022 + const state = this.#currentMutation?.state ?? (0, import_mutation.getDefaultState)();
3023 + this.#currentResult = {
3024 + ...state,
3025 + isPending: state.status === "pending",
3026 + isSuccess: state.status === "success",
3027 + isError: state.status === "error",
3028 + isIdle: state.status === "idle",
3029 + mutate: this.mutate,
3030 + reset: this.reset
3031 + };
3032 + }
3033 + #notify(action) {
3034 + import_notifyManager.notifyManager.batch(() => {
3035 + if (this.#mutateOptions && this.hasListeners()) {
3036 + if (action?.type === "success") {
3037 + this.#mutateOptions.onSuccess?.(
3038 + action.data,
3039 + this.#currentResult.variables,
3040 + this.#currentResult.context
3041 + );
3042 + this.#mutateOptions.onSettled?.(
3043 + action.data,
3044 + null,
3045 + this.#currentResult.variables,
3046 + this.#currentResult.context
3047 + );
3048 + } else if (action?.type === "error") {
3049 + this.#mutateOptions.onError?.(
3050 + action.error,
3051 + this.#currentResult.variables,
3052 + this.#currentResult.context
3053 + );
3054 + this.#mutateOptions.onSettled?.(
3055 + void 0,
3056 + action.error,
3057 + this.#currentResult.variables,
3058 + this.#currentResult.context
3059 + );
3060 + }
3061 + }
3062 + this.listeners.forEach((listener) => {
3063 + listener(this.#currentResult);
3064 + });
3065 + });
3066 + }
3067 +};
3068 +// Annotate the CommonJS export names for ESM import in node:
3069 +0 && (0);
3070 +//# sourceMappingURL=mutationObserver.cjs.map
3071 +
3072 +/***/ }),
3073 +
3074 +/***/ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs":
3075 +/*!***************************************************************************!*\
3076 + !*** ../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs ***!
3077 + \***************************************************************************/
3078 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3079 +
3080 +"use strict";
3081 +
3082 +var __defProp = Object.defineProperty;
3083 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3084 +var __getOwnPropNames = Object.getOwnPropertyNames;
3085 +var __hasOwnProp = Object.prototype.hasOwnProperty;
3086 +var __export = (target, all) => {
3087 + for (var name in all)
3088 + __defProp(target, name, { get: all[name], enumerable: true });
3089 +};
3090 +var __copyProps = (to, from, except, desc) => {
3091 + if (from && typeof from === "object" || typeof from === "function") {
3092 + for (let key of __getOwnPropNames(from))
3093 + if (!__hasOwnProp.call(to, key) && key !== except)
3094 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3095 + }
3096 + return to;
3097 +};
3098 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3099 +
3100 +// src/notifyManager.ts
3101 +var notifyManager_exports = {};
3102 +__export(notifyManager_exports, {
3103 + createNotifyManager: () => createNotifyManager,
3104 + notifyManager: () => notifyManager
3105 +});
3106 +module.exports = __toCommonJS(notifyManager_exports);
3107 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3108 +function createNotifyManager() {
3109 + let queue = [];
3110 + let transactions = 0;
3111 + let notifyFn = (callback) => {
3112 + callback();
3113 + };
3114 + let batchNotifyFn = (callback) => {
3115 + callback();
3116 + };
3117 + const batch = (callback) => {
3118 + let result;
3119 + transactions++;
3120 + try {
3121 + result = callback();
3122 + } finally {
3123 + transactions--;
3124 + if (!transactions) {
3125 + flush();
3126 + }
3127 + }
3128 + return result;
3129 + };
3130 + const schedule = (callback) => {
3131 + if (transactions) {
3132 + queue.push(callback);
3133 + } else {
3134 + (0, import_utils.scheduleMicrotask)(() => {
3135 + notifyFn(callback);
3136 + });
3137 + }
3138 + };
3139 + const batchCalls = (callback) => {
3140 + return (...args) => {
3141 + schedule(() => {
3142 + callback(...args);
3143 + });
3144 + };
3145 + };
3146 + const flush = () => {
3147 + const originalQueue = queue;
3148 + queue = [];
3149 + if (originalQueue.length) {
3150 + (0, import_utils.scheduleMicrotask)(() => {
3151 + batchNotifyFn(() => {
3152 + originalQueue.forEach((callback) => {
3153 + notifyFn(callback);
3154 + });
3155 + });
3156 + });
3157 + }
3158 + };
3159 + const setNotifyFunction = (fn) => {
3160 + notifyFn = fn;
3161 + };
3162 + const setBatchNotifyFunction = (fn) => {
3163 + batchNotifyFn = fn;
3164 + };
3165 + return {
3166 + batch,
3167 + batchCalls,
3168 + schedule,
3169 + setNotifyFunction,
3170 + setBatchNotifyFunction
3171 + };
3172 +}
3173 +var notifyManager = createNotifyManager();
3174 +// Annotate the CommonJS export names for ESM import in node:
3175 +0 && (0);
3176 +//# sourceMappingURL=notifyManager.cjs.map
3177 +
3178 +/***/ }),
3179 +
3180 +/***/ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs":
3181 +/*!***************************************************************************!*\
3182 + !*** ../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs ***!
3183 + \***************************************************************************/
3184 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3185 +
3186 +"use strict";
3187 +
3188 +var __defProp = Object.defineProperty;
3189 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3190 +var __getOwnPropNames = Object.getOwnPropertyNames;
3191 +var __hasOwnProp = Object.prototype.hasOwnProperty;
3192 +var __export = (target, all) => {
3193 + for (var name in all)
3194 + __defProp(target, name, { get: all[name], enumerable: true });
3195 +};
3196 +var __copyProps = (to, from, except, desc) => {
3197 + if (from && typeof from === "object" || typeof from === "function") {
3198 + for (let key of __getOwnPropNames(from))
3199 + if (!__hasOwnProp.call(to, key) && key !== except)
3200 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3201 + }
3202 + return to;
3203 +};
3204 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3205 +
3206 +// src/onlineManager.ts
3207 +var onlineManager_exports = {};
3208 +__export(onlineManager_exports, {
3209 + OnlineManager: () => OnlineManager,
3210 + onlineManager: () => onlineManager
3211 +});
3212 +module.exports = __toCommonJS(onlineManager_exports);
3213 +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
3214 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3215 +var OnlineManager = class extends import_subscribable.Subscribable {
3216 + #online = true;
3217 + #cleanup;
3218 + #setup;
3219 + constructor() {
3220 + super();
3221 + this.#setup = (onOnline) => {
3222 + if (!import_utils.isServer && window.addEventListener) {
3223 + const onlineListener = () => onOnline(true);
3224 + const offlineListener = () => onOnline(false);
3225 + window.addEventListener("online", onlineListener, false);
3226 + window.addEventListener("offline", offlineListener, false);
3227 + return () => {
3228 + window.removeEventListener("online", onlineListener);
3229 + window.removeEventListener("offline", offlineListener);
3230 + };
3231 + }
3232 + return;
3233 + };
3234 + }
3235 + onSubscribe() {
3236 + if (!this.#cleanup) {
3237 + this.setEventListener(this.#setup);
3238 + }
3239 + }
3240 + onUnsubscribe() {
3241 + if (!this.hasListeners()) {
3242 + this.#cleanup?.();
3243 + this.#cleanup = void 0;
3244 + }
3245 + }
3246 + setEventListener(setup) {
3247 + this.#setup = setup;
3248 + this.#cleanup?.();
3249 + this.#cleanup = setup(this.setOnline.bind(this));
3250 + }
3251 + setOnline(online) {
3252 + const changed = this.#online !== online;
3253 + if (changed) {
3254 + this.#online = online;
3255 + this.listeners.forEach((listener) => {
3256 + listener(online);
3257 + });
3258 + }
3259 + }
3260 + isOnline() {
3261 + return this.#online;
3262 + }
3263 +};
3264 +var onlineManager = new OnlineManager();
3265 +// Annotate the CommonJS export names for ESM import in node:
3266 +0 && (0);
3267 +//# sourceMappingURL=onlineManager.cjs.map
3268 +
3269 +/***/ }),
3270 +
3271 +/***/ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs":
3272 +/*!*****************************************************************************!*\
3273 + !*** ../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs ***!
3274 + \*****************************************************************************/
3275 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3276 +
3277 +"use strict";
3278 +
3279 +var __defProp = Object.defineProperty;
3280 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3281 +var __getOwnPropNames = Object.getOwnPropertyNames;
3282 +var __hasOwnProp = Object.prototype.hasOwnProperty;
3283 +var __export = (target, all) => {
3284 + for (var name in all)
3285 + __defProp(target, name, { get: all[name], enumerable: true });
3286 +};
3287 +var __copyProps = (to, from, except, desc) => {
3288 + if (from && typeof from === "object" || typeof from === "function") {
3289 + for (let key of __getOwnPropNames(from))
3290 + if (!__hasOwnProp.call(to, key) && key !== except)
3291 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3292 + }
3293 + return to;
3294 +};
3295 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3296 +
3297 +// src/queriesObserver.ts
3298 +var queriesObserver_exports = {};
3299 +__export(queriesObserver_exports, {
3300 + QueriesObserver: () => QueriesObserver
3301 +});
3302 +module.exports = __toCommonJS(queriesObserver_exports);
3303 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
3304 +var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
3305 +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
3306 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3307 +function difference(array1, array2) {
3308 + return array1.filter((x) => !array2.includes(x));
3309 +}
3310 +function replaceAt(array, index, value) {
3311 + const copy = array.slice(0);
3312 + copy[index] = value;
3313 + return copy;
3314 +}
3315 +var QueriesObserver = class extends import_subscribable.Subscribable {
3316 + #client;
3317 + #result;
3318 + #queries;
3319 + #observers;
3320 + #options;
3321 + #combinedResult;
3322 + constructor(client, queries, options) {
3323 + super();
3324 + this.#client = client;
3325 + this.#queries = [];
3326 + this.#observers = [];
3327 + this.#setResult([]);
3328 + this.setQueries(queries, options);
3329 + }
3330 + #setResult(value) {
3331 + this.#result = value;
3332 + this.#combinedResult = this.#combineResult(value);
3333 + }
3334 + onSubscribe() {
3335 + if (this.listeners.size === 1) {
3336 + this.#observers.forEach((observer) => {
3337 + observer.subscribe((result) => {
3338 + this.#onUpdate(observer, result);
3339 + });
3340 + });
3341 + }
3342 + }
3343 + onUnsubscribe() {
3344 + if (!this.listeners.size) {
3345 + this.destroy();
3346 + }
3347 + }
3348 + destroy() {
3349 + this.listeners = /* @__PURE__ */ new Set();
3350 + this.#observers.forEach((observer) => {
3351 + observer.destroy();
3352 + });
3353 + }
3354 + setQueries(queries, options, notifyOptions) {
3355 + this.#queries = queries;
3356 + this.#options = options;
3357 + import_notifyManager.notifyManager.batch(() => {
3358 + const prevObservers = this.#observers;
3359 + const newObserverMatches = this.#findMatchingObservers(this.#queries);
3360 + newObserverMatches.forEach(
3361 + (match) => match.observer.setOptions(match.defaultedQueryOptions, notifyOptions)
3362 + );
3363 + const newObservers = newObserverMatches.map((match) => match.observer);
3364 + const newResult = newObservers.map(
3365 + (observer) => observer.getCurrentResult()
3366 + );
3367 + const hasIndexChange = newObservers.some(
3368 + (observer, index) => observer !== prevObservers[index]
3369 + );
3370 + if (prevObservers.length === newObservers.length && !hasIndexChange) {
3371 + return;
3372 + }
3373 + this.#observers = newObservers;
3374 + this.#setResult(newResult);
3375 + if (!this.hasListeners()) {
3376 + return;
3377 + }
3378 + difference(prevObservers, newObservers).forEach((observer) => {
3379 + observer.destroy();
3380 + });
3381 + difference(newObservers, prevObservers).forEach((observer) => {
3382 + observer.subscribe((result) => {
3383 + this.#onUpdate(observer, result);
3384 + });
3385 + });
3386 + this.#notify();
3387 + });
3388 + }
3389 + getCurrentResult() {
3390 + return this.#combinedResult;
3391 + }
3392 + getQueries() {
3393 + return this.#observers.map((observer) => observer.getCurrentQuery());
3394 + }
3395 + getObservers() {
3396 + return this.#observers;
3397 + }
3398 + getOptimisticResult(queries) {
3399 + const matches = this.#findMatchingObservers(queries);
3400 + const result = matches.map(
3401 + (match) => match.observer.getOptimisticResult(match.defaultedQueryOptions)
3402 + );
3403 + return [
3404 + result,
3405 + (r) => {
3406 + return this.#combineResult(r ?? result);
3407 + },
3408 + () => {
3409 + return matches.map((match, index) => {
3410 + const observerResult = result[index];
3411 + return !match.defaultedQueryOptions.notifyOnChangeProps ? match.observer.trackResult(observerResult) : observerResult;
3412 + });
3413 + }
3414 + ];
3415 + }
3416 + #combineResult(input) {
3417 + const combine = this.#options?.combine;
3418 + if (combine) {
3419 + return (0, import_utils.replaceEqualDeep)(this.#combinedResult, combine(input));
3420 + }
3421 + return input;
3422 + }
3423 + #findMatchingObservers(queries) {
3424 + const prevObservers = this.#observers;
3425 + const prevObserversMap = new Map(
3426 + prevObservers.map((observer) => [observer.options.queryHash, observer])
3427 + );
3428 + const defaultedQueryOptions = queries.map(
3429 + (options) => this.#client.defaultQueryOptions(options)
3430 + );
3431 + const matchingObservers = defaultedQueryOptions.flatMap((defaultedOptions) => {
3432 + const match = prevObserversMap.get(defaultedOptions.queryHash);
3433 + if (match != null) {
3434 + return [{ defaultedQueryOptions: defaultedOptions, observer: match }];
3435 + }
3436 + return [];
3437 + });
3438 + const matchedQueryHashes = new Set(
3439 + matchingObservers.map((match) => match.defaultedQueryOptions.queryHash)
3440 + );
3441 + const unmatchedQueries = defaultedQueryOptions.filter(
3442 + (defaultedOptions) => !matchedQueryHashes.has(defaultedOptions.queryHash)
3443 + );
3444 + const getObserver = (options) => {
3445 + const defaultedOptions = this.#client.defaultQueryOptions(options);
3446 + const currentObserver = this.#observers.find(
3447 + (o) => o.options.queryHash === defaultedOptions.queryHash
3448 + );
3449 + return currentObserver ?? new import_queryObserver.QueryObserver(this.#client, defaultedOptions);
3450 + };
3451 + const newOrReusedObservers = unmatchedQueries.map((options) => {
3452 + return {
3453 + defaultedQueryOptions: options,
3454 + observer: getObserver(options)
3455 + };
3456 + });
3457 + const sortMatchesByOrderOfQueries = (a, b) => defaultedQueryOptions.indexOf(a.defaultedQueryOptions) - defaultedQueryOptions.indexOf(b.defaultedQueryOptions);
3458 + return matchingObservers.concat(newOrReusedObservers).sort(sortMatchesByOrderOfQueries);
3459 + }
3460 + #onUpdate(observer, result) {
3461 + const index = this.#observers.indexOf(observer);
3462 + if (index !== -1) {
3463 + this.#setResult(replaceAt(this.#result, index, result));
3464 + this.#notify();
3465 + }
3466 + }
3467 + #notify() {
3468 + import_notifyManager.notifyManager.batch(() => {
3469 + this.listeners.forEach((listener) => {
3470 + listener(this.#result);
3471 + });
3472 + });
3473 + }
3474 +};
3475 +// Annotate the CommonJS export names for ESM import in node:
3476 +0 && (0);
3477 +//# sourceMappingURL=queriesObserver.cjs.map
3478 +
3479 +/***/ }),
3480 +
3481 +/***/ "../node_modules/@tanstack/query-core/build/modern/query.cjs":
3482 +/*!*******************************************************************!*\
3483 + !*** ../node_modules/@tanstack/query-core/build/modern/query.cjs ***!
3484 + \*******************************************************************/
3485 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3486 +
3487 +"use strict";
3488 +
3489 +var __defProp = Object.defineProperty;
3490 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3491 +var __getOwnPropNames = Object.getOwnPropertyNames;
3492 +var __hasOwnProp = Object.prototype.hasOwnProperty;
3493 +var __export = (target, all) => {
3494 + for (var name in all)
3495 + __defProp(target, name, { get: all[name], enumerable: true });
3496 +};
3497 +var __copyProps = (to, from, except, desc) => {
3498 + if (from && typeof from === "object" || typeof from === "function") {
3499 + for (let key of __getOwnPropNames(from))
3500 + if (!__hasOwnProp.call(to, key) && key !== except)
3501 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3502 + }
3503 + return to;
3504 +};
3505 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3506 +
3507 +// src/query.ts
3508 +var query_exports = {};
3509 +__export(query_exports, {
3510 + Query: () => Query
3511 +});
3512 +module.exports = __toCommonJS(query_exports);
3513 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3514 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
3515 +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
3516 +var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs");
3517 +var Query = class extends import_removable.Removable {
3518 + constructor(config) {
3519 + super();
3520 + this.#abortSignalConsumed = false;
3521 + this.#defaultOptions = config.defaultOptions;
3522 + this.#setOptions(config.options);
3523 + this.#observers = [];
3524 + this.#cache = config.cache;
3525 + this.queryKey = config.queryKey;
3526 + this.queryHash = config.queryHash;
3527 + this.#initialState = config.state || getDefaultState(this.options);
3528 + this.state = this.#initialState;
3529 + this.scheduleGc();
3530 + }
3531 + #initialState;
3532 + #revertState;
3533 + #cache;
3534 + #promise;
3535 + #retryer;
3536 + #observers;
3537 + #defaultOptions;
3538 + #abortSignalConsumed;
3539 + get meta() {
3540 + return this.options.meta;
3541 + }
3542 + #setOptions(options) {
3543 + this.options = { ...this.#defaultOptions, ...options };
3544 + this.updateGcTime(this.options.gcTime);
3545 + }
3546 + optionalRemove() {
3547 + if (!this.#observers.length && this.state.fetchStatus === "idle") {
3548 + this.#cache.remove(this);
3549 + }
3550 + }
3551 + setData(newData, options) {
3552 + const data = (0, import_utils.replaceData)(this.state.data, newData, this.options);
3553 + this.#dispatch({
3554 + data,
3555 + type: "success",
3556 + dataUpdatedAt: options?.updatedAt,
3557 + manual: options?.manual
3558 + });
3559 + return data;
3560 + }
3561 + setState(state, setStateOptions) {
3562 + this.#dispatch({ type: "setState", state, setStateOptions });
3563 + }
3564 + cancel(options) {
3565 + const promise = this.#promise;
3566 + this.#retryer?.cancel(options);
3567 + return promise ? promise.then(import_utils.noop).catch(import_utils.noop) : Promise.resolve();
3568 + }
3569 + destroy() {
3570 + super.destroy();
3571 + this.cancel({ silent: true });
3572 + }
3573 + reset() {
3574 + this.destroy();
3575 + this.setState(this.#initialState);
3576 + }
3577 + isActive() {
3578 + return this.#observers.some(
3579 + (observer) => observer.options.enabled !== false
3580 + );
3581 + }
3582 + isDisabled() {
3583 + return this.getObserversCount() > 0 && !this.isActive();
3584 + }
3585 + isStale() {
3586 + return this.state.isInvalidated || !this.state.dataUpdatedAt || this.#observers.some((observer) => observer.getCurrentResult().isStale);
3587 + }
3588 + isStaleByTime(staleTime = 0) {
3589 + return this.state.isInvalidated || !this.state.dataUpdatedAt || !(0, import_utils.timeUntilStale)(this.state.dataUpdatedAt, staleTime);
3590 + }
3591 + onFocus() {
3592 + const observer = this.#observers.find((x) => x.shouldFetchOnWindowFocus());
3593 + observer?.refetch({ cancelRefetch: false });
3594 + this.#retryer?.continue();
3595 + }
3596 + onOnline() {
3597 + const observer = this.#observers.find((x) => x.shouldFetchOnReconnect());
3598 + observer?.refetch({ cancelRefetch: false });
3599 + this.#retryer?.continue();
3600 + }
3601 + addObserver(observer) {
3602 + if (!this.#observers.includes(observer)) {
3603 + this.#observers.push(observer);
3604 + this.clearGcTimeout();
3605 + this.#cache.notify({ type: "observerAdded", query: this, observer });
3606 + }
3607 + }
3608 + removeObserver(observer) {
3609 + if (this.#observers.includes(observer)) {
3610 + this.#observers = this.#observers.filter((x) => x !== observer);
3611 + if (!this.#observers.length) {
3612 + if (this.#retryer) {
3613 + if (this.#abortSignalConsumed) {
3614 + this.#retryer.cancel({ revert: true });
3615 + } else {
3616 + this.#retryer.cancelRetry();
3617 + }
3618 + }
3619 + this.scheduleGc();
3620 + }
3621 + this.#cache.notify({ type: "observerRemoved", query: this, observer });
3622 + }
3623 + }
3624 + getObserversCount() {
3625 + return this.#observers.length;
3626 + }
3627 + invalidate() {
3628 + if (!this.state.isInvalidated) {
3629 + this.#dispatch({ type: "invalidate" });
3630 + }
3631 + }
3632 + fetch(options, fetchOptions) {
3633 + if (this.state.fetchStatus !== "idle") {
3634 + if (this.state.dataUpdatedAt && fetchOptions?.cancelRefetch) {
3635 + this.cancel({ silent: true });
3636 + } else if (this.#promise) {
3637 + this.#retryer?.continueRetry();
3638 + return this.#promise;
3639 + }
3640 + }
3641 + if (options) {
3642 + this.#setOptions(options);
3643 + }
3644 + if (!this.options.queryFn) {
3645 + const observer = this.#observers.find((x) => x.options.queryFn);
3646 + if (observer) {
3647 + this.#setOptions(observer.options);
3648 + }
3649 + }
3650 + if (true) {
3651 + if (!Array.isArray(this.options.queryKey)) {
3652 + console.error(
3653 + `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']`
3654 + );
3655 + }
3656 + }
3657 + const abortController = new AbortController();
3658 + const queryFnContext = {
3659 + queryKey: this.queryKey,
3660 + meta: this.meta
3661 + };
3662 + const addSignalProperty = (object) => {
3663 + Object.defineProperty(object, "signal", {
3664 + enumerable: true,
3665 + get: () => {
3666 + this.#abortSignalConsumed = true;
3667 + return abortController.signal;
3668 + }
3669 + });
3670 + };
3671 + addSignalProperty(queryFnContext);
3672 + const fetchFn = () => {
3673 + if (!this.options.queryFn) {
3674 + return Promise.reject(
3675 + new Error(`Missing queryFn: '${this.options.queryHash}'`)
3676 + );
3677 + }
3678 + this.#abortSignalConsumed = false;
3679 + if (this.options.persister) {
3680 + return this.options.persister(
3681 + this.options.queryFn,
3682 + queryFnContext,
3683 + this
3684 + );
3685 + }
3686 + return this.options.queryFn(
3687 + queryFnContext
3688 + );
3689 + };
3690 + const context = {
3691 + fetchOptions,
3692 + options: this.options,
3693 + queryKey: this.queryKey,
3694 + state: this.state,
3695 + fetchFn
3696 + };
3697 + addSignalProperty(context);
3698 + this.options.behavior?.onFetch(
3699 + context,
3700 + this
3701 + );
3702 + this.#revertState = this.state;
3703 + if (this.state.fetchStatus === "idle" || this.state.fetchMeta !== context.fetchOptions?.meta) {
3704 + this.#dispatch({ type: "fetch", meta: context.fetchOptions?.meta });
3705 + }
3706 + const onError = (error) => {
3707 + if (!((0, import_retryer.isCancelledError)(error) && error.silent)) {
3708 + this.#dispatch({
3709 + type: "error",
3710 + error
3711 + });
3712 + }
3713 + if (!(0, import_retryer.isCancelledError)(error)) {
3714 + this.#cache.config.onError?.(
3715 + error,
3716 + this
3717 + );
3718 + this.#cache.config.onSettled?.(
3719 + this.state.data,
3720 + error,
3721 + this
3722 + );
3723 + }
3724 + if (!this.isFetchingOptimistic) {
3725 + this.scheduleGc();
3726 + }
3727 + this.isFetchingOptimistic = false;
3728 + };
3729 + this.#retryer = (0, import_retryer.createRetryer)({
3730 + fn: context.fetchFn,
3731 + abort: abortController.abort.bind(abortController),
3732 + onSuccess: (data) => {
3733 + if (typeof data === "undefined") {
3734 + if (true) {
3735 + console.error(
3736 + `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
3737 + );
3738 + }
3739 + onError(new Error(`${this.queryHash} data is undefined`));
3740 + return;
3741 + }
3742 + this.setData(data);
3743 + this.#cache.config.onSuccess?.(data, this);
3744 + this.#cache.config.onSettled?.(
3745 + data,
3746 + this.state.error,
3747 + this
3748 + );
3749 + if (!this.isFetchingOptimistic) {
3750 + this.scheduleGc();
3751 + }
3752 + this.isFetchingOptimistic = false;
3753 + },
3754 + onError,
3755 + onFail: (failureCount, error) => {
3756 + this.#dispatch({ type: "failed", failureCount, error });
3757 + },
3758 + onPause: () => {
3759 + this.#dispatch({ type: "pause" });
3760 + },
3761 + onContinue: () => {
3762 + this.#dispatch({ type: "continue" });
3763 + },
3764 + retry: context.options.retry,
3765 + retryDelay: context.options.retryDelay,
3766 + networkMode: context.options.networkMode
3767 + });
3768 + this.#promise = this.#retryer.promise;
3769 + return this.#promise;
3770 + }
3771 + #dispatch(action) {
3772 + const reducer = (state) => {
3773 + switch (action.type) {
3774 + case "failed":
3775 + return {
3776 + ...state,
3777 + fetchFailureCount: action.failureCount,
3778 + fetchFailureReason: action.error
3779 + };
3780 + case "pause":
3781 + return {
3782 + ...state,
3783 + fetchStatus: "paused"
3784 + };
3785 + case "continue":
3786 + return {
3787 + ...state,
3788 + fetchStatus: "fetching"
3789 + };
3790 + case "fetch":
3791 + return {
3792 + ...state,
3793 + fetchFailureCount: 0,
3794 + fetchFailureReason: null,
3795 + fetchMeta: action.meta ?? null,
3796 + fetchStatus: (0, import_retryer.canFetch)(this.options.networkMode) ? "fetching" : "paused",
3797 + ...!state.dataUpdatedAt && {
3798 + error: null,
3799 + status: "pending"
3800 + }
3801 + };
3802 + case "success":
3803 + return {
3804 + ...state,
3805 + data: action.data,
3806 + dataUpdateCount: state.dataUpdateCount + 1,
3807 + dataUpdatedAt: action.dataUpdatedAt ?? Date.now(),
3808 + error: null,
3809 + isInvalidated: false,
3810 + status: "success",
3811 + ...!action.manual && {
3812 + fetchStatus: "idle",
3813 + fetchFailureCount: 0,
3814 + fetchFailureReason: null
3815 + }
3816 + };
3817 + case "error":
3818 + const error = action.error;
3819 + if ((0, import_retryer.isCancelledError)(error) && error.revert && this.#revertState) {
3820 + return { ...this.#revertState, fetchStatus: "idle" };
3821 + }
3822 + return {
3823 + ...state,
3824 + error,
3825 + errorUpdateCount: state.errorUpdateCount + 1,
3826 + errorUpdatedAt: Date.now(),
3827 + fetchFailureCount: state.fetchFailureCount + 1,
3828 + fetchFailureReason: error,
3829 + fetchStatus: "idle",
3830 + status: "error"
3831 + };
3832 + case "invalidate":
3833 + return {
3834 + ...state,
3835 + isInvalidated: true
3836 + };
3837 + case "setState":
3838 + return {
3839 + ...state,
3840 + ...action.state
3841 + };
3842 + }
3843 + };
3844 + this.state = reducer(this.state);
3845 + import_notifyManager.notifyManager.batch(() => {
3846 + this.#observers.forEach((observer) => {
3847 + observer.onQueryUpdate();
3848 + });
3849 + this.#cache.notify({ query: this, type: "updated", action });
3850 + });
3851 + }
3852 +};
3853 +function getDefaultState(options) {
3854 + const data = typeof options.initialData === "function" ? options.initialData() : options.initialData;
3855 + const hasData = typeof data !== "undefined";
3856 + const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;
3857 + return {
3858 + data,
3859 + dataUpdateCount: 0,
3860 + dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0,
3861 + error: null,
3862 + errorUpdateCount: 0,
3863 + errorUpdatedAt: 0,
3864 + fetchFailureCount: 0,
3865 + fetchFailureReason: null,
3866 + fetchMeta: null,
3867 + isInvalidated: false,
3868 + status: hasData ? "success" : "pending",
3869 + fetchStatus: "idle"
3870 + };
3871 +}
3872 +// Annotate the CommonJS export names for ESM import in node:
3873 +0 && (0);
3874 +//# sourceMappingURL=query.cjs.map
3875 +
3876 +/***/ }),
3877 +
3878 +/***/ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs":
3879 +/*!************************************************************************!*\
3880 + !*** ../node_modules/@tanstack/query-core/build/modern/queryCache.cjs ***!
3881 + \************************************************************************/
3882 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3883 +
3884 +"use strict";
3885 +
3886 +var __defProp = Object.defineProperty;
3887 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3888 +var __getOwnPropNames = Object.getOwnPropertyNames;
3889 +var __hasOwnProp = Object.prototype.hasOwnProperty;
3890 +var __export = (target, all) => {
3891 + for (var name in all)
3892 + __defProp(target, name, { get: all[name], enumerable: true });
3893 +};
3894 +var __copyProps = (to, from, except, desc) => {
3895 + if (from && typeof from === "object" || typeof from === "function") {
3896 + for (let key of __getOwnPropNames(from))
3897 + if (!__hasOwnProp.call(to, key) && key !== except)
3898 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3899 + }
3900 + return to;
3901 +};
3902 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3903 +
3904 +// src/queryCache.ts
3905 +var queryCache_exports = {};
3906 +__export(queryCache_exports, {
3907 + QueryCache: () => QueryCache
3908 +});
3909 +module.exports = __toCommonJS(queryCache_exports);
3910 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3911 +var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs");
3912 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
3913 +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
3914 +var QueryCache = class extends import_subscribable.Subscribable {
3915 + constructor(config = {}) {
3916 + super();
3917 + this.config = config;
3918 + this.#queries = /* @__PURE__ */ new Map();
3919 + }
3920 + #queries;
3921 + build(client, options, state) {
3922 + const queryKey = options.queryKey;
3923 + const queryHash = options.queryHash ?? (0, import_utils.hashQueryKeyByOptions)(queryKey, options);
3924 + let query = this.get(queryHash);
3925 + if (!query) {
3926 + query = new import_query.Query({
3927 + cache: this,
3928 + queryKey,
3929 + queryHash,
3930 + options: client.defaultQueryOptions(options),
3931 + state,
3932 + defaultOptions: client.getQueryDefaults(queryKey)
3933 + });
3934 + this.add(query);
3935 + }
3936 + return query;
3937 + }
3938 + add(query) {
3939 + if (!this.#queries.has(query.queryHash)) {
3940 + this.#queries.set(query.queryHash, query);
3941 + this.notify({
3942 + type: "added",
3943 + query
3944 + });
3945 + }
3946 + }
3947 + remove(query) {
3948 + const queryInMap = this.#queries.get(query.queryHash);
3949 + if (queryInMap) {
3950 + query.destroy();
3951 + if (queryInMap === query) {
3952 + this.#queries.delete(query.queryHash);
3953 + }
3954 + this.notify({ type: "removed", query });
3955 + }
3956 + }
3957 + clear() {
3958 + import_notifyManager.notifyManager.batch(() => {
3959 + this.getAll().forEach((query) => {
3960 + this.remove(query);
3961 + });
3962 + });
3963 + }
3964 + get(queryHash) {
3965 + return this.#queries.get(queryHash);
3966 + }
3967 + getAll() {
3968 + return [...this.#queries.values()];
3969 + }
3970 + find(filters) {
3971 + const defaultedFilters = { exact: true, ...filters };
3972 + return this.getAll().find(
3973 + (query) => (0, import_utils.matchQuery)(defaultedFilters, query)
3974 + );
3975 + }
3976 + findAll(filters = {}) {
3977 + const queries = this.getAll();
3978 + return Object.keys(filters).length > 0 ? queries.filter((query) => (0, import_utils.matchQuery)(filters, query)) : queries;
3979 + }
3980 + notify(event) {
3981 + import_notifyManager.notifyManager.batch(() => {
3982 + this.listeners.forEach((listener) => {
3983 + listener(event);
3984 + });
3985 + });
3986 + }
3987 + onFocus() {
3988 + import_notifyManager.notifyManager.batch(() => {
3989 + this.getAll().forEach((query) => {
3990 + query.onFocus();
3991 + });
3992 + });
3993 + }
3994 + onOnline() {
3995 + import_notifyManager.notifyManager.batch(() => {
3996 + this.getAll().forEach((query) => {
3997 + query.onOnline();
3998 + });
3999 + });
4000 + }
4001 +};
4002 +// Annotate the CommonJS export names for ESM import in node:
4003 +0 && (0);
4004 +//# sourceMappingURL=queryCache.cjs.map
4005 +
4006 +/***/ }),
4007 +
4008 +/***/ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs":
4009 +/*!*************************************************************************!*\
4010 + !*** ../node_modules/@tanstack/query-core/build/modern/queryClient.cjs ***!
4011 + \*************************************************************************/
4012 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4013 +
4014 +"use strict";
4015 +
4016 +var __defProp = Object.defineProperty;
4017 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4018 +var __getOwnPropNames = Object.getOwnPropertyNames;
4019 +var __hasOwnProp = Object.prototype.hasOwnProperty;
4020 +var __export = (target, all) => {
4021 + for (var name in all)
4022 + __defProp(target, name, { get: all[name], enumerable: true });
4023 +};
4024 +var __copyProps = (to, from, except, desc) => {
4025 + if (from && typeof from === "object" || typeof from === "function") {
4026 + for (let key of __getOwnPropNames(from))
4027 + if (!__hasOwnProp.call(to, key) && key !== except)
4028 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4029 + }
4030 + return to;
4031 +};
4032 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4033 +
4034 +// src/queryClient.ts
4035 +var queryClient_exports = {};
4036 +__export(queryClient_exports, {
4037 + QueryClient: () => QueryClient
4038 +});
4039 +module.exports = __toCommonJS(queryClient_exports);
4040 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4041 +var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs");
4042 +var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs");
4043 +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
4044 +var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
4045 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4046 +var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs");
4047 +var QueryClient = class {
4048 + #queryCache;
4049 + #mutationCache;
4050 + #defaultOptions;
4051 + #queryDefaults;
4052 + #mutationDefaults;
4053 + #mountCount;
4054 + #unsubscribeFocus;
4055 + #unsubscribeOnline;
4056 + constructor(config = {}) {
4057 + this.#queryCache = config.queryCache || new import_queryCache.QueryCache();
4058 + this.#mutationCache = config.mutationCache || new import_mutationCache.MutationCache();
4059 + this.#defaultOptions = config.defaultOptions || {};
4060 + this.#queryDefaults = /* @__PURE__ */ new Map();
4061 + this.#mutationDefaults = /* @__PURE__ */ new Map();
4062 + this.#mountCount = 0;
4063 + }
4064 + mount() {
4065 + this.#mountCount++;
4066 + if (this.#mountCount !== 1)
4067 + return;
4068 + this.#unsubscribeFocus = import_focusManager.focusManager.subscribe(() => {
4069 + if (import_focusManager.focusManager.isFocused()) {
4070 + this.resumePausedMutations();
4071 + this.#queryCache.onFocus();
4072 + }
4073 + });
4074 + this.#unsubscribeOnline = import_onlineManager.onlineManager.subscribe(() => {
4075 + if (import_onlineManager.onlineManager.isOnline()) {
4076 + this.resumePausedMutations();
4077 + this.#queryCache.onOnline();
4078 + }
4079 + });
4080 + }
4081 + unmount() {
4082 + this.#mountCount--;
4083 + if (this.#mountCount !== 0)
4084 + return;
4085 + this.#unsubscribeFocus?.();
4086 + this.#unsubscribeFocus = void 0;
4087 + this.#unsubscribeOnline?.();
4088 + this.#unsubscribeOnline = void 0;
4089 + }
4090 + isFetching(filters) {
4091 + return this.#queryCache.findAll({ ...filters, fetchStatus: "fetching" }).length;
4092 + }
4093 + isMutating(filters) {
4094 + return this.#mutationCache.findAll({ ...filters, status: "pending" }).length;
4095 + }
4096 + getQueryData(queryKey) {
4097 + return this.#queryCache.find({ queryKey })?.state.data;
4098 + }
4099 + ensureQueryData(options) {
4100 + const cachedData = this.getQueryData(options.queryKey);
4101 + return cachedData !== void 0 ? Promise.resolve(cachedData) : this.fetchQuery(options);
4102 + }
4103 + getQueriesData(filters) {
4104 + return this.getQueryCache().findAll(filters).map(({ queryKey, state }) => {
4105 + const data = state.data;
4106 + return [queryKey, data];
4107 + });
4108 + }
4109 + setQueryData(queryKey, updater, options) {
4110 + const query = this.#queryCache.find({ queryKey });
4111 + const prevData = query?.state.data;
4112 + const data = (0, import_utils.functionalUpdate)(updater, prevData);
4113 + if (typeof data === "undefined") {
4114 + return void 0;
4115 + }
4116 + const defaultedOptions = this.defaultQueryOptions({ queryKey });
4117 + return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true });
4118 + }
4119 + setQueriesData(filters, updater, options) {
4120 + return import_notifyManager.notifyManager.batch(
4121 + () => this.getQueryCache().findAll(filters).map(({ queryKey }) => [
4122 + queryKey,
4123 + this.setQueryData(queryKey, updater, options)
4124 + ])
4125 + );
4126 + }
4127 + getQueryState(queryKey) {
4128 + return this.#queryCache.find({ queryKey })?.state;
4129 + }
4130 + removeQueries(filters) {
4131 + const queryCache = this.#queryCache;
4132 + import_notifyManager.notifyManager.batch(() => {
4133 + queryCache.findAll(filters).forEach((query) => {
4134 + queryCache.remove(query);
4135 + });
4136 + });
4137 + }
4138 + resetQueries(filters, options) {
4139 + const queryCache = this.#queryCache;
4140 + const refetchFilters = {
4141 + type: "active",
4142 + ...filters
4143 + };
4144 + return import_notifyManager.notifyManager.batch(() => {
4145 + queryCache.findAll(filters).forEach((query) => {
4146 + query.reset();
4147 + });
4148 + return this.refetchQueries(refetchFilters, options);
4149 + });
4150 + }
4151 + cancelQueries(filters = {}, cancelOptions = {}) {
4152 + const defaultedCancelOptions = { revert: true, ...cancelOptions };
4153 + const promises = import_notifyManager.notifyManager.batch(
4154 + () => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions))
4155 + );
4156 + return Promise.all(promises).then(import_utils.noop).catch(import_utils.noop);
4157 + }
4158 + invalidateQueries(filters = {}, options = {}) {
4159 + return import_notifyManager.notifyManager.batch(() => {
4160 + this.#queryCache.findAll(filters).forEach((query) => {
4161 + query.invalidate();
4162 + });
4163 + if (filters.refetchType === "none") {
4164 + return Promise.resolve();
4165 + }
4166 + const refetchFilters = {
4167 + ...filters,
4168 + type: filters.refetchType ?? filters.type ?? "active"
4169 + };
4170 + return this.refetchQueries(refetchFilters, options);
4171 + });
4172 + }
4173 + refetchQueries(filters = {}, options) {
4174 + const fetchOptions = {
4175 + ...options,
4176 + cancelRefetch: options?.cancelRefetch ?? true
4177 + };
4178 + const promises = import_notifyManager.notifyManager.batch(
4179 + () => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled()).map((query) => {
4180 + let promise = query.fetch(void 0, fetchOptions);
4181 + if (!fetchOptions.throwOnError) {
4182 + promise = promise.catch(import_utils.noop);
4183 + }
4184 + return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
4185 + })
4186 + );
4187 + return Promise.all(promises).then(import_utils.noop);
4188 + }
4189 + fetchQuery(options) {
4190 + const defaultedOptions = this.defaultQueryOptions(options);
4191 + if (typeof defaultedOptions.retry === "undefined") {
4192 + defaultedOptions.retry = false;
4193 + }
4194 + const query = this.#queryCache.build(this, defaultedOptions);
4195 + return query.isStaleByTime(defaultedOptions.staleTime) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);
4196 + }
4197 + prefetchQuery(options) {
4198 + return this.fetchQuery(options).then(import_utils.noop).catch(import_utils.noop);
4199 + }
4200 + fetchInfiniteQuery(options) {
4201 + options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(options.pages);
4202 + return this.fetchQuery(options);
4203 + }
4204 + prefetchInfiniteQuery(options) {
4205 + return this.fetchInfiniteQuery(options).then(import_utils.noop).catch(import_utils.noop);
4206 + }
4207 + resumePausedMutations() {
4208 + return this.#mutationCache.resumePausedMutations();
4209 + }
4210 + getQueryCache() {
4211 + return this.#queryCache;
4212 + }
4213 + getMutationCache() {
4214 + return this.#mutationCache;
4215 + }
4216 + getDefaultOptions() {
4217 + return this.#defaultOptions;
4218 + }
4219 + setDefaultOptions(options) {
4220 + this.#defaultOptions = options;
4221 + }
4222 + setQueryDefaults(queryKey, options) {
4223 + this.#queryDefaults.set((0, import_utils.hashKey)(queryKey), {
4224 + queryKey,
4225 + defaultOptions: options
4226 + });
4227 + }
4228 + getQueryDefaults(queryKey) {
4229 + const defaults = [...this.#queryDefaults.values()];
4230 + let result = {};
4231 + defaults.forEach((queryDefault) => {
4232 + if ((0, import_utils.partialMatchKey)(queryKey, queryDefault.queryKey)) {
4233 + result = { ...result, ...queryDefault.defaultOptions };
4234 + }
4235 + });
4236 + return result;
4237 + }
4238 + setMutationDefaults(mutationKey, options) {
4239 + this.#mutationDefaults.set((0, import_utils.hashKey)(mutationKey), {
4240 + mutationKey,
4241 + defaultOptions: options
4242 + });
4243 + }
4244 + getMutationDefaults(mutationKey) {
4245 + const defaults = [...this.#mutationDefaults.values()];
4246 + let result = {};
4247 + defaults.forEach((queryDefault) => {
4248 + if ((0, import_utils.partialMatchKey)(mutationKey, queryDefault.mutationKey)) {
4249 + result = { ...result, ...queryDefault.defaultOptions };
4250 + }
4251 + });
4252 + return result;
4253 + }
4254 + defaultQueryOptions(options) {
4255 + if (options?._defaulted) {
4256 + return options;
4257 + }
4258 + const defaultedOptions = {
4259 + ...this.#defaultOptions.queries,
4260 + ...options?.queryKey && this.getQueryDefaults(options.queryKey),
4261 + ...options,
4262 + _defaulted: true
4263 + };
4264 + if (!defaultedOptions.queryHash) {
4265 + defaultedOptions.queryHash = (0, import_utils.hashQueryKeyByOptions)(
4266 + defaultedOptions.queryKey,
4267 + defaultedOptions
4268 + );
4269 + }
4270 + if (typeof defaultedOptions.refetchOnReconnect === "undefined") {
4271 + defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always";
4272 + }
4273 + if (typeof defaultedOptions.throwOnError === "undefined") {
4274 + defaultedOptions.throwOnError = !!defaultedOptions.suspense;
4275 + }
4276 + if (typeof defaultedOptions.networkMode === "undefined" && defaultedOptions.persister) {
4277 + defaultedOptions.networkMode = "offlineFirst";
4278 + }
4279 + return defaultedOptions;
4280 + }
4281 + defaultMutationOptions(options) {
4282 + if (options?._defaulted) {
4283 + return options;
4284 + }
4285 + return {
4286 + ...this.#defaultOptions.mutations,
4287 + ...options?.mutationKey && this.getMutationDefaults(options.mutationKey),
4288 + ...options,
4289 + _defaulted: true
4290 + };
4291 + }
4292 + clear() {
4293 + this.#queryCache.clear();
4294 + this.#mutationCache.clear();
4295 + }
4296 +};
4297 +// Annotate the CommonJS export names for ESM import in node:
4298 +0 && (0);
4299 +//# sourceMappingURL=queryClient.cjs.map
4300 +
4301 +/***/ }),
4302 +
4303 +/***/ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs":
4304 +/*!***************************************************************************!*\
4305 + !*** ../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs ***!
4306 + \***************************************************************************/
4307 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4308 +
4309 +"use strict";
4310 +
4311 +var __defProp = Object.defineProperty;
4312 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4313 +var __getOwnPropNames = Object.getOwnPropertyNames;
4314 +var __hasOwnProp = Object.prototype.hasOwnProperty;
4315 +var __export = (target, all) => {
4316 + for (var name in all)
4317 + __defProp(target, name, { get: all[name], enumerable: true });
4318 +};
4319 +var __copyProps = (to, from, except, desc) => {
4320 + if (from && typeof from === "object" || typeof from === "function") {
4321 + for (let key of __getOwnPropNames(from))
4322 + if (!__hasOwnProp.call(to, key) && key !== except)
4323 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4324 + }
4325 + return to;
4326 +};
4327 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4328 +
4329 +// src/queryObserver.ts
4330 +var queryObserver_exports = {};
4331 +__export(queryObserver_exports, {
4332 + QueryObserver: () => QueryObserver
4333 +});
4334 +module.exports = __toCommonJS(queryObserver_exports);
4335 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4336 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4337 +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
4338 +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
4339 +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
4340 +var QueryObserver = class extends import_subscribable.Subscribable {
4341 + constructor(client, options) {
4342 + super();
4343 + this.#currentQuery = void 0;
4344 + this.#currentQueryInitialState = void 0;
4345 + this.#currentResult = void 0;
4346 + this.#trackedProps = /* @__PURE__ */ new Set();
4347 + this.#client = client;
4348 + this.options = options;
4349 + this.#selectError = null;
4350 + this.bindMethods();
4351 + this.setOptions(options);
4352 + }
4353 + #client;
4354 + #currentQuery;
4355 + #currentQueryInitialState;
4356 + #currentResult;
4357 + #currentResultState;
4358 + #currentResultOptions;
4359 + #selectError;
4360 + #selectFn;
4361 + #selectResult;
4362 + // This property keeps track of the last query with defined data.
4363 + // It will be used to pass the previous data and query to the placeholder function between renders.
4364 + #lastQueryWithDefinedData;
4365 + #staleTimeoutId;
4366 + #refetchIntervalId;
4367 + #currentRefetchInterval;
4368 + #trackedProps;
4369 + bindMethods() {
4370 + this.refetch = this.refetch.bind(this);
4371 + }
4372 + onSubscribe() {
4373 + if (this.listeners.size === 1) {
4374 + this.#currentQuery.addObserver(this);
4375 + if (shouldFetchOnMount(this.#currentQuery, this.options)) {
4376 + this.#executeFetch();
4377 + }
4378 + this.#updateTimers();
4379 + }
4380 + }
4381 + onUnsubscribe() {
4382 + if (!this.hasListeners()) {
4383 + this.destroy();
4384 + }
4385 + }
4386 + shouldFetchOnReconnect() {
4387 + return shouldFetchOn(
4388 + this.#currentQuery,
4389 + this.options,
4390 + this.options.refetchOnReconnect
4391 + );
4392 + }
4393 + shouldFetchOnWindowFocus() {
4394 + return shouldFetchOn(
4395 + this.#currentQuery,
4396 + this.options,
4397 + this.options.refetchOnWindowFocus
4398 + );
4399 + }
4400 + destroy() {
4401 + this.listeners = /* @__PURE__ */ new Set();
4402 + this.#clearStaleTimeout();
4403 + this.#clearRefetchInterval();
4404 + this.#currentQuery.removeObserver(this);
4405 + }
4406 + setOptions(options, notifyOptions) {
4407 + const prevOptions = this.options;
4408 + const prevQuery = this.#currentQuery;
4409 + this.options = this.#client.defaultQueryOptions(options);
4410 + if (!(0, import_utils.shallowEqualObjects)(prevOptions, this.options)) {
4411 + this.#client.getQueryCache().notify({
4412 + type: "observerOptionsUpdated",
4413 + query: this.#currentQuery,
4414 + observer: this
4415 + });
4416 + }
4417 + if (typeof this.options.enabled !== "undefined" && typeof this.options.enabled !== "boolean") {
4418 + throw new Error("Expected enabled to be a boolean");
4419 + }
4420 + if (!this.options.queryKey) {
4421 + this.options.queryKey = prevOptions.queryKey;
4422 + }
4423 + this.#updateQuery();
4424 + const mounted = this.hasListeners();
4425 + if (mounted && shouldFetchOptionally(
4426 + this.#currentQuery,
4427 + prevQuery,
4428 + this.options,
4429 + prevOptions
4430 + )) {
4431 + this.#executeFetch();
4432 + }
4433 + this.updateResult(notifyOptions);
4434 + if (mounted && (this.#currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || this.options.staleTime !== prevOptions.staleTime)) {
4435 + this.#updateStaleTimeout();
4436 + }
4437 + const nextRefetchInterval = this.#computeRefetchInterval();
4438 + if (mounted && (this.#currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || nextRefetchInterval !== this.#currentRefetchInterval)) {
4439 + this.#updateRefetchInterval(nextRefetchInterval);
4440 + }
4441 + }
4442 + getOptimisticResult(options) {
4443 + const query = this.#client.getQueryCache().build(this.#client, options);
4444 + const result = this.createResult(query, options);
4445 + if (shouldAssignObserverCurrentProperties(this, result)) {
4446 + this.#currentResult = result;
4447 + this.#currentResultOptions = this.options;
4448 + this.#currentResultState = this.#currentQuery.state;
4449 + }
4450 + return result;
4451 + }
4452 + getCurrentResult() {
4453 + return this.#currentResult;
4454 + }
4455 + trackResult(result) {
4456 + const trackedResult = {};
4457 + Object.keys(result).forEach((key) => {
4458 + Object.defineProperty(trackedResult, key, {
4459 + configurable: false,
4460 + enumerable: true,
4461 + get: () => {
4462 + this.#trackedProps.add(key);
4463 + return result[key];
4464 + }
4465 + });
4466 + });
4467 + return trackedResult;
4468 + }
4469 + getCurrentQuery() {
4470 + return this.#currentQuery;
4471 + }
4472 + refetch({ ...options } = {}) {
4473 + return this.fetch({
4474 + ...options
4475 + });
4476 + }
4477 + fetchOptimistic(options) {
4478 + const defaultedOptions = this.#client.defaultQueryOptions(options);
4479 + const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);
4480 + query.isFetchingOptimistic = true;
4481 + return query.fetch().then(() => this.createResult(query, defaultedOptions));
4482 + }
4483 + fetch(fetchOptions) {
4484 + return this.#executeFetch({
4485 + ...fetchOptions,
4486 + cancelRefetch: fetchOptions.cancelRefetch ?? true
4487 + }).then(() => {
4488 + this.updateResult();
4489 + return this.#currentResult;
4490 + });
4491 + }
4492 + #executeFetch(fetchOptions) {
4493 + this.#updateQuery();
4494 + let promise = this.#currentQuery.fetch(
4495 + this.options,
4496 + fetchOptions
4497 + );
4498 + if (!fetchOptions?.throwOnError) {
4499 + promise = promise.catch(import_utils.noop);
4500 + }
4501 + return promise;
4502 + }
4503 + #updateStaleTimeout() {
4504 + this.#clearStaleTimeout();
4505 + if (import_utils.isServer || this.#currentResult.isStale || !(0, import_utils.isValidTimeout)(this.options.staleTime)) {
4506 + return;
4507 + }
4508 + const time = (0, import_utils.timeUntilStale)(
4509 + this.#currentResult.dataUpdatedAt,
4510 + this.options.staleTime
4511 + );
4512 + const timeout = time + 1;
4513 + this.#staleTimeoutId = setTimeout(() => {
4514 + if (!this.#currentResult.isStale) {
4515 + this.updateResult();
4516 + }
4517 + }, timeout);
4518 + }
4519 + #computeRefetchInterval() {
4520 + return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;
4521 + }
4522 + #updateRefetchInterval(nextInterval) {
4523 + this.#clearRefetchInterval();
4524 + this.#currentRefetchInterval = nextInterval;
4525 + if (import_utils.isServer || this.options.enabled === false || !(0, import_utils.isValidTimeout)(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {
4526 + return;
4527 + }
4528 + this.#refetchIntervalId = setInterval(() => {
4529 + if (this.options.refetchIntervalInBackground || import_focusManager.focusManager.isFocused()) {
4530 + this.#executeFetch();
4531 + }
4532 + }, this.#currentRefetchInterval);
4533 + }
4534 + #updateTimers() {
4535 + this.#updateStaleTimeout();
4536 + this.#updateRefetchInterval(this.#computeRefetchInterval());
4537 + }
4538 + #clearStaleTimeout() {
4539 + if (this.#staleTimeoutId) {
4540 + clearTimeout(this.#staleTimeoutId);
4541 + this.#staleTimeoutId = void 0;
4542 + }
4543 + }
4544 + #clearRefetchInterval() {
4545 + if (this.#refetchIntervalId) {
4546 + clearInterval(this.#refetchIntervalId);
4547 + this.#refetchIntervalId = void 0;
4548 + }
4549 + }
4550 + createResult(query, options) {
4551 + const prevQuery = this.#currentQuery;
4552 + const prevOptions = this.options;
4553 + const prevResult = this.#currentResult;
4554 + const prevResultState = this.#currentResultState;
4555 + const prevResultOptions = this.#currentResultOptions;
4556 + const queryChange = query !== prevQuery;
4557 + const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState;
4558 + const { state } = query;
4559 + let { error, errorUpdatedAt, fetchStatus, status } = state;
4560 + let isPlaceholderData = false;
4561 + let data;
4562 + if (options._optimisticResults) {
4563 + const mounted = this.hasListeners();
4564 + const fetchOnMount = !mounted && shouldFetchOnMount(query, options);
4565 + const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);
4566 + if (fetchOnMount || fetchOptionally) {
4567 + fetchStatus = (0, import_retryer.canFetch)(query.options.networkMode) ? "fetching" : "paused";
4568 + if (!state.dataUpdatedAt) {
4569 + status = "pending";
4570 + }
4571 + }
4572 + if (options._optimisticResults === "isRestoring") {
4573 + fetchStatus = "idle";
4574 + }
4575 + }
4576 + if (options.select && typeof state.data !== "undefined") {
4577 + if (prevResult && state.data === prevResultState?.data && options.select === this.#selectFn) {
4578 + data = this.#selectResult;
4579 + } else {
4580 + try {
4581 + this.#selectFn = options.select;
4582 + data = options.select(state.data);
4583 + data = (0, import_utils.replaceData)(prevResult?.data, data, options);
4584 + this.#selectResult = data;
4585 + this.#selectError = null;
4586 + } catch (selectError) {
4587 + this.#selectError = selectError;
4588 + }
4589 + }
4590 + } else {
4591 + data = state.data;
4592 + }
4593 + if (typeof options.placeholderData !== "undefined" && typeof data === "undefined" && status === "pending") {
4594 + let placeholderData;
4595 + if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {
4596 + placeholderData = prevResult.data;
4597 + } else {
4598 + placeholderData = typeof options.placeholderData === "function" ? options.placeholderData(
4599 + this.#lastQueryWithDefinedData?.state.data,
4600 + this.#lastQueryWithDefinedData
4601 + ) : options.placeholderData;
4602 + if (options.select && typeof placeholderData !== "undefined") {
4603 + try {
4604 + placeholderData = options.select(placeholderData);
4605 + this.#selectError = null;
4606 + } catch (selectError) {
4607 + this.#selectError = selectError;
4608 + }
4609 + }
4610 + }
4611 + if (typeof placeholderData !== "undefined") {
4612 + status = "success";
4613 + data = (0, import_utils.replaceData)(
4614 + prevResult?.data,
4615 + placeholderData,
4616 + options
4617 + );
4618 + isPlaceholderData = true;
4619 + }
4620 + }
4621 + if (this.#selectError) {
4622 + error = this.#selectError;
4623 + data = this.#selectResult;
4624 + errorUpdatedAt = Date.now();
4625 + status = "error";
4626 + }
4627 + const isFetching = fetchStatus === "fetching";
4628 + const isPending = status === "pending";
4629 + const isError = status === "error";
4630 + const isLoading = isPending && isFetching;
4631 + const result = {
4632 + status,
4633 + fetchStatus,
4634 + isPending,
4635 + isSuccess: status === "success",
4636 + isError,
4637 + isInitialLoading: isLoading,
4638 + isLoading,
4639 + data,
4640 + dataUpdatedAt: state.dataUpdatedAt,
4641 + error,
4642 + errorUpdatedAt,
4643 + failureCount: state.fetchFailureCount,
4644 + failureReason: state.fetchFailureReason,
4645 + errorUpdateCount: state.errorUpdateCount,
4646 + isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,
4647 + isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount,
4648 + isFetching,
4649 + isRefetching: isFetching && !isPending,
4650 + isLoadingError: isError && state.dataUpdatedAt === 0,
4651 + isPaused: fetchStatus === "paused",
4652 + isPlaceholderData,
4653 + isRefetchError: isError && state.dataUpdatedAt !== 0,
4654 + isStale: isStale(query, options),
4655 + refetch: this.refetch
4656 + };
4657 + return result;
4658 + }
4659 + updateResult(notifyOptions) {
4660 + const prevResult = this.#currentResult;
4661 + const nextResult = this.createResult(this.#currentQuery, this.options);
4662 + this.#currentResultState = this.#currentQuery.state;
4663 + this.#currentResultOptions = this.options;
4664 + if ((0, import_utils.shallowEqualObjects)(nextResult, prevResult)) {
4665 + return;
4666 + }
4667 + if (this.#currentResultState.data !== void 0) {
4668 + this.#lastQueryWithDefinedData = this.#currentQuery;
4669 + }
4670 + this.#currentResult = nextResult;
4671 + const defaultNotifyOptions = {};
4672 + const shouldNotifyListeners = () => {
4673 + if (!prevResult) {
4674 + return true;
4675 + }
4676 + const { notifyOnChangeProps } = this.options;
4677 + const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps;
4678 + if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !this.#trackedProps.size) {
4679 + return true;
4680 + }
4681 + const includedProps = new Set(
4682 + notifyOnChangePropsValue ?? this.#trackedProps
4683 + );
4684 + if (this.options.throwOnError) {
4685 + includedProps.add("error");
4686 + }
4687 + return Object.keys(this.#currentResult).some((key) => {
4688 + const typedKey = key;
4689 + const changed = this.#currentResult[typedKey] !== prevResult[typedKey];
4690 + return changed && includedProps.has(typedKey);
4691 + });
4692 + };
4693 + if (notifyOptions?.listeners !== false && shouldNotifyListeners()) {
4694 + defaultNotifyOptions.listeners = true;
4695 + }
4696 + this.#notify({ ...defaultNotifyOptions, ...notifyOptions });
4697 + }
4698 + #updateQuery() {
4699 + const query = this.#client.getQueryCache().build(this.#client, this.options);
4700 + if (query === this.#currentQuery) {
4701 + return;
4702 + }
4703 + const prevQuery = this.#currentQuery;
4704 + this.#currentQuery = query;
4705 + this.#currentQueryInitialState = query.state;
4706 + if (this.hasListeners()) {
4707 + prevQuery?.removeObserver(this);
4708 + query.addObserver(this);
4709 + }
4710 + }
4711 + onQueryUpdate() {
4712 + this.updateResult();
4713 + if (this.hasListeners()) {
4714 + this.#updateTimers();
4715 + }
4716 + }
4717 + #notify(notifyOptions) {
4718 + import_notifyManager.notifyManager.batch(() => {
4719 + if (notifyOptions.listeners) {
4720 + this.listeners.forEach((listener) => {
4721 + listener(this.#currentResult);
4722 + });
4723 + }
4724 + this.#client.getQueryCache().notify({
4725 + query: this.#currentQuery,
4726 + type: "observerResultsUpdated"
4727 + });
4728 + });
4729 + }
4730 +};
4731 +function shouldLoadOnMount(query, options) {
4732 + return options.enabled !== false && !query.state.dataUpdatedAt && !(query.state.status === "error" && options.retryOnMount === false);
4733 +}
4734 +function shouldFetchOnMount(query, options) {
4735 + return shouldLoadOnMount(query, options) || query.state.dataUpdatedAt > 0 && shouldFetchOn(query, options, options.refetchOnMount);
4736 +}
4737 +function shouldFetchOn(query, options, field) {
4738 + if (options.enabled !== false) {
4739 + const value = typeof field === "function" ? field(query) : field;
4740 + return value === "always" || value !== false && isStale(query, options);
4741 + }
4742 + return false;
4743 +}
4744 +function shouldFetchOptionally(query, prevQuery, options, prevOptions) {
4745 + return options.enabled !== false && (query !== prevQuery || prevOptions.enabled === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
4746 +}
4747 +function isStale(query, options) {
4748 + return query.isStaleByTime(options.staleTime);
4749 +}
4750 +function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
4751 + if (!(0, import_utils.shallowEqualObjects)(observer.getCurrentResult(), optimisticResult)) {
4752 + return true;
4753 + }
4754 + return false;
4755 +}
4756 +// Annotate the CommonJS export names for ESM import in node:
4757 +0 && (0);
4758 +//# sourceMappingURL=queryObserver.cjs.map
4759 +
4760 +/***/ }),
4761 +
4762 +/***/ "../node_modules/@tanstack/query-core/build/modern/removable.cjs":
4763 +/*!***********************************************************************!*\
4764 + !*** ../node_modules/@tanstack/query-core/build/modern/removable.cjs ***!
4765 + \***********************************************************************/
4766 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4767 +
4768 +"use strict";
4769 +
4770 +var __defProp = Object.defineProperty;
4771 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4772 +var __getOwnPropNames = Object.getOwnPropertyNames;
4773 +var __hasOwnProp = Object.prototype.hasOwnProperty;
4774 +var __export = (target, all) => {
4775 + for (var name in all)
4776 + __defProp(target, name, { get: all[name], enumerable: true });
4777 +};
4778 +var __copyProps = (to, from, except, desc) => {
4779 + if (from && typeof from === "object" || typeof from === "function") {
4780 + for (let key of __getOwnPropNames(from))
4781 + if (!__hasOwnProp.call(to, key) && key !== except)
4782 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4783 + }
4784 + return to;
4785 +};
4786 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4787 +
4788 +// src/removable.ts
4789 +var removable_exports = {};
4790 +__export(removable_exports, {
4791 + Removable: () => Removable
4792 +});
4793 +module.exports = __toCommonJS(removable_exports);
4794 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4795 +var Removable = class {
4796 + #gcTimeout;
4797 + destroy() {
4798 + this.clearGcTimeout();
4799 + }
4800 + scheduleGc() {
4801 + this.clearGcTimeout();
4802 + if ((0, import_utils.isValidTimeout)(this.gcTime)) {
4803 + this.#gcTimeout = setTimeout(() => {
4804 + this.optionalRemove();
4805 + }, this.gcTime);
4806 + }
4807 + }
4808 + updateGcTime(newGcTime) {
4809 + this.gcTime = Math.max(
4810 + this.gcTime || 0,
4811 + newGcTime ?? (import_utils.isServer ? Infinity : 5 * 60 * 1e3)
4812 + );
4813 + }
4814 + clearGcTimeout() {
4815 + if (this.#gcTimeout) {
4816 + clearTimeout(this.#gcTimeout);
4817 + this.#gcTimeout = void 0;
4818 + }
4819 + }
4820 +};
4821 +// Annotate the CommonJS export names for ESM import in node:
4822 +0 && (0);
4823 +//# sourceMappingURL=removable.cjs.map
4824 +
4825 +/***/ }),
4826 +
4827 +/***/ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs":
4828 +/*!*********************************************************************!*\
4829 + !*** ../node_modules/@tanstack/query-core/build/modern/retryer.cjs ***!
4830 + \*********************************************************************/
4831 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4832 +
4833 +"use strict";
4834 +
4835 +var __defProp = Object.defineProperty;
4836 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4837 +var __getOwnPropNames = Object.getOwnPropertyNames;
4838 +var __hasOwnProp = Object.prototype.hasOwnProperty;
4839 +var __export = (target, all) => {
4840 + for (var name in all)
4841 + __defProp(target, name, { get: all[name], enumerable: true });
4842 +};
4843 +var __copyProps = (to, from, except, desc) => {
4844 + if (from && typeof from === "object" || typeof from === "function") {
4845 + for (let key of __getOwnPropNames(from))
4846 + if (!__hasOwnProp.call(to, key) && key !== except)
4847 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4848 + }
4849 + return to;
4850 +};
4851 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4852 +
4853 +// src/retryer.ts
4854 +var retryer_exports = {};
4855 +__export(retryer_exports, {
4856 + CancelledError: () => CancelledError,
4857 + canFetch: () => canFetch,
4858 + createRetryer: () => createRetryer,
4859 + isCancelledError: () => isCancelledError
4860 +});
4861 +module.exports = __toCommonJS(retryer_exports);
4862 +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
4863 +var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
4864 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4865 +function defaultRetryDelay(failureCount) {
4866 + return Math.min(1e3 * 2 ** failureCount, 3e4);
4867 +}
4868 +function canFetch(networkMode) {
4869 + return (networkMode ?? "online") === "online" ? import_onlineManager.onlineManager.isOnline() : true;
4870 +}
4871 +var CancelledError = class {
4872 + constructor(options) {
4873 + this.revert = options?.revert;
4874 + this.silent = options?.silent;
4875 + }
4876 +};
4877 +function isCancelledError(value) {
4878 + return value instanceof CancelledError;
4879 +}
4880 +function createRetryer(config) {
4881 + let isRetryCancelled = false;
4882 + let failureCount = 0;
4883 + let isResolved = false;
4884 + let continueFn;
4885 + let promiseResolve;
4886 + let promiseReject;
4887 + const promise = new Promise((outerResolve, outerReject) => {
4888 + promiseResolve = outerResolve;
4889 + promiseReject = outerReject;
4890 + });
4891 + const cancel = (cancelOptions) => {
4892 + if (!isResolved) {
4893 + reject(new CancelledError(cancelOptions));
4894 + config.abort?.();
4895 + }
4896 + };
4897 + const cancelRetry = () => {
4898 + isRetryCancelled = true;
4899 + };
4900 + const continueRetry = () => {
4901 + isRetryCancelled = false;
4902 + };
4903 + const shouldPause = () => !import_focusManager.focusManager.isFocused() || config.networkMode !== "always" && !import_onlineManager.onlineManager.isOnline();
4904 + const resolve = (value) => {
4905 + if (!isResolved) {
4906 + isResolved = true;
4907 + config.onSuccess?.(value);
4908 + continueFn?.();
4909 + promiseResolve(value);
4910 + }
4911 + };
4912 + const reject = (value) => {
4913 + if (!isResolved) {
4914 + isResolved = true;
4915 + config.onError?.(value);
4916 + continueFn?.();
4917 + promiseReject(value);
4918 + }
4919 + };
4920 + const pause = () => {
4921 + return new Promise((continueResolve) => {
4922 + continueFn = (value) => {
4923 + const canContinue = isResolved || !shouldPause();
4924 + if (canContinue) {
4925 + continueResolve(value);
4926 + }
4927 + return canContinue;
4928 + };
4929 + config.onPause?.();
4930 + }).then(() => {
4931 + continueFn = void 0;
4932 + if (!isResolved) {
4933 + config.onContinue?.();
4934 + }
4935 + });
4936 + };
4937 + const run = () => {
4938 + if (isResolved) {
4939 + return;
4940 + }
4941 + let promiseOrValue;
4942 + try {
4943 + promiseOrValue = config.fn();
4944 + } catch (error) {
4945 + promiseOrValue = Promise.reject(error);
4946 + }
4947 + Promise.resolve(promiseOrValue).then(resolve).catch((error) => {
4948 + if (isResolved) {
4949 + return;
4950 + }
4951 + const retry = config.retry ?? (import_utils.isServer ? 0 : 3);
4952 + const retryDelay = config.retryDelay ?? defaultRetryDelay;
4953 + const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay;
4954 + const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error);
4955 + if (isRetryCancelled || !shouldRetry) {
4956 + reject(error);
4957 + return;
4958 + }
4959 + failureCount++;
4960 + config.onFail?.(failureCount, error);
4961 + (0, import_utils.sleep)(delay).then(() => {
4962 + if (shouldPause()) {
4963 + return pause();
4964 + }
4965 + return;
4966 + }).then(() => {
4967 + if (isRetryCancelled) {
4968 + reject(error);
4969 + } else {
4970 + run();
4971 + }
4972 + });
4973 + });
4974 + };
4975 + if (canFetch(config.networkMode)) {
4976 + run();
4977 + } else {
4978 + pause().then(run);
4979 + }
4980 + return {
4981 + promise,
4982 + cancel,
4983 + continue: () => {
4984 + const didContinue = continueFn?.();
4985 + return didContinue ? promise : Promise.resolve();
4986 + },
4987 + cancelRetry,
4988 + continueRetry
4989 + };
4990 +}
4991 +// Annotate the CommonJS export names for ESM import in node:
4992 +0 && (0);
4993 +//# sourceMappingURL=retryer.cjs.map
4994 +
4995 +/***/ }),
4996 +
4997 +/***/ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs":
4998 +/*!**************************************************************************!*\
4999 + !*** ../node_modules/@tanstack/query-core/build/modern/subscribable.cjs ***!
5000 + \**************************************************************************/
5001 +/***/ ((module) => {
5002 +
5003 +"use strict";
5004 +
5005 +var __defProp = Object.defineProperty;
5006 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5007 +var __getOwnPropNames = Object.getOwnPropertyNames;
5008 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5009 +var __export = (target, all) => {
5010 + for (var name in all)
5011 + __defProp(target, name, { get: all[name], enumerable: true });
5012 +};
5013 +var __copyProps = (to, from, except, desc) => {
5014 + if (from && typeof from === "object" || typeof from === "function") {
5015 + for (let key of __getOwnPropNames(from))
5016 + if (!__hasOwnProp.call(to, key) && key !== except)
5017 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5018 + }
5019 + return to;
5020 +};
5021 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5022 +
5023 +// src/subscribable.ts
5024 +var subscribable_exports = {};
5025 +__export(subscribable_exports, {
5026 + Subscribable: () => Subscribable
5027 +});
5028 +module.exports = __toCommonJS(subscribable_exports);
5029 +var Subscribable = class {
5030 + constructor() {
5031 + this.listeners = /* @__PURE__ */ new Set();
5032 + this.subscribe = this.subscribe.bind(this);
5033 + }
5034 + subscribe(listener) {
5035 + this.listeners.add(listener);
5036 + this.onSubscribe();
5037 + return () => {
5038 + this.listeners.delete(listener);
5039 + this.onUnsubscribe();
5040 + };
5041 + }
5042 + hasListeners() {
5043 + return this.listeners.size > 0;
5044 + }
5045 + onSubscribe() {
5046 + }
5047 + onUnsubscribe() {
5048 + }
5049 +};
5050 +// Annotate the CommonJS export names for ESM import in node:
5051 +0 && (0);
5052 +//# sourceMappingURL=subscribable.cjs.map
5053 +
5054 +/***/ }),
5055 +
5056 +/***/ "../node_modules/@tanstack/query-core/build/modern/types.cjs":
5057 +/*!*******************************************************************!*\
5058 + !*** ../node_modules/@tanstack/query-core/build/modern/types.cjs ***!
5059 + \*******************************************************************/
5060 +/***/ ((module) => {
5061 +
5062 +"use strict";
5063 +
5064 +var __defProp = Object.defineProperty;
5065 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5066 +var __getOwnPropNames = Object.getOwnPropertyNames;
5067 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5068 +var __copyProps = (to, from, except, desc) => {
5069 + if (from && typeof from === "object" || typeof from === "function") {
5070 + for (let key of __getOwnPropNames(from))
5071 + if (!__hasOwnProp.call(to, key) && key !== except)
5072 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5073 + }
5074 + return to;
5075 +};
5076 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5077 +
5078 +// src/types.ts
5079 +var types_exports = {};
5080 +module.exports = __toCommonJS(types_exports);
5081 +//# sourceMappingURL=types.cjs.map
5082 +
5083 +/***/ }),
5084 +
5085 +/***/ "../node_modules/@tanstack/query-core/build/modern/utils.cjs":
5086 +/*!*******************************************************************!*\
5087 + !*** ../node_modules/@tanstack/query-core/build/modern/utils.cjs ***!
5088 + \*******************************************************************/
5089 +/***/ ((module) => {
5090 +
5091 +"use strict";
5092 +
5093 +var __defProp = Object.defineProperty;
5094 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5095 +var __getOwnPropNames = Object.getOwnPropertyNames;
5096 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5097 +var __export = (target, all) => {
5098 + for (var name in all)
5099 + __defProp(target, name, { get: all[name], enumerable: true });
5100 +};
5101 +var __copyProps = (to, from, except, desc) => {
5102 + if (from && typeof from === "object" || typeof from === "function") {
5103 + for (let key of __getOwnPropNames(from))
5104 + if (!__hasOwnProp.call(to, key) && key !== except)
5105 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5106 + }
5107 + return to;
5108 +};
5109 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5110 +
5111 +// src/utils.ts
5112 +var utils_exports = {};
5113 +__export(utils_exports, {
5114 + addToEnd: () => addToEnd,
5115 + addToStart: () => addToStart,
5116 + functionalUpdate: () => functionalUpdate,
5117 + hashKey: () => hashKey,
5118 + hashQueryKeyByOptions: () => hashQueryKeyByOptions,
5119 + isPlainArray: () => isPlainArray,
5120 + isPlainObject: () => isPlainObject,
5121 + isServer: () => isServer,
5122 + isValidTimeout: () => isValidTimeout,
5123 + keepPreviousData: () => keepPreviousData,
5124 + matchMutation: () => matchMutation,
5125 + matchQuery: () => matchQuery,
5126 + noop: () => noop,
5127 + partialMatchKey: () => partialMatchKey,
5128 + replaceData: () => replaceData,
5129 + replaceEqualDeep: () => replaceEqualDeep,
5130 + scheduleMicrotask: () => scheduleMicrotask,
5131 + shallowEqualObjects: () => shallowEqualObjects,
5132 + sleep: () => sleep,
5133 + timeUntilStale: () => timeUntilStale
5134 +});
5135 +module.exports = __toCommonJS(utils_exports);
5136 +var isServer = typeof window === "undefined" || "Deno" in window;
5137 +function noop() {
5138 + return void 0;
5139 +}
5140 +function functionalUpdate(updater, input) {
5141 + return typeof updater === "function" ? updater(input) : updater;
5142 +}
5143 +function isValidTimeout(value) {
5144 + return typeof value === "number" && value >= 0 && value !== Infinity;
5145 +}
5146 +function timeUntilStale(updatedAt, staleTime) {
5147 + return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);
5148 +}
5149 +function matchQuery(filters, query) {
5150 + const {
5151 + type = "all",
5152 + exact,
5153 + fetchStatus,
5154 + predicate,
5155 + queryKey,
5156 + stale
5157 + } = filters;
5158 + if (queryKey) {
5159 + if (exact) {
5160 + if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {
5161 + return false;
5162 + }
5163 + } else if (!partialMatchKey(query.queryKey, queryKey)) {
5164 + return false;
5165 + }
5166 + }
5167 + if (type !== "all") {
5168 + const isActive = query.isActive();
5169 + if (type === "active" && !isActive) {
5170 + return false;
5171 + }
5172 + if (type === "inactive" && isActive) {
5173 + return false;
5174 + }
5175 + }
5176 + if (typeof stale === "boolean" && query.isStale() !== stale) {
5177 + return false;
5178 + }
5179 + if (typeof fetchStatus !== "undefined" && fetchStatus !== query.state.fetchStatus) {
5180 + return false;
5181 + }
5182 + if (predicate && !predicate(query)) {
5183 + return false;
5184 + }
5185 + return true;
5186 +}
5187 +function matchMutation(filters, mutation) {
5188 + const { exact, status, predicate, mutationKey } = filters;
5189 + if (mutationKey) {
5190 + if (!mutation.options.mutationKey) {
5191 + return false;
5192 + }
5193 + if (exact) {
5194 + if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) {
5195 + return false;
5196 + }
5197 + } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {
5198 + return false;
5199 + }
5200 + }
5201 + if (status && mutation.state.status !== status) {
5202 + return false;
5203 + }
5204 + if (predicate && !predicate(mutation)) {
5205 + return false;
5206 + }
5207 + return true;
5208 +}
5209 +function hashQueryKeyByOptions(queryKey, options) {
5210 + const hashFn = options?.queryKeyHashFn || hashKey;
5211 + return hashFn(queryKey);
5212 +}
5213 +function hashKey(queryKey) {
5214 + return JSON.stringify(
5215 + queryKey,
5216 + (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {
5217 + result[key] = val[key];
5218 + return result;
5219 + }, {}) : val
5220 + );
5221 +}
5222 +function partialMatchKey(a, b) {
5223 + if (a === b) {
5224 + return true;
5225 + }
5226 + if (typeof a !== typeof b) {
5227 + return false;
5228 + }
5229 + if (a && b && typeof a === "object" && typeof b === "object") {
5230 + return !Object.keys(b).some((key) => !partialMatchKey(a[key], b[key]));
5231 + }
5232 + return false;
5233 +}
5234 +function replaceEqualDeep(a, b) {
5235 + if (a === b) {
5236 + return a;
5237 + }
5238 + const array = isPlainArray(a) && isPlainArray(b);
5239 + if (array || isPlainObject(a) && isPlainObject(b)) {
5240 + const aSize = array ? a.length : Object.keys(a).length;
5241 + const bItems = array ? b : Object.keys(b);
5242 + const bSize = bItems.length;
5243 + const copy = array ? [] : {};
5244 + let equalItems = 0;
5245 + for (let i = 0; i < bSize; i++) {
5246 + const key = array ? i : bItems[i];
5247 + copy[key] = replaceEqualDeep(a[key], b[key]);
5248 + if (copy[key] === a[key]) {
5249 + equalItems++;
5250 + }
5251 + }
5252 + return aSize === bSize && equalItems === aSize ? a : copy;
5253 + }
5254 + return b;
5255 +}
5256 +function shallowEqualObjects(a, b) {
5257 + if (a && !b || b && !a) {
5258 + return false;
5259 + }
5260 + for (const key in a) {
5261 + if (a[key] !== b[key]) {
5262 + return false;
5263 + }
5264 + }
5265 + return true;
5266 +}
5267 +function isPlainArray(value) {
5268 + return Array.isArray(value) && value.length === Object.keys(value).length;
5269 +}
5270 +function isPlainObject(o) {
5271 + if (!hasObjectPrototype(o)) {
5272 + return false;
5273 + }
5274 + const ctor = o.constructor;
5275 + if (typeof ctor === "undefined") {
5276 + return true;
5277 + }
5278 + const prot = ctor.prototype;
5279 + if (!hasObjectPrototype(prot)) {
5280 + return false;
5281 + }
5282 + if (!prot.hasOwnProperty("isPrototypeOf")) {
5283 + return false;
5284 + }
5285 + return true;
5286 +}
5287 +function hasObjectPrototype(o) {
5288 + return Object.prototype.toString.call(o) === "[object Object]";
5289 +}
5290 +function sleep(timeout) {
5291 + return new Promise((resolve) => {
5292 + setTimeout(resolve, timeout);
5293 + });
5294 +}
5295 +function scheduleMicrotask(callback) {
5296 + sleep(0).then(callback);
5297 +}
5298 +function replaceData(prevData, data, options) {
5299 + if (typeof options.structuralSharing === "function") {
5300 + return options.structuralSharing(prevData, data);
5301 + } else if (options.structuralSharing !== false) {
5302 + return replaceEqualDeep(prevData, data);
5303 + }
5304 + return data;
5305 +}
5306 +function keepPreviousData(previousData) {
5307 + return previousData;
5308 +}
5309 +function addToEnd(items, item, max = 0) {
5310 + const newItems = [...items, item];
5311 + return max && newItems.length > max ? newItems.slice(1) : newItems;
5312 +}
5313 +function addToStart(items, item, max = 0) {
5314 + const newItems = [item, ...items];
5315 + return max && newItems.length > max ? newItems.slice(0, -1) : newItems;
5316 +}
5317 +// Annotate the CommonJS export names for ESM import in node:
5318 +0 && (0);
5319 +//# sourceMappingURL=utils.cjs.map
5320 +
5321 +/***/ }),
5322 +
5323 +/***/ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs":
5324 +/*!********************************************************************************!*\
5325 + !*** ../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs ***!
5326 + \********************************************************************************/
5327 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5328 +
5329 +"use strict";
5330 +
5331 +"use client";
5332 +var __create = Object.create;
5333 +var __defProp = Object.defineProperty;
5334 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5335 +var __getOwnPropNames = Object.getOwnPropertyNames;
5336 +var __getProtoOf = Object.getPrototypeOf;
5337 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5338 +var __export = (target, all) => {
5339 + for (var name in all)
5340 + __defProp(target, name, { get: all[name], enumerable: true });
5341 +};
5342 +var __copyProps = (to, from, except, desc) => {
5343 + if (from && typeof from === "object" || typeof from === "function") {
5344 + for (let key of __getOwnPropNames(from))
5345 + if (!__hasOwnProp.call(to, key) && key !== except)
5346 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5347 + }
5348 + return to;
5349 +};
5350 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
5351 + // If the importer is in node compatibility mode or this is not an ESM
5352 + // file that has been converted to a CommonJS file using a Babel-
5353 + // compatible transform (i.e. "__esModule" has not been set), then set
5354 + // "default" to the CommonJS "module.exports" for node compatibility.
5355 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
5356 + mod
5357 +));
5358 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5359 +
5360 +// src/HydrationBoundary.tsx
5361 +var HydrationBoundary_exports = {};
5362 +__export(HydrationBoundary_exports, {
5363 + HydrationBoundary: () => HydrationBoundary
5364 +});
5365 +module.exports = __toCommonJS(HydrationBoundary_exports);
5366 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
5367 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
5368 +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
5369 +var HydrationBoundary = ({
5370 + children,
5371 + options = {},
5372 + state,
5373 + queryClient
5374 +}) => {
5375 + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
5376 + const [hydrationQueue, setHydrationQueue] = React.useState();
5377 + const optionsRef = React.useRef(options);
5378 + optionsRef.current = options;
5379 + React.useMemo(() => {
5380 + if (state) {
5381 + if (typeof state !== "object") {
5382 + return;
5383 + }
5384 + const queryCache = client.getQueryCache();
5385 + const queries = state.queries || [];
5386 + const newQueries = [];
5387 + const existingQueries = [];
5388 + for (const dehydratedQuery of queries) {
5389 + const existingQuery = queryCache.get(dehydratedQuery.queryHash);
5390 + if (!existingQuery) {
5391 + newQueries.push(dehydratedQuery);
5392 + } else {
5393 + const hydrationIsNewer = dehydratedQuery.state.dataUpdatedAt > existingQuery.state.dataUpdatedAt;
5394 + const queryAlreadyQueued = hydrationQueue?.find(
5395 + (query) => query.queryHash === dehydratedQuery.queryHash
5396 + );
5397 + if (hydrationIsNewer && (!queryAlreadyQueued || dehydratedQuery.state.dataUpdatedAt > queryAlreadyQueued.state.dataUpdatedAt)) {
5398 + existingQueries.push(dehydratedQuery);
5399 + }
5400 + }
5401 + }
5402 + if (newQueries.length > 0) {
5403 + (0, import_query_core.hydrate)(client, { queries: newQueries }, optionsRef.current);
5404 + }
5405 + if (existingQueries.length > 0) {
5406 + setHydrationQueue(
5407 + (prev) => prev ? [...prev, ...existingQueries] : existingQueries
5408 + );
5409 + }
5410 + }
5411 + }, [client, hydrationQueue, state]);
5412 + React.useEffect(() => {
5413 + if (hydrationQueue) {
5414 + (0, import_query_core.hydrate)(client, { queries: hydrationQueue }, optionsRef.current);
5415 + setHydrationQueue(void 0);
5416 + }
5417 + }, [client, hydrationQueue]);
5418 + return children;
5419 +};
5420 +// Annotate the CommonJS export names for ESM import in node:
5421 +0 && (0);
5422 +//# sourceMappingURL=HydrationBoundary.cjs.map
5423 +
5424 +/***/ }),
5425 +
5426 +/***/ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs":
5427 +/*!**********************************************************************************!*\
5428 + !*** ../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs ***!
5429 + \**********************************************************************************/
5430 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5431 +
5432 +"use strict";
5433 +
5434 +"use client";
5435 +var __create = Object.create;
5436 +var __defProp = Object.defineProperty;
5437 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5438 +var __getOwnPropNames = Object.getOwnPropertyNames;
5439 +var __getProtoOf = Object.getPrototypeOf;
5440 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5441 +var __export = (target, all) => {
5442 + for (var name in all)
5443 + __defProp(target, name, { get: all[name], enumerable: true });
5444 +};
5445 +var __copyProps = (to, from, except, desc) => {
5446 + if (from && typeof from === "object" || typeof from === "function") {
5447 + for (let key of __getOwnPropNames(from))
5448 + if (!__hasOwnProp.call(to, key) && key !== except)
5449 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5450 + }
5451 + return to;
5452 +};
5453 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
5454 + // If the importer is in node compatibility mode or this is not an ESM
5455 + // file that has been converted to a CommonJS file using a Babel-
5456 + // compatible transform (i.e. "__esModule" has not been set), then set
5457 + // "default" to the CommonJS "module.exports" for node compatibility.
5458 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
5459 + mod
5460 +));
5461 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5462 +
5463 +// src/QueryClientProvider.tsx
5464 +var QueryClientProvider_exports = {};
5465 +__export(QueryClientProvider_exports, {
5466 + QueryClientContext: () => QueryClientContext,
5467 + QueryClientProvider: () => QueryClientProvider,
5468 + useQueryClient: () => useQueryClient
5469 +});
5470 +module.exports = __toCommonJS(QueryClientProvider_exports);
5471 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
5472 +var QueryClientContext = React.createContext(
5473 + void 0
5474 +);
5475 +var useQueryClient = (queryClient) => {
5476 + const client = React.useContext(QueryClientContext);
5477 + if (queryClient) {
5478 + return queryClient;
5479 + }
5480 + if (!client) {
5481 + throw new Error("No QueryClient set, use QueryClientProvider to set one");
5482 + }
5483 + return client;
5484 +};
5485 +var QueryClientProvider = ({
5486 + client,
5487 + children
5488 +}) => {
5489 + React.useEffect(() => {
5490 + client.mount();
5491 + return () => {
5492 + client.unmount();
5493 + };
5494 + }, [client]);
5495 + return /* @__PURE__ */ React.createElement(QueryClientContext.Provider, { value: client }, children);
5496 +};
5497 +// Annotate the CommonJS export names for ESM import in node:
5498 +0 && (0);
5499 +//# sourceMappingURL=QueryClientProvider.cjs.map
5500 +
5501 +/***/ }),
5502 +
5503 +/***/ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs":
5504 +/*!**************************************************************************************!*\
5505 + !*** ../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs ***!
5506 + \**************************************************************************************/
5507 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5508 +
5509 +"use strict";
5510 +
5511 +"use client";
5512 +var __create = Object.create;
5513 +var __defProp = Object.defineProperty;
5514 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5515 +var __getOwnPropNames = Object.getOwnPropertyNames;
5516 +var __getProtoOf = Object.getPrototypeOf;
5517 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5518 +var __export = (target, all) => {
5519 + for (var name in all)
5520 + __defProp(target, name, { get: all[name], enumerable: true });
5521 +};
5522 +var __copyProps = (to, from, except, desc) => {
5523 + if (from && typeof from === "object" || typeof from === "function") {
5524 + for (let key of __getOwnPropNames(from))
5525 + if (!__hasOwnProp.call(to, key) && key !== except)
5526 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5527 + }
5528 + return to;
5529 +};
5530 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
5531 + // If the importer is in node compatibility mode or this is not an ESM
5532 + // file that has been converted to a CommonJS file using a Babel-
5533 + // compatible transform (i.e. "__esModule" has not been set), then set
5534 + // "default" to the CommonJS "module.exports" for node compatibility.
5535 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
5536 + mod
5537 +));
5538 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5539 +
5540 +// src/QueryErrorResetBoundary.tsx
5541 +var QueryErrorResetBoundary_exports = {};
5542 +__export(QueryErrorResetBoundary_exports, {
5543 + QueryErrorResetBoundary: () => QueryErrorResetBoundary,
5544 + useQueryErrorResetBoundary: () => useQueryErrorResetBoundary
5545 +});
5546 +module.exports = __toCommonJS(QueryErrorResetBoundary_exports);
5547 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
5548 +function createValue() {
5549 + let isReset = false;
5550 + return {
5551 + clearReset: () => {
5552 + isReset = false;
5553 + },
5554 + reset: () => {
5555 + isReset = true;
5556 + },
5557 + isReset: () => {
5558 + return isReset;
5559 + }
5560 + };
5561 +}
5562 +var QueryErrorResetBoundaryContext = React.createContext(createValue());
5563 +var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
5564 +var QueryErrorResetBoundary = ({
5565 + children
5566 +}) => {
5567 + const [value] = React.useState(() => createValue());
5568 + return /* @__PURE__ */ React.createElement(QueryErrorResetBoundaryContext.Provider, { value }, typeof children === "function" ? children(value) : children);
5569 +};
5570 +// Annotate the CommonJS export names for ESM import in node:
5571 +0 && (0);
5572 +//# sourceMappingURL=QueryErrorResetBoundary.cjs.map
5573 +
5574 +/***/ }),
5575 +
5576 +/***/ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs":
5577 +/*!*********************************************************************************!*\
5578 + !*** ../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs ***!
5579 + \*********************************************************************************/
5580 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5581 +
5582 +"use strict";
5583 +
5584 +"use client";
5585 +var __create = Object.create;
5586 +var __defProp = Object.defineProperty;
5587 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5588 +var __getOwnPropNames = Object.getOwnPropertyNames;
5589 +var __getProtoOf = Object.getPrototypeOf;
5590 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5591 +var __export = (target, all) => {
5592 + for (var name in all)
5593 + __defProp(target, name, { get: all[name], enumerable: true });
5594 +};
5595 +var __copyProps = (to, from, except, desc) => {
5596 + if (from && typeof from === "object" || typeof from === "function") {
5597 + for (let key of __getOwnPropNames(from))
5598 + if (!__hasOwnProp.call(to, key) && key !== except)
5599 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5600 + }
5601 + return to;
5602 +};
5603 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
5604 + // If the importer is in node compatibility mode or this is not an ESM
5605 + // file that has been converted to a CommonJS file using a Babel-
5606 + // compatible transform (i.e. "__esModule" has not been set), then set
5607 + // "default" to the CommonJS "module.exports" for node compatibility.
5608 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
5609 + mod
5610 +));
5611 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5612 +
5613 +// src/errorBoundaryUtils.ts
5614 +var errorBoundaryUtils_exports = {};
5615 +__export(errorBoundaryUtils_exports, {
5616 + ensurePreventErrorBoundaryRetry: () => ensurePreventErrorBoundaryRetry,
5617 + getHasError: () => getHasError,
5618 + useClearResetErrorBoundary: () => useClearResetErrorBoundary
5619 +});
5620 +module.exports = __toCommonJS(errorBoundaryUtils_exports);
5621 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
5622 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
5623 +var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
5624 + if (options.suspense || options.throwOnError) {
5625 + if (!errorResetBoundary.isReset()) {
5626 + options.retryOnMount = false;
5627 + }
5628 + }
5629 +};
5630 +var useClearResetErrorBoundary = (errorResetBoundary) => {
5631 + React.useEffect(() => {
5632 + errorResetBoundary.clearReset();
5633 + }, [errorResetBoundary]);
5634 +};
5635 +var getHasError = ({
5636 + result,
5637 + errorResetBoundary,
5638 + throwOnError,
5639 + query
5640 +}) => {
5641 + return result.isError && !errorResetBoundary.isReset() && !result.isFetching && (0, import_utils.shouldThrowError)(throwOnError, [result.error, query]);
5642 +};
5643 +// Annotate the CommonJS export names for ESM import in node:
5644 +0 && (0);
5645 +//# sourceMappingURL=errorBoundaryUtils.cjs.map
5646 +
5647 +/***/ }),
5648 +
5649 +/***/ "../node_modules/@tanstack/react-query/build/modern/index.cjs":
5650 +/*!********************************************************************!*\
5651 + !*** ../node_modules/@tanstack/react-query/build/modern/index.cjs ***!
5652 + \********************************************************************/
5653 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5654 +
5655 +"use strict";
5656 +
5657 +var __defProp = Object.defineProperty;
5658 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5659 +var __getOwnPropNames = Object.getOwnPropertyNames;
5660 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5661 +var __export = (target, all) => {
5662 + for (var name in all)
5663 + __defProp(target, name, { get: all[name], enumerable: true });
5664 +};
5665 +var __copyProps = (to, from, except, desc) => {
5666 + if (from && typeof from === "object" || typeof from === "function") {
5667 + for (let key of __getOwnPropNames(from))
5668 + if (!__hasOwnProp.call(to, key) && key !== except)
5669 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5670 + }
5671 + return to;
5672 +};
5673 +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
5674 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5675 +
5676 +// src/index.ts
5677 +var src_exports = {};
5678 +__export(src_exports, {
5679 + HydrationBoundary: () => import_HydrationBoundary.HydrationBoundary,
5680 + IsRestoringProvider: () => import_isRestoring.IsRestoringProvider,
5681 + QueryClientContext: () => import_QueryClientProvider.QueryClientContext,
5682 + QueryClientProvider: () => import_QueryClientProvider.QueryClientProvider,
5683 + QueryErrorResetBoundary: () => import_QueryErrorResetBoundary.QueryErrorResetBoundary,
5684 + infiniteQueryOptions: () => import_infiniteQueryOptions.infiniteQueryOptions,
5685 + queryOptions: () => import_queryOptions.queryOptions,
5686 + useInfiniteQuery: () => import_useInfiniteQuery.useInfiniteQuery,
5687 + useIsFetching: () => import_useIsFetching.useIsFetching,
5688 + useIsMutating: () => import_useMutationState.useIsMutating,
5689 + useIsRestoring: () => import_isRestoring.useIsRestoring,
5690 + useMutation: () => import_useMutation.useMutation,
5691 + useMutationState: () => import_useMutationState.useMutationState,
5692 + useQueries: () => import_useQueries.useQueries,
5693 + useQuery: () => import_useQuery.useQuery,
5694 + useQueryClient: () => import_QueryClientProvider.useQueryClient,
5695 + useQueryErrorResetBoundary: () => import_QueryErrorResetBoundary.useQueryErrorResetBoundary,
5696 + useSuspenseInfiniteQuery: () => import_useSuspenseInfiniteQuery.useSuspenseInfiniteQuery,
5697 + useSuspenseQueries: () => import_useSuspenseQueries.useSuspenseQueries,
5698 + useSuspenseQuery: () => import_useSuspenseQuery.useSuspenseQuery
5699 +});
5700 +module.exports = __toCommonJS(src_exports);
5701 +__reExport(src_exports, __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"), module.exports);
5702 +__reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/react-query/build/modern/types.cjs"), module.exports);
5703 +var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs");
5704 +var import_useQuery = __webpack_require__(/*! ./useQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs");
5705 +var import_useSuspenseQuery = __webpack_require__(/*! ./useSuspenseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs");
5706 +var import_useSuspenseInfiniteQuery = __webpack_require__(/*! ./useSuspenseInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs");
5707 +var import_useSuspenseQueries = __webpack_require__(/*! ./useSuspenseQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs");
5708 +var import_queryOptions = __webpack_require__(/*! ./queryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs");
5709 +var import_infiniteQueryOptions = __webpack_require__(/*! ./infiniteQueryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs");
5710 +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
5711 +var import_HydrationBoundary = __webpack_require__(/*! ./HydrationBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs");
5712 +var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
5713 +var import_useIsFetching = __webpack_require__(/*! ./useIsFetching.cjs */ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs");
5714 +var import_useMutationState = __webpack_require__(/*! ./useMutationState.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs");
5715 +var import_useMutation = __webpack_require__(/*! ./useMutation.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs");
5716 +var import_useInfiniteQuery = __webpack_require__(/*! ./useInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs");
5717 +var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
5718 +// Annotate the CommonJS export names for ESM import in node:
5719 +0 && (0);
5720 +//# sourceMappingURL=index.cjs.map
5721 +
5722 +/***/ }),
5723 +
5724 +/***/ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs":
5725 +/*!***********************************************************************************!*\
5726 + !*** ../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs ***!
5727 + \***********************************************************************************/
5728 +/***/ ((module) => {
5729 +
5730 +"use strict";
5731 +
5732 +var __defProp = Object.defineProperty;
5733 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5734 +var __getOwnPropNames = Object.getOwnPropertyNames;
5735 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5736 +var __export = (target, all) => {
5737 + for (var name in all)
5738 + __defProp(target, name, { get: all[name], enumerable: true });
5739 +};
5740 +var __copyProps = (to, from, except, desc) => {
5741 + if (from && typeof from === "object" || typeof from === "function") {
5742 + for (let key of __getOwnPropNames(from))
5743 + if (!__hasOwnProp.call(to, key) && key !== except)
5744 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5745 + }
5746 + return to;
5747 +};
5748 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5749 +
5750 +// src/infiniteQueryOptions.ts
5751 +var infiniteQueryOptions_exports = {};
5752 +__export(infiniteQueryOptions_exports, {
5753 + infiniteQueryOptions: () => infiniteQueryOptions
5754 +});
5755 +module.exports = __toCommonJS(infiniteQueryOptions_exports);
5756 +function infiniteQueryOptions(options) {
5757 + return options;
5758 +}
5759 +// Annotate the CommonJS export names for ESM import in node:
5760 +0 && (0);
5761 +//# sourceMappingURL=infiniteQueryOptions.cjs.map
5762 +
5763 +/***/ }),
5764 +
5765 +/***/ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs":
5766 +/*!**************************************************************************!*\
5767 + !*** ../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs ***!
5768 + \**************************************************************************/
5769 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5770 +
5771 +"use strict";
5772 +
5773 +"use client";
5774 +var __create = Object.create;
5775 +var __defProp = Object.defineProperty;
5776 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5777 +var __getOwnPropNames = Object.getOwnPropertyNames;
5778 +var __getProtoOf = Object.getPrototypeOf;
5779 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5780 +var __export = (target, all) => {
5781 + for (var name in all)
5782 + __defProp(target, name, { get: all[name], enumerable: true });
5783 +};
5784 +var __copyProps = (to, from, except, desc) => {
5785 + if (from && typeof from === "object" || typeof from === "function") {
5786 + for (let key of __getOwnPropNames(from))
5787 + if (!__hasOwnProp.call(to, key) && key !== except)
5788 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5789 + }
5790 + return to;
5791 +};
5792 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
5793 + // If the importer is in node compatibility mode or this is not an ESM
5794 + // file that has been converted to a CommonJS file using a Babel-
5795 + // compatible transform (i.e. "__esModule" has not been set), then set
5796 + // "default" to the CommonJS "module.exports" for node compatibility.
5797 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
5798 + mod
5799 +));
5800 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5801 +
5802 +// src/isRestoring.ts
5803 +var isRestoring_exports = {};
5804 +__export(isRestoring_exports, {
5805 + IsRestoringProvider: () => IsRestoringProvider,
5806 + useIsRestoring: () => useIsRestoring
5807 +});
5808 +module.exports = __toCommonJS(isRestoring_exports);
5809 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
5810 +var IsRestoringContext = React.createContext(false);
5811 +var useIsRestoring = () => React.useContext(IsRestoringContext);
5812 +var IsRestoringProvider = IsRestoringContext.Provider;
5813 +// Annotate the CommonJS export names for ESM import in node:
5814 +0 && (0);
5815 +//# sourceMappingURL=isRestoring.cjs.map
5816 +
5817 +/***/ }),
5818 +
5819 +/***/ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs":
5820 +/*!***************************************************************************!*\
5821 + !*** ../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs ***!
5822 + \***************************************************************************/
5823 +/***/ ((module) => {
5824 +
5825 +"use strict";
5826 +
5827 +var __defProp = Object.defineProperty;
5828 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5829 +var __getOwnPropNames = Object.getOwnPropertyNames;
5830 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5831 +var __export = (target, all) => {
5832 + for (var name in all)
5833 + __defProp(target, name, { get: all[name], enumerable: true });
5834 +};
5835 +var __copyProps = (to, from, except, desc) => {
5836 + if (from && typeof from === "object" || typeof from === "function") {
5837 + for (let key of __getOwnPropNames(from))
5838 + if (!__hasOwnProp.call(to, key) && key !== except)
5839 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5840 + }
5841 + return to;
5842 +};
5843 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5844 +
5845 +// src/queryOptions.ts
5846 +var queryOptions_exports = {};
5847 +__export(queryOptions_exports, {
5848 + queryOptions: () => queryOptions
5849 +});
5850 +module.exports = __toCommonJS(queryOptions_exports);
5851 +function queryOptions(options) {
5852 + return options;
5853 +}
5854 +// Annotate the CommonJS export names for ESM import in node:
5855 +0 && (0);
5856 +//# sourceMappingURL=queryOptions.cjs.map
5857 +
5858 +/***/ }),
5859 +
5860 +/***/ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs":
5861 +/*!***********************************************************************!*\
5862 + !*** ../node_modules/@tanstack/react-query/build/modern/suspense.cjs ***!
5863 + \***********************************************************************/
5864 +/***/ ((module) => {
5865 +
5866 +"use strict";
5867 +
5868 +var __defProp = Object.defineProperty;
5869 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5870 +var __getOwnPropNames = Object.getOwnPropertyNames;
5871 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5872 +var __export = (target, all) => {
5873 + for (var name in all)
5874 + __defProp(target, name, { get: all[name], enumerable: true });
5875 +};
5876 +var __copyProps = (to, from, except, desc) => {
5877 + if (from && typeof from === "object" || typeof from === "function") {
5878 + for (let key of __getOwnPropNames(from))
5879 + if (!__hasOwnProp.call(to, key) && key !== except)
5880 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5881 + }
5882 + return to;
5883 +};
5884 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5885 +
5886 +// src/suspense.ts
5887 +var suspense_exports = {};
5888 +__export(suspense_exports, {
5889 + defaultThrowOnError: () => defaultThrowOnError,
5890 + ensureStaleTime: () => ensureStaleTime,
5891 + fetchOptimistic: () => fetchOptimistic,
5892 + shouldSuspend: () => shouldSuspend,
5893 + willFetch: () => willFetch
5894 +});
5895 +module.exports = __toCommonJS(suspense_exports);
5896 +var defaultThrowOnError = (_error, query) => typeof query.state.data === "undefined";
5897 +var ensureStaleTime = (defaultedOptions) => {
5898 + if (defaultedOptions.suspense) {
5899 + if (typeof defaultedOptions.staleTime !== "number") {
5900 + defaultedOptions.staleTime = 1e3;
5901 + }
5902 + }
5903 +};
5904 +var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
5905 +var shouldSuspend = (defaultedOptions, result, isRestoring) => defaultedOptions?.suspense && willFetch(result, isRestoring);
5906 +var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
5907 + errorResetBoundary.clearReset();
5908 +});
5909 +// Annotate the CommonJS export names for ESM import in node:
5910 +0 && (0);
5911 +//# sourceMappingURL=suspense.cjs.map
5912 +
5913 +/***/ }),
5914 +
5915 +/***/ "../node_modules/@tanstack/react-query/build/modern/types.cjs":
5916 +/*!********************************************************************!*\
5917 + !*** ../node_modules/@tanstack/react-query/build/modern/types.cjs ***!
5918 + \********************************************************************/
5919 +/***/ ((module) => {
5920 +
5921 +"use strict";
5922 +
5923 +var __defProp = Object.defineProperty;
5924 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5925 +var __getOwnPropNames = Object.getOwnPropertyNames;
5926 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5927 +var __copyProps = (to, from, except, desc) => {
5928 + if (from && typeof from === "object" || typeof from === "function") {
5929 + for (let key of __getOwnPropNames(from))
5930 + if (!__hasOwnProp.call(to, key) && key !== except)
5931 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5932 + }
5933 + return to;
5934 +};
5935 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5936 +
5937 +// src/types.ts
5938 +var types_exports = {};
5939 +module.exports = __toCommonJS(types_exports);
5940 +//# sourceMappingURL=types.cjs.map
5941 +
5942 +/***/ }),
5943 +
5944 +/***/ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs":
5945 +/*!***************************************************************************!*\
5946 + !*** ../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs ***!
5947 + \***************************************************************************/
5948 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5949 +
5950 +"use strict";
5951 +
5952 +"use client";
5953 +var __create = Object.create;
5954 +var __defProp = Object.defineProperty;
5955 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5956 +var __getOwnPropNames = Object.getOwnPropertyNames;
5957 +var __getProtoOf = Object.getPrototypeOf;
5958 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5959 +var __export = (target, all) => {
5960 + for (var name in all)
5961 + __defProp(target, name, { get: all[name], enumerable: true });
5962 +};
5963 +var __copyProps = (to, from, except, desc) => {
5964 + if (from && typeof from === "object" || typeof from === "function") {
5965 + for (let key of __getOwnPropNames(from))
5966 + if (!__hasOwnProp.call(to, key) && key !== except)
5967 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5968 + }
5969 + return to;
5970 +};
5971 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
5972 + // If the importer is in node compatibility mode or this is not an ESM
5973 + // file that has been converted to a CommonJS file using a Babel-
5974 + // compatible transform (i.e. "__esModule" has not been set), then set
5975 + // "default" to the CommonJS "module.exports" for node compatibility.
5976 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
5977 + mod
5978 +));
5979 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5980 +
5981 +// src/useBaseQuery.ts
5982 +var useBaseQuery_exports = {};
5983 +__export(useBaseQuery_exports, {
5984 + useBaseQuery: () => useBaseQuery
5985 +});
5986 +module.exports = __toCommonJS(useBaseQuery_exports);
5987 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
5988 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
5989 +var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
5990 +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
5991 +var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
5992 +var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs");
5993 +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
5994 +function useBaseQuery(options, Observer, queryClient) {
5995 + if (true) {
5996 + if (typeof options !== "object" || Array.isArray(options)) {
5997 + throw new Error(
5998 + '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'
5999 + );
6000 + }
6001 + }
6002 + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
6003 + const isRestoring = (0, import_isRestoring.useIsRestoring)();
6004 + const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)();
6005 + const defaultedOptions = client.defaultQueryOptions(options);
6006 + defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
6007 + (0, import_suspense.ensureStaleTime)(defaultedOptions);
6008 + (0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(defaultedOptions, errorResetBoundary);
6009 + (0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary);
6010 + const [observer] = React.useState(
6011 + () => new Observer(
6012 + client,
6013 + defaultedOptions
6014 + )
6015 + );
6016 + const result = observer.getOptimisticResult(defaultedOptions);
6017 + React.useSyncExternalStore(
6018 + React.useCallback(
6019 + (onStoreChange) => {
6020 + const unsubscribe = isRestoring ? () => void 0 : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange));
6021 + observer.updateResult();
6022 + return unsubscribe;
6023 + },
6024 + [observer, isRestoring]
6025 + ),
6026 + () => observer.getCurrentResult(),
6027 + () => observer.getCurrentResult()
6028 + );
6029 + React.useEffect(() => {
6030 + observer.setOptions(defaultedOptions, { listeners: false });
6031 + }, [defaultedOptions, observer]);
6032 + if ((0, import_suspense.shouldSuspend)(defaultedOptions, result, isRestoring)) {
6033 + throw (0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary);
6034 + }
6035 + if ((0, import_errorBoundaryUtils.getHasError)({
6036 + result,
6037 + errorResetBoundary,
6038 + throwOnError: defaultedOptions.throwOnError,
6039 + query: observer.getCurrentQuery()
6040 + })) {
6041 + throw result.error;
6042 + }
6043 + return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
6044 +}
6045 +// Annotate the CommonJS export names for ESM import in node:
6046 +0 && (0);
6047 +//# sourceMappingURL=useBaseQuery.cjs.map
6048 +
6049 +/***/ }),
6050 +
6051 +/***/ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs":
6052 +/*!*******************************************************************************!*\
6053 + !*** ../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs ***!
6054 + \*******************************************************************************/
6055 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6056 +
6057 +"use strict";
6058 +
6059 +"use client";
6060 +var __defProp = Object.defineProperty;
6061 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6062 +var __getOwnPropNames = Object.getOwnPropertyNames;
6063 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6064 +var __export = (target, all) => {
6065 + for (var name in all)
6066 + __defProp(target, name, { get: all[name], enumerable: true });
6067 +};
6068 +var __copyProps = (to, from, except, desc) => {
6069 + if (from && typeof from === "object" || typeof from === "function") {
6070 + for (let key of __getOwnPropNames(from))
6071 + if (!__hasOwnProp.call(to, key) && key !== except)
6072 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6073 + }
6074 + return to;
6075 +};
6076 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6077 +
6078 +// src/useInfiniteQuery.ts
6079 +var useInfiniteQuery_exports = {};
6080 +__export(useInfiniteQuery_exports, {
6081 + useInfiniteQuery: () => useInfiniteQuery
6082 +});
6083 +module.exports = __toCommonJS(useInfiniteQuery_exports);
6084 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6085 +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
6086 +function useInfiniteQuery(options, queryClient) {
6087 + return (0, import_useBaseQuery.useBaseQuery)(
6088 + options,
6089 + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
6090 + import_query_core.InfiniteQueryObserver,
6091 + queryClient
6092 + );
6093 +}
6094 +// Annotate the CommonJS export names for ESM import in node:
6095 +0 && (0);
6096 +//# sourceMappingURL=useInfiniteQuery.cjs.map
6097 +
6098 +/***/ }),
6099 +
6100 +/***/ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs":
6101 +/*!****************************************************************************!*\
6102 + !*** ../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs ***!
6103 + \****************************************************************************/
6104 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6105 +
6106 +"use strict";
6107 +
6108 +"use client";
6109 +var __create = Object.create;
6110 +var __defProp = Object.defineProperty;
6111 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6112 +var __getOwnPropNames = Object.getOwnPropertyNames;
6113 +var __getProtoOf = Object.getPrototypeOf;
6114 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6115 +var __export = (target, all) => {
6116 + for (var name in all)
6117 + __defProp(target, name, { get: all[name], enumerable: true });
6118 +};
6119 +var __copyProps = (to, from, except, desc) => {
6120 + if (from && typeof from === "object" || typeof from === "function") {
6121 + for (let key of __getOwnPropNames(from))
6122 + if (!__hasOwnProp.call(to, key) && key !== except)
6123 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6124 + }
6125 + return to;
6126 +};
6127 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
6128 + // If the importer is in node compatibility mode or this is not an ESM
6129 + // file that has been converted to a CommonJS file using a Babel-
6130 + // compatible transform (i.e. "__esModule" has not been set), then set
6131 + // "default" to the CommonJS "module.exports" for node compatibility.
6132 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
6133 + mod
6134 +));
6135 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6136 +
6137 +// src/useIsFetching.ts
6138 +var useIsFetching_exports = {};
6139 +__export(useIsFetching_exports, {
6140 + useIsFetching: () => useIsFetching
6141 +});
6142 +module.exports = __toCommonJS(useIsFetching_exports);
6143 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
6144 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6145 +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
6146 +function useIsFetching(filters, queryClient) {
6147 + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
6148 + const queryCache = client.getQueryCache();
6149 + return React.useSyncExternalStore(
6150 + React.useCallback(
6151 + (onStoreChange) => queryCache.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
6152 + [queryCache]
6153 + ),
6154 + () => client.isFetching(filters),
6155 + () => client.isFetching(filters)
6156 + );
6157 +}
6158 +// Annotate the CommonJS export names for ESM import in node:
6159 +0 && (0);
6160 +//# sourceMappingURL=useIsFetching.cjs.map
6161 +
6162 +/***/ }),
6163 +
6164 +/***/ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs":
6165 +/*!**************************************************************************!*\
6166 + !*** ../node_modules/@tanstack/react-query/build/modern/useMutation.cjs ***!
6167 + \**************************************************************************/
6168 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6169 +
6170 +"use strict";
6171 +
6172 +"use client";
6173 +var __create = Object.create;
6174 +var __defProp = Object.defineProperty;
6175 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6176 +var __getOwnPropNames = Object.getOwnPropertyNames;
6177 +var __getProtoOf = Object.getPrototypeOf;
6178 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6179 +var __export = (target, all) => {
6180 + for (var name in all)
6181 + __defProp(target, name, { get: all[name], enumerable: true });
6182 +};
6183 +var __copyProps = (to, from, except, desc) => {
6184 + if (from && typeof from === "object" || typeof from === "function") {
6185 + for (let key of __getOwnPropNames(from))
6186 + if (!__hasOwnProp.call(to, key) && key !== except)
6187 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6188 + }
6189 + return to;
6190 +};
6191 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
6192 + // If the importer is in node compatibility mode or this is not an ESM
6193 + // file that has been converted to a CommonJS file using a Babel-
6194 + // compatible transform (i.e. "__esModule" has not been set), then set
6195 + // "default" to the CommonJS "module.exports" for node compatibility.
6196 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
6197 + mod
6198 +));
6199 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6200 +
6201 +// src/useMutation.ts
6202 +var useMutation_exports = {};
6203 +__export(useMutation_exports, {
6204 + useMutation: () => useMutation
6205 +});
6206 +module.exports = __toCommonJS(useMutation_exports);
6207 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
6208 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6209 +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
6210 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
6211 +function useMutation(options, queryClient) {
6212 + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
6213 + const [observer] = React.useState(
6214 + () => new import_query_core.MutationObserver(
6215 + client,
6216 + options
6217 + )
6218 + );
6219 + React.useEffect(() => {
6220 + observer.setOptions(options);
6221 + }, [observer, options]);
6222 + const result = React.useSyncExternalStore(
6223 + React.useCallback(
6224 + (onStoreChange) => observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
6225 + [observer]
6226 + ),
6227 + () => observer.getCurrentResult(),
6228 + () => observer.getCurrentResult()
6229 + );
6230 + const mutate = React.useCallback(
6231 + (variables, mutateOptions) => {
6232 + observer.mutate(variables, mutateOptions).catch(noop);
6233 + },
6234 + [observer]
6235 + );
6236 + if (result.error && (0, import_utils.shouldThrowError)(observer.options.throwOnError, [result.error])) {
6237 + throw result.error;
6238 + }
6239 + return { ...result, mutate, mutateAsync: result.mutate };
6240 +}
6241 +function noop() {
6242 +}
6243 +// Annotate the CommonJS export names for ESM import in node:
6244 +0 && (0);
6245 +//# sourceMappingURL=useMutation.cjs.map
6246 +
6247 +/***/ }),
6248 +
6249 +/***/ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs":
6250 +/*!*******************************************************************************!*\
6251 + !*** ../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs ***!
6252 + \*******************************************************************************/
6253 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6254 +
6255 +"use strict";
6256 +
6257 +"use client";
6258 +var __create = Object.create;
6259 +var __defProp = Object.defineProperty;
6260 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6261 +var __getOwnPropNames = Object.getOwnPropertyNames;
6262 +var __getProtoOf = Object.getPrototypeOf;
6263 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6264 +var __export = (target, all) => {
6265 + for (var name in all)
6266 + __defProp(target, name, { get: all[name], enumerable: true });
6267 +};
6268 +var __copyProps = (to, from, except, desc) => {
6269 + if (from && typeof from === "object" || typeof from === "function") {
6270 + for (let key of __getOwnPropNames(from))
6271 + if (!__hasOwnProp.call(to, key) && key !== except)
6272 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6273 + }
6274 + return to;
6275 +};
6276 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
6277 + // If the importer is in node compatibility mode or this is not an ESM
6278 + // file that has been converted to a CommonJS file using a Babel-
6279 + // compatible transform (i.e. "__esModule" has not been set), then set
6280 + // "default" to the CommonJS "module.exports" for node compatibility.
6281 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
6282 + mod
6283 +));
6284 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6285 +
6286 +// src/useMutationState.ts
6287 +var useMutationState_exports = {};
6288 +__export(useMutationState_exports, {
6289 + useIsMutating: () => useIsMutating,
6290 + useMutationState: () => useMutationState
6291 +});
6292 +module.exports = __toCommonJS(useMutationState_exports);
6293 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
6294 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6295 +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
6296 +function useIsMutating(filters, queryClient) {
6297 + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
6298 + return useMutationState(
6299 + { filters: { ...filters, status: "pending" } },
6300 + client
6301 + ).length;
6302 +}
6303 +function getResult(mutationCache, options) {
6304 + return mutationCache.findAll(options.filters).map(
6305 + (mutation) => options.select ? options.select(
6306 + mutation
6307 + ) : mutation.state
6308 + );
6309 +}
6310 +function useMutationState(options = {}, queryClient) {
6311 + const mutationCache = (0, import_QueryClientProvider.useQueryClient)(queryClient).getMutationCache();
6312 + const optionsRef = React.useRef(options);
6313 + const result = React.useRef();
6314 + if (!result.current) {
6315 + result.current = getResult(mutationCache, options);
6316 + }
6317 + React.useEffect(() => {
6318 + optionsRef.current = options;
6319 + });
6320 + return React.useSyncExternalStore(
6321 + React.useCallback(
6322 + (onStoreChange) => mutationCache.subscribe(() => {
6323 + const nextResult = (0, import_query_core.replaceEqualDeep)(
6324 + result.current,
6325 + getResult(mutationCache, optionsRef.current)
6326 + );
6327 + if (result.current !== nextResult) {
6328 + result.current = nextResult;
6329 + import_query_core.notifyManager.schedule(onStoreChange);
6330 + }
6331 + }),
6332 + [mutationCache]
6333 + ),
6334 + () => result.current,
6335 + () => result.current
6336 + );
6337 +}
6338 +// Annotate the CommonJS export names for ESM import in node:
6339 +0 && (0);
6340 +//# sourceMappingURL=useMutationState.cjs.map
6341 +
6342 +/***/ }),
6343 +
6344 +/***/ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs":
6345 +/*!*************************************************************************!*\
6346 + !*** ../node_modules/@tanstack/react-query/build/modern/useQueries.cjs ***!
6347 + \*************************************************************************/
6348 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6349 +
6350 +"use strict";
6351 +
6352 +"use client";
6353 +var __create = Object.create;
6354 +var __defProp = Object.defineProperty;
6355 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6356 +var __getOwnPropNames = Object.getOwnPropertyNames;
6357 +var __getProtoOf = Object.getPrototypeOf;
6358 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6359 +var __export = (target, all) => {
6360 + for (var name in all)
6361 + __defProp(target, name, { get: all[name], enumerable: true });
6362 +};
6363 +var __copyProps = (to, from, except, desc) => {
6364 + if (from && typeof from === "object" || typeof from === "function") {
6365 + for (let key of __getOwnPropNames(from))
6366 + if (!__hasOwnProp.call(to, key) && key !== except)
6367 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6368 + }
6369 + return to;
6370 +};
6371 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
6372 + // If the importer is in node compatibility mode or this is not an ESM
6373 + // file that has been converted to a CommonJS file using a Babel-
6374 + // compatible transform (i.e. "__esModule" has not been set), then set
6375 + // "default" to the CommonJS "module.exports" for node compatibility.
6376 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
6377 + mod
6378 +));
6379 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6380 +
6381 +// src/useQueries.ts
6382 +var useQueries_exports = {};
6383 +__export(useQueries_exports, {
6384 + useQueries: () => useQueries
6385 +});
6386 +module.exports = __toCommonJS(useQueries_exports);
6387 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
6388 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6389 +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
6390 +var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
6391 +var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
6392 +var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs");
6393 +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
6394 +function useQueries({
6395 + queries,
6396 + ...options
6397 +}, queryClient) {
6398 + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
6399 + const isRestoring = (0, import_isRestoring.useIsRestoring)();
6400 + const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)();
6401 + const defaultedQueries = React.useMemo(
6402 + () => queries.map((opts) => {
6403 + const defaultedOptions = client.defaultQueryOptions(opts);
6404 + defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
6405 + return defaultedOptions;
6406 + }),
6407 + [queries, client, isRestoring]
6408 + );
6409 + defaultedQueries.forEach((query) => {
6410 + (0, import_suspense.ensureStaleTime)(query);
6411 + (0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(query, errorResetBoundary);
6412 + });
6413 + (0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary);
6414 + const [observer] = React.useState(
6415 + () => new import_query_core.QueriesObserver(
6416 + client,
6417 + defaultedQueries,
6418 + options
6419 + )
6420 + );
6421 + const [optimisticResult, getCombinedResult, trackResult] = observer.getOptimisticResult(defaultedQueries);
6422 + React.useSyncExternalStore(
6423 + React.useCallback(
6424 + (onStoreChange) => isRestoring ? () => void 0 : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
6425 + [observer, isRestoring]
6426 + ),
6427 + () => observer.getCurrentResult(),
6428 + () => observer.getCurrentResult()
6429 + );
6430 + React.useEffect(() => {
6431 + observer.setQueries(
6432 + defaultedQueries,
6433 + options,
6434 + {
6435 + listeners: false
6436 + }
6437 + );
6438 + }, [defaultedQueries, options, observer]);
6439 + const shouldAtLeastOneSuspend = optimisticResult.some(
6440 + (result, index) => (0, import_suspense.shouldSuspend)(defaultedQueries[index], result, isRestoring)
6441 + );
6442 + const suspensePromises = shouldAtLeastOneSuspend ? optimisticResult.flatMap((result, index) => {
6443 + const opts = defaultedQueries[index];
6444 + if (opts) {
6445 + const queryObserver = new import_query_core.QueryObserver(client, opts);
6446 + if ((0, import_suspense.shouldSuspend)(opts, result, isRestoring)) {
6447 + return (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary);
6448 + } else if ((0, import_suspense.willFetch)(result, isRestoring)) {
6449 + void (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary);
6450 + }
6451 + }
6452 + return [];
6453 + }) : [];
6454 + if (suspensePromises.length > 0) {
6455 + throw Promise.all(suspensePromises);
6456 + }
6457 + const observerQueries = observer.getQueries();
6458 + const firstSingleResultWhichShouldThrow = optimisticResult.find(
6459 + (result, index) => (0, import_errorBoundaryUtils.getHasError)({
6460 + result,
6461 + errorResetBoundary,
6462 + throwOnError: defaultedQueries[index]?.throwOnError ?? false,
6463 + query: observerQueries[index]
6464 + })
6465 + );
6466 + if (firstSingleResultWhichShouldThrow?.error) {
6467 + throw firstSingleResultWhichShouldThrow.error;
6468 + }
6469 + return getCombinedResult(trackResult());
6470 +}
6471 +// Annotate the CommonJS export names for ESM import in node:
6472 +0 && (0);
6473 +//# sourceMappingURL=useQueries.cjs.map
6474 +
6475 +/***/ }),
6476 +
6477 +/***/ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs":
6478 +/*!***********************************************************************!*\
6479 + !*** ../node_modules/@tanstack/react-query/build/modern/useQuery.cjs ***!
6480 + \***********************************************************************/
6481 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6482 +
6483 +"use strict";
6484 +
6485 +"use client";
6486 +var __defProp = Object.defineProperty;
6487 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6488 +var __getOwnPropNames = Object.getOwnPropertyNames;
6489 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6490 +var __export = (target, all) => {
6491 + for (var name in all)
6492 + __defProp(target, name, { get: all[name], enumerable: true });
6493 +};
6494 +var __copyProps = (to, from, except, desc) => {
6495 + if (from && typeof from === "object" || typeof from === "function") {
6496 + for (let key of __getOwnPropNames(from))
6497 + if (!__hasOwnProp.call(to, key) && key !== except)
6498 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6499 + }
6500 + return to;
6501 +};
6502 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6503 +
6504 +// src/useQuery.ts
6505 +var useQuery_exports = {};
6506 +__export(useQuery_exports, {
6507 + useQuery: () => useQuery
6508 +});
6509 +module.exports = __toCommonJS(useQuery_exports);
6510 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6511 +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
6512 +function useQuery(options, queryClient) {
6513 + return (0, import_useBaseQuery.useBaseQuery)(options, import_query_core.QueryObserver, queryClient);
6514 +}
6515 +// Annotate the CommonJS export names for ESM import in node:
6516 +0 && (0);
6517 +//# sourceMappingURL=useQuery.cjs.map
6518 +
6519 +/***/ }),
6520 +
6521 +/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs":
6522 +/*!***************************************************************************************!*\
6523 + !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs ***!
6524 + \***************************************************************************************/
6525 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6526 +
6527 +"use strict";
6528 +
6529 +"use client";
6530 +var __defProp = Object.defineProperty;
6531 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6532 +var __getOwnPropNames = Object.getOwnPropertyNames;
6533 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6534 +var __export = (target, all) => {
6535 + for (var name in all)
6536 + __defProp(target, name, { get: all[name], enumerable: true });
6537 +};
6538 +var __copyProps = (to, from, except, desc) => {
6539 + if (from && typeof from === "object" || typeof from === "function") {
6540 + for (let key of __getOwnPropNames(from))
6541 + if (!__hasOwnProp.call(to, key) && key !== except)
6542 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6543 + }
6544 + return to;
6545 +};
6546 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6547 +
6548 +// src/useSuspenseInfiniteQuery.ts
6549 +var useSuspenseInfiniteQuery_exports = {};
6550 +__export(useSuspenseInfiniteQuery_exports, {
6551 + useSuspenseInfiniteQuery: () => useSuspenseInfiniteQuery
6552 +});
6553 +module.exports = __toCommonJS(useSuspenseInfiniteQuery_exports);
6554 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6555 +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
6556 +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
6557 +function useSuspenseInfiniteQuery(options, queryClient) {
6558 + return (0, import_useBaseQuery.useBaseQuery)(
6559 + {
6560 + ...options,
6561 + enabled: true,
6562 + suspense: true,
6563 + throwOnError: import_suspense.defaultThrowOnError
6564 + },
6565 + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
6566 + import_query_core.InfiniteQueryObserver,
6567 + queryClient
6568 + );
6569 +}
6570 +// Annotate the CommonJS export names for ESM import in node:
6571 +0 && (0);
6572 +//# sourceMappingURL=useSuspenseInfiniteQuery.cjs.map
6573 +
6574 +/***/ }),
6575 +
6576 +/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs":
6577 +/*!*********************************************************************************!*\
6578 + !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs ***!
6579 + \*********************************************************************************/
6580 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6581 +
6582 +"use strict";
6583 +
6584 +"use client";
6585 +var __defProp = Object.defineProperty;
6586 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6587 +var __getOwnPropNames = Object.getOwnPropertyNames;
6588 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6589 +var __export = (target, all) => {
6590 + for (var name in all)
6591 + __defProp(target, name, { get: all[name], enumerable: true });
6592 +};
6593 +var __copyProps = (to, from, except, desc) => {
6594 + if (from && typeof from === "object" || typeof from === "function") {
6595 + for (let key of __getOwnPropNames(from))
6596 + if (!__hasOwnProp.call(to, key) && key !== except)
6597 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6598 + }
6599 + return to;
6600 +};
6601 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6602 +
6603 +// src/useSuspenseQueries.ts
6604 +var useSuspenseQueries_exports = {};
6605 +__export(useSuspenseQueries_exports, {
6606 + useSuspenseQueries: () => useSuspenseQueries
6607 +});
6608 +module.exports = __toCommonJS(useSuspenseQueries_exports);
6609 +var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs");
6610 +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
6611 +function useSuspenseQueries(options, queryClient) {
6612 + return (0, import_useQueries.useQueries)(
6613 + {
6614 + ...options,
6615 + queries: options.queries.map((query) => ({
6616 + ...query,
6617 + suspense: true,
6618 + throwOnError: import_suspense.defaultThrowOnError,
6619 + enabled: true
6620 + }))
6621 + },
6622 + queryClient
6623 + );
6624 +}
6625 +// Annotate the CommonJS export names for ESM import in node:
6626 +0 && (0);
6627 +//# sourceMappingURL=useSuspenseQueries.cjs.map
6628 +
6629 +/***/ }),
6630 +
6631 +/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs":
6632 +/*!*******************************************************************************!*\
6633 + !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs ***!
6634 + \*******************************************************************************/
6635 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6636 +
6637 +"use strict";
6638 +
6639 +"use client";
6640 +var __defProp = Object.defineProperty;
6641 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6642 +var __getOwnPropNames = Object.getOwnPropertyNames;
6643 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6644 +var __export = (target, all) => {
6645 + for (var name in all)
6646 + __defProp(target, name, { get: all[name], enumerable: true });
6647 +};
6648 +var __copyProps = (to, from, except, desc) => {
6649 + if (from && typeof from === "object" || typeof from === "function") {
6650 + for (let key of __getOwnPropNames(from))
6651 + if (!__hasOwnProp.call(to, key) && key !== except)
6652 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6653 + }
6654 + return to;
6655 +};
6656 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6657 +
6658 +// src/useSuspenseQuery.ts
6659 +var useSuspenseQuery_exports = {};
6660 +__export(useSuspenseQuery_exports, {
6661 + useSuspenseQuery: () => useSuspenseQuery
6662 +});
6663 +module.exports = __toCommonJS(useSuspenseQuery_exports);
6664 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6665 +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
6666 +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
6667 +function useSuspenseQuery(options, queryClient) {
6668 + return (0, import_useBaseQuery.useBaseQuery)(
6669 + {
6670 + ...options,
6671 + enabled: true,
6672 + suspense: true,
6673 + throwOnError: import_suspense.defaultThrowOnError
6674 + },
6675 + import_query_core.QueryObserver,
6676 + queryClient
6677 + );
6678 +}
6679 +// Annotate the CommonJS export names for ESM import in node:
6680 +0 && (0);
6681 +//# sourceMappingURL=useSuspenseQuery.cjs.map
6682 +
6683 +/***/ }),
6684 +
6685 +/***/ "../node_modules/@tanstack/react-query/build/modern/utils.cjs":
6686 +/*!********************************************************************!*\
6687 + !*** ../node_modules/@tanstack/react-query/build/modern/utils.cjs ***!
6688 + \********************************************************************/
6689 +/***/ ((module) => {
6690 +
6691 +"use strict";
6692 +
6693 +var __defProp = Object.defineProperty;
6694 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6695 +var __getOwnPropNames = Object.getOwnPropertyNames;
6696 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6697 +var __export = (target, all) => {
6698 + for (var name in all)
6699 + __defProp(target, name, { get: all[name], enumerable: true });
6700 +};
6701 +var __copyProps = (to, from, except, desc) => {
6702 + if (from && typeof from === "object" || typeof from === "function") {
6703 + for (let key of __getOwnPropNames(from))
6704 + if (!__hasOwnProp.call(to, key) && key !== except)
6705 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6706 + }
6707 + return to;
6708 +};
6709 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6710 +
6711 +// src/utils.ts
6712 +var utils_exports = {};
6713 +__export(utils_exports, {
6714 + shouldThrowError: () => shouldThrowError
6715 +});
6716 +module.exports = __toCommonJS(utils_exports);
6717 +function shouldThrowError(throwError, params) {
6718 + if (typeof throwError === "function") {
6719 + return throwError(...params);
6720 + }
6721 + return !!throwError;
6722 +}
6723 +// Annotate the CommonJS export names for ESM import in node:
6724 +0 && (0);
6725 +//# sourceMappingURL=utils.cjs.map
6726 +
1969 6727 /***/ })
1970 6728
1971 6729 /******/ });
1972 6730 /************************************************************************/
@@ -1995,9 +6753,9 @@
1995 6753 /******/ }
1996 6754 /******/
1997 6755 /************************************************************************/
1998 6756 var __webpack_exports__ = {};
1999 -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
6757 +// This entry need to be wrapped in an IIFE because it need to be in strict mode.
2000 6758 (() => {
2001 6759 "use strict";
2002 6760 /*!***************************************************!*\
2003 6761 !*** ../modules/notifications/assets/js/admin.js ***!