@atom8n/n8n-editor-ui 2.2.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/.stylelintcache +1 -0
- package/README.md +59 -0
- package/biome.jsonc +8 -0
- package/build.log +55 -0
- package/data/node-popularity.json +3998 -0
- package/dist/assets/AddDataTableModal-UINkk54_.js +1555 -0
- package/dist/assets/AgentEditorModal-CVww87TJ.js +358 -0
- package/dist/assets/Alert-Dy86dyOr.js +102 -0
- package/dist/assets/AnimatedSpinner-DmPN4poP.js +15 -0
- package/dist/assets/AnnotationTagsDropdown.ee-BJ7N9lek.js +71 -0
- package/dist/assets/AuthView-D2LWHrMp.js +106 -0
- package/dist/assets/BottomMenu-CIQiK_dJ.js +532 -0
- package/dist/assets/CalendarDate-DgQUMbNo.js +875 -0
- package/dist/assets/ChangePasswordView-Z6tUkw0u.js +133 -0
- package/dist/assets/ChatAgentAvatar-50YBnv3N.js +67 -0
- package/dist/assets/ChatFile-xZxmc2nV.js +146 -0
- package/dist/assets/ChatLayout-CTE_5SiM.js +96 -0
- package/dist/assets/ChatPersonalAgentsView-BGpHk03K.js +149 -0
- package/dist/assets/ChatSidebar-BkVwIypC.js +528 -0
- package/dist/assets/ChatView-BbbdeU9x.js +1559 -0
- package/dist/assets/ChatWorkflowAgentsView-BtunOxlC.js +116 -0
- package/dist/assets/CollectionParameter-BdcPG1lu.js +52 -0
- package/dist/assets/CommitMonoVariable-ytizKI8U.woff2 +0 -0
- package/dist/assets/CommunityNodeUpdateInfo-C37kca4W.js +273 -0
- package/dist/assets/CopyInput-DDZVu2iU.js +74 -0
- package/dist/assets/CredentialIcon-8YdTTFZ1.js +80 -0
- package/dist/assets/CredentialPicker-DWtj314o.js +293 -0
- package/dist/assets/CredentialSelectorModal-DTW2fKh0.js +138 -0
- package/dist/assets/CredentialsView-BjUchcCu.js +480 -0
- package/dist/assets/DataTableActions-DpAkoxg_.js +95 -0
- package/dist/assets/DataTableDetailsView-Coq7zdW5.js +41922 -0
- package/dist/assets/DataTableView-Cs-BIkzw.js +293 -0
- package/dist/assets/DemoFooter-Cga3jvi-.js +65 -0
- package/dist/assets/Draggable-vfvXl9Sp.js +105 -0
- package/dist/assets/EmptySharedSectionActionBox-DOXZtTCv.js +36 -0
- package/dist/assets/EnterpriseEdition.ee-D_rCFexM.js +15 -0
- package/dist/assets/EntityNotFound-3dhTRWsE.js +85 -0
- package/dist/assets/EntityUnAuthorised-ChJYZakE.js +66 -0
- package/dist/assets/ErrorView-zT9cX76a.js +61 -0
- package/dist/assets/EvaluationsRootView-C-OVWYnY.js +523 -0
- package/dist/assets/EvaluationsView-CJwJTruc.js +469 -0
- package/dist/assets/ExecutionsTime-DEQiyozR.js +573 -0
- package/dist/assets/ExecutionsView-Bd5Oh8TH.js +791 -0
- package/dist/assets/ExternalSecretsProviderConnectionSwitch.ee-C7Ih-uRo.js +191 -0
- package/dist/assets/FixedCollectionParameter-CYuTDW9t.js +496 -0
- package/dist/assets/ForgotMyPasswordView-Bs_L9P27.js +102 -0
- package/dist/assets/InsightsChartAverageRuntime-Bp3VA8_7.js +62 -0
- package/dist/assets/InsightsChartFailed-KPaNWoEr.js +52 -0
- package/dist/assets/InsightsChartFailureRate-DE6kE3FM.js +54 -0
- package/dist/assets/InsightsChartTimeSaved-auABNZlc.js +68 -0
- package/dist/assets/InsightsChartTotal-BKzYRKE7.js +56 -0
- package/dist/assets/InsightsDashboard-JWx4W6Db.js +473 -0
- package/dist/assets/InsightsPaywall-C8zLLKe8.js +63 -0
- package/dist/assets/InsightsSummary-cmN1lHDm.js +210 -0
- package/dist/assets/InsightsTableWorkflows-CqcC3IbQ.js +203 -0
- package/dist/assets/InterVariable-DiVDrmQJ.woff2 +0 -0
- package/dist/assets/InterVariable-Italic-FCBEiFp6.woff2 +0 -0
- package/dist/assets/ItemsRenderer-DC8WVyMv.js +922 -0
- package/dist/assets/KeyboardShortcutTooltip-D8PAK5JP.js +31 -0
- package/dist/assets/LogsPanel-BR06u9RK.js +52 -0
- package/dist/assets/LogsPanel-C-_acMHp.js +2325 -0
- package/dist/assets/MCPConnectWorkflowsModal-3g8_iUa4.js +303 -0
- package/dist/assets/MainHeader-DiQc1edn.js +2153 -0
- package/dist/assets/MainSidebar-CoPGG5Ea.js +804 -0
- package/dist/assets/MigrationRuleDetail-BAxk1Pvl.js +295 -0
- package/dist/assets/MigrationRules-IW9lZMpE.js +285 -0
- package/dist/assets/Modal-CIzXlZdZ.js +204 -0
- package/dist/assets/ModelByIdSelectorModal-DLvBjzJO.js +115 -0
- package/dist/assets/NDVEmptyState-33UoX00I.js +19743 -0
- package/dist/assets/NodeCreation-BNzbSWSB.js +240 -0
- package/dist/assets/NodeCreator-BftgCKx7.js +1288 -0
- package/dist/assets/NodeDetailsView-CsoQCpcF.js +1075 -0
- package/dist/assets/NodeDetailsViewV2-C_wNQR_3.js +981 -0
- package/dist/assets/NodeIcon-B9VW6tX6.js +87 -0
- package/dist/assets/NodeSettings-ZwVip6VR.js +1872 -0
- package/dist/assets/NodeView-D4WUEvLB.js +2452 -0
- package/dist/assets/OAuthConsentView-DlrUqZbT.js +230 -0
- package/dist/assets/PageViewLayout-NT1KPFgy.js +12 -0
- package/dist/assets/ParameterInputList-sG2nz-Jo.js +38091 -0
- package/dist/assets/PrebuiltAgentTemplatesView-Csi5U8dc.js +154 -0
- package/dist/assets/ProjectBreadcrumb-C_XiY7sc.js +98 -0
- package/dist/assets/ProjectCardBadge-t_hs7vzx.js +209 -0
- package/dist/assets/ProjectHeader-Dq5Ihb26.js +549 -0
- package/dist/assets/ProjectIcon-DY8gGuHX.js +64 -0
- package/dist/assets/ProjectRoleView-Du-KTrAC.js +435 -0
- package/dist/assets/ProjectRolesView-DjxM_y4u.js +239 -0
- package/dist/assets/ProjectSettings-C6kWuV21.js +966 -0
- package/dist/assets/ProjectSharing-CVUgNWAY.js +262 -0
- package/dist/assets/ProjectVariables-CJlAo3dv.js +467 -0
- package/dist/assets/ProviderSettingsModal-BUFC2ZLv.js +307 -0
- package/dist/assets/PushConnectionTracker-DPBnGV0v.js +27 -0
- package/dist/assets/ResolversView-3BdkvvYA.js +209 -0
- package/dist/assets/ResourceFiltersDropdown-dgyXpcEX.js +159 -0
- package/dist/assets/ResourcesListLayout-qBLtomK6.js +631 -0
- package/dist/assets/RunDataHtml-BrW0OQra.js +7 -0
- package/dist/assets/RunDataHtml-Cleia4Cj.js +40 -0
- package/dist/assets/RunDataJson-uxkrhYRK.js +227 -0
- package/dist/assets/RunDataJsonActions-DkPk7E8d.js +5007 -0
- package/dist/assets/RunDataParsedAiContent-CtPRjig-.js +26 -0
- package/dist/assets/RunDataParsedAiContent-WAuqLQ5M.js +192 -0
- package/dist/assets/RunDataSearch-YBWUr93C.js +141 -0
- package/dist/assets/RunDataTable-DcXaBynW.js +631 -0
- package/dist/assets/SamlOnboarding-BTdQ_hr3.js +78 -0
- package/dist/assets/SaveButton-D5sQSxIk.js +89 -0
- package/dist/assets/SelectedItemsInfo-BHZ-NvF5.js +58 -0
- package/dist/assets/SettingsApiView-IfZTMXx1.js +313 -0
- package/dist/assets/SettingsChatHubView-gWh2X6vX.js +285 -0
- package/dist/assets/SettingsCommunityNodesView-D8VQtpGY.js +349 -0
- package/dist/assets/SettingsExternalSecrets-CpMc7mkW.js +233 -0
- package/dist/assets/SettingsLdapView-CU5a2MAy.js +2553 -0
- package/dist/assets/SettingsLogStreamingView-uojTe-oX.js +375 -0
- package/dist/assets/SettingsMCPView-B5Swp1C_.js +1214 -0
- package/dist/assets/SettingsPersonalView-Cr3aGood.js +402 -0
- package/dist/assets/SettingsSourceControl-DXOvFDEY.js +547 -0
- package/dist/assets/SettingsSso-27MfU1HV.js +1032 -0
- package/dist/assets/SettingsUsageAndPlan-DqIO-G46.js +419 -0
- package/dist/assets/SettingsUsersView-DfHB4_Kh.js +833 -0
- package/dist/assets/SettingsView-C4sA7Uny.js +90 -0
- package/dist/assets/SetupTemplateFormStep-BmiSzZin.js +258 -0
- package/dist/assets/SetupView-VORZ-L_u.js +112 -0
- package/dist/assets/SetupWorkflowCredentialsButton-DTmkOAW5.js +73 -0
- package/dist/assets/SetupWorkflowFromTemplateView-B9NupdJE.js +286 -0
- package/dist/assets/SeverityTag-CX1qTTNA.js +45 -0
- package/dist/assets/SigninView-D9_Pm16j.js +358 -0
- package/dist/assets/SignoutView-BFsjEAGz.js +19 -0
- package/dist/assets/SignupView-Am4ot0QZ.js +137 -0
- package/dist/assets/SkeletonAgentCard-C5TL-h8F.js +191 -0
- package/dist/assets/TagsDropdown-Bvx_Hd6Q.js +230 -0
- package/dist/assets/TemplateCard-CyQ1GuVz.js +105 -0
- package/dist/assets/TemplateDetails-CZRusTxE.js +124 -0
- package/dist/assets/TemplateList-DKvbwuiY.js +333 -0
- package/dist/assets/TemplatesCollectionView-D8dxU8By.js +184 -0
- package/dist/assets/TemplatesSearchView-CebC_GLs.js +1230 -0
- package/dist/assets/TemplatesView-025CcmIY.js +57 -0
- package/dist/assets/TemplatesWorkflowView-C2JfwJAn.js +170 -0
- package/dist/assets/TestRunDetailView-Ck78TTWO.js +395 -0
- package/dist/assets/TextWithHighlights-BxumwGnv.js +57 -0
- package/dist/assets/TimeAgo-C6EN4lCs.js +123 -0
- package/dist/assets/ToolsSelectorModal-8QJoUvRL.js +368 -0
- package/dist/assets/TriggerPanel-B6pacLkk.js +1225 -0
- package/dist/assets/VirtualSchema-B3zGe_8b.js +2402 -0
- package/dist/assets/VirtualSchema-Dkh0Cu5z.js +37 -0
- package/dist/assets/VueMarkdown-CQqJL9vK.js +28 -0
- package/dist/assets/WorkerView-Caznsljo.js +563 -0
- package/dist/assets/WorkflowActivationErrorMessage-CGrfPi9O.js +17 -0
- package/dist/assets/WorkflowActivator-BINnz0f7.js +362 -0
- package/dist/assets/WorkflowExecutionsInfoAccordion-Dg37yEfT.js +166 -0
- package/dist/assets/WorkflowExecutionsLandingPage-V2wdubhK.js +93 -0
- package/dist/assets/WorkflowExecutionsPreview-DdJaqYV6.js +616 -0
- package/dist/assets/WorkflowExecutionsView-DV8ySTfn.js +808 -0
- package/dist/assets/WorkflowHistory-GtaBMzIM.js +973 -0
- package/dist/assets/WorkflowLocation-CQ9Sq-2y.js +164 -0
- package/dist/assets/WorkflowOnboardingView-C49gt0Jr.js +61 -0
- package/dist/assets/WorkflowPreview-CXdvv4Nq.js +186 -0
- package/dist/assets/WorkflowTagsDropdown-QwbICWjN.js +71 -0
- package/dist/assets/WorkflowsView-B-MWIECO.js +3253 -0
- package/dist/assets/_MapCache-CcdIl4Ae.js +363 -0
- package/dist/assets/_baseOrderBy-N8Be_6z6.js +2989 -0
- package/dist/assets/_initCloneObject-viQQyT6o.js +80 -0
- package/dist/assets/_plugin-vue_export-helper-BwBpWJRZ.js +6 -0
- package/dist/assets/aiTemplatesStarterCollection.store-nL9nePkK.js +656 -0
- package/dist/assets/apiKeys.store-BhOFmP2j.js +51 -0
- package/dist/assets/assistant.store-CNywgN4S.js +518 -0
- package/dist/assets/auth.eventBus-CWXS0Qp7.js +5 -0
- package/dist/assets/banners.store-CGEcBTDn.js +195 -0
- package/dist/assets/builder.store-Czk2ipDE.js +31417 -0
- package/dist/assets/buttons.esm-yintpW2E.js +364 -0
- package/dist/assets/chart-CNvyywtJ.js +10958 -0
- package/dist/assets/chartjs.utils-BAE52Cv9.js +155 -0
- package/dist/assets/chat.store-290YeyrQ.js +865 -0
- package/dist/assets/chatPanel.store-NDaawEZL.js +118 -0
- package/dist/assets/chunk-6z4oVpB-.js +36 -0
- package/dist/assets/col-Cmt4cmuS.js +158 -0
- package/dist/assets/constants-C8OH4tTq.js +106256 -0
- package/dist/assets/constants-DMrsrpD7.js +32 -0
- package/dist/assets/core-B9gt_4yk.js +4 -0
- package/dist/assets/core-CP5FY4aX.js +1202 -0
- package/dist/assets/core-CRbPymLT.js +9741 -0
- package/dist/assets/dataTable.store-DmipQsol.js +207 -0
- package/dist/assets/date-picker-2IDsBs2n.js +4115 -0
- package/dist/assets/dateFormatter-ik4-9_9r.js +33 -0
- package/dist/assets/dateformat-hG8NERse.js +181 -0
- package/dist/assets/dialog-lMho1TD8.js +425 -0
- package/dist/assets/dist-Cw46Is-h.js +151 -0
- package/dist/assets/doppler-B__k0MeW.webp +0 -0
- package/dist/assets/element-icons-B-tDfklg.woff +0 -0
- package/dist/assets/element-icons-_lZGOqcG.ttf +0 -0
- package/dist/assets/empty-BuGRxzl4.js +2210 -0
- package/dist/assets/en-CF30SCh2.js +95 -0
- package/dist/assets/en-DyO2pPiC.js +2 -0
- package/dist/assets/es-BkUFJVtD.js +43338 -0
- package/dist/assets/evaluation.constants-GYAwmJnh.js +284 -0
- package/dist/assets/executions.store-B9uRYwgv.js +205 -0
- package/dist/assets/exports-Crx_gvt_.js +1799 -0
- package/dist/assets/externalSecrets.ee.store-BJh4a_6G.js +118 -0
- package/dist/assets/fileUtils-CRWqOQje.js +20 -0
- package/dist/assets/folders.store-yAFj-5Vl.js +235 -0
- package/dist/assets/get-BcEmeOxn.js +2781 -0
- package/dist/assets/index-SL8542zQ.js +28372 -0
- package/dist/assets/insights.constants-BkJCYJTL.js +55 -0
- package/dist/assets/insights.store-BFc3kDUo.js +61 -0
- package/dist/assets/insights.utils-CcLXdrrz.js +77 -0
- package/dist/assets/isEmpty-C3XXoHqJ.js +35216 -0
- package/dist/assets/languageModules-9LyndCqU.js +13862 -0
- package/dist/assets/logStreaming.store-IZhWe_VK.js +190 -0
- package/dist/assets/mcp.constants-_Jcn7fPq.js +10 -0
- package/dist/assets/mcp.store-B9yfcAN9.js +116 -0
- package/dist/assets/merge-DhuTk1HM.js +564 -0
- package/dist/assets/nodeCreator.store-Bpnrwp2l.js +5444 -0
- package/dist/assets/nodeIcon-D6X-ENYt.js +102 -0
- package/dist/assets/nodeTransforms-RzcOM0v2.js +42 -0
- package/dist/assets/orderBy-Cu9F9DU_.js +15 -0
- package/dist/assets/path-browserify-RUt2u7iT.js +328 -0
- package/dist/assets/personalizedTemplatesV3.store-BGYp0YBN.js +334 -0
- package/dist/assets/pickBy-UI0Jt4wC.js +18 -0
- package/dist/assets/preload-helper-dyVz7ck7.js +59 -0
- package/dist/assets/radio-CSce3UT0.js +262 -0
- package/dist/assets/readyToRun.store-YEMvPUqo.js +626 -0
- package/dist/assets/readyToRunWorkflows.store-G3srgIze.js +1319 -0
- package/dist/assets/retry-BgHaYzbB.js +23 -0
- package/dist/assets/roles.store-CRf_zJTb.js +51 -0
- package/dist/assets/router-DNpzz3GH.js +2631 -0
- package/dist/assets/sanitize-html-CbW56HUN.js +10758 -0
- package/dist/assets/schemaPreview.store-DUgN1yVE.js +113 -0
- package/dist/assets/semver-Bk6DGseV.js +1306 -0
- package/dist/assets/smartDecimal-DAZl4HKA.js +6 -0
- package/dist/assets/sortByProperty-Cn7iGKYu.js +8 -0
- package/dist/assets/sourceControl.eventBus-D47xXSc_.js +3 -0
- package/dist/assets/sqlite3-DBpDb1lf.wasm +0 -0
- package/dist/assets/sqlite3-opfs-async-proxy-vVtmDGHX.js +461 -0
- package/dist/assets/sqlite3-worker1-bundler-friendly-DLarOZDL.js +9405 -0
- package/dist/assets/src-jviYSG25.js +55454 -0
- package/dist/assets/sso.store-DyApJwhx.js +139 -0
- package/dist/assets/style-E3CrYFV8.css +111829 -0
- package/dist/assets/table-we1DjFMV.js +3944 -0
- package/dist/assets/templateActions-bEDSARw2.js +65 -0
- package/dist/assets/templateTransforms-BHWiRbtR.js +43 -0
- package/dist/assets/truncate-C0KYt7i3.js +4176 -0
- package/dist/assets/typescript.worker-CYqLvLHh.js +152048 -0
- package/dist/assets/uniqBy-xDyuCRP0.js +10 -0
- package/dist/assets/usage.store-CU5J_nGm.js +100 -0
- package/dist/assets/useActions-B1JckIRj.js +255 -0
- package/dist/assets/useBeforeUnload-DiDkvI8p.js +40 -0
- package/dist/assets/useCanvasMapping-BXT7rGhC.js +12570 -0
- package/dist/assets/useCanvasOperations-8ULLtMkY.js +1765 -0
- package/dist/assets/useClipboard-DvjhVHqJ.js +39 -0
- package/dist/assets/useCommandBar-C4tLJbKt.js +2425 -0
- package/dist/assets/useCredentialResolvers-BKeFGJnY.js +78 -0
- package/dist/assets/useCustomAgent-DpILEt5e.js +471 -0
- package/dist/assets/useDebounce-Br5_1ug-.js +147 -0
- package/dist/assets/useExecutionData-M5iKsX6z.js +23 -0
- package/dist/assets/useExecutionDebugging-8azMzbnd.js +191 -0
- package/dist/assets/useExecutionHelpers-BgRRhpBM.js +91 -0
- package/dist/assets/useImportCurlCommand-CKiEmX5P.js +8891 -0
- package/dist/assets/useIntersectionObserver-BWMwOueh.js +33 -0
- package/dist/assets/useKeybindings-B2jfN6rd.js +62 -0
- package/dist/assets/useLogsTreeExpand-sZViUfdM.js +843 -0
- package/dist/assets/useMcp-DoMOIfqT.js +27 -0
- package/dist/assets/usePageRedirectionHelper-DjkznpX6.js +51 -0
- package/dist/assets/usePinnedData-BhZkqttf.js +203 -0
- package/dist/assets/usePushConnection-DMS-F_IW.js +513 -0
- package/dist/assets/useRecentResources-BVORr7eM.js +118 -0
- package/dist/assets/useRunWorkflow-LO7ffLp9.js +950 -0
- package/dist/assets/useSettingsItems-BhZXwMZn.js +144 -0
- package/dist/assets/useTelemetryContext-V6bv4YRq.js +34 -0
- package/dist/assets/useWorkflowActivate-DeSmDXjI.js +152 -0
- package/dist/assets/useWorkflowsCache-DtcEEAIR.js +179 -0
- package/dist/assets/userRoleProvisioning.store-kkSIdeTo.js +33 -0
- package/dist/assets/utils-DI7dLldp.js +54 -0
- package/dist/assets/versions.store-B1z2OrLE.js +191 -0
- package/dist/assets/vue-CydWIhxN.js +4378 -0
- package/dist/assets/vue-json-pretty-CsGX66mG.js +1130 -0
- package/dist/assets/vue.runtime.esm-bundler-tP5dCd7J.js +7325 -0
- package/dist/assets/xml-B_oj6Mle.js +2060 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.html +157 -0
- package/dist/static/base-path.js +1 -0
- package/dist/static/community_package_tooltip_img.png +0 -0
- package/dist/static/data-mapping-gif.gif +0 -0
- package/dist/static/form-grey.svg +1 -0
- package/dist/static/google-auth/disabled.dark.png +0 -0
- package/dist/static/google-auth/disabled.png +0 -0
- package/dist/static/google-auth/focus.dark.png +0 -0
- package/dist/static/google-auth/focus.png +0 -0
- package/dist/static/google-auth/normal.dark.png +0 -0
- package/dist/static/google-auth/normal.png +0 -0
- package/dist/static/google-auth/pressed.dark.png +0 -0
- package/dist/static/google-auth/pressed.png +0 -0
- package/dist/static/n8n-logo.png +0 -0
- package/dist/static/og_image.png +0 -0
- package/dist/static/open-ai.svg +1 -0
- package/dist/static/openChat.png +0 -0
- package/dist/static/posthog.init.js +41 -0
- package/dist/static/prefers-color-scheme.css +5 -0
- package/dist/static/webhook-icon.svg +1 -0
- package/dist/tree-sitter-bash.wasm +0 -0
- package/dist/tree-sitter.wasm +0 -0
- package/eslint.config.mjs +59 -0
- package/index.html +45 -0
- package/index.js +0 -0
- package/package.json +147 -0
- package/postcss.config.cjs +6 -0
- package/scripts/fetch-node-popularity.mjs +102 -0
- package/stylelint.config.mjs +9 -0
- package/tailwind.config.js +8 -0
- package/tsconfig.json +36 -0
- package/vite/i18n-locales-hmr-helpers.ts +19 -0
- package/vite/source-map-js-shim.ts +1 -0
- package/vite/vite-plugin-node-popularity.mts +32 -0
- package/vite.config.mts +304 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { Ci as getThemedValue, P as useWorkflowsStore, Pt as useNodeTypesStore, Yt as removePreviewToken, aa as useUIStore, qt as isNodePreviewKey } from "./builder.store-Czk2ipDE.js";
|
|
2
|
+
import { Mi as isExpression } from "./constants-C8OH4tTq.js";
|
|
3
|
+
import { r as useRootStore } from "./_baseOrderBy-N8Be_6z6.js";
|
|
4
|
+
var resolveIconExpression = (icon, nodeType, node) => {
|
|
5
|
+
try {
|
|
6
|
+
const workflowsStore = useWorkflowsStore();
|
|
7
|
+
const defaults = nodeType.defaults && "parameters" in nodeType.defaults ? nodeType.defaults.parameters : {};
|
|
8
|
+
const parameters = node?.parameters ?? defaults ?? {};
|
|
9
|
+
const additionalKeys = {};
|
|
10
|
+
additionalKeys.$parameter = parameters;
|
|
11
|
+
const result = workflowsStore.workflowObject.expression.getParameterValue(icon, null, 0, 0, node?.name ?? "", [], "internal", additionalKeys, void 0, false);
|
|
12
|
+
if (typeof result !== "string") return null;
|
|
13
|
+
const [prefix] = result.split(":");
|
|
14
|
+
if (prefix !== "file" && prefix !== "icon") return null;
|
|
15
|
+
return result;
|
|
16
|
+
} catch {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const getNodeIcon = (nodeType, node) => {
|
|
21
|
+
const themedIcon = getThemedValue(nodeType.icon, useUIStore().appliedTheme);
|
|
22
|
+
if (isExpression(themedIcon)) return resolveIconExpression(themedIcon, nodeType, node);
|
|
23
|
+
return themedIcon;
|
|
24
|
+
};
|
|
25
|
+
const getNodeIconUrl = (nodeType) => {
|
|
26
|
+
return getThemedValue(nodeType.iconUrl, useUIStore().appliedTheme);
|
|
27
|
+
};
|
|
28
|
+
const getBadgeIconUrl = (nodeType) => {
|
|
29
|
+
return getThemedValue(nodeType.badgeIconUrl, useUIStore().appliedTheme);
|
|
30
|
+
};
|
|
31
|
+
var getNodeIconColor = (nodeType) => {
|
|
32
|
+
if ("iconColor" in nodeType && nodeType.iconColor) return `var(--node--icon--color--${nodeType.iconColor})`;
|
|
33
|
+
const defaultColor = nodeType?.defaults?.color;
|
|
34
|
+
return typeof defaultColor === "string" ? defaultColor : void 0;
|
|
35
|
+
};
|
|
36
|
+
var prefixBaseUrl = (url) => {
|
|
37
|
+
const baseUrl = useRootStore().baseUrl;
|
|
38
|
+
return `${baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl}/${url.startsWith("/") ? url.slice(1) : url}`;
|
|
39
|
+
};
|
|
40
|
+
var getNodeBadgeIconSource = (nodeType) => {
|
|
41
|
+
if (!("badgeIconUrl" in nodeType) || !nodeType.badgeIconUrl) return void 0;
|
|
42
|
+
const badgeUrl = getBadgeIconUrl(nodeType);
|
|
43
|
+
return badgeUrl ? {
|
|
44
|
+
type: "file",
|
|
45
|
+
src: prefixBaseUrl(badgeUrl)
|
|
46
|
+
} : void 0;
|
|
47
|
+
};
|
|
48
|
+
var createFileIconSource = (src, nodeType) => ({
|
|
49
|
+
type: "file",
|
|
50
|
+
src,
|
|
51
|
+
badge: getNodeBadgeIconSource(nodeType)
|
|
52
|
+
});
|
|
53
|
+
var createNamedIconSource = (name, nodeType) => ({
|
|
54
|
+
type: "icon",
|
|
55
|
+
name,
|
|
56
|
+
color: getNodeIconColor(nodeType),
|
|
57
|
+
badge: getNodeBadgeIconSource(nodeType)
|
|
58
|
+
});
|
|
59
|
+
var getIconFromNodeTypeString = (nodeTypeName) => {
|
|
60
|
+
const nodeTypeStore = useNodeTypesStore();
|
|
61
|
+
const cleanedNodeType = removePreviewToken(nodeTypeName);
|
|
62
|
+
const nodeDescription = nodeTypeStore.communityNodeType(cleanedNodeType)?.nodeDescription ?? nodeTypeStore.getNodeType(cleanedNodeType);
|
|
63
|
+
const iconUrl = nodeDescription?.iconUrl ? getThemedValue(nodeDescription.iconUrl, useUIStore().appliedTheme) : null;
|
|
64
|
+
return iconUrl ? {
|
|
65
|
+
type: "file",
|
|
66
|
+
src: iconUrl
|
|
67
|
+
} : void 0;
|
|
68
|
+
};
|
|
69
|
+
function getNodeIconSource(nodeType, node) {
|
|
70
|
+
if (!nodeType) return void 0;
|
|
71
|
+
if (typeof nodeType === "string") return getIconFromNodeTypeString(nodeType);
|
|
72
|
+
if ("iconData" in nodeType && nodeType.iconData) {
|
|
73
|
+
if (nodeType.iconData.icon) return createNamedIconSource(nodeType.iconData.icon, nodeType);
|
|
74
|
+
if (nodeType.iconData.fileBuffer) return createFileIconSource(nodeType.iconData.fileBuffer, nodeType);
|
|
75
|
+
}
|
|
76
|
+
if (nodeType.name && isNodePreviewKey(nodeType.name)) {
|
|
77
|
+
const themedUrl = getThemedValue(nodeType.iconUrl, useUIStore().appliedTheme);
|
|
78
|
+
if (themedUrl) return {
|
|
79
|
+
type: "file",
|
|
80
|
+
src: themedUrl,
|
|
81
|
+
badge: void 0
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
const iconUrl = getNodeIconUrl(nodeType);
|
|
85
|
+
if (iconUrl) return createFileIconSource(prefixBaseUrl(iconUrl), nodeType);
|
|
86
|
+
if (nodeType.icon) {
|
|
87
|
+
let fullNodeType = nodeType;
|
|
88
|
+
if (!("iconBasePath" in nodeType) && "name" in nodeType && nodeType.name) fullNodeType = useNodeTypesStore().getNodeType(nodeType.name) ?? nodeType;
|
|
89
|
+
const icon = getNodeIcon(fullNodeType, node);
|
|
90
|
+
if (!icon) return void 0;
|
|
91
|
+
const [type, iconName] = icon.split(":");
|
|
92
|
+
if (type === "file") {
|
|
93
|
+
if ("iconBasePath" in fullNodeType && fullNodeType.iconBasePath) {
|
|
94
|
+
const iconPath = iconName.replace(/^\//, "");
|
|
95
|
+
return createFileIconSource(prefixBaseUrl(`${fullNodeType.iconBasePath}/${iconPath}`), fullNodeType);
|
|
96
|
+
}
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
return createNamedIconSource(iconName, fullNodeType);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
export { getNodeIconSource as t };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Pt as useNodeTypesStore } from "./builder.store-Czk2ipDE.js";
|
|
2
|
+
import { $i as getNodeParameters, Ji as displayParameter, Pt as AI_MCP_TOOL_NODE_TYPE, Si as traverseNodeParameters, ct as AI_CODE_TOOL_LANGCHAIN_NODE_TYPE, gr as WIKIPEDIA_TOOL_NODE_TYPE } from "./constants-C8OH4tTq.js";
|
|
3
|
+
function getNodeTypeDisplayableCredentials(nodeTypeProvider, node) {
|
|
4
|
+
const nodeType = nodeTypeProvider.getNodeType(node.type, node.typeVersion);
|
|
5
|
+
if (!nodeType?.credentials) return [];
|
|
6
|
+
const nodeTypeCreds = nodeType.credentials;
|
|
7
|
+
const nodeParameters = getNodeParameters(nodeType.properties, node.parameters, true, false, node, nodeType) ?? node.parameters;
|
|
8
|
+
return nodeTypeCreds.filter((credentialTypeDescription) => {
|
|
9
|
+
return displayParameter(nodeParameters, credentialTypeDescription, node, nodeType);
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function doesNodeHaveCredentialsToFill(nodeTypeProvider, node) {
|
|
13
|
+
return getNodeTypeDisplayableCredentials(nodeTypeProvider, node).length > 0;
|
|
14
|
+
}
|
|
15
|
+
function hasNodeCredentialFilled(node, credentialName) {
|
|
16
|
+
if (!node.credentials) return false;
|
|
17
|
+
return !!node.credentials[credentialName];
|
|
18
|
+
}
|
|
19
|
+
function doesNodeHaveAllCredentialsFilled(nodeTypeProvider, node) {
|
|
20
|
+
return getNodeTypeDisplayableCredentials(nodeTypeProvider, node).every((cred) => hasNodeCredentialFilled(node, cred.name));
|
|
21
|
+
}
|
|
22
|
+
function needsAgentInput(node) {
|
|
23
|
+
const nodeTypesNeedModal = [
|
|
24
|
+
WIKIPEDIA_TOOL_NODE_TYPE,
|
|
25
|
+
AI_MCP_TOOL_NODE_TYPE,
|
|
26
|
+
AI_CODE_TOOL_LANGCHAIN_NODE_TYPE
|
|
27
|
+
];
|
|
28
|
+
const collectedArgs = [];
|
|
29
|
+
traverseNodeParameters(node.parameters, collectedArgs);
|
|
30
|
+
return collectedArgs.length > 0 || nodeTypesNeedModal.includes(node.type) || node.type.includes("vectorStore") && node.parameters?.mode === "retrieve-as-tool";
|
|
31
|
+
}
|
|
32
|
+
function getParameterDisplayableOptions(options, node) {
|
|
33
|
+
if (!node) return options;
|
|
34
|
+
const nodeType = node?.type ? useNodeTypesStore().getNodeType(node.type, node.typeVersion) : null;
|
|
35
|
+
if (!nodeType || !Array.isArray(nodeType.properties)) return options;
|
|
36
|
+
const nodeParameters = getNodeParameters(nodeType.properties, node.parameters, true, false, node, nodeType) ?? node.parameters;
|
|
37
|
+
return options.filter((option) => {
|
|
38
|
+
if (!option.displayOptions && !option.disabledOptions) return true;
|
|
39
|
+
return displayParameter(nodeParameters, option, node, nodeType, void 0, "displayOptions");
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
export { needsAgentInput as a, getParameterDisplayableOptions as i, doesNodeHaveCredentialsToFill as n, getNodeTypeDisplayableCredentials as r, doesNodeHaveAllCredentialsFilled as t };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t as __commonJSMin } from "./chunk-6z4oVpB-.js";
|
|
2
|
+
import { m as require_isArray } from "./_MapCache-CcdIl4Ae.js";
|
|
3
|
+
import { t as require__baseOrderBy } from "./_baseOrderBy-N8Be_6z6.js";
|
|
4
|
+
var require_orderBy = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
|
+
var baseOrderBy = require__baseOrderBy(), isArray = require_isArray();
|
|
6
|
+
function orderBy(collection, iteratees, orders, guard) {
|
|
7
|
+
if (collection == null) return [];
|
|
8
|
+
if (!isArray(iteratees)) iteratees = iteratees == null ? [] : [iteratees];
|
|
9
|
+
orders = guard ? void 0 : orders;
|
|
10
|
+
if (!isArray(orders)) orders = orders == null ? [] : [orders];
|
|
11
|
+
return baseOrderBy(collection, iteratees, orders);
|
|
12
|
+
}
|
|
13
|
+
module.exports = orderBy;
|
|
14
|
+
}));
|
|
15
|
+
export { require_orderBy as t };
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { t as __commonJSMin } from "./chunk-6z4oVpB-.js";
|
|
2
|
+
import { D as process$1, E as init_dist } from "./empty-BuGRxzl4.js";
|
|
3
|
+
var require_path_browserify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
|
+
init_dist();
|
|
5
|
+
function assertPath(path) {
|
|
6
|
+
if (typeof path !== "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(path));
|
|
7
|
+
}
|
|
8
|
+
function normalizeStringPosix(path, allowAboveRoot) {
|
|
9
|
+
var res = "";
|
|
10
|
+
var lastSegmentLength = 0;
|
|
11
|
+
var lastSlash = -1;
|
|
12
|
+
var dots = 0;
|
|
13
|
+
var code;
|
|
14
|
+
for (var i = 0; i <= path.length; ++i) {
|
|
15
|
+
if (i < path.length) code = path.charCodeAt(i);
|
|
16
|
+
else if (code === 47) break;
|
|
17
|
+
else code = 47;
|
|
18
|
+
if (code === 47) {
|
|
19
|
+
if (lastSlash === i - 1 || dots === 1) {} else if (lastSlash !== i - 1 && dots === 2) {
|
|
20
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
|
|
21
|
+
if (res.length > 2) {
|
|
22
|
+
var lastSlashIndex = res.lastIndexOf("/");
|
|
23
|
+
if (lastSlashIndex !== res.length - 1) {
|
|
24
|
+
if (lastSlashIndex === -1) {
|
|
25
|
+
res = "";
|
|
26
|
+
lastSegmentLength = 0;
|
|
27
|
+
} else {
|
|
28
|
+
res = res.slice(0, lastSlashIndex);
|
|
29
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
30
|
+
}
|
|
31
|
+
lastSlash = i;
|
|
32
|
+
dots = 0;
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
} else if (res.length === 2 || res.length === 1) {
|
|
36
|
+
res = "";
|
|
37
|
+
lastSegmentLength = 0;
|
|
38
|
+
lastSlash = i;
|
|
39
|
+
dots = 0;
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (allowAboveRoot) {
|
|
44
|
+
if (res.length > 0) res += "/..";
|
|
45
|
+
else res = "..";
|
|
46
|
+
lastSegmentLength = 2;
|
|
47
|
+
}
|
|
48
|
+
} else {
|
|
49
|
+
if (res.length > 0) res += "/" + path.slice(lastSlash + 1, i);
|
|
50
|
+
else res = path.slice(lastSlash + 1, i);
|
|
51
|
+
lastSegmentLength = i - lastSlash - 1;
|
|
52
|
+
}
|
|
53
|
+
lastSlash = i;
|
|
54
|
+
dots = 0;
|
|
55
|
+
} else if (code === 46 && dots !== -1) ++dots;
|
|
56
|
+
else dots = -1;
|
|
57
|
+
}
|
|
58
|
+
return res;
|
|
59
|
+
}
|
|
60
|
+
function _format(sep, pathObject) {
|
|
61
|
+
var dir = pathObject.dir || pathObject.root;
|
|
62
|
+
var base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
|
|
63
|
+
if (!dir) return base;
|
|
64
|
+
if (dir === pathObject.root) return dir + base;
|
|
65
|
+
return dir + sep + base;
|
|
66
|
+
}
|
|
67
|
+
var posix = {
|
|
68
|
+
resolve: function resolve() {
|
|
69
|
+
var resolvedPath = "";
|
|
70
|
+
var resolvedAbsolute = false;
|
|
71
|
+
var cwd;
|
|
72
|
+
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
73
|
+
var path;
|
|
74
|
+
if (i >= 0) path = arguments[i];
|
|
75
|
+
else {
|
|
76
|
+
if (cwd === void 0) cwd = process$1.cwd();
|
|
77
|
+
path = cwd;
|
|
78
|
+
}
|
|
79
|
+
assertPath(path);
|
|
80
|
+
if (path.length === 0) continue;
|
|
81
|
+
resolvedPath = path + "/" + resolvedPath;
|
|
82
|
+
resolvedAbsolute = path.charCodeAt(0) === 47;
|
|
83
|
+
}
|
|
84
|
+
resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
|
|
85
|
+
if (resolvedAbsolute) if (resolvedPath.length > 0) return "/" + resolvedPath;
|
|
86
|
+
else return "/";
|
|
87
|
+
else if (resolvedPath.length > 0) return resolvedPath;
|
|
88
|
+
else return ".";
|
|
89
|
+
},
|
|
90
|
+
normalize: function normalize(path) {
|
|
91
|
+
assertPath(path);
|
|
92
|
+
if (path.length === 0) return ".";
|
|
93
|
+
var isAbsolute = path.charCodeAt(0) === 47;
|
|
94
|
+
var trailingSeparator = path.charCodeAt(path.length - 1) === 47;
|
|
95
|
+
path = normalizeStringPosix(path, !isAbsolute);
|
|
96
|
+
if (path.length === 0 && !isAbsolute) path = ".";
|
|
97
|
+
if (path.length > 0 && trailingSeparator) path += "/";
|
|
98
|
+
if (isAbsolute) return "/" + path;
|
|
99
|
+
return path;
|
|
100
|
+
},
|
|
101
|
+
isAbsolute: function isAbsolute(path) {
|
|
102
|
+
assertPath(path);
|
|
103
|
+
return path.length > 0 && path.charCodeAt(0) === 47;
|
|
104
|
+
},
|
|
105
|
+
join: function join() {
|
|
106
|
+
if (arguments.length === 0) return ".";
|
|
107
|
+
var joined;
|
|
108
|
+
for (var i = 0; i < arguments.length; ++i) {
|
|
109
|
+
var arg = arguments[i];
|
|
110
|
+
assertPath(arg);
|
|
111
|
+
if (arg.length > 0) if (joined === void 0) joined = arg;
|
|
112
|
+
else joined += "/" + arg;
|
|
113
|
+
}
|
|
114
|
+
if (joined === void 0) return ".";
|
|
115
|
+
return posix.normalize(joined);
|
|
116
|
+
},
|
|
117
|
+
relative: function relative(from, to) {
|
|
118
|
+
assertPath(from);
|
|
119
|
+
assertPath(to);
|
|
120
|
+
if (from === to) return "";
|
|
121
|
+
from = posix.resolve(from);
|
|
122
|
+
to = posix.resolve(to);
|
|
123
|
+
if (from === to) return "";
|
|
124
|
+
var fromStart = 1;
|
|
125
|
+
for (; fromStart < from.length; ++fromStart) if (from.charCodeAt(fromStart) !== 47) break;
|
|
126
|
+
var fromEnd = from.length;
|
|
127
|
+
var fromLen = fromEnd - fromStart;
|
|
128
|
+
var toStart = 1;
|
|
129
|
+
for (; toStart < to.length; ++toStart) if (to.charCodeAt(toStart) !== 47) break;
|
|
130
|
+
var toLen = to.length - toStart;
|
|
131
|
+
var length = fromLen < toLen ? fromLen : toLen;
|
|
132
|
+
var lastCommonSep = -1;
|
|
133
|
+
var i = 0;
|
|
134
|
+
for (; i <= length; ++i) {
|
|
135
|
+
if (i === length) {
|
|
136
|
+
if (toLen > length) {
|
|
137
|
+
if (to.charCodeAt(toStart + i) === 47) return to.slice(toStart + i + 1);
|
|
138
|
+
else if (i === 0) return to.slice(toStart + i);
|
|
139
|
+
} else if (fromLen > length) {
|
|
140
|
+
if (from.charCodeAt(fromStart + i) === 47) lastCommonSep = i;
|
|
141
|
+
else if (i === 0) lastCommonSep = 0;
|
|
142
|
+
}
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
var fromCode = from.charCodeAt(fromStart + i);
|
|
146
|
+
if (fromCode !== to.charCodeAt(toStart + i)) break;
|
|
147
|
+
else if (fromCode === 47) lastCommonSep = i;
|
|
148
|
+
}
|
|
149
|
+
var out = "";
|
|
150
|
+
for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) if (i === fromEnd || from.charCodeAt(i) === 47) if (out.length === 0) out += "..";
|
|
151
|
+
else out += "/..";
|
|
152
|
+
if (out.length > 0) return out + to.slice(toStart + lastCommonSep);
|
|
153
|
+
else {
|
|
154
|
+
toStart += lastCommonSep;
|
|
155
|
+
if (to.charCodeAt(toStart) === 47) ++toStart;
|
|
156
|
+
return to.slice(toStart);
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
_makeLong: function _makeLong(path) {
|
|
160
|
+
return path;
|
|
161
|
+
},
|
|
162
|
+
dirname: function dirname(path) {
|
|
163
|
+
assertPath(path);
|
|
164
|
+
if (path.length === 0) return ".";
|
|
165
|
+
var code = path.charCodeAt(0);
|
|
166
|
+
var hasRoot = code === 47;
|
|
167
|
+
var end = -1;
|
|
168
|
+
var matchedSlash = true;
|
|
169
|
+
for (var i = path.length - 1; i >= 1; --i) {
|
|
170
|
+
code = path.charCodeAt(i);
|
|
171
|
+
if (code === 47) {
|
|
172
|
+
if (!matchedSlash) {
|
|
173
|
+
end = i;
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
} else matchedSlash = false;
|
|
177
|
+
}
|
|
178
|
+
if (end === -1) return hasRoot ? "/" : ".";
|
|
179
|
+
if (hasRoot && end === 1) return "//";
|
|
180
|
+
return path.slice(0, end);
|
|
181
|
+
},
|
|
182
|
+
basename: function basename(path, ext) {
|
|
183
|
+
if (ext !== void 0 && typeof ext !== "string") throw new TypeError("\"ext\" argument must be a string");
|
|
184
|
+
assertPath(path);
|
|
185
|
+
var start = 0;
|
|
186
|
+
var end = -1;
|
|
187
|
+
var matchedSlash = true;
|
|
188
|
+
var i;
|
|
189
|
+
if (ext !== void 0 && ext.length > 0 && ext.length <= path.length) {
|
|
190
|
+
if (ext.length === path.length && ext === path) return "";
|
|
191
|
+
var extIdx = ext.length - 1;
|
|
192
|
+
var firstNonSlashEnd = -1;
|
|
193
|
+
for (i = path.length - 1; i >= 0; --i) {
|
|
194
|
+
var code = path.charCodeAt(i);
|
|
195
|
+
if (code === 47) {
|
|
196
|
+
if (!matchedSlash) {
|
|
197
|
+
start = i + 1;
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
} else {
|
|
201
|
+
if (firstNonSlashEnd === -1) {
|
|
202
|
+
matchedSlash = false;
|
|
203
|
+
firstNonSlashEnd = i + 1;
|
|
204
|
+
}
|
|
205
|
+
if (extIdx >= 0) if (code === ext.charCodeAt(extIdx)) {
|
|
206
|
+
if (--extIdx === -1) end = i;
|
|
207
|
+
} else {
|
|
208
|
+
extIdx = -1;
|
|
209
|
+
end = firstNonSlashEnd;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
if (start === end) end = firstNonSlashEnd;
|
|
214
|
+
else if (end === -1) end = path.length;
|
|
215
|
+
return path.slice(start, end);
|
|
216
|
+
} else {
|
|
217
|
+
for (i = path.length - 1; i >= 0; --i) if (path.charCodeAt(i) === 47) {
|
|
218
|
+
if (!matchedSlash) {
|
|
219
|
+
start = i + 1;
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
} else if (end === -1) {
|
|
223
|
+
matchedSlash = false;
|
|
224
|
+
end = i + 1;
|
|
225
|
+
}
|
|
226
|
+
if (end === -1) return "";
|
|
227
|
+
return path.slice(start, end);
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
extname: function extname(path) {
|
|
231
|
+
assertPath(path);
|
|
232
|
+
var startDot = -1;
|
|
233
|
+
var startPart = 0;
|
|
234
|
+
var end = -1;
|
|
235
|
+
var matchedSlash = true;
|
|
236
|
+
var preDotState = 0;
|
|
237
|
+
for (var i = path.length - 1; i >= 0; --i) {
|
|
238
|
+
var code = path.charCodeAt(i);
|
|
239
|
+
if (code === 47) {
|
|
240
|
+
if (!matchedSlash) {
|
|
241
|
+
startPart = i + 1;
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
if (end === -1) {
|
|
247
|
+
matchedSlash = false;
|
|
248
|
+
end = i + 1;
|
|
249
|
+
}
|
|
250
|
+
if (code === 46) {
|
|
251
|
+
if (startDot === -1) startDot = i;
|
|
252
|
+
else if (preDotState !== 1) preDotState = 1;
|
|
253
|
+
} else if (startDot !== -1) preDotState = -1;
|
|
254
|
+
}
|
|
255
|
+
if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) return "";
|
|
256
|
+
return path.slice(startDot, end);
|
|
257
|
+
},
|
|
258
|
+
format: function format(pathObject) {
|
|
259
|
+
if (pathObject === null || typeof pathObject !== "object") throw new TypeError("The \"pathObject\" argument must be of type Object. Received type " + typeof pathObject);
|
|
260
|
+
return _format("/", pathObject);
|
|
261
|
+
},
|
|
262
|
+
parse: function parse(path) {
|
|
263
|
+
assertPath(path);
|
|
264
|
+
var ret = {
|
|
265
|
+
root: "",
|
|
266
|
+
dir: "",
|
|
267
|
+
base: "",
|
|
268
|
+
ext: "",
|
|
269
|
+
name: ""
|
|
270
|
+
};
|
|
271
|
+
if (path.length === 0) return ret;
|
|
272
|
+
var code = path.charCodeAt(0);
|
|
273
|
+
var isAbsolute = code === 47;
|
|
274
|
+
var start;
|
|
275
|
+
if (isAbsolute) {
|
|
276
|
+
ret.root = "/";
|
|
277
|
+
start = 1;
|
|
278
|
+
} else start = 0;
|
|
279
|
+
var startDot = -1;
|
|
280
|
+
var startPart = 0;
|
|
281
|
+
var end = -1;
|
|
282
|
+
var matchedSlash = true;
|
|
283
|
+
var i = path.length - 1;
|
|
284
|
+
var preDotState = 0;
|
|
285
|
+
for (; i >= start; --i) {
|
|
286
|
+
code = path.charCodeAt(i);
|
|
287
|
+
if (code === 47) {
|
|
288
|
+
if (!matchedSlash) {
|
|
289
|
+
startPart = i + 1;
|
|
290
|
+
break;
|
|
291
|
+
}
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
if (end === -1) {
|
|
295
|
+
matchedSlash = false;
|
|
296
|
+
end = i + 1;
|
|
297
|
+
}
|
|
298
|
+
if (code === 46) {
|
|
299
|
+
if (startDot === -1) startDot = i;
|
|
300
|
+
else if (preDotState !== 1) preDotState = 1;
|
|
301
|
+
} else if (startDot !== -1) preDotState = -1;
|
|
302
|
+
}
|
|
303
|
+
if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
|
304
|
+
if (end !== -1) if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);
|
|
305
|
+
else ret.base = ret.name = path.slice(startPart, end);
|
|
306
|
+
} else {
|
|
307
|
+
if (startPart === 0 && isAbsolute) {
|
|
308
|
+
ret.name = path.slice(1, startDot);
|
|
309
|
+
ret.base = path.slice(1, end);
|
|
310
|
+
} else {
|
|
311
|
+
ret.name = path.slice(startPart, startDot);
|
|
312
|
+
ret.base = path.slice(startPart, end);
|
|
313
|
+
}
|
|
314
|
+
ret.ext = path.slice(startDot, end);
|
|
315
|
+
}
|
|
316
|
+
if (startPart > 0) ret.dir = path.slice(0, startPart - 1);
|
|
317
|
+
else if (isAbsolute) ret.dir = "/";
|
|
318
|
+
return ret;
|
|
319
|
+
},
|
|
320
|
+
sep: "/",
|
|
321
|
+
delimiter: ":",
|
|
322
|
+
win32: null,
|
|
323
|
+
posix: null
|
|
324
|
+
};
|
|
325
|
+
posix.posix = posix;
|
|
326
|
+
module.exports = posix;
|
|
327
|
+
}));
|
|
328
|
+
export { require_path_browserify as t };
|