@readmagic/workmate 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AddWorkspaceDirectory-BSLHrjbt.js +1 -0
- package/dist/chunks/App-DY5O6IKw.js +1 -0
- package/dist/chunks/ApproveApiKey-BEzfC6r3.js +1 -0
- package/dist/chunks/ApproveApiKey-DfAPwDix.js +1 -0
- package/dist/chunks/AssistantSessionChooser-Ce3PraaD.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-Dvhcgahe.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-B68V1bCq.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-BV7HHcgL.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-CTWhpIm8.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-CU5fCPKq.js +1 -0
- package/dist/chunks/DesktopHandoff-BRbU4is4.js +1 -0
- package/dist/chunks/Dialog-vfLXEPed.js +1 -0
- package/dist/chunks/DiffDialog-CBluIK-x.js +6 -0
- package/dist/chunks/Doctor-B0CRtxi2.js +1 -0
- package/dist/chunks/Doctor-WxNv49HC.js +3 -0
- package/dist/chunks/ExitFlow-CRPgptCN.js +2 -0
- package/dist/chunks/Feedback-CEtzaLr3.js +2 -0
- package/dist/chunks/Grove--kttLxvs.js +11 -0
- package/dist/chunks/Grove-CelgLWH4.js +1 -0
- package/dist/chunks/HybridTransport-BgV5_7Az.js +4 -0
- package/dist/chunks/InvalidConfigDialog-DCGwXW_p.js +1 -0
- package/dist/chunks/InvalidSettingsDialog-jTwsdXWr.js +1 -0
- package/dist/chunks/ListItem-vfLXEPed.js +1 -0
- package/dist/chunks/MCPConnectionManager-BX0LMz9J.js +1 -0
- package/dist/chunks/McpParsingWarnings-WQrWJeWP.js +1 -0
- package/dist/chunks/MessageSelector-_UZB8cGb.js +3 -0
- package/dist/chunks/Messages-jCoW_1Rr.js +11 -0
- package/dist/chunks/Onboarding-BoIVNCgc.js +1 -0
- package/dist/chunks/OverageCreditUpsell-1FCN8bH3.js +1 -0
- package/dist/chunks/PermissionDialog-0ya1CU5k.js +1 -0
- package/dist/chunks/PluginSettings-BD9JLV9-.js +17 -0
- package/dist/chunks/PressEnterToContinue-Dl9Hg9Mf.js +1 -0
- package/dist/chunks/PromptInputFooterSuggestions-CrGST0Cq.js +1 -0
- package/dist/chunks/PromptInputHelpMenu-B2TDpbpw.js +1 -0
- package/dist/chunks/QueryEngine-D2HUnwmU.js +1 -0
- package/dist/chunks/REPL-BV4WyYMg.js +142 -0
- package/dist/chunks/REPL-DcpN3MRC.js +1 -0
- package/dist/chunks/RemoteCallout-DS_EV6Fh.js +1 -0
- package/dist/chunks/RemoteSessionManager-Tx1N2uVL.js +2 -0
- package/dist/chunks/ResumeConversation-Cw3vP4G8.js +1 -0
- package/dist/chunks/SSETransport-BXiEBMpb.js +4 -0
- package/dist/chunks/SearchBox-vfLXEPed.js +1 -0
- package/dist/chunks/SearchExtraToolsTool-D3VOFq9R.js +1 -0
- package/dist/chunks/Settings-ns6mRsDc.js +2 -0
- package/dist/chunks/TeleportProgress-CcDzMC5L.js +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-DZbxl4sD.js +1 -0
- package/dist/chunks/TeleportResumeWrapper-EowJO5nm.js +1 -0
- package/dist/chunks/ThemePicker-BYbChJpu.js +1 -0
- package/dist/chunks/TrustDialog-DA3YTk_k.js +1 -0
- package/dist/chunks/TungstenTool-Cb7gJvq4.js +1 -0
- package/dist/chunks/TungstenTool-CxMQVCuF.js +1 -0
- package/dist/chunks/ValidationErrorsList-Cx-hoRwG.js +2 -0
- package/dist/chunks/WelcomeV2-BTfttGcv.js +1 -0
- package/dist/chunks/add-dir-CWt69NAZ.js +1 -0
- package/dist/chunks/agentDisplay-CQ4mZWFH.js +1 -0
- package/dist/chunks/agents-C6jzKOit.js +2 -0
- package/dist/chunks/agents-D4clhuCl.js +103 -0
- package/dist/chunks/ajv-5vMo9UcX.js +8 -0
- package/dist/chunks/allErrors-HMPqE0jK.js +1 -0
- package/dist/chunks/analytics-BotDBGh0.js +1 -0
- package/dist/chunks/ant-9Z5bppVC.js +1 -0
- package/dist/chunks/api-L2IgleTV.js +1 -0
- package/dist/chunks/api-TgV7fl9V.js +1 -0
- package/dist/chunks/asciicast-DYbkzGCN.js +1 -0
- package/dist/chunks/asciicast-n-BBfgDq.js +4 -0
- package/dist/chunks/assistant-BA9_Mo9U.js +1 -0
- package/dist/chunks/assistant-BiNOSla3.js +1 -0
- package/dist/chunks/assistant-YvbVKjVh.js +1 -0
- package/dist/chunks/attributionHooks-CUAoGkU6.js +1 -0
- package/dist/chunks/attributionTrailer-oKKrF3z8.js +1 -0
- package/dist/chunks/auth-CEig4Gxp.js +1 -0
- package/dist/chunks/auth-CbGDlhyO.js +1 -0
- package/dist/chunks/auth-DHyCIxCk.js +15 -0
- package/dist/chunks/autoMode-Db4QrgFr.js +45 -0
- package/dist/chunks/autoModeDenials-BxNzGJdR.js +1 -0
- package/dist/chunks/autonomy-BkAMA7du.js +1 -0
- package/dist/chunks/autonomy-D4Vy-RPQ.js +15 -0
- package/dist/chunks/autonomyPanel-EjfO8jvg.js +1 -0
- package/dist/chunks/axios-BHBm_hhU.js +1 -0
- package/dist/chunks/axios-DaWTGg7G.js +16 -0
- package/dist/chunks/backgroundHousekeeping-BNEKWHhH.js +1 -0
- package/dist/chunks/backgroundHousekeeping-hDDE8mJC.js +17 -0
- package/dist/chunks/banner-hD6wZygx.js +2 -0
- package/dist/chunks/base64-js-0wLHn8zB.js +1 -0
- package/dist/chunks/bedrockClient-DxE_mHFI.js +15 -0
- package/dist/chunks/bg-BzG63WOm.js +1 -0
- package/dist/chunks/bg-DQ0Q3Qv-.js +9 -0
- package/dist/chunks/branch-CeQ9IyZk.js +3 -0
- package/dist/chunks/break-cache-Bd0clV2N.js +8 -0
- package/dist/chunks/bridge-yerAiaK2.js +2 -0
- package/dist/chunks/bridgeConfig-CCtXe8ak.js +1 -0
- package/dist/chunks/bridgeConfig-D5dB38xD.js +1 -0
- package/dist/chunks/bridgeEnabled--F-6TUi4.js +1 -0
- package/dist/chunks/bridgeEnabled-DKX8-T_H.js +1 -0
- package/dist/chunks/bridgeMain--R1HFbOv.js +68 -0
- package/dist/chunks/bridgeMain-d06JByZn.js +1 -0
- package/dist/chunks/bridgeMessaging-CqbLTDcx.js +1 -0
- package/dist/chunks/bridgePointer-W_jdQ8zf.js +1 -0
- package/dist/chunks/browser-Bd7GeBH1.js +1 -0
- package/dist/chunks/btw-CVGRmL9a.js +1 -0
- package/dist/chunks/bundledMode--fG1S62b.js +1 -0
- package/dist/chunks/caches-BtmAri4e.js +3 -0
- package/dist/chunks/caches-BuTIAOtY.js +1 -0
- package/dist/chunks/capacityWake-CV_x9H8j.js +1 -0
- package/dist/chunks/ccrClient-HqMi5Kfu.js +1 -0
- package/dist/chunks/checksum-DgbnMdM-.js +1 -0
- package/dist/chunks/classPrivateFieldSet2-D4U5K-I3.js +1 -0
- package/dist/chunks/classPrivateMethodInitSpec-BXQD0Vh4.js +1 -0
- package/dist/chunks/claudeDesktop-aUMx06RK.js +1 -0
- package/dist/chunks/clear-C6nRzIQE.js +1 -0
- package/dist/chunks/cliLaunch-2AUoMnqx.js +1 -0
- package/dist/chunks/client-BeET1hnC.js +1 -0
- package/dist/chunks/client-DchQnIJD.js +36 -0
- package/dist/chunks/client-DvAL7lY8.js +8 -0
- package/dist/chunks/color-DXI_4ibU.js +1 -0
- package/dist/chunks/color-convert-p91EwGT7.js +1 -0
- package/dist/chunks/commands-VjcG4qFq.js +1 -0
- package/dist/chunks/commitAttribution-Cm40fdNU.js +2 -0
- package/dist/chunks/commitAttribution-Lb3qUlAR.js +1 -0
- package/dist/chunks/compact-DPTVpJ4D.js +2 -0
- package/dist/chunks/completionCache-BQaLkB4d.js +4 -0
- package/dist/chunks/completionCache-CW8lKIgy.js +1 -0
- package/dist/chunks/config-0cRberzR.js +1 -0
- package/dist/chunks/config-BSXLgwpD.js +1 -0
- package/dist/chunks/config-BrxKpHpR.js +1 -0
- package/dist/chunks/config-C7YHKCPV.js +3 -0
- package/dist/chunks/config-CLmFk-5V.js +1 -0
- package/dist/chunks/connectHeadless-CqRoEtrg.js +1 -0
- package/dist/chunks/context-C_cKrBUn.js +1 -0
- package/dist/chunks/context-noninteractive-DnH6Q9Lu.js +54 -0
- package/dist/chunks/context-noninteractive-rUZ3ydmJ.js +1 -0
- package/dist/chunks/controlMessageCompat-IFu4Gc1y.js +1 -0
- package/dist/chunks/conversation-GJxfkr6M.js +1 -0
- package/dist/chunks/conversation-oK3aFzqO.js +1 -0
- package/dist/chunks/createSSHSession--bWmmIk9.js +6 -0
- package/dist/chunks/createSession-DIr4sUp6.js +1 -0
- package/dist/chunks/createSession-DM4acqaC.js +1 -0
- package/dist/chunks/cron-3LntnnhJ.js +1 -0
- package/dist/chunks/crossProjectResume-DKrtjTpm.js +40 -0
- package/dist/chunks/cwd-BuJhkTrc.js +1 -0
- package/dist/chunks/cwd-D-tY2NKc.js +1 -0
- package/dist/chunks/daemon-B9lBPdBJ.js +2 -0
- package/dist/chunks/dangerousBackend-DwcP0P08.js +1 -0
- package/dist/chunks/datadog-ByS7LGGa.js +1 -0
- package/dist/chunks/datadog-DNCsyfSO.js +1 -0
- package/dist/chunks/debug-DzZUT2Wv.js +1 -0
- package/dist/chunks/debug-IKW-jE7K.js +39 -0
- package/dist/chunks/debugUtils-D2981c0Z.js +1 -0
- package/dist/chunks/defineProperty-C-QyHrDq.js +1 -0
- package/dist/chunks/desktop-B5cvrcOQ.js +1 -0
- package/dist/chunks/detached-rfIUyc-B.js +5 -0
- package/dist/chunks/detect-libc-CxbBtWJu.js +1 -0
- package/dist/chunks/detectRepository-6nw-Aw3v.js +1 -0
- package/dist/chunks/detectRepository-ReZ0Fz8Z.js +1 -0
- package/dist/chunks/diff-cXAp9cNN.js +1 -0
- package/dist/chunks/directoryCompletion-DBM2o5kx.js +1 -0
- package/dist/chunks/dist-CXlEpGqr.js +20 -0
- package/dist/chunks/dist-DESLAofA.js +1 -0
- package/dist/chunks/dist-DIee4wq1.js +29 -0
- package/dist/chunks/dist-Dopnn8wS.js +5 -0
- package/dist/chunks/dist-es-5t7v8oaj.js +1 -0
- package/dist/chunks/dist-es-BF6bR-Ik.js +2 -0
- package/dist/chunks/dist-es-BIjDeceU.js +1 -0
- package/dist/chunks/dist-es-BOPBJQo3.js +1 -0
- package/dist/chunks/dist-es-Bfr4TzQe.js +3 -0
- package/dist/chunks/dist-es-Byxccz_-.js +1 -0
- package/dist/chunks/dist-es-C-OjW2Ao.js +1 -0
- package/dist/chunks/dist-es-C3reqy7X.js +1 -0
- package/dist/chunks/dist-es-C7vygWzp.js +1 -0
- package/dist/chunks/dist-es-CEk66gUu.js +1 -0
- package/dist/chunks/dist-es-CIULjvtA2.js +1 -0
- package/dist/chunks/dist-es-CMtO44xC.js +1 -0
- package/dist/chunks/dist-es-CQMt6zRM.js +1 -0
- package/dist/chunks/dist-es-CYPVg66r.js +9 -0
- package/dist/chunks/dist-es-Cd_AeqMK.js +6 -0
- package/dist/chunks/dist-es-Cgsa8pb82.js +1 -0
- package/dist/chunks/dist-es-Cwru7c2B2.js +1 -0
- package/dist/chunks/dist-es-D1Y8zSMI.js +1 -0
- package/dist/chunks/dist-es-D1wHe_zh.js +1 -0
- package/dist/chunks/dist-es-DKFm0FJ7.js +1 -0
- package/dist/chunks/dist-es-DKIwwJME.js +1 -0
- package/dist/chunks/dist-es-DNFTCbrP.js +1 -0
- package/dist/chunks/dist-es-DXIR5NLi2.js +1 -0
- package/dist/chunks/dist-es-DelBIxNM.js +1 -0
- package/dist/chunks/dist-es-DmdZmEJ-.js +1 -0
- package/dist/chunks/dist-es-Gt_DpXlP.js +1 -0
- package/dist/chunks/dist-es-gUzZ_7Vf.js +1 -0
- package/dist/chunks/dist-es-kj-F5A132.js +1 -0
- package/dist/chunks/dist-es-yHGBqhBe.js +1 -0
- package/dist/chunks/doctor-CTMHXZvQ.js +1 -0
- package/dist/chunks/earlyInput-BTC_Wucv.js +2 -0
- package/dist/chunks/earlyInput-xcoTbKQn.js +1 -0
- package/dist/chunks/effort-Br8KKHdx.js +9 -0
- package/dist/chunks/entry-4lIRMrLI.js +14 -0
- package/dist/chunks/envLessBridgeConfig-CGuIxFzJ.js +1 -0
- package/dist/chunks/envLessBridgeConfig-D_Jg4fJy.js +1 -0
- package/dist/chunks/envUtils-DSxRz_kt.js +1 -0
- package/dist/chunks/esm-BYnFh4pG.js +1 -0
- package/dist/chunks/esm-Bx6rTxIs.js +1 -0
- package/dist/chunks/esm-C367Cyo-.js +1 -0
- package/dist/chunks/esm-C8Zkk1Ux.js +1 -0
- package/dist/chunks/esm-CGx9qY3q.js +56 -0
- package/dist/chunks/esm-CXM9jqO_.js +1 -0
- package/dist/chunks/esm-CXczu_-W.js +1 -0
- package/dist/chunks/esm-CXt5K8Xt.js +1 -0
- package/dist/chunks/esm-Cb-L4oAk.js +1 -0
- package/dist/chunks/esm-D6ZZCdtk.js +1 -0
- package/dist/chunks/esm-DhRjocaU.js +1 -0
- package/dist/chunks/esm-DklLYEuz.js +1 -0
- package/dist/chunks/esm-IYgGg4wR.js +1 -0
- package/dist/chunks/esm-lWlUmoUA.js +1 -0
- package/dist/chunks/esm-lyfry1WB.js +10 -0
- package/dist/chunks/esm-wGnzjq4Z.js +1 -0
- package/dist/chunks/event-streams-C0Zy0Uqv.js +1 -0
- package/dist/chunks/event-streams-DoqJmjFN.js +1 -0
- package/dist/chunks/eventLoopStallDetector-Cg_RXU1q.js +1 -0
- package/dist/chunks/execAsync-Bv2yxuGe.js +1 -0
- package/dist/chunks/execFileNoThrow-COKYqVQj.js +34 -0
- package/dist/chunks/execSyncWrapper-DZJ3tNWF.js +1 -0
- package/dist/chunks/exit-BOhGfSlm.js +2 -0
- package/dist/chunks/exit-Z9oWrqE4.js +1 -0
- package/dist/chunks/extra-usage-BS4aVOt5.js +1 -0
- package/dist/chunks/extra-usage-DtAIhW74.js +1 -0
- package/dist/chunks/extra-usage-core-CdL1ltqq.js +1 -0
- package/dist/chunks/extra-usage-noninteractive-DxxRI0Yx.js +1 -0
- package/dist/chunks/extraUsage-BYZdi44Y.js +1 -0
- package/dist/chunks/extractMemories-C4f9JWuI.js +1 -0
- package/dist/chunks/fast-B0OB4x7K.js +1 -0
- package/dist/chunks/fast-DKqiojzf.js +1 -0
- package/dist/chunks/featureCheck-CrJeuheQ.js +1 -0
- package/dist/chunks/featureCheck-HslM03dr.js +1 -0
- package/dist/chunks/feedback-yB19xph5.js +1 -0
- package/dist/chunks/figures-5ThXQEtq.js +1 -0
- package/dist/chunks/file-D1cN3LMK.js +12 -0
- package/dist/chunks/fileStateCache-DDW5toIs.js +1 -0
- package/dist/chunks/files-DAzGtmzz.js +2 -0
- package/dist/chunks/firstPartyEventLogger-CdUpe6Lh.js +1 -0
- package/dist/chunks/firstPartyEventLogger-hU-LPkje.js +5 -0
- package/dist/chunks/flushGate-ZFr8yv7F.js +1 -0
- package/dist/chunks/foundry-sdk-BdeF2aBu.js +1 -0
- package/dist/chunks/fpsMetrics-Cf_hdtiJ.js +1 -0
- package/dist/chunks/from-CgDRRLiX.js +4 -0
- package/dist/chunks/gemini-DqAv8_GY.js +1 -0
- package/dist/chunks/generateRecap-lO2PDlx8.js +1 -0
- package/dist/chunks/generateSessionName-48veu5dv.js +1 -0
- package/dist/chunks/genericProcessUtils-F1Qcb1sO.js +23 -0
- package/dist/chunks/getMachineId-bsd-Cut1kHoA.js +1 -0
- package/dist/chunks/getMachineId-darwin-CsRhaP3y.js +2 -0
- package/dist/chunks/getMachineId-linux-Bd7UBNRQ.js +1 -0
- package/dist/chunks/getMachineId-unsupported-vFGP8E_8.js +1 -0
- package/dist/chunks/getMachineId-win-DamF2CH_.js +1 -0
- package/dist/chunks/git-BE_FiJZp.js +1 -0
- package/dist/chunks/git-tyaWOgRL.js +6 -0
- package/dist/chunks/githubRepoPathMapping-BlR0BphY.js +1 -0
- package/dist/chunks/goal-Bn8Kz2Dp.js +3 -0
- package/dist/chunks/graceful-fs-DDVg0cja.js +2 -0
- package/dist/chunks/grok-DhnO_KDC.js +1 -0
- package/dist/chunks/grove-DotW04-v.js +7 -0
- package/dist/chunks/hash-Tu-My5Vp.js +1 -0
- package/dist/chunks/heapdump-DkZSKNbp.js +5 -0
- package/dist/chunks/help-DU_BcZtU.js +1 -0
- package/dist/chunks/hooks-BTMWE5Qx.js +79 -0
- package/dist/chunks/hooks-DONAb_nq.js +1 -0
- package/dist/chunks/hostGuard-Dh296c6q.js +1 -0
- package/dist/chunks/inboundAttachments-BcEgi49j.js +1 -0
- package/dist/chunks/inboundAttachments-DVs3_m48.js +1 -0
- package/dist/chunks/index.min-D75yiGLN.js +1 -0
- package/dist/chunks/initReplBridge-D0Xec8S-.js +1 -0
- package/dist/chunks/install-BkfXeXpv.js +1 -0
- package/dist/chunks/instinctParser-Dt-lqnDe.js +1 -0
- package/dist/chunks/instrumentation-H0XRS1yG.js +21 -0
- package/dist/chunks/intl-cKc-V6Mq.js +1 -0
- package/dist/chunks/isObject-C6qM3WEW.js +1 -0
- package/dist/chunks/isSymbol-BO6cdPI7.js +1 -0
- package/dist/chunks/job-DKtLkF8V.js +2 -0
- package/dist/chunks/json-bigint-bonnP-Hz.js +8 -0
- package/dist/chunks/jsx-runtime-Bb4Xn-E0.js +1 -0
- package/dist/chunks/jws-BscXOT9I.js +3 -0
- package/dist/chunks/jwtUtils-C-ojmb8W.js +1 -0
- package/dist/chunks/keybindings-ez51eHHp.js +2 -0
- package/dist/chunks/language-BuRSO2sR.js +1 -0
- package/dist/chunks/language-Da4KNbjm.js +1 -0
- package/dist/chunks/launchAgentsPlatform-BQyPdrHp.js +1 -0
- package/dist/chunks/launchCommand-1qkTCKpf.js +1 -0
- package/dist/chunks/launchLocalMemory-CWHAj7CX.js +3 -0
- package/dist/chunks/launchLocalVault-D8iJdtsP.js +3 -0
- package/dist/chunks/launchMemoryStores-W7jWG2uH.js +1 -0
- package/dist/chunks/launchOnboarding-q__LaLy1.js +8 -0
- package/dist/chunks/launchSchedule-BWi9F5vh.js +1 -0
- package/dist/chunks/launchSkillStore-4wd4MQBc.js +1 -0
- package/dist/chunks/launchTeleport-BlCf2QM_.js +3 -0
- package/dist/chunks/launchVault-C7u7LZV7.js +1 -0
- package/dist/chunks/lazySchema-uxlVVNM1.js +1 -0
- package/dist/chunks/lib-BSzUGQb_.js +2 -0
- package/dist/chunks/lib-BlVGipXx.js +14 -0
- package/dist/chunks/lib-rQZENxQg.js +8 -0
- package/dist/chunks/loadAgentsDir-Dgd-fzNt.js +1 -0
- package/dist/chunks/loadAgentsDir-nzr38hai.js +3990 -0
- package/dist/chunks/loadPluginHooks-z1-zvBLw.js +1 -0
- package/dist/chunks/loadSso-DSxfVpgX.js +1 -0
- package/dist/chunks/localSearch-B-L_ldos.js +1 -0
- package/dist/chunks/localSearch-D-FprOMr.js +1 -0
- package/dist/chunks/lockfile-D5-j7HOZ.js +1 -0
- package/dist/chunks/log-B3eB4EFv.js +1 -0
- package/dist/chunks/logoV2Utils-RQ160dI2.js +1 -0
- package/dist/chunks/magicDocs-BqZ0GewA.js +57 -0
- package/dist/chunks/main-DeFMhaFE.js +31 -0
- package/dist/chunks/main-y7LJ5qUc.js +1243 -0
- package/dist/chunks/mappers-CWykjGfP.js +1 -0
- package/dist/chunks/mcp-CSFPAfaW.js +2 -0
- package/dist/chunks/mcp-DBwT4pa9.js +6 -0
- package/dist/chunks/mcp-DvZTaHZE.js +1 -0
- package/dist/chunks/memoize-BK3gG5ob.js +1 -0
- package/dist/chunks/memoize-BO31Ws9Q.js +1 -0
- package/dist/chunks/memory-DcpPpYN0.js +1 -0
- package/dist/chunks/metadata-BRLJvh61.js +1 -0
- package/dist/chunks/modalContext-DFjKLCB6.js +1 -0
- package/dist/chunks/mode-BkViT_0o.js +2 -0
- package/dist/chunks/model--z4Di9QO.js +1 -0
- package/dist/chunks/model-CZktWw6o.js +1 -0
- package/dist/chunks/model-DfFA3qMO.js +1 -0
- package/dist/chunks/multipart-parser-DDLYsngd.js +2 -0
- package/dist/chunks/nativeInstaller-GcIk7G2Y.js +1 -0
- package/dist/chunks/oauth-BqJqV-2M.js +1 -0
- package/dist/chunks/oauth-C8X_p8Gc.js +1 -0
- package/dist/chunks/observationStore-DzCdXq8U.js +4 -0
- package/dist/chunks/onChangeAppState-DwGVi-BC.js +1 -0
- package/dist/chunks/open-BtQHzzL9.js +1 -0
- package/dist/chunks/openai-B2wxZDQx.js +10 -0
- package/dist/chunks/openaiShared-G2-w4gJt.js +1 -0
- package/dist/chunks/output-style-BM3qAHLA.js +1 -0
- package/dist/chunks/overageCreditGrant-CjK49axw.js +1 -0
- package/dist/chunks/p-map-B1EeBuI8.js +1 -0
- package/dist/chunks/p-map-HKDr3iDo.js +1 -0
- package/dist/chunks/package-BC0bllK8.js +1 -0
- package/dist/chunks/panel-B-nrcHpm.js +1 -0
- package/dist/chunks/panel-R4ue6pSW.js +1 -0
- package/dist/chunks/panelCall-I_fbgub5.js +1 -0
- package/dist/chunks/parseConnectUrl-BiyKR5-x.js +1 -0
- package/dist/chunks/parser-BlM_Fk4J.js +1 -0
- package/dist/chunks/parser-CQrasoUB.js +1 -0
- package/dist/chunks/partition-CxRF7T-f.js +1 -0
- package/dist/chunks/passes-U_h-hNu-.js +1 -0
- package/dist/chunks/path-BCSE0S-c.js +1 -0
- package/dist/chunks/permissions-B8epy16o.js +3 -0
- package/dist/chunks/permissions-CeYKbtSC.js +1 -0
- package/dist/chunks/permissions-Cn_6f8CB.js +1 -0
- package/dist/chunks/pidLock-CBJDnBG_.js +3 -0
- package/dist/chunks/pipeTransport-D3Qx9v1V.js +1 -0
- package/dist/chunks/plan-BAhStVci.js +1 -0
- package/dist/chunks/platform-EtecGacO.js +2 -0
- package/dist/chunks/plist-Bzo2VMe9.js +6 -0
- package/dist/chunks/plugin-D9huNnv6.js +1 -0
- package/dist/chunks/pluginAutoupdate-BfmyxR5g.js +1 -0
- package/dist/chunks/pluginBlocklist-03sZaZa6.js +1 -0
- package/dist/chunks/pluginCliCommands-P2Ndi1r1.js +1 -0
- package/dist/chunks/pluginFlagging-BVy7Xv_0.js +1 -0
- package/dist/chunks/pluginOperations-Cz37qcjF.js +2 -0
- package/dist/chunks/pluginStartupCheck-BqUwHcMD.js +1 -0
- package/dist/chunks/pluginStartupCheck-w24D-wwk.js +1 -0
- package/dist/chunks/plugins-B0hiIN4q.js +4 -0
- package/dist/chunks/policyLimits-Dem-XJ_h.js +1 -0
- package/dist/chunks/pollConfig-C2Ac8WMU.js +1 -0
- package/dist/chunks/poller-CpLBoB-N.js +1 -0
- package/dist/chunks/poor-CfbMKZNJ.js +1 -0
- package/dist/chunks/poorMode-Bsw2V-V_.js +1 -0
- package/dist/chunks/poorMode-jvImnkty.js +1 -0
- package/dist/chunks/postCommitAttribution-DoSP9wZD.js +1 -0
- package/dist/chunks/print-ozjC0Mhg.js +23 -0
- package/dist/chunks/privacy-settings-DeGoBRrZ.js +1 -0
- package/dist/chunks/process-CNfq37LF.js +1 -0
- package/dist/chunks/process-gEbdy6uY.js +1 -0
- package/dist/chunks/processBashCommand-loWZ8MSE.js +1 -0
- package/dist/chunks/processSlashCommand-BdouajZb.js +5 -0
- package/dist/chunks/projectContext-BaDZBAoK.js +1 -0
- package/dist/chunks/projectContext-D9MDwJUF.js +1 -0
- package/dist/chunks/prompt-Bef63FhB.js +132 -0
- package/dist/chunks/prompt-C7wd1H_i.js +1 -0
- package/dist/chunks/prompt-DIoNqZvO.js +1 -0
- package/dist/chunks/promptEditor-foiayhdY.js +4 -0
- package/dist/chunks/protocolHandler-BsiB1oW_.js +13 -0
- package/dist/chunks/protocols-CCsohXid.js +18 -0
- package/dist/chunks/protocols-CnYQjBlj.js +2 -0
- package/dist/chunks/proxy-Cn2YwITp.js +99 -0
- package/dist/chunks/rate-limit-options-DTJPDcTr.js +1 -0
- package/dist/chunks/rcDebugLog-BUuD-X1D.js +11 -0
- package/dist/chunks/reconciler-DqXTmV3J.js +4 -0
- package/dist/chunks/referral-DP_GshTS.js +1 -0
- package/dist/chunks/refresh-CNzXPAFw.js +1 -0
- package/dist/chunks/registerProtocol-CjxlFsKw.js +36 -0
- package/dist/chunks/release-notes-BxgK8zWO.js +4 -0
- package/dist/chunks/releaseNotes-CbSktIJW.js +2 -0
- package/dist/chunks/reload-plugins-CDu6yU5-.js +1 -0
- package/dist/chunks/remote-env-B4HnhISc.js +1 -0
- package/dist/chunks/remoteBridgeCore-D-wG5jau.js +1 -0
- package/dist/chunks/remoteManagedSettings-B7gt0VAX.js +1 -0
- package/dist/chunks/rename-DlbMb24l.js +1 -0
- package/dist/chunks/renderOptions-5kWQpVr2.js +1 -0
- package/dist/chunks/resume-BB5iBogS.js +2 -0
- package/dist/chunks/rewind-D12hCfZD.js +1 -0
- package/dist/chunks/ripgrep-BQgJ02F9.js +1 -0
- package/dist/chunks/ripgrep-BvDwiKJ3.js +5 -0
- package/dist/chunks/rollback-BPWRKlIZ.js +11 -0
- package/dist/chunks/rolldown-runtime-DaDcL9Zw.js +1 -0
- package/dist/chunks/runtimeObserver-BNH2WGE3.js +1 -0
- package/dist/chunks/runtimeObserver-Ci-5gvYg.js +10 -0
- package/dist/chunks/sandbox-adapter-Coe1GDAE.js +1 -0
- package/dist/chunks/sandbox-toggle-B2Yk4y2V.js +1 -0
- package/dist/chunks/sanitization-DV-94a9Z.js +1 -0
- package/dist/chunks/satisfies-DQJHNtpQ.js +1 -0
- package/dist/chunks/sdkHeapDumpMonitor-WdXUV7DV.js +1 -0
- package/dist/chunks/searchExtraTools-BnWZ9roi.js +1 -0
- package/dist/chunks/semver-BMRJYn3q.js +1 -0
- package/dist/chunks/semver-DQo45qGo.js +1 -0
- package/dist/chunks/serde-f76bObzR.js +4 -0
- package/dist/chunks/server-LdbAb0sV.js +1 -0
- package/dist/chunks/serverBanner-BdExKFHT.js +1 -0
- package/dist/chunks/serverLog-BFmvyJ93.js +1 -0
- package/dist/chunks/session-Bmx7L3Mt.js +2 -0
- package/dist/chunks/sessionDataUploader-CaCjwsA2.js +1 -0
- package/dist/chunks/sessionDiscovery-DcEAr5vJ.js +1 -0
- package/dist/chunks/sessionFileAccessHooks-BhdOmW9o.js +1 -0
- package/dist/chunks/sessionManager-CPa049BO.js +1 -0
- package/dist/chunks/sessionMemory-Bsg2unYX.js +1 -0
- package/dist/chunks/sessionMemory-CIbCojm-.js +1 -0
- package/dist/chunks/sessionMemoryUtils-Cjb57wtC.js +1 -0
- package/dist/chunks/sessionObserver-CRU1qWnP.js +1 -0
- package/dist/chunks/sessionObserver-DQwHsDrM.js +20 -0
- package/dist/chunks/sessionStorage-BxDN8qRc.js +1 -0
- package/dist/chunks/sessionStoragePortable-Cx6JQ5Ye.js +3 -0
- package/dist/chunks/sessionTitle-B8jcexkQ.js +14 -0
- package/dist/chunks/sessionTracing-BuLsL6qA.js +11 -0
- package/dist/chunks/settings-5PQdphqC.js +19 -0
- package/dist/chunks/settingsSync-BDeuErb5.js +1 -0
- package/dist/chunks/setup-BKEnSLR9.js +3 -0
- package/dist/chunks/shadowedRuleDetection-7Z8ezTKF.js +1 -0
- package/dist/chunks/shellQuote-fB02N16J.js +4 -0
- package/dist/chunks/sideQuestion-CYdNATPW.js +20 -0
- package/dist/chunks/signin-CPaEtsnK.js +1 -0
- package/dist/chunks/sink-DjKoYMsA.js +1 -0
- package/dist/chunks/sink-iYxWapbU.js +1 -0
- package/dist/chunks/sinks-GryGVRT8.js +2 -0
- package/dist/chunks/sinks-jfaIjsRJ.js +1 -0
- package/dist/chunks/skill-learning-E8tQed-Q.js +5 -0
- package/dist/chunks/skillChangeDetector-A8SAuyo9.js +1 -0
- package/dist/chunks/skillGapStore-B5rl12bV.js +1 -0
- package/dist/chunks/skillGapStore-CjJrxxjk.js +5 -0
- package/dist/chunks/skillGenerator-BDR_z3-X.js +8 -0
- package/dist/chunks/skillLearning-BQtfFE0g.js +1 -0
- package/dist/chunks/skillLearning-C8ihdryM.js +1 -0
- package/dist/chunks/skillPanel-yR8Oi-mO.js +28 -0
- package/dist/chunks/skillSearchPanel-DUQQUCUS.js +21 -0
- package/dist/chunks/skills-NAZQ3j-t.js +1 -0
- package/dist/chunks/slashCommandParsing-RQb_7Xzt.js +1 -0
- package/dist/chunks/src-CDCSSo0U2.js +53 -0
- package/dist/chunks/src-CHw1lvBc.js +3 -0
- package/dist/chunks/src-CST_jFnT.js +1 -0
- package/dist/chunks/src-CgZmCiiH.js +2 -0
- package/dist/chunks/src-CiJCsqUl.js +9 -0
- package/dist/chunks/src-D06Xyj4g.js +2 -0
- package/dist/chunks/src-DCUgdrYl.js +5 -0
- package/dist/chunks/src-DLz3FZm1.js +1 -0
- package/dist/chunks/src-DPUAq5Ty.js +1 -0
- package/dist/chunks/src-DQOX_xI1.js +1 -0
- package/dist/chunks/src-Dt5IJd3C.js +1 -0
- package/dist/chunks/src-Dvp6-vB7.js +19 -0
- package/dist/chunks/src-PM8NIIu_.js +1 -0
- package/dist/chunks/src-l6_O0K-a.js +1 -0
- package/dist/chunks/src-xRRBgNzF.js +25 -0
- package/dist/chunks/sso-oidc-DFJ7SBvI.js +1 -0
- package/dist/chunks/startupProfiler-B0m6crkd.js +1 -0
- package/dist/chunks/startupProfiler-DxRQteII.js +3 -0
- package/dist/chunks/state-4KQ3kaqz.js +1 -0
- package/dist/chunks/state-53JDbNQM.js +1 -0
- package/dist/chunks/state-Cn_m2NOf.js +1 -0
- package/dist/chunks/staticRender-BIxpgNUq.js +1 -0
- package/dist/chunks/stats-h4yu84Q-.js +1 -0
- package/dist/chunks/status-BbdeubJG.js +1 -0
- package/dist/chunks/status-is_Bg_IB.js +2 -0
- package/dist/chunks/statusNoticeHelpers-CQ7CUugR.js +1 -0
- package/dist/chunks/stdio-4S7b8Uhx.js +1 -0
- package/dist/chunks/stdio-W_Kokrkh.js +3 -0
- package/dist/chunks/stickers-qJoNhPk4.js +1 -0
- package/dist/chunks/store-Z8rTjDHe.js +1 -0
- package/dist/chunks/stringUtils-CvXbHQRH.js +4 -0
- package/dist/chunks/sts-C2Gf2WYN.js +1 -0
- package/dist/chunks/subprocessEnv-BSQSomcK.js +1 -0
- package/dist/chunks/subprocessEnv-vrwzMgKn.js +1 -0
- package/dist/chunks/supports-color-uJ1LqA-P.js +1 -0
- package/dist/chunks/systemPromptSections-CgpggIYX.js +1 -0
- package/dist/chunks/systemPromptSections-IePG5K8r.js +1 -0
- package/dist/chunks/systemTheme-Ceakddth.js +1 -0
- package/dist/chunks/tag-i3HZ4lhj.js +11 -0
- package/dist/chunks/tasks-HzsYNTZ1.js +1 -0
- package/dist/chunks/teleport-hN3cAbYC.js +1 -0
- package/dist/chunks/templateJobs-CIv_ysje.js +12 -0
- package/dist/chunks/terminalSetup-C0PF87iu.js +33 -0
- package/dist/chunks/terminalSetup-CxniwSF-.js +1 -0
- package/dist/chunks/theme-BKIHX_Dx.js +1 -0
- package/dist/chunks/thinkback-BA4cMz4D.js +1 -0
- package/dist/chunks/thinkback-mT-8FIT-.js +1 -0
- package/dist/chunks/thinkback-play-Cfk49mvF.js +1 -0
- package/dist/chunks/tmux-CbsW-VDJ.js +1 -0
- package/dist/chunks/toolEventObserver-8FQtxeVv.js +1 -0
- package/dist/chunks/toolEventObserver-B1xvyKdE.js +1 -0
- package/dist/chunks/toolPool-CHVDZqh7.js +1 -0
- package/dist/chunks/trustedDevice-BYCh1ff7.js +1 -0
- package/dist/chunks/trustedDevice-DnIWErCt.js +1 -0
- package/dist/chunks/tui-fTa_pzdA.js +6 -0
- package/dist/chunks/types-BUyOCzUt.js +1 -0
- package/dist/chunks/types-Czs-_G1S.js +3 -0
- package/dist/chunks/types-a7X-tJpJ.js +17 -0
- package/dist/chunks/udsClient-Cg9bBD0p.js +1 -0
- package/dist/chunks/ultrareviewCommand-DCFRZsKp.js +3 -0
- package/dist/chunks/undercover-B-kKUWtK.js +1 -0
- package/dist/chunks/undercover-CsLPQb-a.js +31 -0
- package/dist/chunks/up-dO5BcPaq.js +12 -0
- package/dist/chunks/updateCCB-CfUnkOLT.js +11 -0
- package/dist/chunks/upgrade-CngUwvY4.js +1 -0
- package/dist/chunks/upgrade-kpttjebY.js +1 -0
- package/dist/chunks/upload-DDhQqV8n.js +1 -0
- package/dist/chunks/upstreamproxy-CvcjNY7J.js +11 -0
- package/dist/chunks/usage-CJ5w0907.js +1 -0
- package/dist/chunks/usage-eZRwLa77.js +1 -0
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-yAroCqu4.js +1 -0
- package/dist/chunks/useMainLoopModel-BNFW-g8E.js +1 -0
- package/dist/chunks/useManagePlugins-CTtPaQRP.js +1 -0
- package/dist/chunks/useMergedTools-CZJffsmf.js +1 -0
- package/dist/chunks/useSearchInput-C-CqUK6w.js +1 -0
- package/dist/chunks/useSettingsErrors-BWlJCgYF.js +1 -0
- package/dist/chunks/util-DJV0joAW.js +1 -0
- package/dist/chunks/v4-jw6qOKwQ.js +65 -0
- package/dist/chunks/validatePlugin-CRmpIGLV.js +1 -0
- package/dist/chunks/vertex-sdk-DjXcZ2J7.js +9 -0
- package/dist/chunks/vim-n8-UT5w-.js +1 -0
- package/dist/chunks/which-BBCjXfI2.js +1 -0
- package/dist/chunks/windowsPaths-D6T_3XaU.js +1 -0
- package/dist/chunks/windowsPaths-DUKTzBck.js +1 -0
- package/dist/chunks/workSecret-C_lv0dRh.js +1 -0
- package/dist/chunks/workerRegistry-BdHi7_sN.js +1 -0
- package/dist/chunks/worktree-YDeHMlHZ.js +1 -0
- package/dist/chunks/worktreeModeEnabled-BFOYTTTr.js +1 -0
- package/dist/chunks/worktreeModeEnabled-D68iEHpC.js +1 -0
- package/dist/chunks/wrapper-K8ZapJVu.js +6 -0
- package/dist/chunks/xdg-DcF9ejUM.js +1 -0
- package/dist/chunks/zod-CuNujUwx.js +1 -0
- package/dist/cli-bun.js +2 -0
- package/dist/cli-node.js +2 -0
- package/dist/cli.js +2 -0
- package/dist/vendor/ripgrep/x64-linux/rg +0 -0
- package/package.json +218 -0
- package/scripts/postinstall.cjs +389 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b=e((()=>{t=`@aws-sdk/nested-clients`,n=`3.997.31`,r=`Nested clients for AWS SDK packages.`,i=`./dist-cjs/index.js`,a=`./dist-es/index.js`,o=`./dist-types/index.d.ts`,s={build:`concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs`,"build:cjs":`node ../../scripts/compilation/inline`,"build:es":`premove dist-es && tsc -p tsconfig.es.json`,"build:include:deps":`yarn g:turbo run build -F="$npm_package_name"`,"build:types":`premove dist-types && tsc -p tsconfig.types.json`,"build:types:downlevel":`downlevel-dts dist-types dist-types/ts3.4`,clean:`premove dist-cjs dist-es dist-types`,lint:`node ../../scripts/validation/submodules-linter.js`,prebuild:`yarn lint`,test:`yarn g:vitest run`,"test:watch":`yarn g:vitest watch`},c={node:`>=20.0.0`},l={name:`AWS SDK for JavaScript Team`,url:`https://aws.amazon.com/sdk-for-javascript/`},u=`Apache-2.0`,d={"@aws-sdk/core":`^3.975.1`,"@aws-sdk/signature-v4-multi-region":`^3.996.39`,"@aws-sdk/types":`^3.974.0`,"@smithy/core":`^3.29.2`,"@smithy/fetch-http-handler":`^5.6.4`,"@smithy/node-http-handler":`^4.9.4`,"@smithy/types":`^4.16.0`,tslib:`^2.6.2`},f={concurrently:`7.0.0`,"downlevel-dts":`0.10.1`,premove:`4.0.0`,typescript:`~5.8.3`},p={"<4.5":{"dist-types/*":[`dist-types/ts3.4/*`]}},m=[`./cognito-identity.d.ts`,`./cognito-identity.js`,`./signin.d.ts`,`./signin.js`,`./sso-oidc.d.ts`,`./sso-oidc.js`,`./sso.d.ts`,`./sso.js`,`./sts.d.ts`,`./sts.js`,`dist-*/**`],h={"./dist-es/submodules/cognito-identity/runtimeConfig":`./dist-es/submodules/cognito-identity/runtimeConfig.browser`,"./dist-es/submodules/signin/runtimeConfig":`./dist-es/submodules/signin/runtimeConfig.browser`,"./dist-es/submodules/sso-oidc/runtimeConfig":`./dist-es/submodules/sso-oidc/runtimeConfig.browser`,"./dist-es/submodules/sso/runtimeConfig":`./dist-es/submodules/sso/runtimeConfig.browser`,"./dist-es/submodules/sts/runtimeConfig":`./dist-es/submodules/sts/runtimeConfig.browser`},g=`https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients`,_={type:`git`,url:`https://github.com/aws/aws-sdk-js-v3.git`,directory:`packages/nested-clients`},v={"./package.json":`./package.json`,"./sso-oidc":{types:`./dist-types/submodules/sso-oidc/index.d.ts`,module:`./dist-es/submodules/sso-oidc/index.js`,node:`./dist-cjs/submodules/sso-oidc/index.js`,import:`./dist-es/submodules/sso-oidc/index.js`,require:`./dist-cjs/submodules/sso-oidc/index.js`},"./sts":{types:`./dist-types/submodules/sts/index.d.ts`,module:`./dist-es/submodules/sts/index.js`,node:`./dist-cjs/submodules/sts/index.js`,import:`./dist-es/submodules/sts/index.js`,require:`./dist-cjs/submodules/sts/index.js`},"./signin":{types:`./dist-types/submodules/signin/index.d.ts`,module:`./dist-es/submodules/signin/index.js`,node:`./dist-cjs/submodules/signin/index.js`,import:`./dist-es/submodules/signin/index.js`,require:`./dist-cjs/submodules/signin/index.js`},"./cognito-identity":{types:`./dist-types/submodules/cognito-identity/index.d.ts`,module:`./dist-es/submodules/cognito-identity/index.js`,node:`./dist-cjs/submodules/cognito-identity/index.js`,import:`./dist-es/submodules/cognito-identity/index.js`,require:`./dist-cjs/submodules/cognito-identity/index.js`},"./sso":{types:`./dist-types/submodules/sso/index.d.ts`,module:`./dist-es/submodules/sso/index.js`,node:`./dist-cjs/submodules/sso/index.js`,import:`./dist-es/submodules/sso/index.js`,require:`./dist-cjs/submodules/sso/index.js`}},y={name:t,version:n,description:r,main:i,module:a,types:o,scripts:s,engines:c,sideEffects:!1,author:l,license:u,dependencies:d,devDependencies:f,typesVersions:p,files:m,browser:h,"react-native":{},homepage:g,repository:_,exports:v}}));export{y as n,b as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,P as r,fi as i,hn as a,t as o,y as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{o as l,r as u}from"./break-cache-Bd0clV2N.js";async function d(e,t){let n=await u(e);n.type===`text`&&t(n.value,{display:`system`})}function f({onDone:e}){let[t,i]=(0,m.useState)(0),o=(0,m.useMemo)(()=>[{label:`Status`,description:`Show pending marker, always mode, and break count`,run:()=>void d(`status`,e)},{label:`Once`,description:`Break prompt cache on the next API call only`,run:()=>void d(`once`,e)},{label:`Always`,description:`Break prompt cache on every API call`,run:()=>void d(`always`,e)},{label:`Off`,description:`Disable always mode and clear pending once marker`,run:()=>void d(`off`,e)},{label:`Clear Once`,description:`Cancel the pending one-time cache break`,run:()=>void d(`--clear`,e)}],[e]),c=()=>{let e=o[t];e&&e.run()};return a((e,t)=>{if(t.upArrow){i(e=>Math.max(0,e-1));return}if(t.downArrow){i(e=>Math.min(o.length-1,e+1));return}t.return&&c()}),(0,h.jsx)(s,{title:`Break Cache`,subtitle:`${o.length} actions`,onCancel:()=>e(`Break-cache panel dismissed`,{display:`system`}),color:`background`,hideInputGuide:!0,children:(0,h.jsxs)(n,{flexDirection:`column`,children:[o.map((e,i)=>(0,h.jsxs)(n,{flexDirection:`row`,children:[(0,h.jsx)(r,{children:`${i===t?`›`:` `} ${e.label}`.padEnd(g)}),(0,h.jsx)(r,{dimColor:!0,children:e.description})]},e.label)),(0,h.jsx)(n,{marginTop:1,children:(0,h.jsx)(r,{dimColor:!0,children:`↑/↓ select · Enter run · Esc close`})})]})})}async function p(e,t,n){let r=n?.trim()??``;return r?(await d(r,e),null):(0,h.jsx)(f,{onDone:e})}var m,h,g;e((()=>{m=t(i(),1),o(),l(),h=c(),g=28}))();export{p as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,P as r,fi as i,hn as a,t as o,y as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{n as l,t as u}from"./tui-fTa_pzdA.js";async function d(e,t){let n=await u(e);n.type===`text`&&t(n.value,{display:`system`})}function f({onDone:e}){let[t,i]=(0,m.useState)(0),o=(0,m.useMemo)(()=>[{label:`Status`,description:`Show marker and environment override state`,run:()=>void d(`status`,e)},{label:`Toggle`,description:`Flip persisted TUI mode for the next session`,run:()=>void d(`toggle`,e)},{label:`On`,description:`Enable flicker-free alternate-screen mode`,run:()=>void d(`on`,e)},{label:`Off`,description:`Disable flicker-free alternate-screen mode`,run:()=>void d(`off`,e)}],[e]),c=()=>{let e=o[t];e&&e.run()};return a((e,t)=>{if(t.upArrow){i(e=>Math.max(0,e-1));return}if(t.downArrow){i(e=>Math.min(o.length-1,e+1));return}t.return&&c()}),(0,h.jsx)(s,{title:`TUI Mode`,subtitle:`${o.length} actions`,onCancel:()=>e(`TUI mode panel dismissed`,{display:`system`}),color:`background`,hideInputGuide:!0,children:(0,h.jsxs)(n,{flexDirection:`column`,children:[o.map((e,i)=>(0,h.jsxs)(n,{flexDirection:`row`,children:[(0,h.jsx)(r,{children:`${i===t?`›`:` `} ${e.label}`.padEnd(g)}),(0,h.jsx)(r,{dimColor:!0,children:e.description})]},e.label)),(0,h.jsx)(n,{marginTop:1,children:(0,h.jsx)(r,{dimColor:!0,children:`↑/↓ select · Enter run · Esc close`})})]})})}async function p(e,t,n){let r=n?.trim()??``;return r?(await d(r,e),null):(0,h.jsx)(f,{onDone:e})}var m,h,g;e((()=>{m=t(i(),1),o(),l(),h=c(),g=24}))();export{p as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,P as r,fi as i,hn as a,mt as o,t as s,y as c}from"./src-CDCSSo0U2.js";import{t as l}from"./jsx-runtime-Bb4Xn-E0.js";import{$u as u,ed as d}from"./loadAgentsDir-nzr38hai.js";function f(e){return e.status===`running`?{mark:`●`,color:`warning`}:e.resultKind===`dead`?{mark:`✗`,color:`error`}:{mark:`✓`,color:`success`}}function p(e){return e?e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e):`0`}function m(e){let t=[];return e.model&&t.push(e.model),t.push(`${p(e.tokenCount)} tok`),t.push(`${e.toolCount??0} tool`),t.join(` · `)}var h,g,_,v,y,b=e((()=>{h={running:`●`,completed:`✓`,failed:`✗`,killed:`■`},g={running:`warning`,completed:`success`,failed:`error`,killed:`subtle`},_={running:`running`,completed:`done`,failed:`failed`,killed:`killed`},v={running:`●`,done:`✓`,pending:`○`},y={running:`warning`,done:`success`,pending:`subtle`}}));function x(e,t){if(e.length<=t)return e;let n=e.match(/#\d+$/);if(!n)return e.slice(0,t);let r=n[0],i=e.slice(0,e.length-r.length),a=t-r.length-1;return`${i.slice(0,a)}…${r}`}function S({agents:e,selectedIndex:t,focused:i}){let[a,s]=o(T),c=w[Math.floor(s/T)%w.length];return e.length===0?(0,C.jsx)(r,{color:`subtle`,children:`(no agents in this phase)`}):(0,C.jsx)(n,{ref:a,flexDirection:`column`,children:e.map((e,a)=>{let o=f(e),s=a===t&&i,l=e.status===`running`?c:o.mark,u=x(e.label??`agent-${e.id}`,E);return(0,C.jsxs)(n,{backgroundColor:s?`selectionBg`:void 0,justifyContent:`space-between`,children:[(0,C.jsxs)(n,{children:[(0,C.jsx)(r,{color:o.color,children:l}),(0,C.jsxs)(r,{children:[` `,u]})]}),(0,C.jsx)(r,{color:`subtle`,children:m(e)})]},e.id)})})}var C,w,T,E,D=e((()=>{i(),s(),b(),C=l(),w=[`·`,`✢`,`✱`,`✶`,`✻`,`✽`],T=120,E=18}));function O(e,t){return e?.status===`done`?`done`:t.length>0?t.every(e=>e.status===`done`)?`done`:`running`:e?.status===`running`?`running`:`pending`}function k(e){let t=new Map(e.phases.map(e=>[e.title,e])),n=new Set,r=[],i=i=>{if(n.has(i))return;n.add(i);let a=t.get(i),o=e.agents.filter(e=>e.phase===i);r.push({title:i,status:O(a,o),done:o.filter(e=>e.status===`done`).length,total:o.length})};for(let t of e.declaredPhases)i(t);for(let t of e.phases)i(t.title);for(let t of e.agents)t.phase&&i(t.phase);return r}function A(e,t){return t===void 0||t===`All`?e:e.filter(e=>e.phase===t)}function j(e){return e.filter(e=>e.status===`running`)}function M(e,t){let n=Math.max(0,Math.trunc(t)),r=e.slice(0,n);return{runs:r,overflow:Math.max(0,e.length-r.length)}}function N(e,t){return`${e}#${t.slice(-4)}`}function P(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60),r=t%60;return n<60?`${n}m${String(r).padStart(2,`0`)}s`:`${Math.floor(n/60)}h${String(n%60).padStart(2,`0`)}m`}var F=e((()=>{}));function I({phases:e,agents:t,selectedIndex:i,focused:a}){let[s,c]=o(z),l=R[Math.floor(c/z)%R.length],u=t.length;return(0,L.jsx)(n,{ref:s,flexDirection:`column`,children:[{title:`All`,done:t.filter(e=>e.status===`done`).length,total:u},...e].map((e,t)=>{let o=t===i,s=o&&a,c=e.status===`running`?l:e.status?v[e.status]:` `,u=e.status?y[e.status]:`subtle`;return(0,L.jsxs)(n,{backgroundColor:s?`selectionBg`:void 0,justifyContent:`space-between`,children:[(0,L.jsxs)(n,{children:[(0,L.jsx)(r,{color:o?`claude`:void 0,children:s?`>`:` `}),(0,L.jsx)(r,{children:` `}),(0,L.jsx)(r,{color:u,children:c}),(0,L.jsxs)(r,{children:[` `,e.title]})]}),(0,L.jsxs)(r,{color:`subtle`,children:[e.done,`/`,e.total]})]},e.title)})})}var L,R,z,B=e((()=>{i(),s(),b(),F(),L=l(),R=[`·`,`✢`,`✱`,`✶`,`✻`,`✽`],z=120}));function V({runs:e,activeRunId:t}){if(e.length===0)return(0,H.jsx)(r,{color:`subtle`,children:`(no runs)`});let{runs:i,overflow:a}=M(e,W);return(0,H.jsxs)(n,{children:[i.map(e=>{let i=e.runId===t,a=x(N(e.workflowName,e.runId),U),o=`═`.repeat(a.length+2);return(0,H.jsxs)(n,{flexDirection:`column`,marginRight:2,children:[(0,H.jsxs)(n,{children:[(0,H.jsx)(r,{color:g[e.status],children:h[e.status]}),(0,H.jsx)(r,{children:` `}),(0,H.jsx)(r,{color:i?`claude`:void 0,bold:i,children:a})]}),(0,H.jsx)(r,{color:i?`claude`:void 0,children:i?o:``})]},e.runId)}),a>0?(0,H.jsxs)(n,{flexDirection:`column`,marginRight:2,children:[(0,H.jsxs)(r,{color:`subtle`,children:[`+`,a]}),(0,H.jsx)(r,{children:` `})]}):null]})}var H,U,W,G=e((()=>{i(),s(),b(),F(),D(),H=l(),U=18,W=6}));function K(e,t,n=`normal`){return n===`confirm`?e===`y`||e===`Y`||t.return?`confirmYes`:e===`n`||e===`N`||t.escape||e===`q`?`confirmNo`:null:t.tab||e===` `?t.shift?`prevTab`:`nextTab`:t.escape||e===`q`?`quit`:e===`K`?`killWorkflow`:e===`x`?`killAgent`:e===`r`?`resume`:e===`n`?`newRun`:t.leftArrow?`focusLeft`:t.rightArrow?`focusRight`:t.upArrow?`moveUp`:t.downArrow?`moveDown`:null}function q(e,t=`normal`){a((n,r)=>{let i=K(n,r,t);if(i!==null)switch(i){case`nextTab`:e.nextTab();break;case`prevTab`:e.prevTab();break;case`focusLeft`:e.focusLeft();break;case`focusRight`:e.focusRight();break;case`moveUp`:e.moveUp();break;case`moveDown`:e.moveDown();break;case`killAgent`:e.killAgent();break;case`killWorkflow`:e.killWorkflow();break;case`resume`:e.resumeFocused();break;case`newRun`:e.newRun();break;case`quit`:e.quit();break;case`confirmYes`:e.confirmYes();break;case`confirmNo`:e.confirmNo();break}})}var J=e((()=>{s()}));function Y(e,t){if(t===0)return 0;let n=Math.trunc(e);return Number.isNaN(n)||n<0?0:Math.min(n,t-1)}function ee(e,t){return!e||!t||e.runId!==t.runId||e.status!==`running`?!1:t.status===`completed`||t.status===`failed`||t.status===`killed`}function te({onDone:e,context:t}){let i=u(),a=(0,X.useSyncExternalStore)(i.subscribe,()=>i.listRuns(),()=>[]),s=j(a),[l,d]=(0,X.useState)(null),[f,p]=(0,X.useState)(`phases`),[m,h]=(0,X.useState)(0),[v,y]=(0,X.useState)(0),[b,x]=(0,X.useState)(null);(0,X.useEffect)(()=>{i.loadPersistedRuns()},[i]),(0,X.useEffect)(()=>{if(s.length===0){l!==null&&d(null);return}s.some(e=>e.runId===l)||d(s[0].runId)},[s,l]);let C=s.find(e=>e.runId===l),w=C?k(C):[],T=w.length+1,E=Y(m,T),D=(0,X.useRef)(null);(0,X.useEffect)(()=>{let t=C?{runId:C.runId,status:C.status}:null,n=D.current;if(D.current=t,!ee(n,t))return;let r=setTimeout(()=>e(),800);return()=>{clearTimeout(r)}},[C?.runId,C?.status,e]);let O=E===0?void 0:w[E-1]?.title,M=C?A(C.agents,O):[],N=Y(v,M.length),F=e=>{d(e),p(`phases`),h(0),y(0)};q({nextTab:()=>{if(s.length===0)return;let e=s.findIndex(e=>e.runId===l),t=s[(e+1)%s.length];F(t.runId)},prevTab:()=>{if(s.length===0)return;let e=s.findIndex(e=>e.runId===l),t=s[(e-1+s.length)%s.length];F(t.runId)},focusLeft:()=>p(`phases`),focusRight:()=>p(`agents`),moveUp:()=>{f===`phases`?h(e=>Y(e-1,T)):y(e=>Y(e-1,M.length))},moveDown:()=>{f===`phases`?h(e=>Y(e+1,T)):y(e=>Y(e+1,M.length))},killAgent:()=>{f!==`agents`||!C||M[N]&&x(`agent`)},killWorkflow:()=>{C&&x(`workflow`)},resumeFocused:()=>{if(!C)return;let n=t.canUseTool;if(!n){e(`resume needs canUseTool context; run /<name> resume from the main session.`);return}i.launch({resumeFromRunId:C.runId,name:C.workflowName},t,n).catch(t=>e(`resume failed: ${t.message}`))},newRun:()=>e(`Tip: start a named workflow with /<name>, or pass name via the Workflow tool.`),quit:()=>{if(b!==null){x(null);return}e()},confirmYes:()=>{if(b===`workflow`&&C){i.kill(C.runId),x(null),e();return}else if(b===`agent`&&C){let e=M[N];e&&i.killAgent(C.runId,e.id)}x(null)},confirmNo:()=>x(null)},b===null?`normal`:`confirm`);let L=a.filter(e=>e.status===`running`).length,R=a.length-L,z=O??`All`,B=C?C.agents.filter(e=>e.status===`done`).length:0,[H]=o(1e3),U=C?Date.now()-C.startedAt:0;return(0,Z.jsxs)(n,{ref:H,flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,paddingX:1,children:[(0,Z.jsxs)(n,{justifyContent:`space-between`,children:[(0,Z.jsx)(r,{bold:!0,children:C?.workflowName??`Workflows`}),C?(0,Z.jsxs)(r,{color:`subtle`,children:[B,`/`,C.agentCount,` agents · `,P(U),` ·`,` `,(0,Z.jsx)(r,{color:g[C.status],children:_[C.status]})]}):(0,Z.jsxs)(r,{color:`subtle`,children:[L,` running · `,R,` done`]})]}),C?.description?(0,Z.jsx)(r,{color:`subtle`,children:C.description}):null,s.length>1?(0,Z.jsx)(n,{marginTop:1,children:(0,Z.jsx)(V,{runs:s,activeRunId:l})}):null,(0,Z.jsxs)(n,{flexDirection:`row`,marginTop:1,children:[(0,Z.jsxs)(n,{width:`25%`,flexDirection:`column`,children:[(0,Z.jsx)(r,{color:f===`phases`?`claude`:`subtle`,bold:!0,children:`Phases`}),(0,Z.jsx)(I,{phases:w,agents:C?.agents??[],selectedIndex:E,focused:f===`phases`})]}),(0,Z.jsx)(r,{color:`subtle`,children:`│`}),(0,Z.jsxs)(n,{flexGrow:1,flexDirection:`column`,children:[(0,Z.jsxs)(r,{color:f===`agents`?`claude`:`subtle`,bold:!0,children:[z,` · `,M.length,` agents`]}),(0,Z.jsx)(S,{agents:M,selectedIndex:N,focused:f===`agents`})]})]}),(0,Z.jsx)(n,{marginTop:1,children:(0,Z.jsx)(r,{color:`subtle`,children:b===null?`Tab switch run · ←/→ focus · ↑/↓ move · x kill agent · K kill workflow · r resume · q quit`:`Confirm: y kill · n/Esc cancel`})}),b===null?null:(0,Z.jsx)(c,{title:b===`workflow`?`Kill workflow "${C?.workflowName??``}"?`:`Kill agent "${M[N]?.label??``}"?`,subtitle:b===`workflow`?`All in-flight agents will be aborted. Resume will replay from journal.`:`Only this agent aborts; other agents in the workflow keep running.`,onCancel:()=>x(null),color:`warning`,children:(0,Z.jsx)(r,{color:`subtle`,children:`Press y to confirm, or n/Esc to cancel.`})})]})}var X,Z,ne=e((()=>{X=t(i(),1),s(),d(),D(),B(),G(),b(),J(),F(),Z=l()})),Q,$;e((()=>{ne(),Q=l(),$=async(e,t,n)=>(0,Q.jsx)(te,{onDone:e,context:t})}))();export{$ as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=()=>({serverUrl:``,authToken:``});export{e as parseConnectUrl};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t}from"./parser-CQrasoUB.js";t();export{e as parseCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t}from"./debug-IKW-jE7K.js";var n,r=e((()=>{Promise.resolve(),n=new Set([`if`,`then`,`elif`,`else`,`fi`,`while`,`until`,`for`,`in`,`do`,`done`,`case`,`esac`,`function`,`select`])}));async function i(e){return!e||e.length,null}async function a(e){return!e||e.length,null}function o(e){if(e.type===`declaration_command`){let t=e.children[0];return t&&c.has(t.text)?[t.text]:[]}let t=[],n=!1;for(let r of e.children)if(r.type!==`variable_assignment`){if(r.type===`command_name`||!n&&r.type===`word`){n=!0,t.push(r.text);continue}if(l.has(r.type))t.push(s(r.text));else if(u.has(r.type))break}return t}function s(e){return e.length>=2&&(e[0]===`"`&&e.at(-1)===`"`||e[0]===`'`&&e.at(-1)===`'`)?e.slice(1,-1):e}var c,l,u,d,f=e((()=>{t(),r(),c=new Set([`export`,`declare`,`typeset`,`readonly`,`local`,`unset`,`unsetenv`]),l=new Set([`word`,`string`,`raw_string`,`number`]),u=new Set([`command_substitution`,`process_substitution`]),d=Symbol(`parse-aborted`)}));export{a,i,o as n,n as o,f as r,r as s,d as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Fr as t,Mi as n,Ni as r,Pr as i}from"./state-4KQ3kaqz.js";import{nD as a,tD as o}from"./loadAgentsDir-nzr38hai.js";function s(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}var c=e((()=>{}));function l(e,t,n,r){return o(e,function(e,i,a){t(r,e,n(e),a)}),r}var u=e((()=>{a()}));function d(e,t){return function(n,a){var o=r(n)?s:l,c=t?t():{};return o(n,e,i(a,2),c)}}var f=e((()=>{c(),u(),t(),n()})),p,m=e((()=>{f(),p=d(function(e,t,n){e[+!n].push(t)},function(){return[[],[]]})}));export{p as n,m as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,Lt as r,P as i,Wt as a,dr as o,fi as s,hn as c,t as l,x as u}from"./src-CDCSSo0U2.js";import{t as d}from"./jsx-runtime-Bb4Xn-E0.js";import{Kt as f,_n as p,gn as m}from"./settings-5PQdphqC.js";import{b as h,c as g,g as _}from"./config-C7YHKCPV.js";import{o as v,s as y}from"./log-B3eB4EFv.js";import{n as b,r as x}from"./analytics-BotDBGh0.js";import{i as S,n as C,o as w,r as T,s as E,u as D}from"./referral-DP_GshTS.js";import{n as O,t as k}from"./useExitOnCtrlCDWithKeybindings-yAroCqu4.js";function A({onDone:e}){let[t,s]=(0,j.useState)(!0),[l,d]=(0,j.useState)([]),[f,p]=(0,j.useState)(!1),[h,g]=(0,j.useState)(null),[_,v]=(0,j.useState)(void 0),b=O(()=>e(`Guest passes dialog dismissed`,{display:`system`}));if(a(`confirm:no`,(0,j.useCallback)(()=>{e(`Guest passes dialog dismissed`,{display:`system`})},[e]),{context:`Confirmation`}),c((t,n)=>{n.return&&h&&o(h).then(t=>{t&&process.stdout.write(t),x(`tengu_guest_passes_link_copied`,{}),e(`Referral link copied to clipboard!`)})}),(0,j.useEffect)(()=>{async function e(){try{let e=await S();if(!e||!e.eligible){p(!1),s(!1);return}p(!0),e.referral_code_details?.referral_link&&g(e.referral_code_details.referral_link),v(e.referrer_reward);let t=e.referral_code_details?.campaign??`claude_code_guest_pass`,n;try{n=await C(t)}catch(e){y(e),p(!1),s(!1);return}let r=n.redemptions||[],i=n.limit||3,a=[];for(let e=0;e<i;e++){let t=r[e];a.push({passNumber:e+1,isAvailable:!t})}d(a),s(!1)}catch(e){y(e),p(!1),s(!1)}}e()},[]),t)return(0,M.jsx)(u,{children:(0,M.jsxs)(n,{flexDirection:`column`,gap:1,children:[(0,M.jsx)(i,{dimColor:!0,children:`Loading guest pass information…`}),(0,M.jsx)(i,{dimColor:!0,italic:!0,children:b.pending?(0,M.jsxs)(M.Fragment,{children:[`Press `,b.keyName,` again to exit`]}):(0,M.jsx)(M.Fragment,{children:`Esc to cancel`})})]})});if(!f)return(0,M.jsx)(u,{children:(0,M.jsxs)(n,{flexDirection:`column`,gap:1,children:[(0,M.jsx)(i,{children:`Guest passes are not currently available.`}),(0,M.jsx)(i,{dimColor:!0,italic:!0,children:b.pending?(0,M.jsxs)(M.Fragment,{children:[`Press `,b.keyName,` again to exit`]}):(0,M.jsx)(M.Fragment,{children:`Esc to cancel`})})]})});let w=m(l,e=>e.isAvailable),E=[...l].sort((e,t)=>t.isAvailable-+e.isAvailable),D=e=>e.isAvailable?(0,M.jsxs)(n,{flexDirection:`column`,marginRight:1,children:[(0,M.jsx)(i,{children:`┌──────────┐`}),(0,M.jsxs)(i,{children:[` ) CC `,(0,M.jsx)(i,{color:`claude`,children:`✻`}),` ┊ ( `]}),(0,M.jsx)(i,{children:`└──────────┘`})]},e.passNumber):(0,M.jsxs)(n,{flexDirection:`column`,marginRight:1,children:[(0,M.jsx)(i,{dimColor:!0,children:`┌─────────╱`}),(0,M.jsx)(i,{dimColor:!0,children:` ) CC ✻ ┊╱`}),(0,M.jsx)(i,{dimColor:!0,children:`└───────╱`})]},e.passNumber);return(0,M.jsx)(u,{children:(0,M.jsxs)(n,{flexDirection:`column`,gap:1,children:[(0,M.jsxs)(i,{color:`permission`,children:[`Guest passes · `,w,` left`]}),(0,M.jsx)(n,{flexDirection:`row`,marginLeft:2,children:E.slice(0,3).map(e=>D(e))}),h&&(0,M.jsx)(n,{marginLeft:2,children:(0,M.jsx)(i,{children:h})}),(0,M.jsx)(n,{flexDirection:`column`,marginLeft:2,children:(0,M.jsxs)(i,{dimColor:!0,children:[_?`Share a free week of Claude Code with friends. If they love it and subscribe, you'll get ${T(_)} of extra usage to keep building. `:`Share a free week of Claude Code with friends. `,(0,M.jsx)(r,{url:_?`https://support.claude.com/en/articles/13456702-claude-code-guest-passes`:`https://support.claude.com/en/articles/12875061-claude-code-guest-passes`,children:`Terms apply.`})]})}),(0,M.jsx)(n,{children:(0,M.jsx)(i,{dimColor:!0,italic:!0,children:b.pending?(0,M.jsxs)(M.Fragment,{children:[`Press `,b.keyName,` again to exit`]}):(0,M.jsx)(M.Fragment,{children:`Enter to copy link · Esc to cancel`})})})]})})}var j,M,N=e((()=>{s(),j=t(s(),1),f(),k(),l(),D(),b(),E(),p(),v(),M=d()}));async function P(e){let t=!g().hasVisitedPasses;if(t){let e=w();h(t=>({...t,hasVisitedPasses:!0,passesLastSeenRemaining:e??t.passesLastSeenRemaining}))}return x(`tengu_guest_passes_visited`,{is_first_visit:t}),(0,F.jsx)(A,{onDone:e})}var F;e((()=>{s(),N(),b(),E(),_(),F=d()}))();export{P as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./cwd-BuJhkTrc.js";import{_ as r,h as i}from"./debug-IKW-jE7K.js";import{i as a,o}from"./platform-EtecGacO.js";import{a as s,i as c}from"./windowsPaths-D6T_3XaU.js";import{l}from"./sessionStoragePortable-Cx6JQ5Ye.js";import{homedir as u}from"os";import{dirname as d,isAbsolute as f,join as p,normalize as m,posix as h,relative as g,resolve as _}from"path";function v(e,t){let r=t??n()??i().cwd();if(typeof e!=`string`)throw TypeError(`Path must be a string, received ${typeof e}`);if(typeof r!=`string`)throw TypeError(`Base directory must be a string, received ${typeof r}`);if(e.includes(`\0`)||r.includes(`\0`))throw Error(`Path contains null bytes`);let o=e=>e.includes(`/`)&&!e.includes(`\\`)&&!/^[A-Za-z]:/.test(e),c=e.trim();if(!c)return a()===`windows`&&o(r)?h.normalize(r).normalize(`NFC`):m(r).normalize(`NFC`);if(c===`~`)return u().normalize(`NFC`);if(c.startsWith(`~/`))return p(u(),c.slice(2)).normalize(`NFC`);let l=c;if(a()===`windows`&&c.match(/^\/[a-z]\//i))try{l=s(c)}catch{l=c}return f(l)?a()===`windows`&&o(l)?h.normalize(l).normalize(`NFC`):m(l).normalize(`NFC`):a()===`windows`&&o(r)&&!/^[A-Za-z]:/.test(l)&&!l.startsWith(`\\\\`)?h.resolve(r,l).normalize(`NFC`):_(r,l).normalize(`NFC`)}function y(e){let t=g(n(),e);return t.startsWith(`..`)?e:t}function b(e){let t=v(e);if(t.startsWith(`\\\\`)||t.startsWith(`//`))return d(t);try{if(i().statSync(t).isDirectory())return t}catch{}return d(t)}function x(e){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(e)}function S(e){return m(e).replace(/\\/g,`/`)}var C=e((()=>{t(),r(),o(),c(),l()}));export{S as a,C as i,v as n,y as o,b as r,x as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./figures-5ThXQEtq.js";import{I as i,P as a,Wt as o,Xn as s,a as c,di as l,fi as u,hn as d,k as f,kt as p,n as m,o as ee,ot as h,r as g,s as te,t as _,ui as v,x as ne,y}from"./src-CDCSSo0U2.js";import{t as b}from"./jsx-runtime-Bb4Xn-E0.js";import{en as re,nt as x}from"./state-4KQ3kaqz.js";import{B as ie,BC as S,G as C,H as ae,IC as w,IE as T,K as E,NE as D,Nb as O,Pb as k,TS as A,U as oe,V as se,VC as ce,_o as j,_u as M,ex as le,fS as ue,lS as N,tx as de,uS as fe,vu as P,zo as pe}from"./loadAgentsDir-nzr38hai.js";import{E as F,O as I}from"./debug-IKW-jE7K.js";import{B as L,L as R,an as z,dn as me,g as B,o as V,z as he}from"./settings-5PQdphqC.js";import{l as ge,o as _e}from"./stringUtils-CvXbHQRH.js";import{u as H}from"./referral-DP_GshTS.js";import{n as ve,t as ye}from"./useExitOnCtrlCDWithKeybindings-yAroCqu4.js";import{n as be,t as xe}from"./AddWorkspaceDirectory-BSLHrjbt.js";import{t as Se}from"./SearchBox-vfLXEPed.js";import{n as Ce,t as we}from"./useSearchInput-C-CqUK6w.js";import{n as Te,t as Ee}from"./shadowedRuleDetection-7Z8ezTKF.js";import{n as U,t as De}from"./autoModeDenials-BxNzGJdR.js";function Oe({ruleValue:e}){switch(e.toolName){case M.name:return e.ruleContent?e.ruleContent.endsWith(`:*`)?(0,W.jsxs)(a,{dimColor:!0,children:[`Any Bash command starting with `,(0,W.jsx)(a,{bold:!0,children:e.ruleContent.slice(0,-2)})]}):(0,W.jsxs)(a,{dimColor:!0,children:[`The Bash command `,(0,W.jsx)(a,{bold:!0,children:e.ruleContent})]}):(0,W.jsx)(a,{dimColor:!0,children:`Any Bash command`});default:return e.ruleContent?null:(0,W.jsxs)(a,{dimColor:!0,children:[`Any use of the `,(0,W.jsx)(a,{bold:!0,children:e.toolName}),` tool`]})}}var W,ke=e((()=>{u(),_(),P(),W=b()}));function Ae(e){switch(e){case`localSettings`:return{label:`Project settings (local)`,description:`Saved in ${V(`localSettings`)}`,value:e};case`projectSettings`:return{label:`Project settings`,description:`Checked in at ${V(`projectSettings`)}`,value:e};case`userSettings`:return{label:`User settings`,description:`Saved in at ~/.claude/settings.json`,value:e}}}function je({onAddRules:e,onCancel:t,ruleValues:n,ruleBehavior:r,initialContext:o,setToolPermissionContext:s}){let c=z.map(Ae),l=(0,Me.useCallback)(i=>{if(i===`cancel`){t();return}else if(z.includes(i)){let t=i,a=w(o,{type:`addRules`,rules:n,behavior:r,destination:t});ce({type:`addRules`,rules:n,behavior:r,destination:t}),s(a);let c=n.map(e=>({ruleValue:e,ruleBehavior:r,source:t})),l=Ee(a,{sandboxAutoAllowEnabled:D.isSandboxingEnabled()&&D.isAutoAllowBashIfSandboxedEnabled()}).filter(e=>n.some(t=>t.toolName===e.rule.ruleValue.toolName&&t.ruleContent===e.rule.ruleValue.ruleContent));e(c,l.length>0?l:void 0)}},[e,t,n,r,o,s]);return(0,G.jsxs)(y,{title:`Add ${r} permission ${ge(n.length,`rule`)}`,onCancel:t,color:`permission`,children:[(0,G.jsx)(i,{flexDirection:`column`,paddingX:2,children:n.map(e=>(0,G.jsxs)(i,{flexDirection:`column`,children:[(0,G.jsx)(a,{bold:!0,children:L(e)}),(0,G.jsx)(Oe,{ruleValue:e})]},L(e)))}),(0,G.jsxs)(i,{flexDirection:`column`,marginY:1,children:[(0,G.jsx)(a,{children:n.length===1?`Where should this rule be saved?`:`Where should these rules be saved?`}),(0,G.jsx)(O,{options:c,onChange:l})]})]})}var Me,G,Ne=e((()=>{u(),Me=t(u(),1),k(),_(),S(),R(),Te(),T(),me(),B(),_e(),ke(),G=b()}));function Pe({onCancel:e,onSubmit:t,ruleBehavior:n}){let[s,c]=(0,Fe.useState)(``),[l,u]=(0,Fe.useState)(0),d=ve();o(`confirm:no`,e,{context:`Settings`});let{columns:f}=h(),m=f-6;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(i,{flexDirection:`column`,gap:1,borderStyle:`round`,paddingLeft:1,paddingRight:1,borderColor:`permission`,children:[(0,K.jsxs)(a,{bold:!0,color:`permission`,children:[`Add `,n,` permission rule`]}),(0,K.jsxs)(i,{flexDirection:`column`,children:[(0,K.jsxs)(a,{children:[`Permission rules are a tool name, optionally followed by a specifier in parentheses.`,(0,K.jsx)(p,{}),`e.g., `,(0,K.jsx)(a,{bold:!0,children:L({toolName:M.name})}),(0,K.jsx)(a,{bold:!1,children:` or `}),(0,K.jsx)(a,{bold:!0,children:L({toolName:M.name,ruleContent:`ls:*`})})]}),(0,K.jsx)(i,{borderDimColor:!0,borderStyle:`round`,marginY:1,paddingLeft:1,children:(0,K.jsx)(le,{showCursor:!0,value:s,onChange:c,onSubmit:e=>{let r=e.trim();r.length!==0&&t(he(r),n)},placeholder:`Enter permission rule${r.ellipsis}`,columns:m,cursorOffset:l,onChangeCursorOffset:u})})]})]}),(0,K.jsx)(i,{marginLeft:3,children:d.pending?(0,K.jsxs)(a,{dimColor:!0,children:[`Press `,d.keyName,` again to exit`]}):(0,K.jsx)(a,{dimColor:!0,children:`Enter to submit · Esc to cancel`})})]})}var Fe,K,Ie=e((()=>{n(),u(),Fe=t(u(),1),de(),ye(),A(),_(),H(),P(),R(),K=b()}));function Le({onHeaderFocusChange:e,onStateChange:t}){let{headerFocused:n,focusHeader:r}=c();(0,q.useEffect)(()=>{e?.(n)},[n,e]);let[o]=(0,q.useState)(()=>De()),[s,l]=(0,q.useState)(()=>new Set),[u,f]=(0,q.useState)(()=>new Set),[p,m]=(0,q.useState)(0);(0,q.useEffect)(()=>{t({approved:s,retry:u,denials:o})},[s,u,o,t]);let ee=(0,q.useCallback)(e=>{let t=Number(e);l(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})},[]),h=(0,q.useCallback)(e=>{m(Number(e))},[]);if(d((e,t)=>{e===`r`&&(f(e=>{let t=new Set(e);return t.has(p)?t.delete(p):t.add(p),t}),l(e=>{if(e.has(p))return e;let t=new Set(e);return t.add(p),t}))},{isActive:o.length>0}),o.length===0)return(0,J.jsx)(a,{dimColor:!0,children:`No recent denials. Commands denied by the auto mode classifier will appear here.`});let g=o.map((e,t)=>{let n=s.has(t),r=u.has(t)?` (retry)`:``;return{label:(0,J.jsxs)(a,{children:[(0,J.jsx)(te,{status:n?`success`:`error`,withSpace:!0}),e.display,(0,J.jsx)(a,{dimColor:!0,children:r})]}),value:String(t)}});return(0,J.jsxs)(i,{flexDirection:`column`,children:[(0,J.jsx)(a,{children:`Commands recently denied by the auto mode classifier.`}),(0,J.jsx)(i,{marginTop:1,children:(0,J.jsx)(O,{options:g,onChange:ee,onFocus:h,visibleOptionCount:Math.min(10,g.length),isDisabled:n,onUpFromFirstItem:r})})]})}var q,J,Re=e((()=>{u(),q=t(u(),1),_(),U(),k(),J=b()}));function ze({directoryPath:e,onRemove:t,onCancel:n,permissionContext:r,setPermissionContext:o}){let s=(0,Be.useCallback)(()=>{o(w(r,{type:`removeDirectories`,directories:[e],destination:`session`})),t()},[e,r,o,t]),c=(0,Be.useCallback)(e=>{e===`yes`?s():n()},[s,n]);return(0,Y.jsxs)(y,{title:`Remove directory from workspace?`,onCancel:n,color:`error`,children:[(0,Y.jsx)(i,{marginX:2,flexDirection:`column`,children:(0,Y.jsx)(a,{bold:!0,children:e})}),(0,Y.jsx)(a,{children:`Claude Code will no longer have access to files in this directory.`}),(0,Y.jsx)(O,{onChange:c,onCancel:n,options:[{label:`Yes`,value:`yes`},{label:`No`,value:`no`}]})]})}var Be,Y,Ve=e((()=>{u(),Be=t(u(),1),k(),_(),S(),Y=b()}));function He({onExit:e,toolPermissionContext:t,onRequestAddDirectory:n,onRequestRemoveDirectory:o,onHeaderFocusChange:s}){let{headerFocused:l,focusHeader:u}=c();(0,X.useEffect)(()=>{s?.(l)},[l,s]);let d=Ue.useMemo(()=>Array.from(t.additionalWorkingDirectories.keys()).map(e=>({path:e,isCurrent:!1,isDeletable:!0})),[t.additionalWorkingDirectories]),f=(0,X.useCallback)(e=>{if(e===`add-directory`){n();return}let t=d.find(t=>t.path===e);t&&t.isDeletable&&o(t.path)},[d,n,o]),p=(0,X.useCallback)(()=>e(`Workspace dialog dismissed`,{display:`system`}),[e]),m=Ue.useMemo(()=>{let e=d.map(e=>({label:e.path,value:e.path}));return e.push({label:`Add directory${r.ellipsis}`,value:`add-directory`}),e},[d]);return(0,Z.jsxs)(i,{flexDirection:`column`,marginBottom:1,children:[(0,Z.jsxs)(i,{flexDirection:`row`,marginTop:1,marginLeft:2,gap:1,children:[(0,Z.jsx)(a,{children:`- ${x()}`}),(0,Z.jsx)(a,{dimColor:!0,children:`(Original working directory)`})]}),(0,Z.jsx)(O,{options:m,onChange:f,onCancel:p,visibleOptionCount:Math.min(10,m.length),onUpFromFirstItem:u,isDisabled:l})]})}var Ue,X,Z,We=e((()=>{n(),Ue=t(u(),1),X=t(u(),1),re(),k(),_(),Z=b()}));function Ge({rule:e}){return(0,$.jsx)(a,{dimColor:!0,children:`From ${E(e.source)}`})}function Ke(e){switch(e){case`allow`:return`allowed`;case`deny`:return`denied`;case`ask`:return`ask`}}function qe({rule:e,onDelete:t,onCancel:n}){let r=ve();o(`confirm:no`,n,{context:`Confirmation`});let s=(0,$.jsxs)(i,{flexDirection:`column`,marginX:2,children:[(0,$.jsx)(a,{bold:!0,children:L(e.ruleValue)}),(0,$.jsx)(Oe,{ruleValue:e.ruleValue}),(0,$.jsx)(Ge,{rule:e})]}),c=(0,$.jsx)(i,{marginLeft:3,children:r.pending?(0,$.jsxs)(a,{dimColor:!0,children:[`Press `,r.keyName,` again to exit`]}):(0,$.jsx)(a,{dimColor:!0,children:`Esc to cancel`})});return e.source===`policySettings`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(i,{flexDirection:`column`,gap:1,borderStyle:`round`,paddingLeft:1,paddingRight:1,borderColor:`permission`,children:[(0,$.jsx)(a,{bold:!0,color:`permission`,children:`Rule details`}),s,(0,$.jsxs)(a,{italic:!0,children:[`This rule is configured by managed settings and cannot be modified.`,`
|
|
2
|
+
`,`Contact your system administrator for more information.`]})]}),c]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(i,{flexDirection:`column`,gap:1,borderStyle:`round`,paddingLeft:1,paddingRight:1,borderColor:`error`,children:[(0,$.jsxs)(a,{bold:!0,color:`error`,children:[`Delete `,Ke(e.ruleBehavior),` tool?`]}),s,(0,$.jsx)(a,{children:`Are you sure you want to delete this permission rule?`}),(0,$.jsx)(O,{onChange:e=>e===`yes`?t():n(),onCancel:n,options:[{label:`Yes`,value:`yes`},{label:`No`,value:`no`}]})]}),c]})}function Je(e){let{options:t,searchQuery:n,isSearchMode:r,isFocused:a,onSelect:o,onCancel:s,lastFocusedRuleKey:l,cursorOffset:u,onHeaderFocusChange:d}=e,p=ee(),{headerFocused:m,focusHeader:h,blurHeader:g}=c();return(0,Q.useEffect)(()=>{r&&m&&g()},[r,m,g]),(0,Q.useEffect)(()=>{d?.(m)},[m,d]),(0,$.jsxs)(i,{flexDirection:`column`,children:[(0,$.jsx)(i,{marginBottom:1,flexDirection:`column`,children:(0,$.jsx)(f,{query:n,isFocused:r&&!m,isTerminalFocused:a,width:p,cursorOffset:u})}),(0,$.jsx)(O,{options:t,onChange:o,onCancel:s,visibleOptionCount:Math.min(10,t.length),isDisabled:r||m,defaultFocusValue:l,onUpFromFirstItem:h})]})}function Ye({tab:e,getRulesOptions:t,handleToolSelect:n,...r}){return(0,$.jsxs)(i,{flexDirection:`column`,flexShrink:e===`allow`?0:void 0,children:[(0,$.jsx)(a,{children:{allow:`Claude Code won't ask before using allowed tools.`,ask:`Claude Code will always ask for confirmation before using these tools.`,deny:`Claude Code will always reject requests to use denied tools.`}[e]}),(0,$.jsx)(Je,{options:t(e,r.searchQuery).options,onSelect:t=>n(t,e),...r})]})}function Xe({onExit:e,initialTab:t,onRetryDenials:n}){let c=De().length>0,l=t??(c?`recent`:`allow`),[u,d]=(0,Q.useState)([]),f=fe(e=>e.toolPermissionContext),p=ue(),ee=s(),h=(0,Q.useRef)({approved:new Set,retry:new Set,denials:[]}),te=(0,Q.useCallback)(e=>{h.current=e},[]),[_,y]=(0,Q.useState)(),[b,re]=(0,Q.useState)(),[x,S]=(0,Q.useState)(null),[C,T]=(0,Q.useState)(null),[E,D]=(0,Q.useState)(!1),[O,k]=(0,Q.useState)(null),[A,j]=(0,Q.useState)(!1),[M,le]=(0,Q.useState)(!0),N=(0,Q.useCallback)(e=>{le(e)},[]),de=(0,Q.useMemo)(()=>{let e=new Map;return se(f).forEach(t=>{e.set(I(t),t)}),e},[f]),P=(0,Q.useMemo)(()=>{let e=new Map;return oe(f).forEach(t=>{e.set(I(t),t)}),e},[f]),pe=(0,Q.useMemo)(()=>{let e=new Map;return ae(f).forEach(t=>{e.set(I(t),t)}),e},[f]),F=(0,Q.useCallback)((e,t=``)=>{let n=(()=>{switch(e){case`allow`:return de;case`deny`:return P;case`ask`:return pe;case`workspace`:case`recent`:return new Map}})(),i=[];e!==`workspace`&&e!==`recent`&&!t&&i.push({label:`Add a new rule${r.ellipsis}`,value:`add-new-rule`});let a=Array.from(n.keys()).sort((e,t)=>{let r=n.get(e),i=n.get(t);if(r&&i){let e=L(r.ruleValue).toLowerCase(),t=L(i.ruleValue).toLowerCase();return e.localeCompare(t)}return 0}),o=t.toLowerCase();for(let e of a){let r=n.get(e);if(r){let n=L(r.ruleValue);if(t&&!n.toLowerCase().includes(o))continue;i.push({label:n,value:e})}}return{options:i,rulesByKey:n}},[de,P,pe]),R=ve(),z=!_&&!x&&!C&&!E&&!O,{query:me,setQuery:B,cursorOffset:V}=Ce({isActive:z&&A,onExit:()=>{j(!1)}}),he=(0,Q.useCallback)(e=>{z&&(A||e.ctrl||e.meta||(e.key===`/`?(e.preventDefault(),j(!0),B(``)):e.key.length===1&&e.key!==`j`&&e.key!==`k`&&e.key!==`m`&&e.key!==`i`&&e.key!==`r`&&e.key!==` `&&(e.preventDefault(),j(!0),B(e.key))))},[z,A,B]),ge=(0,Q.useCallback)((e,t)=>{let{rulesByKey:n}=F(t);if(e===`add-new-rule`){S(t);return}else{y(n.get(e));return}},[F]),_e=(0,Q.useCallback)(()=>{S(null)},[]),H=(0,Q.useCallback)((e,t)=>{T({ruleValue:e,ruleBehavior:t}),S(null)},[]),ye=(0,Q.useCallback)((e,t)=>{T(null);for(let t of e)d(e=>[...e,`Added ${t.ruleBehavior} rule ${v.bold(L(t.ruleValue))}`]);if(t&&t.length>0)for(let e of t){let t=e.shadowType===`deny`?`blocked`:`shadowed`;d(n=>[...n,v.yellow(`${r.warning} Warning: ${L(e.rule.ruleValue)} is ${t}`),v.dim(` ${e.reason}`),v.dim(` Fix: ${e.fix}`)])}},[]),be=(0,Q.useCallback)(()=>{T(null)},[]),Se=(0,Q.useCallback)(()=>D(!0),[]),we=(0,Q.useCallback)(e=>k(e),[]),Te=(0,Q.useCallback)(()=>{let t=h.current,r=e=>Array.from(e).map(e=>t.denials[e]).filter(e=>e!==void 0),i=r(t.retry);if(i.length>0){let t=i.map(e=>e.display);n?.(t),e(void 0,{shouldQuery:!0,metaMessages:[`Permission granted for: ${t.join(`, `)}. You may now retry ${t.length===1?`this command`:`these commands`} if you would like.`]});return}let a=r(t.approved);a.length>0||u.length>0?e([...a.length>0?[`Approved ${a.map(e=>v.bold(e.display)).join(`, `)}`]:[],...u].join(`
|
|
3
|
+
`)):e(`Permissions dialog dismissed`,{display:`system`})},[u,e,n]);o(`confirm:no`,Te,{context:`Settings`,isActive:z&&!A});let Ee=()=>{if(!_)return;let{options:e}=F(_.ruleBehavior),t=I(_),n=e.filter(e=>e.value!==`add-new-rule`).map(e=>e.value),r=n.indexOf(t),i;r!==-1&&(r<n.length-1?i=n[r+1]:r>0&&(i=n[r-1])),re(i),ie({rule:_,initialContext:f,setToolPermissionContext(e){p(t=>({...t,toolPermissionContext:e}))}}),d(e=>[...e,`Deleted ${_.ruleBehavior} rule ${v.bold(L(_.ruleValue))}`]),y(void 0)};if(_)return(0,$.jsx)(qe,{rule:_,onDelete:Ee,onCancel:()=>y(void 0)});if(x&&x!==`workspace`&&x!==`recent`)return(0,$.jsx)(Pe,{onCancel:_e,onSubmit:H,ruleBehavior:x});if(C)return(0,$.jsx)(je,{onAddRules:ye,onCancel:be,ruleValues:[C.ruleValue],ruleBehavior:C.ruleBehavior,initialContext:f,setToolPermissionContext:e=>{p(t=>({...t,toolPermissionContext:e}))}});if(E)return(0,$.jsx)(xe,{onAddDirectory:(e,t)=>{let n={type:`addDirectories`,directories:[e],destination:t?`localSettings`:`session`},r=w(f,n);p(e=>({...e,toolPermissionContext:r})),t&&ce(n),d(n=>[...n,`Added directory ${v.bold(e)} to workspace${t?` and saved to local settings`:` for this session`}`]),D(!1)},onCancel:()=>D(!1),permissionContext:f});if(O)return(0,$.jsx)(ze,{directoryPath:O,onRemove:()=>{d(e=>[...e,`Removed directory ${v.bold(O)} from workspace`]),k(null)},onCancel:()=>k(null),permissionContext:f,setPermissionContext:e=>{p(t=>({...t,toolPermissionContext:e}))}});let U={searchQuery:me,isSearchMode:A,isFocused:ee,onCancel:Te,lastFocusedRuleKey:b,cursorOffset:V,getRulesOptions:F,handleToolSelect:ge,onHeaderFocusChange:N};return(0,$.jsx)(i,{flexDirection:`column`,onKeyDown:he,children:(0,$.jsxs)(ne,{color:`permission`,children:[(0,$.jsxs)(g,{title:`Permissions:`,color:`permission`,defaultTab:l,hidden:!!_||!!x||!!C||E||!!O,initialHeaderFocused:!c,navFromContent:!A,children:[(0,$.jsx)(m,{id:`recent`,title:`Recently denied`,children:(0,$.jsx)(Le,{onHeaderFocusChange:N,onStateChange:te})}),(0,$.jsx)(m,{id:`allow`,title:`Allow`,children:(0,$.jsx)(Ye,{tab:`allow`,...U})}),(0,$.jsx)(m,{id:`ask`,title:`Ask`,children:(0,$.jsx)(Ye,{tab:`ask`,...U})}),(0,$.jsx)(m,{id:`deny`,title:`Deny`,children:(0,$.jsx)(Ye,{tab:`deny`,...U})}),(0,$.jsx)(m,{id:`workspace`,title:`Workspace`,children:(0,$.jsxs)(i,{flexDirection:`column`,children:[(0,$.jsx)(a,{children:`Claude Code can read files in the workspace, and make edits when auto-accept edits is on.`}),(0,$.jsx)(He,{onExit:e,toolPermissionContext:f,onRequestAddDirectory:Se,onRequestRemoveDirectory:we,onHeaderFocusChange:N})]})})]}),(0,$.jsx)(i,{marginTop:1,paddingLeft:1,children:(0,$.jsx)(a,{dimColor:!0,children:R.pending?(0,$.jsxs)($.Fragment,{children:[`Press `,R.keyName,` again to exit`]}):M?(0,$.jsx)($.Fragment,{children:`←/→ tab switch · ↓ return · Esc cancel`}):A?(0,$.jsx)($.Fragment,{children:`Type to filter · Enter/↓ select · ↑ tabs · Esc clear`}):c&&l===`recent`?(0,$.jsx)($.Fragment,{children:`Enter approve · r retry · ↑↓ navigate · ←/→ switch · Esc cancel`}):(0,$.jsx)($.Fragment,{children:`↑↓ navigate · Enter select · Type to search · ←/→ switch · Esc cancel`})})})]})})}var Q,$,Ze=e((()=>{l(),n(),u(),Q=t(u(),1),N(),S(),k(),ye(),we(),_(),H(),U(),R(),C(),F(),Se(),Ne(),be(),ke(),Ie(),Re(),Ve(),We(),$=b()})),Qe,$e;e((()=>{Ze(),pe(),Qe=b(),$e=async(e,t)=>(0,Qe.jsx)(Xe,{onExit:e,onRetryDenials:e=>{t.setMessages(t=>[...t,j(e)])}})}))();export{$e as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t,t as n}from"./permissions-Cn_6f8CB.js";e();export{n as EXTERNAL_PERMISSION_MODES,t as PERMISSION_MODES};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";var t,n,r,i=e((()=>{t=[`acceptEdits`,`bypassPermissions`,`default`,`dontAsk`,`plan`],n=[...t,`auto`],r=n}));export{i,n,r,t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{c as r,l as i,n as a,o}from"./envUtils-DSxRz_kt.js";import{n as s,t as c}from"./axios-DaWTGg7G.js";import{IE as l,NE as u,OS as ee}from"./loadAgentsDir-nzr38hai.js";import{n as te}from"./cwd-BuJhkTrc.js";import{A as ne,D as d,E as f,G as p,J as re,K as ie,M as ae,O as oe,U as m,_ as h,h as g,l as _,p as v}from"./debug-IKW-jE7K.js";import{A as y,Jt as se,M as ce,Qt as le,Zt as ue,en as de,g as fe,n as pe}from"./settings-5PQdphqC.js";import{a as me,c as b,g as x,i as he}from"./config-C7YHKCPV.js";import{c as ge,n as S,o as _e,r as C,t as w}from"./execFileNoThrow-COKYqVQj.js";import{o as T,s as E}from"./log-B3eB4EFv.js";import{n as ve,t as ye}from"./which-BBCjXfI2.js";import{i as D,o as O}from"./platform-EtecGacO.js";import{n as k,t as be}from"./bundledMode--fG1S62b.js";import{i as xe,r as Se}from"./genericProcessUtils-F1Qcb1sO.js";import{a as Ce,i as we}from"./ripgrep-BvDwiKJ3.js";import{n as Te,r as Ee}from"./semver-BMRJYn3q.js";import{homedir as A}from"os";import{basename as De,delimiter as Oe,join as j,posix as M,win32 as N}from"path";import{constants as ke}from"fs";import{access as P,open as Ae,readFile as F,realpath as I,stat as je}from"fs/promises";function L(){return j(a(),`local`)}function Me(){return j(L(),`claude`)}function Ne(){return(process.argv[1]||``).includes(`/.claude/local/node_modules/`)}async function R(){try{return await P(j(L(),`node_modules`,`.bin`,`claude`)),!0}catch{return!1}}function z(){let e=process.env.SHELL||``;return e.includes(`zsh`)?`zsh`:e.includes(`bash`)?`bash`:e.includes(`fish`)?`fish`:`unknown`}var B=e((()=>{x(),o(),m(),C(),h(),T(),f()}));function V(e){let t=e?.homedir??A();return{zsh:j((e?.env??process.env).ZDOTDIR||t,`.zshrc`),bash:j(t,`.bashrc`),fish:j(t,`.config/fish/config.fish`)}}function Pe(e){let t=!1;return{filtered:e.filter(e=>{if(H.test(e)){let n=e.match(/alias\s+claude\s*=\s*["']([^"']+)["']/);if(n||(n=e.match(/alias\s+claude\s*=\s*([^#\n]+)/)),n&&n[1]&&n[1].trim()===Me())return t=!0,!1}return!0}),hadAlias:t}}async function Fe(e){try{return(await F(e,{encoding:`utf8`})).split(`
|
|
2
|
+
`)}catch(e){if(ie(e))return null;throw e}}async function Ie(e,t){let n=await Ae(e,`w`);try{await n.writeFile(t.join(`
|
|
3
|
+
`),{encoding:`utf8`}),await n.datasync()}finally{await n.close()}}async function Le(e){let t=V(e);for(let e of Object.values(t)){let t=await Fe(e);if(t){for(let e of t)if(H.test(e)){let t=e.match(/alias\s+claude=["']?([^"'\s]+)/);if(t&&t[1])return t[1]}}}return null}async function Re(e){let t=await Le(e);if(!t)return null;let n=e?.homedir??A(),r=t.startsWith(`~`)?t.replace(`~`,n):t;try{let e=await je(r);if(e.isFile()||e.isSymbolicLink())return t}catch{}return null}var H,U=e((()=>{m(),B(),H=/^\s*alias\s+claude\s*=/}));async function ze(){let e=await Be();return process.env.USER_TYPE===`ant`?e.ant||void 0:e.external||void 0}async function Be(){try{return{}}catch(e){return E(e),{}}}function Ve(e){let t=pe()?.minimumVersion;if(!t)return!1;let n=!Te(e,t);return n&&v(`Skipping update to ${e} - below minimumVersion ${t}`),n}async function He(){let e=se.isRunningWithBun(),t=null;return t=e?await S(`bun`,[`pm`,`bin`,`-g`],{cwd:A()}):await S(`npm`,[`-g`,`config`,`get`,`prefix`],{cwd:A()}),t.code===0?t.stdout.trim():(E(Error(`Failed to check ${e?`bun`:`npm`} permissions`)),null)}async function Ue(){try{let e=await He();if(!e)return{hasPermissions:!1,npmPrefix:null};try{return await P(e,ke.W_OK),{hasPermissions:!0,npmPrefix:e}}catch{return E(new Je(`Insufficient permissions for global npm install.`)),{hasPermissions:!1,npmPrefix:e}}}catch(e){return E(e),{hasPermissions:!1,npmPrefix:null}}}async function We(){let e=await S(`npm`,[`view`,``,`dist-tags`,`--json`,`--prefer-online`],{abortSignal:AbortSignal.timeout(5e3),cwd:A()});if(e.code!==0)return v(`npm view dist-tags failed with code ${e.code}`),{latest:null,stable:null};try{let t=d(e.stdout.trim());return{latest:typeof t.latest==`string`?t.latest:null,stable:typeof t.stable==`string`?t.stable:null}}catch(e){return v(`Failed to parse dist-tags: ${e}`),{latest:null,stable:null}}}async function Ge(e){try{return(await s.get(`${qe}/${e}`,{timeout:5e3,responseType:`text`})).data.trim()}catch(t){return v(`Failed to fetch ${e} from GCS: ${t}`),null}}async function Ke(){let[e,t]=await Promise.all([Ge(`latest`),Ge(`stable`)]);return{latest:e,stable:t}}var qe,Je,Ye=e((()=>{c(),x(),_(),ue(),o(),m(),C(),h(),ee(),T(),Ee(),fe(),U(),f(),qe=`https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases`,Je=class extends ae{}}));function W(e,t){return t.includes(e.id)||e.idLike.some(e=>t.includes(e))}function Xe(){let e=process.execPath||process.argv[0]||``;return/[/\\]mise[/\\]installs[/\\]/i.test(e)?(v(`Detected mise installation: ${e}`),!0):!1}function Ze(){let e=process.execPath||process.argv[0]||``;return/[/\\]\.?asdf[/\\]installs[/\\]/i.test(e)?(v(`Detected asdf installation: ${e}`),!0):!1}function G(){let e=D();if(e!==`macos`&&e!==`linux`&&e!==`wsl`)return!1;let t=process.execPath||process.argv[0]||``;return t.includes(`/Caskroom/`)?(v(`Detected Homebrew cask installation: ${t}`),!0):!1}function Qe(){if(D()!==`windows`)return!1;let e=process.execPath||process.argv[0]||``;for(let t of[/Microsoft[/\\]WinGet[/\\]Packages/i,/Microsoft[/\\]WinGet[/\\]Links/i])if(t.test(e))return v(`Detected winget installation: ${e}`),!0;return!1}var K,q,J,Y,X,$e,et=e((()=>{n(),_(),C(),O(),K=t(async()=>{try{let e=await F(`/etc/os-release`,`utf8`),t=e.match(/^ID=["']?(\S+?)["']?\s*$/m),n=e.match(/^ID_LIKE=["']?(.+?)["']?\s*$/m);return{id:t?.[1]??``,idLike:n?.[1]?.split(` `)??[]}}catch{return null}}),q=t(async()=>{if(D()!==`linux`)return!1;let e=await K();if(e&&!W(e,[`arch`]))return!1;let t=await w(`pacman`,[`-Qo`,process.execPath||process.argv[0]||``],{timeout:5e3,useCwd:!1});return t.code===0&&t.stdout?(v(`Detected pacman installation: ${t.stdout.trim()}`),!0):!1}),J=t(async()=>{if(D()!==`linux`)return!1;let e=await K();if(e&&!W(e,[`debian`]))return!1;let t=await w(`dpkg`,[`-S`,process.execPath||process.argv[0]||``],{timeout:5e3,useCwd:!1});return t.code===0&&t.stdout?(v(`Detected deb installation: ${t.stdout.trim()}`),!0):!1}),Y=t(async()=>{if(D()!==`linux`)return!1;let e=await K();if(e&&!W(e,[`fedora`,`rhel`,`suse`]))return!1;let t=await w(`rpm`,[`-qf`,process.execPath||process.argv[0]||``],{timeout:5e3,useCwd:!1});return t.code===0&&t.stdout?(v(`Detected rpm installation: ${t.stdout.trim()}`),!0):!1}),X=t(async()=>{if(D()!==`linux`)return!1;let e=await K();if(e&&!W(e,[`alpine`]))return!1;let t=await w(`apk`,[`info`,`--who-owns`,process.execPath||process.argv[0]||``],{timeout:5e3,useCwd:!1});return t.code===0&&t.stdout?(v(`Detected apk installation: ${t.stdout.trim()}`),!0):!1}),$e=t(async()=>G()?`homebrew`:Qe()?`winget`:Xe()?`mise`:Ze()?`asdf`:await q()?`pacman`:await X()?`apk`:await J()?`deb`:await Y()?`rpm`:`unknown`)}));function tt(){let e=process.argv[1]||``,t=process.execPath||process.argv[0]||``;return D()===`windows`&&(e=e.split(N.sep).join(M.sep),t=t.split(N.sep).join(M.sep)),[e,t]}async function nt(){let[e]=tt();if(k())return G()||Qe()||Xe()||Ze()||await q()||await J()||await Y()||await X()?`package-manager`:`native`;if(Ne())return`npm-local`;if([`/usr/local/lib/node_modules`,`/usr/lib/node_modules`,`/opt/homebrew/lib/node_modules`,`/opt/homebrew/bin`,`/usr/local/bin`,`/.nvm/versions/node/`].some(t=>e.includes(t))||e.includes(`/npm/`)||e.includes(`/nvm/`))return`npm-global`;let t=await _e(`npm config get prefix`,{shell:!0,reject:!1}),n=t.exitCode===0?t.stdout.trim():null;return n&&e.startsWith(n)?`npm-global`:`unknown`}async function rt(){if(k()){try{return await I(process.execPath)}catch{}try{let e=await ve(`claude`);if(e)return e}catch{}try{return await g().stat(j(A(),`.local/bin/claude`)),j(A(),`.local/bin/claude`)}catch{}return`native`}try{return process.argv[0]||`unknown`}catch{return`unknown`}}function it(){try{return k()?process.execPath||`unknown`:process.argv[1]||`unknown`}catch{return`unknown`}}async function at(){let e=g(),t=[],n=j(A(),`.claude`,`local`);await R()&&t.push({type:`npm-local`,path:n});let r=[`@anthropic-ai/claude-code`],i=await w(`npm`,[`-g`,`config`,`get`,`prefix`]);if(i.code===0&&i.stdout){let n=i.stdout.trim(),a=D()===`windows`,o=a?j(n,`claude`):j(n,`bin`,`claude`),s=!1;try{await e.stat(o),s=!0}catch{}if(s){let e=!1;try{(await I(o)).includes(`/Caskroom/`)&&(e=G())}catch{}e||t.push({type:`npm-global`,path:o})}else for(let i of r){let r=a?j(n,`node_modules`,i):j(n,`lib`,`node_modules`,i);try{await e.stat(r),t.push({type:`npm-global-orphan`,path:r})}catch{}}}let a=j(A(),`.local`,`bin`,`claude`);try{await e.stat(a),t.push({type:`native`,path:a})}catch{}if(b().installMethod===`native`){let n=j(A(),`.local`,`share`,`claude`);try{await e.stat(n),t.some(e=>e.type===`native`)||t.push({type:`native`,path:n})}catch{}}return t}async function ot(e){let t=[];try{let e=d(await F(j(le(),`managed-settings.json`),`utf-8`)),n=e&&typeof e==`object`?e.strictPluginOnlyCustomization:void 0;if(n!==void 0&&typeof n!=`boolean`)if(!Array.isArray(n))t.push({issue:`managed-settings.json: strictPluginOnlyCustomization has an invalid value (expected true or an array, got ${typeof n})`,fix:`The field is silently ignored (schema .catch rescues it). Set it to true, or an array of: ${y.join(`, `)}.`});else{let e=n.filter(e=>typeof e==`string`&&!y.includes(e));e.length>0&&t.push({issue:`managed-settings.json: strictPluginOnlyCustomization has ${e.length} value(s) this client doesn't recognize: ${e.map(String).join(`, `)}`,fix:`These are silently ignored (forwards-compat). Known surfaces for this version: ${y.join(`, `)}. Either remove them, or this client is older than the managed-settings intended.`})}}catch{}let n=b();if(e===`development`)return t;if(e===`native`){let e=(process.env.PATH||``).split(Oe),n=j(A(),`.local`,`bin`),r=n;if(D()===`windows`&&(r=n.split(N.sep).join(M.sep)),!e.some(e=>{let t=e;D()===`windows`&&(t=e.split(N.sep).join(M.sep));let n=t.replace(/\/+$/,``),i=e.replace(/[/\\]+$/,``);return n===r||i===`~/.local/bin`||i===`$HOME/.local/bin`}))if(D()===`windows`){let e=n.split(M.sep).join(N.sep);t.push({issue:`Native installation exists but ${e} is not in your PATH`,fix:`Add it by opening: System Properties → Environment Variables → Edit User PATH → New → Add the path above. Then restart your terminal.`})}else{let e=z(),n=V()[e],r=n?n.replace(A(),`~`):`your shell config file`;t.push({issue:`Native installation exists but ~/.local/bin is not in your PATH`,fix:`Run: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ${r} then open a new terminal or run: source ${r}`})}}i(process.env.DISABLE_INSTALLATION_CHECKS)||(e===`npm-local`&&n.installMethod!==`local`&&t.push({issue:`Running from local installation but config install method is '${n.installMethod}'`,fix:`Consider using native installation: claude install`}),e===`native`&&n.installMethod!==`native`&&t.push({issue:`Running native installation but config install method is '${n.installMethod}'`,fix:`Run claude install to update configuration`})),e===`npm-global`&&await R()&&t.push({issue:`Local installation exists but not being used`,fix:`Consider using native installation: claude install`});let r=await Le(),a=await Re();return e===`npm-local`&&!await ve(`claude`)&&!a&&(r?t.push({issue:`Local installation not accessible`,fix:`Alias exists but points to invalid target: ${r}. Update alias: alias claude="~/.claude/local/claude"`}):t.push({issue:`Local installation not accessible`,fix:`Create alias: alias claude="~/.claude/local/claude"`})),t}function st(){if(D()!==`linux`)return[];let e=[],t=u.getLinuxGlobPatternWarnings();if(t.length>0){let n=t.slice(0,3).join(`, `),r=t.length-3,i=r>0?`${n} (${r} more)`:n;e.push({issue:`Glob patterns in sandbox permission rules are not fully supported on Linux`,fix:`Found ${t.length} pattern(s): ${i}. On Linux, glob patterns in Edit/Read rules will be ignored.`})}return e}async function ct(){let e=await nt(),t=typeof MACRO<`u`?`0.0.1`:`unknown`,n=await rt(),r=it(),i=await at(),a=await ot(e);if(a.push(...st()),e===`native`){let e=i.filter(e=>e.type===`npm-global`||e.type===`npm-global-orphan`||e.type===`npm-local`),t=D()===`windows`;for(let n of e)n.type===`npm-global`?a.push({issue:`Leftover npm global installation at ${n.path}`,fix:`Run: npm -g uninstall @anthropic-ai/claude-code`}):n.type===`npm-global-orphan`?a.push({issue:`Orphaned npm global package at ${n.path}`,fix:t?`Run: rmdir /s /q "${n.path}"`:`Run: rm -rf ${n.path}`}):n.type===`npm-local`&&a.push({issue:`Leftover npm local installation at ${n.path}`,fix:t?`Run: rmdir /s /q "${n.path}"`:`Run: rm -rf ${n.path}`})}let o=b().installMethod||`not set`,s=null;e===`npm-global`&&(s=(await Ue()).hasPermissions,!s&&!me()&&a.push({issue:`Insufficient permissions for auto-updates`,fix:"Do one of: (1) Re-install node without sudo, or (2) Use `claude install` for native installation"}));let c=we(),l={working:c.working??!0,mode:c.mode,systemPath:c.mode===`system`?c.path:null,note:c.note??null},u=e===`package-manager`?await $e():void 0;return{installationType:e,version:t,installationPath:n,invokedBinary:r,configInstallMethod:o,autoUpdates:(()=>{let e=me();return e?`disabled (${he(e)})`:`enabled`})(),hasUpdatePermissions:s,multipleInstallations:i,warnings:a,packageManager:u,ripgrepStatus:l}}var lt=e((()=>{ge(),Ye(),be(),x(),te(),o(),C(),h(),B(),et(),O(),Ce(),l(),de(),ce(),U(),f(),ye()}));function ut(){let e=process.env.ENABLE_PID_BASED_VERSION_LOCKING;return i(e)?!0:(r(e),!1)}function Z(e){if(e<=1)return!1;try{return process.kill(e,0),!0}catch{return!1}}function dt(e,t){if(!Z(e))return!1;if(e===process.pid)return!0;try{let n=Se(e);if(!n)return!0;let r=n.toLowerCase(),i=t.toLowerCase();return r.includes(`claude`)||r.includes(i)}catch{return!0}}function Q(e){let t=g();try{let n=t.readFileSync(e,{encoding:`utf8`});if(!n||n.trim()===``)return null;let r=d(n);return typeof r.pid!=`number`||!r.version||!r.execPath?null:r}catch{return null}}function $(e){let t=Q(e);if(!t)return!1;let{pid:n,execPath:r}=t;if(!Z(n))return!1;if(!dt(n,r))return v(`Lock PID ${n} is running but does not appear to be Claude - treating as stale`),!1;let i=g();try{let t=i.statSync(e);if(Date.now()-t.mtimeMs>vt&&!Z(n))return!1}catch{}return!0}function ft(e,t){let n=g(),r=`${e}.tmp.${process.pid}.${Date.now()}`;try{ne(r,oe(t,null,2),{encoding:`utf8`,flush:!0}),n.renameSync(r,e)}catch(e){try{n.unlinkSync(r)}catch{}throw e}}async function pt(e,t){let n=g(),r=De(e);if($(t))return v(`Cannot acquire lock for ${r} - held by PID ${Q(t)?.pid}`),null;let i={pid:process.pid,version:r,execPath:process.execPath,acquiredAt:Date.now()};try{return ft(t,i),Q(t)?.pid===process.pid?(v(`Acquired PID lock for ${r} (PID ${process.pid})`),()=>{try{Q(t)?.pid===process.pid&&(n.unlinkSync(t),v(`Released PID lock for ${r}`))}catch(e){v(`Failed to release lock for ${r}: ${e}`)}}):null}catch(e){return v(`Failed to acquire lock for ${r}: ${e}`),null}}async function mt(e,t){let n=await pt(e,t);if(!n)return!1;let r=()=>{try{n()}catch{}};return process.on(`exit`,r),process.on(`SIGINT`,r),process.on(`SIGTERM`,r),!0}async function ht(e,t,n){let r=await pt(e,t);if(!r)return!1;try{return await n(),!0}finally{r()}}function gt(e){let t=g(),n=[];try{let r=t.readdirStringSync(e).filter(e=>e.endsWith(`.lock`));for(let t of r){let r=j(e,t),i=Q(r);i&&n.push({version:i.version,pid:i.pid,isProcessRunning:Z(i.pid),execPath:i.execPath,acquiredAt:new Date(i.acquiredAt),lockFilePath:r})}}catch(e){if(p(e))return n;E(re(e))}return n}function _t(e){let t=g(),n=0;try{let r=t.readdirStringSync(e).filter(e=>e.endsWith(`.lock`));for(let i of r){let r=j(e,i);try{t.lstatSync(r).isDirectory()?(t.rmSync(r,{recursive:!0,force:!0}),n++,v(`Cleaned up legacy directory lock: ${i}`)):$(r)||(t.unlinkSync(r),n++,v(`Cleaned up stale lock: ${i}`))}catch{}}}catch(e){if(p(e))return 0;E(re(e))}return n}var vt,yt=e((()=>{_(),o(),m(),h(),xe(),T(),f(),vt=7200*1e3}));export{B as C,z as S,Pe as _,$ as a,Fe as b,ht as c,lt as d,Ke as f,Ve as g,Ye as h,yt as i,nt as l,We as m,_t as n,ut as o,ze as p,gt as r,Q as s,mt as t,ct as u,V as v,Ie as x,U as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,o as n}from"./envUtils-DSxRz_kt.js";import{o as r}from"./log-B3eB4EFv.js";import{join as i}from"path";import"fs/promises";import"net";import"events";function a(){return i(t(),`pipes`)}function o(e){return e?.pipeIpc??s}var s,c=e((()=>{n(),r(),s={role:`main`,subIndex:null,displayRole:`main`,serverName:null,attachedBy:null,localIp:null,hostname:null,machineId:null,mac:null,statusVisible:!1,selectorOpen:!1,selectedPipes:[],routeMode:`selected`,slaves:{},discoveredPipes:[]}}));export{a as n,c as r,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,fi as r,t as i}from"./src-CDCSSo0U2.js";import{t as a}from"./jsx-runtime-Bb4Xn-E0.js";import{Yt as o,en as s}from"./state-4KQ3kaqz.js";import{A as c,BC as l,C as u,IC as d,Lg as f,My as p,Og as m,Oy as h,ky as g}from"./loadAgentsDir-nzr38hai.js";import{a as _,i as v,r as y,t as b}from"./promptEditor-foiayhdY.js";import{r as x,t as S}from"./staticRender-BIxpgNUq.js";function C({planContent:e,planPath:r,editorName:i}){return(0,T.jsxs)(t,{flexDirection:`column`,children:[(0,T.jsx)(n,{bold:!0,children:`Current Plan`}),(0,T.jsx)(n,{dimColor:!0,children:r}),(0,T.jsx)(t,{marginTop:1,children:(0,T.jsx)(n,{children:e})}),i&&(0,T.jsxs)(t,{marginTop:1,children:[(0,T.jsx)(n,{dimColor:!0,children:`"/plan open"`}),(0,T.jsx)(n,{dimColor:!0,children:` to edit this plan in `}),(0,T.jsx)(n,{bold:!0,dimColor:!0,children:i})]})]})}async function w(e,t,n){let{getAppState:r,setAppState:i}=t,a=r().toolPermissionContext.mode;if(a!==`plan`){o(a,`plan`),i(e=>({...e,toolPermissionContext:d(c(e.toolPermissionContext),{type:`setMode`,mode:`plan`,destination:`session`})}));let t=n.trim();return t&&t!==`open`?e(`Enabled plan mode`,{shouldQuery:!0}):e(`Enabled plan mode`),null}let s=h(),l=g();if(!s)return e(`Already in plan mode. No plan written yet.`),null;if(n.trim().split(/\s+/)[0]===`open`){let t=await b(l);return t.error?e(`Failed to open plan in editor: ${t.error}`):e(`Opened plan in editor: ${l}`),null}let u=v();return e(await x((0,T.jsx)(C,{planContent:s,planPath:l,editorName:u?f(u):void 0}))),null}var T;e((()=>{r(),s(),i(),_(),m(),l(),u(),p(),y(),S(),T=a()}))();export{w as call};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{_ as r,h as i}from"./debug-IKW-jE7K.js";import{o as a,s as o}from"./log-B3eB4EFv.js";import{release as s}from"os";import{readFile as c,readdir as l}from"fs/promises";async function u(e){let t=new Set;process.env.P4PORT&&t.add(`perforce`);try{let n=e??i().cwd(),r=new Set(await l(n));for(let[e,n]of h)r.has(e)&&t.add(n)}catch{}return[...t]}var d,f,p,m,h,g=e((()=>{n(),r(),a(),d=[`macos`,`wsl`],f=t(()=>{try{if(process.platform===`darwin`)return`macos`;if(process.platform===`win32`)return`windows`;if(process.platform===`linux`){try{let e=i().readFileSync(`/proc/version`,{encoding:`utf8`});if(e.toLowerCase().includes(`microsoft`)||e.toLowerCase().includes(`wsl`))return`wsl`}catch(e){o(e)}return`linux`}return`unknown`}catch(e){return o(e),`unknown`}}),p=t(()=>{if(process.platform===`linux`)try{let e=i().readFileSync(`/proc/version`,{encoding:`utf8`}),t=e.match(/WSL(\d+)/i);return t&&t[1]?t[1]:e.toLowerCase().includes(`microsoft`)?`1`:void 0}catch(e){o(e);return}}),m=t(async()=>{if(process.platform!==`linux`)return;let e={linuxKernel:s()};try{let t=await c(`/etc/os-release`,`utf8`);for(let n of t.split(`
|
|
2
|
+
`)){let t=n.match(/^(ID|VERSION_ID)=(.*)$/);if(t&&t[1]&&t[2]){let n=t[2].replace(/^"|"$/g,``);t[1]===`ID`?e.linuxDistroId=n:e.linuxDistroVersion=n}}}catch{}return e}),h=[[`.git`,`git`],[`.hg`,`mercurial`],[`.svn`,`svn`],[`.p4config`,`perforce`],[`$tf`,`tfs`],[`.tfvc`,`tfs`],[`.jj`,`jujutsu`],[`.sl`,`sapling`]]}));export{p as a,f as i,u as n,g as o,m as r,d as t};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./base64-js-0wLHn8zB.js";var n=e((e=>{function t(e,t,n){if(n===void 0&&(n=Array.prototype),e&&typeof n.find==`function`)return n.find.call(e,t);for(var r=0;r<e.length;r++)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];if(t.call(void 0,i,r,e))return i}}function n(e,t){return t===void 0&&(t=Object),t&&typeof t.freeze==`function`?t.freeze(e):e}function r(e,t){if(typeof e!=`object`||!e)throw TypeError(`target is not an object`);for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}var i=n({HTML:`text/html`,isHTML:function(e){return e===i.HTML},XML_APPLICATION:`application/xml`,XML_TEXT:`text/xml`,XML_XHTML_APPLICATION:`application/xhtml+xml`,XML_SVG_IMAGE:`image/svg+xml`}),a=n({HTML:`http://www.w3.org/1999/xhtml`,isHTML:function(e){return e===a.HTML},SVG:`http://www.w3.org/2000/svg`,XML:`http://www.w3.org/XML/1998/namespace`,XMLNS:`http://www.w3.org/2000/xmlns/`});e.assign=r,e.find=t,e.freeze=n,e.MIME_TYPE=i,e.NAMESPACE=a})),r=e((e=>{var t=n(),r=t.find,i=t.NAMESPACE;function a(e){return e!==``}function o(e){return e?e.split(/[\t\n\f\r ]+/).filter(a):[]}function s(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function c(e){if(!e)return[];var t=o(e);return Object.keys(t.reduce(s,{}))}function l(e){return function(t){return e&&e.indexOf(t)!==-1}}function u(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function d(e,t){var n=e.prototype;if(!(n instanceof t)){function r(){}r.prototype=t.prototype,r=new r,u(n,r),e.prototype=n=r}n.constructor!=e&&(typeof e!=`function`&&console.error(`unknown Class:`+e),n.constructor=e)}var f={},p=f.ELEMENT_NODE=1,m=f.ATTRIBUTE_NODE=2,h=f.TEXT_NODE=3,g=f.CDATA_SECTION_NODE=4,_=f.ENTITY_REFERENCE_NODE=5,v=f.ENTITY_NODE=6,y=f.PROCESSING_INSTRUCTION_NODE=7,b=f.COMMENT_NODE=8,x=f.DOCUMENT_NODE=9,S=f.DOCUMENT_TYPE_NODE=10,C=f.DOCUMENT_FRAGMENT_NODE=11,w=f.NOTATION_NODE=12,T={},E={};T.INDEX_SIZE_ERR=(E[1]=`Index size error`,1),T.DOMSTRING_SIZE_ERR=(E[2]=`DOMString size error`,2);var D=T.HIERARCHY_REQUEST_ERR=(E[3]=`Hierarchy request error`,3);T.WRONG_DOCUMENT_ERR=(E[4]=`Wrong document`,4);var O=T.INVALID_CHARACTER_ERR=(E[5]=`Invalid character`,5);T.NO_DATA_ALLOWED_ERR=(E[6]=`No data allowed`,6),T.NO_MODIFICATION_ALLOWED_ERR=(E[7]=`No modification allowed`,7);var k=T.NOT_FOUND_ERR=(E[8]=`Not found`,8);T.NOT_SUPPORTED_ERR=(E[9]=`Not supported`,9);var A=T.INUSE_ATTRIBUTE_ERR=(E[10]=`Attribute in use`,10),j=T.INVALID_STATE_ERR=(E[11]=`Invalid state`,11);T.SYNTAX_ERR=(E[12]=`Syntax error`,12),T.INVALID_MODIFICATION_ERR=(E[13]=`Invalid modification`,13),T.NAMESPACE_ERR=(E[14]=`Invalid namespace`,14),T.INVALID_ACCESS_ERR=(E[15]=`Invalid access`,15);function M(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,E[e]),this.message=E[e],Error.captureStackTrace&&Error.captureStackTrace(this,M);return n.code=e,t&&(this.message=this.message+`: `+t),n}M.prototype=Error.prototype,u(T,M);function N(){}N.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t,n){for(var r=!!n&&!!n.requireWellFormed,i=[],a=0;a<this.length;a++)Te(this[a],i,e,t,null,r);return i.join(``)},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}};function P(e,t){this._node=e,this._refresh=t,F(this)}function F(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var n=e._refresh(e._node);if(Oe(e,`length`,n.length),!e.$$length||n.length<e.$$length)for(var r=n.length;r in e;r++)Object.prototype.hasOwnProperty.call(e,r)&&delete e[r];u(n,e),e._inc=t}}P.prototype.item=function(e){return F(this),this[e]||null},d(P,N);function I(){}function L(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function R(e,t,n,r){if(r?t[L(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&te(i,e,r),ee(i,e,n))}}function z(e,t,n){var r=L(t,n);if(r>=0){for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var a=e.ownerDocument;a&&(te(a,e,n),n.ownerElement=null)}}else throw new M(k,Error(e.tagName+`@`+n))}I.prototype={length:0,item:N.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new M(A);var n=this.getNamedItem(e.nodeName);return R(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t=e.ownerElement,n;if(t&&t!=this._ownerElement)throw new M(A);return n=this.getNamedItemNS(e.namespaceURI,e.localName),R(this._ownerElement,this,e,n),n},removeNamedItem:function(e){var t=this.getNamedItem(e);return z(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return z(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}};function B(){}B.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,n){var r=new G;if(r.implementation=this,r.childNodes=new N,r.doctype=n||null,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new $;return r.name=e,r.nodeName=e,r.publicId=t||``,r.systemId=n||``,r}};function V(){}V.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return J(this,e,t)},replaceChild:function(e,t){J(this,e,t,de),t&&this.removeChild(t)},removeChild:function(e){return re(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(e){return De(this.ownerDocument||this,this,e)},normalize:function(){W(this,null,{enter:function(e){for(var t=e.firstChild;t;){var n=t.nextSibling;n!==null&&n.nodeType===h&&t.nodeType===h?(e.removeChild(n),t.appendData(n.data)):t=n}return!0}})},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&n[r]===e)return r}t=t.nodeType==m?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&Object.prototype.hasOwnProperty.call(n,e))return n[e];t=t.nodeType==m?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return this.lookupPrefix(e)==null}};function H(e){return e==`<`&&`<`||e==`>`&&`>`||e==`&`&&`&`||e==`"`&&`"`||`&#`+e.charCodeAt()+`;`}u(f,V),u(f,V.prototype);function U(e,t){return W(e,null,{enter:function(e){return!t(e)||W.STOP}})===W.STOP}function W(e,t,n){for(var r=[{node:e,context:t,phase:W.ENTER}];r.length>0;){var i=r.pop();if(i.phase===W.ENTER){var a=n.enter(i.node,i.context);if(a===W.STOP)return W.STOP;if(r.push({node:i.node,context:a,phase:W.EXIT}),a==null)continue;for(var o=i.node.lastChild;o;)r.push({node:o,context:a,phase:W.ENTER}),o=o.previousSibling}else n.exit&&n.exit(i.node,i.context)}}W.STOP=Symbol(`walkDOM.STOP`),W.ENTER=0,W.EXIT=1;function G(){this.ownerDocument=this}function ee(e,t,n){e&&e._inc++,n.namespaceURI===i.XMLNS&&(t._nsMap[n.prefix?n.localName:``]=n.value)}function te(e,t,n,r){e&&e._inc++,n.namespaceURI===i.XMLNS&&delete t._nsMap[n.prefix?n.localName:``]}function ne(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a,delete r[r.length]}}}function re(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,ne(e.ownerDocument,e),t}function ie(e){return e&&(e.nodeType===V.DOCUMENT_NODE||e.nodeType===V.DOCUMENT_FRAGMENT_NODE||e.nodeType===V.ELEMENT_NODE)}function ae(e){return e&&(q(e)||oe(e)||K(e)||e.nodeType===V.DOCUMENT_FRAGMENT_NODE||e.nodeType===V.COMMENT_NODE||e.nodeType===V.PROCESSING_INSTRUCTION_NODE)}function K(e){return e&&e.nodeType===V.DOCUMENT_TYPE_NODE}function q(e){return e&&e.nodeType===V.ELEMENT_NODE}function oe(e){return e&&e.nodeType===V.TEXT_NODE}function se(e,t){var n=e.childNodes||[];if(r(n,q)||K(t))return!1;var i=r(n,K);return!(t&&i&&n.indexOf(i)>n.indexOf(t))}function ce(e,t){var n=e.childNodes||[];function i(e){return q(e)&&e!==t}if(r(n,i))return!1;var a=r(n,K);return!(t&&a&&n.indexOf(a)>n.indexOf(t))}function le(e,t,n){if(!ie(e))throw new M(D,`Unexpected parent node type `+e.nodeType);if(n&&n.parentNode!==e)throw new M(k,`child not in parent`);if(!ae(t)||K(t)&&e.nodeType!==V.DOCUMENT_NODE)throw new M(D,`Unexpected node type `+t.nodeType+` for parent node type `+e.nodeType)}function ue(e,t,n){var i=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===V.DOCUMENT_FRAGMENT_NODE){var o=a.filter(q);if(o.length>1||r(a,oe))throw new M(D,`More than one element or text in fragment`);if(o.length===1&&!se(e,n))throw new M(D,`Element in fragment can not be inserted before doctype`)}if(q(t)&&!se(e,n))throw new M(D,`Only one element can be added and only after doctype`);if(K(t)){if(r(i,K))throw new M(D,`Only one doctype is allowed`);var s=r(i,q);if(n&&i.indexOf(s)<i.indexOf(n))throw new M(D,`Doctype can only be inserted before an element`);if(!n&&s)throw new M(D,`Doctype can not be appended since element is present`)}}function de(e,t,n){var i=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===V.DOCUMENT_FRAGMENT_NODE){var o=a.filter(q);if(o.length>1||r(a,oe))throw new M(D,`More than one element or text in fragment`);if(o.length===1&&!ce(e,n))throw new M(D,`Element in fragment can not be inserted before doctype`)}if(q(t)&&!ce(e,n))throw new M(D,`Only one element can be added and only after doctype`);if(K(t)){function e(e){return K(e)&&e!==n}if(r(i,e))throw new M(D,`Only one doctype is allowed`);var s=r(i,q);if(n&&i.indexOf(s)<i.indexOf(n))throw new M(D,`Doctype can only be inserted before an element`)}}function J(e,t,n,r){le(e,t,n),e.nodeType===V.DOCUMENT_NODE&&(r||ue)(e,t,n);var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===C){var a=t.firstChild;if(a==null)return t;var o=t.lastChild}else a=o=t;var s=n?n.previousSibling:e.lastChild;a.previousSibling=s,o.nextSibling=n,s?s.nextSibling=a:e.firstChild=a,n==null?e.lastChild=o:n.previousSibling=o;do{a.parentNode=e;var c=e.ownerDocument||e;Y(a,c)}while(a!==o&&(a=a.nextSibling));return ne(e.ownerDocument||e,e),t.nodeType==C&&(t.firstChild=t.lastChild=null),t}function Y(e,t){if(e.ownerDocument!==t){if(e.ownerDocument=t,e.nodeType===p&&e.attributes)for(var n=0;n<e.attributes.length;n++){var r=e.attributes.item(n);r&&(r.ownerDocument=t)}for(var i=e.firstChild;i;)Y(i,t),i=i.nextSibling}}function fe(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,ne(e.ownerDocument,e,t),Y(t,e.ownerDocument||e),t}G.prototype={nodeName:`#document`,nodeType:x,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==C){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return J(this,e,t),Y(e,this),this.documentElement===null&&e.nodeType===p&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),re(this,e)},replaceChild:function(e,t){J(this,e,t,de),Y(e,this),t&&this.removeChild(t),q(e)&&(this.documentElement=e)},importNode:function(e,t){return Ee(this,e,t)},getElementById:function(e){var t=null;return U(this.documentElement,function(n){if(n.nodeType==p&&n.getAttribute(`id`)==e)return t=n,!0}),t},getElementsByClassName:function(e){var t=c(e);return new P(this,function(n){var r=[];return t.length>0&&U(n.documentElement,function(i){if(i!==n&&i.nodeType===p){var a=i.getAttribute(`class`);if(a){var o=e===a;if(!o){var s=c(a);o=t.every(l(s))}o&&r.push(i)}}}),r})},createElement:function(e){var t=new X;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new N;var n=t.attributes=new I;return n._ownerElement=t,t},createDocumentFragment:function(){var e=new ye;return e.ownerDocument=this,e.childNodes=new N,e},createTextNode:function(e){var t=new pe;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new me;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){if(e.indexOf(`]]>`)!==-1)throw new M(O,`data contains "]]>"`);var t=new he;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new be;return n.ownerDocument=this,n.tagName=n.nodeName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new Z;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ve;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new X,r=t.split(`:`),i=n.attributes=new I;return n.childNodes=new N,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,r.length==2?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new Z,r=t.split(`:`);return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,r.length==2?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},d(G,V);function X(){this._nsMap={}}X.prototype={nodeType:p,hasAttribute:function(e){return this.getAttributeNode(e)!=null},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||``},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=``+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===C?this.insertBefore(e,null):fe(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return this.getAttributeNodeNS(e,t)!=null},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||``},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=``+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new P(this,function(t){var n=[];return U(t,function(r){r!==t&&r.nodeType==p&&(e===`*`||r.tagName==e)&&n.push(r)}),n})},getElementsByTagNameNS:function(e,t){return new P(this,function(n){var r=[];return U(n,function(i){i!==n&&i.nodeType===p&&(e===`*`||i.namespaceURI===e)&&(t===`*`||i.localName==t)&&r.push(i)}),r})}},G.prototype.getElementsByTagName=X.prototype.getElementsByTagName,G.prototype.getElementsByTagNameNS=X.prototype.getElementsByTagNameNS,d(X,V);function Z(){}Z.prototype.nodeType=m,d(Z,V);function Q(){}Q.prototype={data:``,substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw Error(E[D])},deleteData:function(e,t){this.replaceData(e,t,``)},replaceData:function(e,t,n){var r=this.data.substring(0,e),i=this.data.substring(e+t);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}},d(Q,V);function pe(){}pe.prototype={nodeName:`#text`,nodeType:h,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},d(pe,Q);function me(){}me.prototype={nodeName:`#comment`,nodeType:b},d(me,Q);function he(){}he.prototype={nodeName:`#cdata-section`,nodeType:g},d(he,Q);function $(){}$.prototype.nodeType=S,d($,V);function ge(){}ge.prototype.nodeType=w,d(ge,V);function _e(){}_e.prototype.nodeType=v,d(_e,V);function ve(){}ve.prototype.nodeType=_,d(ve,V);function ye(){}ye.prototype.nodeName=`#document-fragment`,ye.prototype.nodeType=C,d(ye,V);function be(){}be.prototype.nodeType=y,d(be,V);function xe(){}xe.prototype.serializeToString=function(e,t,n,r){return Se.call(e,t,n,r)},V.prototype.toString=Se;function Se(e,t,n){var r=!!n&&!!n.requireWellFormed,i=[],a=this.nodeType==9&&this.documentElement||this,o=a.prefix,s=a.namespaceURI;if(s&&o==null){var o=a.lookupPrefix(s);if(o==null)var c=[{namespace:s,prefix:null}]}return Te(this,i,e,t,c,r),i.join(``)}function Ce(e,t,n){var r=e.prefix||``,a=e.namespaceURI;if(!a||r===`xml`&&a===i.XML||a===i.XMLNS)return!1;for(var o=n.length;o--;){var s=n[o];if(s.prefix===r)return s.namespace!==a}return!0}function we(e,t,n){e.push(` `,t,`="`,n.replace(/[<>&"\t\n\r]/g,H),`"`)}function Te(e,t,n,r,a,o){a||(a=[]),W(e,{ns:a,isHTML:n},{enter:function(e,n){var a=n.ns,s=n.isHTML;if(r)if(e=r(e),e){if(typeof e==`string`)return t.push(e),null}else return null;switch(e.nodeType){case p:var c=e.attributes,l=c.length,u=e.tagName;s=i.isHTML(e.namespaceURI)||s;var d=u;if(!s&&!e.prefix&&e.namespaceURI){for(var f,v=0;v<c.length;v++)if(c.item(v).name===`xmlns`){f=c.item(v).value;break}if(!f)for(var w=a.length-1;w>=0;w--){var T=a[w];if(T.prefix===``&&T.namespace===e.namespaceURI){f=T.namespace;break}}if(f!==e.namespaceURI)for(var w=a.length-1;w>=0;w--){var T=a[w];if(T.namespace===e.namespaceURI){T.prefix&&(d=T.prefix+`:`+u);break}}}t.push(`<`,d);for(var E=a.slice(),D=0;D<l;D++){var O=c.item(D);O.prefix==`xmlns`?E.push({prefix:O.localName,namespace:O.value}):O.nodeName==`xmlns`&&E.push({prefix:``,namespace:O.value})}for(var D=0;D<l;D++){var O=c.item(D);if(Ce(O,s,E)){var k=O.prefix||``,A=O.namespaceURI;we(t,k?`xmlns:`+k:`xmlns`,A),E.push({prefix:k,namespace:A})}var N=r?r(O):O;N&&(typeof N==`string`?t.push(N):we(t,N.name,N.value))}if(u===d&&Ce(e,s,E)){var P=e.prefix||``,A=e.namespaceURI;we(t,P?`xmlns:`+P:`xmlns`,A),E.push({prefix:P,namespace:A})}var F=e.firstChild;if(F||s&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(t.push(`>`),s&&/^script$/i.test(u)){for(;F;)F.data?t.push(F.data):Te(F,t,s,r,E.slice(),o),F=F.nextSibling;return t.push(`</`,u,`>`),null}return{ns:E,isHTML:s,tag:d}}else return t.push(`/>`),null;case x:case C:return{ns:a.slice(),isHTML:s,tag:null};case m:return we(t,e.name,e.value),null;case h:return t.push(e.data.replace(/[<&>]/g,H)),null;case g:if(o&&e.data.indexOf(`]]>`)!==-1)throw new M(j,`The CDATASection data contains "]]>"`);return t.push(`<![CDATA[`,e.data.replace(/]]>/g,`]]]]><![CDATA[>`),`]]>`),null;case b:if(o&&e.data.indexOf(`-->`)!==-1)throw new M(j,`The comment node data contains "-->"`);return t.push(`<!--`,e.data,`-->`),null;case S:if(o){if(e.publicId&&!/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(e.publicId))throw new M(j,`DocumentType publicId is not a valid PubidLiteral`);if(e.systemId&&!/^("[^"]*"|'[^']*')$/.test(e.systemId))throw new M(j,`DocumentType systemId is not a valid SystemLiteral`);if(e.internalSubset&&e.internalSubset.indexOf(`]>`)!==-1)throw new M(j,`DocumentType internalSubset contains "]>"`)}var I=e.publicId,L=e.systemId;if(t.push(`<!DOCTYPE `,e.name),I)t.push(` PUBLIC `,I),L&&L!=`.`&&t.push(` `,L),t.push(`>`);else if(L&&L!=`.`)t.push(` SYSTEM `,L,`>`);else{var R=e.internalSubset;R&&t.push(` [`,R,`]`),t.push(`>`)}return null;case y:if(o&&e.data.indexOf(`?>`)!==-1)throw new M(j,`The ProcessingInstruction data contains "?>"`);return t.push(`<?`,e.target,` `,e.data,`?>`),null;case _:return t.push(`&`,e.nodeName,`;`),null;default:return t.push(`??`,e.nodeName),null}},exit:function(e,n){n&&n.tag&&t.push(`</`,n.tag,`>`)}})}function Ee(e,t,n){var r;return W(t,null,{enter:function(t,i){var a=t.cloneNode(!1);return a.ownerDocument=e,a.parentNode=null,i===null?r=a:i.appendChild(a),t.nodeType===m||n?a:null}}),r}function De(e,t,n){var r;return W(t,null,{enter:function(t,i){var a=new t.constructor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var s=t[o];typeof s!=`object`&&s!=a[o]&&(a[o]=s)}t.childNodes&&(a.childNodes=new N),a.ownerDocument=e;var c=n;switch(a.nodeType){case p:var l=t.attributes,u=a.attributes=new I,d=l.length;u._ownerElement=a;for(var f=0;f<d;f++)a.setAttributeNode(De(e,l.item(f),!0));break;case m:c=!0}return i===null?r=a:i.appendChild(a),c?a:null}}),r}function Oe(e,t,n){e[t]=n}try{Object.defineProperty&&(Object.defineProperty(P.prototype,"length",{get:function(){return F(this),this.$$length}}),Object.defineProperty(V.prototype,"textContent",{get:function(){if(this.nodeType===p||this.nodeType===C){var e=[];return W(this,null,{enter:function(t){if(t.nodeType===p||t.nodeType===C)return!0;if(t.nodeType===y||t.nodeType===b)return null;e.push(t.nodeValue)}}),e.join(``)}return this.nodeValue},set:function(e){switch(this.nodeType){case p:case C:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Oe=function(e,t,n){e[`$$`+t]=n})}catch{}e.DocumentType=$,e.DOMException=M,e.DOMImplementation=B,e.Element=X,e.Node=V,e.NodeList=N,e.walkDOM=W,e.XMLSerializer=xe})),i=e((e=>{var t=n().freeze;e.XML_ENTITIES=t({amp:`&`,apos:`'`,gt:`>`,lt:`<`,quot:`"`}),e.HTML_ENTITIES=t({Aacute:`Á`,aacute:`á`,Abreve:`Ă`,abreve:`ă`,ac:`∾`,acd:`∿`,acE:`∾̳`,Acirc:`Â`,acirc:`â`,acute:`´`,Acy:`А`,acy:`а`,AElig:`Æ`,aelig:`æ`,af:``,Afr:`𝔄`,afr:`𝔞`,Agrave:`À`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,Alpha:`Α`,alpha:`α`,Amacr:`Ā`,amacr:`ā`,amalg:`⨿`,AMP:`&`,amp:`&`,And:`⩓`,and:`∧`,andand:`⩕`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsd:`∡`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,Aogon:`Ą`,aogon:`ą`,Aopf:`𝔸`,aopf:`𝕒`,ap:`≈`,apacir:`⩯`,apE:`⩰`,ape:`≊`,apid:`≋`,apos:`'`,ApplyFunction:``,approx:`≈`,approxeq:`≊`,Aring:`Å`,aring:`å`,Ascr:`𝒜`,ascr:`𝒶`,Assign:`≔`,ast:`*`,asymp:`≈`,asympeq:`≍`,Atilde:`Ã`,atilde:`ã`,Auml:`Ä`,auml:`ä`,awconint:`∳`,awint:`⨑`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,Backslash:`∖`,Barv:`⫧`,barvee:`⊽`,Barwed:`⌆`,barwed:`⌅`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,Bcy:`Б`,bcy:`б`,bdquo:`„`,becaus:`∵`,Because:`∵`,because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,Bernoullis:`ℬ`,Beta:`Β`,beta:`β`,beth:`ℶ`,between:`≬`,Bfr:`𝔅`,bfr:`𝔟`,bigcap:`⋂`,bigcirc:`◯`,bigcup:`⋃`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,bigvee:`⋁`,bigwedge:`⋀`,bkarow:`⤍`,blacklozenge:`⧫`,blacksquare:`▪`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,blacktriangleright:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:`=⃥`,bnequiv:`≡⃥`,bNot:`⫭`,bnot:`⌐`,Bopf:`𝔹`,bopf:`𝕓`,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxbox:`⧉`,boxDL:`╗`,boxDl:`╖`,boxdL:`╕`,boxdl:`┐`,boxDR:`╔`,boxDr:`╓`,boxdR:`╒`,boxdr:`┌`,boxH:`═`,boxh:`─`,boxHD:`╦`,boxHd:`╤`,boxhD:`╥`,boxhd:`┬`,boxHU:`╩`,boxHu:`╧`,boxhU:`╨`,boxhu:`┴`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxUL:`╝`,boxUl:`╜`,boxuL:`╛`,boxul:`┘`,boxUR:`╚`,boxUr:`╙`,boxuR:`╘`,boxur:`└`,boxV:`║`,boxv:`│`,boxVH:`╬`,boxVh:`╫`,boxvH:`╪`,boxvh:`┼`,boxVL:`╣`,boxVl:`╢`,boxvL:`╡`,boxvl:`┤`,boxVR:`╠`,boxVr:`╟`,boxvR:`╞`,boxvr:`├`,bprime:`‵`,Breve:`˘`,breve:`˘`,brvbar:`¦`,Bscr:`ℬ`,bscr:`𝒷`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsol:`\\`,bsolb:`⧅`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,Bumpeq:`≎`,bumpeq:`≏`,Cacute:`Ć`,cacute:`ć`,Cap:`⋒`,cap:`∩`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,capcup:`⩇`,capdot:`⩀`,CapitalDifferentialD:`ⅅ`,caps:`∩︀`,caret:`⁁`,caron:`ˇ`,Cayleys:`ℭ`,ccaps:`⩍`,Ccaron:`Č`,ccaron:`č`,Ccedil:`Ç`,ccedil:`ç`,Ccirc:`Ĉ`,ccirc:`ĉ`,Cconint:`∰`,ccups:`⩌`,ccupssm:`⩐`,Cdot:`Ċ`,cdot:`ċ`,cedil:`¸`,Cedilla:`¸`,cemptyv:`⦲`,cent:`¢`,CenterDot:`·`,centerdot:`·`,Cfr:`ℭ`,cfr:`𝔠`,CHcy:`Ч`,chcy:`ч`,check:`✓`,checkmark:`✓`,Chi:`Χ`,chi:`χ`,cir:`○`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,CircleDot:`⊙`,circledR:`®`,circledS:`Ⓢ`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,cirE:`⧃`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,clubs:`♣`,clubsuit:`♣`,Colon:`∷`,colon:`:`,Colone:`⩴`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,Congruent:`≡`,Conint:`∯`,conint:`∮`,ContourIntegral:`∮`,Copf:`ℂ`,copf:`𝕔`,coprod:`∐`,Coproduct:`∐`,COPY:`©`,copy:`©`,copysr:`℗`,CounterClockwiseContourIntegral:`∳`,crarr:`↵`,Cross:`⨯`,cross:`✗`,Cscr:`𝒞`,cscr:`𝒸`,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,Cup:`⋓`,cup:`∪`,cupbrcap:`⩈`,CupCap:`≍`,cupcap:`⩆`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:`∪︀`,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,Dagger:`‡`,dagger:`†`,daleth:`ℸ`,Darr:`↡`,dArr:`⇓`,darr:`↓`,dash:`‐`,Dashv:`⫤`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,Dcaron:`Ď`,dcaron:`ď`,Dcy:`Д`,dcy:`д`,DD:`ⅅ`,dd:`ⅆ`,ddagger:`‡`,ddarr:`⇊`,DDotrahd:`⤑`,ddotseq:`⩷`,deg:`°`,Del:`∇`,Delta:`Δ`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,Dfr:`𝔇`,dfr:`𝔡`,dHar:`⥥`,dharl:`⇃`,dharr:`⇂`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,diam:`⋄`,Diamond:`⋄`,diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,DifferentialD:`ⅆ`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,DJcy:`Ђ`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,Dopf:`𝔻`,dopf:`𝕕`,Dot:`¨`,dot:`˙`,DotDot:`⃜`,doteq:`≐`,doteqdot:`≑`,DotEqual:`≐`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrow:`↓`,Downarrow:`⇓`,downarrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,DownTeeArrow:`↧`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,Dscr:`𝒟`,dscr:`𝒹`,DScy:`Ѕ`,dscy:`ѕ`,dsol:`⧶`,Dstrok:`Đ`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,DZcy:`Џ`,dzcy:`џ`,dzigrarr:`⟿`,Eacute:`É`,eacute:`é`,easter:`⩮`,Ecaron:`Ě`,ecaron:`ě`,ecir:`≖`,Ecirc:`Ê`,ecirc:`ê`,ecolon:`≕`,Ecy:`Э`,ecy:`э`,eDDot:`⩷`,Edot:`Ė`,eDot:`≑`,edot:`ė`,ee:`ⅇ`,efDot:`≒`,Efr:`𝔈`,efr:`𝔢`,eg:`⪚`,Egrave:`È`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,Element:`∈`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,Emacr:`Ē`,emacr:`ē`,empty:`∅`,emptyset:`∅`,EmptySmallSquare:`◻`,emptyv:`∅`,EmptyVerySmallSquare:`▫`,emsp:` `,emsp13:` `,emsp14:` `,ENG:`Ŋ`,eng:`ŋ`,ensp:` `,Eogon:`Ę`,eogon:`ę`,Eopf:`𝔼`,eopf:`𝕖`,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,Epsilon:`Ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,Equal:`⩵`,equals:`=`,EqualTilde:`≂`,equest:`≟`,Equilibrium:`⇌`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erarr:`⥱`,erDot:`≓`,Escr:`ℰ`,escr:`ℯ`,esdot:`≐`,Esim:`⩳`,esim:`≂`,Eta:`Η`,eta:`η`,ETH:`Ð`,eth:`ð`,Euml:`Ë`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,Exists:`∃`,expectation:`ℰ`,ExponentialE:`ⅇ`,exponentiale:`ⅇ`,fallingdotseq:`≒`,Fcy:`Ф`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,Ffr:`𝔉`,ffr:`𝔣`,filig:`fi`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,Fopf:`𝔽`,fopf:`𝕗`,ForAll:`∀`,forall:`∀`,fork:`⋔`,forkv:`⫙`,Fouriertrf:`ℱ`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,Fscr:`ℱ`,fscr:`𝒻`,gacute:`ǵ`,Gamma:`Γ`,gamma:`γ`,Gammad:`Ϝ`,gammad:`ϝ`,gap:`⪆`,Gbreve:`Ğ`,gbreve:`ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,gcirc:`ĝ`,Gcy:`Г`,gcy:`г`,Gdot:`Ġ`,gdot:`ġ`,gE:`≧`,ge:`≥`,gEl:`⪌`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,ges:`⩾`,gescc:`⪩`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:`⋛︀`,gesles:`⪔`,Gfr:`𝔊`,gfr:`𝔤`,Gg:`⋙`,gg:`≫`,ggg:`⋙`,gimel:`ℷ`,GJcy:`Ѓ`,gjcy:`ѓ`,gl:`≷`,gla:`⪥`,glE:`⪒`,glj:`⪤`,gnap:`⪊`,gnapprox:`⪊`,gnE:`≩`,gne:`⪈`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,Gopf:`𝔾`,gopf:`𝕘`,grave:"`",GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:`𝒢`,gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,Gt:`≫`,GT:`>`,gt:`>`,gtcc:`⪧`,gtcir:`⩺`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:`≩︀`,gvnE:`≩︀`,Hacek:`ˇ`,hairsp:` `,half:`½`,hamilt:`ℋ`,HARDcy:`Ъ`,hardcy:`ъ`,hArr:`⇔`,harr:`↔`,harrcir:`⥈`,harrw:`↭`,Hat:`^`,hbar:`ℏ`,Hcirc:`Ĥ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,Hfr:`ℌ`,hfr:`𝔥`,HilbertSpace:`ℋ`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,Hopf:`ℍ`,hopf:`𝕙`,horbar:`―`,HorizontalLine:`─`,Hscr:`ℋ`,hscr:`𝒽`,hslash:`ℏ`,Hstrok:`Ħ`,hstrok:`ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,hybull:`⁃`,hyphen:`‐`,Iacute:`Í`,iacute:`í`,ic:``,Icirc:`Î`,icirc:`î`,Icy:`И`,icy:`и`,Idot:`İ`,IEcy:`Е`,iecy:`е`,iexcl:`¡`,iff:`⇔`,Ifr:`ℑ`,ifr:`𝔦`,Igrave:`Ì`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,IJlig:`IJ`,ijlig:`ij`,Im:`ℑ`,Imacr:`Ī`,imacr:`ī`,image:`ℑ`,ImaginaryI:`ⅈ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,imof:`⊷`,imped:`Ƶ`,Implies:`⇒`,in:`∈`,incare:`℅`,infin:`∞`,infintie:`⧝`,inodot:`ı`,Int:`∬`,int:`∫`,intcal:`⊺`,integers:`ℤ`,Integral:`∫`,intercal:`⊺`,Intersection:`⋂`,intlarhk:`⨗`,intprod:`⨼`,InvisibleComma:``,InvisibleTimes:``,IOcy:`Ё`,iocy:`ё`,Iogon:`Į`,iogon:`į`,Iopf:`𝕀`,iopf:`𝕚`,Iota:`Ι`,iota:`ι`,iprod:`⨼`,iquest:`¿`,Iscr:`ℐ`,iscr:`𝒾`,isin:`∈`,isindot:`⋵`,isinE:`⋹`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:``,Itilde:`Ĩ`,itilde:`ĩ`,Iukcy:`І`,iukcy:`і`,Iuml:`Ï`,iuml:`ï`,Jcirc:`Ĵ`,jcirc:`ĵ`,Jcy:`Й`,jcy:`й`,Jfr:`𝔍`,jfr:`𝔧`,jmath:`ȷ`,Jopf:`𝕁`,jopf:`𝕛`,Jscr:`𝒥`,jscr:`𝒿`,Jsercy:`Ј`,jsercy:`ј`,Jukcy:`Є`,jukcy:`є`,Kappa:`Κ`,kappa:`κ`,kappav:`ϰ`,Kcedil:`Ķ`,kcedil:`ķ`,Kcy:`К`,kcy:`к`,Kfr:`𝔎`,kfr:`𝔨`,kgreen:`ĸ`,KHcy:`Х`,khcy:`х`,KJcy:`Ќ`,kjcy:`ќ`,Kopf:`𝕂`,kopf:`𝕜`,Kscr:`𝒦`,kscr:`𝓀`,lAarr:`⇚`,Lacute:`Ĺ`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,Lambda:`Λ`,lambda:`λ`,Lang:`⟪`,lang:`⟨`,langd:`⦑`,langle:`⟨`,lap:`⪅`,Laplacetrf:`ℒ`,laquo:`«`,Larr:`↞`,lArr:`⇐`,larr:`←`,larrb:`⇤`,larrbfs:`⤟`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,lat:`⪫`,lAtail:`⤛`,latail:`⤙`,late:`⪭`,lates:`⪭︀`,lBarr:`⤎`,lbarr:`⤌`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,Lcaron:`Ľ`,lcaron:`ľ`,Lcedil:`Ļ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,Lcy:`Л`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,lE:`≦`,le:`≤`,LeftAngleBracket:`⟨`,LeftArrow:`←`,Leftarrow:`⇐`,leftarrow:`←`,LeftArrowBar:`⇤`,LeftArrowRightArrow:`⇆`,leftarrowtail:`↢`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,LeftRightArrow:`↔`,Leftrightarrow:`⇔`,leftrightarrow:`↔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,LeftRightVector:`⥎`,LeftTee:`⊣`,LeftTeeArrow:`↤`,LeftTeeVector:`⥚`,leftthreetimes:`⋋`,LeftTriangle:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,LeftVectorBar:`⥒`,lEg:`⪋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,les:`⩽`,lescc:`⪨`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:`⋚︀`,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,lessgtr:`≶`,LessLess:`⪡`,lesssim:`≲`,LessSlantEqual:`⩽`,LessTilde:`≲`,lfisht:`⥼`,lfloor:`⌊`,Lfr:`𝔏`,lfr:`𝔩`,lg:`≶`,lgE:`⪑`,lHar:`⥢`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,LJcy:`Љ`,ljcy:`љ`,Ll:`⋘`,ll:`≪`,llarr:`⇇`,llcorner:`⌞`,Lleftarrow:`⇚`,llhard:`⥫`,lltri:`◺`,Lmidot:`Ŀ`,lmidot:`ŀ`,lmoust:`⎰`,lmoustache:`⎰`,lnap:`⪉`,lnapprox:`⪉`,lnE:`≨`,lne:`⪇`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,LongLeftArrow:`⟵`,Longleftarrow:`⟸`,longleftarrow:`⟵`,LongLeftRightArrow:`⟷`,Longleftrightarrow:`⟺`,longleftrightarrow:`⟷`,longmapsto:`⟼`,LongRightArrow:`⟶`,Longrightarrow:`⟹`,longrightarrow:`⟶`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,Lopf:`𝕃`,lopf:`𝕝`,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:``,lrtri:`⊿`,lsaquo:`‹`,Lscr:`ℒ`,lscr:`𝓁`,Lsh:`↰`,lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,Lstrok:`Ł`,lstrok:`ł`,Lt:`≪`,LT:`<`,lt:`<`,ltcc:`⪦`,ltcir:`⩹`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,ltrPar:`⦖`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:`≨︀`,lvnE:`≨︀`,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,Map:`⤅`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,Mcy:`М`,mcy:`м`,mdash:`—`,mDDot:`∺`,measuredangle:`∡`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:`𝔐`,mfr:`𝔪`,mho:`℧`,micro:`µ`,mid:`∣`,midast:`*`,midcir:`⫰`,middot:`·`,minus:`−`,minusb:`⊟`,minusd:`∸`,minusdu:`⨪`,MinusPlus:`∓`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,Mopf:`𝕄`,mopf:`𝕞`,mp:`∓`,Mscr:`ℳ`,mscr:`𝓂`,mstpos:`∾`,Mu:`Μ`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nabla:`∇`,Nacute:`Ń`,nacute:`ń`,nang:`∠⃒`,nap:`≉`,napE:`⩰̸`,napid:`≋̸`,napos:`ʼn`,napprox:`≉`,natur:`♮`,natural:`♮`,naturals:`ℕ`,nbsp:`\xA0`,nbump:`≎̸`,nbumpe:`≏̸`,ncap:`⩃`,Ncaron:`Ň`,ncaron:`ň`,Ncedil:`Ņ`,ncedil:`ņ`,ncong:`≇`,ncongdot:`⩭̸`,ncup:`⩂`,Ncy:`Н`,ncy:`н`,ndash:`–`,ne:`≠`,nearhk:`⤤`,neArr:`⇗`,nearr:`↗`,nearrow:`↗`,nedot:`≐̸`,NegativeMediumSpace:``,NegativeThickSpace:``,NegativeThinSpace:``,NegativeVeryThinSpace:``,nequiv:`≢`,nesear:`⤨`,nesim:`≂̸`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
|
|
2
|
+
`,nexist:`∄`,nexists:`∄`,Nfr:`𝔑`,nfr:`𝔫`,ngE:`≧̸`,nge:`≱`,ngeq:`≱`,ngeqq:`≧̸`,ngeqslant:`⩾̸`,nges:`⩾̸`,nGg:`⋙̸`,ngsim:`≵`,nGt:`≫⃒`,ngt:`≯`,ngtr:`≯`,nGtv:`≫̸`,nhArr:`⇎`,nharr:`↮`,nhpar:`⫲`,ni:`∋`,nis:`⋼`,nisd:`⋺`,niv:`∋`,NJcy:`Њ`,njcy:`њ`,nlArr:`⇍`,nlarr:`↚`,nldr:`‥`,nlE:`≦̸`,nle:`≰`,nLeftarrow:`⇍`,nleftarrow:`↚`,nLeftrightarrow:`⇎`,nleftrightarrow:`↮`,nleq:`≰`,nleqq:`≦̸`,nleqslant:`⩽̸`,nles:`⩽̸`,nless:`≮`,nLl:`⋘̸`,nlsim:`≴`,nLt:`≪⃒`,nlt:`≮`,nltri:`⋪`,nltrie:`⋬`,nLtv:`≪̸`,nmid:`∤`,NoBreak:``,NonBreakingSpace:`\xA0`,Nopf:`ℕ`,nopf:`𝕟`,Not:`⫬`,not:`¬`,NotCongruent:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotEqualTilde:`≂̸`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotGreaterFullEqual:`≧̸`,NotGreaterGreater:`≫̸`,NotGreaterLess:`≹`,NotGreaterSlantEqual:`⩾̸`,NotGreaterTilde:`≵`,NotHumpDownHump:`≎̸`,NotHumpEqual:`≏̸`,notin:`∉`,notindot:`⋵̸`,notinE:`⋹̸`,notinva:`∉`,notinvb:`⋷`,notinvc:`⋶`,NotLeftTriangle:`⋪`,NotLeftTriangleBar:`⧏̸`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotLessGreater:`≸`,NotLessLess:`≪̸`,NotLessSlantEqual:`⩽̸`,NotLessTilde:`≴`,NotNestedGreaterGreater:`⪢̸`,NotNestedLessLess:`⪡̸`,notni:`∌`,notniva:`∌`,notnivb:`⋾`,notnivc:`⋽`,NotPrecedes:`⊀`,NotPrecedesEqual:`⪯̸`,NotPrecedesSlantEqual:`⋠`,NotReverseElement:`∌`,NotRightTriangle:`⋫`,NotRightTriangleBar:`⧐̸`,NotRightTriangleEqual:`⋭`,NotSquareSubset:`⊏̸`,NotSquareSubsetEqual:`⋢`,NotSquareSuperset:`⊐̸`,NotSquareSupersetEqual:`⋣`,NotSubset:`⊂⃒`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsEqual:`⪰̸`,NotSucceedsSlantEqual:`⋡`,NotSucceedsTilde:`≿̸`,NotSuperset:`⊃⃒`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotTildeEqual:`≄`,NotTildeFullEqual:`≇`,NotTildeTilde:`≉`,NotVerticalBar:`∤`,npar:`∦`,nparallel:`∦`,nparsl:`⫽⃥`,npart:`∂̸`,npolint:`⨔`,npr:`⊀`,nprcue:`⋠`,npre:`⪯̸`,nprec:`⊀`,npreceq:`⪯̸`,nrArr:`⇏`,nrarr:`↛`,nrarrc:`⤳̸`,nrarrw:`↝̸`,nRightarrow:`⇏`,nrightarrow:`↛`,nrtri:`⋫`,nrtrie:`⋭`,nsc:`⊁`,nsccue:`⋡`,nsce:`⪰̸`,Nscr:`𝒩`,nscr:`𝓃`,nshortmid:`∤`,nshortparallel:`∦`,nsim:`≁`,nsime:`≄`,nsimeq:`≄`,nsmid:`∤`,nspar:`∦`,nsqsube:`⋢`,nsqsupe:`⋣`,nsub:`⊄`,nsubE:`⫅̸`,nsube:`⊈`,nsubset:`⊂⃒`,nsubseteq:`⊈`,nsubseteqq:`⫅̸`,nsucc:`⊁`,nsucceq:`⪰̸`,nsup:`⊅`,nsupE:`⫆̸`,nsupe:`⊉`,nsupset:`⊃⃒`,nsupseteq:`⊉`,nsupseteqq:`⫆̸`,ntgl:`≹`,Ntilde:`Ñ`,ntilde:`ñ`,ntlg:`≸`,ntriangleleft:`⋪`,ntrianglelefteq:`⋬`,ntriangleright:`⋫`,ntrianglerighteq:`⋭`,Nu:`Ν`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvap:`≍⃒`,nVDash:`⊯`,nVdash:`⊮`,nvDash:`⊭`,nvdash:`⊬`,nvge:`≥⃒`,nvgt:`>⃒`,nvHarr:`⤄`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:`≤⃒`,nvlt:`<⃒`,nvltrie:`⊴⃒`,nvrArr:`⤃`,nvrtrie:`⊵⃒`,nvsim:`∼⃒`,nwarhk:`⤣`,nwArr:`⇖`,nwarr:`↖`,nwarrow:`↖`,nwnear:`⤧`,Oacute:`Ó`,oacute:`ó`,oast:`⊛`,ocir:`⊚`,Ocirc:`Ô`,ocirc:`ô`,Ocy:`О`,ocy:`о`,odash:`⊝`,Odblac:`Ő`,odblac:`ő`,odiv:`⨸`,odot:`⊙`,odsold:`⦼`,OElig:`Œ`,oelig:`œ`,ofcir:`⦿`,Ofr:`𝔒`,ofr:`𝔬`,ogon:`˛`,Ograve:`Ò`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,ohm:`Ω`,oint:`∮`,olarr:`↺`,olcir:`⦾`,olcross:`⦻`,oline:`‾`,olt:`⧀`,Omacr:`Ō`,omacr:`ō`,Omega:`Ω`,omega:`ω`,Omicron:`Ο`,omicron:`ο`,omid:`⦶`,ominus:`⊖`,Oopf:`𝕆`,oopf:`𝕠`,opar:`⦷`,OpenCurlyDoubleQuote:`“`,OpenCurlyQuote:`‘`,operp:`⦹`,oplus:`⊕`,Or:`⩔`,or:`∨`,orarr:`↻`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oS:`Ⓢ`,Oscr:`𝒪`,oscr:`ℴ`,Oslash:`Ø`,oslash:`ø`,osol:`⊘`,Otilde:`Õ`,otilde:`õ`,Otimes:`⨷`,otimes:`⊗`,otimesas:`⨶`,Ouml:`Ö`,ouml:`ö`,ovbar:`⌽`,OverBar:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,OverParenthesis:`⏜`,par:`∥`,para:`¶`,parallel:`∥`,parsim:`⫳`,parsl:`⫽`,part:`∂`,PartialD:`∂`,Pcy:`П`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,perp:`⊥`,pertenk:`‱`,Pfr:`𝔓`,pfr:`𝔭`,Phi:`Φ`,phi:`φ`,phiv:`ϕ`,phmmat:`ℳ`,phone:`☎`,Pi:`Π`,pi:`π`,pitchfork:`⋔`,piv:`ϖ`,planck:`ℏ`,planckh:`ℎ`,plankv:`ℏ`,plus:`+`,plusacir:`⨣`,plusb:`⊞`,pluscir:`⨢`,plusdo:`∔`,plusdu:`⨥`,pluse:`⩲`,PlusMinus:`±`,plusmn:`±`,plussim:`⨦`,plustwo:`⨧`,pm:`±`,Poincareplane:`ℌ`,pointint:`⨕`,Popf:`ℙ`,popf:`𝕡`,pound:`£`,Pr:`⪻`,pr:`≺`,prap:`⪷`,prcue:`≼`,prE:`⪳`,pre:`⪯`,prec:`≺`,precapprox:`⪷`,preccurlyeq:`≼`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,preceq:`⪯`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,precsim:`≾`,Prime:`″`,prime:`′`,primes:`ℙ`,prnap:`⪹`,prnE:`⪵`,prnsim:`⋨`,prod:`∏`,Product:`∏`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prop:`∝`,Proportion:`∷`,Proportional:`∝`,propto:`∝`,prsim:`≾`,prurel:`⊰`,Pscr:`𝒫`,pscr:`𝓅`,Psi:`Ψ`,psi:`ψ`,puncsp:` `,Qfr:`𝔔`,qfr:`𝔮`,qint:`⨌`,Qopf:`ℚ`,qopf:`𝕢`,qprime:`⁗`,Qscr:`𝒬`,qscr:`𝓆`,quaternions:`ℍ`,quatint:`⨖`,quest:`?`,questeq:`≟`,QUOT:`"`,quot:`"`,rAarr:`⇛`,race:`∽̱`,Racute:`Ŕ`,racute:`ŕ`,radic:`√`,raemptyv:`⦳`,Rang:`⟫`,rang:`⟩`,rangd:`⦒`,range:`⦥`,rangle:`⟩`,raquo:`»`,Rarr:`↠`,rArr:`⇒`,rarr:`→`,rarrap:`⥵`,rarrb:`⇥`,rarrbfs:`⤠`,rarrc:`⤳`,rarrfs:`⤞`,rarrhk:`↪`,rarrlp:`↬`,rarrpl:`⥅`,rarrsim:`⥴`,Rarrtl:`⤖`,rarrtl:`↣`,rarrw:`↝`,rAtail:`⤜`,ratail:`⤚`,ratio:`∶`,rationals:`ℚ`,RBarr:`⤐`,rBarr:`⤏`,rbarr:`⤍`,rbbrk:`❳`,rbrace:`}`,rbrack:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,Rcaron:`Ř`,rcaron:`ř`,Rcedil:`Ŗ`,rcedil:`ŗ`,rceil:`⌉`,rcub:`}`,Rcy:`Р`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdquo:`”`,rdquor:`”`,rdsh:`↳`,Re:`ℜ`,real:`ℜ`,realine:`ℛ`,realpart:`ℜ`,reals:`ℝ`,rect:`▭`,REG:`®`,reg:`®`,ReverseElement:`∋`,ReverseEquilibrium:`⇋`,ReverseUpEquilibrium:`⥯`,rfisht:`⥽`,rfloor:`⌋`,Rfr:`ℜ`,rfr:`𝔯`,rHar:`⥤`,rhard:`⇁`,rharu:`⇀`,rharul:`⥬`,Rho:`Ρ`,rho:`ρ`,rhov:`ϱ`,RightAngleBracket:`⟩`,RightArrow:`→`,Rightarrow:`⇒`,rightarrow:`→`,RightArrowBar:`⇥`,RightArrowLeftArrow:`⇄`,rightarrowtail:`↣`,RightCeiling:`⌉`,RightDoubleBracket:`⟧`,RightDownTeeVector:`⥝`,RightDownVector:`⇂`,RightDownVectorBar:`⥕`,RightFloor:`⌋`,rightharpoondown:`⇁`,rightharpoonup:`⇀`,rightleftarrows:`⇄`,rightleftharpoons:`⇌`,rightrightarrows:`⇉`,rightsquigarrow:`↝`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTeeVector:`⥛`,rightthreetimes:`⋌`,RightTriangle:`⊳`,RightTriangleBar:`⧐`,RightTriangleEqual:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVector:`↾`,RightUpVectorBar:`⥔`,RightVector:`⇀`,RightVectorBar:`⥓`,ring:`˚`,risingdotseq:`≓`,rlarr:`⇄`,rlhar:`⇌`,rlm:``,rmoust:`⎱`,rmoustache:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,robrk:`⟧`,ropar:`⦆`,Ropf:`ℝ`,ropf:`𝕣`,roplus:`⨮`,rotimes:`⨵`,RoundImplies:`⥰`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rrarr:`⇉`,Rrightarrow:`⇛`,rsaquo:`›`,Rscr:`ℛ`,rscr:`𝓇`,Rsh:`↱`,rsh:`↱`,rsqb:`]`,rsquo:`’`,rsquor:`’`,rthree:`⋌`,rtimes:`⋊`,rtri:`▹`,rtrie:`⊵`,rtrif:`▸`,rtriltri:`⧎`,RuleDelayed:`⧴`,ruluhar:`⥨`,rx:`℞`,Sacute:`Ś`,sacute:`ś`,sbquo:`‚`,Sc:`⪼`,sc:`≻`,scap:`⪸`,Scaron:`Š`,scaron:`š`,sccue:`≽`,scE:`⪴`,sce:`⪰`,Scedil:`Ş`,scedil:`ş`,Scirc:`Ŝ`,scirc:`ŝ`,scnap:`⪺`,scnE:`⪶`,scnsim:`⋩`,scpolint:`⨓`,scsim:`≿`,Scy:`С`,scy:`с`,sdot:`⋅`,sdotb:`⊡`,sdote:`⩦`,searhk:`⤥`,seArr:`⇘`,searr:`↘`,searrow:`↘`,sect:`§`,semi:`;`,seswar:`⤩`,setminus:`∖`,setmn:`∖`,sext:`✶`,Sfr:`𝔖`,sfr:`𝔰`,sfrown:`⌢`,sharp:`♯`,SHCHcy:`Щ`,shchcy:`щ`,SHcy:`Ш`,shcy:`ш`,ShortDownArrow:`↓`,ShortLeftArrow:`←`,shortmid:`∣`,shortparallel:`∥`,ShortRightArrow:`→`,ShortUpArrow:`↑`,shy:``,Sigma:`Σ`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,sim:`∼`,simdot:`⩪`,sime:`≃`,simeq:`≃`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,slarr:`←`,SmallCircle:`∘`,smallsetminus:`∖`,smashp:`⨳`,smeparsl:`⧤`,smid:`∣`,smile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:`⪬︀`,SOFTcy:`Ь`,softcy:`ь`,sol:`/`,solb:`⧄`,solbar:`⌿`,Sopf:`𝕊`,sopf:`𝕤`,spades:`♠`,spadesuit:`♠`,spar:`∥`,sqcap:`⊓`,sqcaps:`⊓︀`,sqcup:`⊔`,sqcups:`⊔︀`,Sqrt:`√`,sqsub:`⊏`,sqsube:`⊑`,sqsubset:`⊏`,sqsubseteq:`⊑`,sqsup:`⊐`,sqsupe:`⊒`,sqsupset:`⊐`,sqsupseteq:`⊒`,squ:`□`,Square:`□`,square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,squarf:`▪`,squf:`▪`,srarr:`→`,Sscr:`𝒮`,sscr:`𝓈`,ssetmn:`∖`,ssmile:`⌣`,sstarf:`⋆`,Star:`⋆`,star:`☆`,starf:`★`,straightepsilon:`ϵ`,straightphi:`ϕ`,strns:`¯`,Sub:`⋐`,sub:`⊂`,subdot:`⪽`,subE:`⫅`,sube:`⊆`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subne:`⊊`,subplus:`⪿`,subrarr:`⥹`,Subset:`⋐`,subset:`⊂`,subseteq:`⊆`,subseteqq:`⫅`,SubsetEqual:`⊆`,subsetneq:`⊊`,subsetneqq:`⫋`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,succ:`≻`,succapprox:`⪸`,succcurlyeq:`≽`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,succeq:`⪰`,succnapprox:`⪺`,succneqq:`⪶`,succnsim:`⋩`,succsim:`≿`,SuchThat:`∋`,Sum:`∑`,sum:`∑`,sung:`♪`,Sup:`⋑`,sup:`⊃`,sup1:`¹`,sup2:`²`,sup3:`³`,supdot:`⪾`,supdsub:`⫘`,supE:`⫆`,supe:`⊇`,supedot:`⫄`,Superset:`⊃`,SupersetEqual:`⊇`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supne:`⊋`,supplus:`⫀`,Supset:`⋑`,supset:`⊃`,supseteq:`⊇`,supseteqq:`⫆`,supsetneq:`⊋`,supsetneqq:`⫌`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swarhk:`⤦`,swArr:`⇙`,swarr:`↙`,swarrow:`↙`,swnwar:`⤪`,szlig:`ß`,Tab:` `,target:`⌖`,Tau:`Τ`,tau:`τ`,tbrk:`⎴`,Tcaron:`Ť`,tcaron:`ť`,Tcedil:`Ţ`,tcedil:`ţ`,Tcy:`Т`,tcy:`т`,tdot:`⃛`,telrec:`⌕`,Tfr:`𝔗`,tfr:`𝔱`,there4:`∴`,Therefore:`∴`,therefore:`∴`,Theta:`Θ`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,thickapprox:`≈`,thicksim:`∼`,ThickSpace:` `,thinsp:` `,ThinSpace:` `,thkap:`≈`,thksim:`∼`,THORN:`Þ`,thorn:`þ`,Tilde:`∼`,tilde:`˜`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,times:`×`,timesb:`⊠`,timesbar:`⨱`,timesd:`⨰`,tint:`∭`,toea:`⤨`,top:`⊤`,topbot:`⌶`,topcir:`⫱`,Topf:`𝕋`,topf:`𝕥`,topfork:`⫚`,tosa:`⤩`,tprime:`‴`,TRADE:`™`,trade:`™`,triangle:`▵`,triangledown:`▿`,triangleleft:`◃`,trianglelefteq:`⊴`,triangleq:`≜`,triangleright:`▹`,trianglerighteq:`⊵`,tridot:`◬`,trie:`≜`,triminus:`⨺`,TripleDot:`⃛`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,Tscr:`𝒯`,tscr:`𝓉`,TScy:`Ц`,tscy:`ц`,TSHcy:`Ћ`,tshcy:`ћ`,Tstrok:`Ŧ`,tstrok:`ŧ`,twixt:`≬`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,Uacute:`Ú`,uacute:`ú`,Uarr:`↟`,uArr:`⇑`,uarr:`↑`,Uarrocir:`⥉`,Ubrcy:`Ў`,ubrcy:`ў`,Ubreve:`Ŭ`,ubreve:`ŭ`,Ucirc:`Û`,ucirc:`û`,Ucy:`У`,ucy:`у`,udarr:`⇅`,Udblac:`Ű`,udblac:`ű`,udhar:`⥮`,ufisht:`⥾`,Ufr:`𝔘`,ufr:`𝔲`,Ugrave:`Ù`,ugrave:`ù`,uHar:`⥣`,uharl:`↿`,uharr:`↾`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,Umacr:`Ū`,umacr:`ū`,uml:`¨`,UnderBar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,UnionPlus:`⊎`,Uogon:`Ų`,uogon:`ų`,Uopf:`𝕌`,uopf:`𝕦`,UpArrow:`↑`,Uparrow:`⇑`,uparrow:`↑`,UpArrowBar:`⤒`,UpArrowDownArrow:`⇅`,UpDownArrow:`↕`,Updownarrow:`⇕`,updownarrow:`↕`,UpEquilibrium:`⥮`,upharpoonleft:`↿`,upharpoonright:`↾`,uplus:`⊎`,UpperLeftArrow:`↖`,UpperRightArrow:`↗`,Upsi:`ϒ`,upsi:`υ`,upsih:`ϒ`,Upsilon:`Υ`,upsilon:`υ`,UpTee:`⊥`,UpTeeArrow:`↥`,upuparrows:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,Uring:`Ů`,uring:`ů`,urtri:`◹`,Uscr:`𝒰`,uscr:`𝓊`,utdot:`⋰`,Utilde:`Ũ`,utilde:`ũ`,utri:`▵`,utrif:`▴`,uuarr:`⇈`,Uuml:`Ü`,uuml:`ü`,uwangle:`⦧`,vangrt:`⦜`,varepsilon:`ϵ`,varkappa:`ϰ`,varnothing:`∅`,varphi:`ϕ`,varpi:`ϖ`,varpropto:`∝`,vArr:`⇕`,varr:`↕`,varrho:`ϱ`,varsigma:`ς`,varsubsetneq:`⊊︀`,varsubsetneqq:`⫋︀`,varsupsetneq:`⊋︀`,varsupsetneqq:`⫌︀`,vartheta:`ϑ`,vartriangleleft:`⊲`,vartriangleright:`⊳`,Vbar:`⫫`,vBar:`⫨`,vBarv:`⫩`,Vcy:`В`,vcy:`в`,VDash:`⊫`,Vdash:`⊩`,vDash:`⊨`,vdash:`⊢`,Vdashl:`⫦`,Vee:`⋁`,vee:`∨`,veebar:`⊻`,veeeq:`≚`,vellip:`⋮`,Verbar:`‖`,verbar:`|`,Vert:`‖`,vert:`|`,VerticalBar:`∣`,VerticalLine:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,VeryThinSpace:` `,Vfr:`𝔙`,vfr:`𝔳`,vltri:`⊲`,vnsub:`⊂⃒`,vnsup:`⊃⃒`,Vopf:`𝕍`,vopf:`𝕧`,vprop:`∝`,vrtri:`⊳`,Vscr:`𝒱`,vscr:`𝓋`,vsubnE:`⫋︀`,vsubne:`⊊︀`,vsupnE:`⫌︀`,vsupne:`⊋︀`,Vvdash:`⊪`,vzigzag:`⦚`,Wcirc:`Ŵ`,wcirc:`ŵ`,wedbar:`⩟`,Wedge:`⋀`,wedge:`∧`,wedgeq:`≙`,weierp:`℘`,Wfr:`𝔚`,wfr:`𝔴`,Wopf:`𝕎`,wopf:`𝕨`,wp:`℘`,wr:`≀`,wreath:`≀`,Wscr:`𝒲`,wscr:`𝓌`,xcap:`⋂`,xcirc:`◯`,xcup:`⋃`,xdtri:`▽`,Xfr:`𝔛`,xfr:`𝔵`,xhArr:`⟺`,xharr:`⟷`,Xi:`Ξ`,xi:`ξ`,xlArr:`⟸`,xlarr:`⟵`,xmap:`⟼`,xnis:`⋻`,xodot:`⨀`,Xopf:`𝕏`,xopf:`𝕩`,xoplus:`⨁`,xotime:`⨂`,xrArr:`⟹`,xrarr:`⟶`,Xscr:`𝒳`,xscr:`𝓍`,xsqcup:`⨆`,xuplus:`⨄`,xutri:`△`,xvee:`⋁`,xwedge:`⋀`,Yacute:`Ý`,yacute:`ý`,YAcy:`Я`,yacy:`я`,Ycirc:`Ŷ`,ycirc:`ŷ`,Ycy:`Ы`,ycy:`ы`,yen:`¥`,Yfr:`𝔜`,yfr:`𝔶`,YIcy:`Ї`,yicy:`ї`,Yopf:`𝕐`,yopf:`𝕪`,Yscr:`𝒴`,yscr:`𝓎`,YUcy:`Ю`,yucy:`ю`,Yuml:`Ÿ`,yuml:`ÿ`,Zacute:`Ź`,zacute:`ź`,Zcaron:`Ž`,zcaron:`ž`,Zcy:`З`,zcy:`з`,Zdot:`Ż`,zdot:`ż`,zeetrf:`ℨ`,ZeroWidthSpace:``,Zeta:`Ζ`,zeta:`ζ`,Zfr:`ℨ`,zfr:`𝔷`,ZHcy:`Ж`,zhcy:`ж`,zigrarr:`⇝`,Zopf:`ℤ`,zopf:`𝕫`,Zscr:`𝒵`,zscr:`𝓏`,zwj:``,zwnj:``}),e.entityMap=e.HTML_ENTITIES})),a=e((e=>{var t=n().NAMESPACE,r=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,i=RegExp(`[\\-\\.0-9`+r.source.slice(1,-1)+`\\u00B7\\u0300-\\u036F\\u203F-\\u2040]`),a=RegExp(`^`+r.source+i.source+`*(?::`+r.source+i.source+`*)?$`),o=0,s=1,c=2,l=3,u=4,d=5,f=6,p=7;function m(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,m)}m.prototype=Error(),m.prototype.name=m.name;function h(){}h.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),S(t,t={}),g(e,t,n,r,this.errorHandler),r.endDocument()}};function g(e,n,r,i,a){function o(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}else return String.fromCharCode(e)}function s(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(r,t)?r[t]:t.charAt(0)===`#`?o(parseInt(t.substr(1).replace(`x`,`0x`))):(a.error(`entity not found:`+e),e)}function c(t){if(t>S){var n=e.substring(S,t).replace(/&#?\w+;/g,s);p&&l(S),i.characters(n,0,t-S),S=t}}function l(t,n){for(;t>=d&&(n=f.exec(e));)u=n.index,d=u+n[0].length,p.lineNumber++;p.columnNumber=t-u+1}for(var u=0,d=0,f=/.*(?:\r\n?|\n)|.*$/g,p=i.locator,h=[{currentNSMap:n}],g={},S=0;;){try{var E=e.indexOf(`<`,S);if(E<0){if(!e.substr(S).match(/^\s*$/)){var D=i.doc,O=D.createTextNode(e.substr(S));D.appendChild(O),i.currentElement=O}return}switch(E>S&&c(E),e.charAt(E+1)){case`/`:var k=e.indexOf(`>`,E+3),A=e.substring(E+2,k).replace(/[ \t\n\r]+$/g,``),j=h.pop();k<0?(A=e.substring(E+2).replace(/[\s<].*/,``),a.error(`end tag name: `+A+` is not complete:`+j.tagName),k=E+1+A.length):A.match(/\s</)&&(A=A.replace(/[\s<].*/,``),a.error(`end tag name: `+A+` maybe not complete`),k=E+1+A.length);var M=j.localNSMap,N=j.tagName==A;if(N||j.tagName&&j.tagName.toLowerCase()==A.toLowerCase()){if(i.endElement(j.uri,j.localName,A),M)for(var P in M)Object.prototype.hasOwnProperty.call(M,P)&&i.endPrefixMapping(P);N||a.fatalError(`end tag name: `+A+` is not match the current start tagName:`+j.tagName)}else h.push(j);k++;break;case`?`:p&&l(E),k=w(e,E,i);break;case`!`:p&&l(E),k=C(e,E,i,a);break;default:p&&l(E);var F=new T,I=h[h.length-1].currentNSMap,k=v(e,E,F,I,s,a),L=F.length;if(!F.closed&&x(e,k,F.tagName,g)&&(F.closed=!0,r.nbsp||a.warning(`unclosed xml attribute`)),p&&L){for(var R=_(p,{}),z=0;z<L;z++){var B=F[z];l(B.offset),B.locator=_(p,{})}i.locator=R,y(F,i,I)&&h.push(F),i.locator=p}else y(F,i,I)&&h.push(F);t.isHTML(F.uri)&&!F.closed?k=b(e,k,F.tagName,s,i):k++}}catch(e){if(e instanceof m)throw e;a.error(`element parse error: `+e),k=-1}k>S?S=k:c(Math.max(E,S)+1)}}function _(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function v(e,n,r,i,a,m){function h(e,t,n){r.attributeNames.hasOwnProperty(e)&&m.fatalError(`Attribute `+e+` redefined`),r.addValue(e,t.replace(/[\t\n\r]/g,` `).replace(/&#?\w+;/g,a),n)}for(var g,_,v=++n,y=o;;){var b=e.charAt(v);switch(b){case`=`:if(y===s)g=e.slice(n,v),y=l;else if(y===c)y=l;else throw Error(`attribute equal must after attrName`);break;case`'`:case`"`:if(y===l||y===s)if(y===s&&(m.warning(`attribute value must after "="`),g=e.slice(n,v)),n=v+1,v=e.indexOf(b,n),v>0)_=e.slice(n,v),h(g,_,n-1),y=d;else throw Error(`attribute value no end '`+b+`' match`);else if(y==u)_=e.slice(n,v),h(g,_,n),m.warning(`attribute "`+g+`" missed start quot(`+b+`)!!`),n=v+1,y=d;else throw Error(`attribute value must after "="`);break;case`/`:switch(y){case o:r.setTagName(e.slice(n,v));case d:case f:case p:y=p,r.closed=!0;case u:case s:break;case c:r.closed=!0;break;default:throw Error(`attribute invalid close char('/')`)}break;case``:return m.error(`unexpected end of input`),y==o&&r.setTagName(e.slice(n,v)),v;case`>`:switch(y){case o:r.setTagName(e.slice(n,v));case d:case f:case p:break;case u:case s:_=e.slice(n,v),_.slice(-1)===`/`&&(r.closed=!0,_=_.slice(0,-1));case c:y===c&&(_=g),y==u?(m.warning(`attribute "`+_+`" missed quot(")!`),h(g,_,n)):((!t.isHTML(i[``])||!_.match(/^(?:disabled|checked|selected)$/i))&&m.warning(`attribute "`+_+`" missed value!! "`+_+`" instead!!`),h(_,_,n));break;case l:throw Error(`attribute value missed!!`)}return v;case``:b=` `;default:if(b<=` `)switch(y){case o:r.setTagName(e.slice(n,v)),y=f;break;case s:g=e.slice(n,v),y=c;break;case u:var _=e.slice(n,v);m.warning(`attribute "`+_+`" missed quot(")!!`),h(g,_,n);case d:y=f;break}else switch(y){case c:r.tagName,(!t.isHTML(i[``])||!g.match(/^(?:disabled|checked|selected)$/i))&&m.warning(`attribute "`+g+`" missed value!! "`+g+`" instead2!!`),h(g,g,n),n=v,y=s;break;case d:m.warning(`attribute space is required"`+g+`"!!`);case f:y=s,n=v;break;case l:y=u,n=v;break;case p:throw Error(`elements closed character '/' and '>' must be connected to`)}}v++}}function y(e,n,r){for(var i=e.tagName,a=null,o=e.length;o--;){var s=e[o],c=s.qName,l=s.value,u=c.indexOf(`:`);if(u>0)var d=s.prefix=c.slice(0,u),f=c.slice(u+1),p=d===`xmlns`&&f;else f=c,d=null,p=c===`xmlns`&&``;s.localName=f,p!==!1&&(a??(a={},S(r,r={})),r[p]=a[p]=l,s.uri=t.XMLNS,n.startPrefixMapping(p,l))}for(var o=e.length;o--;){s=e[o];var d=s.prefix;d&&(d===`xml`&&(s.uri=t.XML),d!==`xmlns`&&(s.uri=r[d||``]))}var u=i.indexOf(`:`);u>0?(d=e.prefix=i.slice(0,u),f=e.localName=i.slice(u+1)):(d=null,f=e.localName=i);var m=e.uri=r[d||``];if(n.startElement(m,f,i,e),e.closed){if(n.endElement(m,f,i),a)for(d in a)Object.prototype.hasOwnProperty.call(a,d)&&n.endPrefixMapping(d)}else return e.currentNSMap=r,e.localNSMap=a,!0}function b(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf(`</`+n+`>`,t),o=e.substring(t+1,a);if(/[&<]/.test(o))return/^script$/i.test(n)?(i.characters(o,0,o.length),a):(o=o.replace(/&#?\w+;/g,r),i.characters(o,0,o.length),a)}return t+1}function x(e,t,n,r){var i=r[n];return i??(i=e.lastIndexOf(`</`+n+`>`),i<t&&(i=e.lastIndexOf(`</`+n)),r[n]=i),i<t}function S(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function C(e,t,n,r){switch(e.charAt(t+2)){case`-`:if(e.charAt(t+3)===`-`){var i=e.indexOf(`-->`,t+4);return i>t?(n.comment(e,t+4,i-t-4),i+3):(r.error(`Unclosed comment`),-1)}else return-1;default:if(e.substr(t+3,6)==`CDATA[`){var i=e.indexOf(`]]>`,t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var a=E(e,t),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var s=a[1][0],c=!1,l=!1;o>3&&(/^public$/i.test(a[2][0])?(c=a[3][0],l=o>4&&a[4][0]):/^system$/i.test(a[2][0])&&(l=a[3][0]));var u=a[o-1];return n.startDTD(s,c,l),n.endDTD(),u.index+u[0].length}}return-1}function w(e,t,n){var r=e.indexOf(`?>`,t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)$/);return i?(i[0].length,n.processingInstruction(i[1],i[2]),r+2):-1}return-1}function T(){this.attributeNames={}}T.prototype={setTagName:function(e){if(!a.test(e))throw Error(`invalid tagName:`+e);this.tagName=e},addValue:function(e,t,n){if(!a.test(e))throw Error(`invalid attribute:`+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}};function E(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}e.XMLReader=h,e.ParseError=m})),o=e((e=>{var t=n(),o=r(),s=i(),c=a(),l=o.DOMImplementation,u=t.NAMESPACE,d=c.ParseError,f=c.XMLReader;function p(e){return e.replace(/\r[\n\u0085]/g,`
|
|
3
|
+
`).replace(/[\r\u0085\u2028]/g,`
|
|
4
|
+
`)}function m(e){this.options=e||{locator:{}}}m.prototype.parseFromString=function(e,t){var n=this.options,r=new f,i=n.domBuilder||new g,a=n.errorHandler,o=n.locator,c=n.xmlns||{},l=/\/x?html?$/.test(t),d=l?s.HTML_ENTITIES:s.XML_ENTITIES;o&&i.setDocumentLocator(o),r.errorHandler=h(a,i,o),r.domBuilder=n.domBuilder||i,l&&(c[``]=u.HTML),c.xml=c.xml||u.XML;var m=n.normalizeLineEndings||p;return e&&typeof e==`string`?r.parse(m(e),c,d):r.errorHandler.error(`invalid doc source`),i.doc};function h(e,t,n){if(!e){if(t instanceof g)return t;e=t}var r={},i=e instanceof Function;n=n||{};function a(t){var a=e[t];!a&&i&&(a=e.length==2?function(n){e(t,n)}:e),r[t]=a&&function(e){a(`[xmldom `+t+`] `+e+v(n))}||function(){}}return a(`warning`),a(`error`),a(`fatalError`),r}function g(){this.cdata=!1}function _(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}g.prototype={startDocument:function(){this.doc=new l().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),o=r.length;b(this,a),this.currentElement=a,this.locator&&_(this.locator,a);for(var s=0;s<o;s++){var e=r.getURI(s),c=r.getValue(s),n=r.getQName(s),l=i.createAttributeNS(e,n);this.locator&&_(r.getLocator(s),l),l.value=l.nodeValue=c,a.setAttributeNode(l)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName,this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&_(this.locator,n),b(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=y.apply(this,arguments),e){if(this.cdata)var r=this.doc.createCDATASection(e);else var r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&_(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=y.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&_(this.locator,r),b(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&_(this.locator,i),b(this,i),this.doc.doctype=i}},warning:function(e){console.warn(`[xmldom warning] `+e,v(this.locator))},error:function(e){console.error(`[xmldom error] `+e,v(this.locator))},fatalError:function(e){throw new d(e,this.locator)}};function v(e){if(e)return`
|
|
5
|
+
@`+(e.systemId||``)+`#[line:`+e.lineNumber+`,col:`+e.columnNumber+`]`}function y(e,t,n){return typeof e==`string`?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+``:e}`endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl`.replace(/\w+/g,function(e){g.prototype[e]=function(){return null}});function b(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}e.__DOMHandler=g,e.normalizeLineEndings=p,e.DOMParser=m})),s=e((e=>{var t=r();e.DOMImplementation=t.DOMImplementation,e.XMLSerializer=t.XMLSerializer,e.DOMParser=o().DOMParser})),c=e((e=>{var{DOMParser:t}=s();e.parse=l;var n=3,r=4,i=8;function a(e){return e.nodeType===n||e.nodeType===i||e.nodeType===r}function o(e){return!e.childNodes||e.childNodes.length===0}function c(e,t){if(!e)throw Error(t)}function l(e){var n=new t().parseFromString(e,`text/xml`);c(n.documentElement.nodeName===`plist`,`malformed document. First element should be <plist>`);var r=u(n.documentElement);return r.length==1&&(r=r[0]),r}function u(e){var t,i,s,l,d,f,p;if(!e)return null;if(e.nodeName===`plist`){if(l=[],o(e))return l;for(t=0;t<e.childNodes.length;t++)a(e.childNodes[t])||l.push(u(e.childNodes[t]));return l}else if(e.nodeName===`dict`){if(i={},s=null,f=0,o(e))return i;for(t=0;t<e.childNodes.length;t++)a(e.childNodes[t])||(f%2==0?(c(e.childNodes[t].nodeName===`key`,`Missing key while parsing <dict/>.`),s=u(e.childNodes[t])):(c(e.childNodes[t].nodeName!==`key`,`Unexpected key "`+u(e.childNodes[t])+`" while parsing <dict/>.`),i[s]=u(e.childNodes[t])),f+=1);return f%2==1&&(i[s]=``),i}else if(e.nodeName===`array`){if(l=[],o(e))return l;for(t=0;t<e.childNodes.length;t++)a(e.childNodes[t])||(d=u(e.childNodes[t]),d!=null&&l.push(d));return l}else if(e.nodeName!==`#text`){if(e.nodeName===`key`)return o(e)?``:(c(e.childNodes[0].nodeValue!==`__proto__`,`__proto__ keys can lead to prototype pollution. More details on CVE-2022-22912`),e.childNodes[0].nodeValue);if(e.nodeName===`string`){if(d=``,o(e))return d;for(t=0;t<e.childNodes.length;t++){var p=e.childNodes[t].nodeType;(p===n||p===r)&&(d+=e.childNodes[t].nodeValue)}return d}else if(e.nodeName===`integer`)return c(!o(e),`Cannot parse "" as integer.`),parseInt(e.childNodes[0].nodeValue,10);else if(e.nodeName===`real`){for(c(!o(e),`Cannot parse "" as real.`),d=``,t=0;t<e.childNodes.length;t++)e.childNodes[t].nodeType===n&&(d+=e.childNodes[t].nodeValue);return parseFloat(d)}else if(e.nodeName===`data`){if(d=``,o(e))return Buffer.from(d,`base64`);for(t=0;t<e.childNodes.length;t++)e.childNodes[t].nodeType===n&&(d+=e.childNodes[t].nodeValue.replace(/\s+/g,``));return Buffer.from(d,`base64`)}else if(e.nodeName===`date`)return c(!o(e),`Cannot parse "" as Date.`),new Date(e.childNodes[0].nodeValue);else if(e.nodeName===`null`)return null;else if(e.nodeName===`true`)return!0;else if(e.nodeName===`false`)return!1;else throw Error(`Invalid PLIST tag `+e.nodeName)}}})),l=e(((e,t)=>{(function(){var e,n,r,i,a,o,s,c={}.hasOwnProperty;e=function(e,...t){var n,r,i,o;if(a(Object.assign))Object.assign.apply(null,arguments);else for(n=0,i=t.length;n<i;n++)if(o=t[n],o!=null)for(r in o)c.call(o,r)&&(e[r]=o[r]);return e},a=function(e){return!!e&&Object.prototype.toString.call(e)===`[object Function]`},o=function(e){var t;return!!e&&((t=typeof e)==`function`||t===`object`)},r=function(e){return a(Array.isArray)?Array.isArray(e):Object.prototype.toString.call(e)===`[object Array]`},i=function(e){var t;if(r(e))return!e.length;for(t in e)if(c.call(e,t))return!1;return!0},s=function(e){var t,n;return o(e)&&(n=Object.getPrototypeOf(e))&&(t=n.constructor)&&typeof t==`function`&&t instanceof t&&Function.prototype.toString.call(t)===Function.prototype.toString.call(Object)},n=function(e){return a(e.valueOf)?e.valueOf():e},t.exports.assign=e,t.exports.isFunction=a,t.exports.isObject=o,t.exports.isArray=r,t.exports.isEmpty=i,t.exports.isPlainObject=s,t.exports.getValue=n}).call(e)})),u=e(((e,t)=>{(function(){t.exports=class{hasFeature(e,t){return!0}createDocumentType(e,t,n){throw Error(`This DOM method is not implemented.`)}createDocument(e,t,n){throw Error(`This DOM method is not implemented.`)}createHTMLDocument(e){throw Error(`This DOM method is not implemented.`)}getFeature(e,t){throw Error(`This DOM method is not implemented.`)}}}).call(e)})),d=e(((e,t)=>{(function(){t.exports=class{constructor(){}handleError(e){throw Error(e)}}}).call(e)})),f=e(((e,t)=>{(function(){t.exports=(function(){class e{constructor(e){this.arr=e||[]}item(e){return this.arr[e]||null}contains(e){return this.arr.indexOf(e)!==-1}}return Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e}).call(this)}).call(e)})),p=e(((e,t)=>{(function(){var e=d(),n=f();t.exports=(function(){class t{constructor(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":``,"schema-type":``,"split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}getParameter(e){return this.params.hasOwnProperty(e)?this.params[e]:null}canSetParameter(e,t){return!0}setParameter(e,t){return t==null?delete this.params[e]:this.params[e]=t}}return Object.defineProperty(t.prototype,"parameterNames",{get:function(){return new n(Object.keys(this.defaultParams))}}),t}).call(this)}).call(e)})),m=e(((e,t)=>{(function(){t.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(e)})),h=e(((e,t)=>{(function(){var e=m();N(),t.exports=(function(){class t{constructor(t,n,r){if(this.parent=t,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),n==null)throw Error(`Missing attribute name. `+this.debugInfo(n));this.name=this.stringify.name(n),this.value=this.stringify.attValue(r),this.type=e.Attribute,this.isId=!1,this.schemaTypeInfo=null}clone(){return Object.create(this)}toString(e){return this.options.writer.attribute(this,this.options.writer.filterOptions(e))}debugInfo(e){return e=e||this.name,e==null?`parent: <`+this.parent.name+`>`:`attribute: {`+e+`}, parent: <`+this.parent.name+`>`}isEqualNode(e){return!(e.namespaceURI!==this.namespaceURI||e.prefix!==this.prefix||e.localName!==this.localName||e.value!==this.value)}}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(t.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||``}}),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return``}}),Object.defineProperty(t.prototype,"prefix",{get:function(){return``}}),Object.defineProperty(t.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"specified",{get:function(){return!0}}),t}).call(this)}).call(e)})),g=e(((e,t)=>{(function(){t.exports=(function(){class e{constructor(e){this.nodes=e}clone(){return this.nodes=null}getNamedItem(e){return this.nodes[e]}setNamedItem(e){var t=this.nodes[e.nodeName];return this.nodes[e.nodeName]=e,t||null}removeNamedItem(e){var t=this.nodes[e];return delete this.nodes[e],t||null}item(e){return this.nodes[Object.keys(this.nodes)[e]]||null}getNamedItemNS(e,t){throw Error(`This DOM method is not implemented.`)}setNamedItemNS(e){throw Error(`This DOM method is not implemented.`)}removeNamedItemNS(e,t){throw Error(`This DOM method is not implemented.`)}}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),e}).call(this)}).call(e)})),_=e(((e,t)=>{(function(){var e,n,r,i,a,o,s,c={}.hasOwnProperty;({isObject:s,isFunction:o,getValue:a}=l()),i=N(),e=m(),n=h(),r=g(),t.exports=(function(){class t extends i{constructor(t,n,r){var i,a,o,s;if(super(t),n==null)throw Error(`Missing element name. `+this.debugInfo());if(this.name=this.stringify.name(n),this.type=e.Element,this.attribs={},this.schemaTypeInfo=null,r!=null&&this.attribute(r),t.type===e.Document&&(this.isRoot=!0,this.documentObject=t,t.rootObject=this,t.children)){for(s=t.children,a=0,o=s.length;a<o;a++)if(i=s[a],i.type===e.DocType){i.name=this.name;break}}}clone(){var e,t,n=Object.create(this),r;for(t in n.isRoot&&(n.documentObject=null),n.attribs={},r=this.attribs,r)c.call(r,t)&&(e=r[t],n.attribs[t]=e.clone());return n.children=[],this.children.forEach(function(e){var t=e.clone();return t.parent=n,n.children.push(t)}),n}attribute(e,t){var r,i;if(e!=null&&(e=a(e)),s(e))for(r in e)c.call(e,r)&&(i=e[r],this.attribute(r,i));else o(t)&&(t=t.apply()),this.options.keepNullAttributes&&t==null?this.attribs[e]=new n(this,e,``):t!=null&&(this.attribs[e]=new n(this,e,t));return this}removeAttribute(e){var t,n,r;if(e==null)throw Error(`Missing attribute name. `+this.debugInfo());if(e=a(e),Array.isArray(e))for(n=0,r=e.length;n<r;n++)t=e[n],delete this.attribs[t];else delete this.attribs[e];return this}toString(e){return this.options.writer.element(this,this.options.writer.filterOptions(e))}att(e,t){return this.attribute(e,t)}a(e,t){return this.attribute(e,t)}getAttribute(e){return this.attribs.hasOwnProperty(e)?this.attribs[e].value:null}setAttribute(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}getAttributeNode(e){return this.attribs.hasOwnProperty(e)?this.attribs[e]:null}setAttributeNode(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}removeAttributeNode(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}getElementsByTagName(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}getAttributeNS(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}setAttributeNS(e,t,n){throw Error(`This DOM method is not implemented.`+this.debugInfo())}removeAttributeNS(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}getAttributeNodeNS(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}setAttributeNodeNS(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}getElementsByTagNameNS(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}hasAttribute(e){return this.attribs.hasOwnProperty(e)}hasAttributeNS(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}setIdAttribute(e,t){return this.attribs.hasOwnProperty(e)?this.attribs[e].isId:t}setIdAttributeNS(e,t,n){throw Error(`This DOM method is not implemented.`+this.debugInfo())}setIdAttributeNode(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}getElementsByTagName(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}getElementsByTagNameNS(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}getElementsByClassName(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}isEqualNode(e){var t,n,r;if(!super.isEqualNode(e)||e.namespaceURI!==this.namespaceURI||e.prefix!==this.prefix||e.localName!==this.localName||e.attribs.length!==this.attribs.length)return!1;for(t=n=0,r=this.attribs.length-1;0<=r?n<=r:n>=r;t=0<=r?++n:--n)if(!this.attribs[t].isEqualNode(e.attribs[t]))return!1;return!0}}return Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return``}}),Object.defineProperty(t.prototype,"prefix",{get:function(){return``}}),Object.defineProperty(t.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"id",{get:function(){throw Error(`This DOM method is not implemented.`+this.debugInfo())}}),Object.defineProperty(t.prototype,"className",{get:function(){throw Error(`This DOM method is not implemented.`+this.debugInfo())}}),Object.defineProperty(t.prototype,"classList",{get:function(){throw Error(`This DOM method is not implemented.`+this.debugInfo())}}),Object.defineProperty(t.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new r(this.attribs)),this.attributeMap}}),t}).call(this)}).call(e)})),v=e(((e,t)=>{(function(){var e=N();t.exports=(function(){class t extends e{constructor(e){super(e),this.value=``}clone(){return Object.create(this)}substringData(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}appendData(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}insertData(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}deleteData(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}replaceData(e,t,n){throw Error(`This DOM method is not implemented.`+this.debugInfo())}isEqualNode(e){return!(!super.isEqualNode(e)||e.data!==this.data)}}return Object.defineProperty(t.prototype,"data",{get:function(){return this.value},set:function(e){return this.value=e||``}}),Object.defineProperty(t.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||``}}),t}).call(this)}).call(e)})),y=e(((e,t)=>{(function(){var e=m(),n=v();t.exports=class extends n{constructor(t,n){if(super(t),n==null)throw Error(`Missing CDATA text. `+this.debugInfo());this.name=`#cdata-section`,this.type=e.CData,this.value=this.stringify.cdata(n)}clone(){return Object.create(this)}toString(e){return this.options.writer.cdata(this,this.options.writer.filterOptions(e))}}}).call(e)})),b=e(((e,t)=>{(function(){var e=m(),n=v();t.exports=class extends n{constructor(t,n){if(super(t),n==null)throw Error(`Missing comment text. `+this.debugInfo());this.name=`#comment`,this.type=e.Comment,this.value=this.stringify.comment(n)}clone(){return Object.create(this)}toString(e){return this.options.writer.comment(this,this.options.writer.filterOptions(e))}}}).call(e)})),x=e(((e,t)=>{(function(){var e,n,r;({isObject:r}=l()),n=N(),e=m(),t.exports=class extends n{constructor(t,n,i,a){super(t),r(n)&&({version:n,encoding:i,standalone:a}=n),n||(n=`1.0`),this.type=e.Declaration,this.version=this.stringify.xmlVersion(n),i!=null&&(this.encoding=this.stringify.xmlEncoding(i)),a!=null&&(this.standalone=this.stringify.xmlStandalone(a))}toString(e){return this.options.writer.declaration(this,this.options.writer.filterOptions(e))}}}).call(e)})),S=e(((e,t)=>{(function(){var e,n=N();e=m(),t.exports=class extends n{constructor(t,n,r,i,a,o){if(super(t),n==null)throw Error(`Missing DTD element name. `+this.debugInfo());if(r==null)throw Error(`Missing DTD attribute name. `+this.debugInfo(n));if(!i)throw Error(`Missing DTD attribute type. `+this.debugInfo(n));if(!a)throw Error(`Missing DTD attribute default. `+this.debugInfo(n));if(a.indexOf(`#`)!==0&&(a=`#`+a),!a.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw Error(`Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. `+this.debugInfo(n));if(o&&!a.match(/^(#FIXED|#DEFAULT)$/))throw Error(`Default value only applies to #FIXED or #DEFAULT. `+this.debugInfo(n));this.elementName=this.stringify.name(n),this.type=e.AttributeDeclaration,this.attributeName=this.stringify.name(r),this.attributeType=this.stringify.dtdAttType(i),o&&(this.defaultValue=this.stringify.dtdAttDefault(o)),this.defaultValueType=a}toString(e){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(e))}}}).call(e)})),C=e(((e,t)=>{(function(){var e,n,r;({isObject:r}=l()),n=N(),e=m(),t.exports=(function(){class t extends n{constructor(t,n,i,a){if(super(t),i==null)throw Error(`Missing DTD entity name. `+this.debugInfo(i));if(a==null)throw Error(`Missing DTD entity value. `+this.debugInfo(i));if(this.pe=!!n,this.name=this.stringify.name(i),this.type=e.EntityDeclaration,!r(a))this.value=this.stringify.dtdEntityValue(a),this.internal=!0;else{if(!a.pubID&&!a.sysID)throw Error(`Public and/or system identifiers are required for an external entity. `+this.debugInfo(i));if(a.pubID&&!a.sysID)throw Error(`System identifier is required for a public external entity. `+this.debugInfo(i));if(this.internal=!1,a.pubID!=null&&(this.pubID=this.stringify.dtdPubID(a.pubID)),a.sysID!=null&&(this.sysID=this.stringify.dtdSysID(a.sysID)),a.nData!=null&&(this.nData=this.stringify.dtdNData(a.nData)),this.pe&&this.nData)throw Error(`Notation declaration is not allowed in a parameter entity. `+this.debugInfo(i))}}toString(e){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(e))}}return Object.defineProperty(t.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(t.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(t.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(t.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(t.prototype,"xmlVersion",{get:function(){return null}}),t}).call(this)}).call(e)})),w=e(((e,t)=>{(function(){var e,n=N();e=m(),t.exports=class extends n{constructor(t,n,r){if(super(t),n==null)throw Error(`Missing DTD element name. `+this.debugInfo());r||(r=`(#PCDATA)`),Array.isArray(r)&&(r=`(`+r.join(`,`)+`)`),this.name=this.stringify.name(n),this.type=e.ElementDeclaration,this.value=this.stringify.dtdElementValue(r)}toString(e){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(e))}}}).call(e)})),T=e(((e,t)=>{(function(){var e,n=N();e=m(),t.exports=(function(){class t extends n{constructor(t,n,r){if(super(t),n==null)throw Error(`Missing DTD notation name. `+this.debugInfo(n));if(!r.pubID&&!r.sysID)throw Error(`Public or system identifiers are required for an external entity. `+this.debugInfo(n));this.name=this.stringify.name(n),this.type=e.NotationDeclaration,r.pubID!=null&&(this.pubID=this.stringify.dtdPubID(r.pubID)),r.sysID!=null&&(this.sysID=this.stringify.dtdSysID(r.sysID))}toString(e){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(e))}}return Object.defineProperty(t.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this.sysID}}),t}).call(this)}).call(e)})),E=e(((e,t)=>{(function(){var e,n,r,i,a,o,s,c;({isObject:c}=l()),s=N(),e=m(),n=S(),i=C(),r=w(),a=T(),o=g(),t.exports=(function(){class t extends s{constructor(t,n,r){var i,a,o,s;if(super(t),this.type=e.DocType,t.children){for(s=t.children,a=0,o=s.length;a<o;a++)if(i=s[a],i.type===e.Element){this.name=i.name;break}}this.documentObject=t,c(n)&&({pubID:n,sysID:r}=n),r??([r,n]=[n,r]),n!=null&&(this.pubID=this.stringify.dtdPubID(n)),r!=null&&(this.sysID=this.stringify.dtdSysID(r))}element(e,t){var n=new r(this,e,t);return this.children.push(n),this}attList(e,t,r,i,a){var o=new n(this,e,t,r,i,a);return this.children.push(o),this}entity(e,t){var n=new i(this,!1,e,t);return this.children.push(n),this}pEntity(e,t){var n=new i(this,!0,e,t);return this.children.push(n),this}notation(e,t){var n=new a(this,e,t);return this.children.push(n),this}toString(e){return this.options.writer.docType(this,this.options.writer.filterOptions(e))}ele(e,t){return this.element(e,t)}att(e,t,n,r,i){return this.attList(e,t,n,r,i)}ent(e,t){return this.entity(e,t)}pent(e,t){return this.pEntity(e,t)}not(e,t){return this.notation(e,t)}up(){return this.root()||this.documentObject}isEqualNode(e){return!(!super.isEqualNode(e)||e.name!==this.name||e.publicId!==this.publicId||e.systemId!==this.systemId)}}return Object.defineProperty(t.prototype,"entities",{get:function(){var t,n,r,i={},a=this.children;for(n=0,r=a.length;n<r;n++)t=a[n],t.type===e.EntityDeclaration&&!t.pe&&(i[t.name]=t);return new o(i)}}),Object.defineProperty(t.prototype,"notations",{get:function(){var t,n,r,i={},a=this.children;for(n=0,r=a.length;n<r;n++)t=a[n],t.type===e.NotationDeclaration&&(i[t.name]=t);return new o(i)}}),Object.defineProperty(t.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(t.prototype,"internalSubset",{get:function(){throw Error(`This DOM method is not implemented.`+this.debugInfo())}}),t}).call(this)}).call(e)})),D=e(((e,t)=>{(function(){var e=m(),n=N();t.exports=class extends n{constructor(t,n){if(super(t),n==null)throw Error(`Missing raw text. `+this.debugInfo());this.type=e.Raw,this.value=this.stringify.raw(n)}clone(){return Object.create(this)}toString(e){return this.options.writer.raw(this,this.options.writer.filterOptions(e))}}}).call(e)})),O=e(((e,t)=>{(function(){var e=m(),n=v();t.exports=(function(){class t extends n{constructor(t,n){if(super(t),n==null)throw Error(`Missing element text. `+this.debugInfo());this.name=`#text`,this.type=e.Text,this.value=this.stringify.text(n)}clone(){return Object.create(this)}toString(e){return this.options.writer.text(this,this.options.writer.filterOptions(e))}splitText(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}replaceWholeText(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}}return Object.defineProperty(t.prototype,"isElementContentWhitespace",{get:function(){throw Error(`This DOM method is not implemented.`+this.debugInfo())}}),Object.defineProperty(t.prototype,"wholeText",{get:function(){var e,t,n=``;for(t=this.previousSibling;t;)n=t.data+n,t=t.previousSibling;for(n+=this.data,e=this.nextSibling;e;)n+=e.data,e=e.nextSibling;return n}}),t}).call(this)}).call(e)})),k=e(((e,t)=>{(function(){var e=m(),n=v();t.exports=class extends n{constructor(t,n,r){if(super(t),n==null)throw Error(`Missing instruction target. `+this.debugInfo());this.type=e.ProcessingInstruction,this.target=this.stringify.insTarget(n),this.name=this.target,r&&(this.value=this.stringify.insValue(r))}clone(){return Object.create(this)}toString(e){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(e))}isEqualNode(e){return!(!super.isEqualNode(e)||e.target!==this.target)}}}).call(e)})),A=e(((e,t)=>{(function(){var e,n=N();e=m(),t.exports=class extends n{constructor(t){super(t),this.type=e.Dummy}clone(){return Object.create(this)}toString(e){return``}}}).call(e)})),j=e(((e,t)=>{(function(){t.exports=(function(){class e{constructor(e){this.nodes=e}clone(){return this.nodes=null}item(e){return this.nodes[e]||null}}return Object.defineProperty(e.prototype,"length",{get:function(){return this.nodes.length||0}}),e}).call(this)}).call(e)})),M=e(((e,t)=>{(function(){t.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(e)})),N=e(((e,t)=>{(function(){var e,n,r,i,a,o,s,c,u,d,f,p,h,v,S,C,w={}.hasOwnProperty,T=[].splice;({isObject:C,isFunction:S,isEmpty:v,getValue:h}=l()),c=null,r=null,i=null,a=null,o=null,f=null,p=null,d=null,s=null,n=null,u=null,e=null,t.exports=(function(){class t{constructor(t){this.parent=t,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,c||(c=_(),r=y(),i=b(),a=x(),o=E(),f=D(),p=O(),d=k(),s=A(),n=m(),u=j(),g(),e=M())}setParent(e){var t,n,r,i,a;for(this.parent=e,e&&(this.options=e.options,this.stringify=e.stringify),i=this.children,a=[],n=0,r=i.length;n<r;n++)t=i[n],a.push(t.setParent(this));return a}element(e,t,n){var r,i,a,o,s,c=null,l,u,d;if(t===null&&n==null&&([t,n]=[{},null]),t??(t={}),t=h(t),C(t)||([n,t]=[t,n]),e!=null&&(e=h(e)),Array.isArray(e))for(a=0,l=e.length;a<l;a++)i=e[a],c=this.element(i);else if(S(e))c=this.element(e.apply());else if(C(e)){for(s in e)if(w.call(e,s))if(d=e[s],S(d)&&(d=d.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&s.indexOf(this.stringify.convertAttKey)===0)c=this.attribute(s.substr(this.stringify.convertAttKey.length),d);else if(!this.options.separateArrayItems&&Array.isArray(d)&&v(d))c=this.dummy();else if(C(d)&&v(d))c=this.element(s);else if(!this.options.keepNullNodes&&d==null)c=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(d))for(o=0,u=d.length;o<u;o++)i=d[o],r={},r[s]=i,c=this.element(r);else C(d)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&s.indexOf(this.stringify.convertTextKey)===0?c=this.element(d):(c=this.element(s),c.element(d)):c=this.element(s,d)}else c=!this.options.keepNullNodes&&n===null?this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&e.indexOf(this.stringify.convertTextKey)===0?this.text(n):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&e.indexOf(this.stringify.convertCDataKey)===0?this.cdata(n):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&e.indexOf(this.stringify.convertCommentKey)===0?this.comment(n):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&e.indexOf(this.stringify.convertRawKey)===0?this.raw(n):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&e.indexOf(this.stringify.convertPIKey)===0?this.instruction(e.substr(this.stringify.convertPIKey.length),n):this.node(e,t,n);if(c==null)throw Error(`Could not create any elements with: `+e+`. `+this.debugInfo());return c}insertBefore(e,t,n){var r,i,a,o,s;if(e?.type)return a=e,o=t,a.setParent(this),o?(i=children.indexOf(o),s=children.splice(i),children.push(a),Array.prototype.push.apply(children,s)):children.push(a),a;if(this.isRoot)throw Error(`Cannot insert elements at root level. `+this.debugInfo(e));return i=this.parent.children.indexOf(this),s=this.parent.children.splice(i),r=this.parent.element(e,t,n),Array.prototype.push.apply(this.parent.children,s),r}insertAfter(e,t,n){var r,i,a;if(this.isRoot)throw Error(`Cannot insert elements at root level. `+this.debugInfo(e));return i=this.parent.children.indexOf(this),a=this.parent.children.splice(i+1),r=this.parent.element(e,t,n),Array.prototype.push.apply(this.parent.children,a),r}remove(){var e;if(this.isRoot)throw Error(`Cannot remove the root element. `+this.debugInfo());return e=this.parent.children.indexOf(this),T.apply(this.parent.children,[e,e-e+1]),this.parent}node(e,t,n){var r;return e!=null&&(e=h(e)),t||(t={}),t=h(t),C(t)||([n,t]=[t,n]),r=new c(this,e,t),n!=null&&r.text(n),this.children.push(r),r}text(e){var t;return C(e)&&this.element(e),t=new p(this,e),this.children.push(t),this}cdata(e){var t=new r(this,e);return this.children.push(t),this}comment(e){var t=new i(this,e);return this.children.push(t),this}commentBefore(e){var t=this.parent.children.indexOf(this),n=this.parent.children.splice(t);return this.parent.comment(e),Array.prototype.push.apply(this.parent.children,n),this}commentAfter(e){var t=this.parent.children.indexOf(this),n=this.parent.children.splice(t+1);return this.parent.comment(e),Array.prototype.push.apply(this.parent.children,n),this}raw(e){var t=new f(this,e);return this.children.push(t),this}dummy(){return new s(this)}instruction(e,t){var n,r,i,a,o;if(e!=null&&(e=h(e)),t!=null&&(t=h(t)),Array.isArray(e))for(a=0,o=e.length;a<o;a++)n=e[a],this.instruction(n);else if(C(e))for(n in e)w.call(e,n)&&(r=e[n],this.instruction(n,r));else S(t)&&(t=t.apply()),i=new d(this,e,t),this.children.push(i);return this}instructionBefore(e,t){var n=this.parent.children.indexOf(this),r=this.parent.children.splice(n);return this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,r),this}instructionAfter(e,t){var n=this.parent.children.indexOf(this),r=this.parent.children.splice(n+1);return this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,r),this}declaration(e,t,r){var i=this.document(),o=new a(i,e,t,r);return i.children.length===0?i.children.unshift(o):i.children[0].type===n.Declaration?i.children[0]=o:i.children.unshift(o),i.root()||i}dtd(e,t){var r,i=this.document(),a=new o(i,e,t),s,c,l,u,d,f=i.children,p;for(s=c=0,u=f.length;c<u;s=++c)if(r=f[s],r.type===n.DocType)return i.children[s]=a,a;for(p=i.children,s=l=0,d=p.length;l<d;s=++l)if(r=p[s],r.isRoot)return i.children.splice(s,0,a),a;return i.children.push(a),a}up(){if(this.isRoot)throw Error(`The root node has no parent. Use doc() if you need to get the document object.`);return this.parent}root(){for(var e=this;e;)if(e.type===n.Document)return e.rootObject;else if(e.isRoot)return e;else e=e.parent}document(){for(var e=this;e;)if(e.type===n.Document)return e;else e=e.parent}end(e){return this.document().end(e)}prev(){var e=this.parent.children.indexOf(this);if(e<1)throw Error(`Already at the first node. `+this.debugInfo());return this.parent.children[e-1]}next(){var e=this.parent.children.indexOf(this);if(e===-1||e===this.parent.children.length-1)throw Error(`Already at the last node. `+this.debugInfo());return this.parent.children[e+1]}importDocument(e){var t,r=e.root().clone(),i,a,o;if(r.parent=this,r.isRoot=!1,this.children.push(r),this.type===n.Document&&(r.isRoot=!0,r.documentObject=this,this.rootObject=r,this.children)){for(o=this.children,i=0,a=o.length;i<a;i++)if(t=o[i],t.type===n.DocType){t.name=r.name;break}}return this}debugInfo(e){return e=e||this.name,e==null&&!this.parent?.name?``:e==null?`parent: <`+this.parent.name+`>`:this.parent?.name?`node: <`+e+`>, parent: <`+this.parent.name+`>`:`node: <`+e+`>`}ele(e,t,n){return this.element(e,t,n)}nod(e,t,n){return this.node(e,t,n)}txt(e){return this.text(e)}dat(e){return this.cdata(e)}com(e){return this.comment(e)}ins(e,t){return this.instruction(e,t)}doc(){return this.document()}dec(e,t,n){return this.declaration(e,t,n)}e(e,t,n){return this.element(e,t,n)}n(e,t,n){return this.node(e,t,n)}t(e){return this.text(e)}d(e){return this.cdata(e)}c(e){return this.comment(e)}r(e){return this.raw(e)}i(e,t){return this.instruction(e,t)}u(){return this.up()}importXMLBuilder(e){return this.importDocument(e)}attribute(e,t){throw Error(`attribute() applies to element nodes only.`)}att(e,t){return this.attribute(e,t)}a(e,t){return this.attribute(e,t)}removeAttribute(e){throw Error(`attribute() applies to element nodes only.`)}replaceChild(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}removeChild(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}appendChild(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}hasChildNodes(){return this.children.length!==0}cloneNode(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}normalize(){throw Error(`This DOM method is not implemented.`+this.debugInfo())}isSupported(e,t){return!0}hasAttributes(){return this.attribs.length!==0}compareDocumentPosition(t){var n=this,r;return n===t?0:this.document()===t.document()?n.isAncestor(t)?e.Contains|e.Preceding:n.isDescendant(t)?e.Contains|e.Following:n.isPreceding(t)?e.Preceding:e.Following:(r=e.Disconnected|e.ImplementationSpecific,Math.random()<.5?r|=e.Preceding:r|=e.Following,r)}isSameNode(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}lookupPrefix(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}isDefaultNamespace(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}lookupNamespaceURI(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}isEqualNode(e){var t,n,r;if(e.nodeType!==this.nodeType||e.children.length!==this.children.length)return!1;for(t=n=0,r=this.children.length-1;0<=r?n<=r:n>=r;t=0<=r?++n:--n)if(!this.children[t].isEqualNode(e.children[t]))return!1;return!0}getFeature(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}setUserData(e,t,n){throw Error(`This DOM method is not implemented.`+this.debugInfo())}getUserData(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}contains(e){return e?e===this||this.isDescendant(e):!1}isDescendant(e){var t,n,r,i,a=this.children;for(r=0,i=a.length;r<i;r++)if(t=a[r],e===t||(n=t.isDescendant(e),n))return!0;return!1}isAncestor(e){return e.isDescendant(this)}isPreceding(e){var t=this.treePosition(e),n=this.treePosition(this);return t===-1||n===-1?!1:t<n}isFollowing(e){var t=this.treePosition(e),n=this.treePosition(this);return t===-1||n===-1?!1:t>n}treePosition(e){var t,n=0;return t=!1,this.foreachTreeNode(this.document(),function(r){if(n++,!t&&r===e)return t=!0}),t?n:-1}foreachTreeNode(e,t){var n,r,i,a,o;for(e||(e=this.document()),a=e.children,r=0,i=a.length;r<i;r++)if(n=a[r],(o=t(n))||(o=this.foreachTreeNode(n,t),o))return o}}return Object.defineProperty(t.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new u(this.children)),this.childNodeList}}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){var e=this.parent.children.indexOf(this);return this.parent.children[e-1]||null}}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){var e=this.parent.children.indexOf(this);return this.parent.children[e+1]||null}}),Object.defineProperty(t.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(t.prototype,"textContent",{get:function(){var e,t,r,i,a;if(this.nodeType===n.Element||this.nodeType===n.DocumentFragment){for(a=``,i=this.children,t=0,r=i.length;t<r;t++)e=i[t],e.textContent&&(a+=e.textContent);return a}else return null},set:function(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}}),t}).call(this)}).call(e)})),P=e(((e,t)=>{(function(){var e={}.hasOwnProperty;t.exports=(function(){class t{constructor(t){var n,r,i;for(n in this.assertLegalChar=this.assertLegalChar.bind(this),this.assertLegalName=this.assertLegalName.bind(this),t||(t={}),this.options=t,this.options.version||(this.options.version=`1.0`),r=t.stringify||{},r)e.call(r,n)&&(i=r[n],this[n]=i)}name(e){return this.options.noValidation?e:this.assertLegalName(``+e||``)}text(e){return this.options.noValidation?e:this.assertLegalChar(this.textEscape(``+e||``))}cdata(e){return this.options.noValidation?e:(e=``+e||``,e=e.replace(`]]>`,`]]]]><![CDATA[>`),this.assertLegalChar(e))}comment(e){if(this.options.noValidation)return e;if(e=``+e||``,e.match(/--/))throw Error(`Comment text cannot contain double-hypen: `+e);return this.assertLegalChar(e)}raw(e){return this.options.noValidation?e:``+e||``}attValue(e){return this.options.noValidation?e:this.assertLegalChar(this.attEscape(e=``+e||``))}insTarget(e){return this.options.noValidation?e:this.assertLegalChar(``+e||``)}insValue(e){if(this.options.noValidation)return e;if(e=``+e||``,e.match(/\?>/))throw Error(`Invalid processing instruction value: `+e);return this.assertLegalChar(e)}xmlVersion(e){if(this.options.noValidation)return e;if(e=``+e||``,!e.match(/1\.[0-9]+/))throw Error(`Invalid version number: `+e);return e}xmlEncoding(e){if(this.options.noValidation)return e;if(e=``+e||``,!e.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw Error(`Invalid encoding: `+e);return this.assertLegalChar(e)}xmlStandalone(e){return this.options.noValidation?e:e?`yes`:`no`}dtdPubID(e){return this.options.noValidation?e:this.assertLegalChar(``+e||``)}dtdSysID(e){return this.options.noValidation?e:this.assertLegalChar(``+e||``)}dtdElementValue(e){return this.options.noValidation?e:this.assertLegalChar(``+e||``)}dtdAttType(e){return this.options.noValidation?e:this.assertLegalChar(``+e||``)}dtdAttDefault(e){return this.options.noValidation?e:this.assertLegalChar(``+e||``)}dtdEntityValue(e){return this.options.noValidation?e:this.assertLegalChar(``+e||``)}dtdNData(e){return this.options.noValidation?e:this.assertLegalChar(``+e||``)}assertLegalChar(e){var t,n;if(this.options.noValidation)return e;if(this.options.version===`1.0`){if(t=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,this.options.invalidCharReplacement!==void 0)e=e.replace(t,this.options.invalidCharReplacement);else if(n=e.match(t))throw Error(`Invalid character in string: ${e} at index ${n.index}`)}else if(this.options.version===`1.1`){if(t=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,this.options.invalidCharReplacement!==void 0)e=e.replace(t,this.options.invalidCharReplacement);else if(n=e.match(t))throw Error(`Invalid character in string: ${e} at index ${n.index}`)}return e}assertLegalName(e){var t;if(this.options.noValidation)return e;if(e=this.assertLegalChar(e),t=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!e.match(t))throw Error(`Invalid character in name: ${e}`);return e}textEscape(e){var t;return this.options.noValidation?e:(t=this.options.noDoubleEncoding?/(?!&(lt|gt|amp|apos|quot);)&/g:/&/g,e.replace(t,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/\r/g,`
`))}attEscape(e){var t;return this.options.noValidation?e:(t=this.options.noDoubleEncoding?/(?!&(lt|gt|amp|apos|quot);)&/g:/&/g,e.replace(t,`&`).replace(/</g,`<`).replace(/"/g,`"`).replace(/\t/g,`	`).replace(/\n/g,`
`).replace(/\r/g,`
`))}}return t.prototype.convertAttKey=`@`,t.prototype.convertPIKey=`?`,t.prototype.convertTextKey=`#text`,t.prototype.convertCDataKey=`#cdata`,t.prototype.convertCommentKey=`#comment`,t.prototype.convertRawKey=`#raw`,t}).call(this)}).call(e)})),F=e(((e,t)=>{(function(){t.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(e)})),I=e(((e,t)=>{(function(){var e,n,r,i={}.hasOwnProperty;({assign:r}=l()),e=m(),x(),E(),y(),b(),_(),D(),O(),k(),A(),S(),w(),C(),T(),n=F(),t.exports=class{constructor(e){var t,n,r;for(t in e||(e={}),this.options=e,n=e.writer||{},n)i.call(n,t)&&(r=n[t],this[`_`+t]=this[t],this[t]=r)}filterOptions(e){var t;return e||(e={}),e=r({},this.options,e),t={writer:this},t.pretty=e.pretty||!1,t.allowEmpty=e.allowEmpty||!1,t.indent=e.indent??` `,t.newline=e.newline??`
|
|
6
|
+
`,t.offset=e.offset??0,t.width=e.width??0,t.dontPrettyTextNodes=e.dontPrettyTextNodes??e.dontprettytextnodes??0,t.spaceBeforeSlash=e.spaceBeforeSlash??e.spacebeforeslash??``,t.spaceBeforeSlash===!0&&(t.spaceBeforeSlash=` `),t.suppressPrettyCount=0,t.user={},t.state=n.None,t}indent(e,t,n){var r;return!t.pretty||t.suppressPrettyCount?``:t.pretty&&(r=(n||0)+t.offset+1,r>0)?Array(r).join(t.indent):``}endline(e,t,n){return!t.pretty||t.suppressPrettyCount?``:t.newline}attribute(e,t,n){var r;return this.openAttribute(e,t,n),r=t.pretty&&t.width>0?e.name+`="`+e.value+`"`:` `+e.name+`="`+e.value+`"`,this.closeAttribute(e,t,n),r}cdata(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r)+`<![CDATA[`,t.state=n.InsideTag,i+=e.value,t.state=n.CloseTag,i+=`]]>`+this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i}comment(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r)+`<!-- `,t.state=n.InsideTag,i+=e.value,t.state=n.CloseTag,i+=` -->`+this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i}declaration(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r)+`<?xml`,t.state=n.InsideTag,i+=` version="`+e.version+`"`,e.encoding!=null&&(i+=` encoding="`+e.encoding+`"`),e.standalone!=null&&(i+=` standalone="`+e.standalone+`"`),t.state=n.CloseTag,i+=t.spaceBeforeSlash+`?>`,i+=this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i}docType(e,t,r){var i,a,o,s,c;if(r||(r=0),this.openNode(e,t,r),t.state=n.OpenTag,s=this.indent(e,t,r),s+=`<!DOCTYPE `+e.root().name,e.pubID&&e.sysID?s+=` PUBLIC "`+e.pubID+`" "`+e.sysID+`"`:e.sysID&&(s+=` SYSTEM "`+e.sysID+`"`),e.children.length>0){for(s+=` [`,s+=this.endline(e,t,r),t.state=n.InsideTag,c=e.children,a=0,o=c.length;a<o;a++)i=c[a],s+=this.writeChildNode(i,t,r+1);t.state=n.CloseTag,s+=`]`}return t.state=n.CloseTag,s+=t.spaceBeforeSlash+`>`,s+=this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),s}element(t,r,a){var o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w;if(a||(a=0),_=!1,this.openNode(t,r,a),r.state=n.OpenTag,v=this.indent(t,r,a)+`<`+t.name,r.pretty&&r.width>0)for(g in p=v.length,b=t.attribs,b)i.call(b,g)&&(o=b[g],y=this.attribute(o,r,a),s=y.length,p+s>r.width?(w=this.indent(t,r,a+1)+y,v+=this.endline(t,r,a)+w,p=w.length):(w=` `+y,v+=w,p+=w.length));else for(g in x=t.attribs,x)i.call(x,g)&&(o=x[g],v+=this.attribute(o,r,a));if(l=t.children.length,u=l===0?null:t.children[0],l===0||t.children.every(function(t){return(t.type===e.Text||t.type===e.Raw||t.type===e.CData)&&t.value===``}))r.allowEmpty?(v+=`>`,r.state=n.CloseTag,v+=`</`+t.name+`>`+this.endline(t,r,a)):(r.state=n.CloseTag,v+=r.spaceBeforeSlash+`/>`+this.endline(t,r,a));else if(r.pretty&&l===1&&(u.type===e.Text||u.type===e.Raw||u.type===e.CData)&&u.value!=null)v+=`>`,r.state=n.InsideTag,r.suppressPrettyCount++,_=!0,v+=this.writeChildNode(u,r,a+1),r.suppressPrettyCount--,_=!1,r.state=n.CloseTag,v+=`</`+t.name+`>`+this.endline(t,r,a);else{if(r.dontPrettyTextNodes){for(S=t.children,d=0,m=S.length;d<m;d++)if(c=S[d],(c.type===e.Text||c.type===e.Raw||c.type===e.CData)&&c.value!=null){r.suppressPrettyCount++,_=!0;break}}for(v+=`>`+this.endline(t,r,a),r.state=n.InsideTag,C=t.children,f=0,h=C.length;f<h;f++)c=C[f],v+=this.writeChildNode(c,r,a+1);r.state=n.CloseTag,v+=this.indent(t,r,a)+`</`+t.name+`>`,_&&r.suppressPrettyCount--,v+=this.endline(t,r,a),r.state=n.None}return this.closeNode(t,r,a),v}writeChildNode(t,n,r){switch(t.type){case e.CData:return this.cdata(t,n,r);case e.Comment:return this.comment(t,n,r);case e.Element:return this.element(t,n,r);case e.Raw:return this.raw(t,n,r);case e.Text:return this.text(t,n,r);case e.ProcessingInstruction:return this.processingInstruction(t,n,r);case e.Dummy:return``;case e.Declaration:return this.declaration(t,n,r);case e.DocType:return this.docType(t,n,r);case e.AttributeDeclaration:return this.dtdAttList(t,n,r);case e.ElementDeclaration:return this.dtdElement(t,n,r);case e.EntityDeclaration:return this.dtdEntity(t,n,r);case e.NotationDeclaration:return this.dtdNotation(t,n,r);default:throw Error(`Unknown XML node type: `+t.constructor.name)}}processingInstruction(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r)+`<?`,t.state=n.InsideTag,i+=e.target,e.value&&(i+=` `+e.value),t.state=n.CloseTag,i+=t.spaceBeforeSlash+`?>`,i+=this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i}raw(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r),t.state=n.InsideTag,i+=e.value,t.state=n.CloseTag,i+=this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i}text(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r),t.state=n.InsideTag,i+=e.value,t.state=n.CloseTag,i+=this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i}dtdAttList(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r)+`<!ATTLIST`,t.state=n.InsideTag,i+=` `+e.elementName+` `+e.attributeName+` `+e.attributeType,e.defaultValueType!==`#DEFAULT`&&(i+=` `+e.defaultValueType),e.defaultValue&&(i+=` "`+e.defaultValue+`"`),t.state=n.CloseTag,i+=t.spaceBeforeSlash+`>`+this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i}dtdElement(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r)+`<!ELEMENT`,t.state=n.InsideTag,i+=` `+e.name+` `+e.value,t.state=n.CloseTag,i+=t.spaceBeforeSlash+`>`+this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i}dtdEntity(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r)+`<!ENTITY`,t.state=n.InsideTag,e.pe&&(i+=` %`),i+=` `+e.name,e.value?i+=` "`+e.value+`"`:(e.pubID&&e.sysID?i+=` PUBLIC "`+e.pubID+`" "`+e.sysID+`"`:e.sysID&&(i+=` SYSTEM "`+e.sysID+`"`),e.nData&&(i+=` NDATA `+e.nData)),t.state=n.CloseTag,i+=t.spaceBeforeSlash+`>`+this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i}dtdNotation(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r)+`<!NOTATION`,t.state=n.InsideTag,i+=` `+e.name,e.pubID&&e.sysID?i+=` PUBLIC "`+e.pubID+`" "`+e.sysID+`"`:e.pubID?i+=` PUBLIC "`+e.pubID+`"`:e.sysID&&(i+=` SYSTEM "`+e.sysID+`"`),t.state=n.CloseTag,i+=t.spaceBeforeSlash+`>`+this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i}openNode(e,t,n){}closeNode(e,t,n){}openAttribute(e,t,n){}closeAttribute(e,t,n){}}}).call(e)})),L=e(((e,t)=>{(function(){var e=I();t.exports=class extends e{constructor(e){super(e)}document(e,t){var n,r,i,a,o;for(t=this.filterOptions(t),a=``,o=e.children,r=0,i=o.length;r<i;r++)n=o[r],a+=this.writeChildNode(n,t,0);return t.pretty&&a.slice(-t.newline.length)===t.newline&&(a=a.slice(0,-t.newline.length)),a}}}).call(e)})),R=e(((e,t)=>{(function(){var e,n,r,i,a,o,s;({isPlainObject:s}=l()),r=u(),n=p(),i=N(),e=m(),o=P(),a=L(),t.exports=(function(){class t extends i{constructor(t){super(null),this.name=`#document`,this.type=e.Document,this.documentURI=null,this.domConfig=new n,t||(t={}),t.writer||(t.writer=new a),this.options=t,this.stringify=new o(t)}end(e){var t={};return e?s(e)&&(t=e,e=this.options.writer):e=this.options.writer,e.document(this,e.filterOptions(t))}toString(e){return this.options.writer.document(this,this.options.writer.filterOptions(e))}createElement(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}createDocumentFragment(){throw Error(`This DOM method is not implemented.`+this.debugInfo())}createTextNode(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}createComment(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}createCDATASection(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}createProcessingInstruction(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}createAttribute(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}createEntityReference(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}getElementsByTagName(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}importNode(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}createElementNS(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}createAttributeNS(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}getElementsByTagNameNS(e,t){throw Error(`This DOM method is not implemented.`+this.debugInfo())}getElementById(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}adoptNode(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}normalizeDocument(){throw Error(`This DOM method is not implemented.`+this.debugInfo())}renameNode(e,t,n){throw Error(`This DOM method is not implemented.`+this.debugInfo())}getElementsByClassName(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}createEvent(e){throw Error(`This DOM method is not implemented.`+this.debugInfo())}createRange(){throw Error(`This DOM method is not implemented.`+this.debugInfo())}createNodeIterator(e,t,n){throw Error(`This DOM method is not implemented.`+this.debugInfo())}createTreeWalker(e,t,n){throw Error(`This DOM method is not implemented.`+this.debugInfo())}}return Object.defineProperty(t.prototype,"implementation",{value:new r}),Object.defineProperty(t.prototype,"doctype",{get:function(){var t,n,r,i=this.children;for(n=0,r=i.length;n<r;n++)if(t=i[n],t.type===e.DocType)return t;return null}}),Object.defineProperty(t.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(t.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(t.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(t.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===e.Declaration?this.children[0].encoding:null}}),Object.defineProperty(t.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===e.Declaration&&this.children[0].standalone===`yes`}}),Object.defineProperty(t.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===e.Declaration?this.children[0].version:`1.0`}}),Object.defineProperty(t.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(t.prototype,"origin",{get:function(){return null}}),Object.defineProperty(t.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(t.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(t.prototype,"contentType",{get:function(){return null}}),t}).call(this)}).call(e)})),z=e(((e,t)=>{(function(){var e,n,r,i,a,o,s,c,u,d,f,p,g,v,A,j,M,N,I,z,B,V,H={}.hasOwnProperty;({isObject:B,isFunction:z,isPlainObject:V,getValue:I}=l()),e=m(),p=R(),g=_(),i=y(),a=b(),A=D(),N=O(),v=k(),d=x(),f=E(),o=S(),c=C(),s=w(),u=T(),r=h(),M=P(),j=L(),n=F(),t.exports=class{constructor(t,n,r){var i;this.name=`?xml`,this.type=e.Document,t||(t={}),i={},t.writer?V(t.writer)&&(i=t.writer,t.writer=new j):t.writer=new j,this.options=t,this.writer=t.writer,this.writerOptions=this.writer.filterOptions(i),this.stringify=new M(t),this.onDataCallback=n||function(){},this.onEndCallback=r||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}createChildNode(t){var n,r,i,a,o,s,c,l;switch(t.type){case e.CData:this.cdata(t.value);break;case e.Comment:this.comment(t.value);break;case e.Element:for(r in i={},c=t.attribs,c)H.call(c,r)&&(n=c[r],i[r]=n.value);this.node(t.name,i);break;case e.Dummy:this.dummy();break;case e.Raw:this.raw(t.value);break;case e.Text:this.text(t.value);break;case e.ProcessingInstruction:this.instruction(t.target,t.value);break;default:throw Error(`This XML node type is not supported in a JS object: `+t.constructor.name)}for(l=t.children,o=0,s=l.length;o<s;o++)a=l[o],this.createChildNode(a),a.type===e.Element&&this.up();return this}dummy(){return this}node(e,t,n){if(e==null)throw Error(`Missing node name.`);if(this.root&&this.currentLevel===-1)throw Error(`Document can only have one root node. `+this.debugInfo(e));return this.openCurrent(),e=I(e),t??(t={}),t=I(t),B(t)||([n,t]=[t,n]),this.currentNode=new g(this,e,t),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,n!=null&&this.text(n),this}element(t,n,r){var i,a,o,s,c,l;if(this.currentNode&&this.currentNode.type===e.DocType)this.dtdElement(...arguments);else if(Array.isArray(t)||B(t)||z(t))for(s=this.options.noValidation,this.options.noValidation=!0,l=new p(this.options).element(`TEMP_ROOT`),l.element(t),this.options.noValidation=s,c=l.children,a=0,o=c.length;a<o;a++)i=c[a],this.createChildNode(i),i.type===e.Element&&this.up();else this.node(t,n,r);return this}attribute(e,t){var n,i;if(!this.currentNode||this.currentNode.children)throw Error(`att() can only be used immediately after an ele() call in callback mode. `+this.debugInfo(e));if(e!=null&&(e=I(e)),B(e))for(n in e)H.call(e,n)&&(i=e[n],this.attribute(n,i));else z(t)&&(t=t.apply()),this.options.keepNullAttributes&&t==null?this.currentNode.attribs[e]=new r(this,e,``):t!=null&&(this.currentNode.attribs[e]=new r(this,e,t));return this}text(e){var t;return this.openCurrent(),t=new N(this,e),this.onData(this.writer.text(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}cdata(e){var t;return this.openCurrent(),t=new i(this,e),this.onData(this.writer.cdata(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}comment(e){var t;return this.openCurrent(),t=new a(this,e),this.onData(this.writer.comment(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}raw(e){var t;return this.openCurrent(),t=new A(this,e),this.onData(this.writer.raw(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}instruction(e,t){var n,r,i,a,o;if(this.openCurrent(),e!=null&&(e=I(e)),t!=null&&(t=I(t)),Array.isArray(e))for(n=0,a=e.length;n<a;n++)r=e[n],this.instruction(r);else if(B(e))for(r in e)H.call(e,r)&&(i=e[r],this.instruction(r,i));else z(t)&&(t=t.apply()),o=new v(this,e,t),this.onData(this.writer.processingInstruction(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}declaration(e,t,n){var r;if(this.openCurrent(),this.documentStarted)throw Error(`declaration() must be the first node.`);return r=new d(this,e,t,n),this.onData(this.writer.declaration(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}doctype(e,t,n){if(this.openCurrent(),e==null)throw Error(`Missing root node name.`);if(this.root)throw Error(`dtd() must come before the root node.`);return this.currentNode=new f(this,t,n),this.currentNode.rootNodeName=e,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this}dtdElement(e,t){var n;return this.openCurrent(),n=new s(this,e,t),this.onData(this.writer.dtdElement(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}attList(e,t,n,r,i){var a;return this.openCurrent(),a=new o(this,e,t,n,r,i),this.onData(this.writer.dtdAttList(a,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}entity(e,t){var n;return this.openCurrent(),n=new c(this,!1,e,t),this.onData(this.writer.dtdEntity(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}pEntity(e,t){var n;return this.openCurrent(),n=new c(this,!0,e,t),this.onData(this.writer.dtdEntity(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}notation(e,t){var n;return this.openCurrent(),n=new u(this,e,t),this.onData(this.writer.dtdNotation(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}up(){if(this.currentLevel<0)throw Error(`The document node has no parent.`);return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this}end(){for(;this.currentLevel>=0;)this.up();return this.onEnd()}openCurrent(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)}openNode(t){var r,i,a,o;if(!t.isOpen){if(!this.root&&this.currentLevel===0&&t.type===e.Element&&(this.root=t),i=``,t.type===e.Element){for(a in this.writerOptions.state=n.OpenTag,i=this.writer.indent(t,this.writerOptions,this.currentLevel)+`<`+t.name,o=t.attribs,o)H.call(o,a)&&(r=o[a],i+=this.writer.attribute(r,this.writerOptions,this.currentLevel));i+=(t.children?`>`:`/>`)+this.writer.endline(t,this.writerOptions,this.currentLevel),this.writerOptions.state=n.InsideTag}else this.writerOptions.state=n.OpenTag,i=this.writer.indent(t,this.writerOptions,this.currentLevel)+`<!DOCTYPE `+t.rootNodeName,t.pubID&&t.sysID?i+=` PUBLIC "`+t.pubID+`" "`+t.sysID+`"`:t.sysID&&(i+=` SYSTEM "`+t.sysID+`"`),t.children?(i+=` [`,this.writerOptions.state=n.InsideTag):(this.writerOptions.state=n.CloseTag,i+=`>`),i+=this.writer.endline(t,this.writerOptions,this.currentLevel);return this.onData(i,this.currentLevel),t.isOpen=!0}}closeNode(t){var r;if(!t.isClosed)return r=``,this.writerOptions.state=n.CloseTag,r=t.type===e.Element?this.writer.indent(t,this.writerOptions,this.currentLevel)+`</`+t.name+`>`+this.writer.endline(t,this.writerOptions,this.currentLevel):this.writer.indent(t,this.writerOptions,this.currentLevel)+`]>`+this.writer.endline(t,this.writerOptions,this.currentLevel),this.writerOptions.state=n.None,this.onData(r,this.currentLevel),t.isClosed=!0}onData(e,t){return this.documentStarted=!0,this.onDataCallback(e,t+1)}onEnd(){return this.documentCompleted=!0,this.onEndCallback()}debugInfo(e){return e==null?``:`node: <`+e+`>`}ele(){return this.element(...arguments)}nod(e,t,n){return this.node(e,t,n)}txt(e){return this.text(e)}dat(e){return this.cdata(e)}com(e){return this.comment(e)}ins(e,t){return this.instruction(e,t)}dec(e,t,n){return this.declaration(e,t,n)}dtd(e,t,n){return this.doctype(e,t,n)}e(e,t,n){return this.element(e,t,n)}n(e,t,n){return this.node(e,t,n)}t(e){return this.text(e)}d(e){return this.cdata(e)}c(e){return this.comment(e)}r(e){return this.raw(e)}i(e,t){return this.instruction(e,t)}att(){return this.currentNode&&this.currentNode.type===e.DocType?this.attList(...arguments):this.attribute(...arguments)}a(){return this.currentNode&&this.currentNode.type===e.DocType?this.attList(...arguments):this.attribute(...arguments)}ent(e,t){return this.entity(e,t)}pent(e,t){return this.pEntity(e,t)}not(e,t){return this.notation(e,t)}}}).call(e)})),B=e(((e,t)=>{(function(){var e,n,r,i={}.hasOwnProperty;e=m(),r=I(),n=F(),t.exports=class extends r{constructor(e,t){super(t),this.stream=e}endline(e,t,r){return e.isLastRootNode&&t.state===n.CloseTag?``:super.endline(e,t,r)}document(e,t){var n,r,i,a,o,s,c=e.children,l,u;for(r=i=0,o=c.length;i<o;r=++i)n=c[r],n.isLastRootNode=r===e.children.length-1;for(t=this.filterOptions(t),l=e.children,u=[],a=0,s=l.length;a<s;a++)n=l[a],u.push(this.writeChildNode(n,t,0));return u}cdata(e,t,n){return this.stream.write(super.cdata(e,t,n))}comment(e,t,n){return this.stream.write(super.comment(e,t,n))}declaration(e,t,n){return this.stream.write(super.declaration(e,t,n))}docType(e,t,r){var i,a,o,s;if(r||(r=0),this.openNode(e,t,r),t.state=n.OpenTag,this.stream.write(this.indent(e,t,r)),this.stream.write(`<!DOCTYPE `+e.root().name),e.pubID&&e.sysID?this.stream.write(` PUBLIC "`+e.pubID+`" "`+e.sysID+`"`):e.sysID&&this.stream.write(` SYSTEM "`+e.sysID+`"`),e.children.length>0){for(this.stream.write(` [`),this.stream.write(this.endline(e,t,r)),t.state=n.InsideTag,s=e.children,a=0,o=s.length;a<o;a++)i=s[a],this.writeChildNode(i,t,r+1);t.state=n.CloseTag,this.stream.write(`]`)}return t.state=n.CloseTag,this.stream.write(t.spaceBeforeSlash+`>`),this.stream.write(this.endline(e,t,r)),t.state=n.None,this.closeNode(e,t,r)}element(t,r,a){var o,s,c,l,u,d,f,p,m,h,g,_,v,y,b;if(a||(a=0),this.openNode(t,r,a),r.state=n.OpenTag,h=this.indent(t,r,a)+`<`+t.name,r.pretty&&r.width>0)for(m in f=h.length,_=t.attribs,_)i.call(_,m)&&(o=_[m],g=this.attribute(o,r,a),s=g.length,f+s>r.width?(b=this.indent(t,r,a+1)+g,h+=this.endline(t,r,a)+b,f=b.length):(b=` `+g,h+=b,f+=b.length));else for(m in v=t.attribs,v)i.call(v,m)&&(o=v[m],h+=this.attribute(o,r,a));if(this.stream.write(h),l=t.children.length,u=l===0?null:t.children[0],l===0||t.children.every(function(t){return(t.type===e.Text||t.type===e.Raw||t.type===e.CData)&&t.value===``}))r.allowEmpty?(this.stream.write(`>`),r.state=n.CloseTag,this.stream.write(`</`+t.name+`>`)):(r.state=n.CloseTag,this.stream.write(r.spaceBeforeSlash+`/>`));else if(r.pretty&&l===1&&(u.type===e.Text||u.type===e.Raw||u.type===e.CData)&&u.value!=null)this.stream.write(`>`),r.state=n.InsideTag,r.suppressPrettyCount++,this.writeChildNode(u,r,a+1),r.suppressPrettyCount--,r.state=n.CloseTag,this.stream.write(`</`+t.name+`>`);else{for(this.stream.write(`>`+this.endline(t,r,a)),r.state=n.InsideTag,y=t.children,d=0,p=y.length;d<p;d++)c=y[d],this.writeChildNode(c,r,a+1);r.state=n.CloseTag,this.stream.write(this.indent(t,r,a)+`</`+t.name+`>`)}return this.stream.write(this.endline(t,r,a)),r.state=n.None,this.closeNode(t,r,a)}processingInstruction(e,t,n){return this.stream.write(super.processingInstruction(e,t,n))}raw(e,t,n){return this.stream.write(super.raw(e,t,n))}text(e,t,n){return this.stream.write(super.text(e,t,n))}dtdAttList(e,t,n){return this.stream.write(super.dtdAttList(e,t,n))}dtdElement(e,t,n){return this.stream.write(super.dtdElement(e,t,n))}dtdEntity(e,t,n){return this.stream.write(super.dtdEntity(e,t,n))}dtdNotation(e,t,n){return this.stream.write(super.dtdNotation(e,t,n))}}}).call(e)})),V=e(((e,t)=>{(function(){var e,n,r,i,a,o,s,c,d;({assign:c,isFunction:d}=l()),r=u(),i=R(),a=z(),s=L(),o=B(),e=m(),n=F(),t.exports.create=function(e,t,n,r){var a,o;if(e==null)throw Error(`Root element needs a name.`);return r=c({},t,n,r),a=new i(r),o=a.element(e),r.headless||(a.declaration(r),(r.pubID!=null||r.sysID!=null)&&a.dtd(r)),o},t.exports.begin=function(e,t,n){return d(e)&&([t,n]=[e,t],e={}),t?new a(e,t,n):new i(e)},t.exports.stringWriter=function(e){return new s(e)},t.exports.streamWriter=function(e,t){return new o(e,t)},t.exports.implementation=new r,t.exports.nodeType=e,t.exports.writerState=n}).call(e)})),H=e((e=>{var n=t(),r=V();e.build=s;function i(e){function t(e){return e<10?`0`+e:e}return e.getUTCFullYear()+`-`+t(e.getUTCMonth()+1)+`-`+t(e.getUTCDate())+`T`+t(e.getUTCHours())+`:`+t(e.getUTCMinutes())+`:`+t(e.getUTCSeconds())+`Z`}var a=Object.prototype.toString;function o(e){var t=a.call(e).match(/\[object (.*)\]/);return t&&t[1]}function s(e,t){var n={version:`1.0`,encoding:`UTF-8`},i={pubid:`-//Apple//DTD PLIST 1.0//EN`,sysid:`http://www.apple.com/DTDs/PropertyList-1.0.dtd`},a=r.create(`plist`);return a.dec(n.version,n.encoding,n.standalone),a.dtd(i.pubid,i.sysid),a.att(`version`,`1.0`),c(e,a),t||(t={}),t.pretty=t.pretty!==!1,a.end(t)}function c(e,t){var r,a,s,l=o(e);if(l!=`Undefined`)if(Array.isArray(e))for(t=t.ele(`array`),a=0;a<e.length;a++)c(e[a],t);else if(Buffer.isBuffer(e))t.ele(`data`).raw(e.toString(`base64`));else if(l==`Object`)for(s in t=t.ele(`dict`),e)e.hasOwnProperty(s)&&(t.ele(`key`).txt(s),c(e[s],t));else l==`Number`?(r=e%1==0?`integer`:`real`,t.ele(r).txt(e.toString())):l==`BigInt`?t.ele(`integer`).txt(e):l==`Date`?t.ele(`date`).txt(i(new Date(e))):l==`Boolean`?t.ele(e?`true`:`false`):l==`String`?t.ele(`string`).txt(e):l==`ArrayBuffer`?t.ele(`data`).raw(n.fromByteArray(e)):e&&e.buffer&&o(e.buffer)==`ArrayBuffer`?t.ele(`data`).raw(n.fromByteArray(new Uint8Array(e.buffer),t)):l===`Null`&&t.ele(`null`).txt(``)}})),U=e((e=>{var t=c();Object.keys(t).forEach(function(n){e[n]=t[n]});var n=H();Object.keys(n).forEach(function(t){e[t]=n[t]})}));export default U();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-CDCSSo0U2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{n as r,t as i}from"./PluginSettings-BD9JLV9-.js";async function a(e,t,n){return(0,o.jsx)(i,{onComplete:e,args:n})}var o;e((()=>{t(),r(),o=n()}))();export{a as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Es as t,Gs as n,Hs as r,Ls as i,Os as a,Vs as o,js as s,xD as c,yD as l}from"./loadAgentsDir-nzr38hai.js";import{U as u,l as d,p as f,z as p}from"./debug-IKW-jE7K.js";import{St as m,Tt as h}from"./settings-5PQdphqC.js";import{g,x as _}from"./config-C7YHKCPV.js";import{o as v,s as y}from"./log-B3eB4EFv.js";import{f as b,s as x}from"./pluginOperations-Cz37qcjF.js";function S(e){return O=e,k!==null&&k.length>0&&(e(k),k=null),()=>{O=null}}async function C(){let e=await r(),t=i(),n=new Set;for(let[r,i]of Object.entries(e)){let e=t[r]?.autoUpdate;(e===void 0?h(r,i):e)&&n.add(r.toLowerCase())}return n}async function w(e,t){let n=!1;for(let{scope:r}of t)try{let t=await b(e,r);t.success&&!t.alreadyUpToDate?(n=!0,f(`Plugin autoupdate: updated ${e} from ${t.oldVersion} to ${t.newVersion}`)):t.alreadyUpToDate||f(`Plugin autoupdate: failed to update ${e}: ${t.message}`,{level:`warn`})}catch(t){f(`Plugin autoupdate: error updating ${e}: ${p(t)}`,{level:`warn`})}return n?e:null}async function T(e){let t=s(),n=Object.keys(t.plugins);return n.length===0?[]:(await Promise.allSettled(n.map(async n=>{let{marketplace:r}=c(n);if(!r||!e.has(r.toLowerCase()))return null;let i=t.plugins[n];if(!i||i.length===0)return null;let o=i.filter(a);return o.length===0?null:w(n,o)}))).filter(e=>e.status===`fulfilled`&&e.value!==null).map(e=>e.value)}async function E(e){return T(e)}function D(){(async()=>{if(_()){f(`Plugin autoupdate: skipped (auto-updater disabled)`);return}try{let e=await C();if(e.size===0)return;let t=(await Promise.allSettled(Array.from(e).map(async e=>{try{await n(e,void 0,{disableCredentialHelper:!0})}catch(t){f(`Plugin autoupdate: failed to refresh marketplace ${e}: ${p(t)}`,{level:`warn`})}}))).filter(e=>e.status===`rejected`);t.length>0&&f(`Plugin autoupdate: ${t.length} marketplace refresh(es) failed`,{level:`warn`}),f(`Plugin autoupdate: checking installed plugins`);let r=await E(e);r.length>0&&(O?O(r):k=r)}catch(e){y(e)}})()}var O,k,A=e((()=>{x(),g(),d(),u(),v(),t(),o(),l(),m(),O=null,k=null}));export{T as i,A as n,S as r,D as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Es as e,Ms as t,Rs as n,Us as r,Vs as i}from"./loadAgentsDir-nzr38hai.js";import{U as a,l as o,p as s,z as c}from"./debug-IKW-jE7K.js";import{i as l,n as u,r as d,t as f}from"./pluginFlagging-BVy7Xv_0.js";import{d as p,s as m}from"./pluginOperations-Cz37qcjF.js";m(),o(),a(),e(),i(),d();function h(e,t,n){let r=new Set(t.plugins.map(e=>e.name)),i=`@${n}`,a=[];for(let t of Object.keys(e.plugins)){if(!t.endsWith(i))continue;let e=t.slice(0,-i.length);r.has(e)||a.push(t)}return a}async function g(){await l();let e=t(),i=u(),a=await r(),o=[];for(let t of Object.keys(a))try{let r=await n(t);if(!r.forceRemoveDeletedPlugins)continue;let a=h(e,r,t);for(let t of a){if(t in i)continue;let n=e.plugins[t]??[];if(n.some(e=>e.scope===`user`||e.scope===`project`||e.scope===`local`)){for(let e of n){let{scope:n}=e;if(!(n!==`user`&&n!==`project`&&n!==`local`))try{await p(t,n)}catch(e){s(`Failed to auto-uninstall delisted plugin ${t} from ${n}: ${c(e)}`,{level:`error`})}}await f(t),o.push(t)}}}catch(e){s(`Failed to check for delisted plugins in "${t}": ${c(e)}`,{level:`warn`})}return o}export{g as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./figures-5ThXQEtq.js";import{ES as n,Fv as r,Nv as i,OS as a,Pv as o,Ts as s,ws as c,xD as l,yD as u}from"./loadAgentsDir-nzr38hai.js";import{U as d,z as f}from"./debug-IKW-jE7K.js";import{n as p,o as m}from"./process-gEbdy6uY.js";import{o as h,s as g}from"./log-B3eB4EFv.js";import{n as _,r as v}from"./analytics-BotDBGh0.js";import{a as y,c as b,d as x,f as S,i as C,r as w,s as T}from"./pluginOperations-Cz37qcjF.js";e(),d(),a(),h(),s(),u(),p(),r(),_(),T();function E(e,n,r){g(e);let a=r?`${n} plugin "${r}"`:n===`disable-all`?`disable all plugins`:`${n} plugins`;console.error(`${t.cross} Failed to ${a}: ${f(e)}`);let s=r?(()=>{let{name:e,marketplace:t}=l(r);return{_PROTO_plugin_name:e,...t&&{_PROTO_marketplace_name:t},...i(e,t,c())}})():{};v(`tengu_plugin_command_failed`,{command:n,error_category:o(e),...s}),process.exit(1)}async function D(e,n=`user`){try{console.log(`Installing plugin "${e}"...`);let r=await b(e,n);if(!r.success)throw Error(r.message);console.log(`${t.tick} ${r.message}`);let{name:a,marketplace:o}=l(r.pluginId||e);v(`tengu_plugin_installed_cli`,{_PROTO_plugin_name:a,...o&&{_PROTO_marketplace_name:o},scope:r.scope||n,install_source:`cli-explicit`,...i(a,o,c())}),process.exit(0)}catch(t){E(t,`install`,e)}}async function O(e,n=`user`,r=!1){try{let a=await x(e,n,!r);if(!a.success)throw Error(a.message);console.log(`${t.tick} ${a.message}`);let{name:o,marketplace:s}=l(a.pluginId||e);v(`tengu_plugin_uninstalled_cli`,{_PROTO_plugin_name:o,...s&&{_PROTO_marketplace_name:s},scope:a.scope||n,...i(o,s,c())}),process.exit(0)}catch(t){E(t,`uninstall`,e)}}async function k(e,n){try{let r=await y(e,n);if(!r.success)throw Error(r.message);console.log(`${t.tick} ${r.message}`);let{name:a,marketplace:o}=l(r.pluginId||e);v(`tengu_plugin_enabled_cli`,{_PROTO_plugin_name:a,...o&&{_PROTO_marketplace_name:o},scope:r.scope,...i(a,o,c())}),process.exit(0)}catch(t){E(t,`enable`,e)}}async function A(e,n){try{let r=await C(e,n);if(!r.success)throw Error(r.message);console.log(`${t.tick} ${r.message}`);let{name:a,marketplace:o}=l(r.pluginId||e);v(`tengu_plugin_disabled_cli`,{_PROTO_plugin_name:a,...o&&{_PROTO_marketplace_name:o},scope:r.scope,...i(a,o,c())}),process.exit(0)}catch(t){E(t,`disable`,e)}}async function j(){try{let e=await w();if(!e.success)throw Error(e.message);console.log(`${t.tick} ${e.message}`),v(`tengu_plugin_disabled_all_cli`,{}),process.exit(0)}catch(e){E(e,`disable-all`)}}async function M(e,r){try{m(`Checking for updates for plugin "${e}" at ${r} scope…\n`);let a=await S(e,r);if(!a.success)throw Error(a.message);if(m(`${t.tick} ${a.message}\n`),!a.alreadyUpToDate){let{name:t,marketplace:n}=l(a.pluginId||e);v(`tengu_plugin_updated_cli`,{_PROTO_plugin_name:t,...n&&{_PROTO_marketplace_name:n},old_version:a.oldVersion||`unknown`,new_version:a.newVersion||`unknown`,...i(t,n,c())})}await n(0)}catch(t){E(t,`update`,e)}}export{O as a,D as i,A as n,M as o,k as r,j as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{a as t,o as n}from"./isObject-C6qM3WEW.js";import{Br as r,Ci as i,Fi as a,Hr as o,Kr as s,Mi as ee,Ni as te,Pi as ne,Rr as c,Si as re,Ur as l,Vr as u,qr as ie,zr as ae}from"./state-4KQ3kaqz.js";import{AE as d,ND as oe,PD as se,aD as ce,jE as le,mO as ue,oD as de,pO as fe}from"./loadAgentsDir-nzr38hai.js";import{D as f,E as p,O as m,_ as h,h as g,l as _,p as v}from"./debug-IKW-jE7K.js";import{An as y,Dn as b,En as x,Jn as S,On as C,Yn as w,jn as T,kn as E}from"./settings-5PQdphqC.js";import{R as D,z as O}from"./config-C7YHKCPV.js";import{o as k,s as A}from"./log-B3eB4EFv.js";import{join as j}from"path";import{randomBytes as M}from"crypto";import{readFile as N,rename as P,unlink as F,writeFile as I}from"fs/promises";function L(e){return te(e)||i(e)||!!(R&&e&&e[R])}var R,z=e((()=>{n(),re(),ee(),R=t?t.isConcatSpreadable:void 0}));function B(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=L),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?B(s,t-1,n,r,i):ne(i,s):r||(i[i.length]=s)}return i}var V=e((()=>{a(),z()}));function pe(e){return e!=null&&e.length?B(e,1):[]}var me=e((()=>{V()}));function he(e){return b(E(e,void 0,pe),e+``)}var ge=e((()=>{me(),C(),x()}));function _e(e,t){return t.length<2?e:c(e,ce(t,0,-1))}var ve=e((()=>{ae(),de()}));function ye(e,t){t=o(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=u(t[n]);if(i===`__proto__`&&!H.call(e,`__proto__`)||(i===`constructor`||i===`prototype`)&&n<r-1)return!1}var a=_e(e,t);return a==null||delete a[u(se(t))]}var H,be=e((()=>{l(),oe(),ve(),r(),H=Object.prototype.hasOwnProperty}));function xe(e){return T(e)?void 0:e}var Se=e((()=>{y()})),U,W,G,K,Ce=e((()=>{ie(),ue(),be(),l(),w(),Se(),ge(),O(),U=1,W=2,G=4,K=he(function(e,t){var n={};if(e==null)return n;var r=!1;t=s(t,function(t){return t=o(t,e),r||(r=t.length>1),t}),S(e,D(e),n),r&&(n=fe(n,U|W|G,xe));for(var i=t.length;i--;)ye(n,t[i]);return n})}));function q(){return j(d(),Z)}function we(e){let t=f(e);if(typeof t!=`object`||!t||!(`plugins`in t)||typeof t.plugins!=`object`||t.plugins===null)return{};let n=t.plugins,r={};for(let[e,t]of Object.entries(n))if(t&&typeof t==`object`&&`flaggedAt`in t&&typeof t.flaggedAt==`string`){let n={flaggedAt:t.flaggedAt};`seenAt`in t&&typeof t.seenAt==`string`&&(n.seenAt=t.seenAt),r[e]=n}return r}async function J(){try{return we(await N(q(),{encoding:`utf-8`}))}catch{return{}}}async function Y(e){let t=q(),n=`${t}.${M(8).toString(`hex`)}.tmp`;try{await g().mkdir(d()),await I(n,m({plugins:e},null,2),{encoding:`utf-8`,mode:384}),await P(n,t),$=e}catch(e){A(e);try{await F(n)}catch{}}}async function Te(){let e=await J(),t=Date.now(),n=!1;for(let[r,i]of Object.entries(e))i.seenAt&&t-new Date(i.seenAt).getTime()>=Q&&(delete e[r],n=!0);$=e,n&&await Y(e)}function Ee(){return $??{}}async function X(e){$===null&&($=await J()),await Y({...$,[e]:{flaggedAt:new Date().toISOString()}}),v(`Flagged plugin: ${e}`)}async function De(e){$===null&&($=await J());let t=new Date().toISOString(),n=!1,r={...$};for(let i of e){let e=r[i];e&&!e.seenAt&&(r[i]={...e,seenAt:t},n=!0)}n&&await Y(r)}async function Oe(e){if($===null&&($=await J()),!(e in $))return;let{[e]:t,...n}=$;$=n,await Y(n)}var Z,Q,$,ke=e((()=>{_(),h(),k(),p(),le(),Z=`flagged-plugins.json`,Q=2880*60*1e3,$=null}));export{De as a,K as c,Te as i,Ee as n,Oe as o,ke as r,Ce as s,X as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{en as t,nt as n}from"./state-4KQ3kaqz.js";import{Bs as r,Cs as i,DD as a,DE as o,ED as s,Es as c,Hs as l,Ms as u,Ns as d,Ps as f,Rs as p,SD as m,Ss as h,Vs as g,_D as _,_s as v,am as y,bs as b,dc as x,ds as S,fs as C,gD as w,hs as T,iv as E,jE as D,js as O,lc as k,ls as ee,om as te,ov as ne,ps as A,ss as j,uc as M,us as N,vD as re,vs as ie,xD as P,yD as ae}from"./loadAgentsDir-nzr38hai.js";import{G as F,J as oe,U as se,_ as ce,h as I}from"./debug-IKW-jE7K.js";import{c as L,g as R,y as z}from"./settings-5PQdphqC.js";import{o as B,s as V}from"./log-B3eB4EFv.js";import{l as H,o as U}from"./stringUtils-CvXbHQRH.js";import{n as W,t as G}from"./pluginStartupCheck-w24D-wwk.js";import{dirname as le,join as K}from"path";function q(e){if(!Q.includes(e))throw Error(`Invalid scope "${e}". Must be one of: ${Q.join(`, `)}`)}function ue(e){return Q.includes(e)}function J(e){return e===`project`||e===`local`?n():void 0}function de(e){return L(`projectSettings`)?.enabledPlugins?.[e]===!0}function fe(e){let t=e.includes(`@`);for(let n of[`local`,`project`,`user`]){let r=L(m(n))?.enabledPlugins;if(r){for(let i of Object.keys(r))if(t?i===e:i.startsWith(`${e}@`))return{pluginId:i,scope:n}}}return null}function pe(e,t){let{name:n,marketplace:r}=P(e);return t.find(t=>t.name===e||t.name===n?!0:r&&t.source?t.name===n&&t.source.includes(`@${r}`):!1)}function me(e){let{name:t}=P(e),n=u();if(n.plugins[e]?.length)return{pluginId:e,pluginName:t};let r=Object.keys(n.plugins).find(e=>{let{name:r}=P(e);return r===t&&(n.plugins[e]?.length??0)>0});return r?{pluginId:r,pluginName:t}:null}function Y(e){let t=u().plugins[e];if(!t||t.length===0)return{scope:`user`};let r=n(),i=t.find(e=>e.scope===`local`&&e.projectPath===r);if(i)return{scope:i.scope,projectPath:i.projectPath};let a=t.find(e=>e.scope===`project`&&e.projectPath===r);if(a)return{scope:a.scope,projectPath:a.projectPath};let o=t.find(e=>e.scope===`user`);return o?{scope:o.scope}:{scope:t[0].scope,projectPath:t[0].projectPath}}async function he(e,t=`user`){q(t);let{name:n,marketplace:i}=P(e),a,o,s;if(i){let t=await r(e);t&&(a=t.entry,o=i,s=t.marketplaceInstallLocation)}else{let e=await l();for(let[t,r]of Object.entries(e))try{let e=(await p(t)).plugins.find(e=>e.name===n);if(e){a=e,o=t,s=r.installLocation;break}}catch(e){V(oe(e))}}if(!a||!o)return{success:!1,message:`Plugin "${n}" not found in ${i?`marketplace "${i}"`:`any configured marketplace`}`};let c=a,u=`${c.name}@${o}`,d=await b({pluginId:u,entry:c,scope:t,marketplaceInstallLocation:s});if(!d.ok){let e=d;switch(e.reason){case`local-source-no-location`:return{success:!1,message:`Cannot install local plugin "${e.pluginName}" without marketplace install location`};case`settings-write-failed`:return{success:!1,message:`Failed to update settings: ${e.message}`};case`resolution-failed`:return{success:!1,message:v(e.resolution)};case`blocked-by-policy`:return{success:!1,message:`Plugin "${e.pluginName}" is blocked by your organization's policy and cannot be installed`};case`dependency-blocked-by-policy`:return{success:!1,message:`Plugin "${e.pluginName}" depends on "${e.blockedDependency}", which is blocked by your organization's policy`}}}return{success:!0,message:`Successfully installed plugin: ${u} (scope: ${t})${d.depNote}`,pluginId:u,pluginName:c.name,scope:t}}async function ge(e,t=`user`,n=!0){q(t);let{enabled:r,disabled:i}=await A(),a=[...r,...i],s=pe(e,a),c=m(t),l=L(c),f,p;if(s)f=Object.keys(l?.enabledPlugins??{}).find(t=>t===e||t===s.name||t.startsWith(`${s.name}@`))??(e.includes(`@`)?e:s.name),p=s.name;else{let t=me(e);if(!t)return{success:!1,message:`Plugin "${e}" not found in installed plugins`};f=t.pluginId,p=t.pluginName}let h=J(t),g=u().plugins[f],v=g?.find(e=>e.scope===t&&e.projectPath===h);if(!v){let{scope:n}=Y(f);return n!==t&&g&&g.length>0?n===`project`?{success:!1,message:`Plugin "${e}" is enabled at project scope (.claude/settings.json, shared with your team). To disable just for you: claude plugin disable ${e} --scope local`}:{success:!1,message:`Plugin "${e}" is installed in ${n} scope, not ${t}. Use --scope ${n} to uninstall.`}:{success:!1,message:`Plugin "${e}" is not installed in ${t} scope. Use --scope to specify the correct scope.`}}let y=v.installPath,b={...l?.enabledPlugins};b[f]=void 0,z(c,{enabledPlugins:b}),k(),d(f,t,h);let S=u().plugins[f],C=!S||S.length===0;C&&y&&await x(y),C&&(E(f),n&&await o(f));let T=w(f,a),D=_(T);return{success:!0,message:`Successfully uninstalled plugin: ${p} (scope: ${t})${D}`,pluginId:f,pluginName:p,scope:t,reverseDependents:T.length>0?T:void 0}}async function X(e,t,n){let r=t?`enable`:`disable`;if(a(e)){let{error:n}=z(`userSettings`,{enabledPlugins:{...L(`userSettings`)?.enabledPlugins,[e]:t}});if(n)return{success:!1,message:`Failed to ${r} built-in plugin: ${n.message}`};k();let{name:i}=P(e);return{success:!0,message:`Successfully ${r}d built-in plugin: ${i}`,pluginId:e,pluginName:i,scope:`user`}}n&&q(n);let i,o,s=fe(e);if(n)if(o=n,s)i=s.pluginId;else if(e.includes(`@`))i=e;else return{success:!1,message:`Plugin "${e}" not found in settings. Use plugin@marketplace format.`};else if(s)i=s.pluginId,o=s.scope;else if(e.includes(`@`))i=e,o=`user`;else return{success:!1,message:`Plugin "${e}" not found in any editable settings scope. Use plugin@marketplace format.`};if(t&&te(i))return{success:!1,message:`Plugin "${i}" is blocked by your organization's policy and cannot be enabled`};let c=m(o),l=L(c)?.enabledPlugins?.[i],u={user:0,project:1,local:2},d=n&&s&&u[n]>u[s.scope];if(n&&l===void 0&&s&&s.scope!==n&&!d)return{success:!1,message:`Plugin "${e}" is installed at ${s.scope} scope, not ${n}. Use --scope ${s.scope} or omit --scope to auto-detect.`};if(t===(n&&!d?l===!0:G().has(i)))return{success:!1,message:`Plugin "${e}" is already ${t?`enabled`:`disabled`}${n?` at ${n} scope`:``}`};let f;if(!t){let{enabled:e,disabled:t}=await A(),n=w(i,[...e,...t]);n.length>0&&(f=n)}let{error:p}=z(c,{enabledPlugins:{...L(c)?.enabledPlugins,[i]:t}});if(p)return{success:!1,message:`Failed to ${r} plugin: ${p.message}`};k();let{name:h}=P(i),g=_(f);return{success:!0,message:`Successfully ${r}d plugin: ${h} (scope: ${o})${g}`,pluginId:i,pluginName:h,scope:o,reverseDependents:f}}async function _e(e,t){return X(e,!0,t)}async function ve(e,t){return X(e,!1,t)}async function Z(){let e=G();if(e.size===0)return{success:!0,message:`No enabled plugins to disable`};let t=[],n=[];for(let[r]of e){let e=await X(r,!1);e.success?t.push(r):n.push(`${r}: ${e.message}`)}return n.length>0?{success:!1,message:`Disabled ${t.length} ${H(t.length,`plugin`)}, ${n.length} failed:\n${n.join(`
|
|
2
|
+
`)}`}:{success:!0,message:`Disabled ${t.length} ${H(t.length,`plugin`)}`}}async function ye(e,t){let{name:n,marketplace:i}=P(e),a=i?`${n}@${i}`:e,o=await r(e);if(!o)return{success:!1,message:`Plugin "${n}" not found`,pluginId:a,scope:t};let{entry:s,marketplaceInstallLocation:c}=o,l=O().plugins[a];if(!l||l.length===0)return{success:!1,message:`Plugin "${n}" is not installed`,pluginId:a,scope:t};let u=J(t),d=l.find(e=>e.scope===t&&e.projectPath===u);return d?be({pluginId:a,pluginName:n,entry:s,marketplaceInstallLocation:c,installation:d,scope:t,projectPath:u}):{success:!1,message:`Plugin "${n}" is not installed at scope ${u?`${t} (${u})`:t}`,pluginId:a,scope:t}}async function be({pluginId:e,pluginName:t,entry:n,marketplaceInstallLocation:r,installation:i,scope:a,projectPath:o}){let s=I(),c=i.version,l,u,d=!1,p;if(typeof n.source!=`string`){let t=await j(n.source,{manifest:{name:n.name}});l=t.path,d=!0,p=t.gitCommitSha,u=await h(e,n.source,t.manifest,t.path,n.version,t.gitCommitSha)}else{let t;try{t=await s.stat(r)}catch(t){if(F(t))return{success:!1,message:`Marketplace directory not found at ${r}`,pluginId:e,scope:a};throw t}l=K(t.isDirectory()?r:le(r),n.source);try{await s.stat(l)}catch(t){if(F(t))return{success:!1,message:`Plugin source not found at ${l}`,pluginId:e,scope:a};throw t}let i,o=K(l,`.claude-plugin`,`plugin.json`);try{i=await T(o,n.name,n.source)}catch{}u=await h(e,n.source,i,l,n.version)}try{let r=N(e,u),s=S(e,u);if(i.version===u||i.installPath===r||i.installPath===s)return{success:!0,message:`${t} is already at the latest version (${u}).`,pluginId:e,newVersion:u,oldVersion:c,alreadyUpToDate:!0,scope:a};r=await ee(l,e,u,n);let d=i.installPath;if(f(e,a,o,r,u,p),d&&d!==r){let e=O();Object.values(e.plugins).some(e=>e.some(e=>e.installPath===d))||await x(d)}let m=o?`${a} (${o})`:a;return{success:!0,message:`Plugin "${t}" updated from ${c||`unknown`} to ${u} for scope ${m}. Restart to apply changes.`,pluginId:e,newVersion:u,oldVersion:c,scope:a}}finally{d&&l!==N(e,u)&&await s.rm(l,{recursive:!0,force:!0})}}var Q,$,xe=e((()=>{t(),s(),se(),ce(),B(),M(),re(),c(),g(),D(),ae(),ie(),C(),ne(),y(),W(),i(),R(),U(),Q=[`user`,`project`,`local`],$=[`user`,`project`,`local`,`managed`]}));export{_e as a,he as c,ge as d,ye as f,ve as i,ue as l,$ as n,Y as o,Z as r,xe as s,Q as t,de as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./pluginStartupCheck-w24D-wwk.js";e();export{t as getPluginEditableScopes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Bs as t,CD as n,Es as r,SD as i,Vs as a,gs as o,vs as s,wD as c,xs as l,yD as u}from"./loadAgentsDir-nzr38hai.js";import{n as d,t as f}from"./cwd-BuJhkTrc.js";import{l as p,p as m}from"./debug-IKW-jE7K.js";import{St as h,c as g,g as _,wt as v,y}from"./settings-5PQdphqC.js";import{o as b,s as x}from"./log-B3eB4EFv.js";import{join as S}from"path";function C(){let e=new Map,t=n();for(let[n,r]of Object.entries(t))n.includes(`@`)&&(r===!0?e.set(n,`flag`):r===!1&&e.delete(n));for(let{scope:n,source:r}of[{scope:`managed`,source:`policySettings`},{scope:`user`,source:`userSettings`},{scope:`project`,source:`projectSettings`},{scope:`local`,source:`localSettings`},{scope:`flag`,source:`flagSettings`}]){let i=g(r);if(i?.enabledPlugins)for(let[a,o]of Object.entries(i.enabledPlugins))a.includes(`@`)&&(a in t&&t[a]!==o&&m(`Plugin ${a} from --add-dir (${t[a]}) overridden by ${r} (${o})`),o===!0?e.set(a,n):o===!1&&e.delete(a))}return m(`Found ${e.size} enabled plugins with scopes: ${Array.from(e.entries()).map(([e,t])=>`${e}(${t})`).join(`, `)}`),e}async function w(e,n,r=`user`){let a=r===`user`?void 0:f(),s=i(r),c=g(s),u={...c?.enabledPlugins},d=[],p=[];for(let i=0;i<e.length;i++){let s=e[i];if(s){n&&n(s,i+1,e.length);try{let e=await t(s);if(!e){p.push({name:s,error:`Plugin not found in any marketplace`});continue}let{entry:n,marketplaceInstallLocation:i}=e;v(n.source)?l({pluginId:s,installPath:S(i,n.source),version:n.version},r,a):await o(s,n,r,a),u[s]=!0,d.push(s)}catch(e){let t=e instanceof Error?e.message:String(e);p.push({name:s,error:t}),x(e)}}}return y(s,{...c,enabledPlugins:u}),{installed:d,failed:p}}var T=e((()=>{d(),p(),b(),_(),c(),r(),a(),u(),s(),h()}));export{T as n,w as r,C as t};
|