build: include production build artifacts in repo
This commit is contained in:
@@ -0,0 +1,152 @@
|
||||
import { a as fade } from './motion-BvlOLZ1k.mjs';
|
||||
import { defineComponent, computed, unref, mergeProps, withCtx, renderSlot, createVNode, toDisplayString, resolveDynamicComponent, openBlock, createBlock, createCommentVNode, Fragment, useSSRContext } from 'vue';
|
||||
import { ssrRenderComponent, ssrRenderSlot, ssrRenderAttrs, ssrRenderClass, ssrInterpolate, ssrRenderVNode, ssrRenderList } from 'vue/server-renderer';
|
||||
import { motion } from 'motion-v';
|
||||
|
||||
//#region app/components/ui/Lines.vue?vue&type=script&setup=true&lang.ts
|
||||
var Lines_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "Lines",
|
||||
__ssrInlineRender: true,
|
||||
props: { text: {} },
|
||||
setup(__props) {
|
||||
/** Renders editor text where "\n" means a line break */
|
||||
const props = __props;
|
||||
const lines = computed(() => props.text.split("\n"));
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<!--[-->`);
|
||||
ssrRenderList(unref(lines), (line, i) => {
|
||||
_push(`<!--[-->`);
|
||||
if (i > 0) _push(`<br>`);
|
||||
else _push(`<!---->`);
|
||||
_push(`${ssrInterpolate(line)}<!--]-->`);
|
||||
});
|
||||
_push(`<!--]-->`);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/ui/Lines.vue
|
||||
var _sfc_setup$2 = Lines_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
Lines_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/Lines.vue");
|
||||
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
||||
};
|
||||
var Lines_default = Object.assign(Lines_vue_vue_type_script_setup_true_lang_default, { __name: "UiLines" });
|
||||
//#endregion
|
||||
//#region app/components/ui/Reveal.vue?vue&type=script&setup=true&lang.ts
|
||||
var Reveal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "Reveal",
|
||||
__ssrInlineRender: true,
|
||||
props: { delay: { default: 0 } },
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const motionProps = computed(() => fade(props.delay, 34));
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(ssrRenderComponent(unref(motion).div, mergeProps(unref(motionProps), _attrs), {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent, _scopeId);
|
||||
else return [renderSlot(_ctx.$slots, "default")];
|
||||
}),
|
||||
_: 3
|
||||
}, _parent));
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/ui/Reveal.vue
|
||||
var _sfc_setup$1 = Reveal_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
Reveal_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/Reveal.vue");
|
||||
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
||||
};
|
||||
var Reveal_default = Object.assign(Reveal_vue_vue_type_script_setup_true_lang_default, { __name: "UiReveal" });
|
||||
//#endregion
|
||||
//#region app/components/ui/SectionHead.vue?vue&type=script&setup=true&lang.ts
|
||||
var SectionHead_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "SectionHead",
|
||||
__ssrInlineRender: true,
|
||||
props: {
|
||||
tag: {},
|
||||
title: {},
|
||||
highlight: {},
|
||||
desc: {},
|
||||
center: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
headingId: {},
|
||||
level: { default: 2 }
|
||||
},
|
||||
setup(__props) {
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<div${ssrRenderAttrs(mergeProps({ class: __props.center ? "text-center" : "" }, _attrs))}>`);
|
||||
_push(ssrRenderComponent(Reveal_default, null, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`<div class="${ssrRenderClass(`flex items-center gap-3 ${__props.center ? "justify-center" : ""}`)}"${_scopeId}><span class="font-mono text-sm text-accent"${_scopeId}>//</span><span class="font-mono text-xs tracking-[0.25em] text-muted"${_scopeId}>${ssrInterpolate(__props.tag)}</span><span class="h-px w-14 bg-line"${_scopeId}></span></div>`);
|
||||
else return [createVNode("div", { class: `flex items-center gap-3 ${__props.center ? "justify-center" : ""}` }, [
|
||||
createVNode("span", { class: "font-mono text-sm text-accent" }, "//"),
|
||||
createVNode("span", { class: "font-mono text-xs tracking-[0.25em] text-muted" }, toDisplayString(__props.tag), 1),
|
||||
createVNode("span", { class: "h-px w-14 bg-line" })
|
||||
], 2)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .08 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) ssrRenderVNode(_push, createVNode(resolveDynamicComponent(`h${__props.level}`), {
|
||||
id: __props.headingId,
|
||||
class: "mt-3.5 sm:mt-5 text-2xl sm:text-3xl md:text-5xl font-black leading-tight sm:leading-[1.25] md:leading-[1.2]"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) ssrRenderSlot(_ctx.$slots, "title", {}, () => {
|
||||
if (__props.title) _push(ssrRenderComponent(Lines_default, { text: __props.title }, null, _parent, _scopeId));
|
||||
else _push(`<!---->`);
|
||||
if (__props.highlight) _push(`<!--[--><br${_scopeId}><span class="text-accent"${_scopeId}>${ssrInterpolate(__props.highlight)}</span><!--]-->`);
|
||||
else _push(`<!---->`);
|
||||
}, _push, _parent, _scopeId);
|
||||
else return [renderSlot(_ctx.$slots, "title", {}, () => [__props.title ? (openBlock(), createBlock(Lines_default, {
|
||||
key: 0,
|
||||
text: __props.title
|
||||
}, null, 8, ["text"])) : createCommentVNode("", true), __props.highlight ? (openBlock(), createBlock(Fragment, { key: 1 }, [createVNode("br"), createVNode("span", { class: "text-accent" }, toDisplayString(__props.highlight), 1)], 64)) : createCommentVNode("", true)])];
|
||||
}),
|
||||
_: 3
|
||||
}), _parent, _scopeId);
|
||||
else return [(openBlock(), createBlock(resolveDynamicComponent(`h${__props.level}`), {
|
||||
id: __props.headingId,
|
||||
class: "mt-3.5 sm:mt-5 text-2xl sm:text-3xl md:text-5xl font-black leading-tight sm:leading-[1.25] md:leading-[1.2]"
|
||||
}, {
|
||||
default: withCtx(() => [renderSlot(_ctx.$slots, "title", {}, () => [__props.title ? (openBlock(), createBlock(Lines_default, {
|
||||
key: 0,
|
||||
text: __props.title
|
||||
}, null, 8, ["text"])) : createCommentVNode("", true), __props.highlight ? (openBlock(), createBlock(Fragment, { key: 1 }, [createVNode("br"), createVNode("span", { class: "text-accent" }, toDisplayString(__props.highlight), 1)], 64)) : createCommentVNode("", true)])]),
|
||||
_: 3
|
||||
}, 8, ["id"]))];
|
||||
}),
|
||||
_: 3
|
||||
}, _parent));
|
||||
if (__props.desc) _push(ssrRenderComponent(Reveal_default, { delay: .16 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`<p class="${ssrRenderClass(`mt-3 sm:mt-5 max-w-xl text-xs sm:text-base leading-6 sm:leading-8 text-muted ${__props.center ? "mx-auto" : ""}`)}"${_scopeId}>${ssrInterpolate(__props.desc)}</p>`);
|
||||
else return [createVNode("p", { class: `mt-3 sm:mt-5 max-w-xl text-xs sm:text-base leading-6 sm:leading-8 text-muted ${__props.center ? "mx-auto" : ""}` }, toDisplayString(__props.desc), 3)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
else _push(`<!---->`);
|
||||
_push(`</div>`);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/ui/SectionHead.vue
|
||||
var _sfc_setup = SectionHead_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
SectionHead_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/SectionHead.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
var SectionHead_default = Object.assign(SectionHead_vue_vue_type_script_setup_true_lang_default, { __name: "UiSectionHead" });
|
||||
|
||||
export { Lines_default as L, Reveal_default as R, SectionHead_default as S };
|
||||
//# sourceMappingURL=SectionHead-n0GUJPlh.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SectionHead-n0GUJPlh.mjs","sources":["../../../../app/components/ui/Lines.vue","../../../../app/components/ui/Reveal.vue","../../../../app/components/ui/SectionHead.vue"],"names":["_unref","_ssrInterpolate","_ssrRenderComponent","_mergeProps","_withCtx","_renderSlot","_ssrRenderClass","_createVNode","_toDisplayString","Reveal","_resolveDynamicComponent","Lines","_openBlock","_createBlock","_Fragment"],"mappings":";;;;;;;;;;;;AAEA,EAAA,MAAM,KAAA,GAAQ,OAAA;AACd,EAAA,MAAM,QAAQ,QAAA,CAAA,MAAe,KAAA,CAAM,IAAA,CAAK,KAAA,CAAM,IAAI,CAAC,CAAA;;;AAInB,GAAA,aAAA,CAAAA,KAAAA,CAAA,KAAA,CAAA,EAAA,CAAZ,IAAA,EAAM,CAAA,KAAC;;AAA+B,IAAA,IAAA,IAAC,CAAA;;AAAW,IAAA,KAAA,CAAA,CAAA,EAAAC,cAAAA,CAAA,IAAI,CAAA,CAAA,QAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;ACJ1E,EAAA,MAAM,KAAA,GAAQ,OAAA;AACd,EAAA,MAAM,cAAc,QAAA,CAAA,MAAe,IAAA,CAAK,KAAA,CAAM,KAAA,EAAO,EAAE,CAAC,CAAA;;GAIlC,KAAA,CAAAC,kBAAAA,CAAAF,KAAAA,CAAA,MAAA,CAAA,CAAA,GAAA,EAAAG,UAAAA,CAAAH,KAAAA,CAAA,WAAA,CAAA,EAAW,MAAA,CAAA,EAAA;AAA/B,IAAA,OAAA,EAAAI,OAAAA,CAAAA,CAEa,CAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,KAAA;;kBADXC,UAAAA,CAAQ,IAAA,CAAA,MAAA,EAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CCaJ,KAAA,EAAO,OAAA,CAAA,MAAA,GAAM,aAAA,GAAA,EAAA;;AACjB,IAAA,OAAA,EAAAD,OAAAA,CAAAA,CAQS,CAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,KAAA;qCAPiCE,cAAAA,CAAA,CAAA,wBAAA,EAAA,OAAA,CAAA,MAAA,GAAM,gBAAA,GAAA,EAAA,CAAA,CAAA,CAAA,wJAGvCL,cAAAA,CAAA,OAAA,CAAA,GAAG,CAAA;kBAHVM,WAAAA,CAMM,OAAA,EANA,KAAA,EAAK,2BAA6B,OAAA,CAAA,MAAA,GAAM,mBAAA,EAAA,CAAA,CAAA;AAC5CA,MAAAA,WAAAA,CAAqD,MAAA,EAAA,EAA/C,KAAA,EAAM,+BAAA,IAAgC,IAAE,CAAA;MAC9CA,WAAAA,CAEO,MAAA,EAAA,EAFD,KAAA,EAAM,gDAAA,IAAgDC,eAAAA,CACvD,OAAA,CAAA,GAAG,CAAA,EAAA,CAAA,CAAA;AAERD,MAAAA,WAAAA,CAAkC,MAAA,EAAA,EAA5B,KAAA,EAAM,mBAAA,EAAmB;;;;;AAG1B,GAAA,KAAA,CAAAL,kBAAAA,CAAAO,cAAAA,EAAA,EAAA,KAAA,EAAO,KAAI,EAAA;AAApB,IAAA,OAAA,EAAAL,OAAAA,CAAAA,CAcS,CAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,KAAA;gBAZI,eAAA,KAAA,EAAAG,WAAAA,CAAAG,wBAAA,CAAA,CAAA,EAAA,OAAA,CAAA,OAAK,CAAA,EAAA;AACb,MAAA,EAAA,EAAI,OAAA,CAAA,SAAA;MACL,KAAA,EAAM;;AAHR,MAAA,OAAA,EAAAN,OAAAA,CAAAA,CAYY,CAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,KAAA;;AANK,QAAA,IAAA,OAAA,CAAA,KAAA,EAAQ,KAAA,CAAAF,kBAAAA,CAAAS,aAAAA,EAAA,EAAA,IAAA,EAAM,OAAA,CAAA,KAAA,EAAK,EAAA,IAAA,EAAA,OAAA,EAAA,QAAA,CAAA,CAAA;;AAChB,QAAA,IAAA,QAAA,SAAA,uEAEeV,cAAAA,CAAA,OAAA,CAAA,SAAS,CAAA;;;oBAJ1CI,UAAAA,CAMO,IAAA,CAAA,MAAA,EAAA,OAAA,EAAA,EAAA,EAAA,MAAA,CALQ,OAAA,CAAA,KAAA,IAAbO,SAAAA,EAAA,EAAAC,WAAAA,CAAoCF,aAAAA,EAAA;;AAAf,QAAA,IAAA,EAAM,OAAA,CAAA;8DACX,OAAA,CAAA,SAAA,IAAhBC,SAAAA,EAAA,EAAAC,WAAAA,CAGWC,UAAA,EAAA,GAAA,EAAA,CAAA,EAAA,EAAA,CAFTP,WAAAA,CAAM,IAAA,CAAA,EACNA,WAAAA,CAAgD,MAAA,EAAA,EAA1C,KAAA,EAAM,aAAA,EAAa,EAAAC,eAAAA,CAAI,OAAA,CAAA,SAAS,CAAA,EAAA,CAAA;;;;mBAT5CI,WAAA,EAAAC,WAAAA,CAYYH,wBAAA,CAAA,CAAA,EAXD,OAAA,CAAA,OAAK,CAAA,EAAA;AACb,MAAA,EAAA,EAAI,OAAA,CAAA,SAAA;MACL,KAAA,EAAM;;AAEN,MAAA,OAAA,EAAAN,OAAAA,CAAAA,MAMO,CANPC,UAAAA,CAMO,IAAA,CAAA,QAAA,OAAA,EAAA,EAAA,EAAA,MAAA,CALQ,OAAA,CAAA,KAAA,IAAbO,SAAAA,EAAA,EAAAC,YAAoCF,aAAAA,EAAA;;AAAf,OAAA,IAAA,EAAM,OAAA,CAAA;6DACX,OAAA,CAAA,SAAA,IAAhBC,SAAAA,EAAA,EAAAC,WAAAA,CAGWC,UAAA,EAAA,GAAA,EAAA,CAAA,EAAA,EAAA,CAFTP,WAAAA,CAAM,IAAA,CAAA,EACNA,WAAAA,CAAgD,MAAA,EAAA,EAA1C,KAAA,EAAM,aAAA,EAAa,EAAAC,eAAAA,CAAI,OAAA,CAAA,SAAS,CAAA,EAAA,CAAA;;;;;;GAKhC,IAAA,OAAA,CAAA,MAAO,KAAA,CAAAN,kBAAAA,CAAAO,gBAAA,EAAA,KAAA,EAAO,KAAI,EAAA;AAAhC,IAAA,OAAA,EAAAL,OAAAA,CAAAA,CAIS,CAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,KAAA;mCAHoFE,cAAAA,CAAA,CAAA,6EAAA,EAAA,OAAA,CAAA,MAAA,GAAM,SAAA,GAAA,EAAA,CAAA,CAAA,CAAA,gBAC5FL,cAAAA,CAAA,OAAA,CAAA,IAAI,CAAA;kBADTM,WAAAA,CAEI,GAAA,EAAA,EAFA,KAAA,EAAK,gFAAkF,OAAA,CAAA,MAAA,GAAM,SAAA,GAAA,EAAA,CAAA,CAAA,IAC5FC,eAAAA,CAAA,OAAA,CAAA,IAAI,CAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;"}
|
||||
@@ -0,0 +1,9 @@
|
||||
//#region app/components/ui/VuesaxIcon.vue?vue&type=style&index=0&scoped=ca18e3bd&inline&used&lang.css
|
||||
var VuesaxIcon_vue_vue_type_style_index_0_scoped_ca18e3bd_inline_used_lang_default = ".vx-icon[data-v-ca18e3bd]{color:inherit;vertical-align:-.15em;flex-shrink:0;justify-content:center;align-items:center;line-height:0;display:inline-flex}.vx-icon[data-v-ca18e3bd] svg{width:100%;height:100%;display:block}";
|
||||
|
||||
const VuesaxIconStyles_D5MiLdu2 = [
|
||||
VuesaxIcon_vue_vue_type_style_index_0_scoped_ca18e3bd_inline_used_lang_default
|
||||
];
|
||||
|
||||
export { VuesaxIconStyles_D5MiLdu2 as default };
|
||||
//# sourceMappingURL=VuesaxIcon-styles.D5MiLdu2.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"VuesaxIcon-styles.D5MiLdu2.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/VuesaxIcon-styles.D5MiLdu2.mjs"],"names":["style_0"],"mappings":"","x_google_ignoreList":[0]}
|
||||
@@ -0,0 +1,321 @@
|
||||
import { u as useRoute$1, a as useNuxtApp, c as useSiteStore, d as useAsyncData, e as createError, f as useAbsUrl, g as useHead, h as useSeoMeta, i as useJsonLd, j as categoryPageSchema, k as useSeoContext, N as NuxtLink, V as VuesaxIcon_default } from '../virtual/entry.mjs';
|
||||
import { f as faNum } from './motion-BvlOLZ1k.mjs';
|
||||
import { R as Reveal_default, S as SectionHead_default } from './SectionHead-n0GUJPlh.mjs';
|
||||
import { defineComponent, withAsyncContext, ref, computed, unref, withCtx, createTextVNode, createVNode, toDisplayString, openBlock, createBlock, createCommentVNode, Fragment, renderList, useSSRContext } from 'vue';
|
||||
import { ssrRenderAttrs, ssrRenderAttr, ssrRenderComponent, ssrInterpolate, ssrRenderClass, ssrRenderList } from 'vue/server-renderer';
|
||||
import 'vue-router';
|
||||
import 'pinia';
|
||||
import 'node:module';
|
||||
import 'node:buffer';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:zlib';
|
||||
import 'node:stream';
|
||||
import 'node:util';
|
||||
import 'node:url';
|
||||
import 'node:net';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import '../routes/renderer.mjs';
|
||||
import '../_/nitro.mjs';
|
||||
import 'unhead/server';
|
||||
import 'unhead/legacy';
|
||||
import 'unhead/plugins';
|
||||
import 'node:events';
|
||||
import 'node:crypto';
|
||||
import 'nostics';
|
||||
import 'vue-bundle-renderer/runtime';
|
||||
import 'devalue';
|
||||
import '../_/site.mjs';
|
||||
import 'motion-v';
|
||||
|
||||
//#region app/pages/categories/[slug].vue?vue&type=script&setup=true&lang.ts
|
||||
var _slug__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "[slug]",
|
||||
__ssrInlineRender: true,
|
||||
async setup(__props) {
|
||||
let __temp, __restore;
|
||||
const slug = useRoute$1().params.slug;
|
||||
const { $api } = useNuxtApp();
|
||||
const site = useSiteStore();
|
||||
const { data, error } = ([__temp, __restore] = withAsyncContext(() => useAsyncData(`category:${slug}`, () => $api(`/public/categories/${encodeURIComponent(slug)}`))), __temp = await __temp, __restore(), __temp);
|
||||
if (error.value || !data.value) {
|
||||
const notFound = error.value?.statusCode === 404;
|
||||
throw createError({
|
||||
statusCode: notFound ? 404 : 500,
|
||||
statusMessage: notFound ? "دستهبندی یافت نشد" : "خطا در دریافت اطلاعات",
|
||||
fatal: true
|
||||
});
|
||||
}
|
||||
const category = data.value;
|
||||
const categoryIndex = site.categories.findIndex((c) => c.slug === slug);
|
||||
const canonical = useAbsUrl()(`/categories/${slug}`);
|
||||
const description = category.seoDescription || category.fullDesc;
|
||||
useHead({
|
||||
title: category.seoTitle || category.name,
|
||||
link: [{
|
||||
rel: "canonical",
|
||||
href: canonical
|
||||
}]
|
||||
});
|
||||
useSeoMeta({
|
||||
description,
|
||||
robots: "index, follow",
|
||||
ogUrl: canonical,
|
||||
ogTitle: `${category.seoTitle || category.name} | ${site.settings.name}`,
|
||||
ogDescription: description
|
||||
});
|
||||
useJsonLd(categoryPageSchema(useSeoContext(), category), `category-${slug}`);
|
||||
const activeGroup = ref(null);
|
||||
const visibleProducts = computed(() => activeGroup.value ? category.products.filter((p) => p.group === activeGroup.value) : category.products);
|
||||
const activeGroupDesc = computed(() => category.groups?.find((g) => g.slug === activeGroup.value)?.desc);
|
||||
const groupCount = (g) => category.products.filter((p) => p.group === g).length;
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
const _component_NuxtLink = NuxtLink;
|
||||
_push(`<main${ssrRenderAttrs(_attrs)}><section class="relative overflow-hidden pt-32 pb-20 md:pt-40 md:pb-28"><div class="absolute inset-0">`);
|
||||
if (unref(category).coverImage) _push(`<img${ssrRenderAttr("src", unref(category).coverImage)}${ssrRenderAttr("alt", unref(category).name)} class="absolute inset-0 size-full object-cover" fetchpriority="high" decoding="async">`);
|
||||
else _push(`<!---->`);
|
||||
_push(`<div class="absolute inset-0 bg-gradient-to-l from-bg via-bg/85 to-bg/40"></div><div class="absolute inset-0 bg-gradient-to-t from-bg via-bg/50 to-bg/30"></div><div class="absolute inset-0 bg-grid opacity-40"></div></div><div class="tape-v absolute bottom-0 end-0 z-10 h-32 w-1.5 opacity-70"></div><div class="relative z-10 mx-auto max-w-[1480px] px-5 md:px-8">`);
|
||||
_push(ssrRenderComponent(Reveal_default, null, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<nav class="flex items-center gap-2 text-sm text-muted" aria-label="مسیر"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/",
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`خانه`);
|
||||
else return [createTextVNode("خانه")];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
_push(`<span class="text-line"${_scopeId}>/</span>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/#products",
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(` محصولات `);
|
||||
else return [createTextVNode(" محصولات ")];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
_push(`<span class="text-line"${_scopeId}>/</span><span class="text-ink"${_scopeId}>${ssrInterpolate(unref(category).name)}</span></nav>`);
|
||||
} else return [createVNode("nav", {
|
||||
class: "flex items-center gap-2 text-sm text-muted",
|
||||
"aria-label": "مسیر"
|
||||
}, [
|
||||
createVNode(_component_NuxtLink, {
|
||||
to: "/",
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode("خانه")]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode("span", { class: "text-line" }, "/"),
|
||||
createVNode(_component_NuxtLink, {
|
||||
to: "/#products",
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode(" محصولات ")]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode("span", { class: "text-line" }, "/"),
|
||||
createVNode("span", { class: "text-ink" }, toDisplayString(unref(category).name), 1)
|
||||
])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`<div class="mt-8">`);
|
||||
_push(ssrRenderComponent(SectionHead_default, {
|
||||
tag: `${("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(unref(categoryIndex) + 1).padStart(2, "0"))} — محصولات`,
|
||||
desc: unref(category).fullDesc,
|
||||
level: 1
|
||||
}, {
|
||||
title: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`${ssrInterpolate(unref(category).name)}`);
|
||||
else return [createTextVNode(toDisplayString(unref(category).name), 1)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div>`);
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .2 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`<div class="mt-8 flex flex-wrap items-center gap-4"${_scopeId}><span class="rounded-full border border-accent/40 bg-accent/10 px-4 py-1.5 font-mono text-xs text-accent backdrop-blur"${_scopeId}>${ssrInterpolate(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(unref(category).products.length))} محصول </span><span class="font-mono text-xs tracking-[0.25em] text-muted/60"${_scopeId}>${ssrInterpolate(unref(category).nameEn)}</span></div>`);
|
||||
else return [createVNode("div", { class: "mt-8 flex flex-wrap items-center gap-4" }, [createVNode("span", { class: "rounded-full border border-accent/40 bg-accent/10 px-4 py-1.5 font-mono text-xs text-accent backdrop-blur" }, toDisplayString(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(unref(category).products.length)) + " محصول ", 1), createVNode("span", { class: "font-mono text-xs tracking-[0.25em] text-muted/60" }, toDisplayString(unref(category).nameEn), 1)])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div></section><section class="relative py-16 md:py-24"><div class="absolute inset-0 bg-grid-fine opacity-30"></div><div class="relative mx-auto max-w-[1480px] px-5 md:px-8">`);
|
||||
if (unref(category).groups?.length) {
|
||||
_push(`<div class="mb-10"><div class="flex flex-wrap gap-2" role="tablist" aria-label="فیلتر زیردسته"><button type="button" role="tab"${ssrRenderAttr("aria-selected", unref(activeGroup) === null)} class="${ssrRenderClass([unref(activeGroup) === null ? "border-accent bg-accent text-bg font-bold" : "border-line text-muted hover:border-accent/60 hover:text-accent", "rounded-full border px-4 py-2 text-sm transition-colors"])}"> همه <span class="ms-1 font-mono text-xs opacity-70">${ssrInterpolate(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(unref(category).products.length))}</span></button><!--[-->`);
|
||||
ssrRenderList(unref(category).groups, (g) => {
|
||||
_push(`<button type="button" role="tab"${ssrRenderAttr("aria-selected", unref(activeGroup) === g.slug)} class="${ssrRenderClass([unref(activeGroup) === g.slug ? "border-accent bg-accent text-bg font-bold" : "border-line text-muted hover:border-accent/60 hover:text-accent", "rounded-full border px-4 py-2 text-sm transition-colors"])}">${ssrInterpolate(g.name)} <span class="ms-1 font-mono text-xs opacity-70">${ssrInterpolate(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(groupCount(g.slug)))}</span></button>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
if (unref(activeGroupDesc)) _push(`<p class="mt-4 text-sm text-muted">${ssrInterpolate(unref(activeGroupDesc))}</p>`);
|
||||
else _push(`<!---->`);
|
||||
_push(`</div>`);
|
||||
} else _push(`<!---->`);
|
||||
_push(`<div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3"><!--[-->`);
|
||||
ssrRenderList(unref(visibleProducts), (product, i) => {
|
||||
_push(ssrRenderComponent(Reveal_default, {
|
||||
key: product.code,
|
||||
delay: i * .06
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: `/products/${product.slug}`,
|
||||
class: "group flex h-full flex-col overflow-hidden rounded-xl border border-line bg-panel/80 backdrop-blur transition-all duration-500 hover:border-accent/40 hover:shadow-[0_8px_40px_rgba(255,90,0,0.08)]"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="${ssrRenderClass([product.image && "bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.14),transparent_70%)]", "relative aspect-[4/3] overflow-hidden"])}"${_scopeId}><img${ssrRenderAttr("src", product.image ?? unref(category).coverImage ?? void 0)}${ssrRenderAttr("alt", product.name)} loading="lazy" decoding="async" class="${ssrRenderClass([product.image ? "object-contain p-8" : "object-cover", "size-full transition-transform duration-700 group-hover:scale-105"])}"${_scopeId}>`);
|
||||
if (!product.image) _push(`<div class="absolute inset-0 bg-gradient-to-t from-bg/60 to-transparent"${_scopeId}></div>`);
|
||||
else _push(`<!---->`);
|
||||
_push(`<div class="absolute inset-x-0 top-0 flex items-center justify-between p-4"${_scopeId}><span class="rounded-full bg-bg/60 px-3 py-1 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur"${_scopeId}>${ssrInterpolate(product.code)}</span><span class="font-mono text-xs text-accent"${_scopeId}>${ssrInterpolate(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(i + 1).padStart(2, "0")))}</span></div></div><div class="flex flex-1 flex-col p-5 md:p-6"${_scopeId}><h3 class="text-xl font-black transition-colors group-hover:text-accent"${_scopeId}>${ssrInterpolate(product.name)}</h3><p class="mt-1 font-mono text-[10px] tracking-[0.2em] text-muted"${_scopeId}>${ssrInterpolate(product.nameEn)}</p><p class="mt-3 text-sm leading-8 text-muted"${_scopeId}>${ssrInterpolate(product.desc)}</p><div class="mt-4 flex flex-wrap gap-2"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(product.specs, (s) => {
|
||||
_push(`<span class="rounded-full border border-accent/40 bg-accent/10 px-3 py-1 font-mono text-[10px] text-accent"${_scopeId}>${ssrInterpolate(s)}</span>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
if (product.variants?.length) {
|
||||
_push(`<div class="mt-4"${_scopeId}><div class="mb-2 text-xs text-muted"${_scopeId}>مدلها / رنگها:</div><div class="flex flex-wrap gap-1.5"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(product.variants, (v) => {
|
||||
_push(`<span class="rounded-md border border-line bg-panel-2 px-2.5 py-1 text-[11px] text-ink/70"${_scopeId}>${ssrInterpolate(v)}</span>`);
|
||||
});
|
||||
_push(`<!--]--></div></div>`);
|
||||
} else _push(`<!---->`);
|
||||
_push(`<span class="mt-auto inline-flex items-center gap-2 pt-5 text-sm font-bold text-accent"${_scopeId}> مشاهده جزئیات `);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-4 transition-transform group-hover:-translate-x-1"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</span></div>`);
|
||||
} else return [createVNode("div", { class: ["relative aspect-[4/3] overflow-hidden", product.image && "bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.14),transparent_70%)]"] }, [
|
||||
createVNode("img", {
|
||||
src: product.image ?? unref(category).coverImage ?? void 0,
|
||||
alt: product.name,
|
||||
loading: "lazy",
|
||||
decoding: "async",
|
||||
class: ["size-full transition-transform duration-700 group-hover:scale-105", product.image ? "object-contain p-8" : "object-cover"]
|
||||
}, null, 10, ["src", "alt"]),
|
||||
!product.image ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "absolute inset-0 bg-gradient-to-t from-bg/60 to-transparent"
|
||||
})) : createCommentVNode("", true),
|
||||
createVNode("div", { class: "absolute inset-x-0 top-0 flex items-center justify-between p-4" }, [createVNode("span", { class: "rounded-full bg-bg/60 px-3 py-1 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur" }, toDisplayString(product.code), 1), createVNode("span", { class: "font-mono text-xs text-accent" }, toDisplayString(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(i + 1).padStart(2, "0"))), 1)])
|
||||
], 2), createVNode("div", { class: "flex flex-1 flex-col p-5 md:p-6" }, [
|
||||
createVNode("h3", { class: "text-xl font-black transition-colors group-hover:text-accent" }, toDisplayString(product.name), 1),
|
||||
createVNode("p", { class: "mt-1 font-mono text-[10px] tracking-[0.2em] text-muted" }, toDisplayString(product.nameEn), 1),
|
||||
createVNode("p", { class: "mt-3 text-sm leading-8 text-muted" }, toDisplayString(product.desc), 1),
|
||||
createVNode("div", { class: "mt-4 flex flex-wrap gap-2" }, [(openBlock(true), createBlock(Fragment, null, renderList(product.specs, (s) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: s,
|
||||
class: "rounded-full border border-accent/40 bg-accent/10 px-3 py-1 font-mono text-[10px] text-accent"
|
||||
}, toDisplayString(s), 1);
|
||||
}), 128))]),
|
||||
product.variants?.length ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "mt-4"
|
||||
}, [createVNode("div", { class: "mb-2 text-xs text-muted" }, "مدلها / رنگها:"), createVNode("div", { class: "flex flex-wrap gap-1.5" }, [(openBlock(true), createBlock(Fragment, null, renderList(product.variants, (v) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: v,
|
||||
class: "rounded-md border border-line bg-panel-2 px-2.5 py-1 text-[11px] text-ink/70"
|
||||
}, toDisplayString(v), 1);
|
||||
}), 128))])])) : createCommentVNode("", true),
|
||||
createVNode("span", { class: "mt-auto inline-flex items-center gap-2 pt-5 text-sm font-bold text-accent" }, [createTextVNode(" مشاهده جزئیات "), createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-4 transition-transform group-hover:-translate-x-1"
|
||||
})])
|
||||
])];
|
||||
}),
|
||||
_: 2
|
||||
}, _parent, _scopeId));
|
||||
else return [createVNode(_component_NuxtLink, {
|
||||
to: `/products/${product.slug}`,
|
||||
class: "group flex h-full flex-col overflow-hidden rounded-xl border border-line bg-panel/80 backdrop-blur transition-all duration-500 hover:border-accent/40 hover:shadow-[0_8px_40px_rgba(255,90,0,0.08)]"
|
||||
}, {
|
||||
default: withCtx(() => [createVNode("div", { class: ["relative aspect-[4/3] overflow-hidden", product.image && "bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.14),transparent_70%)]"] }, [
|
||||
createVNode("img", {
|
||||
src: product.image ?? unref(category).coverImage ?? void 0,
|
||||
alt: product.name,
|
||||
loading: "lazy",
|
||||
decoding: "async",
|
||||
class: ["size-full transition-transform duration-700 group-hover:scale-105", product.image ? "object-contain p-8" : "object-cover"]
|
||||
}, null, 10, ["src", "alt"]),
|
||||
!product.image ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "absolute inset-0 bg-gradient-to-t from-bg/60 to-transparent"
|
||||
})) : createCommentVNode("", true),
|
||||
createVNode("div", { class: "absolute inset-x-0 top-0 flex items-center justify-between p-4" }, [createVNode("span", { class: "rounded-full bg-bg/60 px-3 py-1 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur" }, toDisplayString(product.code), 1), createVNode("span", { class: "font-mono text-xs text-accent" }, toDisplayString(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(i + 1).padStart(2, "0"))), 1)])
|
||||
], 2), createVNode("div", { class: "flex flex-1 flex-col p-5 md:p-6" }, [
|
||||
createVNode("h3", { class: "text-xl font-black transition-colors group-hover:text-accent" }, toDisplayString(product.name), 1),
|
||||
createVNode("p", { class: "mt-1 font-mono text-[10px] tracking-[0.2em] text-muted" }, toDisplayString(product.nameEn), 1),
|
||||
createVNode("p", { class: "mt-3 text-sm leading-8 text-muted" }, toDisplayString(product.desc), 1),
|
||||
createVNode("div", { class: "mt-4 flex flex-wrap gap-2" }, [(openBlock(true), createBlock(Fragment, null, renderList(product.specs, (s) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: s,
|
||||
class: "rounded-full border border-accent/40 bg-accent/10 px-3 py-1 font-mono text-[10px] text-accent"
|
||||
}, toDisplayString(s), 1);
|
||||
}), 128))]),
|
||||
product.variants?.length ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "mt-4"
|
||||
}, [createVNode("div", { class: "mb-2 text-xs text-muted" }, "مدلها / رنگها:"), createVNode("div", { class: "flex flex-wrap gap-1.5" }, [(openBlock(true), createBlock(Fragment, null, renderList(product.variants, (v) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: v,
|
||||
class: "rounded-md border border-line bg-panel-2 px-2.5 py-1 text-[11px] text-ink/70"
|
||||
}, toDisplayString(v), 1);
|
||||
}), 128))])])) : createCommentVNode("", true),
|
||||
createVNode("span", { class: "mt-auto inline-flex items-center gap-2 pt-5 text-sm font-bold text-accent" }, [createTextVNode(" مشاهده جزئیات "), createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-4 transition-transform group-hover:-translate-x-1"
|
||||
})])
|
||||
])]),
|
||||
_: 2
|
||||
}, 1032, ["to"])];
|
||||
}),
|
||||
_: 2
|
||||
}, _parent));
|
||||
});
|
||||
_push(`<!--]--></div></div></section><section class="border-t border-line py-12 md:py-16"><div class="mx-auto flex max-w-[1480px] flex-wrap items-center justify-between gap-6 px-5 md:px-8">`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/#products",
|
||||
class: "group inline-flex items-center gap-2 text-muted transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-right",
|
||||
class: "size-4 transition-transform group-hover:translate-x-1"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(` بازگشت به دستهبندیها `);
|
||||
} else return [createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-right",
|
||||
class: "size-4 transition-transform group-hover:translate-x-1"
|
||||
}), createTextVNode(" بازگشت به دستهبندیها ")];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`<a href="/#contact" class="inline-flex items-center gap-2 rounded-full bg-accent px-6 py-3 text-sm font-bold text-bg transition-all hover:bg-accent-soft hover:shadow-[0_8px_45px_rgba(255,90,0,0.5)]">`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4"
|
||||
}, null, _parent));
|
||||
_push(` درخواست قیمت </a></div></section></main>`);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/pages/categories/[slug].vue
|
||||
var _sfc_setup = _slug__vue_vue_type_script_setup_true_lang_default.setup;
|
||||
_slug__vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/categories/[slug].vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
var _slug__default = _slug__vue_vue_type_script_setup_true_lang_default;
|
||||
|
||||
export { _slug__default as default };
|
||||
//# sourceMappingURL=_slug_-B1b2FwF6.mjs.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,914 @@
|
||||
import { u as useRoute$1, a as useNuxtApp, c as useSiteStore, d as useAsyncData, e as createError, f as useAbsUrl, g as useHead, h as useSeoMeta, k as useSeoContext, i as useJsonLd, p as productSchema, l as breadcrumbSchema, N as NuxtLink, V as VuesaxIcon_default, C as ClientOnly } from '../virtual/entry.mjs';
|
||||
import { f as faNum } from './motion-BvlOLZ1k.mjs';
|
||||
import { R as Reveal_default, S as SectionHead_default } from './SectionHead-n0GUJPlh.mjs';
|
||||
import { u as useContactStore, D as DynamicIcon_default } from './contact-DBTK0GHP.mjs';
|
||||
import { defineComponent, withAsyncContext, ref, computed, watch, withCtx, createTextVNode, unref, toDisplayString, createVNode, Transition, openBlock, createBlock, createCommentVNode, Fragment, renderList, useSSRContext } from 'vue';
|
||||
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderClass, ssrRenderAttr, ssrRenderList, ssrRenderStyle } from 'vue/server-renderer';
|
||||
import 'vue-router';
|
||||
import 'pinia';
|
||||
import 'node:module';
|
||||
import 'node:buffer';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:zlib';
|
||||
import 'node:stream';
|
||||
import 'node:util';
|
||||
import 'node:url';
|
||||
import 'node:net';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import '../routes/renderer.mjs';
|
||||
import '../_/nitro.mjs';
|
||||
import 'unhead/server';
|
||||
import 'unhead/legacy';
|
||||
import 'unhead/plugins';
|
||||
import 'node:events';
|
||||
import 'node:crypto';
|
||||
import 'nostics';
|
||||
import 'vue-bundle-renderer/runtime';
|
||||
import 'devalue';
|
||||
import '../_/site.mjs';
|
||||
import 'motion-v';
|
||||
|
||||
//#region app/pages/products/[slug].vue?vue&type=script&setup=true&lang.ts
|
||||
var _slug__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "[slug]",
|
||||
__ssrInlineRender: true,
|
||||
async setup(__props) {
|
||||
let __temp, __restore;
|
||||
const slug = useRoute$1().params.slug;
|
||||
const { $api } = useNuxtApp();
|
||||
const site = useSiteStore();
|
||||
const contact = useContactStore();
|
||||
const { data, error } = ([__temp, __restore] = withAsyncContext(() => useAsyncData(`product:${slug}`, () => $api(`/public/products/${encodeURIComponent(slug)}`))), __temp = await __temp, __restore(), __temp);
|
||||
if (error.value || !data.value) {
|
||||
const notFound = error.value?.statusCode === 404;
|
||||
throw createError({
|
||||
statusCode: notFound ? 404 : 500,
|
||||
statusMessage: notFound ? "محصول یافت نشد" : "خطا در دریافت اطلاعات",
|
||||
fatal: true
|
||||
});
|
||||
}
|
||||
const product = data.value;
|
||||
const categoryPath = `/categories/${product.category.slug}`;
|
||||
const ownImages = product.images.length > 0;
|
||||
const images = ownImages ? product.images : product.category.coverImage ? [{
|
||||
url: product.category.coverImage,
|
||||
alt: product.name,
|
||||
width: null,
|
||||
height: null
|
||||
}] : [];
|
||||
const active = ref(0);
|
||||
const current = computed(() => images[active.value]);
|
||||
const go = (step) => {
|
||||
active.value = (active.value + step + images.length) % images.length;
|
||||
};
|
||||
const lightbox = ref(false);
|
||||
watch(lightbox, (open) => {
|
||||
(void 0).body.style.overflow = open ? "hidden" : "";
|
||||
});
|
||||
/** a blank line in the admin text starts a new paragraph */
|
||||
const paragraphs = product.details.split(/\n\s*\n/).map((p) => p.trim()).filter(Boolean);
|
||||
const facts = [
|
||||
{
|
||||
label: "برند",
|
||||
value: product.brand
|
||||
},
|
||||
{
|
||||
label: "کشور سازنده",
|
||||
value: product.origin
|
||||
},
|
||||
{
|
||||
label: "بستهبندی",
|
||||
value: product.packaging
|
||||
},
|
||||
{
|
||||
label: "حداقل سفارش",
|
||||
value: product.minOrder
|
||||
}
|
||||
].filter((f) => f.value);
|
||||
const specRows = [
|
||||
{
|
||||
name: "کد محصول",
|
||||
value: product.code,
|
||||
ltr: true
|
||||
},
|
||||
{
|
||||
name: "دسته",
|
||||
value: product.category.name
|
||||
},
|
||||
...product.groupName ? [{
|
||||
name: "زیرگروه",
|
||||
value: product.groupName
|
||||
}] : [],
|
||||
...product.brand ? [{
|
||||
name: "برند",
|
||||
value: product.brand
|
||||
}] : [],
|
||||
...product.origin ? [{
|
||||
name: "کشور سازنده",
|
||||
value: product.origin
|
||||
}] : [],
|
||||
...product.attributes,
|
||||
...product.standards.length ? [{
|
||||
name: "استانداردها",
|
||||
value: product.standards.join("، "),
|
||||
ltr: true
|
||||
}] : [],
|
||||
...product.sizes.length ? [{
|
||||
name: "سایزها",
|
||||
value: product.sizes.join("، ")
|
||||
}] : [],
|
||||
...product.variants.length ? [{
|
||||
name: "مدلها / رنگها",
|
||||
value: product.variants.join("، ")
|
||||
}] : [],
|
||||
...product.packaging ? [{
|
||||
name: "بستهبندی",
|
||||
value: product.packaging
|
||||
}] : [],
|
||||
...product.minOrder ? [{
|
||||
name: "حداقل سفارش",
|
||||
value: product.minOrder
|
||||
}] : []
|
||||
];
|
||||
const trust = computed(() => site.sections.productsIntro.trust);
|
||||
const settings = computed(() => site.settings);
|
||||
/** fills the contact form on the home page with this product, then scrolls to it */
|
||||
const requestQuote = () => contact.prefill(`درخواست قیمت و موجودی:\n${product.name} — کد ${product.code}`);
|
||||
const absUrl = useAbsUrl();
|
||||
const canonical = absUrl(`/products/${slug}`);
|
||||
const title = product.seoTitle || product.name;
|
||||
const description = (product.seoDescription || product.desc || paragraphs[0] || product.category.fullDesc).slice(0, 300);
|
||||
useHead({
|
||||
title,
|
||||
link: [{
|
||||
rel: "canonical",
|
||||
href: canonical
|
||||
}, ...images[0] ? [{
|
||||
rel: "preload",
|
||||
as: "image",
|
||||
href: images[0].url
|
||||
}] : []]
|
||||
});
|
||||
useSeoMeta({
|
||||
description,
|
||||
robots: "index, follow",
|
||||
ogUrl: canonical,
|
||||
ogTitle: `${title} | ${site.settings.name}`,
|
||||
ogDescription: description,
|
||||
...images[0] && {
|
||||
ogImage: absUrl(images[0].url),
|
||||
ogImageAlt: images[0].alt,
|
||||
twitterImage: absUrl(images[0].url)
|
||||
}
|
||||
});
|
||||
const seo = useSeoContext();
|
||||
useJsonLd([productSchema(seo, product), breadcrumbSchema(seo, [
|
||||
{
|
||||
name: "خانه",
|
||||
path: "/"
|
||||
},
|
||||
{
|
||||
name: product.category.name,
|
||||
path: categoryPath
|
||||
},
|
||||
{
|
||||
name: product.name,
|
||||
path: `/products/${slug}`
|
||||
}
|
||||
])], `product-${slug}`);
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
const _component_NuxtLink = NuxtLink;
|
||||
const _component_ClientOnly = ClientOnly;
|
||||
_push(`<main${ssrRenderAttrs(_attrs)}><section class="relative overflow-hidden pt-28 pb-16 md:pt-36 md:pb-24"><div class="absolute inset-0 bg-grid opacity-30"></div><div class="tape-v absolute bottom-0 end-0 z-10 h-32 w-1.5 opacity-70"></div><div class="relative mx-auto max-w-[1480px] px-5 md:px-8">`);
|
||||
_push(ssrRenderComponent(Reveal_default, null, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<nav class="flex flex-wrap items-center gap-2 text-sm text-muted" aria-label="مسیر"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/",
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`خانه`);
|
||||
else return [createTextVNode("خانه")];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
_push(`<span class="text-line"${_scopeId}>/</span>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/#products",
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`محصولات`);
|
||||
else return [createTextVNode("محصولات")];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
_push(`<span class="text-line"${_scopeId}>/</span>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: categoryPath,
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`${ssrInterpolate(unref(product).category.name)}`);
|
||||
else return [createTextVNode(toDisplayString(unref(product).category.name), 1)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
_push(`<span class="text-line"${_scopeId}>/</span><span class="text-ink"${_scopeId}>${ssrInterpolate(unref(product).name)}</span></nav>`);
|
||||
} else return [createVNode("nav", {
|
||||
class: "flex flex-wrap items-center gap-2 text-sm text-muted",
|
||||
"aria-label": "مسیر"
|
||||
}, [
|
||||
createVNode(_component_NuxtLink, {
|
||||
to: "/",
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode("خانه")]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode("span", { class: "text-line" }, "/"),
|
||||
createVNode(_component_NuxtLink, {
|
||||
to: "/#products",
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode("محصولات")]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode("span", { class: "text-line" }, "/"),
|
||||
createVNode(_component_NuxtLink, {
|
||||
to: categoryPath,
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode(toDisplayString(unref(product).category.name), 1)]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode("span", { class: "text-line" }, "/"),
|
||||
createVNode("span", { class: "text-ink" }, toDisplayString(unref(product).name), 1)
|
||||
])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`<div class="mt-8 grid gap-10 lg:grid-cols-12 lg:gap-14">`);
|
||||
_push(ssrRenderComponent(Reveal_default, {
|
||||
class: "lg:col-span-6",
|
||||
delay: .08
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="relative"${_scopeId}><div class="hazard absolute -top-3 -end-3 z-10 h-6 w-28 rounded-full opacity-90"${_scopeId}></div><div class="relative overflow-hidden rounded-2xl border border-line bg-panel/80"${_scopeId}><div class="${ssrRenderClass([ownImages && "bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.16),transparent_70%)]", "group relative aspect-square overflow-hidden"])}"${_scopeId}>`);
|
||||
if (unref(current)) _push(`<img${ssrRenderAttr("src", unref(current).url)}${ssrRenderAttr("alt", unref(current).alt)}${ssrRenderAttr("width", unref(current).width ?? void 0)}${ssrRenderAttr("height", unref(current).height ?? void 0)} fetchpriority="high" decoding="async" class="${ssrRenderClass([ownImages ? "object-contain p-10 md:p-16" : "object-cover", "size-full"])}"${_scopeId}>`);
|
||||
else _push(`<!---->`);
|
||||
if (!ownImages) _push(`<div class="absolute inset-0 bg-gradient-to-t from-bg/70 to-transparent"${_scopeId}></div>`);
|
||||
else _push(`<!---->`);
|
||||
_push(`<div class="absolute inset-x-0 top-0 flex items-center justify-between p-4 md:p-5"${_scopeId}><span class="rounded-full bg-bg/60 px-3 py-1 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur"${_scopeId}>${ssrInterpolate(unref(product).code)}</span>`);
|
||||
if (unref(images).length > 1) _push(`<span class="font-mono text-xs text-accent"${_scopeId}>${ssrInterpolate(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(unref(active) + 1).padStart(2, "0")))} / ${ssrInterpolate(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(unref(images).length).padStart(2, "0")))}</span>`);
|
||||
else _push(`<!---->`);
|
||||
_push(`</div>`);
|
||||
if (unref(current)) {
|
||||
_push(`<button type="button" aria-label="نمایش بزرگ تصویر" class="absolute bottom-4 start-4 flex size-11 items-center justify-center rounded-full border border-line bg-bg/70 text-ink/80 backdrop-blur transition-colors hover:border-accent hover:text-accent"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "maximize-4",
|
||||
class: "size-4"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</button>`);
|
||||
} else _push(`<!---->`);
|
||||
if (unref(images).length > 1) {
|
||||
_push(`<!--[--><button type="button" aria-label="تصویر قبلی" class="absolute start-4 top-1/2 flex size-11 -translate-y-1/2 items-center justify-center rounded-full border border-line bg-bg/70 text-ink/80 opacity-0 backdrop-blur transition-all hover:border-accent hover:text-accent group-hover:opacity-100 max-md:opacity-100"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-right-1",
|
||||
class: "size-5"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</button><button type="button" aria-label="تصویر بعدی" class="absolute end-4 top-1/2 flex size-11 -translate-y-1/2 items-center justify-center rounded-full border border-line bg-bg/70 text-ink/80 opacity-0 backdrop-blur transition-all hover:border-accent hover:text-accent group-hover:opacity-100 max-md:opacity-100"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-left-1",
|
||||
class: "size-5"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</button><!--]-->`);
|
||||
} else _push(`<!---->`);
|
||||
_push(`</div></div>`);
|
||||
if (unref(images).length > 1) {
|
||||
_push(`<div class="mt-4 flex gap-3 overflow-x-auto pb-1"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(images), (img, i) => {
|
||||
_push(`<button type="button"${ssrRenderAttr("aria-label", `تصویر ${("faNum" in _ctx ? _ctx.faNum : unref(faNum))(i + 1)}`)}${ssrRenderAttr("aria-current", i === unref(active))} class="${ssrRenderClass([i === unref(active) ? "border-accent shadow-[0_0_24px_rgba(255,90,0,0.25)]" : "border-line opacity-60 hover:opacity-100", "size-20 shrink-0 overflow-hidden rounded-xl border bg-panel/80 transition-all md:size-24"])}"${_scopeId}><img${ssrRenderAttr("src", img.url)}${ssrRenderAttr("alt", img.alt)} loading="lazy" class="size-full object-contain p-2"${_scopeId}></button>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
} else _push(`<!---->`);
|
||||
_push(`</div>`);
|
||||
} else return [createVNode("div", { class: "relative" }, [
|
||||
createVNode("div", { class: "hazard absolute -top-3 -end-3 z-10 h-6 w-28 rounded-full opacity-90" }),
|
||||
createVNode("div", { class: "relative overflow-hidden rounded-2xl border border-line bg-panel/80" }, [createVNode("div", { class: ["group relative aspect-square overflow-hidden", ownImages && "bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.16),transparent_70%)]"] }, [
|
||||
createVNode(Transition, {
|
||||
"enter-active-class": "transition duration-500 ease-out",
|
||||
"enter-from-class": "opacity-0 scale-[0.97]",
|
||||
"leave-active-class": "absolute inset-0 transition duration-200",
|
||||
"leave-to-class": "opacity-0"
|
||||
}, {
|
||||
default: withCtx(() => [unref(current) ? (openBlock(), createBlock("img", {
|
||||
key: unref(current).url,
|
||||
src: unref(current).url,
|
||||
alt: unref(current).alt,
|
||||
width: unref(current).width ?? void 0,
|
||||
height: unref(current).height ?? void 0,
|
||||
fetchpriority: "high",
|
||||
decoding: "async",
|
||||
class: ["size-full", ownImages ? "object-contain p-10 md:p-16" : "object-cover"]
|
||||
}, null, 10, [
|
||||
"src",
|
||||
"alt",
|
||||
"width",
|
||||
"height"
|
||||
])) : createCommentVNode("", true)]),
|
||||
_: 1
|
||||
}),
|
||||
!ownImages ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "absolute inset-0 bg-gradient-to-t from-bg/70 to-transparent"
|
||||
})) : createCommentVNode("", true),
|
||||
createVNode("div", { class: "absolute inset-x-0 top-0 flex items-center justify-between p-4 md:p-5" }, [createVNode("span", { class: "rounded-full bg-bg/60 px-3 py-1 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur" }, toDisplayString(unref(product).code), 1), unref(images).length > 1 ? (openBlock(), createBlock("span", {
|
||||
key: 0,
|
||||
class: "font-mono text-xs text-accent"
|
||||
}, toDisplayString(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(unref(active) + 1).padStart(2, "0"))) + " / " + toDisplayString(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(unref(images).length).padStart(2, "0"))), 1)) : createCommentVNode("", true)]),
|
||||
unref(current) ? (openBlock(), createBlock("button", {
|
||||
key: 1,
|
||||
type: "button",
|
||||
"aria-label": "نمایش بزرگ تصویر",
|
||||
class: "absolute bottom-4 start-4 flex size-11 items-center justify-center rounded-full border border-line bg-bg/70 text-ink/80 backdrop-blur transition-colors hover:border-accent hover:text-accent",
|
||||
onClick: ($event) => lightbox.value = true
|
||||
}, [createVNode(VuesaxIcon_default, {
|
||||
name: "maximize-4",
|
||||
class: "size-4"
|
||||
})], 8, ["onClick"])) : createCommentVNode("", true),
|
||||
unref(images).length > 1 ? (openBlock(), createBlock(Fragment, { key: 2 }, [createVNode("button", {
|
||||
type: "button",
|
||||
"aria-label": "تصویر قبلی",
|
||||
class: "absolute start-4 top-1/2 flex size-11 -translate-y-1/2 items-center justify-center rounded-full border border-line bg-bg/70 text-ink/80 opacity-0 backdrop-blur transition-all hover:border-accent hover:text-accent group-hover:opacity-100 max-md:opacity-100",
|
||||
onClick: ($event) => go(-1)
|
||||
}, [createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-right-1",
|
||||
class: "size-5"
|
||||
})], 8, ["onClick"]), createVNode("button", {
|
||||
type: "button",
|
||||
"aria-label": "تصویر بعدی",
|
||||
class: "absolute end-4 top-1/2 flex size-11 -translate-y-1/2 items-center justify-center rounded-full border border-line bg-bg/70 text-ink/80 opacity-0 backdrop-blur transition-all hover:border-accent hover:text-accent group-hover:opacity-100 max-md:opacity-100",
|
||||
onClick: ($event) => go(1)
|
||||
}, [createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left-1",
|
||||
class: "size-5"
|
||||
})], 8, ["onClick"])], 64)) : createCommentVNode("", true)
|
||||
], 2)]),
|
||||
unref(images).length > 1 ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "mt-4 flex gap-3 overflow-x-auto pb-1"
|
||||
}, [(openBlock(true), createBlock(Fragment, null, renderList(unref(images), (img, i) => {
|
||||
return openBlock(), createBlock("button", {
|
||||
key: img.url,
|
||||
type: "button",
|
||||
"aria-label": `تصویر ${("faNum" in _ctx ? _ctx.faNum : unref(faNum))(i + 1)}`,
|
||||
"aria-current": i === unref(active),
|
||||
class: ["size-20 shrink-0 overflow-hidden rounded-xl border bg-panel/80 transition-all md:size-24", i === unref(active) ? "border-accent shadow-[0_0_24px_rgba(255,90,0,0.25)]" : "border-line opacity-60 hover:opacity-100"],
|
||||
onClick: ($event) => active.value = i
|
||||
}, [createVNode("img", {
|
||||
src: img.url,
|
||||
alt: img.alt,
|
||||
loading: "lazy",
|
||||
class: "size-full object-contain p-2"
|
||||
}, null, 8, ["src", "alt"])], 10, [
|
||||
"aria-label",
|
||||
"aria-current",
|
||||
"onClick"
|
||||
]);
|
||||
}), 128))])) : createCommentVNode("", true)
|
||||
])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`<div class="lg:col-span-6">`);
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .12 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="flex flex-wrap items-center gap-2"${_scopeId}><span class="rounded-full border border-accent/40 bg-accent/10 px-3 py-1 font-mono text-xs text-accent"${_scopeId}>${ssrInterpolate(unref(product).code)}</span>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: categoryPath,
|
||||
class: "rounded-full border border-line px-3 py-1 text-xs text-muted transition-colors hover:border-accent/60 hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`${ssrInterpolate(unref(product).category.name)}`);
|
||||
else return [createTextVNode(toDisplayString(unref(product).category.name), 1)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
if (unref(product).groupName) _push(`<span class="rounded-full border border-line px-3 py-1 text-xs text-muted"${_scopeId}>${ssrInterpolate(unref(product).groupName)}</span>`);
|
||||
else _push(`<!---->`);
|
||||
_push(`</div><h1 class="mt-6 text-3xl font-black leading-[1.3] md:text-5xl md:leading-[1.25]"${_scopeId}>${ssrInterpolate(unref(product).name)}</h1>`);
|
||||
if (unref(product).nameEn) _push(`<p class="mt-3 font-mono text-xs tracking-[0.25em] text-muted"${_scopeId}>${ssrInterpolate(unref(product).nameEn)}</p>`);
|
||||
else _push(`<!---->`);
|
||||
if (unref(product).desc) _push(`<p class="mt-6 max-w-2xl leading-9 text-ink/75"${_scopeId}>${ssrInterpolate(unref(product).desc)}</p>`);
|
||||
else _push(`<!---->`);
|
||||
if (unref(product).specs.length) {
|
||||
_push(`<div class="mt-6 flex flex-wrap gap-2"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(product).specs, (s) => {
|
||||
_push(`<span class="rounded-full border border-accent/40 bg-accent/10 px-3 py-1.5 font-mono text-[11px] text-accent"${_scopeId}>${ssrInterpolate(s)}</span>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
} else _push(`<!---->`);
|
||||
} else return [
|
||||
createVNode("div", { class: "flex flex-wrap items-center gap-2" }, [
|
||||
createVNode("span", { class: "rounded-full border border-accent/40 bg-accent/10 px-3 py-1 font-mono text-xs text-accent" }, toDisplayString(unref(product).code), 1),
|
||||
createVNode(_component_NuxtLink, {
|
||||
to: categoryPath,
|
||||
class: "rounded-full border border-line px-3 py-1 text-xs text-muted transition-colors hover:border-accent/60 hover:text-accent"
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode(toDisplayString(unref(product).category.name), 1)]),
|
||||
_: 1
|
||||
}),
|
||||
unref(product).groupName ? (openBlock(), createBlock("span", {
|
||||
key: 0,
|
||||
class: "rounded-full border border-line px-3 py-1 text-xs text-muted"
|
||||
}, toDisplayString(unref(product).groupName), 1)) : createCommentVNode("", true)
|
||||
]),
|
||||
createVNode("h1", { class: "mt-6 text-3xl font-black leading-[1.3] md:text-5xl md:leading-[1.25]" }, toDisplayString(unref(product).name), 1),
|
||||
unref(product).nameEn ? (openBlock(), createBlock("p", {
|
||||
key: 0,
|
||||
class: "mt-3 font-mono text-xs tracking-[0.25em] text-muted"
|
||||
}, toDisplayString(unref(product).nameEn), 1)) : createCommentVNode("", true),
|
||||
unref(product).desc ? (openBlock(), createBlock("p", {
|
||||
key: 1,
|
||||
class: "mt-6 max-w-2xl leading-9 text-ink/75"
|
||||
}, toDisplayString(unref(product).desc), 1)) : createCommentVNode("", true),
|
||||
unref(product).specs.length ? (openBlock(), createBlock("div", {
|
||||
key: 2,
|
||||
class: "mt-6 flex flex-wrap gap-2"
|
||||
}, [(openBlock(true), createBlock(Fragment, null, renderList(unref(product).specs, (s) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: s,
|
||||
class: "rounded-full border border-accent/40 bg-accent/10 px-3 py-1.5 font-mono text-[11px] text-accent"
|
||||
}, toDisplayString(s), 1);
|
||||
}), 128))])) : createCommentVNode("", true)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
if (unref(facts).length || unref(product).standards.length) _push(ssrRenderComponent(Reveal_default, { delay: .18 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<dl class="mt-8 grid gap-px overflow-hidden rounded-xl border border-line bg-line sm:grid-cols-2"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(facts), (f) => {
|
||||
_push(`<div class="bg-panel/80 p-4"${_scopeId}><dt class="text-xs text-muted"${_scopeId}>${ssrInterpolate(f.label)}</dt><dd class="mt-1.5 font-bold"${_scopeId}>${ssrInterpolate(f.value)}</dd></div>`);
|
||||
});
|
||||
_push(`<!--]-->`);
|
||||
if (unref(product).standards.length) {
|
||||
_push(`<div class="bg-panel/80 p-4 sm:col-span-2"${_scopeId}><dt class="text-xs text-muted"${_scopeId}>استانداردها و گواهیها</dt><dd class="mt-2 flex flex-wrap gap-2"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(product).standards, (s) => {
|
||||
_push(`<span class="rounded-md border border-ink/15 px-2.5 py-1 font-mono text-xs tracking-wider text-ink/85" dir="ltr"${_scopeId}>${ssrInterpolate(s)}</span>`);
|
||||
});
|
||||
_push(`<!--]--></dd></div>`);
|
||||
} else _push(`<!---->`);
|
||||
_push(`</dl>`);
|
||||
} else return [createVNode("dl", { class: "mt-8 grid gap-px overflow-hidden rounded-xl border border-line bg-line sm:grid-cols-2" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(facts), (f) => {
|
||||
return openBlock(), createBlock("div", {
|
||||
key: f.label,
|
||||
class: "bg-panel/80 p-4"
|
||||
}, [createVNode("dt", { class: "text-xs text-muted" }, toDisplayString(f.label), 1), createVNode("dd", { class: "mt-1.5 font-bold" }, toDisplayString(f.value), 1)]);
|
||||
}), 128)), unref(product).standards.length ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "bg-panel/80 p-4 sm:col-span-2"
|
||||
}, [createVNode("dt", { class: "text-xs text-muted" }, "استانداردها و گواهیها"), createVNode("dd", { class: "mt-2 flex flex-wrap gap-2" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(product).standards, (s) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: s,
|
||||
class: "rounded-md border border-ink/15 px-2.5 py-1 font-mono text-xs tracking-wider text-ink/85",
|
||||
dir: "ltr"
|
||||
}, toDisplayString(s), 1);
|
||||
}), 128))])])) : createCommentVNode("", true)])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
else _push(`<!---->`);
|
||||
if (unref(product).variants.length || unref(product).sizes.length) _push(ssrRenderComponent(Reveal_default, { delay: .22 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="mt-8 space-y-5"${_scopeId}>`);
|
||||
if (unref(product).variants.length) {
|
||||
_push(`<div${_scopeId}><div class="mb-2.5 text-xs text-muted"${_scopeId}>مدلها / رنگها</div><div class="flex flex-wrap gap-2"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(product).variants, (v) => {
|
||||
_push(`<span class="rounded-lg border border-line bg-panel-2 px-3 py-1.5 text-sm text-ink/80"${_scopeId}>${ssrInterpolate(v)}</span>`);
|
||||
});
|
||||
_push(`<!--]--></div></div>`);
|
||||
} else _push(`<!---->`);
|
||||
if (unref(product).sizes.length) {
|
||||
_push(`<div${_scopeId}><div class="mb-2.5 text-xs text-muted"${_scopeId}>سایزها</div><div class="flex flex-wrap gap-2"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(product).sizes, (s) => {
|
||||
_push(`<span class="min-w-11 rounded-lg border border-line bg-panel-2 px-3 py-1.5 text-center font-mono text-sm text-ink/80"${_scopeId}>${ssrInterpolate(s)}</span>`);
|
||||
});
|
||||
_push(`<!--]--></div></div>`);
|
||||
} else _push(`<!---->`);
|
||||
_push(`</div>`);
|
||||
} else return [createVNode("div", { class: "mt-8 space-y-5" }, [unref(product).variants.length ? (openBlock(), createBlock("div", { key: 0 }, [createVNode("div", { class: "mb-2.5 text-xs text-muted" }, "مدلها / رنگها"), createVNode("div", { class: "flex flex-wrap gap-2" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(product).variants, (v) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: v,
|
||||
class: "rounded-lg border border-line bg-panel-2 px-3 py-1.5 text-sm text-ink/80"
|
||||
}, toDisplayString(v), 1);
|
||||
}), 128))])])) : createCommentVNode("", true), unref(product).sizes.length ? (openBlock(), createBlock("div", { key: 1 }, [createVNode("div", { class: "mb-2.5 text-xs text-muted" }, "سایزها"), createVNode("div", { class: "flex flex-wrap gap-2" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(product).sizes, (s) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: s,
|
||||
class: "min-w-11 rounded-lg border border-line bg-panel-2 px-3 py-1.5 text-center font-mono text-sm text-ink/80"
|
||||
}, toDisplayString(s), 1);
|
||||
}), 128))])])) : createCommentVNode("", true)])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
else _push(`<!---->`);
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .26 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="mt-9 flex flex-wrap items-center gap-4"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/#contact",
|
||||
class: "group inline-flex items-center gap-2.5 rounded-full bg-accent px-7 py-4 font-bold text-bg transition-all duration-300 hover:bg-accent-soft hover:shadow-[0_8px_45px_rgba(255,90,0,0.5)]",
|
||||
onClick: requestQuote
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(` درخواست قیمت و موجودی `);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-5 transition-transform duration-300 group-hover:-translate-x-1.5"
|
||||
}, null, _parent, _scopeId));
|
||||
} else return [createTextVNode(" درخواست قیمت و موجودی "), createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-5 transition-transform duration-300 group-hover:-translate-x-1.5"
|
||||
})];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
_push(`<a${ssrRenderAttr("href", `tel:${unref(settings).phone}`)} class="inline-flex items-center gap-2.5 rounded-full border border-ink/25 px-6 py-4 font-bold text-ink transition-colors duration-300 hover:border-accent hover:text-accent"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`<span class="font-mono tracking-wider" dir="ltr"${_scopeId}>${ssrInterpolate(unref(settings).phoneDisplay)}</span></a></div>`);
|
||||
} else return [createVNode("div", { class: "mt-9 flex flex-wrap items-center gap-4" }, [createVNode(_component_NuxtLink, {
|
||||
to: "/#contact",
|
||||
class: "group inline-flex items-center gap-2.5 rounded-full bg-accent px-7 py-4 font-bold text-bg transition-all duration-300 hover:bg-accent-soft hover:shadow-[0_8px_45px_rgba(255,90,0,0.5)]",
|
||||
onClick: requestQuote
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode(" درخواست قیمت و موجودی "), createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-5 transition-transform duration-300 group-hover:-translate-x-1.5"
|
||||
})]),
|
||||
_: 1
|
||||
}), createVNode("a", {
|
||||
href: `tel:${unref(settings).phone}`,
|
||||
class: "inline-flex items-center gap-2.5 rounded-full border border-ink/25 px-6 py-4 font-bold text-ink transition-colors duration-300 hover:border-accent hover:text-accent"
|
||||
}, [createVNode(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4"
|
||||
}), createVNode("span", {
|
||||
class: "font-mono tracking-wider",
|
||||
dir: "ltr"
|
||||
}, toDisplayString(unref(settings).phoneDisplay), 1)], 8, ["href"])])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
if (unref(trust).length) _push(ssrRenderComponent(Reveal_default, { delay: .3 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<ul class="mt-9 grid gap-4 border-t border-line pt-7 sm:grid-cols-3"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(trust), (t) => {
|
||||
_push(`<li class="flex items-start gap-3"${_scopeId}><span class="flex size-9 shrink-0 items-center justify-center rounded-lg bg-accent/10 text-accent"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(DynamicIcon_default, {
|
||||
name: t.icon,
|
||||
class: "size-4"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</span><span class="text-xs leading-6 text-ink/75"${_scopeId}>${ssrInterpolate(t.title)}</span></li>`);
|
||||
});
|
||||
_push(`<!--]--></ul>`);
|
||||
} else return [createVNode("ul", { class: "mt-9 grid gap-4 border-t border-line pt-7 sm:grid-cols-3" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(trust), (t) => {
|
||||
return openBlock(), createBlock("li", {
|
||||
key: t.title,
|
||||
class: "flex items-start gap-3"
|
||||
}, [createVNode("span", { class: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-accent/10 text-accent" }, [createVNode(DynamicIcon_default, {
|
||||
name: t.icon,
|
||||
class: "size-4"
|
||||
}, null, 8, ["name"])]), createVNode("span", { class: "text-xs leading-6 text-ink/75" }, toDisplayString(t.title), 1)]);
|
||||
}), 128))])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
else _push(`<!---->`);
|
||||
_push(`</div></div></div></section><section class="relative border-t border-line py-20 md:py-28"><div class="absolute inset-0 bg-grid-fine opacity-30"></div><div class="relative mx-auto grid max-w-[1480px] gap-14 px-5 md:px-8 lg:grid-cols-12"><div class="lg:col-span-7">`);
|
||||
_push(ssrRenderComponent(SectionHead_default, {
|
||||
tag: "توضیحات",
|
||||
title: unref(paragraphs).length ? "درباره این محصول" : `درباره ${unref(product).category.name}`
|
||||
}, null, _parent));
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .2 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="mt-8 space-y-5 leading-9 text-ink/75"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(paragraphs), (p, i) => {
|
||||
_push(`<p class="whitespace-pre-line"${_scopeId}>${ssrInterpolate(p)}</p>`);
|
||||
});
|
||||
_push(`<!--]-->`);
|
||||
if (!unref(paragraphs).length) _push(`<p${_scopeId}>${ssrInterpolate(unref(product).category.fullDesc)}</p>`);
|
||||
else _push(`<!---->`);
|
||||
_push(`</div>`);
|
||||
} else return [createVNode("div", { class: "mt-8 space-y-5 leading-9 text-ink/75" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(paragraphs), (p, i) => {
|
||||
return openBlock(), createBlock("p", {
|
||||
key: i,
|
||||
class: "whitespace-pre-line"
|
||||
}, toDisplayString(p), 1);
|
||||
}), 128)), !unref(paragraphs).length ? (openBlock(), createBlock("p", { key: 0 }, toDisplayString(unref(product).category.fullDesc), 1)) : createCommentVNode("", true)])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
if (unref(product).features.length) {
|
||||
_push(`<div class="mt-14">`);
|
||||
_push(ssrRenderComponent(Reveal_default, null, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`<h3 class="flex items-center gap-3 text-xl font-black"${_scopeId}><span class="font-mono text-sm text-accent"${_scopeId}>//</span> ویژگیهای کلیدی </h3>`);
|
||||
else return [createVNode("h3", { class: "flex items-center gap-3 text-xl font-black" }, [createVNode("span", { class: "font-mono text-sm text-accent" }, "//"), createTextVNode(" ویژگیهای کلیدی ")])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`<ul class="mt-6 grid gap-3 sm:grid-cols-2"><!--[-->`);
|
||||
ssrRenderList(unref(product).features, (f, i) => {
|
||||
_push(ssrRenderComponent(Reveal_default, {
|
||||
key: f,
|
||||
delay: i * .04
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<li class="flex h-full items-start gap-3 rounded-xl border border-line bg-panel/60 p-4"${_scopeId}><span class="mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-full bg-accent text-bg"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "tick-circle",
|
||||
class: "size-3.5"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</span><span class="text-sm leading-7 text-ink/85"${_scopeId}>${ssrInterpolate(f)}</span></li>`);
|
||||
} else return [createVNode("li", { class: "flex h-full items-start gap-3 rounded-xl border border-line bg-panel/60 p-4" }, [createVNode("span", { class: "mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-full bg-accent text-bg" }, [createVNode(VuesaxIcon_default, {
|
||||
name: "tick-circle",
|
||||
class: "size-3.5"
|
||||
})]), createVNode("span", { class: "text-sm leading-7 text-ink/85" }, toDisplayString(f), 1)])];
|
||||
}),
|
||||
_: 2
|
||||
}, _parent));
|
||||
});
|
||||
_push(`<!--]--></ul></div>`);
|
||||
} else _push(`<!---->`);
|
||||
if (unref(product).applications.length) {
|
||||
_push(`<div class="mt-14">`);
|
||||
_push(ssrRenderComponent(Reveal_default, null, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`<h3 class="flex items-center gap-3 text-xl font-black"${_scopeId}><span class="font-mono text-sm text-accent"${_scopeId}>//</span> کاربردها و محیطهای مناسب </h3>`);
|
||||
else return [createVNode("h3", { class: "flex items-center gap-3 text-xl font-black" }, [createVNode("span", { class: "font-mono text-sm text-accent" }, "//"), createTextVNode(" کاربردها و محیطهای مناسب ")])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .1 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="mt-6 flex flex-wrap gap-2.5"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(product).applications, (a) => {
|
||||
_push(`<span class="rounded-full border border-line bg-panel/60 px-4 py-2 text-sm text-ink/80"${_scopeId}>${ssrInterpolate(a)}</span>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
} else return [createVNode("div", { class: "mt-6 flex flex-wrap gap-2.5" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(product).applications, (a) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: a,
|
||||
class: "rounded-full border border-line bg-panel/60 px-4 py-2 text-sm text-ink/80"
|
||||
}, toDisplayString(a), 1);
|
||||
}), 128))])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div>`);
|
||||
} else _push(`<!---->`);
|
||||
_push(`</div><aside class="lg:col-span-5"><div class="space-y-6 lg:sticky lg:top-28">`);
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .1 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="overflow-hidden rounded-2xl border border-line bg-panel/80"${_scopeId}><div class="flex items-center justify-between border-b border-line px-6 py-4"${_scopeId}><span class="font-mono text-xs tracking-[0.25em] text-accent"${_scopeId}>// مشخصات فنی</span><span class="font-mono text-[10px] tracking-[0.25em] text-muted/60"${_scopeId}>SPECIFICATIONS</span></div><dl${_scopeId}><!--[-->`);
|
||||
ssrRenderList(specRows, (row) => {
|
||||
_push(`<div class="grid grid-cols-5 gap-4 border-b border-line/70 px-6 py-3.5 last:border-b-0"${_scopeId}><dt class="col-span-2 text-sm text-muted"${_scopeId}>${ssrInterpolate(row.name)}</dt><dd class="${ssrRenderClass([row.ltr && "font-mono tracking-wider", "col-span-3 text-sm font-medium text-ink/90"])}"${ssrRenderAttr("dir", row.ltr ? "ltr" : void 0)} style="${ssrRenderStyle(row.ltr ? "text-align: right" : void 0)}"${_scopeId}>${ssrInterpolate(row.value)}</dd></div>`);
|
||||
});
|
||||
_push(`<!--]--></dl></div>`);
|
||||
} else return [createVNode("div", { class: "overflow-hidden rounded-2xl border border-line bg-panel/80" }, [createVNode("div", { class: "flex items-center justify-between border-b border-line px-6 py-4" }, [createVNode("span", { class: "font-mono text-xs tracking-[0.25em] text-accent" }, "// مشخصات فنی"), createVNode("span", { class: "font-mono text-[10px] tracking-[0.25em] text-muted/60" }, "SPECIFICATIONS")]), createVNode("dl", null, [(openBlock(), createBlock(Fragment, null, renderList(specRows, (row) => {
|
||||
return createVNode("div", {
|
||||
key: row.name,
|
||||
class: "grid grid-cols-5 gap-4 border-b border-line/70 px-6 py-3.5 last:border-b-0"
|
||||
}, [createVNode("dt", { class: "col-span-2 text-sm text-muted" }, toDisplayString(row.name), 1), createVNode("dd", {
|
||||
class: ["col-span-3 text-sm font-medium text-ink/90", row.ltr && "font-mono tracking-wider"],
|
||||
dir: row.ltr ? "ltr" : void 0,
|
||||
style: row.ltr ? "text-align: right" : void 0
|
||||
}, toDisplayString(row.value), 15, ["dir"])]);
|
||||
}), 64))])])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .18 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="flex items-start gap-4 rounded-xl border border-hazard/30 bg-hazard/5 p-5"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "24-support",
|
||||
class: "size-6 shrink-0 text-hazard"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`<div${_scopeId}><div class="font-bold text-hazard"${_scopeId}>مشاوره رایگان انتخاب تجهیزات</div><p class="mt-1.5 text-sm leading-7 text-muted"${_scopeId}> برای انتخاب مدل و سایز مناسب محیط کار، خرید سازمانی یا دریافت نمونه، با کارشناسان ما تماس بگیرید. </p><div class="mt-4 flex flex-wrap gap-3 text-sm"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/#contact",
|
||||
class: "font-bold text-accent hover:underline",
|
||||
onClick: requestQuote
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(` ثبت درخواست `);
|
||||
else return [createTextVNode(" ثبت درخواست ")];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
_push(`<span class="text-line"${_scopeId}>|</span><a${ssrRenderAttr("href", `tel:${unref(settings).phone}`)} class="font-mono tracking-wider text-ink/80 hover:text-accent" dir="ltr"${_scopeId}>${ssrInterpolate(unref(settings).phoneDisplay)}</a></div></div></div>`);
|
||||
} else return [createVNode("div", { class: "flex items-start gap-4 rounded-xl border border-hazard/30 bg-hazard/5 p-5" }, [createVNode(VuesaxIcon_default, {
|
||||
name: "24-support",
|
||||
class: "size-6 shrink-0 text-hazard"
|
||||
}), createVNode("div", null, [
|
||||
createVNode("div", { class: "font-bold text-hazard" }, "مشاوره رایگان انتخاب تجهیزات"),
|
||||
createVNode("p", { class: "mt-1.5 text-sm leading-7 text-muted" }, " برای انتخاب مدل و سایز مناسب محیط کار، خرید سازمانی یا دریافت نمونه، با کارشناسان ما تماس بگیرید. "),
|
||||
createVNode("div", { class: "mt-4 flex flex-wrap gap-3 text-sm" }, [
|
||||
createVNode(_component_NuxtLink, {
|
||||
to: "/#contact",
|
||||
class: "font-bold text-accent hover:underline",
|
||||
onClick: requestQuote
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode(" ثبت درخواست ")]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode("span", { class: "text-line" }, "|"),
|
||||
createVNode("a", {
|
||||
href: `tel:${unref(settings).phone}`,
|
||||
class: "font-mono tracking-wider text-ink/80 hover:text-accent",
|
||||
dir: "ltr"
|
||||
}, toDisplayString(unref(settings).phoneDisplay), 9, ["href"])
|
||||
])
|
||||
])])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div></aside></div></section>`);
|
||||
if (unref(product).related.length) {
|
||||
_push(`<section class="border-t border-line py-20 md:py-28"><div class="mx-auto max-w-[1480px] px-5 md:px-8"><div class="flex flex-wrap items-end justify-between gap-6">`);
|
||||
_push(ssrRenderComponent(SectionHead_default, {
|
||||
tag: "محصولات مرتبط",
|
||||
title: `محصولات دیگر\n${unref(product).category.name}`
|
||||
}, null, _parent));
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .2 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: categoryPath,
|
||||
class: "group inline-flex items-center gap-2 rounded-full border border-line px-6 py-3 text-sm text-muted transition-colors hover:border-accent hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(` مشاهده همه `);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-4 transition-transform group-hover:-translate-x-1"
|
||||
}, null, _parent, _scopeId));
|
||||
} else return [createTextVNode(" مشاهده همه "), createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-4 transition-transform group-hover:-translate-x-1"
|
||||
})];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
else return [createVNode(_component_NuxtLink, {
|
||||
to: categoryPath,
|
||||
class: "group inline-flex items-center gap-2 rounded-full border border-line px-6 py-3 text-sm text-muted transition-colors hover:border-accent hover:text-accent"
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode(" مشاهده همه "), createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-4 transition-transform group-hover:-translate-x-1"
|
||||
})]),
|
||||
_: 1
|
||||
})];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div><div class="mt-12 grid gap-5 sm:grid-cols-2 lg:grid-cols-4"><!--[-->`);
|
||||
ssrRenderList(unref(product).related, (r, i) => {
|
||||
_push(ssrRenderComponent(Reveal_default, {
|
||||
key: r.code,
|
||||
delay: i * .06
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: `/products/${r.slug}`,
|
||||
class: "group flex h-full flex-col overflow-hidden rounded-xl border border-line bg-panel/80 transition-all duration-500 hover:border-accent/40 hover:shadow-[0_8px_40px_rgba(255,90,0,0.08)]"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="${ssrRenderClass([r.image && "bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.14),transparent_70%)]", "relative aspect-[4/3] overflow-hidden"])}"${_scopeId}><img${ssrRenderAttr("src", r.image ?? unref(product).category.coverImage ?? void 0)}${ssrRenderAttr("alt", r.name)} loading="lazy" decoding="async" class="${ssrRenderClass([r.image ? "object-contain p-7" : "object-cover", "size-full transition-transform duration-700 group-hover:scale-105"])}"${_scopeId}><span class="absolute start-3 top-3 rounded-full bg-bg/60 px-2.5 py-0.5 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur"${_scopeId}>${ssrInterpolate(r.code)}</span></div><div class="flex flex-1 flex-col p-5"${_scopeId}><h3 class="font-black transition-colors group-hover:text-accent"${_scopeId}>${ssrInterpolate(r.name)}</h3><p class="mt-1 font-mono text-[10px] tracking-[0.2em] text-muted"${_scopeId}>${ssrInterpolate(r.nameEn)}</p><span class="mt-auto inline-flex items-center gap-2 pt-4 text-xs font-bold text-accent"${_scopeId}> مشاهده محصول `);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-3.5 transition-transform group-hover:-translate-x-1"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</span></div>`);
|
||||
} else return [createVNode("div", { class: ["relative aspect-[4/3] overflow-hidden", r.image && "bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.14),transparent_70%)]"] }, [createVNode("img", {
|
||||
src: r.image ?? unref(product).category.coverImage ?? void 0,
|
||||
alt: r.name,
|
||||
loading: "lazy",
|
||||
decoding: "async",
|
||||
class: ["size-full transition-transform duration-700 group-hover:scale-105", r.image ? "object-contain p-7" : "object-cover"]
|
||||
}, null, 10, ["src", "alt"]), createVNode("span", { class: "absolute start-3 top-3 rounded-full bg-bg/60 px-2.5 py-0.5 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur" }, toDisplayString(r.code), 1)], 2), createVNode("div", { class: "flex flex-1 flex-col p-5" }, [
|
||||
createVNode("h3", { class: "font-black transition-colors group-hover:text-accent" }, toDisplayString(r.name), 1),
|
||||
createVNode("p", { class: "mt-1 font-mono text-[10px] tracking-[0.2em] text-muted" }, toDisplayString(r.nameEn), 1),
|
||||
createVNode("span", { class: "mt-auto inline-flex items-center gap-2 pt-4 text-xs font-bold text-accent" }, [createTextVNode(" مشاهده محصول "), createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-3.5 transition-transform group-hover:-translate-x-1"
|
||||
})])
|
||||
])];
|
||||
}),
|
||||
_: 2
|
||||
}, _parent, _scopeId));
|
||||
else return [createVNode(_component_NuxtLink, {
|
||||
to: `/products/${r.slug}`,
|
||||
class: "group flex h-full flex-col overflow-hidden rounded-xl border border-line bg-panel/80 transition-all duration-500 hover:border-accent/40 hover:shadow-[0_8px_40px_rgba(255,90,0,0.08)]"
|
||||
}, {
|
||||
default: withCtx(() => [createVNode("div", { class: ["relative aspect-[4/3] overflow-hidden", r.image && "bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.14),transparent_70%)]"] }, [createVNode("img", {
|
||||
src: r.image ?? unref(product).category.coverImage ?? void 0,
|
||||
alt: r.name,
|
||||
loading: "lazy",
|
||||
decoding: "async",
|
||||
class: ["size-full transition-transform duration-700 group-hover:scale-105", r.image ? "object-contain p-7" : "object-cover"]
|
||||
}, null, 10, ["src", "alt"]), createVNode("span", { class: "absolute start-3 top-3 rounded-full bg-bg/60 px-2.5 py-0.5 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur" }, toDisplayString(r.code), 1)], 2), createVNode("div", { class: "flex flex-1 flex-col p-5" }, [
|
||||
createVNode("h3", { class: "font-black transition-colors group-hover:text-accent" }, toDisplayString(r.name), 1),
|
||||
createVNode("p", { class: "mt-1 font-mono text-[10px] tracking-[0.2em] text-muted" }, toDisplayString(r.nameEn), 1),
|
||||
createVNode("span", { class: "mt-auto inline-flex items-center gap-2 pt-4 text-xs font-bold text-accent" }, [createTextVNode(" مشاهده محصول "), createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-3.5 transition-transform group-hover:-translate-x-1"
|
||||
})])
|
||||
])]),
|
||||
_: 2
|
||||
}, 1032, ["to"])];
|
||||
}),
|
||||
_: 2
|
||||
}, _parent));
|
||||
});
|
||||
_push(`<!--]--></div></div></section>`);
|
||||
} else _push(`<!---->`);
|
||||
_push(`<section class="border-t border-line py-12 md:py-16"><div class="mx-auto flex max-w-[1480px] flex-wrap items-center justify-between gap-6 px-5 md:px-8">`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: categoryPath,
|
||||
class: "group inline-flex items-center gap-2 text-muted transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-right",
|
||||
class: "size-4 transition-transform group-hover:translate-x-1"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(` بازگشت به ${ssrInterpolate(unref(product).category.name)}`);
|
||||
} else return [createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-right",
|
||||
class: "size-4 transition-transform group-hover:translate-x-1"
|
||||
}), createTextVNode(" بازگشت به " + toDisplayString(unref(product).category.name), 1)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/#contact",
|
||||
class: "inline-flex items-center gap-2 rounded-full bg-accent px-6 py-3 text-sm font-bold text-bg transition-all hover:bg-accent-soft hover:shadow-[0_8px_45px_rgba(255,90,0,0.5)]",
|
||||
onClick: requestQuote
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(` درخواست قیمت این محصول `);
|
||||
} else return [createVNode(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4"
|
||||
}), createTextVNode(" درخواست قیمت این محصول ")];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div></section>`);
|
||||
_push(ssrRenderComponent(_component_ClientOnly, null, {}, _parent));
|
||||
_push(`</main>`);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/pages/products/[slug].vue
|
||||
var _sfc_setup = _slug__vue_vue_type_script_setup_true_lang_default.setup;
|
||||
_slug__vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/products/[slug].vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
var _slug__default = _slug__vue_vue_type_script_setup_true_lang_default;
|
||||
|
||||
export { _slug__default as default };
|
||||
//# sourceMappingURL=_slug_-CkwmjXFv.mjs.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,78 @@
|
||||
import { a as useNuxtApp, V as VuesaxIcon_default } from '../virtual/entry.mjs';
|
||||
import { defineComponent, mergeProps, useSSRContext } from 'vue';
|
||||
import { ssrRenderComponent } from 'vue/server-renderer';
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
//#region app/components/ui/DynamicIcon.vue?vue&type=script&setup=true&lang.ts
|
||||
var DynamicIcon_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "DynamicIcon",
|
||||
__ssrInlineRender: true,
|
||||
props: {
|
||||
name: {},
|
||||
size: {}
|
||||
},
|
||||
setup(__props) {
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, mergeProps({
|
||||
name: __props.name,
|
||||
size: __props.size
|
||||
}, _attrs), null, _parent));
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/ui/DynamicIcon.vue
|
||||
var _sfc_setup = DynamicIcon_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
DynamicIcon_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/DynamicIcon.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
var DynamicIcon_default = Object.assign(DynamicIcon_vue_vue_type_script_setup_true_lang_default, { __name: "UiDynamicIcon" });
|
||||
//#endregion
|
||||
//#region app/stores/contact.ts
|
||||
/** `website` is a honeypot field, hidden from people and left empty */
|
||||
var emptyForm = () => ({
|
||||
name: "",
|
||||
org: "",
|
||||
phone: "",
|
||||
message: "",
|
||||
website: ""
|
||||
});
|
||||
var useContactStore = defineStore("contact", {
|
||||
state: () => ({
|
||||
form: emptyForm(),
|
||||
status: "idle",
|
||||
error: ""
|
||||
}),
|
||||
actions: {
|
||||
async submit() {
|
||||
this.status = "loading";
|
||||
this.error = "";
|
||||
try {
|
||||
await useNuxtApp().$api("/public/contact", {
|
||||
method: "POST",
|
||||
body: this.form
|
||||
});
|
||||
this.status = "success";
|
||||
} catch (e) {
|
||||
const err = e;
|
||||
this.error = err.statusCode === 429 ? "تعداد درخواستها زیاد است؛ لطفاً چند دقیقه بعد دوباره تلاش کنید." : err.data?.message ?? "ارسال درخواست انجام نشد؛ لطفاً دوباره تلاش کنید یا تماس بگیرید.";
|
||||
this.status = "error";
|
||||
}
|
||||
},
|
||||
/** Pre-fills the message, e.g. from a product page's "request a quote" button */
|
||||
prefill(message) {
|
||||
if (this.status === "success") this.reset();
|
||||
this.form.message = message;
|
||||
},
|
||||
reset() {
|
||||
this.form = emptyForm();
|
||||
this.status = "idle";
|
||||
this.error = "";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export { DynamicIcon_default as D, useContactStore as u };
|
||||
//# sourceMappingURL=contact-DBTK0GHP.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"contact-DBTK0GHP.mjs","sources":["../../../../app/components/ui/DynamicIcon.vue","../../../../app/stores/contact.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAOe,IAAA,IAAA,EAAM,OAAA,CAAA,IAAA;AAAO,IAAA,IAAA,EAAM,OAAA,CAAA;;;;;;;;;;;;;;;;;ACFlC,IAAM,SAAA,GAAA,OAAmB;CAAE,IAAA,EAAM,EAAA;CAAI,GAAA,EAAK,EAAA;CAAI,KAAA,EAAO,EAAA;CAAI,OAAA,EAAS,EAAA;CAAI,OAAA,EAAS;AAAG,CAAA,CAAA;AAOlF,IAAa,eAAA,GAAkB,YAAY,SAAA,EAAW;CACpD,KAAA,EAAA,OAAc;AACZ,EAAA,IAAA,EAAM,SAAA,EAAU;EAChB,MAAA,EAAQ,MAAA;EACR,KAAA,EAAO;AACT,EAAA,CAAA;CACA,OAAA,EAAS;AACP,EAAA,MAAM,MAAA,GAAS;AACb,GAAA,IAAA,CAAK,MAAA,GAAS,SAAA;AACd,GAAA,IAAA,CAAK,KAAA,GAAQ,EAAA;GACb,IAAI;AACF,IAAA,MAAM,UAAA,EAAY,CAAC,IAAA,CAAK,iBAAA,EAAmB;KAAE,MAAA,EAAQ,MAAA;AAAQ,KAAA,IAAA,EAAM,IAAA,CAAK;KAAM,CAAA;AAC9E,IAAA,IAAA,CAAK,MAAA,GAAS,SAAA;AAChB,GAAA,CAAA,CAAA,OAAS,CAAA,EAAG;AACV,IAAA,MAAM,GAAA,GAAM,CAAA;AACZ,IAAA,IAAA,CAAK,QACH,GAAA,CAAI,UAAA,KAAe,MACf,kEAAA,GACC,GAAA,CAAI,MAAM,OAAA,IAAW,iEAAA;AAC5B,IAAA,IAAA,CAAK,MAAA,GAAS,OAAA;AAChB,GAAA;AACF,EAAA,CAAA;;AAEA,EAAA,OAAA,CAAQ,OAAA,EAAiB;AACvB,GAAA,IAAI,IAAA,CAAK,MAAA,KAAW,SAAA,EAAW,IAAA,CAAK,KAAA,EAAM;AAC1C,GAAA,IAAA,CAAK,KAAK,OAAA,GAAU,OAAA;AACtB,EAAA,CAAA;EACA,KAAA,GAAQ;AACN,GAAA,IAAA,CAAK,OAAO,SAAA,EAAU;AACtB,GAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AACd,GAAA,IAAA,CAAK,KAAA,GAAQ,EAAA;AACf,EAAA;AACF;AACF,CAAC;;"}
|
||||
@@ -0,0 +1,824 @@
|
||||
import { c as useSiteStore, V as VuesaxIcon_default, N as NuxtLink, ai as _plugin_vue_export_helper_default } from '../virtual/entry.mjs';
|
||||
import { E as EASE, f as faNum } from './motion-BvlOLZ1k.mjs';
|
||||
import { defineComponent, unref, withCtx, openBlock, createBlock, createCommentVNode, ref, computed, mergeProps, createVNode, createTextVNode, toDisplayString, watch, Fragment, renderList, useSSRContext } from 'vue';
|
||||
import { p as publicAssetsURL } from '../routes/renderer.mjs';
|
||||
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderSlot, ssrRenderAttr, ssrInterpolate, ssrRenderStyle, ssrRenderClass, ssrRenderList } from 'vue/server-renderer';
|
||||
import { defineStore } from 'pinia';
|
||||
import { AnimatePresence, motion, useMotionValue, useSpring } from 'motion-v';
|
||||
import 'vue-router';
|
||||
import 'node:module';
|
||||
import 'node:buffer';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:zlib';
|
||||
import 'node:stream';
|
||||
import 'node:util';
|
||||
import 'node:url';
|
||||
import 'node:net';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import '../_/site.mjs';
|
||||
import '../_/nitro.mjs';
|
||||
import 'unhead/server';
|
||||
import 'unhead/legacy';
|
||||
import 'unhead/plugins';
|
||||
import 'node:events';
|
||||
import 'node:crypto';
|
||||
import 'nostics';
|
||||
import 'vue-bundle-renderer/runtime';
|
||||
import 'devalue';
|
||||
|
||||
//#region app/stores/ui.ts
|
||||
var useUiStore = defineStore("ui", {
|
||||
state: () => ({
|
||||
/** true once the preloader has finished */
|
||||
ready: false,
|
||||
/** mobile navigation overlay */
|
||||
menuOpen: false
|
||||
}),
|
||||
actions: {
|
||||
setReady() {
|
||||
this.ready = true;
|
||||
},
|
||||
openMenu() {
|
||||
this.menuOpen = true;
|
||||
},
|
||||
closeMenu() {
|
||||
this.menuOpen = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/composables/useScrollY.ts
|
||||
/** Reactive `window.scrollY > threshold`, evaluated after mount (passive listener). */
|
||||
function useScrolledPast(threshold) {
|
||||
return ref(false);
|
||||
}
|
||||
//#endregion
|
||||
//#region app/components/layout/BackToTop.vue?vue&type=script&setup=true&lang.ts
|
||||
var BackToTop_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "BackToTop",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const show = useScrolledPast();
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(ssrRenderComponent(unref(AnimatePresence), _attrs, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
if (unref(show)) _push(ssrRenderComponent(unref(motion).a, {
|
||||
href: "#home",
|
||||
"aria-label": "بازگشت به بالا",
|
||||
initial: {
|
||||
opacity: 0,
|
||||
y: 24
|
||||
},
|
||||
animate: {
|
||||
opacity: 1,
|
||||
y: 0
|
||||
},
|
||||
exit: {
|
||||
opacity: 0,
|
||||
y: 24
|
||||
},
|
||||
class: "fixed bottom-6 left-6 z-[70] flex size-12 items-center justify-center rounded-full border border-line bg-panel/90 text-ink shadow-[0_10px_40px_rgba(0,0,0,0.5)] backdrop-blur transition-colors hover:border-accent hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-up",
|
||||
class: "size-5"
|
||||
}, null, _parent, _scopeId));
|
||||
else return [createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-up",
|
||||
class: "size-5"
|
||||
})];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
else _push(`<!---->`);
|
||||
} else return [unref(show) ? (openBlock(), createBlock(unref(motion).a, {
|
||||
key: 0,
|
||||
href: "#home",
|
||||
"aria-label": "بازگشت به بالا",
|
||||
initial: {
|
||||
opacity: 0,
|
||||
y: 24
|
||||
},
|
||||
animate: {
|
||||
opacity: 1,
|
||||
y: 0
|
||||
},
|
||||
exit: {
|
||||
opacity: 0,
|
||||
y: 24
|
||||
},
|
||||
class: "fixed bottom-6 left-6 z-[70] flex size-12 items-center justify-center rounded-full border border-line bg-panel/90 text-ink shadow-[0_10px_40px_rgba(0,0,0,0.5)] backdrop-blur transition-colors hover:border-accent hover:text-accent"
|
||||
}, {
|
||||
default: withCtx(() => [createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-up",
|
||||
class: "size-5"
|
||||
})]),
|
||||
_: 1
|
||||
})) : createCommentVNode("", true)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/layout/BackToTop.vue
|
||||
var _sfc_setup$6 = BackToTop_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
BackToTop_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/layout/BackToTop.vue");
|
||||
return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
|
||||
};
|
||||
var BackToTop_default = Object.assign(BackToTop_vue_vue_type_script_setup_true_lang_default, { __name: "LayoutBackToTop" });
|
||||
//#endregion
|
||||
//#region app/components/layout/Cursor.vue?vue&type=script&setup=true&lang.ts
|
||||
var Cursor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "Cursor",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const x = useMotionValue(-100);
|
||||
const y = useMotionValue(-100);
|
||||
const sx = useSpring(x, {
|
||||
stiffness: 550,
|
||||
damping: 45,
|
||||
mass: .4
|
||||
});
|
||||
const sy = useSpring(y, {
|
||||
stiffness: 550,
|
||||
damping: 45,
|
||||
mass: .4
|
||||
});
|
||||
const hover = ref(false);
|
||||
const visible = ref(false);
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<div${ssrRenderAttrs(mergeProps({ class: "pointer-events-none fixed inset-0 z-[120] hidden [@media(pointer:fine)]:block" }, _attrs))}>`);
|
||||
_push(ssrRenderComponent(unref(motion).div, {
|
||||
style: {
|
||||
x: unref(sx),
|
||||
y: unref(sy)
|
||||
},
|
||||
class: "absolute -left-4 -top-4 size-8"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(ssrRenderComponent(unref(motion).div, {
|
||||
animate: {
|
||||
scale: unref(hover) ? 1.9 : 1,
|
||||
opacity: unref(visible) ? 1 : 0,
|
||||
rotate: unref(hover) ? 45 : 0
|
||||
},
|
||||
transition: {
|
||||
type: "spring",
|
||||
stiffness: 320,
|
||||
damping: 24
|
||||
},
|
||||
class: "size-8 rounded-md border-2 border-accent/80"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`<div class="${ssrRenderClass(`absolute inset-0 m-auto size-1 rounded-full bg-accent transition-opacity duration-300 ${unref(visible) ? "opacity-100" : "opacity-0"}`)}"${_scopeId}></div>`);
|
||||
} else return [createVNode(unref(motion).div, {
|
||||
animate: {
|
||||
scale: unref(hover) ? 1.9 : 1,
|
||||
opacity: unref(visible) ? 1 : 0,
|
||||
rotate: unref(hover) ? 45 : 0
|
||||
},
|
||||
transition: {
|
||||
type: "spring",
|
||||
stiffness: 320,
|
||||
damping: 24
|
||||
},
|
||||
class: "size-8 rounded-md border-2 border-accent/80"
|
||||
}, null, 8, ["animate"]), createVNode("div", { class: `absolute inset-0 m-auto size-1 rounded-full bg-accent transition-opacity duration-300 ${unref(visible) ? "opacity-100" : "opacity-0"}` }, null, 2)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div>`);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/layout/Cursor.vue
|
||||
var _sfc_setup$5 = Cursor_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
Cursor_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/layout/Cursor.vue");
|
||||
return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
|
||||
};
|
||||
var Cursor_default = Object.assign(Cursor_vue_vue_type_script_setup_true_lang_default, { __name: "LayoutCursor" });
|
||||
//#endregion
|
||||
//#region \0virtual:public?%2Fimages%2Flogo.png
|
||||
var _virtual_public__2Fimages_2Flogo_default = publicAssetsURL("/images/logo.png");
|
||||
//#endregion
|
||||
//#region app/components/ui/Logo.vue
|
||||
var _sfc_main = {};
|
||||
function _sfc_ssrRender(_ctx, _push, _parent, _attrs) {
|
||||
_push(ssrRenderComponent(NuxtLink, mergeProps({
|
||||
to: "/",
|
||||
class: "flex items-center gap-3",
|
||||
"aria-label": "ایمن پیشگامان"
|
||||
}, _attrs), {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`<span class="flex size-10 items-center justify-center rounded-xl bg-white shadow-[0_0_28px_rgba(10,30,92,0.45)]"${_scopeId}><img${ssrRenderAttr("src", _virtual_public__2Fimages_2Flogo_default)} alt="ایمن پیشگامان" width="28" height="28" class="size-7 object-contain"${_scopeId}></span><span class="leading-tight"${_scopeId}><span class="block text-lg font-black"${_scopeId}>ایمن پیشگامان</span><span class="block font-mono text-[9px] tracking-[0.32em] text-muted"${_scopeId}> IMEN PISHGAMAN CO. </span></span>`);
|
||||
else return [createVNode("span", { class: "flex size-10 items-center justify-center rounded-xl bg-white shadow-[0_0_28px_rgba(10,30,92,0.45)]" }, [createVNode("img", {
|
||||
src: _virtual_public__2Fimages_2Flogo_default,
|
||||
alt: "ایمن پیشگامان",
|
||||
width: "28",
|
||||
height: "28",
|
||||
class: "size-7 object-contain"
|
||||
})]), createVNode("span", { class: "leading-tight" }, [createVNode("span", { class: "block text-lg font-black" }, "ایمن پیشگامان"), createVNode("span", { class: "block font-mono text-[9px] tracking-[0.32em] text-muted" }, " IMEN PISHGAMAN CO. ")])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
}
|
||||
var _sfc_setup$4 = _sfc_main.setup;
|
||||
_sfc_main.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/Logo.vue");
|
||||
return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
|
||||
};
|
||||
var Logo_default = /*#__PURE__*/ Object.assign(_plugin_vue_export_helper_default(_sfc_main, [["ssrRender", _sfc_ssrRender]]), { __name: "UiLogo" });
|
||||
//#endregion
|
||||
//#region app/components/layout/Footer.vue?vue&type=script&setup=true&lang.ts
|
||||
var Footer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "Footer",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const ALL_QUICK_LINKS = [
|
||||
{
|
||||
href: "/#home",
|
||||
label: "خانه",
|
||||
section: "hero"
|
||||
},
|
||||
{
|
||||
href: "/#products",
|
||||
label: "محصولات",
|
||||
section: "productsIntro"
|
||||
},
|
||||
{
|
||||
href: "/#about",
|
||||
label: "درباره ما",
|
||||
section: "about"
|
||||
},
|
||||
{
|
||||
href: "/#services",
|
||||
label: "خدمات",
|
||||
section: "services"
|
||||
},
|
||||
{
|
||||
href: "/#standards",
|
||||
label: "استانداردها",
|
||||
section: "standards"
|
||||
},
|
||||
{
|
||||
href: "/#industries",
|
||||
label: "صنایع",
|
||||
section: "industries"
|
||||
}
|
||||
];
|
||||
const SOCIAL_META = {
|
||||
website: {
|
||||
icon: "global",
|
||||
label: "وبسایت"
|
||||
},
|
||||
telegram: {
|
||||
icon: "send-2",
|
||||
label: "تلگرام"
|
||||
},
|
||||
instagram: {
|
||||
icon: "instagram",
|
||||
label: "اینستاگرام"
|
||||
},
|
||||
linkedin: {
|
||||
icon: "link",
|
||||
label: "لینکدین"
|
||||
},
|
||||
whatsapp: {
|
||||
icon: "messages-2",
|
||||
label: "واتساپ"
|
||||
},
|
||||
bale: {
|
||||
icon: "messages-2",
|
||||
label: "بله"
|
||||
},
|
||||
eitaa: {
|
||||
icon: "messages-2",
|
||||
label: "ایتا"
|
||||
},
|
||||
aparat: {
|
||||
icon: "video-play",
|
||||
label: "آپارات"
|
||||
},
|
||||
youtube: {
|
||||
icon: "video-play",
|
||||
label: "یوتیوب"
|
||||
},
|
||||
email: {
|
||||
icon: "sms",
|
||||
label: "ایمیل"
|
||||
},
|
||||
phone: {
|
||||
icon: "call",
|
||||
label: "تماس"
|
||||
}
|
||||
};
|
||||
const site = useSiteStore();
|
||||
const footer = computed(() => site.sections.footer);
|
||||
const settings = computed(() => site.settings);
|
||||
const QUICK_LINKS = computed(() => ALL_QUICK_LINKS.filter((l) => site.sections?.[l.section]?.enabled !== false));
|
||||
const PRODUCT_LINKS = computed(() => site.categories.map((c) => ({
|
||||
label: c.name,
|
||||
href: `/categories/${c.slug}`
|
||||
})));
|
||||
const SOCIALS = computed(() => settings.value.socials.map((s) => ({
|
||||
...SOCIAL_META[s.type],
|
||||
href: s.url,
|
||||
external: /^https?:\/\//.test(s.url)
|
||||
})));
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
const _component_NuxtLink = NuxtLink;
|
||||
_push(`<footer${ssrRenderAttrs(mergeProps({ class: "relative overflow-hidden border-t border-line" }, _attrs))}><div class="hazard h-2.5"></div><div class="mx-auto max-w-[1480px] px-5 md:px-8"><div class="grid gap-12 py-16 md:grid-cols-12 md:py-20"><div class="md:col-span-5">`);
|
||||
_push(ssrRenderComponent(Logo_default, null, null, _parent));
|
||||
_push(`<p class="mt-6 max-w-sm text-sm leading-8 text-muted">${ssrInterpolate(unref(footer).about)}</p><div class="mt-7 flex gap-3"><!--[-->`);
|
||||
ssrRenderList(unref(SOCIALS), (s) => {
|
||||
_push(`<a${ssrRenderAttr("href", s.href)}${ssrRenderAttr("aria-label", s.label)}${ssrRenderAttr("target", s.external ? "_blank" : void 0)}${ssrRenderAttr("rel", s.external ? "noopener" : void 0)} class="flex size-10 items-center justify-center rounded-lg border border-line text-muted transition-all duration-300 hover:border-accent hover:bg-accent hover:text-bg">`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: s.icon,
|
||||
class: "size-4"
|
||||
}, null, _parent));
|
||||
_push(`</a>`);
|
||||
});
|
||||
_push(`<!--]--></div></div><div class="md:col-span-2"><div class="font-mono text-xs tracking-[0.25em] text-accent">// دسترسی</div><ul class="mt-5 space-y-3"><!--[-->`);
|
||||
ssrRenderList(unref(QUICK_LINKS), (l) => {
|
||||
_push(`<li><a${ssrRenderAttr("href", l.href)} class="text-sm text-muted transition-colors hover:text-ink">${ssrInterpolate(l.label)}</a></li>`);
|
||||
});
|
||||
_push(`<!--]--></ul></div><div class="md:col-span-2"><div class="font-mono text-xs tracking-[0.25em] text-accent">// محصولات</div><ul class="mt-5 space-y-3"><!--[-->`);
|
||||
ssrRenderList(unref(PRODUCT_LINKS), (p) => {
|
||||
_push(`<li>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: p.href,
|
||||
class: "text-sm text-muted transition-colors hover:text-ink"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`${ssrInterpolate(p.label)}`);
|
||||
else return [createTextVNode(toDisplayString(p.label), 1)];
|
||||
}),
|
||||
_: 2
|
||||
}, _parent));
|
||||
_push(`</li>`);
|
||||
});
|
||||
_push(`<!--]--></ul></div><div class="md:col-span-3"><div class="font-mono text-xs tracking-[0.25em] text-accent">// ارتباط</div><address class="mt-5 space-y-3 text-sm text-muted not-italic"><p class="leading-7">${ssrInterpolate(unref(settings).address.locality)}، ${ssrInterpolate(unref(settings).address.street)}</p><p class="font-mono tracking-wider" dir="ltr"><a${ssrRenderAttr("href", `tel:${unref(settings).phone}`)} class="transition-colors hover:text-ink">${ssrInterpolate(unref(settings).phoneDisplay)}</a></p><p class="font-mono tracking-wider" dir="ltr"><a${ssrRenderAttr("href", `mailto:${unref(settings).email}`)} class="transition-colors hover:text-ink">${ssrInterpolate(unref(settings).email)}</a></p><p class="pt-2 text-xs leading-6">${ssrInterpolate(unref(settings).workingHours)} `);
|
||||
if (unref(footer).emergencyNote) _push(`<!--[--><br> ${ssrInterpolate(unref(footer).emergencyNote)}<!--]-->`);
|
||||
else _push(`<!---->`);
|
||||
_push(`</p></address></div></div><div aria-hidden="true" class="pointer-events-none select-none pb-6"><div class="text-outline text-center text-[17vw] font-black leading-[0.85] md:text-[11vw]">${ssrInterpolate(unref(settings).name)}</div></div><div class="flex flex-wrap items-center justify-between gap-4 border-t border-line py-6 text-xs text-muted"><div>${ssrInterpolate(unref(footer).copyright)}</div>`);
|
||||
if (unref(footer).certLine) _push(`<div class="font-mono text-[10px] tracking-[0.25em]">${ssrInterpolate(unref(footer).certLine)}</div>`);
|
||||
else _push(`<!---->`);
|
||||
_push(`</div></div></footer>`);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/layout/Footer.vue
|
||||
var _sfc_setup$3 = Footer_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
Footer_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/layout/Footer.vue");
|
||||
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
||||
};
|
||||
var Footer_default = Object.assign(Footer_vue_vue_type_script_setup_true_lang_default, { __name: "LayoutFooter" });
|
||||
//#endregion
|
||||
//#region app/composables/useTehranClock.ts
|
||||
function useTehranClock() {
|
||||
const now = ref(null);
|
||||
return {
|
||||
time: computed(() => now.value ? new Intl.DateTimeFormat("fa-IR", {
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
timeZone: "Asia/Tehran"
|
||||
}).format(now.value) : "--:--"),
|
||||
shift: computed(() => {
|
||||
if (!now.value) return "";
|
||||
const hour = Number(new Intl.DateTimeFormat("en-US", {
|
||||
hour: "numeric",
|
||||
hour12: false,
|
||||
timeZone: "Asia/Tehran"
|
||||
}).format(now.value));
|
||||
return hour >= 6 && hour < 14 ? "صبح" : hour >= 14 && hour < 22 ? "عصر" : "شب";
|
||||
})
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
//#region app/components/layout/Header.vue?vue&type=script&setup=true&lang.ts
|
||||
var Header_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "Header",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const ALL_LINKS = [
|
||||
{
|
||||
href: "/#home",
|
||||
label: "خانه",
|
||||
section: "hero"
|
||||
},
|
||||
{
|
||||
href: "/#products",
|
||||
label: "محصولات",
|
||||
section: "productsIntro"
|
||||
},
|
||||
{
|
||||
href: "/#about",
|
||||
label: "درباره ما",
|
||||
section: "about"
|
||||
},
|
||||
{
|
||||
href: "/#services",
|
||||
label: "خدمات",
|
||||
section: "services"
|
||||
},
|
||||
{
|
||||
href: "/#standards",
|
||||
label: "استانداردها",
|
||||
section: "standards"
|
||||
},
|
||||
{
|
||||
href: "/#industries",
|
||||
label: "صنایع",
|
||||
section: "industries"
|
||||
},
|
||||
{
|
||||
href: "/#contact",
|
||||
label: "تماس",
|
||||
section: "contact"
|
||||
}
|
||||
];
|
||||
const ui = useUiStore();
|
||||
const site = useSiteStore();
|
||||
const settings = computed(() => site.settings);
|
||||
const sections = computed(() => site.sections);
|
||||
const LINKS = computed(() => ALL_LINKS.filter((l) => sections.value?.[l.section]?.enabled !== false));
|
||||
const scrolled = useScrolledPast();
|
||||
const { time, shift } = useTehranClock();
|
||||
watch(() => ui.menuOpen, (open) => {
|
||||
(void 0).body.style.overflow = open ? "hidden" : "";
|
||||
});
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<!--[-->`);
|
||||
_push(ssrRenderComponent(unref(motion).header, {
|
||||
initial: {
|
||||
y: -90,
|
||||
opacity: 0
|
||||
},
|
||||
animate: unref(ui).ready ? {
|
||||
y: 0,
|
||||
opacity: 1
|
||||
} : {},
|
||||
transition: {
|
||||
duration: .9,
|
||||
delay: .15,
|
||||
ease: "EASE" in _ctx ? _ctx.EASE : unref(EASE)
|
||||
},
|
||||
class: `fixed inset-x-0 top-0 z-[80] transition-all duration-500 ${unref(scrolled) ? "border-b border-line bg-bg/85 py-3 backdrop-blur-xl" : "py-5"}`
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="mx-auto flex max-w-[1480px] items-center justify-between px-5 md:px-8"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(Logo_default, null, null, _parent, _scopeId));
|
||||
_push(`<nav class="hidden items-center gap-7 lg:flex"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(LINKS), (l) => {
|
||||
_push(`<a${ssrRenderAttr("href", l.href)} class="group relative py-2 text-sm text-ink/75 transition-colors hover:text-ink"${_scopeId}>${ssrInterpolate(l.label)} <span class="absolute bottom-0 start-0 h-0.5 w-full origin-right scale-x-0 bg-accent transition-transform duration-300 group-hover:scale-x-100"${_scopeId}></span></a>`);
|
||||
});
|
||||
_push(`<!--]--></nav><div class="flex items-center gap-3"${_scopeId}><div class="hidden items-center gap-2.5 rounded-full border border-line px-4 py-2 text-[11px] text-muted xl:flex"${_scopeId}><span class="size-1.5 animate-pulse rounded-full bg-emerald-400"${_scopeId}></span><span class="font-mono"${_scopeId}>${ssrInterpolate(unref(time))}</span><span class="text-muted/50"${_scopeId}>|</span><span${_scopeId}>تهران — شیفت ${ssrInterpolate(unref(shift))}</span></div><a href="/#contact" class="hidden items-center gap-2 rounded-full bg-accent px-5 py-2.5 text-sm font-bold text-bg transition-all duration-300 hover:bg-accent-soft hover:shadow-[0_0_30px_rgba(255,90,0,0.4)] md:flex"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(` درخواست مشاوره </a><button aria-label="باز کردن منو" class="flex size-11 items-center justify-center rounded-lg border border-line text-ink transition-colors hover:border-accent hover:text-accent lg:hidden"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "menu",
|
||||
class: "size-5"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</button></div></div>`);
|
||||
} else return [createVNode("div", { class: "mx-auto flex max-w-[1480px] items-center justify-between px-5 md:px-8" }, [
|
||||
createVNode(Logo_default),
|
||||
createVNode("nav", { class: "hidden items-center gap-7 lg:flex" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(LINKS), (l) => {
|
||||
return openBlock(), createBlock("a", {
|
||||
key: l.href,
|
||||
href: l.href,
|
||||
class: "group relative py-2 text-sm text-ink/75 transition-colors hover:text-ink"
|
||||
}, [createTextVNode(toDisplayString(l.label) + " ", 1), createVNode("span", { class: "absolute bottom-0 start-0 h-0.5 w-full origin-right scale-x-0 bg-accent transition-transform duration-300 group-hover:scale-x-100" })], 8, ["href"]);
|
||||
}), 128))]),
|
||||
createVNode("div", { class: "flex items-center gap-3" }, [
|
||||
createVNode("div", { class: "hidden items-center gap-2.5 rounded-full border border-line px-4 py-2 text-[11px] text-muted xl:flex" }, [
|
||||
createVNode("span", { class: "size-1.5 animate-pulse rounded-full bg-emerald-400" }),
|
||||
createVNode("span", { class: "font-mono" }, toDisplayString(unref(time)), 1),
|
||||
createVNode("span", { class: "text-muted/50" }, "|"),
|
||||
createVNode("span", null, "تهران — شیفت " + toDisplayString(unref(shift)), 1)
|
||||
]),
|
||||
createVNode("a", {
|
||||
href: "/#contact",
|
||||
class: "hidden items-center gap-2 rounded-full bg-accent px-5 py-2.5 text-sm font-bold text-bg transition-all duration-300 hover:bg-accent-soft hover:shadow-[0_0_30px_rgba(255,90,0,0.4)] md:flex"
|
||||
}, [createVNode(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4"
|
||||
}), createTextVNode(" درخواست مشاوره ")]),
|
||||
createVNode("button", {
|
||||
"aria-label": "باز کردن منو",
|
||||
class: "flex size-11 items-center justify-center rounded-lg border border-line text-ink transition-colors hover:border-accent hover:text-accent lg:hidden",
|
||||
onClick: unref(ui).openMenu
|
||||
}, [createVNode(VuesaxIcon_default, {
|
||||
name: "menu",
|
||||
class: "size-5"
|
||||
})], 8, ["onClick"])
|
||||
])
|
||||
])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(ssrRenderComponent(unref(AnimatePresence), null, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
if (unref(ui).menuOpen) _push(ssrRenderComponent(unref(motion).div, {
|
||||
initial: { opacity: 0 },
|
||||
animate: { opacity: 1 },
|
||||
exit: { opacity: 0 },
|
||||
transition: { duration: .35 },
|
||||
class: "fixed inset-0 z-[110] flex flex-col bg-bg/95 backdrop-blur-2xl"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="flex items-center justify-between border-b border-line px-5 py-4 md:px-8"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(Logo_default, null, null, _parent, _scopeId));
|
||||
_push(`<button aria-label="بستن منو" class="flex size-11 items-center justify-center rounded-lg border border-line transition-colors hover:border-accent hover:text-accent"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "close-circle",
|
||||
class: "size-5"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</button></div><nav class="flex flex-1 flex-col justify-center gap-1 overflow-y-auto px-8"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(LINKS), (l, i) => {
|
||||
_push(ssrRenderComponent(unref(motion).a, {
|
||||
key: l.href,
|
||||
href: l.href,
|
||||
initial: {
|
||||
opacity: 0,
|
||||
x: 44
|
||||
},
|
||||
animate: {
|
||||
opacity: 1,
|
||||
x: 0
|
||||
},
|
||||
transition: {
|
||||
delay: .08 + i * .055,
|
||||
duration: .55,
|
||||
ease: "EASE" in _ctx ? _ctx.EASE : unref(EASE)
|
||||
},
|
||||
class: "group flex items-baseline gap-5 border-b border-line/60 py-4",
|
||||
onClick: unref(ui).closeMenu
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`<span class="font-mono text-xs text-accent"${_scopeId}>${ssrInterpolate(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(i + 1).padStart(2, "0")))}</span><span class="text-3xl font-black transition-colors group-hover:text-accent"${_scopeId}>${ssrInterpolate(l.label)}</span>`);
|
||||
else return [createVNode("span", { class: "font-mono text-xs text-accent" }, toDisplayString(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(i + 1).padStart(2, "0"))), 1), createVNode("span", { class: "text-3xl font-black transition-colors group-hover:text-accent" }, toDisplayString(l.label), 1)];
|
||||
}),
|
||||
_: 2
|
||||
}, _parent, _scopeId));
|
||||
});
|
||||
_push(`<!--]--></nav><div class="flex items-center justify-between border-t border-line p-8 text-sm"${_scopeId}><div class="flex items-center gap-3 text-muted"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4 text-accent"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`<a${ssrRenderAttr("href", `tel:${unref(settings).phone}`)} class="font-mono" dir="ltr"${_scopeId}>${ssrInterpolate(unref(settings).phoneDisplay)}</a></div><div class="text-xs text-muted"${_scopeId}>تهران — شیفت ${ssrInterpolate(unref(shift))}، ${ssrInterpolate(unref(time))}</div></div>`);
|
||||
} else return [
|
||||
createVNode("div", { class: "flex items-center justify-between border-b border-line px-5 py-4 md:px-8" }, [createVNode(Logo_default), createVNode("button", {
|
||||
"aria-label": "بستن منو",
|
||||
class: "flex size-11 items-center justify-center rounded-lg border border-line transition-colors hover:border-accent hover:text-accent",
|
||||
onClick: unref(ui).closeMenu
|
||||
}, [createVNode(VuesaxIcon_default, {
|
||||
name: "close-circle",
|
||||
class: "size-5"
|
||||
})], 8, ["onClick"])]),
|
||||
createVNode("nav", { class: "flex flex-1 flex-col justify-center gap-1 overflow-y-auto px-8" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(LINKS), (l, i) => {
|
||||
return openBlock(), createBlock(unref(motion).a, {
|
||||
key: l.href,
|
||||
href: l.href,
|
||||
initial: {
|
||||
opacity: 0,
|
||||
x: 44
|
||||
},
|
||||
animate: {
|
||||
opacity: 1,
|
||||
x: 0
|
||||
},
|
||||
transition: {
|
||||
delay: .08 + i * .055,
|
||||
duration: .55,
|
||||
ease: "EASE" in _ctx ? _ctx.EASE : unref(EASE)
|
||||
},
|
||||
class: "group flex items-baseline gap-5 border-b border-line/60 py-4",
|
||||
onClick: unref(ui).closeMenu
|
||||
}, {
|
||||
default: withCtx(() => [createVNode("span", { class: "font-mono text-xs text-accent" }, toDisplayString(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(i + 1).padStart(2, "0"))), 1), createVNode("span", { class: "text-3xl font-black transition-colors group-hover:text-accent" }, toDisplayString(l.label), 1)]),
|
||||
_: 2
|
||||
}, 1032, [
|
||||
"href",
|
||||
"transition",
|
||||
"onClick"
|
||||
]);
|
||||
}), 128))]),
|
||||
createVNode("div", { class: "flex items-center justify-between border-t border-line p-8 text-sm" }, [createVNode("div", { class: "flex items-center gap-3 text-muted" }, [createVNode(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4 text-accent"
|
||||
}), createVNode("a", {
|
||||
href: `tel:${unref(settings).phone}`,
|
||||
class: "font-mono",
|
||||
dir: "ltr"
|
||||
}, toDisplayString(unref(settings).phoneDisplay), 9, ["href"])]), createVNode("div", { class: "text-xs text-muted" }, "تهران — شیفت " + toDisplayString(unref(shift)) + "، " + toDisplayString(unref(time)), 1)])
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
else _push(`<!---->`);
|
||||
} else return [unref(ui).menuOpen ? (openBlock(), createBlock(unref(motion).div, {
|
||||
key: 0,
|
||||
initial: { opacity: 0 },
|
||||
animate: { opacity: 1 },
|
||||
exit: { opacity: 0 },
|
||||
transition: { duration: .35 },
|
||||
class: "fixed inset-0 z-[110] flex flex-col bg-bg/95 backdrop-blur-2xl"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode("div", { class: "flex items-center justify-between border-b border-line px-5 py-4 md:px-8" }, [createVNode(Logo_default), createVNode("button", {
|
||||
"aria-label": "بستن منو",
|
||||
class: "flex size-11 items-center justify-center rounded-lg border border-line transition-colors hover:border-accent hover:text-accent",
|
||||
onClick: unref(ui).closeMenu
|
||||
}, [createVNode(VuesaxIcon_default, {
|
||||
name: "close-circle",
|
||||
class: "size-5"
|
||||
})], 8, ["onClick"])]),
|
||||
createVNode("nav", { class: "flex flex-1 flex-col justify-center gap-1 overflow-y-auto px-8" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(LINKS), (l, i) => {
|
||||
return openBlock(), createBlock(unref(motion).a, {
|
||||
key: l.href,
|
||||
href: l.href,
|
||||
initial: {
|
||||
opacity: 0,
|
||||
x: 44
|
||||
},
|
||||
animate: {
|
||||
opacity: 1,
|
||||
x: 0
|
||||
},
|
||||
transition: {
|
||||
delay: .08 + i * .055,
|
||||
duration: .55,
|
||||
ease: "EASE" in _ctx ? _ctx.EASE : unref(EASE)
|
||||
},
|
||||
class: "group flex items-baseline gap-5 border-b border-line/60 py-4",
|
||||
onClick: unref(ui).closeMenu
|
||||
}, {
|
||||
default: withCtx(() => [createVNode("span", { class: "font-mono text-xs text-accent" }, toDisplayString(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(i + 1).padStart(2, "0"))), 1), createVNode("span", { class: "text-3xl font-black transition-colors group-hover:text-accent" }, toDisplayString(l.label), 1)]),
|
||||
_: 2
|
||||
}, 1032, [
|
||||
"href",
|
||||
"transition",
|
||||
"onClick"
|
||||
]);
|
||||
}), 128))]),
|
||||
createVNode("div", { class: "flex items-center justify-between border-t border-line p-8 text-sm" }, [createVNode("div", { class: "flex items-center gap-3 text-muted" }, [createVNode(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4 text-accent"
|
||||
}), createVNode("a", {
|
||||
href: `tel:${unref(settings).phone}`,
|
||||
class: "font-mono",
|
||||
dir: "ltr"
|
||||
}, toDisplayString(unref(settings).phoneDisplay), 9, ["href"])]), createVNode("div", { class: "text-xs text-muted" }, "تهران — شیفت " + toDisplayString(unref(shift)) + "، " + toDisplayString(unref(time)), 1)])
|
||||
]),
|
||||
_: 1
|
||||
})) : createCommentVNode("", true)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`<!--]-->`);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/layout/Header.vue
|
||||
var _sfc_setup$2 = Header_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
Header_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/layout/Header.vue");
|
||||
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
||||
};
|
||||
var Header_default = Object.assign(Header_vue_vue_type_script_setup_true_lang_default, { __name: "LayoutHeader" });
|
||||
//#endregion
|
||||
//#region app/components/layout/Preloader.vue?vue&type=script&setup=true&lang.ts
|
||||
var Preloader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "Preloader",
|
||||
__ssrInlineRender: true,
|
||||
emits: ["complete"],
|
||||
setup(__props, { emit: __emit }) {
|
||||
const STEPS = [
|
||||
"بررسی سیستمهای ایمنی",
|
||||
"تأیید استانداردهای بینالمللی",
|
||||
"بارگذاری تجهیزات حفاظت فردی",
|
||||
"محیط کاری آماده است"
|
||||
];
|
||||
const progress = ref(0);
|
||||
const step = computed(() => STEPS[Math.min(STEPS.length - 1, Math.floor(progress.value / 100 * STEPS.length))]);
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(ssrRenderComponent(unref(motion).div, mergeProps({
|
||||
exit: { y: "-100%" },
|
||||
transition: {
|
||||
duration: .85,
|
||||
ease: [
|
||||
.76,
|
||||
0,
|
||||
.24,
|
||||
1
|
||||
]
|
||||
},
|
||||
class: "fixed inset-0 z-[200] flex flex-col items-center justify-center bg-bg"
|
||||
}, _attrs), {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`<div class="hazard absolute inset-x-0 top-0 h-3"${_scopeId}></div><div class="hazard absolute inset-x-0 bottom-0 h-3"${_scopeId}></div><div class="flex items-center gap-4"${_scopeId}><span class="flex size-12 items-center justify-center rounded-xl bg-white shadow-[0_0_28px_rgba(255,90,0,0.3)] ring-1 ring-white/10"${_scopeId}><img${ssrRenderAttr("src", _virtual_public__2Fimages_2Flogo_default)} alt="ایمن پیشگامان" width="32" height="32" class="size-8 object-contain"${_scopeId}></span><span class="font-mono text-xs tracking-[0.35em] text-muted"${_scopeId}> IMEN PISHGAMAN CO. </span></div><div class="mt-12 font-mono text-7xl font-semibold tabular-nums md:text-8xl"${_scopeId}>${ssrInterpolate(unref(progress).toLocaleString("fa-IR"))}<span class="text-accent"${_scopeId}>٪</span></div><div class="mt-8 h-[3px] w-64 overflow-hidden rounded-full bg-line md:w-80"${_scopeId}><div class="h-full bg-accent transition-all duration-200" style="${ssrRenderStyle({ width: `${unref(progress)}%` })}"${_scopeId}></div></div><div class="mt-6 flex items-center gap-3 text-xs text-muted"${_scopeId}><span class="size-1.5 animate-pulse rounded-full bg-accent"${_scopeId}></span> ${ssrInterpolate(unref(step))} <span class="animate-blink text-accent"${_scopeId}>▍</span></div>`);
|
||||
else return [
|
||||
createVNode("div", { class: "hazard absolute inset-x-0 top-0 h-3" }),
|
||||
createVNode("div", { class: "hazard absolute inset-x-0 bottom-0 h-3" }),
|
||||
createVNode("div", { class: "flex items-center gap-4" }, [createVNode("span", { class: "flex size-12 items-center justify-center rounded-xl bg-white shadow-[0_0_28px_rgba(255,90,0,0.3)] ring-1 ring-white/10" }, [createVNode("img", {
|
||||
src: _virtual_public__2Fimages_2Flogo_default,
|
||||
alt: "ایمن پیشگامان",
|
||||
width: "32",
|
||||
height: "32",
|
||||
class: "size-8 object-contain"
|
||||
})]), createVNode("span", { class: "font-mono text-xs tracking-[0.35em] text-muted" }, " IMEN PISHGAMAN CO. ")]),
|
||||
createVNode("div", { class: "mt-12 font-mono text-7xl font-semibold tabular-nums md:text-8xl" }, [createTextVNode(toDisplayString(unref(progress).toLocaleString("fa-IR")), 1), createVNode("span", { class: "text-accent" }, "٪")]),
|
||||
createVNode("div", { class: "mt-8 h-[3px] w-64 overflow-hidden rounded-full bg-line md:w-80" }, [createVNode("div", {
|
||||
class: "h-full bg-accent transition-all duration-200",
|
||||
style: { width: `${unref(progress)}%` }
|
||||
}, null, 4)]),
|
||||
createVNode("div", { class: "mt-6 flex items-center gap-3 text-xs text-muted" }, [
|
||||
createVNode("span", { class: "size-1.5 animate-pulse rounded-full bg-accent" }),
|
||||
createTextVNode(" " + toDisplayString(unref(step)) + " ", 1),
|
||||
createVNode("span", { class: "animate-blink text-accent" }, "▍")
|
||||
])
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/layout/Preloader.vue
|
||||
var _sfc_setup$1 = Preloader_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
Preloader_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/layout/Preloader.vue");
|
||||
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
||||
};
|
||||
var Preloader_default = Object.assign(Preloader_vue_vue_type_script_setup_true_lang_default, { __name: "LayoutPreloader" });
|
||||
//#endregion
|
||||
//#region app/layouts/default.vue?vue&type=script&setup=true&lang.ts
|
||||
var default_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "default",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const ui = useUiStore();
|
||||
const site = useSiteStore();
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<div${ssrRenderAttrs(_attrs)}>`);
|
||||
_push(ssrRenderComponent(unref(AnimatePresence), null, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
if (!unref(ui).ready) _push(ssrRenderComponent(Preloader_default, { onComplete: unref(ui).setReady }, null, _parent, _scopeId));
|
||||
else _push(`<!---->`);
|
||||
} else return [!unref(ui).ready ? (openBlock(), createBlock(Preloader_default, {
|
||||
key: 0,
|
||||
onComplete: unref(ui).setReady
|
||||
}, null, 8, ["onComplete"])) : createCommentVNode("", true)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(ssrRenderComponent(Cursor_default, null, null, _parent));
|
||||
_push(`<div class="noise" aria-hidden="true"></div>`);
|
||||
_push(ssrRenderComponent(Header_default, null, null, _parent));
|
||||
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
||||
if (unref(site).sections?.footer?.enabled !== false) _push(ssrRenderComponent(Footer_default, null, null, _parent));
|
||||
else _push(`<!---->`);
|
||||
_push(ssrRenderComponent(BackToTop_default, null, null, _parent));
|
||||
_push(`</div>`);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/layouts/default.vue
|
||||
var _sfc_setup = default_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
default_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("layouts/default.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
var default_default = default_vue_vue_type_script_setup_true_lang_default;
|
||||
|
||||
export { default_default as default };
|
||||
//# sourceMappingURL=default-BNP_R9fa.mjs.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,32 @@
|
||||
//#region app/utils/motion.ts
|
||||
var EASE = [
|
||||
.22,
|
||||
1,
|
||||
.36,
|
||||
1
|
||||
];
|
||||
/** Convert latin digits to Persian digits */
|
||||
var faNum = (v) => String(v).replace(/\d/g, (d) => "۰۱۲۳۴۵۶۷۸۹"[Number(d)]);
|
||||
/** While-in-view fade-up props for motion elements (spread with v-bind) */
|
||||
var fade = (delay = 0, y = 36) => ({
|
||||
initial: {
|
||||
opacity: 0,
|
||||
y
|
||||
},
|
||||
whileInView: {
|
||||
opacity: 1,
|
||||
y: 0
|
||||
},
|
||||
inViewOptions: {
|
||||
once: true,
|
||||
margin: "-60px"
|
||||
},
|
||||
transition: {
|
||||
duration: .8,
|
||||
delay,
|
||||
ease: EASE
|
||||
}
|
||||
});
|
||||
|
||||
export { EASE as E, fade as a, faNum as f };
|
||||
//# sourceMappingURL=motion-BvlOLZ1k.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"motion-BvlOLZ1k.mjs","sources":["../../../../app/utils/motion.ts"],"names":[],"mappings":";AAAA,IAAa,IAAA,GAAyC;AAAC,CAAA,GAAA;AAAM,CAAA,CAAA;AAAG,CAAA,GAAA;AAAM,CAAA;AAAC;;AAGvE,IAAa,KAAA,GAAA,CAAS,CAAA,KACpB,MAAA,CAAO,CAAC,CAAC,CAAC,OAAA,CAAQ,KAAA,EAAA,CAAQ,CAAA,KAAM,YAAA,CAAa,MAAA,CAAO,CAAC,CAAA,CAAG;;AAG1D,IAAa,IAAA,GAAA,CAAQ,KAAA,GAAQ,CAAA,EAAG,CAAA,GAAI,EAAA,MAAQ;CAC1C,OAAA,EAAS;EAAE,OAAA,EAAS,CAAA;AAAG,EAAA;AAAE,EAAA;CACzB,WAAA,EAAa;EAAE,OAAA,EAAS,CAAA;EAAG,CAAA,EAAG;AAAE,EAAA;CAChC,aAAA,EAAe;EAAE,IAAA,EAAM,IAAA;EAAM,MAAA,EAAQ;AAAiB,EAAA;CACtD,UAAA,EAAY;EAAE,QAAA,EAAU,EAAA;AAAK,EAAA,KAAA;EAAO,IAAA,EAAM;AAAK;AACjD,CAAA;;"}
|
||||
@@ -0,0 +1,204 @@
|
||||
import { b as br, q as qn } from '../virtual/entry.mjs';
|
||||
import 'vue';
|
||||
import 'vue-router';
|
||||
import 'vue/server-renderer';
|
||||
import 'pinia';
|
||||
import 'node:module';
|
||||
import 'node:buffer';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:zlib';
|
||||
import 'node:stream';
|
||||
import 'node:util';
|
||||
import 'node:url';
|
||||
import 'node:net';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import '../routes/renderer.mjs';
|
||||
import '../_/nitro.mjs';
|
||||
import 'unhead/server';
|
||||
import 'unhead/legacy';
|
||||
import 'unhead/plugins';
|
||||
import 'node:events';
|
||||
import 'node:crypto';
|
||||
import 'nostics';
|
||||
import 'vue-bundle-renderer/runtime';
|
||||
import 'devalue';
|
||||
import '../_/site.mjs';
|
||||
|
||||
//#region ../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs
|
||||
var B = Object.defineProperty;
|
||||
var E = (u, a) => B(u, "name", {
|
||||
value: a,
|
||||
configurable: true
|
||||
});
|
||||
var D = 0;
|
||||
var t = {
|
||||
START_BOUNDARY: D++,
|
||||
HEADER_FIELD_START: D++,
|
||||
HEADER_FIELD: D++,
|
||||
HEADER_VALUE_START: D++,
|
||||
HEADER_VALUE: D++,
|
||||
HEADER_VALUE_ALMOST_DONE: D++,
|
||||
HEADERS_ALMOST_DONE: D++,
|
||||
PART_DATA_START: D++,
|
||||
PART_DATA: D++,
|
||||
END: D++
|
||||
};
|
||||
var w = 1;
|
||||
var R = {
|
||||
PART_BOUNDARY: w,
|
||||
LAST_BOUNDARY: w *= 2
|
||||
};
|
||||
var g = 10;
|
||||
var N = 13;
|
||||
var x = 32;
|
||||
var P = 45;
|
||||
var C = 58;
|
||||
var I = 97;
|
||||
var M = 122;
|
||||
var $ = E((u) => u | 32, "lower");
|
||||
var m = E(() => {}, "noop");
|
||||
var F = class F {
|
||||
constructor(a) {
|
||||
this.index = 0, this.flags = 0, this.onHeaderEnd = m, this.onHeaderField = m, this.onHeadersEnd = m, this.onHeaderValue = m, this.onPartBegin = m, this.onPartData = m, this.onPartEnd = m, this.boundaryChars = {}, a = `\r
|
||||
--` + a;
|
||||
const n = new Uint8Array(a.length);
|
||||
for (let r = 0; r < a.length; r++) n[r] = a.charCodeAt(r), this.boundaryChars[n[r]] = true;
|
||||
this.boundary = n, this.lookbehind = new Uint8Array(this.boundary.length + 8), this.state = t.START_BOUNDARY;
|
||||
}
|
||||
write(a) {
|
||||
let n = 0;
|
||||
const r = a.length;
|
||||
let d = this.index, { lookbehind: l, boundary: c, boundaryChars: p, index: e, state: i, flags: A } = this;
|
||||
const H = this.boundary.length, O = H - 1, y = a.length;
|
||||
let o, L;
|
||||
const f = E((h) => {
|
||||
this[h + "Mark"] = n;
|
||||
}, "mark"), s = E((h) => {
|
||||
delete this[h + "Mark"];
|
||||
}, "clear"), T = E((h, S, _, U) => {
|
||||
(S === void 0 || S !== _) && this[h](U && U.subarray(S, _));
|
||||
}, "callback"), b = E((h, S) => {
|
||||
const _ = h + "Mark";
|
||||
_ in this && (S ? (T(h, this[_], n, a), delete this[_]) : (T(h, this[_], a.length, a), this[_] = 0));
|
||||
}, "dataCallback");
|
||||
for (n = 0; n < r; n++) switch (o = a[n], i) {
|
||||
case t.START_BOUNDARY:
|
||||
if (e === c.length - 2) {
|
||||
if (o === P) A |= R.LAST_BOUNDARY;
|
||||
else if (o !== N) return;
|
||||
e++;
|
||||
break;
|
||||
} else if (e - 1 === c.length - 2) {
|
||||
if (A & R.LAST_BOUNDARY && o === P) i = t.END, A = 0;
|
||||
else if (!(A & R.LAST_BOUNDARY) && o === g) e = 0, T("onPartBegin"), i = t.HEADER_FIELD_START;
|
||||
else return;
|
||||
break;
|
||||
}
|
||||
o !== c[e + 2] && (e = -2), o === c[e + 2] && e++;
|
||||
break;
|
||||
case t.HEADER_FIELD_START: i = t.HEADER_FIELD, f("onHeaderField"), e = 0;
|
||||
case t.HEADER_FIELD:
|
||||
if (o === N) {
|
||||
s("onHeaderField"), i = t.HEADERS_ALMOST_DONE;
|
||||
break;
|
||||
}
|
||||
if (e++, o === P) break;
|
||||
if (o === C) {
|
||||
if (e === 1) return;
|
||||
b("onHeaderField", true), i = t.HEADER_VALUE_START;
|
||||
break;
|
||||
}
|
||||
if (L = $(o), L < I || L > M) return;
|
||||
break;
|
||||
case t.HEADER_VALUE_START:
|
||||
if (o === x) break;
|
||||
f("onHeaderValue"), i = t.HEADER_VALUE;
|
||||
case t.HEADER_VALUE:
|
||||
o === N && (b("onHeaderValue", true), T("onHeaderEnd"), i = t.HEADER_VALUE_ALMOST_DONE);
|
||||
break;
|
||||
case t.HEADER_VALUE_ALMOST_DONE:
|
||||
if (o !== g) return;
|
||||
i = t.HEADER_FIELD_START;
|
||||
break;
|
||||
case t.HEADERS_ALMOST_DONE:
|
||||
if (o !== g) return;
|
||||
T("onHeadersEnd"), i = t.PART_DATA_START;
|
||||
break;
|
||||
case t.PART_DATA_START: i = t.PART_DATA, f("onPartData");
|
||||
case t.PART_DATA:
|
||||
if (d = e, e === 0) {
|
||||
for (n += O; n < y && !(a[n] in p);) n += H;
|
||||
n -= O, o = a[n];
|
||||
}
|
||||
if (e < c.length) c[e] === o ? (e === 0 && b("onPartData", true), e++) : e = 0;
|
||||
else if (e === c.length) e++, o === N ? A |= R.PART_BOUNDARY : o === P ? A |= R.LAST_BOUNDARY : e = 0;
|
||||
else if (e - 1 === c.length) if (A & R.PART_BOUNDARY) {
|
||||
if (e = 0, o === g) {
|
||||
A &= ~R.PART_BOUNDARY, T("onPartEnd"), T("onPartBegin"), i = t.HEADER_FIELD_START;
|
||||
break;
|
||||
}
|
||||
} else A & R.LAST_BOUNDARY && o === P ? (T("onPartEnd"), i = t.END, A = 0) : e = 0;
|
||||
if (e > 0) l[e - 1] = o;
|
||||
else if (d > 0) {
|
||||
const h = new Uint8Array(l.buffer, l.byteOffset, l.byteLength);
|
||||
T("onPartData", 0, d, h), d = 0, f("onPartData"), n--;
|
||||
}
|
||||
break;
|
||||
case t.END: break;
|
||||
default: throw new Error(`Unexpected state entered: ${i}`);
|
||||
}
|
||||
b("onHeaderField"), b("onHeaderValue"), b("onPartData"), this.index = e, this.state = i, this.flags = A;
|
||||
}
|
||||
end() {
|
||||
if (this.state === t.HEADER_FIELD_START && this.index === 0 || this.state === t.PART_DATA && this.index === this.boundary.length) this.onPartEnd();
|
||||
else if (this.state !== t.END) throw new Error("MultipartParser.end(): stream ended unexpectedly");
|
||||
}
|
||||
};
|
||||
E(F, "MultipartParser");
|
||||
var k = F;
|
||||
function v(u) {
|
||||
const a = u.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
|
||||
if (!a) return;
|
||||
const n = a[2] || a[3] || "";
|
||||
let r = n.slice(n.lastIndexOf("\\") + 1);
|
||||
return r = r.replace(/%22/g, "\""), r = r.replace(/&#(\d{4});/g, (d, l) => String.fromCharCode(l)), r;
|
||||
}
|
||||
E(v, "_fileName");
|
||||
async function Z(u, a) {
|
||||
if (!/multipart/i.test(a)) throw new TypeError("Failed to fetch");
|
||||
const n = a.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
|
||||
if (!n) throw new TypeError("no or bad content-type header, no multipart boundary");
|
||||
const r = new k(n[1] || n[2]);
|
||||
let d, l, c, p, e, i;
|
||||
const A = [], H = new br(), O = E((s) => {
|
||||
c += f.decode(s, { stream: true });
|
||||
}, "onPartData"), y = E((s) => {
|
||||
A.push(s);
|
||||
}, "appendToFile"), o = E(() => {
|
||||
const s = new qn(A, i, { type: e });
|
||||
H.append(p, s);
|
||||
}, "appendFileToFormData"), L = E(() => {
|
||||
H.append(p, c);
|
||||
}, "appendEntryToFormData"), f = new TextDecoder("utf-8");
|
||||
f.decode(), r.onPartBegin = function() {
|
||||
r.onPartData = O, r.onPartEnd = L, d = "", l = "", c = "", p = "", e = "", i = null, A.length = 0;
|
||||
}, r.onHeaderField = function(s) {
|
||||
d += f.decode(s, { stream: true });
|
||||
}, r.onHeaderValue = function(s) {
|
||||
l += f.decode(s, { stream: true });
|
||||
}, r.onHeaderEnd = function() {
|
||||
if (l += f.decode(), d = d.toLowerCase(), d === "content-disposition") {
|
||||
const s = l.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);
|
||||
s && (p = s[2] || s[3] || ""), i = v(l), i && (r.onPartData = y, r.onPartEnd = o);
|
||||
} else d === "content-type" && (e = l);
|
||||
l = "", d = "";
|
||||
};
|
||||
for await (const s of u) r.write(s);
|
||||
return r.end(), H;
|
||||
}
|
||||
E(Z, "toFormData");
|
||||
|
||||
export { Z as toFormData };
|
||||
//# sourceMappingURL=multipart-parser-BeH9w6_V.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"multipart-parser-BeH9w6_V.mjs","sources":["../../../../../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs"],"names":["V","Y"],"mappings":"","x_google_ignoreList":[0]}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user