poi-plugin-kca-next 1.0.1 → 1.0.2
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/dist/index.js +1452 -247
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58,7 +58,7 @@ __export(index_exports, {
|
|
|
58
58
|
module.exports = __toCommonJS(index_exports);
|
|
59
59
|
var import_node_fs4 = __toESM(require("fs"));
|
|
60
60
|
var import_node_path3 = __toESM(require("path"));
|
|
61
|
-
var
|
|
61
|
+
var import_react12 = __toESM(require("react"));
|
|
62
62
|
|
|
63
63
|
// src/data/coords.ts
|
|
64
64
|
var CANVAS_WIDTH = 1200;
|
|
@@ -2610,9 +2610,11 @@ var ActionScheduler = class {
|
|
|
2610
2610
|
this.activeStepDesc = desc;
|
|
2611
2611
|
this.emit();
|
|
2612
2612
|
}
|
|
2613
|
-
canAcquire(owner) {
|
|
2613
|
+
canAcquire(owner, bypassCooldown = false) {
|
|
2614
2614
|
if (this.activeOwner !== null && this.activeOwner !== owner) return false;
|
|
2615
|
-
if (this.activeOwner === null && Date.now() < this.cooldownUntilMs)
|
|
2615
|
+
if (!bypassCooldown && this.activeOwner === null && Date.now() < this.cooldownUntilMs) {
|
|
2616
|
+
return false;
|
|
2617
|
+
}
|
|
2616
2618
|
return true;
|
|
2617
2619
|
}
|
|
2618
2620
|
enterSortieClickLock(owner) {
|
|
@@ -2629,9 +2631,13 @@ var ActionScheduler = class {
|
|
|
2629
2631
|
if (!this.sortieClickLockOwner) return true;
|
|
2630
2632
|
return callerAllowsDuringSortieLock;
|
|
2631
2633
|
}
|
|
2632
|
-
async runExclusive(owner, fn,
|
|
2633
|
-
|
|
2634
|
-
|
|
2634
|
+
async runExclusive(owner, fn, cooldownMsOrOptions = 400) {
|
|
2635
|
+
const cooldownMs = typeof cooldownMsOrOptions === "number" ? cooldownMsOrOptions : cooldownMsOrOptions.cooldownMs ?? 400;
|
|
2636
|
+
const bypassCooldown = typeof cooldownMsOrOptions === "object" && Boolean(cooldownMsOrOptions.bypassCooldown);
|
|
2637
|
+
if (!this.canAcquire(owner, bypassCooldown)) {
|
|
2638
|
+
throw new Error(
|
|
2639
|
+
this.activeOwner !== null ? `Scheduler busy (${this.activeOwner})` : "Scheduler in cooldown"
|
|
2640
|
+
);
|
|
2635
2641
|
}
|
|
2636
2642
|
const controller = new AbortController();
|
|
2637
2643
|
this.activeOwner = owner;
|
|
@@ -3612,9 +3618,13 @@ var AutomationModule = class {
|
|
|
3612
3618
|
const snapshot = this.runtime.bridge.getState();
|
|
3613
3619
|
if (options.recoverToPortOnError !== false && !snapshot.inSortie) {
|
|
3614
3620
|
try {
|
|
3615
|
-
await this.runtime.scheduler.runExclusive(
|
|
3616
|
-
|
|
3617
|
-
|
|
3621
|
+
await this.runtime.scheduler.runExclusive(
|
|
3622
|
+
`${this.id}:recover`,
|
|
3623
|
+
async (sig) => {
|
|
3624
|
+
await this.runtime.actions.resetToPort(this.createContext(sig, false), 3);
|
|
3625
|
+
},
|
|
3626
|
+
{ bypassCooldown: true }
|
|
3627
|
+
);
|
|
3618
3628
|
this.state = "idle";
|
|
3619
3629
|
this.statusText = "\u5DF2\u81EA\u52A8\u6062\u590D\u81F3\u6BCD\u6E2F";
|
|
3620
3630
|
} catch (recErr) {
|
|
@@ -8077,6 +8087,10 @@ function detectQuestResets(lastUtcMs, nowUtcMs) {
|
|
|
8077
8087
|
const monthly = curr.getUTCFullYear() !== prev.getUTCFullYear() || curr.getUTCMonth() !== prev.getUTCMonth();
|
|
8078
8088
|
return { daily, weekly, monthly };
|
|
8079
8089
|
}
|
|
8090
|
+
function computeQuestPageButtonSlot(targetPage, currentPage, totalPages) {
|
|
8091
|
+
const windowStart = totalPages <= 5 ? 1 : Math.max(1, Math.min(currentPage - 2, totalPages - 4));
|
|
8092
|
+
return Math.max(0, Math.min(4, targetPage - windowStart));
|
|
8093
|
+
}
|
|
8080
8094
|
var AutoQuestsModule = class extends AutomationModule {
|
|
8081
8095
|
constructor(runtime, signals) {
|
|
8082
8096
|
super(runtime);
|
|
@@ -8271,7 +8285,7 @@ var AutoQuestsModule = class extends AutomationModule {
|
|
|
8271
8285
|
while (keepScanning) {
|
|
8272
8286
|
const snap = this.runtime.bridge.getState();
|
|
8273
8287
|
const allQuests = Object.values(snap.quests).sort((a, b) => a.id - b.id);
|
|
8274
|
-
const tabQuests = tabIndex === 1 ? allQuests.filter((q) => q.state === 2 || q.state === 3) : tabIndex === 0 ? allQuests : allQuests.filter((q) => q.type === tabIndex - 1);
|
|
8288
|
+
const tabQuests = snap.activeQuestTabList !== void 0 ? [...snap.activeQuestTabList] : tabIndex === 1 ? allQuests.filter((q) => q.state === 2 || q.state === 3) : tabIndex === 0 ? allQuests : allQuests.filter((q) => q.type === tabIndex - 1);
|
|
8275
8289
|
const pageItems = tabQuests.slice((page - 1) * 5, page * 5);
|
|
8276
8290
|
if (pageItems.length === 0) break;
|
|
8277
8291
|
const activeCount = allQuests.filter((q) => q.state === 2 || q.state === 3).length;
|
|
@@ -8345,15 +8359,15 @@ var AutoQuestsModule = class extends AutomationModule {
|
|
|
8345
8359
|
}
|
|
8346
8360
|
const totalPages = Math.ceil(tabQuests.length / 5);
|
|
8347
8361
|
if (page < totalPages && (tabIndex === 1 || freeSlots > 0)) {
|
|
8348
|
-
page
|
|
8349
|
-
const btnSlot =
|
|
8350
|
-
|
|
8362
|
+
const nextPage = page + 1;
|
|
8363
|
+
const btnSlot = computeQuestPageButtonSlot(nextPage, page, totalPages);
|
|
8364
|
+
page = nextPage;
|
|
8365
|
+
await this.runtime.actions.clickDelay(
|
|
8351
8366
|
{
|
|
8352
8367
|
x: COORDS.quests.page1.x + btnSlot * COORDS.quests.pageOffsetX,
|
|
8353
8368
|
y: COORDS.quests.page1.y
|
|
8354
8369
|
},
|
|
8355
|
-
|
|
8356
|
-
{ randomRange: 10, delayMs: 800, desc: `\u4EFB\u52A1\uFF1A\u7FFB\u81F3\u7B2C ${page} \u9875` },
|
|
8370
|
+
{ randomRange: 10, delayMs: 850, desc: `\u4EFB\u52A1\uFF1A\u7FFB\u81F3\u7B2C ${page} \u9875` },
|
|
8357
8371
|
ctx
|
|
8358
8372
|
);
|
|
8359
8373
|
} else {
|
|
@@ -8412,9 +8426,22 @@ var AutoQuestsModule = class extends AutomationModule {
|
|
|
8412
8426
|
tabsToVisit.add(q.type + 1);
|
|
8413
8427
|
}
|
|
8414
8428
|
}
|
|
8429
|
+
let completedInCategory = false;
|
|
8415
8430
|
for (const tab of Array.from(tabsToVisit).sort((a, b) => a - b)) {
|
|
8416
8431
|
const res = await this.scanTab(tab, ctx);
|
|
8417
|
-
if (res.completedAny)
|
|
8432
|
+
if (res.completedAny) {
|
|
8433
|
+
completedInCategory = true;
|
|
8434
|
+
break;
|
|
8435
|
+
}
|
|
8436
|
+
}
|
|
8437
|
+
if (completedInCategory) {
|
|
8438
|
+
await this.runtime.actions.clickWaitApi(
|
|
8439
|
+
COORDS.quests.tabAll,
|
|
8440
|
+
"/kcsapi/api_get_member/questlist",
|
|
8441
|
+
{ randomRange: 14, delayMs: 900, desc: "\u4EFB\u52A1\uFF1A\u5237\u65B0\u5168\u90E8\u4EFB\u52A1\u5217\u8868" },
|
|
8442
|
+
ctx
|
|
8443
|
+
);
|
|
8444
|
+
continue;
|
|
8418
8445
|
}
|
|
8419
8446
|
}
|
|
8420
8447
|
break;
|
|
@@ -9982,16 +10009,24 @@ var KcaAssistantCoordinator = class {
|
|
|
9982
10009
|
const cacheLabel = reloadRes.start2CacheReady ? `Start2 \u7F13\u5B58\u5DF2\u5C31\u7EEA (\u5269 ${Math.ceil(reloadRes.start2CacheLeftSec / 60)} \u5206)` : sf.start2CacheMode === "serve" ? "Start2 \u7F13\u5B58\u5C1A\u672A\u5C31\u7EEA (\u672C\u6B21\u5C06\u81EA\u52A8\u91C7\u96C6)" : "Start2 \u7F13\u5B58\u672A\u5F00\u542F";
|
|
9983
10010
|
this.logger.info("system", `\u6267\u884C F5 [${kindLabel}] \xB7 ${cacheLabel}`);
|
|
9984
10011
|
}
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
|
|
10012
|
+
const waitEnd = Date.now() + 1500;
|
|
10013
|
+
while (this.scheduler.isBusy && Date.now() < waitEnd) {
|
|
10014
|
+
await new Promise((r) => setTimeout(r, 50));
|
|
10015
|
+
}
|
|
10016
|
+
await this.scheduler.runExclusive(
|
|
10017
|
+
"system:autof5",
|
|
10018
|
+
async (signal) => {
|
|
10019
|
+
await this.actions.startGameToPort(
|
|
10020
|
+
{
|
|
10021
|
+
signal,
|
|
10022
|
+
category: "system",
|
|
10023
|
+
defaultTimeoutMs: 18e4
|
|
10024
|
+
},
|
|
10025
|
+
18e4
|
|
10026
|
+
);
|
|
10027
|
+
},
|
|
10028
|
+
{ bypassCooldown: true }
|
|
10029
|
+
);
|
|
9995
10030
|
this.logger.success("system", "F5 \u91CD\u8FDE\u5B8C\u6210\uFF0C\u5DF2\u91CD\u65B0\u8FDB\u5165\u6BCD\u6E2F");
|
|
9996
10031
|
} catch (err) {
|
|
9997
10032
|
this.logger.error("system", `F5 \u672A\u5B8C\u6210: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -10054,6 +10089,475 @@ var KcaAssistantCoordinator = class {
|
|
|
10054
10089
|
}
|
|
10055
10090
|
};
|
|
10056
10091
|
|
|
10092
|
+
// src/core/coord-overlay.ts
|
|
10093
|
+
function clientToCanonicalCoord(clientX, clientY, rect) {
|
|
10094
|
+
if (!rect || rect.width <= 0 || rect.height <= 0) return null;
|
|
10095
|
+
const rx = (clientX - rect.left) / rect.width;
|
|
10096
|
+
const ry = (clientY - rect.top) / rect.height;
|
|
10097
|
+
const x = Math.max(0, Math.min(CANVAS_WIDTH, Math.round(rx * CANVAS_WIDTH)));
|
|
10098
|
+
const y = Math.max(0, Math.min(CANVAS_HEIGHT, Math.round(ry * CANVAS_HEIGHT)));
|
|
10099
|
+
return { x, y };
|
|
10100
|
+
}
|
|
10101
|
+
function buildCoordOverlayScript(config) {
|
|
10102
|
+
const payload = JSON.stringify({
|
|
10103
|
+
visible: Boolean(config.visible),
|
|
10104
|
+
pickMode: Boolean(config.pickMode),
|
|
10105
|
+
pickLabel: String(config.pickLabel ?? ""),
|
|
10106
|
+
markers: (config.markers ?? []).filter((m) => m && Number.isFinite(m.x) && Number.isFinite(m.y) && (m.x > 0 || m.y > 0)).map((m) => ({
|
|
10107
|
+
id: String(m.id),
|
|
10108
|
+
label: String(m.label),
|
|
10109
|
+
x: Math.max(0, Math.min(CANVAS_WIDTH, Math.round(m.x))),
|
|
10110
|
+
y: Math.max(0, Math.min(CANVAS_HEIGHT, Math.round(m.y))),
|
|
10111
|
+
color: String(m.color || "#38bdf8")
|
|
10112
|
+
}))
|
|
10113
|
+
});
|
|
10114
|
+
return `(() => {
|
|
10115
|
+
try {
|
|
10116
|
+
const cfg = ${payload};
|
|
10117
|
+
const KEY = '__kcaNextCoordOverlayV1';
|
|
10118
|
+
const DOM_ID = '__kca_next_coord_overlay__';
|
|
10119
|
+
const W = ${CANVAS_WIDTH};
|
|
10120
|
+
const H = ${CANVAS_HEIGHT};
|
|
10121
|
+
|
|
10122
|
+
const findGameCanvas = () => {
|
|
10123
|
+
const list = Array.from(document.querySelectorAll('canvas'))
|
|
10124
|
+
.map((el) => ({ el, r: el.getBoundingClientRect() }))
|
|
10125
|
+
.filter((item) => item.r.width >= 100 && item.r.height >= 60)
|
|
10126
|
+
.sort((a, b) => (b.r.width * b.r.height) - (a.r.width * a.r.height));
|
|
10127
|
+
return list[0] || null;
|
|
10128
|
+
};
|
|
10129
|
+
|
|
10130
|
+
let ctl = window[KEY];
|
|
10131
|
+
if (!ctl) {
|
|
10132
|
+
ctl = {
|
|
10133
|
+
active: false,
|
|
10134
|
+
pickMode: false,
|
|
10135
|
+
pickLabel: '',
|
|
10136
|
+
markers: [],
|
|
10137
|
+
hover: null,
|
|
10138
|
+
picked: null,
|
|
10139
|
+
pickSeq: 0,
|
|
10140
|
+
cancelledSeq: 0,
|
|
10141
|
+
swallowingUntil: 0,
|
|
10142
|
+
swallowTimer: null,
|
|
10143
|
+
root: null,
|
|
10144
|
+
hud: null,
|
|
10145
|
+
banner: null,
|
|
10146
|
+
crossX: null,
|
|
10147
|
+
crossY: null,
|
|
10148
|
+
cursorTag: null,
|
|
10149
|
+
pinsLayer: null,
|
|
10150
|
+
syncRect: null,
|
|
10151
|
+
renderPins: null,
|
|
10152
|
+
applyMode: null,
|
|
10153
|
+
teardown: null,
|
|
10154
|
+
};
|
|
10155
|
+
|
|
10156
|
+
const root = document.createElement('div');
|
|
10157
|
+
root.id = DOM_ID;
|
|
10158
|
+
root.style.cssText = [
|
|
10159
|
+
'position:fixed',
|
|
10160
|
+
'left:0',
|
|
10161
|
+
'top:0',
|
|
10162
|
+
'width:0',
|
|
10163
|
+
'height:0',
|
|
10164
|
+
'z-index:2147483647',
|
|
10165
|
+
'pointer-events:none',
|
|
10166
|
+
'overflow:hidden',
|
|
10167
|
+
'user-select:none',
|
|
10168
|
+
'font-family:ui-monospace,SFMono-Regular,Consolas,"Microsoft YaHei",sans-serif',
|
|
10169
|
+
].join(';');
|
|
10170
|
+
|
|
10171
|
+
const crossX = document.createElement('div');
|
|
10172
|
+
crossX.style.cssText = 'position:absolute;top:0;bottom:0;width:1px;border-left:1px dashed rgba(56,189,248,0.75);display:none;pointer-events:none;';
|
|
10173
|
+
const crossY = document.createElement('div');
|
|
10174
|
+
crossY.style.cssText = 'position:absolute;left:0;right:0;height:1px;border-top:1px dashed rgba(56,189,248,0.75);display:none;pointer-events:none;';
|
|
10175
|
+
|
|
10176
|
+
const hud = document.createElement('div');
|
|
10177
|
+
hud.style.cssText = [
|
|
10178
|
+
'position:absolute',
|
|
10179
|
+
'left:8px',
|
|
10180
|
+
'top:8px',
|
|
10181
|
+
'padding:4px 9px',
|
|
10182
|
+
'border-radius:6px',
|
|
10183
|
+
'background:rgba(15,23,42,0.88)',
|
|
10184
|
+
'border:1px solid rgba(56,189,248,0.65)',
|
|
10185
|
+
'color:#e2e8f0',
|
|
10186
|
+
'font-size:12px',
|
|
10187
|
+
'font-weight:700',
|
|
10188
|
+
'letter-spacing:0.2px',
|
|
10189
|
+
'box-shadow:0 2px 8px rgba(0,0,0,0.45)',
|
|
10190
|
+
'pointer-events:none',
|
|
10191
|
+
'white-space:nowrap',
|
|
10192
|
+
].join(';');
|
|
10193
|
+
hud.textContent = 'KCA \u5750\u6807: \u79FB\u52A8\u9F20\u6807\u67E5\u770B (1200x720)';
|
|
10194
|
+
|
|
10195
|
+
const banner = document.createElement('div');
|
|
10196
|
+
banner.style.cssText = [
|
|
10197
|
+
'position:absolute',
|
|
10198
|
+
'left:50%',
|
|
10199
|
+
'top:8px',
|
|
10200
|
+
'transform:translateX(-50%)',
|
|
10201
|
+
'padding:5px 12px',
|
|
10202
|
+
'border-radius:6px',
|
|
10203
|
+
'background:rgba(30,58,138,0.92)',
|
|
10204
|
+
'border:1px solid rgba(96,165,250,0.95)',
|
|
10205
|
+
'color:#ffffff',
|
|
10206
|
+
'font-size:12px',
|
|
10207
|
+
'font-weight:700',
|
|
10208
|
+
'box-shadow:0 2px 10px rgba(0,0,0,0.55)',
|
|
10209
|
+
'pointer-events:none',
|
|
10210
|
+
'display:none',
|
|
10211
|
+
'white-space:nowrap',
|
|
10212
|
+
].join(';');
|
|
10213
|
+
|
|
10214
|
+
const cursorTag = document.createElement('div');
|
|
10215
|
+
cursorTag.style.cssText = [
|
|
10216
|
+
'position:absolute',
|
|
10217
|
+
'padding:2px 6px',
|
|
10218
|
+
'border-radius:4px',
|
|
10219
|
+
'background:rgba(15,23,42,0.92)',
|
|
10220
|
+
'border:1px solid rgba(56,189,248,0.85)',
|
|
10221
|
+
'color:#7dd3fc',
|
|
10222
|
+
'font-size:11px',
|
|
10223
|
+
'font-weight:700',
|
|
10224
|
+
'pointer-events:none',
|
|
10225
|
+
'display:none',
|
|
10226
|
+
'white-space:nowrap',
|
|
10227
|
+
].join(';');
|
|
10228
|
+
|
|
10229
|
+
const pinsLayer = document.createElement('div');
|
|
10230
|
+
pinsLayer.style.cssText = 'position:absolute;inset:0;pointer-events:none;';
|
|
10231
|
+
|
|
10232
|
+
root.appendChild(pinsLayer);
|
|
10233
|
+
root.appendChild(crossX);
|
|
10234
|
+
root.appendChild(crossY);
|
|
10235
|
+
root.appendChild(hud);
|
|
10236
|
+
root.appendChild(banner);
|
|
10237
|
+
root.appendChild(cursorTag);
|
|
10238
|
+
|
|
10239
|
+
ctl.root = root;
|
|
10240
|
+
ctl.hud = hud;
|
|
10241
|
+
ctl.banner = banner;
|
|
10242
|
+
ctl.crossX = crossX;
|
|
10243
|
+
ctl.crossY = crossY;
|
|
10244
|
+
ctl.cursorTag = cursorTag;
|
|
10245
|
+
ctl.pinsLayer = pinsLayer;
|
|
10246
|
+
|
|
10247
|
+
const getRect = () => {
|
|
10248
|
+
const found = findGameCanvas();
|
|
10249
|
+
if (found) return found.r;
|
|
10250
|
+
return { left: 0, top: 0, width: window.innerWidth || W, height: window.innerHeight || H };
|
|
10251
|
+
};
|
|
10252
|
+
|
|
10253
|
+
const syncRect = () => {
|
|
10254
|
+
const r = getRect();
|
|
10255
|
+
root.style.left = r.left + 'px';
|
|
10256
|
+
root.style.top = r.top + 'px';
|
|
10257
|
+
root.style.width = r.width + 'px';
|
|
10258
|
+
root.style.height = r.height + 'px';
|
|
10259
|
+
return r;
|
|
10260
|
+
};
|
|
10261
|
+
ctl.syncRect = syncRect;
|
|
10262
|
+
|
|
10263
|
+
const mapPointer = (e) => {
|
|
10264
|
+
const r = syncRect();
|
|
10265
|
+
if (!r || r.width <= 0 || r.height <= 0) return null;
|
|
10266
|
+
const relX = e.clientX - r.left;
|
|
10267
|
+
const relY = e.clientY - r.top;
|
|
10268
|
+
if (relX < 0 || relY < 0 || relX > r.width || relY > r.height) return null;
|
|
10269
|
+
const x = Math.max(0, Math.min(W, Math.round((relX / r.width) * W)));
|
|
10270
|
+
const y = Math.max(0, Math.min(H, Math.round((relY / r.height) * H)));
|
|
10271
|
+
return { x, y, relX, relY, r };
|
|
10272
|
+
};
|
|
10273
|
+
|
|
10274
|
+
const renderPins = () => {
|
|
10275
|
+
while (pinsLayer.firstChild) pinsLayer.removeChild(pinsLayer.firstChild);
|
|
10276
|
+
for (const m of ctl.markers) {
|
|
10277
|
+
const pin = document.createElement('div');
|
|
10278
|
+
pin.style.cssText = [
|
|
10279
|
+
'position:absolute',
|
|
10280
|
+
'left:' + ((m.x / W) * 100).toFixed(4) + '%',
|
|
10281
|
+
'top:' + ((m.y / H) * 100).toFixed(4) + '%',
|
|
10282
|
+
'transform:translate(-50%,-50%)',
|
|
10283
|
+
'pointer-events:none',
|
|
10284
|
+
].join(';');
|
|
10285
|
+
|
|
10286
|
+
const dot = document.createElement('div');
|
|
10287
|
+
dot.style.cssText = [
|
|
10288
|
+
'width:14px',
|
|
10289
|
+
'height:14px',
|
|
10290
|
+
'border-radius:999px',
|
|
10291
|
+
'border:2px solid ' + m.color,
|
|
10292
|
+
'background:rgba(15,23,42,0.55)',
|
|
10293
|
+
'box-shadow:0 0 0 2px rgba(0,0,0,0.55)',
|
|
10294
|
+
'position:relative',
|
|
10295
|
+
].join(';');
|
|
10296
|
+
const center = document.createElement('div');
|
|
10297
|
+
center.style.cssText = [
|
|
10298
|
+
'position:absolute',
|
|
10299
|
+
'left:50%',
|
|
10300
|
+
'top:50%',
|
|
10301
|
+
'width:4px',
|
|
10302
|
+
'height:4px',
|
|
10303
|
+
'border-radius:999px',
|
|
10304
|
+
'transform:translate(-50%,-50%)',
|
|
10305
|
+
'background:' + m.color,
|
|
10306
|
+
].join(';');
|
|
10307
|
+
dot.appendChild(center);
|
|
10308
|
+
|
|
10309
|
+
const tag = document.createElement('div');
|
|
10310
|
+
tag.style.cssText = [
|
|
10311
|
+
'position:absolute',
|
|
10312
|
+
'left:10px',
|
|
10313
|
+
'top:-10px',
|
|
10314
|
+
'padding:1px 5px',
|
|
10315
|
+
'border-radius:4px',
|
|
10316
|
+
'background:rgba(15,23,42,0.88)',
|
|
10317
|
+
'border:1px solid ' + m.color,
|
|
10318
|
+
'color:#f8fafc',
|
|
10319
|
+
'font-size:10px',
|
|
10320
|
+
'font-weight:700',
|
|
10321
|
+
'white-space:nowrap',
|
|
10322
|
+
'box-shadow:0 1px 4px rgba(0,0,0,0.5)',
|
|
10323
|
+
].join(';');
|
|
10324
|
+
tag.textContent = m.label + ' (' + m.x + ',' + m.y + ')';
|
|
10325
|
+
|
|
10326
|
+
pin.appendChild(dot);
|
|
10327
|
+
pin.appendChild(tag);
|
|
10328
|
+
pinsLayer.appendChild(pin);
|
|
10329
|
+
}
|
|
10330
|
+
};
|
|
10331
|
+
ctl.renderPins = renderPins;
|
|
10332
|
+
|
|
10333
|
+
const applyMode = () => {
|
|
10334
|
+
syncRect();
|
|
10335
|
+
if (ctl.pickMode) {
|
|
10336
|
+
if (ctl.swallowTimer) {
|
|
10337
|
+
clearTimeout(ctl.swallowTimer);
|
|
10338
|
+
ctl.swallowTimer = null;
|
|
10339
|
+
}
|
|
10340
|
+
ctl.swallowingUntil = 0;
|
|
10341
|
+
root.style.pointerEvents = 'auto';
|
|
10342
|
+
root.style.cursor = 'crosshair';
|
|
10343
|
+
root.style.outline = '2px solid rgba(56,189,248,0.9)';
|
|
10344
|
+
root.style.outlineOffset = '-2px';
|
|
10345
|
+
root.style.background = 'rgba(15,23,42,0.10)';
|
|
10346
|
+
banner.style.display = 'block';
|
|
10347
|
+
banner.textContent = '\u{1F3AF} \u53D6\u70B9\u6A21\u5F0F [' + (ctl.pickLabel || '\u5750\u6807') + ']\uFF1A\u5DE6\u952E\u70B9\u51FB\u76EE\u6807\u70B9\u586B\u5165\uFF0C\u53F3\u952E\u6216 Esc \u53D6\u6D88\uFF08\u4E0D\u8BEF\u89E6\u6E38\u620F\uFF09';
|
|
10348
|
+
} else {
|
|
10349
|
+
const keepShield = ctl.swallowingUntil > Date.now();
|
|
10350
|
+
root.style.pointerEvents = keepShield ? 'auto' : 'none';
|
|
10351
|
+
root.style.cursor = 'default';
|
|
10352
|
+
root.style.outline = 'none';
|
|
10353
|
+
root.style.background = 'transparent';
|
|
10354
|
+
banner.style.display = 'none';
|
|
10355
|
+
cursorTag.style.display = 'none';
|
|
10356
|
+
if (keepShield) {
|
|
10357
|
+
if (ctl.swallowTimer) clearTimeout(ctl.swallowTimer);
|
|
10358
|
+
ctl.swallowTimer = setTimeout(() => {
|
|
10359
|
+
ctl.swallowTimer = null;
|
|
10360
|
+
ctl.swallowingUntil = 0;
|
|
10361
|
+
if (!ctl.pickMode) root.style.pointerEvents = 'none';
|
|
10362
|
+
}, Math.max(40, ctl.swallowingUntil - Date.now() + 20));
|
|
10363
|
+
}
|
|
10364
|
+
}
|
|
10365
|
+
};
|
|
10366
|
+
ctl.applyMode = applyMode;
|
|
10367
|
+
|
|
10368
|
+
const onPointerMove = (e) => {
|
|
10369
|
+
if (!ctl.active) return;
|
|
10370
|
+
const pt = mapPointer(e);
|
|
10371
|
+
if (!pt) {
|
|
10372
|
+
crossX.style.display = 'none';
|
|
10373
|
+
crossY.style.display = 'none';
|
|
10374
|
+
cursorTag.style.display = 'none';
|
|
10375
|
+
return;
|
|
10376
|
+
}
|
|
10377
|
+
ctl.hover = { x: pt.x, y: pt.y };
|
|
10378
|
+
hud.textContent = 'KCA \u5750\u6807: X ' + pt.x + ', Y ' + pt.y;
|
|
10379
|
+
crossX.style.display = 'block';
|
|
10380
|
+
crossX.style.left = pt.relX + 'px';
|
|
10381
|
+
crossY.style.display = 'block';
|
|
10382
|
+
crossY.style.top = pt.relY + 'px';
|
|
10383
|
+
if (ctl.pickMode) {
|
|
10384
|
+
cursorTag.style.display = 'block';
|
|
10385
|
+
cursorTag.textContent = pt.x + ', ' + pt.y;
|
|
10386
|
+
const flipX = pt.relX > pt.r.width - 96;
|
|
10387
|
+
const flipY = pt.relY > pt.r.height - 36;
|
|
10388
|
+
cursorTag.style.left = (flipX ? pt.relX - 78 : pt.relX + 12) + 'px';
|
|
10389
|
+
cursorTag.style.top = (flipY ? pt.relY - 26 : pt.relY + 12) + 'px';
|
|
10390
|
+
}
|
|
10391
|
+
};
|
|
10392
|
+
|
|
10393
|
+
const swallowEvent = (e) => {
|
|
10394
|
+
if (!ctl.pickMode && ctl.swallowingUntil <= Date.now()) return;
|
|
10395
|
+
e.preventDefault();
|
|
10396
|
+
e.stopPropagation();
|
|
10397
|
+
if (typeof e.stopImmediatePropagation === 'function') e.stopImmediatePropagation();
|
|
10398
|
+
};
|
|
10399
|
+
|
|
10400
|
+
const finishPickWithShield = () => {
|
|
10401
|
+
ctl.pickMode = false;
|
|
10402
|
+
ctl.swallowingUntil = Date.now() + 300;
|
|
10403
|
+
applyMode();
|
|
10404
|
+
};
|
|
10405
|
+
|
|
10406
|
+
const onPickDown = (e) => {
|
|
10407
|
+
if (!ctl.pickMode) {
|
|
10408
|
+
swallowEvent(e);
|
|
10409
|
+
return;
|
|
10410
|
+
}
|
|
10411
|
+
swallowEvent(e);
|
|
10412
|
+
if (e.button === 2) {
|
|
10413
|
+
ctl.cancelledSeq++;
|
|
10414
|
+
finishPickWithShield();
|
|
10415
|
+
return;
|
|
10416
|
+
}
|
|
10417
|
+
if (e.button !== 0) return;
|
|
10418
|
+
const pt = mapPointer(e);
|
|
10419
|
+
if (!pt) return;
|
|
10420
|
+
ctl.pickSeq++;
|
|
10421
|
+
ctl.picked = { x: pt.x, y: pt.y, seq: ctl.pickSeq };
|
|
10422
|
+
finishPickWithShield();
|
|
10423
|
+
};
|
|
10424
|
+
|
|
10425
|
+
const onContextMenu = (e) => {
|
|
10426
|
+
if (!ctl.pickMode && ctl.swallowingUntil <= Date.now()) return;
|
|
10427
|
+
swallowEvent(e);
|
|
10428
|
+
if (ctl.pickMode) {
|
|
10429
|
+
ctl.cancelledSeq++;
|
|
10430
|
+
finishPickWithShield();
|
|
10431
|
+
}
|
|
10432
|
+
};
|
|
10433
|
+
|
|
10434
|
+
const onKeyDown = (e) => {
|
|
10435
|
+
if (!ctl.pickMode) return;
|
|
10436
|
+
if (e.key === 'Escape') {
|
|
10437
|
+
swallowEvent(e);
|
|
10438
|
+
ctl.pickMode = false;
|
|
10439
|
+
ctl.cancelledSeq++;
|
|
10440
|
+
applyMode();
|
|
10441
|
+
}
|
|
10442
|
+
};
|
|
10443
|
+
|
|
10444
|
+
const onResize = () => {
|
|
10445
|
+
if (ctl.active) syncRect();
|
|
10446
|
+
};
|
|
10447
|
+
|
|
10448
|
+
window.addEventListener('pointermove', onPointerMove, true);
|
|
10449
|
+
window.addEventListener('mousemove', onPointerMove, true);
|
|
10450
|
+
window.addEventListener('keydown', onKeyDown, true);
|
|
10451
|
+
window.addEventListener('resize', onResize);
|
|
10452
|
+
root.addEventListener('pointerdown', onPickDown, true);
|
|
10453
|
+
root.addEventListener('mousedown', swallowEvent, true);
|
|
10454
|
+
root.addEventListener('mouseup', swallowEvent, true);
|
|
10455
|
+
root.addEventListener('click', swallowEvent, true);
|
|
10456
|
+
root.addEventListener('contextmenu', onContextMenu, true);
|
|
10457
|
+
|
|
10458
|
+
ctl.teardown = () => {
|
|
10459
|
+
ctl.active = false;
|
|
10460
|
+
ctl.pickMode = false;
|
|
10461
|
+
ctl.swallowingUntil = 0;
|
|
10462
|
+
if (ctl.swallowTimer) {
|
|
10463
|
+
clearTimeout(ctl.swallowTimer);
|
|
10464
|
+
ctl.swallowTimer = null;
|
|
10465
|
+
}
|
|
10466
|
+
window.removeEventListener('pointermove', onPointerMove, true);
|
|
10467
|
+
window.removeEventListener('mousemove', onPointerMove, true);
|
|
10468
|
+
window.removeEventListener('keydown', onKeyDown, true);
|
|
10469
|
+
window.removeEventListener('resize', onResize);
|
|
10470
|
+
root.removeEventListener('pointerdown', onPickDown, true);
|
|
10471
|
+
root.removeEventListener('mousedown', swallowEvent, true);
|
|
10472
|
+
root.removeEventListener('mouseup', swallowEvent, true);
|
|
10473
|
+
root.removeEventListener('click', swallowEvent, true);
|
|
10474
|
+
root.removeEventListener('contextmenu', onContextMenu, true);
|
|
10475
|
+
if (root.parentNode) root.parentNode.removeChild(root);
|
|
10476
|
+
delete window[KEY];
|
|
10477
|
+
};
|
|
10478
|
+
|
|
10479
|
+
ctl.getStatus = () => ({
|
|
10480
|
+
active: Boolean(ctl.active),
|
|
10481
|
+
pickMode: Boolean(ctl.pickMode),
|
|
10482
|
+
hover: ctl.hover,
|
|
10483
|
+
picked: ctl.picked,
|
|
10484
|
+
cancelledSeq: ctl.cancelledSeq,
|
|
10485
|
+
});
|
|
10486
|
+
|
|
10487
|
+
window[KEY] = ctl;
|
|
10488
|
+
}
|
|
10489
|
+
|
|
10490
|
+
if (!cfg.visible && !cfg.pickMode) {
|
|
10491
|
+
if (ctl.teardown) ctl.teardown();
|
|
10492
|
+
return { active: false, pickMode: false, hover: null, picked: null, cancelledSeq: 0 };
|
|
10493
|
+
}
|
|
10494
|
+
|
|
10495
|
+
if (!findGameCanvas()) {
|
|
10496
|
+
return null;
|
|
10497
|
+
}
|
|
10498
|
+
|
|
10499
|
+
if (!document.getElementById(DOM_ID)) {
|
|
10500
|
+
(document.body || document.documentElement).appendChild(ctl.root);
|
|
10501
|
+
}
|
|
10502
|
+
|
|
10503
|
+
ctl.active = true;
|
|
10504
|
+
ctl.pickMode = Boolean(cfg.pickMode);
|
|
10505
|
+
ctl.pickLabel = cfg.pickLabel;
|
|
10506
|
+
ctl.markers = cfg.markers;
|
|
10507
|
+
ctl.renderPins();
|
|
10508
|
+
ctl.applyMode();
|
|
10509
|
+
return ctl.getStatus();
|
|
10510
|
+
} catch {
|
|
10511
|
+
return null;
|
|
10512
|
+
}
|
|
10513
|
+
})()`;
|
|
10514
|
+
}
|
|
10515
|
+
function buildPollCoordOverlayScript() {
|
|
10516
|
+
return `(() => {
|
|
10517
|
+
try {
|
|
10518
|
+
const ctl = window.__kcaNextCoordOverlayV1;
|
|
10519
|
+
if (!ctl || typeof ctl.getStatus !== 'function') {
|
|
10520
|
+
return { active: false, pickMode: false, hover: null, picked: null, cancelledSeq: 0 };
|
|
10521
|
+
}
|
|
10522
|
+
return ctl.getStatus();
|
|
10523
|
+
} catch {
|
|
10524
|
+
return null;
|
|
10525
|
+
}
|
|
10526
|
+
})()`;
|
|
10527
|
+
}
|
|
10528
|
+
function buildRemoveCoordOverlayScript() {
|
|
10529
|
+
return `(() => {
|
|
10530
|
+
try {
|
|
10531
|
+
const ctl = window.__kcaNextCoordOverlayV1;
|
|
10532
|
+
if (ctl && typeof ctl.teardown === 'function') {
|
|
10533
|
+
const remain = (ctl.swallowingUntil || 0) - Date.now();
|
|
10534
|
+
if (remain > 0) {
|
|
10535
|
+
ctl.pickMode = false;
|
|
10536
|
+
if (ctl.banner) ctl.banner.style.display = 'none';
|
|
10537
|
+
if (ctl.hud) ctl.hud.style.display = 'none';
|
|
10538
|
+
if (ctl.pinsLayer) ctl.pinsLayer.style.display = 'none';
|
|
10539
|
+
if (ctl.crossX) ctl.crossX.style.display = 'none';
|
|
10540
|
+
if (ctl.crossY) ctl.crossY.style.display = 'none';
|
|
10541
|
+
if (ctl.cursorTag) ctl.cursorTag.style.display = 'none';
|
|
10542
|
+
setTimeout(() => {
|
|
10543
|
+
try {
|
|
10544
|
+
const cur = window.__kcaNextCoordOverlayV1;
|
|
10545
|
+
if (cur && !cur.pickMode && typeof cur.teardown === 'function') cur.teardown();
|
|
10546
|
+
} catch {}
|
|
10547
|
+
}, remain + 30);
|
|
10548
|
+
return true;
|
|
10549
|
+
}
|
|
10550
|
+
ctl.teardown();
|
|
10551
|
+
}
|
|
10552
|
+
const el = document.getElementById('__kca_next_coord_overlay__');
|
|
10553
|
+
if (el && el.parentNode) el.parentNode.removeChild(el);
|
|
10554
|
+
return true;
|
|
10555
|
+
} catch {
|
|
10556
|
+
return false;
|
|
10557
|
+
}
|
|
10558
|
+
})()`;
|
|
10559
|
+
}
|
|
10560
|
+
|
|
10057
10561
|
// src/core/start2-cache.ts
|
|
10058
10562
|
var START2_API_PATH = "/kcsapi/api_start2/getData";
|
|
10059
10563
|
var RESOURCE_GAIN_PATHS = /* @__PURE__ */ new Set([
|
|
@@ -10664,6 +11168,8 @@ var PoiStateAdapter = class {
|
|
|
10664
11168
|
availableMissions = /* @__PURE__ */ new Set();
|
|
10665
11169
|
practiceList = [];
|
|
10666
11170
|
cachedQuests = {};
|
|
11171
|
+
cachedActiveQuestTabId = -1;
|
|
11172
|
+
cachedActiveQuestTabList = void 0;
|
|
10667
11173
|
cachedAirBases = [];
|
|
10668
11174
|
cachedMaps = [];
|
|
10669
11175
|
cachedUnsetSlots = {};
|
|
@@ -10749,6 +11255,21 @@ var PoiStateAdapter = class {
|
|
|
10749
11255
|
case "/kcsapi/api_get_member/questlist":
|
|
10750
11256
|
this.ingestQuestList(body, event.postBody);
|
|
10751
11257
|
break;
|
|
11258
|
+
case "/kcsapi/api_req_quest/start": {
|
|
11259
|
+
const qid = Number(event.postBody?.api_quest_id);
|
|
11260
|
+
if (qid > 0) this.mutateQuestState(qid, 2);
|
|
11261
|
+
break;
|
|
11262
|
+
}
|
|
11263
|
+
case "/kcsapi/api_req_quest/stop": {
|
|
11264
|
+
const qid = Number(event.postBody?.api_quest_id);
|
|
11265
|
+
if (qid > 0) this.mutateQuestState(qid, 1);
|
|
11266
|
+
break;
|
|
11267
|
+
}
|
|
11268
|
+
case "/kcsapi/api_req_quest/clearitemget": {
|
|
11269
|
+
const qid = Number(event.postBody?.api_quest_id);
|
|
11270
|
+
if (qid > 0) this.removeQuest(qid);
|
|
11271
|
+
break;
|
|
11272
|
+
}
|
|
10752
11273
|
case "/kcsapi/api_req_combined_battle/goback_port":
|
|
10753
11274
|
break;
|
|
10754
11275
|
default:
|
|
@@ -10849,21 +11370,63 @@ var PoiStateAdapter = class {
|
|
|
10849
11370
|
ingestQuestList(body, postBody) {
|
|
10850
11371
|
const tabId = Number(postBody?.api_tab_id ?? 0);
|
|
10851
11372
|
const list = Array.isArray(body.api_list) ? body.api_list : [];
|
|
10852
|
-
const
|
|
11373
|
+
const parsedList = [];
|
|
10853
11374
|
for (const q of list) {
|
|
10854
11375
|
if (!q || typeof q !== "object" || !q.api_no) continue;
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
id,
|
|
11376
|
+
parsedList.push({
|
|
11377
|
+
id: Number(q.api_no),
|
|
10858
11378
|
category: Number(q.api_category) || 0,
|
|
10859
11379
|
type: Number(q.api_type) || 0,
|
|
10860
11380
|
title: String(q.api_title ?? ""),
|
|
10861
11381
|
state: Number(q.api_state) || 1,
|
|
10862
11382
|
progressFlag: Number(q.api_progress_flag) || 0
|
|
10863
|
-
};
|
|
11383
|
+
});
|
|
11384
|
+
}
|
|
11385
|
+
this.cachedActiveQuestTabId = tabId;
|
|
11386
|
+
this.cachedActiveQuestTabList = parsedList;
|
|
11387
|
+
const next = tabId === 0 ? {} : { ...this.cachedQuests };
|
|
11388
|
+
if (tabId === 9) {
|
|
11389
|
+
const activeIds = new Set(parsedList.map((q) => q.id));
|
|
11390
|
+
for (const [idStr, existing] of Object.entries(next)) {
|
|
11391
|
+
const id = Number(idStr);
|
|
11392
|
+
if ((existing.state === 2 || existing.state === 3) && !activeIds.has(id)) {
|
|
11393
|
+
next[id] = { ...existing, state: 1 };
|
|
11394
|
+
}
|
|
11395
|
+
}
|
|
11396
|
+
}
|
|
11397
|
+
for (const q of parsedList) {
|
|
11398
|
+
next[q.id] = q;
|
|
10864
11399
|
}
|
|
10865
11400
|
this.cachedQuests = next;
|
|
10866
11401
|
}
|
|
11402
|
+
mutateQuestState(questId, state) {
|
|
11403
|
+
const existing = this.cachedQuests[questId];
|
|
11404
|
+
if (existing) {
|
|
11405
|
+
this.cachedQuests = {
|
|
11406
|
+
...this.cachedQuests,
|
|
11407
|
+
[questId]: { ...existing, state }
|
|
11408
|
+
};
|
|
11409
|
+
}
|
|
11410
|
+
if (this.cachedActiveQuestTabList) {
|
|
11411
|
+
if (state === 1 && this.cachedActiveQuestTabId === 9) {
|
|
11412
|
+
this.cachedActiveQuestTabList = this.cachedActiveQuestTabList.filter((q) => q.id !== questId);
|
|
11413
|
+
} else {
|
|
11414
|
+
this.cachedActiveQuestTabList = this.cachedActiveQuestTabList.map(
|
|
11415
|
+
(q) => q.id === questId ? { ...q, state } : q
|
|
11416
|
+
);
|
|
11417
|
+
}
|
|
11418
|
+
}
|
|
11419
|
+
}
|
|
11420
|
+
removeQuest(questId) {
|
|
11421
|
+
if (this.cachedQuests[questId]) {
|
|
11422
|
+
const next = { ...this.cachedQuests };
|
|
11423
|
+
delete next[questId];
|
|
11424
|
+
this.cachedQuests = next;
|
|
11425
|
+
}
|
|
11426
|
+
if (this.cachedActiveQuestTabList) {
|
|
11427
|
+
this.cachedActiveQuestTabList = this.cachedActiveQuestTabList.filter((q) => q.id !== questId);
|
|
11428
|
+
}
|
|
11429
|
+
}
|
|
10867
11430
|
buildSnapshot() {
|
|
10868
11431
|
const raw = this.readPoiStore() ?? {};
|
|
10869
11432
|
const info = raw.info ?? {};
|
|
@@ -11000,18 +11563,21 @@ var PoiStateAdapter = class {
|
|
|
11000
11563
|
const availableMissions = this.availableMissions.size > 0 ? this.availableMissions : new Set(Object.keys(master.missions).map(Number));
|
|
11001
11564
|
const unsetSlots = Object.keys(this.cachedUnsetSlots).length > 0 ? this.cachedUnsetSlots : synthesizeUnsetSlots(ships, slotItems, storeAirBases);
|
|
11002
11565
|
const quests = { ...this.cachedQuests };
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
id
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
|
|
11014
|
-
|
|
11566
|
+
if (Object.keys(quests).length === 0) {
|
|
11567
|
+
const poiActive = info.quests?.activeQuests ?? {};
|
|
11568
|
+
for (const entry of Object.values(poiActive)) {
|
|
11569
|
+
const q = entry?.detail ?? entry;
|
|
11570
|
+
if (!q || !q.api_no) continue;
|
|
11571
|
+
const id = Number(q.api_no);
|
|
11572
|
+
quests[id] = {
|
|
11573
|
+
id,
|
|
11574
|
+
category: Number(q.api_category) || 0,
|
|
11575
|
+
type: Number(q.api_type) || 0,
|
|
11576
|
+
title: String(q.api_title ?? ""),
|
|
11577
|
+
state: Number(q.api_state) || 2,
|
|
11578
|
+
progressFlag: Number(q.api_progress_flag) || 0
|
|
11579
|
+
};
|
|
11580
|
+
}
|
|
11015
11581
|
}
|
|
11016
11582
|
const basic = info.basic ?? {};
|
|
11017
11583
|
const shipCount = Object.keys(ships).length;
|
|
@@ -11033,6 +11599,7 @@ var PoiStateAdapter = class {
|
|
|
11033
11599
|
maps,
|
|
11034
11600
|
availableMissions,
|
|
11035
11601
|
quests,
|
|
11602
|
+
activeQuestTabList: this.cachedActiveQuestTabList,
|
|
11036
11603
|
practiceList: this.practiceList,
|
|
11037
11604
|
master,
|
|
11038
11605
|
lastPortTimeMs: this.lastPortTimeMs
|
|
@@ -11700,11 +12267,7 @@ var PoiGameBridge = class {
|
|
|
11700
12267
|
canScroll: true
|
|
11701
12268
|
});
|
|
11702
12269
|
}
|
|
11703
|
-
|
|
11704
|
-
* Direct in-memory NativeImage bitmap ROI extraction.
|
|
11705
|
-
* Zero TCP round-trip, zero JSON integer-array serialization, zero PNG encode/decode.
|
|
11706
|
-
*/
|
|
11707
|
-
async captureRoi(rect) {
|
|
12270
|
+
async captureFullNativeImage() {
|
|
11708
12271
|
const lease = await this.renewBackgroundLease();
|
|
11709
12272
|
if (lease.wakeDelay > 0) await waitMs(lease.wakeDelay);
|
|
11710
12273
|
const state = this.readRootStore();
|
|
@@ -11735,6 +12298,14 @@ var PoiGameBridge = class {
|
|
|
11735
12298
|
if (!image) {
|
|
11736
12299
|
throw new Error("poi \u6E38\u620F\u753B\u9762\u622A\u56FE\u8FD4\u56DE\u7A7A\u56FE\u50CF");
|
|
11737
12300
|
}
|
|
12301
|
+
return { image, fullRect };
|
|
12302
|
+
}
|
|
12303
|
+
/**
|
|
12304
|
+
* Direct in-memory NativeImage bitmap ROI extraction.
|
|
12305
|
+
* Zero TCP round-trip, zero JSON integer-array serialization, zero PNG encode/decode.
|
|
12306
|
+
*/
|
|
12307
|
+
async captureRoi(rect) {
|
|
12308
|
+
const { image, fullRect } = await this.captureFullNativeImage();
|
|
11738
12309
|
const size = typeof image.getSize === "function" ? image.getSize() : { width: fullRect.width, height: fullRect.height };
|
|
11739
12310
|
const imgW = Math.max(1, Number(size.width) || fullRect.width);
|
|
11740
12311
|
const imgH = Math.max(1, Number(size.height) || fullRect.height);
|
|
@@ -11766,6 +12337,23 @@ var PoiGameBridge = class {
|
|
|
11766
12337
|
logicalHeight: rect.height
|
|
11767
12338
|
};
|
|
11768
12339
|
}
|
|
12340
|
+
async captureGameDataUrl() {
|
|
12341
|
+
try {
|
|
12342
|
+
const { image } = await this.captureFullNativeImage();
|
|
12343
|
+
if (typeof image.toJPEG === "function") {
|
|
12344
|
+
const buf = image.toJPEG(85);
|
|
12345
|
+
if (buf && typeof buf.toString === "function") {
|
|
12346
|
+
return `data:image/jpeg;base64,${buf.toString("base64")}`;
|
|
12347
|
+
}
|
|
12348
|
+
}
|
|
12349
|
+
if (typeof image.toDataURL === "function") {
|
|
12350
|
+
return String(image.toDataURL());
|
|
12351
|
+
}
|
|
12352
|
+
return null;
|
|
12353
|
+
} catch {
|
|
12354
|
+
return null;
|
|
12355
|
+
}
|
|
12356
|
+
}
|
|
11769
12357
|
syncStart2CacheConfig(config) {
|
|
11770
12358
|
this.start2Cache.updateConfig(config);
|
|
11771
12359
|
}
|
|
@@ -11859,6 +12447,16 @@ var PoiGameBridge = class {
|
|
|
11859
12447
|
async inspectShipPicker() {
|
|
11860
12448
|
return this.runInKcs2Frame(buildNativeShipInspectorSource());
|
|
11861
12449
|
}
|
|
12450
|
+
async syncCoordOverlay(config) {
|
|
12451
|
+
if (!config.visible && !config.pickMode) {
|
|
12452
|
+
await this.runInKcs2Frame(buildRemoveCoordOverlayScript(), 800);
|
|
12453
|
+
return { active: false, pickMode: false, hover: null, picked: null, cancelledSeq: 0 };
|
|
12454
|
+
}
|
|
12455
|
+
return this.runInKcs2Frame(buildCoordOverlayScript(config), 1200);
|
|
12456
|
+
}
|
|
12457
|
+
async pollCoordOverlay() {
|
|
12458
|
+
return this.runInKcs2Frame(buildPollCoordOverlayScript(), 600);
|
|
12459
|
+
}
|
|
11862
12460
|
onApiResponse(handler) {
|
|
11863
12461
|
this.apiHandlers.add(handler);
|
|
11864
12462
|
return () => {
|
|
@@ -11880,6 +12478,7 @@ var PoiGameBridge = class {
|
|
|
11880
12478
|
}
|
|
11881
12479
|
}
|
|
11882
12480
|
dispose() {
|
|
12481
|
+
void this.runInKcs2Frame(buildRemoveCoordOverlayScript(), 500).catch(() => void 0);
|
|
11883
12482
|
this.start2Cache.dispose();
|
|
11884
12483
|
this.releaseBackgroundLease();
|
|
11885
12484
|
if (typeof window !== "undefined") {
|
|
@@ -11898,7 +12497,7 @@ var PoiGameBridge = class {
|
|
|
11898
12497
|
};
|
|
11899
12498
|
|
|
11900
12499
|
// src/ui/App.tsx
|
|
11901
|
-
var
|
|
12500
|
+
var import_react11 = __toESM(require("react"));
|
|
11902
12501
|
|
|
11903
12502
|
// src/ui/components/CollapsibleCard.tsx
|
|
11904
12503
|
var import_react = __toESM(require("react"));
|
|
@@ -12510,6 +13109,129 @@ var KCA_NEXT_CSS = `
|
|
|
12510
13109
|
.kca-log-warning { color: #fcd34d; }
|
|
12511
13110
|
.kca-log-error { color: #fca5a5; }
|
|
12512
13111
|
.kca-log-debug { color: #64748b; }
|
|
13112
|
+
.kca-coord-studio {
|
|
13113
|
+
background: #101724;
|
|
13114
|
+
border: 1px solid #2b456b;
|
|
13115
|
+
border-radius: 6px;
|
|
13116
|
+
padding: 8px 10px;
|
|
13117
|
+
display: flex;
|
|
13118
|
+
flex-direction: column;
|
|
13119
|
+
gap: 7px;
|
|
13120
|
+
}
|
|
13121
|
+
.kca-coord-canvas {
|
|
13122
|
+
position: relative;
|
|
13123
|
+
width: 100%;
|
|
13124
|
+
aspect-ratio: 1200 / 720;
|
|
13125
|
+
background:
|
|
13126
|
+
linear-gradient(to right, rgba(56, 189, 248, 0.08) 1px, transparent 1px) 0 0 / 10% 10%,
|
|
13127
|
+
linear-gradient(to bottom, rgba(56, 189, 248, 0.08) 1px, transparent 1px) 0 0 / 10% 10%,
|
|
13128
|
+
#0b111c;
|
|
13129
|
+
border: 1px solid #35527d;
|
|
13130
|
+
border-radius: 5px;
|
|
13131
|
+
overflow: hidden;
|
|
13132
|
+
cursor: crosshair;
|
|
13133
|
+
user-select: none;
|
|
13134
|
+
}
|
|
13135
|
+
.kca-coord-canvas img {
|
|
13136
|
+
display: block;
|
|
13137
|
+
width: 100%;
|
|
13138
|
+
height: 100%;
|
|
13139
|
+
object-fit: fill;
|
|
13140
|
+
pointer-events: none;
|
|
13141
|
+
}
|
|
13142
|
+
.kca-coord-placeholder {
|
|
13143
|
+
position: absolute;
|
|
13144
|
+
inset: 0;
|
|
13145
|
+
display: flex;
|
|
13146
|
+
align-items: center;
|
|
13147
|
+
justify-content: center;
|
|
13148
|
+
padding: 16px;
|
|
13149
|
+
text-align: center;
|
|
13150
|
+
color: #7c93b5;
|
|
13151
|
+
font-size: 11px;
|
|
13152
|
+
pointer-events: none;
|
|
13153
|
+
}
|
|
13154
|
+
.kca-coord-cross-x {
|
|
13155
|
+
position: absolute;
|
|
13156
|
+
top: 0;
|
|
13157
|
+
bottom: 0;
|
|
13158
|
+
width: 1px;
|
|
13159
|
+
border-left: 1px dashed rgba(56, 189, 248, 0.8);
|
|
13160
|
+
pointer-events: none;
|
|
13161
|
+
}
|
|
13162
|
+
.kca-coord-cross-y {
|
|
13163
|
+
position: absolute;
|
|
13164
|
+
left: 0;
|
|
13165
|
+
right: 0;
|
|
13166
|
+
height: 1px;
|
|
13167
|
+
border-top: 1px dashed rgba(56, 189, 248, 0.8);
|
|
13168
|
+
pointer-events: none;
|
|
13169
|
+
}
|
|
13170
|
+
.kca-coord-hover-tag {
|
|
13171
|
+
position: absolute;
|
|
13172
|
+
padding: 2px 6px;
|
|
13173
|
+
border-radius: 4px;
|
|
13174
|
+
background: rgba(15, 23, 42, 0.92);
|
|
13175
|
+
border: 1px solid rgba(56, 189, 248, 0.85);
|
|
13176
|
+
color: #7dd3fc;
|
|
13177
|
+
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
|
|
13178
|
+
font-size: 11px;
|
|
13179
|
+
font-weight: 700;
|
|
13180
|
+
pointer-events: none;
|
|
13181
|
+
white-space: nowrap;
|
|
13182
|
+
}
|
|
13183
|
+
.kca-coord-pin {
|
|
13184
|
+
position: absolute;
|
|
13185
|
+
transform: translate(-50%, -50%);
|
|
13186
|
+
pointer-events: none;
|
|
13187
|
+
z-index: 2;
|
|
13188
|
+
}
|
|
13189
|
+
.kca-coord-pin-active {
|
|
13190
|
+
z-index: 4;
|
|
13191
|
+
}
|
|
13192
|
+
.kca-coord-pin-dot {
|
|
13193
|
+
display: block;
|
|
13194
|
+
width: 14px;
|
|
13195
|
+
height: 14px;
|
|
13196
|
+
border-radius: 999px;
|
|
13197
|
+
border: 2px solid #38bdf8;
|
|
13198
|
+
background: rgba(15, 23, 42, 0.6);
|
|
13199
|
+
box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.65);
|
|
13200
|
+
position: relative;
|
|
13201
|
+
}
|
|
13202
|
+
.kca-coord-pin-active .kca-coord-pin-dot {
|
|
13203
|
+
width: 18px;
|
|
13204
|
+
height: 18px;
|
|
13205
|
+
box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35), 0 0 8px rgba(56, 189, 248, 0.85);
|
|
13206
|
+
}
|
|
13207
|
+
.kca-coord-pin-core {
|
|
13208
|
+
position: absolute;
|
|
13209
|
+
left: 50%;
|
|
13210
|
+
top: 50%;
|
|
13211
|
+
width: 4px;
|
|
13212
|
+
height: 4px;
|
|
13213
|
+
border-radius: 999px;
|
|
13214
|
+
transform: translate(-50%, -50%);
|
|
13215
|
+
}
|
|
13216
|
+
.kca-coord-pin-label {
|
|
13217
|
+
position: absolute;
|
|
13218
|
+
left: 11px;
|
|
13219
|
+
top: -10px;
|
|
13220
|
+
padding: 1px 5px;
|
|
13221
|
+
border-radius: 4px;
|
|
13222
|
+
background: rgba(15, 23, 42, 0.9);
|
|
13223
|
+
border: 1px solid #38bdf8;
|
|
13224
|
+
color: #f8fafc;
|
|
13225
|
+
font-size: 10px;
|
|
13226
|
+
font-weight: 700;
|
|
13227
|
+
white-space: nowrap;
|
|
13228
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
|
|
13229
|
+
}
|
|
13230
|
+
.kca-pick-btn {
|
|
13231
|
+
padding: 2px 5px;
|
|
13232
|
+
font-size: 11px;
|
|
13233
|
+
line-height: 1.2;
|
|
13234
|
+
}
|
|
12513
13235
|
`;
|
|
12514
13236
|
|
|
12515
13237
|
// src/ui/tabs/DashboardTab.tsx
|
|
@@ -14787,10 +15509,328 @@ var SettingsLogsTab = ({
|
|
|
14787
15509
|
};
|
|
14788
15510
|
|
|
14789
15511
|
// src/ui/tabs/SortieTab.tsx
|
|
14790
|
-
var
|
|
15512
|
+
var import_react10 = __toESM(require("react"));
|
|
14791
15513
|
|
|
14792
|
-
// src/ui/components/
|
|
15514
|
+
// src/ui/components/CoordPickerPanel.tsx
|
|
14793
15515
|
var import_react8 = __toESM(require("react"));
|
|
15516
|
+
var CoordPickerPanel = ({
|
|
15517
|
+
coordinator,
|
|
15518
|
+
targets,
|
|
15519
|
+
selectedTargetId,
|
|
15520
|
+
onSelectTarget,
|
|
15521
|
+
onPickCoord,
|
|
15522
|
+
onClearCoord,
|
|
15523
|
+
screenshotOpen,
|
|
15524
|
+
onCloseScreenshot,
|
|
15525
|
+
gameHudVisible,
|
|
15526
|
+
onToggleGameHud,
|
|
15527
|
+
livePickTargetId,
|
|
15528
|
+
onStartLivePick,
|
|
15529
|
+
onCancelLivePick,
|
|
15530
|
+
extraMarkers = []
|
|
15531
|
+
}) => {
|
|
15532
|
+
const [screenshotUrl, setScreenshotUrl] = (0, import_react8.useState)(null);
|
|
15533
|
+
const [capturing, setCapturing] = (0, import_react8.useState)(false);
|
|
15534
|
+
const [captureError, setCaptureError] = (0, import_react8.useState)("");
|
|
15535
|
+
const [autoAdvance, setAutoAdvance] = (0, import_react8.useState)(true);
|
|
15536
|
+
const [canvasHover, setCanvasHover] = (0, import_react8.useState)(null);
|
|
15537
|
+
const [liveGameHover, setLiveGameHover] = (0, import_react8.useState)(null);
|
|
15538
|
+
const [lastFeedback, setLastFeedback] = (0, import_react8.useState)("");
|
|
15539
|
+
const canvasBoxRef = (0, import_react8.useRef)(null);
|
|
15540
|
+
const lastPickSeqRef = (0, import_react8.useRef)(0);
|
|
15541
|
+
const lastCancelSeqRef = (0, import_react8.useRef)(0);
|
|
15542
|
+
const livePickTargetRef = (0, import_react8.useRef)(livePickTargetId);
|
|
15543
|
+
livePickTargetRef.current = livePickTargetId;
|
|
15544
|
+
const selectedTarget = targets.find((t) => t.id === selectedTargetId) ?? targets[0];
|
|
15545
|
+
const livePickTarget = livePickTargetId ? targets.find((t) => t.id === livePickTargetId) ?? null : null;
|
|
15546
|
+
const allMarkers = [
|
|
15547
|
+
...targets.filter((t) => t.x > 0 || t.y > 0).map((t) => ({
|
|
15548
|
+
id: t.id,
|
|
15549
|
+
label: t.label,
|
|
15550
|
+
x: t.x,
|
|
15551
|
+
y: t.y,
|
|
15552
|
+
color: t.color
|
|
15553
|
+
})),
|
|
15554
|
+
...extraMarkers
|
|
15555
|
+
];
|
|
15556
|
+
const markersKey = JSON.stringify(allMarkers);
|
|
15557
|
+
const advanceTarget = (0, import_react8.useCallback)(
|
|
15558
|
+
(justPickedId) => {
|
|
15559
|
+
if (!autoAdvance) return;
|
|
15560
|
+
const idx = targets.findIndex((t) => t.id === justPickedId);
|
|
15561
|
+
if (idx < 0) return;
|
|
15562
|
+
const cur = targets[idx];
|
|
15563
|
+
const next = targets[idx + 1];
|
|
15564
|
+
if (next && next.group === cur.group) {
|
|
15565
|
+
onSelectTarget(next.id);
|
|
15566
|
+
}
|
|
15567
|
+
},
|
|
15568
|
+
[autoAdvance, targets, onSelectTarget]
|
|
15569
|
+
);
|
|
15570
|
+
const captureScreenshot = (0, import_react8.useCallback)(async () => {
|
|
15571
|
+
const fn = coordinator.bridge.captureGameDataUrl;
|
|
15572
|
+
if (typeof fn !== "function") {
|
|
15573
|
+
setCaptureError("\u5F53\u524D\u8FD0\u884C\u73AF\u5883\u4E0D\u652F\u6301\u76F4\u63A5\u622A\u53D6\u6E38\u620F\u753B\u9762\uFF08\u53EF\u5728 poi \u5185\u6B63\u5E38\u4F7F\u7528\uFF09");
|
|
15574
|
+
return;
|
|
15575
|
+
}
|
|
15576
|
+
setCapturing(true);
|
|
15577
|
+
setCaptureError("");
|
|
15578
|
+
try {
|
|
15579
|
+
const url = await fn.call(coordinator.bridge);
|
|
15580
|
+
if (url) {
|
|
15581
|
+
setScreenshotUrl(url);
|
|
15582
|
+
} else {
|
|
15583
|
+
setCaptureError("\u672A\u80FD\u622A\u53D6\u6E38\u620F\u753B\u9762\uFF0C\u8BF7\u786E\u8BA4\u8230\u5A18\u6E38\u620F\u5DF2\u52A0\u8F7D\u4E14\u7A97\u53E3\u672A\u6700\u5C0F\u5316\u3002");
|
|
15584
|
+
}
|
|
15585
|
+
} catch (err) {
|
|
15586
|
+
setCaptureError(`\u622A\u56FE\u5931\u8D25: ${err instanceof Error ? err.message : String(err)}`);
|
|
15587
|
+
} finally {
|
|
15588
|
+
setCapturing(false);
|
|
15589
|
+
}
|
|
15590
|
+
}, [coordinator.bridge]);
|
|
15591
|
+
(0, import_react8.useEffect)(() => {
|
|
15592
|
+
if (screenshotOpen) {
|
|
15593
|
+
void captureScreenshot();
|
|
15594
|
+
}
|
|
15595
|
+
}, [screenshotOpen, captureScreenshot]);
|
|
15596
|
+
(0, import_react8.useEffect)(() => {
|
|
15597
|
+
const syncFn = coordinator.bridge.syncCoordOverlay;
|
|
15598
|
+
if (typeof syncFn !== "function") return;
|
|
15599
|
+
const active = gameHudVisible || Boolean(livePickTargetId);
|
|
15600
|
+
let cancelled = false;
|
|
15601
|
+
void syncFn.call(coordinator.bridge, {
|
|
15602
|
+
visible: active,
|
|
15603
|
+
pickMode: Boolean(livePickTargetId),
|
|
15604
|
+
pickLabel: livePickTarget?.label ?? "",
|
|
15605
|
+
markers: allMarkers
|
|
15606
|
+
}).then((status) => {
|
|
15607
|
+
if (cancelled) return;
|
|
15608
|
+
if (!status) {
|
|
15609
|
+
if (livePickTargetId) {
|
|
15610
|
+
setCaptureError("\u672A\u80FD\u8FDE\u63A5\u5230\u6E38\u620F\u753B\u9762\uFF08\u8BF7\u786E\u8BA4\u6E38\u620F\u5DF2\u8FDB\u5165\u753B\u5E03\uFF09\uFF0C\u5DF2\u53EF\u6539\u7528\u300C\u{1F4F8} \u622A\u56FE\u53EF\u89C6\u5316\u9009\u70B9\u300D\u3002");
|
|
15611
|
+
onCancelLivePick();
|
|
15612
|
+
}
|
|
15613
|
+
return;
|
|
15614
|
+
}
|
|
15615
|
+
if (status.picked && status.picked.seq > lastPickSeqRef.current) {
|
|
15616
|
+
lastPickSeqRef.current = status.picked.seq;
|
|
15617
|
+
}
|
|
15618
|
+
if (status.cancelledSeq > lastCancelSeqRef.current) {
|
|
15619
|
+
lastCancelSeqRef.current = status.cancelledSeq;
|
|
15620
|
+
}
|
|
15621
|
+
setLiveGameHover(status.hover);
|
|
15622
|
+
}).catch(() => void 0);
|
|
15623
|
+
return () => {
|
|
15624
|
+
cancelled = true;
|
|
15625
|
+
};
|
|
15626
|
+
}, [coordinator.bridge, gameHudVisible, livePickTargetId, livePickTarget?.label, markersKey]);
|
|
15627
|
+
(0, import_react8.useEffect)(() => {
|
|
15628
|
+
const pollFn = coordinator.bridge.pollCoordOverlay;
|
|
15629
|
+
if (typeof pollFn !== "function") return;
|
|
15630
|
+
const active = gameHudVisible || Boolean(livePickTargetId);
|
|
15631
|
+
if (!active) {
|
|
15632
|
+
setLiveGameHover(null);
|
|
15633
|
+
return;
|
|
15634
|
+
}
|
|
15635
|
+
let alive = true;
|
|
15636
|
+
const intervalMs = livePickTargetId ? 150 : 260;
|
|
15637
|
+
const timer = setInterval(() => {
|
|
15638
|
+
void pollFn.call(coordinator.bridge).then((status) => {
|
|
15639
|
+
if (!alive || !status) return;
|
|
15640
|
+
setLiveGameHover(status.hover);
|
|
15641
|
+
const pendingId = livePickTargetRef.current;
|
|
15642
|
+
if (pendingId && status.picked && status.picked.seq > lastPickSeqRef.current) {
|
|
15643
|
+
lastPickSeqRef.current = status.picked.seq;
|
|
15644
|
+
const { x, y } = status.picked;
|
|
15645
|
+
const lbl = targets.find((t) => t.id === pendingId)?.label ?? pendingId;
|
|
15646
|
+
onPickCoord(pendingId, x, y);
|
|
15647
|
+
setLastFeedback(`\u5DF2\u4ECE\u6E38\u620F\u753B\u9762\u586B\u5165 [${lbl}] \u2192 (${x}, ${y})`);
|
|
15648
|
+
onCancelLivePick();
|
|
15649
|
+
advanceTarget(pendingId);
|
|
15650
|
+
} else if (pendingId && status.cancelledSeq > lastCancelSeqRef.current) {
|
|
15651
|
+
lastCancelSeqRef.current = status.cancelledSeq;
|
|
15652
|
+
setLastFeedback("\u5DF2\u53D6\u6D88\u6E38\u620F\u753B\u9762\u53D6\u70B9");
|
|
15653
|
+
onCancelLivePick();
|
|
15654
|
+
}
|
|
15655
|
+
}).catch(() => void 0);
|
|
15656
|
+
}, intervalMs);
|
|
15657
|
+
return () => {
|
|
15658
|
+
alive = false;
|
|
15659
|
+
clearInterval(timer);
|
|
15660
|
+
};
|
|
15661
|
+
}, [
|
|
15662
|
+
coordinator.bridge,
|
|
15663
|
+
gameHudVisible,
|
|
15664
|
+
livePickTargetId,
|
|
15665
|
+
targets,
|
|
15666
|
+
onPickCoord,
|
|
15667
|
+
onCancelLivePick,
|
|
15668
|
+
advanceTarget
|
|
15669
|
+
]);
|
|
15670
|
+
(0, import_react8.useEffect)(() => {
|
|
15671
|
+
return () => {
|
|
15672
|
+
const syncFn = coordinator.bridge.syncCoordOverlay;
|
|
15673
|
+
if (typeof syncFn === "function") {
|
|
15674
|
+
void syncFn.call(coordinator.bridge, { visible: false, pickMode: false, markers: [] }).catch(() => void 0);
|
|
15675
|
+
}
|
|
15676
|
+
};
|
|
15677
|
+
}, [coordinator.bridge]);
|
|
15678
|
+
const handleCanvasMouseMove = (e) => {
|
|
15679
|
+
const box = canvasBoxRef.current;
|
|
15680
|
+
if (!box) return;
|
|
15681
|
+
const pt = clientToCanonicalCoord(e.clientX, e.clientY, box.getBoundingClientRect());
|
|
15682
|
+
setCanvasHover(pt);
|
|
15683
|
+
};
|
|
15684
|
+
const handleCanvasClick = (e) => {
|
|
15685
|
+
const box = canvasBoxRef.current;
|
|
15686
|
+
if (!box || !selectedTarget) return;
|
|
15687
|
+
const pt = clientToCanonicalCoord(e.clientX, e.clientY, box.getBoundingClientRect());
|
|
15688
|
+
if (!pt) return;
|
|
15689
|
+
onPickCoord(selectedTarget.id, pt.x, pt.y);
|
|
15690
|
+
setLastFeedback(`\u5DF2\u5728\u622A\u56FE\u586B\u5165 [${selectedTarget.label}] \u2192 (${pt.x}, ${pt.y})`);
|
|
15691
|
+
advanceTarget(selectedTarget.id);
|
|
15692
|
+
};
|
|
15693
|
+
if (!screenshotOpen && !gameHudVisible && !livePickTargetId && !lastFeedback) {
|
|
15694
|
+
return null;
|
|
15695
|
+
}
|
|
15696
|
+
return /* @__PURE__ */ import_react8.default.createElement("div", { className: "kca-coord-studio" }, /* @__PURE__ */ import_react8.default.createElement("div", { className: "kca-row", style: { justifyContent: "space-between" } }, /* @__PURE__ */ import_react8.default.createElement("div", { className: "kca-row", style: { gap: 6 } }, /* @__PURE__ */ import_react8.default.createElement("strong", { style: { color: "#7dd3fc" } }, "\u{1F3AF} \u53EF\u89C6\u5316\u5750\u6807\u62FE\u53D6\u5668 (1200\xD7720)"), liveGameHover && /* @__PURE__ */ import_react8.default.createElement("span", { className: "kca-badge kca-badge-run" }, "\u6E38\u620F\u5B9E\u65F6\u9F20\u6807: X ", liveGameHover.x, ", Y ", liveGameHover.y), livePickTarget && /* @__PURE__ */ import_react8.default.createElement("span", { className: "kca-badge kca-badge-warn" }, "\u53D6\u70B9\u4E2D [", livePickTarget.label, "] \u2014 \u8BF7\u76F4\u63A5\u70B9\u51FB\u6E38\u620F\u753B\u9762\uFF08\u53F3\u952E/Esc \u53D6\u6D88\uFF09"), !livePickTarget && lastFeedback && /* @__PURE__ */ import_react8.default.createElement("span", { className: "kca-badge kca-badge-ok" }, lastFeedback)), /* @__PURE__ */ import_react8.default.createElement("div", { className: "kca-row", style: { gap: 5 } }, livePickTarget && /* @__PURE__ */ import_react8.default.createElement("button", { className: "kca-btn kca-btn-sm kca-btn-danger", onClick: onCancelLivePick }, "\u53D6\u6D88\u53D6\u70B9"), /* @__PURE__ */ import_react8.default.createElement(
|
|
15697
|
+
"button",
|
|
15698
|
+
{
|
|
15699
|
+
className: `kca-btn kca-btn-sm ${gameHudVisible ? "kca-btn-primary" : ""}`,
|
|
15700
|
+
onClick: () => onToggleGameHud(!gameHudVisible),
|
|
15701
|
+
title: "\u5728\u8230\u5A18\u6E38\u620F\u753B\u9762\u4E0A\u5B9E\u65F6\u663E\u793A\u9F20\u6807\u5750\u6807\u4E0E\u5168\u90E8\u5DF2\u914D\u7F6E\u7684\u5206\u6B67/\u9646\u822A/\u8DEF\u5F84\u6807\u8BB0\uFF08\u9F20\u6807\u7A7F\u900F\uFF0C\u4E0D\u5F71\u54CD\u6E38\u73A9\uFF09"
|
|
15702
|
+
},
|
|
15703
|
+
gameHudVisible ? "\u{1F441}\uFE0F \u5173\u95ED\u6E38\u620F\u5750\u6807\u663E\u793A" : "\u{1F441}\uFE0F \u6E38\u620F\u53E0\u52A0\u5B9E\u65F6\u5750\u6807"
|
|
15704
|
+
), screenshotOpen && /* @__PURE__ */ import_react8.default.createElement("button", { className: "kca-btn kca-btn-sm", onClick: onCloseScreenshot }, "\u6536\u8D77\u622A\u56FE\u9762\u677F"))), screenshotOpen && /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, /* @__PURE__ */ import_react8.default.createElement("div", { className: "kca-row", style: { justifyContent: "space-between", gap: 6 } }, /* @__PURE__ */ import_react8.default.createElement("div", { className: "kca-chip-list" }, /* @__PURE__ */ import_react8.default.createElement("span", { className: "kca-muted" }, "\u70B9\u51FB\u76EE\u6807\uFF1A"), targets.map((t) => {
|
|
15705
|
+
const active = selectedTarget?.id === t.id;
|
|
15706
|
+
const configured = t.x > 0 || t.y > 0;
|
|
15707
|
+
return /* @__PURE__ */ import_react8.default.createElement(
|
|
15708
|
+
"button",
|
|
15709
|
+
{
|
|
15710
|
+
key: t.id,
|
|
15711
|
+
className: `kca-btn kca-btn-sm ${active ? "kca-btn-primary" : ""}`,
|
|
15712
|
+
style: !active && configured ? { borderColor: t.color, color: "#e2e8f0" } : void 0,
|
|
15713
|
+
onClick: () => onSelectTarget(t.id)
|
|
15714
|
+
},
|
|
15715
|
+
t.label,
|
|
15716
|
+
configured ? ` (${t.x},${t.y})` : ""
|
|
15717
|
+
);
|
|
15718
|
+
}))), /* @__PURE__ */ import_react8.default.createElement("div", { className: "kca-row", style: { justifyContent: "space-between" } }, /* @__PURE__ */ import_react8.default.createElement("div", { className: "kca-row", style: { gap: 6 } }, /* @__PURE__ */ import_react8.default.createElement(
|
|
15719
|
+
"button",
|
|
15720
|
+
{
|
|
15721
|
+
className: "kca-btn kca-btn-sm kca-btn-primary",
|
|
15722
|
+
onClick: () => void captureScreenshot(),
|
|
15723
|
+
disabled: capturing
|
|
15724
|
+
},
|
|
15725
|
+
capturing ? "\u622A\u56FE\u4E2D..." : "\u{1F504} \u5237\u65B0\u6E38\u620F\u622A\u56FE"
|
|
15726
|
+
), selectedTarget && /* @__PURE__ */ import_react8.default.createElement(
|
|
15727
|
+
"button",
|
|
15728
|
+
{
|
|
15729
|
+
className: "kca-btn kca-btn-sm",
|
|
15730
|
+
onClick: () => onStartLivePick(selectedTarget.id),
|
|
15731
|
+
title: "\u5207\u6362\u5230\u76F4\u63A5\u5728\u6E38\u620F\u753B\u9762\u4E0A\u70B9\u51FB\u53D6\u70B9\uFF08\u4E0D\u8BEF\u89E6\u6E38\u620F\uFF09"
|
|
15732
|
+
},
|
|
15733
|
+
"\u{1F3AF} \u76F4\u63A5\u5728\u6E38\u620F\u753B\u9762\u70B9\u9009 [",
|
|
15734
|
+
selectedTarget.label,
|
|
15735
|
+
"]"
|
|
15736
|
+
), selectedTarget && onClearCoord && (selectedTarget.x > 0 || selectedTarget.y > 0) && /* @__PURE__ */ import_react8.default.createElement(
|
|
15737
|
+
"button",
|
|
15738
|
+
{
|
|
15739
|
+
className: "kca-btn kca-btn-sm",
|
|
15740
|
+
onClick: () => {
|
|
15741
|
+
onClearCoord(selectedTarget.id);
|
|
15742
|
+
setLastFeedback(`\u5DF2\u6E05\u7A7A [${selectedTarget.label}] \u5750\u6807`);
|
|
15743
|
+
}
|
|
15744
|
+
},
|
|
15745
|
+
"\u6E05\u7A7A\u5F53\u524D\u70B9\u4F4D"
|
|
15746
|
+
), /* @__PURE__ */ import_react8.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react8.default.createElement(
|
|
15747
|
+
"input",
|
|
15748
|
+
{
|
|
15749
|
+
type: "checkbox",
|
|
15750
|
+
checked: autoAdvance,
|
|
15751
|
+
onChange: (e) => setAutoAdvance(e.target.checked)
|
|
15752
|
+
}
|
|
15753
|
+
), "\u9009\u5B8C\u81EA\u52A8\u8DF3\u4E0B\u4E00\u69FD\u4F4D")), /* @__PURE__ */ import_react8.default.createElement("span", { className: "kca-muted" }, canvasHover ? `\u622A\u56FE\u6307\u9488\uFF1AX ${canvasHover.x}, Y ${canvasHover.y}\uFF08\u5DE6\u952E\u70B9\u51FB\u5373\u586B\u5165\uFF09` : "\u5C06\u9F20\u6807\u79FB\u81F3\u4E0B\u65B9\u753B\u9762\u9884\u89C8\u5750\u6807\uFF0C\u5DE6\u952E\u76F4\u63A5\u586B\u5165")), captureError && /* @__PURE__ */ import_react8.default.createElement("div", { className: "kca-import-banner kca-import-banner-err" }, captureError), /* @__PURE__ */ import_react8.default.createElement(
|
|
15754
|
+
"div",
|
|
15755
|
+
{
|
|
15756
|
+
ref: canvasBoxRef,
|
|
15757
|
+
className: "kca-coord-canvas",
|
|
15758
|
+
onMouseMove: handleCanvasMouseMove,
|
|
15759
|
+
onMouseLeave: () => setCanvasHover(null),
|
|
15760
|
+
onClick: handleCanvasClick
|
|
15761
|
+
},
|
|
15762
|
+
screenshotUrl ? /* @__PURE__ */ import_react8.default.createElement("img", { src: screenshotUrl, alt: "KanColle Game Frame", draggable: false }) : /* @__PURE__ */ import_react8.default.createElement("div", { className: "kca-coord-placeholder" }, /* @__PURE__ */ import_react8.default.createElement("span", null, "1200 \xD7 720 \u5750\u6807\u7F51\u683C\u9884\u89C8\uFF08\u70B9\u51FB\u300C\u{1F504} \u5237\u65B0\u6E38\u620F\u622A\u56FE\u300D\u8F7D\u5165\u5F53\u524D\u6D77\u57DF\u753B\u9762\uFF0C\u6216\u76F4\u63A5\u70B9\u51FB\u6B64\u5904\u843D\u70B9\uFF09")),
|
|
15763
|
+
canvasHover && /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, /* @__PURE__ */ import_react8.default.createElement(
|
|
15764
|
+
"div",
|
|
15765
|
+
{
|
|
15766
|
+
className: "kca-coord-cross-x",
|
|
15767
|
+
style: { left: `${canvasHover.x / CANVAS_WIDTH * 100}%` }
|
|
15768
|
+
}
|
|
15769
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
15770
|
+
"div",
|
|
15771
|
+
{
|
|
15772
|
+
className: "kca-coord-cross-y",
|
|
15773
|
+
style: { top: `${canvasHover.y / CANVAS_HEIGHT * 100}%` }
|
|
15774
|
+
}
|
|
15775
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
15776
|
+
"div",
|
|
15777
|
+
{
|
|
15778
|
+
className: "kca-coord-hover-tag",
|
|
15779
|
+
style: {
|
|
15780
|
+
left: `${Math.min(82, canvasHover.x / CANVAS_WIDTH * 100 + 1.2)}%`,
|
|
15781
|
+
top: `${Math.max(3, canvasHover.y / CANVAS_HEIGHT * 100 - 5)}%`
|
|
15782
|
+
}
|
|
15783
|
+
},
|
|
15784
|
+
canvasHover.x,
|
|
15785
|
+
", ",
|
|
15786
|
+
canvasHover.y
|
|
15787
|
+
)),
|
|
15788
|
+
allMarkers.map((m) => {
|
|
15789
|
+
const isSelected = selectedTarget?.id === m.id;
|
|
15790
|
+
return /* @__PURE__ */ import_react8.default.createElement(
|
|
15791
|
+
"div",
|
|
15792
|
+
{
|
|
15793
|
+
key: m.id,
|
|
15794
|
+
className: `kca-coord-pin ${isSelected ? "kca-coord-pin-active" : ""}`,
|
|
15795
|
+
style: {
|
|
15796
|
+
left: `${m.x / CANVAS_WIDTH * 100}%`,
|
|
15797
|
+
top: `${m.y / CANVAS_HEIGHT * 100}%`
|
|
15798
|
+
}
|
|
15799
|
+
},
|
|
15800
|
+
/* @__PURE__ */ import_react8.default.createElement(
|
|
15801
|
+
"span",
|
|
15802
|
+
{
|
|
15803
|
+
className: "kca-coord-pin-dot",
|
|
15804
|
+
style: { borderColor: m.color || "#38bdf8" }
|
|
15805
|
+
},
|
|
15806
|
+
/* @__PURE__ */ import_react8.default.createElement(
|
|
15807
|
+
"span",
|
|
15808
|
+
{
|
|
15809
|
+
className: "kca-coord-pin-core",
|
|
15810
|
+
style: { background: m.color || "#38bdf8" }
|
|
15811
|
+
}
|
|
15812
|
+
)
|
|
15813
|
+
),
|
|
15814
|
+
/* @__PURE__ */ import_react8.default.createElement(
|
|
15815
|
+
"span",
|
|
15816
|
+
{
|
|
15817
|
+
className: "kca-coord-pin-label",
|
|
15818
|
+
style: { borderColor: m.color || "#38bdf8" }
|
|
15819
|
+
},
|
|
15820
|
+
m.label,
|
|
15821
|
+
" (",
|
|
15822
|
+
m.x,
|
|
15823
|
+
",",
|
|
15824
|
+
m.y,
|
|
15825
|
+
")"
|
|
15826
|
+
)
|
|
15827
|
+
);
|
|
15828
|
+
})
|
|
15829
|
+
)));
|
|
15830
|
+
};
|
|
15831
|
+
|
|
15832
|
+
// src/ui/components/ShipRotationPanel.tsx
|
|
15833
|
+
var import_react9 = __toESM(require("react"));
|
|
14794
15834
|
var DAMAGE_OPTIONS = [
|
|
14795
15835
|
{ value: "scratch", label: "\u64E6\u4F24\u5373\u6362" },
|
|
14796
15836
|
{ value: "light", label: "\u5C0F\u7834\u5373\u6362" },
|
|
@@ -14807,22 +15847,22 @@ function condClass2(cond) {
|
|
|
14807
15847
|
var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
14808
15848
|
const isCombined = profile.combineType !== 0 || gameState.combinedType > 0;
|
|
14809
15849
|
const hasEscortCandidates = profile.candidateShips.slice(6, 12).some((arr) => arr && arr.length > 0);
|
|
14810
|
-
const [showEscortSlots, setShowEscortSlots] = (0,
|
|
14811
|
-
const [openPickerSlot, setOpenPickerSlot] = (0,
|
|
14812
|
-
const [searchText, setSearchText] = (0,
|
|
14813
|
-
const [stypeFilter, setStypeFilter] = (0,
|
|
14814
|
-
const [lockedOnly, setLockedOnly] = (0,
|
|
14815
|
-
const [openTrigger, setOpenTrigger] = (0,
|
|
15850
|
+
const [showEscortSlots, setShowEscortSlots] = (0, import_react9.useState)(isCombined || hasEscortCandidates);
|
|
15851
|
+
const [openPickerSlot, setOpenPickerSlot] = (0, import_react9.useState)(null);
|
|
15852
|
+
const [searchText, setSearchText] = (0, import_react9.useState)("");
|
|
15853
|
+
const [stypeFilter, setStypeFilter] = (0, import_react9.useState)("all");
|
|
15854
|
+
const [lockedOnly, setLockedOnly] = (0, import_react9.useState)(false);
|
|
15855
|
+
const [openTrigger, setOpenTrigger] = (0, import_react9.useState)(0);
|
|
14816
15856
|
const mainFleet = gameState.fleets[profile.fleet];
|
|
14817
15857
|
const escortFleet = gameState.fleets[2];
|
|
14818
15858
|
const slotCount = showEscortSlots || isCombined ? 12 : 6;
|
|
14819
|
-
const allShips = (0,
|
|
15859
|
+
const allShips = (0, import_react9.useMemo)(() => {
|
|
14820
15860
|
return Object.values(gameState.ships).sort((a, b) => {
|
|
14821
15861
|
if (b.level !== a.level) return b.level - a.level;
|
|
14822
15862
|
return a.id - b.id;
|
|
14823
15863
|
});
|
|
14824
15864
|
}, [gameState.ships]);
|
|
14825
|
-
const stypeOptions = (0,
|
|
15865
|
+
const stypeOptions = (0, import_react9.useMemo)(() => {
|
|
14826
15866
|
const map = /* @__PURE__ */ new Map();
|
|
14827
15867
|
for (const s of allShips) {
|
|
14828
15868
|
if (!map.has(s.stype)) {
|
|
@@ -14831,7 +15871,7 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
14831
15871
|
}
|
|
14832
15872
|
return Array.from(map.entries()).sort((a, b) => a[0] - b[0]);
|
|
14833
15873
|
}, [allShips, gameState.master.stypes]);
|
|
14834
|
-
const filteredPickerShips = (0,
|
|
15874
|
+
const filteredPickerShips = (0, import_react9.useMemo)(() => {
|
|
14835
15875
|
const q = searchText.trim().toLowerCase();
|
|
14836
15876
|
return allShips.filter((s) => {
|
|
14837
15877
|
if (lockedOnly && !s.locked) return false;
|
|
@@ -14892,11 +15932,11 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
14892
15932
|
return sid ? gameState.ships[sid] : void 0;
|
|
14893
15933
|
};
|
|
14894
15934
|
const totalConfiguredCandidates = profile.candidateShips.slice(0, 12).reduce((acc, list) => acc + (list?.length ?? 0), 0);
|
|
14895
|
-
const allowedFleetIds = (0,
|
|
15935
|
+
const allowedFleetIds = (0, import_react9.useMemo)(
|
|
14896
15936
|
() => new Set(isCombined && profile.fleet === 1 ? [1, 2] : [profile.fleet]),
|
|
14897
15937
|
[isCombined, profile.fleet]
|
|
14898
15938
|
);
|
|
14899
|
-
const liveRotationPlan = (0,
|
|
15939
|
+
const liveRotationPlan = (0, import_react9.useMemo)(() => {
|
|
14900
15940
|
if (!gameState.loaded) return null;
|
|
14901
15941
|
return planSortieShipRotation(gameState, profile, isCombined && profile.fleet === 1);
|
|
14902
15942
|
}, [gameState, profile, isCombined]);
|
|
@@ -14905,16 +15945,16 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
14905
15945
|
p.condThresholds = Array.from({ length: 12 }, (_, idx) => idx < slotCount ? val : p.condThresholds[idx] ?? 0);
|
|
14906
15946
|
});
|
|
14907
15947
|
};
|
|
14908
|
-
const rotationBadge = profile.autoChangeShip && liveRotationPlan ? liveRotationPlan.status === "ok_no_change" ? /* @__PURE__ */
|
|
14909
|
-
return /* @__PURE__ */
|
|
15948
|
+
const rotationBadge = profile.autoChangeShip && liveRotationPlan ? liveRotationPlan.status === "ok_no_change" ? /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-badge kca-badge-ok" }, "\u2713 \u5C31\u7EEA") : liveRotationPlan.status === "rotate" ? /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-badge kca-badge-run" }, "\u21BB \u9700\u8F6E\u6362") : liveRotationPlan.status === "wait_cond" ? /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-badge kca-badge-warn" }, "\u23F3 \u7B49\u75B2\u52B3") : /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-badge kca-badge-err" }, "\u26A0 \u963B\u585E") : !profile.autoChangeShip ? /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-badge" }, "\u672A\u542F\u7528") : null;
|
|
15949
|
+
return /* @__PURE__ */ import_react9.default.createElement(
|
|
14910
15950
|
CollapsibleCard,
|
|
14911
15951
|
{
|
|
14912
15952
|
storageKey: "sortie.rotation",
|
|
14913
15953
|
title: "\u81EA\u52A8\u8F6E\u6362\u914D\u7F6E (ChangeShip)",
|
|
14914
15954
|
defaultOpen: profile.autoChangeShip,
|
|
14915
15955
|
forceOpenTrigger: openTrigger,
|
|
14916
|
-
summary: /* @__PURE__ */
|
|
14917
|
-
headerRight: /* @__PURE__ */
|
|
15956
|
+
summary: /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, /* @__PURE__ */ import_react9.default.createElement("span", null, "\u5DF2\u914D ", totalConfiguredCandidates, " \u8239\u6B21"), rotationBadge),
|
|
15957
|
+
headerRight: /* @__PURE__ */ import_react9.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react9.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react9.default.createElement(
|
|
14918
15958
|
"input",
|
|
14919
15959
|
{
|
|
14920
15960
|
type: "checkbox",
|
|
@@ -14927,7 +15967,7 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
14927
15967
|
if (checked) setOpenTrigger((n) => n + 1);
|
|
14928
15968
|
}
|
|
14929
15969
|
}
|
|
14930
|
-
), /* @__PURE__ */
|
|
15970
|
+
), /* @__PURE__ */ import_react9.default.createElement("strong", null, "\u542F\u7528\u81EA\u52A8\u8F6E\u6362")), /* @__PURE__ */ import_react9.default.createElement(
|
|
14931
15971
|
"button",
|
|
14932
15972
|
{
|
|
14933
15973
|
className: "kca-btn kca-btn-sm kca-btn-primary",
|
|
@@ -14937,7 +15977,7 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
14937
15977
|
"+ \u8BFB\u5165\u5F53\u524D\u8230\u961F"
|
|
14938
15978
|
))
|
|
14939
15979
|
},
|
|
14940
|
-
/* @__PURE__ */
|
|
15980
|
+
/* @__PURE__ */ import_react9.default.createElement("div", { className: "kca-row", style: { justifyContent: "space-between" } }, /* @__PURE__ */ import_react9.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react9.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react9.default.createElement(
|
|
14941
15981
|
"input",
|
|
14942
15982
|
{
|
|
14943
15983
|
type: "checkbox",
|
|
@@ -14946,7 +15986,7 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
14946
15986
|
p.autoFlagshipRotation = e.target.checked;
|
|
14947
15987
|
})
|
|
14948
15988
|
}
|
|
14949
|
-
), "\u667A\u80FD\u65D7\u8230\u8F6E\u6362 (\u50DA\u8230\u4E0E\u65D7\u8230\u4E92\u6362\u5237\u7ECF\u9A8C/\u63A7\u75B2\u52B3)")), /* @__PURE__ */
|
|
15989
|
+
), "\u667A\u80FD\u65D7\u8230\u8F6E\u6362 (\u50DA\u8230\u4E0E\u65D7\u8230\u4E92\u6362\u5237\u7ECF\u9A8C/\u63A7\u75B2\u52B3)")), /* @__PURE__ */ import_react9.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react9.default.createElement(
|
|
14950
15990
|
"button",
|
|
14951
15991
|
{
|
|
14952
15992
|
className: "kca-btn kca-btn-sm",
|
|
@@ -14954,7 +15994,7 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
14954
15994
|
title: "\u5C06\u5F53\u524D\u663E\u793A\u69FD\u4F4D\u7684\u6700\u4F4E\u58EB\u6C14\u5168\u90E8\u8BBE\u4E3A 0\uFF08\u4E0D\u9650\u75B2\u52B3\uFF09"
|
|
14955
15995
|
},
|
|
14956
15996
|
"\u58EB\u6C14\u5168\u8BBE 0"
|
|
14957
|
-
), /* @__PURE__ */
|
|
15997
|
+
), /* @__PURE__ */ import_react9.default.createElement(
|
|
14958
15998
|
"button",
|
|
14959
15999
|
{
|
|
14960
16000
|
className: "kca-btn kca-btn-sm",
|
|
@@ -14962,7 +16002,7 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
14962
16002
|
title: "\u5C06\u5F53\u524D\u663E\u793A\u69FD\u4F4D\u7684\u6700\u4F4E\u58EB\u6C14\u5168\u90E8\u8BBE\u4E3A 40"
|
|
14963
16003
|
},
|
|
14964
16004
|
"\u58EB\u6C14\u5168\u8BBE 40"
|
|
14965
|
-
), /* @__PURE__ */
|
|
16005
|
+
), /* @__PURE__ */ import_react9.default.createElement("button", { className: "kca-btn kca-btn-sm", onClick: handleClearAllCandidates }, "\u6E05\u7A7A\u5168\u90E8\u5019\u9009"), /* @__PURE__ */ import_react9.default.createElement(
|
|
14966
16006
|
"button",
|
|
14967
16007
|
{
|
|
14968
16008
|
className: "kca-btn kca-btn-sm",
|
|
@@ -14970,8 +16010,8 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
14970
16010
|
},
|
|
14971
16011
|
slotCount === 12 ? "\u6536\u8D77\u4E8C\u961F (7~12)" : "\u5C55\u5F00\u4E8C\u961F (7~12)"
|
|
14972
16012
|
))),
|
|
14973
|
-
/* @__PURE__ */
|
|
14974
|
-
profile.autoChangeShip && liveRotationPlan && /* @__PURE__ */
|
|
16013
|
+
/* @__PURE__ */ import_react9.default.createElement("div", { className: "kca-muted" }, "Bellman-Ford \u65E0\u91CD\u590D\u6700\u4F18\u5339\u914D \xB7 \u5019\u9009\u6C60\u6392\u5E8F\u8D8A\u9760\u524D\u4F18\u5148\u7EA7\u8D8A\u9AD8\uFF1B\u7559\u7A7A\u69FD\u4F4D\u4EE3\u8868\u7A7A\u4F4D\uFF08\u51FA\u51FB\u524D\u81EA\u52A8\u79FB\u9664\u591A\u4F59\u4F34\u968F\u8230\uFF09"),
|
|
16014
|
+
profile.autoChangeShip && liveRotationPlan && /* @__PURE__ */ import_react9.default.createElement(
|
|
14975
16015
|
"div",
|
|
14976
16016
|
{
|
|
14977
16017
|
className: "kca-row",
|
|
@@ -14983,20 +16023,20 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
14983
16023
|
fontSize: 12
|
|
14984
16024
|
}
|
|
14985
16025
|
},
|
|
14986
|
-
/* @__PURE__ */
|
|
14987
|
-
liveRotationPlan.status === "ok_no_change" && /* @__PURE__ */
|
|
14988
|
-
liveRotationPlan.status === "rotate" && /* @__PURE__ */
|
|
14989
|
-
liveRotationPlan.status === "wait_cond" && /* @__PURE__ */
|
|
14990
|
-
liveRotationPlan.status === "blocked" && /* @__PURE__ */
|
|
16026
|
+
/* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-muted" }, "\u5F53\u524D\u8F6E\u6362\u9884\u5224\uFF1A"),
|
|
16027
|
+
liveRotationPlan.status === "ok_no_change" && /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-badge kca-badge-ok" }, "\u2713 \u8230\u961F\u5C31\u7EEA\uFF0C\u65E0\u9700\u8F6E\u6362"),
|
|
16028
|
+
liveRotationPlan.status === "rotate" && /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-badge kca-badge-run" }, "\u21BB ", liveRotationPlan.reason || "\u5C06\u6267\u884C\u81EA\u52A8\u8F6E\u6362"),
|
|
16029
|
+
liveRotationPlan.status === "wait_cond" && /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-badge kca-badge-warn" }, "\u23F3 ", liveRotationPlan.reason),
|
|
16030
|
+
liveRotationPlan.status === "blocked" && /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-badge kca-badge-err" }, "\u26A0 ", liveRotationPlan.reason)
|
|
14991
16031
|
),
|
|
14992
|
-
/* @__PURE__ */
|
|
16032
|
+
/* @__PURE__ */ import_react9.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: 6 } }, Array.from({ length: slotCount }, (_, slot) => {
|
|
14993
16033
|
const curShip = getCurrentSlotShip(slot);
|
|
14994
16034
|
const dmgTier = profile.damageThresholds[slot] ?? "moderate";
|
|
14995
16035
|
const condMin = profile.condThresholds[slot] ?? (slot < 6 ? 40 : 0);
|
|
14996
16036
|
const cands = profile.candidateShips[slot] ?? [];
|
|
14997
16037
|
const pickerOpen = openPickerSlot === slot;
|
|
14998
16038
|
const slotLabel = slot < 6 ? slot === 0 ? "1 \u53F7\u4F4D (\u65D7\u8230)" : `${slot + 1} \u53F7\u4F4D` : `\u4E8C\u961F ${slot - 5} \u53F7\u4F4D`;
|
|
14999
|
-
return /* @__PURE__ */
|
|
16039
|
+
return /* @__PURE__ */ import_react9.default.createElement("div", { key: slot, className: "kca-slot-card" }, /* @__PURE__ */ import_react9.default.createElement("div", { className: "kca-row", style: { justifyContent: "space-between" } }, /* @__PURE__ */ import_react9.default.createElement("div", { className: "kca-row", style: { gap: 8 } }, /* @__PURE__ */ import_react9.default.createElement("strong", null, slotLabel), curShip ? /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-muted" }, "\u5F53\u524D\uFF1A", curShip.name, " Lv.", curShip.level, " \xB7 HP ", curShip.hp, "/", curShip.maxHp, " \xB7 \u58EB\u6C14", " ", /* @__PURE__ */ import_react9.default.createElement("span", { className: condClass2(curShip.cond) }, curShip.cond), curShip.isRepairing && /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-badge kca-badge-warn", style: { marginLeft: 4 } }, "\u5165\u6E20\u4E2D"), isHeavilyDamaged(curShip) && /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-badge kca-badge-err", style: { marginLeft: 4 } }, "\u5927\u7834")) : /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-muted" }, "\u5F53\u524D\uFF1A\u7A7A\u4F4D")), /* @__PURE__ */ import_react9.default.createElement("div", { className: "kca-row", style: { gap: 6 } }, /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-muted" }, "\u8F6E\u6362\u635F\u4F24"), /* @__PURE__ */ import_react9.default.createElement(
|
|
15000
16040
|
"select",
|
|
15001
16041
|
{
|
|
15002
16042
|
className: "kca-select",
|
|
@@ -15006,8 +16046,8 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
15006
16046
|
p.damageThresholds[slot] = e.target.value;
|
|
15007
16047
|
})
|
|
15008
16048
|
},
|
|
15009
|
-
DAMAGE_OPTIONS.map((opt) => /* @__PURE__ */
|
|
15010
|
-
), /* @__PURE__ */
|
|
16049
|
+
DAMAGE_OPTIONS.map((opt) => /* @__PURE__ */ import_react9.default.createElement("option", { key: opt.value, value: opt.value }, opt.label))
|
|
16050
|
+
), /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-muted" }, "\u6700\u4F4E\u58EB\u6C14"), /* @__PURE__ */ import_react9.default.createElement(
|
|
15011
16051
|
"input",
|
|
15012
16052
|
{
|
|
15013
16053
|
type: "number",
|
|
@@ -15021,7 +16061,7 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
15021
16061
|
p.condThresholds[slot] = Math.max(0, Math.min(100, Number(e.target.value) || 0));
|
|
15022
16062
|
})
|
|
15023
16063
|
}
|
|
15024
|
-
), cands.length > 0 && /* @__PURE__ */
|
|
16064
|
+
), cands.length > 0 && /* @__PURE__ */ import_react9.default.createElement(
|
|
15025
16065
|
"button",
|
|
15026
16066
|
{
|
|
15027
16067
|
className: "kca-btn kca-btn-sm",
|
|
@@ -15031,27 +16071,27 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
15031
16071
|
})
|
|
15032
16072
|
},
|
|
15033
16073
|
"\u6E05\u7A7A"
|
|
15034
|
-
), /* @__PURE__ */
|
|
16074
|
+
), /* @__PURE__ */ import_react9.default.createElement(
|
|
15035
16075
|
"button",
|
|
15036
16076
|
{
|
|
15037
16077
|
className: `kca-btn kca-btn-sm ${pickerOpen ? "kca-btn-primary" : ""}`,
|
|
15038
16078
|
onClick: () => setOpenPickerSlot(pickerOpen ? null : slot)
|
|
15039
16079
|
},
|
|
15040
16080
|
pickerOpen ? "\u6536\u8D77\u9009\u8239" : "+ \u6DFB\u52A0\u5019\u9009"
|
|
15041
|
-
))), /* @__PURE__ */
|
|
16081
|
+
))), /* @__PURE__ */ import_react9.default.createElement("div", { className: "kca-chip-list" }, cands.length === 0 ? /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-muted" }, "\u7A7A\u4F4D\uFF08\u4E0D\u7F16\u5165\u8230\u5A18\uFF1B\u82E5\u5F53\u524D\u8230\u961F\u8BE5\u4F4D\u7F6E\u6709\u4E0A\u6B21\u6B8B\u7559\u8230\u5A18\uFF0C\u8F6E\u6362\u65F6\u5C06\u81EA\u52A8\u79FB\u9664\uFF09") : cands.map((sid, idx) => {
|
|
15042
16082
|
const ship = gameState.ships[sid];
|
|
15043
16083
|
const taiha = ship ? isHeavilyDamaged(ship) : false;
|
|
15044
16084
|
const slotCheck = ship ? checkShipMatchesSlot(gameState, ship, slot, profile, allowedFleetIds) : null;
|
|
15045
16085
|
const rejectTag = ship && slotCheck && !slotCheck.ok ? formatShipSlotRejection(ship, slotCheck, condMin) : "";
|
|
15046
|
-
return /* @__PURE__ */
|
|
16086
|
+
return /* @__PURE__ */ import_react9.default.createElement(
|
|
15047
16087
|
"span",
|
|
15048
16088
|
{
|
|
15049
16089
|
key: `${sid}-${idx}`,
|
|
15050
16090
|
className: `kca-chip ${taiha ? "kca-chip-taiha" : ""}`,
|
|
15051
16091
|
title: ship ? `ID:${ship.id} ${ship.stypeName} HP:${ship.hp}/${ship.maxHp} \u58EB\u6C14:${ship.cond}${rejectTag ? ` \xB7 \u6682\u4E0D\u53EF\u7528: ${rejectTag}` : " \xB7 \u53EF\u8F6E\u6362"}` : `\u8230\u5A18 ID: ${sid} (\u672A\u5728\u6E38\u620F\u4E2D\u52A0\u8F7D\u6216\u5DF2\u89E3\u4F53)`
|
|
15052
16092
|
},
|
|
15053
|
-
/* @__PURE__ */
|
|
15054
|
-
idx > 0 && /* @__PURE__ */
|
|
16093
|
+
/* @__PURE__ */ import_react9.default.createElement("span", null, ship ? /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, ship.name, " ", /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-muted" }, "Lv.", ship.level), " ", /* @__PURE__ */ import_react9.default.createElement("span", { className: condClass2(ship.cond) }, "(", ship.cond, ")"), rejectTag && /* @__PURE__ */ import_react9.default.createElement("span", { style: { color: "#fbbf24", marginLeft: 4, fontSize: 10 } }, "[", rejectTag, "]")) : `#${sid}`),
|
|
16094
|
+
idx > 0 && /* @__PURE__ */ import_react9.default.createElement(
|
|
15055
16095
|
"button",
|
|
15056
16096
|
{
|
|
15057
16097
|
className: "kca-chip-btn",
|
|
@@ -15060,7 +16100,7 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
15060
16100
|
},
|
|
15061
16101
|
"\u2190"
|
|
15062
16102
|
),
|
|
15063
|
-
idx < cands.length - 1 && /* @__PURE__ */
|
|
16103
|
+
idx < cands.length - 1 && /* @__PURE__ */ import_react9.default.createElement(
|
|
15064
16104
|
"button",
|
|
15065
16105
|
{
|
|
15066
16106
|
className: "kca-chip-btn",
|
|
@@ -15069,7 +16109,7 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
15069
16109
|
},
|
|
15070
16110
|
"\u2192"
|
|
15071
16111
|
),
|
|
15072
|
-
/* @__PURE__ */
|
|
16112
|
+
/* @__PURE__ */ import_react9.default.createElement(
|
|
15073
16113
|
"button",
|
|
15074
16114
|
{
|
|
15075
16115
|
className: "kca-chip-btn",
|
|
@@ -15079,7 +16119,7 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
15079
16119
|
"\xD7"
|
|
15080
16120
|
)
|
|
15081
16121
|
);
|
|
15082
|
-
})), pickerOpen && /* @__PURE__ */
|
|
16122
|
+
})), pickerOpen && /* @__PURE__ */ import_react9.default.createElement("div", { className: "kca-ship-picker" }, /* @__PURE__ */ import_react9.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react9.default.createElement(
|
|
15083
16123
|
"input",
|
|
15084
16124
|
{
|
|
15085
16125
|
className: "kca-input",
|
|
@@ -15088,25 +16128,25 @@ var ShipRotationPanel = ({ profile, gameState, updateProfile }) => {
|
|
|
15088
16128
|
value: searchText,
|
|
15089
16129
|
onChange: (e) => setSearchText(e.target.value)
|
|
15090
16130
|
}
|
|
15091
|
-
), /* @__PURE__ */
|
|
16131
|
+
), /* @__PURE__ */ import_react9.default.createElement(
|
|
15092
16132
|
"select",
|
|
15093
16133
|
{
|
|
15094
16134
|
className: "kca-select",
|
|
15095
16135
|
value: stypeFilter,
|
|
15096
16136
|
onChange: (e) => setStypeFilter(e.target.value)
|
|
15097
16137
|
},
|
|
15098
|
-
/* @__PURE__ */
|
|
15099
|
-
stypeOptions.map(([id, name]) => /* @__PURE__ */
|
|
15100
|
-
), /* @__PURE__ */
|
|
16138
|
+
/* @__PURE__ */ import_react9.default.createElement("option", { value: "all" }, "\u5168\u90E8\u8230\u79CD"),
|
|
16139
|
+
stypeOptions.map(([id, name]) => /* @__PURE__ */ import_react9.default.createElement("option", { key: id, value: String(id) }, name))
|
|
16140
|
+
), /* @__PURE__ */ import_react9.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react9.default.createElement(
|
|
15101
16141
|
"input",
|
|
15102
16142
|
{
|
|
15103
16143
|
type: "checkbox",
|
|
15104
16144
|
checked: lockedOnly,
|
|
15105
16145
|
onChange: (e) => setLockedOnly(e.target.checked)
|
|
15106
16146
|
}
|
|
15107
|
-
), "\u4EC5\u9501\u8239"), /* @__PURE__ */
|
|
16147
|
+
), "\u4EC5\u9501\u8239"), /* @__PURE__ */ import_react9.default.createElement("span", { className: "kca-muted" }, "\u663E\u793A ", filteredPickerShips.length, " \u8258")), allShips.length === 0 ? /* @__PURE__ */ import_react9.default.createElement("div", { className: "kca-muted" }, "\u6E38\u620F\u5C1A\u672A\u52A0\u8F7D\u8230\u5A18\u6570\u636E\uFF08\u8FDB\u5165\u6BCD\u6E2F\u540E\u5C06\u81EA\u52A8\u5217\u51FA\u5168\u90E8\u8230\u5A18\uFF0C\u4E5F\u53EF\u76F4\u63A5\u5BFC\u5165\u65E7\u7248\u914D\u7F6E\uFF09\u3002") : /* @__PURE__ */ import_react9.default.createElement("div", { className: "kca-ship-picker-list" }, filteredPickerShips.map((s) => {
|
|
15108
16148
|
const added = cands.includes(s.id);
|
|
15109
|
-
return /* @__PURE__ */
|
|
16149
|
+
return /* @__PURE__ */ import_react9.default.createElement(
|
|
15110
16150
|
"button",
|
|
15111
16151
|
{
|
|
15112
16152
|
key: s.id,
|
|
@@ -15162,13 +16202,17 @@ var DISSOLUTION_SHIP_TYPES = [
|
|
|
15162
16202
|
{ id: 22, label: "\u8865\u7ED9 (AO)" }
|
|
15163
16203
|
];
|
|
15164
16204
|
var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
15165
|
-
const [newNodeNo, setNewNodeNo] = (0,
|
|
15166
|
-
const [newNodeAction, setNewNodeAction] = (0,
|
|
15167
|
-
const [showAll10Battles, setShowAll10Battles] = (0,
|
|
15168
|
-
const [newWpX, setNewWpX] = (0,
|
|
15169
|
-
const [newWpY, setNewWpY] = (0,
|
|
15170
|
-
const [newWpApi, setNewWpApi] = (0,
|
|
15171
|
-
const [advanceOpenTrigger, setAdvanceOpenTrigger] = (0,
|
|
16205
|
+
const [newNodeNo, setNewNodeNo] = (0, import_react10.useState)(1);
|
|
16206
|
+
const [newNodeAction, setNewNodeAction] = (0, import_react10.useState)("form_line_ahead");
|
|
16207
|
+
const [showAll10Battles, setShowAll10Battles] = (0, import_react10.useState)(false);
|
|
16208
|
+
const [newWpX, setNewWpX] = (0, import_react10.useState)(600);
|
|
16209
|
+
const [newWpY, setNewWpY] = (0, import_react10.useState)(360);
|
|
16210
|
+
const [newWpApi, setNewWpApi] = (0, import_react10.useState)("");
|
|
16211
|
+
const [advanceOpenTrigger, setAdvanceOpenTrigger] = (0, import_react10.useState)(0);
|
|
16212
|
+
const [coordScreenshotOpen, setCoordScreenshotOpen] = (0, import_react10.useState)(false);
|
|
16213
|
+
const [coordGameHudVisible, setCoordGameHudVisible] = (0, import_react10.useState)(false);
|
|
16214
|
+
const [coordSelectedTarget, setCoordSelectedTarget] = (0, import_react10.useState)("branch:0");
|
|
16215
|
+
const [coordLivePickTarget, setCoordLivePickTarget] = (0, import_react10.useState)(null);
|
|
15172
16216
|
const sortieCfg = settings.sortie;
|
|
15173
16217
|
const profile = sortieCfg.profiles.find((p) => p.id === sortieCfg.activeProfileId) ?? sortieCfg.profiles[0];
|
|
15174
16218
|
const updateProfile = (fn) => {
|
|
@@ -15225,14 +16269,88 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15225
16269
|
const s2Snap = coordinator.getStart2CacheSnapshot();
|
|
15226
16270
|
const activeBranchCount = profile.activeBranchPoints.filter((pt) => pt && (pt.x > 0 || pt.y > 0)).length;
|
|
15227
16271
|
const mapLabel = profile.isEvent ? `E-${profile.mapIndex}` : `${profile.mapArea}-${profile.mapIndex}`;
|
|
15228
|
-
|
|
16272
|
+
const coordTargets = [
|
|
16273
|
+
...[0, 1, 2, 3, 4].map((idx) => {
|
|
16274
|
+
const pt = profile.activeBranchPoints[idx] ?? { x: 0, y: 0 };
|
|
16275
|
+
return {
|
|
16276
|
+
id: `branch:${idx}`,
|
|
16277
|
+
label: `\u5206\u6B67 ${idx + 1}`,
|
|
16278
|
+
group: "branch",
|
|
16279
|
+
color: "#38bdf8",
|
|
16280
|
+
x: pt.x,
|
|
16281
|
+
y: pt.y
|
|
16282
|
+
};
|
|
16283
|
+
}),
|
|
16284
|
+
...[0, 1, 2, 3, 4, 5].map((idx) => {
|
|
16285
|
+
const pt = profile.lbasPoints[idx] ?? { x: 0, y: 0 };
|
|
16286
|
+
return {
|
|
16287
|
+
id: `lbas:${idx}`,
|
|
16288
|
+
label: `\u9646\u822A${Math.floor(idx / 2) + 1}-${idx % 2 + 1}`,
|
|
16289
|
+
group: "lbas",
|
|
16290
|
+
color: "#f59e0b",
|
|
16291
|
+
x: pt.x,
|
|
16292
|
+
y: pt.y
|
|
16293
|
+
};
|
|
16294
|
+
}),
|
|
16295
|
+
...profile.isEvent ? [
|
|
16296
|
+
{
|
|
16297
|
+
id: "waypoint:new",
|
|
16298
|
+
label: "\u6D3B\u52A8\u65B0\u8DEF\u5F84\u70B9",
|
|
16299
|
+
group: "waypoint",
|
|
16300
|
+
color: "#c084fc",
|
|
16301
|
+
x: newWpX,
|
|
16302
|
+
y: newWpY
|
|
16303
|
+
}
|
|
16304
|
+
] : []
|
|
16305
|
+
];
|
|
16306
|
+
const extraWaypointMarkers = profile.isEvent ? profile.eventWaypoints.map((wp, idx) => ({
|
|
16307
|
+
id: `wp:${idx}`,
|
|
16308
|
+
label: `\u8DEF\u5F84#${idx + 1}`,
|
|
16309
|
+
x: wp.x,
|
|
16310
|
+
y: wp.y,
|
|
16311
|
+
color: "#c084fc"
|
|
16312
|
+
})) : [];
|
|
16313
|
+
const handleApplyPickedCoord = (targetId, x, y) => {
|
|
16314
|
+
if (targetId.startsWith("branch:")) {
|
|
16315
|
+
const idx = Number(targetId.slice("branch:".length));
|
|
16316
|
+
if (Number.isInteger(idx) && idx >= 0 && idx < 5) {
|
|
16317
|
+
updateProfile((p) => {
|
|
16318
|
+
while (p.activeBranchPoints.length < 5) p.activeBranchPoints.push({ x: 0, y: 0 });
|
|
16319
|
+
p.activeBranchPoints[idx] = { x, y };
|
|
16320
|
+
});
|
|
16321
|
+
}
|
|
16322
|
+
} else if (targetId.startsWith("lbas:")) {
|
|
16323
|
+
const idx = Number(targetId.slice("lbas:".length));
|
|
16324
|
+
if (Number.isInteger(idx) && idx >= 0 && idx < 6) {
|
|
16325
|
+
updateProfile((p) => {
|
|
16326
|
+
while (p.lbasPoints.length < 6) p.lbasPoints.push({ x: 0, y: 0 });
|
|
16327
|
+
p.lbasPoints[idx] = { x, y };
|
|
16328
|
+
});
|
|
16329
|
+
}
|
|
16330
|
+
} else if (targetId === "waypoint:new") {
|
|
16331
|
+
setNewWpX(x);
|
|
16332
|
+
setNewWpY(y);
|
|
16333
|
+
}
|
|
16334
|
+
};
|
|
16335
|
+
const handleClearPickedCoord = (targetId) => {
|
|
16336
|
+
handleApplyPickedCoord(targetId, 0, 0);
|
|
16337
|
+
};
|
|
16338
|
+
const startLivePickFor = (targetId) => {
|
|
16339
|
+
setCoordSelectedTarget(targetId);
|
|
16340
|
+
setCoordLivePickTarget((prev) => prev === targetId ? null : targetId);
|
|
16341
|
+
};
|
|
16342
|
+
const openScreenshotPickerFor = (targetId) => {
|
|
16343
|
+
setCoordSelectedTarget(targetId);
|
|
16344
|
+
setCoordScreenshotOpen(true);
|
|
16345
|
+
};
|
|
16346
|
+
return /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement(
|
|
15229
16347
|
CollapsibleCard,
|
|
15230
16348
|
{
|
|
15231
16349
|
storageKey: "sortie.profile",
|
|
15232
16350
|
title: "\u51FA\u51FB\u914D\u7F6E\u65B9\u6848",
|
|
15233
16351
|
defaultOpen: true,
|
|
15234
|
-
summary: /* @__PURE__ */
|
|
15235
|
-
headerRight: /* @__PURE__ */
|
|
16352
|
+
summary: /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement("span", null, profile.name, " \xB7 ", mapLabel, " \xB7 \u7B2C", profile.fleet, "\u8230\u961F"), profile.f5OnResourceNode && /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge kca-badge-run" }, "F5\u5077\u6CB9"), taihaOverrideActive && /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge kca-badge-err" }, "\u26A0\u5927\u7834\u5FFD\u7565")),
|
|
16353
|
+
headerRight: /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react10.default.createElement("button", { className: "kca-btn kca-btn-sm kca-btn-primary", onClick: addProfile }, "+ \u65B0\u5EFA"), /* @__PURE__ */ import_react10.default.createElement("button", { className: "kca-btn kca-btn-sm", onClick: copyProfile }, "\u590D\u5236"), /* @__PURE__ */ import_react10.default.createElement("button", { className: "kca-btn kca-btn-sm", onClick: sortProfiles }, "\u6309\u540D\u6392\u5E8F"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15236
16354
|
"button",
|
|
15237
16355
|
{
|
|
15238
16356
|
className: "kca-btn kca-btn-sm",
|
|
@@ -15242,7 +16360,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15242
16360
|
"\u5220\u9664"
|
|
15243
16361
|
))
|
|
15244
16362
|
},
|
|
15245
|
-
/* @__PURE__ */
|
|
16363
|
+
/* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15246
16364
|
"select",
|
|
15247
16365
|
{
|
|
15248
16366
|
className: "kca-select",
|
|
@@ -15252,8 +16370,8 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15252
16370
|
s.sortie.activeProfileId = e.target.value;
|
|
15253
16371
|
})
|
|
15254
16372
|
},
|
|
15255
|
-
sortieCfg.profiles.map((p) => /* @__PURE__ */
|
|
15256
|
-
), /* @__PURE__ */
|
|
16373
|
+
sortieCfg.profiles.map((p) => /* @__PURE__ */ import_react10.default.createElement("option", { key: p.id, value: p.id }, p.name, " (", p.isEvent ? `E-${p.mapIndex}` : `${p.mapArea}-${p.mapIndex}`, ")"))
|
|
16374
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
15257
16375
|
"input",
|
|
15258
16376
|
{
|
|
15259
16377
|
className: "kca-input",
|
|
@@ -15264,7 +16382,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15264
16382
|
placeholder: "\u65B9\u6848\u540D\u79F0"
|
|
15265
16383
|
}
|
|
15266
16384
|
)),
|
|
15267
|
-
/* @__PURE__ */
|
|
16385
|
+
/* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-grid" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-field" }, /* @__PURE__ */ import_react10.default.createElement("label", null, "\u6D3B\u52A8\u6D77\u57DF (E\u56FE)"), /* @__PURE__ */ import_react10.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15268
16386
|
"input",
|
|
15269
16387
|
{
|
|
15270
16388
|
type: "checkbox",
|
|
@@ -15273,7 +16391,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15273
16391
|
p.isEvent = e.target.checked;
|
|
15274
16392
|
})
|
|
15275
16393
|
}
|
|
15276
|
-
), "\u6D3B\u52A8\u6D77\u57DF\u6A21\u5F0F")), /* @__PURE__ */
|
|
16394
|
+
), "\u6D3B\u52A8\u6D77\u57DF\u6A21\u5F0F")), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-field" }, /* @__PURE__ */ import_react10.default.createElement("label", null, "\u6D77\u57DF (Area - Map)"), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15277
16395
|
"input",
|
|
15278
16396
|
{
|
|
15279
16397
|
type: "number",
|
|
@@ -15287,7 +16405,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15287
16405
|
p.mapArea = Number(e.target.value) || 1;
|
|
15288
16406
|
})
|
|
15289
16407
|
}
|
|
15290
|
-
), /* @__PURE__ */
|
|
16408
|
+
), /* @__PURE__ */ import_react10.default.createElement("span", null, "-"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15291
16409
|
"input",
|
|
15292
16410
|
{
|
|
15293
16411
|
type: "number",
|
|
@@ -15300,7 +16418,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15300
16418
|
p.mapIndex = Number(e.target.value) || 1;
|
|
15301
16419
|
})
|
|
15302
16420
|
}
|
|
15303
|
-
))), /* @__PURE__ */
|
|
16421
|
+
))), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-field" }, /* @__PURE__ */ import_react10.default.createElement("label", null, "\u51FA\u51FB\u8230\u961F / \u8054\u5408"), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15304
16422
|
"select",
|
|
15305
16423
|
{
|
|
15306
16424
|
className: "kca-select",
|
|
@@ -15309,8 +16427,8 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15309
16427
|
p.fleet = Number(e.target.value);
|
|
15310
16428
|
})
|
|
15311
16429
|
},
|
|
15312
|
-
[1, 2, 3, 4].map((f) => /* @__PURE__ */
|
|
15313
|
-
), /* @__PURE__ */
|
|
16430
|
+
[1, 2, 3, 4].map((f) => /* @__PURE__ */ import_react10.default.createElement("option", { key: f, value: f }, "\u7B2C", f, "\u8230\u961F"))
|
|
16431
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
15314
16432
|
"select",
|
|
15315
16433
|
{
|
|
15316
16434
|
className: "kca-select",
|
|
@@ -15319,11 +16437,11 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15319
16437
|
p.combineType = Number(e.target.value);
|
|
15320
16438
|
})
|
|
15321
16439
|
},
|
|
15322
|
-
/* @__PURE__ */
|
|
15323
|
-
/* @__PURE__ */
|
|
15324
|
-
/* @__PURE__ */
|
|
15325
|
-
/* @__PURE__ */
|
|
15326
|
-
))), /* @__PURE__ */
|
|
16440
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: 0 }, "\u5355\u8230\u961F"),
|
|
16441
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: 1 }, "\u673A\u52A8\u90E8\u961F"),
|
|
16442
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: 2 }, "\u6C34\u6253\u90E8\u961F"),
|
|
16443
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: 3 }, "\u8FD0\u8F93\u62A4\u536B")
|
|
16444
|
+
))), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-field" }, /* @__PURE__ */ import_react10.default.createElement("label", null, "\u51FA\u51FB\u7B56\u7565"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15327
16445
|
"select",
|
|
15328
16446
|
{
|
|
15329
16447
|
className: "kca-select",
|
|
@@ -15332,10 +16450,10 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15332
16450
|
p.strategy = e.target.value;
|
|
15333
16451
|
})
|
|
15334
16452
|
},
|
|
15335
|
-
/* @__PURE__ */
|
|
15336
|
-
/* @__PURE__ */
|
|
15337
|
-
/* @__PURE__ */
|
|
15338
|
-
)), profile.strategy === "custom" && /* @__PURE__ */
|
|
16453
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "clear" }, "\u6253\u901A\u5168\u56FE"),
|
|
16454
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "node_a" }, "\u5355\u70B9\u64A4\u9000 (A\u70B9)"),
|
|
16455
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "custom" }, "\u81EA\u5B9A\u4E49\u6218\u6570\u64A4\u9000")
|
|
16456
|
+
)), profile.strategy === "custom" && /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-field" }, /* @__PURE__ */ import_react10.default.createElement("label", null, "\u81EA\u5B9A\u4E49\u6218\u6597\u6B21\u6570"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15339
16457
|
"input",
|
|
15340
16458
|
{
|
|
15341
16459
|
type: "number",
|
|
@@ -15347,7 +16465,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15347
16465
|
p.customFightNum = Number(e.target.value) || 1;
|
|
15348
16466
|
})
|
|
15349
16467
|
}
|
|
15350
|
-
)), /* @__PURE__ */
|
|
16468
|
+
)), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-field" }, /* @__PURE__ */ import_react10.default.createElement("label", null, "\u9ED8\u8BA4\u9635\u578B"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15351
16469
|
"select",
|
|
15352
16470
|
{
|
|
15353
16471
|
className: "kca-select",
|
|
@@ -15356,8 +16474,8 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15356
16474
|
p.formation = e.target.value;
|
|
15357
16475
|
})
|
|
15358
16476
|
},
|
|
15359
|
-
FORMATION_OPTIONS.map((o) => /* @__PURE__ */
|
|
15360
|
-
)), /* @__PURE__ */
|
|
16477
|
+
FORMATION_OPTIONS.map((o) => /* @__PURE__ */ import_react10.default.createElement("option", { key: o.value, value: o.value }, o.label))
|
|
16478
|
+
)), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-field" }, /* @__PURE__ */ import_react10.default.createElement("label", null, "BOSS \u591C\u6218\u7B56\u7565"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15361
16479
|
"select",
|
|
15362
16480
|
{
|
|
15363
16481
|
className: "kca-select",
|
|
@@ -15366,10 +16484,10 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15366
16484
|
p.bossStrategy = e.target.value;
|
|
15367
16485
|
})
|
|
15368
16486
|
},
|
|
15369
|
-
/* @__PURE__ */
|
|
15370
|
-
/* @__PURE__ */
|
|
15371
|
-
/* @__PURE__ */
|
|
15372
|
-
)), /* @__PURE__ */
|
|
16487
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "always" }, "BOSS \u5FC5\u8FDB\u591C\u6218"),
|
|
16488
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "boss_alive" }, "BOSS \u5B58\u6D3B\u65F6\u591C\u6218"),
|
|
16489
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "never" }, "BOSS \u4E0D\u591C\u6218")
|
|
16490
|
+
)), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-field" }, /* @__PURE__ */ import_react10.default.createElement("label", null, "\u8865\u7ED9\u65F6\u673A / \u6CFC\u6876\u9608\u503C (\u5C0F\u65F6)"), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15373
16491
|
"select",
|
|
15374
16492
|
{
|
|
15375
16493
|
className: "kca-select",
|
|
@@ -15378,12 +16496,12 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15378
16496
|
p.supplyPolicy = e.target.value;
|
|
15379
16497
|
})
|
|
15380
16498
|
},
|
|
15381
|
-
/* @__PURE__ */
|
|
15382
|
-
/* @__PURE__ */
|
|
15383
|
-
/* @__PURE__ */
|
|
15384
|
-
/* @__PURE__ */
|
|
15385
|
-
/* @__PURE__ */
|
|
15386
|
-
), /* @__PURE__ */
|
|
16499
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "default" }, "\u9ED8\u8BA4"),
|
|
16500
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "p100" }, "\u6BCF\u6B21 (100%)"),
|
|
16501
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "p80" }, "<80%"),
|
|
16502
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "p50" }, "<50%"),
|
|
16503
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "p0" }, "\u8017\u5C3D\u65F6")
|
|
16504
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
15387
16505
|
"input",
|
|
15388
16506
|
{
|
|
15389
16507
|
type: "number",
|
|
@@ -15396,7 +16514,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15396
16514
|
p.repairBucketHours = Number(e.target.value) || 0;
|
|
15397
16515
|
})
|
|
15398
16516
|
}
|
|
15399
|
-
))), /* @__PURE__ */
|
|
16517
|
+
))), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-field" }, /* @__PURE__ */ import_react10.default.createElement("label", null, "\u51FA\u51FB\u8BA1\u6570\u76EE\u6807 (\u5269\u4F59 ", profile.limitRemaining, " / \u76EE\u6807 ", profile.limitTarget, ")"), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15400
16518
|
"select",
|
|
15401
16519
|
{
|
|
15402
16520
|
className: "kca-select",
|
|
@@ -15405,12 +16523,12 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15405
16523
|
p.limitType = e.target.value;
|
|
15406
16524
|
})
|
|
15407
16525
|
},
|
|
15408
|
-
/* @__PURE__ */
|
|
15409
|
-
/* @__PURE__ */
|
|
15410
|
-
/* @__PURE__ */
|
|
15411
|
-
/* @__PURE__ */
|
|
15412
|
-
/* @__PURE__ */
|
|
15413
|
-
), profile.limitType !== "none" && /* @__PURE__ */
|
|
16526
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "none" }, "\u65E0\u9650\u5236"),
|
|
16527
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "times" }, "\u51FA\u51FB\u6B21\u6570"),
|
|
16528
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "boss" }, "\u51FB\u6740 BOSS"),
|
|
16529
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "wins" }, "BOSS \u80DC\u5229"),
|
|
16530
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "s_wins" }, "BOSS S \u80DC")
|
|
16531
|
+
), profile.limitType !== "none" && /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement(
|
|
15414
16532
|
"input",
|
|
15415
16533
|
{
|
|
15416
16534
|
type: "number",
|
|
@@ -15425,7 +16543,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15425
16543
|
p.limitRemaining = v;
|
|
15426
16544
|
})
|
|
15427
16545
|
}
|
|
15428
|
-
), /* @__PURE__ */
|
|
16546
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
15429
16547
|
"button",
|
|
15430
16548
|
{
|
|
15431
16549
|
className: "kca-btn kca-btn-sm",
|
|
@@ -15435,7 +16553,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15435
16553
|
title: "\u91CD\u7F6E\u5269\u4F59\u8BA1\u6570\u4E3A\u76EE\u6807\u503C"
|
|
15436
16554
|
},
|
|
15437
16555
|
"\u91CD\u7F6E"
|
|
15438
|
-
)))), /* @__PURE__ */
|
|
16556
|
+
)))), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-field" }, /* @__PURE__ */ import_react10.default.createElement("label", null, "\u65D7\u8230\u7EC3\u7EA7\u8FBE\u6807\u505C\u6B62 (\u9ED8\u8BA4\u5173\u95ED)"), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react10.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15439
16557
|
"input",
|
|
15440
16558
|
{
|
|
15441
16559
|
type: "checkbox",
|
|
@@ -15444,7 +16562,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15444
16562
|
p.flagshipLevelLimitOpen = e.target.checked;
|
|
15445
16563
|
})
|
|
15446
16564
|
}
|
|
15447
|
-
), "\u8FBE\u5230 Lv"), /* @__PURE__ */
|
|
16565
|
+
), "\u8FBE\u5230 Lv"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15448
16566
|
"input",
|
|
15449
16567
|
{
|
|
15450
16568
|
type: "number",
|
|
@@ -15459,7 +16577,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15459
16577
|
})
|
|
15460
16578
|
}
|
|
15461
16579
|
)))),
|
|
15462
|
-
/* @__PURE__ */
|
|
16580
|
+
/* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react10.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15463
16581
|
"input",
|
|
15464
16582
|
{
|
|
15465
16583
|
type: "checkbox",
|
|
@@ -15469,7 +16587,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15469
16587
|
})
|
|
15470
16588
|
}
|
|
15471
16589
|
), "\u8B66\u6212\u9635\u53EF\u7528 (\u6D3B\u52A8\u671F 6 \u9635\u578B\u5E03\u5C40)")),
|
|
15472
|
-
/* @__PURE__ */
|
|
16590
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
|
15473
16591
|
CollapsibleSubBox,
|
|
15474
16592
|
{
|
|
15475
16593
|
storageKey: "sortie.f5",
|
|
@@ -15477,8 +16595,8 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15477
16595
|
defaultOpen: Boolean(
|
|
15478
16596
|
profile.f5OnResourceNode || profile.f5OnSortieRetreat || sf.start2CacheMode === "serve"
|
|
15479
16597
|
),
|
|
15480
|
-
summary: /* @__PURE__ */
|
|
15481
|
-
headerRight: /* @__PURE__ */
|
|
16598
|
+
summary: /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, profile.f5OnResourceNode && /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge kca-badge-run" }, "\u7B2C", profile.f5ResourceNodeCount || 1, "\u8D44\u6E90\u70B9F5", profile.f5InstantOnCompass !== false ? "\xB7\u7F57\u76D8\u5373\u5237" : ""), profile.f5OnSortieRetreat && /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge" }, "\u64A4\u9000F5")),
|
|
16599
|
+
headerRight: /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row", style: { gap: 6 } }, sf.start2CacheMode === "serve" ? s2Snap && s2Snap.cachedBytes > 0 && s2Snap.leftSec > 0 ? /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge kca-badge-ok" }, "Start2 \u7F13\u5B58\u5C31\u7EEA (\u5269 ", Math.ceil(s2Snap.leftSec / 60), " \u5206", s2Snap.page ? ` \xB7 \u62E6 ${s2Snap.page.hit} / \u6F0F ${s2Snap.page.miss}` : "", ")") : /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge kca-badge-warn" }, "Start2 \u5F85\u5199\u5165 (\u91CD\u8F7D\u6E38\u620F\u4E00\u6B21\u5373\u7F13\u5B58)") : /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge" }, "Start2 \u7F13\u5B58\u672A\u5F00\u542F"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15482
16600
|
"button",
|
|
15483
16601
|
{
|
|
15484
16602
|
className: "kca-btn kca-btn-sm",
|
|
@@ -15487,7 +16605,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15487
16605
|
"\u7ACB\u5373\u6267\u884C F5"
|
|
15488
16606
|
))
|
|
15489
16607
|
},
|
|
15490
|
-
/* @__PURE__ */
|
|
16608
|
+
/* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row", style: { gap: 12 } }, /* @__PURE__ */ import_react10.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15491
16609
|
"input",
|
|
15492
16610
|
{
|
|
15493
16611
|
type: "checkbox",
|
|
@@ -15496,7 +16614,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15496
16614
|
s.safety.start2CacheMode = e.target.checked ? "serve" : "off";
|
|
15497
16615
|
})
|
|
15498
16616
|
}
|
|
15499
|
-
), /* @__PURE__ */
|
|
16617
|
+
), /* @__PURE__ */ import_react10.default.createElement("strong", null, "F5 \u65F6\u542F\u7528\u5185\u7F6E Start2 \u7F13\u5B58 (s2cache\uFF0C\u514D\u4EE3\u7406\u5077\u6CB9)")), /* @__PURE__ */ import_react10.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15500
16618
|
"input",
|
|
15501
16619
|
{
|
|
15502
16620
|
type: "checkbox",
|
|
@@ -15505,7 +16623,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15505
16623
|
p.f5OnResourceNode = e.target.checked;
|
|
15506
16624
|
})
|
|
15507
16625
|
}
|
|
15508
|
-
), "\u8E29\u8D44\u6E90\u70B9 (api_itemget) \u81EA\u52A8 F5"), profile.f5OnResourceNode && /* @__PURE__ */
|
|
16626
|
+
), "\u8E29\u8D44\u6E90\u70B9 (api_itemget) \u81EA\u52A8 F5"), profile.f5OnResourceNode && /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row", style: { gap: 4 } }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-muted" }, "\u7B2C"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15509
16627
|
"input",
|
|
15510
16628
|
{
|
|
15511
16629
|
type: "number",
|
|
@@ -15519,7 +16637,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15519
16637
|
p.f5ResourceNodeCount = Math.max(1, Math.min(5, Number(e.target.value) || 1));
|
|
15520
16638
|
})
|
|
15521
16639
|
}
|
|
15522
|
-
), /* @__PURE__ */
|
|
16640
|
+
), /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-muted" }, "\u4E2A\u8D44\u6E90\u70B9")), /* @__PURE__ */ import_react10.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15523
16641
|
"input",
|
|
15524
16642
|
{
|
|
15525
16643
|
type: "checkbox",
|
|
@@ -15529,13 +16647,13 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15529
16647
|
})
|
|
15530
16648
|
}
|
|
15531
16649
|
), "\u64A4\u9000\u65F6\u7528 F5 \u4EE3\u66FF\u56DE\u6E2F")),
|
|
15532
|
-
/* @__PURE__ */
|
|
16650
|
+
/* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row", style: { gap: 10 } }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15533
16651
|
"label",
|
|
15534
16652
|
{
|
|
15535
16653
|
className: "kca-switch",
|
|
15536
16654
|
title: "\u670D\u52A1\u5668\u5728\u8FD4\u56DE start/next \u65F6\u8D44\u6E90\u5DF2\u5165\u8D26\uFF0C\u5F00\u542F\u540E\u7F57\u76D8\u521A\u51FA\u73B0\u5373\u523B F5\uFF0C\u65E0\u9700\u70B9\u51FB\u7F57\u76D8\u6216\u7B49\u5F85\u8239\u8D70\u5230\u8D44\u6E90\u70B9\uFF1B\u5173\u95ED\u5219\u7B49\u5F85\u822A\u884C\u81F3\u70B9\u4F4D\u540E\u518D F5"
|
|
15537
16655
|
},
|
|
15538
|
-
/* @__PURE__ */
|
|
16656
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
|
15539
16657
|
"input",
|
|
15540
16658
|
{
|
|
15541
16659
|
type: "checkbox",
|
|
@@ -15545,8 +16663,8 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15545
16663
|
})
|
|
15546
16664
|
}
|
|
15547
16665
|
),
|
|
15548
|
-
/* @__PURE__ */
|
|
15549
|
-
), profile.f5InstantOnCompass !== false && /* @__PURE__ */
|
|
16666
|
+
/* @__PURE__ */ import_react10.default.createElement("strong", null, "\u7F57\u76D8\u51FA\u73B0\u5373\u523B F5 (\u4E0D\u7B49\u8239\u8D70\u5230\u8D44\u6E90\u70B9)")
|
|
16667
|
+
), profile.f5InstantOnCompass !== false && /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row", style: { gap: 4 } }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-muted" }, "\u7F13\u51B2"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15550
16668
|
"input",
|
|
15551
16669
|
{
|
|
15552
16670
|
type: "number",
|
|
@@ -15561,8 +16679,8 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15561
16679
|
p.f5CompassDelayMs = Math.max(0, Math.min(5e3, Number(e.target.value) || 0));
|
|
15562
16680
|
})
|
|
15563
16681
|
}
|
|
15564
|
-
), /* @__PURE__ */
|
|
15565
|
-
/* @__PURE__ */
|
|
16682
|
+
), /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-muted" }, "ms")), /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-muted", style: { fontSize: 11 } }, "(\u5BF9\u201C\u8E29\u8D44\u6E90\u70B9 F5\u201D\u548C\u201C\u5730\u56FE\u6307\u5B9A\u70B9 F5\u201D\u5747\u751F\u6548)")),
|
|
16683
|
+
/* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row", style: { gap: 8 } }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-muted" }, "F5 \u5237\u65B0\u65B9\u5F0F\uFF1A"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15566
16684
|
"select",
|
|
15567
16685
|
{
|
|
15568
16686
|
className: "kca-select",
|
|
@@ -15571,10 +16689,10 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15571
16689
|
s.safety.f5ReloadMode = e.target.value;
|
|
15572
16690
|
})
|
|
15573
16691
|
},
|
|
15574
|
-
/* @__PURE__ */
|
|
15575
|
-
/* @__PURE__ */
|
|
15576
|
-
/* @__PURE__ */
|
|
15577
|
-
), sf.f5ReloadMode === "smart" && /* @__PURE__ */
|
|
16692
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "smart" }, "\u667A\u80FD\u6DF7\u5408 (\u5E73\u65F6\u53F3\u952E\u5237\u65B0\u6E38\u620F\u672C\u4F53\uFF0C\u6BCF ", sf.f5FullRefreshIntervalMin, "+1~", sf.f5FullRefreshJitterMin, " \u5206\u5237\u65B0\u6574\u9875)"),
|
|
16693
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "game_only" }, "\u4EC5\u53F3\u952E\u5237\u65B0\u6E38\u620F\u672C\u4F53 (gameReload)"),
|
|
16694
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "full_page" }, "\u59CB\u7EC8\u5237\u65B0\u6574\u4E2A\u7F51\u9875 (gameRefreshPage)")
|
|
16695
|
+
), sf.f5ReloadMode === "smart" && /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-muted" }, "\u6574\u9875\u95F4\u9694"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15578
16696
|
"input",
|
|
15579
16697
|
{
|
|
15580
16698
|
type: "number",
|
|
@@ -15587,7 +16705,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15587
16705
|
s.safety.f5FullRefreshIntervalMin = Math.max(5, Number(e.target.value) || 60);
|
|
15588
16706
|
})
|
|
15589
16707
|
}
|
|
15590
|
-
), /* @__PURE__ */
|
|
16708
|
+
), /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-muted" }, "+ \u968F\u673A 1~"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15591
16709
|
"input",
|
|
15592
16710
|
{
|
|
15593
16711
|
type: "number",
|
|
@@ -15600,9 +16718,9 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15600
16718
|
s.safety.f5FullRefreshJitterMin = Math.max(0, Number(e.target.value) || 0);
|
|
15601
16719
|
})
|
|
15602
16720
|
}
|
|
15603
|
-
), /* @__PURE__ */
|
|
16721
|
+
), /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-muted" }, "\u5206")))
|
|
15604
16722
|
),
|
|
15605
|
-
/* @__PURE__ */
|
|
16723
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
|
15606
16724
|
CollapsibleSubBox,
|
|
15607
16725
|
{
|
|
15608
16726
|
storageKey: "sortie.taiha",
|
|
@@ -15610,9 +16728,9 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15610
16728
|
danger: taihaOverrideActive,
|
|
15611
16729
|
defaultOpen: taihaOverrideActive,
|
|
15612
16730
|
forceOpenTrigger: taihaOverrideActive,
|
|
15613
|
-
summary: taihaOverrideActive ? /* @__PURE__ */
|
|
16731
|
+
summary: taihaOverrideActive ? /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge kca-badge-err" }, "\u26A0 \u5DF2\u5173\u95ED\u5927\u7834\u4FDD\u62A4") : /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge kca-badge-ok" }, "\u9ED8\u8BA4 7 \u5C42\u4FDD\u62A4\u5F00\u542F")
|
|
15614
16732
|
},
|
|
15615
|
-
/* @__PURE__ */
|
|
16733
|
+
/* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row", style: { gap: 14 } }, /* @__PURE__ */ import_react10.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15616
16734
|
"input",
|
|
15617
16735
|
{
|
|
15618
16736
|
type: "checkbox",
|
|
@@ -15621,7 +16739,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15621
16739
|
p.ignoreTaihaPreSortie = e.target.checked;
|
|
15622
16740
|
})
|
|
15623
16741
|
}
|
|
15624
|
-
), "\u5FFD\u7565\u51FA\u51FB\u524D\u5927\u7834\u68C0\u6D4B (\u5141\u8BB8\u643A\u5E26\u5927\u7834\u8230\u5A18\u51FA\u51FB)"), /* @__PURE__ */
|
|
16742
|
+
), "\u5FFD\u7565\u51FA\u51FB\u524D\u5927\u7834\u68C0\u6D4B (\u5141\u8BB8\u643A\u5E26\u5927\u7834\u8230\u5A18\u51FA\u51FB)"), /* @__PURE__ */ import_react10.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15625
16743
|
"input",
|
|
15626
16744
|
{
|
|
15627
16745
|
type: "checkbox",
|
|
@@ -15631,24 +16749,24 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15631
16749
|
})
|
|
15632
16750
|
}
|
|
15633
16751
|
), "\u5FFD\u7565\u6218\u6597\u4E2D\u5927\u7834\u64A4\u9000 (\u5141\u8BB8\u5927\u7834\u7EE7\u7EED\u8FDB\u51FB)")),
|
|
15634
|
-
taihaOverrideActive && /* @__PURE__ */
|
|
16752
|
+
taihaOverrideActive && /* @__PURE__ */ import_react10.default.createElement("div", { style: { fontSize: 11 } }, "\u26A0\uFE0F ", /* @__PURE__ */ import_react10.default.createElement("strong", null, "\u9AD8\u98CE\u9669\u63D0\u793A"), "\uFF1A\u5F53\u524D\u65B9\u6848\u5DF2\u5173\u95ED\u5927\u7834\u4FDD\u62A4\u3002\u82E5\u672A\u643A\u5E26\u635F\u7BA1/\u5973\u795E\u4E14\u975E\u65D7\u8230\u4E0D\u6C89\u573A\u666F\uFF0C\u5927\u7834\u8FDB\u51FB\u53EF\u80FD\u5BFC\u81F4\u8230\u5A18\u6C38\u4E45\u6C89\u6CA1\uFF0C\u8BF7\u52A1\u5FC5\u786E\u8BA4\u7F16\u6210\u540E\u518D\u5F00\u542F\u81EA\u52A8\u51FA\u51FB\uFF01\uFF08\u82E5\u914D\u5408\u81EA\u52A8\u8F6E\u6362\uFF0C\u8BF7\u5C06\u5BF9\u5E94\u69FD\u4F4D\u635F\u4F24\u8BBE\u4E3A\u300C\u4E0D\u9650\u635F\u4F24\u300D\u3002\uFF09")
|
|
15635
16753
|
)
|
|
15636
|
-
), /* @__PURE__ */
|
|
16754
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
15637
16755
|
ShipRotationPanel,
|
|
15638
16756
|
{
|
|
15639
16757
|
profile,
|
|
15640
16758
|
gameState,
|
|
15641
16759
|
updateProfile
|
|
15642
16760
|
}
|
|
15643
|
-
), /* @__PURE__ */
|
|
16761
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
15644
16762
|
CollapsibleCard,
|
|
15645
16763
|
{
|
|
15646
16764
|
storageKey: "sortie.advance",
|
|
15647
16765
|
title: "\u9AD8\u7EA7\u70B9\u4F4D / \u6218\u6597\u9635\u578B\u3001\u70DF\u5E55\u4E0E\u80FD\u52A8\u5206\u6B67\u63A7\u5236",
|
|
15648
16766
|
defaultOpen: profile.useAdvanceSettings,
|
|
15649
16767
|
forceOpenTrigger: advanceOpenTrigger,
|
|
15650
|
-
summary: /* @__PURE__ */
|
|
15651
|
-
headerRight: /* @__PURE__ */
|
|
16768
|
+
summary: /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, profile.useAdvanceSettings ? /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge kca-badge-run" }, profile.advanceMode === "battle" ? "\u6309\u6218\u6B21" : `\u6309\u8282\u70B9 (${profile.mapNodeRules.length} \u6761)`) : /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge" }, "\u672A\u542F\u7528\u89C4\u5219"), activeBranchCount > 0 && /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge" }, "\u5206\u6B67\u5750\u6807 ", activeBranchCount, " \u4E2A"), profile.isEvent && profile.eventWaypoints.length > 0 && /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge" }, "\u6D3B\u52A8\u8DEF\u5F84 ", profile.eventWaypoints.length, " \u70B9")),
|
|
16769
|
+
headerRight: /* @__PURE__ */ import_react10.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15652
16770
|
"input",
|
|
15653
16771
|
{
|
|
15654
16772
|
type: "checkbox",
|
|
@@ -15663,7 +16781,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15663
16781
|
}
|
|
15664
16782
|
), "\u542F\u7528\u9AD8\u7EA7\u89C4\u5219")
|
|
15665
16783
|
},
|
|
15666
|
-
profile.useAdvanceSettings && /* @__PURE__ */
|
|
16784
|
+
profile.useAdvanceSettings && /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row", style: { justifyContent: "space-between" } }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react10.default.createElement("label", null, "\u6A21\u5F0F\uFF1A"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15667
16785
|
"select",
|
|
15668
16786
|
{
|
|
15669
16787
|
className: "kca-select",
|
|
@@ -15672,16 +16790,16 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15672
16790
|
p.advanceMode = e.target.value;
|
|
15673
16791
|
})
|
|
15674
16792
|
},
|
|
15675
|
-
/* @__PURE__ */
|
|
15676
|
-
/* @__PURE__ */
|
|
15677
|
-
)), profile.advanceMode === "battle" && /* @__PURE__ */
|
|
16793
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "battle" }, "\u6309\u6218\u6597\u573A\u6B21 (\u7B2C1~10\u6218)"),
|
|
16794
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "map" }, "\u6309\u6D77\u57DF\u8282\u70B9\u7F16\u53F7 (api_no)")
|
|
16795
|
+
)), profile.advanceMode === "battle" && /* @__PURE__ */ import_react10.default.createElement(
|
|
15678
16796
|
"button",
|
|
15679
16797
|
{
|
|
15680
16798
|
className: "kca-btn kca-btn-sm",
|
|
15681
16799
|
onClick: () => setShowAll10Battles((v) => !v)
|
|
15682
16800
|
},
|
|
15683
16801
|
showAll10Battles ? "\u4EC5\u663E\u793A 1~6 \u6218" : "\u5C55\u5F00\u5168\u90E8 1~10 \u6218"
|
|
15684
|
-
)), profile.advanceMode === "battle" ? /* @__PURE__ */
|
|
16802
|
+
)), profile.advanceMode === "battle" ? /* @__PURE__ */ import_react10.default.createElement("table", { className: "kca-table" }, /* @__PURE__ */ import_react10.default.createElement("thead", null, /* @__PURE__ */ import_react10.default.createElement("tr", null, /* @__PURE__ */ import_react10.default.createElement("th", null, "\u6218\u6B21"), /* @__PURE__ */ import_react10.default.createElement("th", null, "\u9635\u578B"), /* @__PURE__ */ import_react10.default.createElement("th", null, "\u591C\u6218"), /* @__PURE__ */ import_react10.default.createElement("th", null, "\u70DF\u5E55"))), /* @__PURE__ */ import_react10.default.createElement("tbody", null, Array.from({ length: battleRowsCount }, (_, i) => /* @__PURE__ */ import_react10.default.createElement("tr", { key: i }, /* @__PURE__ */ import_react10.default.createElement("td", null, "\u7B2C ", i + 1, " \u6218"), /* @__PURE__ */ import_react10.default.createElement("td", null, /* @__PURE__ */ import_react10.default.createElement(
|
|
15685
16803
|
"select",
|
|
15686
16804
|
{
|
|
15687
16805
|
className: "kca-select",
|
|
@@ -15691,8 +16809,8 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15691
16809
|
p.battleFormations[i] = e.target.value;
|
|
15692
16810
|
})
|
|
15693
16811
|
},
|
|
15694
|
-
FORMATION_OPTIONS.map((o) => /* @__PURE__ */
|
|
15695
|
-
)), /* @__PURE__ */
|
|
16812
|
+
FORMATION_OPTIONS.map((o) => /* @__PURE__ */ import_react10.default.createElement("option", { key: o.value, value: o.value }, o.label))
|
|
16813
|
+
)), /* @__PURE__ */ import_react10.default.createElement("td", null, /* @__PURE__ */ import_react10.default.createElement(
|
|
15696
16814
|
"input",
|
|
15697
16815
|
{
|
|
15698
16816
|
type: "checkbox",
|
|
@@ -15702,7 +16820,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15702
16820
|
p.battleNightFight[i] = e.target.checked;
|
|
15703
16821
|
})
|
|
15704
16822
|
}
|
|
15705
|
-
)), /* @__PURE__ */
|
|
16823
|
+
)), /* @__PURE__ */ import_react10.default.createElement("td", null, /* @__PURE__ */ import_react10.default.createElement(
|
|
15706
16824
|
"input",
|
|
15707
16825
|
{
|
|
15708
16826
|
type: "checkbox",
|
|
@@ -15712,7 +16830,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15712
16830
|
p.battleSmoke[i] = e.target.checked;
|
|
15713
16831
|
})
|
|
15714
16832
|
}
|
|
15715
|
-
)))))) : /* @__PURE__ */
|
|
16833
|
+
)))))) : /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react10.default.createElement("span", null, "\u8282\u70B9\u53F7"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15716
16834
|
"input",
|
|
15717
16835
|
{
|
|
15718
16836
|
type: "number",
|
|
@@ -15721,15 +16839,15 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15721
16839
|
value: newNodeNo,
|
|
15722
16840
|
onChange: (e) => setNewNodeNo(Number(e.target.value) || 1)
|
|
15723
16841
|
}
|
|
15724
|
-
), /* @__PURE__ */
|
|
16842
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
15725
16843
|
"select",
|
|
15726
16844
|
{
|
|
15727
16845
|
className: "kca-select",
|
|
15728
16846
|
value: newNodeAction,
|
|
15729
16847
|
onChange: (e) => setNewNodeAction(e.target.value)
|
|
15730
16848
|
},
|
|
15731
|
-
Object.entries(NODE_ACTION_LABELS).map(([k, lbl]) => /* @__PURE__ */
|
|
15732
|
-
), /* @__PURE__ */
|
|
16849
|
+
Object.entries(NODE_ACTION_LABELS).map(([k, lbl]) => /* @__PURE__ */ import_react10.default.createElement("option", { key: k, value: k }, lbl))
|
|
16850
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
15733
16851
|
"button",
|
|
15734
16852
|
{
|
|
15735
16853
|
className: "kca-btn kca-btn-sm kca-btn-primary",
|
|
@@ -15738,7 +16856,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15738
16856
|
})
|
|
15739
16857
|
},
|
|
15740
16858
|
"+ \u6DFB\u52A0\u89C4\u5219"
|
|
15741
|
-
)), profile.mapNodeRules.map((r, idx) => /* @__PURE__ */
|
|
16859
|
+
)), profile.mapNodeRules.map((r, idx) => /* @__PURE__ */ import_react10.default.createElement("div", { key: `${r.nodeNo}-${r.action}-${idx}`, className: "kca-row" }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge" }, r.nodeNo, " \u70B9"), /* @__PURE__ */ import_react10.default.createElement("span", null, NODE_ACTION_LABELS[r.action] ?? r.action), /* @__PURE__ */ import_react10.default.createElement(
|
|
15742
16860
|
"button",
|
|
15743
16861
|
{
|
|
15744
16862
|
className: "kca-btn kca-btn-sm",
|
|
@@ -15748,13 +16866,31 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15748
16866
|
},
|
|
15749
16867
|
"\u5220\u9664"
|
|
15750
16868
|
))))),
|
|
15751
|
-
/* @__PURE__ */
|
|
16869
|
+
/* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-sub-box" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row", style: { justifyContent: "space-between" } }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-muted" }, "\u80FD\u52A8\u5206\u6B67\u5750\u6807 (\u6309\u6B21\u5E8F\u7B2C 1~5 \u6B21\u5206\u6B67\uFF0C1200\xD7720 \u57FA\u51C6\u5750\u6807 `x,y`\uFF0C`0,0` \u4E3A\u672A\u914D\u7F6E)\uFF1A"), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row", style: { gap: 5 } }, /* @__PURE__ */ import_react10.default.createElement(
|
|
16870
|
+
"button",
|
|
16871
|
+
{
|
|
16872
|
+
className: `kca-btn kca-btn-sm ${coordGameHudVisible ? "kca-btn-primary" : ""}`,
|
|
16873
|
+
onClick: () => setCoordGameHudVisible((v) => !v),
|
|
16874
|
+
title: "\u5728\u6E38\u620F\u753B\u9762\u4E0A\u5B9E\u65F6\u663E\u793A\u9F20\u6807 1200\xD7720 \u5750\u6807\u4EE5\u53CA\u5DF2\u914D\u7F6E\u7684\u5206\u6B67/\u9646\u822A\u6807\u8BB0\uFF08\u9F20\u6807\u7A7F\u900F\uFF0C\u4E0D\u5F71\u54CD\u70B9\u51FB\u6E38\u620F\uFF09"
|
|
16875
|
+
},
|
|
16876
|
+
coordGameHudVisible ? "\u{1F441}\uFE0F \u5173\u95ED\u6E38\u620F\u5750\u6807" : "\u{1F441}\uFE0F \u6E38\u620F\u663E\u793A\u5750\u6807"
|
|
16877
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
16878
|
+
"button",
|
|
16879
|
+
{
|
|
16880
|
+
className: `kca-btn kca-btn-sm ${coordScreenshotOpen ? "kca-btn-primary" : ""}`,
|
|
16881
|
+
onClick: () => coordScreenshotOpen ? setCoordScreenshotOpen(false) : openScreenshotPickerFor("branch:0"),
|
|
16882
|
+
title: "\u622A\u53D6\u5F53\u524D\u6E38\u620F\u753B\u9762\uFF0C\u5728\u9762\u677F\u91CC\u53EF\u89C6\u5316\u67E5\u770B\u6807\u8BB0\u5E76\u70B9\u51FB\u76F4\u63A5\u586B\u5165\u5750\u6807"
|
|
16883
|
+
},
|
|
16884
|
+
coordScreenshotOpen ? "\u6536\u8D77\u622A\u56FE\u9009\u70B9" : "\u{1F4F8} \u622A\u56FE\u53EF\u89C6\u5316\u9009\u70B9"
|
|
16885
|
+
))), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row" }, [0, 1, 2, 3, 4].map((idx) => {
|
|
15752
16886
|
const pt = profile.activeBranchPoints[idx] ?? { x: 0, y: 0 };
|
|
15753
|
-
|
|
16887
|
+
const tid = `branch:${idx}`;
|
|
16888
|
+
const picking = coordLivePickTarget === tid;
|
|
16889
|
+
return /* @__PURE__ */ import_react10.default.createElement("div", { key: idx, className: "kca-field" }, /* @__PURE__ */ import_react10.default.createElement("label", null, "\u5206\u6B67 ", idx + 1), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row", style: { gap: 3 } }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15754
16890
|
"input",
|
|
15755
16891
|
{
|
|
15756
16892
|
className: "kca-input",
|
|
15757
|
-
style: { width:
|
|
16893
|
+
style: { width: 78 },
|
|
15758
16894
|
placeholder: "x,y",
|
|
15759
16895
|
value: `${pt.x},${pt.y}`,
|
|
15760
16896
|
onChange: (e) => {
|
|
@@ -15765,9 +16901,32 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15765
16901
|
});
|
|
15766
16902
|
}
|
|
15767
16903
|
}
|
|
15768
|
-
)
|
|
16904
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
16905
|
+
"button",
|
|
16906
|
+
{
|
|
16907
|
+
className: `kca-btn kca-pick-btn ${picking ? "kca-btn-primary" : ""}`,
|
|
16908
|
+
title: `\u70B9\u51FB\u540E\u76F4\u63A5\u5728\u8230\u5A18\u6E38\u620F\u753B\u9762\u4E0A\u70B9\u9009\u300C\u5206\u6B67 ${idx + 1}\u300D\u5750\u6807\uFF08\u4E0D\u4F1A\u8BEF\u89E6\u6E38\u620F\uFF09`,
|
|
16909
|
+
onClick: () => startLivePickFor(tid)
|
|
16910
|
+
},
|
|
16911
|
+
picking ? "\u53D6\u70B9\u4E2D" : "\u{1F3AF}"
|
|
16912
|
+
)));
|
|
15769
16913
|
}))),
|
|
15770
|
-
profile.isEvent && /* @__PURE__ */
|
|
16914
|
+
profile.isEvent && /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-sub-box" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row", style: { justifyContent: "space-between" } }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-muted" }, "\u6D3B\u52A8\u6D77\u57DF\u8FDB\u5165\u70B9\u51FB\u8DEF\u5F84 (\u672C\u5730\u81EA\u5B9A\u4E49\u5750\u6807\uFF0C\u66FF\u4EE3\u65E7\u7248\u5931\u6548\u8FDC\u7A0B\u670D\u52A1\u5668\u8DEF\u5F84)\uFF1A"), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row", style: { gap: 5 } }, /* @__PURE__ */ import_react10.default.createElement(
|
|
16915
|
+
"button",
|
|
16916
|
+
{
|
|
16917
|
+
className: `kca-btn kca-btn-sm ${coordLivePickTarget === "waypoint:new" ? "kca-btn-primary" : ""}`,
|
|
16918
|
+
onClick: () => startLivePickFor("waypoint:new"),
|
|
16919
|
+
title: "\u5728\u6E38\u620F\u753B\u9762\u4E0A\u76F4\u63A5\u70B9\u51FB\u76EE\u6807\u4F4D\u7F6E\u4EE5\u586B\u5165 X / Y"
|
|
16920
|
+
},
|
|
16921
|
+
coordLivePickTarget === "waypoint:new" ? "\u{1F3AF} \u53D6\u70B9\u4E2D..." : "\u{1F3AF} \u6E38\u620F\u753B\u9762\u53D6\u70B9"
|
|
16922
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
16923
|
+
"button",
|
|
16924
|
+
{
|
|
16925
|
+
className: "kca-btn kca-btn-sm",
|
|
16926
|
+
onClick: () => openScreenshotPickerFor("waypoint:new")
|
|
16927
|
+
},
|
|
16928
|
+
"\u{1F4F8} \u622A\u56FE\u9009\u70B9"
|
|
16929
|
+
))), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react10.default.createElement("span", null, "X"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15771
16930
|
"input",
|
|
15772
16931
|
{
|
|
15773
16932
|
type: "number",
|
|
@@ -15776,7 +16935,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15776
16935
|
value: newWpX,
|
|
15777
16936
|
onChange: (e) => setNewWpX(Number(e.target.value) || 0)
|
|
15778
16937
|
}
|
|
15779
|
-
), /* @__PURE__ */
|
|
16938
|
+
), /* @__PURE__ */ import_react10.default.createElement("span", null, "Y"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15780
16939
|
"input",
|
|
15781
16940
|
{
|
|
15782
16941
|
type: "number",
|
|
@@ -15785,7 +16944,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15785
16944
|
value: newWpY,
|
|
15786
16945
|
onChange: (e) => setNewWpY(Number(e.target.value) || 0)
|
|
15787
16946
|
}
|
|
15788
|
-
), /* @__PURE__ */
|
|
16947
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
15789
16948
|
"input",
|
|
15790
16949
|
{
|
|
15791
16950
|
className: "kca-input",
|
|
@@ -15794,7 +16953,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15794
16953
|
value: newWpApi,
|
|
15795
16954
|
onChange: (e) => setNewWpApi(e.target.value)
|
|
15796
16955
|
}
|
|
15797
|
-
), /* @__PURE__ */
|
|
16956
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
15798
16957
|
"button",
|
|
15799
16958
|
{
|
|
15800
16959
|
className: "kca-btn kca-btn-sm kca-btn-primary",
|
|
@@ -15807,7 +16966,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15807
16966
|
})
|
|
15808
16967
|
},
|
|
15809
16968
|
"+ \u6DFB\u52A0\u70B9\u51FB\u70B9"
|
|
15810
|
-
)), profile.eventWaypoints.length > 0 && /* @__PURE__ */
|
|
16969
|
+
)), profile.eventWaypoints.length > 0 && /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-chip-list" }, profile.eventWaypoints.map((wp, idx) => /* @__PURE__ */ import_react10.default.createElement("span", { key: idx, className: "kca-chip" }, "#", idx + 1, " (", wp.x, ",", wp.y, ")", wp.waitApi ? ` [${wp.waitApi}]` : "", /* @__PURE__ */ import_react10.default.createElement(
|
|
15811
16970
|
"button",
|
|
15812
16971
|
{
|
|
15813
16972
|
className: "kca-chip-btn",
|
|
@@ -15817,15 +16976,36 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15817
16976
|
},
|
|
15818
16977
|
"\xD7"
|
|
15819
16978
|
)))))
|
|
15820
|
-
), /* @__PURE__ */
|
|
16979
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
16980
|
+
CoordPickerPanel,
|
|
16981
|
+
{
|
|
16982
|
+
coordinator,
|
|
16983
|
+
targets: coordTargets,
|
|
16984
|
+
selectedTargetId: coordSelectedTarget,
|
|
16985
|
+
onSelectTarget: setCoordSelectedTarget,
|
|
16986
|
+
onPickCoord: handleApplyPickedCoord,
|
|
16987
|
+
onClearCoord: handleClearPickedCoord,
|
|
16988
|
+
screenshotOpen: coordScreenshotOpen,
|
|
16989
|
+
onCloseScreenshot: () => setCoordScreenshotOpen(false),
|
|
16990
|
+
gameHudVisible: coordGameHudVisible,
|
|
16991
|
+
onToggleGameHud: setCoordGameHudVisible,
|
|
16992
|
+
livePickTargetId: coordLivePickTarget,
|
|
16993
|
+
onStartLivePick: (id) => {
|
|
16994
|
+
setCoordSelectedTarget(id);
|
|
16995
|
+
setCoordLivePickTarget(id);
|
|
16996
|
+
},
|
|
16997
|
+
onCancelLivePick: () => setCoordLivePickTarget(null),
|
|
16998
|
+
extraMarkers: extraWaypointMarkers
|
|
16999
|
+
}
|
|
17000
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
15821
17001
|
CollapsibleCard,
|
|
15822
17002
|
{
|
|
15823
17003
|
storageKey: "sortie.lbas",
|
|
15824
17004
|
title: "\u57FA\u5730\u822A\u7A7A\u961F (LBAS) \u4E0E \u635E\u8239/\u89E3\u4F53",
|
|
15825
17005
|
defaultOpen: false,
|
|
15826
|
-
summary: /* @__PURE__ */
|
|
17006
|
+
summary: /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, profile.lbasAutoSupply && /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge" }, "\u9646\u822A\u8865\u7ED9"), sortieCfg.autoStopOnTargetDrop && /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge kca-badge-run" }, "\u635E\u8239\u505C (", sortieCfg.targetDropShips.length, ")"), sortieCfg.dissolution.enabled && /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-badge kca-badge-ok" }, "\u81EA\u52A8\u89E3\u4F53 (\u2264", sortieCfg.dissolution.freeSlotThreshold, "\u4F4D)"), !profile.lbasAutoSupply && !sortieCfg.autoStopOnTargetDrop && !sortieCfg.dissolution.enabled && /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-muted" }, "\u672A\u5F00\u542F\u9644\u52A0\u9879"))
|
|
15827
17007
|
},
|
|
15828
|
-
/* @__PURE__ */
|
|
17008
|
+
/* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react10.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15829
17009
|
"input",
|
|
15830
17010
|
{
|
|
15831
17011
|
type: "checkbox",
|
|
@@ -15834,7 +17014,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15834
17014
|
p.lbasAutoSupply = e.target.checked;
|
|
15835
17015
|
})
|
|
15836
17016
|
}
|
|
15837
|
-
), "\u9646\u822A\u81EA\u52A8\u8865\u7ED9"), /* @__PURE__ */
|
|
17017
|
+
), "\u9646\u822A\u81EA\u52A8\u8865\u7ED9"), /* @__PURE__ */ import_react10.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15838
17018
|
"input",
|
|
15839
17019
|
{
|
|
15840
17020
|
type: "checkbox",
|
|
@@ -15843,7 +17023,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15843
17023
|
p.lbasWaitCond = e.target.checked;
|
|
15844
17024
|
})
|
|
15845
17025
|
}
|
|
15846
|
-
), "\u7B49\u5F85\u75B2\u52B3\u6062\u590D"), /* @__PURE__ */
|
|
17026
|
+
), "\u7B49\u5F85\u75B2\u52B3\u6062\u590D"), /* @__PURE__ */ import_react10.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15847
17027
|
"input",
|
|
15848
17028
|
{
|
|
15849
17029
|
type: "checkbox",
|
|
@@ -15852,7 +17032,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15852
17032
|
p.lbasAutoRest = e.target.checked;
|
|
15853
17033
|
})
|
|
15854
17034
|
}
|
|
15855
|
-
), "\u75B2\u52B3\u81EA\u52A8\u5207\u4F11\u606F/\u6062\u590D\u672D"), profile.isEvent && /* @__PURE__ */
|
|
17035
|
+
), "\u75B2\u52B3\u81EA\u52A8\u5207\u4F11\u606F/\u6062\u590D\u672D"), profile.isEvent && /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15856
17036
|
"input",
|
|
15857
17037
|
{
|
|
15858
17038
|
type: "checkbox",
|
|
@@ -15861,7 +17041,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15861
17041
|
p.autoChangeEventRank = e.target.checked;
|
|
15862
17042
|
})
|
|
15863
17043
|
}
|
|
15864
|
-
), "\u5207\u96BE\u5EA6\u91CD\u7F6E\u635E\u8239"), /* @__PURE__ */
|
|
17044
|
+
), "\u5207\u96BE\u5EA6\u91CD\u7F6E\u635E\u8239"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15865
17045
|
"select",
|
|
15866
17046
|
{
|
|
15867
17047
|
className: "kca-select",
|
|
@@ -15870,12 +17050,27 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15870
17050
|
p.eventRank = Number(e.target.value);
|
|
15871
17051
|
})
|
|
15872
17052
|
},
|
|
15873
|
-
/* @__PURE__ */
|
|
15874
|
-
/* @__PURE__ */
|
|
15875
|
-
/* @__PURE__ */
|
|
15876
|
-
/* @__PURE__ */
|
|
17053
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: 4 }, "\u7532"),
|
|
17054
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: 3 }, "\u4E59"),
|
|
17055
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: 2 }, "\u4E19"),
|
|
17056
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: 1 }, "\u4E01")
|
|
17057
|
+
))),
|
|
17058
|
+
/* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row", style: { justifyContent: "space-between" } }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-muted" }, "\u9646\u822A\u653B\u51FB\u70B9\u5750\u6807 (1200\xD7720\uFF0C\u53EF\u70B9 \u{1F3AF} \u76F4\u63A5\u5728\u6E38\u620F\u753B\u9762\u9009\u70B9\u6216\u6253\u5F00\u622A\u56FE\u9762\u677F)\uFF1A"), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row", style: { gap: 5 } }, /* @__PURE__ */ import_react10.default.createElement(
|
|
17059
|
+
"button",
|
|
17060
|
+
{
|
|
17061
|
+
className: `kca-btn kca-btn-sm ${coordGameHudVisible ? "kca-btn-primary" : ""}`,
|
|
17062
|
+
onClick: () => setCoordGameHudVisible((v) => !v)
|
|
17063
|
+
},
|
|
17064
|
+
coordGameHudVisible ? "\u{1F441}\uFE0F \u5173\u95ED\u6E38\u620F\u5750\u6807" : "\u{1F441}\uFE0F \u6E38\u620F\u663E\u793A\u5750\u6807"
|
|
17065
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
17066
|
+
"button",
|
|
17067
|
+
{
|
|
17068
|
+
className: "kca-btn kca-btn-sm",
|
|
17069
|
+
onClick: () => openScreenshotPickerFor("lbas:0")
|
|
17070
|
+
},
|
|
17071
|
+
"\u{1F4F8} \u622A\u56FE\u53EF\u89C6\u5316\u9009\u9646\u822A\u70B9"
|
|
15877
17072
|
))),
|
|
15878
|
-
/* @__PURE__ */
|
|
17073
|
+
/* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-grid" }, [0, 1, 2].map((corps) => /* @__PURE__ */ import_react10.default.createElement("div", { key: corps, className: "kca-field" }, /* @__PURE__ */ import_react10.default.createElement("label", null, "\u7B2C ", corps + 1, " \u822A\u7A7A\u961F (\u672D / \u653B\u51FB\u70B91 / \u653B\u51FB\u70B92)"), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15879
17074
|
"select",
|
|
15880
17075
|
{
|
|
15881
17076
|
className: "kca-select",
|
|
@@ -15884,31 +17079,41 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15884
17079
|
p.lbasActions[corps] = Number(e.target.value);
|
|
15885
17080
|
})
|
|
15886
17081
|
},
|
|
15887
|
-
/* @__PURE__ */
|
|
15888
|
-
/* @__PURE__ */
|
|
15889
|
-
/* @__PURE__ */
|
|
15890
|
-
/* @__PURE__ */
|
|
15891
|
-
/* @__PURE__ */
|
|
17082
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: 0 }, "\u5F85\u673A"),
|
|
17083
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: 1 }, "\u51FA\u51FB"),
|
|
17084
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: 2 }, "\u9632\u7A7A"),
|
|
17085
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: 3 }, "\u9000\u907F"),
|
|
17086
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: 4 }, "\u4F11\u606F")
|
|
15892
17087
|
), [0, 1].map((wave) => {
|
|
15893
|
-
const
|
|
15894
|
-
|
|
17088
|
+
const lbasIdx = corps * 2 + wave;
|
|
17089
|
+
const pt = profile.lbasPoints[lbasIdx] ?? { x: 0, y: 0 };
|
|
17090
|
+
const tid = `lbas:${lbasIdx}`;
|
|
17091
|
+
const picking = coordLivePickTarget === tid;
|
|
17092
|
+
return /* @__PURE__ */ import_react10.default.createElement("div", { key: wave, className: "kca-row", style: { gap: 2 } }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15895
17093
|
"input",
|
|
15896
17094
|
{
|
|
15897
|
-
key: wave,
|
|
15898
17095
|
className: "kca-input",
|
|
15899
|
-
style: { width:
|
|
17096
|
+
style: { width: 72 },
|
|
15900
17097
|
placeholder: "x,y",
|
|
15901
17098
|
value: `${pt.x},${pt.y}`,
|
|
15902
17099
|
onChange: (e) => {
|
|
15903
17100
|
const [xs, ys] = e.target.value.split(",");
|
|
15904
17101
|
updateProfile((p) => {
|
|
15905
|
-
p.lbasPoints[
|
|
17102
|
+
p.lbasPoints[lbasIdx] = { x: Number(xs) || 0, y: Number(ys) || 0 };
|
|
15906
17103
|
});
|
|
15907
17104
|
}
|
|
15908
17105
|
}
|
|
15909
|
-
)
|
|
17106
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
17107
|
+
"button",
|
|
17108
|
+
{
|
|
17109
|
+
className: `kca-btn kca-pick-btn ${picking ? "kca-btn-primary" : ""}`,
|
|
17110
|
+
title: `\u5728\u6E38\u620F\u753B\u9762\u76F4\u63A5\u70B9\u9009\u7B2C ${corps + 1} \u822A\u7A7A\u961F\u653B\u51FB\u70B9 ${wave + 1}`,
|
|
17111
|
+
onClick: () => startLivePickFor(tid)
|
|
17112
|
+
},
|
|
17113
|
+
picking ? "\u2026" : "\u{1F3AF}"
|
|
17114
|
+
));
|
|
15910
17115
|
}))))),
|
|
15911
|
-
/* @__PURE__ */
|
|
17116
|
+
/* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react10.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15912
17117
|
"input",
|
|
15913
17118
|
{
|
|
15914
17119
|
type: "checkbox",
|
|
@@ -15917,7 +17122,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15917
17122
|
s.sortie.autoStopOnTargetDrop = e.target.checked;
|
|
15918
17123
|
})
|
|
15919
17124
|
}
|
|
15920
|
-
), "\u6389\u843D\u76EE\u6807\u8230\u5A18\u505C\u6B62"), /* @__PURE__ */
|
|
17125
|
+
), "\u6389\u843D\u76EE\u6807\u8230\u5A18\u505C\u6B62"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15921
17126
|
"input",
|
|
15922
17127
|
{
|
|
15923
17128
|
className: "kca-input",
|
|
@@ -15929,7 +17134,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15929
17134
|
})
|
|
15930
17135
|
}
|
|
15931
17136
|
)),
|
|
15932
|
-
/* @__PURE__ */
|
|
17137
|
+
/* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-sub-box" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react10.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15933
17138
|
"input",
|
|
15934
17139
|
{
|
|
15935
17140
|
type: "checkbox",
|
|
@@ -15938,7 +17143,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15938
17143
|
s.sortie.dissolution.enabled = e.target.checked;
|
|
15939
17144
|
})
|
|
15940
17145
|
}
|
|
15941
|
-
), /* @__PURE__ */
|
|
17146
|
+
), /* @__PURE__ */ import_react10.default.createElement("strong", null, "\u8239\u4F4D\u4E0D\u8DB3\u81EA\u52A8\u89E3\u4F53")), /* @__PURE__ */ import_react10.default.createElement("span", null, "\u7A7A\u4F4D \u2264"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15942
17147
|
"input",
|
|
15943
17148
|
{
|
|
15944
17149
|
type: "number",
|
|
@@ -15949,7 +17154,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15949
17154
|
s.sortie.dissolution.freeSlotThreshold = Number(e.target.value) || 0;
|
|
15950
17155
|
})
|
|
15951
17156
|
}
|
|
15952
|
-
), /* @__PURE__ */
|
|
17157
|
+
), /* @__PURE__ */ import_react10.default.createElement("span", null, "Lv <"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15953
17158
|
"input",
|
|
15954
17159
|
{
|
|
15955
17160
|
type: "number",
|
|
@@ -15960,7 +17165,7 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15960
17165
|
s.sortie.dissolution.maxLevel = Number(e.target.value) || 5;
|
|
15961
17166
|
})
|
|
15962
17167
|
}
|
|
15963
|
-
), /* @__PURE__ */
|
|
17168
|
+
), /* @__PURE__ */ import_react10.default.createElement("span", null, "\u7A00\u6709\u5EA6"), /* @__PURE__ */ import_react10.default.createElement(
|
|
15964
17169
|
"select",
|
|
15965
17170
|
{
|
|
15966
17171
|
className: "kca-select",
|
|
@@ -15969,10 +17174,10 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15969
17174
|
s.sortie.dissolution.rarityCeiling = Number(e.target.value);
|
|
15970
17175
|
})
|
|
15971
17176
|
},
|
|
15972
|
-
/* @__PURE__ */
|
|
15973
|
-
/* @__PURE__ */
|
|
15974
|
-
/* @__PURE__ */
|
|
15975
|
-
), /* @__PURE__ */
|
|
17177
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: 4 }, "\u94F6\u8272\u4EE5\u4E0B"),
|
|
17178
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: 5 }, "\u91D1\u8272\u4EE5\u4E0B"),
|
|
17179
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: 6 }, "\u8679\u8272\u4EE5\u4E0B")
|
|
17180
|
+
), /* @__PURE__ */ import_react10.default.createElement("label", { className: "kca-switch" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15976
17181
|
"input",
|
|
15977
17182
|
{
|
|
15978
17183
|
type: "checkbox",
|
|
@@ -15981,9 +17186,9 @@ var SortieTab = ({ coordinator, gameState, settings }) => {
|
|
|
15981
17186
|
s.sortie.dissolution.reserveKiraEscorts = e.target.checked;
|
|
15982
17187
|
})
|
|
15983
17188
|
}
|
|
15984
|
-
), "\u4FDD\u75592\u8258\u5237\u95EA\u72D7\u7CAE\u9A71\u9010")), /* @__PURE__ */
|
|
17189
|
+
), "\u4FDD\u75592\u8258\u5237\u95EA\u72D7\u7CAE\u9A71\u9010")), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kca-chip-list" }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "kca-muted" }, "\u5141\u8BB8\u89E3\u4F53\u8230\u79CD\uFF1A"), DISSOLUTION_SHIP_TYPES.map((st) => {
|
|
15985
17190
|
const checked = sortieCfg.dissolution.allowedShipTypes.includes(st.id);
|
|
15986
|
-
return /* @__PURE__ */
|
|
17191
|
+
return /* @__PURE__ */ import_react10.default.createElement("label", { key: st.id, className: "kca-switch", style: { fontSize: 11 } }, /* @__PURE__ */ import_react10.default.createElement(
|
|
15987
17192
|
"input",
|
|
15988
17193
|
{
|
|
15989
17194
|
type: "checkbox",
|
|
@@ -16005,17 +17210,17 @@ var TABS = [
|
|
|
16005
17210
|
{ key: "settings", label: "\u5B89\u5168 / \u65E5\u5FD7 / \u5BFC\u5165" }
|
|
16006
17211
|
];
|
|
16007
17212
|
var KcaNextApp = ({ coordinator }) => {
|
|
16008
|
-
const [activeTab, setActiveTab] = (0,
|
|
16009
|
-
const [legacyImportTrigger, setLegacyImportTrigger] = (0,
|
|
16010
|
-
const [snap, setSnap] = (0,
|
|
16011
|
-
const [settings, setSettings] = (0,
|
|
16012
|
-
const [gameState, setGameState] = (0,
|
|
16013
|
-
const [logs, setLogs] = (0,
|
|
17213
|
+
const [activeTab, setActiveTab] = (0, import_react11.useState)("dashboard");
|
|
17214
|
+
const [legacyImportTrigger, setLegacyImportTrigger] = (0, import_react11.useState)(0);
|
|
17215
|
+
const [snap, setSnap] = (0, import_react11.useState)(() => coordinator.getSnapshot());
|
|
17216
|
+
const [settings, setSettings] = (0, import_react11.useState)(() => ({ ...coordinator.getSettings() }));
|
|
17217
|
+
const [gameState, setGameState] = (0, import_react11.useState)(() => coordinator.bridge.getState());
|
|
17218
|
+
const [logs, setLogs] = (0, import_react11.useState)(() => [...coordinator.logger.getEntries()]);
|
|
16014
17219
|
const openLegacyMigration = () => {
|
|
16015
17220
|
setLegacyImportTrigger((n) => n + 1);
|
|
16016
17221
|
setActiveTab("settings");
|
|
16017
17222
|
};
|
|
16018
|
-
(0,
|
|
17223
|
+
(0, import_react11.useEffect)(() => {
|
|
16019
17224
|
const unsubCoord = coordinator.subscribe(() => {
|
|
16020
17225
|
setSnap(coordinator.getSnapshot());
|
|
16021
17226
|
setSettings({ ...coordinator.getSettings() });
|
|
@@ -16034,7 +17239,7 @@ var KcaNextApp = ({ coordinator }) => {
|
|
|
16034
17239
|
clearInterval(uiRefresh);
|
|
16035
17240
|
};
|
|
16036
17241
|
}, [coordinator]);
|
|
16037
|
-
return /* @__PURE__ */
|
|
17242
|
+
return /* @__PURE__ */ import_react11.default.createElement("div", { className: "kca-next" }, /* @__PURE__ */ import_react11.default.createElement("style", null, KCA_NEXT_CSS), /* @__PURE__ */ import_react11.default.createElement("div", { className: "kca-header" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "kca-title" }, /* @__PURE__ */ import_react11.default.createElement("span", null, "\u2693 KCA Next"), /* @__PURE__ */ import_react11.default.createElement("span", { className: "kca-badge kca-badge-ok" }, "v1.0 \u539F\u751F\u5F15\u64CE")), /* @__PURE__ */ import_react11.default.createElement("div", { className: "kca-row" }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "kca-muted" }, "\u65E0 DRM \xB7 \u96F6\u72EC\u7ACB\u6D4F\u89C8\u5668 \xB7 \u8FDB\u7A0B\u5185\u76F4\u8FDE"))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "kca-tabs" }, TABS.map((t) => /* @__PURE__ */ import_react11.default.createElement(
|
|
16038
17243
|
"button",
|
|
16039
17244
|
{
|
|
16040
17245
|
key: t.key,
|
|
@@ -16042,7 +17247,7 @@ var KcaNextApp = ({ coordinator }) => {
|
|
|
16042
17247
|
onClick: () => setActiveTab(t.key)
|
|
16043
17248
|
},
|
|
16044
17249
|
t.label
|
|
16045
|
-
)), activeTab !== "plan" && /* @__PURE__ */
|
|
17250
|
+
)), activeTab !== "plan" && /* @__PURE__ */ import_react11.default.createElement("div", { className: "kca-tabs-fold" }, /* @__PURE__ */ import_react11.default.createElement(
|
|
16046
17251
|
"button",
|
|
16047
17252
|
{
|
|
16048
17253
|
className: "kca-tab-fold-btn",
|
|
@@ -16050,7 +17255,7 @@ var KcaNextApp = ({ coordinator }) => {
|
|
|
16050
17255
|
onClick: () => setAllMountedCardsOpen(true)
|
|
16051
17256
|
},
|
|
16052
17257
|
"\u5168\u90E8\u5C55\u5F00"
|
|
16053
|
-
), /* @__PURE__ */
|
|
17258
|
+
), /* @__PURE__ */ import_react11.default.createElement(
|
|
16054
17259
|
"button",
|
|
16055
17260
|
{
|
|
16056
17261
|
className: "kca-tab-fold-btn",
|
|
@@ -16058,7 +17263,7 @@ var KcaNextApp = ({ coordinator }) => {
|
|
|
16058
17263
|
onClick: () => setAllMountedCardsOpen(false)
|
|
16059
17264
|
},
|
|
16060
17265
|
"\u5168\u90E8\u6298\u53E0"
|
|
16061
|
-
))), /* @__PURE__ */
|
|
17266
|
+
))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "kca-body" }, activeTab === "dashboard" && /* @__PURE__ */ import_react11.default.createElement(
|
|
16062
17267
|
DashboardTab,
|
|
16063
17268
|
{
|
|
16064
17269
|
coordinator,
|
|
@@ -16067,7 +17272,7 @@ var KcaNextApp = ({ coordinator }) => {
|
|
|
16067
17272
|
settings,
|
|
16068
17273
|
onOpenLegacyImport: openLegacyMigration
|
|
16069
17274
|
}
|
|
16070
|
-
), activeTab === "sortie" && /* @__PURE__ */
|
|
17275
|
+
), activeTab === "sortie" && /* @__PURE__ */ import_react11.default.createElement(SortieTab, { coordinator, gameState, settings }), activeTab === "expedition" && /* @__PURE__ */ import_react11.default.createElement(ExpeditionKiraTab, { coordinator, gameState, settings }), activeTab === "modules" && /* @__PURE__ */ import_react11.default.createElement(OrgPracticeQuestsTab, { coordinator, gameState, settings }), activeTab === "plan" && /* @__PURE__ */ import_react11.default.createElement(PlanTab, { coordinator, settings }), activeTab === "settings" && /* @__PURE__ */ import_react11.default.createElement(
|
|
16071
17276
|
SettingsLogsTab,
|
|
16072
17277
|
{
|
|
16073
17278
|
coordinator,
|
|
@@ -16127,7 +17332,7 @@ function reducer(state = { initialized: true }, _action) {
|
|
|
16127
17332
|
}
|
|
16128
17333
|
var reactClass = () => {
|
|
16129
17334
|
const coord = ensureCoordinator();
|
|
16130
|
-
return
|
|
17335
|
+
return import_react12.default.createElement(KcaNextApp, { coordinator: coord });
|
|
16131
17336
|
};
|
|
16132
17337
|
// Annotate the CommonJS export names for ESM import in node:
|
|
16133
17338
|
0 && (module.exports = {
|