"use strict"; const tongji_utils_treeLevels = require("./treeLevels.js"); const TREE_SPECIES_LIST = [ { id: "classic", name: "稳糖灵树", tagline: "经典路线,从种子到圆满", stages: tongji_utils_treeLevels.TREE_LEVELS.map((l) => l.emoji) }, { id: "bonsai", name: "雅韵盆景", tagline: "小巧精致,书桌旁的温柔陪伴", stages: ["🫘", "🌱", "🪴", "🎋", "🪴", "🌳", "🎍", "🌸", "🏵️", "🏆"] }, { id: "pine", name: "苍劲青松", tagline: "挺拔向上,越记越稳", stages: ["🫘", "🌱", "🌿", "🌲", "🌲", "🌲", "⛰️", "🌲", "🏔️", "🏆"] }, { id: "sakura", name: "樱花小树", tagline: "坚持打卡,枝头渐开", stages: ["🫘", "🌱", "🌿", "🌳", "🌸", "🌸", "🌸", "🌸", "🌺", "🏆"] }, { id: "ginkgo", name: "金秋银杏", tagline: "叶色渐变,见证每一天", stages: ["🫘", "🌱", "🍃", "🌳", "🍂", "🍂", "🌳", "🍁", "🌟", "🏆"] } ]; const DAILY_MAX_TASK_POINTS = 40; function getTreeSpecies(id) { return TREE_SPECIES_LIST.find((s) => s.id === id) || TREE_SPECIES_LIST[0]; } function speciesEmojiAtLevel(speciesId, level) { const sp = getTreeSpecies(speciesId); const lv = Math.min(tongji_utils_treeLevels.TREE_MAX_LEVEL, Math.max(0, Number(level) || 0)); return sp.stages[lv] || sp.stages[0] || "🌱"; } function speciesGrowthRoadmap(speciesId) { const sp = getTreeSpecies(speciesId); return tongji_utils_treeLevels.TREE_LEVELS.map((meta, i) => { const xpTotal = i * tongji_utils_treeLevels.TREE_XP_PER_LEVEL; const daysHint = i === 0 ? 0 : Math.max(1, Math.ceil(xpTotal / DAILY_MAX_TASK_POINTS)); return { level: i, name: meta.name, emoji: sp.stages[i] || meta.emoji, desc: meta.desc, xpTotal, daysHint }; }); } function estimateDaysToMaxLevel() { const totalXp = tongji_utils_treeLevels.TREE_MAX_LEVEL * tongji_utils_treeLevels.TREE_XP_PER_LEVEL; return Math.max(1, Math.ceil(totalXp / DAILY_MAX_TASK_POINTS)); } exports.TREE_SPECIES_LIST = TREE_SPECIES_LIST; exports.estimateDaysToMaxLevel = estimateDaysToMaxLevel; exports.getTreeSpecies = getTreeSpecies; exports.speciesEmojiAtLevel = speciesEmojiAtLevel; exports.speciesGrowthRoadmap = speciesGrowthRoadmap; //# sourceMappingURL=../../../.sourcemap/mp-weixin/tongji/utils/treeSpecies.js.map