@jxgame2020/dsh-token-quota 0.1.40 → 0.1.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js CHANGED
@@ -7,6 +7,14 @@ window.__ModuleLoader__.load({
7
7
  let _deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store");
8
8
  let react_jsx_runtime = require("react/jsx-runtime");
9
9
  let react = require("react");
10
+ //#region lib/types/types.js
11
+ const TOKEN_QUOTA_DEFAULT_TRANSCRIBE = {
12
+ enabled: false,
13
+ baseURL: "https://api.siliconflow.cn/v1",
14
+ apiKeyEnv: "SILICONFLOW_API_KEY",
15
+ model: "XingChenAGI/XingChenASR-V3.2-Ultra"
16
+ };
17
+ //#endregion
10
18
  //#region lib/types/client/store.js
11
19
  /**
12
20
  * Token-quota panel store: the shared, remount-surviving view state. The
@@ -47,6 +55,12 @@ window.__ModuleLoader__.load({
47
55
  musicVolume: .5,
48
56
  musicStyle: "pentatonic",
49
57
  musicOnlyCurrentSession: true,
58
+ transcribe: {
59
+ enabled: false,
60
+ baseURL: "https://api.siliconflow.cn/v1",
61
+ apiKeyEnv: "SILICONFLOW_API_KEY",
62
+ model: "XingChenAGI/XingChenASR-V3.2-Ultra"
63
+ },
50
64
  upgrade: null,
51
65
  upgradeDismissed: false,
52
66
  checkingUpdates: false,
@@ -114,8 +128,11 @@ window.__ModuleLoader__.load({
114
128
  setMusicOnlyCurrentSession: (d, only) => {
115
129
  d.musicOnlyCurrentSession = only;
116
130
  },
131
+ setTranscribeSettings: (d, settings) => {
132
+ d.transcribe = settings;
133
+ },
117
134
  setUpgrade: (d, upgrade) => {
118
- const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.40" ? upgrade : null;
135
+ const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.42" ? upgrade : null;
119
136
  if (d.upgrade === null || d.upgrade.latestVersion !== normalized?.latestVersion) d.upgradeDismissed = false;
120
137
  d.upgrade = normalized;
121
138
  },
@@ -235,152 +252,152 @@ window.__ModuleLoader__.load({
235
252
  }
236
253
  //#endregion
237
254
  //#region \0dsh-css:/Users/jxgame/Desktop/works/deepseek-harness-package/dsh-token-quota/packages/token-quota/src/client/TokenQuotaPanel.module.css.mjs
238
- const css = ".NPLLIq_panel{box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;z-index:40;opacity:1;border-radius:12px;flex-direction:column;width:320px;max-height:min(72vh,560px);transition:opacity .18s;display:flex;position:fixed;top:56px;right:12px;overflow:hidden;box-shadow:0 8px 28px #0000002e}.NPLLIq_panelDim{opacity:.55}.NPLLIq_panelDimStrong{opacity:.3}.NPLLIq_header{border-bottom:1px solid var(--dsw-alias-border-l1);cursor:grab;user-select:none;touch-action:none;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:8px;padding:10px 12px;display:flex}.NPLLIq_header:active{cursor:grabbing}.NPLLIq_headerText{flex-direction:column;gap:2px;min-width:0;display:flex}.NPLLIq_title{color:var(--dsw-alias-label-primary);align-items:baseline;gap:6px;font-size:13px;font-weight:600;display:flex}.NPLLIq_version{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:10px;font-weight:500}.NPLLIq_versionNew{color:var(--dsw-alias-status-warning-foreground,#b56900);background:var(--dsw-alias-status-warning-background,#fff6d7);cursor:default;border-radius:4px;padding:1px 6px}.NPLLIq_subtitle{color:var(--dsw-alias-label-secondary);font-size:11px}.NPLLIq_notesBar{flex-wrap:wrap;flex:100%;align-items:center;gap:4px;padding:2px 0 0;display:flex}.NPLLIq_noteChip{width:20px;height:20px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:5px;flex:none;justify-content:center;align-items:center;padding:0;font-size:11px;line-height:1;transition:color .12s,border-color .12s;display:inline-flex}.NPLLIq_noteChip:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l2)}.NPLLIq_noteChipOpen{color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteNew{width:22px;height:20px;color:var(--dsw-alias-label-secondary);border:1px dashed var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:5px;flex:none;justify-content:center;align-items:center;padding:0;transition:color .12s,border-color .12s;display:inline-flex;position:relative}.NPLLIq_noteNew:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteNew:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_noteNewPlus{color:inherit;font-size:10px;font-weight:700;line-height:1;position:absolute;bottom:-2px;right:-1px}.NPLLIq_noteWin{z-index:60;pointer-events:auto;box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;flex-direction:column;display:flex;position:fixed;overflow:hidden;box-shadow:0 8px 24px #00000038}.NPLLIq_noteWinCollapsed{height:auto!important}.NPLLIq_noteWinBar{background:var(--dsw-alias-bg-layer-1);border-bottom:1px solid var(--dsw-alias-border-l1);cursor:grab;user-select:none;flex:none;align-items:center;gap:4px;padding:4px 6px;display:flex}.NPLLIq_noteWinBar:active{cursor:grabbing}.NPLLIq_noteWinGripBar{color:var(--dsw-alias-label-secondary);opacity:.7;flex:none;font-size:10px}.NPLLIq_noteWinTitleText{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;padding:1px 2px;font-size:11px;font-weight:600;overflow:hidden}.NPLLIq_noteWinTitle{min-width:0;color:var(--dsw-alias-label-primary);background:0 0;border:1px solid #0000;border-radius:4px;outline:none;flex:1;padding:1px 2px;font-size:11px;font-weight:600}.NPLLIq_noteWinTitle:hover{border-color:var(--dsw-alias-border-l1)}.NPLLIq_noteWinTitle:focus{background:var(--dsw-alias-bg-overlay);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteWinBtn{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_noteWinBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2)}.NPLLIq_noteWinText{box-sizing:border-box;width:100%;min-height:0;color:var(--dsw-alias-label-primary);resize:none;background:0 0;border:none;outline:none;flex:1;padding:6px 8px;font-family:inherit;font-size:11px;line-height:1.5}.NPLLIq_noteWinResize{cursor:nwse-resize;background:linear-gradient(135deg, transparent 0 45%, var(--dsw-alias-border-l2) 45% 55%, transparent 55% 70%, var(--dsw-alias-border-l2) 70% 80%, transparent 80%);width:14px;height:14px;position:absolute;bottom:0;right:0}.NPLLIq_noteMenuBackdrop{z-index:100;pointer-events:auto;position:fixed;inset:0}.NPLLIq_noteMenu{z-index:101;pointer-events:auto;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-direction:column;min-width:96px;padding:4px;display:flex;position:fixed;box-shadow:0 8px 24px #0000003d}.NPLLIq_noteMenuItem{text-align:left;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;border-radius:5px;padding:5px 8px;font-size:11px}.NPLLIq_noteMenuItem:hover{background:var(--dsw-alias-bg-layer-2)}.NPLLIq_collapse{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;flex:none;padding:2px 6px;font-size:11px}.NPLLIq_collapse:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_body{padding:4px 0;overflow-y:auto}.NPLLIq_row{border-bottom:1px solid var(--dsw-alias-border-l1);flex-direction:column;gap:6px;padding:8px 12px;display:flex}.NPLLIq_rowHeader{justify-content:space-between;align-items:center;gap:8px;display:flex}.NPLLIq_rowDrag{cursor:grab;color:var(--dsw-alias-label-secondary);user-select:none;border-radius:4px;flex:none;margin-right:2px;padding:2px 3px;font-size:11px;line-height:1}.NPLLIq_rowDrag:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_rowDrag:active{cursor:grabbing}.NPLLIq_rowDragging{opacity:.45}.NPLLIq_rowDropTarget{box-shadow:inset 0 2px 0 var(--dsw-alias-brand-primary)}.NPLLIq_rowName{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;align-items:center;gap:6px;font-size:12px;font-weight:500;display:inline-flex;overflow:hidden}.NPLLIq_currentBadge{color:var(--dsw-alias-state-success-primary);border:1px solid var(--dsw-alias-state-success-primary);border-radius:8px;flex:none;padding:1px 6px;font-size:10px}.NPLLIq_rowMeta{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;flex:none;font-size:11px}.NPLLIq_bar{background:var(--dsw-alias-bg-layer-1);border-radius:3px;height:6px;overflow:hidden}.NPLLIq_fillIdle{background:var(--dsw-alias-brand-primary);height:100%;transition:width .2s}.NPLLIq_fillWarn{background:var(--dsw-alias-state-warn-primary);height:100%;transition:width .2s}.NPLLIq_fillOver{background:var(--dsw-alias-state-error-primary);height:100%;transition:width .2s}.NPLLIq_controls{align-items:center;gap:6px;display:flex}.NPLLIq_input{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);min-width:0;color:var(--dsw-alias-label-primary);border-radius:6px;flex:1;padding:4px 8px;font-size:11px}.NPLLIq_input::placeholder{color:var(--dsw-alias-label-secondary)}.NPLLIq_save,.NPLLIq_switch{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;flex:none;padding:4px 10px;font-size:11px}.NPLLIq_save:hover,.NPLLIq_switch:hover:not(:disabled){background:var(--dsw-alias-bg-layer-2)}.NPLLIq_switch:disabled{opacity:.5;cursor:default}.NPLLIq_balanceToggle{margin-left:auto}.NPLLIq_balanceToggleOpen{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceWin{z-index:1199;background:var(--dsw-alias-bg-layer-2);width:280px;color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;border-radius:12px;flex-direction:column;display:flex;position:fixed;overflow:hidden;box-shadow:0 8px 24px #00000029}.NPLLIq_balanceWinHeader{border-bottom:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-3);user-select:none;align-items:center;gap:6px;padding:6px 8px 6px 12px;display:flex}.NPLLIq_balanceWinTitle{flex:1;font-size:12px;font-weight:600;line-height:1}.NPLLIq_balanceWinBody{font-variant-numeric:tabular-nums;padding:6px 10px 10px;font-size:11px}.NPLLIq_balanceRowHeader{border-bottom:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-secondary);grid-template-columns:1fr auto 20px;align-items:center;gap:6px;padding:3px 2px;font-weight:600;display:grid}.NPLLIq_balanceSortBtn{all:unset;cursor:pointer;color:inherit;border-radius:4px;padding:1px 2px;font-size:10px;font-weight:600}.NPLLIq_balanceSortBtn:hover{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRefreshAll{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceRefreshAll:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRefreshAll:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_balanceRow{grid-template-columns:1fr auto 20px;align-items:center;gap:6px;padding:3px 2px;display:grid}.NPLLIq_balanceRow+.NPLLIq_balanceRow{border-top:1px dashed var(--dsw-alias-border-l1)}.NPLLIq_balanceRowName{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-weight:500;overflow:hidden}.NPLLIq_balanceRowValue{text-align:right;font-weight:600}.NPLLIq_balanceRowRefresh{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceRowRefresh:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRowRefresh:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_balanceValueOk{color:var(--dsw-alias-label-primary)}.NPLLIq_balanceValueLow{color:var(--dsw-alias-state-warn-primary)}.NPLLIq_balanceValueError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_balanceStateHint{color:var(--dsw-alias-label-secondary);font-style:italic;font-weight:500}.NPLLIq_balanceStateError{color:var(--dsw-alias-state-error-primary);font-weight:500}.NPLLIq_balanceLastLine{border-top:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-tertiary);margin-top:6px;padding-top:5px;font-size:10px}.NPLLIq_balanceBar{color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l1);font-variant-numeric:tabular-nums;justify-content:space-between;align-items:center;gap:6px;padding:5px 12px;font-size:11px;display:flex}.NPLLIq_balanceBarText{text-overflow:ellipsis;white-space:nowrap;align-items:center;gap:6px;min-width:0;font-weight:600;display:inline-flex;overflow:hidden}.NPLLIq_balanceBarBadge{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-1);border-radius:4px;flex:none;padding:0 4px;font-size:10px;font-weight:600}.NPLLIq_balanceBarDim{color:var(--dsw-alias-label-secondary);font-weight:500}.NPLLIq_balanceBarLow{color:var(--dsw-alias-state-warn-primary)}.NPLLIq_balanceBarError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_balanceBarRefresh{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceBarRefresh:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceBarRefresh:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_notice,.NPLLIq_noticeError{color:var(--dsw-alias-label-secondary);padding:10px 12px;font-size:12px}.NPLLIq_noticeError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_tab{background:var(--dsw-alias-brand-primary);border:1px solid var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-overlay);pointer-events:auto;cursor:pointer;z-index:90;border-radius:10px;align-items:center;gap:6px;padding:9px 14px;font-size:12px;font-weight:600;display:inline-flex;position:fixed;top:56px;right:12px;box-shadow:0 6px 20px #00000040}.NPLLIq_tab:hover{filter:brightness(1.08)}.NPLLIq_tabIcon{font-size:12px;line-height:1}.NPLLIq_tabLabel{white-space:nowrap}.NPLLIq_headerActions{flex:none;align-items:center;gap:4px;display:flex}.NPLLIq_settingsBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;flex:none;padding:2px 6px;font-size:11px}.NPLLIq_settingsBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_settingsBtnActive{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-2,#0000000f);box-shadow:inset 0 0 0 1px var(--dsw-alias-brand-primary);font-weight:700}.NPLLIq_selectBtn{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-brand-primary);cursor:pointer;background:0 0;border-radius:6px;flex:none;padding:1px 6px;font-size:10px}.NPLLIq_selectBtn:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_gearBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;flex:none;margin-left:6px;padding:0 2px;font-size:12px;line-height:1}.NPLLIq_gearBtn:hover{color:var(--dsw-alias-label-primary)}.NPLLIq_fullNotice{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-state-error-primary);border-radius:8px;margin:6px 12px;padding:8px 10px;font-size:12px}.NPLLIq_upgradeBanner{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-divider-1,#0000001a);border-radius:8px;margin:6px 12px;padding:10px 30px 10px 10px;font-size:12px;position:relative}@keyframes NPLLIq_upgradeBannerFlash{0%,to{border-color:var(--dsw-alias-divider-1,#0000001a);box-shadow:0 0 #f0a02000}50%{border-color:var(--dsw-alias-status-warning-foreground,#b56900);box-shadow:0 0 0 5px #f0a02073}}.NPLLIq_upgradeBannerFlash{border-color:var(--dsw-alias-status-warning-foreground,#b56900);animation:.6s ease-in-out 4 NPLLIq_upgradeBannerFlash}.NPLLIq_upgradeBannerText{margin-bottom:6px;font-weight:600}.NPLLIq_upgradeCommands{flex-direction:column;gap:4px;display:flex}.NPLLIq_upgradeCommandRow{align-items:center;gap:6px;display:flex}.NPLLIq_upgradeCommand{background:var(--dsw-alias-bg-layer-2,#0000000a);white-space:nowrap;border-radius:4px;flex:1;min-width:0;padding:4px 6px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;overflow-x:auto}.NPLLIq_copyBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;flex:none;padding:3px 8px;font-size:11px;transition:transform 80ms,background .12s,color .12s}.NPLLIq_copyBtn:hover{background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_copyBtn:active{transform:scale(.92)}.NPLLIq_copyBtnDone{background:var(--dsw-alias-status-success-background,#14963c1f);border-color:var(--dsw-alias-status-success-foreground,#0a7d32);color:var(--dsw-alias-status-success-foreground,#0a7d32);font-weight:600}.NPLLIq_upgradeHint{color:var(--dsw-alias-label-secondary);margin-top:6px;font-size:11px}.NPLLIq_upgradeClose{width:20px;height:20px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;font-size:16px;line-height:1;position:absolute;top:4px;right:6px}.NPLLIq_upgradeClose:hover{background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary)}.NPLLIq_checkUpdatesRow{justify-content:space-between;align-items:center;gap:12px;display:flex}.NPLLIq_checkUpdatesLabel{color:var(--dsw-alias-label-primary);cursor:pointer;align-items:center;gap:6px;font-size:12px;display:flex}.NPLLIq_checkUpdatesLabel input{margin:0}.NPLLIq_checkUpdatesLabel input[type=range]{min-width:90px;accent-color:var(--dsw-alias-brand-primary);flex:1}.NPLLIq_checkUpdatesLabel select{background:var(--dsw-alias-bg-layer-2,#0000000a);min-width:90px;color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-divider-1,#00000026);border-radius:4px;flex:1;padding:2px 4px;font-size:12px}.NPLLIq_checkBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;text-align:center;border-radius:4px;flex:none;min-width:72px;padding:4px 10px;font-size:12px}.NPLLIq_checkBtn:hover:not(:disabled){background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_checkBtn:disabled{opacity:.6;cursor:default}.NPLLIq_checkErrorHint{color:var(--dsw-alias-state-error-primary,#c00);background:var(--dsw-alias-state-error-background,#ff00000f);border:1px solid var(--dsw-alias-state-error-border,#b4000040);word-break:break-all;border-radius:6px;margin-top:8px;padding:6px 8px;font-size:11px;line-height:1.4}.NPLLIq_dialog{z-index:100;pointer-events:auto;box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;flex-direction:column;gap:12px;width:430px;max-width:94vw;max-height:80vh;padding:14px;display:flex;position:fixed;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%);box-shadow:0 8px 28px #00000040}.NPLLIq_dialogTabs{border-bottom:1px solid var(--dsw-alias-divider-1,#00000014);gap:2px;margin:-6px -14px 0;padding:0 14px;display:flex}.NPLLIq_dialogTab{appearance:none;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;padding:6px 12px 8px;font-size:12px}.NPLLIq_dialogTab:hover{color:var(--dsw-alias-label-primary)}.NPLLIq_dialogTabActive{color:var(--dsw-alias-brand-primary);border-bottom-color:var(--dsw-alias-brand-primary);font-weight:600}.NPLLIq_settingsDialog{height:min(560px,80vh)}.NPLLIq_dialogTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}.NPLLIq_dialogSection{flex-direction:column;gap:6px;display:flex}.NPLLIq_dialogLabel{color:var(--dsw-alias-label-primary);font-size:12px;font-weight:500}.NPLLIq_monitorHint{color:var(--dsw-alias-label-secondary);font-size:11px}.NPLLIq_dialogHint{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:11px;line-height:1.4}.NPLLIq_monitorList{flex-direction:column;gap:2px;max-height:180px;display:flex;overflow-y:auto}.NPLLIq_monitorRow{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:2px 4px;font-size:12px;display:flex}.NPLLIq_monitorRow:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_monitorName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.NPLLIq_radioRow{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:3px 4px;font-size:12px;display:flex}.NPLLIq_radioRow:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_dialogActions{justify-content:flex-end;gap:6px;display:flex}.NPLLIq_dialogBtn,.NPLLIq_dialogBtnPrimary{border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:6px;padding:4px 12px;font-size:11px}.NPLLIq_dialogBtn{background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}.NPLLIq_dialogBtnPrimary{background:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-overlay)}.NPLLIq_dialogHeader{z-index:2;background:var(--dsw-alias-bg-overlay);cursor:grab;user-select:none;touch-action:none;justify-content:space-between;align-items:center;gap:8px;margin:-14px -14px 0;padding:14px 14px 8px;display:flex;position:sticky;top:-14px}.NPLLIq_dialogHeader:active{cursor:grabbing}.NPLLIq_dialogClose{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:8px;flex:none;justify-content:center;align-items:center;font-size:18px;line-height:1;display:flex}.NPLLIq_dialogClose:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_resetRow{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.NPLLIq_resetSelect{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:6px;padding:3px 6px;font-size:12px}.NPLLIq_logTable{border-collapse:collapse;width:100%;font-size:11px}.NPLLIq_logTable th{text-align:left;color:var(--dsw-alias-label-secondary);border-bottom:1px solid var(--dsw-alias-border-l1);padding:4px 6px;font-weight:500}.NPLLIq_logTable td{color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l1);font-variant-numeric:tabular-nums;padding:4px 6px}.NPLLIq_logDayCol{white-space:nowrap;color:var(--dsw-alias-label-secondary)}.NPLLIq_logModelCol{text-overflow:ellipsis;white-space:nowrap;max-width:160px;overflow:hidden}.NPLLIq_logUsedCol{text-align:right}.NPLLIq_logDialog{gap:0;width:380px;max-height:min(72vh,480px);padding:0}.NPLLIq_logHeader{background:var(--dsw-alias-bg-overlay);cursor:grab;user-select:none;touch-action:none;flex:none;justify-content:space-between;align-items:center;gap:8px;padding:14px 14px 8px;display:flex}.NPLLIq_logHeader:active{cursor:grabbing}.NPLLIq_logScroll{flex:1;min-height:0;padding:0 14px 14px;overflow:auto}.NPLLIq_logToolbar{flex:1;align-items:center;gap:6px;display:flex}.NPLLIq_logSearch{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);min-width:0;color:var(--dsw-alias-label-primary);border-radius:4px;flex:1;padding:3px 6px;font-size:11px}.NPLLIq_logSearch:focus{border-color:var(--dsw-alias-accent-1,#4a9eff);outline:none}.NPLLIq_logClearBtn{border:1px solid var(--dsw-alias-state-error-border,#b400004d);color:var(--dsw-alias-state-error-primary,#c00);cursor:pointer;white-space:nowrap;background:0 0;border-radius:4px;flex:none;padding:3px 8px;font-size:11px}.NPLLIq_logClearBtn:hover{background:var(--dsw-alias-state-error-background,#ff00000f)}.NPLLIq_logPager{border-top:1px solid var(--dsw-alias-divider-1,#00000014);background:var(--dsw-alias-bg-overlay);color:var(--dsw-alias-label-secondary);flex:none;justify-content:space-between;align-items:center;gap:8px;padding:6px 14px;font-size:11px;display:flex}.NPLLIq_logPagerInfo{white-space:nowrap}.NPLLIq_logPagerControls{align-items:center;gap:4px;display:flex}.NPLLIq_logPagerBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);width:24px;height:24px;color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;font-size:13px;line-height:1}.NPLLIq_logPagerBtn:disabled{opacity:.4;cursor:default}.NPLLIq_logPagerPages{text-align:center;min-width:50px;color:var(--dsw-alias-label-secondary)}.NPLLIq_logPageSizeSelect{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;padding:2px 4px;font-size:11px}.NPLLIq_dialogOverlay{z-index:100001;pointer-events:auto;background:#0000004d;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.NPLLIq_logClearDialog{gap:0;width:320px;padding:16px}.NPLLIq_dialogBody{color:var(--dsw-alias-label-secondary);margin:6px 0 10px;font-size:12px;line-height:1.5}.NPLLIq_logClearDate{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);width:100%;color:var(--dsw-alias-label-primary);border-radius:6px;margin-bottom:12px;padding:6px 8px;font-size:13px}.NPLLIq_logClearDate:focus{border-color:var(--dsw-alias-accent-1,#4a9eff);outline:none}";
239
- const tagId = "@jxgame2020/dsh-token-quota/TokenQuotaPanel.module.css";
240
- if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
255
+ const css$1 = ".NPLLIq_panel{box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;z-index:40;opacity:1;border-radius:12px;flex-direction:column;width:320px;max-height:min(72vh,560px);transition:opacity .18s;display:flex;position:fixed;top:56px;right:12px;overflow:hidden;box-shadow:0 8px 28px #0000002e}.NPLLIq_panelDim{opacity:.55}.NPLLIq_panelDimStrong{opacity:.3}.NPLLIq_header{border-bottom:1px solid var(--dsw-alias-border-l1);cursor:grab;user-select:none;touch-action:none;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:8px;padding:10px 12px;display:flex}.NPLLIq_header:active{cursor:grabbing}.NPLLIq_headerText{flex-direction:column;gap:2px;min-width:0;display:flex}.NPLLIq_title{color:var(--dsw-alias-label-primary);align-items:baseline;gap:6px;font-size:13px;font-weight:600;display:flex}.NPLLIq_version{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:10px;font-weight:500}.NPLLIq_versionNew{color:var(--dsw-alias-status-warning-foreground,#b56900);background:var(--dsw-alias-status-warning-background,#fff6d7);cursor:default;border-radius:4px;padding:1px 6px}.NPLLIq_subtitle{color:var(--dsw-alias-label-secondary);font-size:11px}.NPLLIq_notesBar{flex-wrap:wrap;flex:100%;align-items:center;gap:4px;padding:2px 0 0;display:flex}.NPLLIq_noteChip{width:20px;height:20px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:5px;flex:none;justify-content:center;align-items:center;padding:0;font-size:11px;line-height:1;transition:color .12s,border-color .12s;display:inline-flex}.NPLLIq_noteChip:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l2)}.NPLLIq_noteChipOpen{color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteNew{width:22px;height:20px;color:var(--dsw-alias-label-secondary);border:1px dashed var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:5px;flex:none;justify-content:center;align-items:center;padding:0;transition:color .12s,border-color .12s;display:inline-flex;position:relative}.NPLLIq_noteNew:hover:not(:disabled){color:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteNew:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_noteNewPlus{color:inherit;font-size:10px;font-weight:700;line-height:1;position:absolute;bottom:-2px;right:-1px}.NPLLIq_noteWin{z-index:60;pointer-events:auto;box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;flex-direction:column;display:flex;position:fixed;overflow:hidden;box-shadow:0 8px 24px #00000038}.NPLLIq_noteWinCollapsed{height:auto!important}.NPLLIq_noteWinBar{background:var(--dsw-alias-bg-layer-1);border-bottom:1px solid var(--dsw-alias-border-l1);cursor:grab;user-select:none;flex:none;align-items:center;gap:4px;padding:4px 6px;display:flex}.NPLLIq_noteWinBar:active{cursor:grabbing}.NPLLIq_noteWinGripBar{color:var(--dsw-alias-label-secondary);opacity:.7;flex:none;font-size:10px}.NPLLIq_noteWinTitleText{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;padding:1px 2px;font-size:11px;font-weight:600;overflow:hidden}.NPLLIq_noteWinTitle{min-width:0;color:var(--dsw-alias-label-primary);background:0 0;border:1px solid #0000;border-radius:4px;outline:none;flex:1;padding:1px 2px;font-size:11px;font-weight:600}.NPLLIq_noteWinTitle:hover{border-color:var(--dsw-alias-border-l1)}.NPLLIq_noteWinTitle:focus{background:var(--dsw-alias-bg-overlay);border-color:var(--dsw-alias-brand-primary)}.NPLLIq_noteWinBtn{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_noteWinBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2)}.NPLLIq_noteWinText{box-sizing:border-box;width:100%;min-height:0;color:var(--dsw-alias-label-primary);resize:none;background:0 0;border:none;outline:none;flex:1;padding:6px 8px;font-family:inherit;font-size:11px;line-height:1.5}.NPLLIq_noteWinResize{cursor:nwse-resize;background:linear-gradient(135deg, transparent 0 45%, var(--dsw-alias-border-l2) 45% 55%, transparent 55% 70%, var(--dsw-alias-border-l2) 70% 80%, transparent 80%);width:14px;height:14px;position:absolute;bottom:0;right:0}.NPLLIq_noteMenuBackdrop{z-index:100;pointer-events:auto;position:fixed;inset:0}.NPLLIq_noteMenu{z-index:101;pointer-events:auto;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-direction:column;min-width:96px;padding:4px;display:flex;position:fixed;box-shadow:0 8px 24px #0000003d}.NPLLIq_noteMenuItem{text-align:left;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;border-radius:5px;padding:5px 8px;font-size:11px}.NPLLIq_noteMenuItem:hover{background:var(--dsw-alias-bg-layer-2)}.NPLLIq_collapse{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;flex:none;padding:2px 6px;font-size:11px}.NPLLIq_collapse:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_body{padding:4px 0;overflow-y:auto}.NPLLIq_row{border-bottom:1px solid var(--dsw-alias-border-l1);flex-direction:column;gap:6px;padding:8px 12px;display:flex}.NPLLIq_rowHeader{justify-content:space-between;align-items:center;gap:8px;display:flex}.NPLLIq_rowDrag{cursor:grab;color:var(--dsw-alias-label-secondary);user-select:none;border-radius:4px;flex:none;margin-right:2px;padding:2px 3px;font-size:11px;line-height:1}.NPLLIq_rowDrag:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_rowDrag:active{cursor:grabbing}.NPLLIq_rowDragging{opacity:.45}.NPLLIq_rowDropTarget{box-shadow:inset 0 2px 0 var(--dsw-alias-brand-primary)}.NPLLIq_rowName{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;align-items:center;gap:6px;font-size:12px;font-weight:500;display:inline-flex;overflow:hidden}.NPLLIq_currentBadge{color:var(--dsw-alias-state-success-primary);border:1px solid var(--dsw-alias-state-success-primary);border-radius:8px;flex:none;padding:1px 6px;font-size:10px}.NPLLIq_rowMeta{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;flex:none;font-size:11px}.NPLLIq_bar{background:var(--dsw-alias-bg-layer-1);border-radius:3px;height:6px;overflow:hidden}.NPLLIq_fillIdle{background:var(--dsw-alias-brand-primary);height:100%;transition:width .2s}.NPLLIq_fillWarn{background:var(--dsw-alias-state-warn-primary);height:100%;transition:width .2s}.NPLLIq_fillOver{background:var(--dsw-alias-state-error-primary);height:100%;transition:width .2s}.NPLLIq_controls{align-items:center;gap:6px;display:flex}.NPLLIq_input{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);min-width:0;color:var(--dsw-alias-label-primary);border-radius:6px;flex:1;padding:4px 8px;font-size:11px}.NPLLIq_input::placeholder{color:var(--dsw-alias-label-secondary)}.NPLLIq_save,.NPLLIq_switch{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;flex:none;padding:4px 10px;font-size:11px}.NPLLIq_save:hover,.NPLLIq_switch:hover:not(:disabled){background:var(--dsw-alias-bg-layer-2)}.NPLLIq_switch:disabled{opacity:.5;cursor:default}.NPLLIq_balanceToggle{margin-left:auto}.NPLLIq_balanceToggleOpen{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceWin{z-index:1199;background:var(--dsw-alias-bg-layer-2);width:280px;color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;border-radius:12px;flex-direction:column;display:flex;position:fixed;overflow:hidden;box-shadow:0 8px 24px #00000029}.NPLLIq_balanceWinHeader{border-bottom:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-3);user-select:none;align-items:center;gap:6px;padding:6px 8px 6px 12px;display:flex}.NPLLIq_balanceWinTitle{flex:1;font-size:12px;font-weight:600;line-height:1}.NPLLIq_balanceWinBody{font-variant-numeric:tabular-nums;padding:6px 10px 10px;font-size:11px}.NPLLIq_balanceRowHeader{border-bottom:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-secondary);grid-template-columns:1fr auto 20px;align-items:center;gap:6px;padding:3px 2px;font-weight:600;display:grid}.NPLLIq_balanceSortBtn{all:unset;cursor:pointer;color:inherit;border-radius:4px;padding:1px 2px;font-size:10px;font-weight:600}.NPLLIq_balanceSortBtn:hover{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRefreshAll{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceRefreshAll:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRefreshAll:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_balanceRow{grid-template-columns:1fr auto 20px;align-items:center;gap:6px;padding:3px 2px;display:grid}.NPLLIq_balanceRow+.NPLLIq_balanceRow{border-top:1px dashed var(--dsw-alias-border-l1)}.NPLLIq_balanceRowName{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-weight:500;overflow:hidden}.NPLLIq_balanceRowValue{text-align:right;font-weight:600}.NPLLIq_balanceRowRefresh{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceRowRefresh:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceRowRefresh:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_balanceValueOk{color:var(--dsw-alias-label-primary)}.NPLLIq_balanceValueLow{color:var(--dsw-alias-state-warn-primary)}.NPLLIq_balanceValueError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_balanceStateHint{color:var(--dsw-alias-label-secondary);font-style:italic;font-weight:500}.NPLLIq_balanceStateError{color:var(--dsw-alias-state-error-primary);font-weight:500}.NPLLIq_balanceLastLine{border-top:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-tertiary);margin-top:6px;padding-top:5px;font-size:10px}.NPLLIq_balanceBar{color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l1);font-variant-numeric:tabular-nums;justify-content:space-between;align-items:center;gap:6px;padding:5px 12px;font-size:11px;display:flex}.NPLLIq_balanceBarText{text-overflow:ellipsis;white-space:nowrap;align-items:center;gap:6px;min-width:0;font-weight:600;display:inline-flex;overflow:hidden}.NPLLIq_balanceBarBadge{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-1);border-radius:4px;flex:none;padding:0 4px;font-size:10px;font-weight:600}.NPLLIq_balanceBarDim{color:var(--dsw-alias-label-secondary);font-weight:500}.NPLLIq_balanceBarLow{color:var(--dsw-alias-state-warn-primary)}.NPLLIq_balanceBarError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_balanceBarRefresh{width:18px;height:18px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.NPLLIq_balanceBarRefresh:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_balanceBarRefresh:disabled{opacity:.4;cursor:not-allowed}.NPLLIq_notice,.NPLLIq_noticeError{color:var(--dsw-alias-label-secondary);padding:10px 12px;font-size:12px}.NPLLIq_noticeError{color:var(--dsw-alias-state-error-primary)}.NPLLIq_tab{background:var(--dsw-alias-brand-primary);border:1px solid var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-overlay);pointer-events:auto;cursor:pointer;z-index:90;border-radius:10px;align-items:center;gap:6px;padding:9px 14px;font-size:12px;font-weight:600;display:inline-flex;position:fixed;top:56px;right:12px;box-shadow:0 6px 20px #00000040}.NPLLIq_tab:hover{filter:brightness(1.08)}.NPLLIq_tabIcon{font-size:12px;line-height:1}.NPLLIq_tabLabel{white-space:nowrap}.NPLLIq_headerActions{flex:none;align-items:center;gap:4px;display:flex}.NPLLIq_settingsBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;flex:none;padding:2px 6px;font-size:11px}.NPLLIq_settingsBtn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_settingsBtnActive{color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-2,#0000000f);box-shadow:inset 0 0 0 1px var(--dsw-alias-brand-primary);font-weight:700}.NPLLIq_selectBtn{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-brand-primary);cursor:pointer;background:0 0;border-radius:6px;flex:none;padding:1px 6px;font-size:10px}.NPLLIq_selectBtn:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_gearBtn{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;flex:none;margin-left:6px;padding:0 2px;font-size:12px;line-height:1}.NPLLIq_gearBtn:hover{color:var(--dsw-alias-label-primary)}.NPLLIq_fullNotice{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-state-error-primary);border-radius:8px;margin:6px 12px;padding:8px 10px;font-size:12px}.NPLLIq_upgradeBanner{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-divider-1,#0000001a);border-radius:8px;margin:6px 12px;padding:10px 30px 10px 10px;font-size:12px;position:relative}@keyframes NPLLIq_upgradeBannerFlash{0%,to{border-color:var(--dsw-alias-divider-1,#0000001a);box-shadow:0 0 #f0a02000}50%{border-color:var(--dsw-alias-status-warning-foreground,#b56900);box-shadow:0 0 0 5px #f0a02073}}.NPLLIq_upgradeBannerFlash{border-color:var(--dsw-alias-status-warning-foreground,#b56900);animation:.6s ease-in-out 4 NPLLIq_upgradeBannerFlash}.NPLLIq_upgradeBannerText{margin-bottom:6px;font-weight:600}.NPLLIq_upgradeCommands{flex-direction:column;gap:4px;display:flex}.NPLLIq_upgradeCommandRow{align-items:center;gap:6px;display:flex}.NPLLIq_upgradeCommand{background:var(--dsw-alias-bg-layer-2,#0000000a);white-space:nowrap;border-radius:4px;flex:1;min-width:0;padding:4px 6px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;overflow-x:auto}.NPLLIq_copyBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;flex:none;padding:3px 8px;font-size:11px;transition:transform 80ms,background .12s,color .12s}.NPLLIq_copyBtn:hover{background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_copyBtn:active{transform:scale(.92)}.NPLLIq_copyBtnDone{background:var(--dsw-alias-status-success-background,#14963c1f);border-color:var(--dsw-alias-status-success-foreground,#0a7d32);color:var(--dsw-alias-status-success-foreground,#0a7d32);font-weight:600}.NPLLIq_upgradeHint{color:var(--dsw-alias-label-secondary);margin-top:6px;font-size:11px}.NPLLIq_upgradeClose{width:20px;height:20px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:4px;font-size:16px;line-height:1;position:absolute;top:4px;right:6px}.NPLLIq_upgradeClose:hover{background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary)}.NPLLIq_checkUpdatesRow{justify-content:space-between;align-items:center;gap:12px;display:flex}.NPLLIq_checkUpdatesLabel{color:var(--dsw-alias-label-primary);cursor:pointer;align-items:center;gap:6px;font-size:12px;display:flex}.NPLLIq_checkUpdatesLabel input{margin:0}.NPLLIq_checkUpdatesLabel input[type=range]{min-width:90px;accent-color:var(--dsw-alias-brand-primary);flex:1}.NPLLIq_checkUpdatesLabel select{background:var(--dsw-alias-bg-layer-2,#0000000a);min-width:90px;color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-divider-1,#00000026);border-radius:4px;flex:1;padding:2px 4px;font-size:12px}.NPLLIq_checkBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-2,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;text-align:center;border-radius:4px;flex:none;min-width:72px;padding:4px 10px;font-size:12px}.NPLLIq_checkBtn:hover:not(:disabled){background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_checkBtn:disabled{opacity:.6;cursor:default}.NPLLIq_checkErrorHint{color:var(--dsw-alias-state-error-primary,#c00);background:var(--dsw-alias-state-error-background,#ff00000f);border:1px solid var(--dsw-alias-state-error-border,#b4000040);word-break:break-all;border-radius:6px;margin-top:8px;padding:6px 8px;font-size:11px;line-height:1.4}.NPLLIq_dialog{z-index:100;pointer-events:auto;box-sizing:border-box;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;flex-direction:column;gap:12px;width:430px;max-width:94vw;max-height:80vh;padding:14px;display:flex;position:fixed;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%);box-shadow:0 8px 28px #00000040}.NPLLIq_dialogTabs{border-bottom:1px solid var(--dsw-alias-divider-1,#00000014);gap:2px;margin:-6px -14px 0;padding:0 14px;display:flex}.NPLLIq_dialogTab{appearance:none;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;padding:6px 12px 8px;font-size:12px}.NPLLIq_dialogTab:hover{color:var(--dsw-alias-label-primary)}.NPLLIq_dialogTabActive{color:var(--dsw-alias-brand-primary);border-bottom-color:var(--dsw-alias-brand-primary);font-weight:600}.NPLLIq_settingsDialog{height:min(560px,80vh)}.NPLLIq_dialogTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}.NPLLIq_dialogSection{flex-direction:column;gap:6px;display:flex}.NPLLIq_dialogLabel{color:var(--dsw-alias-label-primary);font-size:12px;font-weight:500}.NPLLIq_monitorHint{color:var(--dsw-alias-label-secondary);font-size:11px}.NPLLIq_dialogHint{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:11px;line-height:1.4}.NPLLIq_monitorList{flex-direction:column;gap:2px;max-height:180px;display:flex;overflow-y:auto}.NPLLIq_monitorRow{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:2px 4px;font-size:12px;display:flex}.NPLLIq_monitorRow:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_monitorName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.NPLLIq_radioRow{color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:3px 4px;font-size:12px;display:flex}.NPLLIq_radioRow:hover{background:var(--dsw-alias-bg-layer-1)}.NPLLIq_dialogActions{justify-content:flex-end;gap:6px;display:flex}.NPLLIq_dialogBtn,.NPLLIq_dialogBtnPrimary{border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:6px;padding:4px 12px;font-size:11px}.NPLLIq_dialogBtn{background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}.NPLLIq_dialogBtnPrimary{background:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-bg-overlay)}.NPLLIq_dialogHeader{z-index:2;background:var(--dsw-alias-bg-overlay);cursor:grab;user-select:none;touch-action:none;justify-content:space-between;align-items:center;gap:8px;margin:-14px -14px 0;padding:14px 14px 8px;display:flex;position:sticky;top:-14px}.NPLLIq_dialogHeader:active{cursor:grabbing}.NPLLIq_dialogClose{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:8px;flex:none;justify-content:center;align-items:center;font-size:18px;line-height:1;display:flex}.NPLLIq_dialogClose:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1)}.NPLLIq_resetRow{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.NPLLIq_resetSelect{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:6px;padding:3px 6px;font-size:12px}.NPLLIq_logTable{border-collapse:collapse;width:100%;font-size:11px}.NPLLIq_logTable th{text-align:left;color:var(--dsw-alias-label-secondary);border-bottom:1px solid var(--dsw-alias-border-l1);padding:4px 6px;font-weight:500}.NPLLIq_logTable td{color:var(--dsw-alias-label-primary);border-bottom:1px solid var(--dsw-alias-border-l1);font-variant-numeric:tabular-nums;padding:4px 6px}.NPLLIq_logDayCol{white-space:nowrap;color:var(--dsw-alias-label-secondary)}.NPLLIq_logModelCol{text-overflow:ellipsis;white-space:nowrap;max-width:160px;overflow:hidden}.NPLLIq_logUsedCol{text-align:right}.NPLLIq_logDialog{gap:0;width:380px;max-height:min(72vh,480px);padding:0}.NPLLIq_logHeader{background:var(--dsw-alias-bg-overlay);cursor:grab;user-select:none;touch-action:none;flex:none;justify-content:space-between;align-items:center;gap:8px;padding:14px 14px 8px;display:flex}.NPLLIq_logHeader:active{cursor:grabbing}.NPLLIq_logScroll{flex:1;min-height:0;padding:0 14px 14px;overflow:auto}.NPLLIq_logToolbar{flex:1;align-items:center;gap:6px;display:flex}.NPLLIq_logSearch{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);min-width:0;color:var(--dsw-alias-label-primary);border-radius:4px;flex:1;padding:3px 6px;font-size:11px}.NPLLIq_logSearch:focus{border-color:var(--dsw-alias-accent-1,#4a9eff);outline:none}.NPLLIq_logClearBtn{border:1px solid var(--dsw-alias-state-error-border,#b400004d);color:var(--dsw-alias-state-error-primary,#c00);cursor:pointer;white-space:nowrap;background:0 0;border-radius:4px;flex:none;padding:3px 8px;font-size:11px}.NPLLIq_logClearBtn:hover{background:var(--dsw-alias-state-error-background,#ff00000f)}.NPLLIq_logPager{border-top:1px solid var(--dsw-alias-divider-1,#00000014);background:var(--dsw-alias-bg-overlay);color:var(--dsw-alias-label-secondary);flex:none;justify-content:space-between;align-items:center;gap:8px;padding:6px 14px;font-size:11px;display:flex}.NPLLIq_logPagerInfo{white-space:nowrap}.NPLLIq_logPagerControls{align-items:center;gap:4px;display:flex}.NPLLIq_logPagerBtn{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);width:24px;height:24px;color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;font-size:13px;line-height:1}.NPLLIq_logPagerBtn:disabled{opacity:.4;cursor:default}.NPLLIq_logPagerPages{text-align:center;min-width:50px;color:var(--dsw-alias-label-secondary)}.NPLLIq_logPageSizeSelect{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);color:var(--dsw-alias-label-primary);cursor:pointer;border-radius:4px;padding:2px 4px;font-size:11px}.NPLLIq_dialogOverlay{z-index:100001;pointer-events:auto;background:#0000004d;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.NPLLIq_logClearDialog{gap:0;width:320px;padding:16px}.NPLLIq_dialogBody{color:var(--dsw-alias-label-secondary);margin:6px 0 10px;font-size:12px;line-height:1.5}.NPLLIq_logClearDate{border:1px solid var(--dsw-alias-divider-1,#00000026);background:var(--dsw-alias-bg-layer-1,#0000000a);width:100%;color:var(--dsw-alias-label-primary);border-radius:6px;margin-bottom:12px;padding:6px 8px;font-size:13px}.NPLLIq_logClearDate:focus{border-color:var(--dsw-alias-accent-1,#4a9eff);outline:none}";
256
+ const tagId$1 = "@jxgame2020/dsh-token-quota/TokenQuotaPanel.module.css";
257
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
241
258
  const tag = document.createElement("style");
242
259
  tag.dataset.plugin = "@jxgame2020/dsh-token-quota";
243
- tag.dataset.pluginCss = tagId;
244
- tag.textContent = css;
260
+ tag.dataset.pluginCss = tagId$1;
261
+ tag.textContent = css$1;
245
262
  document.head.appendChild(tag);
246
263
  }
247
264
  var TokenQuotaPanel_module_css_default = {
265
+ "noteNewPlus": "NPLLIq_noteNewPlus",
266
+ "resetSelect": "NPLLIq_resetSelect",
267
+ "balanceValueError": "NPLLIq_balanceValueError",
268
+ "noteWin": "NPLLIq_noteWin",
269
+ "selectBtn": "NPLLIq_selectBtn",
270
+ "dialog": "NPLLIq_dialog",
271
+ "dialogBtnPrimary": "NPLLIq_dialogBtnPrimary",
272
+ "balanceBarBadge": "NPLLIq_balanceBarBadge",
248
273
  "noteWinResize": "NPLLIq_noteWinResize",
249
- "dialogClose": "NPLLIq_dialogClose",
274
+ "upgradeClose": "NPLLIq_upgradeClose",
275
+ "balanceWin": "NPLLIq_balanceWin",
276
+ "logPagerControls": "NPLLIq_logPagerControls",
277
+ "upgradeBannerText": "NPLLIq_upgradeBannerText",
278
+ "checkUpdatesLabel": "NPLLIq_checkUpdatesLabel",
279
+ "logTable": "NPLLIq_logTable",
280
+ "logClearDate": "NPLLIq_logClearDate",
281
+ "headerText": "NPLLIq_headerText",
282
+ "currentBadge": "NPLLIq_currentBadge",
250
283
  "balanceStateHint": "NPLLIq_balanceStateHint",
251
- "panel": "NPLLIq_panel",
252
- "noteMenuBackdrop": "NPLLIq_noteMenuBackdrop",
253
- "notesBar": "NPLLIq_notesBar",
254
- "dialogTabActive": "NPLLIq_dialogTabActive",
255
- "balanceWinHeader": "NPLLIq_balanceWinHeader",
256
- "balanceRowValue": "NPLLIq_balanceRowValue",
257
- "fullNotice": "NPLLIq_fullNotice",
258
- "logUsedCol": "NPLLIq_logUsedCol",
259
- "upgradeCommands": "NPLLIq_upgradeCommands",
284
+ "rowDropTarget": "NPLLIq_rowDropTarget",
285
+ "noteWinTitle": "NPLLIq_noteWinTitle",
286
+ "switch": "NPLLIq_switch",
287
+ "noteWinText": "NPLLIq_noteWinText",
260
288
  "rowHeader": "NPLLIq_rowHeader",
261
- "fillWarn": "NPLLIq_fillWarn",
262
- "logDialog": "NPLLIq_logDialog",
263
- "balanceRowHeader": "NPLLIq_balanceRowHeader",
264
- "monitorRow": "NPLLIq_monitorRow",
265
- "logPager": "NPLLIq_logPager",
266
- "title": "NPLLIq_title",
267
- "logPageSizeSelect": "NPLLIq_logPageSizeSelect",
289
+ "balanceSortBtn": "NPLLIq_balanceSortBtn",
290
+ "versionNew": "NPLLIq_versionNew",
291
+ "header": "NPLLIq_header",
292
+ "settingsDialog": "NPLLIq_settingsDialog",
293
+ "upgradeCommandRow": "NPLLIq_upgradeCommandRow",
294
+ "noteChip": "NPLLIq_noteChip",
268
295
  "balanceRowRefresh": "NPLLIq_balanceRowRefresh",
269
- "balanceToggle": "NPLLIq_balanceToggle",
270
- "upgradeBannerFlash": "NPLLIq_upgradeBannerFlash",
271
- "upgradeBannerText": "NPLLIq_upgradeBannerText",
296
+ "noticeError": "NPLLIq_noticeError",
272
297
  "copyBtnDone": "NPLLIq_copyBtnDone",
273
- "checkBtn": "NPLLIq_checkBtn",
298
+ "logDialog": "NPLLIq_logDialog",
274
299
  "logPagerBtn": "NPLLIq_logPagerBtn",
275
- "dialogOverlay": "NPLLIq_dialogOverlay",
276
- "noteWinTitleText": "NPLLIq_noteWinTitleText",
277
- "balanceBarBadge": "NPLLIq_balanceBarBadge",
278
- "controls": "NPLLIq_controls",
279
- "upgradeHint": "NPLLIq_upgradeHint",
280
300
  "resetRow": "NPLLIq_resetRow",
301
+ "checkUpdatesRow": "NPLLIq_checkUpdatesRow",
302
+ "logPager": "NPLLIq_logPager",
303
+ "rowName": "NPLLIq_rowName",
304
+ "upgradeCommand": "NPLLIq_upgradeCommand",
305
+ "noteMenuItem": "NPLLIq_noteMenuItem",
306
+ "collapse": "NPLLIq_collapse",
307
+ "fillWarn": "NPLLIq_fillWarn",
308
+ "headerActions": "NPLLIq_headerActions",
309
+ "balanceBar": "NPLLIq_balanceBar",
310
+ "noteWinCollapsed": "NPLLIq_noteWinCollapsed",
311
+ "noteWinBtn": "NPLLIq_noteWinBtn",
312
+ "checkErrorHint": "NPLLIq_checkErrorHint",
313
+ "input": "NPLLIq_input",
314
+ "notice": "NPLLIq_notice",
315
+ "balanceValueLow": "NPLLIq_balanceValueLow",
316
+ "title": "NPLLIq_title",
317
+ "balanceRefreshAll": "NPLLIq_balanceRefreshAll",
281
318
  "dialogHint": "NPLLIq_dialogHint",
282
- "rowDrag": "NPLLIq_rowDrag",
283
- "balanceBarLow": "NPLLIq_balanceBarLow",
284
- "bar": "NPLLIq_bar",
319
+ "upgradeHint": "NPLLIq_upgradeHint",
320
+ "panel": "NPLLIq_panel",
321
+ "dialogClose": "NPLLIq_dialogClose",
322
+ "upgradeBanner": "NPLLIq_upgradeBanner",
323
+ "upgradeCommands": "NPLLIq_upgradeCommands",
324
+ "balanceRowName": "NPLLIq_balanceRowName",
325
+ "version": "NPLLIq_version",
326
+ "dialogTab": "NPLLIq_dialogTab",
285
327
  "panelDim": "NPLLIq_panelDim",
286
- "noteMenuItem": "NPLLIq_noteMenuItem",
287
- "currentBadge": "NPLLIq_currentBadge",
288
328
  "rowDragging": "NPLLIq_rowDragging",
289
- "upgradeCommand": "NPLLIq_upgradeCommand",
290
- "rowMeta": "NPLLIq_rowMeta",
291
- "panelDimStrong": "NPLLIq_panelDimStrong",
292
- "checkErrorHint": "NPLLIq_checkErrorHint",
293
- "logDayCol": "NPLLIq_logDayCol",
294
- "balanceBarRefresh": "NPLLIq_balanceBarRefresh",
295
- "header": "NPLLIq_header",
296
- "checkUpdatesLabel": "NPLLIq_checkUpdatesLabel",
297
- "logPagerPages": "NPLLIq_logPagerPages",
298
- "noteNewPlus": "NPLLIq_noteNewPlus",
329
+ "balanceBarDim": "NPLLIq_balanceBarDim",
330
+ "subtitle": "NPLLIq_subtitle",
331
+ "row": "NPLLIq_row",
332
+ "logUsedCol": "NPLLIq_logUsedCol",
333
+ "body": "NPLLIq_body",
334
+ "noteChipOpen": "NPLLIq_noteChipOpen",
335
+ "balanceBarError": "NPLLIq_balanceBarError",
336
+ "noteWinTitleText": "NPLLIq_noteWinTitleText",
337
+ "save": "NPLLIq_save",
338
+ "logPagerInfo": "NPLLIq_logPagerInfo",
339
+ "balanceWinBody": "NPLLIq_balanceWinBody",
340
+ "bar": "NPLLIq_bar",
341
+ "balanceWinHeader": "NPLLIq_balanceWinHeader",
342
+ "noteMenuBackdrop": "NPLLIq_noteMenuBackdrop",
343
+ "dialogSection": "NPLLIq_dialogSection",
299
344
  "balanceToggleOpen": "NPLLIq_balanceToggleOpen",
300
- "logTable": "NPLLIq_logTable",
301
- "version": "NPLLIq_version",
345
+ "tabIcon": "NPLLIq_tabIcon",
346
+ "monitorList": "NPLLIq_monitorList",
347
+ "notesBar": "NPLLIq_notesBar",
348
+ "logSearch": "NPLLIq_logSearch",
349
+ "rowDrag": "NPLLIq_rowDrag",
350
+ "balanceStateError": "NPLLIq_balanceStateError",
351
+ "noteMenu": "NPLLIq_noteMenu",
352
+ "tabLabel": "NPLLIq_tabLabel",
302
353
  "settingsBtn": "NPLLIq_settingsBtn",
354
+ "balanceRow": "NPLLIq_balanceRow",
355
+ "panelDimStrong": "NPLLIq_panelDimStrong",
356
+ "fillIdle": "NPLLIq_fillIdle",
357
+ "noteWinGripBar": "NPLLIq_noteWinGripBar",
358
+ "gearBtn": "NPLLIq_gearBtn",
359
+ "dialogActions": "NPLLIq_dialogActions",
360
+ "logPagerPages": "NPLLIq_logPagerPages",
361
+ "rowMeta": "NPLLIq_rowMeta",
362
+ "upgradeBannerFlash": "NPLLIq_upgradeBannerFlash",
363
+ "dialogTitle": "NPLLIq_dialogTitle",
364
+ "balanceWinTitle": "NPLLIq_balanceWinTitle",
365
+ "logHeader": "NPLLIq_logHeader",
366
+ "dialogTabs": "NPLLIq_dialogTabs",
367
+ "dialogOverlay": "NPLLIq_dialogOverlay",
368
+ "checkBtn": "NPLLIq_checkBtn",
303
369
  "settingsBtnActive": "NPLLIq_settingsBtnActive",
304
370
  "balanceValueOk": "NPLLIq_balanceValueOk",
305
- "resetSelect": "NPLLIq_resetSelect",
306
- "noteWinTitle": "NPLLIq_noteWinTitle",
307
- "logPagerInfo": "NPLLIq_logPagerInfo",
308
- "noteMenu": "NPLLIq_noteMenu",
309
- "upgradeCommandRow": "NPLLIq_upgradeCommandRow",
310
- "dialogTabs": "NPLLIq_dialogTabs",
311
- "balanceRow": "NPLLIq_balanceRow",
312
- "logPagerControls": "NPLLIq_logPagerControls",
313
- "monitorHint": "NPLLIq_monitorHint",
314
- "noticeError": "NPLLIq_noticeError",
315
- "tabLabel": "NPLLIq_tabLabel",
316
- "tab": "NPLLIq_tab",
317
- "dialog": "NPLLIq_dialog",
318
- "balanceSortBtn": "NPLLIq_balanceSortBtn",
371
+ "dialogBody": "NPLLIq_dialogBody",
372
+ "logScroll": "NPLLIq_logScroll",
373
+ "balanceBarRefresh": "NPLLIq_balanceBarRefresh",
319
374
  "fillOver": "NPLLIq_fillOver",
375
+ "monitorRow": "NPLLIq_monitorRow",
376
+ "logDayCol": "NPLLIq_logDayCol",
377
+ "balanceBarText": "NPLLIq_balanceBarText",
378
+ "fullNotice": "NPLLIq_fullNotice",
379
+ "dialogTabActive": "NPLLIq_dialogTabActive",
380
+ "balanceToggle": "NPLLIq_balanceToggle",
381
+ "logClearBtn": "NPLLIq_logClearBtn",
320
382
  "dialogBtn": "NPLLIq_dialogBtn",
321
- "noteWin": "NPLLIq_noteWin",
322
- "save": "NPLLIq_save",
323
- "dialogTab": "NPLLIq_dialogTab",
324
- "noteWinText": "NPLLIq_noteWinText",
325
- "balanceWin": "NPLLIq_balanceWin",
326
- "logClearDate": "NPLLIq_logClearDate",
327
383
  "monitorName": "NPLLIq_monitorName",
328
- "tabIcon": "NPLLIq_tabIcon",
329
- "logClearBtn": "NPLLIq_logClearBtn",
330
- "dialogBtnPrimary": "NPLLIq_dialogBtnPrimary",
331
- "body": "NPLLIq_body",
332
- "rowName": "NPLLIq_rowName",
333
- "collapse": "NPLLIq_collapse",
384
+ "monitorHint": "NPLLIq_monitorHint",
385
+ "noteNew": "NPLLIq_noteNew",
334
386
  "dialogHeader": "NPLLIq_dialogHeader",
335
- "balanceWinBody": "NPLLIq_balanceWinBody",
336
- "balanceBarDim": "NPLLIq_balanceBarDim",
337
- "noteWinCollapsed": "NPLLIq_noteWinCollapsed",
338
- "switch": "NPLLIq_switch",
339
- "rowDropTarget": "NPLLIq_rowDropTarget",
340
- "dialogTitle": "NPLLIq_dialogTitle",
341
- "checkUpdatesRow": "NPLLIq_checkUpdatesRow",
342
- "dialogBody": "NPLLIq_dialogBody",
343
- "balanceBarText": "NPLLIq_balanceBarText",
344
- "settingsDialog": "NPLLIq_settingsDialog",
387
+ "balanceBarLow": "NPLLIq_balanceBarLow",
388
+ "noteWinBar": "NPLLIq_noteWinBar",
345
389
  "logModelCol": "NPLLIq_logModelCol",
346
- "logHeader": "NPLLIq_logHeader",
347
- "balanceBar": "NPLLIq_balanceBar",
348
- "upgradeBanner": "NPLLIq_upgradeBanner",
349
- "balanceBarError": "NPLLIq_balanceBarError",
350
- "monitorList": "NPLLIq_monitorList",
351
- "balanceRefreshAll": "NPLLIq_balanceRefreshAll",
352
- "dialogSection": "NPLLIq_dialogSection",
353
- "balanceValueError": "NPLLIq_balanceValueError",
354
- "balanceLastLine": "NPLLIq_balanceLastLine",
355
- "upgradeClose": "NPLLIq_upgradeClose",
356
- "notice": "NPLLIq_notice",
357
- "balanceStateError": "NPLLIq_balanceStateError",
358
- "fillIdle": "NPLLIq_fillIdle",
359
- "noteChipOpen": "NPLLIq_noteChipOpen",
360
- "versionNew": "NPLLIq_versionNew",
361
- "balanceRowName": "NPLLIq_balanceRowName",
362
- "headerText": "NPLLIq_headerText",
363
- "row": "NPLLIq_row",
364
- "input": "NPLLIq_input",
365
- "balanceWinTitle": "NPLLIq_balanceWinTitle",
366
- "headerActions": "NPLLIq_headerActions",
367
- "noteWinBtn": "NPLLIq_noteWinBtn",
368
- "radioRow": "NPLLIq_radioRow",
369
- "balanceValueLow": "NPLLIq_balanceValueLow",
370
- "gearBtn": "NPLLIq_gearBtn",
390
+ "logClearDialog": "NPLLIq_logClearDialog",
371
391
  "dialogLabel": "NPLLIq_dialogLabel",
372
- "logScroll": "NPLLIq_logScroll",
373
- "noteWinGripBar": "NPLLIq_noteWinGripBar",
374
- "noteWinBar": "NPLLIq_noteWinBar",
375
- "subtitle": "NPLLIq_subtitle",
392
+ "balanceLastLine": "NPLLIq_balanceLastLine",
376
393
  "copyBtn": "NPLLIq_copyBtn",
377
- "selectBtn": "NPLLIq_selectBtn",
378
- "logSearch": "NPLLIq_logSearch",
379
- "logClearDialog": "NPLLIq_logClearDialog",
380
- "noteNew": "NPLLIq_noteNew",
381
- "dialogActions": "NPLLIq_dialogActions",
394
+ "controls": "NPLLIq_controls",
395
+ "radioRow": "NPLLIq_radioRow",
396
+ "tab": "NPLLIq_tab",
397
+ "balanceRowHeader": "NPLLIq_balanceRowHeader",
398
+ "balanceRowValue": "NPLLIq_balanceRowValue",
382
399
  "logToolbar": "NPLLIq_logToolbar",
383
- "noteChip": "NPLLIq_noteChip"
400
+ "logPageSizeSelect": "NPLLIq_logPageSizeSelect"
384
401
  };
385
402
  //#endregion
386
403
  //#region lib/types/client/TokenQuotaPanel.js
@@ -518,7 +535,7 @@ window.__ModuleLoader__.load({
518
535
  * @param props - composed slot props.
519
536
  * @returns the panel element tree.
520
537
  */
521
- function TokenQuotaPanel({ t, load, setLimit, selectModel, setMonitored, setOnFull, setReset, setCheckUpdates, checkUpdatesNow, clearLogBefore, setDimWhenIdle, setModelOrder, saveNotes, setBalanceSettings, refreshBalance, setMusicEnabled, setMusicVolume, setMusicStyle, setMusicOnlyCurrentSession, useStore, actions, useSessions }) {
538
+ function TokenQuotaPanel({ t, load, setLimit, selectModel, setMonitored, setOnFull, setReset, setCheckUpdates, checkUpdatesNow, clearLogBefore, setDimWhenIdle, setModelOrder, saveNotes, setBalanceSettings, refreshBalance, setMusicEnabled, setMusicVolume, setMusicStyle, setMusicOnlyCurrentSession, setTranscribeSettings, useStore, actions, useSessions }) {
522
539
  const [collapsed, setCollapsed] = (0, react.useState)(false);
523
540
  const [drafts, setDrafts] = (0, react.useState)({});
524
541
  const [editingKey, setEditingKey] = (0, react.useState)(null);
@@ -690,6 +707,7 @@ window.__ModuleLoader__.load({
690
707
  const musicVolume = useStore((s) => s.musicVolume);
691
708
  const musicStyle = useStore((s) => s.musicStyle);
692
709
  const musicOnlyCurrentSession = useStore((s) => s.musicOnlyCurrentSession);
710
+ const transcribe = useStore((s) => s.transcribe);
693
711
  const upgrade = useStore((s) => s.upgrade);
694
712
  const upgradeDismissed = useStore((s) => s.upgradeDismissed);
695
713
  const checkingUpdates = useStore((s) => s.checkingUpdates);
@@ -1050,13 +1068,13 @@ window.__ModuleLoader__.load({
1050
1068
  title: t("upgradeAvailableHint"),
1051
1069
  children: [
1052
1070
  "v",
1053
- "0.1.40",
1071
+ "0.1.42",
1054
1072
  " → v",
1055
1073
  upgrade.latestVersion
1056
1074
  ]
1057
1075
  }) : (0, react_jsx_runtime.jsxs)("span", {
1058
1076
  className: TokenQuotaPanel_module_css_default.version,
1059
- children: ["v", "0.1.40"]
1077
+ children: ["v", "0.1.42"]
1060
1078
  })]
1061
1079
  })
1062
1080
  }),
@@ -1443,6 +1461,16 @@ window.__ModuleLoader__.load({
1443
1461
  },
1444
1462
  children: t("settingsTabMusic")
1445
1463
  }),
1464
+ (0, react_jsx_runtime.jsx)("button", {
1465
+ type: "button",
1466
+ role: "tab",
1467
+ "aria-selected": settingsTab === "transcribe",
1468
+ className: `${TokenQuotaPanel_module_css_default.dialogTab}${settingsTab === "transcribe" ? ` ${TokenQuotaPanel_module_css_default.dialogTabActive}` : ""}`,
1469
+ onClick: () => {
1470
+ setSettingsTab("transcribe");
1471
+ },
1472
+ children: t("settingsTabTranscribe")
1473
+ }),
1446
1474
  (0, react_jsx_runtime.jsx)("button", {
1447
1475
  type: "button",
1448
1476
  role: "tab",
@@ -1653,6 +1681,83 @@ window.__ModuleLoader__.load({
1653
1681
  })
1654
1682
  ]
1655
1683
  })] }),
1684
+ settingsTab === "transcribe" && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("div", {
1685
+ className: TokenQuotaPanel_module_css_default.dialogSection,
1686
+ children: [(0, react_jsx_runtime.jsxs)("label", {
1687
+ className: TokenQuotaPanel_module_css_default.checkUpdatesLabel,
1688
+ children: [(0, react_jsx_runtime.jsx)("input", {
1689
+ type: "checkbox",
1690
+ checked: transcribe.enabled,
1691
+ onChange: (event) => {
1692
+ setTranscribeSettings({
1693
+ ...transcribe,
1694
+ enabled: event.target.checked
1695
+ });
1696
+ }
1697
+ }), (0, react_jsx_runtime.jsx)("span", { children: t("transcribeEnabledLabel") })]
1698
+ }), (0, react_jsx_runtime.jsx)("div", {
1699
+ className: TokenQuotaPanel_module_css_default.dialogHint,
1700
+ children: t("transcribeEnabledHint")
1701
+ })]
1702
+ }), transcribe.enabled && (0, react_jsx_runtime.jsxs)("div", {
1703
+ className: TokenQuotaPanel_module_css_default.dialogSection,
1704
+ children: [
1705
+ (0, react_jsx_runtime.jsxs)("label", {
1706
+ className: TokenQuotaPanel_module_css_default.checkUpdatesLabel,
1707
+ children: [(0, react_jsx_runtime.jsx)("span", { children: t("transcribeBaseURLLabel") }), (0, react_jsx_runtime.jsx)("input", {
1708
+ className: TokenQuotaPanel_module_css_default.resetSelect,
1709
+ type: "text",
1710
+ value: transcribe.baseURL,
1711
+ onChange: (event) => {
1712
+ setTranscribeSettings({
1713
+ ...transcribe,
1714
+ baseURL: event.target.value
1715
+ });
1716
+ }
1717
+ })]
1718
+ }),
1719
+ (0, react_jsx_runtime.jsx)("div", {
1720
+ className: TokenQuotaPanel_module_css_default.dialogHint,
1721
+ children: t("transcribeBaseURLHint")
1722
+ }),
1723
+ (0, react_jsx_runtime.jsxs)("label", {
1724
+ className: TokenQuotaPanel_module_css_default.checkUpdatesLabel,
1725
+ children: [(0, react_jsx_runtime.jsx)("span", { children: t("transcribeApiKeyEnvLabel") }), (0, react_jsx_runtime.jsx)("input", {
1726
+ className: TokenQuotaPanel_module_css_default.resetSelect,
1727
+ type: "text",
1728
+ value: transcribe.apiKeyEnv,
1729
+ onChange: (event) => {
1730
+ setTranscribeSettings({
1731
+ ...transcribe,
1732
+ apiKeyEnv: event.target.value
1733
+ });
1734
+ }
1735
+ })]
1736
+ }),
1737
+ (0, react_jsx_runtime.jsx)("div", {
1738
+ className: TokenQuotaPanel_module_css_default.dialogHint,
1739
+ children: t("transcribeApiKeyEnvHint")
1740
+ }),
1741
+ (0, react_jsx_runtime.jsxs)("label", {
1742
+ className: TokenQuotaPanel_module_css_default.checkUpdatesLabel,
1743
+ children: [(0, react_jsx_runtime.jsx)("span", { children: t("transcribeModelLabel") }), (0, react_jsx_runtime.jsx)("input", {
1744
+ className: TokenQuotaPanel_module_css_default.resetSelect,
1745
+ type: "text",
1746
+ value: transcribe.model,
1747
+ onChange: (event) => {
1748
+ setTranscribeSettings({
1749
+ ...transcribe,
1750
+ model: event.target.value
1751
+ });
1752
+ }
1753
+ })]
1754
+ }),
1755
+ (0, react_jsx_runtime.jsx)("div", {
1756
+ className: TokenQuotaPanel_module_css_default.dialogHint,
1757
+ children: t("transcribeModelHint")
1758
+ })
1759
+ ]
1760
+ })] }),
1656
1761
  settingsTab === "other" && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("div", {
1657
1762
  className: TokenQuotaPanel_module_css_default.dialogSection,
1658
1763
  children: [(0, react_jsx_runtime.jsxs)("div", {
@@ -2774,6 +2879,175 @@ window.__ModuleLoader__.load({
2774
2879
  }
2775
2880
  };
2776
2881
  //#endregion
2882
+ //#region \0dsh-css:/Users/jxgame/Desktop/works/deepseek-harness-package/dsh-token-quota/packages/token-quota/src/client/mic.module.css.mjs
2883
+ const css = ".KCoVpa_micWrap{z-index:10;pointer-events:auto;align-items:center;gap:4px;display:flex;position:absolute;top:4px;right:6px}.KCoVpa_micBtn{width:26px;height:26px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);cursor:pointer;border-radius:8px;justify-content:center;align-items:center;padding:0;font-size:14px;line-height:1;transition:color .15s,background .15s,border-color .15s;display:inline-flex}.KCoVpa_micBtn:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-3)}.KCoVpa_micRec{color:#fff;background:var(--dsw-alias-state-error-primary);border-color:var(--dsw-alias-state-error-primary);animation:1.2s ease-in-out infinite KCoVpa_micPulse}.KCoVpa_micBusy{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-3);cursor:progress}.KCoVpa_micErr{border-color:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary)}.KCoVpa_micErrTip{background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-state-error-primary);max-width:180px;color:var(--dsw-alias-state-error-primary);white-space:normal;word-break:break-word;border-radius:6px;padding:3px 6px;font-size:10px;line-height:1.3}@keyframes KCoVpa_micPulse{0%,to{opacity:1}50%{opacity:.5}}";
2884
+ const tagId = "@jxgame2020/dsh-token-quota/mic.module.css";
2885
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
2886
+ const tag = document.createElement("style");
2887
+ tag.dataset.plugin = "@jxgame2020/dsh-token-quota";
2888
+ tag.dataset.pluginCss = tagId;
2889
+ tag.textContent = css;
2890
+ document.head.appendChild(tag);
2891
+ }
2892
+ var mic_module_css_default = {
2893
+ "micRec": "KCoVpa_micRec",
2894
+ "micWrap": "KCoVpa_micWrap",
2895
+ "micBtn": "KCoVpa_micBtn",
2896
+ "micBusy": "KCoVpa_micBusy",
2897
+ "micErr": "KCoVpa_micErr",
2898
+ "micErrTip": "KCoVpa_micErrTip",
2899
+ "micPulse": "KCoVpa_micPulse"
2900
+ };
2901
+ //#endregion
2902
+ //#region lib/types/client/mic.js
2903
+ /**
2904
+ * Composer mic button: registered into `conversation.input.overlay` so it sits
2905
+ * inside the chat composer card (top-right corner). A press starts recording
2906
+ * from the microphone; a second press stops it and sends the audio blob to the
2907
+ * Host, which forwards it to the configured OpenAI-compatible transcription
2908
+ * endpoint. The returned text is appended to the composer. The button only
2909
+ * renders while transcription is enabled in the token-quota settings.
2910
+ *
2911
+ * This entry is mounted in a session-scoped slot, so it cannot share the
2912
+ * panel's root-scoped store handle (which would fork a per-session instance
2913
+ * with stale state). Instead it subscribes to a tiny transcribe-only
2914
+ * observable passed through injection and reads the locale-bound `t` from
2915
+ * injection as well.
2916
+ */
2917
+ /**
2918
+ * Append recognised text to the contentEditable composer. Focuses the editor,
2919
+ * moves the caret to the end, and uses `insertText` so the host editor's own
2920
+ * input handling (undo, lexical binding) sees it as a typed insertion.
2921
+ */
2922
+ function appendToComposer(text) {
2923
+ const editor = document.querySelector("[data-composer-input]");
2924
+ if (editor === null) {
2925
+ navigator.clipboard?.writeText(text).catch(() => {});
2926
+ return;
2927
+ }
2928
+ editor.focus();
2929
+ const selection = window.getSelection();
2930
+ if (selection !== null) {
2931
+ const range = document.createRange();
2932
+ range.selectNodeContents(editor);
2933
+ range.collapse(false);
2934
+ selection.removeAllRanges();
2935
+ selection.addRange(range);
2936
+ }
2937
+ let inserted = false;
2938
+ try {
2939
+ inserted = document.execCommand("insertText", false, text);
2940
+ } catch {}
2941
+ if (!inserted) editor.appendChild(document.createTextNode(text));
2942
+ }
2943
+ /**
2944
+ * Mic button rendered inside the composer card. Manages its own MediaRecorder
2945
+ * lifecycle; only the button is shown — no floating panel UI.
2946
+ */
2947
+ function TokenQuotaMic({ t, transcribe, subscribeTranscribe, getTranscribe }) {
2948
+ const settings = (0, react.useSyncExternalStore)(subscribeTranscribe, getTranscribe, getTranscribe);
2949
+ const [recording, setRecording] = (0, react.useState)(false);
2950
+ const [transcribing, setTranscribing] = (0, react.useState)(false);
2951
+ const [error, setError] = (0, react.useState)(null);
2952
+ const mediaRecorderRef = (0, react.useRef)(null);
2953
+ const chunksRef = (0, react.useRef)([]);
2954
+ const streamRef = (0, react.useRef)(null);
2955
+ const errorTimerRef = (0, react.useRef)(void 0);
2956
+ (0, react.useEffect)(() => {
2957
+ return () => {
2958
+ if (errorTimerRef.current !== void 0) clearTimeout(errorTimerRef.current);
2959
+ cleanupRecording();
2960
+ };
2961
+ }, []);
2962
+ const cleanupRecording = () => {
2963
+ if (streamRef.current !== null) {
2964
+ for (const track of streamRef.current.getTracks()) track.stop();
2965
+ streamRef.current = null;
2966
+ }
2967
+ mediaRecorderRef.current = null;
2968
+ chunksRef.current = [];
2969
+ };
2970
+ const showError = (message) => {
2971
+ setError(message);
2972
+ if (errorTimerRef.current !== void 0) clearTimeout(errorTimerRef.current);
2973
+ errorTimerRef.current = setTimeout(() => {
2974
+ setError(null);
2975
+ errorTimerRef.current = void 0;
2976
+ }, 4e3);
2977
+ };
2978
+ const startRecording = async () => {
2979
+ let stream;
2980
+ try {
2981
+ stream = await navigator.mediaDevices.getUserMedia({ audio: true });
2982
+ } catch {
2983
+ showError(t("transcribeMicDenied"));
2984
+ return;
2985
+ }
2986
+ streamRef.current = stream;
2987
+ chunksRef.current = [];
2988
+ const mimeType = MediaRecorder.isTypeSupported("audio/webm;codecs=opus") ? "audio/webm;codecs=opus" : MediaRecorder.isTypeSupported("audio/webm") ? "audio/webm" : "";
2989
+ const recorder = mimeType !== "" ? new MediaRecorder(stream, { mimeType }) : new MediaRecorder(stream);
2990
+ mediaRecorderRef.current = recorder;
2991
+ recorder.ondataavailable = (event) => {
2992
+ if (event.data.size > 0) chunksRef.current.push(event.data);
2993
+ };
2994
+ recorder.onstop = () => {
2995
+ const type = mimeType !== "" ? mimeType : "audio/webm";
2996
+ const blob = new Blob(chunksRef.current, { type });
2997
+ cleanupRecording();
2998
+ if (blob.size === 0) {
2999
+ showError(t("transcribeEmpty"));
3000
+ return;
3001
+ }
3002
+ setTranscribing(true);
3003
+ transcribe(blob).then((text) => {
3004
+ setTranscribing(false);
3005
+ if (text.trim() !== "") appendToComposer(text);
3006
+ }, (err) => {
3007
+ setTranscribing(false);
3008
+ showError(err instanceof Error ? err.message : String(err));
3009
+ });
3010
+ };
3011
+ recorder.start();
3012
+ setRecording(true);
3013
+ };
3014
+ const stopAndTranscribe = () => {
3015
+ const recorder = mediaRecorderRef.current;
3016
+ if (recorder !== null && recorder.state !== "inactive") recorder.stop();
3017
+ else cleanupRecording();
3018
+ setRecording(false);
3019
+ };
3020
+ const onToggle = () => {
3021
+ if (transcribing) return;
3022
+ if (recording) stopAndTranscribe();
3023
+ else startRecording();
3024
+ };
3025
+ if (!settings.enabled) return null;
3026
+ const state = transcribing ? "busy" : recording ? "rec" : "idle";
3027
+ return (0, react_jsx_runtime.jsxs)("div", {
3028
+ className: mic_module_css_default.micWrap,
3029
+ title: error ?? t("transcribeHint"),
3030
+ children: [(0, react_jsx_runtime.jsx)("button", {
3031
+ type: "button",
3032
+ className: `${mic_module_css_default.micBtn}${state === "rec" ? ` ${mic_module_css_default.micRec}` : ""}${state === "busy" ? ` ${mic_module_css_default.micBusy}` : ""}${error !== null ? ` ${mic_module_css_default.micErr}` : ""}`,
3033
+ disabled: transcribing,
3034
+ onClick: (event) => {
3035
+ event.stopPropagation();
3036
+ onToggle();
3037
+ },
3038
+ onPointerDown: (event) => {
3039
+ event.stopPropagation();
3040
+ },
3041
+ "aria-pressed": recording,
3042
+ "aria-label": error ?? t("transcribeTitle"),
3043
+ children: transcribing ? "…" : "🎤"
3044
+ }), error !== null && (0, react_jsx_runtime.jsx)("span", {
3045
+ className: mic_module_css_default.micErrTip,
3046
+ children: error
3047
+ })]
3048
+ });
3049
+ }
3050
+ //#endregion
2777
3051
  //#region lib/types/client/locales.js
2778
3052
  /**
2779
3053
  * Token-quota panel copy (zh + en). The panel is a product surface, so the
@@ -2804,7 +3078,20 @@ window.__ModuleLoader__.load({
2804
3078
  settingsTitle: "设置",
2805
3079
  settingsTabQuota: "限额设置",
2806
3080
  settingsTabMusic: "音乐设置",
3081
+ settingsTabTranscribe: "转录",
2807
3082
  settingsTabOther: "其它",
3083
+ transcribeTitle: "语音转录",
3084
+ transcribeHint: "按下麦克风录音,再按一次停止并转录为文字",
3085
+ transcribeMicDenied: "未获得麦克风权限",
3086
+ transcribeEmpty: "录音为空",
3087
+ transcribeEnabledLabel: "启用语音转录",
3088
+ transcribeEnabledHint: "在对话框右上角显示麦克风按钮",
3089
+ transcribeBaseURLLabel: "接口地址",
3090
+ transcribeBaseURLHint: "OpenAI 兼容的转录接口 base URL",
3091
+ transcribeApiKeyEnvLabel: "API Key 环境变量",
3092
+ transcribeApiKeyEnvHint: "存有 API Key 的凭证变量名(在 Models 页或 credentials 配置)",
3093
+ transcribeModelLabel: "模型",
3094
+ transcribeModelHint: "语音转文本模型名",
2808
3095
  reorderHint: "拖动排序",
2809
3096
  balanceLabel: "余额",
2810
3097
  balanceUnconfigured: "未配置 DeepSeek API Key",
@@ -2920,7 +3207,20 @@ window.__ModuleLoader__.load({
2920
3207
  settingsTitle: "Settings",
2921
3208
  settingsTabQuota: "Quota",
2922
3209
  settingsTabMusic: "Music",
3210
+ settingsTabTranscribe: "Transcribe",
2923
3211
  settingsTabOther: "Other",
3212
+ transcribeTitle: "Voice transcription",
3213
+ transcribeHint: "Press the mic to record; press again to stop and transcribe to text",
3214
+ transcribeMicDenied: "Microphone access denied",
3215
+ transcribeEmpty: "Recording was empty",
3216
+ transcribeEnabledLabel: "Enable voice transcription",
3217
+ transcribeEnabledHint: "Show a mic button in the top-right of the composer",
3218
+ transcribeBaseURLLabel: "Base URL",
3219
+ transcribeBaseURLHint: "OpenAI-compatible transcription endpoint base URL",
3220
+ transcribeApiKeyEnvLabel: "API key env var",
3221
+ transcribeApiKeyEnvHint: "Credential variable name holding the API key (Models page or credentials)",
3222
+ transcribeModelLabel: "Model",
3223
+ transcribeModelHint: "Speech-to-text model name",
2924
3224
  reorderHint: "Drag to reorder",
2925
3225
  balanceLabel: "Balance",
2926
3226
  balanceUnconfigured: "No DeepSeek API key",
@@ -3121,6 +3421,13 @@ window.__ModuleLoader__.load({
3121
3421
  style: raw?.style ?? "pentatonic",
3122
3422
  onlyCurrentSession: raw?.onlyCurrentSession ?? true
3123
3423
  });
3424
+ /** Build a writable transcription-settings clone with defaults applied. */
3425
+ const transcribeDefaults = (raw) => ({
3426
+ enabled: raw?.enabled ?? TOKEN_QUOTA_DEFAULT_TRANSCRIBE.enabled,
3427
+ baseURL: typeof raw?.baseURL === "string" && raw.baseURL !== "" ? raw.baseURL : TOKEN_QUOTA_DEFAULT_TRANSCRIBE.baseURL,
3428
+ apiKeyEnv: typeof raw?.apiKeyEnv === "string" && raw.apiKeyEnv !== "" ? raw.apiKeyEnv : TOKEN_QUOTA_DEFAULT_TRANSCRIBE.apiKeyEnv,
3429
+ model: typeof raw?.model === "string" && raw.model !== "" ? raw.model : TOKEN_QUOTA_DEFAULT_TRANSCRIBE.model
3430
+ });
3124
3431
  const keyOf = (selection) => {
3125
3432
  if (selection === null) return void 0;
3126
3433
  return `${selection.provider}/${selection.model}`;
@@ -3243,6 +3550,10 @@ window.__ModuleLoader__.load({
3243
3550
  bound?.setMusicVolume(musicSettings.volume);
3244
3551
  bound?.setMusicStyle(musicSettings.style);
3245
3552
  bound?.setMusicOnlyCurrentSession(musicSettings.onlyCurrentSession);
3553
+ const transcribeRaw = doc?.transcribe;
3554
+ const resolvedTranscribe = transcribeDefaults(transcribeRaw);
3555
+ applyTranscribe(resolvedTranscribe);
3556
+ bound?.setTranscribeSettings(resolvedTranscribe);
3246
3557
  fetch("/token-quota", { headers: { accept: "application/json" } }).then((response) => {
3247
3558
  if (!response.ok) {
3248
3559
  bound?.setError(`quota route: ${String(response.status)}`);
@@ -3331,6 +3642,47 @@ window.__ModuleLoader__.load({
3331
3642
  pollMinutes
3332
3643
  });
3333
3644
  };
3645
+ /** Persist the voice transcription settings and mirror them into the store. */
3646
+ let currentTranscribe = TOKEN_QUOTA_DEFAULT_TRANSCRIBE;
3647
+ const transcribeSubscribers = /* @__PURE__ */ new Set();
3648
+ const emitTranscribe = () => {
3649
+ for (const fn of transcribeSubscribers) fn();
3650
+ };
3651
+ const subscribeTranscribe = (cb) => {
3652
+ transcribeSubscribers.add(cb);
3653
+ return () => {
3654
+ transcribeSubscribers.delete(cb);
3655
+ };
3656
+ };
3657
+ const getTranscribe = () => currentTranscribe;
3658
+ const applyTranscribe = (settings) => {
3659
+ if (settings.enabled === currentTranscribe.enabled && settings.baseURL === currentTranscribe.baseURL && settings.apiKeyEnv === currentTranscribe.apiKeyEnv && settings.model === currentTranscribe.model) return;
3660
+ currentTranscribe = settings;
3661
+ emitTranscribe();
3662
+ };
3663
+ const setTranscribeSettings = (settings) => {
3664
+ applyTranscribe(settings);
3665
+ bound?.setTranscribeSettings(settings);
3666
+ scope.set("transcribe", settings);
3667
+ };
3668
+ /**
3669
+ * Send a recorded audio blob to the Host, which forwards it to the
3670
+ * configured OpenAI-compatible transcription endpoint. Resolves with the
3671
+ * recognised text.
3672
+ */
3673
+ const transcribe = async (blob) => {
3674
+ const res = await fetch("/token-quota/transcribe", {
3675
+ method: "POST",
3676
+ headers: { "content-type": blob.type !== "" ? blob.type : "application/octet-stream" },
3677
+ body: blob
3678
+ });
3679
+ if (!res.ok) {
3680
+ const detail = await res.text().catch(() => "");
3681
+ throw new Error(detail !== "" ? detail : `transcription HTTP ${res.status}`);
3682
+ }
3683
+ const data = await res.json();
3684
+ return typeof data.text === "string" ? data.text : "";
3685
+ };
3334
3686
  /**
3335
3687
  * Ask the Host to refresh account balances now and adopt the result.
3336
3688
  * With a provider key only that provider is refreshed; otherwise all of
@@ -3466,7 +3818,8 @@ window.__ModuleLoader__.load({
3466
3818
  setModelOrder,
3467
3819
  saveNotes,
3468
3820
  setBalanceSettings,
3469
- refreshBalance
3821
+ refreshBalance,
3822
+ setTranscribeSettings
3470
3823
  };
3471
3824
  };
3472
3825
  ctx.slots.inject("shell.overlay", () => ctx.slots.register({
@@ -3478,6 +3831,19 @@ window.__ModuleLoader__.load({
3478
3831
  locale: NS,
3479
3832
  inject: injected
3480
3833
  }, TokenQuotaPanel));
3834
+ ctx.slots.inject("conversation.input.overlay", () => ctx.slots.register({
3835
+ name: "conversation.input.overlay",
3836
+ id: "token-quota-mic",
3837
+ order: 100,
3838
+ label: () => t("transcribeTitle"),
3839
+ inject: (_sessionId) => ({
3840
+ transcribe,
3841
+ setTranscribeSettings,
3842
+ subscribeTranscribe,
3843
+ getTranscribe,
3844
+ t
3845
+ })
3846
+ }, TokenQuotaMic));
3481
3847
  }
3482
3848
  //#endregion
3483
3849
  exports.apply = apply;