���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
.trash
/
.output
/
server
/
chunks
/
build
/
Viewing: _id_-BwZVDgq7.mjs
import { _ as __nuxt_component_3 } from './Input-B3b5x64j.mjs'; import { _ as __nuxt_component_1 } from './Select-P-6alWOg.mjs'; import { b as useI18n, c as useLocalePath, h as useNuxtApp, i as useToast, w as useRoute, j as useAsyncData, k as useRuntimeConfig, n as navigateTo, l as __nuxt_component_3$1 } from './server.mjs'; import { _ as __nuxt_component_0 } from './snipper-LQAyL8k0.mjs'; import { defineComponent, ref, reactive, withAsyncContext, mergeProps, unref, withCtx, createVNode, toDisplayString, useSSRContext } from 'vue'; import { u as useAPI } from './useAPI-I7uSbjKz.mjs'; import { ssrRenderAttrs, ssrRenderAttr, ssrInterpolate, ssrRenderComponent, ssrRenderList } from 'vue/server-renderer'; import { u as useMainStore } from './index-hutJPNJL.mjs'; import 'tailwind-merge'; import '../runtime.mjs'; import 'node:http'; import 'node:https'; import 'fs'; import 'path'; import 'node:fs'; import 'node:url'; import '@iconify/utils'; import 'consola/core'; import '@vueuse/core'; import '../routes/renderer.mjs'; import 'vue-bundle-renderer/runtime'; import 'devalue'; import '@unhead/ssr'; import 'unhead'; import '@unhead/shared'; import 'vue-router'; import '@iconify/vue'; import '@iconify/utils/lib/css/icon'; import './fetch-BLrdAwwP.mjs'; import 'js-cookie'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "[id]", __ssrInlineRender: true, async setup(__props) { let __temp, __restore; const { t } = useI18n(); const localePath = useLocalePath(); useI18n(); const config = useRuntimeConfig(); const { $api } = useNuxtApp(); const MainStore = useMainStore(); const toast = useToast(); const { id } = useRoute().params; const loading = ref(false); const state = reactive({ y: void 0, x: void 0, z: void 0, s: void 0, unit_id: void 0, list_id: void 0, c: 1, count: 1 }); const computingUnit = ref(null); const colors = ref([]); useRoute(); const { data } = ([__temp, __restore] = withAsyncContext(async () => useAsyncData(`user:${id}`, async () => { const [feilds, result] = await Promise.all([ $api(config.public.API_URL + "/analyze/materials"), $api(config.public.API_URL + "/analyze/list/single", { query: { unit_id: id } }) ]); const feildsOptions = JSON.parse(feilds).data.materials; const list_res = JSON.parse(result).data.list; const unit_res = list_res.unit; return { feilds: feildsOptions, list: list_res, unit: unit_res }; }, { server: true })), __temp = await __temp, __restore(), __temp); async function computing(type, title, url) { if (!state.y) { return toast.add({ title: t("Length field Alert"), color: "orange" }); } if (!state.x) { return toast.add({ title: t("Width field Alert"), color: "orange" }); } if (!state.z) { return toast.add({ title: t("Height field Alert"), color: "orange" }); } let state_d = 1; if (state.s) { state_d = state.x - state.s; } loading.value = true; const { data: data2 } = await useAPI("/analyze/computing-unit", { method: "POST", immediate: true, server: true, body: { y: state.y, x: state.x, z: state.z, s: state.s, c: state.c, d: state_d, count: state.count, type, unit_id: state.unit_id, list_id: state.list_id, unit_title: title } }); computingUnit.value = JSON.parse(data2.value).data.result; loading.value = false; if (url) { navigateTo(localePath(url)); } } return (_ctx, _push, _parent, _attrs) => { const _component_UInput = __nuxt_component_3; const _component_USelect = __nuxt_component_1; const _component_UButton = __nuxt_component_3$1; const _component_Snipper = __nuxt_component_0; _push(`<div${ssrRenderAttrs(mergeProps({ class: "mb-2 pt-3 px-2 mt-1" }, _attrs))}><section${ssrRenderAttr("dir", _ctx.$i18n.locale == "en" ? "ltr" : "rtl")}><div class="flex justify-between items-start"><div class="w-full flex justify-between items-start mb-3"><div class="w-5/12"><div class="flex justify-between items-center w-full mb-3"><label class="block w-5/12 text-gray-500 bg-white text-sm">${ssrInterpolate(unref(t)("Depth"))}</label><div class="w-7/12">`); _push(ssrRenderComponent(_component_UInput, { loading: false, variant: "outline", inputClass: " w-10/12 sm:w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 py-0 text-xs", onKeypress: unref(MainStore).NumbersOnly, modelValue: unref(state).y, "onUpdate:modelValue": ($event) => unref(state).y = $event }, null, _parent)); _push(`</div></div><div class="flex justify-between items-center w-full mb-3"><label class="block w-5/12 text-gray-500 bg-white text-sm">${ssrInterpolate(unref(t)("Width"))}</label><div class="w-7/12">`); _push(ssrRenderComponent(_component_UInput, { loading: false, variant: "outline", inputClass: " w-10/12 sm:w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 py-0 text-xs", onKeypress: unref(MainStore).NumbersOnly, modelValue: unref(state).x, "onUpdate:modelValue": ($event) => unref(state).x = $event }, null, _parent)); _push(`</div></div><div class="flex justify-between items-center w-full mb-3"><label class="block w-5/12 text-gray-500 bg-white text-sm">${ssrInterpolate(unref(t)("Height"))}</label><div class="w-7/12">`); _push(ssrRenderComponent(_component_UInput, { loading: false, variant: "outline", inputClass: "w-10/12 sm:w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 py-0 text-xs", onKeypress: unref(MainStore).NumbersOnly, modelValue: unref(state).z, "onUpdate:modelValue": ($event) => unref(state).z = $event }, null, _parent)); _push(`</div></div>`); if (unref(data).unit.sabet_status == "true") { _push(`<div class="flex justify-between items-center w-full mb-3"><label class="block w-5/12 text-gray-500 bg-white text-sm">${ssrInterpolate(unref(t)("Fixed Width"))}</label><div class="w-7/12">`); _push(ssrRenderComponent(_component_UInput, { loading: false, variant: "outline", inputClass: "w-10/12 sm:w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 py-0 text-xs", onKeypress: unref(MainStore).NumbersOnly, modelValue: unref(state).s, "onUpdate:modelValue": ($event) => unref(state).s = $event }, null, _parent)); _push(`</div></div>`); } else { _push(`<!---->`); } _push(`<div class="flex justify-between items-center w-full mb-3"><label class="block w-5/12 text-gray-500 bg-white text-sm">${ssrInterpolate(unref(t)("Door Color"))}</label><div class="w-7/12">`); _push(ssrRenderComponent(_component_USelect, { options: unref(colors), "option-attribute": "name", class: "w-full", selectClass: " w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 pl-2 py-0 text-xs", modelValue: unref(state).c, "onUpdate:modelValue": ($event) => unref(state).c = $event }, null, _parent)); _push(`</div></div></div><div class="h-32 w-[13rem] mb-3">`); if (unref(data).unit.image_2_d) { _push(`<img${ssrRenderAttr("src", unref(config).public.FILE_URL + unref(data).unit.image_2_d.address)} class="w-full h-full"${ssrRenderAttr("alt", unref(t)("Add Unit"))}>`); } else { _push(`<!---->`); } _push(ssrRenderComponent(_component_UButton, { loading: false, square: "", onClick: ($event) => computing("computing", unref(data).unit.title, null), class: "w-full flex text-main-700 rounded-sm border border-red-600 h-7 bg-white items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { var _a, _b; if (_push2) { _push2(`<span class="block px-2 text-sm truncate"${_scopeId}>${ssrInterpolate(((_a = unref(computingUnit)) == null ? void 0 : _a.length) ? unref(t)("Recalculate") : unref(t)("Computing"))}</span>`); } else { return [ createVNode("span", { textContent: toDisplayString(((_b = unref(computingUnit)) == null ? void 0 : _b.length) ? unref(t)("Recalculate") : unref(t)("Computing")), class: "block px-2 text-sm truncate" }, null, 8, ["textContent"]) ]; } }), _: 1 }, _parent)); _push(`</div></div></div></section><section class="mb-2">`); if (unref(loading) == true) { _push(`<div>`); _push(ssrRenderComponent(_component_Snipper, null, null, _parent)); _push(`</div>`); } else { _push(`<!---->`); } if (unref(computingUnit)) { _push(`<ul class="w-full p-0"${ssrRenderAttr("dir", _ctx.$i18n.locale == "en" ? "ltr" : "rtl")}><!--[-->`); ssrRenderList(unref(computingUnit), (res, key) => { _push(`<li class="px-2 flex justify-between items-center w-full mb-2 border-b pb-2"><label class="block w-3/12 text-gray-500 text-xs">${ssrInterpolate(_ctx.$i18n.locale == "en" ? res.label_en : res.label)}</label><div dir="ltr" class="w-9/12 flex justify-start items-center"><span class="block w-2/12 text-gray-500 text-center text-xs">${ssrInterpolate(res.length)}</span><span class="block w-1/12 text-gray-500 text-center text-xs"> * </span><span class="block w-2/12 text-gray-500 text-center text-xs">${ssrInterpolate(res.width)}</span>`); if (res.var_1 && res.var_1 != 0) { _push(`<!--[--><span class="block w-1/12 text-gray-500 text-center text-xs"> * </span><span class="block w-2/12 text-gray-500 text-center text-xs">${ssrInterpolate(res.var_1)}</span><!--]-->`); } else { _push(`<!---->`); } if (res.var_2 && res.var_2 != 0) { _push(`<!--[--><span class="block w-1/12 text-gray-500 text-center text-xs"> * </span><span class="block w-2/12 text-gray-500 text-center text-xs">${ssrInterpolate(res.var_2)}</span><!--]-->`); } else { _push(`<!---->`); } _push(`<span class="block w-1/12 text-gray-500 text-center text-xs"> = </span><span class="block w-2/12 text-gray-500 text-center text-xs">${ssrInterpolate(res.count)}</span></div></li>`); }); _push(`<!--]--></ul>`); } else { _push(`<!---->`); } _push(`</section><footer${ssrRenderAttr("dir", _ctx.$i18n.locale == "en" ? "ltr" : "rtl")} class="px-3 bg-white flex justify-center items-center pb-2 pt-2 sm:border-r sm:border-l w-full sm:w-9/12 md:w-7/12 lg:w-6/12 2xl:w-5/12 mx-auto fixed bottom-0 right-0 left-0 border-t"><div class="px-1 w-4/12">`); _push(ssrRenderComponent(_component_UButton, { loading: false, square: "", onClick: ($event) => computing("edit_unit", unref(data).unit.title, "/analyze/list"), class: "w-full flex text-main-700 border-red-700 rounded-sm border h-8 bg-white items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`<span class="block px-2 text-base truncate"${_scopeId}>${ssrInterpolate(unref(t)("Edit"))}</span>`); } else { return [ createVNode("span", { class: "block px-2 text-base truncate" }, toDisplayString(unref(t)("Edit")), 1) ]; } }), _: 1 }, _parent)); _push(`</div></footer></div>`); }; } }); const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/unit/edit/[id].vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; export { _sfc_main as default }; //# sourceMappingURL=_id_-BwZVDgq7.mjs.map
Coded With 💗 by
0x6ick Mod By V1rus_Alfa