@soma-vertical-web/multi-lib 0.0.65 → 0.0.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/contexts/contexts/plp/PLPConstants.d.ts +6 -0
  2. package/contexts/contexts/plp/PLPInfiniteContext.tsx.d.ts +1 -1
  3. package/contexts/contexts/search/Constants.d.ts +6 -0
  4. package/contexts/contexts/search/Facets.d.ts +1 -1
  5. package/contexts/contexts/search/Products.d.ts +1 -1
  6. package/contexts/contexts/search/Search.d.ts +1 -1
  7. package/contexts/hooks/useScrollRestoration.d.ts +1 -1
  8. package/contexts/index.d.ts +4 -4
  9. package/data/helpers/search/search.d.ts +2 -0
  10. package/index-BBxYNFkz.mjs +416 -0
  11. package/index-CiMxj6Pg.mjs +412 -0
  12. package/index-CwBIv223.js +1 -0
  13. package/index-DKnolQoT.mjs +412 -0
  14. package/index.js +21 -21
  15. package/index.mjs +8264 -7197
  16. package/index2.js +1 -1
  17. package/index2.mjs +97 -94
  18. package/layout/index.d.ts +54 -8
  19. package/layout/team-component/PLPNavigation/Composite/BreadCrumb.d.ts +1 -3
  20. package/layout/team-component/PLPNavigation/Composite/Content.d.ts +1 -1
  21. package/layout/team-component/PLPNavigation/Composite/Filters.d.ts +1 -3
  22. package/layout/team-component/PLPNavigation/Composite/Root.d.ts +2 -2
  23. package/layout/team-component/PLPNavigation/Composite/Selected/Item.d.ts +1 -1
  24. package/layout/team-component/PLPNavigation/Composite/Selected/Selected.d.ts +1 -1
  25. package/layout/team-component/PLPNavigation/Composite/Selected/interfaces.d.ts +1 -7
  26. package/layout/team-component/PLPNavigation/PLPNavigation.d.ts +6 -6
  27. package/layout/team-component/Sort/Sort.d.ts +1 -1
  28. package/layout/template/PDC/Composite/Empty/Empty.d.ts +1 -1
  29. package/layout/template/PDC/Composite/Filters/Filters.d.ts +3 -5
  30. package/layout/template/PDC/Composite/Grid/Banners.d.ts +1 -1
  31. package/layout/template/PDC/Composite/Grid/Grid.d.ts +1 -1
  32. package/layout/template/PDC/Composite/Grid/NavigationTotal.d.ts +2 -3
  33. package/layout/template/PDC/Composite/InfiniteScroller/Banners/Banners.d.ts +1 -1
  34. package/layout/template/PDC/Composite/InfiniteScroller/InfiniteScroller.d.ts +1 -3
  35. package/layout/template/PDC/Composite/InfiniteScroller/Page/Composite/Card.d.ts +1 -1
  36. package/layout/template/PDC/Composite/InfiniteScroller/Page/Page.d.ts +1 -1
  37. package/layout/template/PDC/Composite/InfiniteScroller/Page/index.d.ts +1 -1
  38. package/layout/template/PDC/Composite/Navigation/Navigation.d.ts +1 -3
  39. package/layout/template/PDC/Composite/Notification/Notification.d.ts +1 -1
  40. package/layout/template/PDC/Composite/Pagination/Pagination.d.ts +1 -1
  41. package/layout/template/PDC/Composite/Pagination/helpers.d.ts +1 -2
  42. package/layout/template/PDC/Composite/Products/Products.d.ts +1 -1
  43. package/layout/template/PDC/PDC.d.ts +1 -1
  44. package/layout/template/PDC/index.d.ts +8 -8
  45. package/layout/template/SearchResult/Composite/Empty.d.ts +7 -0
  46. package/layout/template/SearchResult/Composite/Grid.d.ts +7 -0
  47. package/layout/template/SearchResult/Composite/GridHeader.d.ts +3 -0
  48. package/layout/template/SearchResult/Composite/Loading.d.ts +7 -0
  49. package/layout/template/SearchResult/Composite/Sort.d.ts +4 -0
  50. package/layout/template/SearchResult/SearchContent.d.ts +4 -0
  51. package/layout/template/SearchResult/SearchResult.d.ts +7 -0
  52. package/layout/template/SearchResult/index.d.ts +1 -0
  53. package/package.json +1 -1
  54. package/style.css +1 -1
  55. package/types/cms/ContentTypes/Search/index.d.ts +2 -2
  56. package/types/constants.d.ts +41 -1
  57. package/types/contexts/contexts/plp.d.ts +38 -7
  58. package/types/contexts/contexts/search.d.ts +18 -16
  59. package/types/contexts/hooks/index.d.ts +12 -0
  60. package/types/layout/team-components/PLPNavigation/index.d.ts +3 -14
  61. package/types/layout/team-components/Sort/index.d.ts +2 -5
  62. package/types/layout/templates/PLP/index.d.ts +122 -3
  63. package/types/layout/templates/SearchResult/index.d.ts +44 -0
@@ -0,0 +1,412 @@
1
+ import { jsxs as g, Fragment as S, jsx as p } from "react/jsx-runtime";
2
+ import { Utils as $ } from "@soma-vertical-web/core-components";
3
+ const b = (e, t = !0) => Intl.NumberFormat("pt-BR", {
4
+ style: "currency",
5
+ currency: "BRL",
6
+ minimumFractionDigits: t ? 2 : 0
7
+ }).format(e), R = ({ valueInCents: e, hasFree: t, freeTaxMessage: n }) => e === 0 ? t ? n : b(0) : b(e / 100), y = (e, t) => {
8
+ const [n, s] = e.split(t);
9
+ return { name: n.trim(), size: s ? s.trim() : "" };
10
+ }, T = (e, t) => {
11
+ if (!e)
12
+ return {};
13
+ const [n, s] = e.split(t);
14
+ return { color: n == null ? void 0 : n.trim(), size: s == null ? void 0 : s.trim() };
15
+ }, C = (e, t = "tamanho") => {
16
+ if (e.additionalProperty) {
17
+ const [n] = e.additionalProperty;
18
+ return n != null && n.name ? n.name.toLocaleLowerCase() === t ? n.value : e.name : "";
19
+ }
20
+ return e.name;
21
+ }, O = (e, t) => e.replace(t, "").trim(), N = (e) => e.replace(/\//g, ""), z = ({ items: e, NAME_SPLIT_SYMBOL: t }) => {
22
+ const n = {
23
+ price: 0,
24
+ listPrice: 0,
25
+ installments: {
26
+ count: 0,
27
+ value: 0
28
+ }
29
+ }, s = (a, o) => {
30
+ var _;
31
+ o && (o.sellerId = a.sellerId, o.sellerName = a.sellerName, o.available = !0, o.isSellerDefault = a.sellerDefault);
32
+ const {
33
+ Price: l,
34
+ ListPrice: u,
35
+ PaymentOptions: { installmentOptions: d }
36
+ } = a.commertialOffer;
37
+ n.price = l, n.listPrice = u;
38
+ const c = (_ = d == null ? void 0 : d[0]) == null ? void 0 : _.installments;
39
+ if (c) {
40
+ const { count: m, value: f } = c[c.length - 1];
41
+ n.installments = {
42
+ count: m,
43
+ value: f / 100
44
+ };
45
+ }
46
+ };
47
+ let r = !0;
48
+ const i = e.reduce((a, o) => {
49
+ var d;
50
+ const l = {
51
+ name: o.name,
52
+ sku: o.itemId,
53
+ value: ((d = o.Tamanho) == null ? void 0 : d[0]) ?? y(o.nameComplete ?? o.name, t).size,
54
+ available: !1,
55
+ sellerId: "",
56
+ sellerName: "",
57
+ isSellerDefault: !1
58
+ }, u = o.sellers.filter((c) => (c.sellerDefault && c.commertialOffer.IsAvailable && (l.available = !0, s(c, l)), c.commertialOffer.IsAvailable));
59
+ return !l.isSellerDefault && u.length > 0 && (l.available = !0, s(u[0], {
60
+ ...l,
61
+ sellerId: u[0].sellerId,
62
+ sellerName: u[0].sellerName
63
+ })), l.available === !1 && (r = !1), a.push(l), a;
64
+ }, []);
65
+ return {
66
+ ...n,
67
+ sizes: i,
68
+ allSizesAvailable: r
69
+ };
70
+ }, P = (e) => e ? !e.offers.offers.find(({ quantity: t = 0 }) => t > 0) : !1, x = (e, t) => {
71
+ const n = e.find(
72
+ (s) => s.availability.includes("InStock") && s.quantity && s.listPrice > 0 && s.seller.identifier === t
73
+ );
74
+ return n || e.find(
75
+ (s) => s.availability.includes("InStock") && s.quantity && s.listPrice > 0
76
+ );
77
+ }, F = ({ images: e, TEXTURE_IMAGE: t }) => e.find((n) => t.includes(n.imageLabel)) ?? e[0], j = (e, t) => {
78
+ const n = /\/ids\/(\d+)\//, s = e.match(n);
79
+ return s ? e.replace(
80
+ `/${s[1]}/`,
81
+ `/${s[1]}-${t.width}-${t.height}/`
82
+ ) : e;
83
+ }, A = (e, t) => {
84
+ const n = /\/ids\/(\d+)-(\d+)-(\d+)\//, s = e.match(n);
85
+ return s ? e.replace(
86
+ `/${s[1]}-${s[2]}-${s[3]}/`,
87
+ `/${s[1]}-${t.width}-${t.height}/`
88
+ ) : e;
89
+ }, D = ({
90
+ images: e,
91
+ label: t
92
+ }) => {
93
+ const n = e.filter(
94
+ (s) => s.keywords === t.first || s.keywords === t.second || s.alternateName === t.first || s.alternateName === t.second
95
+ );
96
+ return n.length === 0 ? e.slice(0, 2) : n;
97
+ }, B = (e) => {
98
+ const [t, n] = e.split("/").map(Number);
99
+ if (Number.isNaN(t) || Number.isNaN(n))
100
+ throw new Error("[ERROR ASPECT RATIO IMAGE]: Invalid aspect ratio format");
101
+ return n / t;
102
+ }, E = (e, t, n) => {
103
+ t && (e ? (t.getAttribute("src") || (t.src = n ?? ""), t.play()) : t.pause());
104
+ }, Ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
105
+ __proto__: null,
106
+ disableSKU: P,
107
+ formatPriceToCurrency: b,
108
+ freightParsePrice: R,
109
+ getAspectRatio: B,
110
+ getColorAndSizeFromSkuName: T,
111
+ getFirstImages: D,
112
+ getProductNameWithoutSku: O,
113
+ getSKUName: C,
114
+ getSkuInfos: z,
115
+ getThumbImage: F,
116
+ getValidOffer: x,
117
+ removeSlashes: N,
118
+ resizingImg: j,
119
+ setVideoPlay: E,
120
+ splitNameAndSizeFromFullName: y,
121
+ updatedResizedImg: A
122
+ }, Symbol.toStringTag, { value: "Module" })), k = "fuzzy", v = "operator", L = (e) => ({
123
+ isDepartment: e != null && e.length ? e[0].key === "category-1" : !1
124
+ }), we = (e, t) => {
125
+ const n = decodeURIComponent(t ?? "").slice(1).split("/");
126
+ return e.map((s) => {
127
+ if (s.key === "category-2" && s.__typename === "FacetBoolean") {
128
+ const r = s.values;
129
+ return {
130
+ ...s,
131
+ values: r.filter(
132
+ (i) => !n.find(
133
+ (a) => a.toLowerCase() === i.value || a.toLowerCase() === i.name.toLowerCase()
134
+ )
135
+ )
136
+ };
137
+ }
138
+ return s;
139
+ });
140
+ }, q = (e, t) => t ? e === "category-1" : !1, U = (e) => e.key === "operator" && (e.value === "and" || e.value === "or"), M = (e) => e.type === "TEXT", H = (e) => e.key === "fuzzy" && (e.value === "0" || e.value === "1" || e.value === "auto"), K = (e) => {
141
+ const { key: t, name: n, values: s } = e;
142
+ return {
143
+ __typename: "FacetBoolean",
144
+ key: t,
145
+ label: n,
146
+ values: s.slice().sort((r, i) => r.name.localeCompare(i.name))
147
+ };
148
+ }, V = ({ key: e, values: t }) => ({
149
+ __typename: "FacetRange",
150
+ key: e,
151
+ values: t
152
+ }), Se = (e, t, n) => {
153
+ if (!(e instanceof Object) || !("facets" in e))
154
+ return [];
155
+ const { facets: s = [] } = e, r = t != null && t.length ? t[0].key === "category-1" : !1;
156
+ return s.filter(
157
+ (a) => !n || !q(a.key, r)
158
+ ).map(
159
+ (a) => M(a) ? K(a) : V(a)
160
+ );
161
+ }, $e = (e, t) => {
162
+ const n = e.find(({ key: r }) => r === k) ?? null, s = e.find(({ key: r }) => r === v) ?? null;
163
+ n && H(n) && t.append(k, n.value), s && U(s) && t.append(v, s.value);
164
+ }, Y = (e) => e.map((t) => {
165
+ const [n, s] = t.split("/");
166
+ return { key: n, value: s };
167
+ }), Re = (e, t) => {
168
+ const n = decodeURIComponent(t ?? "").slice(1).split("/"), s = e.filter(({ value: i }) => !n.includes(decodeURIComponent(i))).map((i) => ({
169
+ ...i,
170
+ value: decodeURIComponent(i.value)
171
+ })), { isDepartment: r } = L(s);
172
+ return s == null ? void 0 : s.filter((i) => !q(i.key, r));
173
+ }, Te = ({ pathname: e, searchParams: t }, n) => {
174
+ const s = t.get("sort") ?? "", r = t.get("query") ?? null, i = parseInt(t.get("page") ?? "1", 10);
175
+ return {
176
+ sort: s,
177
+ facets: Y(n),
178
+ term: r,
179
+ base: r ? "" : e,
180
+ page: i
181
+ };
182
+ }, Ce = (e) => {
183
+ const t = new URLSearchParams();
184
+ return Object.entries(e).forEach(([n, s]) => {
185
+ Array.isArray(s) ? s.forEach((r) => t.append(n, r)) : s !== void 0 && t.append(n, s);
186
+ }), t;
187
+ }, h = {
188
+ "responsive-mobile-flex": "_responsive-mobile-flex_t5bry_2",
189
+ "responsive-desktop-flex": "_responsive-desktop-flex_t5bry_13",
190
+ "responsive-mobile-block": "_responsive-mobile-block_t5bry_24",
191
+ "responsive-desktop-block": "_responsive-desktop-block_t5bry_35"
192
+ }, I = {}, Oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
193
+ __proto__: null,
194
+ default: I
195
+ }, Symbol.toStringTag, { value: "Module" })), J = "_header_qh6ki_40", W = "_actions_qh6ki_61", G = "_breadcrumb_qh6ki_72", X = "_credits_qh6ki_87", Q = "_pdplinks_qh6ki_115", Z = "_similars_qh6ki_142", ee = "_sizes_qh6ki_181", te = "_measurementTable_qh6ki_197", ne = "_measurementHead_qh6ki_210", se = "_measurementRows_qh6ki_215", ae = "_measurementRowsTitle_qh6ki_232", re = "_measurementRowsText_qh6ki_244", ie = "_measurementImage_qh6ki_255", oe = "_measurementImageContainer_qh6ki_258", ce = "_measurementContent_qh6ki_267", le = "_measurementTitle_qh6ki_271", me = "_measurementClose_qh6ki_282", _e = "_productref_qh6ki_347", ue = "_slideOut_qh6ki_1", de = "_slideIn_qh6ki_1", pe = "_content_qh6ki_327", fe = "_pdp_qh6ki_115", he = "_divider_qh6ki_510", Ne = {
196
+ "bottom-navigation": "_bottom-navigation_qh6ki_1",
197
+ "bottom-navigation__credits-modifier": "_bottom-navigation__credits-modifier_qh6ki_18",
198
+ "bottom-navigation__header": "_bottom-navigation__header_qh6ki_21",
199
+ "bottom-navigation__price-and-promo": "_bottom-navigation__price-and-promo_qh6ki_31",
200
+ header: J,
201
+ actions: W,
202
+ "add-to-cart": "_add-to-cart_qh6ki_68",
203
+ breadcrumb: G,
204
+ "breadcrumb--active": "_breadcrumb--active_qh6ki_77",
205
+ credits: X,
206
+ "gallery-carousel-modifier": "_gallery-carousel-modifier_qh6ki_92",
207
+ pdplinks: Q,
208
+ "links-wrapper": "_links-wrapper_qh6ki_125",
209
+ similars: Z,
210
+ "similars-info": "_similars-info_qh6ki_154",
211
+ "toggle-style-modifier": "_toggle-style-modifier_qh6ki_163",
212
+ "accessibility-info": "_accessibility-info_qh6ki_167",
213
+ sizes: ee,
214
+ "price-wrapper": "_price-wrapper_qh6ki_193",
215
+ measurementTable: te,
216
+ measurementHead: ne,
217
+ measurementRows: se,
218
+ measurementRowsTitle: ae,
219
+ measurementRowsText: re,
220
+ measurementImage: ie,
221
+ measurementImageContainer: oe,
222
+ measurementContent: ce,
223
+ measurementTitle: le,
224
+ measurementClose: me,
225
+ "tabs-root-modifier": "_tabs-root-modifier_qh6ki_288",
226
+ "tabs-list-modifier": "_tabs-list-modifier_qh6ki_306",
227
+ "tabs-item-modifier": "_tabs-item-modifier_qh6ki_323",
228
+ "content-wrapper": "_content-wrapper_qh6ki_327",
229
+ productref: _e,
230
+ "tabs-panel": "_tabs-panel_qh6ki_358",
231
+ "tabs-panel-exit": "_tabs-panel-exit_qh6ki_364",
232
+ slideOut: ue,
233
+ "tabs-panel-enter": "_tabs-panel-enter_qh6ki_368",
234
+ slideIn: de,
235
+ content: pe,
236
+ pdp: fe,
237
+ "pdp-main": "_pdp-main_qh6ki_426",
238
+ "pdp-main__gallery-wrapper": "_pdp-main__gallery-wrapper_qh6ki_431",
239
+ "pdp-main__info": "_pdp-main__info_qh6ki_448",
240
+ "pdp-main__info-main-content": "_pdp-main__info-main-content_qh6ki_468",
241
+ "pdp-main__info-subsection": "_pdp-main__info-subsection_qh6ki_468",
242
+ "subsection-product-info": "_subsection-product-info_qh6ki_479",
243
+ "subsection-similars": "_subsection-similars_qh6ki_482",
244
+ "subsection-sizes": "_subsection-sizes_qh6ki_485",
245
+ "subsection-actions": "_subsection-actions_qh6ki_488",
246
+ "pdp-main__info-secondary-content": "_pdp-main__info-secondary-content_qh6ki_492",
247
+ "sections-title": "_sections-title_qh6ki_498",
248
+ divider: he,
249
+ "breadcrumbs-desktop": "_breadcrumbs-desktop_qh6ki_515",
250
+ "breadcrumbs-mobile": "_breadcrumbs-mobile_qh6ki_524"
251
+ }, ze = ({
252
+ children: e,
253
+ data: t,
254
+ SectionZone: n,
255
+ className: s
256
+ }) => {
257
+ var d, c;
258
+ const r = ((d = t == null ? void 0 : t.filter((_) => {
259
+ var m, f;
260
+ return ((f = (m = _.config) == null ? void 0 : m.responsive) == null ? void 0 : f.deviceType) === "mobile";
261
+ })[0]) == null ? void 0 : d.sections) || [], i = ((c = t == null ? void 0 : t.filter((_) => {
262
+ var m, f;
263
+ return ((f = (m = _.config) == null ? void 0 : m.responsive) == null ? void 0 : f.deviceType) === "desktop";
264
+ })[0]) == null ? void 0 : c.sections) || [], a = r.slice(0, 1), o = r.slice(1, r.length), l = i.slice(0, 1), u = i.slice(1, i.length);
265
+ return /* @__PURE__ */ g(S, { children: [
266
+ /* @__PURE__ */ g("div", { className: s, children: [
267
+ /* @__PURE__ */ p("div", { className: h["responsive-mobile-flex"], children: /* @__PURE__ */ p(n, { data: a ?? [] }) }),
268
+ /* @__PURE__ */ p("div", { className: h["responsive-desktop-flex"], children: /* @__PURE__ */ p(n, { data: l ?? [] }) })
269
+ ] }),
270
+ e,
271
+ /* @__PURE__ */ p("div", { className: h["responsive-mobile-flex"], children: /* @__PURE__ */ p(n, { data: o ?? [] }) }),
272
+ /* @__PURE__ */ p("div", { className: h["responsive-desktop-flex"], children: /* @__PURE__ */ p(n, { data: u ?? [] }) }),
273
+ /* @__PURE__ */ p($.Divider, {})
274
+ ] });
275
+ };
276
+ async function be({ contentType: e, storeId: t, CMS_PROJECT_NAME: n, NextCookies: s }) {
277
+ const r = await w({
278
+ contentType: e,
279
+ storeId: t,
280
+ CMS_PROJECT_NAME: n,
281
+ NextCookies: s
282
+ });
283
+ if (r.status === 200) {
284
+ const i = {
285
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
286
+ contentType: e,
287
+ data: r.data
288
+ };
289
+ console.log("Resultado da chamada:", r);
290
+ const a = `backup-${e}-${Date.now()}.json`;
291
+ return await I.writeFile(
292
+ `./backups/${a}`,
293
+ JSON.stringify(i, null, 2),
294
+ "utf-8"
295
+ ), { success: !0, fileName: a };
296
+ }
297
+ return { success: !1, error: r.error || "No data to backup" };
298
+ }
299
+ async function ge(e) {
300
+ return be(e);
301
+ }
302
+ async function ke({
303
+ contentType: e,
304
+ documentId: t,
305
+ versionId: n,
306
+ storeId: s,
307
+ CMS_PROJECT_NAME: r
308
+ }) {
309
+ const i = t && t.length ? `/${t}` : "", a = n && n.length ? `?versionId=${n}` : "";
310
+ return fetch(
311
+ `https://${s}.myvtex.com/_v/cms/api/${r}/${e}${i}${a}`,
312
+ { cache: "no-cache" }
313
+ );
314
+ }
315
+ async function ve({
316
+ contentType: e,
317
+ documents: t,
318
+ NextCookies: n,
319
+ previewId: s,
320
+ CMS_PROJECT_NAME: r,
321
+ storeId: i
322
+ }) {
323
+ var o;
324
+ const a = JSON.parse(
325
+ s ?? ((o = n == null ? void 0 : n().get("cms_preview_data")) == null ? void 0 : o.value) ?? "{}"
326
+ );
327
+ if (a && (a == null ? void 0 : a.contentType) === e) {
328
+ const l = a.documentId && a.documentId.length ? `/${a.documentId}` : "", u = a != null && a.versionId && (a != null && a.versionId.length) ? `?versionId=${a == null ? void 0 : a.versionId}` : "", c = await (await fetch(
329
+ `https://${i}.myvtex.com/_v/cms/api/${r}/${e}${l}${u}`,
330
+ { cache: "no-store" }
331
+ )).json(), _ = t.filter(
332
+ (m) => c.id !== m.documentId
333
+ );
334
+ return _.unshift(c), _;
335
+ }
336
+ return t;
337
+ }
338
+ async function w({
339
+ contentType: e,
340
+ NextCookies: t,
341
+ CMS_PROJECT_NAME: n,
342
+ storeId: s,
343
+ previewId: r
344
+ }) {
345
+ var d, c;
346
+ const i = JSON.parse(
347
+ r ?? ((d = t == null ? void 0 : t().get("cms_preview_data")) == null ? void 0 : d.value) ?? "{}"
348
+ ), a = [];
349
+ let o = 1, l = 0, u = !0;
350
+ try {
351
+ do {
352
+ const m = await (await fetch(
353
+ `https://${s}.myvtex.com/_v/cms/api/${n}/${e}?page=${o}`
354
+ )).json();
355
+ o === 1 && (l = m.totalItems), (c = m == null ? void 0 : m.data) != null && c.length && a.push(...m.data), u = m.hasNextPage, o++;
356
+ } while (u && a.length < l);
357
+ if (i.previewMode && a.length) {
358
+ const _ = await ve({
359
+ contentType: e,
360
+ documents: a,
361
+ NextCookies: t,
362
+ CMS_PROJECT_NAME: n,
363
+ storeId: s
364
+ });
365
+ return {
366
+ status: _.length > 0 ? 200 : 404,
367
+ data: _ ?? []
368
+ };
369
+ }
370
+ return {
371
+ status: a.length ? 200 : 404,
372
+ data: a
373
+ };
374
+ } catch (_) {
375
+ return { status: "error", data: [], error: _ };
376
+ }
377
+ }
378
+ const Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
379
+ __proto__: null,
380
+ cmsBackup: ge,
381
+ getCMSContentType: ke,
382
+ getContentType: w
383
+ }, Symbol.toStringTag, { value: "Module" }));
384
+ export {
385
+ ze as S,
386
+ Oe as _,
387
+ z as a,
388
+ F as b,
389
+ Ce as c,
390
+ C as d,
391
+ P as e,
392
+ Ie as f,
393
+ T as g,
394
+ b as h,
395
+ R as i,
396
+ x as j,
397
+ D as k,
398
+ E as l,
399
+ O as m,
400
+ Ne as n,
401
+ j as o,
402
+ Te as p,
403
+ Re as q,
404
+ h as r,
405
+ y as s,
406
+ we as t,
407
+ A as u,
408
+ w as v,
409
+ $e as w,
410
+ Se as x,
411
+ Pe as y
412
+ };