@jxgame2020/dsh-token-quota 0.1.44 → 0.1.51

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
@@ -132,7 +132,7 @@ window.__ModuleLoader__.load({
132
132
  d.transcribe = settings;
133
133
  },
134
134
  setUpgrade: (d, upgrade) => {
135
- const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.44" ? upgrade : null;
135
+ const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.51" ? upgrade : null;
136
136
  if (d.upgrade === null || d.upgrade.latestVersion !== normalized?.latestVersion) d.upgradeDismissed = false;
137
137
  d.upgrade = normalized;
138
138
  },
@@ -252,157 +252,157 @@ window.__ModuleLoader__.load({
252
252
  }
253
253
  //#endregion
254
254
  //#region \0dsh-css:/Users/jxgame/Desktop/works/deepseek-harness-package/dsh-token-quota/packages/token-quota/src/client/TokenQuotaPanel.module.css.mjs
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}.NPLLIq_keyRow{align-items:center;gap:8px;margin-top:6px;display:flex}.NPLLIq_keySaveBtn{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;border-radius:4px;flex:none;padding:4px 10px;font-size:12px}.NPLLIq_keySaveBtn:hover:not(:disabled){background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_keySaveBtn:disabled{opacity:.5;cursor:not-allowed}.NPLLIq_keyBadgeOk,.NPLLIq_keyBadgeOff{white-space:nowrap;border-radius:999px;padding:3px 7px;font-size:11px;line-height:1}.NPLLIq_keyBadgeOk{color:var(--dsw-alias-state-success-primary,#2f9e44);background:color-mix(in srgb, var(--dsw-alias-state-success-primary,#2f9e44) 14%, transparent)}.NPLLIq_keyBadgeOff{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2,#0000000f)}.NPLLIq_keyError{word-break:break-word;color:var(--dsw-alias-state-error-primary,#e03131);margin-top:4px;font-size:11px;line-height:1.4}";
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) {
255
+ const css$2 = ".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:.45}.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}.NPLLIq_keyRow{align-items:center;gap:8px;margin-top:6px;display:flex}.NPLLIq_keySaveBtn{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;border-radius:4px;flex:none;padding:4px 10px;font-size:12px}.NPLLIq_keySaveBtn:hover:not(:disabled){background:var(--dsw-alias-bg-layer-3,#00000014)}.NPLLIq_keySaveBtn:disabled{opacity:.5;cursor:not-allowed}.NPLLIq_keyBadgeOk,.NPLLIq_keyBadgeOff{white-space:nowrap;border-radius:999px;padding:3px 7px;font-size:11px;line-height:1}.NPLLIq_keyBadgeOk{color:var(--dsw-alias-state-success-primary,#2f9e44);background:color-mix(in srgb, var(--dsw-alias-state-success-primary,#2f9e44) 14%, transparent)}.NPLLIq_keyBadgeOff{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2,#0000000f)}.NPLLIq_keyError{word-break:break-word;color:var(--dsw-alias-state-error-primary,#e03131);margin-top:4px;font-size:11px;line-height:1.4}";
256
+ const tagId$2 = "@jxgame2020/dsh-token-quota/TokenQuotaPanel.module.css";
257
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
258
258
  const tag = document.createElement("style");
259
259
  tag.dataset.plugin = "@jxgame2020/dsh-token-quota";
260
- tag.dataset.pluginCss = tagId$1;
261
- tag.textContent = css$1;
260
+ tag.dataset.pluginCss = tagId$2;
261
+ tag.textContent = css$2;
262
262
  document.head.appendChild(tag);
263
263
  }
264
264
  var TokenQuotaPanel_module_css_default = {
265
265
  "tabIcon": "NPLLIq_tabIcon",
266
- "copyBtn": "NPLLIq_copyBtn",
267
- "balanceBarDim": "NPLLIq_balanceBarDim",
268
- "selectBtn": "NPLLIq_selectBtn",
269
- "radioRow": "NPLLIq_radioRow",
266
+ "balanceWinTitle": "NPLLIq_balanceWinTitle",
267
+ "fillWarn": "NPLLIq_fillWarn",
268
+ "balanceRowValue": "NPLLIq_balanceRowValue",
269
+ "rowDragging": "NPLLIq_rowDragging",
270
270
  "tab": "NPLLIq_tab",
271
- "rowHeader": "NPLLIq_rowHeader",
272
- "logModelCol": "NPLLIq_logModelCol",
273
- "balanceRowName": "NPLLIq_balanceRowName",
274
- "dialogSection": "NPLLIq_dialogSection",
275
- "dialogOverlay": "NPLLIq_dialogOverlay",
271
+ "fullNotice": "NPLLIq_fullNotice",
272
+ "balanceValueError": "NPLLIq_balanceValueError",
273
+ "upgradeCommands": "NPLLIq_upgradeCommands",
274
+ "balanceWin": "NPLLIq_balanceWin",
275
+ "balanceToggle": "NPLLIq_balanceToggle",
276
+ "notesBar": "NPLLIq_notesBar",
277
+ "keyRow": "NPLLIq_keyRow",
278
+ "input": "NPLLIq_input",
279
+ "dialog": "NPLLIq_dialog",
280
+ "logHeader": "NPLLIq_logHeader",
281
+ "subtitle": "NPLLIq_subtitle",
282
+ "body": "NPLLIq_body",
283
+ "balanceBarDim": "NPLLIq_balanceBarDim",
284
+ "upgradeHint": "NPLLIq_upgradeHint",
285
+ "panelDimStrong": "NPLLIq_panelDimStrong",
286
+ "title": "NPLLIq_title",
287
+ "noticeError": "NPLLIq_noticeError",
288
+ "upgradeCommandRow": "NPLLIq_upgradeCommandRow",
289
+ "logUsedCol": "NPLLIq_logUsedCol",
290
+ "keySaveBtn": "NPLLIq_keySaveBtn",
291
+ "noteWinTitleText": "NPLLIq_noteWinTitleText",
292
+ "fillIdle": "NPLLIq_fillIdle",
293
+ "settingsBtn": "NPLLIq_settingsBtn",
294
+ "dialogActions": "NPLLIq_dialogActions",
295
+ "balanceWinBody": "NPLLIq_balanceWinBody",
296
+ "resetRow": "NPLLIq_resetRow",
297
+ "balanceRowRefresh": "NPLLIq_balanceRowRefresh",
298
+ "upgradeClose": "NPLLIq_upgradeClose",
299
+ "noteMenuItem": "NPLLIq_noteMenuItem",
300
+ "logSearch": "NPLLIq_logSearch",
301
+ "logPagerBtn": "NPLLIq_logPagerBtn",
302
+ "logClearDate": "NPLLIq_logClearDate",
276
303
  "headerText": "NPLLIq_headerText",
277
- "balanceStateHint": "NPLLIq_balanceStateHint",
278
- "noteMenuBackdrop": "NPLLIq_noteMenuBackdrop",
279
- "balanceWinHeader": "NPLLIq_balanceWinHeader",
280
- "balanceRowHeader": "NPLLIq_balanceRowHeader",
281
- "noteWinResize": "NPLLIq_noteWinResize",
304
+ "dialogTitle": "NPLLIq_dialogTitle",
305
+ "upgradeBanner": "NPLLIq_upgradeBanner",
306
+ "monitorRow": "NPLLIq_monitorRow",
307
+ "dialogSection": "NPLLIq_dialogSection",
308
+ "checkUpdatesLabel": "NPLLIq_checkUpdatesLabel",
309
+ "balanceBarError": "NPLLIq_balanceBarError",
310
+ "balanceRowName": "NPLLIq_balanceRowName",
311
+ "balanceBarText": "NPLLIq_balanceBarText",
312
+ "noteWinText": "NPLLIq_noteWinText",
313
+ "balanceLastLine": "NPLLIq_balanceLastLine",
282
314
  "notice": "NPLLIq_notice",
283
- "panel": "NPLLIq_panel",
284
- "logPagerPages": "NPLLIq_logPagerPages",
285
- "keyBadgeOff": "NPLLIq_keyBadgeOff",
286
- "noteWinGripBar": "NPLLIq_noteWinGripBar",
315
+ "logDialog": "NPLLIq_logDialog",
316
+ "monitorName": "NPLLIq_monitorName",
317
+ "balanceBarBadge": "NPLLIq_balanceBarBadge",
318
+ "logScroll": "NPLLIq_logScroll",
319
+ "settingsDialog": "NPLLIq_settingsDialog",
320
+ "noteChip": "NPLLIq_noteChip",
321
+ "noteMenuBackdrop": "NPLLIq_noteMenuBackdrop",
322
+ "copyBtn": "NPLLIq_copyBtn",
323
+ "radioRow": "NPLLIq_radioRow",
324
+ "dialogOverlay": "NPLLIq_dialogOverlay",
287
325
  "checkErrorHint": "NPLLIq_checkErrorHint",
288
- "logTable": "NPLLIq_logTable",
289
- "dialogLabel": "NPLLIq_dialogLabel",
290
326
  "noteChipOpen": "NPLLIq_noteChipOpen",
291
- "balanceLastLine": "NPLLIq_balanceLastLine",
292
- "monitorList": "NPLLIq_monitorList",
293
- "logSearch": "NPLLIq_logSearch",
294
- "bar": "NPLLIq_bar",
295
- "balanceRefreshAll": "NPLLIq_balanceRefreshAll",
296
- "save": "NPLLIq_save",
297
- "balanceBar": "NPLLIq_balanceBar",
327
+ "fillOver": "NPLLIq_fillOver",
298
328
  "balanceSortBtn": "NPLLIq_balanceSortBtn",
299
- "balanceWinTitle": "NPLLIq_balanceWinTitle",
300
- "logClearBtn": "NPLLIq_logClearBtn",
301
- "noteWinBar": "NPLLIq_noteWinBar",
302
- "logClearDialog": "NPLLIq_logClearDialog",
303
- "noteMenu": "NPLLIq_noteMenu",
304
- "upgradeCommandRow": "NPLLIq_upgradeCommandRow",
305
- "monitorHint": "NPLLIq_monitorHint",
306
- "resetSelect": "NPLLIq_resetSelect",
307
- "subtitle": "NPLLIq_subtitle",
308
- "rowDropTarget": "NPLLIq_rowDropTarget",
329
+ "rowName": "NPLLIq_rowName",
309
330
  "settingsBtnActive": "NPLLIq_settingsBtnActive",
310
- "notesBar": "NPLLIq_notesBar",
311
- "upgradeCommands": "NPLLIq_upgradeCommands",
312
- "logDayCol": "NPLLIq_logDayCol",
331
+ "logPagerPages": "NPLLIq_logPagerPages",
313
332
  "balanceStateError": "NPLLIq_balanceStateError",
314
- "upgradeHint": "NPLLIq_upgradeHint",
315
- "controls": "NPLLIq_controls",
316
- "input": "NPLLIq_input",
317
- "noteChip": "NPLLIq_noteChip",
318
- "logPagerBtn": "NPLLIq_logPagerBtn",
319
- "logDialog": "NPLLIq_logDialog",
320
- "dialogHeader": "NPLLIq_dialogHeader",
321
- "monitorName": "NPLLIq_monitorName",
322
- "noteWinCollapsed": "NPLLIq_noteWinCollapsed",
323
- "panelDimStrong": "NPLLIq_panelDimStrong",
324
- "header": "NPLLIq_header",
325
- "switch": "NPLLIq_switch",
326
- "balanceBarBadge": "NPLLIq_balanceBarBadge",
327
- "fillIdle": "NPLLIq_fillIdle",
328
333
  "balanceBarLow": "NPLLIq_balanceBarLow",
329
- "gearBtn": "NPLLIq_gearBtn",
330
- "dialogBtn": "NPLLIq_dialogBtn",
331
- "dialogTabs": "NPLLIq_dialogTabs",
332
- "currentBadge": "NPLLIq_currentBadge",
333
- "rowDragging": "NPLLIq_rowDragging",
334
- "fillWarn": "NPLLIq_fillWarn",
335
- "balanceRowRefresh": "NPLLIq_balanceRowRefresh",
336
- "body": "NPLLIq_body",
337
- "title": "NPLLIq_title",
338
- "keyRow": "NPLLIq_keyRow",
334
+ "logToolbar": "NPLLIq_logToolbar",
335
+ "balanceRow": "NPLLIq_balanceRow",
336
+ "dialogHint": "NPLLIq_dialogHint",
337
+ "noteWinTitle": "NPLLIq_noteWinTitle",
338
+ "logPageSizeSelect": "NPLLIq_logPageSizeSelect",
339
+ "rowHeader": "NPLLIq_rowHeader",
339
340
  "versionNew": "NPLLIq_versionNew",
340
- "noteWinText": "NPLLIq_noteWinText",
341
- "dialogBtnPrimary": "NPLLIq_dialogBtnPrimary",
342
- "balanceToggleOpen": "NPLLIq_balanceToggleOpen",
343
- "upgradeBannerText": "NPLLIq_upgradeBannerText",
344
- "logPagerControls": "NPLLIq_logPagerControls",
345
- "balanceWin": "NPLLIq_balanceWin",
346
- "noteWin": "NPLLIq_noteWin",
347
- "noteNewPlus": "NPLLIq_noteNewPlus",
348
- "rowDrag": "NPLLIq_rowDrag",
341
+ "balanceRowHeader": "NPLLIq_balanceRowHeader",
342
+ "logClearDialog": "NPLLIq_logClearDialog",
343
+ "dialogBody": "NPLLIq_dialogBody",
344
+ "balanceRefreshAll": "NPLLIq_balanceRefreshAll",
345
+ "checkUpdatesRow": "NPLLIq_checkUpdatesRow",
346
+ "monitorList": "NPLLIq_monitorList",
347
+ "dialogTabs": "NPLLIq_dialogTabs",
348
+ "keyError": "NPLLIq_keyError",
349
+ "switch": "NPLLIq_switch",
350
+ "upgradeCommand": "NPLLIq_upgradeCommand",
351
+ "dialogClose": "NPLLIq_dialogClose",
349
352
  "logPager": "NPLLIq_logPager",
350
- "balanceValueError": "NPLLIq_balanceValueError",
351
- "upgradeBanner": "NPLLIq_upgradeBanner",
353
+ "noteWinBtn": "NPLLIq_noteWinBtn",
352
354
  "collapse": "NPLLIq_collapse",
353
- "copyBtnDone": "NPLLIq_copyBtnDone",
354
- "checkUpdatesLabel": "NPLLIq_checkUpdatesLabel",
355
- "checkBtn": "NPLLIq_checkBtn",
355
+ "monitorHint": "NPLLIq_monitorHint",
356
+ "balanceBarRefresh": "NPLLIq_balanceBarRefresh",
357
+ "row": "NPLLIq_row",
358
+ "version": "NPLLIq_version",
359
+ "dialogTab": "NPLLIq_dialogTab",
360
+ "logClearBtn": "NPLLIq_logClearBtn",
361
+ "noteWinCollapsed": "NPLLIq_noteWinCollapsed",
362
+ "dialogHeader": "NPLLIq_dialogHeader",
363
+ "noteNewPlus": "NPLLIq_noteNewPlus",
364
+ "controls": "NPLLIq_controls",
356
365
  "dialogTabActive": "NPLLIq_dialogTabActive",
357
- "noteWinTitleText": "NPLLIq_noteWinTitleText",
366
+ "headerActions": "NPLLIq_headerActions",
367
+ "dialogBtn": "NPLLIq_dialogBtn",
368
+ "balanceStateHint": "NPLLIq_balanceStateHint",
358
369
  "keyBadgeOk": "NPLLIq_keyBadgeOk",
359
- "keyError": "NPLLIq_keyError",
360
- "settingsBtn": "NPLLIq_settingsBtn",
361
- "dialog": "NPLLIq_dialog",
362
- "noteMenuItem": "NPLLIq_noteMenuItem",
363
- "balanceRow": "NPLLIq_balanceRow",
364
- "balanceValueLow": "NPLLIq_balanceValueLow",
365
- "balanceBarError": "NPLLIq_balanceBarError",
366
- "rowMeta": "NPLLIq_rowMeta",
367
- "checkUpdatesRow": "NPLLIq_checkUpdatesRow",
368
- "balanceToggle": "NPLLIq_balanceToggle",
369
- "balanceBarText": "NPLLIq_balanceBarText",
370
- "balanceWinBody": "NPLLIq_balanceWinBody",
371
- "noteNew": "NPLLIq_noteNew",
372
- "logUsedCol": "NPLLIq_logUsedCol",
373
- "logPagerInfo": "NPLLIq_logPagerInfo",
374
- "rowName": "NPLLIq_rowName",
375
- "dialogActions": "NPLLIq_dialogActions",
370
+ "noteWinBar": "NPLLIq_noteWinBar",
371
+ "balanceToggleOpen": "NPLLIq_balanceToggleOpen",
372
+ "currentBadge": "NPLLIq_currentBadge",
373
+ "copyBtnDone": "NPLLIq_copyBtnDone",
374
+ "noteWinGripBar": "NPLLIq_noteWinGripBar",
375
+ "balanceBar": "NPLLIq_balanceBar",
376
+ "rowDropTarget": "NPLLIq_rowDropTarget",
377
+ "upgradeBannerText": "NPLLIq_upgradeBannerText",
378
+ "header": "NPLLIq_header",
376
379
  "balanceValueOk": "NPLLIq_balanceValueOk",
377
- "settingsDialog": "NPLLIq_settingsDialog",
378
- "version": "NPLLIq_version",
379
- "upgradeClose": "NPLLIq_upgradeClose",
380
- "balanceRowValue": "NPLLIq_balanceRowValue",
381
- "fillOver": "NPLLIq_fillOver",
382
- "panelDim": "NPLLIq_panelDim",
383
- "logPageSizeSelect": "NPLLIq_logPageSizeSelect",
380
+ "logModelCol": "NPLLIq_logModelCol",
381
+ "logPagerInfo": "NPLLIq_logPagerInfo",
382
+ "noteMenu": "NPLLIq_noteMenu",
383
+ "noteWin": "NPLLIq_noteWin",
384
+ "balanceWinHeader": "NPLLIq_balanceWinHeader",
385
+ "logTable": "NPLLIq_logTable",
386
+ "noteNew": "NPLLIq_noteNew",
387
+ "resetSelect": "NPLLIq_resetSelect",
388
+ "selectBtn": "NPLLIq_selectBtn",
389
+ "dialogLabel": "NPLLIq_dialogLabel",
384
390
  "upgradeBannerFlash": "NPLLIq_upgradeBannerFlash",
385
- "row": "NPLLIq_row",
391
+ "noteWinResize": "NPLLIq_noteWinResize",
386
392
  "tabLabel": "NPLLIq_tabLabel",
387
- "dialogHint": "NPLLIq_dialogHint",
388
- "dialogClose": "NPLLIq_dialogClose",
389
- "logHeader": "NPLLIq_logHeader",
390
- "logScroll": "NPLLIq_logScroll",
391
- "monitorRow": "NPLLIq_monitorRow",
392
- "dialogTitle": "NPLLIq_dialogTitle",
393
- "balanceBarRefresh": "NPLLIq_balanceBarRefresh",
394
- "noteWinBtn": "NPLLIq_noteWinBtn",
395
- "logToolbar": "NPLLIq_logToolbar",
396
- "keySaveBtn": "NPLLIq_keySaveBtn",
397
- "upgradeCommand": "NPLLIq_upgradeCommand",
398
- "resetRow": "NPLLIq_resetRow",
399
- "headerActions": "NPLLIq_headerActions",
400
- "dialogTab": "NPLLIq_dialogTab",
401
- "dialogBody": "NPLLIq_dialogBody",
402
- "fullNotice": "NPLLIq_fullNotice",
403
- "noticeError": "NPLLIq_noticeError",
404
- "logClearDate": "NPLLIq_logClearDate",
405
- "noteWinTitle": "NPLLIq_noteWinTitle"
393
+ "gearBtn": "NPLLIq_gearBtn",
394
+ "logDayCol": "NPLLIq_logDayCol",
395
+ "balanceValueLow": "NPLLIq_balanceValueLow",
396
+ "checkBtn": "NPLLIq_checkBtn",
397
+ "save": "NPLLIq_save",
398
+ "logPagerControls": "NPLLIq_logPagerControls",
399
+ "rowMeta": "NPLLIq_rowMeta",
400
+ "keyBadgeOff": "NPLLIq_keyBadgeOff",
401
+ "dialogBtnPrimary": "NPLLIq_dialogBtnPrimary",
402
+ "panel": "NPLLIq_panel",
403
+ "rowDrag": "NPLLIq_rowDrag",
404
+ "bar": "NPLLIq_bar",
405
+ "panelDim": "NPLLIq_panelDim"
406
406
  };
407
407
  //#endregion
408
408
  //#region lib/types/client/TokenQuotaPanel.js
@@ -701,7 +701,9 @@ window.__ModuleLoader__.load({
701
701
  window.localStorage.setItem(PANEL_POS_KEY, JSON.stringify(pos));
702
702
  } catch {}
703
703
  };
704
- const sessionId = useSessions((s) => s.current);
704
+ const sessionId = useSessions((state) => {
705
+ for (const session of Object.values(state.byId)) if ((session.retainedBy.mainView ?? 0) > 0) return session.id;
706
+ });
705
707
  const snapshot = useStore((s) => s.snapshot);
706
708
  const groups = useStore((s) => s.groups);
707
709
  const current = useStore((s) => s.current);
@@ -778,13 +780,33 @@ window.__ModuleLoader__.load({
778
780
  });
779
781
  };
780
782
  (0, react.useEffect)(() => {
781
- const onFocusIn = (event) => {
782
- const target = event.target;
783
- setInputActive(target !== null && (target.matches("input, textarea, [contenteditable=\"true\"]") || target.closest("input, textarea, [contenteditable=\"true\"]") !== null));
783
+ const isEditable = (el) => el !== null && (el.matches("input, textarea, [contenteditable=\"true\"]") || el.closest("input, textarea, [contenteditable=\"true\"]") !== null);
784
+ const isOwnSurface = (el) => {
785
+ if (el === null) return false;
786
+ for (const node of [
787
+ panelRef.current,
788
+ settingsRef.current,
789
+ logRef.current
790
+ ]) if (node !== null && node.contains(el)) return true;
791
+ return false;
784
792
  };
785
- window.addEventListener("focusin", onFocusIn);
793
+ const sync = () => {
794
+ const active = document.activeElement;
795
+ setInputActive(!isOwnSurface(active) && isEditable(active));
796
+ };
797
+ const deferredSync = () => {
798
+ window.setTimeout(sync, 0);
799
+ };
800
+ document.addEventListener("focusin", sync);
801
+ document.addEventListener("focusout", deferredSync);
802
+ document.addEventListener("pointerdown", deferredSync, true);
803
+ window.addEventListener("blur", sync);
804
+ sync();
786
805
  return () => {
787
- window.removeEventListener("focusin", onFocusIn);
806
+ document.removeEventListener("focusin", sync);
807
+ document.removeEventListener("focusout", deferredSync);
808
+ document.removeEventListener("pointerdown", deferredSync, true);
809
+ window.removeEventListener("blur", sync);
788
810
  };
789
811
  }, []);
790
812
  (0, react.useEffect)(() => {
@@ -882,30 +904,6 @@ window.__ModuleLoader__.load({
882
904
  cancelled = true;
883
905
  };
884
906
  }, [logOpen, actions]);
885
- if (collapsed) return (0, react_jsx_runtime.jsxs)("div", {
886
- className: TokenQuotaPanel_module_css_default.tab,
887
- role: "button",
888
- tabIndex: 0,
889
- title: t("expandHint"),
890
- "aria-label": t("expandHint"),
891
- onClick: () => {
892
- setCollapsed(false);
893
- },
894
- onKeyDown: (event) => {
895
- if (event.key === "Enter" || event.key === " ") {
896
- event.preventDefault();
897
- setCollapsed(false);
898
- }
899
- },
900
- children: [(0, react_jsx_runtime.jsx)("span", {
901
- className: TokenQuotaPanel_module_css_default.tabIcon,
902
- "aria-hidden": "true",
903
- children: "▸"
904
- }), (0, react_jsx_runtime.jsx)("span", {
905
- className: TokenQuotaPanel_module_css_default.tabLabel,
906
- children: t("expand")
907
- })]
908
- });
909
907
  const openSettings = () => {
910
908
  actions.setDialogOpen(true);
911
909
  };
@@ -1086,9 +1084,34 @@ window.__ModuleLoader__.load({
1086
1084
  return { text: "" };
1087
1085
  };
1088
1086
  const panelDimClass = dimWhenIdle ? hovered || upgradeFlash ? "" : inputActive ? TokenQuotaPanel_module_css_default.panelDimStrong : TokenQuotaPanel_module_css_default.panelDim : "";
1087
+ if (collapsed) return (0, react_jsx_runtime.jsxs)("div", {
1088
+ className: TokenQuotaPanel_module_css_default.tab,
1089
+ role: "button",
1090
+ tabIndex: 0,
1091
+ title: t("expandHint"),
1092
+ "aria-label": t("expandHint"),
1093
+ onClick: () => {
1094
+ setCollapsed(false);
1095
+ },
1096
+ onKeyDown: (event) => {
1097
+ if (event.key === "Enter" || event.key === " ") {
1098
+ event.preventDefault();
1099
+ setCollapsed(false);
1100
+ }
1101
+ },
1102
+ children: [(0, react_jsx_runtime.jsx)("span", {
1103
+ className: TokenQuotaPanel_module_css_default.tabIcon,
1104
+ "aria-hidden": "true",
1105
+ children: "▸"
1106
+ }), (0, react_jsx_runtime.jsx)("span", {
1107
+ className: TokenQuotaPanel_module_css_default.tabLabel,
1108
+ children: t("expand")
1109
+ })]
1110
+ });
1089
1111
  return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
1090
1112
  (0, react_jsx_runtime.jsxs)("div", {
1091
1113
  ref: panelRef,
1114
+ "data-token-quota-panel": "",
1092
1115
  className: `${TokenQuotaPanel_module_css_default.panel}${panelDimClass !== "" ? ` ${panelDimClass}` : ""}`,
1093
1116
  style: panelPos !== null ? {
1094
1117
  left: panelPos.x,
@@ -1116,13 +1139,13 @@ window.__ModuleLoader__.load({
1116
1139
  title: t("upgradeAvailableHint"),
1117
1140
  children: [
1118
1141
  "v",
1119
- "0.1.44",
1142
+ "0.1.51",
1120
1143
  " → v",
1121
1144
  upgrade.latestVersion
1122
1145
  ]
1123
1146
  }) : (0, react_jsx_runtime.jsxs)("span", {
1124
1147
  className: TokenQuotaPanel_module_css_default.version,
1125
- children: ["v", "0.1.44"]
1148
+ children: ["v", "0.1.51"]
1126
1149
  })]
1127
1150
  })
1128
1151
  }),
@@ -2972,23 +2995,23 @@ window.__ModuleLoader__.load({
2972
2995
  };
2973
2996
  //#endregion
2974
2997
  //#region \0dsh-css:/Users/jxgame/Desktop/works/deepseek-harness-package/dsh-token-quota/packages/token-quota/src/client/mic.module.css.mjs
2975
- 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}}";
2976
- const tagId = "@jxgame2020/dsh-token-quota/mic.module.css";
2977
- if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
2998
+ const css$1 = ".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}}";
2999
+ const tagId$1 = "@jxgame2020/dsh-token-quota/mic.module.css";
3000
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
2978
3001
  const tag = document.createElement("style");
2979
3002
  tag.dataset.plugin = "@jxgame2020/dsh-token-quota";
2980
- tag.dataset.pluginCss = tagId;
2981
- tag.textContent = css;
3003
+ tag.dataset.pluginCss = tagId$1;
3004
+ tag.textContent = css$1;
2982
3005
  document.head.appendChild(tag);
2983
3006
  }
2984
3007
  var mic_module_css_default = {
2985
- "micErr": "KCoVpa_micErr",
2986
- "micErrTip": "KCoVpa_micErrTip",
2987
- "micBtn": "KCoVpa_micBtn",
2988
3008
  "micRec": "KCoVpa_micRec",
2989
- "micBusy": "KCoVpa_micBusy",
3009
+ "micPulse": "KCoVpa_micPulse",
3010
+ "micBtn": "KCoVpa_micBtn",
3011
+ "micErr": "KCoVpa_micErr",
2990
3012
  "micWrap": "KCoVpa_micWrap",
2991
- "micPulse": "KCoVpa_micPulse"
3013
+ "micBusy": "KCoVpa_micBusy",
3014
+ "micErrTip": "KCoVpa_micErrTip"
2992
3015
  };
2993
3016
  //#endregion
2994
3017
  //#region lib/types/client/mic.js
@@ -3118,6 +3141,7 @@ window.__ModuleLoader__.load({
3118
3141
  const state = transcribing ? "busy" : recording ? "rec" : "idle";
3119
3142
  return (0, react_jsx_runtime.jsxs)("div", {
3120
3143
  className: mic_module_css_default.micWrap,
3144
+ "data-token-quota-mic": "",
3121
3145
  title: error ?? t("transcribeHint"),
3122
3146
  children: [(0, react_jsx_runtime.jsx)("button", {
3123
3147
  type: "button",
@@ -3139,6 +3163,360 @@ window.__ModuleLoader__.load({
3139
3163
  })]
3140
3164
  });
3141
3165
  }
3166
+ /** Base persist key; the engine appends `.<sessionId>` for scoped instances. */
3167
+ const STASH_PERSIST_KEY = "dsh-token-quota:stash";
3168
+ let sequence = 0;
3169
+ /**
3170
+ * Declares the per-session stash state and write surface.
3171
+ * @returns the store handle, to be registered on a session-scoped slot entry.
3172
+ */
3173
+ function createTokenQuotaStashStore() {
3174
+ return (0, _deepseek_ai_dsh_client_store.defineStore)({
3175
+ init: () => ({ items: [] }),
3176
+ persist: STASH_PERSIST_KEY,
3177
+ actions: {
3178
+ add: (d, text) => {
3179
+ const trimmed = text.trim();
3180
+ if (trimmed === "") return;
3181
+ if (d.items.some((item) => item.text === trimmed)) return;
3182
+ sequence += 1;
3183
+ const id = `${Date.now().toString(36)}-${sequence.toString(36)}`;
3184
+ const next = [...d.items, {
3185
+ id,
3186
+ text: trimmed
3187
+ }];
3188
+ d.items = next.length > 9 ? next.slice(next.length - 9) : next;
3189
+ },
3190
+ remove: (d, id) => {
3191
+ d.items = d.items.filter((item) => item.id !== id);
3192
+ }
3193
+ }
3194
+ });
3195
+ }
3196
+ //#endregion
3197
+ //#region \0dsh-css:/Users/jxgame/Desktop/works/deepseek-harness-package/dsh-token-quota/packages/token-quota/src/client/TokenQuotaStash.module.css.mjs
3198
+ const css = ".x_tEcG_stashRow{pointer-events:auto;z-index:10;flex-direction:row-reverse;gap:4px;display:flex;position:absolute;top:-42px;right:2px}.x_tEcG_stashChip{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:999px;justify-content:center;align-items:center;padding:0;font-size:13px;line-height:1;transition:background .15s,border-color .15s;display:inline-flex}.x_tEcG_stashChip:hover{border-color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-3)}.x_tEcG_stashTip{z-index:200;white-space:pre-wrap;word-break:break-word;max-width:min(360px,60vw);max-height:240px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);pointer-events:none;border-radius:8px;padding:8px 10px;font-size:12px;line-height:1.5;position:fixed;overflow:auto;box-shadow:0 8px 24px #0000002e}.x_tEcG_selPopup{z-index:200;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l1);pointer-events:auto;border-radius:8px;align-items:center;gap:2px;padding:3px;display:flex;position:fixed;transform:translate(-50%);box-shadow:0 8px 24px #0003}.x_tEcG_selBtn{color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;background:0 0;border:none;border-radius:5px;align-items:center;gap:4px;padding:3px 8px;font-size:12px;display:inline-flex}.x_tEcG_selBtn:hover{background:var(--dsw-alias-bg-layer-3)}.x_tEcG_selDivider{background:var(--dsw-alias-border-l1);align-self:stretch;width:1px}";
3199
+ const tagId = "@jxgame2020/dsh-token-quota/TokenQuotaStash.module.css";
3200
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
3201
+ const tag = document.createElement("style");
3202
+ tag.dataset.plugin = "@jxgame2020/dsh-token-quota";
3203
+ tag.dataset.pluginCss = tagId;
3204
+ tag.textContent = css;
3205
+ document.head.appendChild(tag);
3206
+ }
3207
+ var TokenQuotaStash_module_css_default = {
3208
+ "selDivider": "x_tEcG_selDivider",
3209
+ "stashTip": "x_tEcG_stashTip",
3210
+ "stashChip": "x_tEcG_stashChip",
3211
+ "stashRow": "x_tEcG_stashRow",
3212
+ "selPopup": "x_tEcG_selPopup",
3213
+ "selBtn": "x_tEcG_selBtn"
3214
+ };
3215
+ //#endregion
3216
+ //#region lib/types/client/TokenQuotaStash.js
3217
+ /**
3218
+ * Session-scoped stash UI, registered into `conversation.input.overlay` so it
3219
+ * sits inside the composer card beside the mic.
3220
+ *
3221
+ * Capture (two ways, as requested):
3222
+ * 1. select text — in a message OR in the composer draft — and use the small
3223
+ * popup that offers 复制 / 临存;
3224
+ * 2. press Cmd/Ctrl+Shift+S on any selection.
3225
+ *
3226
+ * Retrieval: one numbered chip per snippet to the left of the mic. Hovering a
3227
+ * chip shows the whole text; clicking drops it into the composer at the caret
3228
+ * and retires the chip.
3229
+ *
3230
+ * The snippets themselves live in a per-session persisted store (see stash.ts),
3231
+ * so they follow their session across reloads and never reach another session.
3232
+ */
3233
+ /** The harness composer's editable surface. */
3234
+ const COMPOSER_INPUT = "[data-composer-input]";
3235
+ /** Anything matching this is "not capturable text": this plugin's own layers
3236
+ and form fields — selecting text inside an input is editing, not quoting.
3237
+ The composer is deliberately NOT excluded: stashing part of a draft is a
3238
+ supported flow. */
3239
+ const IGNORED_SELECTION = "[data-token-quota-stash], [data-token-quota-panel], input, textarea, select";
3240
+ /** The composer's contentEditable, when the composer is on screen. */
3241
+ function composerEditor() {
3242
+ return document.querySelector(COMPOSER_INPUT);
3243
+ }
3244
+ /** Copy text, falling back to a hidden textarea when the clipboard API is denied. */
3245
+ function copyText(text) {
3246
+ navigator.clipboard?.writeText(text).catch(() => {
3247
+ const scratch = document.createElement("textarea");
3248
+ scratch.value = text;
3249
+ scratch.style.position = "fixed";
3250
+ scratch.style.opacity = "0";
3251
+ document.body.appendChild(scratch);
3252
+ scratch.select();
3253
+ try {
3254
+ document.execCommand("copy");
3255
+ } catch {}
3256
+ document.body.removeChild(scratch);
3257
+ });
3258
+ }
3259
+ /**
3260
+ * Drop text into the composer at the caret the user last had there. Falls back
3261
+ * to the end of the editor when no caret was recorded, and to the clipboard
3262
+ * when the composer is not on screen at all.
3263
+ */
3264
+ function insertIntoComposer(text, caret) {
3265
+ const editor = composerEditor();
3266
+ if (editor === null) {
3267
+ copyText(text);
3268
+ return;
3269
+ }
3270
+ editor.focus();
3271
+ const selection = window.getSelection();
3272
+ if (selection !== null) {
3273
+ if (caret !== null && editor.contains(caret.startContainer)) {
3274
+ selection.removeAllRanges();
3275
+ selection.addRange(caret);
3276
+ } else if (!editor.contains(selection.anchorNode)) {
3277
+ const range = document.createRange();
3278
+ range.selectNodeContents(editor);
3279
+ range.collapse(false);
3280
+ selection.removeAllRanges();
3281
+ selection.addRange(range);
3282
+ }
3283
+ }
3284
+ let inserted = false;
3285
+ try {
3286
+ inserted = document.execCommand("insertText", false, text);
3287
+ } catch {}
3288
+ if (!inserted) editor.appendChild(document.createTextNode(text));
3289
+ }
3290
+ /**
3291
+ * Remove the live selection when it sits inside the composer: stashing part of
3292
+ * a draft means MOVING it out of the way ("cut"), so the user does not have to
3293
+ * delete it by hand and cannot accidentally send it. Selections anywhere else
3294
+ * (a message) are left untouched.
3295
+ */
3296
+ function cutComposerSelection() {
3297
+ const editor = composerEditor();
3298
+ const selection = window.getSelection();
3299
+ if (editor === null || selection === null || selection.rangeCount === 0) return;
3300
+ const anchor = selection.anchorNode;
3301
+ if (anchor === null || !editor.contains(anchor) || selection.isCollapsed) return;
3302
+ const before = editor.textContent ?? "";
3303
+ for (const attempt of [
3304
+ "cut",
3305
+ "delete",
3306
+ "insertText"
3307
+ ]) {
3308
+ try {
3309
+ if (attempt === "insertText") document.execCommand("insertText", false, "");
3310
+ else document.execCommand(attempt);
3311
+ } catch {}
3312
+ if ((editor.textContent ?? "") !== before) return;
3313
+ }
3314
+ }
3315
+ /** Keycap emoji for the chip badges; index 0 renders as 1️⃣. */
3316
+ const STASH_BADGES = [
3317
+ "1️⃣",
3318
+ "2️⃣",
3319
+ "3️⃣",
3320
+ "4️⃣",
3321
+ "5️⃣",
3322
+ "6️⃣",
3323
+ "7️⃣",
3324
+ "8️⃣",
3325
+ "9️⃣"
3326
+ ];
3327
+ /** The badge for the n-th (0-based) chip, falling back to a plain digit. */
3328
+ function stashBadge(index) {
3329
+ return STASH_BADGES[index] ?? String(index + 1);
3330
+ }
3331
+ /**
3332
+ * Numbered stash chips plus the capture popup, rendered inside the composer.
3333
+ */
3334
+ function TokenQuotaStash({ t, useStore, actions }) {
3335
+ const items = useStore((s) => s.items);
3336
+ const [hovered, setHovered] = (0, react.useState)(null);
3337
+ const [pending, setPending] = (0, react.useState)(null);
3338
+ const caretRef = (0, react.useRef)(null);
3339
+ const pendingRef = (0, react.useRef)(null);
3340
+ pendingRef.current = pending;
3341
+ (0, react.useEffect)(() => {
3342
+ const sync = () => {
3343
+ const selection = window.getSelection();
3344
+ if (selection === null || selection.rangeCount === 0) {
3345
+ setPending(null);
3346
+ return;
3347
+ }
3348
+ const editor = composerEditor();
3349
+ const anchor = selection.anchorNode;
3350
+ if (editor !== null && anchor !== null && editor.contains(anchor)) {
3351
+ if (selection.isCollapsed) caretRef.current = selection.getRangeAt(0).cloneRange();
3352
+ }
3353
+ if (selection.isCollapsed) {
3354
+ setPending(null);
3355
+ return;
3356
+ }
3357
+ const text = selection.toString().trim();
3358
+ if (text === "") {
3359
+ setPending(null);
3360
+ return;
3361
+ }
3362
+ const range = selection.getRangeAt(0);
3363
+ const container = range.commonAncestorContainer;
3364
+ const element = container.nodeType === Node.ELEMENT_NODE ? container : container.parentElement;
3365
+ if (element !== null && element.closest(IGNORED_SELECTION) !== null) {
3366
+ setPending(null);
3367
+ return;
3368
+ }
3369
+ const rects = range.getClientRects();
3370
+ const rect = rects.length > 0 ? rects[rects.length - 1] : range.getBoundingClientRect();
3371
+ if (rect === void 0) {
3372
+ setPending(null);
3373
+ return;
3374
+ }
3375
+ const half = 70;
3376
+ const POPUP_HEIGHT = 34;
3377
+ const below = rect.bottom + 6;
3378
+ const y = below + POPUP_HEIGHT > window.innerHeight ? Math.max(8, rect.top - POPUP_HEIGHT - 6) : below;
3379
+ setPending({
3380
+ text,
3381
+ x: Math.min(Math.max(rect.left + rect.width / 2, 78), window.innerWidth - half - 8),
3382
+ y
3383
+ });
3384
+ };
3385
+ document.addEventListener("selectionchange", sync);
3386
+ return () => {
3387
+ document.removeEventListener("selectionchange", sync);
3388
+ };
3389
+ }, []);
3390
+ (0, react.useEffect)(() => {
3391
+ const onKeyDown = (event) => {
3392
+ if (!(event.metaKey || event.ctrlKey) || !event.shiftKey) return;
3393
+ if (event.key.toLowerCase() !== "s") return;
3394
+ const selection = window.getSelection();
3395
+ if (selection === null || selection.isCollapsed) return;
3396
+ const text = selection.toString().trim();
3397
+ if (text === "") return;
3398
+ event.preventDefault();
3399
+ actions.add(text);
3400
+ cutComposerSelection();
3401
+ setPending(null);
3402
+ };
3403
+ window.addEventListener("keydown", onKeyDown);
3404
+ return () => {
3405
+ window.removeEventListener("keydown", onKeyDown);
3406
+ };
3407
+ }, [actions]);
3408
+ const stash = () => {
3409
+ const text = pendingRef.current?.text;
3410
+ if (text === void 0) return;
3411
+ actions.add(text);
3412
+ cutComposerSelection();
3413
+ setPending(null);
3414
+ window.getSelection()?.removeAllRanges();
3415
+ };
3416
+ const hoveredItem = hovered === null ? void 0 : items.find((item) => item.id === hovered.id);
3417
+ return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
3418
+ items.length > 0 && (0, react_jsx_runtime.jsx)("div", {
3419
+ className: TokenQuotaStash_module_css_default.stashRow,
3420
+ "data-token-quota-stash": "",
3421
+ children: items.map((item, index) => (0, react_jsx_runtime.jsx)("button", {
3422
+ type: "button",
3423
+ className: TokenQuotaStash_module_css_default.stashChip,
3424
+ onMouseDown: (event) => {
3425
+ event.preventDefault();
3426
+ },
3427
+ onMouseEnter: (event) => {
3428
+ const rect = event.currentTarget.getBoundingClientRect();
3429
+ setHovered({
3430
+ id: item.id,
3431
+ left: rect.left,
3432
+ top: rect.top
3433
+ });
3434
+ },
3435
+ onMouseLeave: () => {
3436
+ setHovered(null);
3437
+ },
3438
+ onClick: () => {
3439
+ insertIntoComposer(item.text, caretRef.current);
3440
+ actions.remove(item.id);
3441
+ setHovered(null);
3442
+ },
3443
+ "aria-label": t("stashChipHint").replace("{n}", String(index + 1)),
3444
+ children: stashBadge(index)
3445
+ }, item.id))
3446
+ }),
3447
+ hovered !== null && hoveredItem !== void 0 && (0, react_jsx_runtime.jsx)("div", {
3448
+ className: TokenQuotaStash_module_css_default.stashTip,
3449
+ "data-token-quota-stash": "",
3450
+ style: {
3451
+ left: Math.min(hovered.left, Math.max(8, window.innerWidth - 368)),
3452
+ bottom: window.innerHeight - hovered.top + 6
3453
+ },
3454
+ children: hoveredItem.text
3455
+ }),
3456
+ pending !== null && (0, react_jsx_runtime.jsxs)("div", {
3457
+ className: TokenQuotaStash_module_css_default.selPopup,
3458
+ "data-token-quota-stash": "",
3459
+ style: {
3460
+ left: pending.x,
3461
+ top: pending.y
3462
+ },
3463
+ onMouseDown: (event) => {
3464
+ event.preventDefault();
3465
+ },
3466
+ children: [
3467
+ (0, react_jsx_runtime.jsxs)("button", {
3468
+ type: "button",
3469
+ className: TokenQuotaStash_module_css_default.selBtn,
3470
+ onClick: () => {
3471
+ copyText(pending.text);
3472
+ setPending(null);
3473
+ },
3474
+ children: [(0, react_jsx_runtime.jsxs)("svg", {
3475
+ viewBox: "0 0 16 16",
3476
+ width: "12",
3477
+ height: "12",
3478
+ "aria-hidden": "true",
3479
+ children: [(0, react_jsx_runtime.jsx)("rect", {
3480
+ x: "5.6",
3481
+ y: "5.6",
3482
+ width: "7.8",
3483
+ height: "7.8",
3484
+ rx: "1.4",
3485
+ fill: "none",
3486
+ stroke: "currentColor",
3487
+ strokeWidth: "1.3"
3488
+ }), (0, react_jsx_runtime.jsx)("path", {
3489
+ d: "M10.4 5.6V4a1.4 1.4 0 0 0-1.4-1.4H4A1.4 1.4 0 0 0 2.6 4v5A1.4 1.4 0 0 0 4 10.4h1.6",
3490
+ fill: "none",
3491
+ stroke: "currentColor",
3492
+ strokeWidth: "1.3",
3493
+ strokeLinecap: "round"
3494
+ })]
3495
+ }), t("stashCopy")]
3496
+ }),
3497
+ (0, react_jsx_runtime.jsx)("span", {
3498
+ className: TokenQuotaStash_module_css_default.selDivider,
3499
+ "aria-hidden": "true"
3500
+ }),
3501
+ (0, react_jsx_runtime.jsxs)("button", {
3502
+ type: "button",
3503
+ className: TokenQuotaStash_module_css_default.selBtn,
3504
+ onClick: stash,
3505
+ children: [(0, react_jsx_runtime.jsx)("svg", {
3506
+ viewBox: "0 0 16 16",
3507
+ width: "12",
3508
+ height: "12",
3509
+ "aria-hidden": "true",
3510
+ children: (0, react_jsx_runtime.jsx)("path", {
3511
+ d: "M9.3 1.5 3.8 8.7h3.4l-.9 5.8 5.5-7.3H8.4z",
3512
+ fill: "currentColor"
3513
+ })
3514
+ }), t("stashSave")]
3515
+ })
3516
+ ]
3517
+ })
3518
+ ] });
3519
+ }
3142
3520
  //#endregion
3143
3521
  //#region lib/types/client/locales.js
3144
3522
  /**
@@ -3192,6 +3570,10 @@ window.__ModuleLoader__.load({
3192
3570
  transcribeKeyConfigured: "已配置",
3193
3571
  transcribeKeyMissing: "未配置",
3194
3572
  transcribeKeyFailed: "保存失败",
3573
+ stashTitle: "临存",
3574
+ stashCopy: "复制",
3575
+ stashSave: "临存",
3576
+ stashChipHint: "点击把第 {n} 条插入输入框",
3195
3577
  transcribeModelLabel: "模型",
3196
3578
  transcribeModelHint: "语音转文本模型名",
3197
3579
  reorderHint: "拖动排序",
@@ -3331,6 +3713,10 @@ window.__ModuleLoader__.load({
3331
3713
  transcribeKeyConfigured: "Configured",
3332
3714
  transcribeKeyMissing: "Not configured",
3333
3715
  transcribeKeyFailed: "Save failed",
3716
+ stashTitle: "Stash",
3717
+ stashCopy: "Copy",
3718
+ stashSave: "Stash",
3719
+ stashChipHint: "Insert snippet {n} into the composer",
3334
3720
  transcribeModelLabel: "Model",
3335
3721
  transcribeModelHint: "Speech-to-text model name",
3336
3722
  reorderHint: "Drag to reorder",
@@ -3438,8 +3824,8 @@ window.__ModuleLoader__.load({
3438
3824
  "slots",
3439
3825
  "sessions",
3440
3826
  "locale",
3441
- "settingsScope",
3442
3827
  "remote",
3828
+ "remote.settings",
3443
3829
  "remote.session",
3444
3830
  "remote.credentials"
3445
3831
  ];
@@ -3455,7 +3841,59 @@ window.__ModuleLoader__.load({
3455
3841
  en
3456
3842
  }), "token-quota-ui: panel dictionaries");
3457
3843
  const t = ctx.locale.bind(NS);
3458
- const scope = ctx.settingsScope.bind({ namespace: TOKEN_QUOTA_NAMESPACE });
3844
+ let settingsValue;
3845
+ let settingsRevision;
3846
+ /** Re-read the token-quota namespace from the Host. */
3847
+ const readSettings = async () => {
3848
+ try {
3849
+ const response = await ctx.remote.settings.describe();
3850
+ if (!response.ok) return settingsValue;
3851
+ const view = response.value.namespaces.find((entry) => entry.ns === TOKEN_QUOTA_NAMESPACE);
3852
+ if (view !== void 0) {
3853
+ settingsRevision = view.revision;
3854
+ settingsValue = view.value;
3855
+ }
3856
+ return settingsValue;
3857
+ } catch {
3858
+ return settingsValue;
3859
+ }
3860
+ };
3861
+ /**
3862
+ * Write one path of the namespace. Path ops avoid the read-modify-write race
3863
+ * a whole-object update would introduce (two editors, one section each), and
3864
+ * a stale revision is retried once against a fresh read instead of dropping
3865
+ * the change.
3866
+ */
3867
+ const writeSetting = (path, value) => {
3868
+ (async () => {
3869
+ const op = value === void 0 ? {
3870
+ op: "unset",
3871
+ path
3872
+ } : {
3873
+ op: "set",
3874
+ path,
3875
+ value
3876
+ };
3877
+ try {
3878
+ let response = await ctx.remote.settings.mutate(TOKEN_QUOTA_NAMESPACE, [op], settingsRevision);
3879
+ if (!response.ok) {
3880
+ await readSettings();
3881
+ response = await ctx.remote.settings.mutate(TOKEN_QUOTA_NAMESPACE, [op], settingsRevision);
3882
+ }
3883
+ if (response.ok) {
3884
+ settingsRevision = response.value.revision;
3885
+ settingsValue = response.value.value;
3886
+ }
3887
+ } catch {}
3888
+ })();
3889
+ };
3890
+ const scope = {
3891
+ getSnapshot: () => ({ value: settingsValue }),
3892
+ set: (key, value) => {
3893
+ writeSetting([key], value);
3894
+ return Promise.resolve();
3895
+ }
3896
+ };
3459
3897
  const sessions = ctx.get("sessions");
3460
3898
  const store = createTokenQuotaPanelStore();
3461
3899
  let bound;
@@ -3657,7 +4095,11 @@ window.__ModuleLoader__.load({
3657
4095
  }, () => {});
3658
4096
  };
3659
4097
  const pull = () => {
4098
+ pullOnce();
4099
+ };
4100
+ const pullOnce = async () => {
3660
4101
  pullCount += 1;
4102
+ await readSettings();
3661
4103
  const doc = scope.getSnapshot().value;
3662
4104
  lastMonitored = doc?.monitored !== void 0 && doc.monitored.length > 0 ? doc.monitored : null;
3663
4105
  const rawOnFull = doc?.onFull ?? "stop";
@@ -3731,11 +4173,7 @@ window.__ModuleLoader__.load({
3731
4173
  });
3732
4174
  };
3733
4175
  const setLimit = (key, limit) => {
3734
- const current = scope.getSnapshot().value?.limits ?? {};
3735
- scope.set("limits", {
3736
- ...current,
3737
- [key]: limit
3738
- });
4176
+ writeSetting(["limits", key], limit);
3739
4177
  };
3740
4178
  const setMonitored = (monitored) => {
3741
4179
  lastMonitored = monitored;
@@ -3989,6 +4427,15 @@ window.__ModuleLoader__.load({
3989
4427
  t
3990
4428
  })
3991
4429
  }, TokenQuotaMic));
4430
+ const stashStore = createTokenQuotaStashStore();
4431
+ ctx.slots.inject("conversation.input.overlay", () => ctx.slots.register({
4432
+ name: "conversation.input.overlay",
4433
+ id: "token-quota-stash",
4434
+ order: 90,
4435
+ label: () => t("stashTitle"),
4436
+ store: stashStore,
4437
+ locale: NS
4438
+ }, TokenQuotaStash));
3992
4439
  }
3993
4440
  //#endregion
3994
4441
  exports.apply = apply;