@theruansilva/omp-web 2.2.2 → 2.3.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/client/assets/{CodeViewer-DFvO6hY8.js → CodeViewer-DHlYSlFA.js} +2 -2
- package/dist/client/assets/TerminalPanel-B7ErBads.js +126 -0
- package/dist/client/assets/{UnifiedDiffViewer-BjuD29RQ.js → UnifiedDiffViewer-Bsxe8vEO.js} +1 -1
- package/dist/client/assets/{abnfDiagram-O67JEVCF-SLRtz9OB.js → abnfDiagram-O67JEVCF-Bd6-T6CG.js} +1 -1
- package/dist/client/assets/{arc-CUNKbxyw.js → arc-Cx4UzFEe.js} +1 -1
- package/dist/client/assets/{architectureDiagram-NJMV4G6O-Cg80o9g4.js → architectureDiagram-NJMV4G6O-DNZZOJHJ.js} +1 -1
- package/dist/client/assets/{blockDiagram-BEXU5L5S-nZRhUgoO.js → blockDiagram-BEXU5L5S-DLGMX1ky.js} +2 -2
- package/dist/client/assets/{c4Diagram-YGBWAQC7-B2q8gSrU.js → c4Diagram-YGBWAQC7-ZicrYBFE.js} +1 -1
- package/dist/client/assets/channel-Cy0oVDAk.js +1 -0
- package/dist/client/assets/{chunk-2Q5K7J3B-flkpXKt7.js → chunk-2Q5K7J3B-BTdneniS.js} +1 -1
- package/dist/client/assets/{chunk-3FUC2YCW-kMKg81Pk.js → chunk-3FUC2YCW-DClqbl7t.js} +2 -2
- package/dist/client/assets/{chunk-5VM5RSS4-3Lib-uGP.js → chunk-5VM5RSS4-xVtxN_Sa.js} +1 -1
- package/dist/client/assets/{chunk-GTNCS2PH-CdX8cblt.js → chunk-GTNCS2PH-Da56Sthk.js} +1 -1
- package/dist/client/assets/{chunk-GWA4HPMP-CwHQm4wS.js → chunk-GWA4HPMP-D40kcLEo.js} +1 -1
- package/dist/client/assets/{chunk-JWPE2WC7-BsqVo0Tf.js → chunk-JWPE2WC7-CVgZV6Wp.js} +1 -1
- package/dist/client/assets/{chunk-NETBCI7D-p3q1dAb3.js → chunk-NETBCI7D-DNI4Nu1k.js} +1 -1
- package/dist/client/assets/{chunk-WEXAMYUT-Bv_MfOEM.js → chunk-WEXAMYUT-IVsvOCJJ.js} +1 -1
- package/dist/client/assets/{chunk-XXDRQBXY-w71UKmME.js → chunk-XXDRQBXY-ByZI65OQ.js} +1 -1
- package/dist/client/assets/{classDiagram-v2-NBCMYWYE-Ch9Lx94A.js → classDiagram-v2-NBCMYWYE-CT9N6_lF.js} +1 -1
- package/dist/client/assets/{cose-bilkent-JH36ORCC-BrpIQScu.js → cose-bilkent-JH36ORCC-CBJJYOd5.js} +1 -1
- package/dist/client/assets/{cynefin-OW5HDTMX-CRiWF9ki.js → cynefin-OW5HDTMX-BUpMG_46.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-VND7K2PF-qbMIgfpH.js → cynefinDiagram-VND7K2PF-otEJqM7K.js} +1 -1
- package/dist/client/assets/dagre-6A5THRUB-qquzH4Ev.js +4 -0
- package/dist/client/assets/{diagram-22UHCM2B-B8hKRE_o.js → diagram-22UHCM2B-HDLtgJRK.js} +1 -1
- package/dist/client/assets/{diagram-3UASUU5V-B4uZ3GNA.js → diagram-3UASUU5V-Bc2_UO5k.js} +1 -1
- package/dist/client/assets/{diagram-ATOU4E4O-CzGwlb-Y.js → diagram-ATOU4E4O-DR72H135.js} +1 -1
- package/dist/client/assets/{diagram-CDSNMT55-BXiuQ_UO.js → diagram-CDSNMT55-hNm66Cr9.js} +1 -1
- package/dist/client/assets/{diagram-MLGK6HIB-Dsw8Iqaq.js → diagram-MLGK6HIB-ChaEhVd4.js} +1 -1
- package/dist/client/assets/{diagram-MPIPVDR6-T4zPzapt.js → diagram-MPIPVDR6-gYxYar4V.js} +1 -1
- package/dist/client/assets/{ebnfDiagram-ZINNZB2B-CnvJApL-.js → ebnfDiagram-ZINNZB2B-CRQjE5YW.js} +1 -1
- package/dist/client/assets/{elk-276RUBZZ-C0qbqSzX.js → elk-276RUBZZ-OZ3Zw5zt.js} +3 -3
- package/dist/client/assets/{erDiagram-OPXOYQCR-CPCRCRVW.js → erDiagram-OPXOYQCR-CB71jEyA.js} +1 -1
- package/dist/client/assets/{flowDiagram-KWPJA3E3-CRR5EuoG.js → flowDiagram-KWPJA3E3-CYfjFu_3.js} +1 -1
- package/dist/client/assets/{ganttDiagram-FUAMR5RP-CCJy4INc.js → ganttDiagram-FUAMR5RP-BE7B_UzV.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-X574FWY7-BiGivFUj.js → gitGraphDiagram-X574FWY7-HBid3FDo.js} +1 -1
- package/dist/client/assets/graph-D8UmR1vK.js +1 -0
- package/dist/client/assets/{index-DqFyJdiT.js → index-C-cQEbCY.js} +358 -333
- package/dist/client/assets/{infoDiagram-VRGFBTTK-BdSqUdzZ.js → infoDiagram-VRGFBTTK-4JprhzHA.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-OU5B5YK6-Bto15O_-.js → ishikawaDiagram-OU5B5YK6-UAP9bqUn.js} +1 -1
- package/dist/client/assets/{journeyDiagram-ZHPQQLJL-C1FkG7_Y.js → journeyDiagram-ZHPQQLJL-j9c9R8jU.js} +1 -1
- package/dist/client/assets/{kanban-definition-PNTS6WVX-7Og64Ylp.js → kanban-definition-PNTS6WVX-DWQBxist.js} +1 -1
- package/dist/client/assets/{linear-CYEx6yMl.js → linear-T6d_7ZeJ.js} +1 -1
- package/dist/client/assets/{mindmap-definition-NLK3R4M7-BDi04G8P.js → mindmap-definition-NLK3R4M7-CvMFAKuS.js} +1 -1
- package/dist/client/assets/{pegDiagram-GJSIUBJH-niwxJYhI.js → pegDiagram-GJSIUBJH-hvF632kF.js} +1 -1
- package/dist/client/assets/{pieDiagram-5QR66LMP-DUKBH1DT.js → pieDiagram-5QR66LMP-BXICkLn_.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-O4NWA36T-DA4vON7R.js → quadrantDiagram-O4NWA36T-CnFY0fxq.js} +1 -1
- package/dist/client/assets/{railroadDiagram-XR7U4H2S-CHDT9c0L.js → railroadDiagram-XR7U4H2S-BeRVo7yu.js} +1 -1
- package/dist/client/assets/{requirementDiagram-PLB6GJNP-D8QwjsX7.js → requirementDiagram-PLB6GJNP-DmnKxfFp.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-IPEJSGJF-DWGxFQm3.js → sankeyDiagram-IPEJSGJF-Bz1YIaMr.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-PO4LG4MO-_ejeE6EX.js → sequenceDiagram-PO4LG4MO-4cmBIYSV.js} +1 -1
- package/dist/client/assets/{sizeCapture-INFHLROL-QLEMuHkm.js → sizeCapture-INFHLROL-B6mTYfgL.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-GCMORJYK-Gd_SeXN9.js → stateDiagram-v2-GCMORJYK-BKkiHc4R.js} +1 -1
- package/dist/client/assets/swimlanes-2SLR337P-CBONvDhF.js +1 -0
- package/dist/client/assets/swimlanesDiagram-TC7HE7FX-DUA_t92u.js +8 -0
- package/dist/client/assets/{timeline-definition-EJHVYXUP-DYl9dUjO.js → timeline-definition-EJHVYXUP-BG9z7YWj.js} +1 -1
- package/dist/client/assets/usecaseDiagram-POWQR4AR--yXc6tgF.js +370 -0
- package/dist/client/assets/{vendor-editor-core-D-5q2tVX.js → vendor-editor-core-DbsheCh1.js} +30 -29
- package/dist/client/assets/vendor-editor-languages-B1l-thbw.js +26 -0
- package/dist/client/assets/{vennDiagram-UO4OBE2U-Ded7JPVG.js → vennDiagram-UO4OBE2U-DYr42cwJ.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-VNRHLVJA-losDIeQr.js → wardleyDiagram-VNRHLVJA-DksCy2aR.js} +1 -1
- package/dist/client/assets/{xychartDiagram-PMCCYNJV-B7_BBfaW.js → xychartDiagram-PMCCYNJV-DPxnNxcI.js} +1 -1
- package/dist/client/index.html +3 -3
- package/dist/config.js +10 -0
- package/dist/config.js.map +1 -1
- package/dist/omp-web-plugins/usage/omp-web-plugin.js +41 -0
- package/dist/omp-web-plugins/usage/package.json +9 -0
- package/dist/omp-web-plugins/usage/types.js +2 -0
- package/dist/omp-web-plugins/usage/usageLogic.js +162 -0
- package/dist/omp-web-plugins/usage/usagePanelElement.js +442 -0
- package/dist/server/app.js +36 -1
- package/dist/server/app.js.map +1 -1
- package/dist/server/index.js +11 -3
- package/dist/server/index.js.map +1 -1
- package/dist/server/machines/machineProxyRoutes.js +16 -1
- package/dist/server/machines/machineProxyRoutes.js.map +1 -1
- package/dist/server/machines/machineService.js +5 -5
- package/dist/server/machines/machineService.js.map +1 -1
- package/dist/server/mcpRoutes.js +11 -1
- package/dist/server/mcpRoutes.js.map +1 -1
- package/dist/server/projects/projectService.js +23 -0
- package/dist/server/projects/projectService.js.map +1 -1
- package/dist/server/security.js +110 -7
- package/dist/server/security.js.map +1 -1
- package/dist/server/sessions/authService.js +23 -3
- package/dist/server/sessions/authService.js.map +1 -1
- package/dist/server/sessions/piAgentSession.js +46 -1
- package/dist/server/sessions/piAgentSession.js.map +1 -1
- package/dist/server/sessions/sessionCommandService.js +20 -9
- package/dist/server/sessions/sessionCommandService.js.map +1 -1
- package/dist/server/terminalProxyRoutes.js +16 -1
- package/dist/server/terminalProxyRoutes.js.map +1 -1
- package/dist/server/usageRoutes.js +202 -0
- package/dist/server/usageRoutes.js.map +1 -0
- package/dist/server/webSocketBridge.js +15 -0
- package/dist/server/webSocketBridge.js.map +1 -1
- package/dist/shared/apiTypes.d.ts +2 -0
- package/dist/shared/federatedRoutes.js +2 -0
- package/dist/shared/federatedRoutes.js.map +1 -1
- package/package.json +1 -1
- package/dist/client/assets/TerminalPanel-zgTnfKO5.js +0 -126
- package/dist/client/assets/_basePickBy-vr4256UX.js +0 -1
- package/dist/client/assets/_baseUniq-CHc60b6y.js +0 -1
- package/dist/client/assets/channel-CI4_doFA.js +0 -1
- package/dist/client/assets/dagre-6A5THRUB-CNLq2-K8.js +0 -4
- package/dist/client/assets/graph-C2De1HlQ.js +0 -1
- package/dist/client/assets/swimlanes-2SLR337P-BOtWDtXR.js +0 -1
- package/dist/client/assets/swimlanesDiagram-TC7HE7FX-CMZDG2D-.js +0 -8
- package/dist/client/assets/usecaseDiagram-POWQR4AR-B_DlB3UM.js +0 -370
- package/dist/client/assets/vendor-editor-languages-B6WRt0aC.js +0 -26
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import{aJ as E,aK as m,aH as K,aI as l,aM as R,bj as h,bk as A,bl as w,bm as _,bn as F,aL as N,bo as c}from"./index-DqFyJdiT.js";import{D as S,o as T}from"./vendor-terminal-DjQ08hXu.js";import"./vendor-editor-core-D-5q2tVX.js";import"./vendor-editor-languages-B6WRt0aC.js";const P="omp-web.terminal.softKeys",z="(pointer: coarse), (max-width: 760px)";function H(e,t){return e??t}function V(e){if(e==="true")return!0;if(e==="false")return!1}function $(){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(z):void 0}function M(e){return e?.matches===!0}function B(e=$()){return H(O(),M(e))}function j(){return O()!==void 0}function O(e=L()){if(e!==void 0)try{return V(e.getItem(P))}catch{return}}function U(e,t=L()){if(t!==void 0)try{t.setItem(P,String(e))}catch{}}function L(){if(!(typeof window>"u"))try{return window.localStorage}catch{return}}const q=[{id:"escape",label:"Esc",ariaLabel:"Escape",title:"Send Escape"},{id:"tab",label:"Tab",ariaLabel:"Tab",title:"Send Tab"},{id:"ctrl-c",label:"Ctrl+C",ariaLabel:"Control C",title:"Interrupt the foreground process"},{id:"ctrl-d",label:"Ctrl+D",ariaLabel:"Control D",title:"Send EOF / close input"},{id:"ctrl-z",label:"Ctrl+Z",ariaLabel:"Control Z",title:"Suspend the foreground process"},{id:"ctrl-l",label:"Ctrl+L",ariaLabel:"Control L",title:"Clear / redraw the terminal"},{id:"ctrl-r",label:"Ctrl+R",ariaLabel:"Control R",title:"Reverse search history"},{id:"ctrl-u",label:"Ctrl+U",ariaLabel:"Control U",title:"Delete to the start of the line"},{id:"ctrl-w",label:"Ctrl+W",ariaLabel:"Control W",title:"Delete the previous word"},{id:"arrow-left",label:"←",ariaLabel:"Left arrow",title:"Move left"},{id:"arrow-up",label:"↑",ariaLabel:"Up arrow",title:"Move up / previous command"},{id:"arrow-down",label:"↓",ariaLabel:"Down arrow",title:"Move down / next command"},{id:"arrow-right",label:"→",ariaLabel:"Right arrow",title:"Move right"},{id:"home",label:"Home",ariaLabel:"Home",title:"Move to the start"},{id:"end",label:"End",ariaLabel:"End",title:"Move to the end"},{id:"page-up",label:"PgUp",ariaLabel:"Page up",title:"Page up"},{id:"page-down",label:"PgDn",ariaLabel:"Page down",title:"Page down"},{id:"delete",label:"Del",ariaLabel:"Delete",title:"Delete forward"},{id:"backspace",label:"⌫",ariaLabel:"Backspace",title:"Backspace"},{id:"meta-backward-word",label:"M-B",ariaLabel:"Meta B",title:"Move backward one word"},{id:"meta-forward-word",label:"M-F",ariaLabel:"Meta F",title:"Move forward one word"}],d="\x1B",Y="";function W(e,t){switch(e){case"escape":return d;case"tab":return" ";case"ctrl-c":return p("c");case"ctrl-d":return p("d");case"ctrl-z":return p("z");case"ctrl-l":return p("l");case"ctrl-r":return p("r");case"ctrl-u":return p("u");case"ctrl-w":return p("w");case"arrow-left":return b("D",t);case"arrow-up":return b("A",t);case"arrow-down":return b("B",t);case"arrow-right":return b("C",t);case"home":return x("H",t);case"end":return x("F",t);case"page-up":return`${d}[5~`;case"page-down":return`${d}[6~`;case"delete":return`${d}[3~`;case"backspace":return Y;case"meta-backward-word":return`${d}b`;case"meta-forward-word":return`${d}f`}}function p(e){return String.fromCharCode(e.toUpperCase().charCodeAt(0)-64)}function b(e,t){return t?.applicationCursorKeysMode===!0?`${d}O${e}`:`${d}[${e}`}function x(e,t){return t?.applicationCursorKeysMode===!0?`${d}O${e}`:`${d}[${e}`}var X=Object.defineProperty,J=Object.getOwnPropertyDescriptor,y=(e,t,i,n)=>{for(var r=n>1?void 0:n?J(t,i):t,a=e.length-1,u;a>=0;a--)(u=e[a])&&(r=(n?u(t,i,r):u(r))||r);return n&&r&&X(t,i,r),r};const Z=8,G=500;let f=class extends K{constructor(){super(...arguments),this.refocusOnClick=!0,this.onInput=()=>{},this.lastPointerFinishedAt=0}sendSoftKey(e,t){this.onInput(W(e.id,this.modes),t)}onSoftKeyPointerDown(e,t){e.pointerType==="mouse"&&e.button!==0||(e.preventDefault(),this.pointerStart={pointerId:e.pointerId,key:t,clientX:e.clientX,clientY:e.clientY})}onSoftKeyPointerMove(e){const t=this.pointerStart;t?.pointerId===e.pointerId&&I(t,e)&&this.finishSoftKeyPointer()}onSoftKeyPointerUp(e,t){const i=this.pointerStart;i?.pointerId===e.pointerId&&(e.preventDefault(),this.finishSoftKeyPointer(),!(i.key.id!==t.id||I(i,e))&&this.sendSoftKey(t,{refocus:e.pointerType==="mouse"}))}onSoftKeyPointerCancel(e){this.pointerStart?.pointerId===e.pointerId&&this.finishSoftKeyPointer()}finishSoftKeyPointer(){this.pointerStart=void 0,this.lastPointerFinishedAt=Date.now()}onSoftKeyClick(e,t){if(Date.now()-this.lastPointerFinishedAt<G){e.preventDefault();return}this.sendSoftKey(t,{refocus:this.refocusOnClick})}render(){return l`
|
|
2
|
-
<div class="terminal-soft-keys" role="toolbar" aria-label="Terminal soft keys">
|
|
3
|
-
${q.map(e=>l`
|
|
4
|
-
<button
|
|
5
|
-
type="button"
|
|
6
|
-
class="soft-key"
|
|
7
|
-
title=${e.title}
|
|
8
|
-
aria-label=${e.ariaLabel}
|
|
9
|
-
@pointerdown=${t=>{this.onSoftKeyPointerDown(t,e)}}
|
|
10
|
-
@pointermove=${t=>{this.onSoftKeyPointerMove(t)}}
|
|
11
|
-
@pointerup=${t=>{this.onSoftKeyPointerUp(t,e)}}
|
|
12
|
-
@pointercancel=${t=>{this.onSoftKeyPointerCancel(t)}}
|
|
13
|
-
@click=${t=>{this.onSoftKeyClick(t,e)}}
|
|
14
|
-
>${e.label}</button>
|
|
15
|
-
`)}
|
|
16
|
-
</div>
|
|
17
|
-
`}};f.styles=E`
|
|
18
|
-
:host { flex: 0 0 auto; display: block; }
|
|
19
|
-
.terminal-soft-keys { display: flex; gap: 6px; align-items: center; padding: 6px; border-bottom: 1px solid var(--pi-border-muted); background: var(--pi-bg); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; touch-action: pan-x; }
|
|
20
|
-
.terminal-soft-keys::-webkit-scrollbar { display: none; }
|
|
21
|
-
button { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; max-width: none; min-height: 34px; border: 1px solid var(--pi-border); border-radius: 7px; background: var(--pi-surface); color: var(--pi-text); padding: 6px 9px; font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; cursor: pointer; touch-action: pan-x; -webkit-touch-callout: none; user-select: none; }
|
|
22
|
-
button:disabled { opacity: .5; cursor: not-allowed; }
|
|
23
|
-
`;y([m({attribute:!1})],f.prototype,"modes",2);y([m({type:Boolean})],f.prototype,"refocusOnClick",2);y([m({attribute:!1})],f.prototype,"onInput",2);f=y([R("terminal-soft-keys")],f);function I(e,t){return Math.hypot(t.clientX-e.clientX,t.clientY-e.clientY)>Z}var Q=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,s=(e,t,i,n)=>{for(var r=n>1?void 0:n?ee(t,i):t,a=e.length-1,u;a>=0;a--)(u=e[a])&&(r=(n?u(t,i,r):u(r))||r);return n&&r&&Q(t,i,r),r};const te={cursorBlink:!0,convertEol:!0,fontFamily:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",fontSize:13},ie={cols:100,rows:30},ne=1e3;let o=class extends K{constructor(){super(...arguments),this.machineId="local",this.autoStart=!1,this.onSelectTerminal=()=>{},this.terminals=[],this.commandRuns=[],this.loading=!1,this.visible=!1,this.cancellingRunIds=[],this.continuingTerminalIds=[],this.defaultSoftKeysEnvironment=!1,this.softKeysEnabled=B(),this.suppressTerminalInput=!1,this.softKeysDefaultEnvironmentMedia=$(),this.softKeysPreferenceStored=j(),this.onSoftKeysDefaultEnvironmentChange=()=>{this.syncDefaultSoftKeysEnvironment()}}connectedCallback(){super.connectedCallback(),this.syncDefaultSoftKeysEnvironment(),this.softKeysDefaultEnvironmentMedia?.addEventListener("change",this.onSoftKeysDefaultEnvironmentChange),this.themeObserver=new MutationObserver(()=>{this.applyTerminalTheme()}),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["class","style","data-theme"]})}firstUpdated(){this.intersectionObserver=new IntersectionObserver(e=>{this.visible=e[0]?.isIntersecting===!0}),this.intersectionObserver.observe(this)}disconnectedCallback(){this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.themeObserver?.disconnect(),this.themeObserver=void 0,this.softKeysDefaultEnvironmentMedia?.removeEventListener("change",this.onSoftKeysDefaultEnvironmentChange),this.updateCommandRunPolling(!1),this.disposeTerminalView(),super.disconnectedCallback()}syncDefaultSoftKeysEnvironment(){const e=M(this.softKeysDefaultEnvironmentMedia),t=this.softKeysEnabled;this.defaultSoftKeysEnvironment=e,this.softKeysPreferenceStored||(this.softKeysEnabled=e),this.softKeysEnabled!==t&&this.scheduleFitAndNotify()}scheduleFitAndNotify(){this.updateComplete.then(()=>{this.fitAndNotify()})}willUpdate(e){const t=this.workspace===void 0?void 0:JSON.stringify([this.machineId,this.workspace.path]);if(t!==this.observedWorkspaceScope){this.observedWorkspaceScope=t,this.loadedCwd=void 0,this.autoStartConsumedCwd=void 0,this.terminals=[],this.commandRuns=[],this.selectedId=void 0,this.cancellingRunIds=[],this.continuingTerminalIds=[],this.updateCommandRunPolling(!1),this.disposeTerminalView();return}if(e.has("selectedTerminalId")){if(e.get("selectedTerminalId")!==void 0&&this.selectedTerminalId===void 0){this.loadedCwd=void 0,this.selectTerminalIdInView(void 0);return}this.applyRequestedTerminalSelection()}}updated(e){this.visible?this.hasPendingCommandRuns()&&this.updateCommandRunPolling(!0):this.updateCommandRunPolling(!1),this.loadVisibleWorkspaceTerminals(),e.has("selectedTerminalId")&&this.shouldReloadForRequestedTerminal()&&this.loadTerminals(),this.ensureTerminalView()}loadVisibleWorkspaceTerminals(){const e=this.workspace?.path;!this.visible||e===void 0||e===this.loadedCwd||(this.loadedCwd=e,this.loadTerminals())}async loadTerminals(){this.loading=!0,this.error=void 0;try{const e=this.workspace;if(e===void 0)return;const t=this.consumeAutoStart(),[i,n]=await Promise.all([h.terminals(e.projectId,e.id,this.machineId),h.listCommandRuns({projectId:e.projectId,workspaceId:e.id},this.machineId)]);this.terminals=i,this.commandRuns=n,this.selectPreferredLoadedTerminal({replaceUrl:!0}),this.updateCommandRunPolling(this.hasPendingCommandRuns(n)),i.length===0&&t&&await this.startTerminal()}catch(e){this.error=e instanceof Error?e.message:String(e)}finally{this.loading=!1}}applyRequestedTerminalSelection(){this.selectedTerminalId!==void 0&&!this.terminals.some(e=>e.id===this.selectedTerminalId)||this.selectPreferredLoadedTerminal({replaceUrl:!0})}consumeAutoStart(){const e=this.workspace?.path;return!this.autoStart||e===void 0||this.autoStartConsumedCwd===e?!1:(this.autoStartConsumedCwd=e,!0)}shouldReloadForRequestedTerminal(){const e=this.workspace?.path;return this.visible&&e!==void 0&&e===this.loadedCwd&&this.selectedTerminalId!==void 0&&!this.loading&&!this.terminals.some(t=>t.id===this.selectedTerminalId)}selectPreferredLoadedTerminal(e){let t=A(this.terminals,{targetTerminalId:this.selectedTerminalId});t===void 0&&this.selectedTerminalId!==void 0&&(t=w(this.terminals)),this.selectTerminalIdInView(t?.id),(t?.id!==this.selectedTerminalId||t===void 0&&this.selectedTerminalId!==void 0)&&this.onSelectTerminal(t?.id,{replace:e?.replaceUrl===!0})}selectTerminalIdInView(e){this.selectedId!==e&&(this.selectedId=e,this.disposeTerminalView())}async startTerminal(){if(this.workspace!==void 0){this.error=void 0;try{const e=this.measureTerminalSize()??ie,t=await h.startTerminal(this.workspace.projectId,this.workspace.id,e,this.machineId);this.terminals=[...this.terminals,t],this.selectTerminal(t.id)}catch(e){this.error=e instanceof Error?e.message:String(e)}}}async closeTerminal(e,t){t.stopPropagation();try{if(this.workspace===void 0)return;await h.closeTerminal(this.workspace.projectId,this.workspace.id,e,this.machineId);const i=this.terminals.filter(n=>n.id!==e);if(this.terminals=i,this.selectedId===e||this.selectedTerminalId===e){const n=w(i)?.id;this.selectTerminalIdInView(n),this.onSelectTerminal(n,{replace:!0})}}catch(i){this.error=i instanceof Error?i.message:String(i)}}selectTerminal(e){this.selectedId!==e&&this.selectTerminalIdInView(e),this.onSelectTerminal(e)}selectedTerminalInfo(){return this.terminals.find(e=>e.id===this.selectedId)}selectedCommandRun(){const e=this.selectedTerminalInfo()?.commandRunId;if(e!==void 0)return this.commandRuns.find(t=>t.id===e)}async loadCommandRuns(){const e=this.workspace;if(e!==void 0)try{const t=await h.listCommandRuns({projectId:e.projectId,workspaceId:e.id},this.machineId);this.commandRuns=t,this.cancellingRunIds=this.cancellingRunIds.filter(i=>t.some(n=>n.id===i&&v(n))),this.updateCommandRunPolling(this.hasPendingCommandRuns(t))}catch(t){this.error=t instanceof Error?t.message:String(t)}}updateCommandRunPolling(e){if(e&&this.commandRunPollTimer===void 0){this.commandRunPollTimer=window.setInterval(()=>{this.loadCommandRuns()},ne);return}!e&&this.commandRunPollTimer!==void 0&&(window.clearInterval(this.commandRunPollTimer),this.commandRunPollTimer=void 0)}hasPendingCommandRuns(e=this.commandRuns){return e.some(v)}async cancelCommandRun(e){if(!(!v(e)||this.cancellingRunIds.includes(e.id))){this.error=void 0,this.cancellingRunIds=[...this.cancellingRunIds,e.id];try{await h.cancelCommandRun(e.id,this.machineId),await this.loadCommandRuns()}catch(t){this.error=t instanceof Error?t.message:String(t)}finally{this.cancellingRunIds=this.cancellingRunIds.filter(t=>t!==e.id)}}}async continueTerminal(e){if(!(this.workspace===void 0||this.continuingTerminalIds.includes(e))){this.error=void 0,this.continuingTerminalIds=[...this.continuingTerminalIds,e];try{const t=await h.continueTerminal(this.workspace.projectId,this.workspace.id,e,this.machineId);this.terminals=this.terminals.map(i=>i.id===e?t:i),this.socket===void 0&&this.disposeTerminalView(),this.fitAndNotify(),this.terminal?.focus()}catch(t){this.error=t instanceof Error?t.message:String(t)}finally{this.continuingTerminalIds=this.continuingTerminalIds.filter(t=>t!==e)}}}ensureTerminalView(){const e=this.workspace,t=this.terminalHostElement();if(!this.visible||this.terminal!==void 0||this.selectedId===void 0||t===void 0||e===void 0)return;const i=new S(C(this)),n=new T;i.loadAddon(n),i.open(t),this.terminal=i,this.fitAddon=n,this.resizeObserver=new ResizeObserver(()=>{this.fitAndNotify()}),this.resizeObserver.observe(t),i.onData(a=>{this.suppressTerminalInput||this.sendTerminalInput(a)});const r=this.fitTerminal();this.connectSocket(e.projectId,e.id,this.selectedId,i,r),requestAnimationFrame(()=>{this.fitAndNotify()}),i.focus()}connectSocket(e,t,i,n,r){const a=_(e,t,i,r,this.machineId);a.binaryType="arraybuffer",this.socket=a,a.addEventListener("open",()=>{this.fitAndNotify()}),a.addEventListener("message",u=>{this.handleSocketMessage(u.data,i,n)}),a.addEventListener("close",()=>{this.socket===a&&(this.socket=void 0)})}async handleSocketMessage(e,t,i){try{const n=oe(await ae(e));n.type==="output"&&this.writeTerminalOutput(i,n.data,n.replay===!0),n.type==="exit"&&(i.writeln(`\r
|
|
24
|
-
[process exited${n.exitCode===void 0?"":` with code ${String(n.exitCode)}`}]`),this.terminals=this.terminals.map(r=>r.id===t?{...r,exited:!0,...n.exitCode===void 0?{}:{exitCode:n.exitCode}}:r),this.loadCommandRuns()),n.type==="error"&&i.writeln(`\r
|
|
25
|
-
[terminal error: ${n.message}]`)}catch(n){i.writeln(`\r
|
|
26
|
-
[terminal error: ${n instanceof Error?n.message:String(n)}]`)}}writeTerminalOutput(e,t,i){if(!i){e.write(t);return}this.suppressTerminalInput=!0,e.write(t,()=>{this.suppressTerminalInput=!1})}fitAndNotify(){const e=this.fitTerminal();e!==void 0&&this.send({type:"resize",...e})}fitTerminal(){if(this.fitAddon===void 0||this.terminal===void 0)return;const e=this.fitAddon.proposeDimensions(),t=k(e);if(t!==void 0)return this.fitAddon.fit(),t}measureTerminalSize(){const e=this.fitTerminal();if(e!==void 0)return e;const t=this.terminalHostElement();if(this.terminal!==void 0||t===void 0)return;const i=new S(C(this)),n=new T;i.loadAddon(n),i.open(t);const r=k(n.proposeDimensions());return i.dispose(),r}terminalHostElement(){const e=this.terminalHost;return e instanceof HTMLDivElement?e:void 0}applyTerminalTheme(){this.terminal!==void 0&&(this.terminal.options.theme=D(this))}sendTerminalInput(e){const t=se(e);t!==""&&this.send({type:"input",data:t})}sendSoftKeyInput(e,t){this.sendTerminalInput(e),t.refocus&&this.focusTerminal()}focusTerminal(){const e=this.terminal;e!==void 0&&(e.focus(),requestAnimationFrame(()=>{e.focus()}))}send(e){this.socket?.readyState===WebSocket.OPEN&&this.socket.send(JSON.stringify(e))}disposeTerminalView(){this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.socket?.close(),this.socket=void 0,this.terminal?.dispose(),this.terminal=void 0,this.fitAddon=void 0}renderCommandRunNotice(){const e=this.selectedCommandRun();if(e===void 0)return null;const t=this.selectedTerminalInfo();if(v(e)){const i=this.cancellingRunIds.includes(e.id);return l`
|
|
27
|
-
<section class="command-run-notice running">
|
|
28
|
-
<div>
|
|
29
|
-
<strong>${e.title}</strong>
|
|
30
|
-
<p>Command is running. Press <kbd>Ctrl</kbd>+<kbd>C</kbd> or use the button to cancel.</p>
|
|
31
|
-
<code>${e.command}</code>
|
|
32
|
-
</div>
|
|
33
|
-
<button class="danger" ?disabled=${i} @click=${()=>{this.cancelCommandRun(e)}}>${i?"Cancel sent…":"Cancel command"}</button>
|
|
34
|
-
</section>
|
|
35
|
-
`}if(t?.exited===!0){const i=this.continuingTerminalIds.includes(t.id);return l`
|
|
36
|
-
<section class=${`command-run-notice ${e.status}`}>
|
|
37
|
-
<div>
|
|
38
|
-
<strong>${re(e)}</strong>
|
|
39
|
-
<p>Output is preserved. Continue in a shell to inspect or run follow-up commands.</p>
|
|
40
|
-
<code>${e.command}</code>
|
|
41
|
-
</div>
|
|
42
|
-
<button ?disabled=${i} @click=${()=>{this.continueTerminal(t.id)}}>${i?"Starting shell…":"Continue in shell"}</button>
|
|
43
|
-
</section>
|
|
44
|
-
`}return null}selectedTerminalAcceptsInput(){const e=this.selectedTerminalInfo();return e!==void 0&&!e.exited}shouldShowSoftKeys(){return this.selectedTerminalAcceptsInput()&&this.softKeysEnabled}shouldShowSoftKeysToggle(){return this.selectedTerminalAcceptsInput()}toggleSoftKeys(){this.softKeysEnabled=!this.softKeysEnabled,this.softKeysPreferenceStored=!0,U(this.softKeysEnabled),this.scheduleFitAndNotify()}renderSoftKeysToggle(){return this.shouldShowSoftKeysToggle()?l`
|
|
45
|
-
<button
|
|
46
|
-
type="button"
|
|
47
|
-
class=${this.softKeysEnabled?"soft-keys-toggle selected":"soft-keys-toggle"}
|
|
48
|
-
title=${this.softKeysEnabled?"Hide terminal soft keys":"Show terminal soft keys"}
|
|
49
|
-
aria-label=${this.softKeysEnabled?"Hide terminal soft keys":"Show terminal soft keys"}
|
|
50
|
-
aria-pressed=${String(this.softKeysEnabled)}
|
|
51
|
-
@click=${()=>{this.toggleSoftKeys()}}
|
|
52
|
-
>
|
|
53
|
-
<svg class="keyboard-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
|
54
|
-
<rect x="3" y="5" width="18" height="14" rx="2"></rect>
|
|
55
|
-
<path d="M7 9h.01M10 9h.01M13 9h.01M16 9h.01M7 12h.01M10 12h.01M13 12h.01M16 12h.01M8 16h8"></path>
|
|
56
|
-
</svg>
|
|
57
|
-
<span>Keys</span>
|
|
58
|
-
</button>
|
|
59
|
-
`:null}renderSoftKeys(){return l`
|
|
60
|
-
<terminal-soft-keys
|
|
61
|
-
.modes=${this.terminal?.modes}
|
|
62
|
-
.refocusOnClick=${!this.defaultSoftKeysEnvironment}
|
|
63
|
-
.onInput=${(e,t)=>{this.sendSoftKeyInput(e,t)}}
|
|
64
|
-
></terminal-soft-keys>
|
|
65
|
-
`}render(){return l`
|
|
66
|
-
<section class="terminal-shell">
|
|
67
|
-
<div class="terminal-tabs">
|
|
68
|
-
${this.renderSoftKeysToggle()}
|
|
69
|
-
${this.terminals.map(e=>l`
|
|
70
|
-
<button class=${this.selectedId===e.id?"selected":""} @click=${()=>{this.selectTerminal(e.id)}}>
|
|
71
|
-
<span>${e.name}${e.exited?" · exited":""}</span>
|
|
72
|
-
<small @click=${t=>{this.closeTerminal(e.id,t)}}>×</small>
|
|
73
|
-
</button>
|
|
74
|
-
`)}
|
|
75
|
-
<button class="new" ?disabled=${this.workspace===void 0} @click=${()=>{this.startTerminal()}}>+ Shell</button>
|
|
76
|
-
</div>
|
|
77
|
-
${this.error===void 0?null:l`<p class="error">${this.error}</p>`}
|
|
78
|
-
${this.renderCommandRunNotice()}
|
|
79
|
-
${this.shouldShowSoftKeys()?this.renderSoftKeys():null}
|
|
80
|
-
${this.loading?l`<p class="muted">Loading terminals…</p>`:null}
|
|
81
|
-
<div class="terminal-host"></div>
|
|
82
|
-
</section>
|
|
83
|
-
`}};o.styles=E`
|
|
84
|
-
:host { flex: 1 1 auto; min-height: 0; display: flex; }
|
|
85
|
-
.terminal-shell { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--pi-terminal-bg); }
|
|
86
|
-
.terminal-tabs { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; padding: 6px; border-bottom: 1px solid var(--pi-border-muted); background: var(--pi-bg); overflow: auto; }
|
|
87
|
-
button { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 180px; border: 1px solid var(--pi-border); border-radius: 7px; background: var(--pi-surface); color: var(--pi-text); padding: 5px 7px; cursor: pointer; }
|
|
88
|
-
button.selected { border-color: var(--pi-accent); background: var(--pi-selection-bg); }
|
|
89
|
-
button.new { flex: 0 0 auto; color: var(--pi-muted); }
|
|
90
|
-
.soft-keys-toggle { flex: 0 0 auto; }
|
|
91
|
-
.soft-keys-toggle .keyboard-icon { flex: 0 0 auto; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
|
|
92
|
-
button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
93
|
-
button small { color: var(--pi-muted); font-size: 14px; line-height: 1; }
|
|
94
|
-
button small:hover { color: var(--pi-danger); }
|
|
95
|
-
button.danger { color: var(--pi-danger); }
|
|
96
|
-
button:disabled { opacity: .5; cursor: not-allowed; }
|
|
97
|
-
.command-run-notice { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--pi-border-muted); background: var(--pi-surface); color: var(--pi-text); }
|
|
98
|
-
.command-run-notice.running { border-color: var(--pi-warning-border); }
|
|
99
|
-
.command-run-notice.succeeded { border-color: var(--pi-success-border); }
|
|
100
|
-
.command-run-notice.failed { border-color: var(--pi-danger); }
|
|
101
|
-
.command-run-notice p { margin: 3px 0; color: var(--pi-muted); }
|
|
102
|
-
.command-run-notice code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pi-text-secondary); font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
|
|
103
|
-
.command-run-notice kbd { border: 1px solid var(--pi-border); border-radius: 4px; background: var(--pi-bg); padding: 0 4px; font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
|
|
104
|
-
.command-run-notice button { justify-self: end; max-width: none; }
|
|
105
|
-
.terminal-host { flex: 1 1 auto; min-height: 0; padding: 6px; box-sizing: border-box; overflow: hidden; }
|
|
106
|
-
.terminal-host .xterm { height: 100%; cursor: text; position: relative; user-select: none; }
|
|
107
|
-
.terminal-host .xterm.focus, .terminal-host .xterm:focus { outline: none; }
|
|
108
|
-
.terminal-host .xterm-helpers { position: absolute; top: 0; z-index: 5; }
|
|
109
|
-
/* Hide the helper textarea without using !important on the positional properties (left/top/width/height/z-index). xterm sets those inline during IME/dead-key composition (e.g. "~" on a Swedish layout) so the composition is positioned at the cursor and committed correctly; forcing them here would pin the textarea off-screen with zero size and break composition. */
|
|
110
|
-
.terminal-host .xterm-helper-textarea { position: absolute; left: -9999em; top: 0; width: 0; height: 0; padding: 0 !important; border: 0 !important; margin: 0 !important; opacity: 0 !important; z-index: -5; white-space: nowrap !important; overflow: hidden !important; resize: none !important; outline: 0 !important; appearance: none !important; }
|
|
111
|
-
/* The composition view shows pending dead-key/IME input. Without these rules it renders as a static block in the top-left corner instead of overlaying the cursor. */
|
|
112
|
-
.terminal-host .composition-view { position: absolute; display: none; white-space: nowrap; z-index: 1; background: var(--pi-terminal-bg, #000); color: var(--pi-terminal-text, #fff); }
|
|
113
|
-
.terminal-host .composition-view.active { display: block; }
|
|
114
|
-
.terminal-host .xterm-viewport { position: absolute; inset: 0; overflow-y: scroll; cursor: default; background-color: var(--pi-terminal-bg); }
|
|
115
|
-
.terminal-host .xterm-screen { position: relative; }
|
|
116
|
-
.terminal-host .xterm-screen canvas { position: absolute; left: 0; top: 0; }
|
|
117
|
-
.terminal-host .xterm-char-measure-element { display: inline-block; visibility: hidden; position: absolute; top: 0; left: -9999em; line-height: normal; }
|
|
118
|
-
.terminal-host .xterm-accessibility:not(.debug), .terminal-host .xterm-message { position: absolute; inset: 0; z-index: 10; color: transparent; pointer-events: none; }
|
|
119
|
-
.terminal-host .xterm-accessibility-tree:not(.debug) *::selection { color: transparent; }
|
|
120
|
-
.terminal-host .xterm-accessibility-tree { font-family: monospace; user-select: text; white-space: pre; }
|
|
121
|
-
.terminal-host .xterm-accessibility-tree > div { transform-origin: left; width: fit-content; }
|
|
122
|
-
.terminal-host .live-region { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
|
|
123
|
-
.error { flex: 0 0 auto; margin: 0; padding: 8px; color: var(--pi-danger); border-bottom: 1px solid var(--pi-border); background: var(--pi-surface); }
|
|
124
|
-
.muted { margin: 10px; color: var(--pi-muted); }
|
|
125
|
-
.xterm { height: 100%; }
|
|
126
|
-
`;s([m({attribute:!1})],o.prototype,"workspace",2);s([m()],o.prototype,"machineId",2);s([m({attribute:!1})],o.prototype,"selectedTerminalId",2);s([m({type:Boolean})],o.prototype,"autoStart",2);s([m({attribute:!1})],o.prototype,"onSelectTerminal",2);s([N(".terminal-host")],o.prototype,"terminalHost",2);s([c()],o.prototype,"terminals",2);s([c()],o.prototype,"commandRuns",2);s([c()],o.prototype,"selectedId",2);s([c()],o.prototype,"loading",2);s([c()],o.prototype,"error",2);s([c()],o.prototype,"visible",2);s([c()],o.prototype,"cancellingRunIds",2);s([c()],o.prototype,"continuingTerminalIds",2);s([c()],o.prototype,"defaultSoftKeysEnvironment",2);s([c()],o.prototype,"softKeysEnabled",2);o=s([R("terminal-panel")],o);function v(e){return e.status==="queued"||e.status==="running"}function re(e){return e.status==="succeeded"?`Command succeeded${e.exitCode===void 0?"":` with exit code ${String(e.exitCode)}`}`:`Command failed${e.exitCode===void 0?"":` with exit code ${String(e.exitCode)}`}`}function oe(e){const t=JSON.parse(e);if(!F(t))return{type:"error",message:"Invalid terminal message"};const i=t;return i.type==="output"&&typeof i.data=="string"?{type:"output",data:i.data,...typeof i.replay=="boolean"?{replay:i.replay}:{}}:i.type==="exit"?{type:"exit",...typeof i.exitCode=="number"?{exitCode:i.exitCode}:{}}:i.type==="error"&&typeof i.message=="string"?{type:"error",message:i.message}:{type:"error",message:"Invalid terminal message"}}function se(e){return e.replaceAll("\x1B[I","").replaceAll("\x1B[O","")}async function ae(e){return typeof e=="string"?e:e instanceof ArrayBuffer?new TextDecoder().decode(e):e instanceof Blob?await e.text():String(e)}function C(e){return{...te,theme:D(e)}}function D(e){return{background:g(e,"--pi-terminal-bg","#05070a"),foreground:g(e,"--pi-terminal-text","#e6edf3"),cursor:g(e,"--pi-accent","#58a6ff"),selectionBackground:g(e,"--pi-terminal-selection","#264f78")}}function g(e,t,i){const n=getComputedStyle(e).getPropertyValue(t).trim();return n===""?i:n}function k(e){if(!(e===void 0||!le(e.cols,e.rows)))return{cols:Math.floor(e.cols),rows:Math.floor(e.rows)}}function le(e,t){return Number.isFinite(e)&&Number.isFinite(t)&&e>0&&t>0}export{o as TerminalPanel,se as filterTerminalInput};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as or,m as d,n as E,o as O,p as T,q,b as H,s as z,t as fr,c as ur,u as cr,k as m,w as gr,x as W,y as lr,z as dr,A as br,U as F,S as M,B as Y,C as w,D as J,E as y,F as pr,G as yr,H as Tr,I as Q,J as hr,K as I,L as vr,M as Ar,N as Or,O as mr,P as X,Q as wr,R as Ir}from"./_baseUniq-CHc60b6y.js";var $r=/\s/;function xr(r){for(var n=r.length;n--&&$r.test(r.charAt(n)););return n}var Pr=/^\s+/;function jr(r){return r&&r.slice(0,xr(r)+1).replace(Pr,"")}var B=NaN,Sr=/^[-+]0x[0-9a-f]+$/i,Er=/^0b[01]+$/i,Fr=/^0o[0-7]+$/i,Mr=parseInt;function Br(r){if(typeof r=="number")return r;if(or(r))return B;if(d(r)){var n=typeof r.valueOf=="function"?r.valueOf():r;r=d(n)?n+"":n}if(typeof r!="string")return r===0?r:+r;r=jr(r);var t=Er.test(r);return t||Fr.test(r)?Mr(r.slice(2),t?2:8):Sr.test(r)?B:+r}var C=1/0,Cr=17976931348623157e292;function _r(r){if(!r)return r===0?r:0;if(r=Br(r),r===C||r===-C){var n=r<0?-1:1;return n*Cr}return r===r?r:0}function Lr(r){var n=_r(r),t=n%1;return n===n?t?n-t:n:0}var _=Object.create,Ur=(function(){function r(){}return function(n){if(!d(n))return{};if(_)return _(n);r.prototype=n;var t=new r;return r.prototype=void 0,t}})();function Nr(r,n){var t=-1,e=r.length;for(n||(n=Array(e));++t<e;)n[t]=r[t];return n}function Z(r,n,t){n=="__proto__"&&E?E(r,n,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[n]=t}var Gr=Object.prototype,Kr=Gr.hasOwnProperty;function $(r,n,t){var e=r[n];(!(Kr.call(r,n)&&O(e,t))||t===void 0&&!(n in r))&&Z(r,n,t)}function h(r,n,t,e){var a=!t;t||(t={});for(var s=-1,i=n.length;++s<i;){var o=n[s],u=void 0;u===void 0&&(u=r[o]),a?Z(t,o,u):$(t,o,u)}return t}function V(r,n,t){if(!d(t))return!1;var e=typeof n;return(e=="number"?T(t)&&q(n,t.length):e=="string"&&n in t)?O(t[n],r):!1}function Tt(r){return H(function(n,t){var e=-1,a=t.length,s=a>1?t[a-1]:void 0,i=a>2?t[2]:void 0;for(s=r.length>3&&typeof s=="function"?(a--,s):void 0,i&&V(t[0],t[1],i)&&(s=a<3?void 0:s,a=1),n=Object(n);++e<a;){var o=t[e];o&&r(n,o,e,s)}return n})}function Dr(r){var n=[];if(r!=null)for(var t in Object(r))n.push(t);return n}var Rr=Object.prototype,qr=Rr.hasOwnProperty;function Hr(r){if(!d(r))return Dr(r);var n=z(r),t=[];for(var e in r)e=="constructor"&&(n||!qr.call(r,e))||t.push(e);return t}function v(r){return T(r)?fr(r,!0):Hr(r)}function ht(r){var n=r==null?0:r.length;return n?ur(r):[]}var k=cr(Object.getPrototypeOf,Object);function zr(r,n){return r&&h(n,m(n),r)}function Wr(r,n){return r&&h(n,v(n),r)}var rr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,L=rr&&typeof module=="object"&&module&&!module.nodeType&&module,Yr=L&&L.exports===rr,U=Yr?gr.Buffer:void 0,N=U?U.allocUnsafe:void 0;function Jr(r,n){if(n)return r.slice();var t=r.length,e=N?N(t):new r.constructor(t);return r.copy(e),e}function Qr(r,n){return h(r,W(r),n)}var Xr=Object.getOwnPropertySymbols,nr=Xr?function(r){for(var n=[];r;)dr(n,W(r)),r=k(r);return n}:lr;function Zr(r,n){return h(r,nr(r),n)}function Vr(r){return br(r,v,nr)}var kr=Object.prototype,rn=kr.hasOwnProperty;function nn(r){var n=r.length,t=new r.constructor(n);return n&&typeof r[0]=="string"&&rn.call(r,"index")&&(t.index=r.index,t.input=r.input),t}function x(r){var n=new r.constructor(r.byteLength);return new F(n).set(new F(r)),n}function tn(r,n){var t=n?x(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}var en=/\w*$/;function an(r){var n=new r.constructor(r.source,en.exec(r));return n.lastIndex=r.lastIndex,n}var G=M?M.prototype:void 0,K=G?G.valueOf:void 0;function sn(r){return K?Object(K.call(r)):{}}function on(r,n){var t=n?x(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var fn="[object Boolean]",un="[object Date]",cn="[object Map]",gn="[object Number]",ln="[object RegExp]",dn="[object Set]",bn="[object String]",pn="[object Symbol]",yn="[object ArrayBuffer]",Tn="[object DataView]",hn="[object Float32Array]",vn="[object Float64Array]",An="[object Int8Array]",On="[object Int16Array]",mn="[object Int32Array]",wn="[object Uint8Array]",In="[object Uint8ClampedArray]",$n="[object Uint16Array]",xn="[object Uint32Array]";function Pn(r,n,t){var e=r.constructor;switch(n){case yn:return x(r);case fn:case un:return new e(+r);case Tn:return tn(r,t);case hn:case vn:case An:case On:case mn:case wn:case In:case $n:case xn:return on(r,t);case cn:return new e;case gn:case bn:return new e(r);case ln:return an(r);case dn:return new e;case pn:return sn(r)}}function jn(r){return typeof r.constructor=="function"&&!z(r)?Ur(k(r)):{}}var Sn="[object Map]";function En(r){return Y(r)&&w(r)==Sn}var D=y&&y.isMap,Fn=D?J(D):En,Mn="[object Set]";function Bn(r){return Y(r)&&w(r)==Mn}var R=y&&y.isSet,Cn=R?J(R):Bn,_n=1,Ln=2,Un=4,tr="[object Arguments]",Nn="[object Array]",Gn="[object Boolean]",Kn="[object Date]",Dn="[object Error]",er="[object Function]",Rn="[object GeneratorFunction]",qn="[object Map]",Hn="[object Number]",ar="[object Object]",zn="[object RegExp]",Wn="[object Set]",Yn="[object String]",Jn="[object Symbol]",Qn="[object WeakMap]",Xn="[object ArrayBuffer]",Zn="[object DataView]",Vn="[object Float32Array]",kn="[object Float64Array]",rt="[object Int8Array]",nt="[object Int16Array]",tt="[object Int32Array]",et="[object Uint8Array]",at="[object Uint8ClampedArray]",it="[object Uint16Array]",st="[object Uint32Array]",f={};f[tr]=f[Nn]=f[Xn]=f[Zn]=f[Gn]=f[Kn]=f[Vn]=f[kn]=f[rt]=f[nt]=f[tt]=f[qn]=f[Hn]=f[ar]=f[zn]=f[Wn]=f[Yn]=f[Jn]=f[et]=f[at]=f[it]=f[st]=!0;f[Dn]=f[er]=f[Qn]=!1;function A(r,n,t,e,a,s){var i,o=n&_n,u=n&Ln,c=n&Un;if(i!==void 0)return i;if(!d(r))return r;var g=Q(r);if(g){if(i=nn(r),!o)return Nr(r,i)}else{var p=w(r),P=p==er||p==Rn;if(pr(r))return Jr(r,o);if(p==ar||p==tr||P&&!a){if(i=u||P?{}:jn(r),!o)return u?Zr(r,Wr(i,r)):Qr(r,zr(i,r))}else{if(!f[p])return a?r:{};i=Pn(r,p,o)}}s||(s=new yr);var j=s.get(r);if(j)return j;s.set(r,i),Cn(r)?r.forEach(function(l){i.add(A(l,n,t,l,r,s))}):Fn(r)&&r.forEach(function(l,b){i.set(b,A(l,n,t,b,r,s))});var sr=c?u?Vr:hr:u?v:m,S=g?void 0:sr(r);return Tr(S||r,function(l,b){S&&(b=l,l=r[b]),$(i,b,A(l,n,t,b,r,s))}),i}var ir=Object.prototype,ot=ir.hasOwnProperty,vt=H(function(r,n){r=Object(r);var t=-1,e=n.length,a=e>2?n[2]:void 0;for(a&&V(n[0],n[1],a)&&(e=1);++t<e;)for(var s=n[t],i=v(s),o=-1,u=i.length;++o<u;){var c=i[o],g=r[c];(g===void 0||O(g,ir[c])&&!ot.call(r,c))&&(r[c]=s[c])}return r});function At(r){var n=r==null?0:r.length;return n?r[n-1]:void 0}function ft(r){return function(n,t,e){var a=Object(n);if(!T(n)){var s=I(t);n=m(n),t=function(o){return s(a[o],o,a)}}var i=r(n,t,e);return i>-1?a[s?n[i]:i]:void 0}}var ut=Math.max;function ct(r,n,t){var e=r==null?0:r.length;if(!e)return-1;var a=t==null?0:Lr(t);return a<0&&(a=ut(e+a,0)),vr(r,I(n),a)}var Ot=ft(ct);function gt(r,n){var t=-1,e=T(r)?Array(r.length):[];return Ar(r,function(a,s,i){e[++t]=n(a,s,i)}),e}function mt(r,n){var t=Q(r)?Or:gt;return t(r,I(n))}var lt=Object.prototype,dt=lt.hasOwnProperty;function bt(r,n){return r!=null&&dt.call(r,n)}function wt(r,n){return r!=null&&mr(r,n,bt)}function pt(r,n,t,e){if(!d(r))return r;n=X(n,r);for(var a=-1,s=n.length,i=s-1,o=r;o!=null&&++a<s;){var u=wr(n[a]),c=t;if(u==="__proto__"||u==="constructor"||u==="prototype")return r;if(a!=i){var g=o[u];c=void 0,c===void 0&&(c=d(g)?g:q(n[a+1])?[]:{})}$(o,u,c),o=o[u]}return r}function It(r,n,t){for(var e=-1,a=n.length,s={};++e<a;){var i=n[e],o=Ir(r,i);t(o,i)&&pt(s,X(i,r),o)}return s}export{Z as a,A as b,h as c,Nr as d,Jr as e,ht as f,k as g,on as h,jn as i,Tt as j,v as k,gt as l,It as m,V as n,$ as o,mt as p,wt as q,Ot as r,At as s,_r as t,vt as u,Lr as v,Vr as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Lr=typeof global=="object"&&global&&global.Object===Object&&global,te=typeof self=="object"&&self&&self.Object===Object&&self,w=Lr||te||Function("return this")(),y=w.Symbol,Fr=Object.prototype,ne=Fr.hasOwnProperty,ae=Fr.toString,j=y?y.toStringTag:void 0;function ie(r){var e=ne.call(r,j),t=r[j];try{r[j]=void 0;var n=!0}catch{}var a=ae.call(r);return n&&(e?r[j]=t:delete r[j]),a}var se=Object.prototype,oe=se.toString;function fe(r){return oe.call(r)}var ue="[object Null]",ce="[object Undefined]",lr=y?y.toStringTag:void 0;function R(r){return r==null?r===void 0?ce:ue:lr&&lr in Object(r)?ie(r):fe(r)}function m(r){return r!=null&&typeof r=="object"}var le="[object Symbol]";function er(r){return typeof r=="symbol"||m(r)&&R(r)==le}function Dr(r,e){for(var t=-1,n=r==null?0:r.length,a=Array(n);++t<n;)a[t]=e(r[t],t,r);return a}var h=Array.isArray,pr=y?y.prototype:void 0,gr=pr?pr.toString:void 0;function Nr(r){if(typeof r=="string")return r;if(h(r))return Dr(r,Nr)+"";if(er(r))return gr?gr.call(r):"";var e=r+"";return e=="0"&&1/r==-1/0?"-0":e}function tr(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}function H(r){return r}var pe="[object AsyncFunction]",ge="[object Function]",he="[object GeneratorFunction]",de="[object Proxy]";function Gr(r){if(!tr(r))return!1;var e=R(r);return e==ge||e==he||e==pe||e==de}var W=w["__core-js_shared__"],hr=(function(){var r=/[^.]+$/.exec(W&&W.keys&&W.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function _e(r){return!!hr&&hr in r}var ye=Function.prototype,be=ye.toString;function x(r){if(r!=null){try{return be.call(r)}catch{}try{return r+""}catch{}}return""}var ve=/[\\^$.*+?()[\]{}|]/g,Te=/^\[object .+?Constructor\]$/,we=Function.prototype,Ae=Object.prototype,Oe=we.toString,Pe=Ae.hasOwnProperty,$e=RegExp("^"+Oe.call(Pe).replace(ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Se(r){if(!tr(r)||_e(r))return!1;var e=Gr(r)?$e:Te;return e.test(x(r))}function me(r,e){return r?.[e]}function I(r,e){var t=me(r,e);return Se(t)?t:void 0}var V=I(w,"WeakMap");function Ee(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}function xe(){}var Ie=800,Ce=16,Re=Date.now;function je(r){var e=0,t=0;return function(){var n=Re(),a=Ce-(n-t);if(t=n,a>0){if(++e>=Ie)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}function Me(r){return function(){return r}}var dr=(function(){try{var r=I(Object,"defineProperty");return r({},"",{}),r}catch{}})(),Le=dr?function(r,e){return dr(r,"toString",{configurable:!0,enumerable:!1,value:Me(e),writable:!0})}:H,Fe=je(Le);function De(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}function Ne(r,e,t,n){for(var a=r.length,i=t+-1;++i<a;)if(e(r[i],i,r))return i;return-1}function Ge(r){return r!==r}function Ue(r,e,t){for(var n=t-1,a=r.length;++n<a;)if(r[n]===e)return n;return-1}function ze(r,e,t){return e===e?Ue(r,e,t):Ne(r,Ge,t)}function He(r,e){var t=r==null?0:r.length;return!!t&&ze(r,e,0)>-1}var Be=9007199254740991,Ke=/^(?:0|[1-9]\d*)$/;function Ur(r,e){var t=typeof r;return e=e??Be,!!e&&(t=="number"||t!="symbol"&&Ke.test(r))&&r>-1&&r%1==0&&r<e}function zr(r,e){return r===e||r!==r&&e!==e}var _r=Math.max;function qe(r,e,t){return e=_r(e===void 0?r.length-1:e,0),function(){for(var n=arguments,a=-1,i=_r(n.length-e,0),s=Array(i);++a<i;)s[a]=n[e+a];a=-1;for(var o=Array(e+1);++a<e;)o[a]=n[a];return o[e]=t(s),Ee(r,this,o)}}function Na(r,e){return Fe(qe(r,e,H),r+"")}var Xe=9007199254740991;function nr(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Xe}function B(r){return r!=null&&nr(r.length)&&!Gr(r)}var Ze=Object.prototype;function Hr(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Ze;return r===t}function Ye(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var We="[object Arguments]";function yr(r){return m(r)&&R(r)==We}var Br=Object.prototype,Je=Br.hasOwnProperty,Qe=Br.propertyIsEnumerable,K=yr((function(){return arguments})())?yr:function(r){return m(r)&&Je.call(r,"callee")&&!Qe.call(r,"callee")};function Ve(){return!1}var Kr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,br=Kr&&typeof module=="object"&&module&&!module.nodeType&&module,ke=br&&br.exports===Kr,vr=ke?w.Buffer:void 0,rt=vr?vr.isBuffer:void 0,z=rt||Ve,et="[object Arguments]",tt="[object Array]",nt="[object Boolean]",at="[object Date]",it="[object Error]",st="[object Function]",ot="[object Map]",ft="[object Number]",ut="[object Object]",ct="[object RegExp]",lt="[object Set]",pt="[object String]",gt="[object WeakMap]",ht="[object ArrayBuffer]",dt="[object DataView]",_t="[object Float32Array]",yt="[object Float64Array]",bt="[object Int8Array]",vt="[object Int16Array]",Tt="[object Int32Array]",wt="[object Uint8Array]",At="[object Uint8ClampedArray]",Ot="[object Uint16Array]",Pt="[object Uint32Array]",c={};c[_t]=c[yt]=c[bt]=c[vt]=c[Tt]=c[wt]=c[At]=c[Ot]=c[Pt]=!0;c[et]=c[tt]=c[ht]=c[nt]=c[dt]=c[at]=c[it]=c[st]=c[ot]=c[ft]=c[ut]=c[ct]=c[lt]=c[pt]=c[gt]=!1;function $t(r){return m(r)&&nr(r.length)&&!!c[R(r)]}function St(r){return function(e){return r(e)}}var qr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,M=qr&&typeof module=="object"&&module&&!module.nodeType&&module,mt=M&&M.exports===qr,J=mt&&Lr.process,Tr=(function(){try{var r=M&&M.require&&M.require("util").types;return r||J&&J.binding&&J.binding("util")}catch{}})(),wr=Tr&&Tr.isTypedArray,ar=wr?St(wr):$t,Et=Object.prototype,xt=Et.hasOwnProperty;function It(r,e){var t=h(r),n=!t&&K(r),a=!t&&!n&&z(r),i=!t&&!n&&!a&&ar(r),s=t||n||a||i,o=s?Ye(r.length,String):[],f=o.length;for(var u in r)(e||xt.call(r,u))&&!(s&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Ur(u,f)))&&o.push(u);return o}function Ct(r,e){return function(t){return r(e(t))}}var Rt=Ct(Object.keys,Object),jt=Object.prototype,Mt=jt.hasOwnProperty;function Xr(r){if(!Hr(r))return Rt(r);var e=[];for(var t in Object(r))Mt.call(r,t)&&t!="constructor"&&e.push(t);return e}function q(r){return B(r)?It(r):Xr(r)}var Lt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ft=/^\w*$/;function ir(r,e){if(h(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||er(r)?!0:Ft.test(r)||!Lt.test(r)||e!=null&&r in Object(e)}var L=I(Object,"create");function Dt(){this.__data__=L?L(null):{},this.size=0}function Nt(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var Gt="__lodash_hash_undefined__",Ut=Object.prototype,zt=Ut.hasOwnProperty;function Ht(r){var e=this.__data__;if(L){var t=e[r];return t===Gt?void 0:t}return zt.call(e,r)?e[r]:void 0}var Bt=Object.prototype,Kt=Bt.hasOwnProperty;function qt(r){var e=this.__data__;return L?e[r]!==void 0:Kt.call(e,r)}var Xt="__lodash_hash_undefined__";function Zt(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=L&&e===void 0?Xt:e,this}function E(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}E.prototype.clear=Dt;E.prototype.delete=Nt;E.prototype.get=Ht;E.prototype.has=qt;E.prototype.set=Zt;function Yt(){this.__data__=[],this.size=0}function X(r,e){for(var t=r.length;t--;)if(zr(r[t][0],e))return t;return-1}var Wt=Array.prototype,Jt=Wt.splice;function Qt(r){var e=this.__data__,t=X(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():Jt.call(e,t,1),--this.size,!0}function Vt(r){var e=this.__data__,t=X(e,r);return t<0?void 0:e[t][1]}function kt(r){return X(this.__data__,r)>-1}function rn(r,e){var t=this.__data__,n=X(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}function A(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}A.prototype.clear=Yt;A.prototype.delete=Qt;A.prototype.get=Vt;A.prototype.has=kt;A.prototype.set=rn;var F=I(w,"Map");function en(){this.size=0,this.__data__={hash:new E,map:new(F||A),string:new E}}function tn(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}function Z(r,e){var t=r.__data__;return tn(e)?t[typeof e=="string"?"string":"hash"]:t.map}function nn(r){var e=Z(this,r).delete(r);return this.size-=e?1:0,e}function an(r){return Z(this,r).get(r)}function sn(r){return Z(this,r).has(r)}function on(r,e){var t=Z(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}function O(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}O.prototype.clear=en;O.prototype.delete=nn;O.prototype.get=an;O.prototype.has=sn;O.prototype.set=on;var fn="Expected a function";function sr(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(fn);var t=function(){var n=arguments,a=e?e.apply(this,n):n[0],i=t.cache;if(i.has(a))return i.get(a);var s=r.apply(this,n);return t.cache=i.set(a,s)||i,s};return t.cache=new(sr.Cache||O),t}sr.Cache=O;var un=500;function cn(r){var e=sr(r,function(n){return t.size===un&&t.clear(),n}),t=e.cache;return e}var ln=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pn=/\\(\\)?/g,gn=cn(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(ln,function(t,n,a,i){e.push(a?i.replace(pn,"$1"):n||t)}),e});function hn(r){return r==null?"":Nr(r)}function Zr(r,e){return h(r)?r:ir(r,e)?[r]:gn(hn(r))}function Y(r){if(typeof r=="string"||er(r))return r;var e=r+"";return e=="0"&&1/r==-1/0?"-0":e}function Yr(r,e){e=Zr(e,r);for(var t=0,n=e.length;r!=null&&t<n;)r=r[Y(e[t++])];return t&&t==n?r:void 0}function dn(r,e,t){var n=r==null?void 0:Yr(r,e);return n===void 0?t:n}function Wr(r,e){for(var t=-1,n=e.length,a=r.length;++t<n;)r[a+t]=e[t];return r}var Ar=y?y.isConcatSpreadable:void 0;function _n(r){return h(r)||K(r)||!!(Ar&&r&&r[Ar])}function Ga(r,e,t,n,a){var i=-1,s=r.length;for(t||(t=_n),a||(a=[]);++i<s;){var o=r[i];t(o)?Wr(a,o):n||(a[a.length]=o)}return a}function yn(r,e,t,n){var a=-1,i=r==null?0:r.length;for(n&&i&&(t=r[++a]);++a<i;)t=e(t,r[a],a,r);return t}function bn(){this.__data__=new A,this.size=0}function vn(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}function Tn(r){return this.__data__.get(r)}function wn(r){return this.__data__.has(r)}var An=200;function On(r,e){var t=this.__data__;if(t instanceof A){var n=t.__data__;if(!F||n.length<An-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new O(n)}return t.set(r,e),this.size=t.size,this}function T(r){var e=this.__data__=new A(r);this.size=e.size}T.prototype.clear=bn;T.prototype.delete=vn;T.prototype.get=Tn;T.prototype.has=wn;T.prototype.set=On;function Jr(r,e){for(var t=-1,n=r==null?0:r.length,a=0,i=[];++t<n;){var s=r[t];e(s,t,r)&&(i[a++]=s)}return i}function Pn(){return[]}var $n=Object.prototype,Sn=$n.propertyIsEnumerable,Or=Object.getOwnPropertySymbols,mn=Or?function(r){return r==null?[]:(r=Object(r),Jr(Or(r),function(e){return Sn.call(r,e)}))}:Pn;function En(r,e,t){var n=e(r);return h(r)?n:Wr(n,t(r))}function Pr(r){return En(r,q,mn)}var k=I(w,"DataView"),rr=I(w,"Promise"),C=I(w,"Set"),$r="[object Map]",xn="[object Object]",Sr="[object Promise]",mr="[object Set]",Er="[object WeakMap]",xr="[object DataView]",In=x(k),Cn=x(F),Rn=x(rr),jn=x(C),Mn=x(V),v=R;(k&&v(new k(new ArrayBuffer(1)))!=xr||F&&v(new F)!=$r||rr&&v(rr.resolve())!=Sr||C&&v(new C)!=mr||V&&v(new V)!=Er)&&(v=function(r){var e=R(r),t=e==xn?r.constructor:void 0,n=t?x(t):"";if(n)switch(n){case In:return xr;case Cn:return $r;case Rn:return Sr;case jn:return mr;case Mn:return Er}return e});var Ir=w.Uint8Array,Ln="__lodash_hash_undefined__";function Fn(r){return this.__data__.set(r,Ln),this}function Dn(r){return this.__data__.has(r)}function D(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new O;++e<t;)this.add(r[e])}D.prototype.add=D.prototype.push=Fn;D.prototype.has=Dn;function Nn(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}function Qr(r,e){return r.has(e)}var Gn=1,Un=2;function Vr(r,e,t,n,a,i){var s=t&Gn,o=r.length,f=e.length;if(o!=f&&!(s&&f>o))return!1;var u=i.get(r),g=i.get(e);if(u&&g)return u==e&&g==r;var l=-1,p=!0,b=t&Un?new D:void 0;for(i.set(r,e),i.set(e,r);++l<o;){var d=r[l],_=e[l];if(n)var P=s?n(_,d,l,e,r,i):n(d,_,l,r,e,i);if(P!==void 0){if(P)continue;p=!1;break}if(b){if(!Nn(e,function($,S){if(!Qr(b,S)&&(d===$||a(d,$,t,n,i)))return b.push(S)})){p=!1;break}}else if(!(d===_||a(d,_,t,n,i))){p=!1;break}}return i.delete(r),i.delete(e),p}function zn(r){var e=-1,t=Array(r.size);return r.forEach(function(n,a){t[++e]=[a,n]}),t}function or(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var Hn=1,Bn=2,Kn="[object Boolean]",qn="[object Date]",Xn="[object Error]",Zn="[object Map]",Yn="[object Number]",Wn="[object RegExp]",Jn="[object Set]",Qn="[object String]",Vn="[object Symbol]",kn="[object ArrayBuffer]",ra="[object DataView]",Cr=y?y.prototype:void 0,Q=Cr?Cr.valueOf:void 0;function ea(r,e,t,n,a,i,s){switch(t){case ra:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case kn:return!(r.byteLength!=e.byteLength||!i(new Ir(r),new Ir(e)));case Kn:case qn:case Yn:return zr(+r,+e);case Xn:return r.name==e.name&&r.message==e.message;case Wn:case Qn:return r==e+"";case Zn:var o=zn;case Jn:var f=n&Hn;if(o||(o=or),r.size!=e.size&&!f)return!1;var u=s.get(r);if(u)return u==e;n|=Bn,s.set(r,e);var g=Vr(o(r),o(e),n,a,i,s);return s.delete(r),g;case Vn:if(Q)return Q.call(r)==Q.call(e)}return!1}var ta=1,na=Object.prototype,aa=na.hasOwnProperty;function ia(r,e,t,n,a,i){var s=t&ta,o=Pr(r),f=o.length,u=Pr(e),g=u.length;if(f!=g&&!s)return!1;for(var l=f;l--;){var p=o[l];if(!(s?p in e:aa.call(e,p)))return!1}var b=i.get(r),d=i.get(e);if(b&&d)return b==e&&d==r;var _=!0;i.set(r,e),i.set(e,r);for(var P=s;++l<f;){p=o[l];var $=r[p],S=e[p];if(n)var cr=s?n(S,$,p,e,r,i):n($,S,p,r,e,i);if(!(cr===void 0?$===S||a($,S,t,n,i):cr)){_=!1;break}P||(P=p=="constructor")}if(_&&!P){var N=r.constructor,G=e.constructor;N!=G&&"constructor"in r&&"constructor"in e&&!(typeof N=="function"&&N instanceof N&&typeof G=="function"&&G instanceof G)&&(_=!1)}return i.delete(r),i.delete(e),_}var sa=1,Rr="[object Arguments]",jr="[object Array]",U="[object Object]",oa=Object.prototype,Mr=oa.hasOwnProperty;function fa(r,e,t,n,a,i){var s=h(r),o=h(e),f=s?jr:v(r),u=o?jr:v(e);f=f==Rr?U:f,u=u==Rr?U:u;var g=f==U,l=u==U,p=f==u;if(p&&z(r)){if(!z(e))return!1;s=!0,g=!1}if(p&&!g)return i||(i=new T),s||ar(r)?Vr(r,e,t,n,a,i):ea(r,e,f,t,n,a,i);if(!(t&sa)){var b=g&&Mr.call(r,"__wrapped__"),d=l&&Mr.call(e,"__wrapped__");if(b||d){var _=b?r.value():r,P=d?e.value():e;return i||(i=new T),a(_,P,t,n,i)}}return p?(i||(i=new T),ia(r,e,t,n,a,i)):!1}function fr(r,e,t,n,a){return r===e?!0:r==null||e==null||!m(r)&&!m(e)?r!==r&&e!==e:fa(r,e,t,n,fr,a)}var ua=1,ca=2;function la(r,e,t,n){var a=t.length,i=a;if(r==null)return!i;for(r=Object(r);a--;){var s=t[a];if(s[2]?s[1]!==r[s[0]]:!(s[0]in r))return!1}for(;++a<i;){s=t[a];var o=s[0],f=r[o],u=s[1];if(s[2]){if(f===void 0&&!(o in r))return!1}else{var g=new T,l;if(!(l===void 0?fr(u,f,ua|ca,n,g):l))return!1}}return!0}function kr(r){return r===r&&!tr(r)}function pa(r){for(var e=q(r),t=e.length;t--;){var n=e[t],a=r[n];e[t]=[n,a,kr(a)]}return e}function re(r,e){return function(t){return t==null?!1:t[r]===e&&(e!==void 0||r in Object(t))}}function ga(r){var e=pa(r);return e.length==1&&e[0][2]?re(e[0][0],e[0][1]):function(t){return t===r||la(t,r,e)}}function ha(r,e){return r!=null&&e in Object(r)}function da(r,e,t){e=Zr(e,r);for(var n=-1,a=e.length,i=!1;++n<a;){var s=Y(e[n]);if(!(i=r!=null&&t(r,s)))break;r=r[s]}return i||++n!=a?i:(a=r==null?0:r.length,!!a&&nr(a)&&Ur(s,a)&&(h(r)||K(r)))}function _a(r,e){return r!=null&&da(r,e,ha)}var ya=1,ba=2;function va(r,e){return ir(r)&&kr(e)?re(Y(r),e):function(t){var n=dn(t,r);return n===void 0&&n===e?_a(t,r):fr(e,n,ya|ba)}}function Ta(r){return function(e){return e?.[r]}}function wa(r){return function(e){return Yr(e,r)}}function Aa(r){return ir(r)?Ta(Y(r)):wa(r)}function ee(r){return typeof r=="function"?r:r==null?H:typeof r=="object"?h(r)?va(r[0],r[1]):ga(r):Aa(r)}function Oa(r){return function(e,t,n){for(var a=-1,i=Object(e),s=n(e),o=s.length;o--;){var f=s[++a];if(t(i[f],f,i)===!1)break}return e}}var Pa=Oa();function $a(r,e){return r&&Pa(r,e,q)}function Sa(r,e){return function(t,n){if(t==null)return t;if(!B(t))return r(t,n);for(var a=t.length,i=-1,s=Object(t);++i<a&&n(s[i],i,s)!==!1;);return t}}var ur=Sa($a);function Ua(r){return m(r)&&B(r)}function ma(r){return typeof r=="function"?r:H}function za(r,e){var t=h(r)?De:ur;return t(r,ma(e))}function Ea(r,e){var t=[];return ur(r,function(n,a,i){e(n,a,i)&&t.push(n)}),t}function Ha(r,e){var t=h(r)?Jr:Ea;return t(r,ee(e))}function xa(r,e){return Dr(e,function(t){return r[t]})}function Ba(r){return r==null?[]:xa(r,q(r))}var Ia="[object Map]",Ca="[object Set]",Ra=Object.prototype,ja=Ra.hasOwnProperty;function Ka(r){if(r==null)return!0;if(B(r)&&(h(r)||typeof r=="string"||typeof r.splice=="function"||z(r)||ar(r)||K(r)))return!r.length;var e=v(r);if(e==Ia||e==Ca)return!r.size;if(Hr(r))return!Xr(r).length;for(var t in r)if(ja.call(r,t))return!1;return!0}function qa(r){return r===void 0}function Ma(r,e,t,n,a){return a(r,function(i,s,o){t=n?(n=!1,i):e(t,i,s,o)}),t}function Xa(r,e,t){var n=h(r)?yn:Ma,a=arguments.length<3;return n(r,ee(e),t,a,ur)}var La=1/0,Fa=C&&1/or(new C([,-0]))[1]==La?function(r){return new C(r)}:xe,Da=200;function Za(r,e,t){var n=-1,a=He,i=r.length,s=!0,o=[],f=o;if(i>=Da){var u=Fa(r);if(u)return or(u);s=!1,a=Qr,f=new D}else f=o;r:for(;++n<i;){var g=r[n],l=g;if(g=g!==0?g:0,s&&l===l){for(var p=f.length;p--;)if(f[p]===l)continue r;o.push(g)}else a(f,l,t)||(f!==o&&f.push(l),o.push(g))}return o}export{$a as $,En as A,m as B,v as C,St as D,Tr as E,z as F,T as G,De as H,h as I,Pr as J,ee as K,Ne as L,ur as M,Dr as N,da as O,Zr as P,Y as Q,Yr as R,y as S,Fe as T,Ir as U,qe as V,R as W,ar as X,K as Y,Pa as Z,ma as _,Za as a,H as a0,_a as a1,hn as a2,D as a3,He as a4,Qr as a5,ze as a6,Jr as a7,Ea as a8,Nn as a9,xe as aa,Na as b,Ga as c,Me as d,Gr as e,Ha as f,za as g,qa as h,Ua as i,Ka as j,q as k,er as l,tr as m,dr as n,zr as o,B as p,Ur as q,Xa as r,Hr as s,It as t,Ct as u,Ba as v,w,mn as x,Pn as y,Wr as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ao as r,ap as n}from"./index-DqFyJdiT.js";const t=(a,o)=>r.lang.round(n.parse(a)[o]);export{t as c};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{s as ne,a as an,c as on,b as dn,f as pe,e as k,i as sn}from"./chunk-3FUC2YCW-kMKg81Pk.js";import{_ as y,c as un,l as m,bL as fn,bM as cn,aE as ln,aC as ve,an as ge,al as hn,az as pn,bd as vn}from"./index-DqFyJdiT.js";import{G as x}from"./graph-C2De1HlQ.js";import{T as gn,V as wn,B as bn,W as mn,o as yn,F as En,X as Ln,I as X,i as xn,Y as we,m as _e,e as Nn,Z as Me,G as kn,_ as Ie,$ as De,K as re,l as J,a0 as te,N as Y,R as On,D as Pn,a1 as Sn,b as Cn,c as Rn,a2 as _n,g as l,d as Mn,h as L,f as D,v as S,r as A}from"./_baseUniq-CHc60b6y.js";import{f as R,g as In,b as Dn,a as Te,c as Tn,k as ae,d as Xn,e as Bn,h as jn,i as An,j as Fn,l as Gn,m as Yn,n as U,t as V,o as Vn,p as E,q as Xe,r as ie,s as B,u as qn}from"./_basePickBy-vr4256UX.js";import"./vendor-editor-core-D-5q2tVX.js";import"./vendor-editor-languages-B6WRt0aC.js";function Wn(e){return gn(wn(e,void 0,R),e+"")}var $n="[object Object]",Hn=Function.prototype,zn=Object.prototype,Be=Hn.toString,Jn=zn.hasOwnProperty,Un=Be.call(Object);function Zn(e){if(!bn(e)||mn(e)!=$n)return!1;var n=In(e);if(n===null)return!0;var r=Jn.call(n,"constructor")&&n.constructor;return typeof r=="function"&&r instanceof r&&Be.call(r)==Un}var Kn=1,Qn=4;function er(e){return Dn(e,Kn|Qn)}function Z(e,n,r){(r!==void 0&&!yn(e[n],r)||r===void 0&&!(n in e))&&Te(e,n,r)}function K(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}function nr(e){return Tn(e,ae(e))}function rr(e,n,r,t,a,o,i){var d=K(e,r),s=K(n,r),u=i.get(s);if(u){Z(e,r,u);return}var f=o?o(d,s,r+"",e,n,i):void 0,c=f===void 0;if(c){var h=X(s),p=!h&&En(s),g=!h&&!p&&Ln(s);f=s,h||p||g?X(d)?f=d:xn(d)?f=Xn(d):p?(c=!1,f=Bn(s,!0)):g?(c=!1,f=jn(s,!0)):f=[]:Zn(s)||we(s)?(f=d,we(d)?f=nr(d):(!_e(d)||Nn(d))&&(f=An(s))):c=!1}c&&(i.set(s,f),a(f,s,t,o,i),i.delete(s)),Z(e,r,f)}function je(e,n,r,t,a){e!==n&&Me(n,function(o,i){if(a||(a=new kn),_e(o))rr(e,n,i,r,je,t,a);else{var d=t?t(K(e,i),o,i+"",e,n,a):void 0;d===void 0&&(d=o),Z(e,i,d)}},ae)}function tr(e,n){return e==null?e:Me(e,Ie(n),ae)}function ar(e,n){return e&&De(e,Ie(n))}function ir(e,n){return e>n}function Ae(e,n){return e<n}function F(e,n){var r={};return n=re(n),De(e,function(t,a,o){Te(r,a,n(t,a,o))}),r}function oe(e,n,r){for(var t=-1,a=e.length;++t<a;){var o=e[t],i=n(o);if(i!=null&&(d===void 0?i===i&&!J(i):r(i,d)))var d=i,s=o}return s}function O(e){return e&&e.length?oe(e,te,ir):void 0}var Q=Fn(function(e,n,r){je(e,n,r)});function M(e){return e&&e.length?oe(e,te,Ae):void 0}function de(e,n){return e&&e.length?oe(e,re(n),Ae):void 0}function or(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}function dr(e,n){if(e!==n){var r=e!==void 0,t=e===null,a=e===e,o=J(e),i=n!==void 0,d=n===null,s=n===n,u=J(n);if(!d&&!u&&!o&&e>n||o&&i&&s&&!d&&!u||t&&i&&s||!r&&s||!a)return 1;if(!t&&!o&&!u&&e<n||u&&r&&a&&!t&&!o||d&&r&&a||!i&&a||!s)return-1}return 0}function sr(e,n,r){for(var t=-1,a=e.criteria,o=n.criteria,i=a.length,d=r.length;++t<i;){var s=dr(a[t],o[t]);if(s){if(t>=d)return s;var u=r[t];return s*(u=="desc"?-1:1)}}return e.index-n.index}function ur(e,n,r){n.length?n=Y(n,function(o){return X(o)?function(i){return On(i,o.length===1?o[0]:o)}:o}):n=[te];var t=-1;n=Y(n,Pn(re));var a=Gn(e,function(o,i,d){var s=Y(n,function(u){return u(o)});return{criteria:s,index:++t,value:o}});return or(a,function(o,i){return sr(o,i,r)})}function fr(e,n){return Yn(e,n,function(r,t){return Sn(e,t)})}var j=Wn(function(e,n){return e==null?{}:fr(e,n)}),cr=Math.ceil,lr=Math.max;function hr(e,n,r,t){for(var a=-1,o=lr(cr((n-e)/(r||1)),0),i=Array(o);o--;)i[++a]=e,e+=r;return i}function pr(e){return function(n,r,t){return t&&typeof t!="number"&&U(n,r,t)&&(r=t=void 0),n=V(n),r===void 0?(r=n,n=0):r=V(r),t=t===void 0?n<r?1:-1:V(t),hr(n,r,t)}}var C=pr(),T=Cn(function(e,n){if(e==null)return[];var r=n.length;return r>1&&U(e,n[0],n[1])?n=[]:r>2&&U(n[0],n[1],n[2])&&(n=[n[0]]),ur(e,Rn(n),[])}),vr=0;function se(e){var n=++vr;return _n(e)+n}function gr(e,n,r){for(var t=-1,a=e.length,o=n.length,i={};++t<a;){var d=t<o?n[t]:void 0;r(i,e[t],d)}return i}function wr(e,n){return gr(e||[],n||[],Vn)}class br{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return be(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&be(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,mr)),t=t._prev;return"["+n.join(", ")+"]"}}function be(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function mr(e,n){if(e!=="_next"&&e!=="_prev")return n}var yr=Mn(1);function Er(e,n){if(e.nodeCount()<=1)return[];var r=xr(e,n||yr),t=Lr(r.graph,r.buckets,r.zeroIdx);return R(E(t,function(a){return e.outEdges(a.v,a.w)}))}function Lr(e,n,r){for(var t=[],a=n[n.length-1],o=n[0],i;e.nodeCount();){for(;i=o.dequeue();)q(e,n,r,i);for(;i=a.dequeue();)q(e,n,r,i);if(e.nodeCount()){for(var d=n.length-2;d>0;--d)if(i=n[d].dequeue(),i){t=t.concat(q(e,n,r,i,!0));break}}}return t}function q(e,n,r,t,a){var o=a?[]:void 0;return l(e.inEdges(t.v),function(i){var d=e.edge(i),s=e.node(i.v);a&&o.push({v:i.v,w:i.w}),s.out-=d,ee(n,r,s)}),l(e.outEdges(t.v),function(i){var d=e.edge(i),s=i.w,u=e.node(s);u.in-=d,ee(n,r,u)}),e.removeNode(t.v),o}function xr(e,n){var r=new x,t=0,a=0;l(e.nodes(),function(d){r.setNode(d,{v:d,in:0,out:0})}),l(e.edges(),function(d){var s=r.edge(d.v,d.w)||0,u=n(d),f=s+u;r.setEdge(d.v,d.w,f),a=Math.max(a,r.node(d.v).out+=u),t=Math.max(t,r.node(d.w).in+=u)});var o=C(a+t+3).map(function(){return new br}),i=t+1;return l(r.nodes(),function(d){ee(o,i,r.node(d))}),{graph:r,buckets:o,zeroIdx:i}}function ee(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function Nr(e){var n=e.graph().acyclicer==="greedy"?Er(e,r(e)):kr(e);l(n,function(t){var a=e.edge(t);e.removeEdge(t),a.forwardName=t.name,a.reversed=!0,e.setEdge(t.w,t.v,a,se("rev"))});function r(t){return function(a){return t.edge(a).weight}}}function kr(e){var n=[],r={},t={};function a(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,l(e.outEdges(o),function(i){Object.prototype.hasOwnProperty.call(r,i.w)?n.push(i):a(i.w)}),delete r[o])}return l(e.nodes(),a),n}function Or(e){l(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function _(e,n,r,t){var a;do a=se(t);while(e.hasNode(a));return r.dummy=n,e.setNode(a,r),a}function Pr(e){var n=new x().setGraph(e.graph());return l(e.nodes(),function(r){n.setNode(r,e.node(r))}),l(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},a=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+a.weight,minlen:Math.max(t.minlen,a.minlen)})}),n}function Fe(e){var n=new x({multigraph:e.isMultigraph()}).setGraph(e.graph());return l(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),l(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function me(e,n){var r=e.x,t=e.y,a=n.x-r,o=n.y-t,i=e.width/2,d=e.height/2;if(!a&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var s,u;return Math.abs(o)*i>Math.abs(a)*d?(o<0&&(d=-d),s=d*a/o,u=d):(a<0&&(i=-i),s=i,u=i*o/a),{x:r+s,y:t+u}}function G(e){var n=E(C(Ge(e)+1),function(){return[]});return l(e.nodes(),function(r){var t=e.node(r),a=t.rank;L(a)||(n[a][t.order]=r)}),n}function Sr(e){var n=M(E(e.nodes(),function(r){return e.node(r).rank}));l(e.nodes(),function(r){var t=e.node(r);Xe(t,"rank")&&(t.rank-=n)})}function Cr(e){var n=M(E(e.nodes(),function(o){return e.node(o).rank})),r=[];l(e.nodes(),function(o){var i=e.node(o).rank-n;r[i]||(r[i]=[]),r[i].push(o)});var t=0,a=e.graph().nodeRankFactor;l(r,function(o,i){L(o)&&i%a!==0?--t:t&&l(o,function(d){e.node(d).rank+=t})})}function ye(e,n,r,t){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=t),_(e,"border",a,n)}function Ge(e){return O(E(e.nodes(),function(n){var r=e.node(n).rank;if(!L(r))return r}))}function Rr(e,n){var r={lhs:[],rhs:[]};return l(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function _r(e,n){return n()}function Mr(e){function n(r){var t=e.children(r),a=e.node(r);if(t.length&&l(t,n),Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var o=a.minRank,i=a.maxRank+1;o<i;++o)Ee(e,"borderLeft","_bl",r,a,o),Ee(e,"borderRight","_br",r,a,o)}}l(e.children(),n)}function Ee(e,n,r,t,a,o){var i={width:0,height:0,rank:o,borderType:n},d=a[n][o-1],s=_(e,"border",i,r);a[n][o]=s,e.setParent(s,t),d&&e.setEdge(d,s,{weight:1})}function Ir(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&Ye(e)}function Dr(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&Tr(e),(n==="lr"||n==="rl")&&(Xr(e),Ye(e))}function Ye(e){l(e.nodes(),function(n){Le(e.node(n))}),l(e.edges(),function(n){Le(e.edge(n))})}function Le(e){var n=e.width;e.width=e.height,e.height=n}function Tr(e){l(e.nodes(),function(n){W(e.node(n))}),l(e.edges(),function(n){var r=e.edge(n);l(r.points,W),Object.prototype.hasOwnProperty.call(r,"y")&&W(r)})}function W(e){e.y=-e.y}function Xr(e){l(e.nodes(),function(n){$(e.node(n))}),l(e.edges(),function(n){var r=e.edge(n);l(r.points,$),Object.prototype.hasOwnProperty.call(r,"x")&&$(r)})}function $(e){var n=e.x;e.x=e.y,e.y=n}function Br(e){e.graph().dummyChains=[],l(e.edges(),function(n){jr(e,n)})}function jr(e,n){var r=n.v,t=e.node(r).rank,a=n.w,o=e.node(a).rank,i=n.name,d=e.edge(n),s=d.labelRank;if(o!==t+1){e.removeEdge(n);var u=void 0,f,c;for(c=0,++t;t<o;++c,++t)d.points=[],u={width:0,height:0,edgeLabel:d,edgeObj:n,rank:t},f=_(e,"edge",u,"_d"),t===s&&(u.width=d.width,u.height=d.height,u.dummy="edge-label",u.labelpos=d.labelpos),e.setEdge(r,f,{weight:d.weight},i),c===0&&e.graph().dummyChains.push(f),r=f;e.setEdge(r,a,{weight:d.weight},i)}}function Ar(e){l(e.graph().dummyChains,function(n){var r=e.node(n),t=r.edgeLabel,a;for(e.setEdge(r.edgeObj,t);r.dummy;)a=e.successors(n)[0],e.removeNode(n),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),n=a,r=e.node(n)})}function ue(e){var n={};function r(t){var a=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return a.rank;n[t]=!0;var o=M(E(e.outEdges(t),function(i){return r(i.w)-e.edge(i).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),a.rank=o}l(e.sources(),r)}function I(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function Ve(e){var n=new x({directed:!1}),r=e.nodes()[0],t=e.nodeCount();n.setNode(r,{});for(var a,o;Fr(n,e)<t;)a=Gr(n,e),o=n.hasNode(a.v)?I(e,a):-I(e,a),Yr(n,e,o);return n}function Fr(e,n){function r(t){l(n.nodeEdges(t),function(a){var o=a.v,i=t===o?a.w:o;!e.hasNode(i)&&!I(n,a)&&(e.setNode(i,{}),e.setEdge(t,i,{}),r(i))})}return l(e.nodes(),r),e.nodeCount()}function Gr(e,n){return de(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return I(n,r)})}function Yr(e,n,r){l(e.nodes(),function(t){n.node(t).rank+=r})}function Vr(){}Vr.prototype=new Error;function qe(e,n,r){X(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],o={};return l(n,function(i){if(!e.hasNode(i))throw new Error("Graph does not have node: "+i);We(e,i,r==="post",o,t,a)}),a}function We(e,n,r,t,a,o){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||o.push(n),l(a(n),function(i){We(e,i,r,t,a,o)}),r&&o.push(n))}function qr(e,n){return qe(e,n,"post")}function Wr(e,n){return qe(e,n,"pre")}P.initLowLimValues=ce;P.initCutValues=fe;P.calcCutValue=$e;P.leaveEdge=ze;P.enterEdge=Je;P.exchangeEdges=Ue;function P(e){e=Pr(e),ue(e);var n=Ve(e);ce(n),fe(n,e);for(var r,t;r=ze(n);)t=Je(n,e,r),Ue(n,e,r,t)}function fe(e,n){var r=qr(e,e.nodes());r=r.slice(0,r.length-1),l(r,function(t){$r(e,n,t)})}function $r(e,n,r){var t=e.node(r),a=t.parent;e.edge(r,a).cutvalue=$e(e,n,r)}function $e(e,n,r){var t=e.node(r),a=t.parent,o=!0,i=n.edge(r,a),d=0;return i||(o=!1,i=n.edge(a,r)),d=i.weight,l(n.nodeEdges(r),function(s){var u=s.v===r,f=u?s.w:s.v;if(f!==a){var c=u===o,h=n.edge(s).weight;if(d+=c?h:-h,zr(e,r,f)){var p=e.edge(r,f).cutvalue;d+=c?-p:p}}}),d}function ce(e,n){arguments.length<2&&(n=e.nodes()[0]),He(e,{},1,n)}function He(e,n,r,t,a){var o=r,i=e.node(t);return n[t]=!0,l(e.neighbors(t),function(d){Object.prototype.hasOwnProperty.call(n,d)||(r=He(e,n,r,d,t))}),i.low=o,i.lim=r++,a?i.parent=a:delete i.parent,r}function ze(e){return ie(e.edges(),function(n){return e.edge(n).cutvalue<0})}function Je(e,n,r){var t=r.v,a=r.w;n.hasEdge(t,a)||(t=r.w,a=r.v);var o=e.node(t),i=e.node(a),d=o,s=!1;o.lim>i.lim&&(d=i,s=!0);var u=D(n.edges(),function(f){return s===xe(e,e.node(f.v),d)&&s!==xe(e,e.node(f.w),d)});return de(u,function(f){return I(n,f)})}function Ue(e,n,r,t){var a=r.v,o=r.w;e.removeEdge(a,o),e.setEdge(t.v,t.w,{}),ce(e),fe(e,n),Hr(e,n)}function Hr(e,n){var r=ie(e.nodes(),function(a){return!n.node(a).parent}),t=Wr(e,r);t=t.slice(1),l(t,function(a){var o=e.node(a).parent,i=n.edge(a,o),d=!1;i||(i=n.edge(o,a),d=!0),n.node(a).rank=n.node(o).rank+(d?i.minlen:-i.minlen)})}function zr(e,n,r){return e.hasEdge(n,r)}function xe(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function Jr(e){switch(e.graph().ranker){case"network-simplex":Ne(e);break;case"tight-tree":Zr(e);break;case"longest-path":Ur(e);break;default:Ne(e)}}var Ur=ue;function Zr(e){ue(e),Ve(e)}function Ne(e){P(e)}function Kr(e){var n=_(e,"root",{},"_root"),r=Qr(e),t=O(S(r))-1,a=2*t+1;e.graph().nestingRoot=n,l(e.edges(),function(i){e.edge(i).minlen*=a});var o=et(e)+1;l(e.children(),function(i){Ze(e,n,a,o,t,r,i)}),e.graph().nodeRankFactor=a}function Ze(e,n,r,t,a,o,i){var d=e.children(i);if(!d.length){i!==n&&e.setEdge(n,i,{weight:0,minlen:r});return}var s=ye(e,"_bt"),u=ye(e,"_bb"),f=e.node(i);e.setParent(s,i),f.borderTop=s,e.setParent(u,i),f.borderBottom=u,l(d,function(c){Ze(e,n,r,t,a,o,c);var h=e.node(c),p=h.borderTop?h.borderTop:c,g=h.borderBottom?h.borderBottom:c,w=h.borderTop?t:2*t,v=p!==g?1:a-o[i]+1;e.setEdge(s,p,{weight:w,minlen:v,nestingEdge:!0}),e.setEdge(g,u,{weight:w,minlen:v,nestingEdge:!0})}),e.parent(i)||e.setEdge(n,s,{weight:0,minlen:a+o[i]})}function Qr(e){var n={};function r(t,a){var o=e.children(t);o&&o.length&&l(o,function(i){r(i,a+1)}),n[t]=a}return l(e.children(),function(t){r(t,1)}),n}function et(e){return A(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function nt(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,l(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function rt(e,n,r){var t={},a;l(r,function(o){for(var i=e.parent(o),d,s;i;){if(d=e.parent(i),d?(s=t[d],t[d]=i):(s=a,a=i),s&&s!==i){n.setEdge(s,i);return}i=d}})}function tt(e,n,r){var t=at(e),a=new x({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return l(e.nodes(),function(o){var i=e.node(o),d=e.parent(o);(i.rank===n||i.minRank<=n&&n<=i.maxRank)&&(a.setNode(o),a.setParent(o,d||t),l(e[r](o),function(s){var u=s.v===o?s.w:s.v,f=a.edge(u,o),c=L(f)?0:f.weight;a.setEdge(u,o,{weight:e.edge(s).weight+c})}),Object.prototype.hasOwnProperty.call(i,"minRank")&&a.setNode(o,{borderLeft:i.borderLeft[n],borderRight:i.borderRight[n]}))}),a}function at(e){for(var n;e.hasNode(n=se("_root")););return n}function it(e,n){for(var r=0,t=1;t<n.length;++t)r+=ot(e,n[t-1],n[t]);return r}function ot(e,n,r){for(var t=wr(r,E(r,function(u,f){return f})),a=R(E(n,function(u){return T(E(e.outEdges(u),function(f){return{pos:t[f.w],weight:e.edge(f).weight}}),"pos")})),o=1;o<r.length;)o<<=1;var i=2*o-1;o-=1;var d=E(new Array(i),function(){return 0}),s=0;return l(a.forEach(function(u){var f=u.pos+o;d[f]+=u.weight;for(var c=0;f>0;)f%2&&(c+=d[f+1]),f=f-1>>1,d[f]+=u.weight;s+=u.weight*c})),s}function dt(e){var n={},r=D(e.nodes(),function(d){return!e.children(d).length}),t=O(E(r,function(d){return e.node(d).rank})),a=E(C(t+1),function(){return[]});function o(d){if(!Xe(n,d)){n[d]=!0;var s=e.node(d);a[s.rank].push(d),l(e.successors(d),o)}}var i=T(r,function(d){return e.node(d).rank});return l(i,o),a}function st(e,n){return E(n,function(r){var t=e.inEdges(r);if(t.length){var a=A(t,function(o,i){var d=e.edge(i),s=e.node(i.v);return{sum:o.sum+d.weight*s.order,weight:o.weight+d.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}function ut(e,n){var r={};l(e,function(a,o){var i=r[a.v]={indegree:0,in:[],out:[],vs:[a.v],i:o};L(a.barycenter)||(i.barycenter=a.barycenter,i.weight=a.weight)}),l(n.edges(),function(a){var o=r[a.v],i=r[a.w];!L(o)&&!L(i)&&(i.indegree++,o.out.push(r[a.w]))});var t=D(r,function(a){return!a.indegree});return ft(t)}function ft(e){var n=[];function r(o){return function(i){i.merged||(L(i.barycenter)||L(o.barycenter)||i.barycenter>=o.barycenter)&&ct(o,i)}}function t(o){return function(i){i.in.push(o),--i.indegree===0&&e.push(i)}}for(;e.length;){var a=e.pop();n.push(a),l(a.in.reverse(),r(a)),l(a.out,t(a))}return E(D(n,function(o){return!o.merged}),function(o){return j(o,["vs","i","barycenter","weight"])})}function ct(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function lt(e,n){var r=Rr(e,function(f){return Object.prototype.hasOwnProperty.call(f,"barycenter")}),t=r.lhs,a=T(r.rhs,function(f){return-f.i}),o=[],i=0,d=0,s=0;t.sort(ht(!!n)),s=ke(o,a,s),l(t,function(f){s+=f.vs.length,o.push(f.vs),i+=f.barycenter*f.weight,d+=f.weight,s=ke(o,a,s)});var u={vs:R(o)};return d&&(u.barycenter=i/d,u.weight=d),u}function ke(e,n,r){for(var t;n.length&&(t=B(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function ht(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function Ke(e,n,r,t){var a=e.children(n),o=e.node(n),i=o?o.borderLeft:void 0,d=o?o.borderRight:void 0,s={};i&&(a=D(a,function(g){return g!==i&&g!==d}));var u=st(e,a);l(u,function(g){if(e.children(g.v).length){var w=Ke(e,g.v,r,t);s[g.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&vt(g,w)}});var f=ut(u,r);pt(f,s);var c=lt(f,t);if(i&&(c.vs=R([i,c.vs,d]),e.predecessors(i).length)){var h=e.node(e.predecessors(i)[0]),p=e.node(e.predecessors(d)[0]);Object.prototype.hasOwnProperty.call(c,"barycenter")||(c.barycenter=0,c.weight=0),c.barycenter=(c.barycenter*c.weight+h.order+p.order)/(c.weight+2),c.weight+=2}return c}function pt(e,n){l(e,function(r){r.vs=R(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function vt(e,n){L(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function gt(e){var n=Ge(e),r=Oe(e,C(1,n+1),"inEdges"),t=Oe(e,C(n-1,-1,-1),"outEdges"),a=dt(e);Pe(e,a);for(var o=Number.POSITIVE_INFINITY,i,d=0,s=0;s<4;++d,++s){wt(d%2?r:t,d%4>=2),a=G(e);var u=it(e,a);u<o&&(s=0,i=er(a),o=u)}Pe(e,i)}function Oe(e,n,r){return E(n,function(t){return tt(e,t,r)})}function wt(e,n){var r=new x;l(e,function(t){var a=t.graph().root,o=Ke(t,a,r,n);l(o.vs,function(i,d){t.node(i).order=d}),rt(t,r,o.vs)})}function Pe(e,n){l(n,function(r){l(r,function(t,a){e.node(t).order=a})})}function bt(e){var n=yt(e);l(e.graph().dummyChains,function(r){for(var t=e.node(r),a=t.edgeObj,o=mt(e,n,a.v,a.w),i=o.path,d=o.lca,s=0,u=i[s],f=!0;r!==a.w;){if(t=e.node(r),f){for(;(u=i[s])!==d&&e.node(u).maxRank<t.rank;)s++;u===d&&(f=!1)}if(!f){for(;s<i.length-1&&e.node(u=i[s+1]).minRank<=t.rank;)s++;u=i[s]}e.setParent(r,u),r=e.successors(r)[0]}})}function mt(e,n,r,t){var a=[],o=[],i=Math.min(n[r].low,n[t].low),d=Math.max(n[r].lim,n[t].lim),s,u;s=r;do s=e.parent(s),a.push(s);while(s&&(n[s].low>i||d>n[s].lim));for(u=s,s=t;(s=e.parent(s))!==u;)o.push(s);return{path:a.concat(o.reverse()),lca:u}}function yt(e){var n={},r=0;function t(a){var o=r;l(e.children(a),t),n[a]={low:o,lim:r++}}return l(e.children(),t),n}function Et(e,n){var r={};function t(a,o){var i=0,d=0,s=a.length,u=B(o);return l(o,function(f,c){var h=xt(e,f),p=h?e.node(h).order:s;(h||f===u)&&(l(o.slice(d,c+1),function(g){l(e.predecessors(g),function(w){var v=e.node(w),b=v.order;(b<i||p<b)&&!(v.dummy&&e.node(g).dummy)&&Qe(r,w,g)})}),d=c+1,i=p)}),o}return A(n,t),r}function Lt(e,n){var r={};function t(o,i,d,s,u){var f;l(C(i,d),function(c){f=o[c],e.node(f).dummy&&l(e.predecessors(f),function(h){var p=e.node(h);p.dummy&&(p.order<s||p.order>u)&&Qe(r,h,f)})})}function a(o,i){var d=-1,s,u=0;return l(i,function(f,c){if(e.node(f).dummy==="border"){var h=e.predecessors(f);h.length&&(s=e.node(h[0]).order,t(i,u,c,d,s),u=c,d=s)}t(i,u,i.length,s,o.length)}),i}return A(n,a),r}function xt(e,n){if(e.node(n).dummy)return ie(e.predecessors(n),function(r){return e.node(r).dummy})}function Qe(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var a=e[n];Object.defineProperty(a,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Nt(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function kt(e,n,r,t){var a={},o={},i={};return l(n,function(d){l(d,function(s,u){a[s]=s,o[s]=s,i[s]=u})}),l(n,function(d){var s=-1;l(d,function(u){var f=t(u);if(f.length){f=T(f,function(w){return i[w]});for(var c=(f.length-1)/2,h=Math.floor(c),p=Math.ceil(c);h<=p;++h){var g=f[h];o[u]===u&&s<i[g]&&!Nt(r,u,g)&&(o[g]=u,o[u]=a[u]=a[g],s=i[g])}}})}),{root:a,align:o}}function Ot(e,n,r,t,a){var o={},i=Pt(e,n,r,a),d=a?"borderLeft":"borderRight";function s(c,h){for(var p=i.nodes(),g=p.pop(),w={};g;)w[g]?c(g):(w[g]=!0,p.push(g),p=p.concat(h(g))),g=p.pop()}function u(c){o[c]=i.inEdges(c).reduce(function(h,p){return Math.max(h,o[p.v]+i.edge(p))},0)}function f(c){var h=i.outEdges(c).reduce(function(g,w){return Math.min(g,o[w.w]-i.edge(w))},Number.POSITIVE_INFINITY),p=e.node(c);h!==Number.POSITIVE_INFINITY&&p.borderType!==d&&(o[c]=Math.max(o[c],h))}return s(u,i.predecessors.bind(i)),s(f,i.successors.bind(i)),l(t,function(c){o[c]=o[r[c]]}),o}function Pt(e,n,r,t){var a=new x,o=e.graph(),i=Mt(o.nodesep,o.edgesep,t);return l(n,function(d){var s;l(d,function(u){var f=r[u];if(a.setNode(f),s){var c=r[s],h=a.edge(c,f);a.setEdge(c,f,Math.max(i(e,u,s),h||0))}s=u})}),a}function St(e,n){return de(S(n),function(r){var t=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return tr(r,function(o,i){var d=It(e,i)/2;t=Math.max(o+d,t),a=Math.min(o-d,a)}),t-a})}function Ct(e,n){var r=S(n),t=M(r),a=O(r);l(["u","d"],function(o){l(["l","r"],function(i){var d=o+i,s=e[d],u;if(s!==n){var f=S(s);u=i==="l"?t-M(f):a-O(f),u&&(e[d]=F(s,function(c){return c+u}))}})})}function Rt(e,n){return F(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var a=T(E(e,t));return(a[1]+a[2])/2})}function _t(e){var n=G(e),r=Q(Et(e,n),Lt(e,n)),t={},a;l(["u","d"],function(i){a=i==="u"?n:S(n).reverse(),l(["l","r"],function(d){d==="r"&&(a=E(a,function(c){return S(c).reverse()}));var s=(i==="u"?e.predecessors:e.successors).bind(e),u=kt(e,a,r,s),f=Ot(e,a,u.root,u.align,d==="r");d==="r"&&(f=F(f,function(c){return-c})),t[i+d]=f})});var o=St(e,t);return Ct(t,o),Rt(t,e.graph().align)}function Mt(e,n,r){return function(t,a,o){var i=t.node(a),d=t.node(o),s=0,u;if(s+=i.width/2,Object.prototype.hasOwnProperty.call(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":u=-i.width/2;break;case"r":u=i.width/2;break}if(u&&(s+=r?u:-u),u=0,s+=(i.dummy?n:e)/2,s+=(d.dummy?n:e)/2,s+=d.width/2,Object.prototype.hasOwnProperty.call(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":u=d.width/2;break;case"r":u=-d.width/2;break}return u&&(s+=r?u:-u),u=0,s}}function It(e,n){return e.node(n).width}function Dt(e){e=Fe(e),Tt(e),ar(_t(e),function(n,r){e.node(r).x=n})}function Tt(e){var n=G(e),r=e.graph().ranksep,t=0;l(n,function(a){var o=O(E(a,function(i){return e.node(i).height}));l(a,function(i){e.node(i).y=t+o/2}),t+=o+r})}function Xt(e,n){var r=_r;r("layout",()=>{var t=r(" buildLayoutGraph",()=>Ht(e));r(" runLayout",()=>Bt(t,r)),r(" updateInputGraph",()=>jt(e,t))})}function Bt(e,n){n(" makeSpaceForEdgeLabels",()=>zt(e)),n(" removeSelfEdges",()=>ta(e)),n(" acyclic",()=>Nr(e)),n(" nestingGraph.run",()=>Kr(e)),n(" rank",()=>Jr(Fe(e))),n(" injectEdgeLabelProxies",()=>Jt(e)),n(" removeEmptyRanks",()=>Cr(e)),n(" nestingGraph.cleanup",()=>nt(e)),n(" normalizeRanks",()=>Sr(e)),n(" assignRankMinMax",()=>Ut(e)),n(" removeEdgeLabelProxies",()=>Zt(e)),n(" normalize.run",()=>Br(e)),n(" parentDummyChains",()=>bt(e)),n(" addBorderSegments",()=>Mr(e)),n(" order",()=>gt(e)),n(" insertSelfEdges",()=>aa(e)),n(" adjustCoordinateSystem",()=>Ir(e)),n(" position",()=>Dt(e)),n(" positionSelfEdges",()=>ia(e)),n(" removeBorderNodes",()=>ra(e)),n(" normalize.undo",()=>Ar(e)),n(" fixupEdgeLabelCoords",()=>ea(e)),n(" undoCoordinateSystem",()=>Dr(e)),n(" translateGraph",()=>Kt(e)),n(" assignNodeIntersects",()=>Qt(e)),n(" reversePoints",()=>na(e)),n(" acyclic.undo",()=>Or(e))}function jt(e,n){l(e.nodes(),function(r){var t=e.node(r),a=n.node(r);t&&(t.x=a.x,t.y=a.y,n.children(r).length&&(t.width=a.width,t.height=a.height))}),l(e.edges(),function(r){var t=e.edge(r),a=n.edge(r);t.points=a.points,Object.prototype.hasOwnProperty.call(a,"x")&&(t.x=a.x,t.y=a.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var At=["nodesep","edgesep","ranksep","marginx","marginy"],Ft={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Gt=["acyclicer","ranker","rankdir","align"],Yt=["width","height"],Vt={width:0,height:0},qt=["minlen","weight","width","height","labeloffset"],Wt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},$t=["labelpos"];function Ht(e){var n=new x({multigraph:!0,compound:!0}),r=z(e.graph());return n.setGraph(Q({},Ft,H(r,At),j(r,Gt))),l(e.nodes(),function(t){var a=z(e.node(t));n.setNode(t,qn(H(a,Yt),Vt)),n.setParent(t,e.parent(t))}),l(e.edges(),function(t){var a=z(e.edge(t));n.setEdge(t,Q({},Wt,H(a,qt),j(a,$t)))}),n}function zt(e){var n=e.graph();n.ranksep/=2,l(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function Jt(e){l(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),a=e.node(n.w),o={rank:(a.rank-t.rank)/2+t.rank,e:n};_(e,"edge-proxy",o,"_ep")}})}function Ut(e){var n=0;l(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=O(n,t.maxRank))}),e.graph().maxRank=n}function Zt(e){l(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Kt(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,a=0,o=e.graph(),i=o.marginx||0,d=o.marginy||0;function s(u){var f=u.x,c=u.y,h=u.width,p=u.height;n=Math.min(n,f-h/2),r=Math.max(r,f+h/2),t=Math.min(t,c-p/2),a=Math.max(a,c+p/2)}l(e.nodes(),function(u){s(e.node(u))}),l(e.edges(),function(u){var f=e.edge(u);Object.prototype.hasOwnProperty.call(f,"x")&&s(f)}),n-=i,t-=d,l(e.nodes(),function(u){var f=e.node(u);f.x-=n,f.y-=t}),l(e.edges(),function(u){var f=e.edge(u);l(f.points,function(c){c.x-=n,c.y-=t}),Object.prototype.hasOwnProperty.call(f,"x")&&(f.x-=n),Object.prototype.hasOwnProperty.call(f,"y")&&(f.y-=t)}),o.width=r-n+i,o.height=a-t+d}function Qt(e){l(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),a=e.node(n.w),o,i;r.points?(o=r.points[0],i=r.points[r.points.length-1]):(r.points=[],o=a,i=t),r.points.unshift(me(t,o)),r.points.push(me(a,i))})}function ea(e){l(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function na(e){l(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function ra(e){l(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),a=e.node(r.borderBottom),o=e.node(B(r.borderLeft)),i=e.node(B(r.borderRight));r.width=Math.abs(i.x-o.x),r.height=Math.abs(a.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),l(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function ta(e){l(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function aa(e){var n=G(e);l(n,function(r){var t=0;l(r,function(a,o){var i=e.node(a);i.order=o+t,l(i.selfEdges,function(d){_(e,"selfedge",{width:d.label.width,height:d.label.height,rank:i.rank,order:o+ ++t,e:d.e,label:d.label},"_se")}),delete i.selfEdges})})}function ia(e){l(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),a=t.x+t.width/2,o=t.y,i=r.x-a,d=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:a+2*i/3,y:o-d},{x:a+5*i/6,y:o-d},{x:a+i,y:o},{x:a+5*i/6,y:o+d},{x:a+2*i/3,y:o+d}],r.label.x=r.x,r.label.y=r.y}})}function H(e,n){return F(j(e,n),Number)}function z(e){var n={};return l(e,function(r,t){n[t.toLowerCase()]=r}),n}var Se=y((e,n,r)=>Math.max(n,Math.min(r,e)),"clamp"),Ce=y((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";default:return"top"}},"getDefaultSelfLoopSide"),oa=y(e=>e==="flowchart"||e==="flowchart-v2"||e==="stateDiagram"||e==="er"||e==="classDiagram","shouldMergeSelfLoopSegments"),da=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],sa=y((e,n,r,t,a)=>{const o=[],i=new Set;if(r.forEach(({start:f,end:c})=>{f!==t&&i.add(f),c!==t&&i.add(c)}),i.forEach(f=>{const c=e.node(f);typeof c?.x=="number"&&typeof c?.y=="number"&&o.push(c)}),o.length===0&&r.forEach(({edge:f})=>{(f.points??[]).forEach(c=>{typeof c?.x=="number"&&typeof c?.y=="number"&&o.push(c)})}),o.length===0)return Ce(a);const d=o.reduce((f,c)=>({x:f.x+c.x/o.length,y:f.y+c.y/o.length}),{x:0,y:0}),s=d.x-n.x,u=d.y-n.y;return Math.abs(s)>Math.abs(u)?s>0?"right":"left":Math.abs(u)>0?u>0?"bottom":"top":Ce(a)},"getSelfLoopSide"),ua=y((e,n="top",r=0,t=0)=>{const a=e.x,o=e.y-r,i=e.width/2,d=e.height/2,s=Math.max(36,Math.min(100,e.width*.8)),u=Se(Math.max(t,e.width*.35),36,s),f=Se(Math.min(e.width,e.height)*.45,24,48);switch(n){case"bottom":{const c=o+d;return[{x:a-u/2,y:c},{x:a-u/2,y:c+f},{x:a+u/2,y:c+f},{x:a+u/2,y:c}]}case"right":{const c=a+i;return[{x:c,y:o-u/2},{x:c+f,y:o-u/2},{x:c+f,y:o+u/2},{x:c,y:o+u/2}]}case"left":{const c=a-i;return[{x:c,y:o-u/2},{x:c-f,y:o-u/2},{x:c-f,y:o+u/2},{x:c,y:o+u/2}]}default:{const c=o-d;return[{x:a-u/2,y:c},{x:a-u/2,y:c-f},{x:a+u/2,y:c-f},{x:a+u/2,y:c}]}}},"getSelfLoopPoints"),fa=y((e,n,r="top",t=0,a={})=>{const i=e.x,d=e.y-t,s=a.width??0,u=a.height??0;switch(r){case"bottom":return{x:i,y:Math.max(...n.map(f=>f.y))+u/2+4};case"right":return{x:Math.max(...n.map(f=>f.x))+s/2+4,y:d};case"left":return{x:Math.min(...n.map(f=>f.x))-s/2-4,y:d};default:return{x:i,y:Math.min(...n.map(f=>f.y))-u/2-4}}},"getSelfLoopLabelPosition"),en=y((e,n=0,{mergeSelfLoops:r=!0}={})=>{const t=new Map,a=[],o=e.graph()?.rankdir;return e.edges().forEach(i=>{const d=e.edge(i);if(r&&d.selfLoop){const s=d.selfLoop.id;t.has(s)||t.set(s,[]),t.get(s).push({edge:d,start:i.v,end:i.w})}else a.push({edge:d,start:i.v,end:i.w})}),t.forEach(i=>{if(i.length!==3){i.forEach(b=>a.push(b));return}i.sort((b,N)=>b.edge.selfLoop.order-N.edge.selfLoop.order);const[d,s,u]=i,f=d.edge.originalEdge??s.edge.originalEdge??u.edge.originalEdge??s.edge,c=e.node(f.start);if(!c){i.forEach(b=>a.push(b));return}const h={width:s.edge.width,height:s.edge.height},p=sa(e,c,i,f.start,o),g=ua(c,p,n,h.width??0),w=fa(c,g,p,n,h),v={...s.edge,...f,id:f.id,points:g,start:f.start,end:f.end,x:w.x,y:w.y,width:h.width,height:h.height,labelStyle:s.edge.labelStyle,fromCluster:d.edge.fromCluster??s.edge.fromCluster??u.edge.fromCluster,toCluster:d.edge.toCluster??s.edge.toCluster??u.edge.toCluster};delete v.selfLoop,delete v.originalEdge,a.push({edge:v,start:v.start,end:v.end})}),a},"getEdgesToRender"),nn=y(async({element:e,graph:n,diagramType:r,id:t,parentCluster:a,siteConfig:o})=>{const i=n.graph().rankdir;m.trace("Dir in recursive render - dir:",i);const{clusters:d,edgePaths:s,edgeLabels:u,nodes:f,rootGroups:c}=dn(e,{edgePathsClass:"edgePaths"});n.nodes()?m.info("Recursive render XXX",n.nodes()):m.info("No nodes found for",n),n.edges().length>0&&m.info("Recursive edges",n.edge(n.edges()[0]));const h=oa(r);await Promise.all(n.nodes().map(async function(w){const v=n.node(w);if(a!==void 0){const b=JSON.parse(JSON.stringify(a.clusterData));m.trace(`Setting data for parent cluster XXX
|
|
2
|
-
Node.id = `,w,`
|
|
3
|
-
data=`,b.height,`
|
|
4
|
-
Parent cluster`,a.height),n.setNode(a.id,b),n.parent(w)||(m.trace("Setting parent",w,a.id),n.setParent(w,a.id,b))}if(m.info("(Insert) Node XXX"+w+": "+JSON.stringify(n.node(w))),v?.clusterNode){m.info("Cluster identified XBX",w,v.width,n.node(w));const{ranksep:b,nodesep:N}=n.graph();v.graph.setGraph({...v.graph.graph(),ranksep:b+25,nodesep:N});const le=await va({element:f,graph:v.graph,diagramType:r,id:t,parentCluster:n.node(w),siteConfig:o}),he=le.elem;fn(v,he),v.diff=le.diff||0,m.info("New compound node after recursive render XAX",w,"width",v.width,"height",v.height),cn(he,v)}else n.children(w).length>0?(m.trace("Cluster - the non recursive path XBX",w,v.id,v,v.width,"Graph:",n),m.trace(pe(v.id,n)),k.set(v.id,{id:pe(v.id,n),node:v})):(m.trace("Node - the non recursive path XAX",w,f,n.node(w),i),await sn(f,n.node(w),{config:o,dir:i}))})),await y(async()=>{const w=n.edges().map(async function(v){const b=n.edge(v.v,v.w,v.name);if(m.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),m.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(n.edge(v))),m.info("Fix",k,"ids:",v.v,v.w,"Translating: ",k.get(v.v),k.get(v.w)),h&&b.selfLoop){if(b.selfLoop.order!==1)return;const N={...b.originalEdge,...b,id:b.selfLoop.id,startLabelLeft:b.originalEdge?.startLabelLeft??b.startLabelLeft,startLabelRight:b.originalEdge?.startLabelRight??b.startLabelRight,endLabelLeft:b.originalEdge?.endLabelLeft??b.endLabelLeft,endLabelRight:b.originalEdge?.endLabelRight??b.endLabelRight};await ve(u,N),b.width=N.width,b.height=N.height,b.labelStyle=N.labelStyle;return}await ve(u,b)});await Promise.all(w)},"processEdges")();const{subGraphTitleTotalMargin:g}=ln(o);return{elem:c,graph:n,groups:{clusters:d,edgePaths:s,edgeLabels:u,nodes:f,rootGroups:c},diagramType:r,id:t,mergeSelfLoops:h,subGraphTitleTotalMargin:g}},"measureDagreGraph"),rn=y(e=>{m.info("############################################# XXX"),m.info("### Layout ### XXX"),m.info("############################################# XXX"),Xt(e)},"runDagreGraphLayout"),ca=y((e,n,r)=>{const t=e.node(n);if(!t)return;const a={...t};return t?.clusterNode?a.y=(t.y??0)+r:e.children(n).length>0?a.height=(t.height??0)+r:a.y=(t.y??0)+r/2,a},"normalizeDagreNode"),Re=y((e,n)=>{da.forEach(r=>{n[r]!==void 0&&(e[r]=n[r])})},"applyDagreNodeLayout"),la=y((e,n,r,t)=>({...e,start:e.start??n,end:e.end??r,points:(e.points??[]).map(a=>({...a,y:typeof a.y=="number"?a.y+t:a.y}))}),"normalizeDagreEdge"),ha=y((e,n)=>{const{graph:r,mergeSelfLoops:t,subGraphTitleTotalMargin:a=0}=n,o=new Map(e.nodes.map(d=>[d.id,d]));ne(r).forEach(d=>{const s=ca(r,d,a);if(!s)return;Re(r.node(d),s);const u=o.get(d);u&&Re(u,s)});const i=a/2;return e.edges=en(r,i,{mergeSelfLoops:t}).map(({edge:d,start:s,end:u})=>la(d,s,u,i)),e},"applyDagreLayoutResult"),pa=y(async({elem:e,graph:n,groups:{clusters:r,edgePaths:t},diagramType:a,id:o,mergeSelfLoops:i,subGraphTitleTotalMargin:d})=>{let s=0;await Promise.all(ne(n).map(async function(c){const h=n.node(c);if(m.info("Position XBX => "+c+": ("+h.x,","+h.y,") width: ",h.width," height: ",h.height),h?.clusterNode)h.y+=d,m.info("A tainted cluster node XBX1",c,h.id,h.width,h.height,h.x,h.y,n.parent(c)),k.get(h.id).node=h,ge(h);else if(n.children(c).length>0){m.info("A pure cluster node XBX1",c,h.id,h.x,h.y,h.width,h.height,n.parent(c)),h.height+=d,n.node(h.parentId);const p=h?.padding/2||0,g=h?.labelBBox?.height||0,w=g-p||0;m.debug("OffsetY",w,"labelHeight",g,"halfPadding",p),await hn(r,h),k.get(h.id).node=h}else{const p=n.node(h.parentId);h.y+=d/2,m.info("A regular node XBX1 - using the padding",h.id,"parent",h.parentId,h.width,h.height,h.x,h.y,"offsetY",h.offsetY,"parent",p,p?.offsetY,h),ge(h)}}));const u=d/2;return en(n,u,{mergeSelfLoops:i}).forEach(function({edge:c,start:h,end:p}){m.info("Edge "+h+" -> "+p+": "+JSON.stringify(c),c),c.points.forEach(b=>b.y+=u);const g=n.node(h),w=n.node(p),v=pn(t,c,k,a,g,w,o);vn(c,v)}),n.nodes().forEach(function(c){const h=n.node(c);m.info(c,h.type,h.diff),h.isGroup&&(s=h.diff)}),m.warn("Returning from recursive render XAX",e,s),{elem:e,diff:s}},"paintDagreLayoutCore"),va=y(async e=>{const n=await nn(e);return rn(n.graph),await pa(n)},"renderDagreSubgraph"),tn=y(e=>{const n=new x({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.nodeSpacing||e.config?.flowchart?.nodeSpacing,ranksep:e.config?.rankSpacing||e.rankSpacing||e.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(r=>{n.setNode(r.id,{...r}),r.parentId&&n.setParent(r.id,r.parentId)}),m.debug("Edges:",e.edges),e.edges.forEach(r=>{if(r.start===r.end){const t=r.start,a=t+"---"+t+"---1",o=t+"---"+t+"---2",i=n.node(t);n.setNode(a,{domId:a,id:a,parentId:i.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(a,i.parentId),n.setNode(o,{domId:o,id:o,parentId:i.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(o,i.parentId);const d=structuredClone(r),s=structuredClone(r),u=structuredClone(r),f=structuredClone(r);s.originalEdge=d,s.selfLoop={id:d.id,order:0},u.originalEdge=d,u.selfLoop={id:d.id,order:1},f.originalEdge=d,f.selfLoop={id:d.id,order:2},s.label="",s.arrowTypeEnd="none",s.endLabelLeft="",s.endLabelRight="",s.startLabelLeft="",s.id=t+"-cyclic-special-1",u.startLabelRight="",u.startLabelLeft="",u.endLabelLeft="",u.endLabelRight="",u.arrowTypeStart="none",u.arrowTypeEnd="none",u.id=t+"-cyclic-special-mid",f.label="",f.startLabelRight="",f.startLabelLeft="",f.arrowTypeStart="none",i.isGroup&&(s.fromCluster=t,f.toCluster=t),f.id=t+"-cyclic-special-2",f.arrowTypeStart="none",n.setEdge(t,a,s,t+"-cyclic-special-0"),n.setEdge(a,o,u,t+"-cyclic-special-1"),n.setEdge(o,t,f,t+"-cyclic-special-2")}else n.setEdge(r.start,r.end,{...r},r.id)}),an(n),{graph:n}},"prepareLayoutForDagre"),ga=y(async(e,{element:n,preparedLayout:r})=>{const t=r??tn(e),a=un(),o=await nn({element:n,graph:t.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:a});return t.measuredLayout=o,o},"measureDagreLayout"),wa=y((e,n)=>{const r=n.preparedLayout?.measuredLayout;if(!r)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return rn(r.graph),ha(e,r),r},"runDagreLayoutCore"),ba=y((e,{measure:n})=>ne(n.graph).map(r=>n.graph.node(r)).filter(Boolean),"getDagrePaintNodes"),ma=y((e,n,{measure:r})=>e?r.graph.node(e):void 0,"getDagreEdgeNode"),Pa=on({prepareLayout:tn,measureLayout:ga,runLayoutCore:wa,paintOptions:{clusterDb:k,getNodes:ba,getEdgeNode:ma,skipNode:y((e,{measure:n})=>!n.graph.hasNode(e.id),"skipNode"),isCluster:y((e,{measure:n})=>n.graph.hasNode(e.id)&&(n.graph.children(e.id)??[]).length>0,"isCluster")}});export{ha as applyDagreLayoutResult,en as getEdgesToRender,ga as measureDagreLayout,tn as prepareLayoutForDagre,Pa as render,wa as runDagreLayoutCore};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as N,a as j,c as v,i as P,d as f,e as b,k as _,f as g,g as o,h as l,v as p,r as D,j as E}from"./_baseUniq-CHc60b6y.js";var w=N(function(d){return j(v(d,1,P,!0))}),F="\0",a="\0",O="";class L{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=f(void 0),this._defaultEdgeLabelFn=f(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return b(e)||(e=f(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return _(this._nodes)}sources(){var e=this;return g(this.nodes(),function(t){return E(e._in[t])})}sinks(){var e=this;return g(this.nodes(),function(t){return E(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return o(e,function(r){s.length>1?i.setNode(r,t):i.setNode(r)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],o(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),o(_(this._in[e]),t),delete this._in[e],delete this._preds[e],o(_(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(l(t))t=a;else{t+="";for(var s=t;!l(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}}children(e){if(l(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return _(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return _(t)}successors(e){var t=this._sucs[e];if(t)return _(t)}neighbors(e){var t=this.predecessors(e);if(t)return w(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;o(this._nodes,function(n,h){e(h)&&t.setNode(h,n)}),o(this._edgeObjs,function(n){t.hasNode(n.v)&&t.hasNode(n.w)&&t.setEdge(n,s.edge(n))});var i={};function r(n){var h=s.parent(n);return h===void 0||t.hasNode(h)?(i[n]=h,h):h in i?i[h]:r(h)}return this._isCompound&&o(t.nodes(),function(n){t.setParent(n,r(n))}),t}setDefaultEdgeLabel(e){return b(e)||(e=f(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return p(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return D(e,function(r,n){return i.length>1?s.setEdge(r,n,t):s.setEdge(r,n),n}),this}setEdge(){var e,t,s,i,r=!1,n=arguments[0];typeof n=="object"&&n!==null&&"v"in n?(e=n.v,t=n.w,s=n.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=n,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,l(s)||(s=""+s);var h=c(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,h))return r&&(this._edgeLabels[h]=i),this;if(!l(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[h]=r?i:this._defaultEdgeLabelFn(e,t,s);var u=M(this._isDirected,e,t,s);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[h]=u,y(this._preds[t],e),y(this._sucs[e],t),this._in[t][h]=u,this._out[e][h]=u,this._edgeCount++,this}edge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],C(this._preds[t],e),C(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=p(s);return t?g(i,function(r){return r.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=p(s);return t?g(i,function(r){return r.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function y(d,e){d[e]?d[e]++:d[e]=1}function C(d,e){--d[e]||delete d[e]}function c(d,e,t,s){var i=""+e,r=""+t;if(!d&&i>r){var n=i;i=r,r=n}return i+O+r+O+(l(s)?F:s)}function M(d,e,t,s){var i=""+e,r=""+t;if(!d&&i>r){var n=i;i=r,r=n}var h={v:i,w:r};return s&&(h.name=s),h}function m(d,e){return c(d,e.v,e.w,e.name)}export{L as G};
|