import { defineComponent, ref, reactive, computed, unref, useSSRContext } from "vue"; import { ssrRenderAttrs, ssrInterpolate, ssrIncludeBooleanAttr, ssrRenderAttr, ssrRenderList, ssrRenderClass } from "vue/server-renderer"; import "/app/node_modules/hookable/dist/index.mjs"; import "/app/node_modules/klona/dist/index.mjs"; import { a as useI18n } from "../server.mjs"; import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js"; import "/app/node_modules/ofetch/dist/node.mjs"; import "#internal/nuxt/paths"; import "/app/node_modules/unctx/dist/index.mjs"; import "/app/node_modules/h3/dist/index.mjs"; import "pinia"; import "/app/node_modules/defu/dist/defu.mjs"; import "vue-router"; import "/app/node_modules/ufo/dist/index.mjs"; import "/app/node_modules/cookie-es/dist/index.mjs"; import "/app/node_modules/destr/dist/index.mjs"; import "/app/node_modules/ohash/dist/index.mjs"; import "/app/node_modules/@unhead/vue/dist/index.mjs"; import "@vue/devtools-api"; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "config", __ssrInlineRender: true, setup(__props) { const { t } = useI18n(); const loading = ref(true); const error = ref(false); const saving = ref(false); const formError = ref(""); const toast = ref(""); const lastSaved = ref(""); const showRawJson = ref(false); const rawJson = ref(""); const rawJsonError = ref(""); const multiplierKeys = ["L0", "L1", "L2", "L3"]; const xpLogic = reactive({ baseXp: 500, exponent: 1.5 }); const penaltyLogic = reactive({ recoveryRate: 0.5, thresholds: { level1: 100, level2: 500, level3: 1e3 }, multipliers: { L0: 1, L1: 0.5, L2: 0.1, L3: 0 } }); const conversionLogic = reactive({ socialToCreditRate: 100 }); const levelRewards = reactive({ creditsPer10Levels: 50 }); const calculator = reactive({ level: 5, activities: 3, socialPoints: 50 }); const calculatedDailyXp = computed(() => { return Math.round(xpLogic.baseXp * Math.pow(calculator.activities, xpLogic.exponent)); }); const calculatedLevelUpXp = computed(() => { return calculator.level * 1e3; }); const calculatedSocialCredit = computed(() => { return conversionLogic.socialToCreditRate * calculator.socialPoints; }); const calculatedDaysToLevelUp = computed(() => { const daily = calculatedDailyXp.value; if (daily <= 0) return "∞"; return Math.ceil(calculatedLevelUpXp.value / daily) + " " + t("gamification.config.days"); }); function formatNumber(n) { return new Intl.NumberFormat("hu-HU").format(n); } return (_ctx, _push, _parent, _attrs) => { _push(`
${ssrInterpolate(unref(t)("gamification.config.subtitle"))}
${ssrInterpolate(unref(t)("gamification.config.load_error"))}
${ssrInterpolate(unref(t)("gamification.config.calculator_hint"))}
${ssrInterpolate(unref(rawJsonError))}