@xosen/site-sdk 0.0.5 → 0.0.6

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.
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { onMounted as C, computed as f, defineComponent as y, openBlock as n, createElementBlock as a, Fragment as h, renderList as v, normalizeClass as k, toDisplayString as _, ref as w, onUnmounted as E, resolveComponent as A, createElementVNode as d, createVNode as P, withCtx as B, createBlock as T, createTextVNode as L, createCommentVNode as u, renderSlot as z, normalizeStyle as U, resolveDynamicComponent as R, watch as I, mergeProps as G } from "vue";
2
- import { useI18n as M } from "vue-i18n";
3
- function J(r) {
1
+ import { onMounted as O, computed as f, defineComponent as g, openBlock as n, createElementBlock as a, Fragment as v, renderList as y, normalizeClass as S, toDisplayString as _, ref as j, onUnmounted as U, resolveComponent as R, createElementVNode as d, createVNode as N, withCtx as B, createBlock as C, createTextVNode as L, createCommentVNode as u, renderSlot as G, normalizeStyle as F, resolveDynamicComponent as M, watch as P, mergeProps as J } from "vue";
2
+ import { useI18n as E } from "vue-i18n";
3
+ function V(r) {
4
4
  function o(e) {
5
5
  const t = document.documentElement;
6
6
  if (e.colors)
7
7
  for (const [c, i] of Object.entries(e.colors))
8
- i && t.style.setProperty(`--x-color-${V(c)}`, i);
8
+ i && t.style.setProperty(`--x-color-${W(c)}`, i);
9
9
  e.typography?.fontFamily && t.style.setProperty("--x-font-family", e.typography.fontFamily), e.typography?.headingFont && t.style.setProperty("--x-font-heading", e.typography.headingFont), e.typography?.baseFontSize && t.style.setProperty("--x-font-size", e.typography.baseFontSize), e.shape?.borderRadius && t.style.setProperty("--x-border-radius", e.shape.borderRadius), e.shape?.maxWidth && t.style.setProperty("--x-max-width", e.shape.maxWidth);
10
10
  }
11
- C(() => {
11
+ O(() => {
12
12
  if (r) {
13
13
  o(r);
14
14
  return;
@@ -21,87 +21,92 @@ function J(r) {
21
21
  });
22
22
  });
23
23
  }
24
- function V(r) {
24
+ function W(r) {
25
25
  return r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
26
26
  }
27
- function F() {
28
- const r = window.__SITE_DATA__, o = f(() => r?.config || null), e = f(() => o.value?.navigation || []), t = f(() => o.value?.locales || []), c = f(() => o.value?.defaultLocale || "en"), i = f(() => o.value?.branding || {}), s = f(() => o.value?.footer || {}), l = f(() => o.value?.features || {});
29
- function p(g) {
30
- const b = l.value[g];
31
- return typeof b == "boolean" ? b : typeof b == "object";
27
+ function q() {
28
+ const r = window.__SITE_DATA__, o = f(() => r?.config || null), e = f(() => r?.components || {}), t = f(() => o.value?.navigation || []), c = f(() => o.value?.locales || []), i = f(() => o.value?.defaultLocale || "en"), s = f(() => o.value?.branding || {}), l = f(() => o.value?.footer || {}), p = f(() => o.value?.features || {});
29
+ function h($) {
30
+ const x = p.value[$];
31
+ return typeof x == "boolean" ? x : typeof x == "object";
32
32
  }
33
33
  return {
34
34
  config: o,
35
- navigation: e,
36
- locales: t,
37
- defaultLocale: c,
38
- branding: i,
39
- footer: s,
40
- features: l,
41
- hasFeature: p
35
+ components: e,
36
+ navigation: t,
37
+ locales: c,
38
+ defaultLocale: i,
39
+ branding: s,
40
+ footer: l,
41
+ features: p,
42
+ hasFeature: h
42
43
  };
43
44
  }
44
- const W = /* @__PURE__ */ y({
45
+ const K = /* @__PURE__ */ g({
45
46
  __name: "XLocaleSwitcher",
46
47
  props: {
47
48
  locales: { type: Array, required: !0 }
48
49
  },
49
50
  setup(r, { expose: o }) {
50
51
  o();
51
- const { locale: e } = M();
52
+ const { locale: e } = E();
52
53
  function t(i) {
53
54
  e.value = i, localStorage.setItem("site-locale", i);
54
55
  }
55
56
  const c = { locale: e, switchLocale: t };
56
57
  return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
57
58
  }
58
- }), x = (r, o) => {
59
+ }), k = (r, o) => {
59
60
  const e = r.__vccOpts || r;
60
61
  for (const [t, c] of o)
61
62
  e[t] = c;
62
63
  return e;
63
- }, K = { class: "x-locale-switcher" }, Y = ["onClick"];
64
- function Z(r, o, e, t, c, i) {
65
- return n(), a("div", K, [
64
+ }, Y = { class: "x-locale-switcher" }, Z = ["onClick"];
65
+ function Q(r, o, e, t, c, i) {
66
+ return n(), a("div", Y, [
66
67
  (n(!0), a(
67
- h,
68
+ v,
68
69
  null,
69
- v(e.locales, (s) => (n(), a("button", {
70
+ y(e.locales, (s) => (n(), a("button", {
70
71
  key: s,
71
- class: k(["x-locale-switcher__btn", { "x-locale-switcher__btn--active": t.locale === s }]),
72
+ class: S(["x-locale-switcher__btn", { "x-locale-switcher__btn--active": t.locale === s }]),
72
73
  onClick: (l) => t.switchLocale(s)
73
- }, _(s.toUpperCase()), 11, Y))),
74
+ }, _(s.toUpperCase()), 11, Z))),
74
75
  128
75
76
  /* KEYED_FRAGMENT */
76
77
  ))
77
78
  ]);
78
79
  }
79
- const Q = /* @__PURE__ */ x(W, [["render", Z], ["__scopeId", "data-v-675f0bbd"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/common/XLocaleSwitcher.vue"]]), ee = /* @__PURE__ */ y({
80
+ const ee = /* @__PURE__ */ k(K, [["render", Q], ["__scopeId", "data-v-675f0bbd"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/common/XLocaleSwitcher.vue"]]), te = /* @__PURE__ */ g({
80
81
  __name: "XSiteNav",
81
82
  setup(r, { expose: o }) {
82
83
  o();
83
- const { navigation: e, branding: t, locales: c } = F(), i = w(!1), s = w(!1);
84
- function l() {
85
- i.value = window.scrollY > 20;
84
+ const { locale: e } = E(), { navigation: t, branding: c, locales: i, defaultLocale: s } = q();
85
+ function l(m) {
86
+ return typeof m.text == "string" ? m.text : m.text[e.value] || m.text[s.value] || Object.values(m.text)[0] || "";
87
+ }
88
+ const p = j(!1), h = j(!1);
89
+ function $() {
90
+ p.value = window.scrollY > 20;
86
91
  }
87
- C(() => window.addEventListener("scroll", l)), E(() => window.removeEventListener("scroll", l));
88
- const p = { navigation: e, branding: t, locales: c, scrolled: i, menuOpen: s, onScroll: l, XLocaleSwitcher: Q };
89
- return Object.defineProperty(p, "__isScriptSetup", { enumerable: !1, value: !0 }), p;
92
+ O(() => window.addEventListener("scroll", $)), U(() => window.removeEventListener("scroll", $));
93
+ const x = { locale: e, navigation: t, branding: c, locales: i, defaultLocale: s, navText: l, scrolled: p, menuOpen: h, onScroll: $, XLocaleSwitcher: ee };
94
+ return Object.defineProperty(x, "__isScriptSetup", { enumerable: !1, value: !0 }), x;
90
95
  }
91
- }), te = { class: "x-nav__container" }, se = ["src", "alt"], oe = {
96
+ }), se = { class: "x-nav__container" }, oe = ["src", "alt"], ne = {
92
97
  key: 1,
93
98
  class: "x-nav__logo-text"
94
- }, ne = ["href"];
95
- function ae(r, o, e, t, c, i) {
96
- const s = A("router-link");
99
+ }, ae = ["href"];
100
+ function re(r, o, e, t, c, i) {
101
+ const s = R("router-link");
97
102
  return n(), a(
98
103
  "nav",
99
104
  {
100
- class: k(["x-nav", { "x-nav--scrolled": t.scrolled }])
105
+ class: S(["x-nav", { "x-nav--scrolled": t.scrolled }])
101
106
  },
102
107
  [
103
- d("div", te, [
104
- P(s, {
108
+ d("div", se, [
109
+ N(s, {
105
110
  to: "/",
106
111
  class: "x-nav__logo"
107
112
  }, {
@@ -111,9 +116,9 @@ function ae(r, o, e, t, c, i) {
111
116
  src: t.branding.logo,
112
117
  alt: t.branding.siteName || "",
113
118
  class: "x-nav__logo-img"
114
- }, null, 8, se)) : (n(), a(
119
+ }, null, 8, oe)) : (n(), a(
115
120
  "span",
116
- oe,
121
+ ne,
117
122
  _(t.branding.siteName || ""),
118
123
  1
119
124
  /* TEXT */
@@ -125,14 +130,14 @@ function ae(r, o, e, t, c, i) {
125
130
  d(
126
131
  "div",
127
132
  {
128
- class: k(["x-nav__links", { "x-nav__links--open": t.menuOpen }])
133
+ class: S(["x-nav__links", { "x-nav__links--open": t.menuOpen }])
129
134
  },
130
135
  [
131
136
  (n(!0), a(
132
- h,
137
+ v,
133
138
  null,
134
- v(t.navigation, (l) => (n(), a(
135
- h,
139
+ y(t.navigation, (l) => (n(), a(
140
+ v,
136
141
  {
137
142
  key: l.url
138
143
  },
@@ -143,7 +148,7 @@ function ae(r, o, e, t, c, i) {
143
148
  class: "x-nav__link",
144
149
  target: "_blank",
145
150
  onClick: o[0] || (o[0] = (p) => t.menuOpen = !1)
146
- }, _(l.text), 9, ne)) : (n(), T(s, {
151
+ }, _(t.navText(l)), 9, ae)) : (n(), C(s, {
147
152
  key: 1,
148
153
  to: l.url,
149
154
  class: "x-nav__link",
@@ -151,7 +156,7 @@ function ae(r, o, e, t, c, i) {
151
156
  }, {
152
157
  default: B(() => [
153
158
  L(
154
- _(l.text),
159
+ _(t.navText(l)),
155
160
  1
156
161
  /* TEXT */
157
162
  )
@@ -166,7 +171,7 @@ function ae(r, o, e, t, c, i) {
166
171
  128
167
172
  /* KEYED_FRAGMENT */
168
173
  )),
169
- t.locales.length > 1 ? (n(), T(t.XLocaleSwitcher, {
174
+ t.locales.length > 1 ? (n(), C(t.XLocaleSwitcher, {
170
175
  key: 0,
171
176
  locales: t.locales
172
177
  }, null, 8, ["locales"])) : u("v-if", !0)
@@ -206,29 +211,29 @@ function ae(r, o, e, t, c, i) {
206
211
  /* CLASS */
207
212
  );
208
213
  }
209
- const re = /* @__PURE__ */ x(ee, [["render", ae], ["__scopeId", "data-v-07c4b748"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteNav.vue"]]), ce = /* @__PURE__ */ y({
214
+ const ce = /* @__PURE__ */ k(te, [["render", re], ["__scopeId", "data-v-07c4b748"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteNav.vue"]]), ie = /* @__PURE__ */ g({
210
215
  __name: "XSiteFooter",
211
216
  setup(r, { expose: o }) {
212
217
  o();
213
- const { footer: e, branding: t } = F(), c = f(() => e.value.copyright ? e.value.copyright : `© ${(/* @__PURE__ */ new Date()).getFullYear()} ${t.value.siteName || ""}`), i = { footerConfig: e, branding: t, copyright: c };
218
+ const { footer: e, branding: t } = q(), c = f(() => e.value.copyright ? e.value.copyright : `© ${(/* @__PURE__ */ new Date()).getFullYear()} ${t.value.siteName || ""}`), i = { footerConfig: e, branding: t, copyright: c };
214
219
  return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
215
220
  }
216
- }), ie = { class: "x-footer" }, le = { class: "x-footer__container" }, _e = {
221
+ }), le = { class: "x-footer" }, _e = { class: "x-footer__container" }, ue = {
217
222
  key: 0,
218
223
  class: "x-footer__links"
219
- }, ue = {
224
+ }, de = {
220
225
  key: 1,
221
226
  class: "x-footer__copyright"
222
227
  };
223
- function de(r, o, e, t, c, i) {
224
- const s = A("router-link");
225
- return n(), a("footer", ie, [
226
- d("div", le, [
227
- t.footerConfig.links?.length ? (n(), a("div", _e, [
228
+ function pe(r, o, e, t, c, i) {
229
+ const s = R("router-link");
230
+ return n(), a("footer", le, [
231
+ d("div", _e, [
232
+ t.footerConfig.links?.length ? (n(), a("div", ue, [
228
233
  (n(!0), a(
229
- h,
234
+ v,
230
235
  null,
231
- v(t.footerConfig.links, (l) => (n(), T(s, {
236
+ y(t.footerConfig.links, (l) => (n(), C(s, {
232
237
  key: l.url,
233
238
  to: l.url,
234
239
  class: "x-footer__link"
@@ -249,7 +254,7 @@ function de(r, o, e, t, c, i) {
249
254
  ])) : u("v-if", !0),
250
255
  t.copyright ? (n(), a(
251
256
  "p",
252
- ue,
257
+ de,
253
258
  _(t.copyright),
254
259
  1
255
260
  /* TEXT */
@@ -257,24 +262,24 @@ function de(r, o, e, t, c, i) {
257
262
  ])
258
263
  ]);
259
264
  }
260
- const pe = /* @__PURE__ */ x(ce, [["render", de], ["__scopeId", "data-v-f9b38381"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteFooter.vue"]]), fe = /* @__PURE__ */ y({
265
+ const fe = /* @__PURE__ */ k(ie, [["render", pe], ["__scopeId", "data-v-f9b38381"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteFooter.vue"]]), me = /* @__PURE__ */ g({
261
266
  __name: "XSiteLayout",
262
267
  setup(r, { expose: o }) {
263
- o(), J();
264
- const e = { XSiteNav: re, XSiteFooter: pe };
268
+ o(), V();
269
+ const e = { XSiteNav: ce, XSiteFooter: fe };
265
270
  return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
266
271
  }
267
- }), me = { class: "x-site-layout" }, he = { class: "x-site-layout__main" };
268
- function ve(r, o, e, t, c, i) {
269
- return n(), a("div", me, [
270
- P(t.XSiteNav),
272
+ }), ve = { class: "x-site-layout" }, he = { class: "x-site-layout__main" };
273
+ function xe(r, o, e, t, c, i) {
274
+ return n(), a("div", ve, [
275
+ N(t.XSiteNav),
271
276
  d("main", he, [
272
- z(r.$slots, "default", {}, void 0, !0)
277
+ G(r.$slots, "default", {}, void 0, !0)
273
278
  ]),
274
- P(t.XSiteFooter)
279
+ N(t.XSiteFooter)
275
280
  ]);
276
281
  }
277
- const ss = /* @__PURE__ */ x(fe, [["render", ve], ["__scopeId", "data-v-41b0f2a9"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteLayout.vue"]]), ye = /* @__PURE__ */ y({
282
+ const os = /* @__PURE__ */ k(me, [["render", xe], ["__scopeId", "data-v-41b0f2a9"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteLayout.vue"]]), ye = /* @__PURE__ */ g({
278
283
  __name: "XHeroBlock",
279
284
  props: {
280
285
  data: { type: Object, required: !0 },
@@ -285,64 +290,64 @@ const ss = /* @__PURE__ */ x(fe, [["render", ve], ["__scopeId", "data-v-41b0f2a9
285
290
  const e = r, t = f(() => e.data.image ? { backgroundImage: `url(${e.data.image})` } : {}), c = { props: e, bgStyle: t };
286
291
  return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
287
292
  }
288
- }), xe = {
293
+ }), ge = {
289
294
  key: 0,
290
295
  class: "x-hero__overlay"
291
- }, ge = { class: "x-hero__content" }, ke = {
296
+ }, ke = { class: "x-hero__content" }, be = {
292
297
  key: 0,
293
298
  class: "x-hero__title"
294
- }, be = {
299
+ }, $e = {
295
300
  key: 1,
296
301
  class: "x-hero__subtitle"
297
- }, $e = {
302
+ }, Se = {
298
303
  key: 2,
299
304
  class: "x-hero__buttons"
300
- }, Se = ["href"], we = {
305
+ }, we = ["href"], Te = {
301
306
  key: 3,
302
307
  class: "x-hero__stats"
303
- }, je = { class: "x-hero__stat-value" }, Te = { class: "x-hero__stat-label" };
304
- function Ce(r, o, e, t, c, i) {
308
+ }, je = { class: "x-hero__stat-value" }, Ce = { class: "x-hero__stat-label" };
309
+ function Oe(r, o, e, t, c, i) {
305
310
  return n(), a(
306
311
  "section",
307
312
  {
308
- class: k(["x-hero", { "x-hero--fullscreen": e.variant === "fullscreen" }]),
309
- style: U(t.bgStyle)
313
+ class: S(["x-hero", { "x-hero--fullscreen": e.variant === "fullscreen" }]),
314
+ style: F(t.bgStyle)
310
315
  },
311
316
  [
312
- e.data.image && e.data.overlay !== !1 ? (n(), a("div", xe)) : u("v-if", !0),
313
- d("div", ge, [
317
+ e.data.image && e.data.overlay !== !1 ? (n(), a("div", ge)) : u("v-if", !0),
318
+ d("div", ke, [
314
319
  e.data.title ? (n(), a(
315
320
  "h1",
316
- ke,
321
+ be,
317
322
  _(e.data.title),
318
323
  1
319
324
  /* TEXT */
320
325
  )) : u("v-if", !0),
321
326
  e.data.subtitle ? (n(), a(
322
327
  "p",
323
- be,
328
+ $e,
324
329
  _(e.data.subtitle),
325
330
  1
326
331
  /* TEXT */
327
332
  )) : u("v-if", !0),
328
- e.data.buttons?.length ? (n(), a("div", $e, [
333
+ e.data.buttons?.length ? (n(), a("div", Se, [
329
334
  (n(!0), a(
330
- h,
335
+ v,
331
336
  null,
332
- v(e.data.buttons, (s, l) => (n(), a("a", {
337
+ y(e.data.buttons, (s, l) => (n(), a("a", {
333
338
  key: l,
334
339
  href: s.url,
335
- class: k(["x-btn", `x-btn--${s.variant || "primary"}`])
336
- }, _(s.text), 11, Se))),
340
+ class: S(["x-btn", `x-btn--${s.variant || "primary"}`])
341
+ }, _(s.text), 11, we))),
337
342
  128
338
343
  /* KEYED_FRAGMENT */
339
344
  ))
340
345
  ])) : u("v-if", !0),
341
- e.data.stats?.length ? (n(), a("div", we, [
346
+ e.data.stats?.length ? (n(), a("div", Te, [
342
347
  (n(!0), a(
343
- h,
348
+ v,
344
349
  null,
345
- v(e.data.stats, (s, l) => (n(), a("div", {
350
+ y(e.data.stats, (s, l) => (n(), a("div", {
346
351
  key: l,
347
352
  class: "x-hero__stat"
348
353
  }, [
@@ -355,7 +360,7 @@ function Ce(r, o, e, t, c, i) {
355
360
  ),
356
361
  d(
357
362
  "span",
358
- Te,
363
+ Ce,
359
364
  _(s.label),
360
365
  1
361
366
  /* TEXT */
@@ -371,7 +376,7 @@ function Ce(r, o, e, t, c, i) {
371
376
  /* CLASS, STYLE */
372
377
  );
373
378
  }
374
- const Xe = /* @__PURE__ */ x(ye, [["render", Ce], ["__scopeId", "data-v-d8cfe56f"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XHeroBlock.vue"]]), Be = /* @__PURE__ */ y({
379
+ const Xe = /* @__PURE__ */ k(ye, [["render", Oe], ["__scopeId", "data-v-d8cfe56f"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XHeroBlock.vue"]]), Be = /* @__PURE__ */ g({
375
380
  __name: "XHtmlBlock",
376
381
  props: {
377
382
  data: { type: Object, required: !0 }
@@ -381,16 +386,16 @@ const Xe = /* @__PURE__ */ x(ye, [["render", Ce], ["__scopeId", "data-v-d8cfe56f
381
386
  const e = {};
382
387
  return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
383
388
  }
384
- }), Oe = { class: "x-html-block" }, Pe = ["innerHTML"];
385
- function Ie(r, o, e, t, c, i) {
386
- return n(), a("section", Oe, [
389
+ }), Ie = { class: "x-html-block" }, Ne = ["innerHTML"];
390
+ function Pe(r, o, e, t, c, i) {
391
+ return n(), a("section", Ie, [
387
392
  d("div", {
388
393
  class: "x-html-block__content",
389
394
  innerHTML: e.data.content
390
- }, null, 8, Pe)
395
+ }, null, 8, Ne)
391
396
  ]);
392
397
  }
393
- const Le = /* @__PURE__ */ x(Be, [["render", Ie], ["__scopeId", "data-v-abfd69e8"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XHtmlBlock.vue"]]), Ne = /* @__PURE__ */ y({
398
+ const Le = /* @__PURE__ */ k(Be, [["render", Pe], ["__scopeId", "data-v-abfd69e8"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XHtmlBlock.vue"]]), Ee = /* @__PURE__ */ g({
394
399
  __name: "XCardsBlock",
395
400
  props: {
396
401
  data: { type: Object, required: !0 },
@@ -423,31 +428,31 @@ const Le = /* @__PURE__ */ x(Be, [["render", Ie], ["__scopeId", "data-v-abfd69e8
423
428
  const l = { props: e, gridStyle: t, iconStyle: c, iconMap: i, iconDisplay: s };
424
429
  return Object.defineProperty(l, "__isScriptSetup", { enumerable: !1, value: !0 }), l;
425
430
  }
426
- }), Ee = { class: "x-cards-block__container" }, Ae = {
431
+ }), Ae = { class: "x-cards-block__container" }, Ue = {
427
432
  key: 0,
428
433
  class: "x-cards-block__title"
429
- }, Ue = {
434
+ }, Re = {
430
435
  key: 1,
431
436
  class: "x-cards-block__subtitle"
432
- }, Re = ["src", "alt"], Me = { class: "x-card__title" }, Fe = { class: "x-card__desc" };
433
- function qe(r, o, e, t, c, i) {
437
+ }, Fe = ["src", "alt"], Me = { class: "x-card__title" }, qe = { class: "x-card__desc" };
438
+ function De(r, o, e, t, c, i) {
434
439
  return n(), a(
435
440
  "section",
436
441
  {
437
- class: k(["x-cards-block", `x-cards-block--${e.variant}`])
442
+ class: S(["x-cards-block", `x-cards-block--${e.variant}`])
438
443
  },
439
444
  [
440
- d("div", Ee, [
445
+ d("div", Ae, [
441
446
  e.data.title ? (n(), a(
442
447
  "h2",
443
- Ae,
448
+ Ue,
444
449
  _(e.data.title),
445
450
  1
446
451
  /* TEXT */
447
452
  )) : u("v-if", !0),
448
453
  e.data.subtitle ? (n(), a(
449
454
  "p",
450
- Ue,
455
+ Re,
451
456
  _(e.data.subtitle),
452
457
  1
453
458
  /* TEXT */
@@ -456,13 +461,13 @@ function qe(r, o, e, t, c, i) {
456
461
  "div",
457
462
  {
458
463
  class: "x-cards-block__grid",
459
- style: U(t.gridStyle)
464
+ style: F(t.gridStyle)
460
465
  },
461
466
  [
462
467
  (n(!0), a(
463
- h,
468
+ v,
464
469
  null,
465
- v(e.data.cards, (s, l) => (n(), T(R(s.link ? "a" : "div"), {
470
+ y(e.data.cards, (s, l) => (n(), C(M(s.link ? "a" : "div"), {
466
471
  key: l,
467
472
  class: "x-card",
468
473
  href: s.link
@@ -473,7 +478,7 @@ function qe(r, o, e, t, c, i) {
473
478
  src: s.image,
474
479
  alt: s.title,
475
480
  class: "x-card__image"
476
- }, null, 8, Re)) : u("v-if", !0),
481
+ }, null, 8, Fe)) : u("v-if", !0),
477
482
  s.icon && e.variant !== "image-cards" ? (n(), a(
478
483
  "div",
479
484
  {
@@ -494,7 +499,7 @@ function qe(r, o, e, t, c, i) {
494
499
  ),
495
500
  d(
496
501
  "p",
497
- Fe,
502
+ qe,
498
503
  _(s.desc),
499
504
  1
500
505
  /* TEXT */
@@ -516,7 +521,7 @@ function qe(r, o, e, t, c, i) {
516
521
  /* CLASS */
517
522
  );
518
523
  }
519
- const De = /* @__PURE__ */ x(Ne, [["render", qe], ["__scopeId", "data-v-a1505674"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XCardsBlock.vue"]]), He = /* @__PURE__ */ y({
524
+ const He = /* @__PURE__ */ k(Ee, [["render", De], ["__scopeId", "data-v-a1505674"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XCardsBlock.vue"]]), ze = /* @__PURE__ */ g({
520
525
  __name: "XImageTextBlock",
521
526
  props: {
522
527
  data: { type: Object, required: !0 },
@@ -527,28 +532,28 @@ const De = /* @__PURE__ */ x(Ne, [["render", qe], ["__scopeId", "data-v-a1505674
527
532
  const e = {};
528
533
  return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
529
534
  }
530
- }), ze = { class: "x-image-text__container" }, Ge = { class: "x-image-text__text" }, Je = {
535
+ }), Ge = { class: "x-image-text__container" }, Je = { class: "x-image-text__text" }, Ve = {
531
536
  key: 0,
532
537
  class: "x-image-text__title"
533
- }, Ve = ["innerHTML"], We = {
538
+ }, We = ["innerHTML"], Ke = {
534
539
  key: 2,
535
540
  class: "x-image-text__checklist"
536
- }, Ke = { class: "x-image-text__check-icon" }, Ye = {
541
+ }, Ye = { class: "x-image-text__check-icon" }, Ze = {
537
542
  key: 0,
538
543
  class: "x-image-text__image-wrap"
539
- }, Ze = ["src", "alt"];
540
- function Qe(r, o, e, t, c, i) {
544
+ }, Qe = ["src", "alt"];
545
+ function et(r, o, e, t, c, i) {
541
546
  return n(), a(
542
547
  "section",
543
548
  {
544
- class: k(["x-image-text", { "x-image-text--reverse": e.reverse }])
549
+ class: S(["x-image-text", { "x-image-text--reverse": e.reverse }])
545
550
  },
546
551
  [
547
- d("div", ze, [
548
- d("div", Ge, [
552
+ d("div", Ge, [
553
+ d("div", Je, [
549
554
  e.data.title ? (n(), a(
550
555
  "h2",
551
- Je,
556
+ Ve,
552
557
  _(e.data.title),
553
558
  1
554
559
  /* TEXT */
@@ -557,15 +562,15 @@ function Qe(r, o, e, t, c, i) {
557
562
  key: 1,
558
563
  class: "x-image-text__content",
559
564
  innerHTML: e.data.content
560
- }, null, 8, Ve)) : u("v-if", !0),
561
- e.data.items?.length ? (n(), a("ul", We, [
565
+ }, null, 8, We)) : u("v-if", !0),
566
+ e.data.items?.length ? (n(), a("ul", Ke, [
562
567
  (n(!0), a(
563
- h,
568
+ v,
564
569
  null,
565
- v(e.data.items, (s, l) => (n(), a("li", { key: l }, [
570
+ y(e.data.items, (s, l) => (n(), a("li", { key: l }, [
566
571
  d(
567
572
  "span",
568
- Ke,
573
+ Ye,
569
574
  _(s.icon || "✓"),
570
575
  1
571
576
  /* TEXT */
@@ -581,12 +586,12 @@ function Qe(r, o, e, t, c, i) {
581
586
  ))
582
587
  ])) : u("v-if", !0)
583
588
  ]),
584
- e.data.image ? (n(), a("div", Ye, [
589
+ e.data.image ? (n(), a("div", Ze, [
585
590
  d("img", {
586
591
  src: e.data.image,
587
592
  alt: e.data.title || "",
588
593
  class: "x-image-text__image"
589
- }, null, 8, Ze)
594
+ }, null, 8, Qe)
590
595
  ])) : u("v-if", !0)
591
596
  ])
592
597
  ],
@@ -594,9 +599,9 @@ function Qe(r, o, e, t, c, i) {
594
599
  /* CLASS */
595
600
  );
596
601
  }
597
- const et = /* @__PURE__ */ x(He, [["render", Qe], ["__scopeId", "data-v-5ca1e218"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XImageTextBlock.vue"]]);
598
- function q(r, o) {
599
- const e = w(null), { locale: t } = M(), c = window.__SITE_DATA__, i = c?.locale;
602
+ const tt = /* @__PURE__ */ k(ze, [["render", et], ["__scopeId", "data-v-5ca1e218"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XImageTextBlock.vue"]]);
603
+ function D(r, o) {
604
+ const e = j(null), { locale: t } = E(), c = window.__SITE_DATA__, i = c?.locale;
600
605
  function s() {
601
606
  return c && c[r] && t.value === i ? (e.value = c[r], !0) : !1;
602
607
  }
@@ -607,13 +612,13 @@ function q(r, o) {
607
612
  } catch {
608
613
  }
609
614
  }
610
- return C(() => {
615
+ return O(() => {
611
616
  s() || l();
612
- }), I(t, () => {
617
+ }), P(t, () => {
613
618
  l();
614
619
  }), e;
615
620
  }
616
- function tt() {
621
+ function st() {
617
622
  const o = window.__SITE_DATA__?.apiBase || "";
618
623
  async function e(i) {
619
624
  const s = await fetch(`${o}${i}`);
@@ -633,7 +638,7 @@ function tt() {
633
638
  getProducts: c
634
639
  };
635
640
  }
636
- const st = /* @__PURE__ */ y({
641
+ const ot = /* @__PURE__ */ g({
637
642
  __name: "XPricingBlock",
638
643
  props: {
639
644
  data: { type: Object, required: !1 },
@@ -642,132 +647,132 @@ const st = /* @__PURE__ */ y({
642
647
  },
643
648
  setup(r, { expose: o }) {
644
649
  o();
645
- const e = r, t = f(() => e.data?.title), c = f(() => e.data?.subtitle), i = w([]), s = w(""), l = q("tariffs", "tariffs"), p = tt();
646
- C(async () => {
650
+ const e = r, t = f(() => e.data?.title), c = f(() => e.data?.subtitle), i = j([]), s = j(""), l = D("tariffs", "tariffs"), p = st();
651
+ O(async () => {
647
652
  if (e.source === "api")
648
653
  try {
649
654
  i.value = await p.getTariffs();
650
655
  } catch {
651
656
  }
652
- }), I(
657
+ }), P(
653
658
  l,
654
659
  (m) => {
655
660
  m && e.source === "kv" && (i.value = m);
656
661
  },
657
662
  { immediate: !0 }
658
663
  );
659
- const g = f(() => {
660
- const m = new Set(i.value.map((j) => j.tariffGroupName).filter(Boolean));
664
+ const h = f(() => {
665
+ const m = new Set(i.value.map((T) => T.tariffGroupName).filter(Boolean));
661
666
  return Array.from(m);
662
667
  });
663
- I(
664
- g,
668
+ P(
669
+ h,
665
670
  (m) => {
666
671
  m.length > 0 && !s.value && (s.value = m[0]);
667
672
  },
668
673
  { immediate: !0 }
669
674
  );
670
- const b = f(() => !s.value || g.value.length <= 1 ? i.value : i.value.filter((m) => m.tariffGroupName === s.value)), X = { props: e, title: t, subtitle: c, plans: i, activeGroup: s, kvTariffs: l, api: p, groups: g, activePlans: b };
671
- return Object.defineProperty(X, "__isScriptSetup", { enumerable: !1, value: !0 }), X;
675
+ const $ = f(() => !s.value || h.value.length <= 1 ? i.value : i.value.filter((m) => m.tariffGroupName === s.value)), x = { props: e, title: t, subtitle: c, plans: i, activeGroup: s, kvTariffs: l, api: p, groups: h, activePlans: $ };
676
+ return Object.defineProperty(x, "__isScriptSetup", { enumerable: !1, value: !0 }), x;
672
677
  }
673
- }), ot = { class: "x-pricing" }, nt = { class: "x-pricing__container" }, at = {
678
+ }), nt = { class: "x-pricing" }, at = { class: "x-pricing__container" }, rt = {
674
679
  key: 0,
675
680
  class: "x-pricing__title"
676
- }, rt = {
681
+ }, ct = {
677
682
  key: 1,
678
683
  class: "x-pricing__subtitle"
679
- }, ct = {
684
+ }, it = {
680
685
  key: 2,
681
686
  class: "x-pricing__tabs"
682
- }, it = ["onClick"], lt = { class: "x-pricing__grid" }, _t = { class: "x-pricing-card__name" }, ut = {
687
+ }, lt = ["onClick"], _t = { class: "x-pricing__grid" }, ut = { class: "x-pricing-card__name" }, dt = {
683
688
  key: 0,
684
689
  class: "x-pricing-card__desc"
685
- }, dt = { class: "x-pricing-card__price" }, pt = { class: "x-pricing-card__amount" }, ft = {
690
+ }, pt = { class: "x-pricing-card__price" }, ft = { class: "x-pricing-card__amount" }, mt = {
686
691
  key: 0,
687
692
  class: "x-pricing-card__period"
688
- }, mt = {
693
+ }, vt = {
689
694
  key: 1,
690
695
  class: "x-pricing-card__features"
691
696
  }, ht = ["href"];
692
- function vt(r, o, e, t, c, i) {
693
- return n(), a("section", ot, [
694
- d("div", nt, [
697
+ function xt(r, o, e, t, c, i) {
698
+ return n(), a("section", nt, [
699
+ d("div", at, [
695
700
  t.title ? (n(), a(
696
701
  "h2",
697
- at,
702
+ rt,
698
703
  _(t.title),
699
704
  1
700
705
  /* TEXT */
701
706
  )) : u("v-if", !0),
702
707
  t.subtitle ? (n(), a(
703
708
  "p",
704
- rt,
709
+ ct,
705
710
  _(t.subtitle),
706
711
  1
707
712
  /* TEXT */
708
713
  )) : u("v-if", !0),
709
714
  u(" Tabs for tariff groups "),
710
- t.groups.length > 1 ? (n(), a("div", ct, [
715
+ t.groups.length > 1 ? (n(), a("div", it, [
711
716
  (n(!0), a(
712
- h,
717
+ v,
713
718
  null,
714
- v(t.groups, (s) => (n(), a("button", {
719
+ y(t.groups, (s) => (n(), a("button", {
715
720
  key: s,
716
- class: k(["x-pricing__tab", { "x-pricing__tab--active": t.activeGroup === s }]),
721
+ class: S(["x-pricing__tab", { "x-pricing__tab--active": t.activeGroup === s }]),
717
722
  onClick: (l) => t.activeGroup = s
718
- }, _(s), 11, it))),
723
+ }, _(s), 11, lt))),
719
724
  128
720
725
  /* KEYED_FRAGMENT */
721
726
  ))
722
727
  ])) : u("v-if", !0),
723
- d("div", lt, [
728
+ d("div", _t, [
724
729
  (n(!0), a(
725
- h,
730
+ v,
726
731
  null,
727
- v(t.activePlans, (s, l) => (n(), a(
732
+ y(t.activePlans, (s, l) => (n(), a(
728
733
  "div",
729
734
  {
730
735
  key: s.id || l,
731
- class: k(["x-pricing-card", { "x-pricing-card--featured": l === e.featuredIndex }])
736
+ class: S(["x-pricing-card", { "x-pricing-card--featured": l === e.featuredIndex }])
732
737
  },
733
738
  [
734
739
  d(
735
740
  "h3",
736
- _t,
741
+ ut,
737
742
  _(s.name),
738
743
  1
739
744
  /* TEXT */
740
745
  ),
741
746
  s.description ? (n(), a(
742
747
  "p",
743
- ut,
748
+ dt,
744
749
  _(s.description),
745
750
  1
746
751
  /* TEXT */
747
752
  )) : u("v-if", !0),
748
- d("div", dt, [
753
+ d("div", pt, [
749
754
  d(
750
755
  "span",
751
- pt,
756
+ ft,
752
757
  _(s.price),
753
758
  1
754
759
  /* TEXT */
755
760
  ),
756
761
  s.period ? (n(), a(
757
762
  "span",
758
- ft,
763
+ mt,
759
764
  "/" + _(s.period),
760
765
  1
761
766
  /* TEXT */
762
767
  )) : u("v-if", !0)
763
768
  ]),
764
- s.features?.length ? (n(), a("ul", mt, [
769
+ s.features?.length ? (n(), a("ul", vt, [
765
770
  (n(!0), a(
766
- h,
771
+ v,
767
772
  null,
768
- v(s.features, (p, g) => (n(), a(
773
+ y(s.features, (p, h) => (n(), a(
769
774
  "li",
770
- { key: g },
775
+ { key: h },
771
776
  _(p),
772
777
  1
773
778
  /* TEXT */
@@ -792,66 +797,66 @@ function vt(r, o, e, t, c, i) {
792
797
  ])
793
798
  ]);
794
799
  }
795
- const yt = /* @__PURE__ */ x(st, [["render", vt], ["__scopeId", "data-v-bd1e5d79"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XPricingBlock.vue"]]), xt = /* @__PURE__ */ y({
800
+ const yt = /* @__PURE__ */ k(ot, [["render", xt], ["__scopeId", "data-v-bd1e5d79"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XPricingBlock.vue"]]), gt = /* @__PURE__ */ g({
796
801
  __name: "XContactsBlock",
797
802
  props: {
798
803
  data: { type: Object, required: !1 }
799
804
  },
800
805
  setup(r, { expose: o }) {
801
806
  o();
802
- const e = q("contacts:offices", "contacts:offices"), t = f(() => e.value || []), c = { kvOffices: e, offices: t };
807
+ const e = D("contacts:offices", "contacts:offices"), t = f(() => e.value || []), c = { kvOffices: e, offices: t };
803
808
  return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
804
809
  }
805
- }), gt = { class: "x-contacts" }, kt = { class: "x-contacts__container" }, bt = {
810
+ }), kt = { class: "x-contacts" }, bt = { class: "x-contacts__container" }, $t = {
806
811
  key: 0,
807
812
  class: "x-contacts__title"
808
- }, $t = {
813
+ }, St = {
809
814
  key: 1,
810
815
  class: "x-contacts__grid"
811
- }, St = { class: "x-contacts__name" }, wt = {
816
+ }, wt = { class: "x-contacts__name" }, Tt = {
812
817
  key: 0,
813
818
  class: "x-contacts__info"
814
819
  }, jt = {
815
820
  key: 1,
816
821
  class: "x-contacts__info"
817
- }, Tt = ["href"], Ct = {
822
+ }, Ct = ["href"], Ot = {
818
823
  key: 2,
819
824
  class: "x-contacts__info"
820
825
  }, Xt = ["href"], Bt = {
821
826
  key: 3,
822
827
  class: "x-contacts__hours"
823
828
  };
824
- function Ot(r, o, e, t, c, i) {
825
- return n(), a("section", gt, [
826
- d("div", kt, [
829
+ function It(r, o, e, t, c, i) {
830
+ return n(), a("section", kt, [
831
+ d("div", bt, [
827
832
  e.data?.title ? (n(), a(
828
833
  "h2",
829
- bt,
834
+ $t,
830
835
  _(e.data.title),
831
836
  1
832
837
  /* TEXT */
833
838
  )) : u("v-if", !0),
834
- t.offices ? (n(), a("div", $t, [
839
+ t.offices ? (n(), a("div", St, [
835
840
  (n(!0), a(
836
- h,
841
+ v,
837
842
  null,
838
- v(t.offices, (s, l) => (n(), a(
843
+ y(t.offices, (s, l) => (n(), a(
839
844
  "div",
840
845
  {
841
846
  key: l,
842
- class: k(["x-contacts__card", { "x-contacts__card--main": s.isMain }])
847
+ class: S(["x-contacts__card", { "x-contacts__card--main": s.isMain }])
843
848
  },
844
849
  [
845
850
  d(
846
851
  "h3",
847
- St,
852
+ wt,
848
853
  _(s.name),
849
854
  1
850
855
  /* TEXT */
851
856
  ),
852
857
  s.address ? (n(), a(
853
858
  "p",
854
- wt,
859
+ Tt,
855
860
  _(s.address),
856
861
  1
857
862
  /* TEXT */
@@ -859,9 +864,9 @@ function Ot(r, o, e, t, c, i) {
859
864
  s.phone ? (n(), a("p", jt, [
860
865
  d("a", {
861
866
  href: `tel:${s.phone}`
862
- }, _(s.phone), 9, Tt)
867
+ }, _(s.phone), 9, Ct)
863
868
  ])) : u("v-if", !0),
864
- s.email ? (n(), a("p", Ct, [
869
+ s.email ? (n(), a("p", Ot, [
865
870
  d("a", {
866
871
  href: `mailto:${s.email}`
867
872
  }, _(s.email), 9, Xt)
@@ -884,7 +889,7 @@ function Ot(r, o, e, t, c, i) {
884
889
  ])
885
890
  ]);
886
891
  }
887
- const Pt = /* @__PURE__ */ x(xt, [["render", Ot], ["__scopeId", "data-v-e873ba26"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XContactsBlock.vue"]]), It = /* @__PURE__ */ y({
892
+ const Nt = /* @__PURE__ */ k(gt, [["render", It], ["__scopeId", "data-v-e873ba26"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XContactsBlock.vue"]]), Pt = /* @__PURE__ */ g({
888
893
  __name: "XGalleryBlock",
889
894
  props: {
890
895
  data: { type: Object, required: !0 }
@@ -894,24 +899,24 @@ const Pt = /* @__PURE__ */ x(xt, [["render", Ot], ["__scopeId", "data-v-e873ba26
894
899
  const e = {};
895
900
  return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
896
901
  }
897
- }), Lt = { class: "x-gallery-block" }, Nt = {
902
+ }), Lt = { class: "x-gallery-block" }, Et = {
898
903
  key: 0,
899
904
  class: "x-gallery-block__title"
900
- }, Et = { class: "x-gallery-block__grid" }, At = ["src", "alt"], Ut = { key: 0 };
901
- function Rt(r, o, e, t, c, i) {
905
+ }, At = { class: "x-gallery-block__grid" }, Ut = ["src", "alt"], Rt = { key: 0 };
906
+ function Ft(r, o, e, t, c, i) {
902
907
  return n(), a("section", Lt, [
903
908
  e.data.title ? (n(), a(
904
909
  "h2",
905
- Nt,
910
+ Et,
906
911
  _(e.data.title),
907
912
  1
908
913
  /* TEXT */
909
914
  )) : u("v-if", !0),
910
- d("div", Et, [
915
+ d("div", At, [
911
916
  (n(!0), a(
912
- h,
917
+ v,
913
918
  null,
914
- v(e.data.images, (s, l) => (n(), a("figure", {
919
+ y(e.data.images, (s, l) => (n(), a("figure", {
915
920
  key: l,
916
921
  class: "x-gallery-block__item"
917
922
  }, [
@@ -919,10 +924,10 @@ function Rt(r, o, e, t, c, i) {
919
924
  src: s.src,
920
925
  alt: s.alt || "",
921
926
  loading: "lazy"
922
- }, null, 8, At),
927
+ }, null, 8, Ut),
923
928
  s.caption ? (n(), a(
924
929
  "figcaption",
925
- Ut,
930
+ Rt,
926
931
  _(s.caption),
927
932
  1
928
933
  /* TEXT */
@@ -934,7 +939,7 @@ function Rt(r, o, e, t, c, i) {
934
939
  ])
935
940
  ]);
936
941
  }
937
- const Mt = /* @__PURE__ */ x(It, [["render", Rt], ["__scopeId", "data-v-b99bb987"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XGalleryBlock.vue"]]), Ft = /* @__PURE__ */ y({
942
+ const Mt = /* @__PURE__ */ k(Pt, [["render", Ft], ["__scopeId", "data-v-b99bb987"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XGalleryBlock.vue"]]), qt = /* @__PURE__ */ g({
938
943
  __name: "XMapBlock",
939
944
  props: {
940
945
  data: { type: Object, required: !0 }
@@ -947,20 +952,20 @@ const Mt = /* @__PURE__ */ x(It, [["render", Rt], ["__scopeId", "data-v-b99bb987
947
952
  }), c = { props: e, mapUrl: t };
948
953
  return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
949
954
  }
950
- }), qt = { class: "x-map-block" }, Dt = {
955
+ }), Dt = { class: "x-map-block" }, Ht = {
951
956
  key: 0,
952
957
  class: "x-map-block__title"
953
- }, Ht = { class: "x-map-block__container" }, zt = ["src"];
954
- function Gt(r, o, e, t, c, i) {
955
- return n(), a("section", qt, [
958
+ }, zt = { class: "x-map-block__container" }, Gt = ["src"];
959
+ function Jt(r, o, e, t, c, i) {
960
+ return n(), a("section", Dt, [
956
961
  e.data.title ? (n(), a(
957
962
  "h2",
958
- Dt,
963
+ Ht,
959
964
  _(e.data.title),
960
965
  1
961
966
  /* TEXT */
962
967
  )) : u("v-if", !0),
963
- d("div", Ht, [
968
+ d("div", zt, [
964
969
  d("iframe", {
965
970
  src: t.mapUrl,
966
971
  width: "100%",
@@ -969,11 +974,11 @@ function Gt(r, o, e, t, c, i) {
969
974
  allowfullscreen: "",
970
975
  loading: "lazy",
971
976
  referrerpolicy: "no-referrer-when-downgrade"
972
- }, null, 8, zt)
977
+ }, null, 8, Gt)
973
978
  ])
974
979
  ]);
975
980
  }
976
- const Jt = /* @__PURE__ */ x(Ft, [["render", Gt], ["__scopeId", "data-v-583f4762"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XMapBlock.vue"]]), Vt = /* @__PURE__ */ y({
981
+ const Vt = /* @__PURE__ */ k(qt, [["render", Jt], ["__scopeId", "data-v-583f4762"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XMapBlock.vue"]]), Wt = /* @__PURE__ */ g({
977
982
  __name: "XBlockRenderer",
978
983
  props: {
979
984
  blocks: { type: Array, required: !0 }
@@ -983,12 +988,12 @@ const Jt = /* @__PURE__ */ x(Ft, [["render", Gt], ["__scopeId", "data-v-583f4762
983
988
  const e = r, t = {
984
989
  hero: Xe,
985
990
  html: Le,
986
- cards: De,
987
- "image-text": et,
991
+ cards: He,
992
+ "image-text": tt,
988
993
  pricing: yt,
989
- contacts: Pt,
994
+ contacts: Nt,
990
995
  gallery: Mt,
991
- map: Jt
996
+ map: Vt
992
997
  };
993
998
  function c(l) {
994
999
  return t[l];
@@ -996,17 +1001,17 @@ const Jt = /* @__PURE__ */ x(Ft, [["render", Gt], ["__scopeId", "data-v-583f4762
996
1001
  const i = f(() => e.blocks.filter((l) => l.settings?.visible !== !1)), s = { props: e, blockRegistry: t, getBlockComponent: c, visibleBlocks: i };
997
1002
  return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
998
1003
  }
999
- }), Wt = { class: "x-block-renderer" };
1000
- function Kt(r, o, e, t, c, i) {
1001
- return n(), a("div", Wt, [
1004
+ }), Kt = { class: "x-block-renderer" };
1005
+ function Yt(r, o, e, t, c, i) {
1006
+ return n(), a("div", Kt, [
1002
1007
  (n(!0), a(
1003
- h,
1008
+ v,
1004
1009
  null,
1005
- v(t.visibleBlocks, (s, l) => (n(), a(
1006
- h,
1010
+ y(t.visibleBlocks, (s, l) => (n(), a(
1011
+ v,
1007
1012
  { key: l },
1008
1013
  [
1009
- t.getBlockComponent(s.type) ? (n(), T(R(t.getBlockComponent(s.type)), G({
1014
+ t.getBlockComponent(s.type) ? (n(), C(M(t.getBlockComponent(s.type)), J({
1010
1015
  key: 0,
1011
1016
  data: s.data || s.props
1012
1017
  }, { ref_for: !0 }, s.settings, {
@@ -1021,34 +1026,34 @@ function Kt(r, o, e, t, c, i) {
1021
1026
  ))
1022
1027
  ]);
1023
1028
  }
1024
- const os = /* @__PURE__ */ x(Vt, [["render", Kt], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XBlockRenderer.vue"]]);
1025
- function D() {
1029
+ const ns = /* @__PURE__ */ k(Wt, [["render", Yt], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XBlockRenderer.vue"]]);
1030
+ function H() {
1026
1031
  try {
1027
1032
  return window.self !== window.top;
1028
1033
  } catch {
1029
1034
  return !0;
1030
1035
  }
1031
1036
  }
1032
- function ns(r) {
1033
- D() && r.beforeEach((o, e) => !e.name);
1037
+ function as(r) {
1038
+ H() && r.beforeEach((o, e) => !e.name);
1034
1039
  }
1035
- function as() {
1036
- const r = w(null), o = w(D());
1040
+ function rs() {
1041
+ const r = j(null), o = j(H());
1037
1042
  function e(t) {
1038
1043
  const c = t.data;
1039
1044
  c?.type === "xosen-preview-update" && c.page && (r.value = c.page, o.value = !0);
1040
1045
  }
1041
- return C(() => {
1042
- window.addEventListener("message", e), o.value && window.parent.postMessage({ type: "xosen-preview-ready" }, "*");
1043
- }), E(() => {
1046
+ return O(() => {
1047
+ window.addEventListener("message", e);
1048
+ }), U(() => {
1044
1049
  window.removeEventListener("message", e);
1045
1050
  }), {
1046
1051
  previewPage: r,
1047
1052
  isPreviewMode: o
1048
1053
  };
1049
1054
  }
1050
- const Yt = /\.(js|css|png|jpg|jpeg|gif|svg|ico|woff2?|ttf|eot|webp|avif|map|json|txt|xml|webmanifest)$/;
1051
- function Zt(r, o) {
1055
+ const Zt = /\.(js|css|png|jpg|jpeg|gif|svg|ico|woff2?|ttf|eot|webp|avif|map|json|txt|xml|webmanifest)$/;
1056
+ function Qt(r, o) {
1052
1057
  const t = new URL(r.url).searchParams.get("lang");
1053
1058
  if (t && o.supportedLocales?.includes(t)) return t;
1054
1059
  if (o.supportedLocales?.length) {
@@ -1058,12 +1063,16 @@ function Zt(r, o) {
1058
1063
  }
1059
1064
  return o.defaultLocale;
1060
1065
  }
1061
- function Qt(r, o) {
1066
+ function es(r, o, e) {
1062
1067
  if (!r.pathname.startsWith("/api/content/")) return null;
1063
- const e = decodeURIComponent(r.pathname.replace("/api/content/", ""));
1064
- return e ? (async () => {
1065
- const t = await o.SITE_CONTENT.get(e);
1066
- return t ? new Response(t, {
1068
+ const t = decodeURIComponent(r.pathname.replace("/api/content/", ""));
1069
+ return t ? (async () => {
1070
+ let c = await o.SITE_CONTENT.get(t);
1071
+ if (!c) {
1072
+ const i = t.lastIndexOf(":");
1073
+ i > 0 && t.slice(i + 1) !== e && (c = await o.SITE_CONTENT.get(t.slice(0, i + 1) + e));
1074
+ }
1075
+ return c ? new Response(c, {
1067
1076
  headers: {
1068
1077
  "Content-Type": "application/json",
1069
1078
  "Cache-Control": "public, max-age=60",
@@ -1072,7 +1081,7 @@ function Qt(r, o) {
1072
1081
  }) : Response.json({ error: "Not found" }, { status: 404 });
1073
1082
  })() : Promise.resolve(Response.json({ error: "Key is required" }, { status: 400 }));
1074
1083
  }
1075
- function N(r, o, e) {
1084
+ function A(r, o, e) {
1076
1085
  let t = r;
1077
1086
  if (o.title) {
1078
1087
  const c = e ? ` — ${e}` : "";
@@ -1080,39 +1089,45 @@ function N(r, o, e) {
1080
1089
  }
1081
1090
  return o.meta?.description && (t = t.replace(/(<meta\s+name="description"\s+content=")[^"]*(")/, `$1${o.meta.description}$2`)), o.meta?.ogTitle && (t = t.replace(/(<meta\s+property="og:title"\s+content=")[^"]*(")/, `$1${o.meta.ogTitle}$2`)), o.html && (t = t.replace('<div id="app"></div>', `<div id="app">${o.html}</div>`)), t;
1082
1091
  }
1083
- function rs(r) {
1092
+ function cs(r) {
1084
1093
  return {
1085
1094
  async fetch(o, e) {
1086
- const t = new URL(o.url), c = Qt(t, e);
1095
+ const t = new URL(o.url), c = es(t, e, r.defaultLocale);
1087
1096
  if (c) return c;
1088
- if (Yt.test(t.pathname))
1097
+ if (Zt.test(t.pathname))
1089
1098
  return e.ASSETS.fetch(o);
1090
- const i = Zt(o, r), s = new URL("/index.html", o.url);
1099
+ const i = Qt(o, r), s = new URL("/index.html", o.url);
1091
1100
  let p = await (await e.ASSETS.fetch(new Request(s))).text();
1092
- const [g, b] = await Promise.all([
1101
+ const h = r.defaultLocale, [$, x] = await Promise.all([
1093
1102
  e.SITE_CONTENT.get("config"),
1094
1103
  e.SITE_CONTENT.get(`content:${i}`)
1095
- ]), X = g ? JSON.parse(g) : {}, m = b ? JSON.parse(b) : {}, j = t.pathname.match(/^\/p\/(.+)$/);
1096
- if (j) {
1097
- const $ = j[1];
1098
- if (!m[$]) {
1099
- const S = await e.SITE_CONTENT.get(`page:${$}:${i}`);
1100
- S && (m[$] = JSON.parse(S));
1104
+ ]), m = $ ? JSON.parse($) : {};
1105
+ let T = x ? JSON.parse(x) : {};
1106
+ if (!x && i !== h) {
1107
+ const b = await e.SITE_CONTENT.get(`content:${h}`);
1108
+ b && (T = JSON.parse(b));
1109
+ }
1110
+ const X = t.pathname.match(/^\/p\/(.+)$/);
1111
+ if (X) {
1112
+ const b = X[1];
1113
+ if (!T[b]) {
1114
+ let w = await e.SITE_CONTENT.get(`page:${b}:${i}`);
1115
+ !w && i !== h && (w = await e.SITE_CONTENT.get(`page:${b}:${h}`)), w && (T[b] = JSON.parse(w));
1101
1116
  }
1102
1117
  }
1103
- const O = {
1118
+ const I = {
1104
1119
  locale: i,
1105
- config: X
1120
+ config: m
1106
1121
  };
1107
- for (const [$, S] of Object.entries(m))
1108
- O[`page:${$}`] = S;
1109
- if (j) {
1110
- const $ = j[1], S = O[`page:${$}`];
1111
- S && (p = N(p, S, r.siteName));
1122
+ for (const [b, w] of Object.entries(T))
1123
+ I[`page:${b}`] = w;
1124
+ if (X) {
1125
+ const b = X[1], w = I[`page:${b}`];
1126
+ w && (p = A(p, w, r.siteName));
1112
1127
  }
1113
- t.pathname === "/" && m.home && (p = N(p, m.home, r.siteName));
1114
- const H = `<script>window.__SITE_DATA__ = ${JSON.stringify(O)};<\/script>`;
1115
- return p = p.replace("</head>", `${H}
1128
+ t.pathname === "/" && T.home && (p = A(p, T.home, r.siteName));
1129
+ const z = `<script>window.__SITE_DATA__ = ${JSON.stringify(I)};<\/script>`;
1130
+ return p = p.replace("</head>", `${z}
1116
1131
  </head>`), new Response(p, {
1117
1132
  headers: {
1118
1133
  "Content-Type": "text/html;charset=utf-8",
@@ -1123,25 +1138,25 @@ function rs(r) {
1123
1138
  };
1124
1139
  }
1125
1140
  export {
1126
- os as XBlockRenderer,
1127
- De as XCardsBlock,
1128
- Pt as XContactsBlock,
1141
+ ns as XBlockRenderer,
1142
+ He as XCardsBlock,
1143
+ Nt as XContactsBlock,
1129
1144
  Mt as XGalleryBlock,
1130
1145
  Xe as XHeroBlock,
1131
1146
  Le as XHtmlBlock,
1132
- et as XImageTextBlock,
1133
- Q as XLocaleSwitcher,
1134
- Jt as XMapBlock,
1147
+ tt as XImageTextBlock,
1148
+ ee as XLocaleSwitcher,
1149
+ Vt as XMapBlock,
1135
1150
  yt as XPricingBlock,
1136
- pe as XSiteFooter,
1137
- ss as XSiteLayout,
1138
- re as XSiteNav,
1139
- rs as createSiteWorker,
1140
- D as isInPreview,
1141
- ns as setupPreviewRouter,
1142
- as as useLivePreview,
1143
- tt as useSiteApi,
1144
- F as useSiteConfig,
1145
- q as useSiteData,
1146
- J as useSkin
1151
+ fe as XSiteFooter,
1152
+ os as XSiteLayout,
1153
+ ce as XSiteNav,
1154
+ cs as createSiteWorker,
1155
+ H as isInPreview,
1156
+ as as setupPreviewRouter,
1157
+ rs as useLivePreview,
1158
+ st as useSiteApi,
1159
+ q as useSiteConfig,
1160
+ D as useSiteData,
1161
+ V as useSkin
1147
1162
  };