@xosen/site-sdk 0.0.5 → 0.0.7
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 +145 -1090
- package/package.json +1 -1
- package/src/composables/useLivePreview.ts +1 -4
- package/src/composables/useSiteConfig.ts +2 -0
- package/src/index.ts +0 -19
- package/src/types/config.ts +1 -1
- package/src/worker/create-site-worker.ts +26 -5
- package/dist/index.css +0 -1
- package/src/components/blocks/XBlockRenderer.vue +0 -48
- package/src/components/blocks/XCardsBlock.vue +0 -167
- package/src/components/blocks/XContactsBlock.vue +0 -110
- package/src/components/blocks/XGalleryBlock.vue +0 -56
- package/src/components/blocks/XHeroBlock.vue +0 -152
- package/src/components/blocks/XHtmlBlock.vue +0 -64
- package/src/components/blocks/XImageTextBlock.vue +0 -101
- package/src/components/blocks/XMapBlock.vue +0 -52
- package/src/components/blocks/XPricingBlock.vue +0 -261
- package/src/components/common/XLocaleSwitcher.vue +0 -56
- package/src/components/layout/XSiteFooter.vue +0 -64
- package/src/components/layout/XSiteLayout.vue +0 -35
- package/src/components/layout/XSiteNav.vue +0 -176
package/dist/index.js
CHANGED
|
@@ -1,1069 +1,131 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useI18n as
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
o(r);
|
|
14
|
-
return;
|
|
1
|
+
import { ref as y, onMounted as T, watch as E, computed as u, onUnmounted as b } from "vue";
|
|
2
|
+
import { useI18n as x } from "vue-i18n";
|
|
3
|
+
function P(o, n) {
|
|
4
|
+
const t = y(null), { locale: e } = x(), a = window.__SITE_DATA__, s = a?.locale;
|
|
5
|
+
function c() {
|
|
6
|
+
return a && a[o] && e.value === s ? (t.value = a[o], !0) : !1;
|
|
7
|
+
}
|
|
8
|
+
async function h() {
|
|
9
|
+
try {
|
|
10
|
+
const r = await fetch(`/api/content/${n}:${e.value}`);
|
|
11
|
+
r.ok && (t.value = await r.json());
|
|
12
|
+
} catch {
|
|
15
13
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
function V(r) {
|
|
25
|
-
return r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
14
|
+
}
|
|
15
|
+
return T(() => {
|
|
16
|
+
c() || h();
|
|
17
|
+
}), E(e, () => {
|
|
18
|
+
h();
|
|
19
|
+
}), t;
|
|
26
20
|
}
|
|
27
|
-
function
|
|
28
|
-
const
|
|
21
|
+
function O() {
|
|
22
|
+
const o = window.__SITE_DATA__, n = u(() => o?.config || null), t = u(() => o?.components || {}), e = u(() => n.value?.navigation || []), a = u(() => n.value?.locales || []), s = u(() => n.value?.defaultLocale || "en"), c = u(() => n.value?.branding || {}), h = u(() => n.value?.footer || {}), r = u(() => n.value?.features || {});
|
|
29
23
|
function p(g) {
|
|
30
|
-
const
|
|
31
|
-
return typeof
|
|
24
|
+
const f = r.value[g];
|
|
25
|
+
return typeof f == "boolean" ? f : typeof f == "object";
|
|
32
26
|
}
|
|
33
27
|
return {
|
|
34
|
-
config:
|
|
28
|
+
config: n,
|
|
29
|
+
components: t,
|
|
35
30
|
navigation: e,
|
|
36
|
-
locales:
|
|
37
|
-
defaultLocale:
|
|
38
|
-
branding:
|
|
39
|
-
footer:
|
|
40
|
-
features:
|
|
31
|
+
locales: a,
|
|
32
|
+
defaultLocale: s,
|
|
33
|
+
branding: c,
|
|
34
|
+
footer: h,
|
|
35
|
+
features: r,
|
|
41
36
|
hasFeature: p
|
|
42
37
|
};
|
|
43
38
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
|
|
57
|
-
}
|
|
58
|
-
}), x = (r, o) => {
|
|
59
|
-
const e = r.__vccOpts || r;
|
|
60
|
-
for (const [t, c] of o)
|
|
61
|
-
e[t] = c;
|
|
62
|
-
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, [
|
|
66
|
-
(n(!0), a(
|
|
67
|
-
h,
|
|
68
|
-
null,
|
|
69
|
-
v(e.locales, (s) => (n(), a("button", {
|
|
70
|
-
key: s,
|
|
71
|
-
class: k(["x-locale-switcher__btn", { "x-locale-switcher__btn--active": t.locale === s }]),
|
|
72
|
-
onClick: (l) => t.switchLocale(s)
|
|
73
|
-
}, _(s.toUpperCase()), 11, Y))),
|
|
74
|
-
128
|
|
75
|
-
/* KEYED_FRAGMENT */
|
|
76
|
-
))
|
|
77
|
-
]);
|
|
78
|
-
}
|
|
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
|
-
__name: "XSiteNav",
|
|
81
|
-
setup(r, { expose: o }) {
|
|
82
|
-
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;
|
|
86
|
-
}
|
|
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;
|
|
90
|
-
}
|
|
91
|
-
}), te = { class: "x-nav__container" }, se = ["src", "alt"], oe = {
|
|
92
|
-
key: 1,
|
|
93
|
-
class: "x-nav__logo-text"
|
|
94
|
-
}, ne = ["href"];
|
|
95
|
-
function ae(r, o, e, t, c, i) {
|
|
96
|
-
const s = A("router-link");
|
|
97
|
-
return n(), a(
|
|
98
|
-
"nav",
|
|
99
|
-
{
|
|
100
|
-
class: k(["x-nav", { "x-nav--scrolled": t.scrolled }])
|
|
101
|
-
},
|
|
102
|
-
[
|
|
103
|
-
d("div", te, [
|
|
104
|
-
P(s, {
|
|
105
|
-
to: "/",
|
|
106
|
-
class: "x-nav__logo"
|
|
107
|
-
}, {
|
|
108
|
-
default: B(() => [
|
|
109
|
-
t.branding.logo ? (n(), a("img", {
|
|
110
|
-
key: 0,
|
|
111
|
-
src: t.branding.logo,
|
|
112
|
-
alt: t.branding.siteName || "",
|
|
113
|
-
class: "x-nav__logo-img"
|
|
114
|
-
}, null, 8, se)) : (n(), a(
|
|
115
|
-
"span",
|
|
116
|
-
oe,
|
|
117
|
-
_(t.branding.siteName || ""),
|
|
118
|
-
1
|
|
119
|
-
/* TEXT */
|
|
120
|
-
))
|
|
121
|
-
]),
|
|
122
|
-
_: 1
|
|
123
|
-
/* STABLE */
|
|
124
|
-
}),
|
|
125
|
-
d(
|
|
126
|
-
"div",
|
|
127
|
-
{
|
|
128
|
-
class: k(["x-nav__links", { "x-nav__links--open": t.menuOpen }])
|
|
129
|
-
},
|
|
130
|
-
[
|
|
131
|
-
(n(!0), a(
|
|
132
|
-
h,
|
|
133
|
-
null,
|
|
134
|
-
v(t.navigation, (l) => (n(), a(
|
|
135
|
-
h,
|
|
136
|
-
{
|
|
137
|
-
key: l.url
|
|
138
|
-
},
|
|
139
|
-
[
|
|
140
|
-
l.external ? (n(), a("a", {
|
|
141
|
-
key: 0,
|
|
142
|
-
href: l.url,
|
|
143
|
-
class: "x-nav__link",
|
|
144
|
-
target: "_blank",
|
|
145
|
-
onClick: o[0] || (o[0] = (p) => t.menuOpen = !1)
|
|
146
|
-
}, _(l.text), 9, ne)) : (n(), T(s, {
|
|
147
|
-
key: 1,
|
|
148
|
-
to: l.url,
|
|
149
|
-
class: "x-nav__link",
|
|
150
|
-
onClick: o[1] || (o[1] = (p) => t.menuOpen = !1)
|
|
151
|
-
}, {
|
|
152
|
-
default: B(() => [
|
|
153
|
-
L(
|
|
154
|
-
_(l.text),
|
|
155
|
-
1
|
|
156
|
-
/* TEXT */
|
|
157
|
-
)
|
|
158
|
-
]),
|
|
159
|
-
_: 2
|
|
160
|
-
/* DYNAMIC */
|
|
161
|
-
}, 1032, ["to"]))
|
|
162
|
-
],
|
|
163
|
-
64
|
|
164
|
-
/* STABLE_FRAGMENT */
|
|
165
|
-
))),
|
|
166
|
-
128
|
|
167
|
-
/* KEYED_FRAGMENT */
|
|
168
|
-
)),
|
|
169
|
-
t.locales.length > 1 ? (n(), T(t.XLocaleSwitcher, {
|
|
170
|
-
key: 0,
|
|
171
|
-
locales: t.locales
|
|
172
|
-
}, null, 8, ["locales"])) : u("v-if", !0)
|
|
173
|
-
],
|
|
174
|
-
2
|
|
175
|
-
/* CLASS */
|
|
176
|
-
),
|
|
177
|
-
d("button", {
|
|
178
|
-
class: "x-nav__hamburger",
|
|
179
|
-
onClick: o[2] || (o[2] = (l) => t.menuOpen = !t.menuOpen)
|
|
180
|
-
}, [...o[3] || (o[3] = [
|
|
181
|
-
d(
|
|
182
|
-
"span",
|
|
183
|
-
null,
|
|
184
|
-
null,
|
|
185
|
-
-1
|
|
186
|
-
/* CACHED */
|
|
187
|
-
),
|
|
188
|
-
d(
|
|
189
|
-
"span",
|
|
190
|
-
null,
|
|
191
|
-
null,
|
|
192
|
-
-1
|
|
193
|
-
/* CACHED */
|
|
194
|
-
),
|
|
195
|
-
d(
|
|
196
|
-
"span",
|
|
197
|
-
null,
|
|
198
|
-
null,
|
|
199
|
-
-1
|
|
200
|
-
/* CACHED */
|
|
201
|
-
)
|
|
202
|
-
])])
|
|
203
|
-
])
|
|
204
|
-
],
|
|
205
|
-
2
|
|
206
|
-
/* CLASS */
|
|
207
|
-
);
|
|
208
|
-
}
|
|
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({
|
|
210
|
-
__name: "XSiteFooter",
|
|
211
|
-
setup(r, { expose: o }) {
|
|
212
|
-
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 };
|
|
214
|
-
return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
|
|
215
|
-
}
|
|
216
|
-
}), ie = { class: "x-footer" }, le = { class: "x-footer__container" }, _e = {
|
|
217
|
-
key: 0,
|
|
218
|
-
class: "x-footer__links"
|
|
219
|
-
}, ue = {
|
|
220
|
-
key: 1,
|
|
221
|
-
class: "x-footer__copyright"
|
|
222
|
-
};
|
|
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
|
-
(n(!0), a(
|
|
229
|
-
h,
|
|
230
|
-
null,
|
|
231
|
-
v(t.footerConfig.links, (l) => (n(), T(s, {
|
|
232
|
-
key: l.url,
|
|
233
|
-
to: l.url,
|
|
234
|
-
class: "x-footer__link"
|
|
235
|
-
}, {
|
|
236
|
-
default: B(() => [
|
|
237
|
-
L(
|
|
238
|
-
_(l.text),
|
|
239
|
-
1
|
|
240
|
-
/* TEXT */
|
|
241
|
-
)
|
|
242
|
-
]),
|
|
243
|
-
_: 2
|
|
244
|
-
/* DYNAMIC */
|
|
245
|
-
}, 1032, ["to"]))),
|
|
246
|
-
128
|
|
247
|
-
/* KEYED_FRAGMENT */
|
|
248
|
-
))
|
|
249
|
-
])) : u("v-if", !0),
|
|
250
|
-
t.copyright ? (n(), a(
|
|
251
|
-
"p",
|
|
252
|
-
ue,
|
|
253
|
-
_(t.copyright),
|
|
254
|
-
1
|
|
255
|
-
/* TEXT */
|
|
256
|
-
)) : u("v-if", !0)
|
|
257
|
-
])
|
|
258
|
-
]);
|
|
259
|
-
}
|
|
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({
|
|
261
|
-
__name: "XSiteLayout",
|
|
262
|
-
setup(r, { expose: o }) {
|
|
263
|
-
o(), J();
|
|
264
|
-
const e = { XSiteNav: re, XSiteFooter: pe };
|
|
265
|
-
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
266
|
-
}
|
|
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),
|
|
271
|
-
d("main", he, [
|
|
272
|
-
z(r.$slots, "default", {}, void 0, !0)
|
|
273
|
-
]),
|
|
274
|
-
P(t.XSiteFooter)
|
|
275
|
-
]);
|
|
276
|
-
}
|
|
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({
|
|
278
|
-
__name: "XHeroBlock",
|
|
279
|
-
props: {
|
|
280
|
-
data: { type: Object, required: !0 },
|
|
281
|
-
variant: { type: String, required: !1, default: "fullscreen" }
|
|
282
|
-
},
|
|
283
|
-
setup(r, { expose: o }) {
|
|
284
|
-
o();
|
|
285
|
-
const e = r, t = f(() => e.data.image ? { backgroundImage: `url(${e.data.image})` } : {}), c = { props: e, bgStyle: t };
|
|
286
|
-
return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
|
|
287
|
-
}
|
|
288
|
-
}), xe = {
|
|
289
|
-
key: 0,
|
|
290
|
-
class: "x-hero__overlay"
|
|
291
|
-
}, ge = { class: "x-hero__content" }, ke = {
|
|
292
|
-
key: 0,
|
|
293
|
-
class: "x-hero__title"
|
|
294
|
-
}, be = {
|
|
295
|
-
key: 1,
|
|
296
|
-
class: "x-hero__subtitle"
|
|
297
|
-
}, $e = {
|
|
298
|
-
key: 2,
|
|
299
|
-
class: "x-hero__buttons"
|
|
300
|
-
}, Se = ["href"], we = {
|
|
301
|
-
key: 3,
|
|
302
|
-
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) {
|
|
305
|
-
return n(), a(
|
|
306
|
-
"section",
|
|
307
|
-
{
|
|
308
|
-
class: k(["x-hero", { "x-hero--fullscreen": e.variant === "fullscreen" }]),
|
|
309
|
-
style: U(t.bgStyle)
|
|
310
|
-
},
|
|
311
|
-
[
|
|
312
|
-
e.data.image && e.data.overlay !== !1 ? (n(), a("div", xe)) : u("v-if", !0),
|
|
313
|
-
d("div", ge, [
|
|
314
|
-
e.data.title ? (n(), a(
|
|
315
|
-
"h1",
|
|
316
|
-
ke,
|
|
317
|
-
_(e.data.title),
|
|
318
|
-
1
|
|
319
|
-
/* TEXT */
|
|
320
|
-
)) : u("v-if", !0),
|
|
321
|
-
e.data.subtitle ? (n(), a(
|
|
322
|
-
"p",
|
|
323
|
-
be,
|
|
324
|
-
_(e.data.subtitle),
|
|
325
|
-
1
|
|
326
|
-
/* TEXT */
|
|
327
|
-
)) : u("v-if", !0),
|
|
328
|
-
e.data.buttons?.length ? (n(), a("div", $e, [
|
|
329
|
-
(n(!0), a(
|
|
330
|
-
h,
|
|
331
|
-
null,
|
|
332
|
-
v(e.data.buttons, (s, l) => (n(), a("a", {
|
|
333
|
-
key: l,
|
|
334
|
-
href: s.url,
|
|
335
|
-
class: k(["x-btn", `x-btn--${s.variant || "primary"}`])
|
|
336
|
-
}, _(s.text), 11, Se))),
|
|
337
|
-
128
|
|
338
|
-
/* KEYED_FRAGMENT */
|
|
339
|
-
))
|
|
340
|
-
])) : u("v-if", !0),
|
|
341
|
-
e.data.stats?.length ? (n(), a("div", we, [
|
|
342
|
-
(n(!0), a(
|
|
343
|
-
h,
|
|
344
|
-
null,
|
|
345
|
-
v(e.data.stats, (s, l) => (n(), a("div", {
|
|
346
|
-
key: l,
|
|
347
|
-
class: "x-hero__stat"
|
|
348
|
-
}, [
|
|
349
|
-
d(
|
|
350
|
-
"span",
|
|
351
|
-
je,
|
|
352
|
-
_(s.value),
|
|
353
|
-
1
|
|
354
|
-
/* TEXT */
|
|
355
|
-
),
|
|
356
|
-
d(
|
|
357
|
-
"span",
|
|
358
|
-
Te,
|
|
359
|
-
_(s.label),
|
|
360
|
-
1
|
|
361
|
-
/* TEXT */
|
|
362
|
-
)
|
|
363
|
-
]))),
|
|
364
|
-
128
|
|
365
|
-
/* KEYED_FRAGMENT */
|
|
366
|
-
))
|
|
367
|
-
])) : u("v-if", !0)
|
|
368
|
-
])
|
|
369
|
-
],
|
|
370
|
-
6
|
|
371
|
-
/* CLASS, STYLE */
|
|
372
|
-
);
|
|
373
|
-
}
|
|
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({
|
|
375
|
-
__name: "XHtmlBlock",
|
|
376
|
-
props: {
|
|
377
|
-
data: { type: Object, required: !0 }
|
|
378
|
-
},
|
|
379
|
-
setup(r, { expose: o }) {
|
|
380
|
-
o();
|
|
381
|
-
const e = {};
|
|
382
|
-
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
383
|
-
}
|
|
384
|
-
}), Oe = { class: "x-html-block" }, Pe = ["innerHTML"];
|
|
385
|
-
function Ie(r, o, e, t, c, i) {
|
|
386
|
-
return n(), a("section", Oe, [
|
|
387
|
-
d("div", {
|
|
388
|
-
class: "x-html-block__content",
|
|
389
|
-
innerHTML: e.data.content
|
|
390
|
-
}, null, 8, Pe)
|
|
391
|
-
]);
|
|
392
|
-
}
|
|
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({
|
|
394
|
-
__name: "XCardsBlock",
|
|
395
|
-
props: {
|
|
396
|
-
data: { type: Object, required: !0 },
|
|
397
|
-
variant: { type: String, required: !1, default: "default" },
|
|
398
|
-
columns: { type: Number, required: !1, default: void 0 }
|
|
399
|
-
},
|
|
400
|
-
setup(r, { expose: o }) {
|
|
401
|
-
o();
|
|
402
|
-
const e = r, t = f(() => ({ "--columns": e.columns || Math.min(e.data.cards.length, 4) })), c = { color: "var(--x-color-primary, #1e73be)" }, i = {
|
|
403
|
-
"mdi-lightbulb": "💡",
|
|
404
|
-
"mdi-code-braces": "⚙️",
|
|
405
|
-
"mdi-headset": "🎧",
|
|
406
|
-
"mdi-check-circle": "✅",
|
|
407
|
-
"mdi-shield": "🛡️",
|
|
408
|
-
"mdi-chart-line": "📈",
|
|
409
|
-
"mdi-rocket": "🚀",
|
|
410
|
-
"mdi-heart": "❤️",
|
|
411
|
-
"mdi-star": "⭐",
|
|
412
|
-
"mdi-cog": "⚙️",
|
|
413
|
-
"mdi-email": "📧",
|
|
414
|
-
"mdi-phone": "📞",
|
|
415
|
-
"mdi-map-marker": "📍",
|
|
416
|
-
"mdi-clock": "🕐",
|
|
417
|
-
"mdi-account": "👤",
|
|
418
|
-
"mdi-team": "👥"
|
|
419
|
-
};
|
|
420
|
-
function s(p) {
|
|
421
|
-
return i[p] || p;
|
|
39
|
+
function j(o) {
|
|
40
|
+
function n(t) {
|
|
41
|
+
const e = document.documentElement;
|
|
42
|
+
if (t.colors)
|
|
43
|
+
for (const [a, s] of Object.entries(t.colors))
|
|
44
|
+
s && e.style.setProperty(`--x-color-${A(a)}`, s);
|
|
45
|
+
t.typography?.fontFamily && e.style.setProperty("--x-font-family", t.typography.fontFamily), t.typography?.headingFont && e.style.setProperty("--x-font-heading", t.typography.headingFont), t.typography?.baseFontSize && e.style.setProperty("--x-font-size", t.typography.baseFontSize), t.shape?.borderRadius && e.style.setProperty("--x-border-radius", t.shape.borderRadius), t.shape?.maxWidth && e.style.setProperty("--x-max-width", t.shape.maxWidth);
|
|
46
|
+
}
|
|
47
|
+
T(() => {
|
|
48
|
+
if (o) {
|
|
49
|
+
n(o);
|
|
50
|
+
return;
|
|
422
51
|
}
|
|
423
|
-
const
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}
|
|
430
|
-
key: 1,
|
|
431
|
-
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) {
|
|
434
|
-
return n(), a(
|
|
435
|
-
"section",
|
|
436
|
-
{
|
|
437
|
-
class: k(["x-cards-block", `x-cards-block--${e.variant}`])
|
|
438
|
-
},
|
|
439
|
-
[
|
|
440
|
-
d("div", Ee, [
|
|
441
|
-
e.data.title ? (n(), a(
|
|
442
|
-
"h2",
|
|
443
|
-
Ae,
|
|
444
|
-
_(e.data.title),
|
|
445
|
-
1
|
|
446
|
-
/* TEXT */
|
|
447
|
-
)) : u("v-if", !0),
|
|
448
|
-
e.data.subtitle ? (n(), a(
|
|
449
|
-
"p",
|
|
450
|
-
Ue,
|
|
451
|
-
_(e.data.subtitle),
|
|
452
|
-
1
|
|
453
|
-
/* TEXT */
|
|
454
|
-
)) : u("v-if", !0),
|
|
455
|
-
d(
|
|
456
|
-
"div",
|
|
457
|
-
{
|
|
458
|
-
class: "x-cards-block__grid",
|
|
459
|
-
style: U(t.gridStyle)
|
|
460
|
-
},
|
|
461
|
-
[
|
|
462
|
-
(n(!0), a(
|
|
463
|
-
h,
|
|
464
|
-
null,
|
|
465
|
-
v(e.data.cards, (s, l) => (n(), T(R(s.link ? "a" : "div"), {
|
|
466
|
-
key: l,
|
|
467
|
-
class: "x-card",
|
|
468
|
-
href: s.link
|
|
469
|
-
}, {
|
|
470
|
-
default: B(() => [
|
|
471
|
-
s.image && e.variant === "image-cards" ? (n(), a("img", {
|
|
472
|
-
key: 0,
|
|
473
|
-
src: s.image,
|
|
474
|
-
alt: s.title,
|
|
475
|
-
class: "x-card__image"
|
|
476
|
-
}, null, 8, Re)) : u("v-if", !0),
|
|
477
|
-
s.icon && e.variant !== "image-cards" ? (n(), a(
|
|
478
|
-
"div",
|
|
479
|
-
{
|
|
480
|
-
key: 1,
|
|
481
|
-
class: "x-card__icon",
|
|
482
|
-
style: t.iconStyle
|
|
483
|
-
},
|
|
484
|
-
_(t.iconDisplay(s.icon)),
|
|
485
|
-
1
|
|
486
|
-
/* TEXT */
|
|
487
|
-
)) : u("v-if", !0),
|
|
488
|
-
d(
|
|
489
|
-
"h3",
|
|
490
|
-
Me,
|
|
491
|
-
_(s.title),
|
|
492
|
-
1
|
|
493
|
-
/* TEXT */
|
|
494
|
-
),
|
|
495
|
-
d(
|
|
496
|
-
"p",
|
|
497
|
-
Fe,
|
|
498
|
-
_(s.desc),
|
|
499
|
-
1
|
|
500
|
-
/* TEXT */
|
|
501
|
-
)
|
|
502
|
-
]),
|
|
503
|
-
_: 2
|
|
504
|
-
/* DYNAMIC */
|
|
505
|
-
}, 1032, ["href"]))),
|
|
506
|
-
128
|
|
507
|
-
/* KEYED_FRAGMENT */
|
|
508
|
-
))
|
|
509
|
-
],
|
|
510
|
-
4
|
|
511
|
-
/* STYLE */
|
|
512
|
-
)
|
|
513
|
-
])
|
|
514
|
-
],
|
|
515
|
-
2
|
|
516
|
-
/* CLASS */
|
|
517
|
-
);
|
|
52
|
+
const e = window.__SITE_DATA__?.skin;
|
|
53
|
+
e && (e.colors || e.typography || e.shape) && n({
|
|
54
|
+
colors: e.colors || {},
|
|
55
|
+
typography: e.typography || {},
|
|
56
|
+
shape: e.shape || {}
|
|
57
|
+
});
|
|
58
|
+
});
|
|
518
59
|
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
props: {
|
|
522
|
-
data: { type: Object, required: !0 },
|
|
523
|
-
reverse: { type: Boolean, required: !1, default: !1 }
|
|
524
|
-
},
|
|
525
|
-
setup(r, { expose: o }) {
|
|
526
|
-
o();
|
|
527
|
-
const e = {};
|
|
528
|
-
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
529
|
-
}
|
|
530
|
-
}), ze = { class: "x-image-text__container" }, Ge = { class: "x-image-text__text" }, Je = {
|
|
531
|
-
key: 0,
|
|
532
|
-
class: "x-image-text__title"
|
|
533
|
-
}, Ve = ["innerHTML"], We = {
|
|
534
|
-
key: 2,
|
|
535
|
-
class: "x-image-text__checklist"
|
|
536
|
-
}, Ke = { class: "x-image-text__check-icon" }, Ye = {
|
|
537
|
-
key: 0,
|
|
538
|
-
class: "x-image-text__image-wrap"
|
|
539
|
-
}, Ze = ["src", "alt"];
|
|
540
|
-
function Qe(r, o, e, t, c, i) {
|
|
541
|
-
return n(), a(
|
|
542
|
-
"section",
|
|
543
|
-
{
|
|
544
|
-
class: k(["x-image-text", { "x-image-text--reverse": e.reverse }])
|
|
545
|
-
},
|
|
546
|
-
[
|
|
547
|
-
d("div", ze, [
|
|
548
|
-
d("div", Ge, [
|
|
549
|
-
e.data.title ? (n(), a(
|
|
550
|
-
"h2",
|
|
551
|
-
Je,
|
|
552
|
-
_(e.data.title),
|
|
553
|
-
1
|
|
554
|
-
/* TEXT */
|
|
555
|
-
)) : u("v-if", !0),
|
|
556
|
-
e.data.content ? (n(), a("div", {
|
|
557
|
-
key: 1,
|
|
558
|
-
class: "x-image-text__content",
|
|
559
|
-
innerHTML: e.data.content
|
|
560
|
-
}, null, 8, Ve)) : u("v-if", !0),
|
|
561
|
-
e.data.items?.length ? (n(), a("ul", We, [
|
|
562
|
-
(n(!0), a(
|
|
563
|
-
h,
|
|
564
|
-
null,
|
|
565
|
-
v(e.data.items, (s, l) => (n(), a("li", { key: l }, [
|
|
566
|
-
d(
|
|
567
|
-
"span",
|
|
568
|
-
Ke,
|
|
569
|
-
_(s.icon || "✓"),
|
|
570
|
-
1
|
|
571
|
-
/* TEXT */
|
|
572
|
-
),
|
|
573
|
-
L(
|
|
574
|
-
" " + _(s.text),
|
|
575
|
-
1
|
|
576
|
-
/* TEXT */
|
|
577
|
-
)
|
|
578
|
-
]))),
|
|
579
|
-
128
|
|
580
|
-
/* KEYED_FRAGMENT */
|
|
581
|
-
))
|
|
582
|
-
])) : u("v-if", !0)
|
|
583
|
-
]),
|
|
584
|
-
e.data.image ? (n(), a("div", Ye, [
|
|
585
|
-
d("img", {
|
|
586
|
-
src: e.data.image,
|
|
587
|
-
alt: e.data.title || "",
|
|
588
|
-
class: "x-image-text__image"
|
|
589
|
-
}, null, 8, Ze)
|
|
590
|
-
])) : u("v-if", !0)
|
|
591
|
-
])
|
|
592
|
-
],
|
|
593
|
-
2
|
|
594
|
-
/* CLASS */
|
|
595
|
-
);
|
|
60
|
+
function A(o) {
|
|
61
|
+
return o.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
596
62
|
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
try {
|
|
605
|
-
const p = await fetch(`/api/content/${o}:${t.value}`);
|
|
606
|
-
p.ok && (e.value = await p.json());
|
|
607
|
-
} catch {
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
return C(() => {
|
|
611
|
-
s() || l();
|
|
612
|
-
}), I(t, () => {
|
|
613
|
-
l();
|
|
614
|
-
}), e;
|
|
615
|
-
}
|
|
616
|
-
function tt() {
|
|
617
|
-
const o = window.__SITE_DATA__?.apiBase || "";
|
|
618
|
-
async function e(i) {
|
|
619
|
-
const s = await fetch(`${o}${i}`);
|
|
620
|
-
if (!s.ok)
|
|
621
|
-
throw new Error(`API error: ${s.status}`);
|
|
622
|
-
return s.json();
|
|
63
|
+
function F() {
|
|
64
|
+
const n = window.__SITE_DATA__?.apiBase || "";
|
|
65
|
+
async function t(s) {
|
|
66
|
+
const c = await fetch(`${n}${s}`);
|
|
67
|
+
if (!c.ok)
|
|
68
|
+
throw new Error(`API error: ${c.status}`);
|
|
69
|
+
return c.json();
|
|
623
70
|
}
|
|
624
|
-
async function
|
|
625
|
-
return
|
|
71
|
+
async function e() {
|
|
72
|
+
return t("/v1/billing/tariffs");
|
|
626
73
|
}
|
|
627
|
-
async function
|
|
628
|
-
return
|
|
74
|
+
async function a() {
|
|
75
|
+
return t("/v1/billing/services");
|
|
629
76
|
}
|
|
630
77
|
return {
|
|
631
|
-
get:
|
|
632
|
-
getTariffs:
|
|
633
|
-
getProducts:
|
|
78
|
+
get: t,
|
|
79
|
+
getTariffs: e,
|
|
80
|
+
getProducts: a
|
|
634
81
|
};
|
|
635
82
|
}
|
|
636
|
-
|
|
637
|
-
__name: "XPricingBlock",
|
|
638
|
-
props: {
|
|
639
|
-
data: { type: Object, required: !1 },
|
|
640
|
-
source: { type: String, required: !1, default: "kv" },
|
|
641
|
-
featuredIndex: { type: Number, required: !1, default: 1 }
|
|
642
|
-
},
|
|
643
|
-
setup(r, { expose: o }) {
|
|
644
|
-
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 () => {
|
|
647
|
-
if (e.source === "api")
|
|
648
|
-
try {
|
|
649
|
-
i.value = await p.getTariffs();
|
|
650
|
-
} catch {
|
|
651
|
-
}
|
|
652
|
-
}), I(
|
|
653
|
-
l,
|
|
654
|
-
(m) => {
|
|
655
|
-
m && e.source === "kv" && (i.value = m);
|
|
656
|
-
},
|
|
657
|
-
{ immediate: !0 }
|
|
658
|
-
);
|
|
659
|
-
const g = f(() => {
|
|
660
|
-
const m = new Set(i.value.map((j) => j.tariffGroupName).filter(Boolean));
|
|
661
|
-
return Array.from(m);
|
|
662
|
-
});
|
|
663
|
-
I(
|
|
664
|
-
g,
|
|
665
|
-
(m) => {
|
|
666
|
-
m.length > 0 && !s.value && (s.value = m[0]);
|
|
667
|
-
},
|
|
668
|
-
{ immediate: !0 }
|
|
669
|
-
);
|
|
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;
|
|
672
|
-
}
|
|
673
|
-
}), ot = { class: "x-pricing" }, nt = { class: "x-pricing__container" }, at = {
|
|
674
|
-
key: 0,
|
|
675
|
-
class: "x-pricing__title"
|
|
676
|
-
}, rt = {
|
|
677
|
-
key: 1,
|
|
678
|
-
class: "x-pricing__subtitle"
|
|
679
|
-
}, ct = {
|
|
680
|
-
key: 2,
|
|
681
|
-
class: "x-pricing__tabs"
|
|
682
|
-
}, it = ["onClick"], lt = { class: "x-pricing__grid" }, _t = { class: "x-pricing-card__name" }, ut = {
|
|
683
|
-
key: 0,
|
|
684
|
-
class: "x-pricing-card__desc"
|
|
685
|
-
}, dt = { class: "x-pricing-card__price" }, pt = { class: "x-pricing-card__amount" }, ft = {
|
|
686
|
-
key: 0,
|
|
687
|
-
class: "x-pricing-card__period"
|
|
688
|
-
}, mt = {
|
|
689
|
-
key: 1,
|
|
690
|
-
class: "x-pricing-card__features"
|
|
691
|
-
}, ht = ["href"];
|
|
692
|
-
function vt(r, o, e, t, c, i) {
|
|
693
|
-
return n(), a("section", ot, [
|
|
694
|
-
d("div", nt, [
|
|
695
|
-
t.title ? (n(), a(
|
|
696
|
-
"h2",
|
|
697
|
-
at,
|
|
698
|
-
_(t.title),
|
|
699
|
-
1
|
|
700
|
-
/* TEXT */
|
|
701
|
-
)) : u("v-if", !0),
|
|
702
|
-
t.subtitle ? (n(), a(
|
|
703
|
-
"p",
|
|
704
|
-
rt,
|
|
705
|
-
_(t.subtitle),
|
|
706
|
-
1
|
|
707
|
-
/* TEXT */
|
|
708
|
-
)) : u("v-if", !0),
|
|
709
|
-
u(" Tabs for tariff groups "),
|
|
710
|
-
t.groups.length > 1 ? (n(), a("div", ct, [
|
|
711
|
-
(n(!0), a(
|
|
712
|
-
h,
|
|
713
|
-
null,
|
|
714
|
-
v(t.groups, (s) => (n(), a("button", {
|
|
715
|
-
key: s,
|
|
716
|
-
class: k(["x-pricing__tab", { "x-pricing__tab--active": t.activeGroup === s }]),
|
|
717
|
-
onClick: (l) => t.activeGroup = s
|
|
718
|
-
}, _(s), 11, it))),
|
|
719
|
-
128
|
|
720
|
-
/* KEYED_FRAGMENT */
|
|
721
|
-
))
|
|
722
|
-
])) : u("v-if", !0),
|
|
723
|
-
d("div", lt, [
|
|
724
|
-
(n(!0), a(
|
|
725
|
-
h,
|
|
726
|
-
null,
|
|
727
|
-
v(t.activePlans, (s, l) => (n(), a(
|
|
728
|
-
"div",
|
|
729
|
-
{
|
|
730
|
-
key: s.id || l,
|
|
731
|
-
class: k(["x-pricing-card", { "x-pricing-card--featured": l === e.featuredIndex }])
|
|
732
|
-
},
|
|
733
|
-
[
|
|
734
|
-
d(
|
|
735
|
-
"h3",
|
|
736
|
-
_t,
|
|
737
|
-
_(s.name),
|
|
738
|
-
1
|
|
739
|
-
/* TEXT */
|
|
740
|
-
),
|
|
741
|
-
s.description ? (n(), a(
|
|
742
|
-
"p",
|
|
743
|
-
ut,
|
|
744
|
-
_(s.description),
|
|
745
|
-
1
|
|
746
|
-
/* TEXT */
|
|
747
|
-
)) : u("v-if", !0),
|
|
748
|
-
d("div", dt, [
|
|
749
|
-
d(
|
|
750
|
-
"span",
|
|
751
|
-
pt,
|
|
752
|
-
_(s.price),
|
|
753
|
-
1
|
|
754
|
-
/* TEXT */
|
|
755
|
-
),
|
|
756
|
-
s.period ? (n(), a(
|
|
757
|
-
"span",
|
|
758
|
-
ft,
|
|
759
|
-
"/" + _(s.period),
|
|
760
|
-
1
|
|
761
|
-
/* TEXT */
|
|
762
|
-
)) : u("v-if", !0)
|
|
763
|
-
]),
|
|
764
|
-
s.features?.length ? (n(), a("ul", mt, [
|
|
765
|
-
(n(!0), a(
|
|
766
|
-
h,
|
|
767
|
-
null,
|
|
768
|
-
v(s.features, (p, g) => (n(), a(
|
|
769
|
-
"li",
|
|
770
|
-
{ key: g },
|
|
771
|
-
_(p),
|
|
772
|
-
1
|
|
773
|
-
/* TEXT */
|
|
774
|
-
))),
|
|
775
|
-
128
|
|
776
|
-
/* KEYED_FRAGMENT */
|
|
777
|
-
))
|
|
778
|
-
])) : u("v-if", !0),
|
|
779
|
-
s.actionUrl ? (n(), a("a", {
|
|
780
|
-
key: 2,
|
|
781
|
-
href: s.actionUrl,
|
|
782
|
-
class: "x-btn x-btn--primary x-pricing-card__action"
|
|
783
|
-
}, _(s.actionText || "Choose"), 9, ht)) : u("v-if", !0)
|
|
784
|
-
],
|
|
785
|
-
2
|
|
786
|
-
/* CLASS */
|
|
787
|
-
))),
|
|
788
|
-
128
|
|
789
|
-
/* KEYED_FRAGMENT */
|
|
790
|
-
))
|
|
791
|
-
])
|
|
792
|
-
])
|
|
793
|
-
]);
|
|
794
|
-
}
|
|
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({
|
|
796
|
-
__name: "XContactsBlock",
|
|
797
|
-
props: {
|
|
798
|
-
data: { type: Object, required: !1 }
|
|
799
|
-
},
|
|
800
|
-
setup(r, { expose: o }) {
|
|
801
|
-
o();
|
|
802
|
-
const e = q("contacts:offices", "contacts:offices"), t = f(() => e.value || []), c = { kvOffices: e, offices: t };
|
|
803
|
-
return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
|
|
804
|
-
}
|
|
805
|
-
}), gt = { class: "x-contacts" }, kt = { class: "x-contacts__container" }, bt = {
|
|
806
|
-
key: 0,
|
|
807
|
-
class: "x-contacts__title"
|
|
808
|
-
}, $t = {
|
|
809
|
-
key: 1,
|
|
810
|
-
class: "x-contacts__grid"
|
|
811
|
-
}, St = { class: "x-contacts__name" }, wt = {
|
|
812
|
-
key: 0,
|
|
813
|
-
class: "x-contacts__info"
|
|
814
|
-
}, jt = {
|
|
815
|
-
key: 1,
|
|
816
|
-
class: "x-contacts__info"
|
|
817
|
-
}, Tt = ["href"], Ct = {
|
|
818
|
-
key: 2,
|
|
819
|
-
class: "x-contacts__info"
|
|
820
|
-
}, Xt = ["href"], Bt = {
|
|
821
|
-
key: 3,
|
|
822
|
-
class: "x-contacts__hours"
|
|
823
|
-
};
|
|
824
|
-
function Ot(r, o, e, t, c, i) {
|
|
825
|
-
return n(), a("section", gt, [
|
|
826
|
-
d("div", kt, [
|
|
827
|
-
e.data?.title ? (n(), a(
|
|
828
|
-
"h2",
|
|
829
|
-
bt,
|
|
830
|
-
_(e.data.title),
|
|
831
|
-
1
|
|
832
|
-
/* TEXT */
|
|
833
|
-
)) : u("v-if", !0),
|
|
834
|
-
t.offices ? (n(), a("div", $t, [
|
|
835
|
-
(n(!0), a(
|
|
836
|
-
h,
|
|
837
|
-
null,
|
|
838
|
-
v(t.offices, (s, l) => (n(), a(
|
|
839
|
-
"div",
|
|
840
|
-
{
|
|
841
|
-
key: l,
|
|
842
|
-
class: k(["x-contacts__card", { "x-contacts__card--main": s.isMain }])
|
|
843
|
-
},
|
|
844
|
-
[
|
|
845
|
-
d(
|
|
846
|
-
"h3",
|
|
847
|
-
St,
|
|
848
|
-
_(s.name),
|
|
849
|
-
1
|
|
850
|
-
/* TEXT */
|
|
851
|
-
),
|
|
852
|
-
s.address ? (n(), a(
|
|
853
|
-
"p",
|
|
854
|
-
wt,
|
|
855
|
-
_(s.address),
|
|
856
|
-
1
|
|
857
|
-
/* TEXT */
|
|
858
|
-
)) : u("v-if", !0),
|
|
859
|
-
s.phone ? (n(), a("p", jt, [
|
|
860
|
-
d("a", {
|
|
861
|
-
href: `tel:${s.phone}`
|
|
862
|
-
}, _(s.phone), 9, Tt)
|
|
863
|
-
])) : u("v-if", !0),
|
|
864
|
-
s.email ? (n(), a("p", Ct, [
|
|
865
|
-
d("a", {
|
|
866
|
-
href: `mailto:${s.email}`
|
|
867
|
-
}, _(s.email), 9, Xt)
|
|
868
|
-
])) : u("v-if", !0),
|
|
869
|
-
s.hours ? (n(), a(
|
|
870
|
-
"p",
|
|
871
|
-
Bt,
|
|
872
|
-
_(s.hours),
|
|
873
|
-
1
|
|
874
|
-
/* TEXT */
|
|
875
|
-
)) : u("v-if", !0)
|
|
876
|
-
],
|
|
877
|
-
2
|
|
878
|
-
/* CLASS */
|
|
879
|
-
))),
|
|
880
|
-
128
|
|
881
|
-
/* KEYED_FRAGMENT */
|
|
882
|
-
))
|
|
883
|
-
])) : u("v-if", !0)
|
|
884
|
-
])
|
|
885
|
-
]);
|
|
886
|
-
}
|
|
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({
|
|
888
|
-
__name: "XGalleryBlock",
|
|
889
|
-
props: {
|
|
890
|
-
data: { type: Object, required: !0 }
|
|
891
|
-
},
|
|
892
|
-
setup(r, { expose: o }) {
|
|
893
|
-
o();
|
|
894
|
-
const e = {};
|
|
895
|
-
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
896
|
-
}
|
|
897
|
-
}), Lt = { class: "x-gallery-block" }, Nt = {
|
|
898
|
-
key: 0,
|
|
899
|
-
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) {
|
|
902
|
-
return n(), a("section", Lt, [
|
|
903
|
-
e.data.title ? (n(), a(
|
|
904
|
-
"h2",
|
|
905
|
-
Nt,
|
|
906
|
-
_(e.data.title),
|
|
907
|
-
1
|
|
908
|
-
/* TEXT */
|
|
909
|
-
)) : u("v-if", !0),
|
|
910
|
-
d("div", Et, [
|
|
911
|
-
(n(!0), a(
|
|
912
|
-
h,
|
|
913
|
-
null,
|
|
914
|
-
v(e.data.images, (s, l) => (n(), a("figure", {
|
|
915
|
-
key: l,
|
|
916
|
-
class: "x-gallery-block__item"
|
|
917
|
-
}, [
|
|
918
|
-
d("img", {
|
|
919
|
-
src: s.src,
|
|
920
|
-
alt: s.alt || "",
|
|
921
|
-
loading: "lazy"
|
|
922
|
-
}, null, 8, At),
|
|
923
|
-
s.caption ? (n(), a(
|
|
924
|
-
"figcaption",
|
|
925
|
-
Ut,
|
|
926
|
-
_(s.caption),
|
|
927
|
-
1
|
|
928
|
-
/* TEXT */
|
|
929
|
-
)) : u("v-if", !0)
|
|
930
|
-
]))),
|
|
931
|
-
128
|
|
932
|
-
/* KEYED_FRAGMENT */
|
|
933
|
-
))
|
|
934
|
-
])
|
|
935
|
-
]);
|
|
936
|
-
}
|
|
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({
|
|
938
|
-
__name: "XMapBlock",
|
|
939
|
-
props: {
|
|
940
|
-
data: { type: Object, required: !0 }
|
|
941
|
-
},
|
|
942
|
-
setup(r, { expose: o }) {
|
|
943
|
-
o();
|
|
944
|
-
const e = r, t = f(() => {
|
|
945
|
-
const { lat: i, lng: s } = e.data.center || { lat: 0, lng: 0 };
|
|
946
|
-
return e.data.zoom, `https://www.openstreetmap.org/export/embed.html?bbox=${s - 0.01},${i - 0.01},${s + 0.01},${i + 0.01}&layer=mapnik&marker=${i},${s}`;
|
|
947
|
-
}), c = { props: e, mapUrl: t };
|
|
948
|
-
return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
|
|
949
|
-
}
|
|
950
|
-
}), qt = { class: "x-map-block" }, Dt = {
|
|
951
|
-
key: 0,
|
|
952
|
-
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, [
|
|
956
|
-
e.data.title ? (n(), a(
|
|
957
|
-
"h2",
|
|
958
|
-
Dt,
|
|
959
|
-
_(e.data.title),
|
|
960
|
-
1
|
|
961
|
-
/* TEXT */
|
|
962
|
-
)) : u("v-if", !0),
|
|
963
|
-
d("div", Ht, [
|
|
964
|
-
d("iframe", {
|
|
965
|
-
src: t.mapUrl,
|
|
966
|
-
width: "100%",
|
|
967
|
-
height: "400",
|
|
968
|
-
style: { border: "0" },
|
|
969
|
-
allowfullscreen: "",
|
|
970
|
-
loading: "lazy",
|
|
971
|
-
referrerpolicy: "no-referrer-when-downgrade"
|
|
972
|
-
}, null, 8, zt)
|
|
973
|
-
])
|
|
974
|
-
]);
|
|
975
|
-
}
|
|
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({
|
|
977
|
-
__name: "XBlockRenderer",
|
|
978
|
-
props: {
|
|
979
|
-
blocks: { type: Array, required: !0 }
|
|
980
|
-
},
|
|
981
|
-
setup(r, { expose: o }) {
|
|
982
|
-
o();
|
|
983
|
-
const e = r, t = {
|
|
984
|
-
hero: Xe,
|
|
985
|
-
html: Le,
|
|
986
|
-
cards: De,
|
|
987
|
-
"image-text": et,
|
|
988
|
-
pricing: yt,
|
|
989
|
-
contacts: Pt,
|
|
990
|
-
gallery: Mt,
|
|
991
|
-
map: Jt
|
|
992
|
-
};
|
|
993
|
-
function c(l) {
|
|
994
|
-
return t[l];
|
|
995
|
-
}
|
|
996
|
-
const i = f(() => e.blocks.filter((l) => l.settings?.visible !== !1)), s = { props: e, blockRegistry: t, getBlockComponent: c, visibleBlocks: i };
|
|
997
|
-
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
998
|
-
}
|
|
999
|
-
}), Wt = { class: "x-block-renderer" };
|
|
1000
|
-
function Kt(r, o, e, t, c, i) {
|
|
1001
|
-
return n(), a("div", Wt, [
|
|
1002
|
-
(n(!0), a(
|
|
1003
|
-
h,
|
|
1004
|
-
null,
|
|
1005
|
-
v(t.visibleBlocks, (s, l) => (n(), a(
|
|
1006
|
-
h,
|
|
1007
|
-
{ key: l },
|
|
1008
|
-
[
|
|
1009
|
-
t.getBlockComponent(s.type) ? (n(), T(R(t.getBlockComponent(s.type)), G({
|
|
1010
|
-
key: 0,
|
|
1011
|
-
data: s.data || s.props
|
|
1012
|
-
}, { ref_for: !0 }, s.settings, {
|
|
1013
|
-
class: s.settings?.className
|
|
1014
|
-
}), null, 16, ["data", "class"])) : u("v-if", !0)
|
|
1015
|
-
],
|
|
1016
|
-
64
|
|
1017
|
-
/* STABLE_FRAGMENT */
|
|
1018
|
-
))),
|
|
1019
|
-
128
|
|
1020
|
-
/* KEYED_FRAGMENT */
|
|
1021
|
-
))
|
|
1022
|
-
]);
|
|
1023
|
-
}
|
|
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() {
|
|
83
|
+
function S() {
|
|
1026
84
|
try {
|
|
1027
85
|
return window.self !== window.top;
|
|
1028
86
|
} catch {
|
|
1029
87
|
return !0;
|
|
1030
88
|
}
|
|
1031
89
|
}
|
|
1032
|
-
function
|
|
1033
|
-
|
|
90
|
+
function D(o) {
|
|
91
|
+
S() && o.beforeEach((n, t) => !t.name);
|
|
1034
92
|
}
|
|
1035
|
-
function
|
|
1036
|
-
const
|
|
1037
|
-
function e
|
|
1038
|
-
const
|
|
1039
|
-
|
|
93
|
+
function U() {
|
|
94
|
+
const o = y(null), n = y(S());
|
|
95
|
+
function t(e) {
|
|
96
|
+
const a = e.data;
|
|
97
|
+
a?.type === "xosen-preview-update" && a.page && (o.value = a.page, n.value = !0);
|
|
1040
98
|
}
|
|
1041
|
-
return
|
|
1042
|
-
window.addEventListener("message",
|
|
1043
|
-
}),
|
|
1044
|
-
window.removeEventListener("message",
|
|
99
|
+
return T(() => {
|
|
100
|
+
window.addEventListener("message", t);
|
|
101
|
+
}), b(() => {
|
|
102
|
+
window.removeEventListener("message", t);
|
|
1045
103
|
}), {
|
|
1046
|
-
previewPage:
|
|
1047
|
-
isPreviewMode:
|
|
104
|
+
previewPage: o,
|
|
105
|
+
isPreviewMode: n
|
|
1048
106
|
};
|
|
1049
107
|
}
|
|
1050
|
-
const
|
|
1051
|
-
function
|
|
1052
|
-
const
|
|
1053
|
-
if (
|
|
1054
|
-
if (
|
|
1055
|
-
const
|
|
1056
|
-
for (const
|
|
1057
|
-
if (
|
|
108
|
+
const C = /\.(js|css|png|jpg|jpeg|gif|svg|ico|woff2?|ttf|eot|webp|avif|map|json|txt|xml|webmanifest)$/;
|
|
109
|
+
function N(o, n) {
|
|
110
|
+
const e = new URL(o.url).searchParams.get("lang");
|
|
111
|
+
if (e && n.supportedLocales?.includes(e)) return e;
|
|
112
|
+
if (n.supportedLocales?.length) {
|
|
113
|
+
const a = o.headers.get("Accept-Language") || "";
|
|
114
|
+
for (const s of n.supportedLocales)
|
|
115
|
+
if (a.includes(s)) return s;
|
|
1058
116
|
}
|
|
1059
|
-
return
|
|
117
|
+
return n.defaultLocale;
|
|
1060
118
|
}
|
|
1061
|
-
function
|
|
1062
|
-
if (!
|
|
1063
|
-
const e = decodeURIComponent(
|
|
119
|
+
function I(o, n, t) {
|
|
120
|
+
if (!o.pathname.startsWith("/api/content/")) return null;
|
|
121
|
+
const e = decodeURIComponent(o.pathname.replace("/api/content/", ""));
|
|
1064
122
|
return e ? (async () => {
|
|
1065
|
-
|
|
1066
|
-
|
|
123
|
+
let a = await n.SITE_CONTENT.get(e);
|
|
124
|
+
if (!a) {
|
|
125
|
+
const s = e.lastIndexOf(":");
|
|
126
|
+
s > 0 && e.slice(s + 1) !== t && (a = await n.SITE_CONTENT.get(e.slice(0, s + 1) + t));
|
|
127
|
+
}
|
|
128
|
+
return a ? new Response(a, {
|
|
1067
129
|
headers: {
|
|
1068
130
|
"Content-Type": "application/json",
|
|
1069
131
|
"Cache-Control": "public, max-age=60",
|
|
@@ -1072,48 +134,54 @@ function Qt(r, o) {
|
|
|
1072
134
|
}) : Response.json({ error: "Not found" }, { status: 404 });
|
|
1073
135
|
})() : Promise.resolve(Response.json({ error: "Key is required" }, { status: 400 }));
|
|
1074
136
|
}
|
|
1075
|
-
function
|
|
1076
|
-
let
|
|
1077
|
-
if (
|
|
1078
|
-
const
|
|
1079
|
-
|
|
137
|
+
function _(o, n, t) {
|
|
138
|
+
let e = o;
|
|
139
|
+
if (n.title) {
|
|
140
|
+
const a = t ? ` — ${t}` : "";
|
|
141
|
+
e = e.replace(/<title>[^<]*<\/title>/, `<title>${n.title}${a}</title>`);
|
|
1080
142
|
}
|
|
1081
|
-
return
|
|
143
|
+
return n.meta?.description && (e = e.replace(/(<meta\s+name="description"\s+content=")[^"]*(")/, `$1${n.meta.description}$2`)), n.meta?.ogTitle && (e = e.replace(/(<meta\s+property="og:title"\s+content=")[^"]*(")/, `$1${n.meta.ogTitle}$2`)), n.html && (e = e.replace('<div id="app"></div>', `<div id="app">${n.html}</div>`)), e;
|
|
1082
144
|
}
|
|
1083
|
-
function
|
|
145
|
+
function J(o) {
|
|
1084
146
|
return {
|
|
1085
|
-
async fetch(
|
|
1086
|
-
const
|
|
1087
|
-
if (
|
|
1088
|
-
if (
|
|
1089
|
-
return
|
|
1090
|
-
const
|
|
1091
|
-
let
|
|
1092
|
-
const [g,
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
]),
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
147
|
+
async fetch(n, t) {
|
|
148
|
+
const e = new URL(n.url), a = I(e, t, o.defaultLocale);
|
|
149
|
+
if (a) return a;
|
|
150
|
+
if (C.test(e.pathname))
|
|
151
|
+
return t.ASSETS.fetch(n);
|
|
152
|
+
const s = N(n, o), c = new URL("/index.html", n.url);
|
|
153
|
+
let r = await (await t.ASSETS.fetch(new Request(c))).text();
|
|
154
|
+
const p = o.defaultLocale, [g, f] = await Promise.all([
|
|
155
|
+
t.SITE_CONTENT.get("config"),
|
|
156
|
+
t.SITE_CONTENT.get(`content:${s}`)
|
|
157
|
+
]), v = g ? JSON.parse(g) : {};
|
|
158
|
+
let d = f ? JSON.parse(f) : {};
|
|
159
|
+
if (!f && s !== p) {
|
|
160
|
+
const i = await t.SITE_CONTENT.get(`content:${p}`);
|
|
161
|
+
i && (d = JSON.parse(i));
|
|
162
|
+
}
|
|
163
|
+
const m = e.pathname.match(/^\/p\/(.+)$/);
|
|
164
|
+
if (m) {
|
|
165
|
+
const i = m[1];
|
|
166
|
+
if (!d[i]) {
|
|
167
|
+
let l = await t.SITE_CONTENT.get(`page:${i}:${s}`);
|
|
168
|
+
!l && s !== p && (l = await t.SITE_CONTENT.get(`page:${i}:${p}`)), l && (d[i] = JSON.parse(l));
|
|
1101
169
|
}
|
|
1102
170
|
}
|
|
1103
|
-
const
|
|
1104
|
-
locale:
|
|
1105
|
-
config:
|
|
171
|
+
const w = {
|
|
172
|
+
locale: s,
|
|
173
|
+
config: v
|
|
1106
174
|
};
|
|
1107
|
-
for (const [
|
|
1108
|
-
|
|
1109
|
-
if (
|
|
1110
|
-
const
|
|
1111
|
-
|
|
175
|
+
for (const [i, l] of Object.entries(d))
|
|
176
|
+
w[`page:${i}`] = l;
|
|
177
|
+
if (m) {
|
|
178
|
+
const i = m[1], l = w[`page:${i}`];
|
|
179
|
+
l && (r = _(r, l, o.siteName));
|
|
1112
180
|
}
|
|
1113
|
-
|
|
1114
|
-
const
|
|
1115
|
-
return
|
|
1116
|
-
</head>`), new Response(
|
|
181
|
+
e.pathname === "/" && d.home && (r = _(r, d.home, o.siteName));
|
|
182
|
+
const $ = `<script>window.__SITE_DATA__ = ${JSON.stringify(w)};<\/script>`;
|
|
183
|
+
return r = r.replace("</head>", `${$}
|
|
184
|
+
</head>`), new Response(r, {
|
|
1117
185
|
headers: {
|
|
1118
186
|
"Content-Type": "text/html;charset=utf-8",
|
|
1119
187
|
"Cache-Control": "public, max-age=60"
|
|
@@ -1123,25 +191,12 @@ function rs(r) {
|
|
|
1123
191
|
};
|
|
1124
192
|
}
|
|
1125
193
|
export {
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
Jt as XMapBlock,
|
|
1135
|
-
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
|
|
194
|
+
J as createSiteWorker,
|
|
195
|
+
S as isInPreview,
|
|
196
|
+
D as setupPreviewRouter,
|
|
197
|
+
U as useLivePreview,
|
|
198
|
+
F as useSiteApi,
|
|
199
|
+
O as useSiteConfig,
|
|
200
|
+
P as useSiteData,
|
|
201
|
+
j as useSkin
|
|
1147
202
|
};
|