n8n-editor-ui 1.119.1 → 1.120.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AddDataTableModal-78UiDOZ6.js → AddDataTableModal-CNPce2MK.js} +17 -17
- package/dist/assets/AddDataTableModal-legacy-D_q2DsYi.js +165 -0
- package/dist/assets/AnimatedSpinner-legacy-a37yY0a9.js +35 -0
- package/dist/assets/{AnnotationTagsDropdown.ee-B5SGfmxY.js → AnnotationTagsDropdown.ee-B3a6ceTY.js} +2 -2
- package/dist/assets/AnnotationTagsDropdown.ee-legacy-LINSaq2v.js +90 -0
- package/dist/assets/{AuthView-CaCXt20h.js → AuthView-BksSCUt6.js} +6 -6
- package/dist/assets/AuthView-legacy-CfV1HZE_.js +170 -0
- package/dist/assets/{ChangePasswordView-sh87mWR6.js → ChangePasswordView-Cvxj1PRp.js} +15 -15
- package/dist/assets/ChangePasswordView-legacy-xsAfjRRg.js +165 -0
- package/dist/assets/{ChatAgentsView-4SiYQ9YJ.js → ChatAgentsView-DJypCGml.js} +22 -22
- package/dist/assets/ChatAgentsView-legacy-BaECHABU.js +418 -0
- package/dist/assets/{ChatSidebar-C0XXqw3v.js → ChatSidebar-C13q9zqk.js} +29 -24
- package/dist/assets/ChatSidebar-legacy-DIt4TcYH.js +485 -0
- package/dist/assets/{ChatView-BlkLzP1X.js → ChatView-D2xZRN42.js} +26 -26
- package/dist/assets/ChatView-legacy-CFToQG1U.js +1192 -0
- package/dist/assets/CollectionParameter-legacy-IavnknS_.js +16 -0
- package/dist/assets/CollectionParameter-uuFxXssR.js +58 -0
- package/dist/assets/{CommunityNodeUpdateInfo-Egv665vx.js → CommunityNodeUpdateInfo-CLRP_8wC.js} +8 -8
- package/dist/assets/CommunityNodeUpdateInfo-legacy-DS8roZW5.js +395 -0
- package/dist/assets/{CopyInput-DX-FL085.js → CopyInput-Bn1XwSA8.js} +4 -4
- package/dist/assets/CopyInput-legacy-CiWOPgga.js +141 -0
- package/dist/assets/{CredentialIcon-DS3l06t2.js → CredentialIcon-BYz55hZ1.js} +2 -2
- package/dist/assets/CredentialIcon-legacy-Dj_Wwpq8.js +110 -0
- package/dist/assets/{CredentialsView-C3SKDwtI.js → CredentialsView-DAHDYrLs.js} +36 -36
- package/dist/assets/CredentialsView-legacy-DLPPpy9f.js +562 -0
- package/dist/assets/{DataTableActions-lgRuMb9F.js → DataTableActions-C64c3Y8N.js} +7 -7
- package/dist/assets/DataTableActions-legacy-DBVf0Yyo.js +113 -0
- package/dist/assets/{DataTableDetailsView-CoWw-4gy.js → DataTableDetailsView-ByMD0P9u.js} +23 -23
- package/dist/assets/DataTableDetailsView-legacy-DaV5zS6D.js +46280 -0
- package/dist/assets/{DataTableView-hUsgVnZS.js → DataTableView-7hlUIGsV.js} +33 -33
- package/dist/assets/DataTableView-legacy-CI8bni3b.js +348 -0
- package/dist/assets/DemoFooter-CXKoC-C4.js +70 -0
- package/dist/assets/DemoFooter-legacy-C9jTq-mk.js +39 -0
- package/dist/assets/{Draggable-DFf4aD-Y.js → Draggable-FGSUZI7J.js} +1 -1
- package/dist/assets/Draggable-legacy-DrwbjxUV.js +158 -0
- package/dist/assets/{EmptySharedSectionActionBox-BkPu0yI0.js → EmptySharedSectionActionBox-DC-L1kVD.js} +4 -4
- package/dist/assets/EmptySharedSectionActionBox-legacy-CcDbu4Qz.js +68 -0
- package/dist/assets/{EnterpriseEdition.ee-BoNEV-MB.js → EnterpriseEdition.ee-BLnkG_vb.js} +1 -1
- package/dist/assets/EnterpriseEdition.ee-legacy-qbLE7866.js +44 -0
- package/dist/assets/{EntityNotFound-Bs-aLs3W.js → EntityNotFound-BEd7ip46.js} +7 -7
- package/dist/assets/EntityNotFound-legacy-DYBNYDT_.js +116 -0
- package/dist/assets/{EntityUnAuthorised-BwhGn6eD.js → EntityUnAuthorised-BwJ3qYPD.js} +7 -7
- package/dist/assets/EntityUnAuthorised-legacy-igjo60QA.js +97 -0
- package/dist/assets/{ErrorView-Cvlb8nm0.js → ErrorView-BpDaPgmW.js} +9 -9
- package/dist/assets/ErrorView-legacy-DapUi98L.js +100 -0
- package/dist/assets/{EvaluationsRootView-DdOZORFr.js → EvaluationsRootView-BeKeeOoI.js} +26 -26
- package/dist/assets/EvaluationsRootView-legacy-CKVE58to.js +633 -0
- package/dist/assets/{EvaluationsView-DxiPOlGL.js → EvaluationsView-BWf7BQC4.js} +20 -20
- package/dist/assets/EvaluationsView-legacy-DhlbC0Ea.js +612 -0
- package/dist/assets/{ExecutionsTime-DwXL-TY4.js → ExecutionsTime-EA00RsW3.js} +9 -9
- package/dist/assets/ExecutionsTime-legacy-DrbsbtIP.js +618 -0
- package/dist/assets/ExecutionsView-legacy-Dgt_HcPK.js +941 -0
- package/dist/assets/{ExecutionsView-B4XGhWmY.js → ExecutionsView-nE3nEcsV.js} +37 -37
- package/dist/assets/{ExternalSecretsProviderConnectionSwitch.ee-DCTg0mdX.js → ExternalSecretsProviderConnectionSwitch.ee-BWc-RcA5.js} +4 -4
- package/dist/assets/ExternalSecretsProviderConnectionSwitch.ee-legacy-vUb1CeAz.js +269 -0
- package/dist/assets/FileSaver.min-legacy-BTN44Z38.js +100 -0
- package/dist/assets/{FixedCollectionParameter-DjdDaH5s.js → FixedCollectionParameter-B1yXNe91.js} +48 -48
- package/dist/assets/FixedCollectionParameter-legacy-D_uQ0vSg.js +346 -0
- package/dist/assets/{ForgotMyPasswordView-KkAVBYit.js → ForgotMyPasswordView-D7LLNbRv.js} +15 -15
- package/dist/assets/ForgotMyPasswordView-legacy-DftsnpqL.js +118 -0
- package/dist/assets/{InsightsChartAverageRuntime-D5Gh8Rz5.js → InsightsChartAverageRuntime-C7rtAGGH.js} +8 -8
- package/dist/assets/InsightsChartAverageRuntime-legacy-C8eNILht.js +91 -0
- package/dist/assets/{InsightsChartFailed-D7PZ_ctV.js → InsightsChartFailed-BVvAmkiO.js} +7 -7
- package/dist/assets/InsightsChartFailed-legacy-BrgEC_aN.js +82 -0
- package/dist/assets/{InsightsChartFailureRate-CpPU5Kwd.js → InsightsChartFailureRate-DwY4ZV2Q.js} +8 -8
- package/dist/assets/InsightsChartFailureRate-legacy-BOkyqauQ.js +85 -0
- package/dist/assets/{InsightsChartTimeSaved-DYrv2t2N.js → InsightsChartTimeSaved-g3dzoVe5.js} +8 -8
- package/dist/assets/InsightsChartTimeSaved-legacy-CRXGQDed.js +99 -0
- package/dist/assets/{InsightsChartTotal-CNqL-Qn3.js → InsightsChartTotal-BUzsVTHL.js} +7 -7
- package/dist/assets/InsightsChartTotal-legacy-BJMAB7NO.js +82 -0
- package/dist/assets/{InsightsDashboard-CrJZtNDS.js → InsightsDashboard-Z46a8mLm.js} +36 -36
- package/dist/assets/InsightsDashboard-legacy-BsKYh6Zu.js +562 -0
- package/dist/assets/{InsightsPaywall-DxgcxZ5z.js → InsightsPaywall-CM-5Wo37.js} +16 -16
- package/dist/assets/InsightsPaywall-legacy-Db6t4x-1.js +83 -0
- package/dist/assets/{InsightsSummary-Bew3_p6D.js → InsightsSummary-BKDZRj8q.js} +8 -8
- package/dist/assets/InsightsSummary-legacy-e5z3TegQ.js +225 -0
- package/dist/assets/{InsightsTableWorkflows-TAIASHgR.js → InsightsTableWorkflows-BNelOen0.js} +16 -16
- package/dist/assets/InsightsTableWorkflows-legacy-BDjUKHj8.js +269 -0
- package/dist/assets/{ItemsRenderer-BfXptelN.js → ItemsRenderer-DG_0Q-Gb.js} +8 -8
- package/dist/assets/ItemsRenderer-legacy-BcFXv3rI.js +1178 -0
- package/dist/assets/{KeyboardShortcutTooltip-y1pBqAge.js → KeyboardShortcutTooltip-BYhbaXL9.js} +1 -1
- package/dist/assets/KeyboardShortcutTooltip-legacy-DFhofumE.js +81 -0
- package/dist/assets/LogsPanel-Cr7P14px.js +57 -0
- package/dist/assets/{LogsPanel-Uc0E6yn-.js → LogsPanel-abfXyH7Y.js} +28 -30
- package/dist/assets/LogsPanel-legacy-BjPVIpZg.js +2951 -0
- package/dist/assets/LogsPanel-legacy-BjVvE6Y0.js +16 -0
- package/dist/assets/{MainHeader-M-D-hY8c.js → MainHeader-CsSHhx5_.js} +241 -65
- package/dist/assets/{MainHeader-Dz9UViYg.css → MainHeader-Csdi9iXJ.css} +177 -29
- package/dist/assets/MainHeader-legacy-CvmcTj8J.js +2193 -0
- package/dist/assets/MainSidebar-legacy-YxLN5JqH.js +1306 -0
- package/dist/assets/{MainSidebar-Bf52gQzU.js → MainSidebar-rOTUtkBP.js} +26 -26
- package/dist/assets/{MainSidebarUserArea-UHX8ACa4.js → MainSidebarUserArea-BJPw39X0.js} +5 -5
- package/dist/assets/MainSidebarUserArea-legacy-D6AOIGgS.js +172 -0
- package/dist/assets/{Modal-DwutFKNY.js → Modal-DCqr4mja.js} +5 -5
- package/dist/assets/Modal-legacy-JHEaiPBD.js +265 -0
- package/dist/assets/ModalDrawer-legacy-BJmqm_oA.js +308 -0
- package/dist/assets/{ModalDrawer-B2sNzJVm.js → ModalDrawer-tIdfksn8.js} +6 -6
- package/dist/assets/{NDVEmptyState-DdpBamQ9.js → NDVEmptyState-BHecevNV.js} +1 -1
- package/dist/assets/NDVEmptyState-legacy-MP5RoBw5.js +19819 -0
- package/dist/assets/{NodeCreation-BRIx8Ei9.js → NodeCreation-D55e03Og.js} +46 -46
- package/dist/assets/NodeCreation-legacy-C2W0brGN.js +273 -0
- package/dist/assets/NodeCreator-legacy-CTnRoQSx.js +1670 -0
- package/dist/assets/{NodeCreator-DDG2GQ-C.js → NodeCreator-s6kndVrv.js} +31 -31
- package/dist/assets/{NodeDetailsView-4jVeGvDi.js → NodeDetailsView-Bob_UNcq.js} +64 -64
- package/dist/assets/NodeDetailsView-legacy-DDTRIVzE.js +1116 -0
- package/dist/assets/{NodeDetailsViewV2-MeaPvImX.js → NodeDetailsViewV2-B9XEZfhu.js} +65 -65
- package/dist/assets/NodeDetailsViewV2-legacy-CK4dIDeL.js +1060 -0
- package/dist/assets/{NodeIcon-C-rkj6sB.js → NodeIcon-lOuyYMGN.js} +2 -2
- package/dist/assets/NodeIcon-legacy-DG2J9mhW.js +127 -0
- package/dist/assets/{NodeSettings-gAtnSv8q.js → NodeSettings-B_ICqwDQ.js} +19 -19
- package/dist/assets/NodeSettings-legacy-CF2CaCzs.js +2811 -0
- package/dist/assets/NodeView-legacy-BMkGVdkr.js +2660 -0
- package/dist/assets/{NodeView-jjqmiYDP.js → NodeView-ph9FnUki.js} +69 -69
- package/dist/assets/{SettingsProvisioningView-Dhfda99J.css → OAuthConsentView-CXZbBKS5.css} +74 -32
- package/dist/assets/OAuthConsentView-CtUbmPEv.js +225 -0
- package/dist/assets/OAuthConsentView-legacy-V4pqsJpk.js +292 -0
- package/dist/assets/PageViewLayout-legacy-B1As2gDz.js +44 -0
- package/dist/assets/{ParameterInputList-kEoD9fc7.js → ParameterInputList-CVOMMAVC.js} +29 -29
- package/dist/assets/ParameterInputList-legacy-D0lnTah6.js +38124 -0
- package/dist/assets/{PrebuiltAgentTemplatesView-Dd6IJD_W.js → PrebuiltAgentTemplatesView-C66v0Rfw.js} +18 -18
- package/dist/assets/PrebuiltAgentTemplatesView-legacy-no2dr8dA.js +205 -0
- package/dist/assets/{ProjectBreadcrumb-scGlGqYf.js → ProjectBreadcrumb-CVitESde.js} +4 -4
- package/dist/assets/ProjectBreadcrumb-legacy-DuIjFcuf.js +140 -0
- package/dist/assets/{ProjectCardBadge-p4AY0ubu.js → ProjectCardBadge-RcG3IuSv.js} +5 -5
- package/dist/assets/ProjectCardBadge-legacy-Ckl-RNYt.js +251 -0
- package/dist/assets/{ProjectHeader-BZeiGuD6.js → ProjectHeader-BTxr_uZx.js} +12 -11
- package/dist/assets/ProjectHeader-legacy-CpJwWF0C.js +710 -0
- package/dist/assets/{ProjectIcon-DqKjDNbR.js → ProjectIcon-CfC5ZMJ_.js} +1 -1
- package/dist/assets/ProjectIcon-legacy-CCWF7GdT.js +109 -0
- package/dist/assets/{ProjectRoleView-ByzrSQP-.js → ProjectRoleView-CRCohRyJ.js} +16 -16
- package/dist/assets/ProjectRoleView-legacy-B73c7qRW.js +469 -0
- package/dist/assets/{ProjectRolesView-DclD8eEm.js → ProjectRolesView-BqZGQgVw.js} +19 -19
- package/dist/assets/ProjectRolesView-legacy-dTN29nao.js +316 -0
- package/dist/assets/{ProjectSettings-4wa93sE4.js → ProjectSettings-C29Ztobq.js} +26 -26
- package/dist/assets/ProjectSettings-legacy-B5WM8UM_.js +1069 -0
- package/dist/assets/{ProjectSharing-BVPUxo_M.js → ProjectSharing-DUdqsKIb.js} +5 -5
- package/dist/assets/ProjectSharing-legacy-DAHRQcVy.js +307 -0
- package/dist/assets/{ProjectVariables-x9spBaqX.js → ProjectVariables-k94KpZjl.js} +34 -34
- package/dist/assets/ProjectVariables-legacy-BtPtS2zC.js +572 -0
- package/dist/assets/{PushConnectionTracker-ByNVqY0h.js → PushConnectionTracker-BRETfc_U.js} +3 -3
- package/dist/assets/PushConnectionTracker-legacy-C4k814hh.js +65 -0
- package/dist/assets/{ResourcesListLayout-UXbxK1S7.js → ResourcesListLayout-CgQqKl0f.js} +10 -10
- package/dist/assets/ResourcesListLayout-legacy-BLQXYEmh.js +938 -0
- package/dist/assets/RunDataHtml-B1O-g3bi.js +7 -0
- package/dist/assets/{RunDataHtml-DdtrEw19.js → RunDataHtml-BNcvZDMJ.js} +1 -1
- package/dist/assets/RunDataHtml-legacy-DopSvQCJ.js +63 -0
- package/dist/assets/RunDataHtml-legacy-h0qPMlWv.js +16 -0
- package/dist/assets/{RunDataJson-CxLotBq-.js → RunDataJson-CVLzOWUM.js} +14 -17
- package/dist/assets/RunDataJson-legacy-dGOOBvFu.js +253 -0
- package/dist/assets/{RunDataJsonActions-qylVa2u8.js → RunDataJsonActions-T_9PWIUO.js} +15 -15
- package/dist/assets/RunDataJsonActions-legacy-bMw-SnSs.js +5126 -0
- package/dist/assets/{RunDataParsedAiContent-Cs80jq_q.js → RunDataParsedAiContent-BTi5LXv5.js} +7 -7
- package/dist/assets/RunDataParsedAiContent-lLVWzL_j.js +25 -0
- package/dist/assets/RunDataParsedAiContent-legacy-BP9-BZ9y.js +234 -0
- package/dist/assets/RunDataParsedAiContent-legacy-Be3V5vPH.js +16 -0
- package/dist/assets/{RunDataSearch-BvoYWH8W.js → RunDataSearch-CfgrUp1Q.js} +10 -10
- package/dist/assets/RunDataSearch-legacy-Gct_MnP9.js +194 -0
- package/dist/assets/{RunDataTable-d3eXUdSg.js → RunDataTable-gBcLds6g.js} +16 -16
- package/dist/assets/RunDataTable-legacy-C3okH-2I.js +724 -0
- package/dist/assets/{SamlOnboarding-CRtDDWqf.js → SamlOnboarding-B9GmsTCa.js} +15 -15
- package/dist/assets/SamlOnboarding-legacy-DOsu-pYe.js +92 -0
- package/dist/assets/{SaveButton-D1iDaopV.js → SaveButton-DMlAg6iF.js} +3 -3
- package/dist/assets/SaveButton-legacy-D7IEJ_Eb.js +123 -0
- package/dist/assets/{SelectedItemsInfo-CSzniBOD.js → SelectedItemsInfo-BxomzONZ.js} +2 -2
- package/dist/assets/SelectedItemsInfo-legacy-Df4orSkP.js +95 -0
- package/dist/assets/{SettingsApiView-DqnHEaAj.js → SettingsApiView-C2JaCEY4.js} +20 -20
- package/dist/assets/SettingsApiView-legacy-C6d8TfWr.js +409 -0
- package/dist/assets/{SettingsCommunityNodesView-C7JC1VAK.js → SettingsCommunityNodesView-_kOJvcAb.js} +34 -34
- package/dist/assets/SettingsCommunityNodesView-legacy-DWWeuTG5.js +443 -0
- package/dist/assets/{SettingsExternalSecrets-CqTHs6zk.js → SettingsExternalSecrets-C99m8ABz.js} +18 -18
- package/dist/assets/SettingsExternalSecrets-legacy-BzZ4XIFG.js +315 -0
- package/dist/assets/{SettingsLdapView-zifHhZKy.js → SettingsLdapView-C9WjBc7I.js} +21 -21
- package/dist/assets/SettingsLdapView-legacy-_AcWgHUq.js +2246 -0
- package/dist/assets/{SettingsLogStreamingView-CQwuqSl8.js → SettingsLogStreamingView-DHsRuyjZ.js} +20 -20
- package/dist/assets/SettingsLogStreamingView-legacy-tDLLJ44w.js +479 -0
- package/dist/assets/SettingsMCPView-51n0OMXD.js +936 -0
- package/dist/assets/SettingsMCPView-BGXq9o_x.css +1248 -0
- package/dist/assets/SettingsMCPView-legacy-i3kndEib.js +1111 -0
- package/dist/assets/{SettingsPersonalView-C1NF8zuk.js → SettingsPersonalView-D446WlNq.js} +16 -16
- package/dist/assets/SettingsPersonalView-legacy-BIKKlcFP.js +484 -0
- package/dist/assets/SettingsProvisioningView-C4D0a4Kz.css +303 -0
- package/dist/assets/SettingsProvisioningView-CMxF-qBt.js +448 -0
- package/dist/assets/SettingsProvisioningView-legacy-Dgc-3R2G.js +530 -0
- package/dist/assets/{SettingsSourceControl-CZryQCqT.js → SettingsSourceControl-CdGLap-v.js} +20 -20
- package/dist/assets/SettingsSourceControl-legacy-CRO9lIt0.js +580 -0
- package/dist/assets/{SettingsSso-CeeFO_Pv.js → SettingsSso-CRUwWu73.js} +21 -21
- package/dist/assets/SettingsSso-legacy-pdNyjmak.js +507 -0
- package/dist/assets/{SettingsUsageAndPlan-DMMd5WcZ.js → SettingsUsageAndPlan-B6x8zZXr.js} +19 -19
- package/dist/assets/SettingsUsageAndPlan-legacy-DFV0qoLH.js +505 -0
- package/dist/assets/{SettingsUsersView-DWVyE4hY.js → SettingsUsersView-Dsbnghnu.js} +21 -21
- package/dist/assets/SettingsUsersView-legacy-u0Fwqh1l.js +931 -0
- package/dist/assets/{SettingsView-trF6L-tM.js → SettingsView-cK0an9QH.js} +13 -12
- package/dist/assets/SettingsView-legacy-4r_N7Sjz.js +346 -0
- package/dist/assets/{SetupTemplateFormStep-BsgzR5CN.js → SetupTemplateFormStep-0WNtoZGl.js} +6 -6
- package/dist/assets/SetupTemplateFormStep-legacy-OcWvmzbf.js +548 -0
- package/dist/assets/{SetupView-Bx4ZLcja.js → SetupView-BLVZ5AeU.js} +15 -15
- package/dist/assets/SetupView-legacy-CRn9XSyo.js +126 -0
- package/dist/assets/{SetupWorkflowCredentialsButton-DR_aufFd.js → SetupWorkflowCredentialsButton-C0LFoT-P.js} +12 -12
- package/dist/assets/SetupWorkflowCredentialsButton-legacy-QokrFtZ-.js +84 -0
- package/dist/assets/{SetupWorkflowFromTemplateView-Ded77Ph-.js → SetupWorkflowFromTemplateView-B9OOt2hJ.js} +21 -21
- package/dist/assets/SetupWorkflowFromTemplateView-legacy-CaJODj15.js +376 -0
- package/dist/assets/{SigninView-DXPofyPm.js → SigninView-BpvLJPl1.js} +16 -16
- package/dist/assets/SigninView-legacy-DvW5NQXx.js +441 -0
- package/dist/assets/{SignoutView-B7H_dRJO.js → SignoutView-BWZuW4X2.js} +10 -10
- package/dist/assets/SignoutView-legacy-Clx351-m.js +56 -0
- package/dist/assets/{SignupView-BHWVvwh8.js → SignupView-Bf89NmFx.js} +15 -15
- package/dist/assets/SignupView-legacy-y9mI7y_i.js +154 -0
- package/dist/assets/{TagsDropdown-D6CYk5R8.js → TagsDropdown-BGeOVful.js} +4 -4
- package/dist/assets/TagsDropdown-legacy-C4hvzF0m.js +285 -0
- package/dist/assets/{TemplateDetails-ezK9JOOl.js → TemplateDetails-B6qqstGY.js} +7 -7
- package/dist/assets/TemplateDetails-legacy-DJ5AmpDn.js +197 -0
- package/dist/assets/{TemplateList-DztR2yKa.js → TemplateList-BGEW-ffb.js} +5 -5
- package/dist/assets/TemplateList-legacy-DK9daXlW.js +411 -0
- package/dist/assets/{TemplatesCollectionView-Bu_YRd84.js → TemplatesCollectionView-CotElubt.js} +23 -23
- package/dist/assets/TemplatesCollectionView-legacy-BLpP7qpC.js +248 -0
- package/dist/assets/{TemplatesSearchView-C7zBEV2b.js → TemplatesSearchView-CF_JB0Nl.js} +21 -21
- package/dist/assets/TemplatesSearchView-legacy-D5-BrZSe.js +1427 -0
- package/dist/assets/{TemplatesView-BnozPkTX.js → TemplatesView-KjV1fZuK.js} +3 -3
- package/dist/assets/TemplatesView-legacy-BR7FfPHI.js +113 -0
- package/dist/assets/{TemplatesWorkflowView-BTyHc3MG.js → TemplatesWorkflowView-D3dhsGtS.js} +25 -25
- package/dist/assets/TemplatesWorkflowView-legacy-BwhS7Lp6.js +220 -0
- package/dist/assets/{TestRunDetailView-B76TM9u8.js → TestRunDetailView-CwCkkxlL.js} +18 -18
- package/dist/assets/TestRunDetailView-legacy-B8xeQdn3.js +500 -0
- package/dist/assets/TextWithHighlights-legacy-CVW5NpX4.js +108 -0
- package/dist/assets/{TimeAgo-Gv5h1Utx.js → TimeAgo-CxNgd8gh.js} +2 -2
- package/dist/assets/TimeAgo-legacy-C6dJd_gm.js +200 -0
- package/dist/assets/{TriggerPanel-Dx9LpA4p.js → TriggerPanel-BGFaLV08.js} +80 -28
- package/dist/assets/{TriggerPanel-BQveVt6Q.css → TriggerPanel-jKx3Ut66.css} +31 -10
- package/dist/assets/TriggerPanel-legacy-B2UgkRPw.js +1519 -0
- package/dist/assets/VirtualSchema-BANmgn2J.js +43 -0
- package/dist/assets/{VirtualSchema-CUUzo795.js → VirtualSchema-CQeMCJz2.js} +16 -16
- package/dist/assets/VirtualSchema-legacy-DgLao-iv.js +16 -0
- package/dist/assets/VirtualSchema-legacy-DxxDcdpp.js +2655 -0
- package/dist/assets/{VueMarkdown-CiR4a0gO.js → VueMarkdown-BVDHDwjC.js} +1 -1
- package/dist/assets/VueMarkdown-legacy-C7HrPz2N.js +50 -0
- package/dist/assets/{WorkerView-D7h4pmTk.js → WorkerView-DaMext16.js} +39 -39
- package/dist/assets/WorkerView-legacy-BHcVajFe.js +636 -0
- package/dist/assets/{WorkflowActivator-k3HTYXbc.js → WorkflowActivator-B_HRrCra.js} +8 -8
- package/dist/assets/WorkflowActivator-legacy-DwUgfsYm.js +473 -0
- package/dist/assets/{WorkflowExecutionsInfoAccordion-DL5cBkbK.js → WorkflowExecutionsInfoAccordion-B9s5Q7yu.js} +7 -7
- package/dist/assets/WorkflowExecutionsInfoAccordion-legacy-BP2sx7KH.js +226 -0
- package/dist/assets/WorkflowExecutionsLandingPage-legacy-Bc8Pv97E.js +136 -0
- package/dist/assets/{WorkflowExecutionsLandingPage-DlXz9Jry.js → WorkflowExecutionsLandingPage-q-oTzfKu.js} +21 -21
- package/dist/assets/{WorkflowExecutionsPreview-DJWD2i74.js → WorkflowExecutionsPreview-LAeONz_V.js} +25 -25
- package/dist/assets/WorkflowExecutionsPreview-legacy-DYnU2VEN.js +745 -0
- package/dist/assets/{WorkflowExecutionsView-CK-2WqY7.js → WorkflowExecutionsView-CfFjhYz4.js} +38 -38
- package/dist/assets/WorkflowExecutionsView-legacy-DKAzbr8n.js +880 -0
- package/dist/assets/WorkflowHistory-legacy-Csdiq5NP.js +881 -0
- package/dist/assets/{WorkflowHistory-Cb-ZoRBp.js → WorkflowHistory-n0uzAdZE.js} +19 -19
- package/dist/assets/{WorkflowOnboardingView-CguOMlib.js → WorkflowOnboardingView-CHSk719X.js} +9 -9
- package/dist/assets/WorkflowOnboardingView-legacy-B9zP9lMz.js +95 -0
- package/dist/assets/{WorkflowPreview-DY79uYFw.js → WorkflowPreview-BRS-DBzm.js} +5 -5
- package/dist/assets/WorkflowPreview-legacy-DA2H3NgE.js +249 -0
- package/dist/assets/{WorkflowTagsDropdown-CdEFZM1A.js → WorkflowTagsDropdown-CxVnfj8H.js} +2 -2
- package/dist/assets/WorkflowTagsDropdown-legacy-DHfnvOJY.js +90 -0
- package/dist/assets/{WorkflowsView-BnxQSw3m.js → WorkflowsView-CypeB-OF.js} +98 -80
- package/dist/assets/{WorkflowsView-2XTsT7zB.css → WorkflowsView-M8ExG7Q2.css} +22 -19
- package/dist/assets/WorkflowsView-legacy-DMyidvQo.js +3521 -0
- package/dist/assets/{_MapCache-Byd-DTfo.js → _MapCache-Y29RpBXS.js} +50 -10
- package/dist/assets/_MapCache-legacy-GeIax_zP.js +11061 -0
- package/dist/assets/_plugin-vue_export-helper-legacy-DZMI5HPp.js +19 -0
- package/dist/assets/apiKeys.store-legacy-CpmQpacT.js +76 -0
- package/dist/assets/{apiKeys.store-CPsBJKkq.js → apiKeys.store-uglU3Z3p.js} +1 -1
- package/dist/assets/{assistant.store-DvuxtpS4.js → assistant.store-CxWBk3OU.js} +6 -6
- package/dist/assets/assistant.store-legacy-BM5rx1Eo.js +1313 -0
- package/dist/assets/{auth.eventBus-YsWbuB84.js → auth.eventBus-6li5BYVU.js} +1 -1
- package/dist/assets/auth.eventBus-legacy-BMxxHZ6c.js +22 -0
- package/dist/assets/{banners.store-BQPwuqhn.js → banners.store-DtwO0jVD.js} +3 -3
- package/dist/assets/banners.store-legacy-CpyAILCk.js +260 -0
- package/dist/assets/buttons.esm-legacy-BLrJSt1Z.js +419 -0
- package/dist/assets/chart-legacy-DbW-cf8m.js +12055 -0
- package/dist/assets/{chartjs.utils-Bf07Y-P-.js → chartjs.utils-BCpB09lQ.js} +3 -3
- package/dist/assets/chartjs.utils-legacy-DkVdV-lK.js +208 -0
- package/dist/assets/{chatPanel.store-fM-8PK9i.js → chatPanel.store-CB1RbrcJ.js} +4 -4
- package/dist/assets/chatPanel.store-legacy-BKAXbpla.js +153 -0
- package/dist/assets/chunk-legacy-Re9CbdfL.js +59 -0
- package/dist/assets/cloudPlan.store-legacy-BpTKyznI.js +208 -0
- package/dist/assets/{cloudPlan.store-DrraBpZJ.js → cloudPlan.store-oTKMV1Bw.js} +2 -2
- package/dist/assets/{col-DK_GtMhM.js → col-dYShDiWC.js} +3 -3
- package/dist/assets/col-legacy-BmizH2a4.js +186 -0
- package/dist/assets/{constants-DvlTm3U4.js → constants-COt-IPHd.js} +362 -356
- package/dist/assets/constants-legacy-D22nGw-a.js +26 -0
- package/dist/assets/constants-legacy-DiqA0Pu_.js +61343 -0
- package/dist/assets/{core-6lPsS9S5.js → core-CH2Kku_3.js} +1 -1
- package/dist/assets/core-legacy-BVoFM47F.js +1857 -0
- package/dist/assets/core-legacy-De470jmW.js +20 -0
- package/dist/assets/{dataTable.store-u9fGWest.js → dataTable.store-DIXUyEMT.js} +2 -2
- package/dist/assets/dataTable.store-legacy-CmwyMqOI.js +199 -0
- package/dist/assets/{date-picker-CVSd-BRt.js → date-picker-CTXxgDjF.js} +3 -3
- package/dist/assets/date-picker-legacy-igcU0G4D.js +4508 -0
- package/dist/assets/{dateFormatter-BD73Za8B.js → dateFormatter-DICwd3T9.js} +1 -1
- package/dist/assets/dateFormatter-legacy-DQcBot5g.js +53 -0
- package/dist/assets/dateformat-legacy-Xt1X-tys.js +161 -0
- package/dist/assets/{dialog-BMoy5MDa.js → dialog-B4B-qXLz.js} +4 -4
- package/dist/assets/dialog-legacy-CqQ_Lwls.js +518 -0
- package/dist/assets/{dist-CWw8iddm.js → dist-D33xoYUY.js} +1 -1
- package/dist/assets/dist-legacy-8f5owWm6.js +204 -0
- package/dist/assets/{empty-BuGRxzl4.js → empty-RTEMfF4N.js} +1 -1
- package/dist/assets/empty-legacy-DnVUoqbC.js +2409 -0
- package/dist/assets/en-legacy-Bgme8Vbm.js +98 -0
- package/dist/assets/en-legacy-BwVJMmMW.js +16 -0
- package/dist/assets/{es-BazDU8Wd.js → es-Cjns9o4Y.js} +1 -1
- package/dist/assets/es-legacy-8dRs2C3P.js +16006 -0
- package/dist/assets/{evaluation.constants-CIiAC2dT.js → evaluation.constants-CCdKPNue.js} +3 -3
- package/dist/assets/evaluation.constants-legacy-Cb1ghpxc.js +363 -0
- package/dist/assets/{executions.store-IU9p1s46.js → executions.store-CLBytlL8.js} +1 -1
- package/dist/assets/executions.store-legacy-b_Dcfsqp.js +246 -0
- package/dist/assets/exports-legacy-RTRnyI4R.js +3103 -0
- package/dist/assets/{externalSecrets.ee.store-1z63wMHN.js → externalSecrets.ee.store-DSLmsq-8.js} +2 -2
- package/dist/assets/externalSecrets.ee.store-legacy-DaQgDltD.js +145 -0
- package/dist/assets/{focusPanel.store-BJpwjMIG.js → focusPanel.store-DX5ouusK.js} +4 -4
- package/dist/assets/focusPanel.store-legacy-DwBTeIg0.js +264 -0
- package/dist/assets/{folders.store-Db975T-w.js → folders.store-ReN2UdkF.js} +2 -2
- package/dist/assets/folders.store-legacy-DpbE1pFn.js +267 -0
- package/dist/assets/{icon-DhADuA9N.js → icon-OKik-N-d.js} +1 -1
- package/dist/assets/icon-legacy-CdX_ytdJ.js +458 -0
- package/dist/assets/{index-C8erHZ_Y.css → index-4I6DPmNr.css} +1 -1
- package/dist/assets/{index-C25i7qsE.js → index-BN-GABJS.js} +184 -1622
- package/dist/assets/index-legacy-Bah3XJ83.js +28424 -0
- package/dist/assets/insights.constants-legacy-D5Y8YhR_.js +64 -0
- package/dist/assets/{insights.store-DC_enAA-.js → insights.store-Bb-LzcON.js} +4 -4
- package/dist/assets/insights.store-legacy-CVTSLRio.js +89 -0
- package/dist/assets/{insights.utils-ClJRVRAK.js → insights.utils-CxISkct3.js} +8 -8
- package/dist/assets/insights.utils-legacy-Cmg92kBM.js +96 -0
- package/dist/assets/isEmpty-legacy-MFqoebb1.js +43393 -0
- package/dist/assets/{isEmpty-DrZRN4lR.js → isEmpty-wmU6JYi-.js} +30 -31
- package/dist/assets/{languageModules-CNluY7w0.js → languageModules-BF7Ga1Pj.js} +1 -1
- package/dist/assets/languageModules-legacy-BaU1eOK3.js +7184 -0
- package/dist/assets/{logStreaming.store-CPvxjcQB.js → logStreaming.store-Fc_T_-nj.js} +1 -1
- package/dist/assets/logStreaming.store-legacy-DWvVitNv.js +209 -0
- package/dist/assets/mcp.constants-BCNosk1p.js +5 -0
- package/dist/assets/mcp.constants-legacy-CZfk8DW2.js +18 -0
- package/dist/assets/{mcp.store-YGfe2oZU.js → mcp.store-C8IcP4Ke.js} +23 -3
- package/dist/assets/mcp.store-legacy-DdS8xt5B.js +125 -0
- package/dist/assets/{merge-CKEa8BM2.js → merge-B2-guEpy.js} +1 -1
- package/dist/assets/merge-legacy-qdjRv-L4.js +1529 -0
- package/dist/assets/{nodeCreator.store-DHz0Nc1Y.js → nodeCreator.store-D147rfwl.js} +8 -8
- package/dist/assets/nodeCreator.store-legacy-DTmylsCF.js +4758 -0
- package/dist/assets/{nodeIcon-ry_JIpAT.js → nodeIcon-C5u0jQvj.js} +2 -2
- package/dist/assets/nodeIcon-legacy-BV5Z8WOV.js +122 -0
- package/dist/assets/{nodeTransforms-PeZUYiCs.js → nodeTransforms-DUsdQQqR.js} +2 -2
- package/dist/assets/nodeTransforms-legacy-CuPizwtt.js +86 -0
- package/dist/assets/{npsSurvey.store-BTpA4Bdf.js → npsSurvey.store-afUgQwnO.js} +2 -2
- package/dist/assets/npsSurvey.store-legacy-BbzLkX9z.js +123 -0
- package/dist/assets/{orderBy-CMVxNao4.js → orderBy-HPnqXwF2.js} +2 -2
- package/dist/assets/orderBy-legacy-soMIYLFU.js +63 -0
- package/dist/assets/{overlay-B8MMvNgs.js → overlay-DZyfhUVh.js} +2 -2
- package/dist/assets/overlay-legacy-CIUzKIyX.js +218 -0
- package/dist/assets/{path-browserify-DsmB_HMK.js → path-browserify-CTmc1OxV.js} +1 -1
- package/dist/assets/path-browserify-legacy-DJbEMZcd.js +328 -0
- package/dist/assets/{personalizedTemplatesV3.store-C0D2WZuq.js → personalizedTemplatesV3.store-01UVhq2y.js} +4 -4
- package/dist/assets/personalizedTemplatesV3.store-legacy-ZhQVYOUB.js +313 -0
- package/dist/assets/{pickBy-DWZbVA0W.js → pickBy-CknAbwMC.js} +2 -2
- package/dist/assets/pickBy-legacy-BBHSGJRx.js +59 -0
- package/dist/assets/polyfills-legacy-B4O_IIb-.js +4836 -0
- package/dist/assets/preload-helper-legacy-CXRjoQ0T.js +73 -0
- package/dist/assets/{radio-5XOrKEP7.js → radio-CYQWX3C9.js} +3 -3
- package/dist/assets/radio-legacy-cLdtGPV3.js +323 -0
- package/dist/assets/{readyToRunWorkflows.store-C23cIyhu.js → readyToRunWorkflows.store-B8_GmfI4.js} +5 -5
- package/dist/assets/readyToRunWorkflows.store-legacy-aejFCZX5.js +2086 -0
- package/dist/assets/{readyToRunWorkflowsV2.store-BxZUJyXQ.js → readyToRunWorkflowsV2.store-CuI-qJ95.js} +7 -7
- package/dist/assets/readyToRunWorkflowsV2.store-legacy-B_dd69MT.js +549 -0
- package/dist/assets/retry-legacy-CkXCWkMV.js +48 -0
- package/dist/assets/{roles.store-Bk6Eo7y8.js → roles.store-XKf-4ViI.js} +2 -2
- package/dist/assets/roles.store-legacy-Kp040fXj.js +67 -0
- package/dist/assets/{router-D4zIcC5W.js → router-D93aC8Os.js} +93 -84
- package/dist/assets/router-legacy-FVND-nAr.js +1705 -0
- package/dist/assets/{sanitize-html-BuXr7o4T.js → sanitize-html-Cfxibw1n.js} +2 -2
- package/dist/assets/sanitize-html-legacy-DfOUEbdf.js +9987 -0
- package/dist/assets/{schemaPreview.store-BVhugjbw.js → schemaPreview.store-CpV1sUpD.js} +2 -2
- package/dist/assets/schemaPreview.store-legacy-CVGvdvdr.js +153 -0
- package/dist/assets/{semver-lN9oCZPq.js → semver-Did-vdFS.js} +2 -2
- package/dist/assets/semver-legacy-Bddl7qjT.js +1499 -0
- package/dist/assets/smartDecimal-legacy-BeOdMR2z.js +19 -0
- package/dist/assets/sortByProperty-legacy-CgPLoqtk.js +21 -0
- package/dist/assets/{sourceControl.eventBus-BkPwCZw_.js → sourceControl.eventBus-N8j1xdTf.js} +1 -1
- package/dist/assets/sourceControl.eventBus-legacy-eIVV95jW.js +17 -0
- package/dist/assets/{src-D6S9Khji.js → src-FybnR12q.js} +648 -600
- package/dist/assets/src-legacy-CpFWWEWr.js +64208 -0
- package/dist/assets/{sso.store-qzj82Xj4.js → sso.store-BBQEezoi.js} +1 -1
- package/dist/assets/sso.store-legacy-BAxqS36V.js +185 -0
- package/dist/assets/{table-s-zqHExs.js → table-B__ElSXJ.js} +3 -3
- package/dist/assets/table-legacy-BfKy4v-Q.js +4957 -0
- package/dist/assets/{templateActions-BeIpzgaa.js → templateActions-DgyOHFG1.js} +4 -4
- package/dist/assets/templateActions-legacy-P4q_vvOZ.js +134 -0
- package/dist/assets/{templateTransforms-Cgy40V1P.js → templateTransforms-BcdsUZmX.js} +1 -1
- package/dist/assets/templateTransforms-legacy-Cam0KIvq.js +84 -0
- package/dist/assets/{templates.store-COjIpQaS.js → templates.store-BFnRGJH7.js} +3 -3
- package/dist/assets/templates.store-legacy-ofk_8E3C.js +459 -0
- package/dist/assets/truncate-legacy-B1qmzcuB.js +5763 -0
- package/dist/assets/{truncate-DGRsht-H.js → truncate-mIB0DVrK.js} +1 -1
- package/dist/assets/{uniqBy-BUNHbbw3.js → uniqBy-BruAENgo.js} +1 -1
- package/dist/assets/uniqBy-legacy-Zm0uD9jw.js +52 -0
- package/dist/assets/{usage.store-EBmhHKPv.js → usage.store-l7Do-93n.js} +1 -1
- package/dist/assets/usage.store-legacy-DQDWAXO_.js +126 -0
- package/dist/assets/{useActions-CqdsN2GH.js → useActions-CrswNkaq.js} +5 -5
- package/dist/assets/useActions-legacy-CbWvUxft.js +330 -0
- package/dist/assets/{useAgent-BHJHCfap.js → useAgent-C-QepMEq.js} +1 -1
- package/dist/assets/useAgent-legacy-USOKw7So.js +28 -0
- package/dist/assets/{useBeforeUnload-BPhnlPrH.js → useBeforeUnload-Wtg7mRCZ.js} +3 -3
- package/dist/assets/useBeforeUnload-legacy-uZWtAsqr.js +69 -0
- package/dist/assets/{useBugReporting-oDEHgPM1.js → useBugReporting-9AU3y7Z8.js} +9 -9
- package/dist/assets/useBugReporting-legacy-0ADndwuR.js +383 -0
- package/dist/assets/{useCanvasMapping-DWlYBxgN.js → useCanvasMapping-C7uzjCWC.js} +19 -19
- package/dist/assets/useCanvasMapping-legacy-BUdFWQtI.js +14179 -0
- package/dist/assets/{useCanvasOperations-CFsSFVcO.js → useCanvasOperations-DzLHi0LA.js} +13 -13
- package/dist/assets/useCanvasOperations-legacy-CuiWyxvs.js +1992 -0
- package/dist/assets/{useChatCredentials-CMV_NA0l.js → useChatCredentials-CXFcbFXx.js} +24 -12
- package/dist/assets/useChatCredentials-legacy-BMZumVNM.js +717 -0
- package/dist/assets/useChatHubSidebarState-legacy-BWvNeC2H.js +733 -0
- package/dist/assets/{useChatHubSidebarState-CM9tokIj.js → useChatHubSidebarState-rgjEM3H6.js} +14 -7
- package/dist/assets/{useClipboard-fRnZpGbX.js → useClipboard-CfXsW13v.js} +2 -2
- package/dist/assets/useClipboard-legacy-C5rVUk4S.js +78 -0
- package/dist/assets/{useCommandBar-_c6cO-zw.js → useCommandBar-C1qIX-PQ.js} +29 -25
- package/dist/assets/useCommandBar-legacy-RBZZ3P2i.js +2100 -0
- package/dist/assets/{useDebounce-BgcdaJ78.js → useDebounce-CETVIuiZ.js} +2 -2
- package/dist/assets/useDebounce-legacy-G9H-ixfO.js +326 -0
- package/dist/assets/{useExecutionData-Bk540rxU.js → useExecutionData-BVzhcmq6.js} +1 -1
- package/dist/assets/useExecutionData-legacy-BGiu76RX.js +42 -0
- package/dist/assets/{useExecutionDebugging-BNrxsZTN.js → useExecutionDebugging-Cx7SuR0i.js} +7 -7
- package/dist/assets/useExecutionDebugging-legacy-jpoCoaFv.js +152 -0
- package/dist/assets/{useExecutionHelpers-DrFWi6u7.js → useExecutionHelpers--Vys-PWr.js} +5 -5
- package/dist/assets/useExecutionHelpers-legacy-CE3q6ePz.js +120 -0
- package/dist/assets/useExternalHooks-legacy-CtWM2ToU.js +53 -0
- package/dist/assets/{useExternalHooks-SxBXYVNW.js → useExternalHooks-q8smeo6K.js} +1 -1
- package/dist/assets/{useImportCurlCommand-obipPNWg.js → useImportCurlCommand-BLpnR8N2.js} +11 -11
- package/dist/assets/useImportCurlCommand-legacy-DCbH-i63.js +8269 -0
- package/dist/assets/useIntersectionObserver-legacy-CQWXa295.js +69 -0
- package/dist/assets/{useKeybindings-DlmwtVDN.js → useKeybindings-CDJKqPsl.js} +4 -4
- package/dist/assets/useKeybindings-legacy-B9KbjAsp.js +118 -0
- package/dist/assets/{useLogsTreeExpand-gKLCILZL.js → useLogsTreeExpand-BdGrNW1V.js} +11 -11
- package/dist/assets/useLogsTreeExpand-legacy-DXkemvCE.js +1039 -0
- package/dist/assets/{useMcp-_gyuyL1x.js → useMcp-CZmhzw91.js} +3 -7
- package/dist/assets/useMcp-legacy-DvW-r8YQ.js +46 -0
- package/dist/assets/{useMessage-Ceo97RRX.js → useMessage-Dtn5nLnt.js} +5 -5
- package/dist/assets/useMessage-legacy-DST2kUuY.js +683 -0
- package/dist/assets/{usePageRedirectionHelper-C_ctyI4O.js → usePageRedirectionHelper-50R23u-V.js} +4 -4
- package/dist/assets/usePageRedirectionHelper-legacy-C-71VW-Y.js +95 -0
- package/dist/assets/{usePinnedData-Csij2qN3.js → usePinnedData-DixE-21D.js} +5 -5
- package/dist/assets/usePinnedData-legacy-BsjuUA_c.js +283 -0
- package/dist/assets/{usePushConnection-XZibrqm8.js → usePushConnection-C_hAm9wG.js} +11 -11
- package/dist/assets/usePushConnection-legacy-CXZhl2wR.js +763 -0
- package/dist/assets/{useRecentResources-FhIOba0w.js → useRecentResources-CKX-UtMk.js} +7 -7
- package/dist/assets/useRecentResources-legacy-BXsoflsL.js +159 -0
- package/dist/assets/{useRunWorkflow-_-_hUnHE.js → useRunWorkflow-C9HukKMl.js} +9 -9
- package/dist/assets/useRunWorkflow-legacy-C7-J9SJI.js +1136 -0
- package/dist/assets/{useTelemetry-EOV0Llso.js → useTelemetry-CWnh4Zlh.js} +89 -54
- package/dist/assets/useTelemetry-legacy-BDIroahM.js +31004 -0
- package/dist/assets/{useTelemetryContext-CSMUQPEW.js → useTelemetryContext-PE8JU_Iv.js} +1 -1
- package/dist/assets/useTelemetryContext-legacy-E2rB8GXt.js +81 -0
- package/dist/assets/{useToast-BlMNYwds.js → useToast-BxclFB6W.js} +6 -6
- package/dist/assets/useToast-legacy-B7FuM_6n.js +610 -0
- package/dist/assets/{useWorkflowActivate-OfPMIBJ5.js → useWorkflowActivate-Cmog1_-j.js} +8 -8
- package/dist/assets/useWorkflowActivate-legacy-5SOzZU7C.js +125 -0
- package/dist/assets/{useWorkflowSaving-CWyt929n.js → useWorkflowSaving-DSJgdRoP.js} +9 -9
- package/dist/assets/useWorkflowSaving-legacy-C5sOlXzQ.js +328 -0
- package/dist/assets/{useWorkflowsCache-BSXTJC8C.js → useWorkflowsCache-DKCw8FH2.js} +1 -1
- package/dist/assets/useWorkflowsCache-legacy-1OAIoSYM.js +217 -0
- package/dist/assets/{versions.store-Dx98n6R_.js → versions.store-Dh42EsAx.js} +3 -3
- package/dist/assets/versions.store-legacy-DeA4olF0.js +244 -0
- package/dist/assets/vue-json-pretty-BAtqAAV1.js +1130 -0
- package/dist/assets/vue-json-pretty-legacy-Dk5EQofb.js +1282 -0
- package/dist/assets/vue-legacy-Cj7LJTPA.js +4579 -0
- package/dist/assets/vue.runtime.esm-bundler-legacy-Bq05oSFs.js +8050 -0
- package/dist/assets/xml-legacy-Cyrxa7r6.js +1245 -0
- package/dist/index.html +107 -103
- package/dist/static/openChat.png +0 -0
- package/package.json +1 -1
- package/vite.config.mts +0 -2
- package/dist/assets/CollectionParameter-CizL_Xml.js +0 -58
- package/dist/assets/DemoFooter-D8E8sLCS.js +0 -71
- package/dist/assets/LogsPanel-sLas9qHQ.js +0 -58
- package/dist/assets/RunDataHtml-X9lzUZaX.js +0 -7
- package/dist/assets/RunDataParsedAiContent-DBP5JHe4.js +0 -25
- package/dist/assets/SettingsMCPView-BBO_ZyBU.css +0 -552
- package/dist/assets/SettingsMCPView-Chjl8-hw.js +0 -584
- package/dist/assets/SettingsProvisioningView-BFUB6c2Z.js +0 -252
- package/dist/assets/VirtualSchema-5T21Yyqx.js +0 -43
- package/dist/assets/vue-json-pretty-BltKoWq2.js +0 -681
- /package/dist/assets/{AnimatedSpinner-Dd4F9nQ8.js → AnimatedSpinner-4ie3BOLv.js} +0 -0
- /package/dist/assets/{PageViewLayout-Ccqeja5V.js → PageViewLayout-kj_BBPfv.js} +0 -0
- /package/dist/assets/{buttons.esm-Euf82NbC.js → buttons.esm-CT4flsfB.js} +0 -0
- /package/dist/assets/{chart-BI8B7UPV.js → chart-CE3HWIkr.js} +0 -0
- /package/dist/assets/{constants-CPQyU8WO.js → constants-9ReQTHaF.js} +0 -0
- /package/dist/assets/{core-CIkXL_1D.js → core-CzunNfUb.js} +0 -0
- /package/dist/assets/{insights.constants-NogjFJ3a.js → insights.constants-DK2g3nnD.js} +0 -0
- /package/dist/assets/{smartDecimal-5rgLDM96.js → smartDecimal-e9uPsnJa.js} +0 -0
- /package/dist/assets/{sortByProperty-0UtqPmvJ.js → sortByProperty-CUhVU03p.js} +0 -0
- /package/dist/assets/{useIntersectionObserver-BkAtQAzK.js → useIntersectionObserver-C8Bz3yon.js} +0 -0
- /package/dist/assets/{vue-LyXhKoPx.js → vue-RAk0R0Jn.js} +0 -0
- /package/dist/assets/{xml-F7krcG3E.js → xml-B_gYdkaU.js} +0 -0
|
@@ -0,0 +1,1857 @@
|
|
|
1
|
+
;
|
|
2
|
+
(function () {
|
|
3
|
+
System.register(["./chunk-legacy-Re9CbdfL.js"], function (_export, _context) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
var __commonJS, require_core;
|
|
7
|
+
return {
|
|
8
|
+
setters: [function (_chunkLegacy001Js) {
|
|
9
|
+
__commonJS = _chunkLegacy001Js.t;
|
|
10
|
+
}],
|
|
11
|
+
execute: function () {
|
|
12
|
+
//#region ../../../node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/core.js
|
|
13
|
+
_export("t", require_core = /* @__PURE__ */__commonJS({
|
|
14
|
+
"../../../node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/core.js": (exports, module) => {
|
|
15
|
+
function deepFreeze(obj) {
|
|
16
|
+
if (obj instanceof Map) obj.clear = obj.delete = obj.set = function () {
|
|
17
|
+
throw new Error("map is read-only");
|
|
18
|
+
};else if (obj instanceof Set) obj.add = obj.clear = obj.delete = function () {
|
|
19
|
+
throw new Error("set is read-only");
|
|
20
|
+
};
|
|
21
|
+
Object.freeze(obj);
|
|
22
|
+
Object.getOwnPropertyNames(obj).forEach(name => {
|
|
23
|
+
const prop = obj[name];
|
|
24
|
+
const type = typeof prop;
|
|
25
|
+
if ((type === "object" || type === "function") && !Object.isFrozen(prop)) deepFreeze(prop);
|
|
26
|
+
});
|
|
27
|
+
return obj;
|
|
28
|
+
}
|
|
29
|
+
/** @typedef {import('highlight.js').CallbackResponse} CallbackResponse */
|
|
30
|
+
/** @typedef {import('highlight.js').CompiledMode} CompiledMode */
|
|
31
|
+
/** @implements CallbackResponse */
|
|
32
|
+
var Response = class {
|
|
33
|
+
/**
|
|
34
|
+
* @param {CompiledMode} mode
|
|
35
|
+
*/
|
|
36
|
+
constructor(mode) {
|
|
37
|
+
if (mode.data === void 0) mode.data = {};
|
|
38
|
+
this.data = mode.data;
|
|
39
|
+
this.isMatchIgnored = false;
|
|
40
|
+
}
|
|
41
|
+
ignoreMatch() {
|
|
42
|
+
this.isMatchIgnored = true;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* @param {string} value
|
|
47
|
+
* @returns {string}
|
|
48
|
+
*/
|
|
49
|
+
function escapeHTML(value) {
|
|
50
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* performs a shallow merge of multiple objects into one
|
|
54
|
+
*
|
|
55
|
+
* @template T
|
|
56
|
+
* @param {T} original
|
|
57
|
+
* @param {Record<string,any>[]} objects
|
|
58
|
+
* @returns {T} a single new object
|
|
59
|
+
*/
|
|
60
|
+
function inherit$1(original, ...objects) {
|
|
61
|
+
/** @type Record<string,any> */
|
|
62
|
+
const result = Object.create(null);
|
|
63
|
+
for (const key in original) result[key] = original[key];
|
|
64
|
+
objects.forEach(function (obj) {
|
|
65
|
+
for (const key in obj) result[key] = obj[key];
|
|
66
|
+
});
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @typedef {object} Renderer
|
|
71
|
+
* @property {(text: string) => void} addText
|
|
72
|
+
* @property {(node: Node) => void} openNode
|
|
73
|
+
* @property {(node: Node) => void} closeNode
|
|
74
|
+
* @property {() => string} value
|
|
75
|
+
*/
|
|
76
|
+
/** @typedef {{scope?: string, language?: string, sublanguage?: boolean}} Node */
|
|
77
|
+
/** @typedef {{walk: (r: Renderer) => void}} Tree */
|
|
78
|
+
/** */
|
|
79
|
+
var SPAN_CLOSE = "</span>";
|
|
80
|
+
/**
|
|
81
|
+
* Determines if a node needs to be wrapped in <span>
|
|
82
|
+
*
|
|
83
|
+
* @param {Node} node */
|
|
84
|
+
var emitsWrappingTags = node => {
|
|
85
|
+
return !!node.scope;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @param {string} name
|
|
90
|
+
* @param {{prefix:string}} options
|
|
91
|
+
*/
|
|
92
|
+
var scopeToCSSClass = (name, {
|
|
93
|
+
prefix
|
|
94
|
+
}) => {
|
|
95
|
+
if (name.startsWith("language:")) return name.replace("language:", "language-");
|
|
96
|
+
if (name.includes(".")) {
|
|
97
|
+
const pieces = name.split(".");
|
|
98
|
+
return [`${prefix}${pieces.shift()}`, ...pieces.map((x, i) => `${x}${"_".repeat(i + 1)}`)].join(" ");
|
|
99
|
+
}
|
|
100
|
+
return `${prefix}${name}`;
|
|
101
|
+
};
|
|
102
|
+
/** @type {Renderer} */
|
|
103
|
+
var HTMLRenderer = class {
|
|
104
|
+
/**
|
|
105
|
+
* Creates a new HTMLRenderer
|
|
106
|
+
*
|
|
107
|
+
* @param {Tree} parseTree - the parse tree (must support `walk` API)
|
|
108
|
+
* @param {{classPrefix: string}} options
|
|
109
|
+
*/
|
|
110
|
+
constructor(parseTree, options) {
|
|
111
|
+
this.buffer = "";
|
|
112
|
+
this.classPrefix = options.classPrefix;
|
|
113
|
+
parseTree.walk(this);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Adds texts to the output stream
|
|
117
|
+
*
|
|
118
|
+
* @param {string} text */
|
|
119
|
+
addText(text) {
|
|
120
|
+
this.buffer += escapeHTML(text);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Adds a node open to the output stream (if needed)
|
|
124
|
+
*
|
|
125
|
+
* @param {Node} node */
|
|
126
|
+
openNode(node) {
|
|
127
|
+
if (!emitsWrappingTags(node)) return;
|
|
128
|
+
const className = scopeToCSSClass(node.scope, {
|
|
129
|
+
prefix: this.classPrefix
|
|
130
|
+
});
|
|
131
|
+
this.span(className);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Adds a node close to the output stream (if needed)
|
|
135
|
+
*
|
|
136
|
+
* @param {Node} node */
|
|
137
|
+
closeNode(node) {
|
|
138
|
+
if (!emitsWrappingTags(node)) return;
|
|
139
|
+
this.buffer += SPAN_CLOSE;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* returns the accumulated buffer
|
|
143
|
+
*/
|
|
144
|
+
value() {
|
|
145
|
+
return this.buffer;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Builds a span element
|
|
149
|
+
*
|
|
150
|
+
* @param {string} className */
|
|
151
|
+
span(className) {
|
|
152
|
+
this.buffer += `<span class="${className}">`;
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
/** @typedef {{scope?: string, language?: string, children: Node[]} | string} Node */
|
|
156
|
+
/** @typedef {{scope?: string, language?: string, children: Node[]} } DataNode */
|
|
157
|
+
/** @typedef {import('highlight.js').Emitter} Emitter */
|
|
158
|
+
/** */
|
|
159
|
+
/** @returns {DataNode} */
|
|
160
|
+
var newNode = (opts = {}) => {
|
|
161
|
+
/** @type DataNode */
|
|
162
|
+
const result = {
|
|
163
|
+
children: []
|
|
164
|
+
};
|
|
165
|
+
Object.assign(result, opts);
|
|
166
|
+
return result;
|
|
167
|
+
};
|
|
168
|
+
var TokenTree = class TokenTree {
|
|
169
|
+
constructor() {
|
|
170
|
+
/** @type DataNode */
|
|
171
|
+
this.rootNode = newNode();
|
|
172
|
+
this.stack = [this.rootNode];
|
|
173
|
+
}
|
|
174
|
+
get top() {
|
|
175
|
+
return this.stack[this.stack.length - 1];
|
|
176
|
+
}
|
|
177
|
+
get root() {
|
|
178
|
+
return this.rootNode;
|
|
179
|
+
}
|
|
180
|
+
/** @param {Node} node */
|
|
181
|
+
add(node) {
|
|
182
|
+
this.top.children.push(node);
|
|
183
|
+
}
|
|
184
|
+
/** @param {string} scope */
|
|
185
|
+
openNode(scope) {
|
|
186
|
+
/** @type Node */
|
|
187
|
+
const node = newNode({
|
|
188
|
+
scope
|
|
189
|
+
});
|
|
190
|
+
this.add(node);
|
|
191
|
+
this.stack.push(node);
|
|
192
|
+
}
|
|
193
|
+
closeNode() {
|
|
194
|
+
if (this.stack.length > 1) return this.stack.pop();
|
|
195
|
+
}
|
|
196
|
+
closeAllNodes() {
|
|
197
|
+
while (this.closeNode());
|
|
198
|
+
}
|
|
199
|
+
toJSON() {
|
|
200
|
+
return JSON.stringify(this.rootNode, null, 4);
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* @typedef { import("./html_renderer").Renderer } Renderer
|
|
204
|
+
* @param {Renderer} builder
|
|
205
|
+
*/
|
|
206
|
+
walk(builder) {
|
|
207
|
+
return this.constructor._walk(builder, this.rootNode);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* @param {Renderer} builder
|
|
211
|
+
* @param {Node} node
|
|
212
|
+
*/
|
|
213
|
+
static _walk(builder, node) {
|
|
214
|
+
if (typeof node === "string") builder.addText(node);else if (node.children) {
|
|
215
|
+
builder.openNode(node);
|
|
216
|
+
node.children.forEach(child => this._walk(builder, child));
|
|
217
|
+
builder.closeNode(node);
|
|
218
|
+
}
|
|
219
|
+
return builder;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* @param {Node} node
|
|
223
|
+
*/
|
|
224
|
+
static _collapse(node) {
|
|
225
|
+
if (typeof node === "string") return;
|
|
226
|
+
if (!node.children) return;
|
|
227
|
+
if (node.children.every(el => typeof el === "string")) node.children = [node.children.join("")];else node.children.forEach(child => {
|
|
228
|
+
TokenTree._collapse(child);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
Currently this is all private API, but this is the minimal API necessary
|
|
234
|
+
that an Emitter must implement to fully support the parser.
|
|
235
|
+
|
|
236
|
+
Minimal interface:
|
|
237
|
+
|
|
238
|
+
- addText(text)
|
|
239
|
+
- __addSublanguage(emitter, subLanguageName)
|
|
240
|
+
- startScope(scope)
|
|
241
|
+
- endScope()
|
|
242
|
+
- finalize()
|
|
243
|
+
- toHTML()
|
|
244
|
+
|
|
245
|
+
*/
|
|
246
|
+
/**
|
|
247
|
+
* @implements {Emitter}
|
|
248
|
+
*/
|
|
249
|
+
var TokenTreeEmitter = class extends TokenTree {
|
|
250
|
+
/**
|
|
251
|
+
* @param {*} options
|
|
252
|
+
*/
|
|
253
|
+
constructor(options) {
|
|
254
|
+
super();
|
|
255
|
+
this.options = options;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* @param {string} text
|
|
259
|
+
*/
|
|
260
|
+
addText(text) {
|
|
261
|
+
if (text === "") return;
|
|
262
|
+
this.add(text);
|
|
263
|
+
}
|
|
264
|
+
/** @param {string} scope */
|
|
265
|
+
startScope(scope) {
|
|
266
|
+
this.openNode(scope);
|
|
267
|
+
}
|
|
268
|
+
endScope() {
|
|
269
|
+
this.closeNode();
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* @param {Emitter & {root: DataNode}} emitter
|
|
273
|
+
* @param {string} name
|
|
274
|
+
*/
|
|
275
|
+
__addSublanguage(emitter, name) {
|
|
276
|
+
/** @type DataNode */
|
|
277
|
+
const node = emitter.root;
|
|
278
|
+
if (name) node.scope = `language:${name}`;
|
|
279
|
+
this.add(node);
|
|
280
|
+
}
|
|
281
|
+
toHTML() {
|
|
282
|
+
return new HTMLRenderer(this, this.options).value();
|
|
283
|
+
}
|
|
284
|
+
finalize() {
|
|
285
|
+
this.closeAllNodes();
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
/**
|
|
290
|
+
* @param {string} value
|
|
291
|
+
* @returns {RegExp}
|
|
292
|
+
* */
|
|
293
|
+
/**
|
|
294
|
+
* @param {RegExp | string } re
|
|
295
|
+
* @returns {string}
|
|
296
|
+
*/
|
|
297
|
+
function source(re) {
|
|
298
|
+
if (!re) return null;
|
|
299
|
+
if (typeof re === "string") return re;
|
|
300
|
+
return re.source;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* @param {RegExp | string } re
|
|
304
|
+
* @returns {string}
|
|
305
|
+
*/
|
|
306
|
+
function lookahead(re) {
|
|
307
|
+
return concat("(?=", re, ")");
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* @param {RegExp | string } re
|
|
311
|
+
* @returns {string}
|
|
312
|
+
*/
|
|
313
|
+
function anyNumberOfTimes(re) {
|
|
314
|
+
return concat("(?:", re, ")*");
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* @param {RegExp | string } re
|
|
318
|
+
* @returns {string}
|
|
319
|
+
*/
|
|
320
|
+
function optional(re) {
|
|
321
|
+
return concat("(?:", re, ")?");
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* @param {...(RegExp | string) } args
|
|
325
|
+
* @returns {string}
|
|
326
|
+
*/
|
|
327
|
+
function concat(...args) {
|
|
328
|
+
return args.map(x => source(x)).join("");
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* @param { Array<string | RegExp | Object> } args
|
|
332
|
+
* @returns {object}
|
|
333
|
+
*/
|
|
334
|
+
function stripOptionsFromArgs(args) {
|
|
335
|
+
const opts = args[args.length - 1];
|
|
336
|
+
if (typeof opts === "object" && opts.constructor === Object) {
|
|
337
|
+
args.splice(args.length - 1, 1);
|
|
338
|
+
return opts;
|
|
339
|
+
} else return {};
|
|
340
|
+
}
|
|
341
|
+
/** @typedef { {capture?: boolean} } RegexEitherOptions */
|
|
342
|
+
/**
|
|
343
|
+
* Any of the passed expresssions may match
|
|
344
|
+
*
|
|
345
|
+
* Creates a huge this | this | that | that match
|
|
346
|
+
* @param {(RegExp | string)[] | [...(RegExp | string)[], RegexEitherOptions]} args
|
|
347
|
+
* @returns {string}
|
|
348
|
+
*/
|
|
349
|
+
function either(...args) {
|
|
350
|
+
return "(" + (stripOptionsFromArgs(args).capture ? "" : "?:") + args.map(x => source(x)).join("|") + ")";
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* @param {RegExp | string} re
|
|
354
|
+
* @returns {number}
|
|
355
|
+
*/
|
|
356
|
+
function countMatchGroups(re) {
|
|
357
|
+
return (/* @__PURE__ */new RegExp(re.toString() + "|")).exec("").length - 1;
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Does lexeme start with a regular expression match at the beginning
|
|
361
|
+
* @param {RegExp} re
|
|
362
|
+
* @param {string} lexeme
|
|
363
|
+
*/
|
|
364
|
+
function startsWith(re, lexeme) {
|
|
365
|
+
const match = re && re.exec(lexeme);
|
|
366
|
+
return match && match.index === 0;
|
|
367
|
+
}
|
|
368
|
+
var BACKREF_RE = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
369
|
+
/**
|
|
370
|
+
* @param {(string | RegExp)[]} regexps
|
|
371
|
+
* @param {{joinWith: string}} opts
|
|
372
|
+
* @returns {string}
|
|
373
|
+
*/
|
|
374
|
+
function _rewriteBackreferences(regexps, {
|
|
375
|
+
joinWith
|
|
376
|
+
}) {
|
|
377
|
+
let numCaptures = 0;
|
|
378
|
+
return regexps.map(regex => {
|
|
379
|
+
numCaptures += 1;
|
|
380
|
+
const offset = numCaptures;
|
|
381
|
+
let re = source(regex);
|
|
382
|
+
let out = "";
|
|
383
|
+
while (re.length > 0) {
|
|
384
|
+
const match = BACKREF_RE.exec(re);
|
|
385
|
+
if (!match) {
|
|
386
|
+
out += re;
|
|
387
|
+
break;
|
|
388
|
+
}
|
|
389
|
+
out += re.substring(0, match.index);
|
|
390
|
+
re = re.substring(match.index + match[0].length);
|
|
391
|
+
if (match[0][0] === "\\" && match[1]) out += "\\" + String(Number(match[1]) + offset);else {
|
|
392
|
+
out += match[0];
|
|
393
|
+
if (match[0] === "(") numCaptures++;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
return out;
|
|
397
|
+
}).map(re => `(${re})`).join(joinWith);
|
|
398
|
+
}
|
|
399
|
+
/** @typedef {import('highlight.js').Mode} Mode */
|
|
400
|
+
/** @typedef {import('highlight.js').ModeCallback} ModeCallback */
|
|
401
|
+
var MATCH_NOTHING_RE = /\b\B/;
|
|
402
|
+
var IDENT_RE = "[a-zA-Z]\\w*";
|
|
403
|
+
var UNDERSCORE_IDENT_RE = "[a-zA-Z_]\\w*";
|
|
404
|
+
var NUMBER_RE = "\\b\\d+(\\.\\d+)?";
|
|
405
|
+
var C_NUMBER_RE = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";
|
|
406
|
+
var BINARY_NUMBER_RE = "\\b(0b[01]+)";
|
|
407
|
+
var RE_STARTERS_RE = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";
|
|
408
|
+
/**
|
|
409
|
+
* @param { Partial<Mode> & {binary?: string | RegExp} } opts
|
|
410
|
+
*/
|
|
411
|
+
var SHEBANG = (opts = {}) => {
|
|
412
|
+
const beginShebang = /^#![ ]*\//;
|
|
413
|
+
if (opts.binary) opts.begin = concat(beginShebang, /.*\b/, opts.binary, /\b.*/);
|
|
414
|
+
return inherit$1({
|
|
415
|
+
scope: "meta",
|
|
416
|
+
begin: beginShebang,
|
|
417
|
+
end: /$/,
|
|
418
|
+
relevance: 0,
|
|
419
|
+
"on:begin": (m, resp) => {
|
|
420
|
+
if (m.index !== 0) resp.ignoreMatch();
|
|
421
|
+
}
|
|
422
|
+
}, opts);
|
|
423
|
+
};
|
|
424
|
+
var BACKSLASH_ESCAPE = {
|
|
425
|
+
begin: "\\\\[\\s\\S]",
|
|
426
|
+
relevance: 0
|
|
427
|
+
};
|
|
428
|
+
var APOS_STRING_MODE = {
|
|
429
|
+
scope: "string",
|
|
430
|
+
begin: "'",
|
|
431
|
+
end: "'",
|
|
432
|
+
illegal: "\\n",
|
|
433
|
+
contains: [BACKSLASH_ESCAPE]
|
|
434
|
+
};
|
|
435
|
+
var QUOTE_STRING_MODE = {
|
|
436
|
+
scope: "string",
|
|
437
|
+
begin: "\"",
|
|
438
|
+
end: "\"",
|
|
439
|
+
illegal: "\\n",
|
|
440
|
+
contains: [BACKSLASH_ESCAPE]
|
|
441
|
+
};
|
|
442
|
+
var PHRASAL_WORDS_MODE = {
|
|
443
|
+
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
|
|
444
|
+
};
|
|
445
|
+
/**
|
|
446
|
+
* Creates a comment mode
|
|
447
|
+
*
|
|
448
|
+
* @param {string | RegExp} begin
|
|
449
|
+
* @param {string | RegExp} end
|
|
450
|
+
* @param {Mode | {}} [modeOptions]
|
|
451
|
+
* @returns {Partial<Mode>}
|
|
452
|
+
*/
|
|
453
|
+
var COMMENT = function (begin, end, modeOptions = {}) {
|
|
454
|
+
const mode = inherit$1({
|
|
455
|
+
scope: "comment",
|
|
456
|
+
begin,
|
|
457
|
+
end,
|
|
458
|
+
contains: []
|
|
459
|
+
}, modeOptions);
|
|
460
|
+
mode.contains.push({
|
|
461
|
+
scope: "doctag",
|
|
462
|
+
begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
|
|
463
|
+
end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,
|
|
464
|
+
excludeBegin: true,
|
|
465
|
+
relevance: 0
|
|
466
|
+
});
|
|
467
|
+
const ENGLISH_WORD = either("I", "a", "is", "so", "us", "to", "at", "if", "in", "it", "on", /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, /[A-Za-z]+[-][a-z]+/, /[A-Za-z][a-z]{2,}/);
|
|
468
|
+
mode.contains.push({
|
|
469
|
+
begin: concat(/[ ]+/, "(", ENGLISH_WORD, /[.]?[:]?([.][ ]|[ ])/, "){3}")
|
|
470
|
+
});
|
|
471
|
+
return mode;
|
|
472
|
+
};
|
|
473
|
+
var C_LINE_COMMENT_MODE = COMMENT("//", "$");
|
|
474
|
+
var C_BLOCK_COMMENT_MODE = COMMENT("/\\*", "\\*/");
|
|
475
|
+
var HASH_COMMENT_MODE = COMMENT("#", "$");
|
|
476
|
+
var NUMBER_MODE = {
|
|
477
|
+
scope: "number",
|
|
478
|
+
begin: NUMBER_RE,
|
|
479
|
+
relevance: 0
|
|
480
|
+
};
|
|
481
|
+
var C_NUMBER_MODE = {
|
|
482
|
+
scope: "number",
|
|
483
|
+
begin: C_NUMBER_RE,
|
|
484
|
+
relevance: 0
|
|
485
|
+
};
|
|
486
|
+
var BINARY_NUMBER_MODE = {
|
|
487
|
+
scope: "number",
|
|
488
|
+
begin: BINARY_NUMBER_RE,
|
|
489
|
+
relevance: 0
|
|
490
|
+
};
|
|
491
|
+
var REGEXP_MODE = {
|
|
492
|
+
scope: "regexp",
|
|
493
|
+
begin: /\/(?=[^/\n]*\/)/,
|
|
494
|
+
end: /\/[gimuy]*/,
|
|
495
|
+
contains: [BACKSLASH_ESCAPE, {
|
|
496
|
+
begin: /\[/,
|
|
497
|
+
end: /\]/,
|
|
498
|
+
relevance: 0,
|
|
499
|
+
contains: [BACKSLASH_ESCAPE]
|
|
500
|
+
}]
|
|
501
|
+
};
|
|
502
|
+
var TITLE_MODE = {
|
|
503
|
+
scope: "title",
|
|
504
|
+
begin: IDENT_RE,
|
|
505
|
+
relevance: 0
|
|
506
|
+
};
|
|
507
|
+
var UNDERSCORE_TITLE_MODE = {
|
|
508
|
+
scope: "title",
|
|
509
|
+
begin: UNDERSCORE_IDENT_RE,
|
|
510
|
+
relevance: 0
|
|
511
|
+
};
|
|
512
|
+
var METHOD_GUARD = {
|
|
513
|
+
begin: "\\.\\s*" + UNDERSCORE_IDENT_RE,
|
|
514
|
+
relevance: 0
|
|
515
|
+
};
|
|
516
|
+
/**
|
|
517
|
+
* Adds end same as begin mechanics to a mode
|
|
518
|
+
*
|
|
519
|
+
* Your mode must include at least a single () match group as that first match
|
|
520
|
+
* group is what is used for comparison
|
|
521
|
+
* @param {Partial<Mode>} mode
|
|
522
|
+
*/
|
|
523
|
+
var END_SAME_AS_BEGIN = function (mode) {
|
|
524
|
+
return Object.assign(mode, {
|
|
525
|
+
"on:begin": (m, resp) => {
|
|
526
|
+
resp.data._beginMatch = m[1];
|
|
527
|
+
},
|
|
528
|
+
"on:end": (m, resp) => {
|
|
529
|
+
if (resp.data._beginMatch !== m[1]) resp.ignoreMatch();
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
};
|
|
533
|
+
var MODES = /* @__PURE__ */Object.freeze({
|
|
534
|
+
__proto__: null,
|
|
535
|
+
APOS_STRING_MODE,
|
|
536
|
+
BACKSLASH_ESCAPE,
|
|
537
|
+
BINARY_NUMBER_MODE,
|
|
538
|
+
BINARY_NUMBER_RE,
|
|
539
|
+
COMMENT,
|
|
540
|
+
C_BLOCK_COMMENT_MODE,
|
|
541
|
+
C_LINE_COMMENT_MODE,
|
|
542
|
+
C_NUMBER_MODE,
|
|
543
|
+
C_NUMBER_RE,
|
|
544
|
+
END_SAME_AS_BEGIN,
|
|
545
|
+
HASH_COMMENT_MODE,
|
|
546
|
+
IDENT_RE,
|
|
547
|
+
MATCH_NOTHING_RE,
|
|
548
|
+
METHOD_GUARD,
|
|
549
|
+
NUMBER_MODE,
|
|
550
|
+
NUMBER_RE,
|
|
551
|
+
PHRASAL_WORDS_MODE,
|
|
552
|
+
QUOTE_STRING_MODE,
|
|
553
|
+
REGEXP_MODE,
|
|
554
|
+
RE_STARTERS_RE,
|
|
555
|
+
SHEBANG,
|
|
556
|
+
TITLE_MODE,
|
|
557
|
+
UNDERSCORE_IDENT_RE,
|
|
558
|
+
UNDERSCORE_TITLE_MODE
|
|
559
|
+
});
|
|
560
|
+
/**
|
|
561
|
+
@typedef {import('highlight.js').CallbackResponse} CallbackResponse
|
|
562
|
+
@typedef {import('highlight.js').CompilerExt} CompilerExt
|
|
563
|
+
*/
|
|
564
|
+
/**
|
|
565
|
+
* Skip a match if it has a preceding dot
|
|
566
|
+
*
|
|
567
|
+
* This is used for `beginKeywords` to prevent matching expressions such as
|
|
568
|
+
* `bob.keyword.do()`. The mode compiler automatically wires this up as a
|
|
569
|
+
* special _internal_ 'on:begin' callback for modes with `beginKeywords`
|
|
570
|
+
* @param {RegExpMatchArray} match
|
|
571
|
+
* @param {CallbackResponse} response
|
|
572
|
+
*/
|
|
573
|
+
function skipIfHasPrecedingDot(match, response) {
|
|
574
|
+
if (match.input[match.index - 1] === ".") response.ignoreMatch();
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
*
|
|
578
|
+
* @type {CompilerExt}
|
|
579
|
+
*/
|
|
580
|
+
function scopeClassName(mode, _parent) {
|
|
581
|
+
if (mode.className !== void 0) {
|
|
582
|
+
mode.scope = mode.className;
|
|
583
|
+
delete mode.className;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* `beginKeywords` syntactic sugar
|
|
588
|
+
* @type {CompilerExt}
|
|
589
|
+
*/
|
|
590
|
+
function beginKeywords(mode, parent) {
|
|
591
|
+
if (!parent) return;
|
|
592
|
+
if (!mode.beginKeywords) return;
|
|
593
|
+
mode.begin = "\\b(" + mode.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)";
|
|
594
|
+
mode.__beforeBegin = skipIfHasPrecedingDot;
|
|
595
|
+
mode.keywords = mode.keywords || mode.beginKeywords;
|
|
596
|
+
delete mode.beginKeywords;
|
|
597
|
+
if (mode.relevance === void 0) mode.relevance = 0;
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* Allow `illegal` to contain an array of illegal values
|
|
601
|
+
* @type {CompilerExt}
|
|
602
|
+
*/
|
|
603
|
+
function compileIllegal(mode, _parent) {
|
|
604
|
+
if (!Array.isArray(mode.illegal)) return;
|
|
605
|
+
mode.illegal = either(...mode.illegal);
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* `match` to match a single expression for readability
|
|
609
|
+
* @type {CompilerExt}
|
|
610
|
+
*/
|
|
611
|
+
function compileMatch(mode, _parent) {
|
|
612
|
+
if (!mode.match) return;
|
|
613
|
+
if (mode.begin || mode.end) throw new Error("begin & end are not supported with match");
|
|
614
|
+
mode.begin = mode.match;
|
|
615
|
+
delete mode.match;
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* provides the default 1 relevance to all modes
|
|
619
|
+
* @type {CompilerExt}
|
|
620
|
+
*/
|
|
621
|
+
function compileRelevance(mode, _parent) {
|
|
622
|
+
if (mode.relevance === void 0) mode.relevance = 1;
|
|
623
|
+
}
|
|
624
|
+
var beforeMatchExt = (mode, parent) => {
|
|
625
|
+
if (!mode.beforeMatch) return;
|
|
626
|
+
if (mode.starts) throw new Error("beforeMatch cannot be used with starts");
|
|
627
|
+
const originalMode = Object.assign({}, mode);
|
|
628
|
+
Object.keys(mode).forEach(key => {
|
|
629
|
+
delete mode[key];
|
|
630
|
+
});
|
|
631
|
+
mode.keywords = originalMode.keywords;
|
|
632
|
+
mode.begin = concat(originalMode.beforeMatch, lookahead(originalMode.begin));
|
|
633
|
+
mode.starts = {
|
|
634
|
+
relevance: 0,
|
|
635
|
+
contains: [Object.assign(originalMode, {
|
|
636
|
+
endsParent: true
|
|
637
|
+
})]
|
|
638
|
+
};
|
|
639
|
+
mode.relevance = 0;
|
|
640
|
+
delete originalMode.beforeMatch;
|
|
641
|
+
};
|
|
642
|
+
var COMMON_KEYWORDS = ["of", "and", "for", "in", "not", "or", "if", "then", "parent", "list", "value"];
|
|
643
|
+
var DEFAULT_KEYWORD_SCOPE = "keyword";
|
|
644
|
+
/**
|
|
645
|
+
* Given raw keywords from a language definition, compile them.
|
|
646
|
+
*
|
|
647
|
+
* @param {string | Record<string,string|string[]> | Array<string>} rawKeywords
|
|
648
|
+
* @param {boolean} caseInsensitive
|
|
649
|
+
*/
|
|
650
|
+
function compileKeywords(rawKeywords, caseInsensitive, scopeName = DEFAULT_KEYWORD_SCOPE) {
|
|
651
|
+
/** @type {import("highlight.js/private").KeywordDict} */
|
|
652
|
+
const compiledKeywords = Object.create(null);
|
|
653
|
+
if (typeof rawKeywords === "string") compileList(scopeName, rawKeywords.split(" "));else if (Array.isArray(rawKeywords)) compileList(scopeName, rawKeywords);else Object.keys(rawKeywords).forEach(function (scopeName$1) {
|
|
654
|
+
Object.assign(compiledKeywords, compileKeywords(rawKeywords[scopeName$1], caseInsensitive, scopeName$1));
|
|
655
|
+
});
|
|
656
|
+
return compiledKeywords;
|
|
657
|
+
/**
|
|
658
|
+
* Compiles an individual list of keywords
|
|
659
|
+
*
|
|
660
|
+
* Ex: "for if when while|5"
|
|
661
|
+
*
|
|
662
|
+
* @param {string} scopeName
|
|
663
|
+
* @param {Array<string>} keywordList
|
|
664
|
+
*/
|
|
665
|
+
function compileList(scopeName$1, keywordList) {
|
|
666
|
+
if (caseInsensitive) keywordList = keywordList.map(x => x.toLowerCase());
|
|
667
|
+
keywordList.forEach(function (keyword) {
|
|
668
|
+
const pair = keyword.split("|");
|
|
669
|
+
compiledKeywords[pair[0]] = [scopeName$1, scoreForKeyword(pair[0], pair[1])];
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Returns the proper score for a given keyword
|
|
675
|
+
*
|
|
676
|
+
* Also takes into account comment keywords, which will be scored 0 UNLESS
|
|
677
|
+
* another score has been manually assigned.
|
|
678
|
+
* @param {string} keyword
|
|
679
|
+
* @param {string} [providedScore]
|
|
680
|
+
*/
|
|
681
|
+
function scoreForKeyword(keyword, providedScore) {
|
|
682
|
+
if (providedScore) return Number(providedScore);
|
|
683
|
+
return commonKeyword(keyword) ? 0 : 1;
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* Determines if a given keyword is common or not
|
|
687
|
+
*
|
|
688
|
+
* @param {string} keyword */
|
|
689
|
+
function commonKeyword(keyword) {
|
|
690
|
+
return COMMON_KEYWORDS.includes(keyword.toLowerCase());
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* @type {Record<string, boolean>}
|
|
694
|
+
*/
|
|
695
|
+
var seenDeprecations = {};
|
|
696
|
+
/**
|
|
697
|
+
* @param {string} message
|
|
698
|
+
*/
|
|
699
|
+
var error = message => {
|
|
700
|
+
console.error(message);
|
|
701
|
+
};
|
|
702
|
+
/**
|
|
703
|
+
* @param {string} message
|
|
704
|
+
* @param {any} args
|
|
705
|
+
*/
|
|
706
|
+
var warn = (message, ...args) => {
|
|
707
|
+
console.log(`WARN: ${message}`, ...args);
|
|
708
|
+
};
|
|
709
|
+
/**
|
|
710
|
+
* @param {string} version
|
|
711
|
+
* @param {string} message
|
|
712
|
+
*/
|
|
713
|
+
var deprecated = (version$1, message) => {
|
|
714
|
+
if (seenDeprecations[`${version$1}/${message}`]) return;
|
|
715
|
+
console.log(`Deprecated as of ${version$1}. ${message}`);
|
|
716
|
+
seenDeprecations[`${version$1}/${message}`] = true;
|
|
717
|
+
};
|
|
718
|
+
/**
|
|
719
|
+
@typedef {import('highlight.js').CompiledMode} CompiledMode
|
|
720
|
+
*/
|
|
721
|
+
var MultiClassError = /* @__PURE__ */new Error();
|
|
722
|
+
/**
|
|
723
|
+
* Renumbers labeled scope names to account for additional inner match
|
|
724
|
+
* groups that otherwise would break everything.
|
|
725
|
+
*
|
|
726
|
+
* Lets say we 3 match scopes:
|
|
727
|
+
*
|
|
728
|
+
* { 1 => ..., 2 => ..., 3 => ... }
|
|
729
|
+
*
|
|
730
|
+
* So what we need is a clean match like this:
|
|
731
|
+
*
|
|
732
|
+
* (a)(b)(c) => [ "a", "b", "c" ]
|
|
733
|
+
*
|
|
734
|
+
* But this falls apart with inner match groups:
|
|
735
|
+
*
|
|
736
|
+
* (a)(((b)))(c) => ["a", "b", "b", "b", "c" ]
|
|
737
|
+
*
|
|
738
|
+
* Our scopes are now "out of alignment" and we're repeating `b` 3 times.
|
|
739
|
+
* What needs to happen is the numbers are remapped:
|
|
740
|
+
*
|
|
741
|
+
* { 1 => ..., 2 => ..., 5 => ... }
|
|
742
|
+
*
|
|
743
|
+
* We also need to know that the ONLY groups that should be output
|
|
744
|
+
* are 1, 2, and 5. This function handles this behavior.
|
|
745
|
+
*
|
|
746
|
+
* @param {CompiledMode} mode
|
|
747
|
+
* @param {Array<RegExp | string>} regexes
|
|
748
|
+
* @param {{key: "beginScope"|"endScope"}} opts
|
|
749
|
+
*/
|
|
750
|
+
function remapScopeNames(mode, regexes, {
|
|
751
|
+
key
|
|
752
|
+
}) {
|
|
753
|
+
let offset = 0;
|
|
754
|
+
const scopeNames = mode[key];
|
|
755
|
+
/** @type Record<number,boolean> */
|
|
756
|
+
const emit = {};
|
|
757
|
+
/** @type Record<number,string> */
|
|
758
|
+
const positions = {};
|
|
759
|
+
for (let i = 1; i <= regexes.length; i++) {
|
|
760
|
+
positions[i + offset] = scopeNames[i];
|
|
761
|
+
emit[i + offset] = true;
|
|
762
|
+
offset += countMatchGroups(regexes[i - 1]);
|
|
763
|
+
}
|
|
764
|
+
mode[key] = positions;
|
|
765
|
+
mode[key]._emit = emit;
|
|
766
|
+
mode[key]._multi = true;
|
|
767
|
+
}
|
|
768
|
+
/**
|
|
769
|
+
* @param {CompiledMode} mode
|
|
770
|
+
*/
|
|
771
|
+
function beginMultiClass(mode) {
|
|
772
|
+
if (!Array.isArray(mode.begin)) return;
|
|
773
|
+
if (mode.skip || mode.excludeBegin || mode.returnBegin) {
|
|
774
|
+
error("skip, excludeBegin, returnBegin not compatible with beginScope: {}");
|
|
775
|
+
throw MultiClassError;
|
|
776
|
+
}
|
|
777
|
+
if (typeof mode.beginScope !== "object" || mode.beginScope === null) {
|
|
778
|
+
error("beginScope must be object");
|
|
779
|
+
throw MultiClassError;
|
|
780
|
+
}
|
|
781
|
+
remapScopeNames(mode, mode.begin, {
|
|
782
|
+
key: "beginScope"
|
|
783
|
+
});
|
|
784
|
+
mode.begin = _rewriteBackreferences(mode.begin, {
|
|
785
|
+
joinWith: ""
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* @param {CompiledMode} mode
|
|
790
|
+
*/
|
|
791
|
+
function endMultiClass(mode) {
|
|
792
|
+
if (!Array.isArray(mode.end)) return;
|
|
793
|
+
if (mode.skip || mode.excludeEnd || mode.returnEnd) {
|
|
794
|
+
error("skip, excludeEnd, returnEnd not compatible with endScope: {}");
|
|
795
|
+
throw MultiClassError;
|
|
796
|
+
}
|
|
797
|
+
if (typeof mode.endScope !== "object" || mode.endScope === null) {
|
|
798
|
+
error("endScope must be object");
|
|
799
|
+
throw MultiClassError;
|
|
800
|
+
}
|
|
801
|
+
remapScopeNames(mode, mode.end, {
|
|
802
|
+
key: "endScope"
|
|
803
|
+
});
|
|
804
|
+
mode.end = _rewriteBackreferences(mode.end, {
|
|
805
|
+
joinWith: ""
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* this exists only to allow `scope: {}` to be used beside `match:`
|
|
810
|
+
* Otherwise `beginScope` would necessary and that would look weird
|
|
811
|
+
|
|
812
|
+
{
|
|
813
|
+
match: [ /def/, /\w+/ ]
|
|
814
|
+
scope: { 1: "keyword" , 2: "title" }
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
* @param {CompiledMode} mode
|
|
818
|
+
*/
|
|
819
|
+
function scopeSugar(mode) {
|
|
820
|
+
if (mode.scope && typeof mode.scope === "object" && mode.scope !== null) {
|
|
821
|
+
mode.beginScope = mode.scope;
|
|
822
|
+
delete mode.scope;
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* @param {CompiledMode} mode
|
|
827
|
+
*/
|
|
828
|
+
function MultiClass(mode) {
|
|
829
|
+
scopeSugar(mode);
|
|
830
|
+
if (typeof mode.beginScope === "string") mode.beginScope = {
|
|
831
|
+
_wrap: mode.beginScope
|
|
832
|
+
};
|
|
833
|
+
if (typeof mode.endScope === "string") mode.endScope = {
|
|
834
|
+
_wrap: mode.endScope
|
|
835
|
+
};
|
|
836
|
+
beginMultiClass(mode);
|
|
837
|
+
endMultiClass(mode);
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
@typedef {import('highlight.js').Mode} Mode
|
|
841
|
+
@typedef {import('highlight.js').CompiledMode} CompiledMode
|
|
842
|
+
@typedef {import('highlight.js').Language} Language
|
|
843
|
+
@typedef {import('highlight.js').HLJSPlugin} HLJSPlugin
|
|
844
|
+
@typedef {import('highlight.js').CompiledLanguage} CompiledLanguage
|
|
845
|
+
*/
|
|
846
|
+
/**
|
|
847
|
+
* Compiles a language definition result
|
|
848
|
+
*
|
|
849
|
+
* Given the raw result of a language definition (Language), compiles this so
|
|
850
|
+
* that it is ready for highlighting code.
|
|
851
|
+
* @param {Language} language
|
|
852
|
+
* @returns {CompiledLanguage}
|
|
853
|
+
*/
|
|
854
|
+
function compileLanguage(language) {
|
|
855
|
+
/**
|
|
856
|
+
* Builds a regex with the case sensitivity of the current language
|
|
857
|
+
*
|
|
858
|
+
* @param {RegExp | string} value
|
|
859
|
+
* @param {boolean} [global]
|
|
860
|
+
*/
|
|
861
|
+
function langRe(value, global) {
|
|
862
|
+
return new RegExp(source(value), "m" + (language.case_insensitive ? "i" : "") + (language.unicodeRegex ? "u" : "") + (global ? "g" : ""));
|
|
863
|
+
}
|
|
864
|
+
/**
|
|
865
|
+
Stores multiple regular expressions and allows you to quickly search for
|
|
866
|
+
them all in a string simultaneously - returning the first match. It does
|
|
867
|
+
this by creating a huge (a|b|c) regex - each individual item wrapped with ()
|
|
868
|
+
and joined by `|` - using match groups to track position. When a match is
|
|
869
|
+
found checking which position in the array has content allows us to figure
|
|
870
|
+
out which of the original regexes / match groups triggered the match.
|
|
871
|
+
|
|
872
|
+
The match object itself (the result of `Regex.exec`) is returned but also
|
|
873
|
+
enhanced by merging in any meta-data that was registered with the regex.
|
|
874
|
+
This is how we keep track of which mode matched, and what type of rule
|
|
875
|
+
(`illegal`, `begin`, end, etc).
|
|
876
|
+
*/
|
|
877
|
+
class MultiRegex {
|
|
878
|
+
constructor() {
|
|
879
|
+
this.matchIndexes = {};
|
|
880
|
+
this.regexes = [];
|
|
881
|
+
this.matchAt = 1;
|
|
882
|
+
this.position = 0;
|
|
883
|
+
}
|
|
884
|
+
addRule(re, opts) {
|
|
885
|
+
opts.position = this.position++;
|
|
886
|
+
this.matchIndexes[this.matchAt] = opts;
|
|
887
|
+
this.regexes.push([opts, re]);
|
|
888
|
+
this.matchAt += countMatchGroups(re) + 1;
|
|
889
|
+
}
|
|
890
|
+
compile() {
|
|
891
|
+
if (this.regexes.length === 0) this.exec = () => null;
|
|
892
|
+
this.matcherRe = langRe(_rewriteBackreferences(this.regexes.map(el => el[1]), {
|
|
893
|
+
joinWith: "|"
|
|
894
|
+
}), true);
|
|
895
|
+
this.lastIndex = 0;
|
|
896
|
+
}
|
|
897
|
+
/** @param {string} s */
|
|
898
|
+
exec(s) {
|
|
899
|
+
this.matcherRe.lastIndex = this.lastIndex;
|
|
900
|
+
const match = this.matcherRe.exec(s);
|
|
901
|
+
if (!match) return null;
|
|
902
|
+
const i = match.findIndex((el, i$1) => i$1 > 0 && el !== void 0);
|
|
903
|
+
const matchData = this.matchIndexes[i];
|
|
904
|
+
match.splice(0, i);
|
|
905
|
+
return Object.assign(match, matchData);
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
class ResumableMultiRegex {
|
|
909
|
+
constructor() {
|
|
910
|
+
this.rules = [];
|
|
911
|
+
this.multiRegexes = [];
|
|
912
|
+
this.count = 0;
|
|
913
|
+
this.lastIndex = 0;
|
|
914
|
+
this.regexIndex = 0;
|
|
915
|
+
}
|
|
916
|
+
getMatcher(index) {
|
|
917
|
+
if (this.multiRegexes[index]) return this.multiRegexes[index];
|
|
918
|
+
const matcher = new MultiRegex();
|
|
919
|
+
this.rules.slice(index).forEach(([re, opts]) => matcher.addRule(re, opts));
|
|
920
|
+
matcher.compile();
|
|
921
|
+
this.multiRegexes[index] = matcher;
|
|
922
|
+
return matcher;
|
|
923
|
+
}
|
|
924
|
+
resumingScanAtSamePosition() {
|
|
925
|
+
return this.regexIndex !== 0;
|
|
926
|
+
}
|
|
927
|
+
considerAll() {
|
|
928
|
+
this.regexIndex = 0;
|
|
929
|
+
}
|
|
930
|
+
addRule(re, opts) {
|
|
931
|
+
this.rules.push([re, opts]);
|
|
932
|
+
if (opts.type === "begin") this.count++;
|
|
933
|
+
}
|
|
934
|
+
/** @param {string} s */
|
|
935
|
+
exec(s) {
|
|
936
|
+
const m = this.getMatcher(this.regexIndex);
|
|
937
|
+
m.lastIndex = this.lastIndex;
|
|
938
|
+
let result = m.exec(s);
|
|
939
|
+
if (this.resumingScanAtSamePosition()) if (result && result.index === this.lastIndex) ;else {
|
|
940
|
+
const m2 = this.getMatcher(0);
|
|
941
|
+
m2.lastIndex = this.lastIndex + 1;
|
|
942
|
+
result = m2.exec(s);
|
|
943
|
+
}
|
|
944
|
+
if (result) {
|
|
945
|
+
this.regexIndex += result.position + 1;
|
|
946
|
+
if (this.regexIndex === this.count) this.considerAll();
|
|
947
|
+
}
|
|
948
|
+
return result;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
/**
|
|
952
|
+
* Given a mode, builds a huge ResumableMultiRegex that can be used to walk
|
|
953
|
+
* the content and find matches.
|
|
954
|
+
*
|
|
955
|
+
* @param {CompiledMode} mode
|
|
956
|
+
* @returns {ResumableMultiRegex}
|
|
957
|
+
*/
|
|
958
|
+
function buildModeRegex(mode) {
|
|
959
|
+
const mm = new ResumableMultiRegex();
|
|
960
|
+
mode.contains.forEach(term => mm.addRule(term.begin, {
|
|
961
|
+
rule: term,
|
|
962
|
+
type: "begin"
|
|
963
|
+
}));
|
|
964
|
+
if (mode.terminatorEnd) mm.addRule(mode.terminatorEnd, {
|
|
965
|
+
type: "end"
|
|
966
|
+
});
|
|
967
|
+
if (mode.illegal) mm.addRule(mode.illegal, {
|
|
968
|
+
type: "illegal"
|
|
969
|
+
});
|
|
970
|
+
return mm;
|
|
971
|
+
}
|
|
972
|
+
/** skip vs abort vs ignore
|
|
973
|
+
*
|
|
974
|
+
* @skip - The mode is still entered and exited normally (and contains rules apply),
|
|
975
|
+
* but all content is held and added to the parent buffer rather than being
|
|
976
|
+
* output when the mode ends. Mostly used with `sublanguage` to build up
|
|
977
|
+
* a single large buffer than can be parsed by sublanguage.
|
|
978
|
+
*
|
|
979
|
+
* - The mode begin ands ends normally.
|
|
980
|
+
* - Content matched is added to the parent mode buffer.
|
|
981
|
+
* - The parser cursor is moved forward normally.
|
|
982
|
+
*
|
|
983
|
+
* @abort - A hack placeholder until we have ignore. Aborts the mode (as if it
|
|
984
|
+
* never matched) but DOES NOT continue to match subsequent `contains`
|
|
985
|
+
* modes. Abort is bad/suboptimal because it can result in modes
|
|
986
|
+
* farther down not getting applied because an earlier rule eats the
|
|
987
|
+
* content but then aborts.
|
|
988
|
+
*
|
|
989
|
+
* - The mode does not begin.
|
|
990
|
+
* - Content matched by `begin` is added to the mode buffer.
|
|
991
|
+
* - The parser cursor is moved forward accordingly.
|
|
992
|
+
*
|
|
993
|
+
* @ignore - Ignores the mode (as if it never matched) and continues to match any
|
|
994
|
+
* subsequent `contains` modes. Ignore isn't technically possible with
|
|
995
|
+
* the current parser implementation.
|
|
996
|
+
*
|
|
997
|
+
* - The mode does not begin.
|
|
998
|
+
* - Content matched by `begin` is ignored.
|
|
999
|
+
* - The parser cursor is not moved forward.
|
|
1000
|
+
*/
|
|
1001
|
+
/**
|
|
1002
|
+
* Compiles an individual mode
|
|
1003
|
+
*
|
|
1004
|
+
* This can raise an error if the mode contains certain detectable known logic
|
|
1005
|
+
* issues.
|
|
1006
|
+
* @param {Mode} mode
|
|
1007
|
+
* @param {CompiledMode | null} [parent]
|
|
1008
|
+
* @returns {CompiledMode | never}
|
|
1009
|
+
*/
|
|
1010
|
+
function compileMode(mode, parent) {
|
|
1011
|
+
const cmode = mode;
|
|
1012
|
+
if (mode.isCompiled) return cmode;
|
|
1013
|
+
[scopeClassName, compileMatch, MultiClass, beforeMatchExt].forEach(ext => ext(mode, parent));
|
|
1014
|
+
language.compilerExtensions.forEach(ext => ext(mode, parent));
|
|
1015
|
+
mode.__beforeBegin = null;
|
|
1016
|
+
[beginKeywords, compileIllegal, compileRelevance].forEach(ext => ext(mode, parent));
|
|
1017
|
+
mode.isCompiled = true;
|
|
1018
|
+
let keywordPattern = null;
|
|
1019
|
+
if (typeof mode.keywords === "object" && mode.keywords.$pattern) {
|
|
1020
|
+
mode.keywords = Object.assign({}, mode.keywords);
|
|
1021
|
+
keywordPattern = mode.keywords.$pattern;
|
|
1022
|
+
delete mode.keywords.$pattern;
|
|
1023
|
+
}
|
|
1024
|
+
keywordPattern = keywordPattern || /\w+/;
|
|
1025
|
+
if (mode.keywords) mode.keywords = compileKeywords(mode.keywords, language.case_insensitive);
|
|
1026
|
+
cmode.keywordPatternRe = langRe(keywordPattern, true);
|
|
1027
|
+
if (parent) {
|
|
1028
|
+
if (!mode.begin) mode.begin = /\B|\b/;
|
|
1029
|
+
cmode.beginRe = langRe(cmode.begin);
|
|
1030
|
+
if (!mode.end && !mode.endsWithParent) mode.end = /\B|\b/;
|
|
1031
|
+
if (mode.end) cmode.endRe = langRe(cmode.end);
|
|
1032
|
+
cmode.terminatorEnd = source(cmode.end) || "";
|
|
1033
|
+
if (mode.endsWithParent && parent.terminatorEnd) cmode.terminatorEnd += (mode.end ? "|" : "") + parent.terminatorEnd;
|
|
1034
|
+
}
|
|
1035
|
+
if (mode.illegal) cmode.illegalRe = langRe(mode.illegal);
|
|
1036
|
+
if (!mode.contains) mode.contains = [];
|
|
1037
|
+
mode.contains = [].concat(...mode.contains.map(function (c) {
|
|
1038
|
+
return expandOrCloneMode(c === "self" ? mode : c);
|
|
1039
|
+
}));
|
|
1040
|
+
mode.contains.forEach(function (c) {
|
|
1041
|
+
compileMode(c, cmode);
|
|
1042
|
+
});
|
|
1043
|
+
if (mode.starts) compileMode(mode.starts, parent);
|
|
1044
|
+
cmode.matcher = buildModeRegex(cmode);
|
|
1045
|
+
return cmode;
|
|
1046
|
+
}
|
|
1047
|
+
if (!language.compilerExtensions) language.compilerExtensions = [];
|
|
1048
|
+
if (language.contains && language.contains.includes("self")) throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
1049
|
+
language.classNameAliases = inherit$1(language.classNameAliases || {});
|
|
1050
|
+
return compileMode(language);
|
|
1051
|
+
}
|
|
1052
|
+
/**
|
|
1053
|
+
* Determines if a mode has a dependency on it's parent or not
|
|
1054
|
+
*
|
|
1055
|
+
* If a mode does have a parent dependency then often we need to clone it if
|
|
1056
|
+
* it's used in multiple places so that each copy points to the correct parent,
|
|
1057
|
+
* where-as modes without a parent can often safely be re-used at the bottom of
|
|
1058
|
+
* a mode chain.
|
|
1059
|
+
*
|
|
1060
|
+
* @param {Mode | null} mode
|
|
1061
|
+
* @returns {boolean} - is there a dependency on the parent?
|
|
1062
|
+
* */
|
|
1063
|
+
function dependencyOnParent(mode) {
|
|
1064
|
+
if (!mode) return false;
|
|
1065
|
+
return mode.endsWithParent || dependencyOnParent(mode.starts);
|
|
1066
|
+
}
|
|
1067
|
+
/**
|
|
1068
|
+
* Expands a mode or clones it if necessary
|
|
1069
|
+
*
|
|
1070
|
+
* This is necessary for modes with parental dependenceis (see notes on
|
|
1071
|
+
* `dependencyOnParent`) and for nodes that have `variants` - which must then be
|
|
1072
|
+
* exploded into their own individual modes at compile time.
|
|
1073
|
+
*
|
|
1074
|
+
* @param {Mode} mode
|
|
1075
|
+
* @returns {Mode | Mode[]}
|
|
1076
|
+
* */
|
|
1077
|
+
function expandOrCloneMode(mode) {
|
|
1078
|
+
if (mode.variants && !mode.cachedVariants) mode.cachedVariants = mode.variants.map(function (variant) {
|
|
1079
|
+
return inherit$1(mode, {
|
|
1080
|
+
variants: null
|
|
1081
|
+
}, variant);
|
|
1082
|
+
});
|
|
1083
|
+
if (mode.cachedVariants) return mode.cachedVariants;
|
|
1084
|
+
if (dependencyOnParent(mode)) return inherit$1(mode, {
|
|
1085
|
+
starts: mode.starts ? inherit$1(mode.starts) : null
|
|
1086
|
+
});
|
|
1087
|
+
if (Object.isFrozen(mode)) return inherit$1(mode);
|
|
1088
|
+
return mode;
|
|
1089
|
+
}
|
|
1090
|
+
var version = "11.11.1";
|
|
1091
|
+
var HTMLInjectionError = class extends Error {
|
|
1092
|
+
constructor(reason, html) {
|
|
1093
|
+
super(reason);
|
|
1094
|
+
this.name = "HTMLInjectionError";
|
|
1095
|
+
this.html = html;
|
|
1096
|
+
}
|
|
1097
|
+
};
|
|
1098
|
+
/**
|
|
1099
|
+
@typedef {import('highlight.js').Mode} Mode
|
|
1100
|
+
@typedef {import('highlight.js').CompiledMode} CompiledMode
|
|
1101
|
+
@typedef {import('highlight.js').CompiledScope} CompiledScope
|
|
1102
|
+
@typedef {import('highlight.js').Language} Language
|
|
1103
|
+
@typedef {import('highlight.js').HLJSApi} HLJSApi
|
|
1104
|
+
@typedef {import('highlight.js').HLJSPlugin} HLJSPlugin
|
|
1105
|
+
@typedef {import('highlight.js').PluginEvent} PluginEvent
|
|
1106
|
+
@typedef {import('highlight.js').HLJSOptions} HLJSOptions
|
|
1107
|
+
@typedef {import('highlight.js').LanguageFn} LanguageFn
|
|
1108
|
+
@typedef {import('highlight.js').HighlightedHTMLElement} HighlightedHTMLElement
|
|
1109
|
+
@typedef {import('highlight.js').BeforeHighlightContext} BeforeHighlightContext
|
|
1110
|
+
@typedef {import('highlight.js/private').MatchType} MatchType
|
|
1111
|
+
@typedef {import('highlight.js/private').KeywordData} KeywordData
|
|
1112
|
+
@typedef {import('highlight.js/private').EnhancedMatch} EnhancedMatch
|
|
1113
|
+
@typedef {import('highlight.js/private').AnnotatedError} AnnotatedError
|
|
1114
|
+
@typedef {import('highlight.js').AutoHighlightResult} AutoHighlightResult
|
|
1115
|
+
@typedef {import('highlight.js').HighlightOptions} HighlightOptions
|
|
1116
|
+
@typedef {import('highlight.js').HighlightResult} HighlightResult
|
|
1117
|
+
*/
|
|
1118
|
+
var escape = escapeHTML;
|
|
1119
|
+
var inherit = inherit$1;
|
|
1120
|
+
var NO_MATCH = Symbol("nomatch");
|
|
1121
|
+
var MAX_KEYWORD_HITS = 7;
|
|
1122
|
+
/**
|
|
1123
|
+
* @param {any} hljs - object that is extended (legacy)
|
|
1124
|
+
* @returns {HLJSApi}
|
|
1125
|
+
*/
|
|
1126
|
+
var HLJS = function (hljs) {
|
|
1127
|
+
/** @type {Record<string, Language>} */
|
|
1128
|
+
const languages = Object.create(null);
|
|
1129
|
+
/** @type {Record<string, string>} */
|
|
1130
|
+
const aliases = Object.create(null);
|
|
1131
|
+
/** @type {HLJSPlugin[]} */
|
|
1132
|
+
const plugins = [];
|
|
1133
|
+
let SAFE_MODE = true;
|
|
1134
|
+
const LANGUAGE_NOT_FOUND = "Could not find the language '{}', did you forget to load/include a language module?";
|
|
1135
|
+
/** @type {Language} */
|
|
1136
|
+
const PLAINTEXT_LANGUAGE = {
|
|
1137
|
+
disableAutodetect: true,
|
|
1138
|
+
name: "Plain text",
|
|
1139
|
+
contains: []
|
|
1140
|
+
};
|
|
1141
|
+
/** @type HLJSOptions */
|
|
1142
|
+
let options = {
|
|
1143
|
+
ignoreUnescapedHTML: false,
|
|
1144
|
+
throwUnescapedHTML: false,
|
|
1145
|
+
noHighlightRe: /^(no-?highlight)$/i,
|
|
1146
|
+
languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
|
|
1147
|
+
classPrefix: "hljs-",
|
|
1148
|
+
cssSelector: "pre code",
|
|
1149
|
+
languages: null,
|
|
1150
|
+
__emitter: TokenTreeEmitter
|
|
1151
|
+
};
|
|
1152
|
+
/**
|
|
1153
|
+
* Tests a language name to see if highlighting should be skipped
|
|
1154
|
+
* @param {string} languageName
|
|
1155
|
+
*/
|
|
1156
|
+
function shouldNotHighlight(languageName) {
|
|
1157
|
+
return options.noHighlightRe.test(languageName);
|
|
1158
|
+
}
|
|
1159
|
+
/**
|
|
1160
|
+
* @param {HighlightedHTMLElement} block - the HTML element to determine language for
|
|
1161
|
+
*/
|
|
1162
|
+
function blockLanguage(block) {
|
|
1163
|
+
let classes = block.className + " ";
|
|
1164
|
+
classes += block.parentNode ? block.parentNode.className : "";
|
|
1165
|
+
const match = options.languageDetectRe.exec(classes);
|
|
1166
|
+
if (match) {
|
|
1167
|
+
const language = getLanguage(match[1]);
|
|
1168
|
+
if (!language) {
|
|
1169
|
+
warn(LANGUAGE_NOT_FOUND.replace("{}", match[1]));
|
|
1170
|
+
warn("Falling back to no-highlight mode for this block.", block);
|
|
1171
|
+
}
|
|
1172
|
+
return language ? match[1] : "no-highlight";
|
|
1173
|
+
}
|
|
1174
|
+
return classes.split(/\s+/).find(_class => shouldNotHighlight(_class) || getLanguage(_class));
|
|
1175
|
+
}
|
|
1176
|
+
/**
|
|
1177
|
+
* Core highlighting function.
|
|
1178
|
+
*
|
|
1179
|
+
* OLD API
|
|
1180
|
+
* highlight(lang, code, ignoreIllegals, continuation)
|
|
1181
|
+
*
|
|
1182
|
+
* NEW API
|
|
1183
|
+
* highlight(code, {lang, ignoreIllegals})
|
|
1184
|
+
*
|
|
1185
|
+
* @param {string} codeOrLanguageName - the language to use for highlighting
|
|
1186
|
+
* @param {string | HighlightOptions} optionsOrCode - the code to highlight
|
|
1187
|
+
* @param {boolean} [ignoreIllegals] - whether to ignore illegal matches, default is to bail
|
|
1188
|
+
*
|
|
1189
|
+
* @returns {HighlightResult} Result - an object that represents the result
|
|
1190
|
+
* @property {string} language - the language name
|
|
1191
|
+
* @property {number} relevance - the relevance score
|
|
1192
|
+
* @property {string} value - the highlighted HTML code
|
|
1193
|
+
* @property {string} code - the original raw code
|
|
1194
|
+
* @property {CompiledMode} top - top of the current mode stack
|
|
1195
|
+
* @property {boolean} illegal - indicates whether any illegal matches were found
|
|
1196
|
+
*/
|
|
1197
|
+
function highlight$1(codeOrLanguageName, optionsOrCode, ignoreIllegals) {
|
|
1198
|
+
let code = "";
|
|
1199
|
+
let languageName = "";
|
|
1200
|
+
if (typeof optionsOrCode === "object") {
|
|
1201
|
+
code = codeOrLanguageName;
|
|
1202
|
+
ignoreIllegals = optionsOrCode.ignoreIllegals;
|
|
1203
|
+
languageName = optionsOrCode.language;
|
|
1204
|
+
} else {
|
|
1205
|
+
deprecated("10.7.0", "highlight(lang, code, ...args) has been deprecated.");
|
|
1206
|
+
deprecated("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277");
|
|
1207
|
+
languageName = codeOrLanguageName;
|
|
1208
|
+
code = optionsOrCode;
|
|
1209
|
+
}
|
|
1210
|
+
if (ignoreIllegals === void 0) ignoreIllegals = true;
|
|
1211
|
+
/** @type {BeforeHighlightContext} */
|
|
1212
|
+
const context = {
|
|
1213
|
+
code,
|
|
1214
|
+
language: languageName
|
|
1215
|
+
};
|
|
1216
|
+
fire("before:highlight", context);
|
|
1217
|
+
const result = context.result ? context.result : _highlight(context.language, context.code, ignoreIllegals);
|
|
1218
|
+
result.code = context.code;
|
|
1219
|
+
fire("after:highlight", result);
|
|
1220
|
+
return result;
|
|
1221
|
+
}
|
|
1222
|
+
/**
|
|
1223
|
+
* private highlight that's used internally and does not fire callbacks
|
|
1224
|
+
*
|
|
1225
|
+
* @param {string} languageName - the language to use for highlighting
|
|
1226
|
+
* @param {string} codeToHighlight - the code to highlight
|
|
1227
|
+
* @param {boolean?} [ignoreIllegals] - whether to ignore illegal matches, default is to bail
|
|
1228
|
+
* @param {CompiledMode?} [continuation] - current continuation mode, if any
|
|
1229
|
+
* @returns {HighlightResult} - result of the highlight operation
|
|
1230
|
+
*/
|
|
1231
|
+
function _highlight(languageName, codeToHighlight, ignoreIllegals, continuation) {
|
|
1232
|
+
const keywordHits = Object.create(null);
|
|
1233
|
+
/**
|
|
1234
|
+
* Return keyword data if a match is a keyword
|
|
1235
|
+
* @param {CompiledMode} mode - current mode
|
|
1236
|
+
* @param {string} matchText - the textual match
|
|
1237
|
+
* @returns {KeywordData | false}
|
|
1238
|
+
*/
|
|
1239
|
+
function keywordData(mode, matchText) {
|
|
1240
|
+
return mode.keywords[matchText];
|
|
1241
|
+
}
|
|
1242
|
+
function processKeywords() {
|
|
1243
|
+
if (!top.keywords) {
|
|
1244
|
+
emitter.addText(modeBuffer);
|
|
1245
|
+
return;
|
|
1246
|
+
}
|
|
1247
|
+
let lastIndex = 0;
|
|
1248
|
+
top.keywordPatternRe.lastIndex = 0;
|
|
1249
|
+
let match = top.keywordPatternRe.exec(modeBuffer);
|
|
1250
|
+
let buf = "";
|
|
1251
|
+
while (match) {
|
|
1252
|
+
buf += modeBuffer.substring(lastIndex, match.index);
|
|
1253
|
+
const word = language.case_insensitive ? match[0].toLowerCase() : match[0];
|
|
1254
|
+
const data = keywordData(top, word);
|
|
1255
|
+
if (data) {
|
|
1256
|
+
const [kind, keywordRelevance] = data;
|
|
1257
|
+
emitter.addText(buf);
|
|
1258
|
+
buf = "";
|
|
1259
|
+
keywordHits[word] = (keywordHits[word] || 0) + 1;
|
|
1260
|
+
if (keywordHits[word] <= MAX_KEYWORD_HITS) relevance += keywordRelevance;
|
|
1261
|
+
if (kind.startsWith("_")) buf += match[0];else {
|
|
1262
|
+
const cssClass = language.classNameAliases[kind] || kind;
|
|
1263
|
+
emitKeyword(match[0], cssClass);
|
|
1264
|
+
}
|
|
1265
|
+
} else buf += match[0];
|
|
1266
|
+
lastIndex = top.keywordPatternRe.lastIndex;
|
|
1267
|
+
match = top.keywordPatternRe.exec(modeBuffer);
|
|
1268
|
+
}
|
|
1269
|
+
buf += modeBuffer.substring(lastIndex);
|
|
1270
|
+
emitter.addText(buf);
|
|
1271
|
+
}
|
|
1272
|
+
function processSubLanguage() {
|
|
1273
|
+
if (modeBuffer === "") return;
|
|
1274
|
+
/** @type HighlightResult */
|
|
1275
|
+
let result$1 = null;
|
|
1276
|
+
if (typeof top.subLanguage === "string") {
|
|
1277
|
+
if (!languages[top.subLanguage]) {
|
|
1278
|
+
emitter.addText(modeBuffer);
|
|
1279
|
+
return;
|
|
1280
|
+
}
|
|
1281
|
+
result$1 = _highlight(top.subLanguage, modeBuffer, true, continuations[top.subLanguage]);
|
|
1282
|
+
continuations[top.subLanguage] = result$1._top;
|
|
1283
|
+
} else result$1 = highlightAuto(modeBuffer, top.subLanguage.length ? top.subLanguage : null);
|
|
1284
|
+
if (top.relevance > 0) relevance += result$1.relevance;
|
|
1285
|
+
emitter.__addSublanguage(result$1._emitter, result$1.language);
|
|
1286
|
+
}
|
|
1287
|
+
function processBuffer() {
|
|
1288
|
+
if (top.subLanguage != null) processSubLanguage();else processKeywords();
|
|
1289
|
+
modeBuffer = "";
|
|
1290
|
+
}
|
|
1291
|
+
/**
|
|
1292
|
+
* @param {string} text
|
|
1293
|
+
* @param {string} scope
|
|
1294
|
+
*/
|
|
1295
|
+
function emitKeyword(keyword, scope) {
|
|
1296
|
+
if (keyword === "") return;
|
|
1297
|
+
emitter.startScope(scope);
|
|
1298
|
+
emitter.addText(keyword);
|
|
1299
|
+
emitter.endScope();
|
|
1300
|
+
}
|
|
1301
|
+
/**
|
|
1302
|
+
* @param {CompiledScope} scope
|
|
1303
|
+
* @param {RegExpMatchArray} match
|
|
1304
|
+
*/
|
|
1305
|
+
function emitMultiClass(scope, match) {
|
|
1306
|
+
let i = 1;
|
|
1307
|
+
const max = match.length - 1;
|
|
1308
|
+
while (i <= max) {
|
|
1309
|
+
if (!scope._emit[i]) {
|
|
1310
|
+
i++;
|
|
1311
|
+
continue;
|
|
1312
|
+
}
|
|
1313
|
+
const klass = language.classNameAliases[scope[i]] || scope[i];
|
|
1314
|
+
const text = match[i];
|
|
1315
|
+
if (klass) emitKeyword(text, klass);else {
|
|
1316
|
+
modeBuffer = text;
|
|
1317
|
+
processKeywords();
|
|
1318
|
+
modeBuffer = "";
|
|
1319
|
+
}
|
|
1320
|
+
i++;
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
/**
|
|
1324
|
+
* @param {CompiledMode} mode - new mode to start
|
|
1325
|
+
* @param {RegExpMatchArray} match
|
|
1326
|
+
*/
|
|
1327
|
+
function startNewMode(mode, match) {
|
|
1328
|
+
if (mode.scope && typeof mode.scope === "string") emitter.openNode(language.classNameAliases[mode.scope] || mode.scope);
|
|
1329
|
+
if (mode.beginScope) {
|
|
1330
|
+
if (mode.beginScope._wrap) {
|
|
1331
|
+
emitKeyword(modeBuffer, language.classNameAliases[mode.beginScope._wrap] || mode.beginScope._wrap);
|
|
1332
|
+
modeBuffer = "";
|
|
1333
|
+
} else if (mode.beginScope._multi) {
|
|
1334
|
+
emitMultiClass(mode.beginScope, match);
|
|
1335
|
+
modeBuffer = "";
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
top = Object.create(mode, {
|
|
1339
|
+
parent: {
|
|
1340
|
+
value: top
|
|
1341
|
+
}
|
|
1342
|
+
});
|
|
1343
|
+
return top;
|
|
1344
|
+
}
|
|
1345
|
+
/**
|
|
1346
|
+
* @param {CompiledMode } mode - the mode to potentially end
|
|
1347
|
+
* @param {RegExpMatchArray} match - the latest match
|
|
1348
|
+
* @param {string} matchPlusRemainder - match plus remainder of content
|
|
1349
|
+
* @returns {CompiledMode | void} - the next mode, or if void continue on in current mode
|
|
1350
|
+
*/
|
|
1351
|
+
function endOfMode(mode, match, matchPlusRemainder) {
|
|
1352
|
+
let matched = startsWith(mode.endRe, matchPlusRemainder);
|
|
1353
|
+
if (matched) {
|
|
1354
|
+
if (mode["on:end"]) {
|
|
1355
|
+
const resp = new Response(mode);
|
|
1356
|
+
mode["on:end"](match, resp);
|
|
1357
|
+
if (resp.isMatchIgnored) matched = false;
|
|
1358
|
+
}
|
|
1359
|
+
if (matched) {
|
|
1360
|
+
while (mode.endsParent && mode.parent) mode = mode.parent;
|
|
1361
|
+
return mode;
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
if (mode.endsWithParent) return endOfMode(mode.parent, match, matchPlusRemainder);
|
|
1365
|
+
}
|
|
1366
|
+
/**
|
|
1367
|
+
* Handle matching but then ignoring a sequence of text
|
|
1368
|
+
*
|
|
1369
|
+
* @param {string} lexeme - string containing full match text
|
|
1370
|
+
*/
|
|
1371
|
+
function doIgnore(lexeme) {
|
|
1372
|
+
if (top.matcher.regexIndex === 0) {
|
|
1373
|
+
modeBuffer += lexeme[0];
|
|
1374
|
+
return 1;
|
|
1375
|
+
} else {
|
|
1376
|
+
resumeScanAtSamePosition = true;
|
|
1377
|
+
return 0;
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* Handle the start of a new potential mode match
|
|
1382
|
+
*
|
|
1383
|
+
* @param {EnhancedMatch} match - the current match
|
|
1384
|
+
* @returns {number} how far to advance the parse cursor
|
|
1385
|
+
*/
|
|
1386
|
+
function doBeginMatch(match) {
|
|
1387
|
+
const lexeme = match[0];
|
|
1388
|
+
const newMode = match.rule;
|
|
1389
|
+
const resp = new Response(newMode);
|
|
1390
|
+
const beforeCallbacks = [newMode.__beforeBegin, newMode["on:begin"]];
|
|
1391
|
+
for (const cb of beforeCallbacks) {
|
|
1392
|
+
if (!cb) continue;
|
|
1393
|
+
cb(match, resp);
|
|
1394
|
+
if (resp.isMatchIgnored) return doIgnore(lexeme);
|
|
1395
|
+
}
|
|
1396
|
+
if (newMode.skip) modeBuffer += lexeme;else {
|
|
1397
|
+
if (newMode.excludeBegin) modeBuffer += lexeme;
|
|
1398
|
+
processBuffer();
|
|
1399
|
+
if (!newMode.returnBegin && !newMode.excludeBegin) modeBuffer = lexeme;
|
|
1400
|
+
}
|
|
1401
|
+
startNewMode(newMode, match);
|
|
1402
|
+
return newMode.returnBegin ? 0 : lexeme.length;
|
|
1403
|
+
}
|
|
1404
|
+
/**
|
|
1405
|
+
* Handle the potential end of mode
|
|
1406
|
+
*
|
|
1407
|
+
* @param {RegExpMatchArray} match - the current match
|
|
1408
|
+
*/
|
|
1409
|
+
function doEndMatch(match) {
|
|
1410
|
+
const lexeme = match[0];
|
|
1411
|
+
const matchPlusRemainder = codeToHighlight.substring(match.index);
|
|
1412
|
+
const endMode = endOfMode(top, match, matchPlusRemainder);
|
|
1413
|
+
if (!endMode) return NO_MATCH;
|
|
1414
|
+
const origin = top;
|
|
1415
|
+
if (top.endScope && top.endScope._wrap) {
|
|
1416
|
+
processBuffer();
|
|
1417
|
+
emitKeyword(lexeme, top.endScope._wrap);
|
|
1418
|
+
} else if (top.endScope && top.endScope._multi) {
|
|
1419
|
+
processBuffer();
|
|
1420
|
+
emitMultiClass(top.endScope, match);
|
|
1421
|
+
} else if (origin.skip) modeBuffer += lexeme;else {
|
|
1422
|
+
if (!(origin.returnEnd || origin.excludeEnd)) modeBuffer += lexeme;
|
|
1423
|
+
processBuffer();
|
|
1424
|
+
if (origin.excludeEnd) modeBuffer = lexeme;
|
|
1425
|
+
}
|
|
1426
|
+
do {
|
|
1427
|
+
if (top.scope) emitter.closeNode();
|
|
1428
|
+
if (!top.skip && !top.subLanguage) relevance += top.relevance;
|
|
1429
|
+
top = top.parent;
|
|
1430
|
+
} while (top !== endMode.parent);
|
|
1431
|
+
if (endMode.starts) startNewMode(endMode.starts, match);
|
|
1432
|
+
return origin.returnEnd ? 0 : lexeme.length;
|
|
1433
|
+
}
|
|
1434
|
+
function processContinuations() {
|
|
1435
|
+
const list = [];
|
|
1436
|
+
for (let current = top; current !== language; current = current.parent) if (current.scope) list.unshift(current.scope);
|
|
1437
|
+
list.forEach(item => emitter.openNode(item));
|
|
1438
|
+
}
|
|
1439
|
+
/** @type {{type?: MatchType, index?: number, rule?: Mode}}} */
|
|
1440
|
+
let lastMatch = {};
|
|
1441
|
+
/**
|
|
1442
|
+
* Process an individual match
|
|
1443
|
+
*
|
|
1444
|
+
* @param {string} textBeforeMatch - text preceding the match (since the last match)
|
|
1445
|
+
* @param {EnhancedMatch} [match] - the match itself
|
|
1446
|
+
*/
|
|
1447
|
+
function processLexeme(textBeforeMatch, match) {
|
|
1448
|
+
const lexeme = match && match[0];
|
|
1449
|
+
modeBuffer += textBeforeMatch;
|
|
1450
|
+
if (lexeme == null) {
|
|
1451
|
+
processBuffer();
|
|
1452
|
+
return 0;
|
|
1453
|
+
}
|
|
1454
|
+
if (lastMatch.type === "begin" && match.type === "end" && lastMatch.index === match.index && lexeme === "") {
|
|
1455
|
+
modeBuffer += codeToHighlight.slice(match.index, match.index + 1);
|
|
1456
|
+
if (!SAFE_MODE) {
|
|
1457
|
+
/** @type {AnnotatedError} */
|
|
1458
|
+
const err = /* @__PURE__ */new Error(`0 width match regex (${languageName})`);
|
|
1459
|
+
err.languageName = languageName;
|
|
1460
|
+
err.badRule = lastMatch.rule;
|
|
1461
|
+
throw err;
|
|
1462
|
+
}
|
|
1463
|
+
return 1;
|
|
1464
|
+
}
|
|
1465
|
+
lastMatch = match;
|
|
1466
|
+
if (match.type === "begin") return doBeginMatch(match);else if (match.type === "illegal" && !ignoreIllegals) {
|
|
1467
|
+
/** @type {AnnotatedError} */
|
|
1468
|
+
const err = /* @__PURE__ */new Error("Illegal lexeme \"" + lexeme + "\" for mode \"" + (top.scope || "<unnamed>") + "\"");
|
|
1469
|
+
err.mode = top;
|
|
1470
|
+
throw err;
|
|
1471
|
+
} else if (match.type === "end") {
|
|
1472
|
+
const processed = doEndMatch(match);
|
|
1473
|
+
if (processed !== NO_MATCH) return processed;
|
|
1474
|
+
}
|
|
1475
|
+
if (match.type === "illegal" && lexeme === "") {
|
|
1476
|
+
modeBuffer += "\n";
|
|
1477
|
+
return 1;
|
|
1478
|
+
}
|
|
1479
|
+
if (iterations > 1e5 && iterations > match.index * 3) throw /* @__PURE__ */new Error("potential infinite loop, way more iterations than matches");
|
|
1480
|
+
modeBuffer += lexeme;
|
|
1481
|
+
return lexeme.length;
|
|
1482
|
+
}
|
|
1483
|
+
const language = getLanguage(languageName);
|
|
1484
|
+
if (!language) {
|
|
1485
|
+
error(LANGUAGE_NOT_FOUND.replace("{}", languageName));
|
|
1486
|
+
throw new Error("Unknown language: \"" + languageName + "\"");
|
|
1487
|
+
}
|
|
1488
|
+
const md = compileLanguage(language);
|
|
1489
|
+
let result = "";
|
|
1490
|
+
/** @type {CompiledMode} */
|
|
1491
|
+
let top = continuation || md;
|
|
1492
|
+
/** @type Record<string,CompiledMode> */
|
|
1493
|
+
const continuations = {};
|
|
1494
|
+
const emitter = new options.__emitter(options);
|
|
1495
|
+
processContinuations();
|
|
1496
|
+
let modeBuffer = "";
|
|
1497
|
+
let relevance = 0;
|
|
1498
|
+
let index = 0;
|
|
1499
|
+
let iterations = 0;
|
|
1500
|
+
let resumeScanAtSamePosition = false;
|
|
1501
|
+
try {
|
|
1502
|
+
if (!language.__emitTokens) {
|
|
1503
|
+
top.matcher.considerAll();
|
|
1504
|
+
for (;;) {
|
|
1505
|
+
iterations++;
|
|
1506
|
+
if (resumeScanAtSamePosition) resumeScanAtSamePosition = false;else top.matcher.considerAll();
|
|
1507
|
+
top.matcher.lastIndex = index;
|
|
1508
|
+
const match = top.matcher.exec(codeToHighlight);
|
|
1509
|
+
if (!match) break;
|
|
1510
|
+
const processedCount = processLexeme(codeToHighlight.substring(index, match.index), match);
|
|
1511
|
+
index = match.index + processedCount;
|
|
1512
|
+
}
|
|
1513
|
+
processLexeme(codeToHighlight.substring(index));
|
|
1514
|
+
} else language.__emitTokens(codeToHighlight, emitter);
|
|
1515
|
+
emitter.finalize();
|
|
1516
|
+
result = emitter.toHTML();
|
|
1517
|
+
return {
|
|
1518
|
+
language: languageName,
|
|
1519
|
+
value: result,
|
|
1520
|
+
relevance,
|
|
1521
|
+
illegal: false,
|
|
1522
|
+
_emitter: emitter,
|
|
1523
|
+
_top: top
|
|
1524
|
+
};
|
|
1525
|
+
} catch (err) {
|
|
1526
|
+
if (err.message && err.message.includes("Illegal")) return {
|
|
1527
|
+
language: languageName,
|
|
1528
|
+
value: escape(codeToHighlight),
|
|
1529
|
+
illegal: true,
|
|
1530
|
+
relevance: 0,
|
|
1531
|
+
_illegalBy: {
|
|
1532
|
+
message: err.message,
|
|
1533
|
+
index,
|
|
1534
|
+
context: codeToHighlight.slice(index - 100, index + 100),
|
|
1535
|
+
mode: err.mode,
|
|
1536
|
+
resultSoFar: result
|
|
1537
|
+
},
|
|
1538
|
+
_emitter: emitter
|
|
1539
|
+
};else if (SAFE_MODE) return {
|
|
1540
|
+
language: languageName,
|
|
1541
|
+
value: escape(codeToHighlight),
|
|
1542
|
+
illegal: false,
|
|
1543
|
+
relevance: 0,
|
|
1544
|
+
errorRaised: err,
|
|
1545
|
+
_emitter: emitter,
|
|
1546
|
+
_top: top
|
|
1547
|
+
};else throw err;
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
/**
|
|
1551
|
+
* returns a valid highlight result, without actually doing any actual work,
|
|
1552
|
+
* auto highlight starts with this and it's possible for small snippets that
|
|
1553
|
+
* auto-detection may not find a better match
|
|
1554
|
+
* @param {string} code
|
|
1555
|
+
* @returns {HighlightResult}
|
|
1556
|
+
*/
|
|
1557
|
+
function justTextHighlightResult(code) {
|
|
1558
|
+
const result = {
|
|
1559
|
+
value: escape(code),
|
|
1560
|
+
illegal: false,
|
|
1561
|
+
relevance: 0,
|
|
1562
|
+
_top: PLAINTEXT_LANGUAGE,
|
|
1563
|
+
_emitter: new options.__emitter(options)
|
|
1564
|
+
};
|
|
1565
|
+
result._emitter.addText(code);
|
|
1566
|
+
return result;
|
|
1567
|
+
}
|
|
1568
|
+
/**
|
|
1569
|
+
Highlighting with language detection. Accepts a string with the code to
|
|
1570
|
+
highlight. Returns an object with the following properties:
|
|
1571
|
+
|
|
1572
|
+
- language (detected language)
|
|
1573
|
+
- relevance (int)
|
|
1574
|
+
- value (an HTML string with highlighting markup)
|
|
1575
|
+
- secondBest (object with the same structure for second-best heuristically
|
|
1576
|
+
detected language, may be absent)
|
|
1577
|
+
|
|
1578
|
+
@param {string} code
|
|
1579
|
+
@param {Array<string>} [languageSubset]
|
|
1580
|
+
@returns {AutoHighlightResult}
|
|
1581
|
+
*/
|
|
1582
|
+
function highlightAuto(code, languageSubset) {
|
|
1583
|
+
languageSubset = languageSubset || options.languages || Object.keys(languages);
|
|
1584
|
+
const plaintext = justTextHighlightResult(code);
|
|
1585
|
+
const results = languageSubset.filter(getLanguage).filter(autoDetection).map(name => _highlight(name, code, false));
|
|
1586
|
+
results.unshift(plaintext);
|
|
1587
|
+
const [best, secondBest] = results.sort((a, b) => {
|
|
1588
|
+
if (a.relevance !== b.relevance) return b.relevance - a.relevance;
|
|
1589
|
+
if (a.language && b.language) {
|
|
1590
|
+
if (getLanguage(a.language).supersetOf === b.language) return 1;else if (getLanguage(b.language).supersetOf === a.language) return -1;
|
|
1591
|
+
}
|
|
1592
|
+
return 0;
|
|
1593
|
+
});
|
|
1594
|
+
/** @type {AutoHighlightResult} */
|
|
1595
|
+
const result = best;
|
|
1596
|
+
result.secondBest = secondBest;
|
|
1597
|
+
return result;
|
|
1598
|
+
}
|
|
1599
|
+
/**
|
|
1600
|
+
* Builds new class name for block given the language name
|
|
1601
|
+
*
|
|
1602
|
+
* @param {HTMLElement} element
|
|
1603
|
+
* @param {string} [currentLang]
|
|
1604
|
+
* @param {string} [resultLang]
|
|
1605
|
+
*/
|
|
1606
|
+
function updateClassName(element, currentLang, resultLang) {
|
|
1607
|
+
const language = currentLang && aliases[currentLang] || resultLang;
|
|
1608
|
+
element.classList.add("hljs");
|
|
1609
|
+
element.classList.add(`language-${language}`);
|
|
1610
|
+
}
|
|
1611
|
+
/**
|
|
1612
|
+
* Applies highlighting to a DOM node containing code.
|
|
1613
|
+
*
|
|
1614
|
+
* @param {HighlightedHTMLElement} element - the HTML element to highlight
|
|
1615
|
+
*/
|
|
1616
|
+
function highlightElement(element) {
|
|
1617
|
+
/** @type HTMLElement */
|
|
1618
|
+
let node = null;
|
|
1619
|
+
const language = blockLanguage(element);
|
|
1620
|
+
if (shouldNotHighlight(language)) return;
|
|
1621
|
+
fire("before:highlightElement", {
|
|
1622
|
+
el: element,
|
|
1623
|
+
language
|
|
1624
|
+
});
|
|
1625
|
+
if (element.dataset.highlighted) {
|
|
1626
|
+
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", element);
|
|
1627
|
+
return;
|
|
1628
|
+
}
|
|
1629
|
+
if (element.children.length > 0) {
|
|
1630
|
+
if (!options.ignoreUnescapedHTML) {
|
|
1631
|
+
console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk.");
|
|
1632
|
+
console.warn("https://github.com/highlightjs/highlight.js/wiki/security");
|
|
1633
|
+
console.warn("The element with unescaped HTML:");
|
|
1634
|
+
console.warn(element);
|
|
1635
|
+
}
|
|
1636
|
+
if (options.throwUnescapedHTML) throw new HTMLInjectionError("One of your code blocks includes unescaped HTML.", element.innerHTML);
|
|
1637
|
+
}
|
|
1638
|
+
node = element;
|
|
1639
|
+
const text = node.textContent;
|
|
1640
|
+
const result = language ? highlight$1(text, {
|
|
1641
|
+
language,
|
|
1642
|
+
ignoreIllegals: true
|
|
1643
|
+
}) : highlightAuto(text);
|
|
1644
|
+
element.innerHTML = result.value;
|
|
1645
|
+
element.dataset.highlighted = "yes";
|
|
1646
|
+
updateClassName(element, language, result.language);
|
|
1647
|
+
element.result = {
|
|
1648
|
+
language: result.language,
|
|
1649
|
+
re: result.relevance,
|
|
1650
|
+
relevance: result.relevance
|
|
1651
|
+
};
|
|
1652
|
+
if (result.secondBest) element.secondBest = {
|
|
1653
|
+
language: result.secondBest.language,
|
|
1654
|
+
relevance: result.secondBest.relevance
|
|
1655
|
+
};
|
|
1656
|
+
fire("after:highlightElement", {
|
|
1657
|
+
el: element,
|
|
1658
|
+
result,
|
|
1659
|
+
text
|
|
1660
|
+
});
|
|
1661
|
+
}
|
|
1662
|
+
/**
|
|
1663
|
+
* Updates highlight.js global options with the passed options
|
|
1664
|
+
*
|
|
1665
|
+
* @param {Partial<HLJSOptions>} userOptions
|
|
1666
|
+
*/
|
|
1667
|
+
function configure(userOptions) {
|
|
1668
|
+
options = inherit(options, userOptions);
|
|
1669
|
+
}
|
|
1670
|
+
const initHighlighting = () => {
|
|
1671
|
+
highlightAll();
|
|
1672
|
+
deprecated("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
1673
|
+
};
|
|
1674
|
+
function initHighlightingOnLoad() {
|
|
1675
|
+
highlightAll();
|
|
1676
|
+
deprecated("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
1677
|
+
}
|
|
1678
|
+
let wantsHighlight = false;
|
|
1679
|
+
/**
|
|
1680
|
+
* auto-highlights all pre>code elements on the page
|
|
1681
|
+
*/
|
|
1682
|
+
function highlightAll() {
|
|
1683
|
+
function boot() {
|
|
1684
|
+
highlightAll();
|
|
1685
|
+
}
|
|
1686
|
+
if (document.readyState === "loading") {
|
|
1687
|
+
if (!wantsHighlight) window.addEventListener("DOMContentLoaded", boot, false);
|
|
1688
|
+
wantsHighlight = true;
|
|
1689
|
+
return;
|
|
1690
|
+
}
|
|
1691
|
+
document.querySelectorAll(options.cssSelector).forEach(highlightElement);
|
|
1692
|
+
}
|
|
1693
|
+
/**
|
|
1694
|
+
* Register a language grammar module
|
|
1695
|
+
*
|
|
1696
|
+
* @param {string} languageName
|
|
1697
|
+
* @param {LanguageFn} languageDefinition
|
|
1698
|
+
*/
|
|
1699
|
+
function registerLanguage(languageName, languageDefinition) {
|
|
1700
|
+
let lang = null;
|
|
1701
|
+
try {
|
|
1702
|
+
lang = languageDefinition(hljs);
|
|
1703
|
+
} catch (error$1) {
|
|
1704
|
+
error("Language definition for '{}' could not be registered.".replace("{}", languageName));
|
|
1705
|
+
if (!SAFE_MODE) throw error$1;else error(error$1);
|
|
1706
|
+
lang = PLAINTEXT_LANGUAGE;
|
|
1707
|
+
}
|
|
1708
|
+
if (!lang.name) lang.name = languageName;
|
|
1709
|
+
languages[languageName] = lang;
|
|
1710
|
+
lang.rawDefinition = languageDefinition.bind(null, hljs);
|
|
1711
|
+
if (lang.aliases) registerAliases(lang.aliases, {
|
|
1712
|
+
languageName
|
|
1713
|
+
});
|
|
1714
|
+
}
|
|
1715
|
+
/**
|
|
1716
|
+
* Remove a language grammar module
|
|
1717
|
+
*
|
|
1718
|
+
* @param {string} languageName
|
|
1719
|
+
*/
|
|
1720
|
+
function unregisterLanguage(languageName) {
|
|
1721
|
+
delete languages[languageName];
|
|
1722
|
+
for (const alias of Object.keys(aliases)) if (aliases[alias] === languageName) delete aliases[alias];
|
|
1723
|
+
}
|
|
1724
|
+
/**
|
|
1725
|
+
* @returns {string[]} List of language internal names
|
|
1726
|
+
*/
|
|
1727
|
+
function listLanguages() {
|
|
1728
|
+
return Object.keys(languages);
|
|
1729
|
+
}
|
|
1730
|
+
/**
|
|
1731
|
+
* @param {string} name - name of the language to retrieve
|
|
1732
|
+
* @returns {Language | undefined}
|
|
1733
|
+
*/
|
|
1734
|
+
function getLanguage(name) {
|
|
1735
|
+
name = (name || "").toLowerCase();
|
|
1736
|
+
return languages[name] || languages[aliases[name]];
|
|
1737
|
+
}
|
|
1738
|
+
/**
|
|
1739
|
+
*
|
|
1740
|
+
* @param {string|string[]} aliasList - single alias or list of aliases
|
|
1741
|
+
* @param {{languageName: string}} opts
|
|
1742
|
+
*/
|
|
1743
|
+
function registerAliases(aliasList, {
|
|
1744
|
+
languageName
|
|
1745
|
+
}) {
|
|
1746
|
+
if (typeof aliasList === "string") aliasList = [aliasList];
|
|
1747
|
+
aliasList.forEach(alias => {
|
|
1748
|
+
aliases[alias.toLowerCase()] = languageName;
|
|
1749
|
+
});
|
|
1750
|
+
}
|
|
1751
|
+
/**
|
|
1752
|
+
* Determines if a given language has auto-detection enabled
|
|
1753
|
+
* @param {string} name - name of the language
|
|
1754
|
+
*/
|
|
1755
|
+
function autoDetection(name) {
|
|
1756
|
+
const lang = getLanguage(name);
|
|
1757
|
+
return lang && !lang.disableAutodetect;
|
|
1758
|
+
}
|
|
1759
|
+
/**
|
|
1760
|
+
* Upgrades the old highlightBlock plugins to the new
|
|
1761
|
+
* highlightElement API
|
|
1762
|
+
* @param {HLJSPlugin} plugin
|
|
1763
|
+
*/
|
|
1764
|
+
function upgradePluginAPI(plugin) {
|
|
1765
|
+
if (plugin["before:highlightBlock"] && !plugin["before:highlightElement"]) plugin["before:highlightElement"] = data => {
|
|
1766
|
+
plugin["before:highlightBlock"](Object.assign({
|
|
1767
|
+
block: data.el
|
|
1768
|
+
}, data));
|
|
1769
|
+
};
|
|
1770
|
+
if (plugin["after:highlightBlock"] && !plugin["after:highlightElement"]) plugin["after:highlightElement"] = data => {
|
|
1771
|
+
plugin["after:highlightBlock"](Object.assign({
|
|
1772
|
+
block: data.el
|
|
1773
|
+
}, data));
|
|
1774
|
+
};
|
|
1775
|
+
}
|
|
1776
|
+
/**
|
|
1777
|
+
* @param {HLJSPlugin} plugin
|
|
1778
|
+
*/
|
|
1779
|
+
function addPlugin(plugin) {
|
|
1780
|
+
upgradePluginAPI(plugin);
|
|
1781
|
+
plugins.push(plugin);
|
|
1782
|
+
}
|
|
1783
|
+
/**
|
|
1784
|
+
* @param {HLJSPlugin} plugin
|
|
1785
|
+
*/
|
|
1786
|
+
function removePlugin(plugin) {
|
|
1787
|
+
const index = plugins.indexOf(plugin);
|
|
1788
|
+
if (index !== -1) plugins.splice(index, 1);
|
|
1789
|
+
}
|
|
1790
|
+
/**
|
|
1791
|
+
*
|
|
1792
|
+
* @param {PluginEvent} event
|
|
1793
|
+
* @param {any} args
|
|
1794
|
+
*/
|
|
1795
|
+
function fire(event, args) {
|
|
1796
|
+
const cb = event;
|
|
1797
|
+
plugins.forEach(function (plugin) {
|
|
1798
|
+
if (plugin[cb]) plugin[cb](args);
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
/**
|
|
1802
|
+
* DEPRECATED
|
|
1803
|
+
* @param {HighlightedHTMLElement} el
|
|
1804
|
+
*/
|
|
1805
|
+
function deprecateHighlightBlock(el) {
|
|
1806
|
+
deprecated("10.7.0", "highlightBlock will be removed entirely in v12.0");
|
|
1807
|
+
deprecated("10.7.0", "Please use highlightElement now.");
|
|
1808
|
+
return highlightElement(el);
|
|
1809
|
+
}
|
|
1810
|
+
Object.assign(hljs, {
|
|
1811
|
+
highlight: highlight$1,
|
|
1812
|
+
highlightAuto,
|
|
1813
|
+
highlightAll,
|
|
1814
|
+
highlightElement,
|
|
1815
|
+
highlightBlock: deprecateHighlightBlock,
|
|
1816
|
+
configure,
|
|
1817
|
+
initHighlighting,
|
|
1818
|
+
initHighlightingOnLoad,
|
|
1819
|
+
registerLanguage,
|
|
1820
|
+
unregisterLanguage,
|
|
1821
|
+
listLanguages,
|
|
1822
|
+
getLanguage,
|
|
1823
|
+
registerAliases,
|
|
1824
|
+
autoDetection,
|
|
1825
|
+
inherit,
|
|
1826
|
+
addPlugin,
|
|
1827
|
+
removePlugin
|
|
1828
|
+
});
|
|
1829
|
+
hljs.debugMode = function () {
|
|
1830
|
+
SAFE_MODE = false;
|
|
1831
|
+
};
|
|
1832
|
+
hljs.safeMode = function () {
|
|
1833
|
+
SAFE_MODE = true;
|
|
1834
|
+
};
|
|
1835
|
+
hljs.versionString = version;
|
|
1836
|
+
hljs.regex = {
|
|
1837
|
+
concat,
|
|
1838
|
+
lookahead,
|
|
1839
|
+
either,
|
|
1840
|
+
optional,
|
|
1841
|
+
anyNumberOfTimes
|
|
1842
|
+
};
|
|
1843
|
+
for (const key in MODES) if (typeof MODES[key] === "object") deepFreeze(MODES[key]);
|
|
1844
|
+
Object.assign(hljs, MODES);
|
|
1845
|
+
return hljs;
|
|
1846
|
+
};
|
|
1847
|
+
var highlight = HLJS({});
|
|
1848
|
+
highlight.newInstance = () => HLJS({});
|
|
1849
|
+
module.exports = highlight;
|
|
1850
|
+
highlight.HighlightJS = highlight;
|
|
1851
|
+
highlight.default = highlight;
|
|
1852
|
+
}
|
|
1853
|
+
})); //#endregion
|
|
1854
|
+
}
|
|
1855
|
+
};
|
|
1856
|
+
});
|
|
1857
|
+
})();
|