From 5ba17d60bd43fb1700f9ae12386ad1f5f43f49b3 Mon Sep 17 00:00:00 2001
From: Wx-2025 <351320169@qq.com>
Date: Tue, 5 Aug 2025 05:20:14 +0800
Subject: [PATCH] Update state.js
---
ui/state.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/state.js b/ui/state.js
index 53b64cb..2bc4cf9 100644
--- a/ui/state.js
+++ b/ui/state.js
@@ -1 +1 @@
-(function(_0x3acc7c,_0x4a0568){const _0x2b39a8=_0x5e90,_0x79bbd1=_0x3acc7c();while(!![]){try{const _0x5a689d=-parseInt(_0x2b39a8(0x142))/0x1*(-parseInt(_0x2b39a8(0x141))/0x2)+parseInt(_0x2b39a8(0x125))/0x3+-parseInt(_0x2b39a8(0x132))/0x4*(-parseInt(_0x2b39a8(0x112))/0x5)+-parseInt(_0x2b39a8(0x153))/0x6*(-parseInt(_0x2b39a8(0x145))/0x7)+parseInt(_0x2b39a8(0x10e))/0x8*(-parseInt(_0x2b39a8(0x152))/0x9)+parseInt(_0x2b39a8(0x13c))/0xa*(parseInt(_0x2b39a8(0x14e))/0xb)+-parseInt(_0x2b39a8(0x144))/0xc*(parseInt(_0x2b39a8(0x14b))/0xd);if(_0x5a689d===_0x4a0568)break;else _0x79bbd1['push'](_0x79bbd1['shift']());}catch(_0x18c1e5){_0x79bbd1['push'](_0x79bbd1['shift']());}}}(_0xb32b,0xbc6de));import{extension_settings}from'/scripts/extensions.js';import{extensionName}from'../utils/settings.js';import{pluginAuthStatus}from'../utils/auth.js';function _0xb32b(){const _0x20be21=['533136SymgXb','#amily2_lore_insertion_position','optimizationMode','#amily2_mhb_small_trigger_count','245CqFKiA','input[name=\x22amily2_icon_location\x22][value=\x22','','#auth_panel','append','#amily2_system_prompt','hide','#amily2_suppress_toast','#amily2_optimization_enabled','checked','#amily2_summarization_prompt','val','#amily2_max_tokens_value','#amily2_api_url','#amily2_model','','#amily2_context_messages_value','suppressToast','请检查API配置后点击\x22刷新模型\x22','383853xXQwNo','prop','#amily2_main_prompt','#amily2_optimization_exclusion_enabled','apiKey','autoHideEnabled','text','showOptimizationToast','enabled','loreInsertionPosition','#amily2_auto_hide_threshold','autoHideThreshold','','90976adMefd','input[name=\x22amily2_lorebook_target\x22][value=\x22','empty','lorebookTarget','#amily2_api_key','at_depth','attr','iconLocation','worldbookEnabled','#amily2_update_indicator','15420710UvgRoj','temperature','optimizationTargetTag','mainPrompt','#amily2_temperature_value','2NHLPTJ','890533EmTxzm','systemPrompt','470892yQLouJ','7JkIwpw','input[name=\x22amily2_optimization_mode\x22][value=\x22','已加载\x20','length','\x20个可用模型','selected','754jpPXrZ','.plugin-features','#amily2_model_notes','11eFlbio','#amily2_output_format_prompt','summarizationPrompt','optimizationExclusionEnabled','180BmfNcV','4233678LRUZCE','summarizationEnabled','optimizationEnabled','#amily2_worldbook_enabled','show','forEach','#amily2_lore_activation_mode','historiographySmallTriggerThreshold','authorized','model','#amily2_max_tokens','historiographySmallAutoEnable','#amily2_enabled','outputFormatPrompt','contextMessages','#amily2_auto_hide_enabled','#amily2_lore_depth_input','#amily2_optimization_target_tag','#amily2_summarization_enabled','html'];_0xb32b=function(){return _0x20be21;};return _0xb32b();}let availableModels=[],latestUpdateInfo=null,newVersionAvailable=![];export function setUpdateInfo(_0x238b70,_0x420607){newVersionAvailable=_0x238b70,latestUpdateInfo=_0x420607;}export function applyUpdateIndicator(){const _0x92bb50=_0x5e90;if(newVersionAvailable)$(_0x92bb50(0x13b))[_0x92bb50(0x157)]();else{}}function _0x5e90(_0x3b41d0,_0x504af5){const _0xb32be5=_0xb32b();return _0x5e90=function(_0x5e9002,_0x181b24){_0x5e9002=_0x5e9002-0x10e;let _0x3e93c=_0xb32be5[_0x5e9002];return _0x3e93c;},_0x5e90(_0x3b41d0,_0x504af5);}export function getLatestUpdateInfo(){return latestUpdateInfo;}export function setAvailableModels(_0x842684){availableModels=_0x842684;}export function populateModelDropdown(){const _0x248459=_0x5e90,_0x9b4f9b=$(_0x248459(0x120)),_0x5d99bb=$(_0x248459(0x14d));_0x9b4f9b[_0x248459(0x134)]();const _0x2976eb=extension_settings[extensionName]?.[_0x248459(0x15c)]||'';if(availableModels[_0x248459(0x148)]===0x0){_0x9b4f9b[_0x248459(0x116)](_0x248459(0x131)),_0x5d99bb['html'](_0x248459(0x124));return;}const _0x42e01a=$('')[_0x248459(0x11d)]('')[_0x248459(0x12b)]('--\x20选择模型\x20--');_0x9b4f9b[_0x248459(0x116)](_0x42e01a),availableModels[_0x248459(0x158)](_0x50c7b2=>{const _0x100301=_0x248459,_0xf31cbe=$(_0x100301(0x114))['val'](_0x50c7b2)[_0x100301(0x12b)](_0x50c7b2);_0x50c7b2===_0x2976eb&&_0xf31cbe[_0x100301(0x138)](_0x100301(0x14a),_0x100301(0x14a)),_0x9b4f9b[_0x100301(0x116)](_0xf31cbe);}),_0x2976eb&&_0x9b4f9b[_0x248459(0x11d)]()===_0x2976eb?_0x5d99bb[_0x248459(0x166)]('已选择:\x20'+_0x2976eb+_0x248459(0x121)):_0x5d99bb[_0x248459(0x166)](_0x248459(0x147)+availableModels[_0x248459(0x148)]+_0x248459(0x149));}export function updateUI(){const _0x4e1292=_0x5e90;if(!pluginAuthStatus[_0x4e1292(0x15b)])$(_0x4e1292(0x115))['show'](),$(_0x4e1292(0x14c))[_0x4e1292(0x118)]();else{$(_0x4e1292(0x115))[_0x4e1292(0x118)](),$(_0x4e1292(0x14c))[_0x4e1292(0x157)]();const _0x18d55f=extension_settings[extensionName];if(!_0x18d55f)return;$(_0x4e1292(0x15f))[_0x4e1292(0x126)]('checked',_0x18d55f[_0x4e1292(0x12d)]),$(_0x4e1292(0x11f))[_0x4e1292(0x11d)](_0x18d55f['apiUrl']),$(_0x4e1292(0x136))[_0x4e1292(0x11d)](_0x18d55f[_0x4e1292(0x129)]),$(_0x4e1292(0x120))[_0x4e1292(0x11d)](_0x18d55f[_0x4e1292(0x15c)]),$(_0x4e1292(0x15d))['val'](_0x18d55f['maxTokens']),$(_0x4e1292(0x11e))[_0x4e1292(0x12b)](_0x18d55f['maxTokens']),$('#amily2_temperature')[_0x4e1292(0x11d)](_0x18d55f[_0x4e1292(0x13d)]),$(_0x4e1292(0x140))['text'](_0x18d55f[_0x4e1292(0x13d)]),$('#amily2_context_messages')[_0x4e1292(0x11d)](_0x18d55f['contextMessages']),$(_0x4e1292(0x122))[_0x4e1292(0x12b)](_0x18d55f[_0x4e1292(0x161)]),$(_0x4e1292(0x164))['val'](_0x18d55f[_0x4e1292(0x13e)]),$(_0x4e1292(0x146)+_0x18d55f[_0x4e1292(0x110)]+'\x22]')['prop'](_0x4e1292(0x11b),!![]),$(_0x4e1292(0x11a))[_0x4e1292(0x126)](_0x4e1292(0x11b),_0x18d55f[_0x4e1292(0x155)]),$(_0x4e1292(0x128))['prop'](_0x4e1292(0x11b),_0x18d55f[_0x4e1292(0x151)]),$('#amily2_show_optimization_toast')[_0x4e1292(0x126)](_0x4e1292(0x11b),_0x18d55f[_0x4e1292(0x12c)]),$(_0x4e1292(0x119))['prop'](_0x4e1292(0x11b),_0x18d55f[_0x4e1292(0x123)]),$(_0x4e1292(0x117))['val'](_0x18d55f[_0x4e1292(0x143)]),$(_0x4e1292(0x127))[_0x4e1292(0x11d)](_0x18d55f[_0x4e1292(0x13f)]),$(_0x4e1292(0x14f))[_0x4e1292(0x11d)](_0x18d55f[_0x4e1292(0x160)]),$(_0x4e1292(0x11c))[_0x4e1292(0x11d)](_0x18d55f[_0x4e1292(0x150)]),$(_0x4e1292(0x156))[_0x4e1292(0x126)](_0x4e1292(0x11b),_0x18d55f[_0x4e1292(0x13a)]),$(_0x4e1292(0x165))[_0x4e1292(0x126)](_0x4e1292(0x11b),_0x18d55f[_0x4e1292(0x154)]),$(_0x4e1292(0x133)+_0x18d55f[_0x4e1292(0x135)]+'\x22]')[_0x4e1292(0x126)](_0x4e1292(0x11b),!![]),$(_0x4e1292(0x113)+_0x18d55f[_0x4e1292(0x139)]+'\x22]')['prop']('checked',!![]),$(_0x4e1292(0x162))['prop'](_0x4e1292(0x11b),_0x18d55f[_0x4e1292(0x12a)]),$(_0x4e1292(0x12f))[_0x4e1292(0x11d)](_0x18d55f[_0x4e1292(0x130)]),$('#amily2_auto_hide_threshold_value')['text'](_0x18d55f[_0x4e1292(0x130)]),$(_0x4e1292(0x159))[_0x4e1292(0x11d)](_0x18d55f['loreActivationMode']),$(_0x4e1292(0x10f))['val'](_0x18d55f[_0x4e1292(0x12e)]),$(_0x4e1292(0x163))[_0x4e1292(0x11d)](_0x18d55f['loreDepth']),_0x18d55f[_0x4e1292(0x12e)]===_0x4e1292(0x137)?$('#amily2_lore_depth_container')[_0x4e1292(0x157)]():$('#amily2_lore_depth_container')[_0x4e1292(0x118)](),_0x18d55f[_0x4e1292(0x15e)]!==undefined&&$('#amily2_mhb_small_auto_enabled')[_0x4e1292(0x126)](_0x4e1292(0x11b),_0x18d55f[_0x4e1292(0x15e)]),_0x18d55f['historiographySmallTriggerThreshold']!==undefined&&$(_0x4e1292(0x111))[_0x4e1292(0x11d)](_0x18d55f[_0x4e1292(0x15a)]),populateModelDropdown();}}
+(function(_0x201485,_0x2850d5){const _0x168421=_0x4dbc,_0x183abd=_0x201485();while(!![]){try{const _0x5161d3=parseInt(_0x168421(0xf9))/0x1+parseInt(_0x168421(0xb6))/0x2*(-parseInt(_0x168421(0xe4))/0x3)+parseInt(_0x168421(0xdf))/0x4+-parseInt(_0x168421(0xbd))/0x5*(-parseInt(_0x168421(0xdd))/0x6)+-parseInt(_0x168421(0xf8))/0x7+parseInt(_0x168421(0xf0))/0x8*(-parseInt(_0x168421(0xe1))/0x9)+-parseInt(_0x168421(0xac))/0xa*(-parseInt(_0x168421(0xfa))/0xb);if(_0x5161d3===_0x2850d5)break;else _0x183abd['push'](_0x183abd['shift']());}catch(_0x17a26a){_0x183abd['push'](_0x183abd['shift']());}}}(_0x1dc4,0x2018e));function _0x1dc4(){const _0x15c44a=['historiographySmallTriggerThreshold','#amily2_worldbook_enabled','\x20个可用模型','val','length','show','65OudUQb','mainPrompt','systemPrompt','temperature','iconLocation','contextMessages','#amily2_summarization_prompt','historiographySmallAutoEnable','outputFormatPrompt','loreDepth','#amily2_summarization_enabled','#amily2_lore_depth_input','maxTokens','autoHideEnabled','prop','#amily2_context_messages','selected','#amily2_api_key','#amily2_context_messages_value','optimizationEnabled','model','at_depth','已选择:\x20','checked','autoHideThreshold','input[name=\x22amily2_icon_location\x22][value=\x22','showOptimizationToast','optimizationTargetTag','请检查API配置后点击\x22刷新模型\x22','','hide','html','36486YLyMzZ','forEach','132396gDDUXy','summarizationPrompt','108hPwcGb','已加载\x20','#amily2_system_prompt','5895chJYPJ','worldbookEnabled','#auth_panel','loreInsertionPosition','empty','#amily2_mhb_small_trigger_count','.plugin-features','#amily2_main_prompt','#amily2_auto_hide_threshold_value','#amily2_model','','#amily2_lore_activation_mode','57864nXdzGU','','text','#amily2_update_indicator','--\x20选择模型\x20--','#amily2_optimization_target_tag','#amily2_temperature_value','#amily2_lore_insertion_position','1785126cOPSmy','89067QXoHxk','1550395Lnnzxl','#amily2_lore_depth_container','#amily2_enabled','#amily2_auto_hide_threshold','apiUrl','input[name=\x22amily2_lorebook_target\x22][value=\x22','#amily2_show_optimization_toast','#amily2_update_button_new','summarizationEnabled','20kFoIDc','#amily2_optimization_enabled','#amily2_suppress_toast','append','suppressToast','loreActivationMode','#amily2_output_format_prompt','#amily2_max_tokens','optimizationExclusionEnabled','#amily2_optimization_exclusion_enabled','10AIXWLs'];_0x1dc4=function(){return _0x15c44a;};return _0x1dc4();}import{extension_settings}from'/scripts/extensions.js';import{extensionName}from'../utils/settings.js';import{pluginAuthStatus}from'../utils/auth.js';let availableModels=[],latestUpdateInfo=null,newVersionAvailable=![];function _0x4dbc(_0xa86568,_0x3a4b6){const _0x1dc42b=_0x1dc4();return _0x4dbc=function(_0x4dbc2d,_0xfff98a){_0x4dbc2d=_0x4dbc2d-0xaa;let _0x5aa421=_0x1dc42b[_0x4dbc2d];return _0x5aa421;},_0x4dbc(_0xa86568,_0x3a4b6);}export function setUpdateInfo(_0x4f4dc6,_0x1a76c9){newVersionAvailable=_0x4f4dc6,latestUpdateInfo=_0x1a76c9;}export function applyUpdateIndicator(){const _0x163aee=_0x4dbc;newVersionAvailable?($('#amily2_update_indicator')[_0x163aee(0xbc)](),$(_0x163aee(0xaa))[_0x163aee(0xbc)]()):($(_0x163aee(0xf3))['hide'](),$('#amily2_update_button_new')[_0x163aee(0xdb)]());}export function getLatestUpdateInfo(){return latestUpdateInfo;}export function setAvailableModels(_0x266c9e){availableModels=_0x266c9e;}export function populateModelDropdown(){const _0x22cd3c=_0x4dbc,_0x72d76b=$('#amily2_model'),_0x173f9b=$('#amily2_model_notes');_0x72d76b[_0x22cd3c(0xe8)]();const _0x47cd49=extension_settings[extensionName]?.[_0x22cd3c(0xd1)]||'';if(availableModels['length']===0x0){_0x72d76b[_0x22cd3c(0xaf)](_0x22cd3c(0xee)),_0x173f9b[_0x22cd3c(0xdc)](_0x22cd3c(0xd9));return;}const _0x4270ba=$(_0x22cd3c(0xf1))[_0x22cd3c(0xba)]('')[_0x22cd3c(0xf2)](_0x22cd3c(0xf4));_0x72d76b[_0x22cd3c(0xaf)](_0x4270ba),availableModels[_0x22cd3c(0xde)](_0x332190=>{const _0x14a94c=_0x22cd3c,_0x51a75e=$('')[_0x14a94c(0xba)](_0x332190)[_0x14a94c(0xf2)](_0x332190);_0x332190===_0x47cd49&&_0x51a75e['attr'](_0x14a94c(0xcd),_0x14a94c(0xcd)),_0x72d76b[_0x14a94c(0xaf)](_0x51a75e);}),_0x47cd49&&_0x72d76b['val']()===_0x47cd49?_0x173f9b[_0x22cd3c(0xdc)](_0x22cd3c(0xd3)+_0x47cd49+_0x22cd3c(0xda)):_0x173f9b[_0x22cd3c(0xdc)](_0x22cd3c(0xe2)+availableModels[_0x22cd3c(0xbb)]+_0x22cd3c(0xb9));}export function updateUI(){const _0x2f94cc=_0x4dbc;if(!pluginAuthStatus['authorized'])$(_0x2f94cc(0xe6))[_0x2f94cc(0xbc)](),$(_0x2f94cc(0xea))[_0x2f94cc(0xdb)]();else{$(_0x2f94cc(0xe6))[_0x2f94cc(0xdb)](),$('.plugin-features')[_0x2f94cc(0xbc)]();const _0x1752a3=extension_settings[extensionName];if(!_0x1752a3)return;$(_0x2f94cc(0xfc))[_0x2f94cc(0xcb)](_0x2f94cc(0xd4),_0x1752a3['enabled']),$('#amily2_api_url')['val'](_0x1752a3[_0x2f94cc(0xfe)]),$(_0x2f94cc(0xce))[_0x2f94cc(0xba)](_0x1752a3['apiKey']),$(_0x2f94cc(0xed))[_0x2f94cc(0xba)](_0x1752a3['model']),$(_0x2f94cc(0xb3))['val'](_0x1752a3[_0x2f94cc(0xc9)]),$('#amily2_max_tokens_value')[_0x2f94cc(0xf2)](_0x1752a3['maxTokens']),$('#amily2_temperature')[_0x2f94cc(0xba)](_0x1752a3[_0x2f94cc(0xc0)]),$(_0x2f94cc(0xf6))[_0x2f94cc(0xf2)](_0x1752a3[_0x2f94cc(0xc0)]),$(_0x2f94cc(0xcc))['val'](_0x1752a3[_0x2f94cc(0xc2)]),$(_0x2f94cc(0xcf))[_0x2f94cc(0xf2)](_0x1752a3[_0x2f94cc(0xc2)]),$(_0x2f94cc(0xf5))[_0x2f94cc(0xba)](_0x1752a3[_0x2f94cc(0xd8)]),$('input[name=\x22amily2_optimization_mode\x22][value=\x22'+_0x1752a3['optimizationMode']+'\x22]')[_0x2f94cc(0xcb)](_0x2f94cc(0xd4),!![]),$(_0x2f94cc(0xad))[_0x2f94cc(0xcb)](_0x2f94cc(0xd4),_0x1752a3[_0x2f94cc(0xd0)]),$(_0x2f94cc(0xb5))[_0x2f94cc(0xcb)](_0x2f94cc(0xd4),_0x1752a3[_0x2f94cc(0xb4)]),$(_0x2f94cc(0x100))[_0x2f94cc(0xcb)](_0x2f94cc(0xd4),_0x1752a3[_0x2f94cc(0xd7)]),$(_0x2f94cc(0xae))[_0x2f94cc(0xcb)](_0x2f94cc(0xd4),_0x1752a3[_0x2f94cc(0xb0)]),$(_0x2f94cc(0xe3))['val'](_0x1752a3[_0x2f94cc(0xbf)]),$(_0x2f94cc(0xeb))[_0x2f94cc(0xba)](_0x1752a3[_0x2f94cc(0xbe)]),$(_0x2f94cc(0xb2))[_0x2f94cc(0xba)](_0x1752a3[_0x2f94cc(0xc5)]),$(_0x2f94cc(0xc3))[_0x2f94cc(0xba)](_0x1752a3[_0x2f94cc(0xe0)]),$(_0x2f94cc(0xb8))[_0x2f94cc(0xcb)](_0x2f94cc(0xd4),_0x1752a3[_0x2f94cc(0xe5)]),$(_0x2f94cc(0xc7))[_0x2f94cc(0xcb)](_0x2f94cc(0xd4),_0x1752a3[_0x2f94cc(0xab)]),$(_0x2f94cc(0xff)+_0x1752a3['lorebookTarget']+'\x22]')[_0x2f94cc(0xcb)](_0x2f94cc(0xd4),!![]),$(_0x2f94cc(0xd6)+_0x1752a3[_0x2f94cc(0xc1)]+'\x22]')[_0x2f94cc(0xcb)](_0x2f94cc(0xd4),!![]),$('#amily2_auto_hide_enabled')[_0x2f94cc(0xcb)]('checked',_0x1752a3[_0x2f94cc(0xca)]),$(_0x2f94cc(0xfd))[_0x2f94cc(0xba)](_0x1752a3[_0x2f94cc(0xd5)]),$(_0x2f94cc(0xec))[_0x2f94cc(0xf2)](_0x1752a3[_0x2f94cc(0xd5)]),$(_0x2f94cc(0xef))[_0x2f94cc(0xba)](_0x1752a3[_0x2f94cc(0xb1)]),$(_0x2f94cc(0xf7))[_0x2f94cc(0xba)](_0x1752a3[_0x2f94cc(0xe7)]),$(_0x2f94cc(0xc8))[_0x2f94cc(0xba)](_0x1752a3[_0x2f94cc(0xc6)]),_0x1752a3[_0x2f94cc(0xe7)]===_0x2f94cc(0xd2)?$(_0x2f94cc(0xfb))[_0x2f94cc(0xbc)]():$(_0x2f94cc(0xfb))[_0x2f94cc(0xdb)](),_0x1752a3['historiographySmallAutoEnable']!==undefined&&$('#amily2_mhb_small_auto_enabled')[_0x2f94cc(0xcb)](_0x2f94cc(0xd4),_0x1752a3[_0x2f94cc(0xc4)]),_0x1752a3[_0x2f94cc(0xb7)]!==undefined&&$(_0x2f94cc(0xe9))['val'](_0x1752a3[_0x2f94cc(0xb7)]),populateModelDropdown();}}