@xosen/site-sdk 0.0.4 → 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 +369 -342
- package/package.json +1 -1
- package/src/components/layout/XSiteNav.vue +11 -3
- package/src/composables/useLivePreview.ts +25 -11
- package/src/composables/useSiteConfig.ts +2 -0
- package/src/index.ts +1 -1
- package/src/types/config.ts +1 -1
- package/src/worker/create-site-worker.ts +26 -5
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { onMounted as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
function
|
|
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-${
|
|
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
|
-
|
|
11
|
+
O(() => {
|
|
12
12
|
if (r) {
|
|
13
13
|
o(r);
|
|
14
14
|
return;
|
|
@@ -21,87 +21,92 @@ function G(r) {
|
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function W(r) {
|
|
25
25
|
return r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
const r = window.__SITE_DATA__, o = f(() => r?.config || null), e = f(() => o.value?.navigation || []),
|
|
29
|
-
function
|
|
30
|
-
const
|
|
31
|
-
return typeof
|
|
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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
|
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 } =
|
|
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
|
-
}),
|
|
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
|
-
},
|
|
64
|
-
function
|
|
65
|
-
return n(), a("div",
|
|
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
|
-
|
|
68
|
+
v,
|
|
68
69
|
null,
|
|
69
|
-
|
|
70
|
+
y(e.locales, (s) => (n(), a("button", {
|
|
70
71
|
key: s,
|
|
71
|
-
class:
|
|
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,
|
|
74
|
+
}, _(s.toUpperCase()), 11, Z))),
|
|
74
75
|
128
|
|
75
76
|
/* KEYED_FRAGMENT */
|
|
76
77
|
))
|
|
77
78
|
]);
|
|
78
79
|
}
|
|
79
|
-
const
|
|
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 {
|
|
84
|
-
function l() {
|
|
85
|
-
|
|
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
|
-
|
|
88
|
-
const
|
|
89
|
-
return Object.defineProperty(
|
|
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
|
-
}),
|
|
96
|
+
}), se = { class: "x-nav__container" }, oe = ["src", "alt"], ne = {
|
|
92
97
|
key: 1,
|
|
93
98
|
class: "x-nav__logo-text"
|
|
94
|
-
},
|
|
95
|
-
function
|
|
96
|
-
const s =
|
|
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:
|
|
105
|
+
class: S(["x-nav", { "x-nav--scrolled": t.scrolled }])
|
|
101
106
|
},
|
|
102
107
|
[
|
|
103
|
-
|
|
104
|
-
|
|
108
|
+
d("div", se, [
|
|
109
|
+
N(s, {
|
|
105
110
|
to: "/",
|
|
106
111
|
class: "x-nav__logo"
|
|
107
112
|
}, {
|
|
@@ -111,9 +116,9 @@ function ne(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,
|
|
119
|
+
}, null, 8, oe)) : (n(), a(
|
|
115
120
|
"span",
|
|
116
|
-
|
|
121
|
+
ne,
|
|
117
122
|
_(t.branding.siteName || ""),
|
|
118
123
|
1
|
|
119
124
|
/* TEXT */
|
|
@@ -122,17 +127,17 @@ function ne(r, o, e, t, c, i) {
|
|
|
122
127
|
_: 1
|
|
123
128
|
/* STABLE */
|
|
124
129
|
}),
|
|
125
|
-
|
|
130
|
+
d(
|
|
126
131
|
"div",
|
|
127
132
|
{
|
|
128
|
-
class:
|
|
133
|
+
class: S(["x-nav__links", { "x-nav__links--open": t.menuOpen }])
|
|
129
134
|
},
|
|
130
135
|
[
|
|
131
136
|
(n(!0), a(
|
|
132
|
-
|
|
137
|
+
v,
|
|
133
138
|
null,
|
|
134
|
-
|
|
135
|
-
|
|
139
|
+
y(t.navigation, (l) => (n(), a(
|
|
140
|
+
v,
|
|
136
141
|
{
|
|
137
142
|
key: l.url
|
|
138
143
|
},
|
|
@@ -143,7 +148,7 @@ function ne(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
|
|
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 ne(r, o, e, t, c, i) {
|
|
|
151
156
|
}, {
|
|
152
157
|
default: B(() => [
|
|
153
158
|
L(
|
|
154
|
-
_(l
|
|
159
|
+
_(t.navText(l)),
|
|
155
160
|
1
|
|
156
161
|
/* TEXT */
|
|
157
162
|
)
|
|
@@ -166,33 +171,33 @@ function ne(r, o, e, t, c, i) {
|
|
|
166
171
|
128
|
|
167
172
|
/* KEYED_FRAGMENT */
|
|
168
173
|
)),
|
|
169
|
-
t.locales.length > 1 ? (n(),
|
|
174
|
+
t.locales.length > 1 ? (n(), C(t.XLocaleSwitcher, {
|
|
170
175
|
key: 0,
|
|
171
176
|
locales: t.locales
|
|
172
|
-
}, null, 8, ["locales"])) :
|
|
177
|
+
}, null, 8, ["locales"])) : u("v-if", !0)
|
|
173
178
|
],
|
|
174
179
|
2
|
|
175
180
|
/* CLASS */
|
|
176
181
|
),
|
|
177
|
-
|
|
182
|
+
d("button", {
|
|
178
183
|
class: "x-nav__hamburger",
|
|
179
184
|
onClick: o[2] || (o[2] = (l) => t.menuOpen = !t.menuOpen)
|
|
180
185
|
}, [...o[3] || (o[3] = [
|
|
181
|
-
|
|
186
|
+
d(
|
|
182
187
|
"span",
|
|
183
188
|
null,
|
|
184
189
|
null,
|
|
185
190
|
-1
|
|
186
191
|
/* CACHED */
|
|
187
192
|
),
|
|
188
|
-
|
|
193
|
+
d(
|
|
189
194
|
"span",
|
|
190
195
|
null,
|
|
191
196
|
null,
|
|
192
197
|
-1
|
|
193
198
|
/* CACHED */
|
|
194
199
|
),
|
|
195
|
-
|
|
200
|
+
d(
|
|
196
201
|
"span",
|
|
197
202
|
null,
|
|
198
203
|
null,
|
|
@@ -206,29 +211,29 @@ function ne(r, o, e, t, c, i) {
|
|
|
206
211
|
/* CLASS */
|
|
207
212
|
);
|
|
208
213
|
}
|
|
209
|
-
const
|
|
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 } =
|
|
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
|
-
}),
|
|
221
|
+
}), le = { class: "x-footer" }, _e = { class: "x-footer__container" }, ue = {
|
|
217
222
|
key: 0,
|
|
218
223
|
class: "x-footer__links"
|
|
219
|
-
},
|
|
224
|
+
}, de = {
|
|
220
225
|
key: 1,
|
|
221
226
|
class: "x-footer__copyright"
|
|
222
227
|
};
|
|
223
|
-
function
|
|
224
|
-
const s =
|
|
225
|
-
return n(), a("footer",
|
|
226
|
-
|
|
227
|
-
t.footerConfig.links?.length ? (n(), a("div",
|
|
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
|
-
|
|
234
|
+
v,
|
|
230
235
|
null,
|
|
231
|
-
|
|
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"
|
|
@@ -246,35 +251,35 @@ function de(r, o, e, t, c, i) {
|
|
|
246
251
|
128
|
|
247
252
|
/* KEYED_FRAGMENT */
|
|
248
253
|
))
|
|
249
|
-
])) :
|
|
254
|
+
])) : u("v-if", !0),
|
|
250
255
|
t.copyright ? (n(), a(
|
|
251
256
|
"p",
|
|
252
|
-
|
|
257
|
+
de,
|
|
253
258
|
_(t.copyright),
|
|
254
259
|
1
|
|
255
260
|
/* TEXT */
|
|
256
|
-
)) :
|
|
261
|
+
)) : u("v-if", !0)
|
|
257
262
|
])
|
|
258
263
|
]);
|
|
259
264
|
}
|
|
260
|
-
const
|
|
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(),
|
|
264
|
-
const e = { XSiteNav:
|
|
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
|
-
}),
|
|
268
|
-
function
|
|
269
|
-
return n(), a("div",
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
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),
|
|
276
|
+
d("main", he, [
|
|
277
|
+
G(r.$slots, "default", {}, void 0, !0)
|
|
273
278
|
]),
|
|
274
|
-
|
|
279
|
+
N(t.XSiteFooter)
|
|
275
280
|
]);
|
|
276
281
|
}
|
|
277
|
-
const
|
|
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,77 +290,77 @@ const ts = /* @__PURE__ */ x(pe, [["render", he], ["__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
|
-
}),
|
|
293
|
+
}), ge = {
|
|
289
294
|
key: 0,
|
|
290
295
|
class: "x-hero__overlay"
|
|
291
|
-
},
|
|
296
|
+
}, ke = { class: "x-hero__content" }, be = {
|
|
292
297
|
key: 0,
|
|
293
298
|
class: "x-hero__title"
|
|
294
|
-
},
|
|
299
|
+
}, $e = {
|
|
295
300
|
key: 1,
|
|
296
301
|
class: "x-hero__subtitle"
|
|
297
|
-
},
|
|
302
|
+
}, Se = {
|
|
298
303
|
key: 2,
|
|
299
304
|
class: "x-hero__buttons"
|
|
300
|
-
},
|
|
305
|
+
}, we = ["href"], Te = {
|
|
301
306
|
key: 3,
|
|
302
307
|
class: "x-hero__stats"
|
|
303
|
-
},
|
|
304
|
-
function
|
|
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:
|
|
309
|
-
style:
|
|
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",
|
|
313
|
-
|
|
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
|
-
|
|
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
|
-
|
|
328
|
+
$e,
|
|
324
329
|
_(e.data.subtitle),
|
|
325
330
|
1
|
|
326
331
|
/* TEXT */
|
|
327
|
-
)) :
|
|
328
|
-
e.data.buttons?.length ? (n(), a("div",
|
|
332
|
+
)) : u("v-if", !0),
|
|
333
|
+
e.data.buttons?.length ? (n(), a("div", Se, [
|
|
329
334
|
(n(!0), a(
|
|
330
|
-
|
|
335
|
+
v,
|
|
331
336
|
null,
|
|
332
|
-
|
|
337
|
+
y(e.data.buttons, (s, l) => (n(), a("a", {
|
|
333
338
|
key: l,
|
|
334
339
|
href: s.url,
|
|
335
|
-
class:
|
|
336
|
-
}, _(s.text), 11,
|
|
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
|
-
])) :
|
|
341
|
-
e.data.stats?.length ? (n(), a("div",
|
|
345
|
+
])) : u("v-if", !0),
|
|
346
|
+
e.data.stats?.length ? (n(), a("div", Te, [
|
|
342
347
|
(n(!0), a(
|
|
343
|
-
|
|
348
|
+
v,
|
|
344
349
|
null,
|
|
345
|
-
|
|
350
|
+
y(e.data.stats, (s, l) => (n(), a("div", {
|
|
346
351
|
key: l,
|
|
347
352
|
class: "x-hero__stat"
|
|
348
353
|
}, [
|
|
349
|
-
|
|
354
|
+
d(
|
|
350
355
|
"span",
|
|
351
|
-
|
|
356
|
+
je,
|
|
352
357
|
_(s.value),
|
|
353
358
|
1
|
|
354
359
|
/* TEXT */
|
|
355
360
|
),
|
|
356
|
-
|
|
361
|
+
d(
|
|
357
362
|
"span",
|
|
358
|
-
|
|
363
|
+
Ce,
|
|
359
364
|
_(s.label),
|
|
360
365
|
1
|
|
361
366
|
/* TEXT */
|
|
@@ -364,14 +369,14 @@ function Te(r, o, e, t, c, i) {
|
|
|
364
369
|
128
|
|
365
370
|
/* KEYED_FRAGMENT */
|
|
366
371
|
))
|
|
367
|
-
])) :
|
|
372
|
+
])) : u("v-if", !0)
|
|
368
373
|
])
|
|
369
374
|
],
|
|
370
375
|
6
|
|
371
376
|
/* CLASS, STYLE */
|
|
372
377
|
);
|
|
373
378
|
}
|
|
374
|
-
const
|
|
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 Ce = /* @__PURE__ */ x(ve, [["render", Te], ["__scopeId", "data-v-d8cfe56f
|
|
|
381
386
|
const e = {};
|
|
382
387
|
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
383
388
|
}
|
|
384
|
-
}),
|
|
389
|
+
}), Ie = { class: "x-html-block" }, Ne = ["innerHTML"];
|
|
385
390
|
function Pe(r, o, e, t, c, i) {
|
|
386
|
-
return n(), a("section",
|
|
387
|
-
|
|
391
|
+
return n(), a("section", Ie, [
|
|
392
|
+
d("div", {
|
|
388
393
|
class: "x-html-block__content",
|
|
389
394
|
innerHTML: e.data.content
|
|
390
|
-
}, null, 8,
|
|
395
|
+
}, null, 8, Ne)
|
|
391
396
|
]);
|
|
392
397
|
}
|
|
393
|
-
const
|
|
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,46 +428,46 @@ const Ie = /* @__PURE__ */ x(Xe, [["render", Pe], ["__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
|
-
}),
|
|
431
|
+
}), Ae = { class: "x-cards-block__container" }, Ue = {
|
|
427
432
|
key: 0,
|
|
428
433
|
class: "x-cards-block__title"
|
|
429
|
-
},
|
|
434
|
+
}, Re = {
|
|
430
435
|
key: 1,
|
|
431
436
|
class: "x-cards-block__subtitle"
|
|
432
|
-
},
|
|
433
|
-
function
|
|
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:
|
|
442
|
+
class: S(["x-cards-block", `x-cards-block--${e.variant}`])
|
|
438
443
|
},
|
|
439
444
|
[
|
|
440
|
-
|
|
445
|
+
d("div", Ae, [
|
|
441
446
|
e.data.title ? (n(), a(
|
|
442
447
|
"h2",
|
|
443
|
-
|
|
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
|
-
|
|
455
|
+
Re,
|
|
451
456
|
_(e.data.subtitle),
|
|
452
457
|
1
|
|
453
458
|
/* TEXT */
|
|
454
|
-
)) :
|
|
455
|
-
|
|
459
|
+
)) : u("v-if", !0),
|
|
460
|
+
d(
|
|
456
461
|
"div",
|
|
457
462
|
{
|
|
458
463
|
class: "x-cards-block__grid",
|
|
459
|
-
style:
|
|
464
|
+
style: F(t.gridStyle)
|
|
460
465
|
},
|
|
461
466
|
[
|
|
462
467
|
(n(!0), a(
|
|
463
|
-
|
|
468
|
+
v,
|
|
464
469
|
null,
|
|
465
|
-
|
|
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 Fe(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,
|
|
481
|
+
}, null, 8, Fe)) : u("v-if", !0),
|
|
477
482
|
s.icon && e.variant !== "image-cards" ? (n(), a(
|
|
478
483
|
"div",
|
|
479
484
|
{
|
|
@@ -484,17 +489,17 @@ function Fe(r, o, e, t, c, i) {
|
|
|
484
489
|
_(t.iconDisplay(s.icon)),
|
|
485
490
|
1
|
|
486
491
|
/* TEXT */
|
|
487
|
-
)) :
|
|
488
|
-
|
|
492
|
+
)) : u("v-if", !0),
|
|
493
|
+
d(
|
|
489
494
|
"h3",
|
|
490
|
-
|
|
495
|
+
Me,
|
|
491
496
|
_(s.title),
|
|
492
497
|
1
|
|
493
498
|
/* TEXT */
|
|
494
499
|
),
|
|
495
|
-
|
|
500
|
+
d(
|
|
496
501
|
"p",
|
|
497
|
-
|
|
502
|
+
qe,
|
|
498
503
|
_(s.desc),
|
|
499
504
|
1
|
|
500
505
|
/* TEXT */
|
|
@@ -516,7 +521,7 @@ function Fe(r, o, e, t, c, i) {
|
|
|
516
521
|
/* CLASS */
|
|
517
522
|
);
|
|
518
523
|
}
|
|
519
|
-
const
|
|
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,45 +532,45 @@ const qe = /* @__PURE__ */ x(Le, [["render", Fe], ["__scopeId", "data-v-a1505674
|
|
|
527
532
|
const e = {};
|
|
528
533
|
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
529
534
|
}
|
|
530
|
-
}),
|
|
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
|
-
},
|
|
538
|
+
}, We = ["innerHTML"], Ke = {
|
|
534
539
|
key: 2,
|
|
535
540
|
class: "x-image-text__checklist"
|
|
536
|
-
},
|
|
541
|
+
}, Ye = { class: "x-image-text__check-icon" }, Ze = {
|
|
537
542
|
key: 0,
|
|
538
543
|
class: "x-image-text__image-wrap"
|
|
539
|
-
},
|
|
540
|
-
function
|
|
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:
|
|
549
|
+
class: S(["x-image-text", { "x-image-text--reverse": e.reverse }])
|
|
545
550
|
},
|
|
546
551
|
[
|
|
547
|
-
|
|
548
|
-
|
|
552
|
+
d("div", Ge, [
|
|
553
|
+
d("div", Je, [
|
|
549
554
|
e.data.title ? (n(), a(
|
|
550
555
|
"h2",
|
|
551
|
-
|
|
556
|
+
Ve,
|
|
552
557
|
_(e.data.title),
|
|
553
558
|
1
|
|
554
559
|
/* TEXT */
|
|
555
|
-
)) :
|
|
560
|
+
)) : u("v-if", !0),
|
|
556
561
|
e.data.content ? (n(), a("div", {
|
|
557
562
|
key: 1,
|
|
558
563
|
class: "x-image-text__content",
|
|
559
564
|
innerHTML: e.data.content
|
|
560
|
-
}, null, 8,
|
|
561
|
-
e.data.items?.length ? (n(), a("ul",
|
|
565
|
+
}, null, 8, We)) : u("v-if", !0),
|
|
566
|
+
e.data.items?.length ? (n(), a("ul", Ke, [
|
|
562
567
|
(n(!0), a(
|
|
563
|
-
|
|
568
|
+
v,
|
|
564
569
|
null,
|
|
565
|
-
|
|
566
|
-
|
|
570
|
+
y(e.data.items, (s, l) => (n(), a("li", { key: l }, [
|
|
571
|
+
d(
|
|
567
572
|
"span",
|
|
568
|
-
|
|
573
|
+
Ye,
|
|
569
574
|
_(s.icon || "✓"),
|
|
570
575
|
1
|
|
571
576
|
/* TEXT */
|
|
@@ -579,24 +584,24 @@ function Ze(r, o, e, t, c, i) {
|
|
|
579
584
|
128
|
|
580
585
|
/* KEYED_FRAGMENT */
|
|
581
586
|
))
|
|
582
|
-
])) :
|
|
587
|
+
])) : u("v-if", !0)
|
|
583
588
|
]),
|
|
584
|
-
e.data.image ? (n(), a("div",
|
|
585
|
-
|
|
589
|
+
e.data.image ? (n(), a("div", Ze, [
|
|
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,
|
|
590
|
-
])) :
|
|
594
|
+
}, null, 8, Qe)
|
|
595
|
+
])) : u("v-if", !0)
|
|
591
596
|
])
|
|
592
597
|
],
|
|
593
598
|
2
|
|
594
599
|
/* CLASS */
|
|
595
600
|
);
|
|
596
601
|
}
|
|
597
|
-
const
|
|
598
|
-
function
|
|
599
|
-
const e =
|
|
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
|
|
615
|
+
return O(() => {
|
|
611
616
|
s() || l();
|
|
612
|
-
}),
|
|
617
|
+
}), P(t, () => {
|
|
613
618
|
l();
|
|
614
619
|
}), e;
|
|
615
620
|
}
|
|
616
|
-
function
|
|
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 et() {
|
|
|
633
638
|
getProducts: c
|
|
634
639
|
};
|
|
635
640
|
}
|
|
636
|
-
const
|
|
641
|
+
const ot = /* @__PURE__ */ g({
|
|
637
642
|
__name: "XPricingBlock",
|
|
638
643
|
props: {
|
|
639
644
|
data: { type: Object, required: !1 },
|
|
@@ -642,132 +647,132 @@ const tt = /* @__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 =
|
|
646
|
-
|
|
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
|
-
}),
|
|
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
|
|
660
|
-
const m = new Set(i.value.map((
|
|
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
|
-
|
|
664
|
-
|
|
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
|
|
671
|
-
return Object.defineProperty(
|
|
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
|
-
}),
|
|
678
|
+
}), nt = { class: "x-pricing" }, at = { class: "x-pricing__container" }, rt = {
|
|
674
679
|
key: 0,
|
|
675
680
|
class: "x-pricing__title"
|
|
676
|
-
},
|
|
681
|
+
}, ct = {
|
|
677
682
|
key: 1,
|
|
678
683
|
class: "x-pricing__subtitle"
|
|
679
|
-
},
|
|
684
|
+
}, it = {
|
|
680
685
|
key: 2,
|
|
681
686
|
class: "x-pricing__tabs"
|
|
682
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
693
|
+
}, vt = {
|
|
689
694
|
key: 1,
|
|
690
695
|
class: "x-pricing-card__features"
|
|
691
|
-
},
|
|
692
|
-
function
|
|
693
|
-
return n(), a("section",
|
|
694
|
-
|
|
696
|
+
}, ht = ["href"];
|
|
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
|
-
|
|
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
|
-
|
|
709
|
+
ct,
|
|
705
710
|
_(t.subtitle),
|
|
706
711
|
1
|
|
707
712
|
/* TEXT */
|
|
708
|
-
)) :
|
|
709
|
-
|
|
710
|
-
t.groups.length > 1 ? (n(), a("div",
|
|
713
|
+
)) : u("v-if", !0),
|
|
714
|
+
u(" Tabs for tariff groups "),
|
|
715
|
+
t.groups.length > 1 ? (n(), a("div", it, [
|
|
711
716
|
(n(!0), a(
|
|
712
|
-
|
|
717
|
+
v,
|
|
713
718
|
null,
|
|
714
|
-
|
|
719
|
+
y(t.groups, (s) => (n(), a("button", {
|
|
715
720
|
key: s,
|
|
716
|
-
class:
|
|
721
|
+
class: S(["x-pricing__tab", { "x-pricing__tab--active": t.activeGroup === s }]),
|
|
717
722
|
onClick: (l) => t.activeGroup = s
|
|
718
|
-
}, _(s), 11,
|
|
723
|
+
}, _(s), 11, lt))),
|
|
719
724
|
128
|
|
720
725
|
/* KEYED_FRAGMENT */
|
|
721
726
|
))
|
|
722
|
-
])) :
|
|
723
|
-
|
|
727
|
+
])) : u("v-if", !0),
|
|
728
|
+
d("div", _t, [
|
|
724
729
|
(n(!0), a(
|
|
725
|
-
|
|
730
|
+
v,
|
|
726
731
|
null,
|
|
727
|
-
|
|
732
|
+
y(t.activePlans, (s, l) => (n(), a(
|
|
728
733
|
"div",
|
|
729
734
|
{
|
|
730
735
|
key: s.id || l,
|
|
731
|
-
class:
|
|
736
|
+
class: S(["x-pricing-card", { "x-pricing-card--featured": l === e.featuredIndex }])
|
|
732
737
|
},
|
|
733
738
|
[
|
|
734
|
-
|
|
739
|
+
d(
|
|
735
740
|
"h3",
|
|
736
|
-
|
|
741
|
+
ut,
|
|
737
742
|
_(s.name),
|
|
738
743
|
1
|
|
739
744
|
/* TEXT */
|
|
740
745
|
),
|
|
741
746
|
s.description ? (n(), a(
|
|
742
747
|
"p",
|
|
743
|
-
|
|
748
|
+
dt,
|
|
744
749
|
_(s.description),
|
|
745
750
|
1
|
|
746
751
|
/* TEXT */
|
|
747
|
-
)) :
|
|
748
|
-
|
|
749
|
-
|
|
752
|
+
)) : u("v-if", !0),
|
|
753
|
+
d("div", pt, [
|
|
754
|
+
d(
|
|
750
755
|
"span",
|
|
751
|
-
|
|
756
|
+
ft,
|
|
752
757
|
_(s.price),
|
|
753
758
|
1
|
|
754
759
|
/* TEXT */
|
|
755
760
|
),
|
|
756
761
|
s.period ? (n(), a(
|
|
757
762
|
"span",
|
|
758
|
-
|
|
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",
|
|
769
|
+
s.features?.length ? (n(), a("ul", vt, [
|
|
765
770
|
(n(!0), a(
|
|
766
|
-
|
|
771
|
+
v,
|
|
767
772
|
null,
|
|
768
|
-
|
|
773
|
+
y(s.features, (p, h) => (n(), a(
|
|
769
774
|
"li",
|
|
770
|
-
{ key:
|
|
775
|
+
{ key: h },
|
|
771
776
|
_(p),
|
|
772
777
|
1
|
|
773
778
|
/* TEXT */
|
|
@@ -775,12 +780,12 @@ function ht(r, o, e, t, c, i) {
|
|
|
775
780
|
128
|
|
776
781
|
/* KEYED_FRAGMENT */
|
|
777
782
|
))
|
|
778
|
-
])) :
|
|
783
|
+
])) : u("v-if", !0),
|
|
779
784
|
s.actionUrl ? (n(), a("a", {
|
|
780
785
|
key: 2,
|
|
781
786
|
href: s.actionUrl,
|
|
782
787
|
class: "x-btn x-btn--primary x-pricing-card__action"
|
|
783
|
-
}, _(s.actionText || "Choose"), 9,
|
|
788
|
+
}, _(s.actionText || "Choose"), 9, ht)) : u("v-if", !0)
|
|
784
789
|
],
|
|
785
790
|
2
|
|
786
791
|
/* CLASS */
|
|
@@ -792,87 +797,87 @@ function ht(r, o, e, t, c, i) {
|
|
|
792
797
|
])
|
|
793
798
|
]);
|
|
794
799
|
}
|
|
795
|
-
const
|
|
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 =
|
|
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
|
-
}),
|
|
810
|
+
}), kt = { class: "x-contacts" }, bt = { class: "x-contacts__container" }, $t = {
|
|
806
811
|
key: 0,
|
|
807
812
|
class: "x-contacts__title"
|
|
808
|
-
},
|
|
813
|
+
}, St = {
|
|
809
814
|
key: 1,
|
|
810
815
|
class: "x-contacts__grid"
|
|
811
|
-
},
|
|
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
|
-
},
|
|
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
|
|
825
|
-
return n(), a("section",
|
|
826
|
-
|
|
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
|
-
|
|
834
|
+
$t,
|
|
830
835
|
_(e.data.title),
|
|
831
836
|
1
|
|
832
837
|
/* TEXT */
|
|
833
|
-
)) :
|
|
834
|
-
t.offices ? (n(), a("div",
|
|
838
|
+
)) : u("v-if", !0),
|
|
839
|
+
t.offices ? (n(), a("div", St, [
|
|
835
840
|
(n(!0), a(
|
|
836
|
-
|
|
841
|
+
v,
|
|
837
842
|
null,
|
|
838
|
-
|
|
843
|
+
y(t.offices, (s, l) => (n(), a(
|
|
839
844
|
"div",
|
|
840
845
|
{
|
|
841
846
|
key: l,
|
|
842
|
-
class:
|
|
847
|
+
class: S(["x-contacts__card", { "x-contacts__card--main": s.isMain }])
|
|
843
848
|
},
|
|
844
849
|
[
|
|
845
|
-
|
|
850
|
+
d(
|
|
846
851
|
"h3",
|
|
847
|
-
|
|
852
|
+
wt,
|
|
848
853
|
_(s.name),
|
|
849
854
|
1
|
|
850
855
|
/* TEXT */
|
|
851
856
|
),
|
|
852
857
|
s.address ? (n(), a(
|
|
853
858
|
"p",
|
|
854
|
-
|
|
859
|
+
Tt,
|
|
855
860
|
_(s.address),
|
|
856
861
|
1
|
|
857
862
|
/* TEXT */
|
|
858
|
-
)) :
|
|
859
|
-
s.phone ? (n(), a("p",
|
|
860
|
-
|
|
863
|
+
)) : u("v-if", !0),
|
|
864
|
+
s.phone ? (n(), a("p", jt, [
|
|
865
|
+
d("a", {
|
|
861
866
|
href: `tel:${s.phone}`
|
|
862
|
-
}, _(s.phone), 9,
|
|
863
|
-
])) :
|
|
864
|
-
s.email ? (n(), a("p",
|
|
865
|
-
|
|
867
|
+
}, _(s.phone), 9, Ct)
|
|
868
|
+
])) : u("v-if", !0),
|
|
869
|
+
s.email ? (n(), a("p", Ot, [
|
|
870
|
+
d("a", {
|
|
866
871
|
href: `mailto:${s.email}`
|
|
867
|
-
}, _(s.email), 9,
|
|
868
|
-
])) :
|
|
872
|
+
}, _(s.email), 9, Xt)
|
|
873
|
+
])) : u("v-if", !0),
|
|
869
874
|
s.hours ? (n(), a(
|
|
870
875
|
"p",
|
|
871
|
-
|
|
876
|
+
Bt,
|
|
872
877
|
_(s.hours),
|
|
873
878
|
1
|
|
874
879
|
/* TEXT */
|
|
875
|
-
)) :
|
|
880
|
+
)) : u("v-if", !0)
|
|
876
881
|
],
|
|
877
882
|
2
|
|
878
883
|
/* CLASS */
|
|
@@ -880,11 +885,11 @@ function Bt(r, o, e, t, c, i) {
|
|
|
880
885
|
128
|
|
881
886
|
/* KEYED_FRAGMENT */
|
|
882
887
|
))
|
|
883
|
-
])) :
|
|
888
|
+
])) : u("v-if", !0)
|
|
884
889
|
])
|
|
885
890
|
]);
|
|
886
891
|
}
|
|
887
|
-
const
|
|
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,39 +899,39 @@ const Ot = /* @__PURE__ */ x(yt, [["render", Bt], ["__scopeId", "data-v-e873ba26
|
|
|
894
899
|
const e = {};
|
|
895
900
|
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
896
901
|
}
|
|
897
|
-
}),
|
|
902
|
+
}), Lt = { class: "x-gallery-block" }, Et = {
|
|
898
903
|
key: 0,
|
|
899
904
|
class: "x-gallery-block__title"
|
|
900
|
-
},
|
|
901
|
-
function
|
|
902
|
-
return n(), a("section",
|
|
905
|
+
}, At = { class: "x-gallery-block__grid" }, Ut = ["src", "alt"], Rt = { key: 0 };
|
|
906
|
+
function Ft(r, o, e, t, c, i) {
|
|
907
|
+
return n(), a("section", Lt, [
|
|
903
908
|
e.data.title ? (n(), a(
|
|
904
909
|
"h2",
|
|
905
|
-
|
|
910
|
+
Et,
|
|
906
911
|
_(e.data.title),
|
|
907
912
|
1
|
|
908
913
|
/* TEXT */
|
|
909
|
-
)) :
|
|
910
|
-
|
|
914
|
+
)) : u("v-if", !0),
|
|
915
|
+
d("div", At, [
|
|
911
916
|
(n(!0), a(
|
|
912
|
-
|
|
917
|
+
v,
|
|
913
918
|
null,
|
|
914
|
-
|
|
919
|
+
y(e.data.images, (s, l) => (n(), a("figure", {
|
|
915
920
|
key: l,
|
|
916
921
|
class: "x-gallery-block__item"
|
|
917
922
|
}, [
|
|
918
|
-
|
|
923
|
+
d("img", {
|
|
919
924
|
src: s.src,
|
|
920
925
|
alt: s.alt || "",
|
|
921
926
|
loading: "lazy"
|
|
922
|
-
}, null, 8,
|
|
927
|
+
}, null, 8, Ut),
|
|
923
928
|
s.caption ? (n(), a(
|
|
924
929
|
"figcaption",
|
|
925
|
-
|
|
930
|
+
Rt,
|
|
926
931
|
_(s.caption),
|
|
927
932
|
1
|
|
928
933
|
/* TEXT */
|
|
929
|
-
)) :
|
|
934
|
+
)) : u("v-if", !0)
|
|
930
935
|
]))),
|
|
931
936
|
128
|
|
932
937
|
/* KEYED_FRAGMENT */
|
|
@@ -934,7 +939,7 @@ function Ut(r, o, e, t, c, i) {
|
|
|
934
939
|
])
|
|
935
940
|
]);
|
|
936
941
|
}
|
|
937
|
-
const
|
|
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,21 +952,21 @@ const Rt = /* @__PURE__ */ x(Pt, [["render", Ut], ["__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
|
-
}),
|
|
955
|
+
}), Dt = { class: "x-map-block" }, Ht = {
|
|
951
956
|
key: 0,
|
|
952
957
|
class: "x-map-block__title"
|
|
953
|
-
},
|
|
954
|
-
function
|
|
955
|
-
return n(), a("section",
|
|
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
|
-
|
|
963
|
+
Ht,
|
|
959
964
|
_(e.data.title),
|
|
960
965
|
1
|
|
961
966
|
/* TEXT */
|
|
962
|
-
)) :
|
|
963
|
-
|
|
964
|
-
|
|
967
|
+
)) : u("v-if", !0),
|
|
968
|
+
d("div", zt, [
|
|
969
|
+
d("iframe", {
|
|
965
970
|
src: t.mapUrl,
|
|
966
971
|
width: "100%",
|
|
967
972
|
height: "400",
|
|
@@ -969,11 +974,11 @@ function zt(r, o, e, t, c, i) {
|
|
|
969
974
|
allowfullscreen: "",
|
|
970
975
|
loading: "lazy",
|
|
971
976
|
referrerpolicy: "no-referrer-when-downgrade"
|
|
972
|
-
}, null, 8,
|
|
977
|
+
}, null, 8, Gt)
|
|
973
978
|
])
|
|
974
979
|
]);
|
|
975
980
|
}
|
|
976
|
-
const
|
|
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 }
|
|
@@ -981,14 +986,14 @@ const Gt = /* @__PURE__ */ x(Mt, [["render", zt], ["__scopeId", "data-v-583f4762
|
|
|
981
986
|
setup(r, { expose: o }) {
|
|
982
987
|
o();
|
|
983
988
|
const e = r, t = {
|
|
984
|
-
hero:
|
|
985
|
-
html:
|
|
986
|
-
cards:
|
|
987
|
-
"image-text":
|
|
988
|
-
pricing:
|
|
989
|
-
contacts:
|
|
990
|
-
gallery:
|
|
991
|
-
map:
|
|
989
|
+
hero: Xe,
|
|
990
|
+
html: Le,
|
|
991
|
+
cards: He,
|
|
992
|
+
"image-text": tt,
|
|
993
|
+
pricing: yt,
|
|
994
|
+
contacts: Nt,
|
|
995
|
+
gallery: Mt,
|
|
996
|
+
map: Vt
|
|
992
997
|
};
|
|
993
998
|
function c(l) {
|
|
994
999
|
return t[l];
|
|
@@ -996,22 +1001,22 @@ const Gt = /* @__PURE__ */ x(Mt, [["render", zt], ["__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
|
-
}),
|
|
1000
|
-
function
|
|
1001
|
-
return n(), a("div",
|
|
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
|
-
|
|
1008
|
+
v,
|
|
1004
1009
|
null,
|
|
1005
|
-
|
|
1006
|
-
|
|
1010
|
+
y(t.visibleBlocks, (s, l) => (n(), a(
|
|
1011
|
+
v,
|
|
1007
1012
|
{ key: l },
|
|
1008
1013
|
[
|
|
1009
|
-
t.getBlockComponent(s.type) ? (n(),
|
|
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, {
|
|
1013
1018
|
class: s.settings?.className
|
|
1014
|
-
}), null, 16, ["data", "class"])) :
|
|
1019
|
+
}), null, 16, ["data", "class"])) : u("v-if", !0)
|
|
1015
1020
|
],
|
|
1016
1021
|
64
|
|
1017
1022
|
/* STABLE_FRAGMENT */
|
|
@@ -1021,24 +1026,34 @@ function Wt(r, o, e, t, c, i) {
|
|
|
1021
1026
|
))
|
|
1022
1027
|
]);
|
|
1023
1028
|
}
|
|
1024
|
-
const
|
|
1025
|
-
function
|
|
1026
|
-
|
|
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() {
|
|
1031
|
+
try {
|
|
1032
|
+
return window.self !== window.top;
|
|
1033
|
+
} catch {
|
|
1034
|
+
return !0;
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
function as(r) {
|
|
1038
|
+
H() && r.beforeEach((o, e) => !e.name);
|
|
1039
|
+
}
|
|
1040
|
+
function rs() {
|
|
1041
|
+
const r = j(null), o = j(H());
|
|
1027
1042
|
function e(t) {
|
|
1028
1043
|
const c = t.data;
|
|
1029
1044
|
c?.type === "xosen-preview-update" && c.page && (r.value = c.page, o.value = !0);
|
|
1030
1045
|
}
|
|
1031
|
-
return
|
|
1032
|
-
window.addEventListener("message", e)
|
|
1033
|
-
}),
|
|
1046
|
+
return O(() => {
|
|
1047
|
+
window.addEventListener("message", e);
|
|
1048
|
+
}), U(() => {
|
|
1034
1049
|
window.removeEventListener("message", e);
|
|
1035
1050
|
}), {
|
|
1036
1051
|
previewPage: r,
|
|
1037
1052
|
isPreviewMode: o
|
|
1038
1053
|
};
|
|
1039
1054
|
}
|
|
1040
|
-
const
|
|
1041
|
-
function
|
|
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) {
|
|
1042
1057
|
const t = new URL(r.url).searchParams.get("lang");
|
|
1043
1058
|
if (t && o.supportedLocales?.includes(t)) return t;
|
|
1044
1059
|
if (o.supportedLocales?.length) {
|
|
@@ -1048,12 +1063,16 @@ function Yt(r, o) {
|
|
|
1048
1063
|
}
|
|
1049
1064
|
return o.defaultLocale;
|
|
1050
1065
|
}
|
|
1051
|
-
function
|
|
1066
|
+
function es(r, o, e) {
|
|
1052
1067
|
if (!r.pathname.startsWith("/api/content/")) return null;
|
|
1053
|
-
const
|
|
1054
|
-
return
|
|
1055
|
-
|
|
1056
|
-
|
|
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, {
|
|
1057
1076
|
headers: {
|
|
1058
1077
|
"Content-Type": "application/json",
|
|
1059
1078
|
"Cache-Control": "public, max-age=60",
|
|
@@ -1062,7 +1081,7 @@ function Zt(r, o) {
|
|
|
1062
1081
|
}) : Response.json({ error: "Not found" }, { status: 404 });
|
|
1063
1082
|
})() : Promise.resolve(Response.json({ error: "Key is required" }, { status: 400 }));
|
|
1064
1083
|
}
|
|
1065
|
-
function
|
|
1084
|
+
function A(r, o, e) {
|
|
1066
1085
|
let t = r;
|
|
1067
1086
|
if (o.title) {
|
|
1068
1087
|
const c = e ? ` — ${e}` : "";
|
|
@@ -1070,39 +1089,45 @@ function N(r, o, e) {
|
|
|
1070
1089
|
}
|
|
1071
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;
|
|
1072
1091
|
}
|
|
1073
|
-
function
|
|
1092
|
+
function cs(r) {
|
|
1074
1093
|
return {
|
|
1075
1094
|
async fetch(o, e) {
|
|
1076
|
-
const t = new URL(o.url), c =
|
|
1095
|
+
const t = new URL(o.url), c = es(t, e, r.defaultLocale);
|
|
1077
1096
|
if (c) return c;
|
|
1078
|
-
if (
|
|
1097
|
+
if (Zt.test(t.pathname))
|
|
1079
1098
|
return e.ASSETS.fetch(o);
|
|
1080
|
-
const i =
|
|
1099
|
+
const i = Qt(o, r), s = new URL("/index.html", o.url);
|
|
1081
1100
|
let p = await (await e.ASSETS.fetch(new Request(s))).text();
|
|
1082
|
-
const
|
|
1101
|
+
const h = r.defaultLocale, [$, x] = await Promise.all([
|
|
1083
1102
|
e.SITE_CONTENT.get("config"),
|
|
1084
1103
|
e.SITE_CONTENT.get(`content:${i}`)
|
|
1085
|
-
]),
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
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));
|
|
1091
1116
|
}
|
|
1092
1117
|
}
|
|
1093
|
-
const
|
|
1118
|
+
const I = {
|
|
1094
1119
|
locale: i,
|
|
1095
|
-
config:
|
|
1120
|
+
config: m
|
|
1096
1121
|
};
|
|
1097
|
-
for (const [
|
|
1098
|
-
|
|
1099
|
-
if (
|
|
1100
|
-
const
|
|
1101
|
-
|
|
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));
|
|
1102
1127
|
}
|
|
1103
|
-
t.pathname === "/" &&
|
|
1104
|
-
const
|
|
1105
|
-
return p = p.replace("</head>", `${
|
|
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}
|
|
1106
1131
|
</head>`), new Response(p, {
|
|
1107
1132
|
headers: {
|
|
1108
1133
|
"Content-Type": "text/html;charset=utf-8",
|
|
@@ -1113,23 +1138,25 @@ function ns(r) {
|
|
|
1113
1138
|
};
|
|
1114
1139
|
}
|
|
1115
1140
|
export {
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1141
|
+
ns as XBlockRenderer,
|
|
1142
|
+
He as XCardsBlock,
|
|
1143
|
+
Nt as XContactsBlock,
|
|
1144
|
+
Mt as XGalleryBlock,
|
|
1145
|
+
Xe as XHeroBlock,
|
|
1146
|
+
Le as XHtmlBlock,
|
|
1147
|
+
tt as XImageTextBlock,
|
|
1148
|
+
ee as XLocaleSwitcher,
|
|
1149
|
+
Vt as XMapBlock,
|
|
1150
|
+
yt as XPricingBlock,
|
|
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
|
|
1135
1162
|
};
|