1/** 2 * Â¥365 ä»è´¹è´¦æ· · æ ¸å¿æ¡£æ¡åè½èªå¨è§£éï¼æé¿æ¡£æ¡ / 平衡ç¹è§£è¯» / è½éè¯æ¹ï¼ 3 */ 4import { hasPaidAccess } from './paidAccess.js'; 5import { saveFeatureFlags } from '../state/features.js'; 6import { setReplenishPlanUnlocked } from '../storage/replenish.js'; 7import { setBaziMultiViewUnlocked } from '../storage/baziMultiViewUnlock.js'; 8import { getSeedTier } from '../storage/inviteCode.js'; 9import { setMeihuaReportUnlocked } from '../storage/meihuaUnlock.js'; 10 11/** 12 * æªä»è´¹ · æ¸ é¤æ¬æº premium è§£éæ è®°ï¼é² localStorage ç¯¡æ¹æ®çï¼ 13 */ 14export function clearPaidFeatureUnlocks() { 15 if (typeof window === 'undefined') return; 16 setReplenishPlanUnlocked(false); 17 setBaziMultiViewUnlocked(false); 18 saveFeatureFlags({ 19 lossGuideEnabled: false, 20 foldingEnabled: false, 21 }); 22} 23 24/** 25 * å·²ä»è´¹ï¼Â¥365 è´¦æ· / é请ç / æ¬å°é¢è§ï¼â åå ¥æ¬æºè§£éæ è®° 26 * æé¿æ¡£æ¡å¯¼åº + 平衡ç¹è§£è¯» + è½éè¯æ¹ï¼æ éäºæ¬¡ä»è´¹ææå¨ç¹ãè§£éã 27 */ 28export function syncPaidFeatureUnlocks() { 29 if (typeof window === 'undefined') return; 30 if (!hasPaidAccess()) { 31 clearPaidFeatureUnlocks(); 32 return; 33 } 34 35 saveFeatureFlags({ 36 lossGuideEnabled: true, 37 foldingEnabled: true, 38 }); 39 setReplenishPlanUnlocked(true); 40 setBaziMultiViewUnlocked(true); 41 42 if (getSeedTier() === 'plus') { 43 setMeihuaReportUnlocked(true); 44 } 45}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.