usi-csa-bridge 1.30.0-beta.1 → 1.30.0
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/index.js +1 -1
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
(()=>{"use strict";var e={699(e,t,o){o.d(t,{Ye:()=>a,g4:()=>n,np:()=>s});var n,i=o(588);function a(e,t){const o=new Date;return{type:e,command:t,dateTime:(0,i.ng)(o),timeMs:o.getTime()}}function s(e,t,o,n){Array.isArray(t)||(t=[t]);for(const o of t)e.commands.push(o);if(e.commands.length>o){const t=Math.max(n,e.commands.length-o);e.discarded+=t,e.commands.splice(0,t)}}!function(e){e.SEND="send",e.RECEIVE="receive",e.SYSTEM="system"}(n||(n={}))},219(e,t,o){o.d(t,{D:()=>n});function n(e){return e.replaceAll(/[<>:"/\\|?*]/g,"_")}o.d(t,["g",0,"{datetime}{_title}{_sente}{_gote}"])},69(e,t,o){o.d(t,{vr:()=>l,QT:()=>h,KM:()=>m,Nj:()=>u});var n=o(953),i=o.n(n);const[a,s]=[i().convert,i().detect];function r(e,t){const o=t?.autoDetect?function(e,t){return s(e)||t||"UTF8"}(e,t.encoding):t?.encoding;return"ASCII"===o||"UTF8"===o?(new TextDecoder).decode(e):a(e,{type:"string",from:o,to:"UNICODE"})}var l,c=o(113);function h(e){const t=e.toLowerCase();for(const e of Object.values(l))if(t.endsWith(e))return e}function d(e){switch(e){default:return"UTF8";case l.KIF:case l.KI2:return"SJIS"}}function u(e,t,o){const n=function(e,t,o){return r(e,{encoding:d(t),autoDetect:o?.autoDetect})}(e,t,o);switch(t){case l.KIF:case l.KIFU:return(0,c.importKIF)(n);case l.KI2:case l.KI2U:return(0,c.importKI2)(n);case l.CSA:return(0,c.importCSA)(n);case l.SFEN:return new Error(".sfen file import is not supported");case l.JKF:return(0,c.importJKFString)(n)}}function m(e,t,o){const n=!o.useUTF8ForKifAndKi2||t!==l.KIF&&t!==l.KI2?d(t):"UTF8";let i;switch(t){case l.KIF:case l.KIFU:i=(0,c.exportKIF)(e,o);break;case l.KI2:case l.KI2U:i=(0,c.exportKI2)(e,o);break;case l.CSA:i=(0,c.exportCSA)(e,{...o,v3:o.csa?.v3?{milliseconds:!0}:void 0});break;case l.SFEN:throw new Error(".sfen file export is not supported");case l.JKF:i=(0,c.exportJKFString)(e)}const s=function(e,t){return"ASCII"===t||"UTF8"===t?(new TextEncoder).encode(e):new Uint8Array(a(e,{type:"arraybuffer",from:"UNICODE",to:t}))}(i,n);let h=!1;if("SJIS"===n&&o.detectGarbled){r(s,{encoding:"SJIS"})!==i&&(h=!0)}return{data:s,garbled:h}}!function(e){e.KIF=".kif",e.KIFU=".kifu",e.KI2=".ki2",e.KI2U=".ki2u",e.CSA=".csa",e.SFEN=".sfen",e.JKF=".jkf"}(l||(l={}))},143(e,t,o){o.d(t,{OW:()=>r,Rr:()=>s,j5:()=>i,kt:()=>n});var n,i,a=o(113);function s(){return{id:"",myColor:a.Color.BLACK,toMove:a.Color.BLACK,position:"",players:{black:{time:{timeUnitMs:1e3,totalTime:0,byoyomi:0,delay:0,increment:0}},white:{time:{timeUnitMs:1e3,totalTime:0,byoyomi:0,delay:0,increment:0}}}}}function r(){return{black:{time:0},white:{time:0}}}!function(e){e.UNKNOWN="unknown",e.RESIGN="resign",e.SENNICHITE="sennichite",e.OUTE_SENNICHITE="oute_sennichite",e.ILLEGAL_MOVE="illegal_move",e.ILLEGAL_ACTION="illegal_action",e.TIME_UP="time_up",e.JISHOGI="jishogi",e.MAX_MOVES="max_moves"}(n||(n={})),function(e){e.WIN="win",e.LOSE="lose",e.DRAW="draw",e.CENSORED="censored",e.CHUDAN="chudan"}(i||(i={}))},685(e,t,o){var n;o.d(t,{q:()=>n}),function(e){e.WIN="win",e.LOSE="lose",e.DRAW="draw"}(n||(n={}))},588(e,t,o){function n(e=new Date){return e.toLocaleDateString("ja-JP",{year:"numeric",month:"2-digit",day:"2-digit"})}function i(e=new Date){return e.toLocaleTimeString("ja-JP",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function a(e=new Date){return i(e)+"."+String(e.getTime()%1e3).padStart(3,"0")}o.d(t,{ln:()=>i,ng:()=>a,sq:()=>n})},14(e,t,o){function n(e){return"/"===e||"\\"===e||/^[A-Za-z]:[\\/]{1}$/.test(e)?e:e.endsWith("\\")||e.endsWith("/")?e.slice(0,-1):e}o.d(t,{w:()=>n})},872(e,t,o){function n(e){switch(e%100){case 11:case 12:case 13:return e+"th"}switch(e%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd";default:return e+"th"}}o.d(t,{IE:()=>n})},517(e,t,o){o.d(t,{c:()=>a});var n=o(113),i=o(636);function a(e){return e instanceof n.InvalidPieceNameError?new Error(`${i.t.invalidPieceName}: ${e.data}`):e instanceof n.InvalidTurnError?new Error(`${i.t.invalidTurn}: ${e.data}`):e instanceof n.InvalidMoveError?new Error(`${i.t.invalidMove}: ${e.data}`):e instanceof n.InvalidMoveNumberError?new Error(`${i.t.invalidMoveNumber}: ${e.data}`):e instanceof n.InvalidDestinationError?new Error(`${i.t.invalidDestination}: ${e.data}`):e instanceof n.PieceNotExistsError?new Error(`${i.t.pieceNotExists}: ${e.data}`):e instanceof n.InvalidLineError?new Error(`${i.t.invalidLine}: ${e.data}`):e instanceof n.InvalidBoardError?new Error(`${i.t.invalidBoard}: ${e.data}`):e instanceof n.InvalidHandPieceError?new Error(`${i.t.invalidHandPiece}: ${e.data}`):e instanceof n.InvalidUSIError?new Error(`${i.t.invalidUSI}: ${e.data}`):e}},292(e,t,o){o.d(t,{TM:()=>a.TM,cB:()=>s.c,t:()=>n.t,xC:()=>r});var n=o(636),i=o(987),a=o(87),s=o(517);o(71);function r(e){n.x(e),i.x(e)}},87(e,t,o){var n;o.d(t,{TM:()=>n}),function(e){e.JA="ja",e.EN="en",e.ZH_TW="zh_tw",e.VI="vi"}(n||(n={}));n.JA,n.EN,n.ZH_TW,n.VI},453(e,t,o){var n=o(872);const i={shogiHome:"ShogiHome",clear:"Clear",open:"Open",openNewInstance:"Open New ShogiHome Instance",saveOverwrite:"Overwrite",newRecord:"New Record",newRecordKeepInitialPosition:"New Record (Keep Initial Position)",newRecordHirateSetup:"New Record (Hirate Setup)",openRecord:"Open Record",saveRecord:"Save Record",saveRecordAs:"Save Record As",openAutoSaveDirectory:"Open Auto-Save Directory",exportPositionDiagram:"Export Position Diagram",positionImage:"Position Image",batchConversion:"Batch Conversion",recordFileBatchConversion:"Record File Batch Conversion",close:"Close",quit:"Quit",reload:"Reload",editing:"Edit",copyAsKIF:"Copy (KIF)",copyAsKI2:"Copy (KI2)",copyAsCSA:"Copy (CSA)",copyAsUSI:"Copy (USI)",copyAsSFEN:"Copy (SFEN)",copyAsBOD:"Copy (BOD)",copyAsJKF:"Copy (JKF)",copyAsUSEN:"Copy (USEN)",copy:"Copy",cut:"Cut",paste:"Paste",copyRecordAll:"Copy Record (All)",copyRecordFromCurrentPosition:"Copy Record (From Current Position)",asKIF:"As KIF",asKI2:"As KI2",asCSA:"As CSA",asUSI:"As USI",asUSIUntilCurrentMove:"As USI (Until Current Move)",asUSIAll:"As USI (All)",asJSONKifuFormat:"As JSON Kifu",asUSEN:"As USEN",copyPosition:"Copy Position",asSFEN:"SFEN",asBOD:"BOD",pasteRecordOrPosition:"Paste Record/Position",pasteRecordMerge:"Paste Record (Merge)",toRootPosition:"to Root Position",toCurrentPosition:"to Current Position",addSpecialMove:"Add Special Move",deleteMoves:"Delete Moves from Current Position",view:"View",openLayoutManager:"Open Layout Manager",openMonitorWindow:"Open Monitor Window",toggleFullScreen:"Toggle Full Screen",defaultFontSize:"Default Font Size",increaseFontSize:"Increase Font Size",decreaseFontSize:"Decrease Font Size",settings:"Settings",information:"Info",config:"Config",debug:"Debug",toggleDevTools:"Toggle DevTools",logFile:"Log File",openAppLog:"Open App Log",openUSILog:"Open USI Log",openCSALog:"Open CSA Log",tailAppLog:"Tail App Log",tailUSILog:"Tail USI Log",tailCSALog:"Tail CSA Log",copyAppLogTailCommand:"Copy App Log Tail Command",copyUSILogTailCommand:"Copy USI Log Tail Command",copyCSALogTailCommand:"Copy CSA Log Tail Command",reloadCustomPieceImage:"Reload Custom Piece Image",statisticsReport:"Statistics Report",nextMoveProblemCollection:"Next Move",createNextMoveProblemCollection:"Create Next Move Problems",createProblemCollection:"Create Collection",openProblemCollection:"Open Collection",nextMoveGenerationCompleted:"Next move problem generation completed.",noProblemsWereGeneratedAndFileWasNotCreated:"No positions were adopted, so the collection file was not created.",doYouWantToSaveNProblems:e=>`Do you want to save ${e} problems?`,doYouWantToStartQuiz:"Do you want to start the quiz?",doYouWantToResumeFromWhereYouLeftOff:"Do you want to resume from where you left off?",nextMoveGenerationRequiresAnalyzedRecord:"This feature extracts blunder candidates from analysis comments, then launches an engine to find multiple candidate moves. Please run the analysis feature beforehand to prepare record files with analysis comments.",files:"Files",blunderCandidates:"Blunder Candidates",adoptedProblems:"Adopted Problems",researchedPositions:"Researched Positions",recordDirectory:"Record Directory",winRateDropThreshold:"Win Rate Drop",minWinRate:"Minimum Position Eval",adoptionWinRateDiff:"Adoption Judgment Win Rate Diff",acceptableWinRateDiff:"Correct Answer Range Win Rate Diff",maxProblems:"Max Problems",outputFile:"Output File",problemNofM:(e,t)=>`Problem ${e} / ${t}`,findTheNextMove:"Find the next move!",showChoices:"Show choices",correct:"Correct",incorrect:"Incorrect",correctRate:"Accuracy",actualGameMove:"Actual Game Move",thisMoveWasPlayedInTheGame:"This move was played in the actual game.",doYouWantToTryAgain:"Do you want to try again?",showAnswer:"Show Answer",nextProblem:"Next Problem",previousProblem:"Previous Problem",inOrder:"In Order",sourceRecord:"Source Record",launchUSIEngine:"Launch USI Engine",connectToCSAServer:"Connect to CSA Server",adminMode:"Admin Mode",inAdminModeManuallyInvokeCommandsAtPrompt:"In admin mode, manually invoke commands at the prompt.",setoptionAndPrecedingCommandsAreSentAutomatically:"'setoption' and preceding commands are sent automatically.",serverMustSupportShogiServerX1ModeLogIn:"Server must support shogi-server's x1 mode login.",folders:"Folders",notification:"Notification",notificationTest:"Test Notification",thisIsTestNotification:"This is a test notification.",app:"App",log:"Log",cache:"Cache",downloadedEngines:"Downloaded Engines",help:"Help",openWebsite:"Open Website",openUserGuide:"Open User Guide",openLatestReleasePage:"Open Latest Release Page",openStableReleasePage:"Open Stable Release Page",checkForUpdates:"Check for Updates",license:"License",inputs:"Inputs",outputs:"Outputs",format:"Format",formats:"Formats",subdirectories:"Subdirectories",separate:"Separate",merge:"Merge",createSubdirectories:"Create Subdirectories",nameConflictAction:"Name Conflict Action",numberSuffix:"Number Suffix",skip:"Skip",convert:"Convert",openLogFile:"Open Log File",success:"Success",failed:"Failed",skipped:"Skipped",game:"Game",player:"Player",server:"Server",selectFromHistory:"Select from History",noHistory:"Empty",saveHistory:"Save History",version:"Version",gameProgress:"Game Progress",allGamesCompleted:"All Games Completed",wins:"Wins",winsOnBlack:"Wins(Black)",winsOnWhite:"Wins(White)",draws:"Draws",validGames:"Valid Games",invalidGames:"Invalid Games",eloRatingDiff:"Elo Rating Diff",ignoreDraws:"Ignore Draws",zValue:"Z Value",significance5pc:"5% Significance",significance1pc:"1% Significance",gameEnded:"Game Ended",offlineGame:"Offline Game",csaOnlineGame:"CSA Online Game",csaProtocolOnlineGame:"Online Game (CSA Protocol)",csaProtocolV121:"CSA Protocol 1.2.1 Standard",csaProtocolV121WithPVComments:"CSA Protocol 1.2.1 with PV Comments",host:"Host",portNumber:"Port",password:"Password",revealPassword:"Reveal Password",keepaliveInitialDelay:"Keepalive Initial Delay",blankLinePing:"Blank Line Ping",blankLinePingInitialDelay:"Blank Line Ping Initial Delay",blankLinePingInterval:"Blank Line Ping Interval",logout:"Logout",calculateJishogiPoints:"Calculate Jishogi Points",jishogiPoints:"Jishogi Points",displayGameResults:"Display Game Results",interrupt:"Interrupt",stopGame:"Stop Game",resign:"Resign",draw:"Draw",impass:"Impass",repetitionDraw:"Repetition Draw",repetition:"Repetition",mate:"Mate",noMate:"No Mate",blackWin:"Black Win",whiteWin:"White Win",all:"All",others:"Others",minRate:"Min Rate",mateSearch:"Mate Search",downloaded:"Downloaded",startMateSearch:"Start Mate Search",stopMateSearch:"Stop Mate Search",noMateFound:"No mate.",timePerPosition:"Time per Position",timeout:"Timeout",foulWin:"Foul Win",foulLose:"Foul Lose",enteringOfKing:"Entering of King",winByDefault:"Win by Default",loseByDefault:"Lose by Default",winByDeclaration:"Win by Declaration",declareWin:"Declare Win",research:"Research",startResearch:"Start Research",endResearch:"End Research",startEndResearch:"Start/End Research",recordAnalysis:"Record Analysis",analysis:"Analyze",analyze:"Analyze",stopAnalysis:"Stop Analysis",batchAnalysis:"Batch Analysis",currentRecord:"Current Record",skipAnalyzed:"Skip analyzed",analyzedRecordFilesWillBeOverwritten:"Analyzed record files will be overwritten. Please make a copy of important data in advance.",analysisCompleted:"Analysis completed.",noRecordFileFound:"No record file found.",searchDuplicatePositions:"Search Duplicate Positions",duplicatePositionSearch:"Duplicate Position Search",duplicatePositions:"Duplicate Positions",duplicatePos:"Duplicate",via:"Via",lastMove:"Last Move",nextMoves:"Next Moves",goToThisPosition:"Go to This Position",noDuplicatePositions:"No Duplicate Positions",nDuplicatePositionsFound:e=>`${e} Duplicate Positions Found`,appearanceCount:"Appearance Count",showList:"Show List",setupPosition:"Setup Position",changeTurn:"Change Turn",initializePosition:"Initialize Position",changePieceSet:"Change Piece Set",setAllPiecesToStandardCounts:"Set All Pieces to Standard Counts",setAllPiecesToZero:"Set All Pieces to Zero",addToBlackHandPieceStand:"Add to Black's Piece Stand",addToWhiteHandPieceStand:"Add to White's Piece Stand",addToBoard:"Add to Board",undo:"Undo",redo:"Redo",appSettings:"Preferences",language:"Languages",theme:"Theme",standard:"Standard",green:"Green",cherryBlossom:"Cherry Blossom",selectColor:"Select Color",customImage:"Custom Image",autumn:"Autumn",snow:"Snow",classic:"Classic",beige:"Beige",darkGreen:"Dark Green",dark:"Dark",boardLayout:"Board Layout",compact:"Compact",portrait:"Portrait",portraitSquare:"Portrait (Square Cells)",piece:"Piece",singleKanjiPiece:"Single Kanji",singleKanjiWoodPiece:"Single Kanji (Wood)",singleKanjiGothicPiece:"Single Kanji (Gothic)",singleKanjiDarkPiece:"Single Kanji (Dark)",singleKanjiGothicDarkPiece:"Single Kanji (Gothic, Dark)",twoKanjiPiece:"Two Kanji",imageHasMarginsRemoveForLargerDisplay:"Image has margins (remove for larger display)",backgroundImage:"Background Image",board:"Board",pieceStand:"Piece Stand",woodTexture:"Wood Texture",lightWoodyTexture:e=>`Light Wood Texture (${e})`,warmWoodTexture:e=>`Warm Wood Texture (${e})`,resin:"Resin",transparent:"Transparent",boardOpacity:"Board Opacity",pieceStandOpacity:"Piece Stand Opacity",recordOpacity:"Record Opacity",handPieceOrder:"Hand Piece Order",rookGoldKnightToLeft:"Rook, Gold, and Knight on the Left",rookGoldKnightToRight:"Rook, Gold, and Knight on the Right",promotionSelector:"Promotion Selector",centeredHorizontal:"Centered Horizontal",promoteFirstVertical:"Promote First Vertical",promoteFirstHorizontal:"Promote First Horizontal",enableDragAndDrop:"Drag & Drop",highlightMovableSquares:"Highlight Movable Squares",showFileAndRank:"Show File & Rank",showLeftControls:"Show Left Controls",showRightControls:"Show Right Controls",tabViewStyle:"Tab View Style",oneColumn:"1 Column",twoColumns:"2 Columns",sounds:"Sounds",pieceSoundVolume:"Piece Sound Volume",clockSoundVolume:"Clock Sound Volume",clockSoundPitch:"Clock Sound Pitch",clockSoundTarget:"Clock Sound Target",anyTurn:"Any",onlyHumanTurn:"Human",defaultRecordFileFormat:"Default Record Format",textEncoding:"Text Encoding",strict:"Strict",autoDetect:"Auto Detect",newlineCharacter:"Newline Character",old90sMac:"90's Mac",autoSaving:"Auto-Save",recordFileName:"Record File Name",select:"Select",shuffle:"Shuffle",csaV3Output:"CSA V3 Output",alwaysOutputUTF8:"Always Output UTF-8",someOldShogiAppsCannotReadUTF8KifFiles:"Some older Shogi applications may not be able to read KIF/KI2 files encoded in UTF-8.",strictDecodingMayFailToReadUTF8KifFiles:"When text encoding is set to Strict, loading KIF/KI2 files written in UTF-8 may fail.",positionOfUSIOutput:"Position of USI Output",movesOfUSIOutput:"Moves of USI Output",onlySFEN:"Only SFEN",minimal:"Minimal",pasteDialog:"Paste Dialog",liveDuplicatePositionDetection:"Live Duplicate Position Detection",onTheFlyThreshold:"On-the-fly Threshold",usiProtocol:"USI Protocol",translateOptionName:"Translate Option Name",functionalOnJapaneseOnly:"Functional on Japanese Only",maxStartupTime:"Max Startup Time",forDevelopers:"For Developers",enableAppLog:"Enable App Log",enableUSILog:"Enable USI Log",enableCSALog:"Enable CSA Log",logLevel:"Log Level",manageEngines:"Manage Engines",flipBoard:"Flip Board",elapsedTimeChart:"Elapsed Time Chart",controls:"Controls",useUpDownToMove1Ply:"Use ↑/↓ to Move 1 Ply",useLeftRightToMove1Ply:"Use ←/→ to Move 1 Ply",file:"File",folder:"Folder",recordFile:"Record File",executableFile:"Executable",imageFile:"Image",unsaved:"Unsaved",remove:"Remove",deleteMove:"Delete Move",recordProperties:"Record Properties",comments:"Comments",commentsAndBookmarks:"Comments & Bookmarks",branches:"Branches",branchListMode:"Branch List Mode",tree:"Tree",previousMoveBranches:"Sibling Branches",nextMoveBranches:"Next Move Branches",bookmark:"Bookmark",bookmarkList:"Bookmarks",moveComments:"Move Comments",searchLog:"Search Log",pv:"PV",mateShort:"M",displayPVShort:"Play",evaluation:"Evaluation",rawScore:"Raw Score",score:"Score",estimatedWinRate:"Estimated Win Rate",evaluationAndEstimatedWinRateAndPV:"Evaluation & Estimated Win Rate & PV",swapEachTurnChange:"Swap Each Turn Change",alwaysSenteIsPositive:"Always Sente is Positive",signOfEvaluation:"Sign of Evaluation",showArrowScore:"Show Score on Arrows",arrowScoreDiffRange:"Arrow Score Range",maxArrows:"Max Arrows",winRateCoefficient:"Win Rate Coefficient",nodeCountFormat:"Node Count Format",plainNumber:"Plain",commaSeparated:"Comma Separated",monitor:"Monitor",hideTabView:"Hide",expandTabView:"Expand Tab View",sente:"Sente",senteOrShitate:"Sente (Shitate)",shitate:"Shitate",gote:"Gote",goteOrUwate:"Gote (Uwate)",uwate:"Uwate",targetEngine:"Target Engine",baseEngine:"Base Engine",swapSenteGote:"Swap Sente/Gote",pieceToss:"Piece Toss",opponent:"Opponent",level:"Level",turn:"Turn",currentPosition:"Current Position",positionList:"Position List",enableEngineTimeout:"Enable Engine Timeout",setDifferentTimeForGote:"Set different time for Gote",nextTurn:"Next Move",elapsedTime:"Elapsed Time",elapsed:"Elapsed",rank:"Rank",depth:"Depth",searchEngine:"Search Engine",ponder:"Ponder",numberOfThreads:"Threads",threads:"Threads",suggestionsCount:"Suggestions Count",startPosition:"Position",beginFromThisPosition:"Begin from this position",maxMoves:"Max Moves",gameRepetition:"Repeat",parallelism:"Parallelism",parallelGame:"Parallel Game",jishogi:"Jishogi",rule24:"24-point rule",rule27:"27-point rule",tryRule:"TRY rule",autoRelogin:"Auto Re-Login",restartItEveryGame:"Restart it Every Game",swapTurnWhenGameRepetition:"Swap Turns When Repeat",outputComments:"Output Comments",saveRecordAutomatically:"Save Record Automatically",adjustBoardToHumanPlayer:"Adjust Board to Human Player",adjustBoardAutomatically:"Adjust Board Automatically",command:"Command",startGame:"Start Game",cancelGame:"Cancel Game",allottedTime:"Allotted Time",byoyomi:"Byoyomi",increments:"Increments",startEndCriteria:"Start/End Criteria",descending:"Descending",endCriteria1Move:"End Criteria for 1 Move",outputSettings:"Output Settings",noOutputs:"No Outputs",insertCommentToTop:"Insert to Top",appendCommentToBottom:"Append to Bottom",insertToComment:"Ins. to Comment",insertToRecord:"Ins. to Record",overwrite:"Overwrite",fromPrefix:"from",fromSuffix:"",toPrefix:"to",toSuffix:"",plyPrefix:"",plySuffix:"th move",hoursSuffix:"h",minutesSuffix:"min",secondsSuffix:"sec",eg:"e.g.",totalMoves:"Total Moves",detailSettings:"Detail Settings",engineManagement:"Engine Management",engineName:"Engine Name",author:"Author",description:"Description",earlyPonder:"Early Pondering",enginePath:"Engine Path",openDirectory:"Open Directory",replaceEnginePath:"Replace Engine Path",displayName:"Display Name",frontendBook:"Frontend Book",moveSelection:"Move Selection",bestMove:"Best Move",bookMoveTemperature:"Temperature (lower favors the best move)",showAllOptions:"Show All Options",invoke:"Invoke",resetToEngineDefaultValues:"Reset to default values",defaultValue:"Default Value",freeTextUnsafe:"Free Text (Unsafe)",noEngineRegistered:"No engine",duplicate:"Copy",add:"Add",addFromFile:"Add from File",downloadEngines:"Download",downloadAnEngine:"Download an Engine",engineDownload:"Download Engines",availableEngines:"Available",installedEngines:"Installed",install:"Install",reinstall:"Reinstall",uninstall:"Uninstall",notInstalled:"Not installed",updateAvailable:"Update available",needsRepair:"Needs repair",unused:"Unused",inUse:"In use",downloadSize:"Download size",agreeAndDownload:"Agree and Download",sourceCodeURL:"Source code",noDownloadableEngine:"No engines available for download.",noInstalledEngine:"No engines installed.",enginesAddedPleaseSave:'Added to the engine list. Press "Save and Close" in Engine Management to apply.',enginesUpdatedPleaseSave:'The engine has been updated. Press "Save and Close" in Engine Management to apply.',areYouSureWantToUninstallEngine:e=>`Delete the downloaded files of ${e}?`,downloadedFileIsCorrupted:"The downloaded file is corrupted",engineIsInUse:"The engine is in use. Please stop the game or research and try again.",compareAndMerge:"Compare & Merge",compareEngineSettings:"Compare Engine Settings",noDifference:"No Difference",mergeToLeft:"Merge to Left",mergeToRight:"Merge to Right",recommended:"Recommended",import:"Import",saveAndClose:"Save & Close",save:"Save",saveAs:"Save As",history:"History",clearHistory:"Clear History",userFile:"User File",automaticBackup:"Automatic Backup",restore:"Restore",filterByFilePathOrContent:"Filter by File Path or Content",loadingFileContents:"Loading files...",loadRecordFromWeb:"Load Record from Web",backToMainBranch:"Back to Main Branch",fetchLatestData:"Fetch Latest Data",sourceURL:"Source URL",ok:"OK",cancel:"Cancel",yes:"Yes",no:"No",back:"Back",doNotShowAgain:"Do not show again",name:"Name",prediction:"Prediction",best:"Best",nodes:"Nodes",hashUsage:"Hash Usage",stop:"Stop",resume:"Resume",noHandicap:"No Handicap",lanceHandicap:"Lance Handicap",rightLanceHandicap:"Right Lance Handicap",bishopHandicap:"Bishop Handicap",rookHandicap:"Rook Handicap",rookLanceHandicap:"Rook-Lance Handicap",twoPiecesHandicap:"2 Pieces Handicap",fourPiecesHandicap:"4 Pieces Handicap",sixPiecesHandicap:"6 Pieces Handicap",eightPiecesHandicap:"8 Pieces Handicap",tenPiecesHandicap:"10 Pieces Handicap",tsumeShogi:"Tsume Shogi",doubleKingTsumeShogi:"2-Kings Tsume Shogi",startDateTime:"Start",endDateTime:"End",gameDate:"Date",tournament:"Tournament",strategy:"Strategy",gameTitle:"Title",timeLimit:"Time Limit",blackTimeLimit:"Time Limit (Sente)",whiteTimeLimit:"Time Limit (Gote)",place:"Place",postedOn:"Posted On",note:"Note",senteShortName:"Sente(short)",goteShortName:"Gote(short)",scorekeeper:"Scorekeeper",opusNo:"Opus No.",opusName:"Opus Name",publishedBy:"Published By",publishedOn:"Published On",source:"Source",numberOfMoves:"Number of Moves",integrity:"Integrity",recordCategory:"Category",award:"Award",filterByOptionName:"Filter by Option Name",filterByEngineName:"Filter by Engine Name",bookStyle:"Book Style",bookStyleDiagram:"Book Style Diagram",gameStyle:"Game Style",thin:"Thin",bold:"Bold",extraBold:"Extra Bold",playerName:"Player Name",typeface:"Typeface",weight:"Weight",handLabel:"Hand Label",lastMoveColor:"Last Move Color",header:"Header",vertical:"Vertical",size:"Size",none:"None",bgCover:"Cover",bgContain:"Contain",bgTile:"Tile",inaccuracy:"Inaccuracy",dubious:"Dubious",mistake:"Mistake",blunder:"Blunder",inaccuracyThreshold:"Inaccuracy Threshold",dubiousThreshold:"Dubious Threshold",mistakeThreshold:"Mistake Threshold",blunderThreshold:"Blunder Threshold",maxPVLength:"Max PV Length",commentFormat:"Comment Format",gothic:"Gothic",mincho:"Mincho",appVersion:"App Version",installed:"Installed",stable:"Stable",latest:"Latest",backgroundColor:"Background Color",dialogPosition:"Dialog Position",alignLeft:"Left",alignRight:"Right",alignCenter:"Center",dialogBackdrop:"Dialog Backdrop",record:"Record",book:"Book",bookInfo:"Book Information",resetBook:"Initialize Book",moveEvaluation:"Move Evaluation",forced:"Forced",goodMove:"Good",yane2016BookFile:"YaneuraOu Book File",ybbBookFile:"YaneuraOu Binary Book File",shogiGUIBookFile:"ShogiGUI Book File",aperyBookFile:"Apery Book File",loadingMode:"Loading Mode",positionCount:"Position Count",gameCount:"Games",statistics:"Statistics",chart:"Chart",analytics:"Analytics",controlGroup:"Control Group",left:"Left",top:"Top",width:"Width",height:"Height",newCustomProfile:"New Custom Profile",addCustomLayoutProfile:"Add Custom Layout Profile",duplicateCurrentProfile:"Duplicate Current Profile",removeCurrentProfile:"Remove Current Profile",exportProfileToClipboard:"Export Profile to Clipboard",importProfileFromClipboard:"Import Profile from Clipboard",editLayoutWithDragAndDrop:"Edit with Drag and Drop",stretchCustomLayout:"Scale to Fit Screen",profileExportedToClipboard:"Profile exported to clipboard.",profileImported:"Profile imported.",failedToImportProfile:"Failed to import profile.",rightControlBox:"Right Control Box",leftControlBox:"Left Control Box",topControlBox:"Top Control Box",legends:"Legends",historyMode:"History Mode",headers:"Headers",playButton:"Play Button",insert:"Insert",bringForward:"Bring Forward",sendBackward:"Send Backward",move:"Move",bookMove:"Book Move",play:"Play",edit:"Edit",addMoves:"Add Moves",export:"Export",flippedBook:"Flipped Book",addBookMoves:"Add Book Moves",fromCurrentRecord:"From Current Record",fromFile:"From File",fromDirectory:"From Directory",noMoves:"No Moves",noComment:"No Comment",register:"Register",update:"Update",importAll:"Register All",doYouWantToImportAllMoves:"Do you want to import all available moves?",importedMoves:e=>`Imported ${e} move(s).`,currentMove:"Current Move",branchFrom:e=>`Branch from ${e}th Move`,allPlayers:"All Players",blackPlayerOnly:"Black Player Only",whitePlayerOnly:"White Player Only",filterByName:"Filter by Name",importScoreFromComment:"Import scores from comments",enterPartOfPlayerNameHere:"Enter part of player name here",freq:"Freq.",frequency:"Frequency",new:"New",duplicated:"Duplicated",moveEntry:"Entry",updatedAt:"Updated At",createdAt:"Created At",lastSent:"Last Sent",lastReceived:"Last Received",protocolVersion:"Protocol Version",prompt:"Prompt",openPrompt:"Open Prompt",forceQuit:"Force Quit",forceClose:"Force Close",blankLine:"Blank Line",autoScroll:"Auto Scroll",showTimestamp:"Show Timestamp",highlightByPartialMatch:"Highlight by Partial Match",csaServer:"CSA Server",usiEngine:"USI Engine",noRunningUSIEngine:"No running USI engine.",noConnectedCSAServer:"No connected CSA server.",willBeRemovedFromTheListSoon:"This session is closed, will be removed from the list soon.",typeCommandHereAndPressEnter:"Type command here and press Enter.",allowBlankLine:"Allow Blank Line",removeSpaceFromBothEnds:"Remove Space from Both Ends",collapseSequentialSpaces:"Collapse Sequential Spaces",typeCustomTitleHere:"Type custom title here",typeCustomCommentHere:"Type custom comment here",displayEmptyElements:"Display Empty Elements",share:"Share",waitingForNewGame:"Waiting for new game.",waitingForPlayerSetup:"Waiting for player setup.",insertedComment:"Inserted comment.",conversionCompleted:"Conversion completed.",human:"Human",randomPlayer:"Random Player",beginner:"Beginner",staticRook:"Static Rook",rangingRook:"Ranging Rook",pleaseSelectEngines:"Please select engines.",thisItemCannotBeMerged:"This item cannot be merged.",tryingToConnectAndLoginToCSAServer:"Trying to connect and login to CSA server.",inBrowserLogsOutputToConsoleAndIgnoreThisSetting:"*In web browser version, it will output logs to console and ignore this setting.",shouldRestartToApplyLogSettings:"*You should restart this app to apply log settings.",canOpenLogDirectoryFromMenu:'*You can open log directory from "Debug" - "Open Log Directory" menu.',hasNoOldLogCleanUpFeature:"*This app has no clean-up feature. Please remove old logs manually.",shouldRestartToApplyLowLevelSettings:"*You should restart this app to apply low-level settings.",processingPleaseWait:"Processing, please wait.",importingFollowingRecordOrPosition:"Importing the following record(or position).",supportsKIF_KI2_CSA_USI_SFEN_JKF_USEN:"*Supports KIF, KI2, CSA, USI, SFEN, JKF, and USEN.",pleasePasteRecordIntoTextArea:"*Please paste record data into the text area.",pleaseSpecifyPlainTextURL:"*Please specify plain text URL.",redirectNotSupported:"*Redirect is not supported.",desktopVersionPastesAutomatically:"*In desktop version, it will paste automatically from clipboard.",asNewFile:"as New File",mergeToRootPosition:"Merge to Root Position",mergeToCurrentPosition:"Merge to Current Position",failedToMergeRecordWithDifferentInitialPosition:"Failed to merge record with different initial position.",failedToMergeRecordWithDifferentTurn:"Failed to merge record with different turn.",earlyPonderFeatureSendsPonderhitCommandWithYaneuraOusNonStandardOptions:'Early ponder feature sends "ponderhit" command with YaneuraOu\'s non-standard options.',ifYourEngineNotSupportTheOptionsItMayCauseUnexpectedBehavior:"If your engine does not support the options, it may cause unexpected behavior.",someLogsDisabled:"Some log settings are disabled.",logsRecommendedForCSAProtocol:"Log settings are recommended for CSA protocol.",blankLinePingRecommendedToPreventTimeout:"It is recommended to enable Blank Line Ping to prevent connection timeout.",pleaseEnableLogsAndRestart:"Please enable log settings and restart this app.",hwaEnabled:"HWA(Hardware Acceleration) Enabled",hwaIsNotRecommendedForLongGames:"HWA is not recommended for long games.",pleaseDisableHWAAndRestart:"Please disable HWA in app settings and restart this app.",notSendPVOnStandardCSAProtocol:"Client do not send PV on standard CSA protocol.",passwordWillSavedPlaintextBecauseOSSideEncryptionNotAvailable:"Password will saved as plaintext because OS side encryption is not available.",pleaseUncheckSaveHistoryIfNotWantSave:"Please uncheck Save History, if you don't want to save.",floodgatePasswordShouldStartWithGameName:"Floodgate's password should start with game name.",thisIsNotFloodgateOfficialGameName:"This is not Floodgate official game name.",yourPasswordDoesNotMeetFloodgateRequirementsDoYouStillWantToContinue:"Your password does not meet Floodgate's requirements. Do you still want to continue?",translationHelpNeeded:"We'd like your help to translate.",restartRequiredAfterLocaleChange:"You should restart this app to change the language.",confirmSwitchLanguage:e=>`Do you want to switch the display language to "${e}"?`,createDesktopShortcut:"Create desktop shortcut",desktopShortcutCreated:"Desktop shortcut created.",areYouSureWantToResign:"Are you sure you want to resign?",areYouSureWantToDoDeclaration:"Are you sure you want to do declaration?",areYouSureWantToQuitGames:"Are you sure you want to quit games?",areYouSureWantToRequestQuit:"You have possibility to be loser. Are you sure you want to request quit?",areYouSureWantToClearRecord:"Are you sure you want to clear record?",areYouSureWantToOpenFileInsteadOfCurrentRecord:"Are you sure you want to open the file instead of current record?",areYouSureWantToClearHistory:"Are you sure you want to clear history?",areYouSureWantToRemoveCurrentProfile:"Are you sure you want to remove current profile?",yamlFormatSettingsCopiedToClipboard:"YAML format settings copied to clipboard.",jsonFormatSettingsCopiedToClipboard:"JSON format settings copied to clipboard.",usiCsaBridgeCommandCopiedToClipboard:"usi-csa-bridge command copied to clipboard.",positionImageCopiedToClipboard:"Position image copied to clipboard.",copiedToClipboard:"Copied to clipboard.",pastedFromClipboard:"Pasted from clipboard.",youCanNotCloseAppWhileCSAOnlineGame:"You cannot close app while CSA online game.",fileExtensionNotSupported:"File extension is not supported.",errorOccuredWhileDisconnectingFromCSAServer:"An error occured while disconnecting from CSA server.",failedToConnectToCSAServer:"Failed to connect to CSA server.",errorOccuredWhileLogoutFromCSAServer:"An error occured while logout from CSA server.",disconnectedFromCSAServer:"Disconnected from CSA server.",csaServerLoginDenied:"CSA server login denied.",thisFeatureNotAvailableOnWebApp:"This feature is not available on web app.",failedToLoadEngine:"Failed to load the engine.",engineRequiresOnline:"Loading the engine requires an internet connection.",engineRequiresReload:"Reload the page to use the engine.",failedToStartNewGame:"Failed to start new game.",errorOccuredWhileEndingGame:"An error occured while ending game.",failedToSendGoCommand:"Failed to send go-command.",failedToSendPonderCommand:"Failed to send ponder-command.",failedToSendStopCommand:"Failed to send stop-command.",failedToShutdownEngines:"Failed to shutdown engines.",failedToCheckUpdates:"Failed to check updates.",youAreUsingTheLatestVersion:"You are using the latest version.",newVersionIsAvailablePressToUpdate:"A new version is available. Press here to update.",failedToSaveRecord:"Failed to save record.",failedToParseSFEN:"Failed to parse SFEN.",failedToDetectRecordFormat:"Failed to detect record format.",unknown:"Unknown",unknownFileExtension:"Unknown file extension.",emptyRecordInput:"Empty record input.",invalidPieceName:"Invalid piece name",invalidTurn:"Invalid turn",invalidMove:"Invalid move",invalidMoveNumber:"Invalid move number",invalidDestination:"Invalid destination",pieceNotExists:"Piece not exists",invalidLine:"Invalid line",invalidBoard:"Invalid board",invalidHandPiece:"Invalid hand piece",invalidUSI:"Invalid USI",engineProcessWasClosedUnexpectedly:"The engine process was closed unexpectedly.",backgroundImageFileNotSelected:"Background image file is not selected.",pieceImageFileNotSelected:"Piece image file is not selected.",boardImageFileNotSelected:"Board image file is not selected.",pieceStandImageFileNotSelected:"Piece stand image file is not selected.",pieceSoundVolumeMustBe0To100Percent:"Piece sound volume must be 0% to 100%.",clockSoundVolumeMustBe0To100Percent:"Clock sound volume must be 0% to 100%.",clockSoundPitchMustBe220To880Hz:"Clock sound pitch must be 220Hz to 880Hz.",engineTimeoutMustBe1To300Seconds:"Engine timeout must be 1 to 300 seconds.",coefficientInSigmoidMustBeGreaterThan0:"Coefficient in sigmoid must be greater than 0.",inaccuracyThresholdMustBe1To100Percent:"Inaccuracy must be 1% to 100%.",dubiousThresholdMustBe1To100Percent:"Dubious threshold must be 1% to 100%.",mistakeThresholdMustBe1To100Percent:"Mistake threshold must be 1% to 100%.",blunderThresholdMustBe1To100Percent:"Blunder threshold must be 1% to 100%.",recordSavedWithGarbledCharacters:"The record has saved with some garbled characters.",pleaseConsiderToUseKIFU:"Please consider to use KIFU(UTF-8).",youCanChangeDefaultRecordFileFormatFromAppSettings:"You can change default record file format from App Settings.",inaccuracyThresholdMustBeLessThanDubiousThreshold:"Inaccuracy threshold must be less than dubious threshold.",dubiousThresholdMustBeLessThanMistakeThreshold:"Dubious threshold must be less than mistake threshold.",mistakeThresholdMustBeLessThanBlunderThreshold:"Mistake threshold must be less than blunder threshold.",thisEngineNotSupportsMateSearch:"This engine does not support mate search.",pleaseEndActiveFeaturesBeforeOpenRecord:"Please end active features before open record.",bothTimeLimitAndByoyomiAreNotSet:"Both time limit and byoyomi are not set.",canNotUseByoyomiWithFischer:"You cannot use Byoyomi with Fischer.",repeatsMustBeOneIfHumanPlayerIncluded:"The number of repeats must be 1, if a human player is included.",parallelismMustBeOneIfHumanPlayerIncluded:"Parallelism must be 1 if a human player is included.",parallelismMustBeOneIfCurrentPositionIsUsed:"Parallelism must be 1 if current position is used.",parallelismMustLessThanOrEqualToRepeats:"Parallelism must be less than or equal to the number of repeats.",protocolVersionNotSelected:"Protocol version is not selected.",hostNameIsEmpty:"Host name is empty.",invalidPortNumber:"Invalid port number.",idIsEmpty:"ID is empty.",idContainsSpace:"ID contains space.",passwordContainsSpace:"Password contains space.",tcpKeepaliveInitialDelayMustBePositive:"TCP keepalive initial delay must be positive.",blankLinePingInitialDelayMustBeGreaterThanOrEqualTo30:"Blank line ping initial delay must be >=30.",blankLinePingIntervalMustBeGreaterThanOrEqualTo30:"Blank line ping interval must be >=30.",engineNotSelected:"Engine is not selected.",forExportingConversionLogPleaseEnableAppLogsAndSetLogLevelDebugAndRestart:"For exporting conversion log, please enable app logs, set log level to DEBUG and restart this app.",sourceDirectoryNotSpecified:"Source directory is not specified.",sourceFileMustBeSFEN:"Source file must have a .sfen extension.",sourceFormatsNotSpecified:"Source formats are not specified.",destinationDirectoryNotSpecified:"Destination directory is not specified.",destinationFileNotSpecified:"Destination file is not specified.",destinationFileMustBeJSON:"Destination file must have a .json extension.",anyUnsavedDataWillBeLostDoYouReallyWantToResetBookData:"Any unsaved data will be lost. Do you really want to reset book data?",bookMovesWereImported:"Book moves were imported.",anyBookMovesAreUnsavedDoYouReallyWantToDiscardThemAndCloseTheApp:"Any book moves are unsaved. Do you really want to discard them and close the app?",cannotOverwriteOnTheFlyBook:"On-the-fly books cannot be overwritten.",pleaseSpecifyOtherFileName:"Please specify another file name.",memoryShortageOnBookConversionMayLoseUnsavedData:"Memory shortage during book data conversion may cause loss of unsaved data.",cannotConvertAperyBookToOtherFormat:"Apery book cannot be converted to other formats.",sourceRecordFileNotSet:"Source record file is not set.",sourceDirectoryNotSet:"Source directory is not set.",minPlyMustBeLessThanMaxPly:"Min ply must be less than max ply.",playerNameNotSet:"Player name is not set.",incompatibleOptionsWillBeDiscardedDoYouReallyWantToReplaceTheEnginePath:"Incompatible options will be discarded. Do you really want to replace the engine path?",largeSuggestionsCountMayCausePerformanceDegradation:"Large suggestions count may cause performance degradation.",doYouReallyWantToIncreaseTheSuggestionsCount:"Do you really want to increase the suggestions count?",recommendLowerSettingsForDailyUse:"Recommend lower settings for daily use.",checkEngineCompatibilityForNumaEnvironments:"This machine may have multiple CPU sockets or processor groups (NUMA). Not all engines handle NUMA environments optimally. Please check whether your engine supports NUMA.",aiPerformanceMayDegrade:"AI performance may degrade.",yourPCMayBecomeSlow:"Your PC may become slow.",increasingItMayImproveAIPerformance:"Increasing it may improve AI performance.",totalNumber:e=>`Total: ${e}`,number:e=>""+e,tryToReloginToCSAServerNSecondsLater:e=>`Try to relogin to the CSA server in ${e} seconds.`,mateInNPlyDoYouWantToDisplay:e=>`Mate in ${e} ply. Do you want to display it?`,insertedNMovesToRecord:e=>`Inserted ${e} moves to the record.`,errorsOccurred:e=>e>=2?`${e} errors have occurred.`:`${e} error has occurred.`,between:(e,t)=>`between ${e} and ${t}`,addNthEngine:e=>`Add ${(0,n.IE)(e)} engine`,copyOf:e=>`${e} (copy)`,keepLatest:e=>`keep latest ${e}`,followingDataNotSavedBecauseNotSupporetedBy:e=>`The following data was not saved because it is not supporeted by "${e}".`,areYouSureWantToDeleteFollowingMove:e=>`Are you sure you want to delete th ${e}th move and the following moves?`,failedToOpenDirectory:e=>`Failed to open directory of the file: ${e}`,unexpectedEventSenderPleaseReport:e=>`Unexpected event sender. Please report this error message to developer. [${e}]`,unexpectedHTTPMethodPleaseReport:e=>`Unexpected HTTP method. Please report this error message to developer. [${e}]`,unexpectedRequestURLPleaseReport:e=>`Unexpected request URL. Please report this error message to developer. [${e}]`,noResponseFromEnginePleaseExtendTimeout:e=>`No response from the engine for ${e} seconds. Please extend the timeout in the "USI Protocol" tab of the app settings if your engine is slow.`,stableVersionReleased:e=>`Stable version ${e} released!`,latestVersionReleased:e=>`Latest version ${e} released!`,doYouReallyWantToRemoveBookMove:e=>`Do you really want to remove the book move "${e}"?`,unexpectedRecordFileExtension:e=>`Unexpected record file extension: [${e}]`,fileNotFound:e=>`File not found. [${e}]`,directoryNotFound:e=>`Directory not found. [${e}]`,youCanExitFullScreenByPressing:e=>`You can exit full screen by pressing ${e} key.`,skippedMovesInMerge:(e,t)=>`${e} / ${t} moves were skipped in the merge.`,cpuUsageExceedsNPercent:e=>`CPU usage exceeds ${e}%.`,totalNumberOfThreadsExceedsNPercentOfCpuCores:e=>`The total number of threads exceeds ${e}% of CPU cores.`,memoryUsageExceedsNPercent:e=>`Memory usage exceeds ${e}%.`,memoryUsageIsLessThanNPercent:e=>`Memory usage is less than ${e}%.`,totalUSIHashExceedsNPercentOfMemory:e=>`The total USI_Hash exceeds ${e}% of memory.`,heapUsageExceedsNGBMayHang:e=>`Memory usage has exceeded ${e} GB. If the upward trend continues, the app may hang.`,settingsFileCorruptedMovedAndReset:(e,t)=>`The settings file ${e} was corrupted and could not be loaded. The broken file was moved to ${t}, and default settings will be used.`};o.d(t,["en",0,i])},943(e,t,o){const n={shogiHome:"ShogiHome",clear:"初期化",open:"開く",openNewInstance:"新しい ShogiHome ウィンドウを開く",saveOverwrite:"上書き保存",newRecord:"新規棋譜",newRecordKeepInitialPosition:"新規棋譜 (同じ初形)",newRecordHirateSetup:"新規棋譜(平手初形)",openRecord:"棋譜を開く",saveRecord:"棋譜を上書き保存",saveRecordAs:"棋譜を名前を付けて保存",openAutoSaveDirectory:"自動保存先を開く",exportPositionDiagram:"局面図を出力",positionImage:"局面図",batchConversion:"一括変換",recordFileBatchConversion:"棋譜ファイル一括変換",close:"閉じる",quit:"終了",reload:"再読み込み",editing:"編集",copyAsKIF:"コピー・KIF",copyAsKI2:"コピー・KI2",copyAsCSA:"コピー・CSA",copyAsUSI:"コピー・USI",copyAsSFEN:"コピー・SFEN",copyAsBOD:"コピー・BOD",copyAsJKF:"コピー・JKF",copyAsUSEN:"コピー・USEN",copy:"コピー",cut:"切り取り",paste:"貼り付け",copyRecordAll:"棋譜コピー(初手から)",copyRecordFromCurrentPosition:"棋譜コピー(現在の局面から)",asKIF:"KIF形式",asKI2:"KI2形式",asCSA:"CSA形式",asUSI:"USI形式",asUSIUntilCurrentMove:"USI形式(現在の指し手まで)",asUSIAll:"USI形式(全て)",asJSONKifuFormat:"JSON棋譜フォーマット",asUSEN:"USEN",copyPosition:"局面コピー",asSFEN:"SFEN形式",asBOD:"BOD形式",pasteRecordOrPosition:"棋譜・局面貼り付け",pasteRecordMerge:"棋譜貼り付け(マージ)",toRootPosition:"棋譜の先頭へ",toCurrentPosition:"現在の位置へ",addSpecialMove:"特殊な指し手",deleteMoves:"現在の位置から棋譜を削除",view:"表示",openLayoutManager:"レイアウトマネージャー",openMonitorWindow:"監視ウィンドウ",toggleFullScreen:"全画面表示切り替え",defaultFontSize:"標準の文字サイズ",increaseFontSize:"文字を拡大",decreaseFontSize:"文字を縮小",settings:"設定",information:"情報",config:"設定",debug:"デバッグ",toggleDevTools:"開発者ツール表示切り替え",logFile:"ログファイル",openAppLog:"アプリログを開く",openUSILog:"USI通信ログを開く",openCSALog:"CSA通信ログを開く",tailAppLog:"アプリログをTailする",tailUSILog:"USI通信ログをTailする",tailCSALog:"CSA通信ログをTailする",copyAppLogTailCommand:"アプリログのTailコマンドをコピー",copyUSILogTailCommand:"USI通信ログのTailコマンドをコピー",copyCSALogTailCommand:"CSA通信ログのTailコマンドをコピー",reloadCustomPieceImage:"カスタム駒画像をリロード",statisticsReport:"統計情報",nextMoveProblemCollection:"次の一手",createNextMoveProblemCollection:"次の一手問題集の作成",createProblemCollection:"問題集の作成",openProblemCollection:"問題集を開く",nextMoveGenerationCompleted:"次の一手問題集の作成が完了しました。",noProblemsWereGeneratedAndFileWasNotCreated:"採用できる局面がなかったため、問題集ファイルは作成されませんでした。",doYouWantToSaveNProblems:e=>`作成済みの${e}問を保存しますか?`,doYouWantToStartQuiz:"出題を開始しますか?",doYouWantToResumeFromWhereYouLeftOff:"前回の続きから再開しますか?",nextMoveGenerationRequiresAnalyzedRecord:"問題集作成機能では解析コメントで悪手の候補を抽出してから、エンジンを起動して複数の候補手を求めます。事前に解析機能を実行して解析コメント付きの棋譜を用意してください。",files:"ファイル数",blunderCandidates:"悪手候補",adoptedProblems:"採用した問題",researchedPositions:"再探索済みの局面",recordDirectory:"棋譜ディレクトリ",winRateDropThreshold:"勝率降下幅",minWinRate:"対象局面評価の下限",adoptionWinRateDiff:"採用判定の勝率差",acceptableWinRateDiff:"正解範囲の勝率差",maxProblems:"問題数の上限",outputFile:"出力ファイル",problemNofM:(e,t)=>`問題 ${e} / ${t}`,findTheNextMove:"次の一手は?",showChoices:"選択肢を表示",correct:"正解",incorrect:"不正解",correctRate:"正解率",actualGameMove:"実戦の手",thisMoveWasPlayedInTheGame:"実戦で指された手です。",doYouWantToTryAgain:"もう一度チャレンジしますか?",showAnswer:"答えを見る",nextProblem:"次の問題",previousProblem:"前の問題",inOrder:"順番どおり",sourceRecord:"出典棋譜",launchUSIEngine:"USIエンジンを起動",connectToCSAServer:"CSAサーバーに接続",adminMode:"管理モード",inAdminModeManuallyInvokeCommandsAtPrompt:"管理モードではプロンプトから手動でコマンドを実行する必要があります。",setoptionAndPrecedingCommandsAreSentAutomatically:"setoptionコマンドまでのコマンドは自動で送信されます。",serverMustSupportShogiServerX1ModeLogIn:"サーバーは shogi-server の拡張モード (x1) ログインをサポートしている必要があります。",folders:"各種フォルダ",notification:"通知",notificationTest:"通知テスト",thisIsTestNotification:"これは通知のテストです。",app:"アプリ",log:"ログ",cache:"キャッシュ",downloadedEngines:"ダウンロードしたエンジン",help:"ヘルプ",openWebsite:"Webサイトを開く",openUserGuide:"使い方を開く",openLatestReleasePage:"最新版リリースページを開く",openStableReleasePage:"安定版リリースページを開く",checkForUpdates:"アップデートを確認",license:"ライセンス",inputs:"入力",outputs:"出力",format:"フォーマット",formats:"フォーマット",subdirectories:"サブディレクトリ",separate:"個別",merge:"マージ",createSubdirectories:"サブディレクトリ作成",nameConflictAction:"名前衝突時の動作",numberSuffix:"番号付与",skip:"スキップ",convert:"変換",openLogFile:"ログファイルを開く",success:"成功",failed:"失敗",skipped:"スキップ",game:"対局",player:"プレイヤー",server:"サーバー",selectFromHistory:"履歴から選ぶ",noHistory:"履歴がありません",saveHistory:"履歴に保存する",version:"バージョン",gameProgress:"対局の経過",allGamesCompleted:"連続対局終了",wins:"勝ち数",winsOnBlack:"勝ち数(先手)",winsOnWhite:"勝ち数(後手)",draws:"引き分け",validGames:"有効対局数",invalidGames:"無効対局数",eloRatingDiff:"レーティング差",ignoreDraws:"引き分け無効",zValue:"Z値",significance5pc:"有意水準5%",significance1pc:"有意水準1%",gameEnded:"対局終了",offlineGame:"ローカル対局",csaOnlineGame:"通信対局(CSA)",csaProtocolOnlineGame:"通信対局(CSAプロトコル)",csaProtocolV121:"CSAプロトコル1.2.1 標準",csaProtocolV121WithPVComments:"CSAプロトコル1.2.1 読み筋コメント付き",host:"接続先ホスト",portNumber:"ポート番号",password:"パスワード",revealPassword:"パスワードを表示する",keepaliveInitialDelay:"Keepalive初期遅延",blankLinePing:"空行Ping",blankLinePingInitialDelay:"空行Ping初期遅延",blankLinePingInterval:"空行Ping間隔",logout:"ログアウト",calculateJishogiPoints:"持将棋の点数を計算",jishogiPoints:"持将棋の点数",displayGameResults:"戦績確認",interrupt:"中断",stopGame:"対局中断",resign:"投了",draw:"引き分け",impass:"持将棋",repetitionDraw:"千日手",repetition:"千日手",mate:"詰み",noMate:"不詰",blackWin:"先手勝ち",whiteWin:"後手勝ち",all:"全て",others:"その他",minRate:"最小レート",mateSearch:"詰み探索",downloaded:"ダウンロード",startMateSearch:"詰み探索開始",stopMateSearch:"詰み探索終了",noMateFound:"詰みが見つかりませんでした。",timePerPosition:"思考時間",timeout:"時間切れ",foulWin:"反則勝ち",foulLose:"反則負け",enteringOfKing:"入玉勝ち",winByDefault:"不戦勝",loseByDefault:"不戦敗",winByDeclaration:"宣言勝ち",declareWin:"勝ち宣言",research:"検討",startResearch:"検討開始",endResearch:"検討終了",startEndResearch:"検討開始/終了",recordAnalysis:"棋譜解析",analysis:"解析",analyze:"解析開始",stopAnalysis:"解析中断",batchAnalysis:"連続棋譜解析",currentRecord:"現在の棋譜",skipAnalyzed:"解析済みをスキップ",analyzedRecordFilesWillBeOverwritten:"解析した棋譜ファイルは上書きされます。重要なデータは事前にコピーを作成してください。",analysisCompleted:"解析が完了しました。",noRecordFileFound:"対象の棋譜ファイルが見つかりません。",searchDuplicatePositions:"同一局面を検索",duplicatePositionSearch:"同一局面検索",duplicatePositions:"同一局面",duplicatePos:"同一局面",via:"経路",lastMove:"直前の指し手",nextMoves:"次の指し手",goToThisPosition:"この局面へ移動",noDuplicatePositions:"重複する局面はありません。",nDuplicatePositionsFound:e=>`${e} 件の重複する局面が見つかりました。`,appearanceCount:"出現数",showList:"一覧を表示",setupPosition:"局面編集",changeTurn:"手番変更",initializePosition:"局面の初期化",changePieceSet:"駒の増減",setAllPiecesToStandardCounts:"全ての駒を平手の枚数にする",setAllPiecesToZero:"全ての駒を0にする",addToBlackHandPieceStand:"先手の駒台に追加",addToWhiteHandPieceStand:"後手の駒台に追加",addToBoard:"盤に追加",undo:"元に戻す",redo:"やり直す",appSettings:"アプリ設定",language:"言語",theme:"テーマ",standard:"標準",green:"緑",cherryBlossom:"桜",selectColor:"色を選択",customImage:"カスタム画像",autumn:"紅葉",snow:"雪",classic:"クラシック",beige:"ベージュ",darkGreen:"深緑",dark:"ダーク",boardLayout:"盤レイアウト",compact:"コンパクト",portrait:"ポートレイト",portraitSquare:"ポートレイト(正方形マス)",piece:"駒",singleKanjiPiece:"一文字駒",singleKanjiWoodPiece:"一文字駒(木目)",singleKanjiGothicPiece:"一文字駒(ゴシック体)",singleKanjiDarkPiece:"一文字駒(ダーク)",singleKanjiGothicDarkPiece:"一文字駒(ゴシック体・ダーク)",twoKanjiPiece:"二文字駒",imageHasMarginsRemoveForLargerDisplay:"画像に余白が含まれている(除去して大きく表示)",backgroundImage:"背景画像",board:"盤",pieceStand:"駒台",woodTexture:"木目",lightWoodyTexture:e=>`木目(明${e})`,warmWoodTexture:e=>`木目(暖${e})`,resin:"樹脂",transparent:"透過表示",boardOpacity:"盤の不透明度",pieceStandOpacity:"駒台の不透明度",recordOpacity:"棋譜の不透明度",handPieceOrder:"持ち駒の並び順",rookGoldKnightToLeft:"飛・金・桂を左に",rookGoldKnightToRight:"飛・金・桂を右に",promotionSelector:"成・不成の表示",centeredHorizontal:"水平・中央寄せ",promoteFirstVertical:"垂直・成優先",promoteFirstHorizontal:"水平・成優先",enableDragAndDrop:"駒のドラッグ操作",highlightMovableSquares:"移動可能なマスを表示",showFileAndRank:"段・筋を表示",showLeftControls:"左側操作ボタンを表示",showRightControls:"右側操作ボタンを表示",tabViewStyle:"タブビューの形式",oneColumn:"1列",twoColumns:"2列",sounds:"音",pieceSoundVolume:"駒音の大きさ",clockSoundVolume:"時計音の大きさ",clockSoundPitch:"時計音の高さ",clockSoundTarget:"時計音の対象",anyTurn:"全ての手番",onlyHumanTurn:"人間の手番のみ",defaultRecordFileFormat:"デフォルトの保存形式",textEncoding:"文字コード",strict:"厳格",autoDetect:"自動判定",newlineCharacter:"改行文字",old90sMac:"90年代Mac",autoSaving:"自動保存",recordFileName:"棋譜ファイル名",select:"選択",shuffle:"シャッフル",csaV3Output:"CSA V3 で出力",alwaysOutputUTF8:"常に UTF-8 で出力",someOldShogiAppsCannotReadUTF8KifFiles:"一部の古い将棋アプリでは UTF-8 の KIF・KI2 ファイルを読み込めない場合があります。",strictDecodingMayFailToReadUTF8KifFiles:"文字コードの設定が「厳格」の場合、UTF-8 で書き出した KIF・KI2 ファイルの読み込みに失敗する可能性があります。",positionOfUSIOutput:"USI の局面表記",movesOfUSIOutput:"USI の指し手表記",onlySFEN:"SFEN のみ",minimal:"最小限",pasteDialog:"貼り付けダイアログ",liveDuplicatePositionDetection:"同一局面を常に検出",onTheFlyThreshold:"On-the-fly 閾値",usiProtocol:"USIプロトコル",translateOptionName:"オプション名を翻訳",functionalOnJapaneseOnly:"日本語選択時のみ有効",maxStartupTime:"最大起動待ち時間",forDevelopers:"開発者向け",enableAppLog:"アプリログを出力",enableUSILog:"USI通信ログを出力",enableCSALog:"CSA通信ログを出力",logLevel:"ログレベル",manageEngines:"エンジン設定",flipBoard:"盤面反転",elapsedTimeChart:"消費時間チャート",controls:"操作",useUpDownToMove1Ply:"↑/↓キーで1手移動",useLeftRightToMove1Ply:"←/→キーで1手移動",file:"ファイル",folder:"フォルダ",recordFile:"棋譜ファイル",executableFile:"実行可能ファイル",imageFile:"画像ファイル",unsaved:"未保存",remove:"削除",deleteMove:"指し手削除",recordProperties:"棋譜情報",comments:"コメント",commentsAndBookmarks:"コメント・しおり",branches:"分岐",branchListMode:"分岐の表示",tree:"ツリー",previousMoveBranches:"着手した手",nextMoveBranches:"次の手",bookmark:"しおり",bookmarkList:"しおり一覧",moveComments:"指し手コメント",searchLog:"思考",pv:"読み筋",mateShort:"詰",displayPVShort:"再現",evaluation:"評価値",rawScore:"評価値",score:"評価値",estimatedWinRate:"期待勝率",evaluationAndEstimatedWinRateAndPV:"評価値・期待勝率・読み筋",swapEachTurnChange:"手番側有利がプラスの値",alwaysSenteIsPositive:"先手有利がプラスの値",signOfEvaluation:"評価値の符号",showArrowScore:"矢印に評価値を表示",arrowScoreDiffRange:"矢印の評価値範囲",maxArrows:"矢印の表示数",winRateCoefficient:"勝率換算係数",nodeCountFormat:"ノード数表記",plainNumber:"装飾無し",commaSeparated:"カンマ区切り",monitor:"監視",hideTabView:"最小化",expandTabView:"タブビューを再表示",sente:"先手",senteOrShitate:"先手(下手)",shitate:"下手",gote:"後手",goteOrUwate:"後手(上手)",uwate:"上手",targetEngine:"検査対象エンジン",baseEngine:"基準エンジン",swapSenteGote:"先後入れ替え",pieceToss:"振り駒",opponent:"対局相手",level:"レベル",turn:"手番",currentPosition:"現在の局面",positionList:"局面集",enableEngineTimeout:"エンジンの時間切れあり",setDifferentTimeForGote:"後手に異なる時間を設定",nextTurn:"次の手番",elapsedTime:"消費時間",elapsed:"経過時間",rank:"順位",depth:"深さ",searchEngine:"エンジン",ponder:"先読み(Ponder)",numberOfThreads:"スレッド数",threads:"スレッド",suggestionsCount:"候補手の数",startPosition:"開始局面",beginFromThisPosition:"この局面から開始",maxMoves:"最大手数",gameRepetition:"連続対局",parallelism:"並列数",parallelGame:"並列対局",jishogi:"持将棋",rule24:"24点法",rule27:"27点法",tryRule:"トライルール",autoRelogin:"自動で再ログインする",restartItEveryGame:"1局ごとに再起動する",swapTurnWhenGameRepetition:"1局ごとに手番を入れ替える",outputComments:"コメントを出力する",saveRecordAutomatically:"棋譜を自動で保存する",adjustBoardToHumanPlayer:"人を手前に表示する",adjustBoardAutomatically:"盤面の向きを自動調整",command:"コマンド",startGame:"対局開始",cancelGame:"対局をキャンセル",allottedTime:"持ち時間",byoyomi:"秒読み",increments:"増加",startEndCriteria:"開始・終了条件",descending:"逆順",endCriteria1Move:"局面ごとの終了条件",outputSettings:"出力設定",noOutputs:"出力しない",insertCommentToTop:"前方に加筆する",appendCommentToBottom:"末尾に加筆する",insertToComment:"コメントに挿入",insertToRecord:"棋譜に挿入",overwrite:"上書きする",fromPrefix:"",fromSuffix:"から",toPrefix:"",toSuffix:"まで",plyPrefix:"",plySuffix:"手目",hoursSuffix:"時間",minutesSuffix:"分",secondsSuffix:"秒",eg:"例:",totalMoves:"総手数",detailSettings:"詳細設定",engineManagement:"エンジン管理",engineName:"エンジン名",author:"作者",description:"説明",earlyPonder:"早期Ponder",enginePath:"場所",openDirectory:"フォルダを開く",replaceEnginePath:"エンジン再選択",displayName:"表示名",frontendBook:"定跡 (GUI拡張)",moveSelection:"指し手の選択",bestMove:"最善手",bookMoveTemperature:"温度 (小さいほど最善手を優先)",showAllOptions:"全てのオプションを表示",invoke:"実行",resetToEngineDefaultValues:"エンジンの既定値に戻す",defaultValue:"既定値",freeTextUnsafe:"自由入力(非推奨)",noEngineRegistered:"エンジンが登録されていません。",duplicate:"複製",add:"追加",addFromFile:"ファイルから追加",downloadEngines:"ダウンロード",downloadAnEngine:"エンジンをダウンロード",engineDownload:"エンジンのダウンロード",availableEngines:"入手可能",installedEngines:"インストール済み",install:"インストール",reinstall:"再インストール",uninstall:"アンインストール",notInstalled:"未インストール",updateAvailable:"更新あり",needsRepair:"修復が必要",unused:"未使用",inUse:"使用中",downloadSize:"ダウンロードサイズ",agreeAndDownload:"同意してダウンロード",sourceCodeURL:"ソースコード",noDownloadableEngine:"ダウンロードできるエンジンがありません。",noInstalledEngine:"インストール済みのエンジンはありません。",enginesAddedPleaseSave:"エンジン一覧に追加しました。エンジン管理画面で「保存して閉じる」を押すと確定します。",enginesUpdatedPleaseSave:"エンジンを更新しました。エンジン管理画面で「保存して閉じる」を押すと確定します。",areYouSureWantToUninstallEngine:e=>`${e} のダウンロードしたファイルを削除しますか?`,downloadedFileIsCorrupted:"ダウンロードしたファイルが壊れています",engineIsInUse:"エンジンが使用中です。対局や検討を終了してからやり直してください。",compareAndMerge:"比較・マージ",compareEngineSettings:"エンジン設定の比較",noDifference:"差分なし",mergeToLeft:"左へマージ",mergeToRight:"右へマージ",recommended:"推奨",import:"取り込む",saveAndClose:"保存して閉じる",save:"保存",saveAs:"保存",history:"履歴",clearHistory:"履歴をクリア",userFile:"ユーザーのファイル",automaticBackup:"自動バックアップ",restore:"復元",filterByFilePathOrContent:"ファイルパスまたは内容で検索",loadingFileContents:"ファイルを読み込み中...",loadRecordFromWeb:"Webの棋譜を取得",backToMainBranch:"本譜に戻る",fetchLatestData:"最新データを取得",sourceURL:"ソースURL",ok:"OK",cancel:"キャンセル",yes:"はい",no:"いいえ",back:"戻る",doNotShowAgain:"次回から表示を省略",name:"名前",prediction:"予想",best:"最善",nodes:"Node数",hashUsage:"Hash使用率",stop:"停止",resume:"再開",noHandicap:"平手",lanceHandicap:"香落ち",rightLanceHandicap:"右香落ち",bishopHandicap:"角落ち",rookHandicap:"飛車落ち",rookLanceHandicap:"飛車香落ち",twoPiecesHandicap:"二枚落ち",fourPiecesHandicap:"四枚落ち",sixPiecesHandicap:"六枚落ち",eightPiecesHandicap:"八枚落ち",tenPiecesHandicap:"十枚落ち",tsumeShogi:"詰将棋",doubleKingTsumeShogi:"双玉詰将棋",startDateTime:"開始日時",endDateTime:"終了日時",gameDate:"対局日",tournament:"棋戦",strategy:"戦型",gameTitle:"表題",timeLimit:"持ち時間",blackTimeLimit:"先手の持ち時間",whiteTimeLimit:"後手の持ち時間",place:"場所",postedOn:"掲載",note:"備考",senteShortName:"先手省略名",goteShortName:"後手省略名",scorekeeper:"記録係",opusNo:"作品番号",opusName:"作品名",publishedBy:"発表誌",publishedOn:"発表年月",source:"出典",numberOfMoves:"手数",integrity:"完全性",recordCategory:"分類",award:"受賞",filterByOptionName:"オプション名で検索",filterByEngineName:"エンジン名で検索",bookStyle:"書籍風",bookStyleDiagram:"書籍風局面図",gameStyle:"対局画面風",thin:"細",bold:"太",extraBold:"極太",playerName:"対局者名",typeface:"書体",weight:"太さ",handLabel:"持ち駒ラベル",lastMoveColor:"最終手の色",header:"見出し",vertical:"垂直方向",size:"サイズ",none:"なし",bgCover:"1枚で表示",bgContain:"拡大して表示",bgTile:"タイル状に表示",inaccuracy:"緩手",dubious:"疑問手",mistake:"悪手",blunder:"大悪手",inaccuracyThreshold:"緩手の閾値",dubiousThreshold:"疑問手の閾値",mistakeThreshold:"悪手の閾値",blunderThreshold:"大悪手の閾値",maxPVLength:"読み筋表示手数",commentFormat:"コメントの形式",gothic:"ゴシック体",mincho:"明朝体",appVersion:"アプリバージョン",installed:"インストール済み",stable:"安定版",latest:"最新版",backgroundColor:"背景色",dialogPosition:"ダイアログ表示位置",alignLeft:"左",alignRight:"右",alignCenter:"中央",dialogBackdrop:"ダイアログ表示中の暗転",record:"棋譜",book:"定跡",bookInfo:"定跡の情報",resetBook:"定跡の初期化",moveEvaluation:"指し手評価",forced:"絶対手",goodMove:"好手",yane2016BookFile:"やねうら王定跡ファイル",ybbBookFile:"やねうら王バイナリ定跡ファイル",shogiGUIBookFile:"ShogiGUI 定跡ファイル",aperyBookFile:"Apery 定跡ファイル",loadingMode:"読み込みモード",positionCount:"局面数",gameCount:"対局数",statistics:"統計",chart:"グラフ",analytics:"解析",controlGroup:"メニュー",left:"左",top:"上",width:"幅",height:"高さ",newCustomProfile:"新規カスタムプロファイル",addCustomLayoutProfile:"新規レイアウトプロファイル",duplicateCurrentProfile:"現在のプロファイルを複製",removeCurrentProfile:"現在のプロファイルを削除",exportProfileToClipboard:"プロファイルをクリップボードに出力",importProfileFromClipboard:"クリップボードからプロファイルを取り込む",editLayoutWithDragAndDrop:"ドラッグで編集",stretchCustomLayout:"ウィンドウに合わせる",profileExportedToClipboard:"プロファイルをクリップボードに出力しました。",profileImported:"プロファイルを取り込みました。",failedToImportProfile:"プロファイルの取り込みに失敗しました。",rightControlBox:"右側メニュー",leftControlBox:"左側メニュー",topControlBox:"操作ボタン",legends:"凡例",historyMode:"履歴モード",headers:"ヘッダー",playButton:"再現ボタン",insert:"挿入",bringForward:"前面へ",sendBackward:"背面へ",move:"指し手",bookMove:"定跡手",play:"着手",edit:"編集",addMoves:"指し手追加",export:"エクスポート",flippedBook:"反転も検索",addBookMoves:"定跡手追加",fromCurrentRecord:"現在の棋譜から",fromFile:"ファイルから",fromDirectory:"フォルダから",noMoves:"指し手がありません。",noComment:"コメントなし",register:"登録",update:"更新",importAll:"全て反映",doYouWantToImportAllMoves:"全ての手を反映しますか?",importedMoves:e=>`${e}手を定跡に反映しました。`,currentMove:"現在の手",branchFrom:e=>`${e}手目から分岐`,allPlayers:"全ての対局者",blackPlayerOnly:"先手のみ",whitePlayerOnly:"後手のみ",filterByName:"名前でフィルタ",importScoreFromComment:"コメントから評価値を取り込む",enterPartOfPlayerNameHere:"ここに対局者名の一部を入力",freq:"出現頻度",frequency:"出現頻度",new:"新規",duplicated:"重複",moveEntry:"登録手数",updatedAt:"更新日時",createdAt:"作成日時",lastSent:"最終送信",lastReceived:"最終受信",protocolVersion:"プロトコルバージョン",prompt:"プロンプト",openPrompt:"プロンプトを開く",forceQuit:"強制Quit",forceClose:"強制Close",blankLine:"空行",autoScroll:"自動スクロール",showTimestamp:"タイムスタンプを表示",highlightByPartialMatch:"部分一致でハイライト",csaServer:"CSAサーバー",usiEngine:"USIエンジン",noRunningUSIEngine:"稼働中のUSIエンジンはありません。",noConnectedCSAServer:"接続中のCSAサーバーはありません。",willBeRemovedFromTheListSoon:"セッションが終了したため、まもなく一覧から削除されます。",typeCommandHereAndPressEnter:"コマンドを入力してEnter",allowBlankLine:"空行を許可",removeSpaceFromBothEnds:"両端の空白を削除",collapseSequentialSpaces:"連続する空白をまとめる",typeCustomTitleHere:"ここに見出しを入力",typeCustomCommentHere:"ここにコメントを入力",displayEmptyElements:"未入力の項目を表示",share:"シェア",waitingForNewGame:"対局開始を待っています。",waitingForPlayerSetup:"対局者の準備を待っています。",insertedComment:"コメントを挿入しました。",conversionCompleted:"変換が完了しました。",human:"人",randomPlayer:"ランダムプレイヤー",beginner:"初心者",staticRook:"居飛車",rangingRook:"振り飛車",pleaseSelectEngines:"エンジンを選択してください。",thisItemCannotBeMerged:"この項目はマージできません。",tryingToConnectAndLoginToCSAServer:"CSAサーバーへの接続とログインを試みています。",inBrowserLogsOutputToConsoleAndIgnoreThisSetting:"※ブラウザ版ではログがコンソールに出力され、ここでの設定は無視されます。",shouldRestartToApplyLogSettings:"※ログ設定の変更を反映するにはアプリの再起動が必要です。",canOpenLogDirectoryFromMenu:"※ログの出力先は「デバッグ」-「ログファイルの場所を開く」で開きます。",hasNoOldLogCleanUpFeature:"※現在、古いログファイルの自動削除機能はありません。",shouldRestartToApplyLowLevelSettings:"※低レベルの設定を反映するにはアプリの再起動が必要です。",processingPleaseWait:"処理中です。お待ちください。",importingFollowingRecordOrPosition:"以下の棋譜(または局面)を取り込みます。",supportsKIF_KI2_CSA_USI_SFEN_JKF_USEN:"※KIF形式/KI2形式/CSA形式/USI/SFEN/JKF/USENに対応しています。",pleasePasteRecordIntoTextArea:"※テキストエリアに棋譜を貼り付けてください。",pleaseSpecifyPlainTextURL:"※プレーンテキストのURLを指定してください。",redirectNotSupported:"※リダイレクトはサポートされていません。",desktopVersionPastesAutomatically:"※インストールアプリ版では自動的に貼り付けられます。",asNewFile:"新規ファイル",mergeToRootPosition:"棋譜の先頭へマージ",mergeToCurrentPosition:"現在の位置へマージ",failedToMergeRecordWithDifferentInitialPosition:"初期局面が異なるため棋譜をマージできませんでした。",failedToMergeRecordWithDifferentTurn:"手番が異なるため棋譜をマージできませんでした。",earlyPonderFeatureSendsPonderhitCommandWithYaneuraOusNonStandardOptions:"早期Ponder機能は、やねうら王の独自オプションでponderhitコマンドを送信します。",ifYourEngineNotSupportTheOptionsItMayCauseUnexpectedBehavior:"エンジンがこのオプションに対応していない場合、予期しない動作を引き起こす可能性があります。",someLogsDisabled:"一部のログが無効になっています。",logsRecommendedForCSAProtocol:"CSAプロトコルを使用した対局では各種ログの出力を推奨します。",blankLinePingRecommendedToPreventTimeout:"接続のタイムアウトを防止するために、空行 Ping を有効にすることを推奨します。",pleaseEnableLogsAndRestart:"アプリ設定からログを有効にしてアプリを再起動してください。",hwaEnabled:"HWA(ハードウェアアクセラレーション)が有効です。",hwaIsNotRecommendedForLongGames:"長時間の対局ではHWAの無効化を推奨します。",pleaseDisableHWAAndRestart:"アプリ設定からHWAを無効にしてアプリを再起動してください。",notSendPVOnStandardCSAProtocol:"標準のCSAプロトコルでは評価値や読み筋が送信されません。",passwordWillSavedPlaintextBecauseOSSideEncryptionNotAvailable:"OSの暗号化機能が利用できないため、入力したパスワードは平文で保存されます。",pleaseUncheckSaveHistoryIfNotWantSave:"保存したくない場合は「履歴に保存する」のチェックを外してください。",floodgatePasswordShouldStartWithGameName:"Floodgateのパスワードはゲーム名で始まる必要があります。",thisIsNotFloodgateOfficialGameName:"これはFloodgate公式のゲーム名ではありません。",yourPasswordDoesNotMeetFloodgateRequirementsDoYouStillWantToContinue:"パスワードがFloodgateの要件を満たしていない可能性があります。続行しますか?",translationHelpNeeded:"翻訳の改善にご協力ください。",restartRequiredAfterLocaleChange:"言語の変更には再起動が必要です。",confirmSwitchLanguage:e=>`表示言語を「${e}」に切り替えますか?`,createDesktopShortcut:"デスクトップにショートカットを作成",desktopShortcutCreated:"デスクトップにショートカットを作成しました。",areYouSureWantToResign:"投了しますか?",areYouSureWantToDoDeclaration:"宣言しますか?",areYouSureWantToQuitGames:"連続対局を中断しますか?",areYouSureWantToRequestQuit:"中断を要求すると負けになる可能性があります。よろしいですか?",areYouSureWantToClearRecord:"現在の棋譜は削除されます。よろしいですか?",areYouSureWantToOpenFileInsteadOfCurrentRecord:"現在の棋譜を閉じて別のファイルを開きます。よろしいですか?",areYouSureWantToClearHistory:"履歴をクリアします。よろしいですか?",areYouSureWantToRemoveCurrentProfile:"現在のプロファイルを削除します。よろしいですか?",yamlFormatSettingsCopiedToClipboard:"YAML形式の設定をクリップボードにコピーしました。",jsonFormatSettingsCopiedToClipboard:"JSON形式の設定をクリップボードにコピーしました。",usiCsaBridgeCommandCopiedToClipboard:"usi-csa-bridge コマンドをクリップボードにコピーしました。",positionImageCopiedToClipboard:"局面図をクリップボードにコピーしました。",copiedToClipboard:"クリップボードにコピーしました。",pastedFromClipboard:"クリップボードから貼り付けました。",youCanNotCloseAppWhileCSAOnlineGame:"CSAプロトコル使用中はアプリを終了できません。",fileExtensionNotSupported:"取り扱いできないファイル拡張子です。",errorOccuredWhileDisconnectingFromCSAServer:"CSAサーバーからの切断中にエラーが発生しました。",failedToConnectToCSAServer:"CSAサーバーに接続できませんでした。",errorOccuredWhileLogoutFromCSAServer:"CSAサーバーからのログアウト中にエラーが発生しました。",disconnectedFromCSAServer:"CSAサーバーへの接続が切れました。",csaServerLoginDenied:"CSAサーバーへのログインが拒否されました。",thisFeatureNotAvailableOnWebApp:"Web版では利用できない機能です。",failedToLoadEngine:"エンジンの読み込みに失敗しました。",engineRequiresOnline:"エンジンの読み込みにはインターネット接続が必要です。",engineRequiresReload:"エンジンを使用するにはページの再読み込みが必要です。",failedToStartNewGame:"対局の開始に失敗しました。",errorOccuredWhileEndingGame:"対局の終了中にエラーが発生しました。",failedToSendGoCommand:"goコマンドを送信できませんでした。",failedToSendPonderCommand:"ponderコマンドを送信できませんでした。",failedToSendStopCommand:"stopコマンドを送信できませんでした。",failedToShutdownEngines:"エンジンを正常に終了できませんでした。",failedToCheckUpdates:"アップデートの確認ができませんでした。",youAreUsingTheLatestVersion:"最新のバージョンを使用しています。",newVersionIsAvailablePressToUpdate:"新しいバージョンがあります。ここを押すと更新します。",failedToSaveRecord:"棋譜の保存に失敗しました。",failedToParseSFEN:"SFENの読み込みに失敗しました。",failedToDetectRecordFormat:"棋譜形式を判別できませんでした。",unknown:"不明",unknownFileExtension:"不明なファイル形式です。",emptyRecordInput:"棋譜が入力されていません。",invalidPieceName:"不正な駒",invalidTurn:"不正な手番",invalidMove:"不正な指し手",invalidMoveNumber:"不正な手数",invalidDestination:"不正な移動先",pieceNotExists:"存在しない駒",invalidLine:"不正な行",invalidBoard:"不正な盤面",invalidHandPiece:"不正な持ち駒",invalidUSI:"不正なUSI",engineProcessWasClosedUnexpectedly:"エンジンプロセスが予期せず終了しました。",backgroundImageFileNotSelected:"背景画像のファイルが選択されていません。",pieceImageFileNotSelected:"駒画像のファイルが選択されていません。",boardImageFileNotSelected:"盤面画像のファイルが選択されていません。",pieceStandImageFileNotSelected:"駒台画像のファイルが選択されていません。",pieceSoundVolumeMustBe0To100Percent:"駒音の大きさには0%~100%の値を指定してください。",clockSoundVolumeMustBe0To100Percent:"時計音の大きさには0%~100%の値を指定してください。",clockSoundPitchMustBe220To880Hz:"時計音の高さには220Hz~880Hzの値を指定してください。",engineTimeoutMustBe1To300Seconds:"エンジンのタイムアウト時間には1秒~300秒の値を指定してください。",coefficientInSigmoidMustBeGreaterThan0:"勝率換算係数には0より大きい値を指定してください。",inaccuracyThresholdMustBe1To100Percent:"緩手には1%~100%の値を指定してください。",dubiousThresholdMustBe1To100Percent:"疑問手には1%~100%の値を指定してください。",mistakeThresholdMustBe1To100Percent:"悪手には1%~100%の閾値を指定してください。",blunderThresholdMustBe1To100Percent:"大悪手には1%~100%の値を指定してください。",recordSavedWithGarbledCharacters:"保存した棋譜の一部が文字化けしている可能性があります。",pleaseConsiderToUseKIFU:"KIFU形式(UTF-8)で保存することをお勧めします。",youCanChangeDefaultRecordFileFormatFromAppSettings:"デフォルトの棋譜形式はアプリ設定で変更可能です。",inaccuracyThresholdMustBeLessThanDubiousThreshold:"緩手には疑問手より小さい値を指定してください。",dubiousThresholdMustBeLessThanMistakeThreshold:"疑問手には悪手より小さい値を指定してください。",mistakeThresholdMustBeLessThanBlunderThreshold:"悪手には大悪手より小さい値を指定してください。",thisEngineNotSupportsMateSearch:"このエンジンは詰将棋探索をサポートしていません。",pleaseEndActiveFeaturesBeforeOpenRecord:"棋譜を開くには現在利用している機能を終了してください。",bothTimeLimitAndByoyomiAreNotSet:"持ち時間と秒読みが両方とも0です。",canNotUseByoyomiWithFischer:"秒読みとフィッシャールールは併用できません。",repeatsMustBeOneIfHumanPlayerIncluded:"人が対局する場合、連続対局の回数は1以外を設定できません。",parallelismMustBeOneIfHumanPlayerIncluded:"人が対局する場合、並列実行数は1以外を設定できません。",parallelismMustBeOneIfCurrentPositionIsUsed:"現在の局面を開始局面にする場合、並列実行数は1以外を設定できません。",parallelismMustLessThanOrEqualToRepeats:"並列実行数は連続対局の回数以下にしてください。",protocolVersionNotSelected:"プロトコルのバージョンを選択してください。",hostNameIsEmpty:"ホスト名が空です。",invalidPortNumber:"無効なポート番号です。",idIsEmpty:"IDが空です。",idContainsSpace:"IDに空白が含まれています。",passwordContainsSpace:"パスワードに空白が含まれています。",tcpKeepaliveInitialDelayMustBePositive:"TCP Keepaliveの初期遅延時間には正の値を指定してください。",blankLinePingInitialDelayMustBeGreaterThanOrEqualTo30:"空行送信の初期遅延時間には30秒以上を指定してください。",blankLinePingIntervalMustBeGreaterThanOrEqualTo30:"空行送信の間隔には30秒以上を指定してください。",engineNotSelected:"エンジンが選択されていません。",forExportingConversionLogPleaseEnableAppLogsAndSetLogLevelDebugAndRestart:"変換ログを出力するにはアプリログを有効にし、ログレベルをデバッグに設定してアプリを再起動してください。",sourceDirectoryNotSpecified:"入力ディレクトリが指定されていません。",sourceFileMustBeSFEN:"入力ファイルは .sfen 形式でなければなりません。",sourceFormatsNotSpecified:"入力の対象フォーマットが指定されていません。",destinationDirectoryNotSpecified:"出力ディレクトリが指定されていません。",destinationFileNotSpecified:"出力ファイルが指定されていません。",destinationFileMustBeJSON:"出力ファイルは .json 形式でなければなりません。",anyUnsavedDataWillBeLostDoYouReallyWantToResetBookData:"保存していない内容は失われます。定跡を初期化しますか?",bookMovesWereImported:"定跡データをインポートしました。",anyBookMovesAreUnsavedDoYouReallyWantToDiscardThemAndCloseTheApp:"保存されていない定跡があります。破棄してアプリを終了しますか?",cannotOverwriteOnTheFlyBook:"On-the-fly モードで読み込み中の定跡は上書き保存できません。",pleaseSpecifyOtherFileName:"別のファイル名を指定してください。",memoryShortageOnBookConversionMayLoseUnsavedData:"定跡データの変換中にメモリが不足すると保存していないデータは失われる可能性があります。",cannotConvertAperyBookToOtherFormat:"Apery 定跡は他の形式に変換できません。",sourceRecordFileNotSet:"棋譜ファイルが指定されていません。",sourceDirectoryNotSet:"フォルダを選択してください。",minPlyMustBeLessThanMaxPly:"最小手数は最大手数より小さくしてください。",playerNameNotSet:"対局者名が設定されていません。",incompatibleOptionsWillBeDiscardedDoYouReallyWantToReplaceTheEnginePath:"互換性のないオプションがある場合それらは破棄されます。エンジンを置き換えますか?",largeSuggestionsCountMayCausePerformanceDegradation:"候補手を増やしすぎると動作が重くなる可能性があります。",doYouReallyWantToIncreaseTheSuggestionsCount:"本当に候補手の数を増やしますか?",recommendLowerSettingsForDailyUse:"日常利用のPCでは低めの設定を推奨します。",checkEngineCompatibilityForNumaEnvironments:"このPCは複数のCPUソケットまたはプロセッサーグループ(NUMA)を持つ可能性があります。NUMA環境に対応していないエンジンでは性能が低下する場合があります。エンジンのNUMA対応状況をご確認ください。",aiPerformanceMayDegrade:"AIの性能が低下する可能性があります。",yourPCMayBecomeSlow:"PCの動作が重くなる可能性があります。",increasingItMayImproveAIPerformance:"大きくすることでAIの性能が向上する可能性があります。",totalNumber:e=>`合計 ${e} 件`,number:e=>`${e} 件`,tryToReloginToCSAServerNSecondsLater:e=>`CSAサーバーへのログインを${e}秒後に再試行します。`,mateInNPlyDoYouWantToDisplay:e=>`${e}手で詰みました。再生画面を表示しますか?`,insertedNMovesToRecord:e=>`${e}手を棋譜に挿入しました。`,errorsOccurred:e=>`${e} 種類のエラーが発生しました。`,between:(e,t)=>`${e} から ${t} まで`,addNthEngine:e=>`${e} 個目のエンジンを追加`,copyOf:e=>`${e} のコピー`,keepLatest:e=>`最新${e}件まで`,followingDataNotSavedBecauseNotSupporetedBy:e=>`以下の情報は ${e} 形式では対応していないため保存されませんでした。`,areYouSureWantToDeleteFollowingMove:e=>`${e}手目以降を削除します。よろしいですか?`,failedToOpenDirectory:e=>`ファイルの場所を開けませんでした: ${e}`,unexpectedEventSenderPleaseReport:e=>`予期せぬイベントの送信元です。このエラーメッセージを開発者に報告してください。 [${e}]`,unexpectedHTTPMethodPleaseReport:e=>`予期せぬHTTPメソッドです。このエラーメッセージを開発者に報告してください。 [${e}]`,unexpectedRequestURLPleaseReport:e=>`予期せぬURLへのリクエストです。このエラーメッセージを開発者に報告してください。 [${e}]`,noResponseFromEnginePleaseExtendTimeout:e=>`${e}秒以内にエンジンから応答がありませんでした。エンジンの起動が重い場合はアプリ設定の「USIプロトコル」タブで待ち時間を延長してください。`,stableVersionReleased:e=>`安定版 ${e} がリリースされました!`,latestVersionReleased:e=>`最新版 ${e} がリリースされました!`,doYouReallyWantToRemoveBookMove:e=>`定跡手 ${e} を削除します。よろしいですか?`,unexpectedRecordFileExtension:e=>`サポートされていない棋譜の拡張子です。 [${e}]`,fileNotFound:e=>`ファイルが見つかりません。 [${e}]`,directoryNotFound:e=>`フォルダが見つかりません。 [${e}]`,youCanExitFullScreenByPressing:e=>`全画面表示を終了するには ${e} キーを押してください。`,skippedMovesInMerge:(e,t)=>`${t}手中、${e}手がマージできませんでした。`,cpuUsageExceedsNPercent:e=>`全CPUコアの${e}%を超えています。`,totalNumberOfThreadsExceedsNPercentOfCpuCores:e=>`スレッド数の合計がCPUコア数の${e}%を超えています。`,memoryUsageExceedsNPercent:e=>`全メモリの${e}%を超えています。`,memoryUsageIsLessThanNPercent:e=>`全メモリの${e}%未満です。`,totalUSIHashExceedsNPercentOfMemory:e=>`USI_Hash の合計が全メモリの${e}%を超えています。`,heapUsageExceedsNGBMayHang:e=>`メモリ使用量が ${e}GB を超えました。増加傾向が続くとハングアップする可能性があります。`,settingsFileCorruptedMovedAndReset:(e,t)=>`設定ファイル ${e} が破損していたため読み込めませんでした。壊れたファイルは ${t} に移動し、既定の設定を使用します。`};o.d(t,["ja",0,n])},387(e,t,o){const n={shogiHome:"ShogiHome",clear:"Ván mới",open:"Mở",openNewInstance:"Mở một cửa sổ ShogiHome mới",saveOverwrite:"Ghi đè",newRecord:"Kỳ phổ mới",newRecordKeepInitialPosition:"Kỳ phổ mới (giữ thế trận hiện tại)",newRecordHirateSetup:"Kỳ phổ mới (thế cờ ban đầu)",openRecord:"Mở kỳ phổ",saveRecord:"Lưu kỳ phổ",saveRecordAs:"Lưu kỳ phổ như",openAutoSaveDirectory:"Mở thư mục lưu tự động",exportPositionDiagram:"Xuất ảnh thế cờ",positionImage:"Ảnh thế cờ",batchConversion:"Chuyển đổi số lượng lớn",recordFileBatchConversion:"Chuyển đổi kỳ phổ số lượng lớn",close:"Đóng",quit:"Thoát",reload:"Tải lại",editing:"Sửa",copyAsKIF:"Sao chép (KIF)",copyAsKI2:"Sao chép (KI2)",copyAsCSA:"Sao chép (CSA)",copyAsUSI:"Sao chép (USI)",copyAsSFEN:"Sao chép (SFEN)",copyAsBOD:"Sao chép (BOD)",copyAsJKF:"Sao chép (JKF)",copyAsUSEN:"Sao chép (USEN)",copy:"Sao chép",cut:"Cắt",paste:"Dán",copyRecordAll:"Sao chép kỳ phổ (từ nước đầu tiên)",copyRecordFromCurrentPosition:"Sao chép kỳ phổ (từ thế cờ hiện tại)",asKIF:"dưới dạng KIF",asKI2:"dưới dạng KI2",asCSA:"dưới dạng CSA",asUSI:"dưới dạng USI",asUSIUntilCurrentMove:"dưới dạng USI (cho tới nước hiện tại)",asUSIAll:"dưới dạng USI (toàn bộ)",asJSONKifuFormat:"dưới dạng kỳ phổ JSON",asUSEN:"dưới dạng USEN",copyPosition:"Sao chép thế cờ",asSFEN:"dưới dạng SFEN",asBOD:"dưới dạng BOD",pasteRecordOrPosition:"Dán kỳ phổ/thế cờ",pasteRecordMerge:"Dán kỳ phổ (sáp nhập)",toRootPosition:"Về thế cờ ban đầu",toCurrentPosition:"Đến thế trận hiện tại",addSpecialMove:"Chèn nước đi đặc biệt",deleteMoves:"Xóa từ nước hiện tại trở đi",view:"Hiển thị",openLayoutManager:"Mở trình quản lý bố cục",openMonitorWindow:"Mở cửa sổ quản lý",toggleFullScreen:"Bật/tắt toàn màn hình",defaultFontSize:"Cỡ chữ tiêu chuẩn",increaseFontSize:"Cỡ chữ lớn",decreaseFontSize:"Cỡ chữ nhỏ",settings:"Cài đặt",information:"Thông tin",config:"Thiết lập",debug:"Gỡ lỗi",toggleDevTools:"Bật/tắt công cụ nhà phát triển",logFile:"Tệp log",openAppLog:"Mở log ứng dụng",openUSILog:"Mở log USI",openCSALog:"Mở log CSA",tailAppLog:"Kết thúc log ứng dụng",tailUSILog:"Kết thúc log USI",tailCSALog:"Kết thúc log CSA",copyAppLogTailCommand:"Sao chép lệnh kết thúc log ứng dụng",copyUSILogTailCommand:"Sao chép lệnh kết thúc log USI",copyCSALogTailCommand:"Sao chép lệnh kết thúc log CSA",reloadCustomPieceImage:"Tải lại ảnh quân tùy chỉnh",statisticsReport:"Thống kê",nextMoveProblemCollection:"Nước đi tiếp theo",createNextMoveProblemCollection:"Tạo bài tập nước đi tiếp theo",createProblemCollection:"Tạo bộ bài tập",openProblemCollection:"Mở bộ bài tập",nextMoveGenerationCompleted:"Đã tạo xong bộ bài tập nước đi tiếp theo.",noProblemsWereGeneratedAndFileWasNotCreated:"Không có thế cờ nào phù hợp nên tệp bài tập không được tạo.",doYouWantToSaveNProblems:e=>`Bạn có muốn lưu ${e} bài tập đã tạo không?`,doYouWantToStartQuiz:"Bạn có muốn bắt đầu làm bài tập không?",doYouWantToResumeFromWhereYouLeftOff:"Bạn có muốn tiếp tục từ lần trước không?",nextMoveGenerationRequiresAnalyzedRecord:"Tính năng tạo bài tập sẽ trích xuất các nước có thể là sai lầm từ bình luận phân tích, sau đó khởi động phần mềm để tìm nhiều nước đi ứng viên. Vui lòng chạy tính năng phân tích trước để chuẩn bị kỳ phổ có bình luận phân tích.",files:"Số tệp",blunderCandidates:"Nước có thể là sai lầm",adoptedProblems:"Bài tập được chọn",researchedPositions:"Thế cờ đã tính toán lại",recordDirectory:"Thư mục kỳ phổ",winRateDropThreshold:"Mức giảm tỷ lệ thắng",minWinRate:"Đánh giá tối thiểu của thế cờ",adoptionWinRateDiff:"Chênh lệch tỷ lệ thắng để chọn bài tập",acceptableWinRateDiff:"Chênh lệch tỷ lệ thắng của đáp án đúng",maxProblems:"Số bài tập tối đa",outputFile:"Tệp đầu ra",problemNofM:(e,t)=>`Bài ${e} / ${t}`,findTheNextMove:"Nước đi tiếp theo là gì?",showChoices:"Hiển thị lựa chọn",correct:"Đúng",incorrect:"Sai",correctRate:"Tỷ lệ đúng",actualGameMove:"Nước đi trong ván thực tế",thisMoveWasPlayedInTheGame:"Đây là nước đã được đi trong ván thực tế.",doYouWantToTryAgain:"Bạn có muốn thử lại không?",showAnswer:"Xem đáp án",nextProblem:"Bài tiếp theo",previousProblem:"Bài trước",inOrder:"Theo thứ tự",sourceRecord:"Kỳ phổ gốc",launchUSIEngine:"Khởi động phần mềm shogi",connectToCSAServer:"Kết nối với máy chủ CSA",adminMode:"Chế độ nâng cao",inAdminModeManuallyInvokeCommandsAtPrompt:"Trong chế độ nâng cao, bạn phải tự nhập lệnh tại ô nhắc lệnh.",setoptionAndPrecedingCommandsAreSentAutomatically:'"setoption" và các lệnh trước đó sẽ được gửi tự động',serverMustSupportShogiServerX1ModeLogIn:"Máy chủ phải hỗ trợ phương thức đăng nhập x1-mode của shogi-server.",folders:"Thư mục",notification:"Thông báo",notificationTest:"Thử thông báo",thisIsTestNotification:"Đây là thông báo thử",app:"Ứng dụng",log:"Log",cache:"Bộ nhớ đệm",downloadedEngines:"Engine đã tải xuống",help:"Trợ giúp",openWebsite:"Mở trang web",openUserGuide:"Mở hướng dẫn sử dụng",openLatestReleasePage:"Mở trang của bản mới nhất",openStableReleasePage:"Mở trang của bản ổn định",checkForUpdates:"Kiểm tra cập nhật",license:"Giấy phép",inputs:"Đầu vào",outputs:"Đầu ra",format:"Định dạng",formats:"Định dạng",subdirectories:"Thư mục con",separate:"Riêng biệt",merge:"Sáp nhập",createSubdirectories:"Tạo thư mục con",nameConflictAction:"Hành động xung đột tên",numberSuffix:"Hậu tố số",skip:"Bỏ qua",convert:"Chuyển đổi",openLogFile:"Mở tệp log",success:"Thành công",failed:"Thất bại",skipped:"Bỏ qua",game:"Chơi",player:"Kỳ thủ",server:"Máy chủ",selectFromHistory:"Chọn từ lịch sử",noHistory:"Trống",saveHistory:"Lưu lịch sử",version:"Phiên bản",gameProgress:"Tiến triển ván đấu",allGamesCompleted:"Tất cả các ván đã kết thúc",wins:"Thắng",winsOnBlack:"Số ván thắng (Tiên)",winsOnWhite:"Số ván thắng (Hậu)",draws:"Hòa",validGames:"Ván hợp lệ",invalidGames:"Ván không hợp lệ",eloRatingDiff:"Khoảng cách Elo",ignoreDraws:"Bỏ qua ván hòa",zValue:"Giá trị Z",significance5pc:"Độ nổi bật 5%",significance1pc:"Độ nổi bật 1%",gameEnded:"Ván đã kết thúc",offlineGame:"Ván ngoại tuyến",csaOnlineGame:"Ván CSA trực tuyến",csaProtocolOnlineGame:"Ván trực tuyến (phương thức CSA)",csaProtocolV121:"Phương thức CSA tiêu chuẩn 1.2.1",csaProtocolV121WithPVComments:"Phương thức CSA 1.2.1 có bình luận PV",host:"Tên máy chủ",portNumber:"Cổng",password:"Mật khẩu",revealPassword:"Hiện mật khẩu",keepaliveInitialDelay:"Trì hoãn keepalive ban đầu",blankLinePing:"Ping dòng trống",blankLinePingInitialDelay:"Trì hoãn ping dòng trống ban đầu",blankLinePingInterval:"Khoảng thời gian ping dòng trống",logout:"Đăng xuất",calculateJishogiPoints:"Tính điểm bế tắc",jishogiPoints:"Điểm bế tắc",displayGameResults:"Hiển thị kết quả",interrupt:"Dừng",stopGame:"Dừng ván đấu",resign:"Xin thua",draw:"Hòa",impass:"Bế tắc",repetitionDraw:"Hòa do lặp nước",repetition:"Hòa do lặp nước",mate:"Chiếu hết",noMate:"Không chiếu hết",blackWin:"Tiên thắng",whiteWin:"Hậu thắng",all:"Tất cả",others:"Khác",minRate:"Elo thấp nhất",mateSearch:"Tìm chiếu hết",downloaded:"Đã tải xuống",startMateSearch:"Bắt đầu tìm chiếu hết",stopMateSearch:"Dừng tìm chiếu hết",noMateFound:"Không có chiếu hết.",timePerPosition:"Thời gian suy nghĩ",timeout:"Hết giờ",foulWin:"Thắng do nước đi phạm luật",foulLose:"Thua do nước đi phạm luật",enteringOfKing:"Thắng do nhập Ngọc",winByDefault:"Xử thắng",loseByDefault:"Xử thua",winByDeclaration:"Thắng do tuyên bố",declareWin:"Tuyên bố chiến thắng",research:"Tính toán",startResearch:"Bắt đầu tính toán",endResearch:"Dừng tính toán",startEndResearch:"Bắt đầu/Dừng tính toán",recordAnalysis:"Phân tích kỳ phổ",analysis:"Phân tích",analyze:"Phân tích",stopAnalysis:"Dừng phân tích",batchAnalysis:"Phân tích kỳ phổ hàng loạt",currentRecord:"Kỳ phổ hiện tại",skipAnalyzed:"Bỏ qua kỳ phổ đã phân tích",analyzedRecordFilesWillBeOverwritten:"Tệp kỳ phổ sau khi phân tích sẽ bị ghi đè. Vui lòng sao lưu dữ liệu quan trọng trước.",analysisCompleted:"Đã phân tích xong.",noRecordFileFound:"Không tìm thấy tệp kỳ phổ.",searchDuplicatePositions:"Tìm thế cờ lặp lại",duplicatePositionSearch:"Tìm thế cờ lặp lại",duplicatePositions:"Thế cờ lặp lại",duplicatePos:"Lặp lại",via:"Thông qua",lastMove:"Nước liền trước",nextMoves:"Nước liền sau",goToThisPosition:"Đi đến thế cờ này",noDuplicatePositions:"Không có thế cờ lặp lại.",nDuplicatePositionsFound:e=>`Tìm thấy ${e} thế cờ lặp lại.`,appearanceCount:"Số lần lặp lại",showList:"Hiện tất cả",setupPosition:"Xếp thế cờ",changeTurn:"Đổi lượt đi",initializePosition:"Đặt lại thế cờ",changePieceSet:"Tăng giảm quân",setAllPiecesToStandardCounts:"Đặt lại số lượng quân",setAllPiecesToZero:"Đặt tất cả số quân thành 0",addToBlackHandPieceStand:"Thêm vào komadai của Tiên thủ",addToWhiteHandPieceStand:"Thêm vào komadai của Hậu thủ",addToBoard:"Thêm vào bàn cờ",undo:"Hoàn tác",redo:"Làm lại",appSettings:"Cài đặt ứng dụng",language:"Ngôn ngữ",theme:"Chủ đề",standard:"Tiêu chuẩn",green:"Xanh lá",cherryBlossom:"Hoa anh đào",selectColor:"Chọn màu",customImage:"Ảnh tùy chọn",autumn:"Mùa thu",snow:"Tuyết rơi",classic:"Cổ điển",beige:"Màu be",darkGreen:"Xanh lá đậm",dark:"Tối",boardLayout:"Bố cục bàn cờ",compact:"Gọn",portrait:"Dọc",portraitSquare:"Dọc (ô vuông)",piece:"Quân",singleKanjiPiece:"Nhất tự",singleKanjiWoodPiece:"Nhất tự (Gỗ)",singleKanjiGothicPiece:"Nhất tự (Gothic)",singleKanjiDarkPiece:"Nhất tự (Tối)",singleKanjiGothicDarkPiece:"Nhất tự (Gothic, Tối)",twoKanjiPiece:"Nhị tự",imageHasMarginsRemoveForLargerDisplay:"Ảnh có lề (loại bỏ để hiển thị lớn hơn)",backgroundImage:"Ảnh nền",board:"Bàn cờ",pieceStand:"Komadai",woodTexture:"Vân gỗ",lightWoodyTexture:e=>`Vân gỗ (Nhẹ ${e})`,warmWoodTexture:e=>`Vân gỗ (Ấm ${e})`,resin:"Nhựa cây ",transparent:"Trong suốt",boardOpacity:"Độ đục bàn cờ",pieceStandOpacity:"Độ đục komadai",recordOpacity:"Độ đục kỳ phổ",handPieceOrder:"Thứ tự quân trên tay",rookGoldKnightToLeft:"飛・金・桂を左に",rookGoldKnightToRight:"飛・金・桂を右に",promotionSelector:"Chọn phong cấp",centeredHorizontal:"Ngang, căn giữa",promoteFirstVertical:"Dọc, ưu tiên phong cấp",promoteFirstHorizontal:"Ngang, ưu tiên phong cấp",enableDragAndDrop:"Kéo thả quân",highlightMovableSquares:"Hiển thị ô có thể di chuyển",showFileAndRank:"Hiện hàng và cột",showLeftControls:"Hiện điều khiển bên trái",showRightControls:"Hiện điều khiển bên phải",tabViewStyle:"Hiện thẻ",oneColumn:"1 cột",twoColumns:"2 cột",sounds:"Âm thanh",pieceSoundVolume:"Âm lượng quân",clockSoundVolume:"Âm lượng đồng hồ",clockSoundPitch:"Cao độ đồng hồ",clockSoundTarget:"Nước đi có tiếng đồng hồ",anyTurn:"Tất cả",onlyHumanTurn:"Nước của người chơi",defaultRecordFileFormat:"Định dạng kỳ phổ mặc định",textEncoding:"Bộ mã chữ",strict:"Bắt buộc",autoDetect:"Tự động",newlineCharacter:"Ký tự dòng mới",old90sMac:"Mac năm 90",autoSaving:"Tự động lưu",recordFileName:"Tên tệp kỳ phổ",select:"Chọn",shuffle:"Trộn",csaV3Output:"Xuất dưới dạng CSA v3",alwaysOutputUTF8:"Luôn xuất kỳ phổ UTF-8",someOldShogiAppsCannotReadUTF8KifFiles:"Một số phần mềm shogi cũ có thể không đọc được tệp KIF/KI2 có mã hóa UTF-8.",strictDecodingMayFailToReadUTF8KifFiles:"Chế độ mã hóa nghiêm khắc có thể không đọc được tệp KIF/KI2 có mã hóa UTF-8.",positionOfUSIOutput:"Định dạng thế cờ USI",movesOfUSIOutput:"Định dạng kỳ phổ USI",onlySFEN:"Chỉ SFEN",minimal:"Nhỏ nhất",pasteDialog:"Hộp thoại dán",liveDuplicatePositionDetection:"Tự động tìm thế cờ lặp lại",onTheFlyThreshold:"Giá trị On-the-fly",usiProtocol:"Định dạng USI",translateOptionName:"Dịch tên tùy chọn",functionalOnJapaneseOnly:"Chỉ dùng cho bản tiếng Nhật",maxStartupTime:"Thời gian khởi động tối đa",forDevelopers:"Dành cho nhà phát triển",enableAppLog:"Bật log ứng dụng",enableUSILog:"Bật log USI",enableCSALog:"Bật log CSA",logLevel:"Mức độ log",manageEngines:"Quản lý phần mềm",flipBoard:"Xoay bàn cờ",elapsedTimeChart:"Biểu đồ thời gian",controls:"Điều khiển",useUpDownToMove1Ply:"Tiến/lùi nước bằng phím ↑/↓",useLeftRightToMove1Ply:"Tiến/lùi nước bằng phím ←/→",file:"Tệp",folder:"Tập tin",recordFile:"Tệp kỳ phổ",executableFile:"Tệp phần mềm",imageFile:"Tệp ảnh",unsaved:"Chưa lưu",remove:"Xóa",deleteMove:"Xóa nước đi",recordProperties:"Thuộc tính kỳ phổ",comments:"Bình luận",commentsAndBookmarks:"Bình luận & đánh dấu",branches:"Nhánh",branchListMode:"Hiển thị các nhánh",tree:"Dạng cây",previousMoveBranches:"Các nước đã đi",nextMoveBranches:"Nước tiếp theo",bookmark:"Đánh dấu",bookmarkList:"Đánh dấu",moveComments:"Bình luận nước đi",searchLog:"Lịch sử tìm kiếm",pv:"PV",mateShort:"M",displayPVShort:"Đi",evaluation:"Đánh giá",rawScore:"Đ.giá",score:"Đ.giá",estimatedWinRate:"Tỷ lệ thắng ước tính",evaluationAndEstimatedWinRateAndPV:"Đánh giá & tỷ lệ thắng ước tính & PV",swapEachTurnChange:"Đổi mỗi lượt",alwaysSenteIsPositive:"Tiên luôn dương",signOfEvaluation:"Dấu giá trị đánh giá",showArrowScore:"Hiển thị đánh giá trên mũi tên",arrowScoreDiffRange:"Phạm vi đánh giá của mũi tên",maxArrows:"Số mũi tên hiển thị",winRateCoefficient:"Hệ số tỷ lệ thắng",nodeCountFormat:"Hiển thị số node",plainNumber:"Số thường",commaSeparated:"Chia bằng dấu phẩy",monitor:"Theo dõi",hideTabView:"Ẩn",expandTabView:"Mở hiển thị thẻ",sente:"Tiên thủ",senteOrShitate:"Tiên thủ (Hạ thủ)",shitate:"Hạ thủ",gote:"Hậu thủ",goteOrUwate:"Hậu thủ (Thượng thủ)",uwate:"Thượng thủ",targetEngine:"Phần mềm được kiểm tra",baseEngine:"Phần mềm so sánh",swapSenteGote:"Đổi Tiên/Hậu",pieceToss:"Furigoma",opponent:"Đối thủ",level:"Cấp độ",turn:"Lượt đi",currentPosition:"Thế cờ hiện tại",positionList:"Danh sách thế cờ",enableEngineTimeout:"Bật hết giờ phần mềm",setDifferentTimeForGote:"Đặt thời gian khác cho Hậu",nextTurn:"Lượt đi",elapsedTime:"Thời gian dùng tổng cộng",elapsed:"T.gian",rank:"Hạng",depth:"Độ sâu",searchEngine:"Phần mềm",ponder:"Đọc trước",numberOfThreads:"Luồng",threads:"Luồng",suggestionsCount:"Số nước đề xuất",startPosition:"Thế cờ ban đầu",beginFromThisPosition:"Bắt đầu từ thế cờ này",maxMoves:"Số nước tối đa",gameRepetition:"Lặp lại thế cờ",parallelism:"Số ván song song",parallelGame:"Ván song song",jishogi:"Bế tắc",rule24:"Luật 24 điểm",rule27:"Luật 27 điểm",tryRule:"Luật Try",autoRelogin:"Tự động đăng nhập lại",restartItEveryGame:"Khởi động lại mỗi ván",swapTurnWhenGameRepetition:"Đổi lượt đi khi lặp lại nước đi",outputComments:"Xuất bình luận",saveRecordAutomatically:"Tự động lưu kỳ phổ",adjustBoardToHumanPlayer:"Tự động xoay bàn cờ về hướng người chơi",adjustBoardAutomatically:"Tự động xoay bàn cờ",command:"Lệnh",startGame:"Bắt đầu ván cờ",cancelGame:"Hủy ván cờ",allottedTime:"Thời gian",byoyomi:"Byoyomi",increments:"Cộng thời gian",startEndCriteria:"Điều kiện bắt đầu/kết thúc",descending:"Đảo thứ tự",endCriteria1Move:"Điều kiện kết thúc cho mỗi nước đi",outputSettings:"Tùy chọn xuất",noOutputs:"Không xuất",insertCommentToTop:"Chèn phía trước",appendCommentToBottom:"Chèn phía sau",insertToComment:"Chèn vào bình luận",insertToRecord:"Chèn vào kỳ phổ",overwrite:"Ghi đè",fromPrefix:"từ",fromSuffix:"",toPrefix:"tới",toSuffix:"",plyPrefix:"Nước thứ ",plySuffix:"",hoursSuffix:"h",minutesSuffix:"p",secondsSuffix:"s",eg:"vd.",totalMoves:"Tổng số nước",detailSettings:"Cài đặt chi tiết",engineManagement:"Quản lý phần mềm",engineName:"Tên phần mềm",author:"Tác giả",description:"Mô tả",earlyPonder:"Tính nhanh",enginePath:"Đường dẫn phần mềm",openDirectory:"Mở đường dẫn",replaceEnginePath:"Chọn lại đường dẫn phần mềm",displayName:"Tên hiển thị",frontendBook:"Định thức (mở rộng GUI)",moveSelection:"Chọn nước đi",bestMove:"Nước tốt nhất",bookMoveTemperature:"Nhiệt độ (càng nhỏ càng ưu tiên nước tốt nhất)",showAllOptions:"Hiển thị tất cả cài đặt",invoke:"Thực hiện",resetToEngineDefaultValues:"Đặt lại về giá trị ban đầu",defaultValue:"Giá trị mặc định",freeTextUnsafe:"Nhập tự do (không hỗ trợ)",noEngineRegistered:"Không có phần mềm",duplicate:"Sao chép",add:"Thêm",addFromFile:"Thêm từ tệp",downloadEngines:"Tải xuống",downloadAnEngine:"Tải xuống phần mềm",engineDownload:"Tải xuống phần mềm",availableEngines:"Có sẵn",installedEngines:"Đã cài đặt",install:"Cài đặt",reinstall:"Cài đặt lại",uninstall:"Gỡ cài đặt",notInstalled:"Chưa cài đặt",updateAvailable:"Có bản cập nhật",needsRepair:"Cần sửa chữa",unused:"Không sử dụng",inUse:"Đang sử dụng",downloadSize:"Dung lượng tải xuống",agreeAndDownload:"Đồng ý và tải xuống",sourceCodeURL:"Mã nguồn",noDownloadableEngine:"Không có phần mềm nào để tải xuống.",noInstalledEngine:"Chưa có phần mềm nào được cài đặt.",enginesAddedPleaseSave:'Đã thêm vào danh sách phần mềm. Nhấn "Lưu và đóng" trong màn hình quản lý phần mềm để áp dụng.',enginesUpdatedPleaseSave:'Đã cập nhật phần mềm. Nhấn "Lưu và đóng" trong màn hình quản lý phần mềm để áp dụng.',areYouSureWantToUninstallEngine:e=>`Bạn có muốn xóa các tệp đã tải xuống của ${e} không?`,downloadedFileIsCorrupted:"Tệp đã tải xuống bị hỏng",engineIsInUse:"Phần mềm đang được sử dụng. Vui lòng kết thúc ván cờ hoặc tính toán rồi thử lại.",compareAndMerge:"So sánh/sáp nhập",compareEngineSettings:"So sánh cài đặt phần mềm",noDifference:"Không khác nhau",mergeToLeft:"Sáp nhập sang trái",mergeToRight:"Sáp nhập sang phải",recommended:"Đề xuất",import:"Nhập",saveAndClose:"Lưu và đóng",save:"Lưu",saveAs:"Lưu thành",history:"Lịch sử",clearHistory:"Xóa lịch sử",userFile:"Tệp người dùng",automaticBackup:"Sao lưu tự động",restore:"Khôi phục",filterByFilePathOrContent:"Lọc theo đường dẫn hoặc nội dung tệp",loadingFileContents:"Đang tải tệp...",loadRecordFromWeb:"Tải kỳ phổ từ mạng",backToMainBranch:"Trở về biến chính",fetchLatestData:"Lấy dữ liệu mới nhất",sourceURL:"URL nguồn",ok:"OK",cancel:"Hủy",yes:"Có",no:"Không",back:"Quay lại",doNotShowAgain:"Không hiện lại lần sau",name:"Tên",prediction:"Dự đoán",best:"Tốt nhất",nodes:"Số thế cờ",hashUsage:"Sử dụng hash",stop:"Dừng",resume:"Tiếp tục",noHandicap:"Không chấp",lanceHandicap:"Chấp Thương",rightLanceHandicap:"Chấp Thương phải",bishopHandicap:"Chấp Tượng",rookHandicap:"Chấp Xe",rookLanceHandicap:"Chấp Xe + Thương",twoPiecesHandicap:"Chấp 2 quân",fourPiecesHandicap:"Chấp 4 quân",sixPiecesHandicap:"Chấp 6 quân",eightPiecesHandicap:"Chấp 8 quân",tenPiecesHandicap:"Chấp 10 quân",tsumeShogi:"Tsumeshogi",doubleKingTsumeShogi:"Tsumeshogi 2 vua",startDateTime:"Bắt đầu",endDateTime:"Kết thúc",gameDate:"Ngày",tournament:"Giải đấu",strategy:"Chiến pháp",gameTitle:"Tiêu đề",timeLimit:"Thời gian",blackTimeLimit:"Thời gian (Tiên)",whiteTimeLimit:"Thời gian (Hậu)",place:"Địa điểm",postedOn:"Đăng tại",note:"Ghi chú",senteShortName:"Tiên thủ (ngắn)",goteShortName:"Hậu thủ (ngắn)",scorekeeper:"Người ghi chép",opusNo:"Số hiệu",opusName:"Tên tác phẩm",publishedBy:"Xuất bản bởi",publishedOn:"Ngày xuất bản",source:"Nguồn",numberOfMoves:"Số nước đi",integrity:"Trạng thái",recordCategory:"Thể loại",award:"Giải thưởng",filterByOptionName:"Lọc theo tên tùy chọn",filterByEngineName:"Lọc theo tên phần mềm",bookStyle:"Kiểu sách",bookStyleDiagram:"Hình cờ kiểu sách",gameStyle:"Kiểu bàn cờ",thin:"Mảnh",bold:"Đậm",extraBold:"Siêu đậm",playerName:"Tên kỳ thủ",typeface:"Kiểu chữ",weight:"Độ đậm nhạt",handLabel:"Tên quân trên tay",lastMoveColor:"Màu nước đi cuối",header:"Đầu đề",vertical:"Dọc",size:"Kích cỡ",none:"Không",bgCover:"Hiện đơn",bgContain:"Phóng to",bgTile:"Mảnh ghép",inaccuracy:"Nước đi không chính xác",dubious:"Nước đi không tốt",mistake:"Sai lầm",blunder:"Sai lầm ngớ ngẩn",inaccuracyThreshold:"Ngưỡng nước không chính xác",dubiousThreshold:"Ngưỡng nước không tốt",mistakeThreshold:"Ngưỡng nước sai lầm",blunderThreshold:"Ngưỡng nước sai lầm ngớ ngẩn",maxPVLength:"Số nước đọc hiển thị",commentFormat:"Định dạng chú thích",gothic:"Gothic",mincho:"Minh thể",appVersion:"Phiên bản ứng dụng",installed:"Được cài đặt",stable:"Ổn định",latest:"Mới nhất",backgroundColor:"Màu nền",dialogPosition:"Vị trí hộp thoại",alignLeft:"Trái",alignRight:"Phải",alignCenter:"Giữa",dialogBackdrop:"Nền hộp thoại",record:"Kỳ phổ",book:"Định thức",bookInfo:"Thông tin định thức",resetBook:"Khởi tạo lại định thức",moveEvaluation:"Đánh giá nước đi",forced:"絶対手",goodMove:"Nước đi tốt",yane2016BookFile:"Tệp định thức YaneuraOu",ybbBookFile:"Tệp định thức nhị phân YaneuraOu",shogiGUIBookFile:"Tệp định thức ShogiGUI",aperyBookFile:"Tệp định thức Apery",loadingMode:"Chế độ tải",positionCount:"Số thế cờ",gameCount:"Số ván",statistics:"Thống kê",chart:"Đồ thị",analytics:"Phân tích",controlGroup:"Menu",left:"Trái",top:"Trên",width:"Chiều rộng",height:"Chiều cao",newCustomProfile:"Cài đặt mới",addCustomLayoutProfile:"Thêm cài đặt",duplicateCurrentProfile:"Sao chép cài đặt hiện tại",removeCurrentProfile:"Xóa cài đặt hiện tại",exportProfileToClipboard:"Sao chép cài đặt",importProfileFromClipboard:"Dán cài đặt",editLayoutWithDragAndDrop:"Chỉnh sửa bằng kéo thả",stretchCustomLayout:"Vừa với cửa sổ",profileExportedToClipboard:"Đã xuất cài đặt.",profileImported:"Đã nhập cài đặt.",failedToImportProfile:"Nhập cài đặt thất bại.",rightControlBox:"Menu bên phải",leftControlBox:"Menu bên trái",topControlBox:"Menu bên trên",legends:"Chú giải",historyMode:"Chế độ lịch sử",headers:"Đầu đề",playButton:"Nút phát lại",insert:"Chèn",bringForward:"Đưa lên trên",sendBackward:"Đẩy xuống dưới",move:"Nước đi",bookMove:"Nước định thức",play:"Chơi",edit:"Sửa",addMoves:"Thêm nước đi",export:"Xuất",flippedBook:"Sử dụng book lật ngược",addBookMoves:"Thêm định thức",fromCurrentRecord:"Từ kỳ phổ này",fromFile:"Từ tệp",fromDirectory:"Từ thư mục",noMoves:"Không tìm thấy nước đi.",noComment:"Không có bình luận",register:"Đăng ký",update:"Cập nhật",importAll:"Đăng ký tất cả",doYouWantToImportAllMoves:"Bạn có muốn đăng ký tất cả các nước đi không?",importedMoves:e=>`Đã đăng ký ${e} nước đi vào định thức.`,currentMove:"Nước hiện tại",branchFrom:e=>`Phân nhánh từ nước thứ ${e}`,allPlayers:"Tất cả kỳ thủ",blackPlayerOnly:"Chỉ Tiên",whitePlayerOnly:"Chỉ Hậu",filterByName:"Lọc bằng tên",importScoreFromComment:"Nhập đánh giá từ bình luận",enterPartOfPlayerNameHere:"Nhập một phần tên kỳ thủ",freq:"Tần suất",frequency:"Tần suất xuất hiện",new:"Mới",duplicated:"Trùng lặp",moveEntry:"Nước đã được lưu",updatedAt:"Cập nhật lúc",createdAt:"Tạo lúc",lastSent:"Gửi lần cuối",lastReceived:"Nhận lần cuối",protocolVersion:"Phiên bản phương thức",prompt:"Nhắc lệnh",openPrompt:"Mở nhắc lệnh",forceQuit:"Buộc thoát",forceClose:"Buộc đóng",blankLine:"Dòng trống",autoScroll:"Tự động lướt",showTimestamp:"Hiện dấu thời gian",highlightByPartialMatch:"Đánh dấu trùng một phần",csaServer:"Máy chủ CSA",usiEngine:"Phần mềm USI",noRunningUSIEngine:"Không có phần mềm USI đang chạy.",noConnectedCSAServer:"Không kết nối với máy chủ CSA nào.",willBeRemovedFromTheListSoon:"Trình này đã đóng và sắp bị xóa khỏi danh sách.",typeCommandHereAndPressEnter:"Nhập lệnh tại đây và nhấn Enter.",allowBlankLine:"Cho phép dòng trống",removeSpaceFromBothEnds:"Xóa dấu cách ở hai đầu",collapseSequentialSpaces:"Gộp dấu cách liền nhau",typeCustomTitleHere:"Nhập tiêu đề",typeCustomCommentHere:"Nhập bình luận",displayEmptyElements:"Hiện các mục trống",share:"Chia sẻ",waitingForNewGame:"Đang chờ ván mới.",waitingForPlayerSetup:"Đang chờ người chơi chuẩn bị.",insertedComment:"Đã chèn bình luận.",conversionCompleted:"Chuyển đổi hoàn tất.",human:"Người",randomPlayer:"Người chơi ngẫu nhiên",beginner:"Người mới học",staticRook:"Cư Phi Xa",rangingRook:"Chấn Phi Xa",pleaseSelectEngines:"Vui lòng chọn phần mềm.",thisItemCannotBeMerged:"Mục này không thể sáp nhập.",tryingToConnectAndLoginToCSAServer:"Đang kết nối và đăng nhập vào máy chủ CSA.",inBrowserLogsOutputToConsoleAndIgnoreThisSetting:"*Bản trình duyệt sẽ xuất log ra trình nhắc lệnh và bỏ qua cài đặt này.",shouldRestartToApplyLogSettings:"*Khởi động lại ứng dụng để áp dụng các cài đặt log.",canOpenLogDirectoryFromMenu:'*Bạn có thể mở đường dẫn log qua menu "Gỡ lỗi" - "Mở đường dẫn log".',hasNoOldLogCleanUpFeature:"*Ứng dụng này không có tính năng dọn dẹp. Vui lòng tự xóa log cũ.",shouldRestartToApplyLowLevelSettings:"※ Vui lòng khởi động lại ứng dụng để cập nhật cài đặt mức độ thấp hơn.",processingPleaseWait:"Đang tải, vui lòng chờ.",importingFollowingRecordOrPosition:"Đang nhập kỳ phổ (hoặc thế cờ) dưới đây.",supportsKIF_KI2_CSA_USI_SFEN_JKF_USEN:"*Hỗ trợ KIF, KI2, CSA, USI, SFEN, JKF, và USEN.",pleasePasteRecordIntoTextArea:"*Dán dữ liệu kỳ phổ vào vùng nhập chữ.",pleaseSpecifyPlainTextURL:"*Vui lòng nhập URL thô.",redirectNotSupported:"*Không hỗ trợ chuyển hướng.",desktopVersionPastesAutomatically:"*Bản máy tính sẽ tự động dán.",asNewFile:"Tệp mới",mergeToRootPosition:"Sáp nhập vào thế cờ ban đầu",mergeToCurrentPosition:"Sáp nhập vào thế cờ hiện tại",failedToMergeRecordWithDifferentInitialPosition:"Sáp nhập thất bại do thế cờ bắt đầu khác nhau.",failedToMergeRecordWithDifferentTurn:"Sáp nhập thất bại do lượt đi khác nhau.",earlyPonderFeatureSendsPonderhitCommandWithYaneuraOusNonStandardOptions:'Tính năng tính nhanh gửi lệnh "ponderhit" với các tùy chọn riêng củaYaneuraOu.',ifYourEngineNotSupportTheOptionsItMayCauseUnexpectedBehavior:"Phần mềm của bạn có thể báo lỗi nếu không hỗ trợ cài đặt này.",someLogsDisabled:"Một số tùy chọn log đã bị tắt.",logsRecommendedForCSAProtocol:"Chúng tôi đề xuất bật tùy chọn log cho phương thức CSA.",blankLinePingRecommendedToPreventTimeout:"Nên bật Ping dòng trống để tránh hết thời gian chờ kết nối.",pleaseEnableLogsAndRestart:"Vui lòng bật tùy chọn log và khởi động lại ứng dụng.",hwaEnabled:"Đã bật gia tốc phần cứng (HWA).",hwaIsNotRecommendedForLongGames:"Vui lòng tắt HWA nếu ván cờ kéo dài.",pleaseDisableHWAAndRestart:"Vui lòng tắt HWA trong mục cài đặt và khởi động lại ứng dụng.",notSendPVOnStandardCSAProtocol:"PV không được gửi trong phương thức CSA tiêu chuẩn.",passwordWillSavedPlaintextBecauseOSSideEncryptionNotAvailable:"Mật khẩu sẽ được lưu thô vì hệ điều hành không hỗ trợ mã hóa.",pleaseUncheckSaveHistoryIfNotWantSave:"Vui lòng bỏ chọn lưu lịch sử nếu không muốn lưu.",floodgatePasswordShouldStartWithGameName:"Mật khẩu Floodgate phải bắt đầu bằng tên ván đấu. ",thisIsNotFloodgateOfficialGameName:"Đây không phải tên một ván đấu Floodgate chính thức.",yourPasswordDoesNotMeetFloodgateRequirementsDoYouStillWantToContinue:"Mật khẩu của bạn không đạt điều kiện của Floodgate. Bạn vẫn muốn tiếp tục chứ?",translationHelpNeeded:"Chúng tôi cần bạn giúp đỡ phiên dịch.",restartRequiredAfterLocaleChange:"Khởi động lại ứng dụng để áp dụng ngôn ngữ.",confirmSwitchLanguage:e=>`Bạn có muốn chuyển ngôn ngữ hiển thị sang "${e}" không?`,createDesktopShortcut:"Tạo lối tắt trên desktop",desktopShortcutCreated:"Đã tạo lối tắt trên desktop.",areYouSureWantToResign:"Bạn có thật sự muốn đầu hàng không?",areYouSureWantToDoDeclaration:"Bạn có thật sự muốn tuyên bố không?",areYouSureWantToQuitGames:"Bạn có thật sự muốn bỏ ván không?",areYouSureWantToRequestQuit:"Bạn có thể bị xử thua. Bạn có thật sự muốn yêu cầu rời ván không?",areYouSureWantToClearRecord:"Bạn có thật sự muốn xóa kỳ phổ không?",areYouSureWantToOpenFileInsteadOfCurrentRecord:"Bạn có thật sự muốn ghi đè thế cờ hiện tại không?",areYouSureWantToClearHistory:"Bạn có thật sự muốn xóa lịch sử không?",areYouSureWantToRemoveCurrentProfile:"Bạn có thật sự muốn xóa cài đặt hiện tại không?",yamlFormatSettingsCopiedToClipboard:"Cài đặt đã được sao chép dưới dạng YAML.",jsonFormatSettingsCopiedToClipboard:"Cài đặt đã được sao chép dưới dạng JSON.",usiCsaBridgeCommandCopiedToClipboard:"Lệnh usi-csa-bridge đã được sao chép.",positionImageCopiedToClipboard:"Ảnh thế cờ đã được sao chép.",copiedToClipboard:"Đã sao chép vào bảng tạm.",pastedFromClipboard:"Đã dán từ bảng tạm.",youCanNotCloseAppWhileCSAOnlineGame:"Bạn không thể đóng ứng dụng trong khi đang có ván CSA.",fileExtensionNotSupported:"Không hỗ trợ định dạng này.",errorOccuredWhileDisconnectingFromCSAServer:"Đã có lỗi trong khi ngắt kết nối khỏi máy chủ CSA.",failedToConnectToCSAServer:"Kết nối với máy chủ CSA thất bại.",errorOccuredWhileLogoutFromCSAServer:"Đã có lỗi trong khi đăng xuất khỏi máy chủ CSA.",disconnectedFromCSAServer:"Đã ngắt kết nối khỏi máy chủ CSA.",csaServerLoginDenied:"Đăng nhập vào máy chủ CSA bị từ chối.",thisFeatureNotAvailableOnWebApp:"Tính năng này không có sẵn trên trình duyệt.",failedToLoadEngine:"Tải phần mềm thất bại.",engineRequiresOnline:"Cần kết nối Internet để tải phần mềm.",engineRequiresReload:"Cần tải lại trang để sử dụng phần mềm.",failedToStartNewGame:"Bắt đầu ván mới thất bại.",errorOccuredWhileEndingGame:"Đã có lỗi trong khi kết thúc ván.",failedToSendGoCommand:"Gửi lệnh go thất bại.",failedToSendPonderCommand:"Gửi lệnh ponder thất bại.",failedToSendStopCommand:"Gửi lệnh stop thất bại.",failedToShutdownEngines:"Dừng phần mềm thất bại.",failedToCheckUpdates:"Kiểm tra cập nhật thất bại.",youAreUsingTheLatestVersion:"Bạn đang sử dụng phiên bản mới nhất.",newVersionIsAvailablePressToUpdate:"Đã có phiên bản mới. Nhấn vào đây để cập nhật.",failedToSaveRecord:"Lưu kỳ phổ thất bại.",failedToParseSFEN:"Đọc SFEN thất bại.",failedToDetectRecordFormat:"Xác định định dạng kỳ phổ thất bại.",unknown:"Không rõ",unknownFileExtension:"Định dạng tệp không rõ.",emptyRecordInput:"Kỳ phổ trống.",invalidPieceName:"Tên quân không hợp lệ",invalidTurn:"Lượt đi không hợp lệ",invalidMove:"Nước đi không hợp lệ",invalidMoveNumber:"Số nước đi không hợp lệ",invalidDestination:"Điểm đến không hợp lệ",pieceNotExists:"Quân cờ không tồn tại",invalidLine:"Dòng không hợp lại",invalidBoard:"Bàn cờ không hợp lệ",invalidHandPiece:"Quân trên tay không hợp lệ",invalidUSI:"USI không hợp lệ",engineProcessWasClosedUnexpectedly:"Phần mềm đã bị đóng bất ngờ.",backgroundImageFileNotSelected:"Chưa chọn ảnh nền.",pieceImageFileNotSelected:"Chưa chọn ảnh quân cờ.",boardImageFileNotSelected:"Chưa chọn ảnh bàn cờ.",pieceStandImageFileNotSelected:"Chưa chọn ảnh komadai.",pieceSoundVolumeMustBe0To100Percent:"Âm lượng quân phải từ 0% đến 100%.",clockSoundVolumeMustBe0To100Percent:"Âm lượng đồng hồ phải từ 0% đến 100%.",clockSoundPitchMustBe220To880Hz:"Cao độ đồng hồ phải từ 220Hz đến 880Hz.",engineTimeoutMustBe1To300Seconds:"Hết giờ phần mềm phải từ 1 đến 300 giây.",coefficientInSigmoidMustBeGreaterThan0:"Hệ số phải lớn hơn 0.",inaccuracyThresholdMustBe1To100Percent:"Ngưỡng khó hiểu phải từ 1% đến 100%.",dubiousThresholdMustBe1To100Percent:"Ngưỡng không chính xác phải từ 1% đến 100%.",mistakeThresholdMustBe1To100Percent:"Ngưỡng sai lầm phải từ 1% đến 100%.",blunderThresholdMustBe1To100Percent:"Ngưỡng sai lầm ngớ ngẩn phải từ 1% đến 100%.",recordSavedWithGarbledCharacters:"Kỳ phổ bị lưu với một số ký tự lỗi.",pleaseConsiderToUseKIFU:"Vui lòng cân nhắc sử dụng định dạng KIFU (UTF-8).",youCanChangeDefaultRecordFileFormatFromAppSettings:"Bạn có thể đổi định dạng mặc định trong cài đặt ứng dụng.",inaccuracyThresholdMustBeLessThanDubiousThreshold:"Ngưỡng khó hiểu phải nhỏ hơn ngưỡng không chính xác.",dubiousThresholdMustBeLessThanMistakeThreshold:"Ngưỡng không chính xác phải nhỏ hơn ngưỡng sai lầm.",mistakeThresholdMustBeLessThanBlunderThreshold:"Ngưỡng sai lầm phải nhỏ hơn ngưỡng sai lầm ngớ ngẩn.",thisEngineNotSupportsMateSearch:"Phần mềm này không hỗ trợ đọc chiếu hết.",pleaseEndActiveFeaturesBeforeOpenRecord:"Vui lòng đóng các tính năng đang chạy trước khi mở kỳ phổ.",bothTimeLimitAndByoyomiAreNotSet:"Thời gian và byoyomi chưa được đặt.",canNotUseByoyomiWithFischer:"Bạn không thể dùng byoyomi với chế độ Fischer.",repeatsMustBeOneIfHumanPlayerIncluded:"Nếu có người chơi, số lần lặp lại phải là 1.",parallelismMustBeOneIfHumanPlayerIncluded:"Nếu có người thi đấu, số ván song song phải là 1.",parallelismMustBeOneIfCurrentPositionIsUsed:"Nếu bắt đầu bằng thế cờ hiện tại, số ván song song phải là 1.",parallelismMustLessThanOrEqualToRepeats:"Vui lòng đặt số ván song song không quá số ván liên tục.",protocolVersionNotSelected:"Chưa chọn phiên bản phương thức.",hostNameIsEmpty:"Tên máy chủ trống.",invalidPortNumber:"Cổng không hợp lệ.",idIsEmpty:"Tên người dùng trống.",idContainsSpace:"Tên người dùng chứa dấu cách.",passwordContainsSpace:"Mật khẩu chứa dấu cách.",tcpKeepaliveInitialDelayMustBePositive:"Trì hoãn giữ kết nối TCP ban đầu phải dương.",blankLinePingInitialDelayMustBeGreaterThanOrEqualTo30:"Trì hoãn ping dòng trống ban đầu phải >=30.",blankLinePingIntervalMustBeGreaterThanOrEqualTo30:"Thời gian ping dòng trống phải >=30.",engineNotSelected:"Chưa chọn phần mềm.",forExportingConversionLogPleaseEnableAppLogsAndSetLogLevelDebugAndRestart:"Để xuất log chuyển đổi, vui lòng bật log ứng dụng, đặt cấp độ log thành DEBUG và khởi động lại ứng dụng.",sourceDirectoryNotSpecified:"Đường dẫn nguồn chưa được đặt.",sourceFileMustBeSFEN:"Tên tập tin phải có đuôi .sfen.",sourceFormatsNotSpecified:"Định dạng nguồn chưa được đặt.",destinationDirectoryNotSpecified:"Đường dẫn đến chưa được đặt.",destinationFileNotSpecified:"Tệp đến chưa được đặt.",destinationFileMustBeJSON:"Tệp đầu ra phải có định dạng .json.",anyUnsavedDataWillBeLostDoYouReallyWantToResetBookData:"Tất cả dữ liệu chưa lưu sẽ bị mất. Bạn có muốn đặt lại dữ liệu định thức?",bookMovesWereImported:"Dữ liệu định thức đã được nhập thành công.",anyBookMovesAreUnsavedDoYouReallyWantToDiscardThemAndCloseTheApp:"Có các nước định thức chưa lưu. Bạn có muốn hủy bỏ chúng và đóng ứng dụng?",cannotOverwriteOnTheFlyBook:"Không thể ghi đè lên sách đang sử dụng chế độ On-the-fly.",pleaseSpecifyOtherFileName:"Vui lòng chọn tên tệp khác.",memoryShortageOnBookConversionMayLoseUnsavedData:"Nếu thiếu bộ nhớ trong khi chuyển đổi dữ liệu định thức, dữ liệu chưa lưu có thể bị mất.",cannotConvertAperyBookToOtherFormat:"Không thể chuyển đổi định thức Apery sang định dạng khác.",sourceRecordFileNotSet:"Chưa chỉ định tệp kỳ phổ gốc.",sourceDirectoryNotSet:"Vui lòng chọn một tập tin.",minPlyMustBeLessThanMaxPly:"Số nước ít nhất phải nhỏ hơn số nước lớn nhất.",playerNameNotSet:"Tên người chơi chưa được đặt.",incompatibleOptionsWillBeDiscardedDoYouReallyWantToReplaceTheEnginePath:"Các cài đặt không tương thích sẽ bị xóa bỏ. Bạn có thực sự muốn thay đổi đường dẫn phần mềm?",largeSuggestionsCountMayCausePerformanceDegradation:"Số nước đề xuất quá lớn có thể làm ứng dụng chậm đi đáng kể.",doYouReallyWantToIncreaseTheSuggestionsCount:"Bạn có thực sự muốn tăng số nước đề xuất?",recommendLowerSettingsForDailyUse:"Nên sử dụng cài đặt thấp hơn cho PC thông thường.",checkEngineCompatibilityForNumaEnvironments:"Máy tính này có thể có nhiều ổ CPU hoặc nhóm vi xử lý (NUMA). Các phần mềm không hỗ trợ NUMA có thể bị suy yếu. Vui lòng kiểm tra nếu phần mềm bạn dùng hỗ trợ NUMA.",aiPerformanceMayDegrade:"Tính năng phần mềm có thể suy giảm.",yourPCMayBecomeSlow:"Thao tác PC có thể bị chậm lại.",increasingItMayImproveAIPerformance:"Có thể cải thiện tính năng phần mềm bằng cách tăng lên.",totalNumber:e=>`Tổng: ${e}`,number:e=>""+e,tryToReloginToCSAServerNSecondsLater:e=>`Vui lòng đăng nhập lại sau ${e} giây.`,mateInNPlyDoYouWantToDisplay:e=>`Có chiếu hết trong ${e} nước. Bạn có muốn hiển thị?`,insertedNMovesToRecord:e=>`Đã chèn ${e} nước vào kỳ phổ.`,errorsOccurred:e=>`Đã có ${e} lỗi xảy ra.`,between:(e,t)=>`từ ${e} đến ${t}`,addNthEngine:e=>`Thêm phần mềm thứ ${e}`,copyOf:e=>`Bản sao của ${e}`,keepLatest:e=>`${e} bản mới nhất`,followingDataNotSavedBecauseNotSupporetedBy:e=>`Dữ liệu sau không được lưu vì không được định dạng "${e}" hỗ trợ.`,areYouSureWantToDeleteFollowingMove:e=>`Bạn có muốn xóa nước thứ ${e} trở đi không?`,failedToOpenDirectory:e=>`Mở tệp: ${e} thất bại`,unexpectedEventSenderPleaseReport:e=>`Nguồn sự kiện ngoài dự tính. Vui lòng báo cáo lỗi này cho nhà phát triển. [${e}]`,unexpectedHTTPMethodPleaseReport:e=>`Phương thức HTTP ngoài dự tính. Vui lòng báo cáo lỗi này cho nhà phát triển. [${e}]`,unexpectedRequestURLPleaseReport:e=>`URL yêu cầu ngoài dự tính. Vui lòng báo cáo lỗi này cho nhà phát triển. [${e}]`,noResponseFromEnginePleaseExtendTimeout:e=>`Không có phản hồi từ phần mềm sau ${e} giây. Vui lòng kéo dài thời gian hết giờ trong thẻ "Định dạng USI" của cài đặt ứng dụng nếu phần mềm của bạn chậm.`,stableVersionReleased:e=>`Phiên bản ổn định ${e} đã ra mắt!`,latestVersionReleased:e=>`Phiên bản mới nhất ${e} đã ra mắt!`,doYouReallyWantToRemoveBookMove:e=>`Bạn có thực sự muốn xóa nước định thức ${e}?`,unexpectedRecordFileExtension:e=>`Định dạng kỳ phổ không được hỗ trợ. [${e}]`,fileNotFound:e=>`Không tìm thấy tệp. [${e}]`,directoryNotFound:e=>`Không tìm thấy tập tin. [${e}]`,youCanExitFullScreenByPressing:e=>`Bạn có thể thoát chế độ toàn màn hình bằng cách nhấn phím ${e}.`,skippedMovesInMerge:(e,t)=>`Trong ${t} nước, đã không thể sáp nhập ${e} nước.`,cpuUsageExceedsNPercent:e=>`Đang sử dụng quá ${e}% CPU.`,totalNumberOfThreadsExceedsNPercentOfCpuCores:e=>`Số luồng vượt quá ${e}% số lõi CPU.`,memoryUsageExceedsNPercent:e=>`Sử dụng RAM vượt quá ${e}%.`,memoryUsageIsLessThanNPercent:e=>`Sử dụng RAM ít hơn ${e}%.`,totalUSIHashExceedsNPercentOfMemory:e=>`Tổng USI_HASH vượt quá ${e}% RAM.`,heapUsageExceedsNGBMayHang:e=>`Mức sử dụng bộ nhớ đã vượt quá ${e}GB. Nếu tiếp tục tăng, ứng dụng có thể bị treo.`,settingsFileCorruptedMovedAndReset:(e,t)=>`Tệp cài đặt ${e} bị hỏng nên không thể tải. Tệp bị hỏng đã được chuyển đến ${t} và cài đặt mặc định sẽ được sử dụng.`};o.d(t,["vi",0,n])},566(e,t,o){const n={shogiHome:"ShogiHome",clear:"清除",open:"開啟",openNewInstance:"開啟新的 ShogiHome 視窗",saveOverwrite:"覆蓋檔案",newRecord:"新棋譜",newRecordKeepInitialPosition:"新棋譜(保留初手局面)",newRecordHirateSetup:"新棋譜(平手初形)",openRecord:"打開棋譜",saveRecord:"保存棋譜",saveRecordAs:"另存棋譜",openAutoSaveDirectory:"打開自動保存目錄",exportPositionDiagram:"輸出局面圖",positionImage:"局面圖",batchConversion:"棋譜大量轉換",recordFileBatchConversion:"棋譜大量轉換",close:"關閉",quit:"離開",reload:"重新載入",editing:"編輯",copyAsKIF:"複製KIF棋譜",copyAsKI2:"複製KI2棋譜",copyAsCSA:"複製CSA棋譜",copyAsUSI:"複製USI棋譜",copyAsSFEN:"複製SFEN局面",copyAsBOD:"複製BOD局面",copyAsJKF:"複製JKF棋譜",copyAsUSEN:"複製USEN棋譜",copy:"拷貝",cut:"剪下",paste:"貼上",copyRecordAll:"複製棋譜(自初手局面)",copyRecordFromCurrentPosition:"複製棋譜(自目前局面)",asKIF:"KIF形式",asKI2:"KI2形式",asCSA:"CSA形式",asUSI:"USI形式",asUSIUntilCurrentMove:"USI形式(到目前手數為止)",asUSIAll:"USI形式(全部)",asJSONKifuFormat:"JSON Kifu Format",asUSEN:"USEN形式",copyPosition:"複製局面",asSFEN:"SFEN形式",asBOD:"BOD形式",pasteRecordOrPosition:"貼上棋譜、局面",pasteRecordMerge:"棋譜貼上(合併)",toRootPosition:"自棋譜開頭合併",toCurrentPosition:"自目前局面合併",addSpecialMove:"特殊手",deleteMoves:"刪除現在位置後的棋譜",view:"表示",openLayoutManager:"開啟佈局管理員",openMonitorWindow:"監視視窗",toggleFullScreen:"切換全螢幕",defaultFontSize:"預設字體尺寸",increaseFontSize:"增加字體尺寸",decreaseFontSize:"縮小字體尺寸",settings:"設定",information:"資訊",config:"設定",debug:"偵錯",toggleDevTools:"打開/關閉開發者工具顯示",logFile:"紀錄檔",openAppLog:"開啟程式紀錄檔",openUSILog:"開啟USI通訊紀錄檔",openCSALog:"開啟CSA通訊紀錄檔",tailAppLog:"即時顯示程式紀錄",tailUSILog:"即時顯示USI通訊紀錄",tailCSALog:"即時顯示CSA通訊紀錄",copyAppLogTailCommand:"複製即時顯示程式紀錄指令",copyUSILogTailCommand:"複製即時顯示USI通訊紀錄指令",copyCSALogTailCommand:"複製即時顯示CSA通訊紀錄指令",reloadCustomPieceImage:"重整自訂棋駒圖片",statisticsReport:"統計報告",nextMoveProblemCollection:"下一手",createNextMoveProblemCollection:"建立下一手問題集",createProblemCollection:"建立問題集",openProblemCollection:"開啟問題集",nextMoveGenerationCompleted:"下一手問題集建立完成。",noProblemsWereGeneratedAndFileWasNotCreated:"由於沒有可採用的局面,未建立問題集檔案。",doYouWantToSaveNProblems:e=>`要保存已建立的 ${e} 題嗎?`,doYouWantToStartQuiz:"要開始出題嗎?",doYouWantToResumeFromWhereYouLeftOff:"要從上次中斷處繼續嗎?",nextMoveGenerationRequiresAnalyzedRecord:"問題集建立功能會先從解析備註中擷取惡手候補,再啟動引擎求出多個候補手。請事先執行解析功能,準備附有解析備註的棋譜。",files:"檔案數",blunderCandidates:"惡手候補",adoptedProblems:"已採用的問題",researchedPositions:"已重新探索的局面",recordDirectory:"棋譜目錄",winRateDropThreshold:"勝率下降幅度",minWinRate:"目標局面評價下限",adoptionWinRateDiff:"採用判定的勝率差",acceptableWinRateDiff:"正解範圍的勝率差",maxProblems:"問題數上限",outputFile:"輸出檔案",problemNofM:(e,t)=>`問題 ${e} / ${t}`,findTheNextMove:"下一手是?",showChoices:"顯示選項",correct:"正確",incorrect:"錯誤",correctRate:"正確率",actualGameMove:"實戰棋步",thisMoveWasPlayedInTheGame:"這是實戰中下出的棋步。",doYouWantToTryAgain:"要再挑戰一次嗎?",showAnswer:"查看答案",nextProblem:"下一題",previousProblem:"上一題",inOrder:"依序",sourceRecord:"出處棋譜",launchUSIEngine:"啟動USI引擎",connectToCSAServer:"連接CSA伺服器",adminMode:"管理模式",inAdminModeManuallyInvokeCommandsAtPrompt:"在管理模式下,您需要手動輸入指令方可執行。",setoptionAndPrecedingCommandsAreSentAutomatically:"setoption 之前的指令將會被自動發送。",serverMustSupportShogiServerX1ModeLogIn:"對應的 shogi-server 必須支援擴展 (x1) 登入模式。",folders:"資料夾",notification:"通知",notificationTest:"通知測試",thisIsTestNotification:"這是測試用的通知。",app:"軟體",log:"紀錄檔",cache:"快取",downloadedEngines:"已下載的引擎",help:"協助",openWebsite:"官方網站",openUserGuide:"使用教學",openLatestReleasePage:"前往最新版發布頁面",openStableReleasePage:"前往安定版發布頁面",checkForUpdates:"檢查更新",license:"授權條款",inputs:"輸入目錄",outputs:"輸出目錄",format:"格式",formats:"格式",subdirectories:"子目錄",separate:"個別",merge:"合併",createSubdirectories:"建立子目錄",nameConflictAction:"名稱衝突處理方式",numberSuffix:"附加編號",skip:"跳過該檔案",convert:"開始轉換",openLogFile:"打開記錄檔案",success:"成功",failed:"失敗",skipped:"跳過",game:"對局",player:"玩家",server:"伺服器",selectFromHistory:"從紀錄選取",noHistory:"目前沒有紀錄",saveHistory:"保存紀錄",version:"版本",gameProgress:"對局過程",allGamesCompleted:"連續對局結束",wins:"勝利數目",winsOnBlack:"勝場(先手)",winsOnWhite:"勝場(後手)",draws:"平手數目",validGames:"有效對局數",invalidGames:"無效對局數",eloRatingDiff:"等級分相差",ignoreDraws:"忽略平手對局",zValue:"Z值",significance5pc:"顯著性水準5%",significance1pc:"顯著性水準1%",gameEnded:"對局結束",offlineGame:"本地(單機)對局",csaOnlineGame:"通訊對局(CSA)",csaProtocolOnlineGame:"通訊對局(CSA協定)",csaProtocolV121:"CSA協定 1.2.1 標準",csaProtocolV121WithPVComments:"CSA協定 1.2.1 +思考註解",host:"連接之伺服器",portNumber:"連接埠號碼",password:"密碼",revealPassword:"顯示密碼",keepaliveInitialDelay:"Keepalive初始延遲",blankLinePing:"空行Ping",blankLinePingInitialDelay:"空行Ping初始延遲",blankLinePingInterval:"空行Ping間隔",logout:"登出",calculateJishogiPoints:"計算持將棋點數",jishogiPoints:"持將棋點數",displayGameResults:"確認戰績",interrupt:"中斷",stopGame:"對局中斷",resign:"投了",draw:"平手",impass:"持將棋",repetitionDraw:"千日手",repetition:"千日手",mate:"詰死",noMate:"無詰",blackWin:"先手勝利",whiteWin:"後手勝利",all:"全部",others:"其他",minRate:"最低等級分",mateSearch:"詰搜尋",downloaded:"已下載",startMateSearch:"開始詰搜尋",stopMateSearch:"結束詰搜尋",noMateFound:"在目前的盤面中找不到詰。",timePerPosition:"思考時間",timeout:"時間耗盡",foulWin:"反則勝利",foulLose:"反則敗北",enteringOfKing:"入玉勝利",winByDefault:"不戰勝",loseByDefault:"不戰敗",winByDeclaration:"勝利宣言",declareWin:"勝利宣言",research:"檢討",startResearch:"檢討開始",endResearch:"結束檢討",startEndResearch:"檢討開始/結束",recordAnalysis:"棋譜解析",analysis:"解析",analyze:"解析開始",stopAnalysis:"中斷解析",batchAnalysis:"連續棋譜解析",currentRecord:"目前棋譜",skipAnalyzed:"跳過已解析",analyzedRecordFilesWillBeOverwritten:"解析後的棋譜檔案將被覆寫。重要資料請事先備份。",analysisCompleted:"解析完成。",noRecordFileFound:"找不到目標棋譜檔案。",searchDuplicatePositions:"搜尋相同局面",duplicatePositionSearch:"相同局面搜尋",duplicatePositions:"相同局面",duplicatePos:"相同局面",via:"經由",lastMove:"前一手",nextMoves:"下一手",goToThisPosition:"移動至此局面",noDuplicatePositions:"沒有重複的局面。",nDuplicatePositionsFound:e=>`找到 ${e} 個重複的局面。`,appearanceCount:"出現次數",showList:"顯示一覽",setupPosition:"編輯局面",changeTurn:"變更手番",initializePosition:"初始化局面",changePieceSet:"調整棋駒數",setAllPiecesToStandardCounts:"將全部棋駒設為平手數量",setAllPiecesToZero:"將全部棋駒設為 0",addToBlackHandPieceStand:"加入先手駒台",addToWhiteHandPieceStand:"加入後手駒台",addToBoard:"加入棋盤",undo:"復原",redo:"重做",appSettings:"程式設定",language:"語言",theme:"主題",standard:"標準",green:"綠色",cherryBlossom:"櫻花",selectColor:"選擇顏色",customImage:"自定義圖片",autumn:"紅葉",snow:"雪",classic:"經典",beige:"米色",darkGreen:"深綠",dark:"深色主題",boardLayout:"棋盤設計",compact:"緊湊",portrait:"直向",portraitSquare:"直向(正方形格)",piece:"棋駒",singleKanjiPiece:"一文字駒",singleKanjiWoodPiece:"一文字駒(木目)",singleKanjiGothicPiece:"一文字駒(黑體)",singleKanjiDarkPiece:"一文字駒(深色)",singleKanjiGothicDarkPiece:"一文字駒(黑體・深色)",twoKanjiPiece:"二文字駒",imageHasMarginsRemoveForLargerDisplay:"圖片含有透明邊界(去除後圖片會略為放大)",backgroundImage:"背景圖片",board:"棋盤",pieceStand:"駒台",woodTexture:"木目",lightWoodyTexture:e=>`木目(亮色${e})`,warmWoodTexture:e=>`木目(暖色${e})`,resin:"樹脂",transparent:"透明",boardOpacity:"盤面不透明度",pieceStandOpacity:"駒台不透明度",recordOpacity:"棋譜不透明度",handPieceOrder:"持駒排列順序",rookGoldKnightToLeft:"飛・金・桂靠左",rookGoldKnightToRight:"飛・金・桂靠右",promotionSelector:"成變、不成對話框顯示",centeredHorizontal:"水平置中",promoteFirstVertical:"垂直(成變優先)",promoteFirstHorizontal:"水平(成變優先)",enableDragAndDrop:"棋駒拖曳操作",highlightMovableSquares:"顯示可移動的格子",showFileAndRank:"顯示段・筋",showLeftControls:"顯示左側操作按鈕",showRightControls:"顯示右側操作按鈕",tabViewStyle:"分頁顯示形式",oneColumn:"1列",twoColumns:"2列",sounds:"音效",pieceSoundVolume:"棋駒音效",clockSoundVolume:"棋鐘音效大小",clockSoundPitch:"棋鐘音效頻率",clockSoundTarget:"棋鐘音效對象",anyTurn:"所有手番",onlyHumanTurn:"只有玩家手番",defaultRecordFileFormat:"預設保存格式",textEncoding:"文字編碼",strict:"檔案原始編碼",autoDetect:"自動判定",newlineCharacter:"換行符號",old90sMac:"90年代Mac",autoSaving:"自動保存",recordFileName:"棋譜檔案名稱",select:"選擇",shuffle:"隨機",csaV3Output:"使用 CSA V3 輸出",alwaysOutputUTF8:"總是以 UTF-8 輸出",someOldShogiAppsCannotReadUTF8KifFiles:"部分舊版將棋軟體可能無法讀取 UTF-8 編碼的 KIF・KI2 檔案。",strictDecodingMayFailToReadUTF8KifFiles:"文字編碼設定為「檔案原始編碼」時,可能無法讀取以 UTF-8 輸出的 KIF・KI2 檔案。",positionOfUSIOutput:"USI 局面紀錄格式",movesOfUSIOutput:"USI 棋譜紀錄格式",onlySFEN:"只有 SFEN",minimal:"最小限度",pasteDialog:"貼上視窗",liveDuplicatePositionDetection:"隨時偵測相同局面",onTheFlyThreshold:"On-the-fly 門檻",usiProtocol:"USI協定",translateOptionName:"選項名稱翻譯",functionalOnJapaneseOnly:"只有在日文選擇時有效",maxStartupTime:"最大起動等待時間",forDevelopers:"開發者用",enableAppLog:"輸出程式紀錄",enableUSILog:"輸出USI通訊紀錄",enableCSALog:"輸出CSA通訊紀錄",logLevel:"紀錄等級",manageEngines:"引擎設定",flipBoard:"盤面反轉",elapsedTimeChart:"消費時間圖表",controls:"操作",useUpDownToMove1Ply:"使用↑/↓鍵移動1手",useLeftRightToMove1Ply:"使用←/→鍵移動1手",file:"檔案",folder:"資料夾",recordFile:"棋譜檔案",executableFile:"可執行檔案",imageFile:"圖片檔案",unsaved:"未保存",remove:"刪除",deleteMove:"刪除該手",recordProperties:"棋譜情報",comments:"備註",commentsAndBookmarks:"備註・書籤",branches:"分支",branchListMode:"分支顯示",tree:"樹狀",previousMoveBranches:"已下棋步",nextMoveBranches:"下一手",bookmark:"書籤",bookmarkList:"書籤一覽",moveComments:"棋步備註",searchLog:"思考",pv:"預測手順",mateShort:"詰",displayPVShort:"再現",evaluation:"評價值",rawScore:"評價値",score:"評價値",estimatedWinRate:"期待勝率",evaluationAndEstimatedWinRateAndPV:"評價値・期待勝率・預測手順",swapEachTurnChange:"手番側有利時為正值",alwaysSenteIsPositive:"先手有利時為正值",signOfEvaluation:"評價值符號",showArrowScore:"在箭頭上顯示評價值",arrowScoreDiffRange:"箭頭評價值範圍",maxArrows:"箭頭顯示數量",winRateCoefficient:"勝率換算係數",nodeCountFormat:"節點數格式",plainNumber:"純數字",commaSeparated:"逗號分隔",monitor:"引擎監視",hideTabView:"最小化",expandTabView:"展開分頁",sente:"先手",senteOrShitate:"先手(下手)",shitate:"下手",gote:"後手",goteOrUwate:"後手(上手)",uwate:"上手",targetEngine:"受測引擎",baseEngine:"基準引擎",swapSenteGote:"先後交換",pieceToss:"振駒",opponent:"對手",level:"等級",turn:"手番",currentPosition:"現在局面",positionList:"局面列表",enableEngineTimeout:"開啟引擎時間限制",setDifferentTimeForGote:"先後手時間不相同",nextTurn:"手番",elapsedTime:"消費時間",elapsed:"經過時間",rank:"順位",depth:"深度",searchEngine:"引擎",ponder:"對方手番時運算 (Ponder)",numberOfThreads:"執行緒數",threads:"執行緒",suggestionsCount:"候補手數量",startPosition:"開始局面",beginFromThisPosition:"自此局面開始",maxMoves:"最大手數",gameRepetition:"連續對局",parallelism:"並行數",parallelGame:"並行對局",jishogi:"持將棋",rule24:"24點法",rule27:"27點法",tryRule:"Try Rule",autoRelogin:"自動重新登入",restartItEveryGame:"每局重新啟動",swapTurnWhenGameRepetition:"每局交換手番",outputComments:"輸出備註",saveRecordAutomatically:"自動保存棋譜",adjustBoardToHumanPlayer:"調整到玩家所在方向",adjustBoardAutomatically:"自動調整盤面方向",command:"指令",startGame:"對局開始",cancelGame:"取消對局",allottedTime:"持時間",byoyomi:"讀秒",increments:"增秒",startEndCriteria:"開始・結束條件",descending:"倒序",endCriteria1Move:"局面結束條件",outputSettings:"輸出設定",noOutputs:"不輸出",insertCommentToTop:"加入到前方",appendCommentToBottom:"在後方新增",insertToComment:"加入到備註欄",insertToRecord:"加入到棋譜",overwrite:"覆寫原檔案",fromPrefix:"從",fromSuffix:"",toPrefix:"到",toSuffix:"",plyPrefix:"第",plySuffix:"手",hoursSuffix:"小時",minutesSuffix:"分",secondsSuffix:"秒",eg:"例如",totalMoves:"總手數",detailSettings:"詳細設定",engineManagement:"引擎管理",engineName:"引擎名稱",author:"作者",description:"說明",earlyPonder:"預先Ponder",enginePath:"場所",openDirectory:"開啟資料夾",replaceEnginePath:"重新選擇引擎",displayName:"表示名稱",frontendBook:"定跡(GUI擴充)",moveSelection:"棋步選擇",bestMove:"最善手",bookMoveTemperature:"溫度(越小越優先最善手)",showAllOptions:"顯示所有選項",invoke:"執行",resetToEngineDefaultValues:"回復至引擎預設設定",defaultValue:"預設値",freeTextUnsafe:"自由輸入(不建議)",noEngineRegistered:"尚未登錄引擎。",duplicate:"複製",add:"追加",addFromFile:"從檔案新增",downloadEngines:"下載",downloadAnEngine:"下載引擎",engineDownload:"引擎下載",availableEngines:"可取得",installedEngines:"已安裝",install:"安裝",reinstall:"重新安裝",uninstall:"解除安裝",notInstalled:"未安裝",updateAvailable:"有更新",needsRepair:"需要修復",unused:"未使用",inUse:"使用中",downloadSize:"下載大小",agreeAndDownload:"同意並下載",sourceCodeURL:"原始碼",noDownloadableEngine:"沒有可下載的引擎。",noInstalledEngine:"沒有已安裝的引擎。",enginesAddedPleaseSave:"已加入引擎列表。請在引擎管理畫面按下「保存並關閉」以確定變更。",enginesUpdatedPleaseSave:"已更新引擎。請在引擎管理畫面按下「保存並關閉」以確定變更。",areYouSureWantToUninstallEngine:e=>`要刪除 ${e} 已下載的檔案嗎?`,downloadedFileIsCorrupted:"下載的檔案已損壞",engineIsInUse:"引擎正在使用中。請結束對局或檢討後再試一次。",compareAndMerge:"比較並合併",compareEngineSettings:"引擎設定比較",noDifference:"無更改",mergeToLeft:"合併至左側",mergeToRight:"合併至右側",recommended:"推薦",import:"匯入",saveAndClose:"保存並關閉",save:"保存",saveAs:"另存為",history:"歷史紀錄",clearHistory:"清除歷史紀錄",userFile:"使用者檔案",automaticBackup:"自動備份",restore:"復原",filterByFilePathOrContent:"以檔案路徑或內容搜尋",loadingFileContents:"正在讀取檔案...",loadRecordFromWeb:"從網際網路取得棋譜",backToMainBranch:"回到本譜",fetchLatestData:"取得最新資料",sourceURL:"來源網址",ok:"OK",cancel:"取消",yes:"是",no:"否",back:"返回",doNotShowAgain:"不再顯示",name:"名稱",prediction:"預測",best:"最善",nodes:"Node數",hashUsage:"Hash使用率",stop:"停止",resume:"重新開始",noHandicap:"平手",lanceHandicap:"香落",rightLanceHandicap:"右香落",bishopHandicap:"角落",rookHandicap:"飛車落",rookLanceHandicap:"飛車香落",twoPiecesHandicap:"二枚落",fourPiecesHandicap:"四枚落",sixPiecesHandicap:"六枚落",eightPiecesHandicap:"八枚落",tenPiecesHandicap:"十枚落",tsumeShogi:"詰將棋",doubleKingTsumeShogi:"雙玉詰將棋",startDateTime:"開始日時",endDateTime:"結束日時",gameDate:"對局日",tournament:"棋戰",strategy:"戰型",gameTitle:"標題",timeLimit:"限時",blackTimeLimit:"先手限時",whiteTimeLimit:"後手限時",place:"地點",postedOn:"登錄於",note:"備註",senteShortName:"先手省略名",goteShortName:"後手省略名",scorekeeper:"記錄員",opusNo:"作品編號",opusName:"作品名",publishedBy:"發表於",publishedOn:"發表年月",source:"來源",numberOfMoves:"手數",integrity:"完全性",recordCategory:"分類",award:"受賞",filterByOptionName:"搜尋設定名稱",filterByEngineName:"搜尋引擎名稱",bookStyle:"書籍風",bookStyleDiagram:"書籍風局面圖",gameStyle:"對局畫面風",thin:"細",bold:"粗",extraBold:"特粗",playerName:"對局者名稱",typeface:"字體",weight:"字體粗細",handLabel:"持駒標題",lastMoveColor:"最後一手的顏色",header:"標題",vertical:"垂直調整",size:"大小",none:"無",bgCover:"圖片置中",bgContain:"擴大表示",bgTile:"磁磚狀表示",inaccuracy:"緩手",dubious:"疑問手",mistake:"惡手",blunder:"大惡手",inaccuracyThreshold:"緩手閾値",dubiousThreshold:"疑問手閾値",mistakeThreshold:"惡手閾値",blunderThreshold:"大惡手閾値",maxPVLength:"PV表示手數",commentFormat:"註解形式",gothic:"黑體",mincho:"明體",appVersion:"軟體版本",installed:"已安裝",stable:"安定版",latest:"最新版",backgroundColor:"背景顏色",dialogPosition:"對話窗顯示位置",alignLeft:"左側",alignRight:"右側",alignCenter:"置中",dialogBackdrop:"對話窗背景",record:"棋譜",book:"定跡",bookInfo:"定跡資訊",resetBook:"初始化定跡",moveEvaluation:"棋步評價",forced:"絶対手",goodMove:"好手",yane2016BookFile:"やねうら王定跡檔案",ybbBookFile:"やねうら王二進位定跡檔案",shogiGUIBookFile:"ShogiGUI 定跡檔案",aperyBookFile:"Apery 定跡檔案",loadingMode:"讀取模式",positionCount:"局面數",gameCount:"對局數",statistics:"統計",chart:"圖表",analytics:"解析",controlGroup:"選單",left:"左方間隔",top:"上方間隔",width:"寬度",height:"高度",newCustomProfile:"新增佈局設定",addCustomLayoutProfile:"新增佈局設定",duplicateCurrentProfile:"複製目前佈局設定",removeCurrentProfile:"移除該佈局設定",exportProfileToClipboard:"將佈局設定複製至剪貼板",importProfileFromClipboard:"自剪貼板匯入佈局設定",editLayoutWithDragAndDrop:"拖曳編輯",stretchCustomLayout:"配合視窗大小",profileExportedToClipboard:"該佈局已複製至剪貼板。",profileImported:"該佈局已成功匯入。",failedToImportProfile:"佈局匯入失敗。",rightControlBox:"右側選單",leftControlBox:"左側選單",topControlBox:"操作按鈕",legends:"圖例",historyMode:"歷史模式",headers:"解析表頭",playButton:"再現按鈕",insert:"插入",bringForward:"移至前方",sendBackward:"移至後方",move:"著手",bookMove:"定跡手",play:"著手",edit:"編輯",addMoves:"新增該手",export:"匯出",flippedBook:"亦檢索先後逆局面",addBookMoves:"增加定跡手",fromCurrentRecord:"從現在棋譜",fromFile:"從檔案",fromDirectory:"從檔案目錄",noMoves:"沒有棋步。",noComment:"無備註",register:"登錄",update:"更新",importAll:"全部登錄",doYouWantToImportAllMoves:"要登錄所有棋步嗎?",importedMoves:e=>`已將 ${e} 手登錄至定跡。`,currentMove:"目前棋步",branchFrom:e=>`自${e}手目分岐`,allPlayers:"所有對局者",blackPlayerOnly:"僅先手",whitePlayerOnly:"僅後手",filterByName:"使用名稱過濾",importScoreFromComment:"從備註匯入評價值",enterPartOfPlayerNameHere:"輸入對局者名稱",freq:"出現次數",frequency:"出現次數",new:"新增",duplicated:"重複",moveEntry:"匯入手數",updatedAt:"更新時間",createdAt:"建立時間",lastSent:"最後送出",lastReceived:"最後接收",protocolVersion:"協定版本",prompt:"指令",openPrompt:"打開指令視窗",forceQuit:"強制退出",forceClose:"強制關閉",blankLine:"空行",autoScroll:"自動捲動",showTimestamp:"顯示時間戳章",highlightByPartialMatch:"反白部分一致部分",csaServer:"CSA伺服器",usiEngine:"USI引擎",noRunningUSIEngine:"目前沒有啟動中的USI引擎。",noConnectedCSAServer:"尚未連接CSA伺服器。",willBeRemovedFromTheListSoon:"由於 Session 結束,將會自一覽清除。",typeCommandHereAndPressEnter:"輸入指令後按下 Enter 以發送",allowBlankLine:"允許空行",removeSpaceFromBothEnds:"消除前後空白",collapseSequentialSpaces:"整理連續空白",typeCustomTitleHere:"輸入自定義標題",typeCustomCommentHere:"在此輸入備註",displayEmptyElements:"顯示未定義資料",share:"分享",waitingForNewGame:"正在等待下一場對局開始。",waitingForPlayerSetup:"正在等待對局者準備。",insertedComment:"已加入備註。",conversionCompleted:"轉換完成。",human:"人",randomPlayer:"隨機玩家",beginner:"初學者",staticRook:"居飛車",rangingRook:"振飛車",pleaseSelectEngines:"請選擇引擎。",thisItemCannotBeMerged:"該項目無法被合併。",tryingToConnectAndLoginToCSAServer:"正在連接並登入CSA伺服器。",inBrowserLogsOutputToConsoleAndIgnoreThisSetting:"※在瀏覽器版本中紀錄會於 console 中顯示,並無視此處的設定。",shouldRestartToApplyLogSettings:"※您需要重新啟動本程式以使用變更後的紀錄設定。",canOpenLogDirectoryFromMenu:"※紀錄的輸出檔案可以在「偵錯」-「開啟紀錄檔案資料夾」開啟。",hasNoOldLogCleanUpFeature:"※現在並沒有舊紀錄的自動刪除機制。",shouldRestartToApplyLowLevelSettings:"※您需要重新啟動本應用程式以反映底層設定。",processingPleaseWait:"現在處理中。請稍待一會。",importingFollowingRecordOrPosition:"將匯入以下棋譜(局面)。",supportsKIF_KI2_CSA_USI_SFEN_JKF_USEN:"※支援KIF/KI2/CSA/USI/SFEN/JKF/USEN形式。",pleasePasteRecordIntoTextArea:"※請在文字輸入區域貼上您的棋譜。",pleaseSpecifyPlainTextURL:"※請輸入您要使用的URL。",redirectNotSupported:"※無法使用重新導向連結。",desktopVersionPastesAutomatically:"※安裝程式版將會自動貼上棋譜。",asNewFile:"視為新檔案",mergeToRootPosition:"自棋譜開頭合併",mergeToCurrentPosition:"自目前局面合併",failedToMergeRecordWithDifferentInitialPosition:"無法合併初始盤面不同之棋譜。",failedToMergeRecordWithDifferentTurn:"無法合併手番不同之棋譜。",earlyPonderFeatureSendsPonderhitCommandWithYaneuraOusNonStandardOptions:"早期 Ponder 機能將會發送やねうら王自行定義之 ponderhit 指令。",ifYourEngineNotSupportTheOptionsItMayCauseUnexpectedBehavior:"若您的引擎不支援該指令,可能會有預期外之行為發生。",someLogsDisabled:"部份 log 已被無效化。",logsRecommendedForCSAProtocol:"若使用CSA協定對局,建議輸出各項紀錄。",blankLinePingRecommendedToPreventTimeout:"為防止連線逾時,建議啟用空行Ping。",pleaseEnableLogsAndRestart:"請在程式設定中開啟紀錄並重新啟動本程式。",hwaEnabled:"已啟用 HWA(硬體加速)。",hwaIsNotRecommendedForLongGames:"長時間對局時建議停用 HWA。",pleaseDisableHWAAndRestart:"請在程式設定中停用 HWA 並重新啟動本程式。",notSendPVOnStandardCSAProtocol:"在標準的CSA協定中不會送出評價值以及思考棋步。",passwordWillSavedPlaintextBecauseOSSideEncryptionNotAvailable:"由於無法使用系統的加密機能,輸入的密碼將會以明文保存。",pleaseUncheckSaveHistoryIfNotWantSave:"若不想保存密碼,請不要將「保存紀錄」勾選。",floodgatePasswordShouldStartWithGameName:"Floodgate密碼必須以對局名稱開頭。",thisIsNotFloodgateOfficialGameName:"這不是Floodgate官方之對局名稱。",yourPasswordDoesNotMeetFloodgateRequirementsDoYouStillWantToContinue:"密碼可能不符合Floodgate之要求。您仍要繼續嗎?",translationHelpNeeded:"我們正在招募翻譯人員。",restartRequiredAfterLocaleChange:"更改語言後,請重新啟動本程式。",confirmSwitchLanguage:e=>`要將顯示語言切換為「${e}」嗎?`,createDesktopShortcut:"在桌面建立捷徑",desktopShortcutCreated:"已在桌面建立捷徑。",areYouSureWantToResign:"確定要投了嗎?",areYouSureWantToDoDeclaration:"確定要進行勝利宣言嗎?",areYouSureWantToQuitGames:"要中斷連續對局嗎?",areYouSureWantToRequestQuit:"若提出中斷要求,可能會被判負。請問您要繼續嗎?",areYouSureWantToClearRecord:"將會刪除現在的棋譜。請問您要繼續嗎?",areYouSureWantToOpenFileInsteadOfCurrentRecord:"會將現在的棋譜關閉並開啟別的檔案,請問您要繼續嗎?",areYouSureWantToClearHistory:"將清除紀錄。請問您要繼續嗎?",areYouSureWantToRemoveCurrentProfile:"將移除現在的設定。請問您要繼續嗎?",yamlFormatSettingsCopiedToClipboard:"已將 YAML 格式之設定複製到剪貼板。",jsonFormatSettingsCopiedToClipboard:"已將 JSON 格式之設定複製到剪貼板。",usiCsaBridgeCommandCopiedToClipboard:"已將 usi-csa-bridge 指令複製到剪貼板。",positionImageCopiedToClipboard:"已將局面圖複製到剪貼板。",copiedToClipboard:"已複製到剪貼板。",pastedFromClipboard:"已從剪貼板貼上。",youCanNotCloseAppWhileCSAOnlineGame:"由於CSA協定正在使用中,本程式無法被關閉。",fileExtensionNotSupported:"無法使用該副檔名。",errorOccuredWhileDisconnectingFromCSAServer:"在與CSA伺服器中斷連線時發生錯誤。",failedToConnectToCSAServer:"無法連接CSA伺服器。",errorOccuredWhileLogoutFromCSAServer:"在登出 CSA 伺服器時發生錯誤。",disconnectedFromCSAServer:"與CSA伺服器的連接結束。",csaServerLoginDenied:"您對CSA伺服器的登入被拒絕。",thisFeatureNotAvailableOnWebApp:"Web版無法使用本機能",failedToLoadEngine:"引擎讀取失敗。",engineRequiresOnline:"讀取引擎需要網路連線。",engineRequiresReload:"使用引擎需要重新整理頁面。",failedToStartNewGame:"對局開始失敗。",errorOccuredWhileEndingGame:"在對局結束時發生錯誤。",failedToSendGoCommand:"無法送出go指令。",failedToSendPonderCommand:"無法送出ponder指令。",failedToSendStopCommand:"無法送出stop指令。",failedToShutdownEngines:"引擎無法正常結束。",failedToCheckUpdates:"無法確認更新。",youAreUsingTheLatestVersion:"您正在使用最新版本。",newVersionIsAvailablePressToUpdate:"有新版本可用。按此處進行更新。",failedToSaveRecord:"棋譜保存失敗。",failedToParseSFEN:"SFEN讀取失敗。",failedToDetectRecordFormat:"無法判別棋譜形式。",unknown:"未知",unknownFileExtension:"未知的檔案形式。",emptyRecordInput:"您尚未輸入棋譜。",invalidPieceName:"不合法的棋駒",invalidTurn:"不合法的手番",invalidMove:"不合法的棋步",invalidMoveNumber:"不合法的手數",invalidDestination:"不合法的移動目的地",pieceNotExists:"不存在的棋駒",invalidLine:"不存在的行",invalidBoard:"不合法的盤面",invalidHandPiece:"不合法的持駒",invalidUSI:"不合法的USI",engineProcessWasClosedUnexpectedly:"引擎進程意外結束。",backgroundImageFileNotSelected:"尚未選取背景圖片。",pieceImageFileNotSelected:"尚未選取棋駒圖片。",boardImageFileNotSelected:"尚未選取盤面圖片。",pieceStandImageFileNotSelected:"尚未選取駒台圖片。",pieceSoundVolumeMustBe0To100Percent:"請在0%~100%之間指定棋駒音效大小。",clockSoundVolumeMustBe0To100Percent:"請在0%~100%之間指定棋鐘音效大小。",clockSoundPitchMustBe220To880Hz:"請在220Hz~880Hz之間指定棋鐘音效頻率。",engineTimeoutMustBe1To300Seconds:"請在1秒~300秒之間指定引擎執行最長時間。",coefficientInSigmoidMustBeGreaterThan0:"請將勝率換算係數填為大於0之值。",inaccuracyThresholdMustBe1To100Percent:"請在0%~100%之間指定緩手門檻。",dubiousThresholdMustBe1To100Percent:"請在0%~100%之間指定疑問手門檻。",mistakeThresholdMustBe1To100Percent:"請在0%~100%之間指定惡手門檻。",blunderThresholdMustBe1To100Percent:"請在0%~100%之間指定大惡手門檻。",recordSavedWithGarbledCharacters:"保存的棋譜有部分可能會造成亂碼。",pleaseConsiderToUseKIFU:"建議您使用KIFU形式(UTF-8)儲存您的棋譜。",youCanChangeDefaultRecordFileFormatFromAppSettings:"預設棋譜檔案格式可以在程式設定中進行更動。",inaccuracyThresholdMustBeLessThanDubiousThreshold:"緩手門檻應小於疑問手門檻。",dubiousThresholdMustBeLessThanMistakeThreshold:"疑問手門檻應小於惡手門檻。",mistakeThresholdMustBeLessThanBlunderThreshold:"惡手門檻應小於大惡手門檻。",thisEngineNotSupportsMateSearch:"這個引擎不支援詰將棋搜索。",pleaseEndActiveFeaturesBeforeOpenRecord:"請關閉現正運行的功能再開啟棋譜。",bothTimeLimitAndByoyomiAreNotSet:"持時間與讀秒尚未設置。",canNotUseByoyomiWithFischer:"讀秒與 Fischer 選項無法同時併用。",repeatsMustBeOneIfHumanPlayerIncluded:"若要與人對局,連續對局次數僅能設為 1 。",parallelismMustBeOneIfHumanPlayerIncluded:"若要與人對局,並行數僅能設為 1。",parallelismMustBeOneIfCurrentPositionIsUsed:"若以目前局面為開始局面,並行數僅能設為 1。",parallelismMustLessThanOrEqualToRepeats:"並行數須小於或等於連續對局次數。",protocolVersionNotSelected:"請選擇協定版本。",hostNameIsEmpty:"主機名稱為空。",invalidPortNumber:"不可用的連接埠號碼。",idIsEmpty:"ID 為空。",idContainsSpace:"ID 含有空白字符。",passwordContainsSpace:"密碼含有空白字符。",tcpKeepaliveInitialDelayMustBePositive:"請輸入正確的TCP Keepalive初始延遲時間。",blankLinePingInitialDelayMustBeGreaterThanOrEqualTo30:"請輸入正確的空行輸出初始延遲時間。",blankLinePingIntervalMustBeGreaterThanOrEqualTo30:"請輸入正確的空行輸出間隔時間。",engineNotSelected:"尚未選擇引擎。",forExportingConversionLogPleaseEnableAppLogsAndSetLogLevelDebugAndRestart:"如要監看轉換紀錄,請在程式設定內設定 log level 到 Debug 並重新啟動本程式。",sourceDirectoryNotSpecified:"輸入目錄尚未被指定。",sourceFileMustBeSFEN:"輸入檔案必須為 .sfen 格式。",sourceFormatsNotSpecified:"輸入格式尚未被指定。",destinationDirectoryNotSpecified:"輸出格式尚未被指定。",destinationFileNotSpecified:"輸出檔案尚未被指定。",destinationFileMustBeJSON:"輸出檔案必須為 .json 格式。",anyUnsavedDataWillBeLostDoYouReallyWantToResetBookData:"未保存內容可能會丟失。您確認要重置定跡嗎?",bookMovesWereImported:"已完成匯入定跡。",anyBookMovesAreUnsavedDoYouReallyWantToDiscardThemAndCloseTheApp:"存在尚未保存的定跡。您確定要捨棄並關閉本程式嗎?",cannotOverwriteOnTheFlyBook:"以 On-the-fly 模式讀取中的定跡無法覆寫保存。",pleaseSpecifyOtherFileName:"請指定其他檔案名稱。",memoryShortageOnBookConversionMayLoseUnsavedData:"轉換定跡資料時若記憶體不足,未保存的資料可能會遺失。",cannotConvertAperyBookToOtherFormat:"Apery 定跡無法轉換為其他格式。",sourceRecordFileNotSet:"尚未指定棋譜檔案。",sourceDirectoryNotSet:"請選擇目錄。",minPlyMustBeLessThanMaxPly:"最小手數應小於最大手數。",playerNameNotSet:"尚未設定對局者名稱。",incompatibleOptionsWillBeDiscardedDoYouReallyWantToReplaceTheEnginePath:"不相容的設定將自動被移除。您確認要更換引擎嗎?",largeSuggestionsCountMayCausePerformanceDegradation:"增加候補手可能會導致效能下降。",doYouReallyWantToIncreaseTheSuggestionsCount:"您確定要增加候選手數嗎?",recommendLowerSettingsForDailyUse:"日常使用的電腦建議使用較低的設定。",checkEngineCompatibilityForNumaEnvironments:"這台電腦可能有多個 CPU 插槽或處理器群組(NUMA)。不支援 NUMA 環境的引擎可能會效能下降。請確認引擎是否支援 NUMA。",aiPerformanceMayDegrade:"AI 的效能可能會下降。",yourPCMayBecomeSlow:"電腦運作可能會變慢。",increasingItMayImproveAIPerformance:"調高此值可能會提升 AI 的效能。",totalNumber:e=>`總計 ${e} 筆`,number:e=>`${e} 筆`,tryToReloginToCSAServerNSecondsLater:e=>`請在${e}秒後再次嘗試登入 CSA 伺服器。`,mateInNPlyDoYouWantToDisplay:e=>`尋找到${e}手詰。要顯示結果嗎?`,insertedNMovesToRecord:e=>`已加入${e}手到棋譜。`,errorsOccurred:e=>`發生 ${e} 個錯誤。`,between:(e,t)=>`自 ${e} 到 ${t} `,addNthEngine:e=>`追加第 ${e} 個引擎`,copyOf:e=>`${e} 的拷貝`,keepLatest:e=>`到最新${e}件`,followingDataNotSavedBecauseNotSupporetedBy:e=>`以下的資料由於 ${e} 格式無法支援的原因無法保存。`,areYouSureWantToDeleteFollowingMove:e=>`將會刪除${e}手目以後的棋譜。請問您要繼續嗎?`,failedToOpenDirectory:e=>`無法開啟檔案目錄:${e}`,unexpectedEventSenderPleaseReport:e=>`無法預期的事件發送方已發生。請將該錯誤訊息告知開發者,謝謝。 [${e}]`,unexpectedHTTPMethodPleaseReport:e=>`無法預期的 HTTP 方法。請將該錯誤訊息告知開發者,謝謝。 [${e}]`,unexpectedRequestURLPleaseReport:e=>`無法從 URL 獲取資訊。請將該錯誤訊息告知開發者,謝謝。 [${e}]`,noResponseFromEnginePleaseExtendTimeout:e=>`引擎在${e}秒内沒有回應。若引擎的啟動時間稍長,請在設定的「USI協定」分頁中調整引擎最長等待時間。`,stableVersionReleased:e=>`安定版 ${e} 已經發布!`,latestVersionReleased:e=>`最新版 ${e} 已經發布!`,doYouReallyWantToRemoveBookMove:e=>`將移除定跡手 ${e}。確認移除嗎?`,unexpectedRecordFileExtension:e=>`該檔案為不支援的棋譜副檔名。 [${e}]`,fileNotFound:e=>`無法找到該檔案。 [${e}]`,directoryNotFound:e=>`無法找到該目錄。 [${e}]`,youCanExitFullScreenByPressing:e=>`請按下${e}鍵以結束全螢幕顯示。`,skippedMovesInMerge:(e,t)=>`${t}手內之${e}手無法被合併。`,cpuUsageExceedsNPercent:e=>`超過全部 CPU 核心的 ${e}%。`,totalNumberOfThreadsExceedsNPercentOfCpuCores:e=>`執行緒總數超過 CPU 核心數的 ${e}%。`,memoryUsageExceedsNPercent:e=>`超過全部記憶體的 ${e}%。`,memoryUsageIsLessThanNPercent:e=>`低於全部記憶體的 ${e}%。`,totalUSIHashExceedsNPercentOfMemory:e=>`USI_Hash 總計超過全部記憶體的 ${e}%。`,heapUsageExceedsNGBMayHang:e=>`記憶體使用量已超過 ${e}GB。若持續增加,程式可能會停止回應。`,settingsFileCorruptedMovedAndReset:(e,t)=>`設定檔 ${e} 已損壞,無法讀取。損壞的檔案已移至 ${t},將使用預設設定。`};o.d(t,["d",0,n])},71(e,t,o){o(113),o(636)},636(e,t,o){o.d(t,{x:()=>c});var n=o(87),i=o(453),a=o(943),s=o(566),r=o(387);const l=a.ja;function c(e){Object.entries(function(e){switch(e){case n.TM.JA:return a.ja;case n.TM.EN:return i.en;case n.TM.ZH_TW:return s.d;case n.TM.VI:return r.vi;default:return a.ja}}(e)).forEach(([e,t])=>{l[e]=t})}o.d(t,["t",0,l])},987(e,t,o){o.d(t,{x:()=>s});var n=o(87);const i={USI_Ponder:"相手番思考",Ponder:"相手番思考",USI_Hash:"ハッシュ",Hash:"ハッシュ",Clear_Hash:"ハッシュクリア",Threads:"スレッド",NumberOfThreads:"スレッド数",thread_num_per_gpu:"GPUあたりのスレッド数",ThreadIdOffset:"スレッドIDオフセット",MultiPV:"マルチPV(候補手の表示件数)",BookFile:"定跡ファイル",Book_File:"定跡ファイル",Book_Enable:"定跡あり",BookEvalDiff:"定跡の評価値差",book_file_name:"定跡ファイル名",use_book:"定跡を使用",BookPvMoves:"定跡PV手数",TinyBook:"小さい定跡",BookMoves:"定跡利用手数",BookMaxPly:"定跡最大手数",BookIgnoreRate:"定跡不使用率",RandomBookSelect:"ランダム定跡選択",IgnoreBookPly:"定跡の手数を無視",DepthLimit:"最大深さ",NarrowBook:"定跡手を限定",WriteDebugLog:"デバッグログ出力",Write_Debug_Log:"デバッグログ出力",ResignValue:"投了基準値",ResignScore:"投了基準値",PvInterval:"PV出力間隔",NodesLimit:"最大ノード数",USI_OwnBook:"定跡を使用",OwnBook:"定跡を使用",EvalDir:"評価関数のフォルダ",Eval_Dir:"評価関数のフォルダ",EvalFile:"評価関数ファイル",EvalHash:"評価値ハッシュ",Eval_Hash:"評価値ハッシュ",EvalSaveDir:"評価関数保存フォルダ",EvalShare:"評価値共有",BookDir:"定跡ファイルのフォルダ",Stochastic_Ponder:"確率的相手番思考",MinimumThinkingTime:"最小思考時間",Minimum_Thinking_Time:"最小思考時間",MinThinkingTime:"最小思考時間",MaxMovesToDraw:"強制引き分け手数",SlowMover:"長考",Slow_Mover:"長考",OutputFailLHPV:"Fail Low/Highを出力",NetworkDelay:"通信遅延",NetworkDelay2:"通信遅延2",FV_SCALE:"評価値スケール",UseBook:"定跡を使用",MaxDepth:"最大深さ",MarginMs:"マージン(ミリ秒)",Time_Margin:"時間マージン",ByoyomiMargin:"秒読みマージン",Byoyomi_Margin:"秒読みマージン",byoyomi_margin:"秒読みマージン",Move_Overhead:"着手オーバーヘッド",FischerMargin:"フィッシャーマージン",SuddenDeathMargin:"切れ負けマージン",Snappy:"素早く指す",EnteringKingRule:"入玉ルール",Do_YoTsume_Search:"余詰めを探索",gpu_num:"GPU数",ConsiderationMode:"検討モード",ConsiderBookMoveCount:"定跡出現率を使用",GenerateAllLegalMoves:"全合法手を生成",DrawScore:"引き分けのスコア",DrawValue:"引き分けの値",DrawValueBlack:"引き分けの値・先手",DrawValueWhite:"引き分けの値・後手",LargePageEnable:"LargePageを使用",SkillLevel:"スキルレベル",Skill_Level:"スキルレベル",BookOnTheFly:"定跡直接読み込み(大規模定跡)",BookDepthLimit:"定跡深さ制限",BookEvalBlackLimit:"定跡評価値制限・先手",BookEvalWhiteLimit:"定跡評価値制限・後手"},a={};function s(e){Object.keys(a).forEach(e=>{delete a[e]}),Object.entries(function(e){switch(e){case n.TM.JA:return i;case n.TM.EN:default:return{}}}(e)).forEach(([e,t])=>{a[e]=t})}},145(e,t,o){var n,i;o.d(t,{$:()=>i,F:()=>n}),function(e){e.APP="app",e.USI="usi",e.CSA="csa"}(n||(n={})),function(e){e.DEBUG="debug",e.INFO="info",e.WARN="warn",e.ERROR="error"}(i||(i={}))},416(e,t,o){var n;o.d(t,{K:()=>n}),function(e){e[e.PLAYER=0]="PLAYER",e[e.OPPONENT=1]="OPPONENT",e[e.RESEARCHER=2]="RESEARCHER",e[e.RESEARCHER_2=3]="RESEARCHER_2",e[e.RESEARCHER_3=4]="RESEARCHER_3",e[e.RESEARCHER_4=5]="RESEARCHER_4"}(n||(n={}))},596(e,t,o){var n,i;o.d(t,{F:()=>i,Q:()=>n}),function(e){e.NONE="none",e.INSERT="insert",e.APPEND="append",e.OVERWRITE="overwrite"}(n||(n={})),function(e){e.SHOGIHOME="shogihome",e.FLOODGATE="floodgate",e.CSA3="csa3",e.SHOGIGUI="shogigui"}(i||(i={}))},244(e,t,o){o.d(t,{$P:()=>f,VX:()=>S,_B:()=>m,eA:()=>g,uU:()=>y,xv:()=>v});var n=o(117),i=o(924),a=o(292),s=o(262),r=o(953),l=o.n(r),c=o(14),h=o(596);const[d,u]=[l().base64Decode,l().base64Encode];var m;function p(){return{protocolVersion:m.V121_FLOODGATE,host:"",port:4081,id:"",password:"",tcpKeepalive:{initialDelay:10},blankLinePing:{initialDelay:40,interval:40}}}function g(){return{player:{name:a.t.human,uri:n.He},server:p(),autoFlip:!0,enableComment:!0,enableAutoSave:!0,autoSaveDirectory:"",repeat:1,autoRelogin:!0,restartPlayerEveryGame:!1,searchCommentFormat:h.F.SHOGIHOME}}function S(e){const t=(0,i.$)(e.player);if(t)return t;const o=function(e){if(e.protocolVersion!==m.V121&&e.protocolVersion!==m.V121_FLOODGATE&&e.protocolVersion!==m.V121_X1)return new Error(a.t.protocolVersionNotSelected);if(""===e.host)return new Error(a.t.hostNameIsEmpty);if(e.port<0||e.port>65535)return new Error(a.t.invalidPortNumber);if(""===e.id)return new Error(a.t.idIsEmpty);if(e.id.indexOf(" ")>=0)return new Error(a.t.idContainsSpace);if(e.password.indexOf(" ")>=0)return new Error(a.t.passwordContainsSpace);if(e.tcpKeepalive.initialDelay<=0)return new Error(a.t.tcpKeepaliveInitialDelayMustBePositive);if(e.blankLinePing){if(e.blankLinePing.initialDelay<30)return new Error(a.t.blankLinePingInitialDelayMustBeGreaterThanOrEqualTo30);if(e.blankLinePing.interval<30)return new Error(a.t.blankLinePingIntervalMustBeGreaterThanOrEqualTo30)}}(e.server);return o||(e.server.protocolVersion!==m.V121&&e.server.protocolVersion!==m.V121_FLOODGATE?new Error("protocolVersion must be v121 or v121_floodgate"):!Number.isInteger(e.repeat)||e.repeat<1?new Error("repeat must be a positive integer"):void 0)}function y(e){return{player:{name:a.t.human,uri:n.He},serverHistory:[],autoFlip:!0,enableComment:!0,enableAutoSave:!!e?.autoSaveDirectory,autoSaveDirectory:(0,c.w)(e?.autoSaveDirectory||""),repeat:1,autoRelogin:!0,restartPlayerEveryGame:!1}}!function(e){e.V121="v121",e.V121_FLOODGATE="v121_floodgate",e.V121_X1="v121_x1"}(m||(m={}));function f(e,t){const o=(0,s.X1)(e.usi,t?.playerURI);return{player:{name:e.usi.name,uri:o.uri,usi:o},server:e.server,autoFlip:!0,enableComment:e.enableComment,enableAutoSave:e.saveRecordFile,autoSaveDirectory:t?.autoSaveDirectory||"",repeat:e.repeat,autoRelogin:e.autoRelogin,restartPlayerEveryGame:e.restartPlayerEveryGame,searchCommentFormat:e.searchCommentFormat||h.F.SHOGIHOME}}async function v(e){const t=new Uint8Array(d(e)),o=new DecompressionStream("gzip");return new Blob([t]).stream().pipeThrough(o),JSON.parse(await new Response(o.readable).text())}},924(e,t,o){o.d(t,{$:()=>r,w:()=>s});var n=o(292),i=o(262),a=o(117);function s(){return{name:n.t.human,uri:a.He}}function r(e){if(!e.name)return new Error("player name is required");if(!e.uri)return new Error("player URI is required");if(a.Em(e.uri)){if(!e.usi)return new Error("USI is required");const t=(0,i.wb)(e.usi);if(t)return t}else if(a.b0(e.uri)){if(!a.iM.some(t=>t===e.uri))return new Error("invalid player URI")}else if(e.uri!==a.He)return new Error("invalid player URI")}},262(e,t,o){o.d(t,{J3:()=>u,Lo:()=>p,X1:()=>M,hJ:()=>y,iT:()=>f,my:()=>m,pk:()=>g,rh:()=>I,v2:()=>v,wb:()=>A,z4:()=>k});var n=o(117),i=o(292),a=o(953),s=o.n(a);const[r,l]=[s().base64Decode,s().base64Encode],c="USI_Ponder",h="USI_MultiPV",d="MultiPV";function u(e){if(e&&"button"!==e.type)return void 0!==e.value?e.value:"string"!==e.type&&"filename"!==e.type||"<empty>"!==e.default?e.default:""}function m(e){return"true"===u(e.options[c])}function p(e){const t=u(e.options[h])||u(e.options[d]);return"number"==typeof t?t:void 0}function g(e){return"true"===u(e.options.Stochastic_Ponder)}var S,y;function f(e){switch(e){case"game":return i.t.game;case"research":return i.t.research;case"mate":return i.t.mateSearch;case"download":return i.t.downloaded}}!function(e){e.GAME="game",e.RESEARCH="research",e.MATE="mate"}(S||(S={})),function(e){e.BEST="best",e.WEIGHTED_BY_COUNT="weightedByCount",e.WEIGHTED_BY_SCORE="weightedByScore"}(y||(y={}));function v(){return{uri:"",name:"",defaultName:"",author:"",path:"",options:{},labels:{game:!0,research:!0,mate:!0},tags:[f("game"),f("research"),f("mate")],enableEarlyPonder:!1,extraBook:{enabled:!1,filePath:"",onTheFly:!1}}}function T(e){switch(e){case S.GAME:return f("game");case S.RESEARCH:return f("research");case S.MATE:return f("mate")}}function b(e){return Object.entries(e).filter(([e,t])=>t&&T(e)).map(([e])=>T(e))}function C(e){switch(e){case f("game"):return S.GAME;case f("research"):return S.RESEARCH;case f("mate"):return S.MATE}}function E(e){const t={[S.GAME]:!1,[S.RESEARCH]:!1,[S.MATE]:!1};for(const o of e){const e=C(o);e&&(t[e]=!0)}return t}function I(e,t){e.uri=t.uri,e.name=t.name,Object.values(t.options).forEach(t=>{const o=e.options[t.name];o&&"button"!==o.type&&o.type===t.type&&(o.value=t.value)}),e.labels=t.labels,e.tags=t.tags||b(t.labels||{}),e.enableEarlyPonder=t.enableEarlyPonder,e.extraBook=t.extraBook}function A(e){if(!n.Em(e.uri))return new Error("invalid engine URI");if(!e.name&&!e.defaultName)return new Error("engine name is required");if(!e.path)return new Error("engine path is required");for(const t in e.options){const o=e.options[t];if(!["check","spin","combo","button","string","filename"].includes(o.type))return new Error(`invalid option type: name=[${t}] type=[${o.type}]`);if(!P(o))return new Error(`invalid option value: name=[${t}] type=[${o.type}]`+("button"!==o.type?` value=[${o.value}]`:""))}}function P(e){if("button"===e.type||void 0===e.value)return!0;switch(e.type){case"check":if("true"!==e.value&&"false"!==e.value)return!1;break;case"spin":if("number"!=typeof e.value)return!1;if(void 0!==e.min&&e.value<e.min&&e.value!==e.default)return!1;if(void 0!==e.max&&e.value>e.max&&e.value!==e.default)return!1;break;case"string":case"filename":case"combo":if("string"!=typeof e.value)return!1}return!0}const w={blue:"#1565C0",green:"#2E7D32",orange:"#D84315",brown:"#5D4037",purple:"#7B1FA2",indigo:"#303F9F",amber:"#EF6C00",gray:"#616161",pink:"#C2185B"};class k{engines={};tagColorMapping={};constructor(e){if(e){const t=JSON.parse(e);Object.keys(t.engines).filter(n.Em).forEach(e=>{const o=v(),n=t.engines[e];this.engines[e]={...o,...n,uri:e,labels:{...o.labels,...n.labels},tags:n.tags||b(n.labels||{})}}),this.tagColorMapping=t.tagColorMapping||{},this.updateTagColorMapping()}}hasEngine(e){return!!this.engines[e]}addEngine(e){this.engines[e.uri]=e,this.updateTagColorMapping()}updateEngine(e){return!!this.engines[e.uri]&&(this.engines[e.uri]=e,this.updateTagColorMapping(),!0)}removeEngine(e){return!!this.engines[e]&&(delete this.engines[e],this.updateTagColorMapping(),!0)}getEngine(e){return this.engines[e]}get engineList(){return Object.values(this.engines).sort((e,t)=>e.name!==t.name?e.name>t.name?1:-1:e.defaultName!==t.defaultName?e.defaultName>t.defaultName?1:-1:e.uri>t.uri?1:-1)}get tagList(){return Object.entries(this.tagColorMapping).map(([e,t])=>({name:e,color:w[t]})).sort((e,t)=>e.name>t.name?1:-1)}getTagColor(e){const t=this.tagColorMapping[e]||"blue";return w[t]||w.blue}addTag(e,t){this.engines[e]&&(this.engines[e].tags=this.engines[e].tags||[],this.engines[e].tags.includes(t)||this.engines[e].tags.push(t),this.updateTagColorMapping(),this.engines[e].labels=E(this.engines[e].tags))}removeTag(e,t){this.engines[e]&&(this.engines[e].tags=this.engines[e].tags?.filter(e=>e!==t),this.updateTagColorMapping(),this.engines[e].labels=E(this.engines[e].tags||[]))}updateTagColorMapping(){const e=new Set;for(const t of Object.values(this.engines))for(const o of t.tags??[])e.add(o);const t=Object.keys(w),o=new Set(Object.values(this.tagColorMapping)),n=t.filter(e=>!o.has(e));let i=Object.keys(this.tagColorMapping).length;for(const o of e)if(!this.tagColorMapping[o]){const e=n.shift()??t[i%t.length];this.tagColorMapping[o]=e,i++}for(const t of Object.keys(this.tagColorMapping))e.has(t)||delete this.tagColorMapping[t]}get json(){return JSON.stringify(this)}get jsonWithIndent(){return JSON.stringify(this,void 0,2)}getClone(){return new k(this.json)}}function M(e,t){const o={};for(const t in e.options){const n=e.options[t];switch(n.type){case"check":o[t]={name:t,type:"check",order:0,value:n.value?"true":"false"};break;case"spin":o[t]={name:t,type:"spin",order:0,value:n.value};break;case"combo":o[t]={name:t,type:"combo",order:0,value:n.value,vars:[n.value]};break;default:o[t]={name:t,type:n.type,order:0,value:n.value}}}return{uri:t||(0,n.A7)(),name:e.name,defaultName:e.name,author:"",path:e.path,options:o,enableEarlyPonder:e.enableEarlyPonder,extraBook:e.extraBook,labels:{}}}o.d(t,["AE",0,[".png",".jpg",".jpeg",".gif",".webp"],"Br",0,h,"If",0,"USI_Hash","YZ",0,c,"aW",0,d])},117(e,t,o){o.d(t,{A7:()=>d,Em:()=>h,b0:()=>c,m7:()=>u});o(292);const n="es://basic-engine/",i=`${n}static_rook/v1`,a=`${n}ranging_rook/v1`,s=`${n}random`,r=[i,a,s],l="es://usi-engine/";function c(e){return e.startsWith(n)}function h(e){return e.startsWith(l)}function d(){const e=Date.now(),t=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16);return l+`${e}/${t}`}function u(e){return`es://temp-file/${Date.now()}/${Math.floor(Math.random()*16**6).toString(16).padStart(6,"0")}/${e}`}o.d(t,["DI",0,s,"He",0,"es://human","KY",0,"es://layout-profile/standard","fv",0,l,"iM",0,r,"ke",0,i,"y3",0,a])},918(e,t,o){const n=/^[A-Za-z_$][A-Za-z0-9_$]*$/;o.d(t,["_V",0,n])},616(e,t,o){o.d(t,{DO:()=>y,VH:()=>l});var n=o(262),i=o(918);const a="shogihome-wasm-engine/1",s=["check","spin","combo","button","string","filename"],r=/^[A-Za-z0-9._-]+(?:\/[A-Za-z0-9._-]+)*$/;function l(e){return r.test(e)&&e.split("/").every(e=>"."!==e&&".."!==e)}function c(e){throw new Error(`invalid engine manifest: ${e}`)}function h(e,t){return("object"!=typeof e||null===e||Array.isArray(e))&&c(`${t} must be an object`),e}function d(e,t){return"string"==typeof e&&""!==e||c(`${t} must be a non-empty string`),e}function u(e,t,o){const n=d(e,t);return[...n].length>o&&c(`${t} must be at most ${o} characters: ${n}`),n}function m(e,t){const o=d(e,t);return l(o)||c(`${t} must be a relative path without "..": ${o}`),o}function p(e,t){const o=d(e,t);let n;try{n=new URL(o)}catch{c(`${t} must be a valid URL: ${o}`)}return"https:"===n.protocol&&n.hostname||c(`${t} must be an https URL with a host: ${o}`),{text:o,url:n}}function g(e,t){const o=h(e,t),n={};for(const[e,i]of Object.entries(o))"string"!=typeof i&&"number"!=typeof i&&c(`${t}.${e} must be a string or a number`),n[e]=i;return n}function S(e,t){const o=h(e,t),n={id:m(o.id,`${t}.id`),displayName:d(o.displayName,`${t}.displayName`)};if(void 0!==o.values&&(n.values=g(o.values,`${t}.values`)),void 0!==o.tags){Array.isArray(o.tags)||c(`${t}.tags must be an array`),n.tags=[];for(const e of o.tags)"game"!==e&&"research"!==e&&"mate"!==e&&c(`${t}.tags[] must be one of "game", "research", or "mate"`),n.tags.push(e)}return void 0!==o.mobileGame&&(n.mobileGame=function(e,t){const o=h(e,t);return Array.isArray(o.levels)&&0!==o.levels.length||c(`${t}.levels must be a non-empty array`),{levels:o.levels.map((e,o)=>{const n=`${t}.levels[${o}]`,i=h(e,n),a={label:d(i.label,`${n}.label`)};return void 0!==i.values&&(a.values=g(i.values,`${n}.values`)),a})}}(o.mobileGame,`${t}.mobileGame`)),n}function y(e){const t=h(e,"manifest"),o=d(t.abi,"manifest.abi");o!==a&&c(`unsupported abi: ${o} (expected ${a})`),Array.isArray(t.presets)&&0!==t.presets.length||c("manifest.presets must be a non-empty array");const r={abi:o,module:m(t.module,"manifest.module"),moduleFormat:"esm",name:d(t.name,"manifest.name"),author:d(t.author,"manifest.author"),presets:t.presets.map((e,t)=>S(e,`manifest.presets[${t}]`))};if(void 0!==t.moduleFormat){const e=d(t.moduleFormat,"manifest.moduleFormat");"esm"!==e&&"umd"!==e&&c(`manifest.moduleFormat is unknown: ${e}`),r.moduleFormat=e}if("umd"===r.moduleFormat){const e=d(t.exportName,"manifest.exportName");i._V.test(e)||c(`manifest.exportName must be an identifier: ${e}`),r.exportName=e}if(void 0!==t.assetBaseURL){const{text:e,url:o}=p(t.assetBaseURL,"manifest.assetBaseURL");o.pathname.endsWith("/")||c(`manifest.assetBaseURL must end with "/": ${e}`),(o.search||o.hash)&&c(`manifest.assetBaseURL must not have a query or fragment: ${e}`),r.assetBaseURL=e}if(void 0!==t.badge&&(r.badge=u(t.badge,"manifest.badge",8)),void 0!==t.banner){const e=m(t.banner,"manifest.banner"),o=e.toLowerCase();n.AE.some(e=>o.endsWith(e))||c(`manifest.banner must be one of ${n.AE.join(", ")}: ${e}`),r.banner=e}void 0!==t.description&&(r.description=u(t.description,"manifest.description",400)),void 0!==t.links&&(Array.isArray(t.links)&&0!==t.links.length||c("manifest.links must be a non-empty array"),r.links=t.links.map((e,t)=>function(e,t){const o=h(e,t);return{label:u(o.label,`${t}.label`,40),url:p(o.url,`${t}.url`).text}}(e,`manifest.links[${t}]`))),void 0!==t.requiresCrossOriginIsolation&&("boolean"!=typeof t.requiresCrossOriginIsolation&&c("manifest.requiresCrossOriginIsolation must be a boolean"),r.requiresCrossOriginIsolation=t.requiresCrossOriginIsolation),void 0!==t.licenses&&(Array.isArray(t.licenses)&&0!==t.licenses.length||c("manifest.licenses must be a non-empty array"),r.licenses=t.licenses.map((e,t)=>function(e,t){const o=h(e,t),n={spdx:d(o.spdx,`${t}.spdx`),file:m(o.file,`${t}.file`)};return void 0!==o.subject&&(n.subject=d(o.subject,`${t}.subject`)),void 0!==o.source&&(n.source=p(o.source,`${t}.source`).text),n}(e,`manifest.licenses[${t}]`))),void 0!==t.options&&(Array.isArray(t.options)||c("manifest.options must be an array"),r.options=t.options.map((e,t)=>function(e,t){const o=h(e,t),n=d(o.type,`${t}.type`);s.includes(n)||c(`${t}.type is unknown: ${n}`);const i={name:d(o.name,`${t}.name`),type:n};void 0!==o.default&&("string"!=typeof o.default&&"number"!=typeof o.default&&c(`${t}.default must be a string or a number`),i.default=o.default);for(const e of["min","max"])void 0!==o[e]&&("number"!=typeof o[e]&&c(`${t}.${e} must be a number`),i[e]=o[e]);return void 0!==o.vars&&(Array.isArray(o.vars)||c(`${t}.vars must be an array`),i.vars=o.vars.map((e,o)=>d(e,`${t}.vars[${o}]`))),i}(e,`manifest.options[${t}]`))),void 0!==t.dataFiles&&(Array.isArray(t.dataFiles)||c("manifest.dataFiles must be an array"),r.dataFiles=t.dataFiles.map((e,t)=>{const o=`manifest.dataFiles[${t}]`,n=h(e,o);return{url:m(n.url,`${o}.url`),path:d(n.path,`${o}.path`)}}));const l=new Set;for(const e of r.presets)l.has(e.id)&&c(`duplicated preset id: ${e.id}`),l.add(e.id);return r}o.d(t,["pF",0,"cross-origin isolation is required","xF",0,"engine.json"])},557(e,t,o){o.r(t),o.d(t,{CSAGameManager:()=>S,CSAGameState:()=>p,onCSAClose:()=>E,onCSAGameResult:()=>C,onCSAGameSummary:()=>f,onCSAMove:()=>b,onCSAReject:()=>v,onCSAStart:()=>T});var n=o(937),i=o(143),a=o(236),s=o(244),r=o(113),l=o(596),c=o(416),h=o(292),d=o(685),u=o(443),m=o(117);var p,g;!function(e){e[e.OFFLINE=0]="OFFLINE",e[e.PLAYER_SETUP=1]="PLAYER_SETUP",e[e.WAITING_LOGIN=2]="WAITING_LOGIN",e[e.LOGIN_FAILED=3]="LOGIN_FAILED",e[e.LOGIN_RETRY_INTERVAL=4]="LOGIN_RETRY_INTERVAL",e[e.READY=5]="READY",e[e.GAME=6]="GAME"}(p||(p={})),function(e){e[e.DO_NOT_RELOGIN=0]="DO_NOT_RELOGIN",e[e.RELOGIN_WITH_INTERVAL=1]="RELOGIN_WITH_INTERVAL",e[e.RELOGIN_IMMEDIATELY=2]="RELOGIN_IMMEDIATELY"}(g||(g={}));class S{recordManager;blackClock;whiteClock;_state=p.OFFLINE;_settings=(0,s.eA)();_sessionID=0;stopRequested=!1;repeat=0;player;gameSummary=(0,i.Rr)();searchInfo;playerBuilder=(0,a.c)();retryTimer;onSaveRecord=()=>{};onGameNext=()=>{};onNewGame=()=>{};onClosed=()=>{};onLoginRetry=()=>{};onFlipBoard=()=>{};onPieceBeat=()=>{};onBeepShort=()=>{};onBeepUnlimited=()=>{};onStopBeep=()=>{};onError=()=>{};constructor(e,t,o){this.recordManager=e,this.blackClock=t,this.whiteClock=o}on(e,t){switch(e){case"saveRecord":this.onSaveRecord=t;break;case"gameNext":this.onGameNext=t;break;case"newGame":this.onNewGame=t;break;case"closed":this.onClosed=t;break;case"loginRetry":this.onLoginRetry=t;break;case"flipBoard":this.onFlipBoard=t;break;case"pieceBeat":this.onPieceBeat=t;break;case"beepShort":this.onBeepShort=t;break;case"beepUnlimited":this.onBeepUnlimited=t;break;case"stopBeep":this.onStopBeep=t;break;case"error":this.onError=t}return this}get state(){return this._state}get settings(){return this._settings}get sessionID(){return this._sessionID}get usiSessionID(){return this.player instanceof u.USIPlayer?this.player.sessionID:0}get isMyTurn(){return this.recordManager.record.position.color===this.gameSummary.myColor}get waitingForHumanPlayerMove(){return this.isMyTurn&&this.settings.player.uri===m.He}async login(e,t){if(this.sessionID)throw new Error("CSAGameManager#login: session already exists");if(this._state!==p.OFFLINE)throw new Error("CSAGameManager#login: unexpected state");this._state=p.PLAYER_SETUP,this._settings=e,this.playerBuilder=t,this.repeat=0;try{this.player=await this.playerBuilder.build(this._settings.player,e=>this.recordManager.updateSearchInfo(c.K.OPPONENT,e))}catch(e){throw this._state=p.OFFLINE,e}this.doLogin().catch(this.onError)}async relogin(){if(this.settings.restartPlayerEveryGame){this._state=p.PLAYER_SETUP,this.player&&(await this.player.close(),this.player=void 0);try{this.player=await this.playerBuilder.build(this._settings.player,e=>this.recordManager.updateSearchInfo(c.K.OPPONENT,e))}catch(e){throw this._state=p.LOGIN_FAILED,this.close(g.RELOGIN_WITH_INTERVAL),e}}await this.doLogin()}async doLogin(){if(!this.player)throw new Error("CSAGameManager#login: player is not initialized");try{this._state=p.PLAYER_SETUP,await this.player.readyNewGame(),this._state=p.WAITING_LOGIN;const e=await n.Ay.csaLogin(this._settings.server);this._sessionID=e,this._state=p.READY,function(e,t){y[e]=t}(this.sessionID,this),this.onGameNext()}catch(e){throw this._state=p.LOGIN_FAILED,this.close(g.RELOGIN_WITH_INTERVAL),new Error(`CSAGameManager#login: ${h.t.failedToStartNewGame}: ${e}`)}}stop(){this.sessionID&&(this.stopRequested=!0,n.Ay.csaStop(this.sessionID))}logout(){this.close(g.DO_NOT_RELOGIN)}close(e){if(this._state!==p.OFFLINE&&this._state!==p.WAITING_LOGIN){var t;if(this._state===p.GAME&&this.settings.enableAutoSave&&this.onSaveRecord(this.settings.autoSaveDirectory),this.stopRequested&&(e=g.DO_NOT_RELOGIN,this.stopRequested=!1),this.sessionID&&(t=this.sessionID,delete y[t],n.Ay.csaLogout(this.sessionID).catch(e=>{this.onError(new Error(`CSAGameManager#close: ${h.t.errorOccuredWhileLogoutFromCSAServer}: ${e}`))}),this._sessionID=0),this.blackClock.stop(),this.whiteClock.stop(),this._state=p.OFFLINE,this.retryTimer&&(clearTimeout(this.retryTimer),this.retryTimer=void 0),e===g.DO_NOT_RELOGIN||this.repeat>=this.settings.repeat)return this.player&&(this.player.close().catch(e=>{this.onError(new Error(`CSAGameManager#close: ${h.t.failedToShutdownEngines}: ${e}`))}),this.player=void 0),void this.onClosed();e===g.RELOGIN_IMMEDIATELY?this.relogin().catch(this.onError):(this._state=p.LOGIN_RETRY_INTERVAL,this.onLoginRetry(),this.retryTimer=setTimeout(()=>this.relogin().catch(this.onError),1e4))}}onGameSummary(e){this.gameSummary=e;const t=this.recordManager.importRecord(this.gameSummary.position,{type:r.RecordFormatType.CSA});if(t)return this.onError(`CSAGameManager#onGameSummary: ${t}`),void this.close(g.DO_NOT_RELOGIN);this.recordManager.changePly(Number.MAX_SAFE_INTEGER),n.Ay.csaAgree(this.sessionID,this.gameSummary.id)}onReject(){this.close(g.RELOGIN_WITH_INTERVAL)}onStart(e){this.repeat++,this.onNewGame(this.repeat);const t=this.gameSummary.players.black.time,o=this.gameSummary.players.white.time;this.recordManager.setGameStartMetadata({gameTitle:this.gameSummary.id,blackName:this.gameSummary.players.black.playerName,whiteName:this.gameSummary.players.white.playerName,blackTimeLimit:{timeSeconds:t.totalTime*t.timeUnitMs/1e3,byoyomi:t.byoyomi*t.timeUnitMs/1e3,increment:t.increment*t.timeUnitMs/1e3},whiteTimeLimit:{timeSeconds:o.totalTime*o.timeUnitMs/1e3,byoyomi:o.byoyomi*o.timeUnitMs/1e3,increment:o.increment*o.timeUnitMs/1e3}}),this.settings.autoFlip&&this.onFlipBoard&&this.onFlipBoard(this.gameSummary.myColor===r.Color.WHITE),this._state=p.GAME,this.next(e)}onMove(e,t){const o=this.isMyTurn,n=(0,r.parseCSAMove)(this.recordManager.record.position,e);if(n instanceof Error)this.onError(`CSAGameManager#onMove: 解釈できない指し手 [${e}]: ${n.message}`);else{if(this.recordManager.appendMove({move:n,moveOption:{ignoreValidation:!0},elapsedMs:this.parseElapsedMs(e)}),o&&this.searchInfo&&this.recordManager.updateSearchInfo(c.K.PLAYER,this.searchInfo),o&&this.searchInfo&&this.settings.enableComment){const e=this.gameSummary.players[n.color].playerName;this.recordManager.appendSearchComment(c.K.PLAYER,this.settings.searchCommentFormat,this.searchInfo,l.Q.APPEND,{engineName:e})}this.onPieceBeat(),this.next(t)}}parseElapsedMs(e){const t=/^.*,T([0-9]+(?:\.[0-9]*)?)$/.exec(e);return t?1e3*Number(t[1]):0}onGameResult(e,t){if(this.recordManager.appendMove({move:this.gameResultToSpecialMove(e,t)}),this.player){let e;switch(t){case i.j5.WIN:e=d.q.WIN;break;case i.j5.LOSE:e=d.q.LOSE;break;case i.j5.DRAW:case i.j5.CENSORED:case i.j5.CHUDAN:e=d.q.DRAW}this.player.gameover(e)}this.close(g.RELOGIN_IMMEDIATELY)}gameResultToSpecialMove(e,t){const o=this.recordManager.record.position.color;switch(e){case i.kt.RESIGN:return r.SpecialMoveType.RESIGN;case i.kt.SENNICHITE:return r.SpecialMoveType.REPETITION_DRAW;case i.kt.OUTE_SENNICHITE:case i.kt.ILLEGAL_MOVE:case i.kt.ILLEGAL_ACTION:switch(t){case i.j5.WIN:return o===this.gameSummary.myColor?r.SpecialMoveType.FOUL_WIN:r.SpecialMoveType.FOUL_LOSE;case i.j5.LOSE:return o===this.gameSummary.myColor?r.SpecialMoveType.FOUL_LOSE:r.SpecialMoveType.FOUL_WIN}break;case i.kt.TIME_UP:return r.SpecialMoveType.TIMEOUT;case i.kt.JISHOGI:return r.SpecialMoveType.ENTERING_OF_KING;case i.kt.MAX_MOVES:return r.SpecialMoveType.IMPASS}return t===i.j5.DRAW?r.SpecialMoveType.DRAW:r.SpecialMoveType.INTERRUPT}onClose(){this.close(this.settings.autoRelogin?g.RELOGIN_WITH_INTERVAL:g.DO_NOT_RELOGIN)}next(e){this.blackClock.stop(),this.whiteClock.stop(),this.syncClock(e),this.startClock();this.recordManager.record.position.color===this.gameSummary.myColor?this.startSearch(e):this.startPonder()}syncClock(e){const t={onBeepShort:()=>this.onBeepShort(),onBeepUnlimited:()=>this.onBeepUnlimited(),onStopBeep:()=>this.onStopBeep()},o=this.gameSummary.players.black.time;this.blackClock.setup({...t,timeMs:e.black.time*o.timeUnitMs,byoyomi:o.byoyomi*o.timeUnitMs/1e3});const n=this.gameSummary.players.white.time;this.whiteClock.setup({...t,timeMs:e.white.time*n.timeUnitMs,byoyomi:n.byoyomi*n.timeUnitMs/1e3})}startClock(){this.recordManager.record.position.color===r.Color.BLACK?this.blackClock.start():this.whiteClock.start()}startSearch(e){this.player?this.player.startSearch(this.recordManager.record.position,this.recordManager.record.usi,this.buildTimeStates(e),{onMove:this.onPlayerMove.bind(this),onResign:this.onPlayerResign.bind(this),onWin:this.onPlayerWin.bind(this),onError:this.onPlayerError.bind(this)}).catch(e=>{this.onError(new Error(`CSAGameManager#startSearch: ${h.t.failedToSendGoCommand}: ${e}`))}):this.onError("CSAGameManager#startSearch: player is not initialized")}startPonder(){this.player?this.player.startPonder(this.recordManager.record.position,this.recordManager.record.usi,this.buildTimeStates()).catch(e=>{this.onError(new Error(`CSAGameManager#startPonder: ${h.t.failedToSendPonderCommand}: ${e}`))}):this.onError("CSAGameManager#startPonder: player is not initialized")}startEarlyPonder(e){if(!this.player)return void this.onError("CSAGameManager#startEarlyPonder: player is not initialized");const t=this.recordManager.record.position.clone(),o=this.recordManager.record.usi+" "+e.usi;t.doMove(e)?this.player.startPonder(t,o,this.buildTimeStates()).catch(e=>{this.onError(new Error(`CSAGameManager#startEarlyPonder: ${h.t.failedToSendPonderCommand}: ${e}`))}):this.onError("CSAGameManager#startEarlyPonder: failed to make a move")}buildTimeStates(e){const t=this.gameSummary.players.black.time,o=this.gameSummary.players.white.time;return{black:{timeMs:e?e.black.time*t.timeUnitMs:this.blackClock.timeMs,byoyomi:t.byoyomi*t.timeUnitMs/1e3,increment:t.increment*t.timeUnitMs/1e3},white:{timeMs:e?e.white.time*o.timeUnitMs:this.whiteClock.timeMs,byoyomi:o.byoyomi*o.timeUnitMs/1e3,increment:o.increment*o.timeUnitMs/1e3}}}onPlayerMove(e,t){let o,i;switch(this.searchInfo=t,this._settings.server.protocolVersion){case s._B.V121:break;case s._B.V121_FLOODGATE:o=t?.score,t?.pv?.forEach(e=>{i=i?i+" ":"",i+=(0,r.formatCSAMove)(e)})}n.Ay.csaMove(this.sessionID,(0,r.formatCSAMove)(e),o,i),this.settings.player.usi?.enableEarlyPonder&&this.startEarlyPonder(e)}onPlayerResign(){n.Ay.csaResign(this.sessionID)}onPlayerWin(){n.Ay.csaWin(this.sessionID)}onPlayerError(e){this.onError(e)}}const y={};function f(e,t){y[e]?.onGameSummary(t)}function v(e){y[e]?.onReject()}function T(e,t){y[e]?.onStart(t)}function b(e,t,o){y[e]?.onMove(t,o)}function C(e,t,o){y[e]?.onGameResult(t,o)}function E(e){y[e]?.onClose()}o.d(t,["loginRetryIntervalSeconds",0,10])},845(e,t,o){o.d(t,{P8:()=>s,OL:()=>r});var n=o(113),i=o(588),a=o(219);function s(e){return e.substring(Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"))+1)}function r(e,t={}){const o=e.metadata,s=function(e){const t=e.getStandardMetadata(n.RecordMetadataKey.START_DATETIME)||e.getStandardMetadata(n.RecordMetadataKey.DATE);if(t)return t.trim().replaceAll(" ","_").replaceAll("/","").replaceAll(":","")}(o)||(0,i.sq)().replaceAll("/",""),r=function(e){return e.getStandardMetadata(n.RecordMetadataKey.TITLE)||e.getStandardMetadata(n.RecordMetadataKey.TOURNAMENT)||e.getStandardMetadata(n.RecordMetadataKey.OPUS_NAME)||e.getStandardMetadata(n.RecordMetadataKey.OPUS_NO)||e.getStandardMetadata(n.RecordMetadataKey.PLACE)||e.getStandardMetadata(n.RecordMetadataKey.POSTED_ON)||e.getStandardMetadata(n.RecordMetadataKey.AUTHOR)}(o),l=(0,n.getBlackPlayerName)(o),c=(0,n.getWhitePlayerName)(o),h=Math.floor(1048576*Math.random()).toString(16).toUpperCase().padStart(5,"0");let d=0;for(let t=e.first.next;t&&t.move instanceof n.Move;t=t.next)d=t.ply;const u={datetime:s,title:r||"",sente:l||"",gote:c||"",ply:d.toString(),hex5:h};for(const e in u){const t=u[e];u["_"+e]=t?"_"+t:"",u[e+"_"]=t?t+"_":""}let m=t.template||a.g;m=(0,a.D)(m);for(const e in u){const t=u[e];m=(0,a.D)(m.replaceAll("{"+e+"}",t))}return m=m.trim(),t.extension?m+=t.extension.startsWith(".")?t.extension:"."+t.extension:m+=".kif",m}},937(e,t,o){o.d(t,{Ay:()=>Fe});var n=o(262),i=o(596);function a(){return{startCriteria:{enableNumber:!1,number:20},endCriteria:{enableNumber:!1,number:100},perMoveCriteria:{maxSeconds:5},descending:!1,commentBehavior:i.Q.INSERT}}var s,r,l,c,h,d,u,m,p,g,S,y,f,v,T,b,C,E,I,A,P,w,k,M,N,R,O=o(292),F=o(145),D=o(69),L=o(219),B=o(117);!function(e){e.STANDARD="standard",e.COMPACT="compact",e.PORTRAIT="portrait",e.PORTRAIT_SQUARE="portraitSquare"}(s||(s={})),function(e){e.W400="400",e.W400X="400+",e.W700X="700+"}(r||(r={})),function(e){e.RAW="raw",e.WIN_RATE="winRate"}(l||(l={})),function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(c||(c={})),function(e){e.STANDARD="standard",e.CHERRY_BLOSSOM="cherry-blossom",e.AUTUMN="autumn",e.SNOW="snow",e.CLASSIC="classic",e.BEIGE="beige",e.DARK_GREEN="dark-green",e.DARK="dark"}(h||(h={})),function(e){e.NONE="none",e.COVER="cover",e.CONTAIN="contain",e.TILE="tile"}(d||(d={})),function(e){e.HITOMOJI="hitomoji",e.HITOMOJI_WOOD="hitomojiWood",e.HITOMOJI_DARK="hitomojiDark",e.HITOMOJI_GOTHIC="hitomojiGothic",e.HITOMOJI_GOTHIC_DARK="hitomojiGothicDark",e.FUTAMOJI="futamoji",e.CUSTOM_IMAGE="custom-image"}(u||(u={})),function(e){e.GYOKU_AND_OSHO="gyokuAndOsho",e.GYOKU_AND_GYOKU="gyokuAndGyoku"}(m||(m={})),function(e){e.LIGHT="light",e.LIGHT2="light2",e.LIGHT3="light3",e.WARM="warm",e.WARM2="warm2",e.RESIN="resin",e.RESIN2="resin2",e.RESIN3="resin3",e.GREEN="green",e.CHERRY_BLOSSOM="cherry-blossom",e.AUTUMN="autumn",e.SNOW="snow",e.DARK_GREEN="dark-green",e.DARK="dark",e.CUSTOM_COLOR="custom-color",e.CUSTOM_IMAGE="custom-image"}(p||(p={})),function(e){e.STANDARD="standard",e.DARK_WOOD="dark-wood",e.GREEN="green",e.CHERRY_BLOSSOM="cherry-blossom",e.AUTUMN="autumn",e.SNOW="snow",e.DARK_GREEN="dark-green",e.DARK="dark",e.CUSTOM_COLOR="custom-color",e.CUSTOM_IMAGE="custom-image"}(g||(g={})),function(e){e.STRONGER_TO_LEFT="strongerToLeft",e.STRONGER_TO_RIGHT="strongerToRight"}(S||(S={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL_PREFER_BOTTOM="verticalPreferBottom",e.HORIZONTAL_PREFER_RIGHT="horizontalPreferRight"}(y||(y={})),function(e){e.NONE="none",e.STANDARD="standard"}(f||(f={})),function(e){e.NONE="none",e.STANDARD="standard"}(v||(v={})),function(e){e.NONE="none",e.STANDARD="standard"}(T||(T={})),function(e){e.SINGLE="single",e.DOUBLE="double",e.DOUBLE_V2="doubleV2"}(b||(b={})),function(e){e.RECORD_INFO="recordInfo",e.COMMENT="comment",e.SEARCH="search",e.PV="pv",e.CHART="chart",e.PERCENTAGE_CHART="percentageChart",e.MONITOR="monitor",e.INVISIBLE="invisible"}(C||(C={})),function(e){e.STRICT="strict",e.AUTO_DETECT="autoDetect"}(E||(E={})),function(e){e.PLAIN="plain",e.COMMA_SEPARATED="commaSeparated",e.COMPACT="compact",e.JAPANESE="japanese"}(I||(I={})),function(e){e.BLACK="black",e.EACH="each"}(A||(A={})),function(e){e.ALL="all",e.ONLY_USER="onlyUser"}(P||(P={})),function(e){e.VERTICAL="vertical",e.HORIZONTAL="horizontal"}(w||(w={})),function(e){e.BOOK="book",e.GAME="game"}(k||(k={})),function(e){e.GOTHIC="gothic",e.MINCHO="mincho"}(M||(M={})),function(e){e.NONE="none",e.BOOKMARK="bookmark",e.CUSTOM="custom",e.LAST_MOVE="lastMove",e.PLY_AND_LAST_MOVE="plyAndLastMove",e.BOOKMARK_AND_LAST_MOVE="bookmarkAndLastMove",e.CUSTOM_AND_LAST_MOVE="customAndLastMove",e.BRACKETED_BOOKMARK="bracketedBookmark",e.BRACKETED_CUSTOM="bracketedCustom",e.BRACKETED_LAST_MOVE="bracketedLastMove",e.BRACKETED_PLY_AND_LAST_MOVE="bracketedPlyAndLastMove",e.BRACKETED_BOOKMARK_AND_LAST_MOVE="bracketedBookmarkAndLastMove",e.BRACKETED_CUSTOM_AND_LAST_MOVE="bracketedCustomAndLastMove"}(N||(N={})),function(e){e.PLAYER_NAME="playerName",e.SENTE_GOTE="senteGote",e.MOCHIGOMA="mochigoma",e.TSUME_SHOGI="tsumeShogi",e.NONE="none"}(R||(R={}));var U;function _(e){return{language:O.TM.JA,thema:h.STANDARD,backgroundImageType:d.NONE,boardLayoutType:s.STANDARD,pieceImage:u.HITOMOJI_WOOD,kingPieceType:m.GYOKU_AND_OSHO,deletePieceImageMargin:!1,boardImage:p.LIGHT2,boardColor:"#e0b060",boardGridColor:null,pieceStandImage:g.DARK_WOOD,pieceStandColor:"#8b4513",handPieceOrder:S.STRONGER_TO_LEFT,promotionSelectorStyle:y.HORIZONTAL,enableTransparent:!1,boardOpacity:1,pieceStandOpacity:1,recordOpacity:1,boardLabelType:f.STANDARD,leftSideControlType:v.STANDARD,rightSideControlType:T.STANDARD,pieceVolume:30,clockVolume:30,clockPitch:500,clockSoundTarget:P.ONLY_USER,recordShortcutKeys:w.VERTICAL,boardFlipping:!1,enableDragAndDrop:!0,highlightMovableSquares:!0,tabPaneType:b.DOUBLE_V2,tab:C.RECORD_INFO,tab2:C.CHART,topPaneHeightPercentage:60,topPanePreviousHeightPercentage:60,bottomLeftPaneWidthPercentage:60,defaultRecordFileFormat:D.vr.KIF,textDecodingRule:E.AUTO_DETECT,returnCode:e?.returnCode||"\r\n",autoSaveDirectory:e?.autoSaveDirectory||"",recordFileNameTemplate:L.g,useCSAV3:!1,useUTF8ForKifAndKi2:!1,enableUSIFileStartpos:!0,enableUSIFileResign:!1,enableUSIFileSpecialMoves:!1,showPasteDialog:!0,liveDuplicatePositionDetection:!0,bookOnTheFlyThresholdMB:64,yaneBookOnTheFlyThresholdMB:64,aperyBookOnTheFlyThresholdMB:64,sbkOnTheFlyThresholdMB:16,ybbOnTheFlyThresholdMB:64,flippedBook:!0,translateEngineOptionName:!0,engineTimeoutSeconds:10,nodeCountFormat:I.COMMA_SEPARATED,showEngineOptionDetails:!1,evaluationViewFrom:A.EACH,maxArrowsPerEngine:3,arrowScoreDiffRange:100,showArrowScore:!0,coefficientInSigmoid:600,badMoveLevelThreshold1:5,badMoveLevelThreshold2:10,badMoveLevelThreshold3:20,badMoveLevelThreshold4:50,maxPVTextLength:15,searchCommentFormat:i.F.SHOGIHOME,showElapsedTimeInRecordView:!0,showCommentInRecordView:!0,showBranchTreeInRecordView:!1,branchListMode:U.SIBLING,enableAppLog:!1,enableUSILog:!1,enableCSALog:!1,logLevel:F.$.INFO,positionImageStyle:k.BOOK,positionImageSize:500,positionImageTypeface:M.GOTHIC,positionImageHandLabelType:R.PLAYER_NAME,useBookmarkAsPositionImageHeader:!1,positionImageHeaderType:N.PLY_AND_LAST_MOVE,positionImageHeader:"",positionImageCommentVisible:!1,positionImageComment:"",positionImageCharacterY:0,positionImageFontScale:1,positionImageFontWeight:r.W400X,positionImageLastMoveColor:"#ffd700",lastRecordFilePath:"",lastBookFilePath:"",lastUSIEngineFilePath:"",lastImageExportFilePath:"",lastOtherFilePath:"",emptyRecordInfoVisibility:!0,pieceAdditionDestination:"blackHand",positionEditingBoardSizeLevel:"medium",enableHardwareAcceleration:!0}}!function(e){e.SIBLING="sibling",e.NEXT_MOVE="nextMove"}(U||(U={}));var G,W=o(113),x=o(924),H=o(14);!function(e){e.NONE="none",e.GENERAL24="general24",e.GENERAL27="general27",e.TRY="try"}(G||(G={}));G.GENERAL24,G.GENERAL27;function $(e){return{black:(0,x.w)(),white:(0,x.w)(),timeLimit:{timeSeconds:0,byoyomi:30,increment:0},startPosition:W.InitialPositionType.STANDARD,startPositionSFEN:"",startPositionListFile:"",startPositionListOrder:"sequential",enableEngineTimeout:!1,humanIsFront:!0,enableComment:!0,enableAutoSave:!!e?.autoSaveDirectory,autoSaveDirectory:(0,H.w)(e?.autoSaveDirectory||""),repeat:1,parallelism:1,swapPlayers:!1,maxMoves:1e3,jishogiRule:G.GENERAL27,searchCommentFormat:i.F.SHOGIHOME,sprtEnabled:!1,sprt:{elo0:.5,elo1:2.5,alpha:.05,beta:.05,maxGames:1e5}}}var K=o(699),V=o(685);function Y(e){switch(e){case"+":case"+0":case"0":return 1e4;case"-":case"-0":return-1e4;default:return Number(e)}}var q;!function(e){e.WAITING_FOR_USIOK="waitingForUSIOK",e.NOT_READY="notReady",e.WAITING_FOR_READYOK="waitingForReadyOK",e.READY="ready",e.WAITING_FOR_BEST_MOVE="waitingForBestMove",e.PONDER="ponder",e.WAITING_FOR_PONDER_BEST_MOVE="waitingForPonderBestMove",e.WAITING_FOR_CHECKMATE="waitingForCheckmate",e.QUIT_COMPLETED="quitCompleted"}(q||(q={}));class J{sessionID;engine;launchOptions;handlers;logger;createdMs=Date.now();transport;state=q.WAITING_FOR_USIOK;engineName="NO NAME";engineAuthor="";engineOptions={};currentPosition="";reservedGoCommand;reservedSetOptionCommands=[];lastSentCommand;lastReceivedCommand;launchTimer;callbacks={};constructor(e,t,o,n,i,a){this.sessionID=e,this.engine=t,this.launchOptions=n,this.handlers=i,this.logger=a,this.transport=o(t.path),this.transport.on("receive",e=>this.onReceive(e)).on("error",e=>this.callbacks.onError?.(e)).on("close",()=>this.onClose())}get sessionState(){return this.state}get name(){return this.engineName}get author(){return this.engineAuthor}get options(){return this.engineOptions}get closed(){return this.state===q.QUIT_COMPLETED}get lastSent(){return this.lastSentCommand}get lastReceived(){return this.lastReceivedCommand}get timeoutSeconds(){return this.launchOptions.timeoutSeconds||10}setCallbacks(e){this.callbacks={...this.callbacks,...e}}launch(){const e=this.timeoutSeconds;this.launchTimer=setTimeout(()=>{this.launchTimer=void 0,this.callbacks.onError?.(new Error(O.t.noResponseFromEnginePleaseExtendTimeout(e)))},1e3*e),this.send("usi")}ready(){this.state!==q.WAITING_FOR_BEST_MOVE&&this.state!==q.PONDER&&this.state!==q.WAITING_FOR_PONDER_BEST_MOVE&&this.state!==q.WAITING_FOR_CHECKMATE||this.gameover(V.q.DRAW),this.state===q.NOT_READY||this.state===q.READY?(this.state=q.WAITING_FOR_READYOK,this.send("isready")):this.callbacks.onError?.(new Error(`unexpected state: ${this.state}`))}setOption(e,t){switch(this.state){case q.WAITING_FOR_BEST_MOVE:case q.WAITING_FOR_PONDER_BEST_MOVE:case q.WAITING_FOR_CHECKMATE:this.reservedSetOptionCommands.push({name:e,value:t});break;default:this.sendSetOption(e,t)}}sendSetOption(e,t){this.send(void 0!==t?`setoption name ${e} value ${t}`:`setoption name ${e}`)}sendReservedSetOptionCommands(){const e=this.reservedSetOptionCommands;this.reservedSetOptionCommands=[];for(const t of e)this.sendSetOption(t.name,t.value)}go(e,t){this.reserveGo({usi:e,timeStates:t})}goPonder(e,t){this.reserveGo({usi:e,timeStates:t,ponder:!0})}goMate(e,t){this.reserveGo({usi:e,mate:!0,mateMaxSeconds:t})}reserveGo(e){switch(this.reservedGoCommand=e,this.state){case q.READY:this.sendReservedGoCommand();break;case q.WAITING_FOR_BEST_MOVE:case q.PONDER:case q.WAITING_FOR_CHECKMATE:this.stop()}}sendReservedGoCommand(){const e=this.reservedGoCommand;if(!e)return;if(this.reservedGoCommand=void 0,this.currentPosition=e.usi,this.send(e.usi),e.mate)return this.state=q.WAITING_FOR_CHECKMATE,void this.send(e.mateMaxSeconds?"go mate "+1e3*e.mateMaxSeconds:"go mate infinite");const t=e.timeStates?function(e,t){const o=t.black,n=t.white,i=t[e].byoyomi,a=o.timeMs-1e3*o.increment,s=n.timeMs-1e3*n.increment,r=0===i?1e3*o.increment:0,l=0===i?1e3*n.increment:0;return`btime ${a} wtime ${s} `+(0!==r||0!==l?`binc ${r} winc ${l}`:"byoyomi "+1e3*i)}((0,W.getNextColorFromUSI)(e.usi),e.timeStates):"";if(e.ponder)return this.state=q.PONDER,void this.send("go ponder"+(t?` ${t}`:""));this.state=q.WAITING_FOR_BEST_MOVE,this.send(t?`go ${t}`:"go infinite")}ponderHit(){this.state===q.PONDER?(this.send("ponderhit"),this.state=q.WAITING_FOR_BEST_MOVE):this.logger?.(F.$.WARN,`usi: sid=${this.sessionID}: ponderhit: unexpected state: ${this.state}`)}stop(){this.state!==q.WAITING_FOR_BEST_MOVE&&this.state!==q.PONDER&&this.state!==q.WAITING_FOR_CHECKMATE||"stop"!==this.lastSentCommand?.command&&(this.send("stop"),this.state===q.PONDER&&(this.state=q.WAITING_FOR_PONDER_BEST_MOVE))}gameover(e){switch(this.state){case q.WAITING_FOR_USIOK:case q.NOT_READY:case q.WAITING_FOR_READYOK:case q.QUIT_COMPLETED:return void this.logger?.(F.$.WARN,`usi: sid=${this.sessionID}: gameover: unexpected state: ${this.state}`);case q.WAITING_FOR_BEST_MOVE:case q.PONDER:case q.WAITING_FOR_CHECKMATE:this.stop()}switch(this.reservedGoCommand=void 0,e){case V.q.WIN:this.send("gameover win");break;case V.q.LOSE:this.send("gameover lose");break;case V.q.DRAW:this.send("gameover draw")}this.state=q.NOT_READY,this.currentPosition=""}quit(){this.state!==q.QUIT_COMPLETED&&(this.send("quit"),this.transport.close())}clearLaunchTimer(){void 0!==this.launchTimer&&(clearTimeout(this.launchTimer),this.launchTimer=void 0)}send(e){this.state!==q.QUIT_COMPLETED&&(this.lastSentCommand=(0,K.Ye)(K.g4.SEND,e),this.logger?.(F.$.INFO,`usi: sid=${this.sessionID}: > ${e}`),this.transport.send(e))}onReceive(e){if(this.lastReceivedCommand=(0,K.Ye)(K.g4.RECEIVE,e),this.logger?.(F.$.INFO,`usi: sid=${this.sessionID}: < ${e}`),e.startsWith("id name "))this.engineName=e.substring(8);else if(e.startsWith("id author "))this.engineAuthor=e.substring(10);else if(e.startsWith("option ")){const t=function(e,t){const o=e.split(" ");if(o.length<4||"name"!==o[0]||"type"!==o[2])return;const n=o[1],i=o[3],a="combo"===i?{name:n,type:i,order:t,vars:[]}:{name:n,type:i,order:t};if("button"!==a.type)for(let e=4;e+1<o.length;e+=2)switch(o[e]){case"default":a.default="spin"===a.type?Number(o[e+1]):o[e+1];break;case"min":"spin"===a.type&&(a.min=Number(o[e+1]));break;case"max":"spin"===a.type&&(a.max=Number(o[e+1]));break;case"var":"combo"===a.type&&a.vars.push(o[e+1])}return a}(e.substring(7),100+Object.keys(this.engineOptions).length);t&&(this.engineOptions[t.name]=t)}else"usiok"===e?this.onUSIOk():"readyok"===e?this.onReadyOk():e.startsWith("bestmove ")?this.onBestMove(e.substring(9)):e.startsWith("checkmate ")?this.onCheckmate(e.substring(10)):e.startsWith("info ")&&(this.launchOptions.discardUSIInfo||this.handlers()?.onUSIInfo(this.sessionID,this.currentPosition,function(e){const t={},o=e.split(" ");for(let e=0;e<o.length;e+=1)switch(o[e]){case"depth":t.depth=Number(o[e+1]),e+=1;break;case"seldepth":t.seldepth=Number(o[e+1]),e+=1;break;case"time":t.timeMs=Number(o[e+1]),e+=1;break;case"nodes":t.nodes=Number(o[e+1]),e+=1;break;case"pv":t.pv=o.slice(e+1),e=o.length;break;case"multipv":t.multipv=Number(o[e+1]),e+=1;break;case"score":switch(o[e+1]){case"cp":t.scoreCP=Number(o[e+2]),e+=2;break;case"mate":t.scoreMate=Y(o[e+2]),e+=2}break;case"lowerbound":t.lowerbound=!0;break;case"upperbound":t.upperbound=!0;break;case"currmove":t.currmove=o[e+1],e+=1;break;case"hashfull":t.hashfullPerMill=Number(o[e+1]),e+=1;break;case"nps":t.nps=Number(o[e+1]),e+=1;break;case"string":t.string=o.slice(e+1).join(" "),e=o.length}return t}(e.substring(5))))}onUSIOk(){if(this.state===q.WAITING_FOR_USIOK){this.engineOptions[n.If]||(this.engineOptions[n.If]={name:n.If,type:"spin",order:1,default:32}),this.engineOptions[n.YZ]||(this.engineOptions[n.YZ]={name:n.YZ,type:"check",order:2,default:"true"});for(const e of Object.values(this.engine.options)){const t=(0,n.J3)(e);void 0!==t&&this.setOption(e.name,t)}this.clearLaunchTimer(),this.state=q.NOT_READY,this.callbacks.onUSIOk?.()}}onReadyOk(){this.state===q.WAITING_FOR_READYOK&&(this.state=q.READY,this.send("usinewgame"),this.callbacks.onReady?.(),this.sendReservedGoCommand())}onBestMove(e){if(this.sendReservedSetOptionCommands(),this.state!==q.WAITING_FOR_BEST_MOVE&&this.state!==q.WAITING_FOR_PONDER_BEST_MOVE)return;const t=this.currentPosition;if(this.state===q.WAITING_FOR_BEST_MOVE){const o=function(e){const t=e.split(" ");return{move:t[0],ponder:t.length>=3&&"ponder"===t[1]&&t[2]||void 0}}(e);this.handlers()?.onUSIBestMove(this.sessionID,t,o.move,o.ponder)}this.state=q.READY,this.currentPosition="",this.sendReservedGoCommand()}onCheckmate(e){if(this.sendReservedSetOptionCommands(),this.state!==q.WAITING_FOR_CHECKMATE)return;this.state=q.READY;const t=this.currentPosition,o=this.handlers(),n=e.trim();"notimplemented"===n?o?.onUSICheckmateNotImplemented(this.sessionID):"timeout"===n?o?.onUSICheckmateTimeout(this.sessionID,t):"nomate"===n?o?.onUSINoMate(this.sessionID,t):o?.onUSICheckmate(this.sessionID,t,n.split(" ")),this.currentPosition="",this.sendReservedGoCommand()}onClose(){this.clearLaunchTimer(),this.state=q.QUIT_COMPLETED,this.callbacks.onClose?.()}}const j=[];var z=o(616);const Q=/^engines\/([A-Za-z0-9._-]+)\/$/;function X(e){return`engines/${e}/`}function Z(e){if(!function(e){const t=Q.exec(e);return!!t&&(0,z.VH)(t[1])}(e))throw new Error(`invalid engine path: ${e}`);return new URL(e,document.baseURI).href}function ee(e,t){if(!(0,z.VH)(t))throw new Error(`invalid engine file: ${t}`);return new URL(t,Z(X(e))).href}function te(e){return`${B.fv}builtin/${e}`}const oe=new Map;async function ne(e){const t=oe.get(e);if(t)return t;const o=(async()=>{const t=new URL(z.xF,Z(X(e))).href,o=await fetch(t);if(!o.ok)throw new Error(`failed to load ${t}: ${o.status}`);return(0,z.DO)(await o.json())})();return oe.set(e,o),o.catch(()=>oe.delete(e)),o}function ie(e,t){const o={};e.options?.forEach((e,t)=>{const n={...e,order:100+t};"combo"!==n.type||n.vars||(n.vars=[]),o[n.name]=n}),o.USI_Hash||(o.USI_Hash={name:"USI_Hash",type:"spin",order:1,default:32}),o.USI_Ponder||(o.USI_Ponder={name:"USI_Ponder",type:"check",order:2,default:"true"});const n=e.presets.find(e=>e.id===t)?.values||{};for(const[e,t]of Object.entries(n)){const n=o[e];n&&"button"!==n.type&&(n.default=t)}return o}function ae(e,t){return t.presets.map(o=>({...(0,n.v2)(),uri:te(o.id),name:o.displayName,defaultName:o.displayName,author:t.author,badge:t.badge,banners:t.banner?[{url:ee(e,t.banner),source:"manifest"}]:void 0,description:t.description,links:t.links?.map(e=>({...e})),path:X(e),options:ie(t,o.id),tags:o.tags?.map(n.iT)}))}function se(e){const t=e instanceof Error?e.message:String(e);return function(e){return!navigator.onLine||e instanceof TypeError}(e)?`${O.t.failedToLoadEngine} ${O.t.engineRequiresOnline}`:t.includes(z.pF)?`${O.t.failedToLoadEngine} ${O.t.engineRequiresReload}`:`${O.t.failedToLoadEngine} ${t}`}class re{onLog;worker;closed=!1;receiveListeners=[];errorListeners=[];closeListeners=[];constructor(e,t){this.onLog=t,this.worker=new o.wc(new URL(o.p+o.u(401),o.b),{type:void 0}),this.worker.onmessage=e=>{const t=e.data;switch(t.type){case"receive":if(void 0!==t.line)for(const e of this.receiveListeners)e(t.line);break;case"error":this.emitError(new Error(t.message||"unknown engine error"));break;case"log":this.onLog?.(t.message||"");break;case"close":this.emitClose()}},this.worker.onerror=e=>{this.emitError(new Error(e.message||"failed to start engine worker")),this.emitClose()},this.worker.postMessage({type:"launch",baseURL:e})}on(e,t){switch(e){case"receive":this.receiveListeners.push(t);break;case"error":this.errorListeners.push(t);break;case"close":this.closeListeners.push(t)}return this}send(e){this.closed||this.worker.postMessage({type:"send",line:e})}close(){if(this.closed)return;this.worker.postMessage({type:"terminate"});const e=this.worker;setTimeout(()=>e.terminate(),1e3),this.emitClose()}emitError(e){for(const t of this.errorListeners)t(e)}emitClose(){if(!this.closed){this.closed=!0;for(const e of this.closeListeners)e()}}}const le=require("vue");class ce{errorCounts={};get errors(){return Object.entries(this.errorCounts).sort(([e],[t])=>e<t?-1:e>t?1:0).map(([e,t])=>({message:e,count:t}))}get hasError(){return!!Object.keys(this.errorCounts).length}add(e){if(e instanceof AggregateError){for(const t of e.errors)this.add(t);return}let t=e instanceof Error?e.message||e.name:""+e;t=t.replace(/Error invoking remote method '[^']*': Error: /,"");const o=this.errorCounts[t]||0;this.errorCounts[t]=o+1}clear(){this.errorCounts={}}}let he;function de(){return he||(he=(0,le.reactive)(new ce)),he}var ue,me,pe,ge,Se=o(244);function ye(){return{sourceType:ue.DIRECTORY,source:"",sourceFormats:[D.vr.KIF,D.vr.KIFU,D.vr.KI2,D.vr.KI2U,D.vr.CSA,D.vr.JKF],subdirectories:!0,singleFileSource:"",destinationType:me.DIRECTORY,destination:"",createSubdirectories:!0,destinationFormat:D.vr.KIF,fileNameConflictAction:pe.NUMBER_SUFFIX,singleFileDestination:"",enableUSIResign:!0}}!function(e){e.DIRECTORY="directory",e.SINGLE_FILE="singleFile"}(ue||(ue={})),function(e){e.DIRECTORY="directory",e.SINGLE_FILE="singleFile"}(me||(me={})),function(e){e.OVERWRITE="overwrite",e.NUMBER_SUFFIX="numberSuffix",e.SKIP="skip"}(pe||(pe={})),function(e){e.USER="user",e.BACKUP="backup",e.BACKUP_V2="backupV2"}(ge||(ge={}));var fe=o(845);const ve=new Map;var Te;!function(e){e.APP_SETTINGS="appSetting",e.RESEARCH_SETTINGS="researchSetting",e.BATCH_CONVERSION_SETTINGS="batchConversionSetting",e.ANALYSIS_SETTINGS="analysisSetting",e.GAME_SETTINGS="gameSetting",e.MATE_SEARCH_SETTINGS="mateSearchSetting",e.CSA_GAME_SETTINGS_HISTORY="csaGameSettingHistory",e.USI_ENGINES="usiEngines"}(Te||(Te={}));const be=new Map,Ce={},Ee={onUSIBestMove:(e,t,o,n)=>{const i=ve.get(e);ve.delete(e);const a=()=>Ce.onUSIBestMove?.(e,t,o,n);if(new URL(window.location.toString()).searchParams.has("mobile")&&void 0!==i){const e=500-(Date.now()-i);if(e>0)return void setTimeout(a,e)}a()},onUSICheckmate:(e,t,o)=>Ce.onUSICheckmate?.(e,t,o),onUSICheckmateNotImplemented:e=>Ce.onUSICheckmateNotImplemented?.(e),onUSICheckmateTimeout:(e,t)=>Ce.onUSICheckmateTimeout?.(e,t),onUSINoMate:(e,t)=>Ce.onUSINoMate?.(e,t),onUSIInfo:(e,t,o)=>Ce.onUSIInfo?.(e,t,JSON.stringify(o))},Ie=(e,t)=>{switch(e){case F.$.DEBUG:console.debug(t);break;case F.$.WARN:console.warn(t);break;case F.$.ERROR:console.error(t);break;default:console.log(t)}},Ae=new class{transportFactory;logger;sessions=new Map;lastSessionID=0;handlers;constructor(e,t){this.transportFactory=e,this.logger=t}setHandlers(e){this.handlers=e}issueSessionID(){return this.lastSessionID+=1,this.lastSessionID}getSession(e){const t=this.sessions.get(e);if(!t)throw new Error("No engine session: SessionID="+e);return t}newSession(e,t){const o=this.issueSessionID(),n=new J(o,e,this.transportFactory,t,()=>this.handlers,this.logger);return this.sessions.set(o,n),n}getEngineInfo(e,t){return new Promise((o,i)=>{let a=!1;const s=this.newSession({...(0,n.v2)(),path:e},{timeoutSeconds:t});s.setCallbacks({onUSIOk:()=>{a=!0,o({...(0,n.v2)(),uri:B.A7(),name:s.name,defaultName:s.name,author:s.author,path:e,options:s.options}),this.close(s)},onError:e=>{a||(a=!0,i(e)),this.close(s)},onClose:()=>{a||(a=!0,i(new Error(O.t.engineProcessWasClosedUnexpectedly))),this.sessions.delete(s.sessionID)}}),s.launch()})}sendOptionButtonSignal(e,t,o){return new Promise((i,a)=>{let s=!1;const r=this.newSession({...(0,n.v2)(),path:e},{timeoutSeconds:o});r.setCallbacks({onUSIOk:()=>{s=!0,r.setOption(t),i(),this.close(r)},onError:e=>{s||(s=!0,a(e)),this.close(r)},onClose:()=>{s||(s=!0,a(new Error(O.t.engineProcessWasClosedUnexpectedly))),this.sessions.delete(r.sessionID)}}),r.launch()})}setupPlayer(e,t){return new Promise((o,n)=>{let i=!1;const a=this.newSession(e,t||{});a.setCallbacks({onUSIOk:()=>{i=!0,o(a.sessionID)},onError:e=>{i||(i=!0,n(e),this.close(a))},onClose:()=>{i||(i=!0,n(new Error(O.t.engineProcessWasClosedUnexpectedly))),this.scheduleRemove(a)}}),a.launch()})}ready(e){const t=this.getSession(e);return new Promise((e,o)=>{t.setCallbacks({onReady:()=>e(),onError:e=>o(e)}),t.ready()})}setOption(e,t,o){this.getSession(e).setOption(t,o)}go(e,t,o){this.getSession(e).go(t,o)}goPonder(e,t,o){this.getSession(e).goPonder(t,o)}ponderHit(e){this.getSession(e).ponderHit()}goInfinite(e,t){this.getSession(e).go(t)}goMate(e,t,o){this.getSession(e).goMate(t,o)}stop(e){this.getSession(e).stop()}gameover(e,t){this.getSession(e).gameover(t)}quit(e){const t=this.sessions.get(e);t&&this.close(t)}quitAll(){for(const e of Array.from(this.sessions.values()))this.close(e)}isActiveSessionExists(){for(const e of this.sessions.values())if(!e.closed)return!0;return!1}close(e){e.quit(),this.sessions.delete(e.sessionID)}scheduleRemove(e){setTimeout(()=>this.sessions.delete(e.sessionID),2e4)}collectSessionStates(){return Array.from(this.sessions.values()).map(e=>({sessionID:e.sessionID,uri:e.engine.uri,name:e.engine.name,path:e.engine.path,stateCode:e.sessionState,createdMs:e.createdMs,lastReceived:e.lastReceived,lastSent:e.lastSent,updatedMs:Date.now(),closed:e.closed})).sort((e,t)=>t.sessionID-e.sessionID)}}((Pe=e=>Ie(F.$.INFO,`wasm-engine: ${e}`),e=>new re(Z(e),Pe)),Ie);var Pe;Ae.setHandlers(Ee);const we={updateAppState(){},fetchProcessArgs:async()=>JSON.stringify({}),onClosable(){},onClose(){},onSendError(){},onSendMessage(){},onSendNotification(){},onMenuEvent(){},async loadAppSettings(){const e={..._(),promotionSelectorStyle:y.VERTICAL_PREFER_BOTTOM,enableDragAndDrop:!1,engineTimeoutSeconds:30},t=localStorage.getItem(Te.APP_SETTINGS);return t?JSON.stringify({...e,...JSON.parse(t)}):JSON.stringify(e)},saveAppSettings(e){localStorage.setItem(Te.APP_SETTINGS,e)},async loadBatchConversionSettings(){const e=localStorage.getItem(Te.BATCH_CONVERSION_SETTINGS);return e?JSON.stringify({...ye(),...JSON.parse(e)}):JSON.stringify(ye())},async saveBatchConversionSettings(e){localStorage.setItem(Te.BATCH_CONVERSION_SETTINGS,e)},async loadResearchSettings(){const e=localStorage.getItem(Te.RESEARCH_SETTINGS);return e?JSON.stringify({enableMaxSeconds:!1,maxSeconds:10,overrideMultiPV:!1,multiPV:1,...JSON.parse(e)}):JSON.stringify({enableMaxSeconds:!1,maxSeconds:10,overrideMultiPV:!1,multiPV:1})},async saveResearchSettings(e){localStorage.setItem(Te.RESEARCH_SETTINGS,e)},async loadAnalysisSettings(){const e=localStorage.getItem(Te.ANALYSIS_SETTINGS);return e?JSON.stringify({...a(),...JSON.parse(e)}):JSON.stringify(a())},async saveAnalysisSettings(e){localStorage.setItem(Te.ANALYSIS_SETTINGS,e)},async loadBatchAnalysisSettings(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async saveBatchAnalysisSettings(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async loadGameSettings(){const e=localStorage.getItem(Te.GAME_SETTINGS);return e?JSON.stringify({...$(),...JSON.parse(e)}):JSON.stringify({...$(),enableAutoSave:!1})},async saveGameSettings(e){localStorage.setItem(Te.GAME_SETTINGS,e)},async loadCSAGameSettingsHistory(){const e=localStorage.getItem(Te.CSA_GAME_SETTINGS_HISTORY);return e?JSON.stringify({...(0,Se.uU)(),...JSON.parse(e)}):JSON.stringify((0,Se.uU)())},async saveCSAGameSettingsHistory(e){localStorage.setItem(Te.CSA_GAME_SETTINGS_HISTORY,e)},async loadMateSearchSettings(){const e=localStorage.getItem(Te.MATE_SEARCH_SETTINGS);return e?JSON.stringify({enableMaxSeconds:!1,maxSeconds:10,...JSON.parse(e)}):JSON.stringify({enableMaxSeconds:!1,maxSeconds:10})},async saveMateSearchSettings(e){localStorage.setItem(Te.MATE_SEARCH_SETTINGS,e)},async loadUSIEngines(){const e=new n.z4(localStorage.getItem(Te.USI_ENGINES)||void 0),t=await async function(e){const t=[];for(const o of j)try{t.push(...ae(o,await ne(o)))}catch(t){e?.(t instanceof Error?t:new Error(String(t)))}return t}(e=>{Ie(F.$.ERROR,`failed to load builtin engine: ${e.message}`),de().add(new Error(se(e)))});for(const o of t){const t=e.getEngine(o.uri);t?((0,n.rh)(o,t),e.updateEngine(o)):e.addEngine(o)}return e.json},async saveUSIEngines(e){localStorage.setItem(Te.USI_ENGINES,e)},async loadBookImportSettings(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async saveBookImportSettings(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},onUpdateAppSettings(){},async showOpenRecordDialog(e){const t=document.createElement("input");return t.setAttribute("type","file"),t.setAttribute("accept",e.join(",")),new Promise((e,o)=>{t.click(),t.onchange=()=>{const n=t.files?.[0];n?n.arrayBuffer().then(t=>{const o=B.m7(n.name);be.clear(),be.set(o,t),e(o)}).catch(e=>{o(e)}):o(new Error("invalid file"))},t.oncancel=()=>{e("")}})},showSaveRecordDialog:async e=>e,async showSaveMergedRecordDialog(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async openRecord(e){const t=be.get(e);return t?new Uint8Array(t):Promise.reject(new Error("invalid URI"))},async saveRecord(e,t){const o=new Blob([new Uint8Array(t)],{type:"application/octet-stream"}),n=URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=(0,fe.P8)(e),i.click(),URL.revokeObjectURL(n)},loadRecordFileHistory:async()=>JSON.stringify({entries:[]}),addRecordFileHistory(){},async clearRecordFileHistory(){},loadRecordFileHistoryContents:async()=>"{}",async saveRecordFileBackup(){},async loadRecordFileBackup(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async loadRemoteTextFile(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async convertRecordFiles(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async listRecordFiles(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async showSelectSFENDialog(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async loadSFENFile(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},onOpenRecord(){},async showOpenNextMoveCollectionDialog(){const e=document.createElement("input");return e.setAttribute("type","file"),e.setAttribute("accept",".json"),new Promise((t,o)=>{e.click(),e.onchange=()=>{const n=e.files?.[0];n?n.arrayBuffer().then(e=>{const o=B.m7(n.name);be.clear(),be.set(o,e),t(o)}).catch(e=>{o(e)}):o(new Error("invalid file"))},e.oncancel=()=>{t("")}})},async showSaveNextMoveCollectionDialog(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async loadNextMoveCollection(e){const t=be.get(e);return t?(new TextDecoder).decode(t):Promise.reject(new Error("invalid URI"))},async saveNextMoveCollection(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async loadNextMoveGenerationSettings(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async saveNextMoveGenerationSettings(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async showOpenBookDialog(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async showSaveBookDialog(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async clearBook(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async openBook(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async openBookAsNewSession(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async closeBookSession(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async saveBook(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async exportBook(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},getBookFormat:async()=>"yane2016",getBookInfo:async()=>JSON.stringify({format:"yane2016",type:"in-memory",entryCount:0,unsaved:!1}),searchBookMoves:async()=>"[]",searchBookEntry:async()=>"null",async updateBookMove(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async updateBookPositionComment(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async removeBookMove(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async updateBookMoveOrder(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async importBookMoves(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async showSelectUSIEngineDialog(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},getUSIEngineInfo:async(e,t)=>JSON.stringify(await Ae.getEngineInfo(e,t)),async getEngineIndex(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},listInstalledEnginePackages:async()=>"[]",async fetchEnginePackageLicenses(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async installEnginePackage(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async cancelEnginePackageInstall(){},async uninstallEnginePackage(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},getUSIEngineMetadata:async()=>JSON.stringify({isShellScript:!1}),async sendUSIOptionButtonSignal(e,t,o){await Ae.sendOptionButtonSignal(e,t,o)},async usiLaunch(e,t){try{return await Ae.setupPlayer(JSON.parse(e),JSON.parse(t))}catch(e){throw new Error(se(e))}},async usiReady(e){await Ae.ready(e)},async usiSetOption(e,t,o){Ae.setOption(e,t,o)},async usiGo(e,t,o){ve.set(e,Date.now()),Ae.go(e,t,JSON.parse(o))},async usiGoPonder(e,t,o){Ae.goPonder(e,t,JSON.parse(o))},async usiPonderHit(e){ve.set(e,Date.now()),Ae.ponderHit(e)},async usiGoInfinite(e,t){Ae.goInfinite(e,t)},async usiGoMate(e,t,o){Ae.goMate(e,t,o)},async usiStop(e){Ae.stop(e)},async usiGameover(e,t){Ae.gameover(e,t)},async usiQuit(e){ve.delete(e),Ae.quit(e)},onUSIBestMove(e){Ce.onUSIBestMove=e},onUSICheckmate(e){Ce.onUSICheckmate=e},onUSICheckmateNotImplemented(e){Ce.onUSICheckmateNotImplemented=e},onUSICheckmateTimeout(e){Ce.onUSICheckmateTimeout=e},onUSINoMate(e){Ce.onUSINoMate=e},onEnginePackageInstallProgress(){},onUSIInfo(e){Ce.onUSIInfo=e},async csaLogin(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async csaLogout(){},async csaAgree(){},async csaMove(){},async csaResign(){},async csaWin(){},async csaStop(){},onCSAGameSummary(){},onCSAReject(){},onCSAStart(){},onCSAMove(){},onCSAGameResult(){},onCSAClose(){},collectSessionStates:async()=>JSON.stringify({os:{version:"-",arch:"-",cpuTotalTime:0,cpuIdleTime:0,memoryTotal:0,memoryFree:0},usiSessions:Ae.collectSessionStates(),csaSessions:[]}),async setupPrompt(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async openPrompt(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},invokePromptCommand(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},onPromptCommand(){},async showSelectImageDialog(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async cropPieceImage(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async exportCaptureAsPNG(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async exportCaptureAsJPEG(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async copyCaptureToClipboard(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},loadLayoutProfileList:async()=>[B.KY,JSON.stringify({profiles:[]})],updateLayoutProfileList(){},onUpdateLayoutProfile(){},createDesktopShortcutForLayoutProfile(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},openLogFile(){},log(e,t){switch(e){case F.$.DEBUG:console.debug(t);break;case F.$.INFO:console.log(t);break;case F.$.WARN:console.warn(t);break;case F.$.ERROR:console.error(t)}},async showSelectFileDialog(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},async showSelectDirectoryDialog(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},openExplorer(){},openParentDirectory(){},openWebBrowser(e){window.open(e,"_blank")},async getMachineSpec(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},isEncryptionAvailable:async()=>!1,getVersionStatus:async()=>JSON.stringify({}),async checkUpdates(){throw new Error(O.t.thisFeatureNotAvailableOnWebApp)},getPathForFile:e=>e.name,onProgress(){}};function ke(e){const t=e.trim().split(" ");return[t[0],t[1],t[2]].join(" ")}function Me(e){let t;try{t=JSON.parse(e)}catch{throw new Error("JSON として解釈できませんでした。")}if(!t||"object"!=typeof t)throw new Error("次の一手問題集ではありません。");const o=t;if("shogihome-next-move"!==o.format)throw new Error("次の一手問題集ではありません。");if("number"!=typeof o.version||o.version>1||o.version<1)throw new Error(`未対応のバージョンです: ${o.version}`);if(!Array.isArray(o.problems))throw new Error("problems がありません。");return o.problems.forEach((e,t)=>{!function(e,t){const o=`problems[${t}]`;if(!e||"object"!=typeof e)throw new Error(`${o}: 不正な問題データです。`);const n=W.Position.newBySFEN(e.sfen);if(!n)throw new Error(`${o}: 不正な SFEN です: ${e.sfen}`);if(!Array.isArray(e.candidates)||0===e.candidates.length)throw new Error(`${o}: candidates がありません。`);const i=e=>{if("string"!=typeof e)return!1;const t=n.createMoveByUSI(e);return!!t&&n.isValidMove(t)};for(const[t,n]of e.candidates.entries())if(!n||"object"!=typeof n||!i(n.usi))throw new Error(`${o}.candidates[${t}]: 不正な指し手です: ${n?.usi}`);if(!e.actualMove||!i(e.actualMove.usi))throw new Error(`${o}.actualMove: 不正な指し手です: ${e.actualMove?.usi}`);if(void 0!==e.previousMove){const t=e.previousMove;if(!t||"object"!=typeof t)throw new Error(`${o}.previousMove: 不正なデータです。`);const n=W.Position.newBySFEN(t.sfen);if(!n)throw new Error(`${o}.previousMove: 不正な SFEN です: ${t.sfen}`);const i="string"==typeof t.usi?n.createMoveByUSI(t.usi):null;if(!i||!n.doMove(i))throw new Error(`${o}.previousMove: 不正な指し手です: ${t.usi}`);if(ke(n.sfen)!==ke(e.sfen))throw new Error(`${o}.previousMove: 指し手を進めた局面が出題局面と一致しません。`)}}(e,t)}),o}function Ne(){return window}Ne().electronShogi;const Re=Ne().electronShogiAPI||we,Oe={...Re,fetchProcessArgs:async()=>JSON.parse(await Re.fetchProcessArgs()),loadAppSettings:async()=>JSON.parse(await Re.loadAppSettings()),saveAppSettings(e){Re.saveAppSettings(JSON.stringify(e))},loadBatchConversionSettings:async()=>JSON.parse(await Re.loadBatchConversionSettings()),saveBatchConversionSettings:e=>Re.saveBatchConversionSettings(JSON.stringify(e)),loadResearchSettings:async()=>JSON.parse(await Re.loadResearchSettings()),saveResearchSettings:e=>Re.saveResearchSettings(JSON.stringify(e)),loadAnalysisSettings:async()=>JSON.parse(await Re.loadAnalysisSettings()),saveAnalysisSettings:e=>Re.saveAnalysisSettings(JSON.stringify(e)),loadBatchAnalysisSettings:async()=>JSON.parse(await Re.loadBatchAnalysisSettings()),saveBatchAnalysisSettings:e=>Re.saveBatchAnalysisSettings(JSON.stringify(e)),loadGameSettings:async()=>JSON.parse(await Re.loadGameSettings()),saveGameSettings:e=>Re.saveGameSettings(JSON.stringify(e)),loadCSAGameSettingsHistory:async()=>JSON.parse(await Re.loadCSAGameSettingsHistory()),saveCSAGameSettingsHistory:e=>Re.saveCSAGameSettingsHistory(JSON.stringify(e)),loadMateSearchSettings:async()=>JSON.parse(await Re.loadMateSearchSettings()),saveMateSearchSettings:e=>Re.saveMateSearchSettings(JSON.stringify(e)),loadRecordFileHistory:async()=>JSON.parse(await Re.loadRecordFileHistory()),loadRecordFileHistoryContents:async()=>JSON.parse(await Re.loadRecordFileHistoryContents()),loadUSIEngines:async()=>new n.z4(await Re.loadUSIEngines()),saveUSIEngines:e=>Re.saveUSIEngines(e.json),loadBookImportSettings:async()=>JSON.parse(await Re.loadBookImportSettings()),saveBookImportSettings:e=>Re.saveBookImportSettings(JSON.stringify(e)),convertRecordFiles:async e=>JSON.parse(await Re.convertRecordFiles(JSON.stringify(e))),listRecordFiles:async e=>JSON.parse(await Re.listRecordFiles(JSON.stringify(e))),loadNextMoveCollection:async e=>Me(await Re.loadNextMoveCollection(e)),saveNextMoveCollection:(e,t)=>Re.saveNextMoveCollection(e,function(e){return JSON.stringify(e,void 0,2)}(t)),loadNextMoveGenerationSettings:async()=>JSON.parse(await Re.loadNextMoveGenerationSettings()),saveNextMoveGenerationSettings:e=>Re.saveNextMoveGenerationSettings(JSON.stringify(e)),getBookFormat:async e=>await Re.getBookFormat(e),getBookInfo:async e=>JSON.parse(await Re.getBookInfo(e)),openBook:(e,t,o)=>Re.openBook(e,t,JSON.stringify(o)),openBookAsNewSession:async(e,t)=>await Re.openBookAsNewSession(e,JSON.stringify(t)),searchBookMoves:async(e,t)=>JSON.parse(await Re.searchBookMoves(e,t)),searchBookEntry:async(e,t)=>JSON.parse(await Re.searchBookEntry(e,t)),updateBookMove:(e,t,o)=>Re.updateBookMove(e,t,JSON.stringify(o)),importBookMoves:async(e,t)=>JSON.parse(await Re.importBookMoves(e,JSON.stringify(t))),async getUSIEngineInfo(e,t){const o=await Re.getUSIEngineInfo(e,t);return JSON.parse(o)},getEngineIndex:async()=>JSON.parse(await Re.getEngineIndex()),listInstalledEnginePackages:async()=>JSON.parse(await Re.listInstalledEnginePackages()),fetchEnginePackageLicenses:async e=>JSON.parse(await Re.fetchEnginePackageLicenses(e)),installEnginePackage:async(e,t)=>JSON.parse(await Re.installEnginePackage(e,t)),async getUSIEngineMetadata(e){const t=await Re.getUSIEngineMetadata(e);return JSON.parse(t)},usiLaunch:(e,t)=>Re.usiLaunch(JSON.stringify(e),JSON.stringify(t||{})),usiReady:e=>Re.usiReady(e),usiGo:(e,t,o)=>Re.usiGo(e,t,JSON.stringify(o)),usiGoPonder:(e,t,o)=>Re.usiGoPonder(e,t,JSON.stringify(o)),usiPonderHit:(e,t)=>Re.usiPonderHit(e,JSON.stringify(t)),csaLogin:e=>Re.csaLogin(JSON.stringify(e)),collectSessionStates:async()=>JSON.parse(await Re.collectSessionStates()),setupPrompt:async(e,t)=>JSON.parse(await Re.setupPrompt(e,t)),exportCaptureAsPNG:e=>Re.exportCaptureAsPNG(e.json),exportCaptureAsJPEG:e=>Re.exportCaptureAsJPEG(e.json),copyCaptureToClipboard:e=>Re.copyCaptureToClipboard(e.json),async loadLayoutProfileList(){const[e,t]=await Re.loadLayoutProfileList();return[e,JSON.parse(t)]},updateLayoutProfileList(e,t){Re.updateLayoutProfileList(e,JSON.stringify(t))},getMachineSpec:async()=>JSON.parse(await Re.getMachineSpec()),getVersionStatus:async()=>JSON.parse(await Re.getVersionStatus()),async checkUpdates(){await Re.checkUpdates()}},Fe=Oe},236(e,t,o){o.d(t,{c:()=>d});const n=new class{searchHandler;isEngine(){return!1}async readyNewGame(){}async startSearch(e,t,o,n){this.searchHandler=n}async startPonder(){}async startMateSearch(){}async stop(){}async gameover(){}async close(){this.searchHandler=void 0}doMove(e){const t=this.searchHandler;this.searchHandler=void 0,t?.onMove(e)}resign(){const e=this.searchHandler;this.searchHandler=void 0,e?.onResign()}win(){const e=this.searchHandler;this.searchHandler=void 0,e?.onWin()}};var i=o(443),a=o(113),s=o(117);const r={[a.PieceType.PAWN]:100,[a.PieceType.LANCE]:300,[a.PieceType.KNIGHT]:400,[a.PieceType.SILVER]:500,[a.PieceType.GOLD]:600,[a.PieceType.BISHOP]:700,[a.PieceType.ROOK]:800,[a.PieceType.KING]:0,[a.PieceType.PROM_PAWN]:400,[a.PieceType.PROM_LANCE]:500,[a.PieceType.PROM_KNIGHT]:500,[a.PieceType.PROM_SILVER]:600,[a.PieceType.HORSE]:1200,[a.PieceType.DRAGON]:1500};class l{uri;timer;constructor(e){this.uri=e}isEngine(){return!0}async readyNewGame(){}async startSearch(e,t,o,n){this.timer=setTimeout(()=>{let o=null;if(this.uri===s.DI)o=this.searchRandom(e);else{const n=a.Record.newByUSI(t);if(n instanceof a.Record){const t=e=>n.getRepetitionCount(e)>=1;o=this.search(this.uri,e.clone(),2,t)[0]}}null===o?n.onResign():n.onMove(o)},500)}async startPonder(){}async startMateSearch(){}async stop(){clearTimeout(this.timer)}async gameover(){}async close(){clearTimeout(this.timer)}searchRandom(e){const t=c(e);for(let o=t.length;o>0;o--){const n=Math.floor(Math.random()*o),i=t[n];if(e.isValidMove(i))return i;t[n]=t[o-1]}return null}search(e,t,o,n){const i=c(t);let a=null,s=-1/0;for(const r of i){let i=new h(e,t,r).evaluate();t.doMove(r)&&(i-=n&&n(t)?1e3:o>1?this.search(e,t,o-1)[1]:this.see(t,r.to),t.undoMove(r),i+=10*Math.random(),i>s&&(s=i,a=r))}return a?[a,s]:[null,0]}see(e,t){const o=[],n=[e.board.at(t).type];for(const i of e.listAttackers(t)){const t=e.board.at(i);t.color===e.color?o.push(t.type):n.push(t.type)}return o.sort((e,t)=>r[e]-r[t]),n.sort((e,t)=>r[e]-r[t]),this.seeSearch(0,o,0,n,0)}seeSearch(e,t,o,n,i){if(o>=t.length)return 0;let s=e+r[n[i]]+r[(0,a.unpromotedPieceType)(n[i])];return s<=0?0:(s-=this.seeSearch(-s,n,i+1,t,o),Math.max(s,0))}}function c(e){const t=[];function o(o,n,i){const s=e.board.at(n);if(s?.color===e.color)return;const r=new a.Move(o,n,!1,e.color,i,s?.type||null);(0,a.isPromotable)(i)&&((0,a.isPromotableRank)(e.color,o.rank)||(0,a.isPromotableRank)(e.color,n.rank))&&(t.push(r.withPromote()),i!==a.PieceType.KNIGHT&&i!==a.PieceType.SILVER)||t.push(r)}for(const t of e.board.listNonEmptySquares()){const n=e.board.at(t);if(n.color!==e.color)continue;const i=(0,a.movableDirections)(n);for(const s of i){switch((0,a.resolveMoveType)(n,s)){case a.MoveType.SHORT:{const e=t.neighbor(s);e.valid&&o(t,e,n.type);break}case a.MoveType.LONG:for(let i=t.neighbor(s);i.valid&&(o(t,i,n.type),!e.board.at(i));i=i.neighbor(s));}}}for(const o of a.handPieceTypes)if(e.hand(e.color).count(o))for(const n of a.Square.all)if(!e.board.at(n)){const i=new a.Move(o,n,!1,e.color,o,null);t.push(i)}return t}class h{playerURI;position;move;drop;from;to;whiteHand;constructor(e,t,o){this.playerURI=e,this.position=t,this.move=o,o.from instanceof a.Square?(this.drop=!1,this.from=t.color===a.Color.BLACK?o.from:o.from.opposite):this.drop=!0,this.to=t.color===a.Color.BLACK?o.to:o.to.opposite,this.whiteHand=this.position.color===a.Color.BLACK?this.position.whiteHand:this.position.blackHand}isTo(e,t){return this.to.equals(new a.Square(e,t))}at(e,t){let o=e instanceof a.Square?e:new a.Square(e,t);return this.position.color===a.Color.WHITE&&(o=o.opposite),this.position.board.at(o)}evaluate(){let e=0;if(this.move.capturedPieceType){const t=this.move.capturedPieceType;e+=r[t]+r[(0,a.unpromotedPieceType)(t)]}if(this.move.promote){const t=this.move.pieceType;e+=r[(0,a.promotedPieceType)(t)]-r[t]}switch(this.move.pieceType){case a.PieceType.PAWN:4===this.to.rank?e+=this.drop?10:20:this.drop||1!==this.to.file&&9!==this.to.file?!this.drop&&this.isTo(3,6)&&this.at(4,6)?e+=30:!this.drop&&this.isTo(5,6)&&this.at(4,6)?.type===a.PieceType.BISHOP&&(e+=50):e+=10;break;case a.PieceType.SILVER:this.from&&this.to.rank<this.from.rank&&this.to.rank>=7&&this.to.file>=2&&this.to.file<=8&&(e+=20);break;case a.PieceType.BISHOP:this.drop&&this.to.rank>=4&&(this.to.file+this.to.rank)%2!=0?e-=200:1===this.to.file||9===this.to.file?e-=500:this.drop&&1===this.to.rank?e-=50:!this.isTo(4,6)||this.at(5,5)||this.at(6,4)||this.at(7,3)||(e+=100);break;case a.PieceType.ROOK:7===this.to.rank&&(e-=20)}if(!this.from||this.move.pieceType!==a.PieceType.PAWN&&this.move.pieceType!==a.PieceType.SILVER&&this.move.pieceType!==a.PieceType.GOLD&&this.move.pieceType!==a.PieceType.PROM_PAWN&&this.move.pieceType!==a.PieceType.PROM_LANCE&&this.move.pieceType!==a.PieceType.PROM_KNIGHT&&this.move.pieceType!==a.PieceType.PROM_SILVER||(this.to.rank<this.from.rank?e+=this.to.rank-3:this.to.rank>this.from.rank&&(e+=3-this.to.rank)),this.to.rank<=4&&this.drop)switch(this.move.pieceType){case a.PieceType.PAWN:e+=3*this.to.rank;break;case a.PieceType.LANCE:case a.PieceType.KNIGHT:e+=2*this.to.rank;break;case a.PieceType.SILVER:case a.PieceType.GOLD:e+=this.to.rank+40-40;break;case a.PieceType.BISHOP:e-=100;break;case a.PieceType.ROOK:e+=500}switch(this.playerURI){case s.ke:e+=this.evaluateStaticRook();break;case s.y3:e+=this.evaluateRangingRook()}return e}evaluateStaticRook(){let e=0;switch(this.move.pieceType){case a.PieceType.PAWN:this.drop?this.isTo(8,7)?e+=200:this.isTo(8,8)&&(e+=50):this.isTo(2,6)||this.isTo(2,5)?e+=50:this.isTo(7,6)?e+=100:this.isTo(6,6)?e+=20:this.drop||3!==this.to.file||(e+=20);break;case a.PieceType.LANCE:case a.PieceType.KNIGHT:e-=50;break;case a.PieceType.SILVER:this.from&&this.from.rank>this.to.rank&&(this.isTo(8,8)||this.isTo(7,7)?e+=100:this.isTo(6,8)||this.isTo(6,7)||this.isTo(3,8)||this.isTo(3,7)||this.isTo(3,5)||this.isTo(4,6)?e+=20:(this.isTo(2,7)||this.isTo(2,6))&&(e+=10));break;case a.PieceType.GOLD:this.drop||(this.isTo(7,8)?e+=80:this.isTo(5,8)?e+=20:this.isTo(6,7)&&this.from&&this.from.file<=6&&(e+=30));break;case a.PieceType.BISHOP:this.at(this.to)?.type===a.PieceType.BISHOP&&(e+=200);break;case a.PieceType.KING:6===this.to.file&&this.from&&5===this.from.file?e+=30:7===this.to.file&&this.from&&6===this.from.file?e+=100:this.to.file<=4&&(e-=1e3)}return e}evaluateRangingRook(){let e=0;switch(this.move.pieceType){case a.PieceType.PAWN:this.drop?this.isTo(8,7)?e+=200:this.isTo(8,8)&&(e+=50):this.isTo(7,6)?e+=100:this.isTo(6,6)&&0===this.whiteHand.count(a.PieceType.BISHOP)?e+=90:this.isTo(6,5)&&this.at(7,8)?(e+=20,this.at(7,5)&&(e+=200)):this.isTo(7,5)?e-=150:1===this.to.file?(e+=40,this.at(1,4)&&(e+=50)):9===this.to.file&&this.at(9,4)&&(e+=50);break;case a.PieceType.LANCE:case a.PieceType.KNIGHT:e-=50;break;case a.PieceType.SILVER:this.from instanceof a.Square&&this.from.rank>this.to.rank&&this.at(7,6)&&(this.isTo(7,8)?e+=40:this.isTo(6,7)?e+=30:this.isTo(5,6)?e+=10:this.isTo(6,5)?e+=this.at(6,6)?.type===a.PieceType.PAWN?-10:20:(this.isTo(4,5)||this.isTo(3,8))&&(e+=10));break;case a.PieceType.GOLD:!this.drop&&this.isTo(7,8)&&(e+=20);break;case a.PieceType.BISHOP:!this.drop&&this.isTo(7,7)&&(e+=70,this.at(8,5)&&(e+=50));break;case a.PieceType.ROOK:!this.drop&&this.isTo(6,8)&&(e+=80);break;case a.PieceType.KING:this.to.file>=5?e-=1e3:this.from&&this.from.file>this.to.file&&this.to.file>=2&&(e+=60+5*(4-this.to.file))}return e}}function d(e){return{async build(t,o){if(t.uri===s.He)return n;if(s.b0(t.uri))return new l(t.uri);if(s.Em(t.uri)&&t.usi){const n=new i.USIPlayer(t.usi,e,o);return await n.launch(),n}throw new Error("defaultPlayerBuilder#build: 予期せぬプレイヤーURIです: "+t.uri)}}}},443(e,t,o){o.r(t),o.d(t,{USIPlayer:()=>m,isActiveUSIPlayerSession:()=>b,onUSIBestMove:()=>g,onUSICheckmate:()=>S,onUSICheckmateNotImplemented:()=>y,onUSICheckmateTimeout:()=>f,onUSIInfo:()=>T,onUSINoMate:()=>v,setOnStartSearchHandler:()=>d,setOnUpdateUSIInfoHandler:()=>u});var n=o(937);function i(e,t){const o=[],n=e.clone();for(const e of t){const t=n.createMoveByUSI(e);if(!t||!n.doMove(t))break;o.push(t)}return o}var a=o(262),s=o(113),r=o(145);function l(e,t){const o=e.map(e=>{const o=t(e);return Number.isFinite(o)&&o>0?o:0}),n=o.reduce((e,t)=>e+t,0);if(n<=0)return e[0];let i=Math.random()*n;for(let t=0;t<e.length;t++)if(i-=o[t],i<0)return e[t];return e[e.length-1]}let c=()=>{},h=()=>{};function d(e){c=e}function u(e){h=e}class m{engine;launchOptions;onSearchInfo;_sessionID=0;usi;position;searchHandler;mateHandler;ponder;ponderMove;info;usiInfoTimeout;customMultiPV;bookSessionID;usiInfoCommandHandler;constructor(e,t,o){this.engine=e,this.launchOptions=t,this.onSearchInfo=o}get name(){return this.engine.name}get sessionID(){return this._sessionID}async launch(){try{this.engine.extraBook?.enabled&&this.engine.extraBook.filePath&&(this.bookSessionID=await n.Ay.openBookAsNewSession(this.engine.extraBook.filePath,{forceOnTheFly:this.engine.extraBook.onTheFly})),this._sessionID=await n.Ay.usiLaunch(this.engine,this.launchOptions),p[this.sessionID]=this}catch(e){throw this.bookSessionID&&await n.Ay.closeBookSession(this.bookSessionID),e}}isEngine(){return!0}async readyNewGame(){await n.Ay.usiReady(this.sessionID)}async startSearch(e,t,o,i){this.clearHandlers(),this.searchHandler=i,this.usi=t,this.position=e.clone(),await this.searchBook()||(this.ponderMove&&this.ponder===this.usi?n.Ay.usiPonderHit(this.sessionID,o):(this.info=void 0,await n.Ay.usiGo(this.sessionID,this.usi,o),c(this.sessionID,this.position)),this.ponderMove=void 0,this.ponder=void 0)}async startPonder(e,t,o){if(!(0,a.my)(this.engine))return;if(this.ponderMove)return;const i=t;if(!this.ponder||!this.ponder.startsWith(i))return;const s=e.createMoveByUSI(this.ponder.slice(i.length+1));s&&e.isValidMove(s)&&(this.clearHandlers(),this.usi=this.ponder,this.position=e.clone(),this.stochasticPonder||this.position.doMove(s),this.info=void 0,this.ponderMove=s,await n.Ay.usiGoPonder(this.sessionID,this.ponder,o),c(this.sessionID,this.position))}async startMateSearch(e,t,o,i){this.clearHandlers(),this.usi=t,this.info=void 0,this.position=e.clone(),this.mateHandler=i,await n.Ay.usiGoMate(this.sessionID,this.usi,o),c(this.sessionID,this.position)}async startResearch(e,t){this.clearHandlers(),this.usi=t,this.info=void 0,this.position=e.clone(),await this.searchBook()||(await n.Ay.usiGoInfinite(this.sessionID,t),c(this.sessionID,this.position))}async searchBook(){if(!this.bookSessionID||!this.position)return!1;try{const e=await n.Ay.searchBookMoves(this.bookSessionID,this.position.sfen);if(0===e.length)return!1;if(this.ponderMove&&(await n.Ay.usiStop(this.sessionID),this.ponderMove=void 0,this.ponder=void 0),c(this.sessionID,this.position),h&&this.usi)for(let t=0;t<e.length;t++){const o=e[t];if(this.position.createMoveByUSI(o.usi)){const e={multipv:t+1,depth:o.depth,scoreCP:o.score,nodes:o.count,currmove:o.usi,pv:o.usi2?[o.usi,o.usi2]:[o.usi]};h(this.sessionID,this.position,this.name,e)}}const t=this.selectBookMove(e),o=this.position.createMoveByUSI(t.usi);if(!o)return n.Ay.log(r.$.ERROR,`Failed to search book moves: invalid move from book: ${t.usi}`),!1;const i=this.searchHandler;return this.clearHandlers(),i&&i.onMove(o),!0}catch(e){return n.Ay.log(r.$.ERROR,`Failed to search book moves: ${e}`),!1}}selectBookMove(e){switch(this.engine.extraBook?.moveSelectionRule){case a.hJ.WEIGHTED_BY_COUNT:return l(e,e=>e.count??0);case a.hJ.WEIGHTED_BY_SCORE:{const t=e.map(e=>e.score).filter(e=>void 0!==e&&Number.isFinite(e));if(0===t.length)return e[0];const o=Math.max(...t),n=this.engine.extraBook?.scoreTemperature,i=void 0!==n&&Number.isFinite(n)&&n>0?n:100;return l(e,e=>void 0!==e.score?Math.exp((e.score-o)/i):0)}default:return e[0]}}async stop(){await n.Ay.usiStop(this.sessionID)}async gameover(e){await n.Ay.usiGameover(this.sessionID,e)}async close(){this.clearHandlers(),await n.Ay.usiQuit(this.sessionID),delete p[this.sessionID],this.bookSessionID&&await n.Ay.closeBookSession(this.bookSessionID)}clearHandlers(){this.searchHandler=void 0,this.mateHandler=void 0}onBestMove(e,t,o){const n=this.searchHandler;if(this.clearHandlers(),!n||!this.position)return;if(e!==this.usi)return;if("resign"===t)return void n.onResign();if("win"===t)return void n.onWin();const i=this.position.createMoveByUSI(t);if(!i)return n.onError("エンジンから不明な指し手を受信しました:"+t),void n.onResign();const a=e.indexOf(" moves ")>0;if(this.ponder=o&&`${e}${a?"":" moves"} ${t} ${o}`,this.flushUSIInfo(),this.info?.pv&&this.info.pv.length>=1&&this.info.pv[0].equals(i)){const e={...this.info,pv:this.info.pv.slice(1)};n.onMove(i,e)}else n.onMove(i)}onCheckmate(e,t){if(e!==this.usi||!this.position)return;h(this.sessionID,this.position,this.name,{pv:t});const o=this.mateHandler;if(this.clearHandlers(),!o)return;const n=this.position,i=[];for(const e of t){const t=n.createMoveByUSI(e);if(!t)return void o.onError("エンジンから不明な指し手を受信しました:"+e);if(i.push(t),!n.doMove(t))return void o.onError("エンジンから無効な指し手を受信しました:"+e)}o.onCheckmate(i)}onCheckmateNotImplemented(){const e=this.mateHandler;this.clearHandlers(),e?.onNotImplemented()}onCheckmateTimeout(e){if(e!==this.usi||!this.position)return;const t=this.mateHandler;this.clearHandlers(),t?.onTimeout()}onNoMate(e){if(e!==this.usi||!this.position)return;const t=this.mateHandler;this.clearHandlers(),t?.onNoMate()}setUSIInfoCommandHandler(e){this.usiInfoCommandHandler=e}onUSIInfo(e,t){if(e!==this.usi||!this.position)return;if(h(this.sessionID,this.position,this.name,t,this.ponderMove),this.usiInfoCommandHandler?.(this.position,t),t.multipv&&1!==t.multipv)return;const o=this.position.color===s.Color.BLACK?1:-1,n=t.pv&&t.pv.length>=1?t.pv:t.currmove?[t.currmove]:void 0;this.info={usi:e,depth:t.depth??this.info?.depth,nodes:t.nodes??this.info?.nodes,score:(t.scoreCP&&t.scoreCP*o)??this.info?.score,mate:(t.scoreMate&&t.scoreMate*o)??this.info?.mate,pv:(n&&i(this.position,n))??this.info?.pv},this.ponderMove||this.usiInfoTimeout||(this.usiInfoTimeout=window.setTimeout(()=>{this.flushUSIInfo()},500))}flushUSIInfo(){this.usiInfoTimeout&&(clearTimeout(this.usiInfoTimeout),this.usiInfoTimeout=void 0),this.info&&this.onSearchInfo?.(this.info)}get multiPV(){return this.customMultiPV||(0,a.Lo)(this.engine)}async setMultiPV(e){const t=this.engine.options[a.Br]||this.engine.options[a.aW];if(!t||"spin"!==t.type)throw new Error("The engine does not support MultiPV option.");if(t.min&&e<t.min||t.max&&e>t.max)throw new Error("The MultiPV value is out of range.");await n.Ay.usiSetOption(this.sessionID,t.name,e.toFixed(0)),this.customMultiPV=e}get stochasticPonder(){return(0,a.pk)(this.engine)}}const p={};function g(e,t,o,n){p[e]?.onBestMove(t,o,n)}function S(e,t,o){p[e]?.onCheckmate(t,o)}function y(e){p[e]?.onCheckmateNotImplemented()}function f(e,t){p[e]?.onCheckmateTimeout(t)}function v(e,t){p[e]?.onNoMate(t)}function T(e,t,o){p[e]?.onUSIInfo(t,o)}function b(e){return!!p[e]}},953(e){e.exports=require("encoding-japanese")},113(e){e.exports=require("tsshogi")}};const t={};function o(n){const i=t[n];if(void 0!==i)return i.exports;const a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}o.m=e,o.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{if(Array.isArray(t))for(var n=0;n<t.length;){var i=t[n++],a=t[n++];o.o(e,i)?0===a&&n++:0===a?Object.defineProperty(e,i,{enumerable:!0,value:t[n++]}):Object.defineProperty(e,i,{enumerable:!0,get:a})}else for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.u=e=>e+".index.js",o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.wc="undefined"!=typeof Worker?Worker:"undefined"!=typeof process&&"function"==typeof process.getBuiltinModule&&process.getBuiltinModule("node:worker_threads").Worker,o.p="",o.b=require("node:url").pathToFileURL(__filename);var n=o(145),i=o(292);const a=require("node:path");var s=o.n(a);const r=require("node:child_process"),l=require("log4js");var c=o.n(l),h=o(588);const d=require("node:fs");var u=o.n(d);require("node:os");const m=function(e){switch(e){case"logs":return s().join(process.cwd(),"logs");case"exe":return process.argv[1];default:return process.cwd()}}("logs");const p=(0,h.ln)().replaceAll(" ","_").replaceAll("/","").replaceAll(":",""),g=s().join(m,`app-${p}.log`),S=s().join(m,`usi-${p}.log`),y=s().join(m,`csa-${p}.log`),f={appenders:{stdout:{type:"stdout"},recording:{type:"recording"}},categories:{default:{appenders:["stdout"],level:"info"}}};function v(e){switch(e){case n.F.APP:return g;case n.F.USI:return S;case n.F.CSA:return y}}const T="stdout",b={[n.F.APP]:[T],[n.F.USI]:[T],[n.F.CSA]:[T]},C={[n.F.APP]:n.$.INFO,[n.F.USI]:n.$.INFO,[n.F.CSA]:n.$.INFO};function E(e,t,o){b[e]=t.map(t=>"file"===t?e:t),C[e]=o}const I={};function A(e){if(I[e])return I[e];f.appenders[e]||(f.appenders[e]={type:"file",filename:v(e)},f.categories[e]={appenders:b[e],level:C[e]});const t=c().configure(f).getLogger(e);return I[e]=t,t}function P(){return A(n.F.APP)}var w=o(113),k=o(143),M=o(244);const N=require("node:net");var R=o.n(N);const O=require("node:readline");class F{socket;readline;constructor(e,t,o,n={keepaliveInitialDelay:0,noDelay:!0}){this.socket=R().createConnection({port:t,host:e},o.onConnect).setKeepAlive(!0,1e3*n.keepaliveInitialDelay).setNoDelay(n.noDelay).on("error",o.onError).on("end",o.onFIN).on("close",e=>{this.closeReadline(),o.onClose(e)}),this.readline=(0,O.createInterface)(this.socket),this.readline.on("line",o.onRead)}write(e){this.socket.write(e+"\n")}end(){this.socket.end()}closeReadline(){this.readline&&(this.readline.close(),this.readline=null)}}var D,L=o(699);!function(e){e.IDLE="idle",e.CONNECTING="connecting",e.CONNECTED="connected",e.WAITING_GAME_SUMMARY="waitingGameSummary",e.GAME_SUMMARY="gameSummary",e.GAME_TIME="gameTime",e.GAME_TIME_B="gameTimeB",e.GAME_TIME_W="gameTimeW",e.GAME_POSITION="gamePosition",e.READY="ready",e.WAITING_START="waitingStart",e.WAITING_REJECT="waitingReject",e.PLAYING="playing",e.WAITING_LOGOUT="waitingLogout",e.WAITING_CLOSE="waitingClose",e.CLOSED="closed"}(D||(D={}));class B{_sessionID;_settings;logger;_state=D.IDLE;gameSummaryCallback;rejectCallback;startCallback;moveCallback;gameResultCallback;closeCallback;errorCallback;commandCallback;socket;gameSummary=(0,k.Rr)();playerStates=(0,k.OW)();specialMove=k.kt.UNKNOWN;_lastReceived;_lastSent;_commandHistory={discarded:0,commands:[]};_createdMs=Date.now();_loggedInMs;blankLinePingTimeout=null;constructor(e,t,o){this._sessionID=e,this._settings=t,this.logger=o}get sessionID(){return this._sessionID}get settings(){return this._settings}get state(){return this._state}get lastReceived(){return this._lastReceived}get lastSent(){return this._lastSent}get commandHistory(){return this._commandHistory}get createdMs(){return this._createdMs}get loggedInMs(){return this._loggedInMs}on(e,t){switch(e){case"gameSummary":this.gameSummaryCallback=t;break;case"reject":this.rejectCallback=t;break;case"start":this.startCallback=t;break;case"move":this.moveCallback=t;break;case"gameResult":this.gameResultCallback=t;break;case"close":this.closeCallback=t;break;case"error":this.errorCallback=t;break;case"command":this.commandCallback=t}return this}login(){this.logger.info("sid=%d: connecting to %s:%d",this.sessionID,this.settings.host,this.settings.port),this._state=D.CONNECTING;const e={keepaliveInitialDelay:this.settings.tcpKeepalive.initialDelay,noDelay:!0};this.socket=new F(this.settings.host,this.settings.port,{onConnect:this.onConnect.bind(this),onError:this.onConnectionError.bind(this),onFIN:this.onFIN.bind(this),onClose:this.onClose.bind(this),onRead:this.onRead.bind(this)},e)}logout(){if(this.settings.protocolVersion===M._B.V121_FLOODGATE)this.socket&&(this.logger.info("sid=%d: disconnect",this.sessionID),this.socket.end(),this._state=D.WAITING_CLOSE);else this.state!==D.WAITING_GAME_SUMMARY&&this.state!==D.GAME_SUMMARY&&this.state!==D.GAME_TIME&&this.state!==D.GAME_TIME_B&&this.state!==D.GAME_TIME_W&&this.state!==D.GAME_POSITION&&this.state!==D.READY||(this.send("LOGOUT"),this._state=D.WAITING_LOGOUT)}agree(e){this.state===D.READY&&e===this.gameSummary.id&&(this._state=D.WAITING_START,this.send(`AGREE ${this.gameSummary.id}`))}reject(e){this.state===D.READY&&e===this.gameSummary.id&&(this._state=D.WAITING_REJECT,this.send(`REJECT ${this.gameSummary.id}`))}doMove(e,t,o){if(this.state!==D.PLAYING)return;let n=e;void 0!==t&&(n+=`,'* ${Math.round(t)}`,void 0!==o&&(n+=` ${o}`)),this.send(n)}resign(){this.state===D.PLAYING&&this.send("%TORYO")}win(){this.state===D.PLAYING&&this.send("%KACHI")}stop(){this.state===D.PLAYING&&this.send("%CHUDAN")}send(e){this.socket?(this.socket.write(e),this._lastSent=(0,L.Ye)(L.g4.SEND,this.hideSecureValues(e)),this.updateCommendHistory(this._lastSent),this.commandCallback?.(this._lastSent),this.logger.info("sid=%d: > %s",this.sessionID,this.hideSecureValues(e)),this.setBlankLinePing(e)):this.logger.error("sid=%d: failed to send command caused by invalid socket: %s",this.sessionID,e)}hideSecureValues(e){return this.settings.password&&(e=e.replaceAll(this.settings.password,"*****")),e}onConnect(){this.logger.info("sid=%d: connected",this.sessionID),this._state=D.CONNECTED;let e="";this.settings.protocolVersion===M._B.V121_X1&&(e=" x1"),this.send(`LOGIN ${this.settings.id} ${this.settings.password}${e}`)}onConnectionError(e){if(this.state===D.CLOSED)return;this.onError(e),this._state=D.CLOSED,this.closeCallback?.();const t=(0,L.Ye)(L.g4.SYSTEM,"connection error");this.updateCommendHistory(t),this.commandCallback?.(t)}onError(e){this.logger.error("sid=%d: error: %s %s",this.sessionID,e.name,e.message),this.errorCallback?.(e)}onFIN(){this.logger.info("sid=%d: FIN packet received",this.sessionID),this.clearBlankLinePing()}onClose(e){if(this.clearBlankLinePing(),this.state===D.CLOSED)return;switch(this.state){case D.WAITING_GAME_SUMMARY:case D.WAITING_LOGOUT:case D.WAITING_CLOSE:e?this.onError(new Error(i.t.errorOccuredWhileDisconnectingFromCSAServer)):this.logger.info("sid=%d: socket closed",this.sessionID);break;case D.CONNECTING:this.onError(new Error(i.t.failedToConnectToCSAServer));break;default:this.onError(new Error(i.t.disconnectedFromCSAServer))}this._state=D.CLOSED,this.closeCallback?.();const t=(0,L.Ye)(L.g4.SYSTEM,e?"closed (error)":"closed");this.updateCommendHistory(t),this.commandCallback?.(t)}onRead(e){this.setBlankLinePing(),this._lastReceived=(0,L.Ye)(L.g4.RECEIVE,e),this.updateCommendHistory(this._lastReceived),this.commandCallback?.(this._lastReceived),this.logger.info("sid=%d: < %s",this.sessionID,e),""!==e&&(this.state===D.GAME_SUMMARY?this.onGameSummary(e):this.state===D.GAME_TIME?this.onGameTime(e):this.state===D.GAME_TIME_B?this.onGameTime(e,w.Color.BLACK):this.state===D.GAME_TIME_W?this.onGameTime(e,w.Color.WHITE):this.state===D.GAME_POSITION?this.onGamePosition(e):this.state===D.PLAYING?this.onMove(e):/^LOGIN:.* OK$/.test(e)?this.onLoginOK():"LOGIN:incorrect"===e?this.onLoginIncorrect():"LOGOUT:completed"===e?this.onLogout():"BEGIN Game_Summary"===e?this.onBeginGameSummary():e.startsWith("REJECT:")?this.onReject():e.startsWith("START:")?this.onStart():this.logger.warn("sid=%d: unknown command received",this.sessionID))}onLoginOK(){this._loggedInMs=Date.now(),this.logger.info("sid=%d: login ok",this.sessionID),this._state=D.WAITING_GAME_SUMMARY}onLoginIncorrect(){this.onError(new Error(i.t.csaServerLoginDenied)),this.socket&&this.socket.end()}onLogout(){this.logger.info("sid=%d: logout",this.sessionID),this._state=D.WAITING_CLOSE}onBeginGameSummary(){this._state=D.GAME_SUMMARY,this.gameSummary=(0,k.Rr)()}onEndGameSummary(){const e=this.gameSummary.players.black.time,t=this.gameSummary.players.white.time;this.playerStates.black.time=e.totalTime+e.increment,this.playerStates.white.time=t.totalTime+t.increment;const o=(0,w.importCSA)(this.gameSummary.position);if(o instanceof Error)return this.onError(new Error("invalid game position received from CSA server")),void this.logout();for(const e of o.moves){if((0,w.isKnownSpecialMove)(e.move)&&e.move.type===w.SpecialMoveType.START)continue;const t=(0,w.reverseColor)(e.nextColor);this.updateTime(t,e.elapsedMs)}this._state=D.READY,this.gameSummaryCallback?.(this.gameSummary)}onGameSummary(e){switch(e){case"END Game_Summary":return void this.onEndGameSummary();case"BEGIN Time":return void(this._state=D.GAME_TIME);case"BEGIN Time+":return void(this._state=D.GAME_TIME_B);case"BEGIN Time-":return void(this._state=D.GAME_TIME_W);case"BEGIN Position":return void(this._state=D.GAME_POSITION)}const[t,o]=e.split(":",2);switch(t){case"Protocol_Version":case"Protocol_Mode":case"Format":case"Declaration":case"Rematch_On_Draw":case"Max_Moves":break;case"Game_ID":this.gameSummary.id=o;break;case"Name+":this.gameSummary.players.black.playerName=o;break;case"Name-":this.gameSummary.players.white.playerName=o;break;case"Your_Turn":this.gameSummary.myColor="+"===o?w.Color.BLACK:w.Color.WHITE;break;case"To_Move":this.gameSummary.toMove="+"===o?w.Color.BLACK:w.Color.WHITE;break;default:this.logger.warn("sid=%d: unknown command received",this.sessionID)}}onGameTime(e,t){switch(e){case"END Time":case"END Time+":case"END Time-":return void(this._state=D.GAME_SUMMARY)}const o=t?[this.gameSummary.players[t].time]:[this.gameSummary.players.black.time,this.gameSummary.players.white.time],[n,i]=e.split(":",2);switch(n){case"Least_Time_Per_Move":case"Time_Roundup":break;case"Time_Unit":for(const e of o)i.endsWith("msec")?e.timeUnitMs=Number(i.slice(0,-4)):i.endsWith("sec")?e.timeUnitMs=1e3*Number(i.slice(0,-3)):i.endsWith("min")&&(e.timeUnitMs=60*Number(i.slice(0,-3))*1e3);break;case"Total_Time":for(const e of o)e.totalTime=Number(i);break;case"Byoyomi":for(const e of o)e.byoyomi=Number(i);break;case"Delay":for(const e of o)e.delay=Number(i);break;case"Increment":for(const e of o)e.increment=Number(i);break;default:this.logger.warn("sid=%d: unknown command received",this.sessionID)}}onGamePosition(e){"END Position"!==e?this.gameSummary.position+=e+"\n":this._state=D.GAME_SUMMARY}onReject(){this._state=D.WAITING_GAME_SUMMARY,this.rejectCallback?.()}onStart(){this._state=D.PLAYING,this.startCallback?.(this.playerStates)}onMove(e){e.startsWith("+")?this.onMoveWithColor(e,w.Color.BLACK):e.startsWith("-")?this.onMoveWithColor(e,w.Color.WHITE):e.startsWith("#")?this.onEndingCommand(e):e.startsWith("%")||this.logger.warn("sid=%d: unknown move command received",this.sessionID)}onMoveWithColor(e,t){const o=/^.*,T([0-9]+(?:\.[0-9]*)?)$/.exec(e);if(o){const e=Number(o[1]);this.updateTime(t,1e3*e)}else this.logger.error("sid=%d: invalid move format",this.sessionID);this.moveCallback?.(e,this.playerStates)}updateTime(e,t){const o=this.gameSummary.players[e].time,n=t/o.timeUnitMs,i=this.playerStates[e].time-n+o.increment;this.playerStates[e].time=Math.max(i,0)}onEndingCommand(e){switch(e){case"#RESIGN":this.specialMove=k.kt.RESIGN;break;case"#SENNICHITE":this.specialMove=k.kt.SENNICHITE;break;case"#OUTE_SENNICHITE":this.specialMove=k.kt.OUTE_SENNICHITE;break;case"#ILLEGAL_MOVE":this.specialMove=k.kt.ILLEGAL_MOVE;break;case"#ILLEGAL_ACTION":this.specialMove=k.kt.ILLEGAL_ACTION;break;case"#TIME_UP":this.specialMove=k.kt.TIME_UP;break;case"#JISHOGI":this.specialMove=k.kt.JISHOGI;break;case"#MAX_MOVES":this.specialMove=k.kt.MAX_MOVES;break;case"#WIN":this.onGameResult(k.j5.WIN);break;case"#LOSE":this.onGameResult(k.j5.LOSE);break;case"#DRAW":this.onGameResult(k.j5.DRAW);break;case"#CENSORED":this.onGameResult(k.j5.CENSORED);break;case"#CHUDAN":this.onGameResult(k.j5.CHUDAN)}}onGameResult(e){this._state=D.WAITING_GAME_SUMMARY,this.gameResultCallback?.(this.specialMove,e)}invoke(e,t){switch(e){case L.g4.SEND:this.send(t);break;case L.g4.RECEIVE:this.onRead(t)}}setBlankLinePing(e){this.settings.blankLinePing&&(this.clearBlankLinePing(),this.blankLinePingTimeout=setTimeout(()=>{this.send("")},1e3*(""===e?this.settings.blankLinePing.interval:this.settings.blankLinePing.initialDelay)))}clearBlankLinePing(){this.blankLinePingTimeout&&(clearTimeout(this.blankLinePingTimeout),this.blankLinePingTimeout=null)}updateCommendHistory(e){(0,L.np)(this._commandHistory,e,100,10)}}let U;let _=0;const G=new Map;let W=2e4;function x(e){const t=(_+=1,_),o=new B(t,e,A(n.F.CSA)).on("gameSummary",e=>U.onCSAGameSummary(t,e)).on("reject",()=>U.onCSAReject(t)).on("start",e=>U.onCSAStart(t,e)).on("move",(e,o)=>U.onCSAMove(t,e,o)).on("gameResult",(e,o)=>U.onCSAGameResult(t,e,o)).on("close",()=>{!function(e){setTimeout(()=>{G.delete(e)},W)}(t),U.onCSAClose(t)}).on("error",U.sendError).on("command",e=>{U.sendPromptCommand(t,e)});return function(e){G.set(e.sessionID,e)}(o),o.login(),t}var H=o(262);const $="win32"===process.platform;class K{handle;readline=null;constructor(e){const t={cwd:s().dirname(e)};$&&(e.endsWith(".bat")||e.endsWith(".cmd"))?this.handle=(0,r.spawn)("cmd.exe",["/c",e],t):this.handle=(0,r.spawn)(e,t),this.handle.on("close",this.onClose.bind(this))}get pid(){return this.handle.pid}on(e,t){switch(e){case"receive":null===this.readline&&(this.readline=(0,O.createInterface)(this.handle.stdout)),this.readline.on("line",t);break;case"close":this.handle.on("close",(e,o)=>{this.onClose(),t(e,o)});break;default:this.handle.on(e,t)}return this}send(e){this.handle.stdin.write(e+"\n")}kill(){this.onClose(),this.handle.kill()}onClose(){null!==this.readline&&this.readline.close()}}o(616);class V{constructor(){throw new Error("WebAssembly engines are not supported on command line tool")}get pid(){}on(){return this}send(){}kill(){}}var Y,q;function J(e){switch(e){case"+":case"+0":case"0":return 1e4;case"-":case"-0":return-1e4;default:return Number(e)}}function j(e){return e?`btime ${e.btime} wtime ${e.wtime} `+(0!==e.binc||0!==e.winc?`binc ${e.binc} winc ${e.winc}`:`byoyomi ${e.byoyomi}`):"infinite"}!function(e){e.WIN="win",e.LOSE="lose",e.DRAW="draw"}(Y||(Y={})),function(e){e.WaitingForUSIOK="waitingForUSIOK",e.NotReady="notReady",e.WaitingForReadyOK="waitingForReadyOK",e.Ready="ready",e.WaitingForBestMove="waitingForBestMove",e.Ponder="ponder",e.WaitingForPonderBestMove="waitingForPonderBestMove",e.WaitingForCheckmate="waitingForCheckmate",e.WillQuit="willQuit",e.QuitCompleted="quitCompleted"}(q||(q={}));class z{_path;sessionID;logger;option;process=null;_name="NO NAME";_author="";_engineOptions={};_state=q.WaitingForUSIOK;_currentPosition="";invalidBestMoveCount=0;reservedSetOptionCommands=[];reservedGoCommand;launchTimeout;quitTimeout;_lastReceived;_lastSent;_commandHistory={discarded:0,commands:[]};readyStartTimeMs=0;goTimeMs=0;timeoutCallback;errorCallback;closeCallback;usiOkCallback;readyCallback;bestMoveCallback;goEndCallback;checkmateCallback;checkmateNotImplementedCallback;checkmateTimeoutCallback;checkmateEndCallback;noMateCallback;infoCallback;commandCallback;constructor(e,t,o,n){this._path=e,this.sessionID=t,this.logger=o,this.option=n}get path(){return this._path}get name(){return this._name}get author(){return this._author}get engineOptions(){return this._engineOptions}get state(){return this._state}get currentPosition(){return this._currentPosition}get lastReceived(){return this._lastReceived}get lastSent(){return this._lastSent}get commandHistory(){return this._commandHistory}get pid(){return this.process?.pid}on(e,t){switch(e){case"timeout":this.timeoutCallback=t;break;case"error":this.errorCallback=t;break;case"close":this.closeCallback=t;break;case"usiok":this.usiOkCallback=t;break;case"ready":this.readyCallback=t;break;case"bestmove":this.bestMoveCallback=t;break;case"goEnd":this.goEndCallback=t;break;case"checkmate":this.checkmateCallback=t;break;case"checkmateNotImplemented":this.checkmateNotImplementedCallback=t;break;case"checkmateTimeout":this.checkmateTimeoutCallback=t;break;case"checkmateEnd":this.checkmateEndCallback=t;break;case"noMate":this.noMateCallback=t;break;case"info":this.infoCallback=t;break;case"command":this.commandCallback=t}return this}launch(){this.logger.info("sid=%d: launch: %s",this.sessionID,this.path),this.setLaunchTimeout(),this.process=function(e){return/(^|[\\/])engine\.json$/.test(e)}(this.path)?new V(this.path):new K(this.path),this.process.on("error",this.onError.bind(this)),this.process.on("close",this.onClose.bind(this)),this.process.on("receive",this.onReceive.bind(this)),this.send("usi")}quit(){if(this.state!==q.WillQuit){switch(this.state){case q.WaitingForBestMove:case q.WaitingForPonderBestMove:if(this.goEndCallback){const e=Date.now()-this.goTimeMs;this.goEndCallback(e)}break;case q.WaitingForCheckmate:if(this.checkmateEndCallback){const e=Date.now()-this.goTimeMs;this.checkmateEndCallback(e)}}this._state=q.WillQuit,this.clearLaunchTimeout(),this.logger.info("sid=%d: quit USI engine",this.sessionID),this.setQuitTimeout(),this.send("quit")}}setOption(e,t){this.state===q.WaitingForBestMove||this.state===q.WaitingForPonderBestMove||this.state===q.WaitingForCheckmate?this.reservedSetOptionCommands.push({name:e,value:t}):this.setOptionImmediately(e,t)}setOptionImmediately(e,t){void 0!==t?this.send(`setoption name ${e} value ${t}`):this.send(`setoption name ${e}`)}flushReservedSetOptionCommands(){for(const e of this.reservedSetOptionCommands)this.setOptionImmediately(e.name,e.value);this.reservedSetOptionCommands=[]}ready(){if(this.state!==q.WaitingForReadyOK){if(this.state!==q.Ready&&this.state!==q.WaitingForBestMove&&this.state!==q.Ponder&&this.state!==q.WaitingForPonderBestMove&&this.state!==q.WaitingForCheckmate||this.gameover(Y.DRAW),this.state!==q.NotReady)return this.logger.warn("sid=%d: ready: unexpected state: %s",this.sessionID,this.state),new Error("unexpected state");this.send("isready"),this._state=q.WaitingForReadyOK,this.readyStartTimeMs=Date.now()}}go(e,t){switch(this.reservedGoCommand={position:e,timeState:t},this.state){case q.Ready:this.sendReservedGoCommands();break;case q.WaitingForBestMove:case q.Ponder:case q.WaitingForCheckmate:this.stop()}}goPonder(e,t){this.state===q.Ready||this.state===q.WaitingForBestMove?(this.reservedGoCommand={position:e,timeState:this.option.enableEarlyPonder?void 0:t,ponder:!0},this.state===q.Ready&&this.sendReservedGoCommands()):this.logger.warn("sid=%d: goPonder: unexpected state: %s",this.sessionID,this.state)}goMate(e,t){this.state===q.Ready?(this.reservedGoCommand={position:e,mate:!0,mateLimit:t?1e3*t:void 0},this.sendReservedGoCommands()):this.logger.warn("sid=%d: goMate: unexpected state: %s",this.sessionID,this.state)}ponderHit(e){this.state===q.Ponder?(this.option.enableEarlyPonder?this.send("ponderhit "+j(e)):this.send("ponderhit"),this._state=q.WaitingForBestMove):this.logger.warn("sid=%d: ponderHit: unexpected state: %s",this.sessionID,this.state)}stop(){this.state===q.WaitingForBestMove||this.state===q.Ponder||this.state===q.WaitingForCheckmate?"stop"!==this.lastSent?.command&&(this.send("stop"),this.state===q.Ponder&&(this._state=q.WaitingForPonderBestMove)):this.logger.warn("sid=%d: stop: unexpected state: %s",this.sessionID,this.state)}gameover(e){switch(this.state){case q.WaitingForUSIOK:case q.NotReady:case q.WaitingForReadyOK:case q.WillQuit:return void this.logger.warn("sid=%d: gameover: unexpected state: %s",this.sessionID,this.state);case q.WaitingForBestMove:case q.Ponder:this.stop(),this.invalidBestMoveCount++;break;case q.WaitingForPonderBestMove:this.invalidBestMoveCount++;break;case q.WaitingForCheckmate:this.stop();case q.Ready:}this.send("gameover "+e),this._state=q.NotReady,this.reservedGoCommand=void 0}setLaunchTimeout(){this.launchTimeout=setTimeout(()=>{this.timeoutCallback?.(),this.quit()},this.option.timeout||1e4)}clearLaunchTimeout(){this.launchTimeout&&(clearTimeout(this.launchTimeout),this.launchTimeout=void 0)}setQuitTimeout(){this.quitTimeout=setTimeout(()=>{this.process&&(this.process.kill(),this.process=null)},5e3)}clearQuitTimeout(){this.quitTimeout&&(clearTimeout(this.quitTimeout),this.quitTimeout=void 0)}onError(e){this.errorCallback?.(e),this.quit()}onClose(e,t){this.logger.info("sid=%d: engine process closed: close=%s signal=%s",this.sessionID,e,t),this.state!==q.WillQuit&&this.errorCallback?.(new Error("closed unexpectedly")),this._state=q.QuitCompleted,this.clearLaunchTimeout(),this.clearQuitTimeout(),this.process=null,this.closeCallback?.();const o=(0,L.Ye)(L.g4.SYSTEM,`closed: close=${e} signal=${t}`);this.updateCommendHistory(o),this.commandCallback?.(o)}sendReservedGoCommands(){if(!this.reservedGoCommand)return;this.send(this.reservedGoCommand.position);let e="",t="";if(this.reservedGoCommand.ponder)e="ponder",t=(o=this.reservedGoCommand.timeState)?j(o):"";else if(this.reservedGoCommand.mate){e="mate";const o=this.reservedGoCommand.mateLimit;t=o?Math.floor(o).toFixed(0):"infinite"}else t=j(this.reservedGoCommand.timeState);var o;this.send("go"+(e?" "+e:"")+(t?" "+t:"")),this._currentPosition=this.reservedGoCommand.position,this._state=this.reservedGoCommand.ponder?q.Ponder:this.reservedGoCommand.mate?q.WaitingForCheckmate:q.WaitingForBestMove,this.reservedGoCommand=void 0,this.goTimeMs=Date.now()}send(e){this.process&&(this.process.send(e),this._lastSent=(0,L.Ye)(L.g4.SEND,e),this.updateCommendHistory(this._lastSent),this.commandCallback?.(this._lastSent),this.logger.info("sid=%d: > %s",this.sessionID,e))}onReceive(e){if(this._lastReceived=(0,L.Ye)(L.g4.RECEIVE,e),this.updateCommendHistory(this._lastReceived),this.commandCallback?.(this._lastReceived),this.logger.info("sid=%d: < %s",this.sessionID,e),this.state!==q.WillQuit)if(e.startsWith("id name "))this.onIDName(e.substring(8));else if(e.startsWith("id author "))this.onIDAuthor(e.substring(10));else if(e.startsWith("option "))this.onOption(e.substring(7));else if("usiok"===e)this.onUSIOk();else if("readyok"===e)this.onReadyOk();else if(e.startsWith("bestmove "))this.onBestMove(e.substring(9));else if(e.startsWith("checkmate "))this.onCheckmate(e.substring(10));else if(e.startsWith("info ")&&!this.option.discardUSIInfo&&this.infoCallback){const t=e.substring(5);this.infoCallback?.(this.currentPosition,function(e){const t={},o=e.split(" ");for(let n=0;n<e.length;n+=1)switch(o[n]){case"depth":t.depth=Number(o[n+1]),n+=1;break;case"seldepth":t.seldepth=Number(o[n+1]),n+=1;break;case"time":t.timeMs=Number(o[n+1]),n+=1;break;case"nodes":t.nodes=Number(o[n+1]),n+=1;break;case"pv":t.pv=o.slice(n+1),n=o.length;break;case"multipv":t.multipv=Number(o[n+1]),n+=1;break;case"score":switch(o[n+1]){case"cp":t.scoreCP=Number(o[n+2]),n+=2;break;case"mate":t.scoreMate=J(o[n+2]),n+=2}break;case"lowerbound":t.lowerbound=!0;break;case"upperbound":t.upperbound=!0;break;case"currmove":t.currmove=o[n+1],n+=1;break;case"hashfull":t.hashfullPerMill=Number(o[n+1]),n+=1;break;case"nps":t.nps=Number(o[n+1]),n+=1;break;case"string":t.string=o.slice(n+1).join(" "),n=o.length}return t}(t))}}onIDName(e){this._name=e}onIDAuthor(e){this._author=e}onOption(e){const t=e.split(" ");if(t.length<4||"name"!==t[0]||"type"!==t[2])return void this.logger.error("sid=%d: invalid option command",this.sessionID);const o=t[1],n=t[3],i=100+Object.keys(this._engineOptions).length,a="combo"===n?{name:o,type:n,order:i,vars:[]}:{name:o,type:n,order:i};if("button"!==a.type)for(let e=4;e+1<t.length;e+=2)switch(t[e]){case"default":a.default="spin"===a.type?Number(t[e+1]):t[e+1];break;case"min":"spin"===a.type&&(a.min=Number(t[e+1]));break;case"max":"spin"===a.type&&(a.max=Number(t[e+1]));break;case"var":"combo"===a.type&&a.vars.push(t[e+1])}this._engineOptions[a.name]=a}onUSIOk(){this.state===q.WaitingForUSIOK?(this.engineOptions[H.If]||(this._engineOptions[H.If]={name:H.If,type:"spin",order:1,default:32}),this.engineOptions[H.YZ]||(this._engineOptions[H.YZ]={name:H.YZ,type:"check",order:2,default:"true"}),this.option.engineOptions&&this.option.engineOptions.forEach(e=>{const t=(0,H.J3)(e);void 0!==t&&this.setOption(e.name,t)}),this.clearLaunchTimeout(),this._state=q.NotReady,this.usiOkCallback?.()):this.logger.warn("sid=%d: onUSIOk: unexpected state: %s",this.sessionID,this.state)}onReadyOk(){if(this.state!==q.WaitingForReadyOK)return void this.logger.warn("sid=%d: onReadyOk: unexpected state: %s",this.sessionID,this.state);this._state=q.Ready;const e=Date.now()-this.readyStartTimeMs;this.readyCallback?.(e),this.send("usinewgame"),this.sendReservedGoCommands()}onBestMove(e){if(this.flushReservedSetOptionCommands(),this.invalidBestMoveCount>0)return this.invalidBestMoveCount--,void this.logger.warn("sid=%d: onBestMove: ignore bestmove: %s",this.sessionID,e);const t=Date.now()-this.goTimeMs;if(this.state!==q.WaitingForBestMove&&this.state!==q.WaitingForPonderBestMove)return this.logger.warn("sid=%d: onBestMove: unexpected state: %s",this.sessionID,this.state),void this.goEndCallback?.(t);if(this.bestMoveCallback&&this.state===q.WaitingForBestMove){const t=e.split(" "),o=t[0],n=t.length>=3&&"ponder"===t[1]&&t[2]||void 0;this.bestMoveCallback(this.currentPosition,o,n)}this._state=q.Ready,this._currentPosition="",this.sendReservedGoCommands(),this.goEndCallback?.(t)}onCheckmate(e){this.flushReservedSetOptionCommands();const t=Date.now()-this.goTimeMs;return this.state!==q.WaitingForCheckmate?(this.logger.warn("sid=%d: onCheckmate: unexpected state: %s",this.sessionID,this.state),void this.checkmateEndCallback?.(t)):(this._state=q.Ready,"notimplemented"===e.trim()?(this.checkmateNotImplementedCallback?.(),void this.checkmateEndCallback?.(t)):"timeout"===e.trim()?(this.checkmateTimeoutCallback?.(this.currentPosition),void this.checkmateEndCallback?.(t)):"nomate"===e.trim()?(this.noMateCallback?.(this.currentPosition),void this.checkmateEndCallback?.(t)):(this.checkmateCallback?.(this.currentPosition,e.trim().split(" ")),void this.checkmateEndCallback?.(t)))}invoke(e,t){switch(e){case L.g4.SEND:this.send(t);break;case L.g4.RECEIVE:this.onReceive(t)}}updateCommendHistory(e){(0,L.np)(this._commandHistory,e,100,10)}}o(117);var Q=o(685);function X(e){const t=process.env.PORTABLE_EXECUTABLE_DIR;return t?s().resolve(t,e):e}require("node:url");async function Z(e){try{return await d.promises.lstat(e),!0}catch{return!1}}let ee;function te(e){return new Error(i.t.noResponseFromEnginePleaseExtendTimeout(e))}function oe(e,t){return t?new Error(`${e}: ${i.t.lastReceived}=[${t}]`):new Error(e)}let ne=0;function ie(){return ne+=1,ne}const ae=new Map;let se=2e4;function re(e){const t=ae.get(e);if(!t)throw new Error("No engine session: SessionID="+e);return t}function le(e){const t=re(e);if(t.stats.totalNodeCount+=t.statsTempData?.nodes??0,t.statsTempData?.nps&&(t.stats.npsSampleCount+=1,t.stats.meanNPS=(t.stats.meanNPS*(t.stats.npsSampleCount-1)+t.statsTempData.nps)/t.stats.npsSampleCount),t.statsTempData?.hashfullPerMill){const e=t.statsTempData.hashfullPerMill/10;t.stats.hashUsageSampleCount+=1,t.stats.meanHashUsagePercent=(t.stats.meanHashUsagePercent*(t.stats.hashUsageSampleCount-1)+e)/t.stats.hashUsageSampleCount,e>=50&&(t.stats.hashUsageOver50PercentCount+=1),e>=70&&(t.stats.hashUsageOver70PercentCount+=1),e>=90&&(t.stats.hashUsageOver90PercentCount+=1)}}function ce(e,t){const o=ie(),i=t?.timeoutSeconds||10,a=new z(X(e.path),o,A(n.F.USI),{timeout:1e3*i,engineOptions:Object.values(e.options),enableEarlyPonder:e.enableEarlyPonder,discardUSIInfo:t?.discardUSIInfo}),s=function(e,t){return{process:e,engine:t,createdMs:Date.now(),stats:{runCount:0,totalUptimeMs:0,gameCount:0,totalReadyTimeMs:0,winCount:0,loseCount:0,drawCount:0,goCount:0,goPonderCount:0,ponderHitCount:0,goInfiniteCount:0,goMateCount:0,totalGoTimeMs:0,totalMateTimeMs:0,totalNodeCount:0,maxNPS:0,npsSampleCount:0,meanNPS:0,maxDepth:0,maxDepthTimeMs:0,maxSelDepth:0,depth20Count:0,depth20TotalTimeMs:0,depth30Count:0,depth30TotalTimeMs:0,depth40Count:0,depth40TotalTimeMs:0,depth50Count:0,depth50TotalTimeMs:0,maxHashUsagePercent:0,hashUsageSampleCount:0,meanHashUsagePercent:0,hashUsageOver50PercentCount:0,hashUsageOver70PercentCount:0,hashUsageOver90PercentCount:0}}}(a,e);return ae.set(o,s),new Promise((t,n)=>{a.on("close",()=>{!function(e){const t=re(e),o=Date.now();t.stats.totalUptimeMs+=o-t.createdMs}(o),ee?.onEngineProcessStats(o,e.uri,s.stats,s.createdMs),setTimeout(()=>{ae.delete(o)},se)}).on("error",e=>{const t=a.lastReceived?.command;n(oe(e.message,t))}).on("timeout",()=>n(te(i))).on("bestmove",(e,t,n)=>{ee?.onUSIBestMove(o,e,t,n)}).on("checkmate",(e,t)=>{ee?.onUSICheckmate(o,e,t)}).on("checkmateNotImplemented",()=>{ee?.onUSICheckmateNotImplemented(o)}).on("checkmateTimeout",e=>{ee?.onUSICheckmateTimeout(o,e)}).on("noMate",e=>{ee?.onUSINoMate(o,e)}).on("goEnd",e=>{!function(e,t){re(e).stats.totalGoTimeMs+=t,le(e)}(o,e)}).on("checkmateEnd",e=>{!function(e,t){re(e).stats.totalMateTimeMs+=t,le(e)}(o,e)}).on("usiok",()=>{t(o),function(e){re(e).stats.runCount+=1}(o)}).on("command",e=>{ee?.sendPromptCommand(o,e)}),a.launch()})}function he(e){const t=re(e).process;return new Promise((o,n)=>{t.on("ready",t=>{o(),function(e,t){const o=re(e);o.stats.gameCount+=1,o.stats.totalReadyTimeMs+=t}(e,t)}).on("error",e=>{const o=t.lastReceived?.command;n(oe(e.message,o))});const i=t.ready();if(i){const e=t.lastReceived?.command;n(oe(i.message,e))}})}function de(e,t){const o=t.black,n=t.white,i=t[e].byoyomi;return{btime:o.timeMs-1e3*o.increment,wtime:n.timeMs-1e3*n.increment,byoyomi:1e3*i,binc:0===i?1e3*o.increment:0,winc:0===i?1e3*n.increment:0}}function ue(e,t,o){ee?.onUSIInfo(e,t,o),function(e,t){const o=re(e);o.stats.maxNPS=Math.max(o.stats.maxNPS,t.nps??0),t.depth&&(!o.stats.maxDepth||o.stats.maxDepth<t.depth)&&(o.stats.maxDepth=t.depth,o.stats.maxDepthTimeMs=t.timeMs??0,o.stats.maxSelDepth=t.seldepth??t.depth),t.depth&&((o.statsTempData?.depth??0)<20&&t.depth>=20&&(o.stats.depth20Count+=1,o.stats.depth20TotalTimeMs+=t.timeMs??0),(o.statsTempData?.depth??0)<30&&t.depth>=30&&(o.stats.depth30Count+=1,o.stats.depth30TotalTimeMs+=t.timeMs??0),(o.statsTempData?.depth??0)<40&&t.depth>=40&&(o.stats.depth40Count+=1,o.stats.depth40TotalTimeMs+=t.timeMs??0),(o.statsTempData?.depth??0)<50&&t.depth>=50&&(o.stats.depth50Count+=1,o.stats.depth50TotalTimeMs+=t.timeMs??0)),o.stats.maxHashUsagePercent=Math.max(o.stats.maxHashUsagePercent,(t.hashfullPerMill??0)/10),o.statsTempData={nodes:t.nodes??o.statsTempData?.nodes,nps:t.nps??o.statsTempData?.nps,depth:Math.max(t.depth||0,o.statsTempData?.depth||0),hashfullPerMill:t.hashfullPerMill??o.statsTempData?.hashfullPerMill}}(e,o)}function me(e,t,o){const n=re(e),i=(0,w.getNextColorFromUSI)(t);n.process.go(t,de(i,o)),n.process.on("info",(t,o)=>ue(e,t,o)),function(e){const t=re(e);t.stats.goCount+=1,t.statsTempData=void 0}(e)}function pe(e,t,o){const n=re(e),i=(0,w.getNextColorFromUSI)(t);n.process.goPonder(t,de(i,o)),n.process.on("info",(t,o)=>ue(e,t,o)),function(e){const t=re(e);t.stats.goPonderCount+=1,t.statsTempData=void 0}(e)}function ge(e,t){const o=re(e);o.process.go(t),o.process.on("info",(t,o)=>ue(e,t,o)),function(e){const t=re(e);t.stats.goInfiniteCount+=1,t.statsTempData=void 0}(e)}function Se(e,t,o){const n=re(e);n.process.goMate(t,o),n.process.on("info",(t,o)=>ue(e,t,o)),function(e){const t=re(e);t.stats.goMateCount+=1,t.statsTempData=void 0}(e)}function ye(e,t){const o=re(e),n=(0,w.getNextColorFromUSI)(o.process.currentPosition);o.process.ponderHit(de(n,t)),function(e){const t=re(e);t.stats.ponderHitCount+=1,t.statsTempData=void 0}(e)}function fe(e,t){const o=re(e);switch(t){case Q.q.WIN:o.process.gameover(Y.WIN);break;case Q.q.LOSE:o.process.gameover(Y.LOSE);break;case Q.q.DRAW:o.process.gameover(Y.DRAW)}!function(e,t){const o=re(e);switch(t){case Q.q.WIN:o.stats.winCount+=1;break;case Q.q.LOSE:o.stats.loseCount+=1;break;case Q.q.DRAW:o.stats.drawCount+=1}}(e,t)}function ve(e){if(!function(e){return ae.has(e)}(e))return;re(e).process.quit()}const Te={updateAppState(){},fetchProcessArgs:async()=>"null",onClosable(){},onClose(){},onSendError(){},onSendMessage(){},onSendNotification(){},onMenuEvent(){},async loadAppSettings(){throw new Error("This feature is not available on command line tool")},saveAppSettings(){throw new Error("This feature is not available on command line tool")},async loadBatchConversionSettings(){throw new Error("This feature is not available on command line tool")},async saveBatchConversionSettings(){throw new Error("This feature is not available on command line tool")},async loadResearchSettings(){throw new Error("This feature is not available on command line tool")},async saveResearchSettings(){throw new Error("This feature is not available on command line tool")},async loadAnalysisSettings(){throw new Error("This feature is not available on command line tool")},async saveAnalysisSettings(){throw new Error("This feature is not available on command line tool")},async loadGameSettings(){throw new Error("This feature is not available on command line tool")},async saveGameSettings(){throw new Error("This feature is not available on command line tool")},async loadCSAGameSettingsHistory(){throw new Error("This feature is not available on command line tool")},async saveCSAGameSettingsHistory(){throw new Error("This feature is not available on command line tool")},async loadMateSearchSettings(){throw new Error("This feature is not available on command line tool")},async saveMateSearchSettings(){throw new Error("This feature is not available on command line tool")},async loadBatchAnalysisSettings(){throw new Error("This feature is not available on command line tool")},async saveBatchAnalysisSettings(){throw new Error("This feature is not available on command line tool")},async loadUSIEngines(){throw new Error("This feature is not available on command line tool")},async saveUSIEngines(){},async loadBookImportSettings(){throw new Error("This feature is not available on command line tool")},async saveBookImportSettings(){throw new Error("This feature is not available on command line tool")},onUpdateAppSettings(){},async showOpenRecordDialog(){throw new Error("This feature is not available on command line tool")},async showSaveRecordDialog(){throw new Error("This feature is not available on command line tool")},async showSaveMergedRecordDialog(){throw new Error("This feature is not available on command line tool")},async openRecord(){throw new Error("This feature is not available on command line tool")},async saveRecord(){throw new Error("This feature is not available on command line tool")},async loadRecordFileHistory(){throw new Error("This feature is not available on command line tool")},addRecordFileHistory(){},async clearRecordFileHistory(){},async loadRecordFileHistoryContents(){throw new Error("This feature is not available on command line tool")},async saveRecordFileBackup(){},async loadRecordFileBackup(){throw new Error("This feature is not available on command line tool")},async loadRemoteTextFile(){throw new Error("This feature is not available on command line tool")},async convertRecordFiles(){throw new Error("This feature is not available on command line tool")},async listRecordFiles(){throw new Error("This feature is not available on command line tool")},async showSelectSFENDialog(){throw new Error("This feature is not available on command line tool")},async loadSFENFile(){throw new Error("This feature is not available on command line tool")},onOpenRecord(){},async showOpenNextMoveCollectionDialog(){throw new Error("This feature is not available on command line tool")},async showSaveNextMoveCollectionDialog(){throw new Error("This feature is not available on command line tool")},async loadNextMoveCollection(){throw new Error("This feature is not available on command line tool")},async saveNextMoveCollection(){throw new Error("This feature is not available on command line tool")},async loadNextMoveGenerationSettings(){throw new Error("This feature is not available on command line tool")},async saveNextMoveGenerationSettings(){throw new Error("This feature is not available on command line tool")},async showOpenBookDialog(){throw new Error("This feature is not available on command line tool")},async showSaveBookDialog(){throw new Error("This feature is not available on command line tool")},async clearBook(){throw new Error("This feature is not available on command line tool")},async openBook(){throw new Error("This feature is not available on command line tool")},async openBookAsNewSession(){throw new Error("This feature is not available on command line tool")},async closeBookSession(){throw new Error("This feature is not available on command line tool")},async saveBook(){throw new Error("This feature is not available on command line tool")},async exportBook(){throw new Error("This feature is not available on command line tool")},async getBookFormat(){throw new Error("This feature is not available on command line tool")},async getBookInfo(){throw new Error("This feature is not available on command line tool")},async searchBookMoves(){throw new Error("This feature is not available on command line tool")},async searchBookEntry(){throw new Error("This feature is not available on command line tool")},async updateBookMove(){throw new Error("This feature is not available on command line tool")},async updateBookPositionComment(){throw new Error("This feature is not available on command line tool")},async removeBookMove(){throw new Error("This feature is not available on command line tool")},async updateBookMoveOrder(){throw new Error("This feature is not available on command line tool")},async importBookMoves(){throw new Error("This feature is not available on command line tool")},async showSelectUSIEngineDialog(){throw new Error("This feature is not available on command line tool")},async getUSIEngineInfo(){throw new Error("This feature is not available on command line tool")},async getEngineIndex(){throw new Error("This feature is not available on command line tool")},async listInstalledEnginePackages(){throw new Error("This feature is not available on command line tool")},async fetchEnginePackageLicenses(){throw new Error("This feature is not available on command line tool")},async installEnginePackage(){throw new Error("This feature is not available on command line tool")},async cancelEnginePackageInstall(){throw new Error("This feature is not available on command line tool")},async uninstallEnginePackage(){throw new Error("This feature is not available on command line tool")},async getUSIEngineMetadata(){throw new Error("This feature is not available on command line tool")},async sendUSIOptionButtonSignal(){},async usiLaunch(e,t){const o=JSON.parse(e),n=JSON.parse(t);return await ce(o,n)},usiReady:async e=>await he(e),async usiSetOption(e,t,o){!function(e,t,o){re(e).process.setOption(t,o)}(e,t,o)},async usiGo(e,t,o){me(e,t,JSON.parse(o))},async usiGoPonder(e,t,o){pe(e,t,JSON.parse(o))},async usiPonderHit(e,t){ye(e,JSON.parse(t))},async usiGoInfinite(e,t){ge(e,t)},async usiGoMate(e,t,o){Se(e,t,o)},async usiStop(e){!function(e){re(e).process.stop()}(e)},async usiGameover(e,t){fe(e,t)},async usiQuit(e){ve(e)},onUSIBestMove(){},onUSICheckmate(){},onUSICheckmateNotImplemented(){},onUSICheckmateTimeout(){},onUSINoMate(){},onUSIInfo(){},onEnginePackageInstallProgress(){},csaLogin:async e=>x(JSON.parse(e)),async csaLogout(e){!function(e){G.get(e)?.logout()}(e)},async csaAgree(e,t){!function(e,t){G.get(e)?.agree(t)}(e,t)},async csaMove(e,t,o,n){!function(e,t,o,n){G.get(e)?.doMove(t,o,n)}(e,t,o,n)},async csaResign(e){!function(e){G.get(e)?.resign()}(e)},async csaWin(e){!function(e){G.get(e)?.win()}(e)},async csaStop(e){!function(e){G.get(e)?.stop()}(e)},onCSAGameSummary(){},onCSAReject(){},onCSAStart(){},onCSAMove(){},onCSAGameResult(){},onCSAClose(){},async collectSessionStates(){throw new Error("This feature is not available on command line tool")},async setupPrompt(){throw new Error("This feature is not available on command line tool")},async openPrompt(){throw new Error("This feature is not available on command line tool")},invokePromptCommand(){throw new Error("This feature is not available on command line tool")},onPromptCommand(){},async showSelectImageDialog(){throw new Error("This feature is not available on command line tool")},async cropPieceImage(){throw new Error("This feature is not available on command line tool")},async exportCaptureAsPNG(){throw new Error("This feature is not available on command line tool")},async exportCaptureAsJPEG(){throw new Error("This feature is not available on command line tool")},async copyCaptureToClipboard(){throw new Error("This feature is not available on command line tool")},async loadLayoutProfileList(){throw new Error("This feature is not available on command line tool")},updateLayoutProfileList(){},onUpdateLayoutProfile(){},createDesktopShortcutForLayoutProfile(){throw new Error("This feature is not available on command line tool")},openLogFile(){},log(e,t){switch(e){case n.$.DEBUG:console.debug(t);break;case n.$.INFO:console.log(t);break;case n.$.WARN:console.warn(t);break;case n.$.ERROR:console.error(t)}},async showSelectFileDialog(){throw new Error("This feature is not available on command line tool")},async showSelectDirectoryDialog(){throw new Error("This feature is not available on command line tool")},openExplorer(){throw new Error("This feature is not available on command line tool")},openParentDirectory(){throw new Error("This feature is not available on command line tool")},openWebBrowser(){throw new Error("This feature is not available on command line tool")},async getMachineSpec(){throw new Error("This feature is not available on command line tool")},isEncryptionAvailable:async()=>!1,async getVersionStatus(){throw new Error("This feature is not available on command line tool")},async checkUpdates(){throw new Error("This feature is not available on command line tool")},getPathForFile(){throw new Error("This feature is not available on command line tool")},onProgress(){}};global.window={...global,electronShogiAPI:Te};const be=require("yaml");var Ce=o.n(be);class Ee{_settings={timeMs:0,byoyomi:0,increment:0};_timeMs=0;_byoyomi=0;_elapsedMs=0;timerHandle=0;timerStart=0;lastTimeMs=0;setup(e){this._settings=e,this._timeMs=e.timeMs||0,this._byoyomi=e.byoyomi||0,this._elapsedMs=0}get settings(){return this._settings}get time(){return Math.ceil(this._timeMs/1e3)}get timeMs(){return this._timeMs}get byoyomi(){return this._byoyomi}get elapsedMs(){return this._elapsedMs}start(){this.clearTimer(),this.timerStart=Date.now(),this.lastTimeMs=this._timeMs,this._byoyomi=this.settings.byoyomi||0,this._elapsedMs=0,this.timerHandle=window.setInterval(()=>{const e=this.timeMs,t=this.byoyomi;this._elapsedMs=Date.now()-this.timerStart;const o=this.lastTimeMs-this._elapsedMs;o>=0?this._timeMs=o:(this._timeMs=0,this._byoyomi=Math.max(Math.ceil((this.settings.byoyomi||0)+o/1e3),0)),0!==this.timeMs||0!==this.byoyomi?this.fireBeep(e,t):this.timeout()},100)}fireBeep(e,t){let o=Math.ceil(this.timeMs/1e3),n=Math.ceil(e/1e3);0!==o&&0!==this.byoyomi||(0!==o||0===n?(0!==this.byoyomi&&(o=this.byoyomi,n=t),o!==n&&(o<=5?this.settings.onBeepUnlimited&&this.settings.onBeepUnlimited():(o<=10||20===o||30===o||60===o)&&this.settings.onBeepShort&&this.settings.onBeepShort())):this.settings.onBeepShort&&this.settings.onBeepShort())}pause(){this.clearTimer()}stop(){this.clearTimer(),this.incrementTime()}timeout(){this.clearTimer(),this.settings.onTimeout?.()}clearTimer(){this.timerHandle&&(window.clearInterval(this.timerHandle),this.timerHandle=0),this.settings.onStopBeep?.()}incrementTime(){this._timeMs+=1e3*(this.settings.increment||0)}}var Ie=o(596),Ae=o(69),Pe=o(937);var we=o(416);function ke(e){const t=/^\*詰み=(先手勝ち|後手勝ち)(?::([0-9]+)手)?/.exec(e);if(t)return Number(t[2]||1e4)*("先手勝ち"===t[1]?1:-1)}function Me(e){const t=/^#詰み=(先手勝ち|後手勝ち)(?::([0-9]+)手)?/.exec(e);if(t)return Number(t[2]||1e4)*("先手勝ち"===t[1]?1:-1)}function Ne(e){const t=/^\*評価値=([+-]?[0-9]+(?:\.[0-9]+)?)/.exec(e);return t?Number(t[1]):void 0}function Re(e){const t=/^#評価値=([+-]?[0-9]+(?:\.[0-9]+)?)/.exec(e);return t?Number(t[1]):void 0}function Oe(e){const t=/^\* *([+-]?[0-9]+(?:\.[0-9]+)?)/.exec(e);return t?Number(t[1]):void 0}function Fe(e){const t=/^\*対局 .* 評価値 ([+-]?[0-9]+)/.exec(e);return t?Number(t[1]):void 0}function De(e){const t=/^\*解析 .* 評価値 ([+-]?[0-9]+)/.exec(e);return t?Number(t[1]):void 0}function Le(e){const t=/^\* .* 評価値 ([+-]?[0-9]+)/.exec(e);return t?Number(t[1]):void 0}function Be(e){const t=/^#(?:形勢|指し手)\[([+-]?[0-9]+)\]/.exec(e);return t?Number(t[1]):void 0}function Ue(e){const t=/^\*深さ=([0-9]+)/.exec(e);return t?Number(t[1]):void 0}function _e(e){const t=/^#深さ=([0-9]+)/.exec(e);return t?Number(t[1]):void 0}function Ge(e){if(!/^\*対局 /.test(e))return;const t=/ 深さ ([0-9]+)/.exec(e);return t?Number(t[1]):void 0}function We(e){if(!/^\*解析 /.test(e))return;const t=/ 深さ ([0-9]+)/.exec(e);return t?Number(t[1]):void 0}function xe(e){let t=`* ${void 0!==e.mate?e.mate>0?3e4:-3e4:void 0!==e.score?e.score:0}`;for(const o of e.pv||[])t+=" "+(0,w.formatCSAMove)(o);return t}function He(e,t){const o=t.indexOf(" ",t.indexOf(" ")+1)+1,n=[],i=e.clone();for(let e=o;e<t.length;e+=8){const o=t.substring(e,e+7),a=(0,w.parseCSAMove)(i,o);if(a instanceof Error||!i.doMove(a,{ignoreValidation:!1}))break;n.push(a)}return n}function $e(e){e.forEach(e=>{e.customData=function(e,t={}){const o={...t},n=e.split("\n");for(const e of n){const t=ke(e);void 0!==t&&(o.playerSearchInfo={...o.playerSearchInfo,mate:t});const n=Me(e);void 0!==n&&(o.researchInfo={...o.researchInfo,mate:n});const i=Ne(e)??Oe(e)??Fe(e);void 0!==i&&(o.playerSearchInfo={...o.playerSearchInfo,score:i});const a=Re(e)??De(e)??Le(e)??Be(e);void 0!==a&&(o.researchInfo={...o.researchInfo,score:a});const s=Ue(e)??Ge(e);void 0!==s&&(o.playerSearchInfo={...o.playerSearchInfo,depth:s});const r=_e(e)??We(e);void 0!==r&&(o.researchInfo={...o.researchInfo,depth:r})}return o}(e.comment,e.customData)})}function Ke(e){return e.timeSeconds+"+"+e.byoyomi+"+"+e.increment}function Ve(e){return function(e){const t=Math.floor(e/60),o=e%60;return String(t).padStart(2,"0")+":"+String(o).padStart(2,"0")}(e.timeSeconds)+"+"+String(e.byoyomi).padStart(2,"0")}class Ye{_record;_recordFilePath;_unsaved=!1;_sourceURL;_positionCounts=new Map;changePositionHandler=null;updateTreeHandler=null;updateCommentHandler=null;updateBookmarkHandler=null;updateCustomDataHandler=null;backupHandler=null;constructor(e=new w.Record){this._record=e,this.resetPositionCounts(),this.bindRecordHandlers(),$e(this._record)}get record(){return this._record}get recordFilePath(){return this._recordFilePath}get unsaved(){return this._unsaved}get sourceURL(){return this._sourceURL}get positionCounts(){return this._positionCounts}updateRecordFilePath(e,t){this._unsaved=!1,e!==this._recordFilePath&&(this._recordFilePath=e,e&&!t&&Pe.Ay.addRecordFileHistory(e))}async saveBackup(){if(!this.unsaved)return;const e=this.onBackup(),t=(0,w.exportKIF)(this.record,e||{});await Pe.Ay.saveRecordFileBackup(t)}saveBackupOnBackground(){this.saveBackup().catch(e=>{Pe.Ay.log(n.$.ERROR,`RecordManager#saveBackupOnBackground: failed to save backup: ${e}`)})}clearRecord(e){this.saveBackupOnBackground(),this._record.clear(e),this._unsaved=!1,this._recordFilePath=void 0,this._sourceURL=void 0,this.onChangePosition(),this.onUpdateTree()}replaceRecord(e,t){this.saveBackupOnBackground(),this._record=e,this.resetPositionCounts(),this.bindRecordHandlers(),this.updateRecordFilePath(t?.path,t?.skipHistory),this._unsaved=!t?.markAsSaved,this._sourceURL=void 0,$e(this._record),this.onChangePosition(),this.onUpdateTree()}reset(){this.clearRecord()}resetByInitialPositionType(e){this.resetBySFEN((0,w.initialPositionTypeToSFEN)(e))}resetBySFEN(e){const t=new w.Position;return!!t.resetBySFEN(e)&&(this.clearRecord(t),!0)}resetByUSEN(e,t,o){const n=w.Record.newByUSEN(e,t,o);if(n instanceof Error)return n;this.replaceRecord(n,{markAsSaved:!0})}resetByPosition(e){this.clearRecord(e),this._unsaved=!0}parseRecordData(e,t){let o;switch(t||(0,w.detectRecordFormat)(e)){case w.RecordFormatType.SFEN:{const t=w.Position.newBySFEN(e);o=t?new w.Record(t):new Error(i.t.failedToParseSFEN);break}case w.RecordFormatType.USI:o=w.Record.newByUSI(e);break;case w.RecordFormatType.KIF:o=(0,w.importKIF)(e);break;case w.RecordFormatType.KI2:o=(0,w.importKI2)(e);break;case w.RecordFormatType.CSA:o=(0,w.importCSA)(e);break;case w.RecordFormatType.JKF:o=(0,w.importJKFString)(e);break;case w.RecordFormatType.USEN:o=w.Record.newByUSEN(e);break;default:o=new Error(i.t.failedToDetectRecordFormat)}return o instanceof Error?(0,i.cB)(o):o}importRecord(e,t){const o=this.parseRecordData(e,t?.type);if(o instanceof Error)return o;switch(t?.mode||"standard"){case"standard":this.replaceRecord(o,t);break;case"mergeIntoRoot":return this.mergeRecord(o);case"mergeIntoCurrent":return this.mergeRecordIntoCurrent(o)}}importRecordFromBuffer(e,t,o){const n=(0,Ae.QT)(t);if(!n)return new Error(`${i.t.unknownFileExtension}: ${t}`);const a=(0,Ae.Nj)(e,n,o);if(a instanceof Error)return(0,i.cB)(a);this.replaceRecord(a,{path:t,markAsSaved:!0,skipHistory:o?.skipHistory})}async importRecordFromRemoteURL(e){const t=!!e;if(!(e=e||this._sourceURL))throw new Error("RecordManager#importRecordFromRemoteURL: source URL is not set");const o=await Pe.Ay.loadRemoteTextFile(e),n=this.parseRecordData(o);if(n instanceof Error)throw n;if(t)return this.replaceRecord(n),void(this._sourceURL=e);const i=this.mergeRecord(n);if(i)throw i}exportRecordAsBuffer(e,t){const o=(0,Ae.QT)(e);if(!o)return new Error(`${i.t.unknownFileExtension}: ${e}`);const n=(0,Ae.KM)(this._record,o,t);return this.updateRecordFilePath(e,t.skipHistory),n}applyPosition(e){this._record.clear(e),this._unsaved=!0,this._recordFilePath=void 0,this.onChangePosition()}swapNextTurn(){const e=this.record.position.clone();e.setColor((0,w.reverseColor)(e.color)),this.applyPosition(e)}changePosition(e){const t=this.record.position.clone();t.edit(e),this.applyPosition(t)}goForward(){this._record.goForward()}goBack(){this._record.goBack()}changePly(e){this._record.goto(e)}changeBranch(e){return this._record.switchBranchByIndex(e)}changeNode(e){return this._record.gotoNode(e)}swapWithNextBranch(){return!!this._record.swapWithNextBranch()&&(this._unsaved=!0,!0)}swapWithPreviousBranch(){return!!this._record.swapWithPreviousBranch()&&(this._unsaved=!0,!0)}resetAllBranchSelection(){this._record.resetAllBranchSelection()}removeCurrentMove(){return!!this._record.removeCurrentMove()&&(this._unsaved=!0,this.onUpdateTree(),!0)}removeNextMove(){return!!this._record.removeNextMove()&&(this._unsaved=!0,this.onUpdateTree(),!0)}jumpToBookmark(e){return this._record.jumpToBookmark(e)}updateComment(e){this._record.current.comment=e,this._unsaved=!0,this.onUpdateComment()}updateBookmark(e){this._record.current.bookmark=e,this._unsaved=!0,this.onUpdateBookmark()}appendComment(e,t){if(!e)return;const o=this._record.current.comment,n=this.record.current.comment?"\n":"";switch(t){case Ie.Q.NONE:break;case Ie.Q.INSERT:this._record.current.comment=e+n+o;break;case Ie.Q.APPEND:this._record.current.comment=o+n+e;break;case Ie.Q.OVERWRITE:this._record.current.comment=e}this._unsaved=!0,this.onUpdateComment()}appendSearchComment(e,t,o,n,i){let a;switch(t){case Ie.F.SHOGIHOME:a=function(e,t,o,n){const i=t===we.K.PLAYER?"*":"#";let a="";o.mate&&(a+=`${i}詰み=${o.mate>=0?"先手勝ち":"後手勝ち"}`,1e4!==Math.abs(o.mate)&&(a+=`:${Math.abs(o.mate)}手`),a+="\n");var s;return void 0!==o.score&&(a+=((s=o.score)>=1500?"先手勝勢":s>=600?"先手優勢":s>=400?"先手有利":s>=200?"先手有望":s>-200?"互角":s>-400?"後手有望":s>-600?"後手有利":s>-1500?"後手優勢":"後手勝勢")+"\n",a+=`${i}評価値=${o.score}\n`),o.pv&&0!==o.pv.length&&(a+=`${i}読み筋=${(0,w.formatPV)(e,o.pv)}\n`),o.depth&&(a+=`${i}深さ=${o.depth}\n`),o.nodes&&(a+=`${i}ノード数=${o.nodes}\n`),a&&n?.engineName&&(a+=`${i}エンジン=${n.engineName}\n`),a}(this.record.position,e,o,i);break;case Ie.F.FLOODGATE:a=xe(o);break;case Ie.F.CSA3:a=function(e){return xe(e)+(void 0!==e.nodes?` #${e.nodes}`:"")}(o);break;case Ie.F.SHOGIGUI:a=function(e,t){let o="*"+(e===we.K.PLAYER?"対局":"解析");if(void 0!==t.depth&&(o+=` 深さ ${t.depth}`),void 0!==t.nodes&&(o+=` ノード数 ${t.nodes}`),void 0!==t.score?o+=` 評価値 ${t.score}`:void 0!==t.mate&&(o+=" 評価値 "+(t.mate>0?3e4:-3e4)),t.pv?.length){o+=" 読み筋";for(const e of t.pv)o+=" "+(e.color===w.Color.BLACK?"▲":"△")+(0,w.formatKIFMove)(e)}return o}(e,o)}i?.header&&(a=i.header+"\n"+a),this.appendComment(a,n),this._unsaved=!0}get inCommentPVs(){return function(e,t){const o=[];for(const n of t.split("\n")){let t;if(/^[#*]読み筋=/.test(n))t=(0,w.parsePV)(e,n.substring(5));else if(/^\*.* 読み筋 /.test(n)){const o=n.substring(n.indexOf(" 読み筋 ")+5),i=e.color===w.Color.BLACK?"▲":"△";t=(0,w.parsePV)(e,o.substring(o.indexOf(i)))}else if(/^#(?:指し手|形勢)\[/.test(n)){const o=n.substring(n.indexOf("]")+1),i=e.color===w.Color.BLACK?"▲":"△";t=(0,w.parsePV)(e,o.substring(o.indexOf(i)))}else/^\* -?[0-9]+ /.test(n)&&(t=He(e,n));t?.length&&o.push(t)}return o}(this.record.position,this.record.current.comment)}setGameStartMetadata(e){e.gameTitle&&this._record.metadata.setStandardMetadata(w.RecordMetadataKey.TITLE,e.gameTitle),e.blackName&&this._record.metadata.setStandardMetadata(w.RecordMetadataKey.BLACK_NAME,e.blackName),e.whiteName&&this._record.metadata.setStandardMetadata(w.RecordMetadataKey.WHITE_NAME,e.whiteName),this._record.metadata.setStandardMetadata(w.RecordMetadataKey.DATE,(0,h.sq)()),this._record.metadata.setStandardMetadata(w.RecordMetadataKey.START_DATETIME,(0,h.ln)());const t=e.blackTimeLimit.increment||e.whiteTimeLimit.increment?Ke:Ve,o=t(e.blackTimeLimit),n=t(e.whiteTimeLimit);o===n?this._record.metadata.setStandardMetadata(w.RecordMetadataKey.TIME_LIMIT,o):(this._record.metadata.setStandardMetadata(w.RecordMetadataKey.BLACK_TIME_LIMIT,o),this._record.metadata.setStandardMetadata(w.RecordMetadataKey.WHITE_TIME_LIMIT,n)),this._unsaved=!0}setGameEndMetadata(){this._record.metadata.setStandardMetadata(w.RecordMetadataKey.END_DATETIME,(0,h.ln)()),this._unsaved=!0}updateSearchInfo(e,t){const o=this.record.current.customData||{};switch(e){case we.K.PLAYER:o.playerSearchInfo=t;break;case we.K.OPPONENT:o.opponentSearchInfo=t;break;case we.K.RESEARCHER:(t.depth||0)>=(o.researchInfo?.depth||0)&&(o.researchInfo=t);break;case we.K.RESEARCHER_2:(t.depth||0)>=(o.researchInfo2?.depth||0)&&(o.researchInfo2=t);break;case we.K.RESEARCHER_3:(t.depth||0)>=(o.researchInfo3?.depth||0)&&(o.researchInfo3=t);break;case we.K.RESEARCHER_4:(t.depth||0)>=(o.researchInfo4?.depth||0)&&(o.researchInfo4=t)}this._record.current.customData=o,this.onUpdateCustomData()}appendMove(e){return!!this._record.append(e.move,e.moveOption)&&(void 0!==e.elapsedMs&&this._record.current.setElapsedMs(e.elapsedMs),this._unsaved=!0,!0)}appendMovesSilently(e,t){this.unbindChangePositionHandler();try{let o=0;const n=this._record.current.ply;for(const n of e){if(!this._record.append(n,t))break;o++}return this._record.goto(n),this._unsaved=!0,this.onUpdateTree(),o}finally{this.bindRecordHandlers()}}mergeRecord(e){if(this._record.initialPosition.sfen!==e.initialPosition.sfen)return new Error(i.t.failedToMergeRecordWithDifferentInitialPosition);this._record.merge(e),this._unsaved=!0,$e(this._record),this.onUpdateTree()}mergeRecordIntoCurrent(e){if(this._record.position.color!==e.initialPosition.color)return new Error(i.t.failedToMergeRecordWithDifferentTurn);const{successCount:t,skipCount:o}=this._record.mergeIntoCurrentPosition(e);return this._unsaved=!0,$e(this._record),this.onUpdateTree(),o>0?new Error(i.t.skippedMovesInMerge(o,t+o)):void 0}updateStandardMetadata(e){this._record.metadata.setStandardMetadata(e.key,e.value),this._unsaved=!0}on(e,t){switch(e){case"changePosition":this.changePositionHandler=t;break;case"updateTree":this.updateTreeHandler=t;break;case"updateComment":this.updateCommentHandler=t;break;case"updateBookmark":this.updateBookmarkHandler=t;break;case"updateCustomData":this.updateCustomDataHandler=t;break;case"backup":this.backupHandler=t}return this}onChangePosition(){this.changePositionHandler&&this.changePositionHandler()}onUpdateTree(){this.updateTreeHandler&&this.updateTreeHandler()}onUpdateComment(){this.updateCommentHandler&&this.updateCommentHandler()}onUpdateBookmark(){this.updateBookmarkHandler&&this.updateBookmarkHandler()}onUpdateCustomData(){this.updateCustomDataHandler&&this.updateCustomDataHandler()}onBackup(){return this.backupHandler?this.backupHandler():null}resetPositionCounts(){this._positionCounts.clear(),this._record.forEach(e=>{this.addPositionCount(e)})}isPositionCountTarget(e){return 0===e.ply||e.move instanceof w.Move}addPositionCount(e){if(!this.isPositionCountTarget(e))return;const t=this._positionCounts.get(e.sfen)||0;this._positionCounts.set(e.sfen,t+1)}reducePositionCount(e){if(!this.isPositionCountTarget(e))return;const t=this._positionCounts.get(e.sfen)||0;t>1?this._positionCounts.set(e.sfen,t-1):this._positionCounts.delete(e.sfen)}bindRecordHandlers(){this._record.on("changePosition",this.onChangePosition.bind(this)),this._record.on("clear",this.resetPositionCounts.bind(this)),this._record.on("addNode",e=>{this.addPositionCount(e)}),this._record.on("removeNode",e=>{this.reducePositionCount(e)})}unbindChangePositionHandler(){this._record.on("changePosition",()=>{})}}var qe=o(557),Je=o(236),je=o(845),ze=o(872),Qe=o(219);const Xe=new class{valueKeys=[];stringRestrictions=new Map;numberKeys=[];numberRestrictions=new Map;flagKeys=[];values=new Map;numbers=new Map;flags=new Map;bareArgs=[];help;constructor(e,t){"string"==typeof t&&(t=[t]),this.help="Usage:\n";for(const o of t||[""])this.help+=` ${e} [options] ${o}\n`;this.help+="\nOptions:\n"}value(e,t,o,n){const i="--"+e;return this.help+=` ${i} VALUE\n`,this.help+=` ${t}\n`,this.help+=` (default: ${o})\n`,this.valueKeys.push(i),n&&this.stringRestrictions.set(i,n),()=>{const e=this.values.get(i);return void 0!==e?e:o}}valueOrNull(e,t,o){const n="--"+e;return this.help+=` ${n} VALUE\n`,this.help+=` ${t}\n`,this.valueKeys.push(n),o&&this.stringRestrictions.set(n,o),()=>{const e=this.values.get(n);return void 0!==e?e:null}}number(e,t,o,n){const i="--"+e;return this.help+=` ${i} VALUE\n`,this.help+=` ${t}\n`,this.help+=` (default: ${o})\n`,this.numberKeys.push(i),n&&this.numberRestrictions.set(i,n),()=>{const e=this.numbers.get(i);return void 0!==e?e:o}}numberOrNull(e,t,o){const n="--"+e;return this.help+=` ${n} VALUE\n`,this.help+=` ${t}\n`,this.numberKeys.push(n),o&&this.numberRestrictions.set(n,o),()=>{const e=this.numbers.get(n);return void 0!==e?e:null}}flag(e,t){const o="--"+e;return this.help+=` ${o}\n`,this.help+=` ${t}\n`,this.flagKeys.push(o),()=>this.flags.get(o)||!1}parse(){let e=0;for(let t=2;t<process.argv.length;t++){const o=process.argv[t];if(t===e)this.bareArgs.push(o);else if(this.valueKeys.includes(o)){const e=process.argv[++t],n=this.stringRestrictions.get(o);n&&(n.includes(e)||this.onError(`${o} option must be one of: ${n.join(", ")}`)),this.values.set(o,e)}else if(this.numberKeys.includes(o)){const e=Number(process.argv[++t]);Number.isNaN(e)&&this.onError(`${o} option must be a number: ${process.argv[t]}`);const n=this.numberRestrictions.get(o);n?.min&&e<n.min&&this.onError(`${o} option must be greater than or equal to ${n.min}`),n?.max&&e>n.max&&this.onError(`${o} option must be less than or equal to ${n.max}`),this.numbers.set(o,e)}else this.flagKeys.includes(o)?this.flags.set(o,!0):"--"===o?e=t+1:"--help"===o?(this.showHelp(),process.exit(0)):o.startsWith("-")?this.onError(`Unknown option: ${o}`):this.bareArgs.push(o)}}get args(){return this.bareArgs}showHelp(){console.log(this.help)}onError(e){console.error(e),process.exit(1)}}("usi-csa-bridge",["path/to/csa_game_config.yaml","path/to/csa_game_config.json","--base64 <base64>"]),Ze=Xe.valueOrNull("base64","Base64 of gzip compressed JSON config."),et=Xe.number("engine-timeout","Maximum time[seconds] of USI engine execution.",180,{min:1}),tt=Xe.valueOrNull("protocol-version","Overwrite server.protocolVersion setting."),ot=Xe.valueOrNull("host","Overwrite server.host setting."),nt=Xe.numberOrNull("port","Overwrite server.port setting.",{min:1024,max:49151}),it=Xe.valueOrNull("id","Overwrite server.id setting."),at=Xe.valueOrNull("password","Overwrite server.password setting."),st=Xe.flag("save-record","Save record file after game end."),rt=Xe.value("record-dir","Directory to save records.","records"),lt=Xe.valueOrNull("record-file-name-template","Overwrite recordFileNameTemplate setting."),ct=Xe.valueOrNull("record-file-format","Overwrite recordFileFormat setting."),ht=Xe.value("return-code","Return code which one of LF or CRLF. It is used for record file.","win32"===process.platform?"CRLF":"LF",["LF","CRLF"]),dt=Xe.flag("csa-v3","Use CSA V3 format for record file."),ut=Xe.numberOrNull("repeat","Overwrite repeat setting.",{min:1}),mt=Xe.flag("app-log-file","Enable application log file."),pt=Xe.flag("usi-log-file","Enable USI log file."),gt=Xe.flag("csa-log-file","Enable CSA log file."),St=Xe.flag("all-log-file","Enable all log files."),yt=Xe.flag("disable-stdout-log","Disable stdout log. Should be used with --XXX-log-file."),ft=Xe.value("log-level",`Log level which one of: ${Object.values(n.$).join(", ")}`,n.$.INFO,[n.$.DEBUG,n.$.INFO,n.$.WARN,n.$.ERROR]),vt=Xe.value("lang",`Language which one of: ${Object.values(i.TM).join(", ")}`,i.TM.JA,[i.TM.JA,i.TM.EN,i.TM.ZH_TW,i.TM.VI]);Xe.parse(),function(e){(0,i.xC)(e.language);const t=e.stdoutLog?["file","stdout"]:["file"],a=e.appLogFile?t:["stdout"],s=e.usiLogFile?t:["stdout"],r=e.csaLogFile?t:["stdout"];E(n.F.APP,a,e.logLevel),E(n.F.USI,s,e.logLevel),E(n.F.CSA,r,e.logLevel),se=0,function(e){W=e}(0),function(e){if(ee)throw new Error("handlers already set");ee=e}({...o(443),onEngineProcessStats:()=>{},sendPromptCommand:()=>{}}),function(e){if(U)throw new Error("handlers already set");U=e}({...o(557),sendPromptCommand:()=>{},sendError:e=>{P().error(e)}}),process.on("uncaughtException",(e,t)=>{P().error(new Error(`${t} ${e}`))})}({appLogFile:mt()||St(),usiLogFile:pt()||St(),csaLogFile:gt()||St(),stdoutLog:!yt(),logLevel:ft(),language:vt()}),async function(){const e=Xe.args[0];let t;const o=Ze();if(o?t=await(0,M.xv)(o):(e||(P().error("config file is not specified."),Xe.showHelp(),process.exit(1)),t=e.endsWith(".json")?JSON.parse(u().readFileSync(e,"utf-8")):Ce().parse(u().readFileSync(e,"utf-8"))),t.server.protocolVersion=tt()||t.server.protocolVersion,t.server.host=ot()||t.server.host,t.server.port=nt()||t.server.port,t.server.id=it()||t.server.id,t.server.password=at()||t.server.password,t.saveRecordFile=st()||t.saveRecordFile,t.repeat=ut()||t.repeat,e&&!await Z(t.usi.path)){const o=s().resolve(s().dirname(e),t.usi.path);await Z(o)||(P().error(`usi engine is not found: ${t.usi.path}`),process.exit(1)),t.usi.path=o}const n=(0,M.$P)(t,{autoSaveDirectory:rt()}),i=(0,M.VX)(n);i&&(P().error(i),process.exit(1));const a=new Ye,r=new Ee,l=new Ee,c=new qe.CSAGameManager(a,r,l),h=(0,Je.c)({timeoutSeconds:et()});c.on("gameNext",function(){P().info("waiting for new game...")}).on("newGame",function(e){P().info(`${(0,ze.IE)(e)} game started.`)}).on("closed",function(){P().info("completed. will exit after some seconds...")}).on("saveRecord",function(e){const o=(0,je.OL)(a.record,{template:lt()||t.recordFileNameTemplate||Qe.g,extension:ct()||t.recordFileFormat||Ae.vr.KIF}),n=s().join(e,o);u().promises.mkdir(e,{recursive:!0}).then(()=>{const e=a.exportRecordAsBuffer(n,{returnCode:d,csa:{v3:dt()}});if(!(e instanceof Error))return u().promises.writeFile(n,e.data);P().error(e)}).then(()=>{P().info("record saved: %s",n)}).catch(e=>{P().error(e)})}).on("loginRetry",function(){P().warn(`Retry login after ${qe.loginRetryIntervalSeconds} seconds...`)}).on("error",function(e){P().error(e)}).login(n,h).catch(function(e){P().error(e),process.exit(1)});const d="CRLF"===ht()?"\r\n":"\n"}(),module.exports={}})();
|
|
2
|
+
(()=>{"use strict";var e={4737(e,t,o){o.d(t,{K:()=>h});var n,i=o(3113),a=o(1143),s=o(5244),r=o(7551),l=o(6292),c=o(699);!function(e){e.IDLE="idle",e.CONNECTING="connecting",e.CONNECTED="connected",e.WAITING_GAME_SUMMARY="waitingGameSummary",e.GAME_SUMMARY="gameSummary",e.GAME_TIME="gameTime",e.GAME_TIME_B="gameTimeB",e.GAME_TIME_W="gameTimeW",e.GAME_POSITION="gamePosition",e.READY="ready",e.WAITING_START="waitingStart",e.WAITING_REJECT="waitingReject",e.PLAYING="playing",e.WAITING_LOGOUT="waitingLogout",e.WAITING_CLOSE="waitingClose",e.CLOSED="closed"}(n||(n={}));class h{_sessionID;_settings;logger;_state=n.IDLE;gameSummaryCallback;rejectCallback;startCallback;moveCallback;gameResultCallback;closeCallback;errorCallback;commandCallback;socket;gameSummary=(0,a.Rr)();playerStates=(0,a.OW)();specialMove=a.kt.UNKNOWN;_lastReceived;_lastSent;_commandHistory={discarded:0,commands:[]};_createdMs=Date.now();_loggedInMs;blankLinePingTimeout=null;constructor(e,t,o){this._sessionID=e,this._settings=t,this.logger=o}get sessionID(){return this._sessionID}get settings(){return this._settings}get state(){return this._state}get lastReceived(){return this._lastReceived}get lastSent(){return this._lastSent}get commandHistory(){return this._commandHistory}get createdMs(){return this._createdMs}get loggedInMs(){return this._loggedInMs}on(e,t){switch(e){case"gameSummary":this.gameSummaryCallback=t;break;case"reject":this.rejectCallback=t;break;case"start":this.startCallback=t;break;case"move":this.moveCallback=t;break;case"gameResult":this.gameResultCallback=t;break;case"close":this.closeCallback=t;break;case"error":this.errorCallback=t;break;case"command":this.commandCallback=t}return this}login(){this.logger.info("sid=%d: connecting to %s:%d",this.sessionID,this.settings.host,this.settings.port),this._state=n.CONNECTING;const e={keepaliveInitialDelay:this.settings.tcpKeepalive.initialDelay,noDelay:!0};this.socket=new r.y(this.settings.host,this.settings.port,{onConnect:this.onConnect.bind(this),onError:this.onConnectionError.bind(this),onFIN:this.onFIN.bind(this),onClose:this.onClose.bind(this),onRead:this.onRead.bind(this)},e)}logout(){if(this.settings.protocolVersion===s._B.V121_FLOODGATE)this.socket&&(this.logger.info("sid=%d: disconnect",this.sessionID),this.socket.end(),this._state=n.WAITING_CLOSE);else this.state!==n.WAITING_GAME_SUMMARY&&this.state!==n.GAME_SUMMARY&&this.state!==n.GAME_TIME&&this.state!==n.GAME_TIME_B&&this.state!==n.GAME_TIME_W&&this.state!==n.GAME_POSITION&&this.state!==n.READY||(this.send("LOGOUT"),this._state=n.WAITING_LOGOUT)}agree(e){this.state===n.READY&&e===this.gameSummary.id&&(this._state=n.WAITING_START,this.send(`AGREE ${this.gameSummary.id}`))}reject(e){this.state===n.READY&&e===this.gameSummary.id&&(this._state=n.WAITING_REJECT,this.send(`REJECT ${this.gameSummary.id}`))}doMove(e,t,o){if(this.state!==n.PLAYING)return;let i=e;void 0!==t&&(i+=`,'* ${Math.round(t)}`,void 0!==o&&(i+=` ${o}`)),this.send(i)}resign(){this.state===n.PLAYING&&this.send("%TORYO")}win(){this.state===n.PLAYING&&this.send("%KACHI")}stop(){this.state===n.PLAYING&&this.send("%CHUDAN")}send(e){this.socket?(this.socket.write(e),this._lastSent=(0,c.Ye)(c.g4.SEND,this.hideSecureValues(e)),this.updateCommendHistory(this._lastSent),this.commandCallback?.(this._lastSent),this.logger.info("sid=%d: > %s",this.sessionID,this.hideSecureValues(e)),this.setBlankLinePing(e)):this.logger.error("sid=%d: failed to send command caused by invalid socket: %s",this.sessionID,e)}hideSecureValues(e){return this.settings.password&&(e=e.replaceAll(this.settings.password,"*****")),e}onConnect(){this.logger.info("sid=%d: connected",this.sessionID),this._state=n.CONNECTED;let e="";this.settings.protocolVersion===s._B.V121_X1&&(e=" x1"),this.send(`LOGIN ${this.settings.id} ${this.settings.password}${e}`)}onConnectionError(e){if(this.state===n.CLOSED)return;this.onError(e),this._state=n.CLOSED,this.closeCallback?.();const t=(0,c.Ye)(c.g4.SYSTEM,"connection error");this.updateCommendHistory(t),this.commandCallback?.(t)}onError(e){this.logger.error("sid=%d: error: %s %s",this.sessionID,e.name,e.message),this.errorCallback?.(e)}onFIN(){this.logger.info("sid=%d: FIN packet received",this.sessionID),this.clearBlankLinePing()}onClose(e){if(this.clearBlankLinePing(),this.state===n.CLOSED)return;switch(this.state){case n.WAITING_GAME_SUMMARY:case n.WAITING_LOGOUT:case n.WAITING_CLOSE:e?this.onError(new Error(l.t.errorOccuredWhileDisconnectingFromCSAServer)):this.logger.info("sid=%d: socket closed",this.sessionID);break;case n.CONNECTING:this.onError(new Error(l.t.failedToConnectToCSAServer));break;default:this.onError(new Error(l.t.disconnectedFromCSAServer))}this._state=n.CLOSED,this.closeCallback?.();const t=(0,c.Ye)(c.g4.SYSTEM,e?"closed (error)":"closed");this.updateCommendHistory(t),this.commandCallback?.(t)}onRead(e){this.setBlankLinePing(),this._lastReceived=(0,c.Ye)(c.g4.RECEIVE,e),this.updateCommendHistory(this._lastReceived),this.commandCallback?.(this._lastReceived),this.logger.info("sid=%d: < %s",this.sessionID,e),""!==e&&(this.state===n.GAME_SUMMARY?this.onGameSummary(e):this.state===n.GAME_TIME?this.onGameTime(e):this.state===n.GAME_TIME_B?this.onGameTime(e,i.Color.BLACK):this.state===n.GAME_TIME_W?this.onGameTime(e,i.Color.WHITE):this.state===n.GAME_POSITION?this.onGamePosition(e):this.state===n.PLAYING?this.onMove(e):/^LOGIN:.* OK$/.test(e)?this.onLoginOK():"LOGIN:incorrect"===e?this.onLoginIncorrect():"LOGOUT:completed"===e?this.onLogout():"BEGIN Game_Summary"===e?this.onBeginGameSummary():e.startsWith("REJECT:")?this.onReject():e.startsWith("START:")?this.onStart():this.logger.warn("sid=%d: unknown command received",this.sessionID))}onLoginOK(){this._loggedInMs=Date.now(),this.logger.info("sid=%d: login ok",this.sessionID),this._state=n.WAITING_GAME_SUMMARY}onLoginIncorrect(){this.onError(new Error(l.t.csaServerLoginDenied)),this.socket&&this.socket.end()}onLogout(){this.logger.info("sid=%d: logout",this.sessionID),this._state=n.WAITING_CLOSE}onBeginGameSummary(){this._state=n.GAME_SUMMARY,this.gameSummary=(0,a.Rr)()}onEndGameSummary(){const e=this.gameSummary.players.black.time,t=this.gameSummary.players.white.time;this.playerStates.black.time=e.totalTime+e.increment,this.playerStates.white.time=t.totalTime+t.increment;const o=(0,i.importCSA)(this.gameSummary.position);if(o instanceof Error)return this.onError(new Error("invalid game position received from CSA server")),void this.logout();for(const e of o.moves){if((0,i.isKnownSpecialMove)(e.move)&&e.move.type===i.SpecialMoveType.START)continue;const t=(0,i.reverseColor)(e.nextColor);this.updateTime(t,e.elapsedMs)}this._state=n.READY,this.gameSummaryCallback?.(this.gameSummary)}onGameSummary(e){switch(e){case"END Game_Summary":return void this.onEndGameSummary();case"BEGIN Time":return void(this._state=n.GAME_TIME);case"BEGIN Time+":return void(this._state=n.GAME_TIME_B);case"BEGIN Time-":return void(this._state=n.GAME_TIME_W);case"BEGIN Position":return void(this._state=n.GAME_POSITION)}const[t,o]=e.split(":",2);switch(t){case"Protocol_Version":case"Protocol_Mode":case"Format":case"Declaration":case"Rematch_On_Draw":case"Max_Moves":break;case"Game_ID":this.gameSummary.id=o;break;case"Name+":this.gameSummary.players.black.playerName=o;break;case"Name-":this.gameSummary.players.white.playerName=o;break;case"Your_Turn":this.gameSummary.myColor="+"===o?i.Color.BLACK:i.Color.WHITE;break;case"To_Move":this.gameSummary.toMove="+"===o?i.Color.BLACK:i.Color.WHITE;break;default:this.logger.warn("sid=%d: unknown command received",this.sessionID)}}onGameTime(e,t){switch(e){case"END Time":case"END Time+":case"END Time-":return void(this._state=n.GAME_SUMMARY)}const o=t?[this.gameSummary.players[t].time]:[this.gameSummary.players.black.time,this.gameSummary.players.white.time],[i,a]=e.split(":",2);switch(i){case"Least_Time_Per_Move":case"Time_Roundup":break;case"Time_Unit":for(const e of o)a.endsWith("msec")?e.timeUnitMs=Number(a.slice(0,-4)):a.endsWith("sec")?e.timeUnitMs=1e3*Number(a.slice(0,-3)):a.endsWith("min")&&(e.timeUnitMs=60*Number(a.slice(0,-3))*1e3);break;case"Total_Time":for(const e of o)e.totalTime=Number(a);break;case"Byoyomi":for(const e of o)e.byoyomi=Number(a);break;case"Delay":for(const e of o)e.delay=Number(a);break;case"Increment":for(const e of o)e.increment=Number(a);break;default:this.logger.warn("sid=%d: unknown command received",this.sessionID)}}onGamePosition(e){"END Position"!==e?this.gameSummary.position+=e+"\n":this._state=n.GAME_SUMMARY}onReject(){this._state=n.WAITING_GAME_SUMMARY,this.rejectCallback?.()}onStart(){this._state=n.PLAYING,this.startCallback?.(this.playerStates)}onMove(e){e.startsWith("+")?this.onMoveWithColor(e,i.Color.BLACK):e.startsWith("-")?this.onMoveWithColor(e,i.Color.WHITE):e.startsWith("#")?this.onEndingCommand(e):e.startsWith("%")||this.logger.warn("sid=%d: unknown move command received",this.sessionID)}onMoveWithColor(e,t){const o=/^.*,T([0-9]+(?:\.[0-9]*)?)$/.exec(e);if(o){const e=Number(o[1]);this.updateTime(t,1e3*e)}else this.logger.error("sid=%d: invalid move format",this.sessionID);this.moveCallback?.(e,this.playerStates)}updateTime(e,t){const o=this.gameSummary.players[e].time,n=t/o.timeUnitMs,i=this.playerStates[e].time-n+o.increment;this.playerStates[e].time=Math.max(i,0)}onEndingCommand(e){switch(e){case"#RESIGN":this.specialMove=a.kt.RESIGN;break;case"#SENNICHITE":this.specialMove=a.kt.SENNICHITE;break;case"#OUTE_SENNICHITE":this.specialMove=a.kt.OUTE_SENNICHITE;break;case"#ILLEGAL_MOVE":this.specialMove=a.kt.ILLEGAL_MOVE;break;case"#ILLEGAL_ACTION":this.specialMove=a.kt.ILLEGAL_ACTION;break;case"#TIME_UP":this.specialMove=a.kt.TIME_UP;break;case"#JISHOGI":this.specialMove=a.kt.JISHOGI;break;case"#MAX_MOVES":this.specialMove=a.kt.MAX_MOVES;break;case"#WIN":this.onGameResult(a.j5.WIN);break;case"#LOSE":this.onGameResult(a.j5.LOSE);break;case"#DRAW":this.onGameResult(a.j5.DRAW);break;case"#CENSORED":this.onGameResult(a.j5.CENSORED);break;case"#CHUDAN":this.onGameResult(a.j5.CHUDAN)}}onGameResult(e){this._state=n.WAITING_GAME_SUMMARY,this.gameResultCallback?.(this.specialMove,e)}invoke(e,t){switch(e){case c.g4.SEND:this.send(t);break;case c.g4.RECEIVE:this.onRead(t)}}setBlankLinePing(e){this.settings.blankLinePing&&(this.clearBlankLinePing(),this.blankLinePingTimeout=setTimeout(()=>{this.send("")},1e3*(""===e?this.settings.blankLinePing.interval:this.settings.blankLinePing.initialDelay)))}clearBlankLinePing(){this.blankLinePingTimeout&&(clearTimeout(this.blankLinePingTimeout),this.blankLinePingTimeout=null)}updateCommendHistory(e){(0,c.np)(this._commandHistory,e,100,10)}}},6156(e,t,o){o.d(t,{KZ:()=>s,LD:()=>g,Re:()=>p,d5:()=>m,ds:()=>y,iD:()=>d,ri:()=>u,sz:()=>h,zB:()=>S});var n=o(9028),i=o(4737);let a;function s(e){if(a)throw new Error("handlers already set");a=e}let r=0;const l=new Map;let c=2e4;function h(e){c=e}function d(e){const t=(r+=1,r),o=new i.K(t,e,(0,n.yC)()).on("gameSummary",e=>a.onCSAGameSummary(t,e)).on("reject",()=>a.onCSAReject(t)).on("start",e=>a.onCSAStart(t,e)).on("move",(e,o)=>a.onCSAMove(t,e,o)).on("gameResult",(e,o)=>a.onCSAGameResult(t,e,o)).on("close",()=>{!function(e){setTimeout(()=>{l.delete(e)},c)}(t),a.onCSAClose(t)}).on("error",a.sendError).on("command",e=>{a.sendPromptCommand(t,e)});return function(e){l.set(e.sessionID,e)}(o),o.login(),t}function u(e){l.get(e)?.logout()}function m(e,t){l.get(e)?.agree(t)}function p(e,t,o,n){l.get(e)?.doMove(t,o,n)}function g(e){l.get(e)?.resign()}function S(e){l.get(e)?.win()}function y(e){l.get(e)?.stop()}},7551(e,t,o){o.d(t,{y:()=>s});var n=o(9427),i=o.n(n),a=o(7558);class s{socket;readline;constructor(e,t,o,n={keepaliveInitialDelay:0,noDelay:!0}){this.socket=i().createConnection({port:t,host:e},o.onConnect).setKeepAlive(!0,1e3*n.keepaliveInitialDelay).setNoDelay(n.noDelay).on("error",o.onError).on("end",o.onFIN).on("close",e=>{this.closeReadline(),o.onClose(e)}),this.readline=(0,a.createInterface)(this.socket),this.readline.on("line",o.onRead)}write(e){this.socket.write(e+"\n")}end(){this.socket.end()}closeReadline(){this.readline&&(this.readline.close(),this.readline=null)}}},1564(e,t,o){o.d(t,{t2:()=>i});var n=o(9971);o(6743);async function i(e){try{return await n.promises.lstat(e),!0}catch{return!1}}},9028(e,t,o){o.d(t,{G$:()=>T,Uk:()=>I,mn:()=>E,yC:()=>A});var n=o(6743),i=o.n(n),a=(o(636),o(983)),s=o.n(a),r=o(8588),l=o(5736),c=o(9145);const h=(0,o(8497).B)("logs");const d=(0,r.ln)().replaceAll(" ","_").replaceAll("/","").replaceAll(":",""),u=i().join(h,`app-${d}.log`),m=i().join(h,`usi-${d}.log`),p=i().join(h,`csa-${d}.log`),g={appenders:{stdout:{type:"stdout"},recording:{type:"recording"}},categories:{default:{appenders:["stdout"],level:"info"}}};function S(e){switch(e){case c.F.APP:return u;case c.F.USI:return m;case c.F.CSA:return p}}const y=(0,l.Nu)()?"recording":"stdout",f={[c.F.APP]:[y],[c.F.USI]:[y],[c.F.CSA]:[y]},v={[c.F.APP]:c.$.INFO,[c.F.USI]:c.$.INFO,[c.F.CSA]:c.$.INFO};function T(e,t,o){f[e]=t.map(t=>"file"===t?e:t),v[e]=o}const b={};function C(e){if(b[e])return b[e];g.appenders[e]||(g.appenders[e]={type:"file",filename:S(e)},g.categories[e]={appenders:f[e],level:v[e]});const t=s().configure(g).getLogger(e);return b[e]=t,t}function E(){return C(c.F.APP)}function I(){return C(c.F.USI)}function A(){return C(c.F.CSA)}},5736(e,t,o){o.d(t,{$u:()=>i,Nu:()=>n});o(9971),o(1258),o(6743);function n(){return!1}function i(){return process.env.PORTABLE_EXECUTABLE_DIR}},8497(e,t,o){o.d(t,{B:()=>a});var n=o(6743),i=o.n(n);function a(e){switch(e){case"logs":return i().join(process.cwd(),"logs");case"exe":return process.argv[1];default:return process.cwd()}}},4507(e,t,o){function n(){return{runCount:0,totalUptimeMs:0,gameCount:0,totalReadyTimeMs:0,winCount:0,loseCount:0,drawCount:0,goCount:0,goPonderCount:0,ponderHitCount:0,goInfiniteCount:0,goMateCount:0,totalGoTimeMs:0,totalMateTimeMs:0,totalNodeCount:0,maxNPS:0,npsSampleCount:0,meanNPS:0,maxDepth:0,maxDepthTimeMs:0,maxSelDepth:0,depth20Count:0,depth20TotalTimeMs:0,depth30Count:0,depth30TotalTimeMs:0,depth40Count:0,depth40TotalTimeMs:0,depth50Count:0,depth50TotalTimeMs:0,maxHashUsagePercent:0,hashUsageSampleCount:0,meanHashUsagePercent:0,hashUsageOver50PercentCount:0,hashUsageOver70PercentCount:0,hashUsageOver90PercentCount:0}}o.d(t,{dL:()=>n})},2808(e,t,o){o(9971),o(6743),o(2413),o(4262),o(6829),o(6616),o(9028),o(3115)},4894(e,t,o){o.d(t,{aW:()=>d,qh:()=>n});var n,i,a=o(4262),s=o(191),r=o(4839),l=o(699);function c(e){switch(e){case"+":case"+0":case"0":return 1e4;case"-":case"-0":return-1e4;default:return Number(e)}}function h(e){return e?`btime ${e.btime} wtime ${e.wtime} `+(0!==e.binc||0!==e.winc?`binc ${e.binc} winc ${e.winc}`:`byoyomi ${e.byoyomi}`):"infinite"}!function(e){e.WIN="win",e.LOSE="lose",e.DRAW="draw"}(n||(n={})),function(e){e.WaitingForUSIOK="waitingForUSIOK",e.NotReady="notReady",e.WaitingForReadyOK="waitingForReadyOK",e.Ready="ready",e.WaitingForBestMove="waitingForBestMove",e.Ponder="ponder",e.WaitingForPonderBestMove="waitingForPonderBestMove",e.WaitingForCheckmate="waitingForCheckmate",e.WillQuit="willQuit",e.QuitCompleted="quitCompleted"}(i||(i={}));class d{_path;sessionID;logger;option;process=null;_name="NO NAME";_author="";_engineOptions={};_state=i.WaitingForUSIOK;_currentPosition="";invalidBestMoveCount=0;reservedSetOptionCommands=[];reservedGoCommand;launchTimeout;quitTimeout;_lastReceived;_lastSent;_commandHistory={discarded:0,commands:[]};readyStartTimeMs=0;goTimeMs=0;timeoutCallback;errorCallback;closeCallback;usiOkCallback;readyCallback;bestMoveCallback;goEndCallback;checkmateCallback;checkmateNotImplementedCallback;checkmateTimeoutCallback;checkmateEndCallback;noMateCallback;infoCallback;commandCallback;constructor(e,t,o,n){this._path=e,this.sessionID=t,this.logger=o,this.option=n}get path(){return this._path}get name(){return this._name}get author(){return this._author}get engineOptions(){return this._engineOptions}get state(){return this._state}get currentPosition(){return this._currentPosition}get lastReceived(){return this._lastReceived}get lastSent(){return this._lastSent}get commandHistory(){return this._commandHistory}get pid(){return this.process?.pid}on(e,t){switch(e){case"timeout":this.timeoutCallback=t;break;case"error":this.errorCallback=t;break;case"close":this.closeCallback=t;break;case"usiok":this.usiOkCallback=t;break;case"ready":this.readyCallback=t;break;case"bestmove":this.bestMoveCallback=t;break;case"goEnd":this.goEndCallback=t;break;case"checkmate":this.checkmateCallback=t;break;case"checkmateNotImplemented":this.checkmateNotImplementedCallback=t;break;case"checkmateTimeout":this.checkmateTimeoutCallback=t;break;case"checkmateEnd":this.checkmateEndCallback=t;break;case"noMate":this.noMateCallback=t;break;case"info":this.infoCallback=t;break;case"command":this.commandCallback=t}return this}launch(){this.logger.info("sid=%d: launch: %s",this.sessionID,this.path),this.setLaunchTimeout(),this.process=(0,r.Y)(this.path)?new r.s(this.path):new s.U(this.path),this.process.on("error",this.onError.bind(this)),this.process.on("close",this.onClose.bind(this)),this.process.on("receive",this.onReceive.bind(this)),this.send("usi")}quit(){if(this.state!==i.WillQuit){switch(this.state){case i.WaitingForBestMove:case i.WaitingForPonderBestMove:if(this.goEndCallback){const e=Date.now()-this.goTimeMs;this.goEndCallback(e)}break;case i.WaitingForCheckmate:if(this.checkmateEndCallback){const e=Date.now()-this.goTimeMs;this.checkmateEndCallback(e)}}this._state=i.WillQuit,this.clearLaunchTimeout(),this.logger.info("sid=%d: quit USI engine",this.sessionID),this.setQuitTimeout(),this.send("quit")}}setOption(e,t){this.state===i.WaitingForBestMove||this.state===i.WaitingForPonderBestMove||this.state===i.WaitingForCheckmate?this.reservedSetOptionCommands.push({name:e,value:t}):this.setOptionImmediately(e,t)}setOptionImmediately(e,t){void 0!==t?this.send(`setoption name ${e} value ${t}`):this.send(`setoption name ${e}`)}flushReservedSetOptionCommands(){for(const e of this.reservedSetOptionCommands)this.setOptionImmediately(e.name,e.value);this.reservedSetOptionCommands=[]}ready(){if(this.state!==i.WaitingForReadyOK){if(this.state!==i.Ready&&this.state!==i.WaitingForBestMove&&this.state!==i.Ponder&&this.state!==i.WaitingForPonderBestMove&&this.state!==i.WaitingForCheckmate||this.gameover(n.DRAW),this.state!==i.NotReady)return this.logger.warn("sid=%d: ready: unexpected state: %s",this.sessionID,this.state),new Error("unexpected state");this.send("isready"),this._state=i.WaitingForReadyOK,this.readyStartTimeMs=Date.now()}}go(e,t){switch(this.reservedGoCommand={position:e,timeState:t},this.state){case i.Ready:this.sendReservedGoCommands();break;case i.WaitingForBestMove:case i.Ponder:case i.WaitingForCheckmate:this.stop()}}goPonder(e,t){this.state===i.Ready||this.state===i.WaitingForBestMove?(this.reservedGoCommand={position:e,timeState:this.option.enableEarlyPonder?void 0:t,ponder:!0},this.state===i.Ready&&this.sendReservedGoCommands()):this.logger.warn("sid=%d: goPonder: unexpected state: %s",this.sessionID,this.state)}goMate(e,t){this.state===i.Ready?(this.reservedGoCommand={position:e,mate:!0,mateLimit:t?1e3*t:void 0},this.sendReservedGoCommands()):this.logger.warn("sid=%d: goMate: unexpected state: %s",this.sessionID,this.state)}ponderHit(e){this.state===i.Ponder?(this.option.enableEarlyPonder?this.send("ponderhit "+h(e)):this.send("ponderhit"),this._state=i.WaitingForBestMove):this.logger.warn("sid=%d: ponderHit: unexpected state: %s",this.sessionID,this.state)}stop(){this.state===i.WaitingForBestMove||this.state===i.Ponder||this.state===i.WaitingForCheckmate?"stop"!==this.lastSent?.command&&(this.send("stop"),this.state===i.Ponder&&(this._state=i.WaitingForPonderBestMove)):this.logger.warn("sid=%d: stop: unexpected state: %s",this.sessionID,this.state)}gameover(e){switch(this.state){case i.WaitingForUSIOK:case i.NotReady:case i.WaitingForReadyOK:case i.WillQuit:return void this.logger.warn("sid=%d: gameover: unexpected state: %s",this.sessionID,this.state);case i.WaitingForBestMove:case i.Ponder:this.stop(),this.invalidBestMoveCount++;break;case i.WaitingForPonderBestMove:this.invalidBestMoveCount++;break;case i.WaitingForCheckmate:this.stop();case i.Ready:}this.send("gameover "+e),this._state=i.NotReady,this.reservedGoCommand=void 0}setLaunchTimeout(){this.launchTimeout=setTimeout(()=>{this.timeoutCallback?.(),this.quit()},this.option.timeout||1e4)}clearLaunchTimeout(){this.launchTimeout&&(clearTimeout(this.launchTimeout),this.launchTimeout=void 0)}setQuitTimeout(){this.quitTimeout=setTimeout(()=>{this.process&&(this.process.kill(),this.process=null)},5e3)}clearQuitTimeout(){this.quitTimeout&&(clearTimeout(this.quitTimeout),this.quitTimeout=void 0)}onError(e){this.errorCallback?.(e),this.quit()}onClose(e,t){this.logger.info("sid=%d: engine process closed: close=%s signal=%s",this.sessionID,e,t),this.state!==i.WillQuit&&this.errorCallback?.(new Error("closed unexpectedly")),this._state=i.QuitCompleted,this.clearLaunchTimeout(),this.clearQuitTimeout(),this.process=null,this.closeCallback?.();const o=(0,l.Ye)(l.g4.SYSTEM,`closed: close=${e} signal=${t}`);this.updateCommendHistory(o),this.commandCallback?.(o)}sendReservedGoCommands(){if(!this.reservedGoCommand)return;this.send(this.reservedGoCommand.position);let e="",t="";if(this.reservedGoCommand.ponder)e="ponder",t=(o=this.reservedGoCommand.timeState)?h(o):"";else if(this.reservedGoCommand.mate){e="mate";const o=this.reservedGoCommand.mateLimit;t=o?Math.floor(o).toFixed(0):"infinite"}else t=h(this.reservedGoCommand.timeState);var o;this.send("go"+(e?" "+e:"")+(t?" "+t:"")),this._currentPosition=this.reservedGoCommand.position,this._state=this.reservedGoCommand.ponder?i.Ponder:this.reservedGoCommand.mate?i.WaitingForCheckmate:i.WaitingForBestMove,this.reservedGoCommand=void 0,this.goTimeMs=Date.now()}send(e){this.process&&(this.process.send(e),this._lastSent=(0,l.Ye)(l.g4.SEND,e),this.updateCommendHistory(this._lastSent),this.commandCallback?.(this._lastSent),this.logger.info("sid=%d: > %s",this.sessionID,e))}onReceive(e){if(this._lastReceived=(0,l.Ye)(l.g4.RECEIVE,e),this.updateCommendHistory(this._lastReceived),this.commandCallback?.(this._lastReceived),this.logger.info("sid=%d: < %s",this.sessionID,e),this.state!==i.WillQuit)if(e.startsWith("id name "))this.onIDName(e.substring(8));else if(e.startsWith("id author "))this.onIDAuthor(e.substring(10));else if(e.startsWith("option "))this.onOption(e.substring(7));else if("usiok"===e)this.onUSIOk();else if("readyok"===e)this.onReadyOk();else if(e.startsWith("bestmove "))this.onBestMove(e.substring(9));else if(e.startsWith("checkmate "))this.onCheckmate(e.substring(10));else if(e.startsWith("info ")&&!this.option.discardUSIInfo&&this.infoCallback){const t=e.substring(5);this.infoCallback?.(this.currentPosition,function(e){const t={},o=e.split(" ");for(let n=0;n<e.length;n+=1)switch(o[n]){case"depth":t.depth=Number(o[n+1]),n+=1;break;case"seldepth":t.seldepth=Number(o[n+1]),n+=1;break;case"time":t.timeMs=Number(o[n+1]),n+=1;break;case"nodes":t.nodes=Number(o[n+1]),n+=1;break;case"pv":t.pv=o.slice(n+1),n=o.length;break;case"multipv":t.multipv=Number(o[n+1]),n+=1;break;case"score":switch(o[n+1]){case"cp":t.scoreCP=Number(o[n+2]),n+=2;break;case"mate":t.scoreMate=c(o[n+2]),n+=2}break;case"lowerbound":t.lowerbound=!0;break;case"upperbound":t.upperbound=!0;break;case"currmove":t.currmove=o[n+1],n+=1;break;case"hashfull":t.hashfullPerMill=Number(o[n+1]),n+=1;break;case"nps":t.nps=Number(o[n+1]),n+=1;break;case"string":t.string=o.slice(n+1).join(" "),n=o.length}return t}(t))}}onIDName(e){this._name=e}onIDAuthor(e){this._author=e}onOption(e){const t=e.split(" ");if(t.length<4||"name"!==t[0]||"type"!==t[2])return void this.logger.error("sid=%d: invalid option command",this.sessionID);const o=t[1],n=t[3],i=100+Object.keys(this._engineOptions).length,a="combo"===n?{name:o,type:n,order:i,vars:[]}:{name:o,type:n,order:i};if("button"!==a.type)for(let e=4;e+1<t.length;e+=2)switch(t[e]){case"default":a.default="spin"===a.type?Number(t[e+1]):t[e+1];break;case"min":"spin"===a.type&&(a.min=Number(t[e+1]));break;case"max":"spin"===a.type&&(a.max=Number(t[e+1]));break;case"var":"combo"===a.type&&a.vars.push(t[e+1])}this._engineOptions[a.name]=a}onUSIOk(){this.state===i.WaitingForUSIOK?(this.engineOptions[a.If]||(this._engineOptions[a.If]={name:a.If,type:"spin",order:1,default:32}),this.engineOptions[a.YZ]||(this._engineOptions[a.YZ]={name:a.YZ,type:"check",order:2,default:"true"}),this.option.engineOptions&&this.option.engineOptions.forEach(e=>{const t=(0,a.J3)(e);void 0!==t&&this.setOption(e.name,t)}),this.clearLaunchTimeout(),this._state=i.NotReady,this.usiOkCallback?.()):this.logger.warn("sid=%d: onUSIOk: unexpected state: %s",this.sessionID,this.state)}onReadyOk(){if(this.state!==i.WaitingForReadyOK)return void this.logger.warn("sid=%d: onReadyOk: unexpected state: %s",this.sessionID,this.state);this._state=i.Ready;const e=Date.now()-this.readyStartTimeMs;this.readyCallback?.(e),this.send("usinewgame"),this.sendReservedGoCommands()}onBestMove(e){if(this.flushReservedSetOptionCommands(),this.invalidBestMoveCount>0)return this.invalidBestMoveCount--,void this.logger.warn("sid=%d: onBestMove: ignore bestmove: %s",this.sessionID,e);const t=Date.now()-this.goTimeMs;if(this.state!==i.WaitingForBestMove&&this.state!==i.WaitingForPonderBestMove)return this.logger.warn("sid=%d: onBestMove: unexpected state: %s",this.sessionID,this.state),void this.goEndCallback?.(t);if(this.bestMoveCallback&&this.state===i.WaitingForBestMove){const t=e.split(" "),o=t[0],n=t.length>=3&&"ponder"===t[1]&&t[2]||void 0;this.bestMoveCallback(this.currentPosition,o,n)}this._state=i.Ready,this._currentPosition="",this.sendReservedGoCommands(),this.goEndCallback?.(t)}onCheckmate(e){this.flushReservedSetOptionCommands();const t=Date.now()-this.goTimeMs;return this.state!==i.WaitingForCheckmate?(this.logger.warn("sid=%d: onCheckmate: unexpected state: %s",this.sessionID,this.state),void this.checkmateEndCallback?.(t)):(this._state=i.Ready,"notimplemented"===e.trim()?(this.checkmateNotImplementedCallback?.(),void this.checkmateEndCallback?.(t)):"timeout"===e.trim()?(this.checkmateTimeoutCallback?.(this.currentPosition),void this.checkmateEndCallback?.(t)):"nomate"===e.trim()?(this.noMateCallback?.(this.currentPosition),void this.checkmateEndCallback?.(t)):(this.checkmateCallback?.(this.currentPosition,e.trim().split(" ")),void this.checkmateEndCallback?.(t)))}invoke(e,t){switch(e){case l.g4.SEND:this.send(t);break;case l.g4.RECEIVE:this.onReceive(t)}}updateCommendHistory(e){(0,l.np)(this._commandHistory,e,100,10)}}},6230(e,t,o){o.d(t,{Cp:()=>N,D:()=>b,Ff:()=>k,Gc:()=>C,JF:()=>P,KZ:()=>d,LB:()=>O,WB:()=>M,ds:()=>R,go:()=>w,o2:()=>F,qN:()=>E,sz:()=>f});o(4262);var n=o(4894),i=(o(117),o(4685)),a=o(6292),s=o(3115),r=(o(2808),o(1564),o(9028)),l=o(3113),c=o(4507);let h;function d(e){if(h)throw new Error("handlers already set");h=e}function u(e){return new Error(a.t.noResponseFromEnginePleaseExtendTimeout(e))}function m(e,t){return t?new Error(`${e}: ${a.t.lastReceived}=[${t}]`):new Error(e)}let p=0;function g(){return p+=1,p}const S=new Map;let y=2e4;function f(e){y=e}function v(e){const t=S.get(e);if(!t)throw new Error("No engine session: SessionID="+e);return t}function T(e){const t=v(e);if(t.stats.totalNodeCount+=t.statsTempData?.nodes??0,t.statsTempData?.nps&&(t.stats.npsSampleCount+=1,t.stats.meanNPS=(t.stats.meanNPS*(t.stats.npsSampleCount-1)+t.statsTempData.nps)/t.stats.npsSampleCount),t.statsTempData?.hashfullPerMill){const e=t.statsTempData.hashfullPerMill/10;t.stats.hashUsageSampleCount+=1,t.stats.meanHashUsagePercent=(t.stats.meanHashUsagePercent*(t.stats.hashUsageSampleCount-1)+e)/t.stats.hashUsageSampleCount,e>=50&&(t.stats.hashUsageOver50PercentCount+=1),e>=70&&(t.stats.hashUsageOver70PercentCount+=1),e>=90&&(t.stats.hashUsageOver90PercentCount+=1)}}function b(e,t){const o=g(),i=t?.timeoutSeconds||10,a=new n.aW((0,s.O)(e.path),o,(0,r.Uk)(),{timeout:1e3*i,engineOptions:Object.values(e.options),enableEarlyPonder:e.enableEarlyPonder,discardUSIInfo:t?.discardUSIInfo}),l=function(e,t){return{process:e,engine:t,createdMs:Date.now(),stats:(0,c.dL)()}}(a,e);return S.set(o,l),new Promise((t,n)=>{a.on("close",()=>{!function(e){const t=v(e),o=Date.now();t.stats.totalUptimeMs+=o-t.createdMs}(o),h?.onEngineProcessStats(o,e.uri,l.stats,l.createdMs),setTimeout(()=>{S.delete(o)},y)}).on("error",e=>{const t=a.lastReceived?.command;n(m(e.message,t))}).on("timeout",()=>n(u(i))).on("bestmove",(e,t,n)=>{h?.onUSIBestMove(o,e,t,n)}).on("checkmate",(e,t)=>{h?.onUSICheckmate(o,e,t)}).on("checkmateNotImplemented",()=>{h?.onUSICheckmateNotImplemented(o)}).on("checkmateTimeout",e=>{h?.onUSICheckmateTimeout(o,e)}).on("noMate",e=>{h?.onUSINoMate(o,e)}).on("goEnd",e=>{!function(e,t){v(e).stats.totalGoTimeMs+=t,T(e)}(o,e)}).on("checkmateEnd",e=>{!function(e,t){v(e).stats.totalMateTimeMs+=t,T(e)}(o,e)}).on("usiok",()=>{t(o),function(e){v(e).stats.runCount+=1}(o)}).on("command",e=>{h?.sendPromptCommand(o,e)}),a.launch()})}function C(e){const t=v(e).process;return new Promise((o,n)=>{t.on("ready",t=>{o(),function(e,t){const o=v(e);o.stats.gameCount+=1,o.stats.totalReadyTimeMs+=t}(e,t)}).on("error",e=>{const o=t.lastReceived?.command;n(m(e.message,o))});const i=t.ready();if(i){const e=t.lastReceived?.command;n(m(i.message,e))}})}function E(e,t,o){v(e).process.setOption(t,o)}function I(e,t){const o=t.black,n=t.white,i=t[e].byoyomi;return{btime:o.timeMs-1e3*o.increment,wtime:n.timeMs-1e3*n.increment,byoyomi:1e3*i,binc:0===i?1e3*o.increment:0,winc:0===i?1e3*n.increment:0}}function A(e,t,o){h?.onUSIInfo(e,t,o),function(e,t){const o=v(e);o.stats.maxNPS=Math.max(o.stats.maxNPS,t.nps??0),t.depth&&(!o.stats.maxDepth||o.stats.maxDepth<t.depth)&&(o.stats.maxDepth=t.depth,o.stats.maxDepthTimeMs=t.timeMs??0,o.stats.maxSelDepth=t.seldepth??t.depth),t.depth&&((o.statsTempData?.depth??0)<20&&t.depth>=20&&(o.stats.depth20Count+=1,o.stats.depth20TotalTimeMs+=t.timeMs??0),(o.statsTempData?.depth??0)<30&&t.depth>=30&&(o.stats.depth30Count+=1,o.stats.depth30TotalTimeMs+=t.timeMs??0),(o.statsTempData?.depth??0)<40&&t.depth>=40&&(o.stats.depth40Count+=1,o.stats.depth40TotalTimeMs+=t.timeMs??0),(o.statsTempData?.depth??0)<50&&t.depth>=50&&(o.stats.depth50Count+=1,o.stats.depth50TotalTimeMs+=t.timeMs??0)),o.stats.maxHashUsagePercent=Math.max(o.stats.maxHashUsagePercent,(t.hashfullPerMill??0)/10),o.statsTempData={nodes:t.nodes??o.statsTempData?.nodes,nps:t.nps??o.statsTempData?.nps,depth:Math.max(t.depth||0,o.statsTempData?.depth||0),hashfullPerMill:t.hashfullPerMill??o.statsTempData?.hashfullPerMill}}(e,o)}function w(e,t,o){const n=v(e),i=(0,l.getNextColorFromUSI)(t);n.process.go(t,I(i,o)),n.process.on("info",(t,o)=>A(e,t,o)),function(e){const t=v(e);t.stats.goCount+=1,t.statsTempData=void 0}(e)}function P(e,t,o){const n=v(e),i=(0,l.getNextColorFromUSI)(t);n.process.goPonder(t,I(i,o)),n.process.on("info",(t,o)=>A(e,t,o)),function(e){const t=v(e);t.stats.goPonderCount+=1,t.statsTempData=void 0}(e)}function k(e,t){const o=v(e);o.process.go(t),o.process.on("info",(t,o)=>A(e,t,o)),function(e){const t=v(e);t.stats.goInfiniteCount+=1,t.statsTempData=void 0}(e)}function M(e,t,o){const n=v(e);n.process.goMate(t,o),n.process.on("info",(t,o)=>A(e,t,o)),function(e){const t=v(e);t.stats.goMateCount+=1,t.statsTempData=void 0}(e)}function N(e,t){const o=v(e),n=(0,l.getNextColorFromUSI)(o.process.currentPosition);o.process.ponderHit(I(n,t)),function(e){const t=v(e);t.stats.ponderHitCount+=1,t.statsTempData=void 0}(e)}function R(e){v(e).process.stop()}function O(e,t){const o=v(e);switch(t){case i.q.WIN:o.process.gameover(n.qh.WIN);break;case i.q.LOSE:o.process.gameover(n.qh.LOSE);break;case i.q.DRAW:o.process.gameover(n.qh.DRAW)}!function(e,t){const o=v(e);switch(t){case i.q.WIN:o.stats.winCount+=1;break;case i.q.LOSE:o.stats.loseCount+=1;break;case i.q.DRAW:o.stats.drawCount+=1}}(e,t)}function F(e){if(!function(e){return S.has(e)}(e))return;v(e).process.quit()}},3115(e,t,o){o.d(t,{O:()=>s});var n=o(6743),i=o.n(n),a=o(5736);function s(e){const t=(0,a.$u)();return t?i().resolve(t,e):e}},191(e,t,o){o.d(t,{U:()=>l});var n=o(636),i=o(7558),a=o(6743),s=o.n(a);const r="win32"===process.platform;class l{handle;readline=null;constructor(e){const t={cwd:s().dirname(e)};r&&(e.endsWith(".bat")||e.endsWith(".cmd"))?this.handle=(0,n.spawn)("cmd.exe",["/c",e],t):this.handle=(0,n.spawn)(e,t),this.handle.on("close",this.onClose.bind(this))}get pid(){return this.handle.pid}on(e,t){switch(e){case"receive":null===this.readline&&(this.readline=(0,i.createInterface)(this.handle.stdout)),this.readline.on("line",t);break;case"close":this.handle.on("close",(e,o)=>{this.onClose(),t(e,o)});break;default:this.handle.on(e,t)}return this}send(e){this.handle.stdin.write(e+"\n")}kill(){this.onClose(),this.handle.kill()}onClose(){null!==this.readline&&this.readline.close()}}},4839(e,t,o){o.d(t,{Y:()=>i,s:()=>a});var n=o(6829);function i(e){return(0,n.TB)(e)}class a{constructor(){throw new Error("WebAssembly engines are not supported on command line tool")}get pid(){}on(){return this}send(){}kill(){}}},8409(e,t,o){o.d(t,{Y:()=>n});class n{valueKeys=[];stringRestrictions=new Map;numberKeys=[];numberRestrictions=new Map;flagKeys=[];values=new Map;numbers=new Map;flags=new Map;bareArgs=[];help;constructor(e,t){"string"==typeof t&&(t=[t]),this.help="Usage:\n";for(const o of t||[""])this.help+=` ${e} [options] ${o}\n`;this.help+="\nOptions:\n"}value(e,t,o,n){const i="--"+e;return this.help+=` ${i} VALUE\n`,this.help+=` ${t}\n`,this.help+=` (default: ${o})\n`,this.valueKeys.push(i),n&&this.stringRestrictions.set(i,n),()=>{const e=this.values.get(i);return void 0!==e?e:o}}valueOrNull(e,t,o){const n="--"+e;return this.help+=` ${n} VALUE\n`,this.help+=` ${t}\n`,this.valueKeys.push(n),o&&this.stringRestrictions.set(n,o),()=>{const e=this.values.get(n);return void 0!==e?e:null}}number(e,t,o,n){const i="--"+e;return this.help+=` ${i} VALUE\n`,this.help+=` ${t}\n`,this.help+=` (default: ${o})\n`,this.numberKeys.push(i),n&&this.numberRestrictions.set(i,n),()=>{const e=this.numbers.get(i);return void 0!==e?e:o}}numberOrNull(e,t,o){const n="--"+e;return this.help+=` ${n} VALUE\n`,this.help+=` ${t}\n`,this.numberKeys.push(n),o&&this.numberRestrictions.set(n,o),()=>{const e=this.numbers.get(n);return void 0!==e?e:null}}flag(e,t){const o="--"+e;return this.help+=` ${o}\n`,this.help+=` ${t}\n`,this.flagKeys.push(o),()=>this.flags.get(o)||!1}parse(){let e=0;for(let t=2;t<process.argv.length;t++){const o=process.argv[t];if(t===e)this.bareArgs.push(o);else if(this.valueKeys.includes(o)){const e=process.argv[++t],n=this.stringRestrictions.get(o);n&&(n.includes(e)||this.onError(`${o} option must be one of: ${n.join(", ")}`)),this.values.set(o,e)}else if(this.numberKeys.includes(o)){const e=Number(process.argv[++t]);Number.isNaN(e)&&this.onError(`${o} option must be a number: ${process.argv[t]}`);const n=this.numberRestrictions.get(o);n?.min&&e<n.min&&this.onError(`${o} option must be greater than or equal to ${n.min}`),n?.max&&e>n.max&&this.onError(`${o} option must be less than or equal to ${n.max}`),this.numbers.set(o,e)}else this.flagKeys.includes(o)?this.flags.set(o,!0):"--"===o?e=t+1:"--help"===o?(this.showHelp(),process.exit(0)):o.startsWith("-")?this.onError(`Unknown option: ${o}`):this.bareArgs.push(o)}}get args(){return this.bareArgs}showHelp(){console.log(this.help)}onError(e){console.error(e),process.exit(1)}}},3168(e,t,o){o.d(t,["m",0,[]])},9536(e,t,o){o.d(t,{u:()=>c});var n=o(9028),i=o(6156),a=o(6230),s=o(9145),r=o(6292);const l={updateAppState(){},fetchProcessArgs:async()=>"null",onClosable(){},onClose(){},onSendError(){},onSendMessage(){},onSendNotification(){},onMenuEvent(){},async loadAppSettings(){throw new Error("This feature is not available on command line tool")},saveAppSettings(){throw new Error("This feature is not available on command line tool")},async loadBatchConversionSettings(){throw new Error("This feature is not available on command line tool")},async saveBatchConversionSettings(){throw new Error("This feature is not available on command line tool")},async loadResearchSettings(){throw new Error("This feature is not available on command line tool")},async saveResearchSettings(){throw new Error("This feature is not available on command line tool")},async loadAnalysisSettings(){throw new Error("This feature is not available on command line tool")},async saveAnalysisSettings(){throw new Error("This feature is not available on command line tool")},async loadGameSettings(){throw new Error("This feature is not available on command line tool")},async saveGameSettings(){throw new Error("This feature is not available on command line tool")},async loadCSAGameSettingsHistory(){throw new Error("This feature is not available on command line tool")},async saveCSAGameSettingsHistory(){throw new Error("This feature is not available on command line tool")},async loadMateSearchSettings(){throw new Error("This feature is not available on command line tool")},async saveMateSearchSettings(){throw new Error("This feature is not available on command line tool")},async loadBatchAnalysisSettings(){throw new Error("This feature is not available on command line tool")},async saveBatchAnalysisSettings(){throw new Error("This feature is not available on command line tool")},async loadUSIEngines(){throw new Error("This feature is not available on command line tool")},async saveUSIEngines(){},async loadBookImportSettings(){throw new Error("This feature is not available on command line tool")},async saveBookImportSettings(){throw new Error("This feature is not available on command line tool")},onUpdateAppSettings(){},async showOpenRecordDialog(){throw new Error("This feature is not available on command line tool")},async showSaveRecordDialog(){throw new Error("This feature is not available on command line tool")},async showSaveMergedRecordDialog(){throw new Error("This feature is not available on command line tool")},async openRecord(){throw new Error("This feature is not available on command line tool")},async saveRecord(){throw new Error("This feature is not available on command line tool")},async loadRecordFileHistory(){throw new Error("This feature is not available on command line tool")},addRecordFileHistory(){},async clearRecordFileHistory(){},async loadRecordFileHistoryContents(){throw new Error("This feature is not available on command line tool")},async saveRecordFileBackup(){},async loadRecordFileBackup(){throw new Error("This feature is not available on command line tool")},async loadRemoteTextFile(){throw new Error("This feature is not available on command line tool")},async convertRecordFiles(){throw new Error("This feature is not available on command line tool")},async listRecordFiles(){throw new Error("This feature is not available on command line tool")},async showSelectSFENDialog(){throw new Error("This feature is not available on command line tool")},async loadSFENFile(){throw new Error("This feature is not available on command line tool")},onOpenRecord(){},async showOpenNextMoveCollectionDialog(){throw new Error("This feature is not available on command line tool")},async showSaveNextMoveCollectionDialog(){throw new Error("This feature is not available on command line tool")},async loadNextMoveCollection(){throw new Error("This feature is not available on command line tool")},async saveNextMoveCollection(){throw new Error("This feature is not available on command line tool")},async loadNextMoveGenerationSettings(){throw new Error("This feature is not available on command line tool")},async saveNextMoveGenerationSettings(){throw new Error("This feature is not available on command line tool")},async showOpenBookDialog(){throw new Error("This feature is not available on command line tool")},async showSaveBookDialog(){throw new Error("This feature is not available on command line tool")},async clearBook(){throw new Error("This feature is not available on command line tool")},async openBook(){throw new Error("This feature is not available on command line tool")},async openBookAsNewSession(){throw new Error("This feature is not available on command line tool")},async closeBookSession(){throw new Error("This feature is not available on command line tool")},async saveBook(){throw new Error("This feature is not available on command line tool")},async exportBook(){throw new Error("This feature is not available on command line tool")},async getBookFormat(){throw new Error("This feature is not available on command line tool")},async getBookInfo(){throw new Error("This feature is not available on command line tool")},async searchBookMoves(){throw new Error("This feature is not available on command line tool")},async searchBookEntry(){throw new Error("This feature is not available on command line tool")},async updateBookMove(){throw new Error("This feature is not available on command line tool")},async updateBookPositionComment(){throw new Error("This feature is not available on command line tool")},async removeBookMove(){throw new Error("This feature is not available on command line tool")},async updateBookMoveOrder(){throw new Error("This feature is not available on command line tool")},async importBookMoves(){throw new Error("This feature is not available on command line tool")},async showSelectUSIEngineDialog(){throw new Error("This feature is not available on command line tool")},async getUSIEngineInfo(){throw new Error("This feature is not available on command line tool")},async getEngineIndex(){throw new Error("This feature is not available on command line tool")},async listInstalledEnginePackages(){throw new Error("This feature is not available on command line tool")},async fetchEnginePackageLicenses(){throw new Error("This feature is not available on command line tool")},async installEnginePackage(){throw new Error("This feature is not available on command line tool")},async cancelEnginePackageInstall(){throw new Error("This feature is not available on command line tool")},async uninstallEnginePackage(){throw new Error("This feature is not available on command line tool")},async getUSIEngineMetadata(){throw new Error("This feature is not available on command line tool")},async sendUSIOptionButtonSignal(){},async usiLaunch(e,t){const o=JSON.parse(e),n=JSON.parse(t);return await(0,a.D)(o,n)},usiReady:async e=>await(0,a.Gc)(e),async usiSetOption(e,t,o){(0,a.qN)(e,t,o)},async usiGo(e,t,o){(0,a.go)(e,t,JSON.parse(o))},async usiGoPonder(e,t,o){(0,a.JF)(e,t,JSON.parse(o))},async usiPonderHit(e,t){(0,a.Cp)(e,JSON.parse(t))},async usiGoInfinite(e,t){(0,a.Ff)(e,t)},async usiGoMate(e,t,o){(0,a.WB)(e,t,o)},async usiStop(e){(0,a.ds)(e)},async usiGameover(e,t){(0,a.LB)(e,t)},async usiQuit(e){(0,a.o2)(e)},onUSIBestMove(){},onUSICheckmate(){},onUSICheckmateNotImplemented(){},onUSICheckmateTimeout(){},onUSINoMate(){},onUSIInfo(){},onEnginePackageInstallProgress(){},csaLogin:async e=>(0,i.iD)(JSON.parse(e)),async csaLogout(e){(0,i.ri)(e)},async csaAgree(e,t){(0,i.d5)(e,t)},async csaMove(e,t,o,n){(0,i.Re)(e,t,o,n)},async csaResign(e){(0,i.LD)(e)},async csaWin(e){(0,i.zB)(e)},async csaStop(e){(0,i.ds)(e)},onCSAGameSummary(){},onCSAReject(){},onCSAStart(){},onCSAMove(){},onCSAGameResult(){},onCSAClose(){},async collectSessionStates(){throw new Error("This feature is not available on command line tool")},async setupPrompt(){throw new Error("This feature is not available on command line tool")},async openPrompt(){throw new Error("This feature is not available on command line tool")},invokePromptCommand(){throw new Error("This feature is not available on command line tool")},onPromptCommand(){},async showSelectImageDialog(){throw new Error("This feature is not available on command line tool")},async cropPieceImage(){throw new Error("This feature is not available on command line tool")},async exportCaptureAsPNG(){throw new Error("This feature is not available on command line tool")},async exportCaptureAsJPEG(){throw new Error("This feature is not available on command line tool")},async copyCaptureToClipboard(){throw new Error("This feature is not available on command line tool")},async loadLayoutProfileList(){throw new Error("This feature is not available on command line tool")},updateLayoutProfileList(){},onUpdateLayoutProfile(){},createDesktopShortcutForLayoutProfile(){throw new Error("This feature is not available on command line tool")},openLogFile(){},log(e,t){switch(e){case s.$.DEBUG:console.debug(t);break;case s.$.INFO:console.log(t);break;case s.$.WARN:console.warn(t);break;case s.$.ERROR:console.error(t)}},async showSelectFileDialog(){throw new Error("This feature is not available on command line tool")},async showSelectDirectoryDialog(){throw new Error("This feature is not available on command line tool")},openExplorer(){throw new Error("This feature is not available on command line tool")},openParentDirectory(){throw new Error("This feature is not available on command line tool")},openWebBrowser(){throw new Error("This feature is not available on command line tool")},async getMachineSpec(){throw new Error("This feature is not available on command line tool")},isEncryptionAvailable:async()=>!1,async getVersionStatus(){throw new Error("This feature is not available on command line tool")},async checkUpdates(){throw new Error("This feature is not available on command line tool")},getPathForFile(){throw new Error("This feature is not available on command line tool")},onProgress(){}};function c(e){(0,r.xC)(e.language);const t=e.stdoutLog?["file","stdout"]:["file"],l=e.appLogFile?t:["stdout"],c=e.usiLogFile?t:["stdout"],h=e.csaLogFile?t:["stdout"];(0,n.G$)(s.F.APP,l,e.logLevel),(0,n.G$)(s.F.USI,c,e.logLevel),(0,n.G$)(s.F.CSA,h,e.logLevel),(0,a.sz)(0),(0,i.sz)(0);const d=o(9939);(0,a.KZ)({...d,onEngineProcessStats:()=>{},sendPromptCommand:()=>{}});const u=o(557);(0,i.KZ)({...u,sendPromptCommand:()=>{},sendError:e=>{(0,n.mn)().error(e)}}),process.on("uncaughtException",(e,t)=>{(0,n.mn)().error(new Error(`${t} ${e}`))})}global.window={...global,electronShogiAPI:l}},699(e,t,o){o.d(t,{Ye:()=>a,g4:()=>n,np:()=>s});var n,i=o(8588);function a(e,t){const o=new Date;return{type:e,command:t,dateTime:(0,i.ng)(o),timeMs:o.getTime()}}function s(e,t,o,n){Array.isArray(t)||(t=[t]);for(const o of t)e.commands.push(o);if(e.commands.length>o){const t=Math.max(n,e.commands.length-o);e.discarded+=t,e.commands.splice(0,t)}}!function(e){e.SEND="send",e.RECEIVE="receive",e.SYSTEM="system"}(n||(n={}))},2048(e,t,o){function n(){return{version:"-",arch:"-",cpuTotalTime:0,cpuIdleTime:0,memoryTotal:0,memoryFree:0}}o.d(t,{o:()=>n})},8250(e,t,o){var n;function i(){return{entries:[]}}o.d(t,{e:()=>i}),function(e){e.USER="user",e.BACKUP="backup",e.BACKUP_V2="backupV2"}(n||(n={}))},9219(e,t,o){o.d(t,{D:()=>n});function n(e){return e.replaceAll(/[<>:"/\\|?*]/g,"_")}o.d(t,["g",0,"{datetime}{_title}{_sente}{_gote}"])},8193(e,t,o){o.d(t,{KM:()=>c,Nj:()=>l,QT:()=>s,vr:()=>n});var n,i=o(4579),a=o(3113);function s(e){const t=e.toLowerCase();for(const e of Object.values(n))if(t.endsWith(e))return e}function r(e){switch(e){default:return"UTF8";case n.KIF:case n.KI2:return"SJIS"}}function l(e,t,o){const s=function(e,t,o){return(0,i.g7)(e,{encoding:r(t),autoDetect:o?.autoDetect})}(e,t,o);switch(t){case n.KIF:case n.KIFU:return(0,a.importKIF)(s);case n.KI2:case n.KI2U:return(0,a.importKI2)(s);case n.CSA:return(0,a.importCSA)(s);case n.SFEN:return new Error(".sfen file import is not supported");case n.JKF:return(0,a.importJKFString)(s)}}function c(e,t,o){const s=!o.useUTF8ForKifAndKi2||t!==n.KIF&&t!==n.KI2?r(t):"UTF8";let l;switch(t){case n.KIF:case n.KIFU:l=(0,a.exportKIF)(e,o);break;case n.KI2:case n.KI2U:l=(0,a.exportKI2)(e,o);break;case n.CSA:l=(0,a.exportCSA)(e,{...o,v3:o.csa?.v3?{milliseconds:!0}:void 0});break;case n.SFEN:throw new Error(".sfen file export is not supported");case n.JKF:l=(0,a.exportJKFString)(e)}const c=(0,i.wx)(l,s);let h=!1;if("SJIS"===s&&o.detectGarbled){(0,i.g7)(c,{encoding:"SJIS"})!==l&&(h=!0)}return{data:c,garbled:h}}!function(e){e.KIF=".kif",e.KIFU=".kifu",e.KI2=".ki2",e.KI2U=".ki2u",e.CSA=".csa",e.SFEN=".sfen",e.JKF=".jkf"}(n||(n={}))},1143(e,t,o){o.d(t,{OW:()=>r,Rr:()=>s,j5:()=>i,kt:()=>n});var n,i,a=o(3113);function s(){return{id:"",myColor:a.Color.BLACK,toMove:a.Color.BLACK,position:"",players:{black:{time:{timeUnitMs:1e3,totalTime:0,byoyomi:0,delay:0,increment:0}},white:{time:{timeUnitMs:1e3,totalTime:0,byoyomi:0,delay:0,increment:0}}}}}function r(){return{black:{time:0},white:{time:0}}}!function(e){e.UNKNOWN="unknown",e.RESIGN="resign",e.SENNICHITE="sennichite",e.OUTE_SENNICHITE="oute_sennichite",e.ILLEGAL_MOVE="illegal_move",e.ILLEGAL_ACTION="illegal_action",e.TIME_UP="time_up",e.JISHOGI="jishogi",e.MAX_MOVES="max_moves"}(n||(n={})),function(e){e.WIN="win",e.LOSE="lose",e.DRAW="draw",e.CENSORED="censored",e.CHUDAN="chudan"}(i||(i={}))},4685(e,t,o){var n;o.d(t,{q:()=>n}),function(e){e.WIN="win",e.LOSE="lose",e.DRAW="draw"}(n||(n={}))},9481(e,t,o){o.d(t,{X:()=>n});function n(e,t){const o=[],n=e.clone();for(const e of t){const t=n.createMoveByUSI(e);if(!t||!n.doMove(t))break;o.push(t)}return o}},8588(e,t,o){function n(e=new Date){return e.toLocaleDateString("ja-JP",{year:"numeric",month:"2-digit",day:"2-digit"})}function i(e=new Date){return e.toLocaleTimeString("ja-JP",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function a(e=new Date){return i(e)+"."+String(e.getTime()%1e3).padStart(3,"0")}o.d(t,{ln:()=>i,ng:()=>a,sq:()=>n})},4579(e,t,o){o.d(t,{g7:()=>l,wx:()=>r});var n=o(6953),i=o.n(n);const[a,s]=[i().convert,i().detect];function r(e,t){return"ASCII"===t||"UTF8"===t?(new TextEncoder).encode(e):new Uint8Array(a(e,{type:"arraybuffer",from:"UNICODE",to:t}))}function l(e,t){const o=t?.autoDetect?function(e,t){return s(e)||t||"UTF8"}(e,t.encoding):t?.encoding;return"ASCII"===o||"UTF8"===o?(new TextDecoder).decode(e):a(e,{type:"string",from:o,to:"UNICODE"})}},7047(e,t,o){o.d(t,{RJ:()=>n});function n(e,t){const o=e.map(e=>{const o=t(e);return Number.isFinite(o)&&o>0?o:0}),n=o.reduce((e,t)=>e+t,0);if(n<=0)return e[0];let i=Math.random()*n;for(let t=0;t<e.length;t++)if(i-=o[t],i<0)return e[t];return e[e.length-1]}},5516(e,t,o){o.d(t,{Z:()=>a,v:()=>i});var n=o(3113);function i(e){const t=e.getStandardMetadata(n.RecordMetadataKey.START_DATETIME)||e.getStandardMetadata(n.RecordMetadataKey.DATE);if(t)return t.trim().replaceAll(" ","_").replaceAll("/","").replaceAll(":","")}function a(e){return e.getStandardMetadata(n.RecordMetadataKey.TITLE)||e.getStandardMetadata(n.RecordMetadataKey.TOURNAMENT)||e.getStandardMetadata(n.RecordMetadataKey.OPUS_NAME)||e.getStandardMetadata(n.RecordMetadataKey.OPUS_NO)||e.getStandardMetadata(n.RecordMetadataKey.PLACE)||e.getStandardMetadata(n.RecordMetadataKey.POSTED_ON)||e.getStandardMetadata(n.RecordMetadataKey.AUTHOR)}},6014(e,t,o){function n(e){return"/"===e||"\\"===e||/^[A-Za-z]:[\\/]{1}$/.test(e)?e:e.endsWith("\\")||e.endsWith("/")?e.slice(0,-1):e}o.d(t,{w:()=>n})},3872(e,t,o){function n(e){switch(e%100){case 11:case 12:case 13:return e+"th"}switch(e%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd";default:return e+"th"}}o.d(t,{IE:()=>n})},9600(e,t,o){function n(e){const t=Math.floor(e/60),o=e%60;return String(t).padStart(2,"0")+":"+String(o).padStart(2,"0")}o.d(t,{T:()=>n})},3517(e,t,o){o.d(t,{c:()=>a});var n=o(3113),i=o(4636);function a(e){return e instanceof n.InvalidPieceNameError?new Error(`${i.t.invalidPieceName}: ${e.data}`):e instanceof n.InvalidTurnError?new Error(`${i.t.invalidTurn}: ${e.data}`):e instanceof n.InvalidMoveError?new Error(`${i.t.invalidMove}: ${e.data}`):e instanceof n.InvalidMoveNumberError?new Error(`${i.t.invalidMoveNumber}: ${e.data}`):e instanceof n.InvalidDestinationError?new Error(`${i.t.invalidDestination}: ${e.data}`):e instanceof n.PieceNotExistsError?new Error(`${i.t.pieceNotExists}: ${e.data}`):e instanceof n.InvalidLineError?new Error(`${i.t.invalidLine}: ${e.data}`):e instanceof n.InvalidBoardError?new Error(`${i.t.invalidBoard}: ${e.data}`):e instanceof n.InvalidHandPieceError?new Error(`${i.t.invalidHandPiece}: ${e.data}`):e instanceof n.InvalidUSIError?new Error(`${i.t.invalidUSI}: ${e.data}`):e}},6292(e,t,o){o.d(t,{TM:()=>a.TM,cB:()=>s.c,t:()=>n.t,xC:()=>r});var n=o(4636),i=o(4987),a=o(6087),s=o(3517);o(2071);function r(e){n.x(e),i.x(e)}},6087(e,t,o){var n;o.d(t,{TM:()=>n}),function(e){e.JA="ja",e.EN="en",e.ZH_TW="zh_tw",e.VI="vi"}(n||(n={}));n.JA,n.EN,n.ZH_TW,n.VI},4453(e,t,o){var n=o(3872);const i={shogiHome:"ShogiHome",clear:"Clear",open:"Open",openNewInstance:"Open New ShogiHome Instance",saveOverwrite:"Overwrite",newRecord:"New Record",newRecordKeepInitialPosition:"New Record (Keep Initial Position)",newRecordHirateSetup:"New Record (Hirate Setup)",openRecord:"Open Record",saveRecord:"Save Record",saveRecordAs:"Save Record As",openAutoSaveDirectory:"Open Auto-Save Directory",exportPositionDiagram:"Export Position Diagram",positionImage:"Position Image",batchConversion:"Batch Conversion",recordFileBatchConversion:"Record File Batch Conversion",close:"Close",quit:"Quit",reload:"Reload",editing:"Edit",copyAsKIF:"Copy (KIF)",copyAsKI2:"Copy (KI2)",copyAsCSA:"Copy (CSA)",copyAsUSI:"Copy (USI)",copyAsSFEN:"Copy (SFEN)",copyAsBOD:"Copy (BOD)",copyAsJKF:"Copy (JKF)",copyAsUSEN:"Copy (USEN)",copy:"Copy",cut:"Cut",paste:"Paste",copyRecordAll:"Copy Record (All)",copyRecordFromCurrentPosition:"Copy Record (From Current Position)",asKIF:"As KIF",asKI2:"As KI2",asCSA:"As CSA",asUSI:"As USI",asUSIUntilCurrentMove:"As USI (Until Current Move)",asUSIAll:"As USI (All)",asJSONKifuFormat:"As JSON Kifu",asUSEN:"As USEN",copyPosition:"Copy Position",asSFEN:"SFEN",asBOD:"BOD",pasteRecordOrPosition:"Paste Record/Position",pasteRecordMerge:"Paste Record (Merge)",toRootPosition:"to Root Position",toCurrentPosition:"to Current Position",addSpecialMove:"Add Special Move",deleteMoves:"Delete Moves from Current Position",view:"View",openLayoutManager:"Open Layout Manager",openMonitorWindow:"Open Monitor Window",toggleFullScreen:"Toggle Full Screen",defaultFontSize:"Default Font Size",increaseFontSize:"Increase Font Size",decreaseFontSize:"Decrease Font Size",settings:"Settings",information:"Info",config:"Config",debug:"Debug",toggleDevTools:"Toggle DevTools",logFile:"Log File",openAppLog:"Open App Log",openUSILog:"Open USI Log",openCSALog:"Open CSA Log",tailAppLog:"Tail App Log",tailUSILog:"Tail USI Log",tailCSALog:"Tail CSA Log",copyAppLogTailCommand:"Copy App Log Tail Command",copyUSILogTailCommand:"Copy USI Log Tail Command",copyCSALogTailCommand:"Copy CSA Log Tail Command",reloadCustomPieceImage:"Reload Custom Piece Image",statisticsReport:"Statistics Report",nextMoveProblemCollection:"Next Move",createNextMoveProblemCollection:"Create Next Move Problems",createProblemCollection:"Create Collection",openProblemCollection:"Open Collection",nextMoveGenerationCompleted:"Next move problem generation completed.",noProblemsWereGeneratedAndFileWasNotCreated:"No positions were adopted, so the collection file was not created.",doYouWantToSaveNProblems:e=>`Do you want to save ${e} problems?`,doYouWantToStartQuiz:"Do you want to start the quiz?",doYouWantToResumeFromWhereYouLeftOff:"Do you want to resume from where you left off?",nextMoveGenerationRequiresAnalyzedRecord:"This feature extracts blunder candidates from analysis comments, then launches an engine to find multiple candidate moves. Please run the analysis feature beforehand to prepare record files with analysis comments.",files:"Files",blunderCandidates:"Blunder Candidates",adoptedProblems:"Adopted Problems",researchedPositions:"Researched Positions",recordDirectory:"Record Directory",winRateDropThreshold:"Win Rate Drop",minWinRate:"Minimum Position Eval",adoptionWinRateDiff:"Adoption Judgment Win Rate Diff",acceptableWinRateDiff:"Correct Answer Range Win Rate Diff",maxProblems:"Max Problems",outputFile:"Output File",problemNofM:(e,t)=>`Problem ${e} / ${t}`,findTheNextMove:"Find the next move!",showChoices:"Show choices",correct:"Correct",incorrect:"Incorrect",correctRate:"Accuracy",actualGameMove:"Actual Game Move",thisMoveWasPlayedInTheGame:"This move was played in the actual game.",doYouWantToTryAgain:"Do you want to try again?",showAnswer:"Show Answer",nextProblem:"Next Problem",previousProblem:"Previous Problem",inOrder:"In Order",sourceRecord:"Source Record",launchUSIEngine:"Launch USI Engine",connectToCSAServer:"Connect to CSA Server",adminMode:"Admin Mode",inAdminModeManuallyInvokeCommandsAtPrompt:"In admin mode, manually invoke commands at the prompt.",setoptionAndPrecedingCommandsAreSentAutomatically:"'setoption' and preceding commands are sent automatically.",serverMustSupportShogiServerX1ModeLogIn:"Server must support shogi-server's x1 mode login.",folders:"Folders",notification:"Notification",notificationTest:"Test Notification",thisIsTestNotification:"This is a test notification.",app:"App",log:"Log",cache:"Cache",downloadedEngines:"Downloaded Engines",help:"Help",openWebsite:"Open Website",openUserGuide:"Open User Guide",openLatestReleasePage:"Open Latest Release Page",openStableReleasePage:"Open Stable Release Page",checkForUpdates:"Check for Updates",license:"License",inputs:"Inputs",outputs:"Outputs",format:"Format",formats:"Formats",subdirectories:"Subdirectories",separate:"Separate",merge:"Merge",createSubdirectories:"Create Subdirectories",nameConflictAction:"Name Conflict Action",numberSuffix:"Number Suffix",skip:"Skip",convert:"Convert",openLogFile:"Open Log File",success:"Success",failed:"Failed",skipped:"Skipped",game:"Game",player:"Player",server:"Server",selectFromHistory:"Select from History",noHistory:"Empty",saveHistory:"Save History",version:"Version",gameProgress:"Game Progress",allGamesCompleted:"All Games Completed",wins:"Wins",winsOnBlack:"Wins(Black)",winsOnWhite:"Wins(White)",draws:"Draws",validGames:"Valid Games",invalidGames:"Invalid Games",eloRatingDiff:"Elo Rating Diff",ignoreDraws:"Ignore Draws",zValue:"Z Value",significance5pc:"5% Significance",significance1pc:"1% Significance",gameEnded:"Game Ended",offlineGame:"Offline Game",csaOnlineGame:"CSA Online Game",csaProtocolOnlineGame:"Online Game (CSA Protocol)",csaProtocolV121:"CSA Protocol 1.2.1 Standard",csaProtocolV121WithPVComments:"CSA Protocol 1.2.1 with PV Comments",host:"Host",portNumber:"Port",password:"Password",revealPassword:"Reveal Password",keepaliveInitialDelay:"Keepalive Initial Delay",blankLinePing:"Blank Line Ping",blankLinePingInitialDelay:"Blank Line Ping Initial Delay",blankLinePingInterval:"Blank Line Ping Interval",logout:"Logout",calculateJishogiPoints:"Calculate Jishogi Points",jishogiPoints:"Jishogi Points",displayGameResults:"Display Game Results",interrupt:"Interrupt",stopGame:"Stop Game",resign:"Resign",draw:"Draw",impass:"Impass",repetitionDraw:"Repetition Draw",repetition:"Repetition",mate:"Mate",noMate:"No Mate",blackWin:"Black Win",whiteWin:"White Win",all:"All",others:"Others",minRate:"Min Rate",mateSearch:"Mate Search",downloaded:"Downloaded",startMateSearch:"Start Mate Search",stopMateSearch:"Stop Mate Search",noMateFound:"No mate.",timePerPosition:"Time per Position",timeout:"Timeout",foulWin:"Foul Win",foulLose:"Foul Lose",enteringOfKing:"Entering of King",winByDefault:"Win by Default",loseByDefault:"Lose by Default",winByDeclaration:"Win by Declaration",declareWin:"Declare Win",research:"Research",startResearch:"Start Research",endResearch:"End Research",startEndResearch:"Start/End Research",recordAnalysis:"Record Analysis",analysis:"Analyze",analyze:"Analyze",stopAnalysis:"Stop Analysis",batchAnalysis:"Batch Analysis",currentRecord:"Current Record",skipAnalyzed:"Skip analyzed",analyzedRecordFilesWillBeOverwritten:"Analyzed record files will be overwritten. Please make a copy of important data in advance.",analysisCompleted:"Analysis completed.",noRecordFileFound:"No record file found.",searchDuplicatePositions:"Search Duplicate Positions",duplicatePositionSearch:"Duplicate Position Search",duplicatePositions:"Duplicate Positions",duplicatePos:"Duplicate",via:"Via",lastMove:"Last Move",nextMoves:"Next Moves",goToThisPosition:"Go to This Position",noDuplicatePositions:"No Duplicate Positions",nDuplicatePositionsFound:e=>`${e} Duplicate Positions Found`,appearanceCount:"Appearance Count",showList:"Show List",setupPosition:"Setup Position",changeTurn:"Change Turn",initializePosition:"Initialize Position",changePieceSet:"Change Piece Set",setAllPiecesToStandardCounts:"Set All Pieces to Standard Counts",setAllPiecesToZero:"Set All Pieces to Zero",addToBlackHandPieceStand:"Add to Black's Piece Stand",addToWhiteHandPieceStand:"Add to White's Piece Stand",addToBoard:"Add to Board",undo:"Undo",redo:"Redo",appSettings:"Preferences",language:"Languages",theme:"Theme",standard:"Standard",green:"Green",cherryBlossom:"Cherry Blossom",selectColor:"Select Color",customImage:"Custom Image",autumn:"Autumn",snow:"Snow",classic:"Classic",beige:"Beige",darkGreen:"Dark Green",dark:"Dark",boardLayout:"Board Layout",compact:"Compact",portrait:"Portrait",portraitSquare:"Portrait (Square Cells)",piece:"Piece",singleKanjiPiece:"Single Kanji",singleKanjiWoodPiece:"Single Kanji (Wood)",singleKanjiGothicPiece:"Single Kanji (Gothic)",singleKanjiDarkPiece:"Single Kanji (Dark)",singleKanjiGothicDarkPiece:"Single Kanji (Gothic, Dark)",twoKanjiPiece:"Two Kanji",imageHasMarginsRemoveForLargerDisplay:"Image has margins (remove for larger display)",backgroundImage:"Background Image",board:"Board",pieceStand:"Piece Stand",woodTexture:"Wood Texture",lightWoodyTexture:e=>`Light Wood Texture (${e})`,warmWoodTexture:e=>`Warm Wood Texture (${e})`,resin:"Resin",transparent:"Transparent",boardOpacity:"Board Opacity",pieceStandOpacity:"Piece Stand Opacity",recordOpacity:"Record Opacity",handPieceOrder:"Hand Piece Order",rookGoldKnightToLeft:"Rook, Gold, and Knight on the Left",rookGoldKnightToRight:"Rook, Gold, and Knight on the Right",promotionSelector:"Promotion Selector",centeredHorizontal:"Centered Horizontal",promoteFirstVertical:"Promote First Vertical",promoteFirstHorizontal:"Promote First Horizontal",enableDragAndDrop:"Drag & Drop",highlightMovableSquares:"Highlight Movable Squares",showFileAndRank:"Show File & Rank",showLeftControls:"Show Left Controls",showRightControls:"Show Right Controls",tabViewStyle:"Tab View Style",oneColumn:"1 Column",twoColumns:"2 Columns",sounds:"Sounds",pieceSoundVolume:"Piece Sound Volume",clockSoundVolume:"Clock Sound Volume",clockSoundPitch:"Clock Sound Pitch",clockSoundTarget:"Clock Sound Target",anyTurn:"Any",onlyHumanTurn:"Human",defaultRecordFileFormat:"Default Record Format",textEncoding:"Text Encoding",strict:"Strict",autoDetect:"Auto Detect",newlineCharacter:"Newline Character",old90sMac:"90's Mac",autoSaving:"Auto-Save",recordFileName:"Record File Name",select:"Select",shuffle:"Shuffle",csaV3Output:"CSA V3 Output",alwaysOutputUTF8:"Always Output UTF-8",someOldShogiAppsCannotReadUTF8KifFiles:"Some older Shogi applications may not be able to read KIF/KI2 files encoded in UTF-8.",strictDecodingMayFailToReadUTF8KifFiles:"When text encoding is set to Strict, loading KIF/KI2 files written in UTF-8 may fail.",positionOfUSIOutput:"Position of USI Output",movesOfUSIOutput:"Moves of USI Output",onlySFEN:"Only SFEN",minimal:"Minimal",pasteDialog:"Paste Dialog",liveDuplicatePositionDetection:"Live Duplicate Position Detection",onTheFlyThreshold:"On-the-fly Threshold",usiProtocol:"USI Protocol",translateOptionName:"Translate Option Name",functionalOnJapaneseOnly:"Functional on Japanese Only",maxStartupTime:"Max Startup Time",forDevelopers:"For Developers",enableAppLog:"Enable App Log",enableUSILog:"Enable USI Log",enableCSALog:"Enable CSA Log",logLevel:"Log Level",manageEngines:"Manage Engines",flipBoard:"Flip Board",elapsedTimeChart:"Elapsed Time Chart",controls:"Controls",useUpDownToMove1Ply:"Use ↑/↓ to Move 1 Ply",useLeftRightToMove1Ply:"Use ←/→ to Move 1 Ply",file:"File",folder:"Folder",recordFile:"Record File",executableFile:"Executable",imageFile:"Image",unsaved:"Unsaved",remove:"Remove",deleteMove:"Delete Move",recordProperties:"Record Properties",comments:"Comments",commentsAndBookmarks:"Comments & Bookmarks",branches:"Branches",branchListMode:"Branch List Mode",tree:"Tree",previousMoveBranches:"Sibling Branches",nextMoveBranches:"Next Move Branches",bookmark:"Bookmark",bookmarkList:"Bookmarks",moveComments:"Move Comments",searchLog:"Search Log",pv:"PV",mateShort:"M",displayPVShort:"Play",evaluation:"Evaluation",rawScore:"Raw Score",score:"Score",estimatedWinRate:"Estimated Win Rate",evaluationAndEstimatedWinRateAndPV:"Evaluation & Estimated Win Rate & PV",swapEachTurnChange:"Swap Each Turn Change",alwaysSenteIsPositive:"Always Sente is Positive",signOfEvaluation:"Sign of Evaluation",showArrowScore:"Show Score on Arrows",arrowScoreDiffRange:"Arrow Score Range",maxArrows:"Max Arrows",winRateCoefficient:"Win Rate Coefficient",nodeCountFormat:"Node Count Format",plainNumber:"Plain",commaSeparated:"Comma Separated",monitor:"Monitor",hideTabView:"Hide",expandTabView:"Expand Tab View",sente:"Sente",senteOrShitate:"Sente (Shitate)",shitate:"Shitate",gote:"Gote",goteOrUwate:"Gote (Uwate)",uwate:"Uwate",targetEngine:"Target Engine",baseEngine:"Base Engine",swapSenteGote:"Swap Sente/Gote",pieceToss:"Piece Toss",opponent:"Opponent",level:"Level",turn:"Turn",currentPosition:"Current Position",positionList:"Position List",enableEngineTimeout:"Enable Engine Timeout",setDifferentTimeForGote:"Set different time for Gote",nextTurn:"Next Move",elapsedTime:"Elapsed Time",elapsed:"Elapsed",rank:"Rank",depth:"Depth",searchEngine:"Search Engine",ponder:"Ponder",numberOfThreads:"Threads",threads:"Threads",suggestionsCount:"Suggestions Count",startPosition:"Position",beginFromThisPosition:"Begin from this position",maxMoves:"Max Moves",gameRepetition:"Repeat",parallelism:"Parallelism",parallelGame:"Parallel Game",jishogi:"Jishogi",rule24:"24-point rule",rule27:"27-point rule",tryRule:"TRY rule",autoRelogin:"Auto Re-Login",restartItEveryGame:"Restart it Every Game",swapTurnWhenGameRepetition:"Swap Turns When Repeat",outputComments:"Output Comments",saveRecordAutomatically:"Save Record Automatically",adjustBoardToHumanPlayer:"Adjust Board to Human Player",adjustBoardAutomatically:"Adjust Board Automatically",command:"Command",startGame:"Start Game",cancelGame:"Cancel Game",allottedTime:"Allotted Time",byoyomi:"Byoyomi",increments:"Increments",startEndCriteria:"Start/End Criteria",descending:"Descending",endCriteria1Move:"End Criteria for 1 Move",outputSettings:"Output Settings",noOutputs:"No Outputs",insertCommentToTop:"Insert to Top",appendCommentToBottom:"Append to Bottom",insertToComment:"Ins. to Comment",insertToRecord:"Ins. to Record",overwrite:"Overwrite",fromPrefix:"from",fromSuffix:"",toPrefix:"to",toSuffix:"",plyPrefix:"",plySuffix:"th move",hoursSuffix:"h",minutesSuffix:"min",secondsSuffix:"sec",eg:"e.g.",totalMoves:"Total Moves",detailSettings:"Detail Settings",engineManagement:"Engine Management",engineName:"Engine Name",author:"Author",description:"Description",earlyPonder:"Early Pondering",enginePath:"Engine Path",openDirectory:"Open Directory",replaceEnginePath:"Replace Engine Path",displayName:"Display Name",frontendBook:"Frontend Book",moveSelection:"Move Selection",bestMove:"Best Move",bookMoveTemperature:"Temperature (lower favors the best move)",showAllOptions:"Show All Options",invoke:"Invoke",resetToEngineDefaultValues:"Reset to default values",defaultValue:"Default Value",freeTextUnsafe:"Free Text (Unsafe)",noEngineRegistered:"No engine",duplicate:"Copy",add:"Add",addFromFile:"Add from File",downloadEngines:"Download",downloadAnEngine:"Download an Engine",engineDownload:"Download Engines",availableEngines:"Available",installedEngines:"Installed",install:"Install",reinstall:"Reinstall",uninstall:"Uninstall",notInstalled:"Not installed",updateAvailable:"Update available",needsRepair:"Needs repair",unused:"Unused",inUse:"In use",downloadSize:"Download size",wasmEnginePerformanceNotice:"The in-app download feature downloads the engine data built into the browser version of ShogiHome. Its search speed is slower than the native version published on the engine developer's website.",agreeAndDownload:"Agree and Download",sourceCodeURL:"Source code",noDownloadableEngine:"No engines available for download.",noInstalledEngine:"No engines installed.",enginesAddedPleaseSave:'Added to the engine list. Press "Save and Close" in Engine Management to apply.',enginesUpdatedPleaseSave:'The engine has been updated. Press "Save and Close" in Engine Management to apply.',areYouSureWantToUninstallEngine:e=>`Delete the downloaded files of ${e}?`,downloadedFileIsCorrupted:"The downloaded file is corrupted",engineIsInUse:"The engine is in use. Please stop the game or research and try again.",compareAndMerge:"Compare & Merge",compareEngineSettings:"Compare Engine Settings",noDifference:"No Difference",mergeToLeft:"Merge to Left",mergeToRight:"Merge to Right",recommended:"Recommended",import:"Import",saveAndClose:"Save & Close",save:"Save",saveAs:"Save As",history:"History",clearHistory:"Clear History",userFile:"User File",automaticBackup:"Automatic Backup",restore:"Restore",filterByFilePathOrContent:"Filter by File Path or Content",loadingFileContents:"Loading files...",loadRecordFromWeb:"Load Record from Web",backToMainBranch:"Back to Main Branch",fetchLatestData:"Fetch Latest Data",sourceURL:"Source URL",ok:"OK",cancel:"Cancel",yes:"Yes",no:"No",back:"Back",doNotShowAgain:"Do not show again",name:"Name",prediction:"Prediction",best:"Best",nodes:"Nodes",hashUsage:"Hash Usage",stop:"Stop",resume:"Resume",noHandicap:"No Handicap",lanceHandicap:"Lance Handicap",rightLanceHandicap:"Right Lance Handicap",bishopHandicap:"Bishop Handicap",rookHandicap:"Rook Handicap",rookLanceHandicap:"Rook-Lance Handicap",twoPiecesHandicap:"2 Pieces Handicap",fourPiecesHandicap:"4 Pieces Handicap",sixPiecesHandicap:"6 Pieces Handicap",eightPiecesHandicap:"8 Pieces Handicap",tenPiecesHandicap:"10 Pieces Handicap",tsumeShogi:"Tsume Shogi",doubleKingTsumeShogi:"2-Kings Tsume Shogi",startDateTime:"Start",endDateTime:"End",gameDate:"Date",tournament:"Tournament",strategy:"Strategy",gameTitle:"Title",timeLimit:"Time Limit",blackTimeLimit:"Time Limit (Sente)",whiteTimeLimit:"Time Limit (Gote)",place:"Place",postedOn:"Posted On",note:"Note",senteShortName:"Sente(short)",goteShortName:"Gote(short)",scorekeeper:"Scorekeeper",opusNo:"Opus No.",opusName:"Opus Name",publishedBy:"Published By",publishedOn:"Published On",source:"Source",numberOfMoves:"Number of Moves",integrity:"Integrity",recordCategory:"Category",award:"Award",filterByOptionName:"Filter by Option Name",filterByEngineName:"Filter by Engine Name",bookStyle:"Book Style",bookStyleDiagram:"Book Style Diagram",gameStyle:"Game Style",thin:"Thin",bold:"Bold",extraBold:"Extra Bold",playerName:"Player Name",typeface:"Typeface",weight:"Weight",handLabel:"Hand Label",lastMoveColor:"Last Move Color",header:"Header",vertical:"Vertical",size:"Size",none:"None",bgCover:"Cover",bgContain:"Contain",bgTile:"Tile",inaccuracy:"Inaccuracy",dubious:"Dubious",mistake:"Mistake",blunder:"Blunder",inaccuracyThreshold:"Inaccuracy Threshold",dubiousThreshold:"Dubious Threshold",mistakeThreshold:"Mistake Threshold",blunderThreshold:"Blunder Threshold",maxPVLength:"Max PV Length",commentFormat:"Comment Format",gothic:"Gothic",mincho:"Mincho",appVersion:"App Version",installed:"Installed",stable:"Stable",latest:"Latest",backgroundColor:"Background Color",dialogPosition:"Dialog Position",alignLeft:"Left",alignRight:"Right",alignCenter:"Center",dialogBackdrop:"Dialog Backdrop",record:"Record",book:"Book",bookInfo:"Book Information",resetBook:"Initialize Book",moveEvaluation:"Move Evaluation",forced:"Forced",goodMove:"Good",yane2016BookFile:"YaneuraOu Book File",ybbBookFile:"YaneuraOu Binary Book File",shogiGUIBookFile:"ShogiGUI Book File",aperyBookFile:"Apery Book File",loadingMode:"Loading Mode",positionCount:"Position Count",gameCount:"Games",statistics:"Statistics",chart:"Chart",analytics:"Analytics",controlGroup:"Control Group",left:"Left",top:"Top",width:"Width",height:"Height",newCustomProfile:"New Custom Profile",addCustomLayoutProfile:"Add Custom Layout Profile",duplicateCurrentProfile:"Duplicate Current Profile",removeCurrentProfile:"Remove Current Profile",exportProfileToClipboard:"Export Profile to Clipboard",importProfileFromClipboard:"Import Profile from Clipboard",editLayoutWithDragAndDrop:"Edit with Drag and Drop",stretchCustomLayout:"Scale to Fit Screen",profileExportedToClipboard:"Profile exported to clipboard.",profileImported:"Profile imported.",failedToImportProfile:"Failed to import profile.",rightControlBox:"Right Control Box",leftControlBox:"Left Control Box",topControlBox:"Top Control Box",legends:"Legends",historyMode:"History Mode",headers:"Headers",playButton:"Play Button",insert:"Insert",bringForward:"Bring Forward",sendBackward:"Send Backward",move:"Move",bookMove:"Book Move",play:"Play",edit:"Edit",addMoves:"Add Moves",export:"Export",flippedBook:"Flipped Book",addBookMoves:"Add Book Moves",fromCurrentRecord:"From Current Record",fromFile:"From File",fromDirectory:"From Directory",noMoves:"No Moves",noComment:"No Comment",register:"Register",update:"Update",importAll:"Register All",doYouWantToImportAllMoves:"Do you want to import all available moves?",importedMoves:e=>`Imported ${e} move(s).`,currentMove:"Current Move",branchFrom:e=>`Branch from ${e}th Move`,allPlayers:"All Players",blackPlayerOnly:"Black Player Only",whitePlayerOnly:"White Player Only",filterByName:"Filter by Name",importScoreFromComment:"Import scores from comments",enterPartOfPlayerNameHere:"Enter part of player name here",freq:"Freq.",frequency:"Frequency",new:"New",duplicated:"Duplicated",moveEntry:"Entry",updatedAt:"Updated At",createdAt:"Created At",lastSent:"Last Sent",lastReceived:"Last Received",protocolVersion:"Protocol Version",prompt:"Prompt",openPrompt:"Open Prompt",forceQuit:"Force Quit",forceClose:"Force Close",blankLine:"Blank Line",autoScroll:"Auto Scroll",showTimestamp:"Show Timestamp",highlightByPartialMatch:"Highlight by Partial Match",csaServer:"CSA Server",usiEngine:"USI Engine",noRunningUSIEngine:"No running USI engine.",noConnectedCSAServer:"No connected CSA server.",willBeRemovedFromTheListSoon:"This session is closed, will be removed from the list soon.",typeCommandHereAndPressEnter:"Type command here and press Enter.",allowBlankLine:"Allow Blank Line",removeSpaceFromBothEnds:"Remove Space from Both Ends",collapseSequentialSpaces:"Collapse Sequential Spaces",typeCustomTitleHere:"Type custom title here",typeCustomCommentHere:"Type custom comment here",displayEmptyElements:"Display Empty Elements",share:"Share",waitingForNewGame:"Waiting for new game.",waitingForPlayerSetup:"Waiting for player setup.",insertedComment:"Inserted comment.",conversionCompleted:"Conversion completed.",human:"Human",randomPlayer:"Random Player",beginner:"Beginner",staticRook:"Static Rook",rangingRook:"Ranging Rook",pleaseSelectEngines:"Please select engines.",thisItemCannotBeMerged:"This item cannot be merged.",tryingToConnectAndLoginToCSAServer:"Trying to connect and login to CSA server.",inBrowserLogsOutputToConsoleAndIgnoreThisSetting:"*In web browser version, it will output logs to console and ignore this setting.",shouldRestartToApplyLogSettings:"*You should restart this app to apply log settings.",canOpenLogDirectoryFromMenu:'*You can open log directory from "Debug" - "Open Log Directory" menu.',hasNoOldLogCleanUpFeature:"*This app has no clean-up feature. Please remove old logs manually.",shouldRestartToApplyLowLevelSettings:"*You should restart this app to apply low-level settings.",processingPleaseWait:"Processing, please wait.",importingFollowingRecordOrPosition:"Importing the following record(or position).",supportsKIF_KI2_CSA_USI_SFEN_JKF_USEN:"*Supports KIF, KI2, CSA, USI, SFEN, JKF, and USEN.",pleasePasteRecordIntoTextArea:"*Please paste record data into the text area.",pleaseSpecifyPlainTextURL:"*Please specify plain text URL.",redirectNotSupported:"*Redirect is not supported.",desktopVersionPastesAutomatically:"*In desktop version, it will paste automatically from clipboard.",asNewFile:"as New File",mergeToRootPosition:"Merge to Root Position",mergeToCurrentPosition:"Merge to Current Position",failedToMergeRecordWithDifferentInitialPosition:"Failed to merge record with different initial position.",failedToMergeRecordWithDifferentTurn:"Failed to merge record with different turn.",earlyPonderFeatureSendsPonderhitCommandWithYaneuraOusNonStandardOptions:'Early ponder feature sends "ponderhit" command with YaneuraOu\'s non-standard options.',ifYourEngineNotSupportTheOptionsItMayCauseUnexpectedBehavior:"If your engine does not support the options, it may cause unexpected behavior.",someLogsDisabled:"Some log settings are disabled.",logsRecommendedForCSAProtocol:"Log settings are recommended for CSA protocol.",blankLinePingRecommendedToPreventTimeout:"It is recommended to enable Blank Line Ping to prevent connection timeout.",pleaseEnableLogsAndRestart:"Please enable log settings and restart this app.",hwaEnabled:"HWA(Hardware Acceleration) Enabled",hwaIsNotRecommendedForLongGames:"HWA is not recommended for long games.",pleaseDisableHWAAndRestart:"Please disable HWA in app settings and restart this app.",notSendPVOnStandardCSAProtocol:"Client do not send PV on standard CSA protocol.",passwordWillSavedPlaintextBecauseOSSideEncryptionNotAvailable:"Password will saved as plaintext because OS side encryption is not available.",pleaseUncheckSaveHistoryIfNotWantSave:"Please uncheck Save History, if you don't want to save.",floodgatePasswordShouldStartWithGameName:"Floodgate's password should start with game name.",thisIsNotFloodgateOfficialGameName:"This is not Floodgate official game name.",yourPasswordDoesNotMeetFloodgateRequirementsDoYouStillWantToContinue:"Your password does not meet Floodgate's requirements. Do you still want to continue?",translationHelpNeeded:"We'd like your help to translate.",restartRequiredAfterLocaleChange:"You should restart this app to change the language.",confirmSwitchLanguage:e=>`Do you want to switch the display language to "${e}"?`,createDesktopShortcut:"Create desktop shortcut",desktopShortcutCreated:"Desktop shortcut created.",areYouSureWantToResign:"Are you sure you want to resign?",areYouSureWantToDoDeclaration:"Are you sure you want to do declaration?",areYouSureWantToQuitGames:"Are you sure you want to quit games?",areYouSureWantToRequestQuit:"You have possibility to be loser. Are you sure you want to request quit?",areYouSureWantToClearRecord:"Are you sure you want to clear record?",areYouSureWantToOpenFileInsteadOfCurrentRecord:"Are you sure you want to open the file instead of current record?",areYouSureWantToClearHistory:"Are you sure you want to clear history?",areYouSureWantToRemoveCurrentProfile:"Are you sure you want to remove current profile?",yamlFormatSettingsCopiedToClipboard:"YAML format settings copied to clipboard.",jsonFormatSettingsCopiedToClipboard:"JSON format settings copied to clipboard.",usiCsaBridgeCommandCopiedToClipboard:"usi-csa-bridge command copied to clipboard.",positionImageCopiedToClipboard:"Position image copied to clipboard.",copiedToClipboard:"Copied to clipboard.",pastedFromClipboard:"Pasted from clipboard.",youCanNotCloseAppWhileCSAOnlineGame:"You cannot close app while CSA online game.",fileExtensionNotSupported:"File extension is not supported.",errorOccuredWhileDisconnectingFromCSAServer:"An error occured while disconnecting from CSA server.",failedToConnectToCSAServer:"Failed to connect to CSA server.",errorOccuredWhileLogoutFromCSAServer:"An error occured while logout from CSA server.",disconnectedFromCSAServer:"Disconnected from CSA server.",csaServerLoginDenied:"CSA server login denied.",thisFeatureNotAvailableOnWebApp:"This feature is not available on web app.",failedToLoadEngine:"Failed to load the engine.",engineRequiresOnline:"Loading the engine requires an internet connection.",engineRequiresReload:"Reload the page to use the engine.",failedToStartNewGame:"Failed to start new game.",errorOccuredWhileEndingGame:"An error occured while ending game.",failedToSendGoCommand:"Failed to send go-command.",failedToSendPonderCommand:"Failed to send ponder-command.",failedToSendStopCommand:"Failed to send stop-command.",failedToShutdownEngines:"Failed to shutdown engines.",failedToCheckUpdates:"Failed to check updates.",youAreUsingTheLatestVersion:"You are using the latest version.",newVersionIsAvailablePressToUpdate:"A new version is available. Press here to update.",failedToSaveRecord:"Failed to save record.",failedToParseSFEN:"Failed to parse SFEN.",failedToDetectRecordFormat:"Failed to detect record format.",unknown:"Unknown",unknownFileExtension:"Unknown file extension.",emptyRecordInput:"Empty record input.",invalidPieceName:"Invalid piece name",invalidTurn:"Invalid turn",invalidMove:"Invalid move",invalidMoveNumber:"Invalid move number",invalidDestination:"Invalid destination",pieceNotExists:"Piece not exists",invalidLine:"Invalid line",invalidBoard:"Invalid board",invalidHandPiece:"Invalid hand piece",invalidUSI:"Invalid USI",engineProcessWasClosedUnexpectedly:"The engine process was closed unexpectedly.",backgroundImageFileNotSelected:"Background image file is not selected.",pieceImageFileNotSelected:"Piece image file is not selected.",boardImageFileNotSelected:"Board image file is not selected.",pieceStandImageFileNotSelected:"Piece stand image file is not selected.",pieceSoundVolumeMustBe0To100Percent:"Piece sound volume must be 0% to 100%.",clockSoundVolumeMustBe0To100Percent:"Clock sound volume must be 0% to 100%.",clockSoundPitchMustBe220To880Hz:"Clock sound pitch must be 220Hz to 880Hz.",engineTimeoutMustBe1To300Seconds:"Engine timeout must be 1 to 300 seconds.",coefficientInSigmoidMustBeGreaterThan0:"Coefficient in sigmoid must be greater than 0.",inaccuracyThresholdMustBe1To100Percent:"Inaccuracy must be 1% to 100%.",dubiousThresholdMustBe1To100Percent:"Dubious threshold must be 1% to 100%.",mistakeThresholdMustBe1To100Percent:"Mistake threshold must be 1% to 100%.",blunderThresholdMustBe1To100Percent:"Blunder threshold must be 1% to 100%.",recordSavedWithGarbledCharacters:"The record has saved with some garbled characters.",pleaseConsiderToUseKIFU:"Please consider to use KIFU(UTF-8).",youCanChangeDefaultRecordFileFormatFromAppSettings:"You can change default record file format from App Settings.",inaccuracyThresholdMustBeLessThanDubiousThreshold:"Inaccuracy threshold must be less than dubious threshold.",dubiousThresholdMustBeLessThanMistakeThreshold:"Dubious threshold must be less than mistake threshold.",mistakeThresholdMustBeLessThanBlunderThreshold:"Mistake threshold must be less than blunder threshold.",thisEngineNotSupportsMateSearch:"This engine does not support mate search.",pleaseEndActiveFeaturesBeforeOpenRecord:"Please end active features before open record.",bothTimeLimitAndByoyomiAreNotSet:"Both time limit and byoyomi are not set.",canNotUseByoyomiWithFischer:"You cannot use Byoyomi with Fischer.",repeatsMustBeOneIfHumanPlayerIncluded:"The number of repeats must be 1, if a human player is included.",parallelismMustBeOneIfHumanPlayerIncluded:"Parallelism must be 1 if a human player is included.",parallelismMustBeOneIfCurrentPositionIsUsed:"Parallelism must be 1 if current position is used.",parallelismMustLessThanOrEqualToRepeats:"Parallelism must be less than or equal to the number of repeats.",protocolVersionNotSelected:"Protocol version is not selected.",hostNameIsEmpty:"Host name is empty.",invalidPortNumber:"Invalid port number.",idIsEmpty:"ID is empty.",idContainsSpace:"ID contains space.",passwordContainsSpace:"Password contains space.",tcpKeepaliveInitialDelayMustBePositive:"TCP keepalive initial delay must be positive.",blankLinePingInitialDelayMustBeGreaterThanOrEqualTo30:"Blank line ping initial delay must be >=30.",blankLinePingIntervalMustBeGreaterThanOrEqualTo30:"Blank line ping interval must be >=30.",engineNotSelected:"Engine is not selected.",forExportingConversionLogPleaseEnableAppLogsAndSetLogLevelDebugAndRestart:"For exporting conversion log, please enable app logs, set log level to DEBUG and restart this app.",sourceDirectoryNotSpecified:"Source directory is not specified.",sourceFileMustBeSFEN:"Source file must have a .sfen extension.",sourceFormatsNotSpecified:"Source formats are not specified.",destinationDirectoryNotSpecified:"Destination directory is not specified.",destinationFileNotSpecified:"Destination file is not specified.",destinationFileMustBeJSON:"Destination file must have a .json extension.",anyUnsavedDataWillBeLostDoYouReallyWantToResetBookData:"Any unsaved data will be lost. Do you really want to reset book data?",bookMovesWereImported:"Book moves were imported.",anyBookMovesAreUnsavedDoYouReallyWantToDiscardThemAndCloseTheApp:"Any book moves are unsaved. Do you really want to discard them and close the app?",cannotOverwriteOnTheFlyBook:"On-the-fly books cannot be overwritten.",pleaseSpecifyOtherFileName:"Please specify another file name.",memoryShortageOnBookConversionMayLoseUnsavedData:"Memory shortage during book data conversion may cause loss of unsaved data.",cannotConvertAperyBookToOtherFormat:"Apery book cannot be converted to other formats.",sourceRecordFileNotSet:"Source record file is not set.",sourceDirectoryNotSet:"Source directory is not set.",minPlyMustBeLessThanMaxPly:"Min ply must be less than max ply.",playerNameNotSet:"Player name is not set.",incompatibleOptionsWillBeDiscardedDoYouReallyWantToReplaceTheEnginePath:"Incompatible options will be discarded. Do you really want to replace the engine path?",largeSuggestionsCountMayCausePerformanceDegradation:"Large suggestions count may cause performance degradation.",doYouReallyWantToIncreaseTheSuggestionsCount:"Do you really want to increase the suggestions count?",recommendLowerSettingsForDailyUse:"Recommend lower settings for daily use.",checkEngineCompatibilityForNumaEnvironments:"This machine may have multiple CPU sockets or processor groups (NUMA). Not all engines handle NUMA environments optimally. Please check whether your engine supports NUMA.",aiPerformanceMayDegrade:"AI performance may degrade.",yourPCMayBecomeSlow:"Your PC may become slow.",increasingItMayImproveAIPerformance:"Increasing it may improve AI performance.",totalNumber:e=>`Total: ${e}`,number:e=>""+e,tryToReloginToCSAServerNSecondsLater:e=>`Try to relogin to the CSA server in ${e} seconds.`,mateInNPlyDoYouWantToDisplay:e=>`Mate in ${e} ply. Do you want to display it?`,insertedNMovesToRecord:e=>`Inserted ${e} moves to the record.`,errorsOccurred:e=>e>=2?`${e} errors have occurred.`:`${e} error has occurred.`,between:(e,t)=>`between ${e} and ${t}`,addNthEngine:e=>`Add ${(0,n.IE)(e)} engine`,copyOf:e=>`${e} (copy)`,keepLatest:e=>`keep latest ${e}`,followingDataNotSavedBecauseNotSupporetedBy:e=>`The following data was not saved because it is not supporeted by "${e}".`,areYouSureWantToDeleteFollowingMove:e=>`Are you sure you want to delete th ${e}th move and the following moves?`,failedToOpenDirectory:e=>`Failed to open directory of the file: ${e}`,unexpectedEventSenderPleaseReport:e=>`Unexpected event sender. Please report this error message to developer. [${e}]`,unexpectedHTTPMethodPleaseReport:e=>`Unexpected HTTP method. Please report this error message to developer. [${e}]`,unexpectedRequestURLPleaseReport:e=>`Unexpected request URL. Please report this error message to developer. [${e}]`,noResponseFromEnginePleaseExtendTimeout:e=>`No response from the engine for ${e} seconds. Please extend the timeout in the "USI Protocol" tab of the app settings if your engine is slow.`,stableVersionReleased:e=>`Stable version ${e} released!`,latestVersionReleased:e=>`Latest version ${e} released!`,doYouReallyWantToRemoveBookMove:e=>`Do you really want to remove the book move "${e}"?`,unexpectedRecordFileExtension:e=>`Unexpected record file extension: [${e}]`,fileNotFound:e=>`File not found. [${e}]`,directoryNotFound:e=>`Directory not found. [${e}]`,youCanExitFullScreenByPressing:e=>`You can exit full screen by pressing ${e} key.`,skippedMovesInMerge:(e,t)=>`${e} / ${t} moves were skipped in the merge.`,cpuUsageExceedsNPercent:e=>`CPU usage exceeds ${e}%.`,totalNumberOfThreadsExceedsNPercentOfCpuCores:e=>`The total number of threads exceeds ${e}% of CPU cores.`,memoryUsageExceedsNPercent:e=>`Memory usage exceeds ${e}%.`,memoryUsageIsLessThanNPercent:e=>`Memory usage is less than ${e}%.`,totalUSIHashExceedsNPercentOfMemory:e=>`The total USI_Hash exceeds ${e}% of memory.`,heapUsageExceedsNGBMayHang:e=>`Memory usage has exceeded ${e} GB. If the upward trend continues, the app may hang.`,settingsFileCorruptedMovedAndReset:(e,t)=>`The settings file ${e} was corrupted and could not be loaded. The broken file was moved to ${t}, and default settings will be used.`};o.d(t,["en",0,i])},1943(e,t,o){const n={shogiHome:"ShogiHome",clear:"初期化",open:"開く",openNewInstance:"新しい ShogiHome ウィンドウを開く",saveOverwrite:"上書き保存",newRecord:"新規棋譜",newRecordKeepInitialPosition:"新規棋譜 (同じ初形)",newRecordHirateSetup:"新規棋譜(平手初形)",openRecord:"棋譜を開く",saveRecord:"棋譜を上書き保存",saveRecordAs:"棋譜を名前を付けて保存",openAutoSaveDirectory:"自動保存先を開く",exportPositionDiagram:"局面図を出力",positionImage:"局面図",batchConversion:"一括変換",recordFileBatchConversion:"棋譜ファイル一括変換",close:"閉じる",quit:"終了",reload:"再読み込み",editing:"編集",copyAsKIF:"コピー・KIF",copyAsKI2:"コピー・KI2",copyAsCSA:"コピー・CSA",copyAsUSI:"コピー・USI",copyAsSFEN:"コピー・SFEN",copyAsBOD:"コピー・BOD",copyAsJKF:"コピー・JKF",copyAsUSEN:"コピー・USEN",copy:"コピー",cut:"切り取り",paste:"貼り付け",copyRecordAll:"棋譜コピー(初手から)",copyRecordFromCurrentPosition:"棋譜コピー(現在の局面から)",asKIF:"KIF形式",asKI2:"KI2形式",asCSA:"CSA形式",asUSI:"USI形式",asUSIUntilCurrentMove:"USI形式(現在の指し手まで)",asUSIAll:"USI形式(全て)",asJSONKifuFormat:"JSON棋譜フォーマット",asUSEN:"USEN",copyPosition:"局面コピー",asSFEN:"SFEN形式",asBOD:"BOD形式",pasteRecordOrPosition:"棋譜・局面貼り付け",pasteRecordMerge:"棋譜貼り付け(マージ)",toRootPosition:"棋譜の先頭へ",toCurrentPosition:"現在の位置へ",addSpecialMove:"特殊な指し手",deleteMoves:"現在の位置から棋譜を削除",view:"表示",openLayoutManager:"レイアウトマネージャー",openMonitorWindow:"監視ウィンドウ",toggleFullScreen:"全画面表示切り替え",defaultFontSize:"標準の文字サイズ",increaseFontSize:"文字を拡大",decreaseFontSize:"文字を縮小",settings:"設定",information:"情報",config:"設定",debug:"デバッグ",toggleDevTools:"開発者ツール表示切り替え",logFile:"ログファイル",openAppLog:"アプリログを開く",openUSILog:"USI通信ログを開く",openCSALog:"CSA通信ログを開く",tailAppLog:"アプリログをTailする",tailUSILog:"USI通信ログをTailする",tailCSALog:"CSA通信ログをTailする",copyAppLogTailCommand:"アプリログのTailコマンドをコピー",copyUSILogTailCommand:"USI通信ログのTailコマンドをコピー",copyCSALogTailCommand:"CSA通信ログのTailコマンドをコピー",reloadCustomPieceImage:"カスタム駒画像をリロード",statisticsReport:"統計情報",nextMoveProblemCollection:"次の一手",createNextMoveProblemCollection:"次の一手問題集の作成",createProblemCollection:"問題集の作成",openProblemCollection:"問題集を開く",nextMoveGenerationCompleted:"次の一手問題集の作成が完了しました。",noProblemsWereGeneratedAndFileWasNotCreated:"採用できる局面がなかったため、問題集ファイルは作成されませんでした。",doYouWantToSaveNProblems:e=>`作成済みの${e}問を保存しますか?`,doYouWantToStartQuiz:"出題を開始しますか?",doYouWantToResumeFromWhereYouLeftOff:"前回の続きから再開しますか?",nextMoveGenerationRequiresAnalyzedRecord:"問題集作成機能では解析コメントで悪手の候補を抽出してから、エンジンを起動して複数の候補手を求めます。事前に解析機能を実行して解析コメント付きの棋譜を用意してください。",files:"ファイル数",blunderCandidates:"悪手候補",adoptedProblems:"採用した問題",researchedPositions:"再探索済みの局面",recordDirectory:"棋譜ディレクトリ",winRateDropThreshold:"勝率降下幅",minWinRate:"対象局面評価の下限",adoptionWinRateDiff:"採用判定の勝率差",acceptableWinRateDiff:"正解範囲の勝率差",maxProblems:"問題数の上限",outputFile:"出力ファイル",problemNofM:(e,t)=>`問題 ${e} / ${t}`,findTheNextMove:"次の一手は?",showChoices:"選択肢を表示",correct:"正解",incorrect:"不正解",correctRate:"正解率",actualGameMove:"実戦の手",thisMoveWasPlayedInTheGame:"実戦で指された手です。",doYouWantToTryAgain:"もう一度チャレンジしますか?",showAnswer:"答えを見る",nextProblem:"次の問題",previousProblem:"前の問題",inOrder:"順番どおり",sourceRecord:"出典棋譜",launchUSIEngine:"USIエンジンを起動",connectToCSAServer:"CSAサーバーに接続",adminMode:"管理モード",inAdminModeManuallyInvokeCommandsAtPrompt:"管理モードではプロンプトから手動でコマンドを実行する必要があります。",setoptionAndPrecedingCommandsAreSentAutomatically:"setoptionコマンドまでのコマンドは自動で送信されます。",serverMustSupportShogiServerX1ModeLogIn:"サーバーは shogi-server の拡張モード (x1) ログインをサポートしている必要があります。",folders:"各種フォルダ",notification:"通知",notificationTest:"通知テスト",thisIsTestNotification:"これは通知のテストです。",app:"アプリ",log:"ログ",cache:"キャッシュ",downloadedEngines:"ダウンロードしたエンジン",help:"ヘルプ",openWebsite:"Webサイトを開く",openUserGuide:"使い方を開く",openLatestReleasePage:"最新版リリースページを開く",openStableReleasePage:"安定版リリースページを開く",checkForUpdates:"アップデートを確認",license:"ライセンス",inputs:"入力",outputs:"出力",format:"フォーマット",formats:"フォーマット",subdirectories:"サブディレクトリ",separate:"個別",merge:"マージ",createSubdirectories:"サブディレクトリ作成",nameConflictAction:"名前衝突時の動作",numberSuffix:"番号付与",skip:"スキップ",convert:"変換",openLogFile:"ログファイルを開く",success:"成功",failed:"失敗",skipped:"スキップ",game:"対局",player:"プレイヤー",server:"サーバー",selectFromHistory:"履歴から選ぶ",noHistory:"履歴がありません",saveHistory:"履歴に保存する",version:"バージョン",gameProgress:"対局の経過",allGamesCompleted:"連続対局終了",wins:"勝ち数",winsOnBlack:"勝ち数(先手)",winsOnWhite:"勝ち数(後手)",draws:"引き分け",validGames:"有効対局数",invalidGames:"無効対局数",eloRatingDiff:"レーティング差",ignoreDraws:"引き分け無効",zValue:"Z値",significance5pc:"有意水準5%",significance1pc:"有意水準1%",gameEnded:"対局終了",offlineGame:"ローカル対局",csaOnlineGame:"通信対局(CSA)",csaProtocolOnlineGame:"通信対局(CSAプロトコル)",csaProtocolV121:"CSAプロトコル1.2.1 標準",csaProtocolV121WithPVComments:"CSAプロトコル1.2.1 読み筋コメント付き",host:"接続先ホスト",portNumber:"ポート番号",password:"パスワード",revealPassword:"パスワードを表示する",keepaliveInitialDelay:"Keepalive初期遅延",blankLinePing:"空行Ping",blankLinePingInitialDelay:"空行Ping初期遅延",blankLinePingInterval:"空行Ping間隔",logout:"ログアウト",calculateJishogiPoints:"持将棋の点数を計算",jishogiPoints:"持将棋の点数",displayGameResults:"戦績確認",interrupt:"中断",stopGame:"対局中断",resign:"投了",draw:"引き分け",impass:"持将棋",repetitionDraw:"千日手",repetition:"千日手",mate:"詰み",noMate:"不詰",blackWin:"先手勝ち",whiteWin:"後手勝ち",all:"全て",others:"その他",minRate:"最小レート",mateSearch:"詰み探索",downloaded:"ダウンロード",startMateSearch:"詰み探索開始",stopMateSearch:"詰み探索終了",noMateFound:"詰みが見つかりませんでした。",timePerPosition:"思考時間",timeout:"時間切れ",foulWin:"反則勝ち",foulLose:"反則負け",enteringOfKing:"入玉勝ち",winByDefault:"不戦勝",loseByDefault:"不戦敗",winByDeclaration:"宣言勝ち",declareWin:"勝ち宣言",research:"検討",startResearch:"検討開始",endResearch:"検討終了",startEndResearch:"検討開始/終了",recordAnalysis:"棋譜解析",analysis:"解析",analyze:"解析開始",stopAnalysis:"解析中断",batchAnalysis:"連続棋譜解析",currentRecord:"現在の棋譜",skipAnalyzed:"解析済みをスキップ",analyzedRecordFilesWillBeOverwritten:"解析した棋譜ファイルは上書きされます。重要なデータは事前にコピーを作成してください。",analysisCompleted:"解析が完了しました。",noRecordFileFound:"対象の棋譜ファイルが見つかりません。",searchDuplicatePositions:"同一局面を検索",duplicatePositionSearch:"同一局面検索",duplicatePositions:"同一局面",duplicatePos:"同一局面",via:"経路",lastMove:"直前の指し手",nextMoves:"次の指し手",goToThisPosition:"この局面へ移動",noDuplicatePositions:"重複する局面はありません。",nDuplicatePositionsFound:e=>`${e} 件の重複する局面が見つかりました。`,appearanceCount:"出現数",showList:"一覧を表示",setupPosition:"局面編集",changeTurn:"手番変更",initializePosition:"局面の初期化",changePieceSet:"駒の増減",setAllPiecesToStandardCounts:"全ての駒を平手の枚数にする",setAllPiecesToZero:"全ての駒を0にする",addToBlackHandPieceStand:"先手の駒台に追加",addToWhiteHandPieceStand:"後手の駒台に追加",addToBoard:"盤に追加",undo:"元に戻す",redo:"やり直す",appSettings:"アプリ設定",language:"言語",theme:"テーマ",standard:"標準",green:"緑",cherryBlossom:"桜",selectColor:"色を選択",customImage:"カスタム画像",autumn:"紅葉",snow:"雪",classic:"クラシック",beige:"ベージュ",darkGreen:"深緑",dark:"ダーク",boardLayout:"盤レイアウト",compact:"コンパクト",portrait:"ポートレイト",portraitSquare:"ポートレイト(正方形マス)",piece:"駒",singleKanjiPiece:"一文字駒",singleKanjiWoodPiece:"一文字駒(木目)",singleKanjiGothicPiece:"一文字駒(ゴシック体)",singleKanjiDarkPiece:"一文字駒(ダーク)",singleKanjiGothicDarkPiece:"一文字駒(ゴシック体・ダーク)",twoKanjiPiece:"二文字駒",imageHasMarginsRemoveForLargerDisplay:"画像に余白が含まれている(除去して大きく表示)",backgroundImage:"背景画像",board:"盤",pieceStand:"駒台",woodTexture:"木目",lightWoodyTexture:e=>`木目(明${e})`,warmWoodTexture:e=>`木目(暖${e})`,resin:"樹脂",transparent:"透過表示",boardOpacity:"盤の不透明度",pieceStandOpacity:"駒台の不透明度",recordOpacity:"棋譜の不透明度",handPieceOrder:"持ち駒の並び順",rookGoldKnightToLeft:"飛・金・桂を左に",rookGoldKnightToRight:"飛・金・桂を右に",promotionSelector:"成・不成の表示",centeredHorizontal:"水平・中央寄せ",promoteFirstVertical:"垂直・成優先",promoteFirstHorizontal:"水平・成優先",enableDragAndDrop:"駒のドラッグ操作",highlightMovableSquares:"移動可能なマスを表示",showFileAndRank:"段・筋を表示",showLeftControls:"左側操作ボタンを表示",showRightControls:"右側操作ボタンを表示",tabViewStyle:"タブビューの形式",oneColumn:"1列",twoColumns:"2列",sounds:"音",pieceSoundVolume:"駒音の大きさ",clockSoundVolume:"時計音の大きさ",clockSoundPitch:"時計音の高さ",clockSoundTarget:"時計音の対象",anyTurn:"全ての手番",onlyHumanTurn:"人間の手番のみ",defaultRecordFileFormat:"デフォルトの保存形式",textEncoding:"文字コード",strict:"厳格",autoDetect:"自動判定",newlineCharacter:"改行文字",old90sMac:"90年代Mac",autoSaving:"自動保存",recordFileName:"棋譜ファイル名",select:"選択",shuffle:"シャッフル",csaV3Output:"CSA V3 で出力",alwaysOutputUTF8:"常に UTF-8 で出力",someOldShogiAppsCannotReadUTF8KifFiles:"一部の古い将棋アプリでは UTF-8 の KIF・KI2 ファイルを読み込めない場合があります。",strictDecodingMayFailToReadUTF8KifFiles:"文字コードの設定が「厳格」の場合、UTF-8 で書き出した KIF・KI2 ファイルの読み込みに失敗する可能性があります。",positionOfUSIOutput:"USI の局面表記",movesOfUSIOutput:"USI の指し手表記",onlySFEN:"SFEN のみ",minimal:"最小限",pasteDialog:"貼り付けダイアログ",liveDuplicatePositionDetection:"同一局面を常に検出",onTheFlyThreshold:"On-the-fly 閾値",usiProtocol:"USIプロトコル",translateOptionName:"オプション名を翻訳",functionalOnJapaneseOnly:"日本語選択時のみ有効",maxStartupTime:"最大起動待ち時間",forDevelopers:"開発者向け",enableAppLog:"アプリログを出力",enableUSILog:"USI通信ログを出力",enableCSALog:"CSA通信ログを出力",logLevel:"ログレベル",manageEngines:"エンジン設定",flipBoard:"盤面反転",elapsedTimeChart:"消費時間チャート",controls:"操作",useUpDownToMove1Ply:"↑/↓キーで1手移動",useLeftRightToMove1Ply:"←/→キーで1手移動",file:"ファイル",folder:"フォルダ",recordFile:"棋譜ファイル",executableFile:"実行可能ファイル",imageFile:"画像ファイル",unsaved:"未保存",remove:"削除",deleteMove:"指し手削除",recordProperties:"棋譜情報",comments:"コメント",commentsAndBookmarks:"コメント・しおり",branches:"分岐",branchListMode:"分岐の表示",tree:"ツリー",previousMoveBranches:"着手した手",nextMoveBranches:"次の手",bookmark:"しおり",bookmarkList:"しおり一覧",moveComments:"指し手コメント",searchLog:"思考",pv:"読み筋",mateShort:"詰",displayPVShort:"再現",evaluation:"評価値",rawScore:"評価値",score:"評価値",estimatedWinRate:"期待勝率",evaluationAndEstimatedWinRateAndPV:"評価値・期待勝率・読み筋",swapEachTurnChange:"手番側有利がプラスの値",alwaysSenteIsPositive:"先手有利がプラスの値",signOfEvaluation:"評価値の符号",showArrowScore:"矢印に評価値を表示",arrowScoreDiffRange:"矢印の評価値範囲",maxArrows:"矢印の表示数",winRateCoefficient:"勝率換算係数",nodeCountFormat:"ノード数表記",plainNumber:"装飾無し",commaSeparated:"カンマ区切り",monitor:"監視",hideTabView:"最小化",expandTabView:"タブビューを再表示",sente:"先手",senteOrShitate:"先手(下手)",shitate:"下手",gote:"後手",goteOrUwate:"後手(上手)",uwate:"上手",targetEngine:"検査対象エンジン",baseEngine:"基準エンジン",swapSenteGote:"先後入れ替え",pieceToss:"振り駒",opponent:"対局相手",level:"レベル",turn:"手番",currentPosition:"現在の局面",positionList:"局面集",enableEngineTimeout:"エンジンの時間切れあり",setDifferentTimeForGote:"後手に異なる時間を設定",nextTurn:"次の手番",elapsedTime:"消費時間",elapsed:"経過時間",rank:"順位",depth:"深さ",searchEngine:"エンジン",ponder:"先読み(Ponder)",numberOfThreads:"スレッド数",threads:"スレッド",suggestionsCount:"候補手の数",startPosition:"開始局面",beginFromThisPosition:"この局面から開始",maxMoves:"最大手数",gameRepetition:"連続対局",parallelism:"並列数",parallelGame:"並列対局",jishogi:"持将棋",rule24:"24点法",rule27:"27点法",tryRule:"トライルール",autoRelogin:"自動で再ログインする",restartItEveryGame:"1局ごとに再起動する",swapTurnWhenGameRepetition:"1局ごとに手番を入れ替える",outputComments:"コメントを出力する",saveRecordAutomatically:"棋譜を自動で保存する",adjustBoardToHumanPlayer:"人を手前に表示する",adjustBoardAutomatically:"盤面の向きを自動調整",command:"コマンド",startGame:"対局開始",cancelGame:"対局をキャンセル",allottedTime:"持ち時間",byoyomi:"秒読み",increments:"増加",startEndCriteria:"開始・終了条件",descending:"逆順",endCriteria1Move:"局面ごとの終了条件",outputSettings:"出力設定",noOutputs:"出力しない",insertCommentToTop:"前方に加筆する",appendCommentToBottom:"末尾に加筆する",insertToComment:"コメントに挿入",insertToRecord:"棋譜に挿入",overwrite:"上書きする",fromPrefix:"",fromSuffix:"から",toPrefix:"",toSuffix:"まで",plyPrefix:"",plySuffix:"手目",hoursSuffix:"時間",minutesSuffix:"分",secondsSuffix:"秒",eg:"例:",totalMoves:"総手数",detailSettings:"詳細設定",engineManagement:"エンジン管理",engineName:"エンジン名",author:"作者",description:"説明",earlyPonder:"早期Ponder",enginePath:"場所",openDirectory:"フォルダを開く",replaceEnginePath:"エンジン再選択",displayName:"表示名",frontendBook:"定跡 (GUI拡張)",moveSelection:"指し手の選択",bestMove:"最善手",bookMoveTemperature:"温度 (小さいほど最善手を優先)",showAllOptions:"全てのオプションを表示",invoke:"実行",resetToEngineDefaultValues:"エンジンの既定値に戻す",defaultValue:"既定値",freeTextUnsafe:"自由入力(非推奨)",noEngineRegistered:"エンジンが登録されていません。",duplicate:"複製",add:"追加",addFromFile:"ファイルから追加",downloadEngines:"ダウンロード",downloadAnEngine:"エンジンをダウンロード",engineDownload:"エンジンのダウンロード",availableEngines:"入手可能",installedEngines:"インストール済み",install:"インストール",reinstall:"再インストール",uninstall:"アンインストール",notInstalled:"未インストール",updateAvailable:"更新あり",needsRepair:"修復が必要",unused:"未使用",inUse:"使用中",downloadSize:"ダウンロードサイズ",wasmEnginePerformanceNotice:"アプリ内ダウンロード機能では、ShogiHomeブラウザ版に搭載しているエンジンデータをダウンロードします。エンジン開発者のサイトで公開しているネイティブ版よりも探索速度が劣ります。",agreeAndDownload:"同意してダウンロード",sourceCodeURL:"ソースコード",noDownloadableEngine:"ダウンロードできるエンジンがありません。",noInstalledEngine:"インストール済みのエンジンはありません。",enginesAddedPleaseSave:"エンジン一覧に追加しました。エンジン管理画面で「保存して閉じる」を押すと確定します。",enginesUpdatedPleaseSave:"エンジンを更新しました。エンジン管理画面で「保存して閉じる」を押すと確定します。",areYouSureWantToUninstallEngine:e=>`${e} のダウンロードしたファイルを削除しますか?`,downloadedFileIsCorrupted:"ダウンロードしたファイルが壊れています",engineIsInUse:"エンジンが使用中です。対局や検討を終了してからやり直してください。",compareAndMerge:"比較・マージ",compareEngineSettings:"エンジン設定の比較",noDifference:"差分なし",mergeToLeft:"左へマージ",mergeToRight:"右へマージ",recommended:"推奨",import:"取り込む",saveAndClose:"保存して閉じる",save:"保存",saveAs:"保存",history:"履歴",clearHistory:"履歴をクリア",userFile:"ユーザーのファイル",automaticBackup:"自動バックアップ",restore:"復元",filterByFilePathOrContent:"ファイルパスまたは内容で検索",loadingFileContents:"ファイルを読み込み中...",loadRecordFromWeb:"Webの棋譜を取得",backToMainBranch:"本譜に戻る",fetchLatestData:"最新データを取得",sourceURL:"ソースURL",ok:"OK",cancel:"キャンセル",yes:"はい",no:"いいえ",back:"戻る",doNotShowAgain:"次回から表示を省略",name:"名前",prediction:"予想",best:"最善",nodes:"Node数",hashUsage:"Hash使用率",stop:"停止",resume:"再開",noHandicap:"平手",lanceHandicap:"香落ち",rightLanceHandicap:"右香落ち",bishopHandicap:"角落ち",rookHandicap:"飛車落ち",rookLanceHandicap:"飛車香落ち",twoPiecesHandicap:"二枚落ち",fourPiecesHandicap:"四枚落ち",sixPiecesHandicap:"六枚落ち",eightPiecesHandicap:"八枚落ち",tenPiecesHandicap:"十枚落ち",tsumeShogi:"詰将棋",doubleKingTsumeShogi:"双玉詰将棋",startDateTime:"開始日時",endDateTime:"終了日時",gameDate:"対局日",tournament:"棋戦",strategy:"戦型",gameTitle:"表題",timeLimit:"持ち時間",blackTimeLimit:"先手の持ち時間",whiteTimeLimit:"後手の持ち時間",place:"場所",postedOn:"掲載",note:"備考",senteShortName:"先手省略名",goteShortName:"後手省略名",scorekeeper:"記録係",opusNo:"作品番号",opusName:"作品名",publishedBy:"発表誌",publishedOn:"発表年月",source:"出典",numberOfMoves:"手数",integrity:"完全性",recordCategory:"分類",award:"受賞",filterByOptionName:"オプション名で検索",filterByEngineName:"エンジン名で検索",bookStyle:"書籍風",bookStyleDiagram:"書籍風局面図",gameStyle:"対局画面風",thin:"細",bold:"太",extraBold:"極太",playerName:"対局者名",typeface:"書体",weight:"太さ",handLabel:"持ち駒ラベル",lastMoveColor:"最終手の色",header:"見出し",vertical:"垂直方向",size:"サイズ",none:"なし",bgCover:"1枚で表示",bgContain:"拡大して表示",bgTile:"タイル状に表示",inaccuracy:"緩手",dubious:"疑問手",mistake:"悪手",blunder:"大悪手",inaccuracyThreshold:"緩手の閾値",dubiousThreshold:"疑問手の閾値",mistakeThreshold:"悪手の閾値",blunderThreshold:"大悪手の閾値",maxPVLength:"読み筋表示手数",commentFormat:"コメントの形式",gothic:"ゴシック体",mincho:"明朝体",appVersion:"アプリバージョン",installed:"インストール済み",stable:"安定版",latest:"最新版",backgroundColor:"背景色",dialogPosition:"ダイアログ表示位置",alignLeft:"左",alignRight:"右",alignCenter:"中央",dialogBackdrop:"ダイアログ表示中の暗転",record:"棋譜",book:"定跡",bookInfo:"定跡の情報",resetBook:"定跡の初期化",moveEvaluation:"指し手評価",forced:"絶対手",goodMove:"好手",yane2016BookFile:"やねうら王定跡ファイル",ybbBookFile:"やねうら王バイナリ定跡ファイル",shogiGUIBookFile:"ShogiGUI 定跡ファイル",aperyBookFile:"Apery 定跡ファイル",loadingMode:"読み込みモード",positionCount:"局面数",gameCount:"対局数",statistics:"統計",chart:"グラフ",analytics:"解析",controlGroup:"メニュー",left:"左",top:"上",width:"幅",height:"高さ",newCustomProfile:"新規カスタムプロファイル",addCustomLayoutProfile:"新規レイアウトプロファイル",duplicateCurrentProfile:"現在のプロファイルを複製",removeCurrentProfile:"現在のプロファイルを削除",exportProfileToClipboard:"プロファイルをクリップボードに出力",importProfileFromClipboard:"クリップボードからプロファイルを取り込む",editLayoutWithDragAndDrop:"ドラッグで編集",stretchCustomLayout:"ウィンドウに合わせる",profileExportedToClipboard:"プロファイルをクリップボードに出力しました。",profileImported:"プロファイルを取り込みました。",failedToImportProfile:"プロファイルの取り込みに失敗しました。",rightControlBox:"右側メニュー",leftControlBox:"左側メニュー",topControlBox:"操作ボタン",legends:"凡例",historyMode:"履歴モード",headers:"ヘッダー",playButton:"再現ボタン",insert:"挿入",bringForward:"前面へ",sendBackward:"背面へ",move:"指し手",bookMove:"定跡手",play:"着手",edit:"編集",addMoves:"指し手追加",export:"エクスポート",flippedBook:"反転も検索",addBookMoves:"定跡手追加",fromCurrentRecord:"現在の棋譜から",fromFile:"ファイルから",fromDirectory:"フォルダから",noMoves:"指し手がありません。",noComment:"コメントなし",register:"登録",update:"更新",importAll:"全て反映",doYouWantToImportAllMoves:"全ての手を反映しますか?",importedMoves:e=>`${e}手を定跡に反映しました。`,currentMove:"現在の手",branchFrom:e=>`${e}手目から分岐`,allPlayers:"全ての対局者",blackPlayerOnly:"先手のみ",whitePlayerOnly:"後手のみ",filterByName:"名前でフィルタ",importScoreFromComment:"コメントから評価値を取り込む",enterPartOfPlayerNameHere:"ここに対局者名の一部を入力",freq:"出現頻度",frequency:"出現頻度",new:"新規",duplicated:"重複",moveEntry:"登録手数",updatedAt:"更新日時",createdAt:"作成日時",lastSent:"最終送信",lastReceived:"最終受信",protocolVersion:"プロトコルバージョン",prompt:"プロンプト",openPrompt:"プロンプトを開く",forceQuit:"強制Quit",forceClose:"強制Close",blankLine:"空行",autoScroll:"自動スクロール",showTimestamp:"タイムスタンプを表示",highlightByPartialMatch:"部分一致でハイライト",csaServer:"CSAサーバー",usiEngine:"USIエンジン",noRunningUSIEngine:"稼働中のUSIエンジンはありません。",noConnectedCSAServer:"接続中のCSAサーバーはありません。",willBeRemovedFromTheListSoon:"セッションが終了したため、まもなく一覧から削除されます。",typeCommandHereAndPressEnter:"コマンドを入力してEnter",allowBlankLine:"空行を許可",removeSpaceFromBothEnds:"両端の空白を削除",collapseSequentialSpaces:"連続する空白をまとめる",typeCustomTitleHere:"ここに見出しを入力",typeCustomCommentHere:"ここにコメントを入力",displayEmptyElements:"未入力の項目を表示",share:"シェア",waitingForNewGame:"対局開始を待っています。",waitingForPlayerSetup:"対局者の準備を待っています。",insertedComment:"コメントを挿入しました。",conversionCompleted:"変換が完了しました。",human:"人",randomPlayer:"ランダムプレイヤー",beginner:"初心者",staticRook:"居飛車",rangingRook:"振り飛車",pleaseSelectEngines:"エンジンを選択してください。",thisItemCannotBeMerged:"この項目はマージできません。",tryingToConnectAndLoginToCSAServer:"CSAサーバーへの接続とログインを試みています。",inBrowserLogsOutputToConsoleAndIgnoreThisSetting:"※ブラウザ版ではログがコンソールに出力され、ここでの設定は無視されます。",shouldRestartToApplyLogSettings:"※ログ設定の変更を反映するにはアプリの再起動が必要です。",canOpenLogDirectoryFromMenu:"※ログの出力先は「デバッグ」-「ログファイルの場所を開く」で開きます。",hasNoOldLogCleanUpFeature:"※現在、古いログファイルの自動削除機能はありません。",shouldRestartToApplyLowLevelSettings:"※低レベルの設定を反映するにはアプリの再起動が必要です。",processingPleaseWait:"処理中です。お待ちください。",importingFollowingRecordOrPosition:"以下の棋譜(または局面)を取り込みます。",supportsKIF_KI2_CSA_USI_SFEN_JKF_USEN:"※KIF形式/KI2形式/CSA形式/USI/SFEN/JKF/USENに対応しています。",pleasePasteRecordIntoTextArea:"※テキストエリアに棋譜を貼り付けてください。",pleaseSpecifyPlainTextURL:"※プレーンテキストのURLを指定してください。",redirectNotSupported:"※リダイレクトはサポートされていません。",desktopVersionPastesAutomatically:"※インストールアプリ版では自動的に貼り付けられます。",asNewFile:"新規ファイル",mergeToRootPosition:"棋譜の先頭へマージ",mergeToCurrentPosition:"現在の位置へマージ",failedToMergeRecordWithDifferentInitialPosition:"初期局面が異なるため棋譜をマージできませんでした。",failedToMergeRecordWithDifferentTurn:"手番が異なるため棋譜をマージできませんでした。",earlyPonderFeatureSendsPonderhitCommandWithYaneuraOusNonStandardOptions:"早期Ponder機能は、やねうら王の独自オプションでponderhitコマンドを送信します。",ifYourEngineNotSupportTheOptionsItMayCauseUnexpectedBehavior:"エンジンがこのオプションに対応していない場合、予期しない動作を引き起こす可能性があります。",someLogsDisabled:"一部のログが無効になっています。",logsRecommendedForCSAProtocol:"CSAプロトコルを使用した対局では各種ログの出力を推奨します。",blankLinePingRecommendedToPreventTimeout:"接続のタイムアウトを防止するために、空行 Ping を有効にすることを推奨します。",pleaseEnableLogsAndRestart:"アプリ設定からログを有効にしてアプリを再起動してください。",hwaEnabled:"HWA(ハードウェアアクセラレーション)が有効です。",hwaIsNotRecommendedForLongGames:"長時間の対局ではHWAの無効化を推奨します。",pleaseDisableHWAAndRestart:"アプリ設定からHWAを無効にしてアプリを再起動してください。",notSendPVOnStandardCSAProtocol:"標準のCSAプロトコルでは評価値や読み筋が送信されません。",passwordWillSavedPlaintextBecauseOSSideEncryptionNotAvailable:"OSの暗号化機能が利用できないため、入力したパスワードは平文で保存されます。",pleaseUncheckSaveHistoryIfNotWantSave:"保存したくない場合は「履歴に保存する」のチェックを外してください。",floodgatePasswordShouldStartWithGameName:"Floodgateのパスワードはゲーム名で始まる必要があります。",thisIsNotFloodgateOfficialGameName:"これはFloodgate公式のゲーム名ではありません。",yourPasswordDoesNotMeetFloodgateRequirementsDoYouStillWantToContinue:"パスワードがFloodgateの要件を満たしていない可能性があります。続行しますか?",translationHelpNeeded:"翻訳の改善にご協力ください。",restartRequiredAfterLocaleChange:"言語の変更には再起動が必要です。",confirmSwitchLanguage:e=>`表示言語を「${e}」に切り替えますか?`,createDesktopShortcut:"デスクトップにショートカットを作成",desktopShortcutCreated:"デスクトップにショートカットを作成しました。",areYouSureWantToResign:"投了しますか?",areYouSureWantToDoDeclaration:"宣言しますか?",areYouSureWantToQuitGames:"連続対局を中断しますか?",areYouSureWantToRequestQuit:"中断を要求すると負けになる可能性があります。よろしいですか?",areYouSureWantToClearRecord:"現在の棋譜は削除されます。よろしいですか?",areYouSureWantToOpenFileInsteadOfCurrentRecord:"現在の棋譜を閉じて別のファイルを開きます。よろしいですか?",areYouSureWantToClearHistory:"履歴をクリアします。よろしいですか?",areYouSureWantToRemoveCurrentProfile:"現在のプロファイルを削除します。よろしいですか?",yamlFormatSettingsCopiedToClipboard:"YAML形式の設定をクリップボードにコピーしました。",jsonFormatSettingsCopiedToClipboard:"JSON形式の設定をクリップボードにコピーしました。",usiCsaBridgeCommandCopiedToClipboard:"usi-csa-bridge コマンドをクリップボードにコピーしました。",positionImageCopiedToClipboard:"局面図をクリップボードにコピーしました。",copiedToClipboard:"クリップボードにコピーしました。",pastedFromClipboard:"クリップボードから貼り付けました。",youCanNotCloseAppWhileCSAOnlineGame:"CSAプロトコル使用中はアプリを終了できません。",fileExtensionNotSupported:"取り扱いできないファイル拡張子です。",errorOccuredWhileDisconnectingFromCSAServer:"CSAサーバーからの切断中にエラーが発生しました。",failedToConnectToCSAServer:"CSAサーバーに接続できませんでした。",errorOccuredWhileLogoutFromCSAServer:"CSAサーバーからのログアウト中にエラーが発生しました。",disconnectedFromCSAServer:"CSAサーバーへの接続が切れました。",csaServerLoginDenied:"CSAサーバーへのログインが拒否されました。",thisFeatureNotAvailableOnWebApp:"Web版では利用できない機能です。",failedToLoadEngine:"エンジンの読み込みに失敗しました。",engineRequiresOnline:"エンジンの読み込みにはインターネット接続が必要です。",engineRequiresReload:"エンジンを使用するにはページの再読み込みが必要です。",failedToStartNewGame:"対局の開始に失敗しました。",errorOccuredWhileEndingGame:"対局の終了中にエラーが発生しました。",failedToSendGoCommand:"goコマンドを送信できませんでした。",failedToSendPonderCommand:"ponderコマンドを送信できませんでした。",failedToSendStopCommand:"stopコマンドを送信できませんでした。",failedToShutdownEngines:"エンジンを正常に終了できませんでした。",failedToCheckUpdates:"アップデートの確認ができませんでした。",youAreUsingTheLatestVersion:"最新のバージョンを使用しています。",newVersionIsAvailablePressToUpdate:"新しいバージョンがあります。ここを押すと更新します。",failedToSaveRecord:"棋譜の保存に失敗しました。",failedToParseSFEN:"SFENの読み込みに失敗しました。",failedToDetectRecordFormat:"棋譜形式を判別できませんでした。",unknown:"不明",unknownFileExtension:"不明なファイル形式です。",emptyRecordInput:"棋譜が入力されていません。",invalidPieceName:"不正な駒",invalidTurn:"不正な手番",invalidMove:"不正な指し手",invalidMoveNumber:"不正な手数",invalidDestination:"不正な移動先",pieceNotExists:"存在しない駒",invalidLine:"不正な行",invalidBoard:"不正な盤面",invalidHandPiece:"不正な持ち駒",invalidUSI:"不正なUSI",engineProcessWasClosedUnexpectedly:"エンジンプロセスが予期せず終了しました。",backgroundImageFileNotSelected:"背景画像のファイルが選択されていません。",pieceImageFileNotSelected:"駒画像のファイルが選択されていません。",boardImageFileNotSelected:"盤面画像のファイルが選択されていません。",pieceStandImageFileNotSelected:"駒台画像のファイルが選択されていません。",pieceSoundVolumeMustBe0To100Percent:"駒音の大きさには0%~100%の値を指定してください。",clockSoundVolumeMustBe0To100Percent:"時計音の大きさには0%~100%の値を指定してください。",clockSoundPitchMustBe220To880Hz:"時計音の高さには220Hz~880Hzの値を指定してください。",engineTimeoutMustBe1To300Seconds:"エンジンのタイムアウト時間には1秒~300秒の値を指定してください。",coefficientInSigmoidMustBeGreaterThan0:"勝率換算係数には0より大きい値を指定してください。",inaccuracyThresholdMustBe1To100Percent:"緩手には1%~100%の値を指定してください。",dubiousThresholdMustBe1To100Percent:"疑問手には1%~100%の値を指定してください。",mistakeThresholdMustBe1To100Percent:"悪手には1%~100%の閾値を指定してください。",blunderThresholdMustBe1To100Percent:"大悪手には1%~100%の値を指定してください。",recordSavedWithGarbledCharacters:"保存した棋譜の一部が文字化けしている可能性があります。",pleaseConsiderToUseKIFU:"KIFU形式(UTF-8)で保存することをお勧めします。",youCanChangeDefaultRecordFileFormatFromAppSettings:"デフォルトの棋譜形式はアプリ設定で変更可能です。",inaccuracyThresholdMustBeLessThanDubiousThreshold:"緩手には疑問手より小さい値を指定してください。",dubiousThresholdMustBeLessThanMistakeThreshold:"疑問手には悪手より小さい値を指定してください。",mistakeThresholdMustBeLessThanBlunderThreshold:"悪手には大悪手より小さい値を指定してください。",thisEngineNotSupportsMateSearch:"このエンジンは詰将棋探索をサポートしていません。",pleaseEndActiveFeaturesBeforeOpenRecord:"棋譜を開くには現在利用している機能を終了してください。",bothTimeLimitAndByoyomiAreNotSet:"持ち時間と秒読みが両方とも0です。",canNotUseByoyomiWithFischer:"秒読みとフィッシャールールは併用できません。",repeatsMustBeOneIfHumanPlayerIncluded:"人が対局する場合、連続対局の回数は1以外を設定できません。",parallelismMustBeOneIfHumanPlayerIncluded:"人が対局する場合、並列実行数は1以外を設定できません。",parallelismMustBeOneIfCurrentPositionIsUsed:"現在の局面を開始局面にする場合、並列実行数は1以外を設定できません。",parallelismMustLessThanOrEqualToRepeats:"並列実行数は連続対局の回数以下にしてください。",protocolVersionNotSelected:"プロトコルのバージョンを選択してください。",hostNameIsEmpty:"ホスト名が空です。",invalidPortNumber:"無効なポート番号です。",idIsEmpty:"IDが空です。",idContainsSpace:"IDに空白が含まれています。",passwordContainsSpace:"パスワードに空白が含まれています。",tcpKeepaliveInitialDelayMustBePositive:"TCP Keepaliveの初期遅延時間には正の値を指定してください。",blankLinePingInitialDelayMustBeGreaterThanOrEqualTo30:"空行送信の初期遅延時間には30秒以上を指定してください。",blankLinePingIntervalMustBeGreaterThanOrEqualTo30:"空行送信の間隔には30秒以上を指定してください。",engineNotSelected:"エンジンが選択されていません。",forExportingConversionLogPleaseEnableAppLogsAndSetLogLevelDebugAndRestart:"変換ログを出力するにはアプリログを有効にし、ログレベルをデバッグに設定してアプリを再起動してください。",sourceDirectoryNotSpecified:"入力ディレクトリが指定されていません。",sourceFileMustBeSFEN:"入力ファイルは .sfen 形式でなければなりません。",sourceFormatsNotSpecified:"入力の対象フォーマットが指定されていません。",destinationDirectoryNotSpecified:"出力ディレクトリが指定されていません。",destinationFileNotSpecified:"出力ファイルが指定されていません。",destinationFileMustBeJSON:"出力ファイルは .json 形式でなければなりません。",anyUnsavedDataWillBeLostDoYouReallyWantToResetBookData:"保存していない内容は失われます。定跡を初期化しますか?",bookMovesWereImported:"定跡データをインポートしました。",anyBookMovesAreUnsavedDoYouReallyWantToDiscardThemAndCloseTheApp:"保存されていない定跡があります。破棄してアプリを終了しますか?",cannotOverwriteOnTheFlyBook:"On-the-fly モードで読み込み中の定跡は上書き保存できません。",pleaseSpecifyOtherFileName:"別のファイル名を指定してください。",memoryShortageOnBookConversionMayLoseUnsavedData:"定跡データの変換中にメモリが不足すると保存していないデータは失われる可能性があります。",cannotConvertAperyBookToOtherFormat:"Apery 定跡は他の形式に変換できません。",sourceRecordFileNotSet:"棋譜ファイルが指定されていません。",sourceDirectoryNotSet:"フォルダを選択してください。",minPlyMustBeLessThanMaxPly:"最小手数は最大手数より小さくしてください。",playerNameNotSet:"対局者名が設定されていません。",incompatibleOptionsWillBeDiscardedDoYouReallyWantToReplaceTheEnginePath:"互換性のないオプションがある場合それらは破棄されます。エンジンを置き換えますか?",largeSuggestionsCountMayCausePerformanceDegradation:"候補手を増やしすぎると動作が重くなる可能性があります。",doYouReallyWantToIncreaseTheSuggestionsCount:"本当に候補手の数を増やしますか?",recommendLowerSettingsForDailyUse:"日常利用のPCでは低めの設定を推奨します。",checkEngineCompatibilityForNumaEnvironments:"このPCは複数のCPUソケットまたはプロセッサーグループ(NUMA)を持つ可能性があります。NUMA環境に対応していないエンジンでは性能が低下する場合があります。エンジンのNUMA対応状況をご確認ください。",aiPerformanceMayDegrade:"AIの性能が低下する可能性があります。",yourPCMayBecomeSlow:"PCの動作が重くなる可能性があります。",increasingItMayImproveAIPerformance:"大きくすることでAIの性能が向上する可能性があります。",totalNumber:e=>`合計 ${e} 件`,number:e=>`${e} 件`,tryToReloginToCSAServerNSecondsLater:e=>`CSAサーバーへのログインを${e}秒後に再試行します。`,mateInNPlyDoYouWantToDisplay:e=>`${e}手で詰みました。再生画面を表示しますか?`,insertedNMovesToRecord:e=>`${e}手を棋譜に挿入しました。`,errorsOccurred:e=>`${e} 種類のエラーが発生しました。`,between:(e,t)=>`${e} から ${t} まで`,addNthEngine:e=>`${e} 個目のエンジンを追加`,copyOf:e=>`${e} のコピー`,keepLatest:e=>`最新${e}件まで`,followingDataNotSavedBecauseNotSupporetedBy:e=>`以下の情報は ${e} 形式では対応していないため保存されませんでした。`,areYouSureWantToDeleteFollowingMove:e=>`${e}手目以降を削除します。よろしいですか?`,failedToOpenDirectory:e=>`ファイルの場所を開けませんでした: ${e}`,unexpectedEventSenderPleaseReport:e=>`予期せぬイベントの送信元です。このエラーメッセージを開発者に報告してください。 [${e}]`,unexpectedHTTPMethodPleaseReport:e=>`予期せぬHTTPメソッドです。このエラーメッセージを開発者に報告してください。 [${e}]`,unexpectedRequestURLPleaseReport:e=>`予期せぬURLへのリクエストです。このエラーメッセージを開発者に報告してください。 [${e}]`,noResponseFromEnginePleaseExtendTimeout:e=>`${e}秒以内にエンジンから応答がありませんでした。エンジンの起動が重い場合はアプリ設定の「USIプロトコル」タブで待ち時間を延長してください。`,stableVersionReleased:e=>`安定版 ${e} がリリースされました!`,latestVersionReleased:e=>`最新版 ${e} がリリースされました!`,doYouReallyWantToRemoveBookMove:e=>`定跡手 ${e} を削除します。よろしいですか?`,unexpectedRecordFileExtension:e=>`サポートされていない棋譜の拡張子です。 [${e}]`,fileNotFound:e=>`ファイルが見つかりません。 [${e}]`,directoryNotFound:e=>`フォルダが見つかりません。 [${e}]`,youCanExitFullScreenByPressing:e=>`全画面表示を終了するには ${e} キーを押してください。`,skippedMovesInMerge:(e,t)=>`${t}手中、${e}手がマージできませんでした。`,cpuUsageExceedsNPercent:e=>`全CPUコアの${e}%を超えています。`,totalNumberOfThreadsExceedsNPercentOfCpuCores:e=>`スレッド数の合計がCPUコア数の${e}%を超えています。`,memoryUsageExceedsNPercent:e=>`全メモリの${e}%を超えています。`,memoryUsageIsLessThanNPercent:e=>`全メモリの${e}%未満です。`,totalUSIHashExceedsNPercentOfMemory:e=>`USI_Hash の合計が全メモリの${e}%を超えています。`,heapUsageExceedsNGBMayHang:e=>`メモリ使用量が ${e}GB を超えました。増加傾向が続くとハングアップする可能性があります。`,settingsFileCorruptedMovedAndReset:(e,t)=>`設定ファイル ${e} が破損していたため読み込めませんでした。壊れたファイルは ${t} に移動し、既定の設定を使用します。`};o.d(t,["ja",0,n])},7387(e,t,o){const n={shogiHome:"ShogiHome",clear:"Ván mới",open:"Mở",openNewInstance:"Mở một cửa sổ ShogiHome mới",saveOverwrite:"Ghi đè",newRecord:"Kỳ phổ mới",newRecordKeepInitialPosition:"Kỳ phổ mới (giữ thế trận hiện tại)",newRecordHirateSetup:"Kỳ phổ mới (thế cờ ban đầu)",openRecord:"Mở kỳ phổ",saveRecord:"Lưu kỳ phổ",saveRecordAs:"Lưu kỳ phổ như",openAutoSaveDirectory:"Mở thư mục lưu tự động",exportPositionDiagram:"Xuất ảnh thế cờ",positionImage:"Ảnh thế cờ",batchConversion:"Chuyển đổi số lượng lớn",recordFileBatchConversion:"Chuyển đổi kỳ phổ số lượng lớn",close:"Đóng",quit:"Thoát",reload:"Tải lại",editing:"Sửa",copyAsKIF:"Sao chép (KIF)",copyAsKI2:"Sao chép (KI2)",copyAsCSA:"Sao chép (CSA)",copyAsUSI:"Sao chép (USI)",copyAsSFEN:"Sao chép (SFEN)",copyAsBOD:"Sao chép (BOD)",copyAsJKF:"Sao chép (JKF)",copyAsUSEN:"Sao chép (USEN)",copy:"Sao chép",cut:"Cắt",paste:"Dán",copyRecordAll:"Sao chép kỳ phổ (từ nước đầu tiên)",copyRecordFromCurrentPosition:"Sao chép kỳ phổ (từ thế cờ hiện tại)",asKIF:"dưới dạng KIF",asKI2:"dưới dạng KI2",asCSA:"dưới dạng CSA",asUSI:"dưới dạng USI",asUSIUntilCurrentMove:"dưới dạng USI (cho tới nước hiện tại)",asUSIAll:"dưới dạng USI (toàn bộ)",asJSONKifuFormat:"dưới dạng kỳ phổ JSON",asUSEN:"dưới dạng USEN",copyPosition:"Sao chép thế cờ",asSFEN:"dưới dạng SFEN",asBOD:"dưới dạng BOD",pasteRecordOrPosition:"Dán kỳ phổ/thế cờ",pasteRecordMerge:"Dán kỳ phổ (sáp nhập)",toRootPosition:"Về thế cờ ban đầu",toCurrentPosition:"Đến thế trận hiện tại",addSpecialMove:"Chèn nước đi đặc biệt",deleteMoves:"Xóa từ nước hiện tại trở đi",view:"Hiển thị",openLayoutManager:"Mở trình quản lý bố cục",openMonitorWindow:"Mở cửa sổ quản lý",toggleFullScreen:"Bật/tắt toàn màn hình",defaultFontSize:"Cỡ chữ tiêu chuẩn",increaseFontSize:"Cỡ chữ lớn",decreaseFontSize:"Cỡ chữ nhỏ",settings:"Cài đặt",information:"Thông tin",config:"Thiết lập",debug:"Gỡ lỗi",toggleDevTools:"Bật/tắt công cụ nhà phát triển",logFile:"Tệp log",openAppLog:"Mở log ứng dụng",openUSILog:"Mở log USI",openCSALog:"Mở log CSA",tailAppLog:"Kết thúc log ứng dụng",tailUSILog:"Kết thúc log USI",tailCSALog:"Kết thúc log CSA",copyAppLogTailCommand:"Sao chép lệnh kết thúc log ứng dụng",copyUSILogTailCommand:"Sao chép lệnh kết thúc log USI",copyCSALogTailCommand:"Sao chép lệnh kết thúc log CSA",reloadCustomPieceImage:"Tải lại ảnh quân tùy chỉnh",statisticsReport:"Thống kê",nextMoveProblemCollection:"Nước đi tiếp theo",createNextMoveProblemCollection:"Tạo bài tập nước đi tiếp theo",createProblemCollection:"Tạo bộ bài tập",openProblemCollection:"Mở bộ bài tập",nextMoveGenerationCompleted:"Đã tạo xong bộ bài tập nước đi tiếp theo.",noProblemsWereGeneratedAndFileWasNotCreated:"Không có thế cờ nào phù hợp nên tệp bài tập không được tạo.",doYouWantToSaveNProblems:e=>`Bạn có muốn lưu ${e} bài tập đã tạo không?`,doYouWantToStartQuiz:"Bạn có muốn bắt đầu làm bài tập không?",doYouWantToResumeFromWhereYouLeftOff:"Bạn có muốn tiếp tục từ lần trước không?",nextMoveGenerationRequiresAnalyzedRecord:"Tính năng tạo bài tập sẽ trích xuất các nước có thể là sai lầm từ bình luận phân tích, sau đó khởi động phần mềm để tìm nhiều nước đi ứng viên. Vui lòng chạy tính năng phân tích trước để chuẩn bị kỳ phổ có bình luận phân tích.",files:"Số tệp",blunderCandidates:"Nước có thể là sai lầm",adoptedProblems:"Bài tập được chọn",researchedPositions:"Thế cờ đã tính toán lại",recordDirectory:"Thư mục kỳ phổ",winRateDropThreshold:"Mức giảm tỷ lệ thắng",minWinRate:"Đánh giá tối thiểu của thế cờ",adoptionWinRateDiff:"Chênh lệch tỷ lệ thắng để chọn bài tập",acceptableWinRateDiff:"Chênh lệch tỷ lệ thắng của đáp án đúng",maxProblems:"Số bài tập tối đa",outputFile:"Tệp đầu ra",problemNofM:(e,t)=>`Bài ${e} / ${t}`,findTheNextMove:"Nước đi tiếp theo là gì?",showChoices:"Hiển thị lựa chọn",correct:"Đúng",incorrect:"Sai",correctRate:"Tỷ lệ đúng",actualGameMove:"Nước đi trong ván thực tế",thisMoveWasPlayedInTheGame:"Đây là nước đã được đi trong ván thực tế.",doYouWantToTryAgain:"Bạn có muốn thử lại không?",showAnswer:"Xem đáp án",nextProblem:"Bài tiếp theo",previousProblem:"Bài trước",inOrder:"Theo thứ tự",sourceRecord:"Kỳ phổ gốc",launchUSIEngine:"Khởi động phần mềm shogi",connectToCSAServer:"Kết nối với máy chủ CSA",adminMode:"Chế độ nâng cao",inAdminModeManuallyInvokeCommandsAtPrompt:"Trong chế độ nâng cao, bạn phải tự nhập lệnh tại ô nhắc lệnh.",setoptionAndPrecedingCommandsAreSentAutomatically:'"setoption" và các lệnh trước đó sẽ được gửi tự động',serverMustSupportShogiServerX1ModeLogIn:"Máy chủ phải hỗ trợ phương thức đăng nhập x1-mode của shogi-server.",folders:"Thư mục",notification:"Thông báo",notificationTest:"Thử thông báo",thisIsTestNotification:"Đây là thông báo thử",app:"Ứng dụng",log:"Log",cache:"Bộ nhớ đệm",downloadedEngines:"Engine đã tải xuống",help:"Trợ giúp",openWebsite:"Mở trang web",openUserGuide:"Mở hướng dẫn sử dụng",openLatestReleasePage:"Mở trang của bản mới nhất",openStableReleasePage:"Mở trang của bản ổn định",checkForUpdates:"Kiểm tra cập nhật",license:"Giấy phép",inputs:"Đầu vào",outputs:"Đầu ra",format:"Định dạng",formats:"Định dạng",subdirectories:"Thư mục con",separate:"Riêng biệt",merge:"Sáp nhập",createSubdirectories:"Tạo thư mục con",nameConflictAction:"Hành động xung đột tên",numberSuffix:"Hậu tố số",skip:"Bỏ qua",convert:"Chuyển đổi",openLogFile:"Mở tệp log",success:"Thành công",failed:"Thất bại",skipped:"Bỏ qua",game:"Chơi",player:"Kỳ thủ",server:"Máy chủ",selectFromHistory:"Chọn từ lịch sử",noHistory:"Trống",saveHistory:"Lưu lịch sử",version:"Phiên bản",gameProgress:"Tiến triển ván đấu",allGamesCompleted:"Tất cả các ván đã kết thúc",wins:"Thắng",winsOnBlack:"Số ván thắng (Tiên)",winsOnWhite:"Số ván thắng (Hậu)",draws:"Hòa",validGames:"Ván hợp lệ",invalidGames:"Ván không hợp lệ",eloRatingDiff:"Khoảng cách Elo",ignoreDraws:"Bỏ qua ván hòa",zValue:"Giá trị Z",significance5pc:"Độ nổi bật 5%",significance1pc:"Độ nổi bật 1%",gameEnded:"Ván đã kết thúc",offlineGame:"Ván ngoại tuyến",csaOnlineGame:"Ván CSA trực tuyến",csaProtocolOnlineGame:"Ván trực tuyến (phương thức CSA)",csaProtocolV121:"Phương thức CSA tiêu chuẩn 1.2.1",csaProtocolV121WithPVComments:"Phương thức CSA 1.2.1 có bình luận PV",host:"Tên máy chủ",portNumber:"Cổng",password:"Mật khẩu",revealPassword:"Hiện mật khẩu",keepaliveInitialDelay:"Trì hoãn keepalive ban đầu",blankLinePing:"Ping dòng trống",blankLinePingInitialDelay:"Trì hoãn ping dòng trống ban đầu",blankLinePingInterval:"Khoảng thời gian ping dòng trống",logout:"Đăng xuất",calculateJishogiPoints:"Tính điểm bế tắc",jishogiPoints:"Điểm bế tắc",displayGameResults:"Hiển thị kết quả",interrupt:"Dừng",stopGame:"Dừng ván đấu",resign:"Xin thua",draw:"Hòa",impass:"Bế tắc",repetitionDraw:"Hòa do lặp nước",repetition:"Hòa do lặp nước",mate:"Chiếu hết",noMate:"Không chiếu hết",blackWin:"Tiên thắng",whiteWin:"Hậu thắng",all:"Tất cả",others:"Khác",minRate:"Elo thấp nhất",mateSearch:"Tìm chiếu hết",downloaded:"Đã tải xuống",startMateSearch:"Bắt đầu tìm chiếu hết",stopMateSearch:"Dừng tìm chiếu hết",noMateFound:"Không có chiếu hết.",timePerPosition:"Thời gian suy nghĩ",timeout:"Hết giờ",foulWin:"Thắng do nước đi phạm luật",foulLose:"Thua do nước đi phạm luật",enteringOfKing:"Thắng do nhập Ngọc",winByDefault:"Xử thắng",loseByDefault:"Xử thua",winByDeclaration:"Thắng do tuyên bố",declareWin:"Tuyên bố chiến thắng",research:"Tính toán",startResearch:"Bắt đầu tính toán",endResearch:"Dừng tính toán",startEndResearch:"Bắt đầu/Dừng tính toán",recordAnalysis:"Phân tích kỳ phổ",analysis:"Phân tích",analyze:"Phân tích",stopAnalysis:"Dừng phân tích",batchAnalysis:"Phân tích kỳ phổ hàng loạt",currentRecord:"Kỳ phổ hiện tại",skipAnalyzed:"Bỏ qua kỳ phổ đã phân tích",analyzedRecordFilesWillBeOverwritten:"Tệp kỳ phổ sau khi phân tích sẽ bị ghi đè. Vui lòng sao lưu dữ liệu quan trọng trước.",analysisCompleted:"Đã phân tích xong.",noRecordFileFound:"Không tìm thấy tệp kỳ phổ.",searchDuplicatePositions:"Tìm thế cờ lặp lại",duplicatePositionSearch:"Tìm thế cờ lặp lại",duplicatePositions:"Thế cờ lặp lại",duplicatePos:"Lặp lại",via:"Thông qua",lastMove:"Nước liền trước",nextMoves:"Nước liền sau",goToThisPosition:"Đi đến thế cờ này",noDuplicatePositions:"Không có thế cờ lặp lại.",nDuplicatePositionsFound:e=>`Tìm thấy ${e} thế cờ lặp lại.`,appearanceCount:"Số lần lặp lại",showList:"Hiện tất cả",setupPosition:"Xếp thế cờ",changeTurn:"Đổi lượt đi",initializePosition:"Đặt lại thế cờ",changePieceSet:"Tăng giảm quân",setAllPiecesToStandardCounts:"Đặt lại số lượng quân",setAllPiecesToZero:"Đặt tất cả số quân thành 0",addToBlackHandPieceStand:"Thêm vào komadai của Tiên thủ",addToWhiteHandPieceStand:"Thêm vào komadai của Hậu thủ",addToBoard:"Thêm vào bàn cờ",undo:"Hoàn tác",redo:"Làm lại",appSettings:"Cài đặt ứng dụng",language:"Ngôn ngữ",theme:"Chủ đề",standard:"Tiêu chuẩn",green:"Xanh lá",cherryBlossom:"Hoa anh đào",selectColor:"Chọn màu",customImage:"Ảnh tùy chọn",autumn:"Mùa thu",snow:"Tuyết rơi",classic:"Cổ điển",beige:"Màu be",darkGreen:"Xanh lá đậm",dark:"Tối",boardLayout:"Bố cục bàn cờ",compact:"Gọn",portrait:"Dọc",portraitSquare:"Dọc (ô vuông)",piece:"Quân",singleKanjiPiece:"Nhất tự",singleKanjiWoodPiece:"Nhất tự (Gỗ)",singleKanjiGothicPiece:"Nhất tự (Gothic)",singleKanjiDarkPiece:"Nhất tự (Tối)",singleKanjiGothicDarkPiece:"Nhất tự (Gothic, Tối)",twoKanjiPiece:"Nhị tự",imageHasMarginsRemoveForLargerDisplay:"Ảnh có lề (loại bỏ để hiển thị lớn hơn)",backgroundImage:"Ảnh nền",board:"Bàn cờ",pieceStand:"Komadai",woodTexture:"Vân gỗ",lightWoodyTexture:e=>`Vân gỗ (Nhẹ ${e})`,warmWoodTexture:e=>`Vân gỗ (Ấm ${e})`,resin:"Nhựa cây ",transparent:"Trong suốt",boardOpacity:"Độ đục bàn cờ",pieceStandOpacity:"Độ đục komadai",recordOpacity:"Độ đục kỳ phổ",handPieceOrder:"Thứ tự quân trên tay",rookGoldKnightToLeft:"飛・金・桂を左に",rookGoldKnightToRight:"飛・金・桂を右に",promotionSelector:"Chọn phong cấp",centeredHorizontal:"Ngang, căn giữa",promoteFirstVertical:"Dọc, ưu tiên phong cấp",promoteFirstHorizontal:"Ngang, ưu tiên phong cấp",enableDragAndDrop:"Kéo thả quân",highlightMovableSquares:"Hiển thị ô có thể di chuyển",showFileAndRank:"Hiện hàng và cột",showLeftControls:"Hiện điều khiển bên trái",showRightControls:"Hiện điều khiển bên phải",tabViewStyle:"Hiện thẻ",oneColumn:"1 cột",twoColumns:"2 cột",sounds:"Âm thanh",pieceSoundVolume:"Âm lượng quân",clockSoundVolume:"Âm lượng đồng hồ",clockSoundPitch:"Cao độ đồng hồ",clockSoundTarget:"Nước đi có tiếng đồng hồ",anyTurn:"Tất cả",onlyHumanTurn:"Nước của người chơi",defaultRecordFileFormat:"Định dạng kỳ phổ mặc định",textEncoding:"Bộ mã chữ",strict:"Bắt buộc",autoDetect:"Tự động",newlineCharacter:"Ký tự dòng mới",old90sMac:"Mac năm 90",autoSaving:"Tự động lưu",recordFileName:"Tên tệp kỳ phổ",select:"Chọn",shuffle:"Trộn",csaV3Output:"Xuất dưới dạng CSA v3",alwaysOutputUTF8:"Luôn xuất kỳ phổ UTF-8",someOldShogiAppsCannotReadUTF8KifFiles:"Một số phần mềm shogi cũ có thể không đọc được tệp KIF/KI2 có mã hóa UTF-8.",strictDecodingMayFailToReadUTF8KifFiles:"Chế độ mã hóa nghiêm khắc có thể không đọc được tệp KIF/KI2 có mã hóa UTF-8.",positionOfUSIOutput:"Định dạng thế cờ USI",movesOfUSIOutput:"Định dạng kỳ phổ USI",onlySFEN:"Chỉ SFEN",minimal:"Nhỏ nhất",pasteDialog:"Hộp thoại dán",liveDuplicatePositionDetection:"Tự động tìm thế cờ lặp lại",onTheFlyThreshold:"Giá trị On-the-fly",usiProtocol:"Định dạng USI",translateOptionName:"Dịch tên tùy chọn",functionalOnJapaneseOnly:"Chỉ dùng cho bản tiếng Nhật",maxStartupTime:"Thời gian khởi động tối đa",forDevelopers:"Dành cho nhà phát triển",enableAppLog:"Bật log ứng dụng",enableUSILog:"Bật log USI",enableCSALog:"Bật log CSA",logLevel:"Mức độ log",manageEngines:"Quản lý phần mềm",flipBoard:"Xoay bàn cờ",elapsedTimeChart:"Biểu đồ thời gian",controls:"Điều khiển",useUpDownToMove1Ply:"Tiến/lùi nước bằng phím ↑/↓",useLeftRightToMove1Ply:"Tiến/lùi nước bằng phím ←/→",file:"Tệp",folder:"Tập tin",recordFile:"Tệp kỳ phổ",executableFile:"Tệp phần mềm",imageFile:"Tệp ảnh",unsaved:"Chưa lưu",remove:"Xóa",deleteMove:"Xóa nước đi",recordProperties:"Thuộc tính kỳ phổ",comments:"Bình luận",commentsAndBookmarks:"Bình luận & đánh dấu",branches:"Nhánh",branchListMode:"Hiển thị các nhánh",tree:"Dạng cây",previousMoveBranches:"Các nước đã đi",nextMoveBranches:"Nước tiếp theo",bookmark:"Đánh dấu",bookmarkList:"Đánh dấu",moveComments:"Bình luận nước đi",searchLog:"Lịch sử tìm kiếm",pv:"PV",mateShort:"M",displayPVShort:"Đi",evaluation:"Đánh giá",rawScore:"Đ.giá",score:"Đ.giá",estimatedWinRate:"Tỷ lệ thắng ước tính",evaluationAndEstimatedWinRateAndPV:"Đánh giá & tỷ lệ thắng ước tính & PV",swapEachTurnChange:"Đổi mỗi lượt",alwaysSenteIsPositive:"Tiên luôn dương",signOfEvaluation:"Dấu giá trị đánh giá",showArrowScore:"Hiển thị đánh giá trên mũi tên",arrowScoreDiffRange:"Phạm vi đánh giá của mũi tên",maxArrows:"Số mũi tên hiển thị",winRateCoefficient:"Hệ số tỷ lệ thắng",nodeCountFormat:"Hiển thị số node",plainNumber:"Số thường",commaSeparated:"Chia bằng dấu phẩy",monitor:"Theo dõi",hideTabView:"Ẩn",expandTabView:"Mở hiển thị thẻ",sente:"Tiên thủ",senteOrShitate:"Tiên thủ (Hạ thủ)",shitate:"Hạ thủ",gote:"Hậu thủ",goteOrUwate:"Hậu thủ (Thượng thủ)",uwate:"Thượng thủ",targetEngine:"Phần mềm được kiểm tra",baseEngine:"Phần mềm so sánh",swapSenteGote:"Đổi Tiên/Hậu",pieceToss:"Furigoma",opponent:"Đối thủ",level:"Cấp độ",turn:"Lượt đi",currentPosition:"Thế cờ hiện tại",positionList:"Danh sách thế cờ",enableEngineTimeout:"Bật hết giờ phần mềm",setDifferentTimeForGote:"Đặt thời gian khác cho Hậu",nextTurn:"Lượt đi",elapsedTime:"Thời gian dùng tổng cộng",elapsed:"T.gian",rank:"Hạng",depth:"Độ sâu",searchEngine:"Phần mềm",ponder:"Đọc trước",numberOfThreads:"Luồng",threads:"Luồng",suggestionsCount:"Số nước đề xuất",startPosition:"Thế cờ ban đầu",beginFromThisPosition:"Bắt đầu từ thế cờ này",maxMoves:"Số nước tối đa",gameRepetition:"Lặp lại thế cờ",parallelism:"Số ván song song",parallelGame:"Ván song song",jishogi:"Bế tắc",rule24:"Luật 24 điểm",rule27:"Luật 27 điểm",tryRule:"Luật Try",autoRelogin:"Tự động đăng nhập lại",restartItEveryGame:"Khởi động lại mỗi ván",swapTurnWhenGameRepetition:"Đổi lượt đi khi lặp lại nước đi",outputComments:"Xuất bình luận",saveRecordAutomatically:"Tự động lưu kỳ phổ",adjustBoardToHumanPlayer:"Tự động xoay bàn cờ về hướng người chơi",adjustBoardAutomatically:"Tự động xoay bàn cờ",command:"Lệnh",startGame:"Bắt đầu ván cờ",cancelGame:"Hủy ván cờ",allottedTime:"Thời gian",byoyomi:"Byoyomi",increments:"Cộng thời gian",startEndCriteria:"Điều kiện bắt đầu/kết thúc",descending:"Đảo thứ tự",endCriteria1Move:"Điều kiện kết thúc cho mỗi nước đi",outputSettings:"Tùy chọn xuất",noOutputs:"Không xuất",insertCommentToTop:"Chèn phía trước",appendCommentToBottom:"Chèn phía sau",insertToComment:"Chèn vào bình luận",insertToRecord:"Chèn vào kỳ phổ",overwrite:"Ghi đè",fromPrefix:"từ",fromSuffix:"",toPrefix:"tới",toSuffix:"",plyPrefix:"Nước thứ ",plySuffix:"",hoursSuffix:"h",minutesSuffix:"p",secondsSuffix:"s",eg:"vd.",totalMoves:"Tổng số nước",detailSettings:"Cài đặt chi tiết",engineManagement:"Quản lý phần mềm",engineName:"Tên phần mềm",author:"Tác giả",description:"Mô tả",earlyPonder:"Tính nhanh",enginePath:"Đường dẫn phần mềm",openDirectory:"Mở đường dẫn",replaceEnginePath:"Chọn lại đường dẫn phần mềm",displayName:"Tên hiển thị",frontendBook:"Định thức (mở rộng GUI)",moveSelection:"Chọn nước đi",bestMove:"Nước tốt nhất",bookMoveTemperature:"Nhiệt độ (càng nhỏ càng ưu tiên nước tốt nhất)",showAllOptions:"Hiển thị tất cả cài đặt",invoke:"Thực hiện",resetToEngineDefaultValues:"Đặt lại về giá trị ban đầu",defaultValue:"Giá trị mặc định",freeTextUnsafe:"Nhập tự do (không hỗ trợ)",noEngineRegistered:"Không có phần mềm",duplicate:"Sao chép",add:"Thêm",addFromFile:"Thêm từ tệp",downloadEngines:"Tải xuống",downloadAnEngine:"Tải xuống phần mềm",engineDownload:"Tải xuống phần mềm",availableEngines:"Có sẵn",installedEngines:"Đã cài đặt",install:"Cài đặt",reinstall:"Cài đặt lại",uninstall:"Gỡ cài đặt",notInstalled:"Chưa cài đặt",updateAvailable:"Có bản cập nhật",needsRepair:"Cần sửa chữa",unused:"Không sử dụng",inUse:"Đang sử dụng",downloadSize:"Dung lượng tải xuống",wasmEnginePerformanceNotice:"アプリ内ダウンロード機能では、ShogiHomeブラウザ版に搭載しているエンジンデータをダウンロードします。エンジン開発者のサイトで公開しているネイティブ版よりも探索速度が劣ります。",agreeAndDownload:"Đồng ý và tải xuống",sourceCodeURL:"Mã nguồn",noDownloadableEngine:"Không có phần mềm nào để tải xuống.",noInstalledEngine:"Chưa có phần mềm nào được cài đặt.",enginesAddedPleaseSave:'Đã thêm vào danh sách phần mềm. Nhấn "Lưu và đóng" trong màn hình quản lý phần mềm để áp dụng.',enginesUpdatedPleaseSave:'Đã cập nhật phần mềm. Nhấn "Lưu và đóng" trong màn hình quản lý phần mềm để áp dụng.',areYouSureWantToUninstallEngine:e=>`Bạn có muốn xóa các tệp đã tải xuống của ${e} không?`,downloadedFileIsCorrupted:"Tệp đã tải xuống bị hỏng",engineIsInUse:"Phần mềm đang được sử dụng. Vui lòng kết thúc ván cờ hoặc tính toán rồi thử lại.",compareAndMerge:"So sánh/sáp nhập",compareEngineSettings:"So sánh cài đặt phần mềm",noDifference:"Không khác nhau",mergeToLeft:"Sáp nhập sang trái",mergeToRight:"Sáp nhập sang phải",recommended:"Đề xuất",import:"Nhập",saveAndClose:"Lưu và đóng",save:"Lưu",saveAs:"Lưu thành",history:"Lịch sử",clearHistory:"Xóa lịch sử",userFile:"Tệp người dùng",automaticBackup:"Sao lưu tự động",restore:"Khôi phục",filterByFilePathOrContent:"Lọc theo đường dẫn hoặc nội dung tệp",loadingFileContents:"Đang tải tệp...",loadRecordFromWeb:"Tải kỳ phổ từ mạng",backToMainBranch:"Trở về biến chính",fetchLatestData:"Lấy dữ liệu mới nhất",sourceURL:"URL nguồn",ok:"OK",cancel:"Hủy",yes:"Có",no:"Không",back:"Quay lại",doNotShowAgain:"Không hiện lại lần sau",name:"Tên",prediction:"Dự đoán",best:"Tốt nhất",nodes:"Số thế cờ",hashUsage:"Sử dụng hash",stop:"Dừng",resume:"Tiếp tục",noHandicap:"Không chấp",lanceHandicap:"Chấp Thương",rightLanceHandicap:"Chấp Thương phải",bishopHandicap:"Chấp Tượng",rookHandicap:"Chấp Xe",rookLanceHandicap:"Chấp Xe + Thương",twoPiecesHandicap:"Chấp 2 quân",fourPiecesHandicap:"Chấp 4 quân",sixPiecesHandicap:"Chấp 6 quân",eightPiecesHandicap:"Chấp 8 quân",tenPiecesHandicap:"Chấp 10 quân",tsumeShogi:"Tsumeshogi",doubleKingTsumeShogi:"Tsumeshogi 2 vua",startDateTime:"Bắt đầu",endDateTime:"Kết thúc",gameDate:"Ngày",tournament:"Giải đấu",strategy:"Chiến pháp",gameTitle:"Tiêu đề",timeLimit:"Thời gian",blackTimeLimit:"Thời gian (Tiên)",whiteTimeLimit:"Thời gian (Hậu)",place:"Địa điểm",postedOn:"Đăng tại",note:"Ghi chú",senteShortName:"Tiên thủ (ngắn)",goteShortName:"Hậu thủ (ngắn)",scorekeeper:"Người ghi chép",opusNo:"Số hiệu",opusName:"Tên tác phẩm",publishedBy:"Xuất bản bởi",publishedOn:"Ngày xuất bản",source:"Nguồn",numberOfMoves:"Số nước đi",integrity:"Trạng thái",recordCategory:"Thể loại",award:"Giải thưởng",filterByOptionName:"Lọc theo tên tùy chọn",filterByEngineName:"Lọc theo tên phần mềm",bookStyle:"Kiểu sách",bookStyleDiagram:"Hình cờ kiểu sách",gameStyle:"Kiểu bàn cờ",thin:"Mảnh",bold:"Đậm",extraBold:"Siêu đậm",playerName:"Tên kỳ thủ",typeface:"Kiểu chữ",weight:"Độ đậm nhạt",handLabel:"Tên quân trên tay",lastMoveColor:"Màu nước đi cuối",header:"Đầu đề",vertical:"Dọc",size:"Kích cỡ",none:"Không",bgCover:"Hiện đơn",bgContain:"Phóng to",bgTile:"Mảnh ghép",inaccuracy:"Nước đi không chính xác",dubious:"Nước đi không tốt",mistake:"Sai lầm",blunder:"Sai lầm ngớ ngẩn",inaccuracyThreshold:"Ngưỡng nước không chính xác",dubiousThreshold:"Ngưỡng nước không tốt",mistakeThreshold:"Ngưỡng nước sai lầm",blunderThreshold:"Ngưỡng nước sai lầm ngớ ngẩn",maxPVLength:"Số nước đọc hiển thị",commentFormat:"Định dạng chú thích",gothic:"Gothic",mincho:"Minh thể",appVersion:"Phiên bản ứng dụng",installed:"Được cài đặt",stable:"Ổn định",latest:"Mới nhất",backgroundColor:"Màu nền",dialogPosition:"Vị trí hộp thoại",alignLeft:"Trái",alignRight:"Phải",alignCenter:"Giữa",dialogBackdrop:"Nền hộp thoại",record:"Kỳ phổ",book:"Định thức",bookInfo:"Thông tin định thức",resetBook:"Khởi tạo lại định thức",moveEvaluation:"Đánh giá nước đi",forced:"絶対手",goodMove:"Nước đi tốt",yane2016BookFile:"Tệp định thức YaneuraOu",ybbBookFile:"Tệp định thức nhị phân YaneuraOu",shogiGUIBookFile:"Tệp định thức ShogiGUI",aperyBookFile:"Tệp định thức Apery",loadingMode:"Chế độ tải",positionCount:"Số thế cờ",gameCount:"Số ván",statistics:"Thống kê",chart:"Đồ thị",analytics:"Phân tích",controlGroup:"Menu",left:"Trái",top:"Trên",width:"Chiều rộng",height:"Chiều cao",newCustomProfile:"Cài đặt mới",addCustomLayoutProfile:"Thêm cài đặt",duplicateCurrentProfile:"Sao chép cài đặt hiện tại",removeCurrentProfile:"Xóa cài đặt hiện tại",exportProfileToClipboard:"Sao chép cài đặt",importProfileFromClipboard:"Dán cài đặt",editLayoutWithDragAndDrop:"Chỉnh sửa bằng kéo thả",stretchCustomLayout:"Vừa với cửa sổ",profileExportedToClipboard:"Đã xuất cài đặt.",profileImported:"Đã nhập cài đặt.",failedToImportProfile:"Nhập cài đặt thất bại.",rightControlBox:"Menu bên phải",leftControlBox:"Menu bên trái",topControlBox:"Menu bên trên",legends:"Chú giải",historyMode:"Chế độ lịch sử",headers:"Đầu đề",playButton:"Nút phát lại",insert:"Chèn",bringForward:"Đưa lên trên",sendBackward:"Đẩy xuống dưới",move:"Nước đi",bookMove:"Nước định thức",play:"Chơi",edit:"Sửa",addMoves:"Thêm nước đi",export:"Xuất",flippedBook:"Sử dụng book lật ngược",addBookMoves:"Thêm định thức",fromCurrentRecord:"Từ kỳ phổ này",fromFile:"Từ tệp",fromDirectory:"Từ thư mục",noMoves:"Không tìm thấy nước đi.",noComment:"Không có bình luận",register:"Đăng ký",update:"Cập nhật",importAll:"Đăng ký tất cả",doYouWantToImportAllMoves:"Bạn có muốn đăng ký tất cả các nước đi không?",importedMoves:e=>`Đã đăng ký ${e} nước đi vào định thức.`,currentMove:"Nước hiện tại",branchFrom:e=>`Phân nhánh từ nước thứ ${e}`,allPlayers:"Tất cả kỳ thủ",blackPlayerOnly:"Chỉ Tiên",whitePlayerOnly:"Chỉ Hậu",filterByName:"Lọc bằng tên",importScoreFromComment:"Nhập đánh giá từ bình luận",enterPartOfPlayerNameHere:"Nhập một phần tên kỳ thủ",freq:"Tần suất",frequency:"Tần suất xuất hiện",new:"Mới",duplicated:"Trùng lặp",moveEntry:"Nước đã được lưu",updatedAt:"Cập nhật lúc",createdAt:"Tạo lúc",lastSent:"Gửi lần cuối",lastReceived:"Nhận lần cuối",protocolVersion:"Phiên bản phương thức",prompt:"Nhắc lệnh",openPrompt:"Mở nhắc lệnh",forceQuit:"Buộc thoát",forceClose:"Buộc đóng",blankLine:"Dòng trống",autoScroll:"Tự động lướt",showTimestamp:"Hiện dấu thời gian",highlightByPartialMatch:"Đánh dấu trùng một phần",csaServer:"Máy chủ CSA",usiEngine:"Phần mềm USI",noRunningUSIEngine:"Không có phần mềm USI đang chạy.",noConnectedCSAServer:"Không kết nối với máy chủ CSA nào.",willBeRemovedFromTheListSoon:"Trình này đã đóng và sắp bị xóa khỏi danh sách.",typeCommandHereAndPressEnter:"Nhập lệnh tại đây và nhấn Enter.",allowBlankLine:"Cho phép dòng trống",removeSpaceFromBothEnds:"Xóa dấu cách ở hai đầu",collapseSequentialSpaces:"Gộp dấu cách liền nhau",typeCustomTitleHere:"Nhập tiêu đề",typeCustomCommentHere:"Nhập bình luận",displayEmptyElements:"Hiện các mục trống",share:"Chia sẻ",waitingForNewGame:"Đang chờ ván mới.",waitingForPlayerSetup:"Đang chờ người chơi chuẩn bị.",insertedComment:"Đã chèn bình luận.",conversionCompleted:"Chuyển đổi hoàn tất.",human:"Người",randomPlayer:"Người chơi ngẫu nhiên",beginner:"Người mới học",staticRook:"Cư Phi Xa",rangingRook:"Chấn Phi Xa",pleaseSelectEngines:"Vui lòng chọn phần mềm.",thisItemCannotBeMerged:"Mục này không thể sáp nhập.",tryingToConnectAndLoginToCSAServer:"Đang kết nối và đăng nhập vào máy chủ CSA.",inBrowserLogsOutputToConsoleAndIgnoreThisSetting:"*Bản trình duyệt sẽ xuất log ra trình nhắc lệnh và bỏ qua cài đặt này.",shouldRestartToApplyLogSettings:"*Khởi động lại ứng dụng để áp dụng các cài đặt log.",canOpenLogDirectoryFromMenu:'*Bạn có thể mở đường dẫn log qua menu "Gỡ lỗi" - "Mở đường dẫn log".',hasNoOldLogCleanUpFeature:"*Ứng dụng này không có tính năng dọn dẹp. Vui lòng tự xóa log cũ.",shouldRestartToApplyLowLevelSettings:"※ Vui lòng khởi động lại ứng dụng để cập nhật cài đặt mức độ thấp hơn.",processingPleaseWait:"Đang tải, vui lòng chờ.",importingFollowingRecordOrPosition:"Đang nhập kỳ phổ (hoặc thế cờ) dưới đây.",supportsKIF_KI2_CSA_USI_SFEN_JKF_USEN:"*Hỗ trợ KIF, KI2, CSA, USI, SFEN, JKF, và USEN.",pleasePasteRecordIntoTextArea:"*Dán dữ liệu kỳ phổ vào vùng nhập chữ.",pleaseSpecifyPlainTextURL:"*Vui lòng nhập URL thô.",redirectNotSupported:"*Không hỗ trợ chuyển hướng.",desktopVersionPastesAutomatically:"*Bản máy tính sẽ tự động dán.",asNewFile:"Tệp mới",mergeToRootPosition:"Sáp nhập vào thế cờ ban đầu",mergeToCurrentPosition:"Sáp nhập vào thế cờ hiện tại",failedToMergeRecordWithDifferentInitialPosition:"Sáp nhập thất bại do thế cờ bắt đầu khác nhau.",failedToMergeRecordWithDifferentTurn:"Sáp nhập thất bại do lượt đi khác nhau.",earlyPonderFeatureSendsPonderhitCommandWithYaneuraOusNonStandardOptions:'Tính năng tính nhanh gửi lệnh "ponderhit" với các tùy chọn riêng củaYaneuraOu.',ifYourEngineNotSupportTheOptionsItMayCauseUnexpectedBehavior:"Phần mềm của bạn có thể báo lỗi nếu không hỗ trợ cài đặt này.",someLogsDisabled:"Một số tùy chọn log đã bị tắt.",logsRecommendedForCSAProtocol:"Chúng tôi đề xuất bật tùy chọn log cho phương thức CSA.",blankLinePingRecommendedToPreventTimeout:"Nên bật Ping dòng trống để tránh hết thời gian chờ kết nối.",pleaseEnableLogsAndRestart:"Vui lòng bật tùy chọn log và khởi động lại ứng dụng.",hwaEnabled:"Đã bật gia tốc phần cứng (HWA).",hwaIsNotRecommendedForLongGames:"Vui lòng tắt HWA nếu ván cờ kéo dài.",pleaseDisableHWAAndRestart:"Vui lòng tắt HWA trong mục cài đặt và khởi động lại ứng dụng.",notSendPVOnStandardCSAProtocol:"PV không được gửi trong phương thức CSA tiêu chuẩn.",passwordWillSavedPlaintextBecauseOSSideEncryptionNotAvailable:"Mật khẩu sẽ được lưu thô vì hệ điều hành không hỗ trợ mã hóa.",pleaseUncheckSaveHistoryIfNotWantSave:"Vui lòng bỏ chọn lưu lịch sử nếu không muốn lưu.",floodgatePasswordShouldStartWithGameName:"Mật khẩu Floodgate phải bắt đầu bằng tên ván đấu. ",thisIsNotFloodgateOfficialGameName:"Đây không phải tên một ván đấu Floodgate chính thức.",yourPasswordDoesNotMeetFloodgateRequirementsDoYouStillWantToContinue:"Mật khẩu của bạn không đạt điều kiện của Floodgate. Bạn vẫn muốn tiếp tục chứ?",translationHelpNeeded:"Chúng tôi cần bạn giúp đỡ phiên dịch.",restartRequiredAfterLocaleChange:"Khởi động lại ứng dụng để áp dụng ngôn ngữ.",confirmSwitchLanguage:e=>`Bạn có muốn chuyển ngôn ngữ hiển thị sang "${e}" không?`,createDesktopShortcut:"Tạo lối tắt trên desktop",desktopShortcutCreated:"Đã tạo lối tắt trên desktop.",areYouSureWantToResign:"Bạn có thật sự muốn đầu hàng không?",areYouSureWantToDoDeclaration:"Bạn có thật sự muốn tuyên bố không?",areYouSureWantToQuitGames:"Bạn có thật sự muốn bỏ ván không?",areYouSureWantToRequestQuit:"Bạn có thể bị xử thua. Bạn có thật sự muốn yêu cầu rời ván không?",areYouSureWantToClearRecord:"Bạn có thật sự muốn xóa kỳ phổ không?",areYouSureWantToOpenFileInsteadOfCurrentRecord:"Bạn có thật sự muốn ghi đè thế cờ hiện tại không?",areYouSureWantToClearHistory:"Bạn có thật sự muốn xóa lịch sử không?",areYouSureWantToRemoveCurrentProfile:"Bạn có thật sự muốn xóa cài đặt hiện tại không?",yamlFormatSettingsCopiedToClipboard:"Cài đặt đã được sao chép dưới dạng YAML.",jsonFormatSettingsCopiedToClipboard:"Cài đặt đã được sao chép dưới dạng JSON.",usiCsaBridgeCommandCopiedToClipboard:"Lệnh usi-csa-bridge đã được sao chép.",positionImageCopiedToClipboard:"Ảnh thế cờ đã được sao chép.",copiedToClipboard:"Đã sao chép vào bảng tạm.",pastedFromClipboard:"Đã dán từ bảng tạm.",youCanNotCloseAppWhileCSAOnlineGame:"Bạn không thể đóng ứng dụng trong khi đang có ván CSA.",fileExtensionNotSupported:"Không hỗ trợ định dạng này.",errorOccuredWhileDisconnectingFromCSAServer:"Đã có lỗi trong khi ngắt kết nối khỏi máy chủ CSA.",failedToConnectToCSAServer:"Kết nối với máy chủ CSA thất bại.",errorOccuredWhileLogoutFromCSAServer:"Đã có lỗi trong khi đăng xuất khỏi máy chủ CSA.",disconnectedFromCSAServer:"Đã ngắt kết nối khỏi máy chủ CSA.",csaServerLoginDenied:"Đăng nhập vào máy chủ CSA bị từ chối.",thisFeatureNotAvailableOnWebApp:"Tính năng này không có sẵn trên trình duyệt.",failedToLoadEngine:"Tải phần mềm thất bại.",engineRequiresOnline:"Cần kết nối Internet để tải phần mềm.",engineRequiresReload:"Cần tải lại trang để sử dụng phần mềm.",failedToStartNewGame:"Bắt đầu ván mới thất bại.",errorOccuredWhileEndingGame:"Đã có lỗi trong khi kết thúc ván.",failedToSendGoCommand:"Gửi lệnh go thất bại.",failedToSendPonderCommand:"Gửi lệnh ponder thất bại.",failedToSendStopCommand:"Gửi lệnh stop thất bại.",failedToShutdownEngines:"Dừng phần mềm thất bại.",failedToCheckUpdates:"Kiểm tra cập nhật thất bại.",youAreUsingTheLatestVersion:"Bạn đang sử dụng phiên bản mới nhất.",newVersionIsAvailablePressToUpdate:"Đã có phiên bản mới. Nhấn vào đây để cập nhật.",failedToSaveRecord:"Lưu kỳ phổ thất bại.",failedToParseSFEN:"Đọc SFEN thất bại.",failedToDetectRecordFormat:"Xác định định dạng kỳ phổ thất bại.",unknown:"Không rõ",unknownFileExtension:"Định dạng tệp không rõ.",emptyRecordInput:"Kỳ phổ trống.",invalidPieceName:"Tên quân không hợp lệ",invalidTurn:"Lượt đi không hợp lệ",invalidMove:"Nước đi không hợp lệ",invalidMoveNumber:"Số nước đi không hợp lệ",invalidDestination:"Điểm đến không hợp lệ",pieceNotExists:"Quân cờ không tồn tại",invalidLine:"Dòng không hợp lại",invalidBoard:"Bàn cờ không hợp lệ",invalidHandPiece:"Quân trên tay không hợp lệ",invalidUSI:"USI không hợp lệ",engineProcessWasClosedUnexpectedly:"Phần mềm đã bị đóng bất ngờ.",backgroundImageFileNotSelected:"Chưa chọn ảnh nền.",pieceImageFileNotSelected:"Chưa chọn ảnh quân cờ.",boardImageFileNotSelected:"Chưa chọn ảnh bàn cờ.",pieceStandImageFileNotSelected:"Chưa chọn ảnh komadai.",pieceSoundVolumeMustBe0To100Percent:"Âm lượng quân phải từ 0% đến 100%.",clockSoundVolumeMustBe0To100Percent:"Âm lượng đồng hồ phải từ 0% đến 100%.",clockSoundPitchMustBe220To880Hz:"Cao độ đồng hồ phải từ 220Hz đến 880Hz.",engineTimeoutMustBe1To300Seconds:"Hết giờ phần mềm phải từ 1 đến 300 giây.",coefficientInSigmoidMustBeGreaterThan0:"Hệ số phải lớn hơn 0.",inaccuracyThresholdMustBe1To100Percent:"Ngưỡng khó hiểu phải từ 1% đến 100%.",dubiousThresholdMustBe1To100Percent:"Ngưỡng không chính xác phải từ 1% đến 100%.",mistakeThresholdMustBe1To100Percent:"Ngưỡng sai lầm phải từ 1% đến 100%.",blunderThresholdMustBe1To100Percent:"Ngưỡng sai lầm ngớ ngẩn phải từ 1% đến 100%.",recordSavedWithGarbledCharacters:"Kỳ phổ bị lưu với một số ký tự lỗi.",pleaseConsiderToUseKIFU:"Vui lòng cân nhắc sử dụng định dạng KIFU (UTF-8).",youCanChangeDefaultRecordFileFormatFromAppSettings:"Bạn có thể đổi định dạng mặc định trong cài đặt ứng dụng.",inaccuracyThresholdMustBeLessThanDubiousThreshold:"Ngưỡng khó hiểu phải nhỏ hơn ngưỡng không chính xác.",dubiousThresholdMustBeLessThanMistakeThreshold:"Ngưỡng không chính xác phải nhỏ hơn ngưỡng sai lầm.",mistakeThresholdMustBeLessThanBlunderThreshold:"Ngưỡng sai lầm phải nhỏ hơn ngưỡng sai lầm ngớ ngẩn.",thisEngineNotSupportsMateSearch:"Phần mềm này không hỗ trợ đọc chiếu hết.",pleaseEndActiveFeaturesBeforeOpenRecord:"Vui lòng đóng các tính năng đang chạy trước khi mở kỳ phổ.",bothTimeLimitAndByoyomiAreNotSet:"Thời gian và byoyomi chưa được đặt.",canNotUseByoyomiWithFischer:"Bạn không thể dùng byoyomi với chế độ Fischer.",repeatsMustBeOneIfHumanPlayerIncluded:"Nếu có người chơi, số lần lặp lại phải là 1.",parallelismMustBeOneIfHumanPlayerIncluded:"Nếu có người thi đấu, số ván song song phải là 1.",parallelismMustBeOneIfCurrentPositionIsUsed:"Nếu bắt đầu bằng thế cờ hiện tại, số ván song song phải là 1.",parallelismMustLessThanOrEqualToRepeats:"Vui lòng đặt số ván song song không quá số ván liên tục.",protocolVersionNotSelected:"Chưa chọn phiên bản phương thức.",hostNameIsEmpty:"Tên máy chủ trống.",invalidPortNumber:"Cổng không hợp lệ.",idIsEmpty:"Tên người dùng trống.",idContainsSpace:"Tên người dùng chứa dấu cách.",passwordContainsSpace:"Mật khẩu chứa dấu cách.",tcpKeepaliveInitialDelayMustBePositive:"Trì hoãn giữ kết nối TCP ban đầu phải dương.",blankLinePingInitialDelayMustBeGreaterThanOrEqualTo30:"Trì hoãn ping dòng trống ban đầu phải >=30.",blankLinePingIntervalMustBeGreaterThanOrEqualTo30:"Thời gian ping dòng trống phải >=30.",engineNotSelected:"Chưa chọn phần mềm.",forExportingConversionLogPleaseEnableAppLogsAndSetLogLevelDebugAndRestart:"Để xuất log chuyển đổi, vui lòng bật log ứng dụng, đặt cấp độ log thành DEBUG và khởi động lại ứng dụng.",sourceDirectoryNotSpecified:"Đường dẫn nguồn chưa được đặt.",sourceFileMustBeSFEN:"Tên tập tin phải có đuôi .sfen.",sourceFormatsNotSpecified:"Định dạng nguồn chưa được đặt.",destinationDirectoryNotSpecified:"Đường dẫn đến chưa được đặt.",destinationFileNotSpecified:"Tệp đến chưa được đặt.",destinationFileMustBeJSON:"Tệp đầu ra phải có định dạng .json.",anyUnsavedDataWillBeLostDoYouReallyWantToResetBookData:"Tất cả dữ liệu chưa lưu sẽ bị mất. Bạn có muốn đặt lại dữ liệu định thức?",bookMovesWereImported:"Dữ liệu định thức đã được nhập thành công.",anyBookMovesAreUnsavedDoYouReallyWantToDiscardThemAndCloseTheApp:"Có các nước định thức chưa lưu. Bạn có muốn hủy bỏ chúng và đóng ứng dụng?",cannotOverwriteOnTheFlyBook:"Không thể ghi đè lên sách đang sử dụng chế độ On-the-fly.",pleaseSpecifyOtherFileName:"Vui lòng chọn tên tệp khác.",memoryShortageOnBookConversionMayLoseUnsavedData:"Nếu thiếu bộ nhớ trong khi chuyển đổi dữ liệu định thức, dữ liệu chưa lưu có thể bị mất.",cannotConvertAperyBookToOtherFormat:"Không thể chuyển đổi định thức Apery sang định dạng khác.",sourceRecordFileNotSet:"Chưa chỉ định tệp kỳ phổ gốc.",sourceDirectoryNotSet:"Vui lòng chọn một tập tin.",minPlyMustBeLessThanMaxPly:"Số nước ít nhất phải nhỏ hơn số nước lớn nhất.",playerNameNotSet:"Tên người chơi chưa được đặt.",incompatibleOptionsWillBeDiscardedDoYouReallyWantToReplaceTheEnginePath:"Các cài đặt không tương thích sẽ bị xóa bỏ. Bạn có thực sự muốn thay đổi đường dẫn phần mềm?",largeSuggestionsCountMayCausePerformanceDegradation:"Số nước đề xuất quá lớn có thể làm ứng dụng chậm đi đáng kể.",doYouReallyWantToIncreaseTheSuggestionsCount:"Bạn có thực sự muốn tăng số nước đề xuất?",recommendLowerSettingsForDailyUse:"Nên sử dụng cài đặt thấp hơn cho PC thông thường.",checkEngineCompatibilityForNumaEnvironments:"Máy tính này có thể có nhiều ổ CPU hoặc nhóm vi xử lý (NUMA). Các phần mềm không hỗ trợ NUMA có thể bị suy yếu. Vui lòng kiểm tra nếu phần mềm bạn dùng hỗ trợ NUMA.",aiPerformanceMayDegrade:"Tính năng phần mềm có thể suy giảm.",yourPCMayBecomeSlow:"Thao tác PC có thể bị chậm lại.",increasingItMayImproveAIPerformance:"Có thể cải thiện tính năng phần mềm bằng cách tăng lên.",totalNumber:e=>`Tổng: ${e}`,number:e=>""+e,tryToReloginToCSAServerNSecondsLater:e=>`Vui lòng đăng nhập lại sau ${e} giây.`,mateInNPlyDoYouWantToDisplay:e=>`Có chiếu hết trong ${e} nước. Bạn có muốn hiển thị?`,insertedNMovesToRecord:e=>`Đã chèn ${e} nước vào kỳ phổ.`,errorsOccurred:e=>`Đã có ${e} lỗi xảy ra.`,between:(e,t)=>`từ ${e} đến ${t}`,addNthEngine:e=>`Thêm phần mềm thứ ${e}`,copyOf:e=>`Bản sao của ${e}`,keepLatest:e=>`${e} bản mới nhất`,followingDataNotSavedBecauseNotSupporetedBy:e=>`Dữ liệu sau không được lưu vì không được định dạng "${e}" hỗ trợ.`,areYouSureWantToDeleteFollowingMove:e=>`Bạn có muốn xóa nước thứ ${e} trở đi không?`,failedToOpenDirectory:e=>`Mở tệp: ${e} thất bại`,unexpectedEventSenderPleaseReport:e=>`Nguồn sự kiện ngoài dự tính. Vui lòng báo cáo lỗi này cho nhà phát triển. [${e}]`,unexpectedHTTPMethodPleaseReport:e=>`Phương thức HTTP ngoài dự tính. Vui lòng báo cáo lỗi này cho nhà phát triển. [${e}]`,unexpectedRequestURLPleaseReport:e=>`URL yêu cầu ngoài dự tính. Vui lòng báo cáo lỗi này cho nhà phát triển. [${e}]`,noResponseFromEnginePleaseExtendTimeout:e=>`Không có phản hồi từ phần mềm sau ${e} giây. Vui lòng kéo dài thời gian hết giờ trong thẻ "Định dạng USI" của cài đặt ứng dụng nếu phần mềm của bạn chậm.`,stableVersionReleased:e=>`Phiên bản ổn định ${e} đã ra mắt!`,latestVersionReleased:e=>`Phiên bản mới nhất ${e} đã ra mắt!`,doYouReallyWantToRemoveBookMove:e=>`Bạn có thực sự muốn xóa nước định thức ${e}?`,unexpectedRecordFileExtension:e=>`Định dạng kỳ phổ không được hỗ trợ. [${e}]`,fileNotFound:e=>`Không tìm thấy tệp. [${e}]`,directoryNotFound:e=>`Không tìm thấy tập tin. [${e}]`,youCanExitFullScreenByPressing:e=>`Bạn có thể thoát chế độ toàn màn hình bằng cách nhấn phím ${e}.`,skippedMovesInMerge:(e,t)=>`Trong ${t} nước, đã không thể sáp nhập ${e} nước.`,cpuUsageExceedsNPercent:e=>`Đang sử dụng quá ${e}% CPU.`,totalNumberOfThreadsExceedsNPercentOfCpuCores:e=>`Số luồng vượt quá ${e}% số lõi CPU.`,memoryUsageExceedsNPercent:e=>`Sử dụng RAM vượt quá ${e}%.`,memoryUsageIsLessThanNPercent:e=>`Sử dụng RAM ít hơn ${e}%.`,totalUSIHashExceedsNPercentOfMemory:e=>`Tổng USI_HASH vượt quá ${e}% RAM.`,heapUsageExceedsNGBMayHang:e=>`Mức sử dụng bộ nhớ đã vượt quá ${e}GB. Nếu tiếp tục tăng, ứng dụng có thể bị treo.`,settingsFileCorruptedMovedAndReset:(e,t)=>`Tệp cài đặt ${e} bị hỏng nên không thể tải. Tệp bị hỏng đã được chuyển đến ${t} và cài đặt mặc định sẽ được sử dụng.`};o.d(t,["vi",0,n])},6566(e,t,o){const n={shogiHome:"ShogiHome",clear:"清除",open:"開啟",openNewInstance:"開啟新的 ShogiHome 視窗",saveOverwrite:"覆蓋檔案",newRecord:"新棋譜",newRecordKeepInitialPosition:"新棋譜(保留初手局面)",newRecordHirateSetup:"新棋譜(平手初形)",openRecord:"打開棋譜",saveRecord:"保存棋譜",saveRecordAs:"另存棋譜",openAutoSaveDirectory:"打開自動保存目錄",exportPositionDiagram:"輸出局面圖",positionImage:"局面圖",batchConversion:"棋譜大量轉換",recordFileBatchConversion:"棋譜大量轉換",close:"關閉",quit:"離開",reload:"重新載入",editing:"編輯",copyAsKIF:"複製KIF棋譜",copyAsKI2:"複製KI2棋譜",copyAsCSA:"複製CSA棋譜",copyAsUSI:"複製USI棋譜",copyAsSFEN:"複製SFEN局面",copyAsBOD:"複製BOD局面",copyAsJKF:"複製JKF棋譜",copyAsUSEN:"複製USEN棋譜",copy:"拷貝",cut:"剪下",paste:"貼上",copyRecordAll:"複製棋譜(自初手局面)",copyRecordFromCurrentPosition:"複製棋譜(自目前局面)",asKIF:"KIF形式",asKI2:"KI2形式",asCSA:"CSA形式",asUSI:"USI形式",asUSIUntilCurrentMove:"USI形式(到目前手數為止)",asUSIAll:"USI形式(全部)",asJSONKifuFormat:"JSON Kifu Format",asUSEN:"USEN形式",copyPosition:"複製局面",asSFEN:"SFEN形式",asBOD:"BOD形式",pasteRecordOrPosition:"貼上棋譜、局面",pasteRecordMerge:"棋譜貼上(合併)",toRootPosition:"自棋譜開頭合併",toCurrentPosition:"自目前局面合併",addSpecialMove:"特殊手",deleteMoves:"刪除現在位置後的棋譜",view:"表示",openLayoutManager:"開啟佈局管理員",openMonitorWindow:"監視視窗",toggleFullScreen:"切換全螢幕",defaultFontSize:"預設字體尺寸",increaseFontSize:"增加字體尺寸",decreaseFontSize:"縮小字體尺寸",settings:"設定",information:"資訊",config:"設定",debug:"偵錯",toggleDevTools:"打開/關閉開發者工具顯示",logFile:"紀錄檔",openAppLog:"開啟程式紀錄檔",openUSILog:"開啟USI通訊紀錄檔",openCSALog:"開啟CSA通訊紀錄檔",tailAppLog:"即時顯示程式紀錄",tailUSILog:"即時顯示USI通訊紀錄",tailCSALog:"即時顯示CSA通訊紀錄",copyAppLogTailCommand:"複製即時顯示程式紀錄指令",copyUSILogTailCommand:"複製即時顯示USI通訊紀錄指令",copyCSALogTailCommand:"複製即時顯示CSA通訊紀錄指令",reloadCustomPieceImage:"重整自訂棋駒圖片",statisticsReport:"統計報告",nextMoveProblemCollection:"下一手",createNextMoveProblemCollection:"建立下一手問題集",createProblemCollection:"建立問題集",openProblemCollection:"開啟問題集",nextMoveGenerationCompleted:"下一手問題集建立完成。",noProblemsWereGeneratedAndFileWasNotCreated:"由於沒有可採用的局面,未建立問題集檔案。",doYouWantToSaveNProblems:e=>`要保存已建立的 ${e} 題嗎?`,doYouWantToStartQuiz:"要開始出題嗎?",doYouWantToResumeFromWhereYouLeftOff:"要從上次中斷處繼續嗎?",nextMoveGenerationRequiresAnalyzedRecord:"問題集建立功能會先從解析備註中擷取惡手候補,再啟動引擎求出多個候補手。請事先執行解析功能,準備附有解析備註的棋譜。",files:"檔案數",blunderCandidates:"惡手候補",adoptedProblems:"已採用的問題",researchedPositions:"已重新探索的局面",recordDirectory:"棋譜目錄",winRateDropThreshold:"勝率下降幅度",minWinRate:"目標局面評價下限",adoptionWinRateDiff:"採用判定的勝率差",acceptableWinRateDiff:"正解範圍的勝率差",maxProblems:"問題數上限",outputFile:"輸出檔案",problemNofM:(e,t)=>`問題 ${e} / ${t}`,findTheNextMove:"下一手是?",showChoices:"顯示選項",correct:"正確",incorrect:"錯誤",correctRate:"正確率",actualGameMove:"實戰棋步",thisMoveWasPlayedInTheGame:"這是實戰中下出的棋步。",doYouWantToTryAgain:"要再挑戰一次嗎?",showAnswer:"查看答案",nextProblem:"下一題",previousProblem:"上一題",inOrder:"依序",sourceRecord:"出處棋譜",launchUSIEngine:"啟動USI引擎",connectToCSAServer:"連接CSA伺服器",adminMode:"管理模式",inAdminModeManuallyInvokeCommandsAtPrompt:"在管理模式下,您需要手動輸入指令方可執行。",setoptionAndPrecedingCommandsAreSentAutomatically:"setoption 之前的指令將會被自動發送。",serverMustSupportShogiServerX1ModeLogIn:"對應的 shogi-server 必須支援擴展 (x1) 登入模式。",folders:"資料夾",notification:"通知",notificationTest:"通知測試",thisIsTestNotification:"這是測試用的通知。",app:"軟體",log:"紀錄檔",cache:"快取",downloadedEngines:"已下載的引擎",help:"協助",openWebsite:"官方網站",openUserGuide:"使用教學",openLatestReleasePage:"前往最新版發布頁面",openStableReleasePage:"前往安定版發布頁面",checkForUpdates:"檢查更新",license:"授權條款",inputs:"輸入目錄",outputs:"輸出目錄",format:"格式",formats:"格式",subdirectories:"子目錄",separate:"個別",merge:"合併",createSubdirectories:"建立子目錄",nameConflictAction:"名稱衝突處理方式",numberSuffix:"附加編號",skip:"跳過該檔案",convert:"開始轉換",openLogFile:"打開記錄檔案",success:"成功",failed:"失敗",skipped:"跳過",game:"對局",player:"玩家",server:"伺服器",selectFromHistory:"從紀錄選取",noHistory:"目前沒有紀錄",saveHistory:"保存紀錄",version:"版本",gameProgress:"對局過程",allGamesCompleted:"連續對局結束",wins:"勝利數目",winsOnBlack:"勝場(先手)",winsOnWhite:"勝場(後手)",draws:"平手數目",validGames:"有效對局數",invalidGames:"無效對局數",eloRatingDiff:"等級分相差",ignoreDraws:"忽略平手對局",zValue:"Z值",significance5pc:"顯著性水準5%",significance1pc:"顯著性水準1%",gameEnded:"對局結束",offlineGame:"本地(單機)對局",csaOnlineGame:"通訊對局(CSA)",csaProtocolOnlineGame:"通訊對局(CSA協定)",csaProtocolV121:"CSA協定 1.2.1 標準",csaProtocolV121WithPVComments:"CSA協定 1.2.1 +思考註解",host:"連接之伺服器",portNumber:"連接埠號碼",password:"密碼",revealPassword:"顯示密碼",keepaliveInitialDelay:"Keepalive初始延遲",blankLinePing:"空行Ping",blankLinePingInitialDelay:"空行Ping初始延遲",blankLinePingInterval:"空行Ping間隔",logout:"登出",calculateJishogiPoints:"計算持將棋點數",jishogiPoints:"持將棋點數",displayGameResults:"確認戰績",interrupt:"中斷",stopGame:"對局中斷",resign:"投了",draw:"平手",impass:"持將棋",repetitionDraw:"千日手",repetition:"千日手",mate:"詰死",noMate:"無詰",blackWin:"先手勝利",whiteWin:"後手勝利",all:"全部",others:"其他",minRate:"最低等級分",mateSearch:"詰搜尋",downloaded:"已下載",startMateSearch:"開始詰搜尋",stopMateSearch:"結束詰搜尋",noMateFound:"在目前的盤面中找不到詰。",timePerPosition:"思考時間",timeout:"時間耗盡",foulWin:"反則勝利",foulLose:"反則敗北",enteringOfKing:"入玉勝利",winByDefault:"不戰勝",loseByDefault:"不戰敗",winByDeclaration:"勝利宣言",declareWin:"勝利宣言",research:"檢討",startResearch:"檢討開始",endResearch:"結束檢討",startEndResearch:"檢討開始/結束",recordAnalysis:"棋譜解析",analysis:"解析",analyze:"解析開始",stopAnalysis:"中斷解析",batchAnalysis:"連續棋譜解析",currentRecord:"目前棋譜",skipAnalyzed:"跳過已解析",analyzedRecordFilesWillBeOverwritten:"解析後的棋譜檔案將被覆寫。重要資料請事先備份。",analysisCompleted:"解析完成。",noRecordFileFound:"找不到目標棋譜檔案。",searchDuplicatePositions:"搜尋相同局面",duplicatePositionSearch:"相同局面搜尋",duplicatePositions:"相同局面",duplicatePos:"相同局面",via:"經由",lastMove:"前一手",nextMoves:"下一手",goToThisPosition:"移動至此局面",noDuplicatePositions:"沒有重複的局面。",nDuplicatePositionsFound:e=>`找到 ${e} 個重複的局面。`,appearanceCount:"出現次數",showList:"顯示一覽",setupPosition:"編輯局面",changeTurn:"變更手番",initializePosition:"初始化局面",changePieceSet:"調整棋駒數",setAllPiecesToStandardCounts:"將全部棋駒設為平手數量",setAllPiecesToZero:"將全部棋駒設為 0",addToBlackHandPieceStand:"加入先手駒台",addToWhiteHandPieceStand:"加入後手駒台",addToBoard:"加入棋盤",undo:"復原",redo:"重做",appSettings:"程式設定",language:"語言",theme:"主題",standard:"標準",green:"綠色",cherryBlossom:"櫻花",selectColor:"選擇顏色",customImage:"自定義圖片",autumn:"紅葉",snow:"雪",classic:"經典",beige:"米色",darkGreen:"深綠",dark:"深色主題",boardLayout:"棋盤設計",compact:"緊湊",portrait:"直向",portraitSquare:"直向(正方形格)",piece:"棋駒",singleKanjiPiece:"一文字駒",singleKanjiWoodPiece:"一文字駒(木目)",singleKanjiGothicPiece:"一文字駒(黑體)",singleKanjiDarkPiece:"一文字駒(深色)",singleKanjiGothicDarkPiece:"一文字駒(黑體・深色)",twoKanjiPiece:"二文字駒",imageHasMarginsRemoveForLargerDisplay:"圖片含有透明邊界(去除後圖片會略為放大)",backgroundImage:"背景圖片",board:"棋盤",pieceStand:"駒台",woodTexture:"木目",lightWoodyTexture:e=>`木目(亮色${e})`,warmWoodTexture:e=>`木目(暖色${e})`,resin:"樹脂",transparent:"透明",boardOpacity:"盤面不透明度",pieceStandOpacity:"駒台不透明度",recordOpacity:"棋譜不透明度",handPieceOrder:"持駒排列順序",rookGoldKnightToLeft:"飛・金・桂靠左",rookGoldKnightToRight:"飛・金・桂靠右",promotionSelector:"成變、不成對話框顯示",centeredHorizontal:"水平置中",promoteFirstVertical:"垂直(成變優先)",promoteFirstHorizontal:"水平(成變優先)",enableDragAndDrop:"棋駒拖曳操作",highlightMovableSquares:"顯示可移動的格子",showFileAndRank:"顯示段・筋",showLeftControls:"顯示左側操作按鈕",showRightControls:"顯示右側操作按鈕",tabViewStyle:"分頁顯示形式",oneColumn:"1列",twoColumns:"2列",sounds:"音效",pieceSoundVolume:"棋駒音效",clockSoundVolume:"棋鐘音效大小",clockSoundPitch:"棋鐘音效頻率",clockSoundTarget:"棋鐘音效對象",anyTurn:"所有手番",onlyHumanTurn:"只有玩家手番",defaultRecordFileFormat:"預設保存格式",textEncoding:"文字編碼",strict:"檔案原始編碼",autoDetect:"自動判定",newlineCharacter:"換行符號",old90sMac:"90年代Mac",autoSaving:"自動保存",recordFileName:"棋譜檔案名稱",select:"選擇",shuffle:"隨機",csaV3Output:"使用 CSA V3 輸出",alwaysOutputUTF8:"總是以 UTF-8 輸出",someOldShogiAppsCannotReadUTF8KifFiles:"部分舊版將棋軟體可能無法讀取 UTF-8 編碼的 KIF・KI2 檔案。",strictDecodingMayFailToReadUTF8KifFiles:"文字編碼設定為「檔案原始編碼」時,可能無法讀取以 UTF-8 輸出的 KIF・KI2 檔案。",positionOfUSIOutput:"USI 局面紀錄格式",movesOfUSIOutput:"USI 棋譜紀錄格式",onlySFEN:"只有 SFEN",minimal:"最小限度",pasteDialog:"貼上視窗",liveDuplicatePositionDetection:"隨時偵測相同局面",onTheFlyThreshold:"On-the-fly 門檻",usiProtocol:"USI協定",translateOptionName:"選項名稱翻譯",functionalOnJapaneseOnly:"只有在日文選擇時有效",maxStartupTime:"最大起動等待時間",forDevelopers:"開發者用",enableAppLog:"輸出程式紀錄",enableUSILog:"輸出USI通訊紀錄",enableCSALog:"輸出CSA通訊紀錄",logLevel:"紀錄等級",manageEngines:"引擎設定",flipBoard:"盤面反轉",elapsedTimeChart:"消費時間圖表",controls:"操作",useUpDownToMove1Ply:"使用↑/↓鍵移動1手",useLeftRightToMove1Ply:"使用←/→鍵移動1手",file:"檔案",folder:"資料夾",recordFile:"棋譜檔案",executableFile:"可執行檔案",imageFile:"圖片檔案",unsaved:"未保存",remove:"刪除",deleteMove:"刪除該手",recordProperties:"棋譜情報",comments:"備註",commentsAndBookmarks:"備註・書籤",branches:"分支",branchListMode:"分支顯示",tree:"樹狀",previousMoveBranches:"已下棋步",nextMoveBranches:"下一手",bookmark:"書籤",bookmarkList:"書籤一覽",moveComments:"棋步備註",searchLog:"思考",pv:"預測手順",mateShort:"詰",displayPVShort:"再現",evaluation:"評價值",rawScore:"評價値",score:"評價値",estimatedWinRate:"期待勝率",evaluationAndEstimatedWinRateAndPV:"評價値・期待勝率・預測手順",swapEachTurnChange:"手番側有利時為正值",alwaysSenteIsPositive:"先手有利時為正值",signOfEvaluation:"評價值符號",showArrowScore:"在箭頭上顯示評價值",arrowScoreDiffRange:"箭頭評價值範圍",maxArrows:"箭頭顯示數量",winRateCoefficient:"勝率換算係數",nodeCountFormat:"節點數格式",plainNumber:"純數字",commaSeparated:"逗號分隔",monitor:"引擎監視",hideTabView:"最小化",expandTabView:"展開分頁",sente:"先手",senteOrShitate:"先手(下手)",shitate:"下手",gote:"後手",goteOrUwate:"後手(上手)",uwate:"上手",targetEngine:"受測引擎",baseEngine:"基準引擎",swapSenteGote:"先後交換",pieceToss:"振駒",opponent:"對手",level:"等級",turn:"手番",currentPosition:"現在局面",positionList:"局面列表",enableEngineTimeout:"開啟引擎時間限制",setDifferentTimeForGote:"先後手時間不相同",nextTurn:"手番",elapsedTime:"消費時間",elapsed:"經過時間",rank:"順位",depth:"深度",searchEngine:"引擎",ponder:"對方手番時運算 (Ponder)",numberOfThreads:"執行緒數",threads:"執行緒",suggestionsCount:"候補手數量",startPosition:"開始局面",beginFromThisPosition:"自此局面開始",maxMoves:"最大手數",gameRepetition:"連續對局",parallelism:"並行數",parallelGame:"並行對局",jishogi:"持將棋",rule24:"24點法",rule27:"27點法",tryRule:"Try Rule",autoRelogin:"自動重新登入",restartItEveryGame:"每局重新啟動",swapTurnWhenGameRepetition:"每局交換手番",outputComments:"輸出備註",saveRecordAutomatically:"自動保存棋譜",adjustBoardToHumanPlayer:"調整到玩家所在方向",adjustBoardAutomatically:"自動調整盤面方向",command:"指令",startGame:"對局開始",cancelGame:"取消對局",allottedTime:"持時間",byoyomi:"讀秒",increments:"增秒",startEndCriteria:"開始・結束條件",descending:"倒序",endCriteria1Move:"局面結束條件",outputSettings:"輸出設定",noOutputs:"不輸出",insertCommentToTop:"加入到前方",appendCommentToBottom:"在後方新增",insertToComment:"加入到備註欄",insertToRecord:"加入到棋譜",overwrite:"覆寫原檔案",fromPrefix:"從",fromSuffix:"",toPrefix:"到",toSuffix:"",plyPrefix:"第",plySuffix:"手",hoursSuffix:"小時",minutesSuffix:"分",secondsSuffix:"秒",eg:"例如",totalMoves:"總手數",detailSettings:"詳細設定",engineManagement:"引擎管理",engineName:"引擎名稱",author:"作者",description:"說明",earlyPonder:"預先Ponder",enginePath:"場所",openDirectory:"開啟資料夾",replaceEnginePath:"重新選擇引擎",displayName:"表示名稱",frontendBook:"定跡(GUI擴充)",moveSelection:"棋步選擇",bestMove:"最善手",bookMoveTemperature:"溫度(越小越優先最善手)",showAllOptions:"顯示所有選項",invoke:"執行",resetToEngineDefaultValues:"回復至引擎預設設定",defaultValue:"預設値",freeTextUnsafe:"自由輸入(不建議)",noEngineRegistered:"尚未登錄引擎。",duplicate:"複製",add:"追加",addFromFile:"從檔案新增",downloadEngines:"下載",downloadAnEngine:"下載引擎",engineDownload:"引擎下載",availableEngines:"可取得",installedEngines:"已安裝",install:"安裝",reinstall:"重新安裝",uninstall:"解除安裝",notInstalled:"未安裝",updateAvailable:"有更新",needsRepair:"需要修復",unused:"未使用",inUse:"使用中",downloadSize:"下載大小",wasmEnginePerformanceNotice:"アプリ内ダウンロード機能では、ShogiHomeブラウザ版に搭載しているエンジンデータをダウンロードします。エンジン開発者のサイトで公開しているネイティブ版よりも探索速度が劣ります。",agreeAndDownload:"同意並下載",sourceCodeURL:"原始碼",noDownloadableEngine:"沒有可下載的引擎。",noInstalledEngine:"沒有已安裝的引擎。",enginesAddedPleaseSave:"已加入引擎列表。請在引擎管理畫面按下「保存並關閉」以確定變更。",enginesUpdatedPleaseSave:"已更新引擎。請在引擎管理畫面按下「保存並關閉」以確定變更。",areYouSureWantToUninstallEngine:e=>`要刪除 ${e} 已下載的檔案嗎?`,downloadedFileIsCorrupted:"下載的檔案已損壞",engineIsInUse:"引擎正在使用中。請結束對局或檢討後再試一次。",compareAndMerge:"比較並合併",compareEngineSettings:"引擎設定比較",noDifference:"無更改",mergeToLeft:"合併至左側",mergeToRight:"合併至右側",recommended:"推薦",import:"匯入",saveAndClose:"保存並關閉",save:"保存",saveAs:"另存為",history:"歷史紀錄",clearHistory:"清除歷史紀錄",userFile:"使用者檔案",automaticBackup:"自動備份",restore:"復原",filterByFilePathOrContent:"以檔案路徑或內容搜尋",loadingFileContents:"正在讀取檔案...",loadRecordFromWeb:"從網際網路取得棋譜",backToMainBranch:"回到本譜",fetchLatestData:"取得最新資料",sourceURL:"來源網址",ok:"OK",cancel:"取消",yes:"是",no:"否",back:"返回",doNotShowAgain:"不再顯示",name:"名稱",prediction:"預測",best:"最善",nodes:"Node數",hashUsage:"Hash使用率",stop:"停止",resume:"重新開始",noHandicap:"平手",lanceHandicap:"香落",rightLanceHandicap:"右香落",bishopHandicap:"角落",rookHandicap:"飛車落",rookLanceHandicap:"飛車香落",twoPiecesHandicap:"二枚落",fourPiecesHandicap:"四枚落",sixPiecesHandicap:"六枚落",eightPiecesHandicap:"八枚落",tenPiecesHandicap:"十枚落",tsumeShogi:"詰將棋",doubleKingTsumeShogi:"雙玉詰將棋",startDateTime:"開始日時",endDateTime:"結束日時",gameDate:"對局日",tournament:"棋戰",strategy:"戰型",gameTitle:"標題",timeLimit:"限時",blackTimeLimit:"先手限時",whiteTimeLimit:"後手限時",place:"地點",postedOn:"登錄於",note:"備註",senteShortName:"先手省略名",goteShortName:"後手省略名",scorekeeper:"記錄員",opusNo:"作品編號",opusName:"作品名",publishedBy:"發表於",publishedOn:"發表年月",source:"來源",numberOfMoves:"手數",integrity:"完全性",recordCategory:"分類",award:"受賞",filterByOptionName:"搜尋設定名稱",filterByEngineName:"搜尋引擎名稱",bookStyle:"書籍風",bookStyleDiagram:"書籍風局面圖",gameStyle:"對局畫面風",thin:"細",bold:"粗",extraBold:"特粗",playerName:"對局者名稱",typeface:"字體",weight:"字體粗細",handLabel:"持駒標題",lastMoveColor:"最後一手的顏色",header:"標題",vertical:"垂直調整",size:"大小",none:"無",bgCover:"圖片置中",bgContain:"擴大表示",bgTile:"磁磚狀表示",inaccuracy:"緩手",dubious:"疑問手",mistake:"惡手",blunder:"大惡手",inaccuracyThreshold:"緩手閾値",dubiousThreshold:"疑問手閾値",mistakeThreshold:"惡手閾値",blunderThreshold:"大惡手閾値",maxPVLength:"PV表示手數",commentFormat:"註解形式",gothic:"黑體",mincho:"明體",appVersion:"軟體版本",installed:"已安裝",stable:"安定版",latest:"最新版",backgroundColor:"背景顏色",dialogPosition:"對話窗顯示位置",alignLeft:"左側",alignRight:"右側",alignCenter:"置中",dialogBackdrop:"對話窗背景",record:"棋譜",book:"定跡",bookInfo:"定跡資訊",resetBook:"初始化定跡",moveEvaluation:"棋步評價",forced:"絶対手",goodMove:"好手",yane2016BookFile:"やねうら王定跡檔案",ybbBookFile:"やねうら王二進位定跡檔案",shogiGUIBookFile:"ShogiGUI 定跡檔案",aperyBookFile:"Apery 定跡檔案",loadingMode:"讀取模式",positionCount:"局面數",gameCount:"對局數",statistics:"統計",chart:"圖表",analytics:"解析",controlGroup:"選單",left:"左方間隔",top:"上方間隔",width:"寬度",height:"高度",newCustomProfile:"新增佈局設定",addCustomLayoutProfile:"新增佈局設定",duplicateCurrentProfile:"複製目前佈局設定",removeCurrentProfile:"移除該佈局設定",exportProfileToClipboard:"將佈局設定複製至剪貼板",importProfileFromClipboard:"自剪貼板匯入佈局設定",editLayoutWithDragAndDrop:"拖曳編輯",stretchCustomLayout:"配合視窗大小",profileExportedToClipboard:"該佈局已複製至剪貼板。",profileImported:"該佈局已成功匯入。",failedToImportProfile:"佈局匯入失敗。",rightControlBox:"右側選單",leftControlBox:"左側選單",topControlBox:"操作按鈕",legends:"圖例",historyMode:"歷史模式",headers:"解析表頭",playButton:"再現按鈕",insert:"插入",bringForward:"移至前方",sendBackward:"移至後方",move:"著手",bookMove:"定跡手",play:"著手",edit:"編輯",addMoves:"新增該手",export:"匯出",flippedBook:"亦檢索先後逆局面",addBookMoves:"增加定跡手",fromCurrentRecord:"從現在棋譜",fromFile:"從檔案",fromDirectory:"從檔案目錄",noMoves:"沒有棋步。",noComment:"無備註",register:"登錄",update:"更新",importAll:"全部登錄",doYouWantToImportAllMoves:"要登錄所有棋步嗎?",importedMoves:e=>`已將 ${e} 手登錄至定跡。`,currentMove:"目前棋步",branchFrom:e=>`自${e}手目分岐`,allPlayers:"所有對局者",blackPlayerOnly:"僅先手",whitePlayerOnly:"僅後手",filterByName:"使用名稱過濾",importScoreFromComment:"從備註匯入評價值",enterPartOfPlayerNameHere:"輸入對局者名稱",freq:"出現次數",frequency:"出現次數",new:"新增",duplicated:"重複",moveEntry:"匯入手數",updatedAt:"更新時間",createdAt:"建立時間",lastSent:"最後送出",lastReceived:"最後接收",protocolVersion:"協定版本",prompt:"指令",openPrompt:"打開指令視窗",forceQuit:"強制退出",forceClose:"強制關閉",blankLine:"空行",autoScroll:"自動捲動",showTimestamp:"顯示時間戳章",highlightByPartialMatch:"反白部分一致部分",csaServer:"CSA伺服器",usiEngine:"USI引擎",noRunningUSIEngine:"目前沒有啟動中的USI引擎。",noConnectedCSAServer:"尚未連接CSA伺服器。",willBeRemovedFromTheListSoon:"由於 Session 結束,將會自一覽清除。",typeCommandHereAndPressEnter:"輸入指令後按下 Enter 以發送",allowBlankLine:"允許空行",removeSpaceFromBothEnds:"消除前後空白",collapseSequentialSpaces:"整理連續空白",typeCustomTitleHere:"輸入自定義標題",typeCustomCommentHere:"在此輸入備註",displayEmptyElements:"顯示未定義資料",share:"分享",waitingForNewGame:"正在等待下一場對局開始。",waitingForPlayerSetup:"正在等待對局者準備。",insertedComment:"已加入備註。",conversionCompleted:"轉換完成。",human:"人",randomPlayer:"隨機玩家",beginner:"初學者",staticRook:"居飛車",rangingRook:"振飛車",pleaseSelectEngines:"請選擇引擎。",thisItemCannotBeMerged:"該項目無法被合併。",tryingToConnectAndLoginToCSAServer:"正在連接並登入CSA伺服器。",inBrowserLogsOutputToConsoleAndIgnoreThisSetting:"※在瀏覽器版本中紀錄會於 console 中顯示,並無視此處的設定。",shouldRestartToApplyLogSettings:"※您需要重新啟動本程式以使用變更後的紀錄設定。",canOpenLogDirectoryFromMenu:"※紀錄的輸出檔案可以在「偵錯」-「開啟紀錄檔案資料夾」開啟。",hasNoOldLogCleanUpFeature:"※現在並沒有舊紀錄的自動刪除機制。",shouldRestartToApplyLowLevelSettings:"※您需要重新啟動本應用程式以反映底層設定。",processingPleaseWait:"現在處理中。請稍待一會。",importingFollowingRecordOrPosition:"將匯入以下棋譜(局面)。",supportsKIF_KI2_CSA_USI_SFEN_JKF_USEN:"※支援KIF/KI2/CSA/USI/SFEN/JKF/USEN形式。",pleasePasteRecordIntoTextArea:"※請在文字輸入區域貼上您的棋譜。",pleaseSpecifyPlainTextURL:"※請輸入您要使用的URL。",redirectNotSupported:"※無法使用重新導向連結。",desktopVersionPastesAutomatically:"※安裝程式版將會自動貼上棋譜。",asNewFile:"視為新檔案",mergeToRootPosition:"自棋譜開頭合併",mergeToCurrentPosition:"自目前局面合併",failedToMergeRecordWithDifferentInitialPosition:"無法合併初始盤面不同之棋譜。",failedToMergeRecordWithDifferentTurn:"無法合併手番不同之棋譜。",earlyPonderFeatureSendsPonderhitCommandWithYaneuraOusNonStandardOptions:"早期 Ponder 機能將會發送やねうら王自行定義之 ponderhit 指令。",ifYourEngineNotSupportTheOptionsItMayCauseUnexpectedBehavior:"若您的引擎不支援該指令,可能會有預期外之行為發生。",someLogsDisabled:"部份 log 已被無效化。",logsRecommendedForCSAProtocol:"若使用CSA協定對局,建議輸出各項紀錄。",blankLinePingRecommendedToPreventTimeout:"為防止連線逾時,建議啟用空行Ping。",pleaseEnableLogsAndRestart:"請在程式設定中開啟紀錄並重新啟動本程式。",hwaEnabled:"已啟用 HWA(硬體加速)。",hwaIsNotRecommendedForLongGames:"長時間對局時建議停用 HWA。",pleaseDisableHWAAndRestart:"請在程式設定中停用 HWA 並重新啟動本程式。",notSendPVOnStandardCSAProtocol:"在標準的CSA協定中不會送出評價值以及思考棋步。",passwordWillSavedPlaintextBecauseOSSideEncryptionNotAvailable:"由於無法使用系統的加密機能,輸入的密碼將會以明文保存。",pleaseUncheckSaveHistoryIfNotWantSave:"若不想保存密碼,請不要將「保存紀錄」勾選。",floodgatePasswordShouldStartWithGameName:"Floodgate密碼必須以對局名稱開頭。",thisIsNotFloodgateOfficialGameName:"這不是Floodgate官方之對局名稱。",yourPasswordDoesNotMeetFloodgateRequirementsDoYouStillWantToContinue:"密碼可能不符合Floodgate之要求。您仍要繼續嗎?",translationHelpNeeded:"我們正在招募翻譯人員。",restartRequiredAfterLocaleChange:"更改語言後,請重新啟動本程式。",confirmSwitchLanguage:e=>`要將顯示語言切換為「${e}」嗎?`,createDesktopShortcut:"在桌面建立捷徑",desktopShortcutCreated:"已在桌面建立捷徑。",areYouSureWantToResign:"確定要投了嗎?",areYouSureWantToDoDeclaration:"確定要進行勝利宣言嗎?",areYouSureWantToQuitGames:"要中斷連續對局嗎?",areYouSureWantToRequestQuit:"若提出中斷要求,可能會被判負。請問您要繼續嗎?",areYouSureWantToClearRecord:"將會刪除現在的棋譜。請問您要繼續嗎?",areYouSureWantToOpenFileInsteadOfCurrentRecord:"會將現在的棋譜關閉並開啟別的檔案,請問您要繼續嗎?",areYouSureWantToClearHistory:"將清除紀錄。請問您要繼續嗎?",areYouSureWantToRemoveCurrentProfile:"將移除現在的設定。請問您要繼續嗎?",yamlFormatSettingsCopiedToClipboard:"已將 YAML 格式之設定複製到剪貼板。",jsonFormatSettingsCopiedToClipboard:"已將 JSON 格式之設定複製到剪貼板。",usiCsaBridgeCommandCopiedToClipboard:"已將 usi-csa-bridge 指令複製到剪貼板。",positionImageCopiedToClipboard:"已將局面圖複製到剪貼板。",copiedToClipboard:"已複製到剪貼板。",pastedFromClipboard:"已從剪貼板貼上。",youCanNotCloseAppWhileCSAOnlineGame:"由於CSA協定正在使用中,本程式無法被關閉。",fileExtensionNotSupported:"無法使用該副檔名。",errorOccuredWhileDisconnectingFromCSAServer:"在與CSA伺服器中斷連線時發生錯誤。",failedToConnectToCSAServer:"無法連接CSA伺服器。",errorOccuredWhileLogoutFromCSAServer:"在登出 CSA 伺服器時發生錯誤。",disconnectedFromCSAServer:"與CSA伺服器的連接結束。",csaServerLoginDenied:"您對CSA伺服器的登入被拒絕。",thisFeatureNotAvailableOnWebApp:"Web版無法使用本機能",failedToLoadEngine:"引擎讀取失敗。",engineRequiresOnline:"讀取引擎需要網路連線。",engineRequiresReload:"使用引擎需要重新整理頁面。",failedToStartNewGame:"對局開始失敗。",errorOccuredWhileEndingGame:"在對局結束時發生錯誤。",failedToSendGoCommand:"無法送出go指令。",failedToSendPonderCommand:"無法送出ponder指令。",failedToSendStopCommand:"無法送出stop指令。",failedToShutdownEngines:"引擎無法正常結束。",failedToCheckUpdates:"無法確認更新。",youAreUsingTheLatestVersion:"您正在使用最新版本。",newVersionIsAvailablePressToUpdate:"有新版本可用。按此處進行更新。",failedToSaveRecord:"棋譜保存失敗。",failedToParseSFEN:"SFEN讀取失敗。",failedToDetectRecordFormat:"無法判別棋譜形式。",unknown:"未知",unknownFileExtension:"未知的檔案形式。",emptyRecordInput:"您尚未輸入棋譜。",invalidPieceName:"不合法的棋駒",invalidTurn:"不合法的手番",invalidMove:"不合法的棋步",invalidMoveNumber:"不合法的手數",invalidDestination:"不合法的移動目的地",pieceNotExists:"不存在的棋駒",invalidLine:"不存在的行",invalidBoard:"不合法的盤面",invalidHandPiece:"不合法的持駒",invalidUSI:"不合法的USI",engineProcessWasClosedUnexpectedly:"引擎進程意外結束。",backgroundImageFileNotSelected:"尚未選取背景圖片。",pieceImageFileNotSelected:"尚未選取棋駒圖片。",boardImageFileNotSelected:"尚未選取盤面圖片。",pieceStandImageFileNotSelected:"尚未選取駒台圖片。",pieceSoundVolumeMustBe0To100Percent:"請在0%~100%之間指定棋駒音效大小。",clockSoundVolumeMustBe0To100Percent:"請在0%~100%之間指定棋鐘音效大小。",clockSoundPitchMustBe220To880Hz:"請在220Hz~880Hz之間指定棋鐘音效頻率。",engineTimeoutMustBe1To300Seconds:"請在1秒~300秒之間指定引擎執行最長時間。",coefficientInSigmoidMustBeGreaterThan0:"請將勝率換算係數填為大於0之值。",inaccuracyThresholdMustBe1To100Percent:"請在0%~100%之間指定緩手門檻。",dubiousThresholdMustBe1To100Percent:"請在0%~100%之間指定疑問手門檻。",mistakeThresholdMustBe1To100Percent:"請在0%~100%之間指定惡手門檻。",blunderThresholdMustBe1To100Percent:"請在0%~100%之間指定大惡手門檻。",recordSavedWithGarbledCharacters:"保存的棋譜有部分可能會造成亂碼。",pleaseConsiderToUseKIFU:"建議您使用KIFU形式(UTF-8)儲存您的棋譜。",youCanChangeDefaultRecordFileFormatFromAppSettings:"預設棋譜檔案格式可以在程式設定中進行更動。",inaccuracyThresholdMustBeLessThanDubiousThreshold:"緩手門檻應小於疑問手門檻。",dubiousThresholdMustBeLessThanMistakeThreshold:"疑問手門檻應小於惡手門檻。",mistakeThresholdMustBeLessThanBlunderThreshold:"惡手門檻應小於大惡手門檻。",thisEngineNotSupportsMateSearch:"這個引擎不支援詰將棋搜索。",pleaseEndActiveFeaturesBeforeOpenRecord:"請關閉現正運行的功能再開啟棋譜。",bothTimeLimitAndByoyomiAreNotSet:"持時間與讀秒尚未設置。",canNotUseByoyomiWithFischer:"讀秒與 Fischer 選項無法同時併用。",repeatsMustBeOneIfHumanPlayerIncluded:"若要與人對局,連續對局次數僅能設為 1 。",parallelismMustBeOneIfHumanPlayerIncluded:"若要與人對局,並行數僅能設為 1。",parallelismMustBeOneIfCurrentPositionIsUsed:"若以目前局面為開始局面,並行數僅能設為 1。",parallelismMustLessThanOrEqualToRepeats:"並行數須小於或等於連續對局次數。",protocolVersionNotSelected:"請選擇協定版本。",hostNameIsEmpty:"主機名稱為空。",invalidPortNumber:"不可用的連接埠號碼。",idIsEmpty:"ID 為空。",idContainsSpace:"ID 含有空白字符。",passwordContainsSpace:"密碼含有空白字符。",tcpKeepaliveInitialDelayMustBePositive:"請輸入正確的TCP Keepalive初始延遲時間。",blankLinePingInitialDelayMustBeGreaterThanOrEqualTo30:"請輸入正確的空行輸出初始延遲時間。",blankLinePingIntervalMustBeGreaterThanOrEqualTo30:"請輸入正確的空行輸出間隔時間。",engineNotSelected:"尚未選擇引擎。",forExportingConversionLogPleaseEnableAppLogsAndSetLogLevelDebugAndRestart:"如要監看轉換紀錄,請在程式設定內設定 log level 到 Debug 並重新啟動本程式。",sourceDirectoryNotSpecified:"輸入目錄尚未被指定。",sourceFileMustBeSFEN:"輸入檔案必須為 .sfen 格式。",sourceFormatsNotSpecified:"輸入格式尚未被指定。",destinationDirectoryNotSpecified:"輸出格式尚未被指定。",destinationFileNotSpecified:"輸出檔案尚未被指定。",destinationFileMustBeJSON:"輸出檔案必須為 .json 格式。",anyUnsavedDataWillBeLostDoYouReallyWantToResetBookData:"未保存內容可能會丟失。您確認要重置定跡嗎?",bookMovesWereImported:"已完成匯入定跡。",anyBookMovesAreUnsavedDoYouReallyWantToDiscardThemAndCloseTheApp:"存在尚未保存的定跡。您確定要捨棄並關閉本程式嗎?",cannotOverwriteOnTheFlyBook:"以 On-the-fly 模式讀取中的定跡無法覆寫保存。",pleaseSpecifyOtherFileName:"請指定其他檔案名稱。",memoryShortageOnBookConversionMayLoseUnsavedData:"轉換定跡資料時若記憶體不足,未保存的資料可能會遺失。",cannotConvertAperyBookToOtherFormat:"Apery 定跡無法轉換為其他格式。",sourceRecordFileNotSet:"尚未指定棋譜檔案。",sourceDirectoryNotSet:"請選擇目錄。",minPlyMustBeLessThanMaxPly:"最小手數應小於最大手數。",playerNameNotSet:"尚未設定對局者名稱。",incompatibleOptionsWillBeDiscardedDoYouReallyWantToReplaceTheEnginePath:"不相容的設定將自動被移除。您確認要更換引擎嗎?",largeSuggestionsCountMayCausePerformanceDegradation:"增加候補手可能會導致效能下降。",doYouReallyWantToIncreaseTheSuggestionsCount:"您確定要增加候選手數嗎?",recommendLowerSettingsForDailyUse:"日常使用的電腦建議使用較低的設定。",checkEngineCompatibilityForNumaEnvironments:"這台電腦可能有多個 CPU 插槽或處理器群組(NUMA)。不支援 NUMA 環境的引擎可能會效能下降。請確認引擎是否支援 NUMA。",aiPerformanceMayDegrade:"AI 的效能可能會下降。",yourPCMayBecomeSlow:"電腦運作可能會變慢。",increasingItMayImproveAIPerformance:"調高此值可能會提升 AI 的效能。",totalNumber:e=>`總計 ${e} 筆`,number:e=>`${e} 筆`,tryToReloginToCSAServerNSecondsLater:e=>`請在${e}秒後再次嘗試登入 CSA 伺服器。`,mateInNPlyDoYouWantToDisplay:e=>`尋找到${e}手詰。要顯示結果嗎?`,insertedNMovesToRecord:e=>`已加入${e}手到棋譜。`,errorsOccurred:e=>`發生 ${e} 個錯誤。`,between:(e,t)=>`自 ${e} 到 ${t} `,addNthEngine:e=>`追加第 ${e} 個引擎`,copyOf:e=>`${e} 的拷貝`,keepLatest:e=>`到最新${e}件`,followingDataNotSavedBecauseNotSupporetedBy:e=>`以下的資料由於 ${e} 格式無法支援的原因無法保存。`,areYouSureWantToDeleteFollowingMove:e=>`將會刪除${e}手目以後的棋譜。請問您要繼續嗎?`,failedToOpenDirectory:e=>`無法開啟檔案目錄:${e}`,unexpectedEventSenderPleaseReport:e=>`無法預期的事件發送方已發生。請將該錯誤訊息告知開發者,謝謝。 [${e}]`,unexpectedHTTPMethodPleaseReport:e=>`無法預期的 HTTP 方法。請將該錯誤訊息告知開發者,謝謝。 [${e}]`,unexpectedRequestURLPleaseReport:e=>`無法從 URL 獲取資訊。請將該錯誤訊息告知開發者,謝謝。 [${e}]`,noResponseFromEnginePleaseExtendTimeout:e=>`引擎在${e}秒内沒有回應。若引擎的啟動時間稍長,請在設定的「USI協定」分頁中調整引擎最長等待時間。`,stableVersionReleased:e=>`安定版 ${e} 已經發布!`,latestVersionReleased:e=>`最新版 ${e} 已經發布!`,doYouReallyWantToRemoveBookMove:e=>`將移除定跡手 ${e}。確認移除嗎?`,unexpectedRecordFileExtension:e=>`該檔案為不支援的棋譜副檔名。 [${e}]`,fileNotFound:e=>`無法找到該檔案。 [${e}]`,directoryNotFound:e=>`無法找到該目錄。 [${e}]`,youCanExitFullScreenByPressing:e=>`請按下${e}鍵以結束全螢幕顯示。`,skippedMovesInMerge:(e,t)=>`${t}手內之${e}手無法被合併。`,cpuUsageExceedsNPercent:e=>`超過全部 CPU 核心的 ${e}%。`,totalNumberOfThreadsExceedsNPercentOfCpuCores:e=>`執行緒總數超過 CPU 核心數的 ${e}%。`,memoryUsageExceedsNPercent:e=>`超過全部記憶體的 ${e}%。`,memoryUsageIsLessThanNPercent:e=>`低於全部記憶體的 ${e}%。`,totalUSIHashExceedsNPercentOfMemory:e=>`USI_Hash 總計超過全部記憶體的 ${e}%。`,heapUsageExceedsNGBMayHang:e=>`記憶體使用量已超過 ${e}GB。若持續增加,程式可能會停止回應。`,settingsFileCorruptedMovedAndReset:(e,t)=>`設定檔 ${e} 已損壞,無法讀取。損壞的檔案已移至 ${t},將使用預設設定。`};o.d(t,["d",0,n])},2071(e,t,o){o(3113),o(4636)},4636(e,t,o){o.d(t,{x:()=>c});var n=o(6087),i=o(4453),a=o(1943),s=o(6566),r=o(7387);const l=a.ja;function c(e){Object.entries(function(e){switch(e){case n.TM.JA:return a.ja;case n.TM.EN:return i.en;case n.TM.ZH_TW:return s.d;case n.TM.VI:return r.vi;default:return a.ja}}(e)).forEach(([e,t])=>{l[e]=t})}o.d(t,["t",0,l])},4987(e,t,o){o.d(t,{x:()=>s});var n=o(6087);const i={USI_Ponder:"相手番思考",Ponder:"相手番思考",USI_Hash:"ハッシュ",Hash:"ハッシュ",Clear_Hash:"ハッシュクリア",Threads:"スレッド",NumberOfThreads:"スレッド数",thread_num_per_gpu:"GPUあたりのスレッド数",ThreadIdOffset:"スレッドIDオフセット",MultiPV:"マルチPV(候補手の表示件数)",BookFile:"定跡ファイル",Book_File:"定跡ファイル",Book_Enable:"定跡あり",BookEvalDiff:"定跡の評価値差",book_file_name:"定跡ファイル名",use_book:"定跡を使用",BookPvMoves:"定跡PV手数",TinyBook:"小さい定跡",BookMoves:"定跡利用手数",BookMaxPly:"定跡最大手数",BookIgnoreRate:"定跡不使用率",RandomBookSelect:"ランダム定跡選択",IgnoreBookPly:"定跡の手数を無視",DepthLimit:"最大深さ",NarrowBook:"定跡手を限定",WriteDebugLog:"デバッグログ出力",Write_Debug_Log:"デバッグログ出力",ResignValue:"投了基準値",ResignScore:"投了基準値",PvInterval:"PV出力間隔",NodesLimit:"最大ノード数",USI_OwnBook:"定跡を使用",OwnBook:"定跡を使用",EvalDir:"評価関数のフォルダ",Eval_Dir:"評価関数のフォルダ",EvalFile:"評価関数ファイル",EvalHash:"評価値ハッシュ",Eval_Hash:"評価値ハッシュ",EvalSaveDir:"評価関数保存フォルダ",EvalShare:"評価値共有",BookDir:"定跡ファイルのフォルダ",Stochastic_Ponder:"確率的相手番思考",MinimumThinkingTime:"最小思考時間",Minimum_Thinking_Time:"最小思考時間",MinThinkingTime:"最小思考時間",MaxMovesToDraw:"強制引き分け手数",SlowMover:"長考",Slow_Mover:"長考",OutputFailLHPV:"Fail Low/Highを出力",NetworkDelay:"通信遅延",NetworkDelay2:"通信遅延2",FV_SCALE:"評価値スケール",UseBook:"定跡を使用",MaxDepth:"最大深さ",MarginMs:"マージン(ミリ秒)",Time_Margin:"時間マージン",ByoyomiMargin:"秒読みマージン",Byoyomi_Margin:"秒読みマージン",byoyomi_margin:"秒読みマージン",Move_Overhead:"着手オーバーヘッド",FischerMargin:"フィッシャーマージン",SuddenDeathMargin:"切れ負けマージン",Snappy:"素早く指す",EnteringKingRule:"入玉ルール",Do_YoTsume_Search:"余詰めを探索",gpu_num:"GPU数",ConsiderationMode:"検討モード",ConsiderBookMoveCount:"定跡出現率を使用",GenerateAllLegalMoves:"全合法手を生成",DrawScore:"引き分けのスコア",DrawValue:"引き分けの値",DrawValueBlack:"引き分けの値・先手",DrawValueWhite:"引き分けの値・後手",LargePageEnable:"LargePageを使用",SkillLevel:"スキルレベル",Skill_Level:"スキルレベル",BookOnTheFly:"定跡直接読み込み(大規模定跡)",BookDepthLimit:"定跡深さ制限",BookEvalBlackLimit:"定跡評価値制限・先手",BookEvalWhiteLimit:"定跡評価値制限・後手"},a={};function s(e){Object.keys(a).forEach(e=>{delete a[e]}),Object.entries(function(e){switch(e){case n.TM.JA:return i;case n.TM.EN:default:return{}}}(e)).forEach(([e,t])=>{a[e]=t})}},9145(e,t,o){var n,i;o.d(t,{$:()=>i,F:()=>n}),function(e){e.APP="app",e.USI="usi",e.CSA="csa"}(n||(n={})),function(e){e.DEBUG="debug",e.INFO="info",e.WARN="warn",e.ERROR="error"}(i||(i={}))},2394(e,t,o){o.d(t,{iO:()=>a,x4:()=>s});var n=o(3113);function i(e){const t=e.trim().split(" ");return[t[0],t[1],t[2]].join(" ")}function a(e){let t;try{t=JSON.parse(e)}catch{throw new Error("JSON として解釈できませんでした。")}if(!t||"object"!=typeof t)throw new Error("次の一手問題集ではありません。");const o=t;if("shogihome-next-move"!==o.format)throw new Error("次の一手問題集ではありません。");if("number"!=typeof o.version||o.version>1||o.version<1)throw new Error(`未対応のバージョンです: ${o.version}`);if(!Array.isArray(o.problems))throw new Error("problems がありません。");return o.problems.forEach((e,t)=>{!function(e,t){const o=`problems[${t}]`;if(!e||"object"!=typeof e)throw new Error(`${o}: 不正な問題データです。`);const a=n.Position.newBySFEN(e.sfen);if(!a)throw new Error(`${o}: 不正な SFEN です: ${e.sfen}`);if(!Array.isArray(e.candidates)||0===e.candidates.length)throw new Error(`${o}: candidates がありません。`);const s=e=>{if("string"!=typeof e)return!1;const t=a.createMoveByUSI(e);return!!t&&a.isValidMove(t)};for(const[t,n]of e.candidates.entries())if(!n||"object"!=typeof n||!s(n.usi))throw new Error(`${o}.candidates[${t}]: 不正な指し手です: ${n?.usi}`);if(!e.actualMove||!s(e.actualMove.usi))throw new Error(`${o}.actualMove: 不正な指し手です: ${e.actualMove?.usi}`);if(void 0!==e.previousMove){const t=e.previousMove;if(!t||"object"!=typeof t)throw new Error(`${o}.previousMove: 不正なデータです。`);const a=n.Position.newBySFEN(t.sfen);if(!a)throw new Error(`${o}.previousMove: 不正な SFEN です: ${t.sfen}`);const s="string"==typeof t.usi?a.createMoveByUSI(t.usi):null;if(!s||!a.doMove(s))throw new Error(`${o}.previousMove: 不正な指し手です: ${t.usi}`);if(i(a.sfen)!==i(e.sfen))throw new Error(`${o}.previousMove: 指し手を進めた局面が出題局面と一致しません。`)}}(e,t)}),o}function s(e){return JSON.stringify(e,void 0,2)}},164(e,t,o){o.d(t,{Ah:()=>T,V3:()=>b,Vg:()=>E,pL:()=>A,vj:()=>v,yx:()=>C});var n=o(3113),i=o(416),a=o(4227);function s(e){const t=/^\*詰み=(先手勝ち|後手勝ち)(?::([0-9]+)手)?/.exec(e);if(t)return Number(t[2]||1e4)*("先手勝ち"===t[1]?1:-1)}function r(e){const t=/^#詰み=(先手勝ち|後手勝ち)(?::([0-9]+)手)?/.exec(e);if(t)return Number(t[2]||1e4)*("先手勝ち"===t[1]?1:-1)}function l(e){const t=/^\*評価値=([+-]?[0-9]+(?:\.[0-9]+)?)/.exec(e);return t?Number(t[1]):void 0}function c(e){const t=/^#評価値=([+-]?[0-9]+(?:\.[0-9]+)?)/.exec(e);return t?Number(t[1]):void 0}function h(e){const t=/^\* *([+-]?[0-9]+(?:\.[0-9]+)?)/.exec(e);return t?Number(t[1]):void 0}function d(e){const t=/^\*対局 .* 評価値 ([+-]?[0-9]+)/.exec(e);return t?Number(t[1]):void 0}function u(e){const t=/^\*解析 .* 評価値 ([+-]?[0-9]+)/.exec(e);return t?Number(t[1]):void 0}function m(e){const t=/^\* .* 評価値 ([+-]?[0-9]+)/.exec(e);return t?Number(t[1]):void 0}function p(e){const t=/^#(?:形勢|指し手)\[([+-]?[0-9]+)\]/.exec(e);return t?Number(t[1]):void 0}function g(e){const t=/^\*深さ=([0-9]+)/.exec(e);return t?Number(t[1]):void 0}function S(e){const t=/^#深さ=([0-9]+)/.exec(e);return t?Number(t[1]):void 0}function y(e){if(!/^\*対局 /.test(e))return;const t=/ 深さ ([0-9]+)/.exec(e);return t?Number(t[1]):void 0}function f(e){if(!/^\*解析 /.test(e))return;const t=/ 深さ ([0-9]+)/.exec(e);return t?Number(t[1]):void 0}function v(e,t={}){const o={...t},n=e.split("\n");for(const e of n){const t=s(e);void 0!==t&&(o.playerSearchInfo={...o.playerSearchInfo,mate:t});const n=r(e);void 0!==n&&(o.researchInfo={...o.researchInfo,mate:n});const i=l(e)??h(e)??d(e);void 0!==i&&(o.playerSearchInfo={...o.playerSearchInfo,score:i});const a=c(e)??u(e)??m(e)??p(e);void 0!==a&&(o.researchInfo={...o.researchInfo,score:a});const v=g(e)??y(e);void 0!==v&&(o.playerSearchInfo={...o.playerSearchInfo,depth:v});const T=S(e)??f(e);void 0!==T&&(o.researchInfo={...o.researchInfo,depth:T})}return o}function T(e,t,o,s){const r=t===i.K.PLAYER?"*":"#";let l="";if(o.mate){l+=`${r}詰み=${o.mate>=0?"先手勝ち":"後手勝ち"}`,1e4!==Math.abs(o.mate)&&(l+=`:${Math.abs(o.mate)}手`),l+="\n"}return void 0!==o.score&&(l+=(0,a.M)(o.score)+"\n",l+=`${r}評価値=${o.score}\n`),o.pv&&0!==o.pv.length&&(l+=`${r}読み筋=${(0,n.formatPV)(e,o.pv)}\n`),o.depth&&(l+=`${r}深さ=${o.depth}\n`),o.nodes&&(l+=`${r}ノード数=${o.nodes}\n`),l&&s?.engineName&&(l+=`${r}エンジン=${s.engineName}\n`),l}function b(e){let t=`* ${void 0!==e.mate?e.mate>0?3e4:-3e4:void 0!==e.score?e.score:0}`;for(const o of e.pv||[])t+=" "+(0,n.formatCSAMove)(o);return t}function C(e){return b(e)+(void 0!==e.nodes?` #${e.nodes}`:"")}function E(e,t){let o="*"+(e===i.K.PLAYER?"対局":"解析");if(void 0!==t.depth&&(o+=` 深さ ${t.depth}`),void 0!==t.nodes&&(o+=` ノード数 ${t.nodes}`),void 0!==t.score?o+=` 評価値 ${t.score}`:void 0!==t.mate&&(o+=" 評価値 "+(t.mate>0?3e4:-3e4)),t.pv?.length){o+=" 読み筋";for(const e of t.pv)o+=" "+(e.color===n.Color.BLACK?"▲":"△")+(0,n.formatKIFMove)(e)}return o}function I(e,t){const o=t.indexOf(" ",t.indexOf(" ")+1)+1,i=[],a=e.clone();for(let e=o;e<t.length;e+=8){const o=t.substring(e,e+7),s=(0,n.parseCSAMove)(a,o);if(s instanceof Error||!a.doMove(s,{ignoreValidation:!1}))break;i.push(s)}return i}function A(e,t){const o=[];for(const i of t.split("\n")){let t;if(/^[#*]読み筋=/.test(i))t=(0,n.parsePV)(e,i.substring(5));else if(/^\*.* 読み筋 /.test(i)){const o=i.substring(i.indexOf(" 読み筋 ")+5),a=e.color===n.Color.BLACK?"▲":"△";t=(0,n.parsePV)(e,o.substring(o.indexOf(a)))}else if(/^#(?:指し手|形勢)\[/.test(i)){const o=i.substring(i.indexOf("]")+1),a=e.color===n.Color.BLACK?"▲":"△";t=(0,n.parsePV)(e,o.substring(o.indexOf(a)))}else/^\* -?[0-9]+ /.test(i)&&(t=I(e,i));t?.length&&o.push(t)}return o}},4227(e,t,o){function n(e){return e>=1500?"先手勝勢":e>=600?"先手優勢":e>=400?"先手有利":e>=200?"先手有望":e>-200?"互角":e>-400?"後手有望":e>-600?"後手有利":e>-1500?"後手優勢":"後手勝勢"}o.d(t,{M:()=>n})},416(e,t,o){var n;o.d(t,{K:()=>n}),function(e){e[e.PLAYER=0]="PLAYER",e[e.OPPONENT=1]="OPPONENT",e[e.RESEARCHER=2]="RESEARCHER",e[e.RESEARCHER_2=3]="RESEARCHER_2",e[e.RESEARCHER_3=4]="RESEARCHER_3",e[e.RESEARCHER_4=5]="RESEARCHER_4"}(n||(n={}))},2147(e,t,o){o.d(t,{z$:()=>i});var n=o(596);function i(){return{startCriteria:{enableNumber:!1,number:20},endCriteria:{enableNumber:!1,number:100},perMoveCriteria:{maxSeconds:5},descending:!1,commentBehavior:n.Q.INSERT}}},8522(e,t,o){o.d(t,{CM:()=>h,Ko:()=>O});var n,i,a,s,r,l,c,h,d,u,m,p,g,S,y,f,v,T,b,C,E,I,A=o(6292),w=o(9145),P=o(8193),k=o(9219),M=o(3399),N=o(596);!function(e){e.STANDARD="standard",e.CHERRY_BLOSSOM="cherry-blossom",e.AUTUMN="autumn",e.SNOW="snow",e.CLASSIC="classic",e.BEIGE="beige",e.DARK_GREEN="dark-green",e.DARK="dark"}(n||(n={})),function(e){e.NONE="none",e.COVER="cover",e.CONTAIN="contain",e.TILE="tile"}(i||(i={})),function(e){e.HITOMOJI="hitomoji",e.HITOMOJI_WOOD="hitomojiWood",e.HITOMOJI_DARK="hitomojiDark",e.HITOMOJI_GOTHIC="hitomojiGothic",e.HITOMOJI_GOTHIC_DARK="hitomojiGothicDark",e.FUTAMOJI="futamoji",e.CUSTOM_IMAGE="custom-image"}(a||(a={})),function(e){e.GYOKU_AND_OSHO="gyokuAndOsho",e.GYOKU_AND_GYOKU="gyokuAndGyoku"}(s||(s={})),function(e){e.LIGHT="light",e.LIGHT2="light2",e.LIGHT3="light3",e.WARM="warm",e.WARM2="warm2",e.RESIN="resin",e.RESIN2="resin2",e.RESIN3="resin3",e.GREEN="green",e.CHERRY_BLOSSOM="cherry-blossom",e.AUTUMN="autumn",e.SNOW="snow",e.DARK_GREEN="dark-green",e.DARK="dark",e.CUSTOM_COLOR="custom-color",e.CUSTOM_IMAGE="custom-image"}(r||(r={})),function(e){e.STANDARD="standard",e.DARK_WOOD="dark-wood",e.GREEN="green",e.CHERRY_BLOSSOM="cherry-blossom",e.AUTUMN="autumn",e.SNOW="snow",e.DARK_GREEN="dark-green",e.DARK="dark",e.CUSTOM_COLOR="custom-color",e.CUSTOM_IMAGE="custom-image"}(l||(l={})),function(e){e.STRONGER_TO_LEFT="strongerToLeft",e.STRONGER_TO_RIGHT="strongerToRight"}(c||(c={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL_PREFER_BOTTOM="verticalPreferBottom",e.HORIZONTAL_PREFER_RIGHT="horizontalPreferRight"}(h||(h={})),function(e){e.NONE="none",e.STANDARD="standard"}(d||(d={})),function(e){e.NONE="none",e.STANDARD="standard"}(u||(u={})),function(e){e.NONE="none",e.STANDARD="standard"}(m||(m={})),function(e){e.SINGLE="single",e.DOUBLE="double",e.DOUBLE_V2="doubleV2"}(p||(p={})),function(e){e.RECORD_INFO="recordInfo",e.COMMENT="comment",e.SEARCH="search",e.PV="pv",e.CHART="chart",e.PERCENTAGE_CHART="percentageChart",e.MONITOR="monitor",e.INVISIBLE="invisible"}(g||(g={})),function(e){e.STRICT="strict",e.AUTO_DETECT="autoDetect"}(S||(S={})),function(e){e.PLAIN="plain",e.COMMA_SEPARATED="commaSeparated",e.COMPACT="compact",e.JAPANESE="japanese"}(y||(y={})),function(e){e.BLACK="black",e.EACH="each"}(f||(f={})),function(e){e.ALL="all",e.ONLY_USER="onlyUser"}(v||(v={})),function(e){e.VERTICAL="vertical",e.HORIZONTAL="horizontal"}(T||(T={})),function(e){e.BOOK="book",e.GAME="game"}(b||(b={})),function(e){e.GOTHIC="gothic",e.MINCHO="mincho"}(C||(C={})),function(e){e.NONE="none",e.BOOKMARK="bookmark",e.CUSTOM="custom",e.LAST_MOVE="lastMove",e.PLY_AND_LAST_MOVE="plyAndLastMove",e.BOOKMARK_AND_LAST_MOVE="bookmarkAndLastMove",e.CUSTOM_AND_LAST_MOVE="customAndLastMove",e.BRACKETED_BOOKMARK="bracketedBookmark",e.BRACKETED_CUSTOM="bracketedCustom",e.BRACKETED_LAST_MOVE="bracketedLastMove",e.BRACKETED_PLY_AND_LAST_MOVE="bracketedPlyAndLastMove",e.BRACKETED_BOOKMARK_AND_LAST_MOVE="bracketedBookmarkAndLastMove",e.BRACKETED_CUSTOM_AND_LAST_MOVE="bracketedCustomAndLastMove"}(E||(E={})),function(e){e.PLAYER_NAME="playerName",e.SENTE_GOTE="senteGote",e.MOCHIGOMA="mochigoma",e.TSUME_SHOGI="tsumeShogi",e.NONE="none"}(I||(I={}));var R;function O(e){return{language:A.TM.JA,thema:n.STANDARD,backgroundImageType:i.NONE,boardLayoutType:M.H3.STANDARD,pieceImage:a.HITOMOJI_WOOD,kingPieceType:s.GYOKU_AND_OSHO,deletePieceImageMargin:!1,boardImage:r.LIGHT2,boardColor:"#e0b060",boardGridColor:null,pieceStandImage:l.DARK_WOOD,pieceStandColor:"#8b4513",handPieceOrder:c.STRONGER_TO_LEFT,promotionSelectorStyle:h.HORIZONTAL,enableTransparent:!1,boardOpacity:1,pieceStandOpacity:1,recordOpacity:1,boardLabelType:d.STANDARD,leftSideControlType:u.STANDARD,rightSideControlType:m.STANDARD,pieceVolume:30,clockVolume:30,clockPitch:500,clockSoundTarget:v.ONLY_USER,recordShortcutKeys:T.VERTICAL,boardFlipping:!1,enableDragAndDrop:!0,highlightMovableSquares:!0,tabPaneType:p.DOUBLE_V2,tab:g.RECORD_INFO,tab2:g.CHART,topPaneHeightPercentage:60,topPanePreviousHeightPercentage:60,bottomLeftPaneWidthPercentage:60,defaultRecordFileFormat:P.vr.KIF,textDecodingRule:S.AUTO_DETECT,returnCode:e?.returnCode||"\r\n",autoSaveDirectory:e?.autoSaveDirectory||"",recordFileNameTemplate:k.g,useCSAV3:!1,useUTF8ForKifAndKi2:!1,enableUSIFileStartpos:!0,enableUSIFileResign:!1,enableUSIFileSpecialMoves:!1,showPasteDialog:!0,liveDuplicatePositionDetection:!0,bookOnTheFlyThresholdMB:64,yaneBookOnTheFlyThresholdMB:64,aperyBookOnTheFlyThresholdMB:64,sbkOnTheFlyThresholdMB:16,ybbOnTheFlyThresholdMB:64,flippedBook:!0,translateEngineOptionName:!0,engineTimeoutSeconds:10,nodeCountFormat:y.COMMA_SEPARATED,showEngineOptionDetails:!1,evaluationViewFrom:f.EACH,maxArrowsPerEngine:3,arrowScoreDiffRange:100,showArrowScore:!0,coefficientInSigmoid:600,badMoveLevelThreshold1:5,badMoveLevelThreshold2:10,badMoveLevelThreshold3:20,badMoveLevelThreshold4:50,maxPVTextLength:15,searchCommentFormat:N.F.SHOGIHOME,showElapsedTimeInRecordView:!0,showCommentInRecordView:!0,showBranchTreeInRecordView:!1,branchListMode:R.SIBLING,enableAppLog:!1,enableUSILog:!1,enableCSALog:!1,logLevel:w.$.INFO,positionImageStyle:b.BOOK,positionImageSize:500,positionImageTypeface:C.GOTHIC,positionImageHandLabelType:I.PLAYER_NAME,useBookmarkAsPositionImageHeader:!1,positionImageHeaderType:E.PLY_AND_LAST_MOVE,positionImageHeader:"",positionImageCommentVisible:!1,positionImageComment:"",positionImageCharacterY:0,positionImageFontScale:1,positionImageFontWeight:M.Sv.W400X,positionImageLastMoveColor:"#ffd700",lastRecordFilePath:"",lastBookFilePath:"",lastUSIEngineFilePath:"",lastImageExportFilePath:"",lastOtherFilePath:"",emptyRecordInfoVisibility:!0,pieceAdditionDestination:"blackHand",positionEditingBoardSizeLevel:"medium",enableHardwareAcceleration:!0}}!function(e){e.SIBLING="sibling",e.NEXT_MOVE="nextMove"}(R||(R={}))},596(e,t,o){var n,i;o.d(t,{F:()=>i,Q:()=>n}),function(e){e.NONE="none",e.INSERT="insert",e.APPEND="append",e.OVERWRITE="overwrite"}(n||(n={})),function(e){e.SHOGIHOME="shogihome",e.FLOODGATE="floodgate",e.CSA3="csa3",e.SHOGIGUI="shogigui"}(i||(i={}))},9697(e,t,o){o.d(t,{fC:()=>r});var n,i,a,s=o(8193);o(6292);function r(){return{sourceType:n.DIRECTORY,source:"",sourceFormats:[s.vr.KIF,s.vr.KIFU,s.vr.KI2,s.vr.KI2U,s.vr.CSA,s.vr.JKF],subdirectories:!0,singleFileSource:"",destinationType:i.DIRECTORY,destination:"",createSubdirectories:!0,destinationFormat:s.vr.KIF,fileNameConflictAction:a.NUMBER_SUFFIX,singleFileDestination:"",enableUSIResign:!0}}!function(e){e.DIRECTORY="directory",e.SINGLE_FILE="singleFile"}(n||(n={})),function(e){e.DIRECTORY="directory",e.SINGLE_FILE="singleFile"}(i||(i={})),function(e){e.OVERWRITE="overwrite",e.NUMBER_SUFFIX="numberSuffix",e.SKIP="skip"}(a||(a={}))},5244(e,t,o){o.d(t,{$P:()=>f,VX:()=>S,_B:()=>m,eA:()=>g,uU:()=>y,xv:()=>v});var n=o(117),i=o(7924),a=o(6292),s=o(4262),r=o(6953),l=o.n(r),c=o(6014),h=o(596);const[d,u]=[l().base64Decode,l().base64Encode];var m;function p(){return{protocolVersion:m.V121_FLOODGATE,host:"",port:4081,id:"",password:"",tcpKeepalive:{initialDelay:10},blankLinePing:{initialDelay:40,interval:40}}}function g(){return{player:{name:a.t.human,uri:n.He},server:p(),autoFlip:!0,enableComment:!0,enableAutoSave:!0,autoSaveDirectory:"",repeat:1,autoRelogin:!0,restartPlayerEveryGame:!1,searchCommentFormat:h.F.SHOGIHOME}}function S(e){const t=(0,i.$)(e.player);if(t)return t;const o=function(e){if(e.protocolVersion!==m.V121&&e.protocolVersion!==m.V121_FLOODGATE&&e.protocolVersion!==m.V121_X1)return new Error(a.t.protocolVersionNotSelected);if(""===e.host)return new Error(a.t.hostNameIsEmpty);if(e.port<0||e.port>65535)return new Error(a.t.invalidPortNumber);if(""===e.id)return new Error(a.t.idIsEmpty);if(e.id.indexOf(" ")>=0)return new Error(a.t.idContainsSpace);if(e.password.indexOf(" ")>=0)return new Error(a.t.passwordContainsSpace);if(e.tcpKeepalive.initialDelay<=0)return new Error(a.t.tcpKeepaliveInitialDelayMustBePositive);if(e.blankLinePing){if(e.blankLinePing.initialDelay<30)return new Error(a.t.blankLinePingInitialDelayMustBeGreaterThanOrEqualTo30);if(e.blankLinePing.interval<30)return new Error(a.t.blankLinePingIntervalMustBeGreaterThanOrEqualTo30)}}(e.server);return o||(e.server.protocolVersion!==m.V121&&e.server.protocolVersion!==m.V121_FLOODGATE?new Error("protocolVersion must be v121 or v121_floodgate"):!Number.isInteger(e.repeat)||e.repeat<1?new Error("repeat must be a positive integer"):void 0)}function y(e){return{player:{name:a.t.human,uri:n.He},serverHistory:[],autoFlip:!0,enableComment:!0,enableAutoSave:!!e?.autoSaveDirectory,autoSaveDirectory:(0,c.w)(e?.autoSaveDirectory||""),repeat:1,autoRelogin:!0,restartPlayerEveryGame:!1}}!function(e){e.V121="v121",e.V121_FLOODGATE="v121_floodgate",e.V121_X1="v121_x1"}(m||(m={}));function f(e,t){const o=(0,s.X1)(e.usi,t?.playerURI);return{player:{name:e.usi.name,uri:o.uri,usi:o},server:e.server,autoFlip:!0,enableComment:e.enableComment,enableAutoSave:e.saveRecordFile,autoSaveDirectory:t?.autoSaveDirectory||"",repeat:e.repeat,autoRelogin:e.autoRelogin,restartPlayerEveryGame:e.restartPlayerEveryGame,searchCommentFormat:e.searchCommentFormat||h.F.SHOGIHOME}}async function v(e){const t=new Uint8Array(d(e)),o=new DecompressionStream("gzip");return new Blob([t]).stream().pipeThrough(o),JSON.parse(await new Response(o.readable).text())}},5059(e,t,o){o.d(t,{Bi:()=>l});var n,i=o(3113),a=o(7924),s=(o(6292),o(117),o(6014)),r=o(596);!function(e){e.NONE="none",e.GENERAL24="general24",e.GENERAL27="general27",e.TRY="try"}(n||(n={}));n.GENERAL24,n.GENERAL27;function l(e){return{black:(0,a.w)(),white:(0,a.w)(),timeLimit:{timeSeconds:0,byoyomi:30,increment:0},startPosition:i.InitialPositionType.STANDARD,startPositionSFEN:"",startPositionListFile:"",startPositionListOrder:"sequential",enableEngineTimeout:!1,humanIsFront:!0,enableComment:!0,enableAutoSave:!!e?.autoSaveDirectory,autoSaveDirectory:(0,s.w)(e?.autoSaveDirectory||""),repeat:1,parallelism:1,swapPlayers:!1,maxMoves:1e3,jishogiRule:n.GENERAL27,searchCommentFormat:r.F.SHOGIHOME,sprtEnabled:!1,sprt:{elo0:.5,elo1:2.5,alpha:.05,beta:.05,maxGames:1e5}}}},3399(e,t,o){o.d(t,{H3:()=>n,Nw:()=>r,Sv:()=>i});var n,i,a,s;o(117),o(6292);function r(){return{profiles:[]}}!function(e){e.STANDARD="standard",e.COMPACT="compact",e.PORTRAIT="portrait",e.PORTRAIT_SQUARE="portraitSquare"}(n||(n={})),function(e){e.W400="400",e.W400X="400+",e.W700X="700+"}(i||(i={})),function(e){e.RAW="raw",e.WIN_RATE="winRate"}(a||(a={})),function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(s||(s={}))},7716(e,t,o){function n(){return{enableMaxSeconds:!1,maxSeconds:10}}o.d(t,{a:()=>n})},7924(e,t,o){o.d(t,{$:()=>r,w:()=>s});var n=o(6292),i=o(4262),a=o(117);function s(){return{name:n.t.human,uri:a.He}}function r(e){if(!e.name)return new Error("player name is required");if(!e.uri)return new Error("player URI is required");if(a.Em(e.uri)){if(!e.usi)return new Error("USI is required");const t=(0,i.wb)(e.usi);if(t)return t}else if(a.b0(e.uri)){if(!a.iM.some(t=>t===e.uri))return new Error("invalid player URI")}else if(e.uri!==a.He)return new Error("invalid player URI")}},2036(e,t,o){o.d(t,{uT:()=>n});o(6292);function n(){return{enableMaxSeconds:!1,maxSeconds:10,overrideMultiPV:!1,multiPV:1}}},4262(e,t,o){o.d(t,{J3:()=>u,Lo:()=>p,X1:()=>M,hJ:()=>y,iT:()=>f,my:()=>m,pk:()=>g,rh:()=>I,v2:()=>v,wb:()=>A,z4:()=>k});var n=o(117),i=o(6292),a=o(6953),s=o.n(a);const[r,l]=[s().base64Decode,s().base64Encode],c="USI_Ponder",h="USI_MultiPV",d="MultiPV";function u(e){if(e&&"button"!==e.type)return void 0!==e.value?e.value:"string"!==e.type&&"filename"!==e.type||"<empty>"!==e.default?e.default:""}function m(e){return"true"===u(e.options[c])}function p(e){const t=u(e.options[h])||u(e.options[d]);return"number"==typeof t?t:void 0}function g(e){return"true"===u(e.options.Stochastic_Ponder)}var S,y;function f(e){switch(e){case"game":return i.t.game;case"research":return i.t.research;case"mate":return i.t.mateSearch;case"download":return i.t.downloaded}}!function(e){e.GAME="game",e.RESEARCH="research",e.MATE="mate"}(S||(S={})),function(e){e.BEST="best",e.WEIGHTED_BY_COUNT="weightedByCount",e.WEIGHTED_BY_SCORE="weightedByScore"}(y||(y={}));function v(){return{uri:"",name:"",defaultName:"",author:"",path:"",options:{},labels:{game:!0,research:!0,mate:!0},tags:[f("game"),f("research"),f("mate")],enableEarlyPonder:!1,extraBook:{enabled:!1,filePath:"",onTheFly:!1}}}function T(e){switch(e){case S.GAME:return f("game");case S.RESEARCH:return f("research");case S.MATE:return f("mate")}}function b(e){return Object.entries(e).filter(([e,t])=>t&&T(e)).map(([e])=>T(e))}function C(e){switch(e){case f("game"):return S.GAME;case f("research"):return S.RESEARCH;case f("mate"):return S.MATE}}function E(e){const t={[S.GAME]:!1,[S.RESEARCH]:!1,[S.MATE]:!1};for(const o of e){const e=C(o);e&&(t[e]=!0)}return t}function I(e,t){e.uri=t.uri,e.name=t.name,Object.values(t.options).forEach(t=>{const o=e.options[t.name];o&&"button"!==o.type&&o.type===t.type&&(o.value=t.value)}),e.labels=t.labels,e.tags=t.tags||b(t.labels||{}),e.enableEarlyPonder=t.enableEarlyPonder,e.extraBook=t.extraBook}function A(e){if(!n.Em(e.uri))return new Error("invalid engine URI");if(!e.name&&!e.defaultName)return new Error("engine name is required");if(!e.path)return new Error("engine path is required");for(const t in e.options){const o=e.options[t];if(!["check","spin","combo","button","string","filename"].includes(o.type))return new Error(`invalid option type: name=[${t}] type=[${o.type}]`);if(!w(o))return new Error(`invalid option value: name=[${t}] type=[${o.type}]`+("button"!==o.type?` value=[${o.value}]`:""))}}function w(e){if("button"===e.type||void 0===e.value)return!0;switch(e.type){case"check":if("true"!==e.value&&"false"!==e.value)return!1;break;case"spin":if("number"!=typeof e.value)return!1;if(void 0!==e.min&&e.value<e.min&&e.value!==e.default)return!1;if(void 0!==e.max&&e.value>e.max&&e.value!==e.default)return!1;break;case"string":case"filename":case"combo":if("string"!=typeof e.value)return!1}return!0}const P={blue:"#1565C0",green:"#2E7D32",orange:"#D84315",brown:"#5D4037",purple:"#7B1FA2",indigo:"#303F9F",amber:"#EF6C00",gray:"#616161",pink:"#C2185B"};class k{engines={};tagColorMapping={};constructor(e){if(e){const t=JSON.parse(e);Object.keys(t.engines).filter(n.Em).forEach(e=>{const o=v(),n=t.engines[e];this.engines[e]={...o,...n,uri:e,labels:{...o.labels,...n.labels},tags:n.tags||b(n.labels||{})}}),this.tagColorMapping=t.tagColorMapping||{},this.updateTagColorMapping()}}hasEngine(e){return!!this.engines[e]}addEngine(e){this.engines[e.uri]=e,this.updateTagColorMapping()}updateEngine(e){return!!this.engines[e.uri]&&(this.engines[e.uri]=e,this.updateTagColorMapping(),!0)}removeEngine(e){return!!this.engines[e]&&(delete this.engines[e],this.updateTagColorMapping(),!0)}getEngine(e){return this.engines[e]}get engineList(){return Object.values(this.engines).sort((e,t)=>e.name!==t.name?e.name>t.name?1:-1:e.defaultName!==t.defaultName?e.defaultName>t.defaultName?1:-1:e.uri>t.uri?1:-1)}get tagList(){return Object.entries(this.tagColorMapping).map(([e,t])=>({name:e,color:P[t]})).sort((e,t)=>e.name>t.name?1:-1)}getTagColor(e){const t=this.tagColorMapping[e]||"blue";return P[t]||P.blue}addTag(e,t){this.engines[e]&&(this.engines[e].tags=this.engines[e].tags||[],this.engines[e].tags.includes(t)||this.engines[e].tags.push(t),this.updateTagColorMapping(),this.engines[e].labels=E(this.engines[e].tags))}removeTag(e,t){this.engines[e]&&(this.engines[e].tags=this.engines[e].tags?.filter(e=>e!==t),this.updateTagColorMapping(),this.engines[e].labels=E(this.engines[e].tags||[]))}updateTagColorMapping(){const e=new Set;for(const t of Object.values(this.engines))for(const o of t.tags??[])e.add(o);const t=Object.keys(P),o=new Set(Object.values(this.tagColorMapping)),n=t.filter(e=>!o.has(e));let i=Object.keys(this.tagColorMapping).length;for(const o of e)if(!this.tagColorMapping[o]){const e=n.shift()??t[i%t.length];this.tagColorMapping[o]=e,i++}for(const t of Object.keys(this.tagColorMapping))e.has(t)||delete this.tagColorMapping[t]}get json(){return JSON.stringify(this)}get jsonWithIndent(){return JSON.stringify(this,void 0,2)}getClone(){return new k(this.json)}}function M(e,t){const o={};for(const t in e.options){const n=e.options[t];switch(n.type){case"check":o[t]={name:t,type:"check",order:0,value:n.value?"true":"false"};break;case"spin":o[t]={name:t,type:"spin",order:0,value:n.value};break;case"combo":o[t]={name:t,type:"combo",order:0,value:n.value,vars:[n.value]};break;default:o[t]={name:t,type:n.type,order:0,value:n.value}}}return{uri:t||(0,n.A7)(),name:e.name,defaultName:e.name,author:"",path:e.path,options:o,enableEarlyPonder:e.enableEarlyPonder,extraBook:e.extraBook,labels:{}}}o.d(t,["AE",0,[".png",".jpg",".jpeg",".gif",".webp"],"Br",0,h,"If",0,"USI_Hash","YZ",0,c,"aW",0,d])},117(e,t,o){o.d(t,{A7:()=>d,Em:()=>h,b0:()=>c,m7:()=>u});o(6292);const n="es://basic-engine/",i=`${n}static_rook/v1`,a=`${n}ranging_rook/v1`,s=`${n}random`,r=[i,a,s],l="es://usi-engine/";function c(e){return e.startsWith(n)}function h(e){return e.startsWith(l)}function d(){const e=Date.now(),t=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16);return l+`${e}/${t}`}function u(e){return`es://temp-file/${Date.now()}/${Math.floor(Math.random()*16**6).toString(16).padStart(6,"0")}/${e}`}o.d(t,["DI",0,s,"He",0,"es://human","KY",0,"es://layout-profile/standard","fv",0,l,"iM",0,r,"ke",0,i,"y3",0,a])},6918(e,t,o){const n=/^[A-Za-z_$][A-Za-z0-9_$]*$/;o.d(t,["_V",0,n])},6616(e,t,o){o.d(t,{DO:()=>y,VH:()=>l});var n=o(4262),i=o(6918);const a="shogihome-wasm-engine/1",s=["check","spin","combo","button","string","filename"],r=/^[A-Za-z0-9._-]+(?:\/[A-Za-z0-9._-]+)*$/;function l(e){return r.test(e)&&e.split("/").every(e=>"."!==e&&".."!==e)}function c(e){throw new Error(`invalid engine manifest: ${e}`)}function h(e,t){return("object"!=typeof e||null===e||Array.isArray(e))&&c(`${t} must be an object`),e}function d(e,t){return"string"==typeof e&&""!==e||c(`${t} must be a non-empty string`),e}function u(e,t,o){const n=d(e,t);return[...n].length>o&&c(`${t} must be at most ${o} characters: ${n}`),n}function m(e,t){const o=d(e,t);return l(o)||c(`${t} must be a relative path without "..": ${o}`),o}function p(e,t){const o=d(e,t);let n;try{n=new URL(o)}catch{c(`${t} must be a valid URL: ${o}`)}return"https:"===n.protocol&&n.hostname||c(`${t} must be an https URL with a host: ${o}`),{text:o,url:n}}function g(e,t){const o=h(e,t),n={};for(const[e,i]of Object.entries(o))"string"!=typeof i&&"number"!=typeof i&&c(`${t}.${e} must be a string or a number`),n[e]=i;return n}function S(e,t){const o=h(e,t),n={id:m(o.id,`${t}.id`),displayName:d(o.displayName,`${t}.displayName`)};if(void 0!==o.values&&(n.values=g(o.values,`${t}.values`)),void 0!==o.tags){Array.isArray(o.tags)||c(`${t}.tags must be an array`),n.tags=[];for(const e of o.tags)"game"!==e&&"research"!==e&&"mate"!==e&&c(`${t}.tags[] must be one of "game", "research", or "mate"`),n.tags.push(e)}return void 0!==o.mobileGame&&(n.mobileGame=function(e,t){const o=h(e,t);return Array.isArray(o.levels)&&0!==o.levels.length||c(`${t}.levels must be a non-empty array`),{levels:o.levels.map((e,o)=>{const n=`${t}.levels[${o}]`,i=h(e,n),a={label:d(i.label,`${n}.label`)};return void 0!==i.values&&(a.values=g(i.values,`${n}.values`)),a})}}(o.mobileGame,`${t}.mobileGame`)),n}function y(e){const t=h(e,"manifest"),o=d(t.abi,"manifest.abi");o!==a&&c(`unsupported abi: ${o} (expected ${a})`),Array.isArray(t.presets)&&0!==t.presets.length||c("manifest.presets must be a non-empty array");const r={abi:o,module:m(t.module,"manifest.module"),moduleFormat:"esm",name:d(t.name,"manifest.name"),author:d(t.author,"manifest.author"),presets:t.presets.map((e,t)=>S(e,`manifest.presets[${t}]`))};if(void 0!==t.moduleFormat){const e=d(t.moduleFormat,"manifest.moduleFormat");"esm"!==e&&"umd"!==e&&c(`manifest.moduleFormat is unknown: ${e}`),r.moduleFormat=e}if("umd"===r.moduleFormat){const e=d(t.exportName,"manifest.exportName");i._V.test(e)||c(`manifest.exportName must be an identifier: ${e}`),r.exportName=e}if(void 0!==t.assetBaseURL){const{text:e,url:o}=p(t.assetBaseURL,"manifest.assetBaseURL");o.pathname.endsWith("/")||c(`manifest.assetBaseURL must end with "/": ${e}`),(o.search||o.hash)&&c(`manifest.assetBaseURL must not have a query or fragment: ${e}`),r.assetBaseURL=e}if(void 0!==t.badge&&(r.badge=u(t.badge,"manifest.badge",8)),void 0!==t.banner){const e=m(t.banner,"manifest.banner"),o=e.toLowerCase();n.AE.some(e=>o.endsWith(e))||c(`manifest.banner must be one of ${n.AE.join(", ")}: ${e}`),r.banner=e}void 0!==t.description&&(r.description=u(t.description,"manifest.description",400)),void 0!==t.links&&(Array.isArray(t.links)&&0!==t.links.length||c("manifest.links must be a non-empty array"),r.links=t.links.map((e,t)=>function(e,t){const o=h(e,t);return{label:u(o.label,`${t}.label`,40),url:p(o.url,`${t}.url`).text}}(e,`manifest.links[${t}]`))),void 0!==t.requiresCrossOriginIsolation&&("boolean"!=typeof t.requiresCrossOriginIsolation&&c("manifest.requiresCrossOriginIsolation must be a boolean"),r.requiresCrossOriginIsolation=t.requiresCrossOriginIsolation),void 0!==t.licenses&&(Array.isArray(t.licenses)&&0!==t.licenses.length||c("manifest.licenses must be a non-empty array"),r.licenses=t.licenses.map((e,t)=>function(e,t){const o=h(e,t),n={spdx:d(o.spdx,`${t}.spdx`),file:m(o.file,`${t}.file`)};return void 0!==o.subject&&(n.subject=d(o.subject,`${t}.subject`)),void 0!==o.source&&(n.source=p(o.source,`${t}.source`).text),n}(e,`manifest.licenses[${t}]`))),void 0!==t.options&&(Array.isArray(t.options)||c("manifest.options must be an array"),r.options=t.options.map((e,t)=>function(e,t){const o=h(e,t),n=d(o.type,`${t}.type`);s.includes(n)||c(`${t}.type is unknown: ${n}`);const i={name:d(o.name,`${t}.name`),type:n};void 0!==o.default&&("string"!=typeof o.default&&"number"!=typeof o.default&&c(`${t}.default must be a string or a number`),i.default=o.default);for(const e of["min","max"])void 0!==o[e]&&("number"!=typeof o[e]&&c(`${t}.${e} must be a number`),i[e]=o[e]);return void 0!==o.vars&&(Array.isArray(o.vars)||c(`${t}.vars must be an array`),i.vars=o.vars.map((e,o)=>d(e,`${t}.vars[${o}]`))),i}(e,`manifest.options[${t}]`))),void 0!==t.dataFiles&&(Array.isArray(t.dataFiles)||c("manifest.dataFiles must be an array"),r.dataFiles=t.dataFiles.map((e,t)=>{const o=`manifest.dataFiles[${t}]`,n=h(e,o);return{url:m(n.url,`${o}.url`),path:d(n.path,`${o}.path`)}}));const l=new Set;for(const e of r.presets)l.has(e.id)&&c(`duplicated preset id: ${e.id}`),l.add(e.id);return r}o.d(t,["pF",0,"cross-origin isolation is required","xF",0,"engine.json"])},6829(e,t,o){o.d(t,{TB:()=>n});o(6616);function n(e){return/(^|[\\/])engine\.json$/.test(e)}},1138(e,t,o){o.d(t,{z:()=>n});class n{_settings={timeMs:0,byoyomi:0,increment:0};_timeMs=0;_byoyomi=0;_elapsedMs=0;timerHandle=0;timerStart=0;lastTimeMs=0;setup(e){this._settings=e,this._timeMs=e.timeMs||0,this._byoyomi=e.byoyomi||0,this._elapsedMs=0}get settings(){return this._settings}get time(){return Math.ceil(this._timeMs/1e3)}get timeMs(){return this._timeMs}get byoyomi(){return this._byoyomi}get elapsedMs(){return this._elapsedMs}start(){this.clearTimer(),this.timerStart=Date.now(),this.lastTimeMs=this._timeMs,this._byoyomi=this.settings.byoyomi||0,this._elapsedMs=0,this.timerHandle=window.setInterval(()=>{const e=this.timeMs,t=this.byoyomi;this._elapsedMs=Date.now()-this.timerStart;const o=this.lastTimeMs-this._elapsedMs;o>=0?this._timeMs=o:(this._timeMs=0,this._byoyomi=Math.max(Math.ceil((this.settings.byoyomi||0)+o/1e3),0)),0!==this.timeMs||0!==this.byoyomi?this.fireBeep(e,t):this.timeout()},100)}fireBeep(e,t){let o=Math.ceil(this.timeMs/1e3),n=Math.ceil(e/1e3);0!==o&&0!==this.byoyomi||(0!==o||0===n?(0!==this.byoyomi&&(o=this.byoyomi,n=t),o!==n&&(o<=5?this.settings.onBeepUnlimited&&this.settings.onBeepUnlimited():(o<=10||20===o||30===o||60===o)&&this.settings.onBeepShort&&this.settings.onBeepShort())):this.settings.onBeepShort&&this.settings.onBeepShort())}pause(){this.clearTimer()}stop(){this.clearTimer(),this.incrementTime()}timeout(){this.clearTimer(),this.settings.onTimeout?.()}clearTimer(){this.timerHandle&&(window.clearInterval(this.timerHandle),this.timerHandle=0),this.settings.onStopBeep?.()}incrementTime(){this._timeMs+=1e3*(this.settings.increment||0)}}},557(e,t,o){o.r(t),o.d(t,{CSAGameManager:()=>S,CSAGameState:()=>p,onCSAClose:()=>E,onCSAGameResult:()=>C,onCSAGameSummary:()=>f,onCSAMove:()=>b,onCSAReject:()=>v,onCSAStart:()=>T});var n=o(1192),i=o(1143),a=o(2911),s=o(5244),r=o(3113),l=o(596),c=o(416),h=o(6292),d=o(4685),u=o(9939),m=o(117);var p,g;!function(e){e[e.OFFLINE=0]="OFFLINE",e[e.PLAYER_SETUP=1]="PLAYER_SETUP",e[e.WAITING_LOGIN=2]="WAITING_LOGIN",e[e.LOGIN_FAILED=3]="LOGIN_FAILED",e[e.LOGIN_RETRY_INTERVAL=4]="LOGIN_RETRY_INTERVAL",e[e.READY=5]="READY",e[e.GAME=6]="GAME"}(p||(p={})),function(e){e[e.DO_NOT_RELOGIN=0]="DO_NOT_RELOGIN",e[e.RELOGIN_WITH_INTERVAL=1]="RELOGIN_WITH_INTERVAL",e[e.RELOGIN_IMMEDIATELY=2]="RELOGIN_IMMEDIATELY"}(g||(g={}));class S{recordManager;blackClock;whiteClock;_state=p.OFFLINE;_settings=(0,s.eA)();_sessionID=0;stopRequested=!1;repeat=0;player;gameSummary=(0,i.Rr)();searchInfo;playerBuilder=(0,a.c)();retryTimer;onSaveRecord=()=>{};onGameNext=()=>{};onNewGame=()=>{};onClosed=()=>{};onLoginRetry=()=>{};onFlipBoard=()=>{};onPieceBeat=()=>{};onBeepShort=()=>{};onBeepUnlimited=()=>{};onStopBeep=()=>{};onError=()=>{};constructor(e,t,o){this.recordManager=e,this.blackClock=t,this.whiteClock=o}on(e,t){switch(e){case"saveRecord":this.onSaveRecord=t;break;case"gameNext":this.onGameNext=t;break;case"newGame":this.onNewGame=t;break;case"closed":this.onClosed=t;break;case"loginRetry":this.onLoginRetry=t;break;case"flipBoard":this.onFlipBoard=t;break;case"pieceBeat":this.onPieceBeat=t;break;case"beepShort":this.onBeepShort=t;break;case"beepUnlimited":this.onBeepUnlimited=t;break;case"stopBeep":this.onStopBeep=t;break;case"error":this.onError=t}return this}get state(){return this._state}get settings(){return this._settings}get sessionID(){return this._sessionID}get usiSessionID(){return this.player instanceof u.USIPlayer?this.player.sessionID:0}get isMyTurn(){return this.recordManager.record.position.color===this.gameSummary.myColor}get waitingForHumanPlayerMove(){return this.isMyTurn&&this.settings.player.uri===m.He}async login(e,t){if(this.sessionID)throw new Error("CSAGameManager#login: session already exists");if(this._state!==p.OFFLINE)throw new Error("CSAGameManager#login: unexpected state");this._state=p.PLAYER_SETUP,this._settings=e,this.playerBuilder=t,this.repeat=0;try{this.player=await this.playerBuilder.build(this._settings.player,e=>this.recordManager.updateSearchInfo(c.K.OPPONENT,e))}catch(e){throw this._state=p.OFFLINE,e}this.doLogin().catch(this.onError)}async relogin(){if(this.settings.restartPlayerEveryGame){this._state=p.PLAYER_SETUP,this.player&&(await this.player.close(),this.player=void 0);try{this.player=await this.playerBuilder.build(this._settings.player,e=>this.recordManager.updateSearchInfo(c.K.OPPONENT,e))}catch(e){throw this._state=p.LOGIN_FAILED,this.close(g.RELOGIN_WITH_INTERVAL),e}}await this.doLogin()}async doLogin(){if(!this.player)throw new Error("CSAGameManager#login: player is not initialized");try{this._state=p.PLAYER_SETUP,await this.player.readyNewGame(),this._state=p.WAITING_LOGIN;const e=await n.Ay.csaLogin(this._settings.server);this._sessionID=e,this._state=p.READY,function(e,t){y[e]=t}(this.sessionID,this),this.onGameNext()}catch(e){throw this._state=p.LOGIN_FAILED,this.close(g.RELOGIN_WITH_INTERVAL),new Error(`CSAGameManager#login: ${h.t.failedToStartNewGame}: ${e}`)}}stop(){this.sessionID&&(this.stopRequested=!0,n.Ay.csaStop(this.sessionID))}logout(){this.close(g.DO_NOT_RELOGIN)}close(e){if(this._state!==p.OFFLINE&&this._state!==p.WAITING_LOGIN){var t;if(this._state===p.GAME&&this.settings.enableAutoSave&&this.onSaveRecord(this.settings.autoSaveDirectory),this.stopRequested&&(e=g.DO_NOT_RELOGIN,this.stopRequested=!1),this.sessionID&&(t=this.sessionID,delete y[t],n.Ay.csaLogout(this.sessionID).catch(e=>{this.onError(new Error(`CSAGameManager#close: ${h.t.errorOccuredWhileLogoutFromCSAServer}: ${e}`))}),this._sessionID=0),this.blackClock.stop(),this.whiteClock.stop(),this._state=p.OFFLINE,this.retryTimer&&(clearTimeout(this.retryTimer),this.retryTimer=void 0),e===g.DO_NOT_RELOGIN||this.repeat>=this.settings.repeat)return this.player&&(this.player.close().catch(e=>{this.onError(new Error(`CSAGameManager#close: ${h.t.failedToShutdownEngines}: ${e}`))}),this.player=void 0),void this.onClosed();e===g.RELOGIN_IMMEDIATELY?this.relogin().catch(this.onError):(this._state=p.LOGIN_RETRY_INTERVAL,this.onLoginRetry(),this.retryTimer=setTimeout(()=>this.relogin().catch(this.onError),1e4))}}onGameSummary(e){this.gameSummary=e;const t=this.recordManager.importRecord(this.gameSummary.position,{type:r.RecordFormatType.CSA});if(t)return this.onError(`CSAGameManager#onGameSummary: ${t}`),void this.close(g.DO_NOT_RELOGIN);this.recordManager.changePly(Number.MAX_SAFE_INTEGER),n.Ay.csaAgree(this.sessionID,this.gameSummary.id)}onReject(){this.close(g.RELOGIN_WITH_INTERVAL)}onStart(e){this.repeat++,this.onNewGame(this.repeat);const t=this.gameSummary.players.black.time,o=this.gameSummary.players.white.time;this.recordManager.setGameStartMetadata({gameTitle:this.gameSummary.id,blackName:this.gameSummary.players.black.playerName,whiteName:this.gameSummary.players.white.playerName,blackTimeLimit:{timeSeconds:t.totalTime*t.timeUnitMs/1e3,byoyomi:t.byoyomi*t.timeUnitMs/1e3,increment:t.increment*t.timeUnitMs/1e3},whiteTimeLimit:{timeSeconds:o.totalTime*o.timeUnitMs/1e3,byoyomi:o.byoyomi*o.timeUnitMs/1e3,increment:o.increment*o.timeUnitMs/1e3}}),this.settings.autoFlip&&this.onFlipBoard&&this.onFlipBoard(this.gameSummary.myColor===r.Color.WHITE),this._state=p.GAME,this.next(e)}onMove(e,t){const o=this.isMyTurn,n=(0,r.parseCSAMove)(this.recordManager.record.position,e);if(n instanceof Error)this.onError(`CSAGameManager#onMove: 解釈できない指し手 [${e}]: ${n.message}`);else{if(this.recordManager.appendMove({move:n,moveOption:{ignoreValidation:!0},elapsedMs:this.parseElapsedMs(e)}),o&&this.searchInfo&&this.recordManager.updateSearchInfo(c.K.PLAYER,this.searchInfo),o&&this.searchInfo&&this.settings.enableComment){const e=this.gameSummary.players[n.color].playerName;this.recordManager.appendSearchComment(c.K.PLAYER,this.settings.searchCommentFormat,this.searchInfo,l.Q.APPEND,{engineName:e})}this.onPieceBeat(),this.next(t)}}parseElapsedMs(e){const t=/^.*,T([0-9]+(?:\.[0-9]*)?)$/.exec(e);return t?1e3*Number(t[1]):0}onGameResult(e,t){if(this.recordManager.appendMove({move:this.gameResultToSpecialMove(e,t)}),this.player){let e;switch(t){case i.j5.WIN:e=d.q.WIN;break;case i.j5.LOSE:e=d.q.LOSE;break;case i.j5.DRAW:case i.j5.CENSORED:case i.j5.CHUDAN:e=d.q.DRAW}this.player.gameover(e)}this.close(g.RELOGIN_IMMEDIATELY)}gameResultToSpecialMove(e,t){const o=this.recordManager.record.position.color;switch(e){case i.kt.RESIGN:return r.SpecialMoveType.RESIGN;case i.kt.SENNICHITE:return r.SpecialMoveType.REPETITION_DRAW;case i.kt.OUTE_SENNICHITE:case i.kt.ILLEGAL_MOVE:case i.kt.ILLEGAL_ACTION:switch(t){case i.j5.WIN:return o===this.gameSummary.myColor?r.SpecialMoveType.FOUL_WIN:r.SpecialMoveType.FOUL_LOSE;case i.j5.LOSE:return o===this.gameSummary.myColor?r.SpecialMoveType.FOUL_LOSE:r.SpecialMoveType.FOUL_WIN}break;case i.kt.TIME_UP:return r.SpecialMoveType.TIMEOUT;case i.kt.JISHOGI:return r.SpecialMoveType.ENTERING_OF_KING;case i.kt.MAX_MOVES:return r.SpecialMoveType.IMPASS}return t===i.j5.DRAW?r.SpecialMoveType.DRAW:r.SpecialMoveType.INTERRUPT}onClose(){this.close(this.settings.autoRelogin?g.RELOGIN_WITH_INTERVAL:g.DO_NOT_RELOGIN)}next(e){this.blackClock.stop(),this.whiteClock.stop(),this.syncClock(e),this.startClock();this.recordManager.record.position.color===this.gameSummary.myColor?this.startSearch(e):this.startPonder()}syncClock(e){const t={onBeepShort:()=>this.onBeepShort(),onBeepUnlimited:()=>this.onBeepUnlimited(),onStopBeep:()=>this.onStopBeep()},o=this.gameSummary.players.black.time;this.blackClock.setup({...t,timeMs:e.black.time*o.timeUnitMs,byoyomi:o.byoyomi*o.timeUnitMs/1e3});const n=this.gameSummary.players.white.time;this.whiteClock.setup({...t,timeMs:e.white.time*n.timeUnitMs,byoyomi:n.byoyomi*n.timeUnitMs/1e3})}startClock(){this.recordManager.record.position.color===r.Color.BLACK?this.blackClock.start():this.whiteClock.start()}startSearch(e){this.player?this.player.startSearch(this.recordManager.record.position,this.recordManager.record.usi,this.buildTimeStates(e),{onMove:this.onPlayerMove.bind(this),onResign:this.onPlayerResign.bind(this),onWin:this.onPlayerWin.bind(this),onError:this.onPlayerError.bind(this)}).catch(e=>{this.onError(new Error(`CSAGameManager#startSearch: ${h.t.failedToSendGoCommand}: ${e}`))}):this.onError("CSAGameManager#startSearch: player is not initialized")}startPonder(){this.player?this.player.startPonder(this.recordManager.record.position,this.recordManager.record.usi,this.buildTimeStates()).catch(e=>{this.onError(new Error(`CSAGameManager#startPonder: ${h.t.failedToSendPonderCommand}: ${e}`))}):this.onError("CSAGameManager#startPonder: player is not initialized")}startEarlyPonder(e){if(!this.player)return void this.onError("CSAGameManager#startEarlyPonder: player is not initialized");const t=this.recordManager.record.position.clone(),o=this.recordManager.record.usi+" "+e.usi;t.doMove(e)?this.player.startPonder(t,o,this.buildTimeStates()).catch(e=>{this.onError(new Error(`CSAGameManager#startEarlyPonder: ${h.t.failedToSendPonderCommand}: ${e}`))}):this.onError("CSAGameManager#startEarlyPonder: failed to make a move")}buildTimeStates(e){const t=this.gameSummary.players.black.time,o=this.gameSummary.players.white.time;return{black:{timeMs:e?e.black.time*t.timeUnitMs:this.blackClock.timeMs,byoyomi:t.byoyomi*t.timeUnitMs/1e3,increment:t.increment*t.timeUnitMs/1e3},white:{timeMs:e?e.white.time*o.timeUnitMs:this.whiteClock.timeMs,byoyomi:o.byoyomi*o.timeUnitMs/1e3,increment:o.increment*o.timeUnitMs/1e3}}}onPlayerMove(e,t){let o,i;switch(this.searchInfo=t,this._settings.server.protocolVersion){case s._B.V121:break;case s._B.V121_FLOODGATE:o=t?.score,t?.pv?.forEach(e=>{i=i?i+" ":"",i+=(0,r.formatCSAMove)(e)})}n.Ay.csaMove(this.sessionID,(0,r.formatCSAMove)(e),o,i),this.settings.player.usi?.enableEarlyPonder&&this.startEarlyPonder(e)}onPlayerResign(){n.Ay.csaResign(this.sessionID)}onPlayerWin(){n.Ay.csaWin(this.sessionID)}onPlayerError(e){this.onError(e)}}const y={};function f(e,t){y[e]?.onGameSummary(t)}function v(e){y[e]?.onReject()}function T(e,t){y[e]?.onStart(t)}function b(e,t,o){y[e]?.onMove(t,o)}function C(e,t,o){y[e]?.onGameResult(t,o)}function E(e){y[e]?.onClose()}o.d(t,["loginRetryIntervalSeconds",0,10])},1460(e,t,o){o.d(t,["c",0,()=>new URL(window.location.toString()).searchParams.has("mobile")])},7536(e,t,o){o.d(t,{OL:()=>l,P8:()=>r});var n=o(3113),i=o(8588),a=o(9219),s=o(5516);function r(e){return e.substring(Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"))+1)}function l(e,t={}){const o=e.metadata,r=(0,s.v)(o)||(0,i.sq)().replaceAll("/",""),l=(0,s.Z)(o),c=(0,n.getBlackPlayerName)(o),h=(0,n.getWhitePlayerName)(o),d=Math.floor(1048576*Math.random()).toString(16).toUpperCase().padStart(5,"0");let u=0;for(let t=e.first.next;t&&t.move instanceof n.Move;t=t.next)u=t.ply;const m={datetime:r,title:l||"",sente:c||"",gote:h||"",ply:u.toString(),hex5:d};for(const e in m){const t=m[e];m["_"+e]=t?"_"+t:"",m[e+"_"]=t?t+"_":""}let p=t.template||a.g;p=(0,a.D)(p);for(const e in m){const t=m[e];p=(0,a.D)(p.replaceAll("{"+e+"}",t))}return p=p.trim(),t.extension?p+=t.extension.startsWith(".")?t.extension:"."+t.extension:p+=".kif",p}},1192(e,t,o){var n=o(4262),i=o(9954),a=o(2394);function s(){return window}s().electronShogi;const r=s().electronShogiAPI||i.Z,l={...r,fetchProcessArgs:async()=>JSON.parse(await r.fetchProcessArgs()),loadAppSettings:async()=>JSON.parse(await r.loadAppSettings()),saveAppSettings(e){r.saveAppSettings(JSON.stringify(e))},loadBatchConversionSettings:async()=>JSON.parse(await r.loadBatchConversionSettings()),saveBatchConversionSettings:e=>r.saveBatchConversionSettings(JSON.stringify(e)),loadResearchSettings:async()=>JSON.parse(await r.loadResearchSettings()),saveResearchSettings:e=>r.saveResearchSettings(JSON.stringify(e)),loadAnalysisSettings:async()=>JSON.parse(await r.loadAnalysisSettings()),saveAnalysisSettings:e=>r.saveAnalysisSettings(JSON.stringify(e)),loadBatchAnalysisSettings:async()=>JSON.parse(await r.loadBatchAnalysisSettings()),saveBatchAnalysisSettings:e=>r.saveBatchAnalysisSettings(JSON.stringify(e)),loadGameSettings:async()=>JSON.parse(await r.loadGameSettings()),saveGameSettings:e=>r.saveGameSettings(JSON.stringify(e)),loadCSAGameSettingsHistory:async()=>JSON.parse(await r.loadCSAGameSettingsHistory()),saveCSAGameSettingsHistory:e=>r.saveCSAGameSettingsHistory(JSON.stringify(e)),loadMateSearchSettings:async()=>JSON.parse(await r.loadMateSearchSettings()),saveMateSearchSettings:e=>r.saveMateSearchSettings(JSON.stringify(e)),loadRecordFileHistory:async()=>JSON.parse(await r.loadRecordFileHistory()),loadRecordFileHistoryContents:async()=>JSON.parse(await r.loadRecordFileHistoryContents()),loadUSIEngines:async()=>new n.z4(await r.loadUSIEngines()),saveUSIEngines:e=>r.saveUSIEngines(e.json),loadBookImportSettings:async()=>JSON.parse(await r.loadBookImportSettings()),saveBookImportSettings:e=>r.saveBookImportSettings(JSON.stringify(e)),convertRecordFiles:async e=>JSON.parse(await r.convertRecordFiles(JSON.stringify(e))),listRecordFiles:async e=>JSON.parse(await r.listRecordFiles(JSON.stringify(e))),loadNextMoveCollection:async e=>(0,a.iO)(await r.loadNextMoveCollection(e)),saveNextMoveCollection:(e,t)=>r.saveNextMoveCollection(e,(0,a.x4)(t)),loadNextMoveGenerationSettings:async()=>JSON.parse(await r.loadNextMoveGenerationSettings()),saveNextMoveGenerationSettings:e=>r.saveNextMoveGenerationSettings(JSON.stringify(e)),getBookFormat:async e=>await r.getBookFormat(e),getBookInfo:async e=>JSON.parse(await r.getBookInfo(e)),openBook:(e,t,o)=>r.openBook(e,t,JSON.stringify(o)),openBookAsNewSession:async(e,t)=>await r.openBookAsNewSession(e,JSON.stringify(t)),searchBookMoves:async(e,t)=>JSON.parse(await r.searchBookMoves(e,t)),searchBookEntry:async(e,t)=>JSON.parse(await r.searchBookEntry(e,t)),updateBookMove:(e,t,o)=>r.updateBookMove(e,t,JSON.stringify(o)),importBookMoves:async(e,t)=>JSON.parse(await r.importBookMoves(e,JSON.stringify(t))),async getUSIEngineInfo(e,t){const o=await r.getUSIEngineInfo(e,t);return JSON.parse(o)},getEngineIndex:async()=>JSON.parse(await r.getEngineIndex()),listInstalledEnginePackages:async()=>JSON.parse(await r.listInstalledEnginePackages()),fetchEnginePackageLicenses:async e=>JSON.parse(await r.fetchEnginePackageLicenses(e)),installEnginePackage:async(e,t)=>JSON.parse(await r.installEnginePackage(e,t)),async getUSIEngineMetadata(e){const t=await r.getUSIEngineMetadata(e);return JSON.parse(t)},usiLaunch:(e,t)=>r.usiLaunch(JSON.stringify(e),JSON.stringify(t||{})),usiReady:e=>r.usiReady(e),usiGo:(e,t,o)=>r.usiGo(e,t,JSON.stringify(o)),usiGoPonder:(e,t,o)=>r.usiGoPonder(e,t,JSON.stringify(o)),usiPonderHit:(e,t)=>r.usiPonderHit(e,JSON.stringify(t)),csaLogin:e=>r.csaLogin(JSON.stringify(e)),collectSessionStates:async()=>JSON.parse(await r.collectSessionStates()),setupPrompt:async(e,t)=>JSON.parse(await r.setupPrompt(e,t)),exportCaptureAsPNG:e=>r.exportCaptureAsPNG(e.json),exportCaptureAsJPEG:e=>r.exportCaptureAsJPEG(e.json),copyCaptureToClipboard:e=>r.copyCaptureToClipboard(e.json),async loadLayoutProfileList(){const[e,t]=await r.loadLayoutProfileList();return[e,JSON.parse(t)]},updateLayoutProfileList(e,t){r.updateLayoutProfileList(e,JSON.stringify(t))},getMachineSpec:async()=>JSON.parse(await r.getMachineSpec()),getVersionStatus:async()=>JSON.parse(await r.getVersionStatus()),async checkUpdates(){await r.checkUpdates()}},c=l;o.d(t,["Ay",0,c])},9954(e,t,o){var n=o(2147),i=o(8522),a=o(5059),s=o(2036),r=o(4262),l=o(9145),c=o(8503),h=o(6758),d=o(2512),u=o(3189),m=o(6292),p=o(5244),g=o(7716),S=o(9697),y=o(8250),f=o(2048),v=o(3399),T=o(117),b=o(7536),C=o(1460);const E=new Map;var I;!function(e){e.APP_SETTINGS="appSetting",e.RESEARCH_SETTINGS="researchSetting",e.BATCH_CONVERSION_SETTINGS="batchConversionSetting",e.ANALYSIS_SETTINGS="analysisSetting",e.GAME_SETTINGS="gameSetting",e.MATE_SEARCH_SETTINGS="mateSearchSetting",e.CSA_GAME_SETTINGS_HISTORY="csaGameSettingHistory",e.USI_ENGINES="usiEngines"}(I||(I={}));const A=new Map,w={},P={onUSIBestMove:(e,t,o,n)=>{const i=E.get(e);E.delete(e);const a=()=>w.onUSIBestMove?.(e,t,o,n);if((0,C.c)()&&void 0!==i){const e=500-(Date.now()-i);if(e>0)return void setTimeout(a,e)}a()},onUSICheckmate:(e,t,o)=>w.onUSICheckmate?.(e,t,o),onUSICheckmateNotImplemented:e=>w.onUSICheckmateNotImplemented?.(e),onUSICheckmateTimeout:(e,t)=>w.onUSICheckmateTimeout?.(e,t),onUSINoMate:(e,t)=>w.onUSINoMate?.(e,t),onUSIInfo:(e,t,o)=>w.onUSIInfo?.(e,t,JSON.stringify(o))},k=(e,t)=>{switch(e){case l.$.DEBUG:console.debug(t);break;case l.$.WARN:console.warn(t);break;case l.$.ERROR:console.error(t);break;default:console.log(t)}},M=new c.D((0,h.G)(e=>k(l.$.INFO,`wasm-engine: ${e}`)),k);M.setHandlers(P);const N={updateAppState(){},fetchProcessArgs:async()=>JSON.stringify({}),onClosable(){},onClose(){},onSendError(){},onSendMessage(){},onSendNotification(){},onMenuEvent(){},async loadAppSettings(){const e={...(0,i.Ko)(),promotionSelectorStyle:i.CM.VERTICAL_PREFER_BOTTOM,enableDragAndDrop:!1,engineTimeoutSeconds:30},t=localStorage.getItem(I.APP_SETTINGS);return t?JSON.stringify({...e,...JSON.parse(t)}):JSON.stringify(e)},saveAppSettings(e){localStorage.setItem(I.APP_SETTINGS,e)},async loadBatchConversionSettings(){const e=localStorage.getItem(I.BATCH_CONVERSION_SETTINGS);return e?JSON.stringify({...(0,S.fC)(),...JSON.parse(e)}):JSON.stringify((0,S.fC)())},async saveBatchConversionSettings(e){localStorage.setItem(I.BATCH_CONVERSION_SETTINGS,e)},async loadResearchSettings(){const e=localStorage.getItem(I.RESEARCH_SETTINGS);return e?JSON.stringify({...(0,s.uT)(),...JSON.parse(e)}):JSON.stringify((0,s.uT)())},async saveResearchSettings(e){localStorage.setItem(I.RESEARCH_SETTINGS,e)},async loadAnalysisSettings(){const e=localStorage.getItem(I.ANALYSIS_SETTINGS);return e?JSON.stringify({...(0,n.z$)(),...JSON.parse(e)}):JSON.stringify((0,n.z$)())},async saveAnalysisSettings(e){localStorage.setItem(I.ANALYSIS_SETTINGS,e)},async loadBatchAnalysisSettings(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async saveBatchAnalysisSettings(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async loadGameSettings(){const e=localStorage.getItem(I.GAME_SETTINGS);return e?JSON.stringify({...(0,a.Bi)(),...JSON.parse(e)}):JSON.stringify({...(0,a.Bi)(),enableAutoSave:!1})},async saveGameSettings(e){localStorage.setItem(I.GAME_SETTINGS,e)},async loadCSAGameSettingsHistory(){const e=localStorage.getItem(I.CSA_GAME_SETTINGS_HISTORY);return e?JSON.stringify({...(0,p.uU)(),...JSON.parse(e)}):JSON.stringify((0,p.uU)())},async saveCSAGameSettingsHistory(e){localStorage.setItem(I.CSA_GAME_SETTINGS_HISTORY,e)},async loadMateSearchSettings(){const e=localStorage.getItem(I.MATE_SEARCH_SETTINGS);return e?JSON.stringify({...(0,g.a)(),...JSON.parse(e)}):JSON.stringify((0,g.a)())},async saveMateSearchSettings(e){localStorage.setItem(I.MATE_SEARCH_SETTINGS,e)},async loadUSIEngines(){const e=new r.z4(localStorage.getItem(I.USI_ENGINES)||void 0),t=await(0,d.K$)(e=>{k(l.$.ERROR,`failed to load builtin engine: ${e.message}`),(0,u.$U)().add(new Error((0,d.ov)(e)))});for(const o of t){const t=e.getEngine(o.uri);t?((0,r.rh)(o,t),e.updateEngine(o)):e.addEngine(o)}return e.json},async saveUSIEngines(e){localStorage.setItem(I.USI_ENGINES,e)},async loadBookImportSettings(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async saveBookImportSettings(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},onUpdateAppSettings(){},async showOpenRecordDialog(e){const t=document.createElement("input");return t.setAttribute("type","file"),t.setAttribute("accept",e.join(",")),new Promise((e,o)=>{t.click(),t.onchange=()=>{const n=t.files?.[0];n?n.arrayBuffer().then(t=>{const o=T.m7(n.name);A.clear(),A.set(o,t),e(o)}).catch(e=>{o(e)}):o(new Error("invalid file"))},t.oncancel=()=>{e("")}})},showSaveRecordDialog:async e=>e,async showSaveMergedRecordDialog(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async openRecord(e){const t=A.get(e);return t?new Uint8Array(t):Promise.reject(new Error("invalid URI"))},async saveRecord(e,t){const o=new Blob([new Uint8Array(t)],{type:"application/octet-stream"}),n=URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=(0,b.P8)(e),i.click(),URL.revokeObjectURL(n)},loadRecordFileHistory:async()=>JSON.stringify((0,y.e)()),addRecordFileHistory(){},async clearRecordFileHistory(){},loadRecordFileHistoryContents:async()=>"{}",async saveRecordFileBackup(){},async loadRecordFileBackup(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async loadRemoteTextFile(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async convertRecordFiles(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async listRecordFiles(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async showSelectSFENDialog(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async loadSFENFile(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},onOpenRecord(){},async showOpenNextMoveCollectionDialog(){const e=document.createElement("input");return e.setAttribute("type","file"),e.setAttribute("accept",".json"),new Promise((t,o)=>{e.click(),e.onchange=()=>{const n=e.files?.[0];n?n.arrayBuffer().then(e=>{const o=T.m7(n.name);A.clear(),A.set(o,e),t(o)}).catch(e=>{o(e)}):o(new Error("invalid file"))},e.oncancel=()=>{t("")}})},async showSaveNextMoveCollectionDialog(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async loadNextMoveCollection(e){const t=A.get(e);return t?(new TextDecoder).decode(t):Promise.reject(new Error("invalid URI"))},async saveNextMoveCollection(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async loadNextMoveGenerationSettings(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async saveNextMoveGenerationSettings(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async showOpenBookDialog(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async showSaveBookDialog(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async clearBook(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async openBook(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async openBookAsNewSession(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async closeBookSession(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async saveBook(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async exportBook(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},getBookFormat:async()=>"yane2016",getBookInfo:async()=>JSON.stringify({format:"yane2016",type:"in-memory",entryCount:0,unsaved:!1}),searchBookMoves:async()=>"[]",searchBookEntry:async()=>"null",async updateBookMove(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async updateBookPositionComment(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async removeBookMove(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async updateBookMoveOrder(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async importBookMoves(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async showSelectUSIEngineDialog(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},getUSIEngineInfo:async(e,t)=>JSON.stringify(await M.getEngineInfo(e,t)),async getEngineIndex(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},listInstalledEnginePackages:async()=>"[]",async fetchEnginePackageLicenses(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async installEnginePackage(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async cancelEnginePackageInstall(){},async uninstallEnginePackage(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},getUSIEngineMetadata:async()=>JSON.stringify({isShellScript:!1}),async sendUSIOptionButtonSignal(e,t,o){await M.sendOptionButtonSignal(e,t,o)},async usiLaunch(e,t){try{return await M.setupPlayer(JSON.parse(e),JSON.parse(t))}catch(e){throw new Error((0,d.ov)(e))}},async usiReady(e){await M.ready(e)},async usiSetOption(e,t,o){M.setOption(e,t,o)},async usiGo(e,t,o){E.set(e,Date.now()),M.go(e,t,JSON.parse(o))},async usiGoPonder(e,t,o){M.goPonder(e,t,JSON.parse(o))},async usiPonderHit(e){E.set(e,Date.now()),M.ponderHit(e)},async usiGoInfinite(e,t){M.goInfinite(e,t)},async usiGoMate(e,t,o){M.goMate(e,t,o)},async usiStop(e){M.stop(e)},async usiGameover(e,t){M.gameover(e,t)},async usiQuit(e){E.delete(e),M.quit(e)},onUSIBestMove(e){w.onUSIBestMove=e},onUSICheckmate(e){w.onUSICheckmate=e},onUSICheckmateNotImplemented(e){w.onUSICheckmateNotImplemented=e},onUSICheckmateTimeout(e){w.onUSICheckmateTimeout=e},onUSINoMate(e){w.onUSINoMate=e},onEnginePackageInstallProgress(){},onUSIInfo(e){w.onUSIInfo=e},async csaLogin(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async csaLogout(){},async csaAgree(){},async csaMove(){},async csaResign(){},async csaWin(){},async csaStop(){},onCSAGameSummary(){},onCSAReject(){},onCSAStart(){},onCSAMove(){},onCSAGameResult(){},onCSAClose(){},collectSessionStates:async()=>JSON.stringify({os:(0,f.o)(),usiSessions:M.collectSessionStates(),csaSessions:[]}),async setupPrompt(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async openPrompt(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},invokePromptCommand(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},onPromptCommand(){},async showSelectImageDialog(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async cropPieceImage(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async exportCaptureAsPNG(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async exportCaptureAsJPEG(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async copyCaptureToClipboard(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},loadLayoutProfileList:async()=>[T.KY,JSON.stringify((0,v.Nw)())],updateLayoutProfileList(){},onUpdateLayoutProfile(){},createDesktopShortcutForLayoutProfile(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},openLogFile(){},log(e,t){switch(e){case l.$.DEBUG:console.debug(t);break;case l.$.INFO:console.log(t);break;case l.$.WARN:console.warn(t);break;case l.$.ERROR:console.error(t)}},async showSelectFileDialog(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},async showSelectDirectoryDialog(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},openExplorer(){},openParentDirectory(){},openWebBrowser(e){window.open(e,"_blank")},async getMachineSpec(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},isEncryptionAvailable:async()=>!1,getVersionStatus:async()=>JSON.stringify({}),async checkUpdates(){throw new Error(m.t.thisFeatureNotAvailableOnWebApp)},getPathForFile:e=>e.name,onProgress(){}};o.d(t,["Z",0,N])},1374(e,t,o){o.d(t,{e:()=>s});var n=o(3113),i=o(117);const a={[n.PieceType.PAWN]:100,[n.PieceType.LANCE]:300,[n.PieceType.KNIGHT]:400,[n.PieceType.SILVER]:500,[n.PieceType.GOLD]:600,[n.PieceType.BISHOP]:700,[n.PieceType.ROOK]:800,[n.PieceType.KING]:0,[n.PieceType.PROM_PAWN]:400,[n.PieceType.PROM_LANCE]:500,[n.PieceType.PROM_KNIGHT]:500,[n.PieceType.PROM_SILVER]:600,[n.PieceType.HORSE]:1200,[n.PieceType.DRAGON]:1500};class s{uri;timer;constructor(e){this.uri=e}isEngine(){return!0}async readyNewGame(){}async startSearch(e,t,o,a){this.timer=setTimeout(()=>{let o=null;if(this.uri===i.DI)o=this.searchRandom(e);else{const i=n.Record.newByUSI(t);if(i instanceof n.Record){const t=e=>i.getRepetitionCount(e)>=1;o=this.search(this.uri,e.clone(),2,t)[0]}}null===o?a.onResign():a.onMove(o)},500)}async startPonder(){}async startMateSearch(){}async stop(){clearTimeout(this.timer)}async gameover(){}async close(){clearTimeout(this.timer)}searchRandom(e){const t=r(e);for(let o=t.length;o>0;o--){const n=Math.floor(Math.random()*o),i=t[n];if(e.isValidMove(i))return i;t[n]=t[o-1]}return null}search(e,t,o,n){const i=r(t);let a=null,s=-1/0;for(const r of i){let i=new l(e,t,r).evaluate();t.doMove(r)&&(i-=n&&n(t)?1e3:o>1?this.search(e,t,o-1)[1]:this.see(t,r.to),t.undoMove(r),i+=10*Math.random(),i>s&&(s=i,a=r))}return a?[a,s]:[null,0]}see(e,t){const o=[],n=[e.board.at(t).type];for(const i of e.listAttackers(t)){const t=e.board.at(i);t.color===e.color?o.push(t.type):n.push(t.type)}return o.sort((e,t)=>a[e]-a[t]),n.sort((e,t)=>a[e]-a[t]),this.seeSearch(0,o,0,n,0)}seeSearch(e,t,o,i,s){if(o>=t.length)return 0;let r=e+a[i[s]]+a[(0,n.unpromotedPieceType)(i[s])];return r<=0?0:(r-=this.seeSearch(-r,i,s+1,t,o),Math.max(r,0))}}function r(e){const t=[];function o(o,i,a){const s=e.board.at(i);if(s?.color===e.color)return;const r=new n.Move(o,i,!1,e.color,a,s?.type||null);(0,n.isPromotable)(a)&&((0,n.isPromotableRank)(e.color,o.rank)||(0,n.isPromotableRank)(e.color,i.rank))&&(t.push(r.withPromote()),a!==n.PieceType.KNIGHT&&a!==n.PieceType.SILVER)||t.push(r)}for(const t of e.board.listNonEmptySquares()){const i=e.board.at(t);if(i.color!==e.color)continue;const a=(0,n.movableDirections)(i);for(const s of a){switch((0,n.resolveMoveType)(i,s)){case n.MoveType.SHORT:{const e=t.neighbor(s);e.valid&&o(t,e,i.type);break}case n.MoveType.LONG:for(let n=t.neighbor(s);n.valid&&(o(t,n,i.type),!e.board.at(n));n=n.neighbor(s));}}}for(const o of n.handPieceTypes)if(e.hand(e.color).count(o))for(const i of n.Square.all)if(!e.board.at(i)){const a=new n.Move(o,i,!1,e.color,o,null);t.push(a)}return t}class l{playerURI;position;move;drop;from;to;whiteHand;constructor(e,t,o){this.playerURI=e,this.position=t,this.move=o,o.from instanceof n.Square?(this.drop=!1,this.from=t.color===n.Color.BLACK?o.from:o.from.opposite):this.drop=!0,this.to=t.color===n.Color.BLACK?o.to:o.to.opposite,this.whiteHand=this.position.color===n.Color.BLACK?this.position.whiteHand:this.position.blackHand}isTo(e,t){return this.to.equals(new n.Square(e,t))}at(e,t){let o=e instanceof n.Square?e:new n.Square(e,t);return this.position.color===n.Color.WHITE&&(o=o.opposite),this.position.board.at(o)}evaluate(){let e=0;if(this.move.capturedPieceType){const t=this.move.capturedPieceType;e+=a[t]+a[(0,n.unpromotedPieceType)(t)]}if(this.move.promote){const t=this.move.pieceType;e+=a[(0,n.promotedPieceType)(t)]-a[t]}switch(this.move.pieceType){case n.PieceType.PAWN:4===this.to.rank?e+=this.drop?10:20:this.drop||1!==this.to.file&&9!==this.to.file?!this.drop&&this.isTo(3,6)&&this.at(4,6)?e+=30:!this.drop&&this.isTo(5,6)&&this.at(4,6)?.type===n.PieceType.BISHOP&&(e+=50):e+=10;break;case n.PieceType.SILVER:this.from&&this.to.rank<this.from.rank&&this.to.rank>=7&&this.to.file>=2&&this.to.file<=8&&(e+=20);break;case n.PieceType.BISHOP:this.drop&&this.to.rank>=4&&(this.to.file+this.to.rank)%2!=0?e-=200:1===this.to.file||9===this.to.file?e-=500:this.drop&&1===this.to.rank?e-=50:!this.isTo(4,6)||this.at(5,5)||this.at(6,4)||this.at(7,3)||(e+=100);break;case n.PieceType.ROOK:7===this.to.rank&&(e-=20)}if(!this.from||this.move.pieceType!==n.PieceType.PAWN&&this.move.pieceType!==n.PieceType.SILVER&&this.move.pieceType!==n.PieceType.GOLD&&this.move.pieceType!==n.PieceType.PROM_PAWN&&this.move.pieceType!==n.PieceType.PROM_LANCE&&this.move.pieceType!==n.PieceType.PROM_KNIGHT&&this.move.pieceType!==n.PieceType.PROM_SILVER||(this.to.rank<this.from.rank?e+=this.to.rank-3:this.to.rank>this.from.rank&&(e+=3-this.to.rank)),this.to.rank<=4&&this.drop)switch(this.move.pieceType){case n.PieceType.PAWN:e+=3*this.to.rank;break;case n.PieceType.LANCE:case n.PieceType.KNIGHT:e+=2*this.to.rank;break;case n.PieceType.SILVER:case n.PieceType.GOLD:e+=this.to.rank+40-40;break;case n.PieceType.BISHOP:e-=100;break;case n.PieceType.ROOK:e+=500}switch(this.playerURI){case i.ke:e+=this.evaluateStaticRook();break;case i.y3:e+=this.evaluateRangingRook()}return e}evaluateStaticRook(){let e=0;switch(this.move.pieceType){case n.PieceType.PAWN:this.drop?this.isTo(8,7)?e+=200:this.isTo(8,8)&&(e+=50):this.isTo(2,6)||this.isTo(2,5)?e+=50:this.isTo(7,6)?e+=100:this.isTo(6,6)?e+=20:this.drop||3!==this.to.file||(e+=20);break;case n.PieceType.LANCE:case n.PieceType.KNIGHT:e-=50;break;case n.PieceType.SILVER:this.from&&this.from.rank>this.to.rank&&(this.isTo(8,8)||this.isTo(7,7)?e+=100:this.isTo(6,8)||this.isTo(6,7)||this.isTo(3,8)||this.isTo(3,7)||this.isTo(3,5)||this.isTo(4,6)?e+=20:(this.isTo(2,7)||this.isTo(2,6))&&(e+=10));break;case n.PieceType.GOLD:this.drop||(this.isTo(7,8)?e+=80:this.isTo(5,8)?e+=20:this.isTo(6,7)&&this.from&&this.from.file<=6&&(e+=30));break;case n.PieceType.BISHOP:this.at(this.to)?.type===n.PieceType.BISHOP&&(e+=200);break;case n.PieceType.KING:6===this.to.file&&this.from&&5===this.from.file?e+=30:7===this.to.file&&this.from&&6===this.from.file?e+=100:this.to.file<=4&&(e-=1e3)}return e}evaluateRangingRook(){let e=0;switch(this.move.pieceType){case n.PieceType.PAWN:this.drop?this.isTo(8,7)?e+=200:this.isTo(8,8)&&(e+=50):this.isTo(7,6)?e+=100:this.isTo(6,6)&&0===this.whiteHand.count(n.PieceType.BISHOP)?e+=90:this.isTo(6,5)&&this.at(7,8)?(e+=20,this.at(7,5)&&(e+=200)):this.isTo(7,5)?e-=150:1===this.to.file?(e+=40,this.at(1,4)&&(e+=50)):9===this.to.file&&this.at(9,4)&&(e+=50);break;case n.PieceType.LANCE:case n.PieceType.KNIGHT:e-=50;break;case n.PieceType.SILVER:this.from instanceof n.Square&&this.from.rank>this.to.rank&&this.at(7,6)&&(this.isTo(7,8)?e+=40:this.isTo(6,7)?e+=30:this.isTo(5,6)?e+=10:this.isTo(6,5)?e+=this.at(6,6)?.type===n.PieceType.PAWN?-10:20:(this.isTo(4,5)||this.isTo(3,8))&&(e+=10));break;case n.PieceType.GOLD:!this.drop&&this.isTo(7,8)&&(e+=20);break;case n.PieceType.BISHOP:!this.drop&&this.isTo(7,7)&&(e+=70,this.at(8,5)&&(e+=50));break;case n.PieceType.ROOK:!this.drop&&this.isTo(6,8)&&(e+=80);break;case n.PieceType.KING:this.to.file>=5?e-=1e3:this.from&&this.from.file>this.to.file&&this.to.file>=2&&(e+=60+5*(4-this.to.file))}return e}}},2911(e,t,o){o.d(t,{c:()=>r});var n=o(9397),i=o(9939),a=o(1374),s=o(117);function r(e){return{async build(t,o){if(t.uri===s.He)return n.B;if(s.b0(t.uri))return new a.e(t.uri);if(s.Em(t.uri)&&t.usi){const n=new i.USIPlayer(t.usi,e,o);return await n.launch(),n}throw new Error("defaultPlayerBuilder#build: 予期せぬプレイヤーURIです: "+t.uri)}}}},9397(e,t,o){const n=new class{searchHandler;isEngine(){return!1}async readyNewGame(){}async startSearch(e,t,o,n){this.searchHandler=n}async startPonder(){}async startMateSearch(){}async stop(){}async gameover(){}async close(){this.searchHandler=void 0}doMove(e){const t=this.searchHandler;this.searchHandler=void 0,t?.onMove(e)}resign(){const e=this.searchHandler;this.searchHandler=void 0,e?.onResign()}win(){const e=this.searchHandler;this.searchHandler=void 0,e?.onWin()}};o.d(t,["B",0,n])},9939(e,t,o){o.r(t),o.d(t,{USIPlayer:()=>m,isActiveUSIPlayerSession:()=>b,onUSIBestMove:()=>g,onUSICheckmate:()=>S,onUSICheckmateNotImplemented:()=>y,onUSICheckmateTimeout:()=>f,onUSIInfo:()=>T,onUSINoMate:()=>v,setOnStartSearchHandler:()=>d,setOnUpdateUSIInfoHandler:()=>u});var n=o(1192),i=o(9481),a=o(4262),s=o(3113),r=o(9145),l=o(7047);let c=()=>{},h=()=>{};function d(e){c=e}function u(e){h=e}class m{engine;launchOptions;onSearchInfo;_sessionID=0;usi;position;searchHandler;mateHandler;ponder;ponderMove;info;usiInfoTimeout;customMultiPV;bookSessionID;usiInfoCommandHandler;constructor(e,t,o){this.engine=e,this.launchOptions=t,this.onSearchInfo=o}get name(){return this.engine.name}get sessionID(){return this._sessionID}async launch(){try{this.engine.extraBook?.enabled&&this.engine.extraBook.filePath&&(this.bookSessionID=await n.Ay.openBookAsNewSession(this.engine.extraBook.filePath,{forceOnTheFly:this.engine.extraBook.onTheFly})),this._sessionID=await n.Ay.usiLaunch(this.engine,this.launchOptions),p[this.sessionID]=this}catch(e){throw this.bookSessionID&&await n.Ay.closeBookSession(this.bookSessionID),e}}isEngine(){return!0}async readyNewGame(){await n.Ay.usiReady(this.sessionID)}async startSearch(e,t,o,i){this.clearHandlers(),this.searchHandler=i,this.usi=t,this.position=e.clone(),await this.searchBook()||(this.ponderMove&&this.ponder===this.usi?n.Ay.usiPonderHit(this.sessionID,o):(this.info=void 0,await n.Ay.usiGo(this.sessionID,this.usi,o),c(this.sessionID,this.position)),this.ponderMove=void 0,this.ponder=void 0)}async startPonder(e,t,o){if(!(0,a.my)(this.engine))return;if(this.ponderMove)return;const i=t;if(!this.ponder||!this.ponder.startsWith(i))return;const s=e.createMoveByUSI(this.ponder.slice(i.length+1));s&&e.isValidMove(s)&&(this.clearHandlers(),this.usi=this.ponder,this.position=e.clone(),this.stochasticPonder||this.position.doMove(s),this.info=void 0,this.ponderMove=s,await n.Ay.usiGoPonder(this.sessionID,this.ponder,o),c(this.sessionID,this.position))}async startMateSearch(e,t,o,i){this.clearHandlers(),this.usi=t,this.info=void 0,this.position=e.clone(),this.mateHandler=i,await n.Ay.usiGoMate(this.sessionID,this.usi,o),c(this.sessionID,this.position)}async startResearch(e,t){this.clearHandlers(),this.usi=t,this.info=void 0,this.position=e.clone(),await this.searchBook()||(await n.Ay.usiGoInfinite(this.sessionID,t),c(this.sessionID,this.position))}async searchBook(){if(!this.bookSessionID||!this.position)return!1;try{const e=await n.Ay.searchBookMoves(this.bookSessionID,this.position.sfen);if(0===e.length)return!1;if(this.ponderMove&&(await n.Ay.usiStop(this.sessionID),this.ponderMove=void 0,this.ponder=void 0),c(this.sessionID,this.position),h&&this.usi)for(let t=0;t<e.length;t++){const o=e[t];if(this.position.createMoveByUSI(o.usi)){const e={multipv:t+1,depth:o.depth,scoreCP:o.score,nodes:o.count,currmove:o.usi,pv:o.usi2?[o.usi,o.usi2]:[o.usi]};h(this.sessionID,this.position,this.name,e)}}const t=this.selectBookMove(e),o=this.position.createMoveByUSI(t.usi);if(!o)return n.Ay.log(r.$.ERROR,`Failed to search book moves: invalid move from book: ${t.usi}`),!1;const i=this.searchHandler;return this.clearHandlers(),i&&i.onMove(o),!0}catch(e){return n.Ay.log(r.$.ERROR,`Failed to search book moves: ${e}`),!1}}selectBookMove(e){switch(this.engine.extraBook?.moveSelectionRule){case a.hJ.WEIGHTED_BY_COUNT:return(0,l.RJ)(e,e=>e.count??0);case a.hJ.WEIGHTED_BY_SCORE:{const t=e.map(e=>e.score).filter(e=>void 0!==e&&Number.isFinite(e));if(0===t.length)return e[0];const o=Math.max(...t),n=this.engine.extraBook?.scoreTemperature,i=void 0!==n&&Number.isFinite(n)&&n>0?n:100;return(0,l.RJ)(e,e=>void 0!==e.score?Math.exp((e.score-o)/i):0)}default:return e[0]}}async stop(){await n.Ay.usiStop(this.sessionID)}async gameover(e){await n.Ay.usiGameover(this.sessionID,e)}async close(){this.clearHandlers(),await n.Ay.usiQuit(this.sessionID),delete p[this.sessionID],this.bookSessionID&&await n.Ay.closeBookSession(this.bookSessionID)}clearHandlers(){this.searchHandler=void 0,this.mateHandler=void 0}onBestMove(e,t,o){const n=this.searchHandler;if(this.clearHandlers(),!n||!this.position)return;if(e!==this.usi)return;if("resign"===t)return void n.onResign();if("win"===t)return void n.onWin();const i=this.position.createMoveByUSI(t);if(!i)return n.onError("エンジンから不明な指し手を受信しました:"+t),void n.onResign();const a=e.indexOf(" moves ")>0;if(this.ponder=o&&`${e}${a?"":" moves"} ${t} ${o}`,this.flushUSIInfo(),this.info?.pv&&this.info.pv.length>=1&&this.info.pv[0].equals(i)){const e={...this.info,pv:this.info.pv.slice(1)};n.onMove(i,e)}else n.onMove(i)}onCheckmate(e,t){if(e!==this.usi||!this.position)return;h(this.sessionID,this.position,this.name,{pv:t});const o=this.mateHandler;if(this.clearHandlers(),!o)return;const n=this.position,i=[];for(const e of t){const t=n.createMoveByUSI(e);if(!t)return void o.onError("エンジンから不明な指し手を受信しました:"+e);if(i.push(t),!n.doMove(t))return void o.onError("エンジンから無効な指し手を受信しました:"+e)}o.onCheckmate(i)}onCheckmateNotImplemented(){const e=this.mateHandler;this.clearHandlers(),e?.onNotImplemented()}onCheckmateTimeout(e){if(e!==this.usi||!this.position)return;const t=this.mateHandler;this.clearHandlers(),t?.onTimeout()}onNoMate(e){if(e!==this.usi||!this.position)return;const t=this.mateHandler;this.clearHandlers(),t?.onNoMate()}setUSIInfoCommandHandler(e){this.usiInfoCommandHandler=e}onUSIInfo(e,t){if(e!==this.usi||!this.position)return;if(h(this.sessionID,this.position,this.name,t,this.ponderMove),this.usiInfoCommandHandler?.(this.position,t),t.multipv&&1!==t.multipv)return;const o=this.position.color===s.Color.BLACK?1:-1,n=t.pv&&t.pv.length>=1?t.pv:t.currmove?[t.currmove]:void 0;this.info={usi:e,depth:t.depth??this.info?.depth,nodes:t.nodes??this.info?.nodes,score:(t.scoreCP&&t.scoreCP*o)??this.info?.score,mate:(t.scoreMate&&t.scoreMate*o)??this.info?.mate,pv:(n&&(0,i.X)(this.position,n))??this.info?.pv},this.ponderMove||this.usiInfoTimeout||(this.usiInfoTimeout=window.setTimeout(()=>{this.flushUSIInfo()},500))}flushUSIInfo(){this.usiInfoTimeout&&(clearTimeout(this.usiInfoTimeout),this.usiInfoTimeout=void 0),this.info&&this.onSearchInfo?.(this.info)}get multiPV(){return this.customMultiPV||(0,a.Lo)(this.engine)}async setMultiPV(e){const t=this.engine.options[a.Br]||this.engine.options[a.aW];if(!t||"spin"!==t.type)throw new Error("The engine does not support MultiPV option.");if(t.min&&e<t.min||t.max&&e>t.max)throw new Error("The MultiPV value is out of range.");await n.Ay.usiSetOption(this.sessionID,t.name,e.toFixed(0)),this.customMultiPV=e}get stochasticPonder(){return(0,a.pk)(this.engine)}}const p={};function g(e,t,o,n){p[e]?.onBestMove(t,o,n)}function S(e,t,o){p[e]?.onCheckmate(t,o)}function y(e){p[e]?.onCheckmateNotImplemented()}function f(e,t){p[e]?.onCheckmateTimeout(t)}function v(e,t){p[e]?.onNoMate(t)}function T(e,t,o){p[e]?.onUSIInfo(t,o)}function b(e){return!!p[e]}},2508(e,t,o){o.d(t,{B:()=>S});var n=o(8588),i=o(3113),a=o(596),s=o(6292),r=o(8193),l=o(1192),c=o(9145),h=o(9600),d=o(416),u=o(164);function m(e){e.forEach(e=>{e.customData=(0,u.vj)(e.comment,e.customData)})}function p(e){return e.timeSeconds+"+"+e.byoyomi+"+"+e.increment}function g(e){return(0,h.T)(e.timeSeconds)+"+"+String(e.byoyomi).padStart(2,"0")}class S{_record;_recordFilePath;_unsaved=!1;_sourceURL;_positionCounts=new Map;changePositionHandler=null;updateTreeHandler=null;updateCommentHandler=null;updateBookmarkHandler=null;updateCustomDataHandler=null;backupHandler=null;constructor(e=new i.Record){this._record=e,this.resetPositionCounts(),this.bindRecordHandlers(),m(this._record)}get record(){return this._record}get recordFilePath(){return this._recordFilePath}get unsaved(){return this._unsaved}get sourceURL(){return this._sourceURL}get positionCounts(){return this._positionCounts}updateRecordFilePath(e,t){this._unsaved=!1,e!==this._recordFilePath&&(this._recordFilePath=e,e&&!t&&l.Ay.addRecordFileHistory(e))}async saveBackup(){if(!this.unsaved)return;const e=this.onBackup(),t=(0,i.exportKIF)(this.record,e||{});await l.Ay.saveRecordFileBackup(t)}saveBackupOnBackground(){this.saveBackup().catch(e=>{l.Ay.log(c.$.ERROR,`RecordManager#saveBackupOnBackground: failed to save backup: ${e}`)})}clearRecord(e){this.saveBackupOnBackground(),this._record.clear(e),this._unsaved=!1,this._recordFilePath=void 0,this._sourceURL=void 0,this.onChangePosition(),this.onUpdateTree()}replaceRecord(e,t){this.saveBackupOnBackground(),this._record=e,this.resetPositionCounts(),this.bindRecordHandlers(),this.updateRecordFilePath(t?.path,t?.skipHistory),this._unsaved=!t?.markAsSaved,this._sourceURL=void 0,m(this._record),this.onChangePosition(),this.onUpdateTree()}reset(){this.clearRecord()}resetByInitialPositionType(e){this.resetBySFEN((0,i.initialPositionTypeToSFEN)(e))}resetBySFEN(e){const t=new i.Position;return!!t.resetBySFEN(e)&&(this.clearRecord(t),!0)}resetByUSEN(e,t,o){const n=i.Record.newByUSEN(e,t,o);if(n instanceof Error)return n;this.replaceRecord(n,{markAsSaved:!0})}resetByPosition(e){this.clearRecord(e),this._unsaved=!0}parseRecordData(e,t){let o;switch(t||(0,i.detectRecordFormat)(e)){case i.RecordFormatType.SFEN:{const t=i.Position.newBySFEN(e);o=t?new i.Record(t):new Error(s.t.failedToParseSFEN);break}case i.RecordFormatType.USI:o=i.Record.newByUSI(e);break;case i.RecordFormatType.KIF:o=(0,i.importKIF)(e);break;case i.RecordFormatType.KI2:o=(0,i.importKI2)(e);break;case i.RecordFormatType.CSA:o=(0,i.importCSA)(e);break;case i.RecordFormatType.JKF:o=(0,i.importJKFString)(e);break;case i.RecordFormatType.USEN:o=i.Record.newByUSEN(e);break;default:o=new Error(s.t.failedToDetectRecordFormat)}return o instanceof Error?(0,s.cB)(o):o}importRecord(e,t){const o=this.parseRecordData(e,t?.type);if(o instanceof Error)return o;switch(t?.mode||"standard"){case"standard":this.replaceRecord(o,t);break;case"mergeIntoRoot":return this.mergeRecord(o);case"mergeIntoCurrent":return this.mergeRecordIntoCurrent(o)}}importRecordFromBuffer(e,t,o){const n=(0,r.QT)(t);if(!n)return new Error(`${s.t.unknownFileExtension}: ${t}`);const i=(0,r.Nj)(e,n,o);if(i instanceof Error)return(0,s.cB)(i);this.replaceRecord(i,{path:t,markAsSaved:!0,skipHistory:o?.skipHistory})}async importRecordFromRemoteURL(e){const t=!!e;if(!(e=e||this._sourceURL))throw new Error("RecordManager#importRecordFromRemoteURL: source URL is not set");const o=await l.Ay.loadRemoteTextFile(e),n=this.parseRecordData(o);if(n instanceof Error)throw n;if(t)return this.replaceRecord(n),void(this._sourceURL=e);const i=this.mergeRecord(n);if(i)throw i}exportRecordAsBuffer(e,t){const o=(0,r.QT)(e);if(!o)return new Error(`${s.t.unknownFileExtension}: ${e}`);const n=(0,r.KM)(this._record,o,t);return this.updateRecordFilePath(e,t.skipHistory),n}applyPosition(e){this._record.clear(e),this._unsaved=!0,this._recordFilePath=void 0,this.onChangePosition()}swapNextTurn(){const e=this.record.position.clone();e.setColor((0,i.reverseColor)(e.color)),this.applyPosition(e)}changePosition(e){const t=this.record.position.clone();t.edit(e),this.applyPosition(t)}goForward(){this._record.goForward()}goBack(){this._record.goBack()}changePly(e){this._record.goto(e)}changeBranch(e){return this._record.switchBranchByIndex(e)}changeNode(e){return this._record.gotoNode(e)}swapWithNextBranch(){return!!this._record.swapWithNextBranch()&&(this._unsaved=!0,!0)}swapWithPreviousBranch(){return!!this._record.swapWithPreviousBranch()&&(this._unsaved=!0,!0)}resetAllBranchSelection(){this._record.resetAllBranchSelection()}removeCurrentMove(){return!!this._record.removeCurrentMove()&&(this._unsaved=!0,this.onUpdateTree(),!0)}removeNextMove(){return!!this._record.removeNextMove()&&(this._unsaved=!0,this.onUpdateTree(),!0)}jumpToBookmark(e){return this._record.jumpToBookmark(e)}updateComment(e){this._record.current.comment=e,this._unsaved=!0,this.onUpdateComment()}updateBookmark(e){this._record.current.bookmark=e,this._unsaved=!0,this.onUpdateBookmark()}appendComment(e,t){if(!e)return;const o=this._record.current.comment,n=this.record.current.comment?"\n":"";switch(t){case a.Q.NONE:break;case a.Q.INSERT:this._record.current.comment=e+n+o;break;case a.Q.APPEND:this._record.current.comment=o+n+e;break;case a.Q.OVERWRITE:this._record.current.comment=e}this._unsaved=!0,this.onUpdateComment()}appendSearchComment(e,t,o,n,i){let s;switch(t){case a.F.SHOGIHOME:s=(0,u.Ah)(this.record.position,e,o,i);break;case a.F.FLOODGATE:s=(0,u.V3)(o);break;case a.F.CSA3:s=(0,u.yx)(o);break;case a.F.SHOGIGUI:s=(0,u.Vg)(e,o)}i?.header&&(s=i.header+"\n"+s),this.appendComment(s,n),this._unsaved=!0}get inCommentPVs(){return(0,u.pL)(this.record.position,this.record.current.comment)}setGameStartMetadata(e){e.gameTitle&&this._record.metadata.setStandardMetadata(i.RecordMetadataKey.TITLE,e.gameTitle),e.blackName&&this._record.metadata.setStandardMetadata(i.RecordMetadataKey.BLACK_NAME,e.blackName),e.whiteName&&this._record.metadata.setStandardMetadata(i.RecordMetadataKey.WHITE_NAME,e.whiteName),this._record.metadata.setStandardMetadata(i.RecordMetadataKey.DATE,(0,n.sq)()),this._record.metadata.setStandardMetadata(i.RecordMetadataKey.START_DATETIME,(0,n.ln)());const t=e.blackTimeLimit.increment||e.whiteTimeLimit.increment?p:g,o=t(e.blackTimeLimit),a=t(e.whiteTimeLimit);o===a?this._record.metadata.setStandardMetadata(i.RecordMetadataKey.TIME_LIMIT,o):(this._record.metadata.setStandardMetadata(i.RecordMetadataKey.BLACK_TIME_LIMIT,o),this._record.metadata.setStandardMetadata(i.RecordMetadataKey.WHITE_TIME_LIMIT,a)),this._unsaved=!0}setGameEndMetadata(){this._record.metadata.setStandardMetadata(i.RecordMetadataKey.END_DATETIME,(0,n.ln)()),this._unsaved=!0}updateSearchInfo(e,t){const o=this.record.current.customData||{};switch(e){case d.K.PLAYER:o.playerSearchInfo=t;break;case d.K.OPPONENT:o.opponentSearchInfo=t;break;case d.K.RESEARCHER:(t.depth||0)>=(o.researchInfo?.depth||0)&&(o.researchInfo=t);break;case d.K.RESEARCHER_2:(t.depth||0)>=(o.researchInfo2?.depth||0)&&(o.researchInfo2=t);break;case d.K.RESEARCHER_3:(t.depth||0)>=(o.researchInfo3?.depth||0)&&(o.researchInfo3=t);break;case d.K.RESEARCHER_4:(t.depth||0)>=(o.researchInfo4?.depth||0)&&(o.researchInfo4=t)}this._record.current.customData=o,this.onUpdateCustomData()}appendMove(e){return!!this._record.append(e.move,e.moveOption)&&(void 0!==e.elapsedMs&&this._record.current.setElapsedMs(e.elapsedMs),this._unsaved=!0,!0)}appendMovesSilently(e,t){this.unbindChangePositionHandler();try{let o=0;const n=this._record.current.ply;for(const n of e){if(!this._record.append(n,t))break;o++}return this._record.goto(n),this._unsaved=!0,this.onUpdateTree(),o}finally{this.bindRecordHandlers()}}mergeRecord(e){if(this._record.initialPosition.sfen!==e.initialPosition.sfen)return new Error(s.t.failedToMergeRecordWithDifferentInitialPosition);this._record.merge(e),this._unsaved=!0,m(this._record),this.onUpdateTree()}mergeRecordIntoCurrent(e){if(this._record.position.color!==e.initialPosition.color)return new Error(s.t.failedToMergeRecordWithDifferentTurn);const{successCount:t,skipCount:o}=this._record.mergeIntoCurrentPosition(e);return this._unsaved=!0,m(this._record),this.onUpdateTree(),o>0?new Error(s.t.skippedMovesInMerge(o,t+o)):void 0}updateStandardMetadata(e){this._record.metadata.setStandardMetadata(e.key,e.value),this._unsaved=!0}on(e,t){switch(e){case"changePosition":this.changePositionHandler=t;break;case"updateTree":this.updateTreeHandler=t;break;case"updateComment":this.updateCommentHandler=t;break;case"updateBookmark":this.updateBookmarkHandler=t;break;case"updateCustomData":this.updateCustomDataHandler=t;break;case"backup":this.backupHandler=t}return this}onChangePosition(){this.changePositionHandler&&this.changePositionHandler()}onUpdateTree(){this.updateTreeHandler&&this.updateTreeHandler()}onUpdateComment(){this.updateCommentHandler&&this.updateCommentHandler()}onUpdateBookmark(){this.updateBookmarkHandler&&this.updateBookmarkHandler()}onUpdateCustomData(){this.updateCustomDataHandler&&this.updateCustomDataHandler()}onBackup(){return this.backupHandler?this.backupHandler():null}resetPositionCounts(){this._positionCounts.clear(),this._record.forEach(e=>{this.addPositionCount(e)})}isPositionCountTarget(e){return 0===e.ply||e.move instanceof i.Move}addPositionCount(e){if(!this.isPositionCountTarget(e))return;const t=this._positionCounts.get(e.sfen)||0;this._positionCounts.set(e.sfen,t+1)}reducePositionCount(e){if(!this.isPositionCountTarget(e))return;const t=this._positionCounts.get(e.sfen)||0;t>1?this._positionCounts.set(e.sfen,t-1):this._positionCounts.delete(e.sfen)}bindRecordHandlers(){this._record.on("changePosition",this.onChangePosition.bind(this)),this._record.on("clear",this.resetPositionCounts.bind(this)),this._record.on("addNode",e=>{this.addPositionCount(e)}),this._record.on("removeNode",e=>{this.reducePositionCount(e)})}unbindChangePositionHandler(){this._record.on("changePosition",()=>{})}}},3189(e,t,o){o.d(t,{$U:()=>s});var n=o(622);class i{errorCounts={};get errors(){return Object.entries(this.errorCounts).sort(([e],[t])=>e<t?-1:e>t?1:0).map(([e,t])=>({message:e,count:t}))}get hasError(){return!!Object.keys(this.errorCounts).length}add(e){if(e instanceof AggregateError){for(const t of e.errors)this.add(t);return}let t=e instanceof Error?e.message||e.name:""+e;t=t.replace(/Error invoking remote method '[^']*': Error: /,"");const o=this.errorCounts[t]||0;this.errorCounts[t]=o+1}clear(){this.errorCounts={}}}let a;function s(){return a||(a=(0,n.reactive)(new i)),a}},2512(e,t,o){o.d(t,{BU:()=>h,K$:()=>f,ov:()=>y});var n=o(4262),i=o(6292),a=o(117),s=o(3168),r=o(6616);const l=/^engines\/([A-Za-z0-9._-]+)\/$/;function c(e){return`engines/${e}/`}function h(e){if(!function(e){const t=l.exec(e);return!!t&&(0,r.VH)(t[1])}(e))throw new Error(`invalid engine path: ${e}`);return new URL(e,document.baseURI).href}function d(e,t){if(!(0,r.VH)(t))throw new Error(`invalid engine file: ${t}`);return new URL(t,h(c(e))).href}function u(e){return`${a.fv}builtin/${e}`}const m=new Map;async function p(e){const t=m.get(e);if(t)return t;const o=(async()=>{const t=new URL(r.xF,h(c(e))).href,o=await fetch(t);if(!o.ok)throw new Error(`failed to load ${t}: ${o.status}`);return(0,r.DO)(await o.json())})();return m.set(e,o),o.catch(()=>m.delete(e)),o}function g(e,t){const o={};e.options?.forEach((e,t)=>{const n={...e,order:100+t};"combo"!==n.type||n.vars||(n.vars=[]),o[n.name]=n}),o.USI_Hash||(o.USI_Hash={name:"USI_Hash",type:"spin",order:1,default:32}),o.USI_Ponder||(o.USI_Ponder={name:"USI_Ponder",type:"check",order:2,default:"true"});const n=e.presets.find(e=>e.id===t)?.values||{};for(const[e,t]of Object.entries(n)){const n=o[e];n&&"button"!==n.type&&(n.default=t)}return o}function S(e,t){return t.presets.map(o=>({...(0,n.v2)(),uri:u(o.id),name:o.displayName,defaultName:o.displayName,author:t.author,badge:t.badge,banners:t.banner?[{url:d(e,t.banner),source:"manifest"}]:void 0,description:t.description,links:t.links?.map(e=>({...e})),path:c(e),options:g(t,o.id),tags:o.tags?.map(n.iT)}))}function y(e){const t=e instanceof Error?e.message:String(e);return function(e){return!navigator.onLine||e instanceof TypeError}(e)?`${i.t.failedToLoadEngine} ${i.t.engineRequiresOnline}`:t.includes(r.pF)?`${i.t.failedToLoadEngine} ${i.t.engineRequiresReload}`:`${i.t.failedToLoadEngine} ${t}`}async function f(e){const t=[];for(const o of s.m)try{t.push(...S(o,await p(o)))}catch(t){e?.(t instanceof Error?t:new Error(String(t)))}return t}},9955(e,t,o){function n(e){switch(e){case"+":case"+0":case"0":return 1e4;case"-":case"-0":return-1e4;default:return Number(e)}}function i(e){const t={},o=e.split(" ");for(let e=0;e<o.length;e+=1)switch(o[e]){case"depth":t.depth=Number(o[e+1]),e+=1;break;case"seldepth":t.seldepth=Number(o[e+1]),e+=1;break;case"time":t.timeMs=Number(o[e+1]),e+=1;break;case"nodes":t.nodes=Number(o[e+1]),e+=1;break;case"pv":t.pv=o.slice(e+1),e=o.length;break;case"multipv":t.multipv=Number(o[e+1]),e+=1;break;case"score":switch(o[e+1]){case"cp":t.scoreCP=Number(o[e+2]),e+=2;break;case"mate":t.scoreMate=n(o[e+2]),e+=2}break;case"lowerbound":t.lowerbound=!0;break;case"upperbound":t.upperbound=!0;break;case"currmove":t.currmove=o[e+1],e+=1;break;case"hashfull":t.hashfullPerMill=Number(o[e+1]),e+=1;break;case"nps":t.nps=Number(o[e+1]),e+=1;break;case"string":t.string=o.slice(e+1).join(" "),e=o.length}return t}function a(e,t){const o=e.split(" ");if(o.length<4||"name"!==o[0]||"type"!==o[2])return;const n=o[1],i=o[3],a="combo"===i?{name:n,type:i,order:t,vars:[]}:{name:n,type:i,order:t};if("button"!==a.type)for(let e=4;e+1<o.length;e+=2)switch(o[e]){case"default":a.default="spin"===a.type?Number(o[e+1]):o[e+1];break;case"min":"spin"===a.type&&(a.min=Number(o[e+1]));break;case"max":"spin"===a.type&&(a.max=Number(o[e+1]));break;case"var":"combo"===a.type&&a.vars.push(o[e+1])}return a}function s(e){const t=e.split(" ");return{move:t[0],ponder:t.length>=3&&"ponder"===t[1]&&t[2]||void 0}}function r(e,t){const o=t.black,n=t.white,i=t[e].byoyomi,a=o.timeMs-1e3*o.increment,s=n.timeMs-1e3*n.increment,r=0===i?1e3*o.increment:0,l=0===i?1e3*n.increment:0;return`btime ${a} wtime ${s} `+(0!==r||0!==l?`binc ${r} winc ${l}`:"byoyomi "+1e3*i)}o.d(t,{TK:()=>s,aI:()=>r,co:()=>a,jd:()=>i})},8503(e,t,o){o.d(t,{D:()=>m});var n=o(699),i=o(4685),a=o(6292),s=o(9145),r=o(4262),l=o(117),c=o(3113),h=o(9955);var d;!function(e){e.WAITING_FOR_USIOK="waitingForUSIOK",e.NOT_READY="notReady",e.WAITING_FOR_READYOK="waitingForReadyOK",e.READY="ready",e.WAITING_FOR_BEST_MOVE="waitingForBestMove",e.PONDER="ponder",e.WAITING_FOR_PONDER_BEST_MOVE="waitingForPonderBestMove",e.WAITING_FOR_CHECKMATE="waitingForCheckmate",e.QUIT_COMPLETED="quitCompleted"}(d||(d={}));class u{sessionID;engine;launchOptions;handlers;logger;createdMs=Date.now();transport;state=d.WAITING_FOR_USIOK;engineName="NO NAME";engineAuthor="";engineOptions={};currentPosition="";reservedGoCommand;reservedSetOptionCommands=[];lastSentCommand;lastReceivedCommand;launchTimer;callbacks={};constructor(e,t,o,n,i,a){this.sessionID=e,this.engine=t,this.launchOptions=n,this.handlers=i,this.logger=a,this.transport=o(t.path),this.transport.on("receive",e=>this.onReceive(e)).on("error",e=>this.callbacks.onError?.(e)).on("close",()=>this.onClose())}get sessionState(){return this.state}get name(){return this.engineName}get author(){return this.engineAuthor}get options(){return this.engineOptions}get closed(){return this.state===d.QUIT_COMPLETED}get lastSent(){return this.lastSentCommand}get lastReceived(){return this.lastReceivedCommand}get timeoutSeconds(){return this.launchOptions.timeoutSeconds||10}setCallbacks(e){this.callbacks={...this.callbacks,...e}}launch(){const e=this.timeoutSeconds;this.launchTimer=setTimeout(()=>{this.launchTimer=void 0,this.callbacks.onError?.(new Error(a.t.noResponseFromEnginePleaseExtendTimeout(e)))},1e3*e),this.send("usi")}ready(){this.state!==d.WAITING_FOR_BEST_MOVE&&this.state!==d.PONDER&&this.state!==d.WAITING_FOR_PONDER_BEST_MOVE&&this.state!==d.WAITING_FOR_CHECKMATE||this.gameover(i.q.DRAW),this.state===d.NOT_READY||this.state===d.READY?(this.state=d.WAITING_FOR_READYOK,this.send("isready")):this.callbacks.onError?.(new Error(`unexpected state: ${this.state}`))}setOption(e,t){switch(this.state){case d.WAITING_FOR_BEST_MOVE:case d.WAITING_FOR_PONDER_BEST_MOVE:case d.WAITING_FOR_CHECKMATE:this.reservedSetOptionCommands.push({name:e,value:t});break;default:this.sendSetOption(e,t)}}sendSetOption(e,t){this.send(void 0!==t?`setoption name ${e} value ${t}`:`setoption name ${e}`)}sendReservedSetOptionCommands(){const e=this.reservedSetOptionCommands;this.reservedSetOptionCommands=[];for(const t of e)this.sendSetOption(t.name,t.value)}go(e,t){this.reserveGo({usi:e,timeStates:t})}goPonder(e,t){this.reserveGo({usi:e,timeStates:t,ponder:!0})}goMate(e,t){this.reserveGo({usi:e,mate:!0,mateMaxSeconds:t})}reserveGo(e){switch(this.reservedGoCommand=e,this.state){case d.READY:this.sendReservedGoCommand();break;case d.WAITING_FOR_BEST_MOVE:case d.PONDER:case d.WAITING_FOR_CHECKMATE:this.stop()}}sendReservedGoCommand(){const e=this.reservedGoCommand;if(!e)return;if(this.reservedGoCommand=void 0,this.currentPosition=e.usi,this.send(e.usi),e.mate)return this.state=d.WAITING_FOR_CHECKMATE,void this.send(e.mateMaxSeconds?"go mate "+1e3*e.mateMaxSeconds:"go mate infinite");const t=e.timeStates?(0,h.aI)((0,c.getNextColorFromUSI)(e.usi),e.timeStates):"";if(e.ponder)return this.state=d.PONDER,void this.send("go ponder"+(t?` ${t}`:""));this.state=d.WAITING_FOR_BEST_MOVE,this.send(t?`go ${t}`:"go infinite")}ponderHit(){this.state===d.PONDER?(this.send("ponderhit"),this.state=d.WAITING_FOR_BEST_MOVE):this.logger?.(s.$.WARN,`usi: sid=${this.sessionID}: ponderhit: unexpected state: ${this.state}`)}stop(){this.state!==d.WAITING_FOR_BEST_MOVE&&this.state!==d.PONDER&&this.state!==d.WAITING_FOR_CHECKMATE||"stop"!==this.lastSentCommand?.command&&(this.send("stop"),this.state===d.PONDER&&(this.state=d.WAITING_FOR_PONDER_BEST_MOVE))}gameover(e){switch(this.state){case d.WAITING_FOR_USIOK:case d.NOT_READY:case d.WAITING_FOR_READYOK:case d.QUIT_COMPLETED:return void this.logger?.(s.$.WARN,`usi: sid=${this.sessionID}: gameover: unexpected state: ${this.state}`);case d.WAITING_FOR_BEST_MOVE:case d.PONDER:case d.WAITING_FOR_CHECKMATE:this.stop()}switch(this.reservedGoCommand=void 0,e){case i.q.WIN:this.send("gameover win");break;case i.q.LOSE:this.send("gameover lose");break;case i.q.DRAW:this.send("gameover draw")}this.state=d.NOT_READY,this.currentPosition=""}quit(){this.state!==d.QUIT_COMPLETED&&(this.send("quit"),this.transport.close())}clearLaunchTimer(){void 0!==this.launchTimer&&(clearTimeout(this.launchTimer),this.launchTimer=void 0)}send(e){this.state!==d.QUIT_COMPLETED&&(this.lastSentCommand=(0,n.Ye)(n.g4.SEND,e),this.logger?.(s.$.INFO,`usi: sid=${this.sessionID}: > ${e}`),this.transport.send(e))}onReceive(e){if(this.lastReceivedCommand=(0,n.Ye)(n.g4.RECEIVE,e),this.logger?.(s.$.INFO,`usi: sid=${this.sessionID}: < ${e}`),e.startsWith("id name "))this.engineName=e.substring(8);else if(e.startsWith("id author "))this.engineAuthor=e.substring(10);else if(e.startsWith("option ")){const t=(0,h.co)(e.substring(7),100+Object.keys(this.engineOptions).length);t&&(this.engineOptions[t.name]=t)}else"usiok"===e?this.onUSIOk():"readyok"===e?this.onReadyOk():e.startsWith("bestmove ")?this.onBestMove(e.substring(9)):e.startsWith("checkmate ")?this.onCheckmate(e.substring(10)):e.startsWith("info ")&&(this.launchOptions.discardUSIInfo||this.handlers()?.onUSIInfo(this.sessionID,this.currentPosition,(0,h.jd)(e.substring(5))))}onUSIOk(){if(this.state===d.WAITING_FOR_USIOK){this.engineOptions[r.If]||(this.engineOptions[r.If]={name:r.If,type:"spin",order:1,default:32}),this.engineOptions[r.YZ]||(this.engineOptions[r.YZ]={name:r.YZ,type:"check",order:2,default:"true"});for(const e of Object.values(this.engine.options)){const t=(0,r.J3)(e);void 0!==t&&this.setOption(e.name,t)}this.clearLaunchTimer(),this.state=d.NOT_READY,this.callbacks.onUSIOk?.()}}onReadyOk(){this.state===d.WAITING_FOR_READYOK&&(this.state=d.READY,this.send("usinewgame"),this.callbacks.onReady?.(),this.sendReservedGoCommand())}onBestMove(e){if(this.sendReservedSetOptionCommands(),this.state!==d.WAITING_FOR_BEST_MOVE&&this.state!==d.WAITING_FOR_PONDER_BEST_MOVE)return;const t=this.currentPosition;if(this.state===d.WAITING_FOR_BEST_MOVE){const o=(0,h.TK)(e);this.handlers()?.onUSIBestMove(this.sessionID,t,o.move,o.ponder)}this.state=d.READY,this.currentPosition="",this.sendReservedGoCommand()}onCheckmate(e){if(this.sendReservedSetOptionCommands(),this.state!==d.WAITING_FOR_CHECKMATE)return;this.state=d.READY;const t=this.currentPosition,o=this.handlers(),n=e.trim();"notimplemented"===n?o?.onUSICheckmateNotImplemented(this.sessionID):"timeout"===n?o?.onUSICheckmateTimeout(this.sessionID,t):"nomate"===n?o?.onUSINoMate(this.sessionID,t):o?.onUSICheckmate(this.sessionID,t,n.split(" ")),this.currentPosition="",this.sendReservedGoCommand()}onClose(){this.clearLaunchTimer(),this.state=d.QUIT_COMPLETED,this.callbacks.onClose?.()}}class m{transportFactory;logger;sessions=new Map;lastSessionID=0;handlers;constructor(e,t){this.transportFactory=e,this.logger=t}setHandlers(e){this.handlers=e}issueSessionID(){return this.lastSessionID+=1,this.lastSessionID}getSession(e){const t=this.sessions.get(e);if(!t)throw new Error("No engine session: SessionID="+e);return t}newSession(e,t){const o=this.issueSessionID(),n=new u(o,e,this.transportFactory,t,()=>this.handlers,this.logger);return this.sessions.set(o,n),n}getEngineInfo(e,t){return new Promise((o,n)=>{let i=!1;const s=this.newSession({...(0,r.v2)(),path:e},{timeoutSeconds:t});s.setCallbacks({onUSIOk:()=>{i=!0,o({...(0,r.v2)(),uri:l.A7(),name:s.name,defaultName:s.name,author:s.author,path:e,options:s.options}),this.close(s)},onError:e=>{i||(i=!0,n(e)),this.close(s)},onClose:()=>{i||(i=!0,n(new Error(a.t.engineProcessWasClosedUnexpectedly))),this.sessions.delete(s.sessionID)}}),s.launch()})}sendOptionButtonSignal(e,t,o){return new Promise((n,i)=>{let s=!1;const l=this.newSession({...(0,r.v2)(),path:e},{timeoutSeconds:o});l.setCallbacks({onUSIOk:()=>{s=!0,l.setOption(t),n(),this.close(l)},onError:e=>{s||(s=!0,i(e)),this.close(l)},onClose:()=>{s||(s=!0,i(new Error(a.t.engineProcessWasClosedUnexpectedly))),this.sessions.delete(l.sessionID)}}),l.launch()})}setupPlayer(e,t){return new Promise((o,n)=>{let i=!1;const s=this.newSession(e,t||{});s.setCallbacks({onUSIOk:()=>{i=!0,o(s.sessionID)},onError:e=>{i||(i=!0,n(e),this.close(s))},onClose:()=>{i||(i=!0,n(new Error(a.t.engineProcessWasClosedUnexpectedly))),this.scheduleRemove(s)}}),s.launch()})}ready(e){const t=this.getSession(e);return new Promise((e,o)=>{t.setCallbacks({onReady:()=>e(),onError:e=>o(e)}),t.ready()})}setOption(e,t,o){this.getSession(e).setOption(t,o)}go(e,t,o){this.getSession(e).go(t,o)}goPonder(e,t,o){this.getSession(e).goPonder(t,o)}ponderHit(e){this.getSession(e).ponderHit()}goInfinite(e,t){this.getSession(e).go(t)}goMate(e,t,o){this.getSession(e).goMate(t,o)}stop(e){this.getSession(e).stop()}gameover(e,t){this.getSession(e).gameover(t)}quit(e){const t=this.sessions.get(e);t&&this.close(t)}quitAll(){for(const e of Array.from(this.sessions.values()))this.close(e)}isActiveSessionExists(){for(const e of this.sessions.values())if(!e.closed)return!0;return!1}close(e){e.quit(),this.sessions.delete(e.sessionID)}scheduleRemove(e){setTimeout(()=>this.sessions.delete(e.sessionID),2e4)}collectSessionStates(){return Array.from(this.sessions.values()).map(e=>({sessionID:e.sessionID,uri:e.engine.uri,name:e.engine.name,path:e.engine.path,stateCode:e.sessionState,createdMs:e.createdMs,lastReceived:e.lastReceived,lastSent:e.lastSent,updatedMs:Date.now(),closed:e.closed})).sort((e,t)=>t.sessionID-e.sessionID)}}},6758(e,t,o){o.d(t,{G:()=>a});var n=o(2512);class i{onLog;worker;closed=!1;receiveListeners=[];errorListeners=[];closeListeners=[];constructor(e,t){this.onLog=t,this.worker=new o.wc(new URL(o.p+o.u(997),o.b),{type:void 0}),this.worker.onmessage=e=>{const t=e.data;switch(t.type){case"receive":if(void 0!==t.line)for(const e of this.receiveListeners)e(t.line);break;case"error":this.emitError(new Error(t.message||"unknown engine error"));break;case"log":this.onLog?.(t.message||"");break;case"close":this.emitClose()}},this.worker.onerror=e=>{this.emitError(new Error(e.message||"failed to start engine worker")),this.emitClose()},this.worker.postMessage({type:"launch",baseURL:e})}on(e,t){switch(e){case"receive":this.receiveListeners.push(t);break;case"error":this.errorListeners.push(t);break;case"close":this.closeListeners.push(t)}return this}send(e){this.closed||this.worker.postMessage({type:"send",line:e})}close(){if(this.closed)return;this.worker.postMessage({type:"terminate"});const e=this.worker;setTimeout(()=>e.terminate(),1e3),this.emitClose()}emitError(e){for(const t of this.errorListeners)t(e)}emitClose(){if(!this.closed){this.closed=!0;for(const e of this.closeListeners)e()}}}function a(e){return t=>new i((0,n.BU)(t),e)}},6953(e){e.exports=require("encoding-japanese")},983(e){e.exports=require("log4js")},636(e){e.exports=require("node:child_process")},9971(e){e.exports=require("node:fs")},9427(e){e.exports=require("node:net")},1258(e){e.exports=require("node:os")},6743(e){e.exports=require("node:path")},7558(e){e.exports=require("node:readline")},2413(e){e.exports=require("node:url")},3113(e){e.exports=require("tsshogi")},622(e){e.exports=require("vue")},913(e){e.exports=require("yaml")}};const t={};function o(n){const i=t[n];if(void 0!==i)return i.exports;const a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}o.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{if(Array.isArray(t))for(var n=0;n<t.length;){var i=t[n++],a=t[n++],s=0===a?{enumerable:!0,value:t[n++]}:{enumerable:!0,get:a};o.o(e,i)||Object.defineProperty(e,i,s)}else for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.u=e=>e+".index.js",o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.wc="undefined"!=typeof Worker?Worker:"undefined"!=typeof process&&"function"==typeof process.getBuiltinModule&&process.getBuiltinModule("node:worker_threads").Worker,o.p="",o.b=require("node:url").pathToFileURL(__filename);let n={};o.r(n);var i=o(8409),a=o(9145),s=o(6292),r=o(9536),l=o(9971),c=o.n(l),h=o(6743),d=o.n(h),u=o(913),m=o.n(u),p=o(5244),g=o(1138),S=o(2508),y=o(557),f=o(2911),v=o(9028),T=o(7536),b=o(8193),C=o(3872),E=o(1564),I=o(9219);const A=new i.Y("usi-csa-bridge",["path/to/csa_game_config.yaml","path/to/csa_game_config.json","--base64 <base64>"]),w=A.valueOrNull("base64","Base64 of gzip compressed JSON config."),P=A.number("engine-timeout","Maximum time[seconds] of USI engine execution.",180,{min:1}),k=A.valueOrNull("protocol-version","Overwrite server.protocolVersion setting."),M=A.valueOrNull("host","Overwrite server.host setting."),N=A.numberOrNull("port","Overwrite server.port setting.",{min:1024,max:49151}),R=A.valueOrNull("id","Overwrite server.id setting."),O=A.valueOrNull("password","Overwrite server.password setting."),F=A.flag("save-record","Save record file after game end."),D=A.value("record-dir","Directory to save records.","records"),B=A.valueOrNull("record-file-name-template","Overwrite recordFileNameTemplate setting."),L=A.valueOrNull("record-file-format","Overwrite recordFileFormat setting."),U=A.value("return-code","Return code which one of LF or CRLF. It is used for record file.","win32"===process.platform?"CRLF":"LF",["LF","CRLF"]),_=A.flag("csa-v3","Use CSA V3 format for record file."),G=A.numberOrNull("repeat","Overwrite repeat setting.",{min:1}),W=A.flag("app-log-file","Enable application log file."),x=A.flag("usi-log-file","Enable USI log file."),H=A.flag("csa-log-file","Enable CSA log file."),$=A.flag("all-log-file","Enable all log files."),K=A.flag("disable-stdout-log","Disable stdout log. Should be used with --XXX-log-file."),V=A.value("log-level",`Log level which one of: ${Object.values(a.$).join(", ")}`,a.$.INFO,[a.$.DEBUG,a.$.INFO,a.$.WARN,a.$.ERROR]),Y=A.value("lang",`Language which one of: ${Object.values(s.TM).join(", ")}`,s.TM.JA,[s.TM.JA,s.TM.EN,s.TM.ZH_TW,s.TM.VI]);A.parse(),(0,r.u)({appLogFile:W()||$(),usiLogFile:x()||$(),csaLogFile:H()||$(),stdoutLog:!K(),logLevel:V(),language:Y()}),async function(){const e=A.args[0];let t;const o=w();if(o?t=await(0,p.xv)(o):(e||((0,v.mn)().error("config file is not specified."),A.showHelp(),process.exit(1)),t=e.endsWith(".json")?JSON.parse(c().readFileSync(e,"utf-8")):m().parse(c().readFileSync(e,"utf-8"))),t.server.protocolVersion=k()||t.server.protocolVersion,t.server.host=M()||t.server.host,t.server.port=N()||t.server.port,t.server.id=R()||t.server.id,t.server.password=O()||t.server.password,t.saveRecordFile=F()||t.saveRecordFile,t.repeat=G()||t.repeat,e&&!await(0,E.t2)(t.usi.path)){const o=d().resolve(d().dirname(e),t.usi.path);await(0,E.t2)(o)||((0,v.mn)().error(`usi engine is not found: ${t.usi.path}`),process.exit(1)),t.usi.path=o}const n=(0,p.$P)(t,{autoSaveDirectory:D()}),i=(0,p.VX)(n);i&&((0,v.mn)().error(i),process.exit(1));const a=new S.B,s=new g.z,r=new g.z,l=new y.CSAGameManager(a,s,r),h=(0,f.c)({timeoutSeconds:P()});l.on("gameNext",function(){(0,v.mn)().info("waiting for new game...")}).on("newGame",function(e){(0,v.mn)().info(`${(0,C.IE)(e)} game started.`)}).on("closed",function(){(0,v.mn)().info("completed. will exit after some seconds...")}).on("saveRecord",function(e){const o=(0,T.OL)(a.record,{template:B()||t.recordFileNameTemplate||I.g,extension:L()||t.recordFileFormat||b.vr.KIF}),n=d().join(e,o);c().promises.mkdir(e,{recursive:!0}).then(()=>{const e=a.exportRecordAsBuffer(n,{returnCode:u,csa:{v3:_()}});if(!(e instanceof Error))return c().promises.writeFile(n,e.data);(0,v.mn)().error(e)}).then(()=>{(0,v.mn)().info("record saved: %s",n)}).catch(e=>{(0,v.mn)().error(e)})}).on("loginRetry",function(){(0,v.mn)().warn(`Retry login after ${y.loginRetryIntervalSeconds} seconds...`)}).on("error",function(e){(0,v.mn)().error(e)}).login(n,h).catch(function(e){(0,v.mn)().error(e),process.exit(1)});const u="CRLF"===U()?"\r\n":"\n"}(),module.exports=n})();
|