@runeya/runeya 2.0.152 → 2.0.154
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/{chat-Z7SFBEXS.js → chat-COP27XB3.js} +3 -3
- package/{chunk-EUTW2S4P.js → chunk-OLHL5NFP.js} +7 -4
- package/chunk-OLHL5NFP.js.map +1 -0
- package/{chunk-QJSIN26R.js → chunk-VKYSHTYT.js} +443 -78
- package/chunk-VKYSHTYT.js.map +1 -0
- package/{companion-ZDEGNZ2G.js → companion-3MW23ONE.js} +2 -2
- package/index.js +7 -7
- package/{install-gate-TSCXUCYE.js → install-gate-3UVXPA57.js} +2 -2
- package/package.json +1 -1
- package/{src-NWPED6TK.js → src-K4E6GUCZ.js} +37 -25
- package/src-K4E6GUCZ.js.map +1 -0
- package/web/assets/{AgentScalarChatInterface.vue-0pB6D9jL.js → AgentScalarChatInterface.vue-BtA-f77q.js} +3 -3
- package/web/assets/{AgentTerminalPage-D1c5A1Ol.js → AgentTerminalPage-2Ky-vEkw.js} +1 -1
- package/web/assets/AiChatModals-BV3vIIqN.js +4 -0
- package/web/assets/AiChatModals-DS5R3Oz1.css +1 -0
- package/web/assets/AppLayout-BgPr-urw.css +1 -0
- package/web/assets/AppLayout-DsczwAFI.js +1 -0
- package/web/assets/{AuditPage-B_Ee8f0S.js → AuditPage-DoKHFRJ7.js} +1 -1
- package/web/assets/{CloudAccountPage-D1L8Z_V3.js → CloudAccountPage-CDQNalgx.js} +1 -1
- package/web/assets/{CloudMessagingPage-CyZF0sdY.js → CloudMessagingPage-DduCz3KB.js} +1 -1
- package/web/assets/{DashboardPage-BeWd0GWF.js → DashboardPage-ClJR5DiP.js} +1 -1
- package/web/assets/{DirectoryPickerDialog-BGhbB66i.js → DirectoryPickerDialog-CVVg3SzI.js} +1 -1
- package/web/assets/{EditorIcon-CcU8Z46_.js → EditorIcon-DksI79ZN.js} +1 -1
- package/web/assets/{EnvironmentForm-B0FYydAK.js → EnvironmentForm-eMpLFv_-.js} +1 -1
- package/web/assets/{EnvironmentFormPage-BdTdOUBD.js → EnvironmentFormPage-DXH2lgk_.js} +1 -1
- package/web/assets/{EnvironmentListPage-Cy9Kg5pY.js → EnvironmentListPage-D-g_8lQw.js} +1 -1
- package/web/assets/{FlagChip-maG1f7pl.js → FlagChip-DjC14z4J.js} +1 -1
- package/web/assets/KanbanBoardPage-BeSkCN6I.js +4 -0
- package/web/assets/KanbanBoardPage-BrFqn87r.css +1 -0
- package/web/assets/{KanbanListPage-BigioApQ.css → KanbanListPage-DCK-N3nw.css} +1 -1
- package/web/assets/{KanbanListPage-BOxLKDpW.js → KanbanListPage-DnhCC5ET.js} +1 -1
- package/web/assets/{LaunchProjectPage-zlY3PK3t.js → LaunchProjectPage-DyNqhic1.js} +1 -1
- package/web/assets/{LaunchServicesPage-BsM0bP8N.js → LaunchServicesPage-bI7pVeU7.js} +1 -1
- package/web/assets/{LaunchShell-BznQ7GLD.js → LaunchShell-CokT4E5l.js} +1 -1
- package/web/assets/{LogViewer-9e3e9X-R.js → LogViewer-Cs3Y8vaZ.js} +1 -1
- package/web/assets/{OrgKeyPrompt-Ckq1sJ8-.js → OrgKeyPrompt-DtgelhnI.js} +1 -1
- package/web/assets/{ProcessControls-Br_aLfW7.js → ProcessControls-CxlDLGiO.js} +1 -1
- package/web/assets/{ProcessDetailPage-D3BNcm7N.js → ProcessDetailPage-D93cKCHb.js} +1 -1
- package/web/assets/{ProcessMetrics-D-rQkzqK.js → ProcessMetrics-C_7_boMv.js} +1 -1
- package/web/assets/{ProjectCreateDialog-BzJRqXun.js → ProjectCreateDialog-Bko_A5wp.js} +1 -1
- package/web/assets/{ProjectLocationGate-DjBwSAKc.js → ProjectLocationGate-jsy8WetY.js} +1 -1
- package/web/assets/{ProjectPublishDialog-yakoPg1D.js → ProjectPublishDialog-7kR1zZAo.js} +1 -1
- package/web/assets/{RandomJobTestPage-Dh0-shVq.js → RandomJobTestPage-Dp9prwa7.js} +1 -1
- package/web/assets/{ScenarioEditorPage-DEdlwmf3.js → ScenarioEditorPage-fv9yLH75.js} +1 -1
- package/web/assets/{SendToChatDialog-_ai4UP8l.js → SendToChatDialog-BVSbXcbf.js} +1 -1
- package/web/assets/{ServiceControlsBar-Bo-jHhJK.js → ServiceControlsBar-DFECGWL8.js} +1 -1
- package/web/assets/{ServiceDetailPage-CWB3XIMA.js → ServiceDetailPage-BQA74240.js} +1 -1
- package/web/assets/{ServiceFormPage-BzARwyAF.js → ServiceFormPage-ChsRsoLt.js} +1 -1
- package/web/assets/SettingsPage-BXKsN9Py.js +2086 -0
- package/web/assets/{SettingsPage-NpFX7FAy.css → SettingsPage-Dsuzjo8r.css} +1 -1
- package/web/assets/{UnlockPage-C08Itng5.js → UnlockPage-DhEN16uX.js} +1 -1
- package/web/assets/{VaultMigrationPage-BLZc5pXH.js → VaultMigrationPage-BgRNUuTP.js} +1 -1
- package/web/assets/{VersionBadge-lBKbqt98.js → VersionBadge-CXJ-2h5V.js} +1 -1
- package/web/assets/{WikiPage-RCU0T1IS.js → WikiPage-BT5a9d5Q.js} +1 -1
- package/web/assets/{WikiView-BV8MZ8qm.js → WikiView-BNReLsq5.js} +1 -1
- package/web/assets/{add-scalar-classes-CvUuKrM6.js → add-scalar-classes-C_lKfiMa.js} +2 -2
- package/web/assets/{agent.store-yrwtq9oP.js → agent.store-B6OM7edC.js} +1 -1
- package/web/assets/{auth-LbzJj0JF.js → auth-5bsz5kSC.js} +2 -2
- package/web/assets/{cloud-chat.store-y_9urSQZ.js → cloud-chat.store-Di38xQRJ.js} +1 -1
- package/web/assets/{cloud-client-DhjJyZHU.js → cloud-client-CEVx-bg6.js} +2 -2
- package/web/assets/{cloud-session-BlihYcy2.js → cloud-session-w6eNQX1X.js} +2 -2
- package/web/assets/composables-CCbqJqnd.js +1 -0
- package/web/assets/i18n-DbgjJIf8.js +1 -0
- package/web/assets/index-DB3-fmza.css +1 -0
- package/web/assets/{index-Ci2pSJuu.js → index-mvpLwxNT.js} +74 -74
- package/web/assets/modal-Bslt0NZi.js +5 -0
- package/web/assets/{notification.store-Bp37Xsss.js → notification.store-CAG1kWYq.js} +1 -1
- package/web/assets/{project-launch.store-AB257LRF.js → project-launch.store-Im5SMon9.js} +1 -1
- package/web/assets/{project.store-qBZ_R1td.js → project.store-CITAykC3.js} +1 -1
- package/web/assets/{scenario.store-B5ybSSzx.js → scenario.store-C9sSoRzb.js} +2 -2
- package/web/assets/{service.store-BrKRjCtb.js → service.store-CZJuuJiv.js} +1 -1
- package/web/assets/{settings-scope-BSdUKgjx.js → settings-scope-vcJEMNnD.js} +1 -1
- package/web/assets/{settings.store-C8guF9Fl.js → settings.store-CydW_2jh.js} +1 -1
- package/web/assets/src-CIOvFTGI.js +1960 -0
- package/web/assets/{src-Br-M9ln7.js → src-COZZWm-m.js} +1 -1
- package/web/assets/{src-DOcCcTQv.js → src-Ck_MutzB.js} +1 -1
- package/web/assets/src-DOziuDw8.css +1 -0
- package/web/assets/src-DrVR8mhy.css +1 -0
- package/web/assets/{trpc-CAKhySL_.js → trpc-BQ0mLnfI.js} +3 -3
- package/web/assets/{useCloudOrg-B_JPalTv.js → useCloudOrg-CQvEbrZv.js} +1 -1
- package/web/assets/{useEnvVarAutocomplete-DCZCMfLC.js → useEnvVarAutocomplete-hy3rO3SN.js} +1 -1
- package/web/assets/{useProjectCatalog-CCJAkQi_.js → useProjectCatalog-CWHpf3Yj.js} +1 -1
- package/web/assets/{useProjectCloudOrg-CG4CriU2.js → useProjectCloudOrg-B3rNPes5.js} +1 -1
- package/web/assets/{useServiceUrlHost-C1gL6Mjg.js → useServiceUrlHost-BFfie_6h.js} +1 -1
- package/web/index.html +19 -19
- package/chunk-EUTW2S4P.js.map +0 -1
- package/chunk-QJSIN26R.js.map +0 -1
- package/mcp-server/external.d.ts +0 -44
- package/mcp-server/index.d.ts +0 -1
- package/mcp-server/launch.d.ts +0 -89
- package/src-NWPED6TK.js.map +0 -1
- package/web/assets/AiChatModals-B_Cn5wNS.js +0 -4
- package/web/assets/AiChatModals-BmWxg-Sr.css +0 -1
- package/web/assets/AppLayout-BsFZ6nG3.js +0 -1
- package/web/assets/AppLayout-Djk3-XbN.css +0 -1
- package/web/assets/KanbanBoardPage-BOEK_sKt.js +0 -4
- package/web/assets/KanbanBoardPage-Bb_8xU-I.css +0 -1
- package/web/assets/SettingsPage-CsIXEQrW.js +0 -2086
- package/web/assets/composables-DguCUR3O.js +0 -1
- package/web/assets/i18n-DxVwqoxL.js +0 -1
- package/web/assets/index-Ck_3m_I9.css +0 -1
- package/web/assets/modal-KpWdqKSY.js +0 -5
- package/web/assets/src-Dbg3CMY2.css +0 -1
- package/web/assets/src-dQGrnDw0.css +0 -1
- package/web/assets/src-recq0B6o.js +0 -1960
- /package/{chat-Z7SFBEXS.js.map → chat-COP27XB3.js.map} +0 -0
- /package/{companion-ZDEGNZ2G.js.map → companion-3MW23ONE.js.map} +0 -0
- /package/{install-gate-TSCXUCYE.js.map → install-gate-3UVXPA57.js.map} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{B as e,C as t,z as n}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{D as r,E as i,Ht as a,St as o,Yt as s,Z as c,_ as l,b as u,bt as d,ct as f,en as p,et as m,ft as h,g,k as _,mt as v,nn as y,o as b,qt as x,rn as S,tt as C,v as w,wt as T,xt as E,y as D}from"./runtime-core.esm-bundler-DujKY9QV.js";import{C as O,S as k,t as A,w as j}from"./runtime-dom.esm-bundler-CyEVRK6B.js";import{n as ee}from"./vue-i18n-o7yraQpR.js";import{C as M,H as N,J as te,S as ne,Y as re,a as P,dt as F,ft as I}from"./src-DOcCcTQv.js";import{r as ie}from"./scenario.store-B5ybSSzx.js";import{r as ae,t as oe}from"./AiChatModals-B_Cn5wNS.js";import{t as se}from"./useAiChatDrawer-D_ofn8Eo.js";import{i as L}from"./dist-C9Qdh18x.js";import{I as ce,N as R}from"./index-Ci2pSJuu.js";import{t as le}from"./useProjectCloudOrg-CG4CriU2.js";import{t as ue}from"./SendToChatDialog-_ai4UP8l.js";var z=e=>Array.isArray(e),de=e=>typeof e==`object`&&!!e&&!Array.isArray(e),fe=e=>e===null?`var(--jtv-null-color)`:{string:`var(--jtv-string-color)`,number:`var(--jtv-number-color)`,boolean:`var(--jtv-boolean-color)`}[typeof e]??`var(--jtv-valueKey-color)`,pe=e=>`"${e}":`,me=(e,t)=>e===1?`${e} ${t?`element`:`property`}`:`${e} ${t?`elements`:`properties`}`,B=(e,t,n,r=!1)=>n?r?`${e}${t}[${t}].`:`${e}${t}.`:e,V=(e,t,n)=>n?`${e}${t}`:e.slice(0,-1),he={class:`json-view-item`},ge=[`aria-expanded`],H={class:`properties`},U={class:`value-key`},W=function(e){return e[e.OBJECT=0]=`OBJECT`,e[e.ARRAY=1]=`ARRAY`,e[e.VALUE=2]=`VALUE`,e}({}),_e=_({name:`JsonTreeViewItem`,__name:`JsonTreeViewItem`,props:{data:{},maxDepth:{default:1},canSelect:{type:Boolean,default:!1}},emits:[`selected`],setup(e,{emit:n}){let i=n,a=t(e.data.depth<e.maxDepth),c=()=>{a.value=!a.value},f=e=>{let t={key:e.key,value:e.value,path:e.path};i(`selected`,t)},m=e=>i(`selected`,e),h=g(()=>({"chevron-arrow":!0,opened:a.value})),_=g(()=>({"value-key":!0,"can-select":e.canSelect})),C=g(()=>{let{length:t,type:n}=e.data;return t===void 0?``:me(t,n===1)}),E=g(()=>JSON.stringify(e.data.value)),ee=e=>pe(e.key),M=e=>fe(e);return(t,n)=>{let i=o(`JsonTreeViewItem`,!0);return v(),u(`div`,he,[e.data.type===0||e.data.type===1?(v(),u(b,{key:0},[l(`button`,{class:`data-key`,type:`button`,"aria-expanded":a.value,onClick:j(c,[`stop`])},[l(`div`,{class:p(h.value),"aria-hidden":`true`},null,2),l(`span`,null,S(e.data.key)+`:`,1),l(`span`,H,S(C.value),1)],8,ge),r(A,{name:`expand`},{default:x(()=>[s(l(`div`,null,[(v(!0),u(b,null,d(e.data.children,t=>(v(),w(i,{key:ee(t),data:t,"max-depth":e.maxDepth,"can-select":e.canSelect,onSelected:m},null,8,[`data`,`max-depth`,`can-select`]))),128))],512),[[k,a.value]])]),_:1})],64)):D(``,!0),e.data.type===2?(v(),w(T(e.canSelect?`button`:`div`),{key:1,class:p(_.value),type:e.canSelect?`button`:null,tabindex:e.canSelect?0:null,onClick:n[0]||=t=>e.canSelect?f(e.data):null,onKeyup:[n[1]||=O(t=>e.canSelect?f(e.data):null,[`enter`]),n[2]||=O(j(t=>e.canSelect?f(e.data):null,[`prevent`]),[`space`])]},{default:x(()=>[l(`span`,U,S(e.data.key)+`:`,1),l(`span`,{style:y({color:M(e.data.value)})},S(E.value),5)]),_:1},40,[`class`,`type`,`tabindex`])):D(``,!0)])}}}),G=((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})(_({name:`JsonTreeView`,__name:`JsonTreeView`,props:{json:{},rootKey:{default:`/`},maxDepth:{default:1},colorScheme:{default:`light`}},emits:[`selected`],setup(e,{emit:t}){let n=t,r=e=>n(`selected`,e),i=(e,t,n,r,i)=>{let a=t.map((t,a)=>s(a.toString(),t,n+1,B(r,e,i,!0),!1));return{key:e,type:W.ARRAY,depth:n,path:r,length:a.length,children:a}},a=(e,t,n,r,i)=>{let a=Object.entries(t).map(([t,a])=>s(t,a,n+1,B(r,e,i),!0));return{key:e,type:W.OBJECT,depth:n,path:r,length:a.length,children:a}},o=(e,t,n,r,i)=>({key:e,type:W.VALUE,path:V(r,e,i),depth:n,value:t}),s=(e,t,n,r,s)=>z(t)?i(e,t,n,r,s):de(t)?a(e,t,n,r,s):o(e,t,n,r,s),c=(e,t)=>{try{let n=JSON.parse(e);return de(n)||z(n)?s(t,n,0,``,!0):o(t,n,0,``,!0)}catch{return o(t,e,0,``,!0)}},l=g(()=>c(e.json,e.rootKey));return(t,n)=>(v(),w(_e,{class:p([`root-item`,{dark:e.colorScheme===`dark`}]),data:l.value,"max-depth":e.maxDepth,onSelected:r},null,8,[`class`,`data`,`max-depth`]))}}),[[`__scopeId`,`data-v-9f840ee1`]]),K={class:`log-card__icon`},q=[`innerHTML`],ve={key:0,class:`log-card__badge`},ye=[`innerHTML`],be={class:`log-card__clip`},xe=320,Se=150,J=I(_({__name:`LogCard`,props:{icon:{},title:{},color:{},badge:{},muted:{type:Boolean},defaultCollapsed:{type:Boolean},lastLine:{}},setup(n){let i=n,a=t(!i.defaultCollapsed),o=t(!!i.defaultCollapsed),s=t(!!i.defaultCollapsed);function c(){a.value?(a.value=!1,setTimeout(()=>{o.value=!0,s.value=!0},xe)):(o.value=!1,s.value=!1,setTimeout(()=>{a.value=!0},Se))}return(t,i)=>(v(),u(`div`,{class:p([`log-card`,{"log-card--muted":n.muted,"log-card--open":!s.value}])},[l(`div`,{class:`log-card__header`,style:y({background:n.color}),onClick:c},[l(`span`,K,S(n.icon),1),l(`span`,{class:`log-card__title`,innerHTML:e(R).sanitize(n.title)},null,8,q),n.badge?(v(),u(`span`,ve,S(n.badge),1)):D(``,!0),t.$slots.default?(v(),u(`span`,{key:1,class:p([`log-card__chevron`,{"log-card__chevron--open":!s.value}])},[...i[0]||=[l(`svg`,{width:`8`,height:`8`,viewBox:`0 0 8 8`,fill:`currentColor`},[l(`polygon`,{points:`0,0 8,4 0,8`})],-1)]],2)):D(``,!0)],4),t.$slots.default?(v(),u(b,{key:0},[r(A,{name:`dots`},{default:x(()=>[o.value?(v(),u(`div`,{key:0,class:`log-card__preview`,style:y({borderLeftColor:n.color})},[n.lastLine?(v(),u(`span`,{key:0,class:`log-card__last-line`,innerHTML:e(R).sanitize(n.lastLine)},null,8,ye)):(v(),u(b,{key:1},[i[1]||=l(`span`,{class:`log-card__dot`},null,-1),i[2]||=l(`span`,{class:`log-card__dot`},null,-1),i[3]||=l(`span`,{class:`log-card__dot`},null,-1)],64))],4)):D(``,!0)]),_:1}),l(`div`,{class:p([`log-card__grid`,{"log-card__grid--open":a.value}])},[l(`div`,be,[l(`div`,{class:`log-card__body`,style:y({borderLeftColor:n.color})},[E(t.$slots,`default`,{},void 0,!0)],4)])],2)],64)):D(``,!0)],2))}}),[[`__scopeId`,`data-v-641c6e90`]]),Y={key:5},Ce=[`title`],we=[`innerHTML`],Te=I(_({__name:`LogLine`,props:{log:{}},emits:[`click`],setup(t,{emit:n}){let a=t,o=n;function s(){let e=window.getSelection();e&&e.toString().length>0||o(`click`,a.log)}let c={debug:`#c72bd4`,info:`#a3a3a3`,warn:`#f59e0b`,error:`#ef4444`,fatal:`#ef4444`},d=g(()=>c[a.log.level]??`#a3a3a3`),f=g(()=>a.log.logCard?.state===`self`?a.log.logCard.type:null);function p(e){return e.metadata!=null&&Object.keys(e.metadata).length>0}function m(e){if(!e.metadata)return``;try{return JSON.stringify(e.metadata,null,2)}catch{return String(e.metadata)}}function h(e){return JSON.stringify(e.json)}return(n,o)=>(v(),u(`div`,null,[f.value===`command-start`?(v(),w(J,{key:0,icon:`⌗`,title:t.log.logCard.header,color:`#3b82f6`,onClick:s},{default:x(()=>[i(S(t.log.message),1)]),_:1},8,[`title`])):f.value===`command-fail`?(v(),w(J,{key:1,icon:`⌗`,title:t.log.logCard.header,color:`#ef4444`,badge:`✗ ${t.log.message}`,onClick:s},null,8,[`title`,`badge`])):f.value===`system-warn`?(v(),w(J,{key:2,icon:`⚠`,title:t.log.logCard.header,color:`#ef4444`,badge:t.log.message,onClick:s},null,8,[`title`,`badge`])):f.value===`json`?(v(),w(J,{key:3,icon:`</>`,title:t.log.logCard.header,color:d.value},{default:x(()=>[l(`div`,{onClick:o[0]||=j(()=>{},[`stop`])},[r(e(G),{json:h(a.log),maxDepth:2},null,8,[`json`])])]),_:1},8,[`title`,`color`])):t.log.json?(v(),w(J,{key:4,icon:`</>`,title:`JSON`,color:d.value,onClick:s},{default:x(()=>[l(`div`,{onClick:o[1]||=j(()=>{},[`stop`])},[r(e(G),{json:h(a.log),maxDepth:2},null,8,[`json`])])]),_:1},8,[`color`])):(v(),u(`div`,Y,[l(`div`,{class:`log-line`,"data-testid":`log-message`,style:y({boxShadow:`inset 3px 0 0 0 ${d.value}`}),title:p(a.log)?m(a.log):void 0,onClick:s},[l(`span`,{class:`log-message`,innerHTML:e(R).sanitize(a.log.message)},null,8,we)],12,Ce)]))]))}}),[[`__scopeId`,`data-v-6ac1d4e1`]]),Ee={class:`log-filter`},De={class:`log-filter__row`},Oe={class:`log-filter__level-option`},ke={class:`log-filter__level-chip`},Ae={key:0,class:`log-filter__badges`},je=[`title`],Me={class:`log-filter__badge-type`},Ne={key:0,class:`log-filter__badge-flag`},Pe={class:`log-filter__badge-pattern`},Fe=[`aria-label`,`onClick`],Ie={class:`log-filter__popover`},Le={class:`log-filter__popover-title`},Re={class:`log-filter__popover-row`},ze={class:`log-filter__popover-row log-filter__popover-row--between`},Be={for:`logfilter-regex-toggle`,class:`log-filter__popover-label`},Ve={class:`log-filter__popover-input-wrap`},He={key:0,class:`log-filter__popover-error`},Ue={class:`log-filter__popover-actions`},We=I(_({__name:`LogFilter`,props:{modelValue:{}},emits:[`update:modelValue`],setup(n,{emit:o}){let{t:s}=ee(),c=n,f=o,m={debug:`#c72bd4`,info:`#a3a3a3`,warn:`#f59e0b`,error:`#ef4444`,fatal:`#ef4444`},g=L.map(e=>({label:e.charAt(0).toUpperCase()+e.slice(1),value:e,color:m[e]??`#a3a3a3`})),_=t([...c.modelValue.levels]),T=t([...c.modelValue.filters]),E=!1;a(_,e=>{E||f(`update:modelValue`,{levels:e,filters:T.value})}),a(()=>c.modelValue,e=>{E=!0,_.value=[...e.levels],T.value=[...e.filters],C(()=>{E=!1})});let O=t(null),k=t(``),A=t(`include`),j=t(!1),N=t(``);function ne(e){O.value?.toggle(e)}function re(){O.value?.hide()}function I(e){try{return new RegExp(e),!0}catch(e){return N.value=e instanceof Error?e.message:`Invalid regex`,!1}}function ie(){let e=k.value.trim();e&&(N.value=``,(!j.value||I(e))&&(T.value=[...T.value,{id:`${Date.now()}-${Math.random()}`,pattern:e,type:A.value,isRegex:j.value}],k.value=``,f(`update:modelValue`,{levels:_.value,filters:T.value}),re()))}function ae(e){e.key===`Enter`&&(e.preventDefault(),ie()),e.key===`Escape`&&re()}function oe(){N.value=``}function se(e){T.value=T.value.filter(t=>t.id!==e),f(`update:modelValue`,{levels:_.value,filters:T.value})}function ce(){_.value=[...L],T.value=[],f(`update:modelValue`,{levels:[...L],filters:[]})}return h(()=>{}),(t,n)=>(v(),u(`div`,Ee,[l(`div`,De,[r(e(P),{modelValue:_.value,"onUpdate:modelValue":n[0]||=e=>_.value=e,options:e(g),"option-label":`label`,"option-value":`value`,placeholder:e(s)(`logFilter.levelsPlaceholder`),class:`log-filter__levels`,size:`small`,"max-selected-labels":3,display:`chip`},{option:x(({option:e})=>[l(`div`,Oe,[l(`span`,{class:`log-filter__level-dot`,style:y({backgroundColor:e.color})},null,4),i(` `+S(e.label),1)])]),chip:x(({value:e})=>[l(`div`,ke,[l(`span`,{class:`log-filter__level-dot`,style:y({backgroundColor:m[e]})},null,4),i(` `+S(e.charAt(0).toUpperCase()+e.slice(1)),1)])]),_:1},8,[`modelValue`,`options`,`placeholder`]),r(e(F),{icon:`ti ti-filter`,label:e(s)(`logFilter.addFilter`),size:`small`,severity:`secondary`,badge:T.value.length>0?String(T.value.length):void 0,"badge-severity":`contrast`,onClick:ne},null,8,[`label`,`badge`]),T.value.length>0||_.value.length<e(L).length?(v(),w(e(F),{key:0,icon:`ti ti-filter-off`,variant:`text`,rounded:``,size:`small`,severity:`secondary`,"aria-label":e(s)(`logFilter.clearAll`),title:e(s)(`logFilter.clearAll`),onClick:ce},null,8,[`aria-label`,`title`])):D(``,!0)]),T.value.length>0?(v(),u(`div`,Ae,[(v(!0),u(b,null,d(T.value,t=>(v(),u(`span`,{key:t.id,class:p([`log-filter__badge`,t.type===`include`?`log-filter__badge--include`:`log-filter__badge--exclude`]),title:`${t.type} · ${t.isRegex?`regex`:`text`}: ${t.pattern}`},[l(`span`,Me,S(t.type===`include`?`+`:`−`),1),t.isRegex?(v(),u(`span`,Ne,`.*`)):D(``,!0),l(`span`,Pe,S(t.pattern),1),l(`button`,{class:`log-filter__badge-remove`,"aria-label":e(s)(`logFilter.removeFilter`),onClick:e=>se(t.id)},[...n[5]||=[l(`i`,{class:`ti ti-x`,style:{"font-size":`0.6rem`}},null,-1)]],8,Fe)],10,je))),128))])):D(``,!0),r(e(M),{ref_key:`popoverRef`,ref:O},{default:x(()=>[l(`div`,Ie,[l(`p`,Le,S(e(s)(`logFilter.newFilter`)),1),l(`div`,Re,[l(`button`,{class:p([`log-filter__type-btn`,A.value===`include`&&`log-filter__type-btn--active-include`]),onClick:n[1]||=e=>A.value=`include`},[n[6]||=l(`i`,{class:`ti ti-plus`},null,-1),i(` `+S(e(s)(`logFilter.include`)),1)],2),l(`button`,{class:p([`log-filter__type-btn`,A.value===`exclude`&&`log-filter__type-btn--active-exclude`]),onClick:n[2]||=e=>A.value=`exclude`},[n[7]||=l(`i`,{class:`ti ti-minus`},null,-1),i(` `+S(e(s)(`logFilter.exclude`)),1)],2)]),l(`div`,ze,[l(`label`,Be,S(e(s)(`logFilter.regex`)),1),l(`button`,{id:`logfilter-regex-toggle`,class:p([`log-filter__regex-toggle`,j.value&&`log-filter__regex-toggle--on`]),onClick:n[3]||=e=>{j.value=!j.value,N.value=``}},` .* `,2)]),l(`div`,Ve,[r(e(te),{modelValue:k.value,"onUpdate:modelValue":n[4]||=e=>k.value=e,placeholder:j.value?e(s)(`logFilter.regexPlaceholder`):e(s)(`logFilter.filterPlaceholder`),class:`log-filter__popover-input`,invalid:!!N.value,autofocus:``,onInput:oe,onKeydown:ae},null,8,[`modelValue`,`placeholder`,`invalid`]),N.value?(v(),u(`p`,He,S(N.value),1)):D(``,!0)]),l(`div`,Ue,[r(e(F),{label:e(s)(`logFilter.add`),icon:`ti ti-check`,size:`small`,disabled:!k.value.trim(),onClick:ie},null,8,[`label`,`disabled`]),r(e(F),{label:e(s)(`logFilter.cancel`),size:`small`,severity:`secondary`,variant:`text`,onClick:re},null,8,[`label`])])])]),_:1},512)]))}}),[[`__scopeId`,`data-v-69deb3b1`]]),Ge,{min:X,max:Z,abs:Ke,floor:qe}=Math,Je=(e,t,n)=>X(n,Z(t,e)),Ye=e=>e.sort((e,t)=>e-t),Xe=setTimeout,Ze=clearTimeout,Qe=typeof queueMicrotask==`function`?queueMicrotask:e=>{Promise.resolve().then(e)},$e=()=>{let e;return[new Promise(t=>{e=t}),e]},et=e=>e.ownerDocument,tt=e=>e.defaultView,nt=()=>(Ge??=/iP(hone|od|ad)/.test(navigator.userAgent)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>0,Ge),rt=e=>Z(e.t(),e.o()),it=({l:e,i:t,u:n,p:r,m:i,h:a,t:o,S:s,v:c,I:l},u=0)=>{let d=!!l,f=!!u,p=1,m=0,h=0,g=0,_=0,v=0,y=0,b=0,x=0,S=null,C=[0,f?Z(u-1,0):-1],w=0,T=!1,E=new Set,D=()=>g-h,O=()=>D()+v+_,k=e=>n(e)-v,A=e=>{e&&(nt()&&b!==0||S&&x===1?v+=e:_+=e)};return{k:()=>{E.clear()},O:()=>p,l:(t=200)=>{if(!T||f)return C;let n,r;if(y)[n,r]=C;else{let i=Z(0,O()),a=i+m;d||(t=Z(0,t),b!==1&&(i-=t),b!==2&&(a+=t)),[n,r]=C=e(Z(0,i),Z(0,a)),S&&(n=X(n,S[0]),r=Z(r,S[1]))}return[Z(n,0),X(r,s()-1)]},T:e=>t(e-h),R:a,u:k,p:r,N:s,A:()=>g,M:()=>b!==0,o:()=>m,C:()=>h,t:o,j:()=>(y=_,_=0,[y,x===2]),q:(e,t)=>{let n=[e,t];return E.add(n),()=>{E.delete(n)}},P:(n,s)=>{let u,C,j=0;switch(n){case 1:{if(s===g&&x===0)break;let e=y;y=0;let t=s-g,n=Ke(t);e&&n<Ke(e)+1||x!==0||(b=t<0?2:1),f&&=!1,g=s,j=4;let r=D();r>=-m&&r<=o()&&(j+=1,C=n>m);break}case 2:j=8,b!==0&&(u=!0,j+=1),b=0,x=0,S=null;break;case 3:{let e=s.filter(([e,t])=>!a(e,t));if(!e.length)break;A(e.reduce((e,[t,n])=>{let i;if(x===2)i=!0;else if(S&&x===1)i=t<S[0];else{let e=D(),n=k(t),a=r(t);i=b!==1&&x===0?n+a<=e:n<e&&n+a<e+m}return i&&(e+=n-r(t)),e},0));for(let[t,n]of e){let e=r(t),a=i(t,n);d&&(w+=a?n:n-e)}d&&m&&w>m&&(A(l(t(O()))),d=!1),j=3,C=!0;break}case 4:m!==s&&(m||(T=C=!0),m=s,j=3);break;case 5:s[1]?(A(c(s[0],!0)),x=2,j=1):(c(s[0]),j=1);break;case 6:h=s;break;case 7:x=1;break;case 9:A(s),j=3;break;case 8:S=e(s,s+m),j=1}j&&(p=1+(2147483647&p),u&&v&&(_+=v,v=0),E.forEach(([e,t])=>{j&e&&t(C)}))}}},Q=(e,t,n)=>{let r=n?`unshift`:`push`;for(let n=0;n<t;n++)e[r](-1);return e},$=(e,t,n,r=0,i=t-1)=>{let a=r;for(;r<=i;){let t=qe((r+i)/2);e(t)<=n?(a=t,r=t+1):i=t-1}return Je(a,0,t-1)},at=(e,t,n)=>{let r=n&&n[1]||t||40,i=-1,a=0,o=n&&n[0],s=o?Q(o.slice(0,X(e,o.length)),Z(0,e-o.length)):Q([],e),c=Q([],e+1),l=e=>{let t=s[e];return t===-1?r:t},u=t=>{if(!e)return 0;if(i>=t)return c[t];i<0&&(c[0]=0,i=0);let n=i,r=c[n];for(;n<t;)r+=l(n),c[++n]=r;return i=t,r};return{l:(t,n)=>{let r,i;return a=X(a,e-1),u(a)<=t?(i=$(u,e,n,a),r=$(u,e,t,a,i)):(r=$(u,e,t,void 0,a),i=$(u,e,n,r)),a=r,[r,i]},i:t=>$(u,e,t),u,p:l,m:(e,t)=>{let n=s[e]===-1;return s[e]=t,i=X(e,i),n},h:(e,t=-1)=>s[e]===t,t:()=>u(e),S:()=>e,v:(t,n)=>{let a=t-e;return i=n?-1:X(t-1,i),e=t,a>0?(Q(c,a),Q(s,a,n),r*a):(c.splice(a),(n?s.splice(0,-a):s.splice(a)).reduce((e,t)=>e-(t===-1?r:t),0))},I:t?void 0:e=>{let t=0,n=[];s.forEach((r,i)=>{r!==-1&&(r&&n.push(r),i<e&&t++)}),i=-1,Ye(n);let a=n.length,o=a/2|0,c=a%2==0?(n[o-1]+n[o])/2:n[o],l=r;return((r=c)-l)*Z(e-t,0)},B:()=>[s.slice(),r]}},ot=e=>{let t;return{X(n){(t||=new(tt(et(n))).ResizeObserver(e)).observe(n)},Y(e){t.unobserve(e)},J(){t&&t.disconnect()}}},st=(e,t,n,r,i,a,o)=>{let s,c,l=0,u=!1,d=!1,f=!1,p=!1,m=Date.now,h=r?`scrollLeft`:`scrollTop`,g=r?`left`:`top`,_=e=>i?-e:e,v=()=>_(n[h]),y=(e,t)=>{n.scrollTo({[g]:_(e),behavior:t?`smooth`:`instant`})},b=()=>{if(u||d)return u=!1,void x();f=!1,e.P(2)},x=()=>{Ze(c),c=Xe(b,150)},S=()=>{l=m(),f&&(p=!0),o&&e.P(6,o()),e.P(1,v()),x()},C=t=>{if(u||!e.M()||t.ctrlKey)return;let n=m()-l;150>n&&50<n&&(r?t.deltaX:t.deltaY)&&(u=!0)},w=()=>{d=!0,f=p=!1},T=()=>{d=!1,nt()&&(f=!0)};return t.addEventListener(`scroll`,S),t.addEventListener(`wheel`,C,{passive:!0}),t.addEventListener(`touchstart`,w,{passive:!0}),t.addEventListener(`touchend`,T,{passive:!0}),{J:()=>{t.removeEventListener(`scroll`,S),t.removeEventListener(`wheel`,C),t.removeEventListener(`touchstart`,w),t.removeEventListener(`touchend`,T),Ze(c)},U:()=>{let[t,r]=e.j();if(!t)return;p&&a&&a(),p=!1;let i=e.A()+t;i<=0||i>=e.C()+e.t()-e.o()?y(i):n.scrollBy({[g]:_(t),behavior:`instant`}),r&&(s&&s(),e.o()>e.t()&&e.P(1,v()))},G:(t,n)=>{let r,i,a;s&&s();let o=s=()=>{r=!0,Ze(i),a&&a()},c=()=>{if(!r){if(e.o()&&(Ze(i),i=Xe(o,150)),n){for(let[t,n]=e.l(0);t<=n;t++)if(e.R(t))return;o()}e.P(7),y(t(),n)}},l=()=>{if(r)return;let t;a=e.q(2,()=>{t||(t=!0,Qe(()=>{t=!1,c()}))}),c()};n?(e.P(8,t()),Qe(l)):l()}}},ct=(e,t)=>{e.K(()=>t)},lt=(e,t,n,{align:r,smooth:i,offset:a=0}={})=>{if(n=Je(n,0,t.N()-1),r===`nearest`){let e=t.u(n),i=t.A();if(e<i)r=`start`;else{if(!(e+t.p(n)>i+t.o()))return;r=`end`}}e.K(()=>a+e.Z()+t.u(n)+(r===`end`?t.p(n)-t.o():r===`center`?(t.p(n)-t.o())/2:0),i)},ut=_(e=>{let n=t(),i=g(()=>e.ee.value&&e.te.u(e.oe)),o=g(()=>e.ee.value&&e.te.R(e.oe)),s=g(()=>e.re({item:e.ne,index:e.oe}));return a(()=>n.value&&e.oe,(t,r,i)=>{i(e.se(n.value,e.oe))},{flush:`post`}),()=>{let{le:t,ie:a,ce:c,oe:l,ne:u}=e,d=o.value,{style:f,...p}=e.ae?.({item:u,index:l})||{},h={contain:`layout style`,position:d&&a?void 0:`absolute`,[t?`height`:`width`]:`100%`,[t?`top`:`left`]:`0px`,[t?`insetInlineStart`:`top`]:i.value+`px`,visibility:!d||a?void 0:`hidden`,...f};return t&&(h.display=`inline-flex`),r(c,m({ref:n,style:h},p),{default:()=>[s.value]},16,[`style`])}},{props:{ee:null,te:null,re:null,ne:null,se:null,oe:null,le:null,ie:null,ce:null,ae:null}}),dt=(e,t)=>{if(e.length===1){let t=e[0].key;if(t!=null)return t}return`_`+t},ft=(e,t)=>e[0]===t[0]&&e[1]===t[1],pt=_({props:{data:{type:Array,required:!0},bufferSize:Number,itemSize:Number,shift:Boolean,horizontal:Boolean,startMargin:{type:Number,default:0},ssrCount:Number,scrollRef:Object,as:{type:String,default:`div`},item:{type:String,default:`div`},itemProps:Function,keepMounted:Array,cache:Object},emits:[`scroll`,`scrollEnd`],setup(e,{emit:n,expose:i,slots:o}){let s=!!e.ssrCount,l=e.horizontal,u=t(),d=at(e.data.length,e.itemSize,e.cache),p=it(d,e.ssrCount),m=((e,t)=>{let n,r,i=$e(),a=new WeakMap,o=ot(r=>{let i=[];for(let{target:o,contentRect:{width:s,height:c}}of r)if(o===n)(s||c)&&e.P(4,t?s:c);else if(o.offsetParent){let e=a.get(o);e!=null&&i.push([e,t?s:c])}i.length&&e.P(3,i)});return{ue(a,s=a.parentElement){o.X(n=s),r=st(e,s,s,t,t&&getComputedStyle(s).direction===`rtl`,()=>{let e=t?`overflowX`:`overflowY`,n=s.style,r=n[e];n[e]=`hidden`,Xe(()=>{n[e]=r})}),i[1](!0)},k(){o.J(),r&&r.J(),i[1](!1),i=$e()},fe:(e,t)=>(a.set(e,t),o.X(e),()=>{a.delete(e),o.Y(e)}),async K(e,t){await i[0]&&r.G(e,t)},de(){r&&r.U()},Z:e.C}})(p,l),_=t(p.O());p.q(1,()=>{_.value=p.O()}),p.q(4,()=>{n(`scroll`,p.A())}),p.q(8,()=>{n(`scrollEnd`)});let v=g(t=>{_.value;let n=p.l(e.bufferSize);return t&&ft(t,n)?t:n}),y=g(()=>_.value&&p.M()),b=g(()=>_.value&&p.t());return f(()=>{s=!1;let t=u.value,n=requestAnimationFrame(()=>{m.ue(t,e.scrollRef)});h(()=>{cancelAnimationFrame(n)})}),h(()=>{p.k(),m.k()}),a(()=>e.data.length,t=>{p.P(5,[t,e.shift])}),a(()=>e.startMargin,e=>{p.P(6,e)},{immediate:!0}),a([_],()=>{m.de()},{flush:`post`}),i({get cache(){return d.B()},get scrollOffset(){return p.A()},get scrollSize(){return rt(p)},get viewportSize(){return p.o()},findItemIndex:p.T,getItemOffset:p.u,getItemSize:p.p,scrollToIndex:(e,t)=>lt(m,p,e,t),scrollTo:e=>ct(m,e),scrollBy:e=>((e,t,n)=>{ct(e,n+t.A())})(m,p,e)}),()=>{let t=e.as,n=e.item,i=b.value,a=[],d=t=>{let i=o.default({item:e.data[t],index:t});return r(ut,{key:dt(i,t),ee:_,te:p,se:m.fe,oe:t,re:o.default,ne:e.data[t],le:l,ie:s,ce:n,ae:e.itemProps},null,8,[`ee`,`te`,`se`,`oe`,`re`,`ne`,`le`,`ie`,`ce`,`ae`])};if(e.keepMounted){let t=e.data.length,n=new Set(e.keepMounted);for(let[e,t]=v.value;e<=t;e++)n.add(e);Ye([...n]).forEach(e=>{e<t&&a.push(d(e))})}else for(let[e,t]=v.value;e<=t;e++)a.push(d(e));return r(t,{ref:u,style:{contain:`size style`,overflowAnchor:`none`,flex:`none`,position:`relative`,width:l?i+`px`:`100%`,height:l?`100%`:i+`px`,pointerEvents:y.value?`none`:void 0}},typeof(f=a)==`function`||Object.prototype.toString.call(f)===`[object Object]`&&!c(f)?a:{default:()=>[a],_:2},8,[`style`]);var f}}}),mt=_({props:{data:{type:Array,required:!0},bufferSize:Number,itemSize:Number,shift:Boolean,horizontal:Boolean,ssrCount:Number,itemProps:Function,keepMounted:Array,cache:Object},emits:[`scroll`,`scrollEnd`],setup(e,{emit:n,expose:i,slots:a}){let o=e.horizontal,s=e=>{n(`scroll`,e)},l=()=>{n(`scrollEnd`)},u=t();return i({get cache(){return u.value.cache},get scrollOffset(){return u.value.scrollOffset},get scrollSize(){return u.value.scrollSize},get viewportSize(){return u.value.viewportSize},findItemIndex:(...e)=>u.value.findItemIndex(...e),getItemOffset:(...e)=>u.value.getItemOffset(...e),getItemSize:(...e)=>u.value.getItemSize(...e),scrollToIndex:(...e)=>u.value.scrollToIndex(...e),scrollTo:(...e)=>u.value.scrollTo(...e),scrollBy:(...e)=>u.value.scrollBy(...e)}),()=>{return r(`div`,{style:{display:o?`inline-block`:`block`,[o?`overflowX`:`overflowY`]:`auto`,contain:`strict`,width:`100%`,height:`100%`}},[r(pt,{ref:u,data:e.data,bufferSize:e.bufferSize,itemSize:e.itemSize,itemProps:e.itemProps,shift:e.shift,ssrCount:e.ssrCount,horizontal:o,keepMounted:e.keepMounted,cache:e.cache,onScroll:s,onScrollEnd:l},(t=a,typeof t==`function`||Object.prototype.toString.call(t)===`[object Object]`&&!c(t)?a:{default:()=>[a],_:2}),8,[`data`,`bufferSize`,`itemSize`,`itemProps`,`shift`,`ssrCount`,`horizontal`,`keepMounted`,`cache`,`onScroll`,`onScrollEnd`])],4);var t}}}),ht={class:`log-viewer`},gt={class:`log-viewer__toolbar`},_t={class:`log-viewer__toolbar-right`},vt={class:`log-viewer__count`},yt=[`title`],bt=[`title`],xt={class:`log-viewer__pin-wrap`},St=[`title`],Ct={key:0,class:`log-viewer__loading`},wt={key:1,class:`log-viewer__scroll log-viewer__empty`},Tt={class:`log-viewer__simple-line`},Et={key:0,class:`log-viewer__time-separator`},Dt={class:`log-viewer__time-separator-label`},Ot=150,kt=2e3,At=I(_({__name:`LogViewer`,props:{logs:{},loading:{type:Boolean,default:!1},receivedPerSec:{default:void 0},flushedPerSec:{default:void 0},processStartedAt:{default:void 0},showStats:{type:Boolean,default:!1},serviceLabel:{default:void 0}},emits:[`filter-change`,`log-click`],setup(o,{emit:s}){let c=o,p=s,{t:m}=ee(),h=[10,50,100,200,500,1e3,2e3,5e3,1e4],_=t(500),y=t({levels:[...L],filters:[]}),T=t(!0),E=t(null),O=t(!1),k=t(!1),A=t(0),j;function M(e){let t=0;for(let n of e)n.hidden&&!n.logCard&&t++;return t}function te(e){if(j===void 0)return null;for(let t=e.length-1;t>=0;t--)if(e[t].id===j)return e.slice(t+1);return null}function P(e){let t=e.length>_.value?e.slice(e.length-_.value):e;j=t[t.length-1]?.id,H.value=M(t),ge(t),T.value&&C(()=>C(q))}function I(e){e.length!==0&&(j=e[e.length-1].id,H.value+=M(e),he(e,pe(),B.value),B.value.length>_.value?B.value=B.value.slice(B.value.length-_.value):n(B),T.value&&C(q))}function R(){if(A.value===0)return;A.value=0;let e=c.logs,t=te(e);t===null?P(e):I(t)}a(()=>c.logs,e=>{if(e.length===0){j=void 0,A.value=0,H.value=0,ge([]);return}if(!T.value){let t=te(e);A.value=t===null?e.length:t.length;return}if(j===void 0){P(e);return}let t=te(e);t===null?P(e):I(t)},{deep:!1}),f(()=>{c.logs.length>0&&P(c.logs)});let z=new WeakMap;function de(e){if(z.has(e))return z.get(e);try{let t=new RegExp(e.pattern,`i`);return z.set(e,t),t}catch{return z.set(e,null),null}}function fe(e,t){if(e.isRegex){let n=de(e);return n?n.test(t):!1}return t.toLowerCase().includes(e.pattern.toLowerCase())}function pe(){return{levelSet:new Set(y.value.levels),filterAll:y.value.levels.length>=L.length,includes:y.value.filters.filter(e=>e.type===`include`),excludes:y.value.filters.filter(e=>e.type===`exclude`),hidden:O.value}}function me(e,t){return!(!t.hidden&&e.hidden||!t.filterAll&&!t.levelSet.has(e.level)||t.includes.length>0&&!t.includes.some(t=>fe(t,e.message))||t.excludes.some(t=>fe(t,e.message)))}let B=t([]),V=new Map;function he(e,t,n){for(let r of e){let e=r.logCard;if(e){if(e.state===`self`){me(r,t)&&n.push({...r,_type:`log`});continue}if(e.state===`open`){let t={_type:`card`,id:e.id,type:e.type,header:e.header,collapsable:e.collapsable??!0,defaultCollapsed:e.collapsed??!1,body:[]};V.set(e.id,t),n.push(t);continue}if(e.state===`close`){V.delete(e.id);continue}let i=V.get(e.id);i&&me(r,t)&&i.body.push(r);continue}me(r,t)&&n.push({...r,_type:`log`})}}function ge(e){V=new Map;let t=pe(),n=[];he(e,t,n),B.value=n}a([y,O,_],()=>{P(c.logs)});let H=t(0),U=t(null),W=t(null);a(()=>c.logs,e=>{if(e.length===0){U.value=null,W.value=null;return}let t=Date.now();U.value===null&&(U.value=t),W.value=t});let _e=g(()=>{if(U.value===null||W.value===null)return null;let e=W.value-U.value;return e<=0?null:e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:e<36e5?`${Math.floor(e/6e4)}m ${Math.floor(e%6e4/1e3)}s`:`${Math.floor(e/36e5)}h ${Math.floor(e%36e5/6e4)}m`}),G=0,K=0;function q(){E.value&&B.value.length!==0&&(G=Date.now()+Ot,E.value.scrollToIndex(B.value.length-1,{align:`end`}))}function ve(e){let t=e<K;if(!t&&Date.now()<G){K=e;return}if(K=e,!E.value)return;let n=E.value.scrollSize-e-E.value.viewportSize;T.value?t&&n>1&&(T.value=!1):n<=1&&(T.value=!0,R(),C(q))}function ye(){T.value=!T.value,T.value&&(R(),C(q))}f(()=>{T.value&&C(q)});function be(e){y.value=e}function xe(e){p(`log-click`,e)}let Se=t(null),Y=t(!1),Ce=ie(),{openWithContext:we}=se(),Ee=``;function De(){let e=window.getSelection();return e&&e.toString().trim()?e.toString().trim():``}function Oe(){return B.value.map(e=>e._type===`card`?e.body.map(e=>`[${e.level}] ${e.message}`).join(`
|
|
1
|
+
import{B as e,C as t,z as n}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{D as r,E as i,Ht as a,St as o,Yt as s,Z as c,_ as l,b as u,bt as d,ct as f,en as p,et as m,ft as h,g,k as _,mt as v,nn as y,o as b,qt as x,rn as S,tt as C,v as w,wt as T,xt as E,y as D}from"./runtime-core.esm-bundler-DujKY9QV.js";import{C as O,S as k,t as A,w as j}from"./runtime-dom.esm-bundler-CyEVRK6B.js";import{n as ee}from"./vue-i18n-o7yraQpR.js";import{C as M,H as N,J as te,S as ne,Y as re,a as P,dt as F,ft as I}from"./src-Ck_MutzB.js";import{r as ie}from"./scenario.store-C9sSoRzb.js";import{r as ae,t as oe}from"./AiChatModals-BV3vIIqN.js";import{t as se}from"./useAiChatDrawer-D_ofn8Eo.js";import{i as L}from"./dist-C9Qdh18x.js";import{I as ce,N as R}from"./index-mvpLwxNT.js";import{t as le}from"./useProjectCloudOrg-B3rNPes5.js";import{t as ue}from"./SendToChatDialog-BVSbXcbf.js";var z=e=>Array.isArray(e),de=e=>typeof e==`object`&&!!e&&!Array.isArray(e),fe=e=>e===null?`var(--jtv-null-color)`:{string:`var(--jtv-string-color)`,number:`var(--jtv-number-color)`,boolean:`var(--jtv-boolean-color)`}[typeof e]??`var(--jtv-valueKey-color)`,pe=e=>`"${e}":`,me=(e,t)=>e===1?`${e} ${t?`element`:`property`}`:`${e} ${t?`elements`:`properties`}`,B=(e,t,n,r=!1)=>n?r?`${e}${t}[${t}].`:`${e}${t}.`:e,V=(e,t,n)=>n?`${e}${t}`:e.slice(0,-1),he={class:`json-view-item`},ge=[`aria-expanded`],H={class:`properties`},U={class:`value-key`},W=function(e){return e[e.OBJECT=0]=`OBJECT`,e[e.ARRAY=1]=`ARRAY`,e[e.VALUE=2]=`VALUE`,e}({}),_e=_({name:`JsonTreeViewItem`,__name:`JsonTreeViewItem`,props:{data:{},maxDepth:{default:1},canSelect:{type:Boolean,default:!1}},emits:[`selected`],setup(e,{emit:n}){let i=n,a=t(e.data.depth<e.maxDepth),c=()=>{a.value=!a.value},f=e=>{let t={key:e.key,value:e.value,path:e.path};i(`selected`,t)},m=e=>i(`selected`,e),h=g(()=>({"chevron-arrow":!0,opened:a.value})),_=g(()=>({"value-key":!0,"can-select":e.canSelect})),C=g(()=>{let{length:t,type:n}=e.data;return t===void 0?``:me(t,n===1)}),E=g(()=>JSON.stringify(e.data.value)),ee=e=>pe(e.key),M=e=>fe(e);return(t,n)=>{let i=o(`JsonTreeViewItem`,!0);return v(),u(`div`,he,[e.data.type===0||e.data.type===1?(v(),u(b,{key:0},[l(`button`,{class:`data-key`,type:`button`,"aria-expanded":a.value,onClick:j(c,[`stop`])},[l(`div`,{class:p(h.value),"aria-hidden":`true`},null,2),l(`span`,null,S(e.data.key)+`:`,1),l(`span`,H,S(C.value),1)],8,ge),r(A,{name:`expand`},{default:x(()=>[s(l(`div`,null,[(v(!0),u(b,null,d(e.data.children,t=>(v(),w(i,{key:ee(t),data:t,"max-depth":e.maxDepth,"can-select":e.canSelect,onSelected:m},null,8,[`data`,`max-depth`,`can-select`]))),128))],512),[[k,a.value]])]),_:1})],64)):D(``,!0),e.data.type===2?(v(),w(T(e.canSelect?`button`:`div`),{key:1,class:p(_.value),type:e.canSelect?`button`:null,tabindex:e.canSelect?0:null,onClick:n[0]||=t=>e.canSelect?f(e.data):null,onKeyup:[n[1]||=O(t=>e.canSelect?f(e.data):null,[`enter`]),n[2]||=O(j(t=>e.canSelect?f(e.data):null,[`prevent`]),[`space`])]},{default:x(()=>[l(`span`,U,S(e.data.key)+`:`,1),l(`span`,{style:y({color:M(e.data.value)})},S(E.value),5)]),_:1},40,[`class`,`type`,`tabindex`])):D(``,!0)])}}}),G=((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})(_({name:`JsonTreeView`,__name:`JsonTreeView`,props:{json:{},rootKey:{default:`/`},maxDepth:{default:1},colorScheme:{default:`light`}},emits:[`selected`],setup(e,{emit:t}){let n=t,r=e=>n(`selected`,e),i=(e,t,n,r,i)=>{let a=t.map((t,a)=>s(a.toString(),t,n+1,B(r,e,i,!0),!1));return{key:e,type:W.ARRAY,depth:n,path:r,length:a.length,children:a}},a=(e,t,n,r,i)=>{let a=Object.entries(t).map(([t,a])=>s(t,a,n+1,B(r,e,i),!0));return{key:e,type:W.OBJECT,depth:n,path:r,length:a.length,children:a}},o=(e,t,n,r,i)=>({key:e,type:W.VALUE,path:V(r,e,i),depth:n,value:t}),s=(e,t,n,r,s)=>z(t)?i(e,t,n,r,s):de(t)?a(e,t,n,r,s):o(e,t,n,r,s),c=(e,t)=>{try{let n=JSON.parse(e);return de(n)||z(n)?s(t,n,0,``,!0):o(t,n,0,``,!0)}catch{return o(t,e,0,``,!0)}},l=g(()=>c(e.json,e.rootKey));return(t,n)=>(v(),w(_e,{class:p([`root-item`,{dark:e.colorScheme===`dark`}]),data:l.value,"max-depth":e.maxDepth,onSelected:r},null,8,[`class`,`data`,`max-depth`]))}}),[[`__scopeId`,`data-v-9f840ee1`]]),K={class:`log-card__icon`},q=[`innerHTML`],ve={key:0,class:`log-card__badge`},ye=[`innerHTML`],be={class:`log-card__clip`},xe=320,Se=150,J=I(_({__name:`LogCard`,props:{icon:{},title:{},color:{},badge:{},muted:{type:Boolean},defaultCollapsed:{type:Boolean},lastLine:{}},setup(n){let i=n,a=t(!i.defaultCollapsed),o=t(!!i.defaultCollapsed),s=t(!!i.defaultCollapsed);function c(){a.value?(a.value=!1,setTimeout(()=>{o.value=!0,s.value=!0},xe)):(o.value=!1,s.value=!1,setTimeout(()=>{a.value=!0},Se))}return(t,i)=>(v(),u(`div`,{class:p([`log-card`,{"log-card--muted":n.muted,"log-card--open":!s.value}])},[l(`div`,{class:`log-card__header`,style:y({background:n.color}),onClick:c},[l(`span`,K,S(n.icon),1),l(`span`,{class:`log-card__title`,innerHTML:e(R).sanitize(n.title)},null,8,q),n.badge?(v(),u(`span`,ve,S(n.badge),1)):D(``,!0),t.$slots.default?(v(),u(`span`,{key:1,class:p([`log-card__chevron`,{"log-card__chevron--open":!s.value}])},[...i[0]||=[l(`svg`,{width:`8`,height:`8`,viewBox:`0 0 8 8`,fill:`currentColor`},[l(`polygon`,{points:`0,0 8,4 0,8`})],-1)]],2)):D(``,!0)],4),t.$slots.default?(v(),u(b,{key:0},[r(A,{name:`dots`},{default:x(()=>[o.value?(v(),u(`div`,{key:0,class:`log-card__preview`,style:y({borderLeftColor:n.color})},[n.lastLine?(v(),u(`span`,{key:0,class:`log-card__last-line`,innerHTML:e(R).sanitize(n.lastLine)},null,8,ye)):(v(),u(b,{key:1},[i[1]||=l(`span`,{class:`log-card__dot`},null,-1),i[2]||=l(`span`,{class:`log-card__dot`},null,-1),i[3]||=l(`span`,{class:`log-card__dot`},null,-1)],64))],4)):D(``,!0)]),_:1}),l(`div`,{class:p([`log-card__grid`,{"log-card__grid--open":a.value}])},[l(`div`,be,[l(`div`,{class:`log-card__body`,style:y({borderLeftColor:n.color})},[E(t.$slots,`default`,{},void 0,!0)],4)])],2)],64)):D(``,!0)],2))}}),[[`__scopeId`,`data-v-641c6e90`]]),Y={key:5},Ce=[`title`],we=[`innerHTML`],Te=I(_({__name:`LogLine`,props:{log:{}},emits:[`click`],setup(t,{emit:n}){let a=t,o=n;function s(){let e=window.getSelection();e&&e.toString().length>0||o(`click`,a.log)}let c={debug:`#c72bd4`,info:`#a3a3a3`,warn:`#f59e0b`,error:`#ef4444`,fatal:`#ef4444`},d=g(()=>c[a.log.level]??`#a3a3a3`),f=g(()=>a.log.logCard?.state===`self`?a.log.logCard.type:null);function p(e){return e.metadata!=null&&Object.keys(e.metadata).length>0}function m(e){if(!e.metadata)return``;try{return JSON.stringify(e.metadata,null,2)}catch{return String(e.metadata)}}function h(e){return JSON.stringify(e.json)}return(n,o)=>(v(),u(`div`,null,[f.value===`command-start`?(v(),w(J,{key:0,icon:`⌗`,title:t.log.logCard.header,color:`#3b82f6`,onClick:s},{default:x(()=>[i(S(t.log.message),1)]),_:1},8,[`title`])):f.value===`command-fail`?(v(),w(J,{key:1,icon:`⌗`,title:t.log.logCard.header,color:`#ef4444`,badge:`✗ ${t.log.message}`,onClick:s},null,8,[`title`,`badge`])):f.value===`system-warn`?(v(),w(J,{key:2,icon:`⚠`,title:t.log.logCard.header,color:`#ef4444`,badge:t.log.message,onClick:s},null,8,[`title`,`badge`])):f.value===`json`?(v(),w(J,{key:3,icon:`</>`,title:t.log.logCard.header,color:d.value},{default:x(()=>[l(`div`,{onClick:o[0]||=j(()=>{},[`stop`])},[r(e(G),{json:h(a.log),maxDepth:2},null,8,[`json`])])]),_:1},8,[`title`,`color`])):t.log.json?(v(),w(J,{key:4,icon:`</>`,title:`JSON`,color:d.value,onClick:s},{default:x(()=>[l(`div`,{onClick:o[1]||=j(()=>{},[`stop`])},[r(e(G),{json:h(a.log),maxDepth:2},null,8,[`json`])])]),_:1},8,[`color`])):(v(),u(`div`,Y,[l(`div`,{class:`log-line`,"data-testid":`log-message`,style:y({boxShadow:`inset 3px 0 0 0 ${d.value}`}),title:p(a.log)?m(a.log):void 0,onClick:s},[l(`span`,{class:`log-message`,innerHTML:e(R).sanitize(a.log.message)},null,8,we)],12,Ce)]))]))}}),[[`__scopeId`,`data-v-6ac1d4e1`]]),Ee={class:`log-filter`},De={class:`log-filter__row`},Oe={class:`log-filter__level-option`},ke={class:`log-filter__level-chip`},Ae={key:0,class:`log-filter__badges`},je=[`title`],Me={class:`log-filter__badge-type`},Ne={key:0,class:`log-filter__badge-flag`},Pe={class:`log-filter__badge-pattern`},Fe=[`aria-label`,`onClick`],Ie={class:`log-filter__popover`},Le={class:`log-filter__popover-title`},Re={class:`log-filter__popover-row`},ze={class:`log-filter__popover-row log-filter__popover-row--between`},Be={for:`logfilter-regex-toggle`,class:`log-filter__popover-label`},Ve={class:`log-filter__popover-input-wrap`},He={key:0,class:`log-filter__popover-error`},Ue={class:`log-filter__popover-actions`},We=I(_({__name:`LogFilter`,props:{modelValue:{}},emits:[`update:modelValue`],setup(n,{emit:o}){let{t:s}=ee(),c=n,f=o,m={debug:`#c72bd4`,info:`#a3a3a3`,warn:`#f59e0b`,error:`#ef4444`,fatal:`#ef4444`},g=L.map(e=>({label:e.charAt(0).toUpperCase()+e.slice(1),value:e,color:m[e]??`#a3a3a3`})),_=t([...c.modelValue.levels]),T=t([...c.modelValue.filters]),E=!1;a(_,e=>{E||f(`update:modelValue`,{levels:e,filters:T.value})}),a(()=>c.modelValue,e=>{E=!0,_.value=[...e.levels],T.value=[...e.filters],C(()=>{E=!1})});let O=t(null),k=t(``),A=t(`include`),j=t(!1),N=t(``);function ne(e){O.value?.toggle(e)}function re(){O.value?.hide()}function I(e){try{return new RegExp(e),!0}catch(e){return N.value=e instanceof Error?e.message:`Invalid regex`,!1}}function ie(){let e=k.value.trim();e&&(N.value=``,(!j.value||I(e))&&(T.value=[...T.value,{id:`${Date.now()}-${Math.random()}`,pattern:e,type:A.value,isRegex:j.value}],k.value=``,f(`update:modelValue`,{levels:_.value,filters:T.value}),re()))}function ae(e){e.key===`Enter`&&(e.preventDefault(),ie()),e.key===`Escape`&&re()}function oe(){N.value=``}function se(e){T.value=T.value.filter(t=>t.id!==e),f(`update:modelValue`,{levels:_.value,filters:T.value})}function ce(){_.value=[...L],T.value=[],f(`update:modelValue`,{levels:[...L],filters:[]})}return h(()=>{}),(t,n)=>(v(),u(`div`,Ee,[l(`div`,De,[r(e(P),{modelValue:_.value,"onUpdate:modelValue":n[0]||=e=>_.value=e,options:e(g),"option-label":`label`,"option-value":`value`,placeholder:e(s)(`logFilter.levelsPlaceholder`),class:`log-filter__levels`,size:`small`,"max-selected-labels":3,display:`chip`},{option:x(({option:e})=>[l(`div`,Oe,[l(`span`,{class:`log-filter__level-dot`,style:y({backgroundColor:e.color})},null,4),i(` `+S(e.label),1)])]),chip:x(({value:e})=>[l(`div`,ke,[l(`span`,{class:`log-filter__level-dot`,style:y({backgroundColor:m[e]})},null,4),i(` `+S(e.charAt(0).toUpperCase()+e.slice(1)),1)])]),_:1},8,[`modelValue`,`options`,`placeholder`]),r(e(F),{icon:`ti ti-filter`,label:e(s)(`logFilter.addFilter`),size:`small`,severity:`secondary`,badge:T.value.length>0?String(T.value.length):void 0,"badge-severity":`contrast`,onClick:ne},null,8,[`label`,`badge`]),T.value.length>0||_.value.length<e(L).length?(v(),w(e(F),{key:0,icon:`ti ti-filter-off`,variant:`text`,rounded:``,size:`small`,severity:`secondary`,"aria-label":e(s)(`logFilter.clearAll`),title:e(s)(`logFilter.clearAll`),onClick:ce},null,8,[`aria-label`,`title`])):D(``,!0)]),T.value.length>0?(v(),u(`div`,Ae,[(v(!0),u(b,null,d(T.value,t=>(v(),u(`span`,{key:t.id,class:p([`log-filter__badge`,t.type===`include`?`log-filter__badge--include`:`log-filter__badge--exclude`]),title:`${t.type} · ${t.isRegex?`regex`:`text`}: ${t.pattern}`},[l(`span`,Me,S(t.type===`include`?`+`:`−`),1),t.isRegex?(v(),u(`span`,Ne,`.*`)):D(``,!0),l(`span`,Pe,S(t.pattern),1),l(`button`,{class:`log-filter__badge-remove`,"aria-label":e(s)(`logFilter.removeFilter`),onClick:e=>se(t.id)},[...n[5]||=[l(`i`,{class:`ti ti-x`,style:{"font-size":`0.6rem`}},null,-1)]],8,Fe)],10,je))),128))])):D(``,!0),r(e(M),{ref_key:`popoverRef`,ref:O},{default:x(()=>[l(`div`,Ie,[l(`p`,Le,S(e(s)(`logFilter.newFilter`)),1),l(`div`,Re,[l(`button`,{class:p([`log-filter__type-btn`,A.value===`include`&&`log-filter__type-btn--active-include`]),onClick:n[1]||=e=>A.value=`include`},[n[6]||=l(`i`,{class:`ti ti-plus`},null,-1),i(` `+S(e(s)(`logFilter.include`)),1)],2),l(`button`,{class:p([`log-filter__type-btn`,A.value===`exclude`&&`log-filter__type-btn--active-exclude`]),onClick:n[2]||=e=>A.value=`exclude`},[n[7]||=l(`i`,{class:`ti ti-minus`},null,-1),i(` `+S(e(s)(`logFilter.exclude`)),1)],2)]),l(`div`,ze,[l(`label`,Be,S(e(s)(`logFilter.regex`)),1),l(`button`,{id:`logfilter-regex-toggle`,class:p([`log-filter__regex-toggle`,j.value&&`log-filter__regex-toggle--on`]),onClick:n[3]||=e=>{j.value=!j.value,N.value=``}},` .* `,2)]),l(`div`,Ve,[r(e(te),{modelValue:k.value,"onUpdate:modelValue":n[4]||=e=>k.value=e,placeholder:j.value?e(s)(`logFilter.regexPlaceholder`):e(s)(`logFilter.filterPlaceholder`),class:`log-filter__popover-input`,invalid:!!N.value,autofocus:``,onInput:oe,onKeydown:ae},null,8,[`modelValue`,`placeholder`,`invalid`]),N.value?(v(),u(`p`,He,S(N.value),1)):D(``,!0)]),l(`div`,Ue,[r(e(F),{label:e(s)(`logFilter.add`),icon:`ti ti-check`,size:`small`,disabled:!k.value.trim(),onClick:ie},null,8,[`label`,`disabled`]),r(e(F),{label:e(s)(`logFilter.cancel`),size:`small`,severity:`secondary`,variant:`text`,onClick:re},null,8,[`label`])])])]),_:1},512)]))}}),[[`__scopeId`,`data-v-69deb3b1`]]),Ge,{min:X,max:Z,abs:Ke,floor:qe}=Math,Je=(e,t,n)=>X(n,Z(t,e)),Ye=e=>e.sort((e,t)=>e-t),Xe=setTimeout,Ze=clearTimeout,Qe=typeof queueMicrotask==`function`?queueMicrotask:e=>{Promise.resolve().then(e)},$e=()=>{let e;return[new Promise(t=>{e=t}),e]},et=e=>e.ownerDocument,tt=e=>e.defaultView,nt=()=>(Ge??=/iP(hone|od|ad)/.test(navigator.userAgent)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>0,Ge),rt=e=>Z(e.t(),e.o()),it=({l:e,i:t,u:n,p:r,m:i,h:a,t:o,S:s,v:c,I:l},u=0)=>{let d=!!l,f=!!u,p=1,m=0,h=0,g=0,_=0,v=0,y=0,b=0,x=0,S=null,C=[0,f?Z(u-1,0):-1],w=0,T=!1,E=new Set,D=()=>g-h,O=()=>D()+v+_,k=e=>n(e)-v,A=e=>{e&&(nt()&&b!==0||S&&x===1?v+=e:_+=e)};return{k:()=>{E.clear()},O:()=>p,l:(t=200)=>{if(!T||f)return C;let n,r;if(y)[n,r]=C;else{let i=Z(0,O()),a=i+m;d||(t=Z(0,t),b!==1&&(i-=t),b!==2&&(a+=t)),[n,r]=C=e(Z(0,i),Z(0,a)),S&&(n=X(n,S[0]),r=Z(r,S[1]))}return[Z(n,0),X(r,s()-1)]},T:e=>t(e-h),R:a,u:k,p:r,N:s,A:()=>g,M:()=>b!==0,o:()=>m,C:()=>h,t:o,j:()=>(y=_,_=0,[y,x===2]),q:(e,t)=>{let n=[e,t];return E.add(n),()=>{E.delete(n)}},P:(n,s)=>{let u,C,j=0;switch(n){case 1:{if(s===g&&x===0)break;let e=y;y=0;let t=s-g,n=Ke(t);e&&n<Ke(e)+1||x!==0||(b=t<0?2:1),f&&=!1,g=s,j=4;let r=D();r>=-m&&r<=o()&&(j+=1,C=n>m);break}case 2:j=8,b!==0&&(u=!0,j+=1),b=0,x=0,S=null;break;case 3:{let e=s.filter(([e,t])=>!a(e,t));if(!e.length)break;A(e.reduce((e,[t,n])=>{let i;if(x===2)i=!0;else if(S&&x===1)i=t<S[0];else{let e=D(),n=k(t),a=r(t);i=b!==1&&x===0?n+a<=e:n<e&&n+a<e+m}return i&&(e+=n-r(t)),e},0));for(let[t,n]of e){let e=r(t),a=i(t,n);d&&(w+=a?n:n-e)}d&&m&&w>m&&(A(l(t(O()))),d=!1),j=3,C=!0;break}case 4:m!==s&&(m||(T=C=!0),m=s,j=3);break;case 5:s[1]?(A(c(s[0],!0)),x=2,j=1):(c(s[0]),j=1);break;case 6:h=s;break;case 7:x=1;break;case 9:A(s),j=3;break;case 8:S=e(s,s+m),j=1}j&&(p=1+(2147483647&p),u&&v&&(_+=v,v=0),E.forEach(([e,t])=>{j&e&&t(C)}))}}},Q=(e,t,n)=>{let r=n?`unshift`:`push`;for(let n=0;n<t;n++)e[r](-1);return e},$=(e,t,n,r=0,i=t-1)=>{let a=r;for(;r<=i;){let t=qe((r+i)/2);e(t)<=n?(a=t,r=t+1):i=t-1}return Je(a,0,t-1)},at=(e,t,n)=>{let r=n&&n[1]||t||40,i=-1,a=0,o=n&&n[0],s=o?Q(o.slice(0,X(e,o.length)),Z(0,e-o.length)):Q([],e),c=Q([],e+1),l=e=>{let t=s[e];return t===-1?r:t},u=t=>{if(!e)return 0;if(i>=t)return c[t];i<0&&(c[0]=0,i=0);let n=i,r=c[n];for(;n<t;)r+=l(n),c[++n]=r;return i=t,r};return{l:(t,n)=>{let r,i;return a=X(a,e-1),u(a)<=t?(i=$(u,e,n,a),r=$(u,e,t,a,i)):(r=$(u,e,t,void 0,a),i=$(u,e,n,r)),a=r,[r,i]},i:t=>$(u,e,t),u,p:l,m:(e,t)=>{let n=s[e]===-1;return s[e]=t,i=X(e,i),n},h:(e,t=-1)=>s[e]===t,t:()=>u(e),S:()=>e,v:(t,n)=>{let a=t-e;return i=n?-1:X(t-1,i),e=t,a>0?(Q(c,a),Q(s,a,n),r*a):(c.splice(a),(n?s.splice(0,-a):s.splice(a)).reduce((e,t)=>e-(t===-1?r:t),0))},I:t?void 0:e=>{let t=0,n=[];s.forEach((r,i)=>{r!==-1&&(r&&n.push(r),i<e&&t++)}),i=-1,Ye(n);let a=n.length,o=a/2|0,c=a%2==0?(n[o-1]+n[o])/2:n[o],l=r;return((r=c)-l)*Z(e-t,0)},B:()=>[s.slice(),r]}},ot=e=>{let t;return{X(n){(t||=new(tt(et(n))).ResizeObserver(e)).observe(n)},Y(e){t.unobserve(e)},J(){t&&t.disconnect()}}},st=(e,t,n,r,i,a,o)=>{let s,c,l=0,u=!1,d=!1,f=!1,p=!1,m=Date.now,h=r?`scrollLeft`:`scrollTop`,g=r?`left`:`top`,_=e=>i?-e:e,v=()=>_(n[h]),y=(e,t)=>{n.scrollTo({[g]:_(e),behavior:t?`smooth`:`instant`})},b=()=>{if(u||d)return u=!1,void x();f=!1,e.P(2)},x=()=>{Ze(c),c=Xe(b,150)},S=()=>{l=m(),f&&(p=!0),o&&e.P(6,o()),e.P(1,v()),x()},C=t=>{if(u||!e.M()||t.ctrlKey)return;let n=m()-l;150>n&&50<n&&(r?t.deltaX:t.deltaY)&&(u=!0)},w=()=>{d=!0,f=p=!1},T=()=>{d=!1,nt()&&(f=!0)};return t.addEventListener(`scroll`,S),t.addEventListener(`wheel`,C,{passive:!0}),t.addEventListener(`touchstart`,w,{passive:!0}),t.addEventListener(`touchend`,T,{passive:!0}),{J:()=>{t.removeEventListener(`scroll`,S),t.removeEventListener(`wheel`,C),t.removeEventListener(`touchstart`,w),t.removeEventListener(`touchend`,T),Ze(c)},U:()=>{let[t,r]=e.j();if(!t)return;p&&a&&a(),p=!1;let i=e.A()+t;i<=0||i>=e.C()+e.t()-e.o()?y(i):n.scrollBy({[g]:_(t),behavior:`instant`}),r&&(s&&s(),e.o()>e.t()&&e.P(1,v()))},G:(t,n)=>{let r,i,a;s&&s();let o=s=()=>{r=!0,Ze(i),a&&a()},c=()=>{if(!r){if(e.o()&&(Ze(i),i=Xe(o,150)),n){for(let[t,n]=e.l(0);t<=n;t++)if(e.R(t))return;o()}e.P(7),y(t(),n)}},l=()=>{if(r)return;let t;a=e.q(2,()=>{t||(t=!0,Qe(()=>{t=!1,c()}))}),c()};n?(e.P(8,t()),Qe(l)):l()}}},ct=(e,t)=>{e.K(()=>t)},lt=(e,t,n,{align:r,smooth:i,offset:a=0}={})=>{if(n=Je(n,0,t.N()-1),r===`nearest`){let e=t.u(n),i=t.A();if(e<i)r=`start`;else{if(!(e+t.p(n)>i+t.o()))return;r=`end`}}e.K(()=>a+e.Z()+t.u(n)+(r===`end`?t.p(n)-t.o():r===`center`?(t.p(n)-t.o())/2:0),i)},ut=_(e=>{let n=t(),i=g(()=>e.ee.value&&e.te.u(e.oe)),o=g(()=>e.ee.value&&e.te.R(e.oe)),s=g(()=>e.re({item:e.ne,index:e.oe}));return a(()=>n.value&&e.oe,(t,r,i)=>{i(e.se(n.value,e.oe))},{flush:`post`}),()=>{let{le:t,ie:a,ce:c,oe:l,ne:u}=e,d=o.value,{style:f,...p}=e.ae?.({item:u,index:l})||{},h={contain:`layout style`,position:d&&a?void 0:`absolute`,[t?`height`:`width`]:`100%`,[t?`top`:`left`]:`0px`,[t?`insetInlineStart`:`top`]:i.value+`px`,visibility:!d||a?void 0:`hidden`,...f};return t&&(h.display=`inline-flex`),r(c,m({ref:n,style:h},p),{default:()=>[s.value]},16,[`style`])}},{props:{ee:null,te:null,re:null,ne:null,se:null,oe:null,le:null,ie:null,ce:null,ae:null}}),dt=(e,t)=>{if(e.length===1){let t=e[0].key;if(t!=null)return t}return`_`+t},ft=(e,t)=>e[0]===t[0]&&e[1]===t[1],pt=_({props:{data:{type:Array,required:!0},bufferSize:Number,itemSize:Number,shift:Boolean,horizontal:Boolean,startMargin:{type:Number,default:0},ssrCount:Number,scrollRef:Object,as:{type:String,default:`div`},item:{type:String,default:`div`},itemProps:Function,keepMounted:Array,cache:Object},emits:[`scroll`,`scrollEnd`],setup(e,{emit:n,expose:i,slots:o}){let s=!!e.ssrCount,l=e.horizontal,u=t(),d=at(e.data.length,e.itemSize,e.cache),p=it(d,e.ssrCount),m=((e,t)=>{let n,r,i=$e(),a=new WeakMap,o=ot(r=>{let i=[];for(let{target:o,contentRect:{width:s,height:c}}of r)if(o===n)(s||c)&&e.P(4,t?s:c);else if(o.offsetParent){let e=a.get(o);e!=null&&i.push([e,t?s:c])}i.length&&e.P(3,i)});return{ue(a,s=a.parentElement){o.X(n=s),r=st(e,s,s,t,t&&getComputedStyle(s).direction===`rtl`,()=>{let e=t?`overflowX`:`overflowY`,n=s.style,r=n[e];n[e]=`hidden`,Xe(()=>{n[e]=r})}),i[1](!0)},k(){o.J(),r&&r.J(),i[1](!1),i=$e()},fe:(e,t)=>(a.set(e,t),o.X(e),()=>{a.delete(e),o.Y(e)}),async K(e,t){await i[0]&&r.G(e,t)},de(){r&&r.U()},Z:e.C}})(p,l),_=t(p.O());p.q(1,()=>{_.value=p.O()}),p.q(4,()=>{n(`scroll`,p.A())}),p.q(8,()=>{n(`scrollEnd`)});let v=g(t=>{_.value;let n=p.l(e.bufferSize);return t&&ft(t,n)?t:n}),y=g(()=>_.value&&p.M()),b=g(()=>_.value&&p.t());return f(()=>{s=!1;let t=u.value,n=requestAnimationFrame(()=>{m.ue(t,e.scrollRef)});h(()=>{cancelAnimationFrame(n)})}),h(()=>{p.k(),m.k()}),a(()=>e.data.length,t=>{p.P(5,[t,e.shift])}),a(()=>e.startMargin,e=>{p.P(6,e)},{immediate:!0}),a([_],()=>{m.de()},{flush:`post`}),i({get cache(){return d.B()},get scrollOffset(){return p.A()},get scrollSize(){return rt(p)},get viewportSize(){return p.o()},findItemIndex:p.T,getItemOffset:p.u,getItemSize:p.p,scrollToIndex:(e,t)=>lt(m,p,e,t),scrollTo:e=>ct(m,e),scrollBy:e=>((e,t,n)=>{ct(e,n+t.A())})(m,p,e)}),()=>{let t=e.as,n=e.item,i=b.value,a=[],d=t=>{let i=o.default({item:e.data[t],index:t});return r(ut,{key:dt(i,t),ee:_,te:p,se:m.fe,oe:t,re:o.default,ne:e.data[t],le:l,ie:s,ce:n,ae:e.itemProps},null,8,[`ee`,`te`,`se`,`oe`,`re`,`ne`,`le`,`ie`,`ce`,`ae`])};if(e.keepMounted){let t=e.data.length,n=new Set(e.keepMounted);for(let[e,t]=v.value;e<=t;e++)n.add(e);Ye([...n]).forEach(e=>{e<t&&a.push(d(e))})}else for(let[e,t]=v.value;e<=t;e++)a.push(d(e));return r(t,{ref:u,style:{contain:`size style`,overflowAnchor:`none`,flex:`none`,position:`relative`,width:l?i+`px`:`100%`,height:l?`100%`:i+`px`,pointerEvents:y.value?`none`:void 0}},typeof(f=a)==`function`||Object.prototype.toString.call(f)===`[object Object]`&&!c(f)?a:{default:()=>[a],_:2},8,[`style`]);var f}}}),mt=_({props:{data:{type:Array,required:!0},bufferSize:Number,itemSize:Number,shift:Boolean,horizontal:Boolean,ssrCount:Number,itemProps:Function,keepMounted:Array,cache:Object},emits:[`scroll`,`scrollEnd`],setup(e,{emit:n,expose:i,slots:a}){let o=e.horizontal,s=e=>{n(`scroll`,e)},l=()=>{n(`scrollEnd`)},u=t();return i({get cache(){return u.value.cache},get scrollOffset(){return u.value.scrollOffset},get scrollSize(){return u.value.scrollSize},get viewportSize(){return u.value.viewportSize},findItemIndex:(...e)=>u.value.findItemIndex(...e),getItemOffset:(...e)=>u.value.getItemOffset(...e),getItemSize:(...e)=>u.value.getItemSize(...e),scrollToIndex:(...e)=>u.value.scrollToIndex(...e),scrollTo:(...e)=>u.value.scrollTo(...e),scrollBy:(...e)=>u.value.scrollBy(...e)}),()=>{return r(`div`,{style:{display:o?`inline-block`:`block`,[o?`overflowX`:`overflowY`]:`auto`,contain:`strict`,width:`100%`,height:`100%`}},[r(pt,{ref:u,data:e.data,bufferSize:e.bufferSize,itemSize:e.itemSize,itemProps:e.itemProps,shift:e.shift,ssrCount:e.ssrCount,horizontal:o,keepMounted:e.keepMounted,cache:e.cache,onScroll:s,onScrollEnd:l},(t=a,typeof t==`function`||Object.prototype.toString.call(t)===`[object Object]`&&!c(t)?a:{default:()=>[a],_:2}),8,[`data`,`bufferSize`,`itemSize`,`itemProps`,`shift`,`ssrCount`,`horizontal`,`keepMounted`,`cache`,`onScroll`,`onScrollEnd`])],4);var t}}}),ht={class:`log-viewer`},gt={class:`log-viewer__toolbar`},_t={class:`log-viewer__toolbar-right`},vt={class:`log-viewer__count`},yt=[`title`],bt=[`title`],xt={class:`log-viewer__pin-wrap`},St=[`title`],Ct={key:0,class:`log-viewer__loading`},wt={key:1,class:`log-viewer__scroll log-viewer__empty`},Tt={class:`log-viewer__simple-line`},Et={key:0,class:`log-viewer__time-separator`},Dt={class:`log-viewer__time-separator-label`},Ot=150,kt=2e3,At=I(_({__name:`LogViewer`,props:{logs:{},loading:{type:Boolean,default:!1},receivedPerSec:{default:void 0},flushedPerSec:{default:void 0},processStartedAt:{default:void 0},showStats:{type:Boolean,default:!1},serviceLabel:{default:void 0}},emits:[`filter-change`,`log-click`],setup(o,{emit:s}){let c=o,p=s,{t:m}=ee(),h=[10,50,100,200,500,1e3,2e3,5e3,1e4],_=t(500),y=t({levels:[...L],filters:[]}),T=t(!0),E=t(null),O=t(!1),k=t(!1),A=t(0),j;function M(e){let t=0;for(let n of e)n.hidden&&!n.logCard&&t++;return t}function te(e){if(j===void 0)return null;for(let t=e.length-1;t>=0;t--)if(e[t].id===j)return e.slice(t+1);return null}function P(e){let t=e.length>_.value?e.slice(e.length-_.value):e;j=t[t.length-1]?.id,H.value=M(t),ge(t),T.value&&C(()=>C(q))}function I(e){e.length!==0&&(j=e[e.length-1].id,H.value+=M(e),he(e,pe(),B.value),B.value.length>_.value?B.value=B.value.slice(B.value.length-_.value):n(B),T.value&&C(q))}function R(){if(A.value===0)return;A.value=0;let e=c.logs,t=te(e);t===null?P(e):I(t)}a(()=>c.logs,e=>{if(e.length===0){j=void 0,A.value=0,H.value=0,ge([]);return}if(!T.value){let t=te(e);A.value=t===null?e.length:t.length;return}if(j===void 0){P(e);return}let t=te(e);t===null?P(e):I(t)},{deep:!1}),f(()=>{c.logs.length>0&&P(c.logs)});let z=new WeakMap;function de(e){if(z.has(e))return z.get(e);try{let t=new RegExp(e.pattern,`i`);return z.set(e,t),t}catch{return z.set(e,null),null}}function fe(e,t){if(e.isRegex){let n=de(e);return n?n.test(t):!1}return t.toLowerCase().includes(e.pattern.toLowerCase())}function pe(){return{levelSet:new Set(y.value.levels),filterAll:y.value.levels.length>=L.length,includes:y.value.filters.filter(e=>e.type===`include`),excludes:y.value.filters.filter(e=>e.type===`exclude`),hidden:O.value}}function me(e,t){return!(!t.hidden&&e.hidden||!t.filterAll&&!t.levelSet.has(e.level)||t.includes.length>0&&!t.includes.some(t=>fe(t,e.message))||t.excludes.some(t=>fe(t,e.message)))}let B=t([]),V=new Map;function he(e,t,n){for(let r of e){let e=r.logCard;if(e){if(e.state===`self`){me(r,t)&&n.push({...r,_type:`log`});continue}if(e.state===`open`){let t={_type:`card`,id:e.id,type:e.type,header:e.header,collapsable:e.collapsable??!0,defaultCollapsed:e.collapsed??!1,body:[]};V.set(e.id,t),n.push(t);continue}if(e.state===`close`){V.delete(e.id);continue}let i=V.get(e.id);i&&me(r,t)&&i.body.push(r);continue}me(r,t)&&n.push({...r,_type:`log`})}}function ge(e){V=new Map;let t=pe(),n=[];he(e,t,n),B.value=n}a([y,O,_],()=>{P(c.logs)});let H=t(0),U=t(null),W=t(null);a(()=>c.logs,e=>{if(e.length===0){U.value=null,W.value=null;return}let t=Date.now();U.value===null&&(U.value=t),W.value=t});let _e=g(()=>{if(U.value===null||W.value===null)return null;let e=W.value-U.value;return e<=0?null:e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:e<36e5?`${Math.floor(e/6e4)}m ${Math.floor(e%6e4/1e3)}s`:`${Math.floor(e/36e5)}h ${Math.floor(e%36e5/6e4)}m`}),G=0,K=0;function q(){E.value&&B.value.length!==0&&(G=Date.now()+Ot,E.value.scrollToIndex(B.value.length-1,{align:`end`}))}function ve(e){let t=e<K;if(!t&&Date.now()<G){K=e;return}if(K=e,!E.value)return;let n=E.value.scrollSize-e-E.value.viewportSize;T.value?t&&n>1&&(T.value=!1):n<=1&&(T.value=!0,R(),C(q))}function ye(){T.value=!T.value,T.value&&(R(),C(q))}f(()=>{T.value&&C(q)});function be(e){y.value=e}function xe(e){p(`log-click`,e)}let Se=t(null),Y=t(!1),Ce=ie(),{openWithContext:we}=se(),Ee=``;function De(){let e=window.getSelection();return e&&e.toString().trim()?e.toString().trim():``}function Oe(){return B.value.map(e=>e._type===`card`?e.body.map(e=>`[${e.level}] ${e.message}`).join(`
|
|
2
2
|
`):`[${e.level}] ${e.message}`).join(`
|
|
3
3
|
`)}function ke(){Ee=De(),Y.value=!0}let{available:Ae}=le(),je=t(null);function Me(){let e=De()||Fe();e.trim()&&je.value?.open(e)}function Ne(e,t,n){Y.value=!1,Se.value?.showScenarioDialog(e,void 0,t,n??void 0)}async function Pe(e,t){Y.value=!1,await Ie(e===`keep`?void 0:e,t??void 0)}function Fe(){let e=Ee||Oe();return c.serviceLabel?`Service: ${c.serviceLabel}\n\n${e}`:e}async function Ie(e,t){let n=Fe();n.trim()&&(await Ce.createConversation({runner:e,providerId:t}),we({text:n,label:m(`logViewer.logsContext`),icon:`ti-list`}))}async function Le(e,t,n,r){let i=Fe(),a=t||i,o=await Ce.createConversation({scenarioId:e,scenarioInput:a});if(a&&o){let t=n!==`keep`||r.trim()?{...n===`keep`?{}:{runnerOverride:n},...r.trim()?{modelOverride:r.trim()}:{}}:void 0;Ce.startScenarioRun(o.id,e,a,void 0,t)}we({text:i,label:m(`logViewer.logsContext`),icon:`ti-list`})}function Re(e){return e._type===`card`?e.body[0]?.timestamp??``:e.timestamp}function ze(e){if(e===0)return!0;let t=B.value[e-1],n=B.value[e];return new Date(Re(n)).getTime()-new Date(Re(t)).getTime()>kt}function Be(e){return new Date(e).toLocaleString()}return(t,n)=>(v(),u(`div`,ht,[l(`div`,gt,[r(We,{"model-value":y.value,"onUpdate:modelValue":be},null,8,[`model-value`]),l(`div`,_t,[!k.value&&H.value>0?(v(),w(e(F),{key:0,icon:O.value?`ti ti-eye`:`ti ti-eye-off`,severity:O.value?`warn`:`secondary`,variant:`text`,rounded:``,size:`small`,"aria-label":O.value?e(m)(`logViewer.showingHidden`):e(m)(`logViewer.hiddenFiltered`),title:e(m)(`logViewer.hiddenLogsToggle`,{n:H.value}),onClick:n[0]||=e=>O.value=!O.value},null,8,[`icon`,`severity`,`aria-label`,`title`])):D(``,!0),l(`span`,vt,[i(S(k.value?c.logs.length:B.value.length)+` / `,1),r(e(ne),{modelValue:_.value,"onUpdate:modelValue":n[1]||=e=>_.value=e,options:h,size:`small`,class:`log-viewer__limit-select`,title:e(m)(`logViewer.maxLines`)},null,8,[`modelValue`,`title`])]),c.showStats&&_e.value!==null?(v(),u(`span`,{key:1,class:`log-viewer__stats`,title:e(m)(`logViewer.timeSpan`)},`⏱ `+S(_e.value),9,yt)):D(``,!0),c.showStats&&c.receivedPerSec!==void 0?(v(),u(`span`,{key:2,class:`log-viewer__stats`,title:e(m)(`logViewer.throughput`)},`↓`+S(c.receivedPerSec)+`/s · ⬡`+S(c.flushedPerSec)+`/s`,9,bt)):D(``,!0),r(e(F),{icon:k.value?`ti ti-code`:`ti ti-align-left`,severity:k.value?`warn`:`secondary`,variant:`text`,rounded:``,size:`small`,"aria-label":k.value?e(m)(`logViewer.simpleModeOn`):e(m)(`logViewer.simpleModeOff`),title:e(m)(`logViewer.toggleSimple`),onClick:n[2]||=e=>k.value=!k.value},null,8,[`icon`,`severity`,`aria-label`,`title`]),r(e(F),{icon:`ti ti-brain`,severity:`secondary`,variant:`text`,rounded:``,size:`small`,"aria-label":e(m)(`logViewer.sendToAi`),title:e(m)(`logViewer.sendToAiTitle`),onClick:ke},null,8,[`aria-label`,`title`]),e(Ae)?(v(),w(e(F),{key:3,icon:e(ce),severity:`secondary`,variant:`text`,rounded:``,size:`small`,"aria-label":e(m)(`logViewer.sendToChat`),title:e(m)(`logViewer.sendToChat`),onClick:Me},null,8,[`icon`,`aria-label`,`title`])):D(``,!0),l(`div`,xt,[r(e(F),{icon:T.value?`ti ti-player-pause`:`ti ti-arrow-down`,severity:T.value?`success`:`secondary`,variant:`text`,rounded:``,size:`small`,"aria-label":T.value?e(m)(`logViewer.autoScrollOn`):e(m)(`logViewer.autoScrollOff`),title:T.value?e(m)(`logViewer.live`):e(m)(`logViewer.paused`),onClick:ye},null,8,[`icon`,`severity`,`aria-label`,`title`]),!T.value&&A.value>0?(v(),u(`span`,{key:0,class:`log-viewer__waiting-badge`,title:e(m)(`logViewer.waitingLogs`,{n:A.value})},S(A.value>999?`999+`:A.value),9,St)):D(``,!0)])])]),o.loading&&c.logs.length===0?(v(),u(`div`,Ct,[r(e(N),{style:{width:`2rem`,height:`2rem`}}),l(`span`,null,S(e(m)(`logViewer.loading`)),1)])):B.value.length===0?(v(),u(`div`,wt,S(e(m)(`logViewer.empty`)),1)):k.value?(v(),w(e(mt),{key:2,ref_key:`listRef`,ref:E,data:c.logs,class:`log-viewer__scroll`,onScroll:ve},{default:x(({item:e})=>[l(`span`,Tt,S(e.raw),1)]),_:1},8,[`data`])):(v(),w(e(mt),{key:3,ref_key:`listRef`,ref:E,data:B.value,class:`log-viewer__scroll`,onScroll:ve},{default:x(({item:e,index:t})=>[ze(t)?(v(),u(`div`,Et,[n[4]||=l(`span`,{class:`log-viewer__time-separator-line`},null,-1),l(`span`,Dt,S(Be(Re(e))),1),n[5]||=l(`span`,{class:`log-viewer__time-separator-line`},null,-1)])):D(``,!0),e._type===`card`?(v(),w(J,{key:1,icon:`🐋`,title:e.header,color:`#1d4ed8`,"default-collapsed":e.defaultCollapsed,"last-line":e.body.length>0?e.body[e.body.length-1].message:void 0},{default:x(()=>[(v(!0),u(b,null,d(e.body,e=>(v(),w(Te,{key:e.id,log:e,onClick:xe},null,8,[`log`]))),128))]),_:2},1032,[`title`,`default-collapsed`,`last-line`])):(v(),w(Te,{key:2,log:e,onClick:xe},null,8,[`log`]))]),_:1},8,[`data`])),r(e(re),{visible:Y.value,header:e(m)(`kanban.board.launchAiDialog.header`),modal:!0,style:{width:`700px`,maxHeight:`80vh`},"onUpdate:visible":n[3]||=e=>{e||(Y.value=!1)}},{default:x(()=>[r(ae,{compact:``,onSelectScenario:Ne,onSkip:Pe})]),_:1},8,[`visible`,`header`]),r(oe,{ref_key:`aiModalsRef`,ref:Se,onConfirmScenarioStart:Le},null,512),e(Ae)?(v(),w(ue,{key:4,ref_key:`sendToChatRef`,ref:je},null,512)):D(``,!0)]))}}),[[`__scopeId`,`data-v-cf3a9fec`]]);export{At as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,C as t}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{D as n,E as r,Ht as i,_ as a,b as o,g as s,k as c,mt as l,o as u,qt as d,rn as f,v as p,y as m}from"./runtime-core.esm-bundler-DujKY9QV.js";import{n as h}from"./vue-i18n-o7yraQpR.js";import{J as g,W as _,Y as v,dt as y,ft as b,w as x}from"./src-
|
|
1
|
+
import{B as e,C as t}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{D as n,E as r,Ht as i,_ as a,b as o,g as s,k as c,mt as l,o as u,qt as d,rn as f,v as p,y as m}from"./runtime-core.esm-bundler-DujKY9QV.js";import{n as h}from"./vue-i18n-o7yraQpR.js";import{J as g,W as _,Y as v,dt as y,ft as b,w as x}from"./src-Ck_MutzB.js";import{r as S}from"./trpc-BQ0mLnfI.js";import{n as C,r as w}from"./error-DpF7X5iu.js";var T={own:`settingsPage.orgKeySourceOwn`,machine:`settingsPage.orgKeySourceMachine`,locked:`settingsPage.orgKeySourceLocked`};async function E(){return S.setup.getOrgKeys.query()}function D(e){return e.unreadable.apiKeys+e.unreadable.conversations+e.unreadable.secrets}function O(e){return!e.vault||e.vault.source===`locked`||e.syncMismatch?!0:e.canary!==`ok`}function k(e){return e.hasCanary?e.locked?e.isCurrentKey?`ok`:`no`:e.isCurrentKey?`current`:`differs`:`unverifiable`}function A(e){return e===`ok`||e===`differs`||e===`unverifiable`}var j={class:`org-key`},M={class:`org-key__hint`},N={class:`org-key__row`},P={class:`org-key__row`},F=b(c({__name:`OrgKeyPrompt`,props:{orgId:{},reference:{},title:{},hint:{},confirmLabel:{}},emits:[`close`,`adopted`],setup(c,{emit:b}){let T=c,E=b,{t:D}=h(),O=t(``),F=t(``),I=t(void 0),L=t(!1),R=t(``);i(()=>T.orgId,()=>{O.value=``,F.value=``,I.value=void 0,R.value=``});function z(e){return/^[0-9a-f]{64}$/i.test(e.trim())}let B=s(()=>{switch(I.value){case`ok`:return D(`settingsPage.adoptKeyMatch`);case`differs`:return D(`settingsPage.adoptKeyDiffers`);default:return D(`settingsPage.adoptKeyNoCanary`)}});async function V(){if(T.orgId){L.value=!0,R.value=``;try{if(T.reference===`cloud`){let e=await S.cloudSync.checkOrgKey.query({orgId:T.orgId,keyHex:O.value.trim()});I.value=e.matches?`ok`:`no`}else{let e=await S.setup.checkOrgKeyLocal.query({orgId:T.orgId,keyHex:O.value.trim()});I.value=k(e)}}catch(e){I.value=void 0,R.value=C(e)??``}finally{L.value=!1}}}async function H(){if(T.orgId){L.value=!0,R.value=``;try{await S.cloudSync.adoptOrgKey.mutate({orgId:T.orgId,keyHex:O.value.trim(),masterPassword:F.value}),E(`adopted`)}catch(e){R.value=w(e,D)}finally{L.value=!1}}}return(t,i)=>(l(),p(e(v),{visible:c.orgId!==null,"onUpdate:visible":i[2]||=e=>{e||E(`close`)},header:c.title,modal:``,style:{width:`30rem`}},{default:d(()=>[a(`div`,j,[a(`p`,M,f(c.hint),1),a(`div`,N,[n(e(g),{modelValue:O.value,"onUpdate:modelValue":i[0]||=e=>O.value=e,placeholder:e(D)(`settingsPage.adoptKeyPlaceholder`),autocomplete:`off`},null,8,[`modelValue`,`placeholder`]),n(e(y),{label:e(D)(`settingsPage.adoptKeyCheck`),size:`small`,variant:`outlined`,disabled:!z(O.value)||L.value,onClick:V},null,8,[`label`,`disabled`])]),I.value===`no`?(l(),p(e(_),{key:0,severity:`warn`},{default:d(()=>[r(f(e(D)(`settingsPage.adoptKeyNoMatch`)),1)]),_:1})):I.value===`current`?(l(),p(e(_),{key:1,severity:`info`},{default:d(()=>[r(f(e(D)(`settingsPage.adoptKeyAlreadyCurrent`)),1)]),_:1})):m(``,!0),e(A)(I.value)?(l(),o(u,{key:2},[n(e(_),{severity:I.value===`ok`?`success`:`warn`},{default:d(()=>[r(f(B.value),1)]),_:1},8,[`severity`]),a(`div`,P,[n(e(x),{modelValue:F.value,"onUpdate:modelValue":i[1]||=e=>F.value=e,placeholder:e(D)(`settingsPage.masterPassword`),feedback:!1,toggleMask:``,class:`org-key__grow`},null,8,[`modelValue`,`placeholder`]),n(e(y),{label:c.confirmLabel,size:`small`,disabled:!F.value||L.value,loading:L.value,onClick:H},null,8,[`label`,`disabled`,`loading`])])],64)):m(``,!0),R.value?(l(),p(e(_),{key:3,severity:`error`},{default:d(()=>[r(f(R.value),1)]),_:1})):m(``,!0)])]),_:1},8,[`visible`,`header`]))}}),[[`__scopeId`,`data-v-2cdaec32`]]);export{D as a,O as i,T as n,E as r,F as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,C as t}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{Ct as n,D as r,Yt as i,b as a,k as o,mt as s,o as c,v as l,y as u}from"./runtime-core.esm-bundler-DujKY9QV.js";import{n as d}from"./vue-i18n-o7yraQpR.js";import{P as f,dt as p,ft as m}from"./src-
|
|
1
|
+
import{B as e,C as t}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{Ct as n,D as r,Yt as i,b as a,k as o,mt as s,o as c,v as l,y as u}from"./runtime-core.esm-bundler-DujKY9QV.js";import{n as d}from"./vue-i18n-o7yraQpR.js";import{P as f,dt as p,ft as m}from"./src-Ck_MutzB.js";import{r as h}from"./error-DpF7X5iu.js";import{c as g}from"./index-mvpLwxNT.js";var _={class:`process-controls`},v=m(o({__name:`ProcessControls`,props:{agentId:{},processId:{},state:{},compact:{type:Boolean}},emits:[`action`],setup(o,{emit:m}){let v=o,y=m,b=f(),x=g(),{t:S}=d(),C=t(null),w=e=>e===`stopped`||e===`errored`,T=e=>e===`running`||e===`starting`,E=e=>e===`running`;async function D(){C.value=`start`;try{await x.start(v.agentId,v.processId)}catch(e){b.add({severity:`error`,summary:S(`processControls.startFailed`),detail:e?.message?h(e,S):S(`processControls.startServiceFailed`),life:5e3})}finally{C.value=null,y(`action`,`start`)}}async function O(){C.value=`stop`;try{await x.stop(v.agentId,v.processId)}catch(e){b.add({severity:`error`,summary:S(`processControls.stopFailed`),detail:e?.message?h(e,S):S(`processControls.stopServiceFailed`),life:5e3})}finally{C.value=null,y(`action`,`stop`)}}async function k(){C.value=`restart`;try{await x.restart(v.agentId,v.processId)}catch(e){b.add({severity:`error`,summary:S(`processControls.restartFailed`),detail:e?.message?h(e,S):S(`processControls.restartServiceFailed`),life:5e3})}finally{C.value=null,y(`action`,`restart`)}}return(t,o)=>{let d=n(`tooltip`);return s(),a(`div`,_,[w(v.state)?i((s(),l(e(p),{key:0,icon:`ti ti-player-play`,label:v.compact?void 0:e(S)(`actions.start`),"aria-label":e(S)(`actions.start`),severity:`success`,size:`small`,variant:v.compact?`text`:`filled`,rounded:v.compact,"data-testid":`process-start-btn`,disabled:C.value!==null,loading:C.value===`start`,onClick:D},null,8,[`label`,`aria-label`,`variant`,`rounded`,`disabled`,`loading`])),[[d,v.compact?e(S)(`actions.start`):void 0,void 0,{top:!0}]]):u(``,!0),T(v.state)?(s(),a(c,{key:1},[i(r(e(p),{icon:`ti ti-player-stop`,label:v.compact?void 0:e(S)(`actions.stop`),"aria-label":e(S)(`actions.stop`),severity:`danger`,size:`small`,variant:v.compact?`text`:`filled`,rounded:v.compact,disabled:C.value!==null,loading:C.value===`stop`,onClick:O},null,8,[`label`,`aria-label`,`variant`,`rounded`,`disabled`,`loading`]),[[d,v.compact?e(S)(`actions.stop`):void 0,void 0,{top:!0}]]),E(v.state)?i((s(),l(e(p),{key:0,icon:`ti ti-refresh`,label:v.compact?void 0:e(S)(`actions.restart`),"aria-label":e(S)(`actions.restart`),severity:`warn`,size:`small`,variant:v.compact?`text`:`filled`,rounded:v.compact,disabled:C.value!==null,loading:C.value===`restart`,onClick:k},null,8,[`label`,`aria-label`,`variant`,`rounded`,`disabled`,`loading`])),[[d,v.compact?e(S)(`actions.restart`):void 0,void 0,{top:!0}]]):u(``,!0)],64)):u(``,!0)])}}}),[[`__scopeId`,`data-v-f03e6251`]]);export{v as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,C as t}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{D as n,_ as r,b as i,ct as a,ft as ee,g as o,k as s,mt as c,o as te,rn as l,v as ne,y as u}from"./runtime-core.esm-bundler-DujKY9QV.js";import{n as re}from"./vue-i18n-o7yraQpR.js";import{g as ie}from"./useApi-s_02lHjl-DZYO2tHU.js";import{B as d,H as ae,U as oe,dt as f,ft as p}from"./src-
|
|
1
|
+
import{B as e,C as t}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{D as n,_ as r,b as i,ct as a,ft as ee,g as o,k as s,mt as c,o as te,rn as l,v as ne,y as u}from"./runtime-core.esm-bundler-DujKY9QV.js";import{n as re}from"./vue-i18n-o7yraQpR.js";import{g as ie}from"./useApi-s_02lHjl-DZYO2tHU.js";import{B as d,H as ae,U as oe,dt as f,ft as p}from"./src-Ck_MutzB.js";import{r as m}from"./trpc-BQ0mLnfI.js";import{t as h}from"./agent.store-B6OM7edC.js";import{t as se}from"./ProcessControls-CxlDLGiO.js";import{t as ce}from"./ProcessMetrics-C_7_boMv.js";import{t as le}from"./LogViewer-Cs3Y8vaZ.js";var ue={class:`process-detail`},de={key:0,class:`process-detail__loading`},fe={key:1,class:`process-detail__error`},pe={class:`process-detail__header`},me={class:`process-detail__header-left`},he={class:`process-detail__title`},g={class:`process-detail__id`},_={key:0,class:`process-detail__metrics`},v={class:`section-title`},y={key:1,class:`process-detail__metrics-skeleton`},b={class:`metric-skeleton`},x={class:`metric-skeleton`},S={class:`process-detail__info`},C={class:`info-grid`},w={key:0,class:`info-item`},T={class:`info-label`},E={class:`info-value`},D={key:1,class:`info-item`},O={class:`info-label`},k={class:`info-value`},A={class:`info-item`},j={class:`info-label`},M={class:`info-value`},N={key:2,class:`info-item`},P={class:`info-label`},F={class:`info-value`},I={key:3,class:`info-item`},L={class:`info-label`},R={class:`info-value`},ge={key:4,class:`info-item info-item--wide`},_e={class:`info-label`},ve={class:`info-value info-value--path`,"data-testid":`process-cwd`},ye={class:`process-detail__logs`},be={class:`section-title`},xe={class:`process-detail__log-container`},z=p(s({__name:`ProcessDetailPage`,props:{agentId:{},processId:{}},setup(s){let p=s,z=ie(),{t:B}=re(),Se=h(),Ce=o(()=>V.value?.agentId?Se.agents.find(e=>e.config.id===V.value.agentId)?.config.name??V.value.agentId:null),V=t(null),H=t([]),U=t(null),W=t(!1),G=t(!0),K=t(!0),q=t(null),J=null,Y=null,X=null,Z={running:{severity:`success`,icon:`ti ti-circle-check`},stopped:{severity:`secondary`,icon:`ti ti-player-stop`},errored:{severity:`danger`,icon:`ti ti-circle-x`},starting:{severity:`warn`,icon:`ti ti-spin ti-loader-2`}},Q=o(()=>{let e=V.value?.state??`stopped`;return Z[e]??Z.stopped});async function $(){try{V.value=await m.process.get.query({agentId:p.agentId,id:p.processId})}catch(e){q.value=e instanceof Error?e.message:`Failed to load process`}}async function we(){K.value=!0;try{H.value=await m.process.logs.query({agentId:p.agentId,processId:p.processId})}catch{}finally{K.value=!1}}async function Te(){W.value=!0;try{U.value=await m.process.metrics.query({agentId:p.agentId,processId:p.processId})}catch{}finally{W.value=!1}}function Ee(){let e=m.process.onLog.subscribe({agentId:p.agentId,processId:p.processId},{onData(e){let t=e;if(t.some(e=>e.__clearLogBuffer)){H.value=[];return}H.value=[...H.value,...t],H.value.length>1e4&&(H.value=H.value.slice(H.value.length-1e4))}});J=()=>e.unsubscribe()}function De(){let e=m.process.onStatus.subscribe({agentId:p.agentId,processId:p.processId},{onData(e){V.value=e}});Y=()=>e.unsubscribe()}function Oe(){let e=m.process.onMetrics.subscribe({agentId:p.agentId,processId:p.processId},{onData(e){U.value=e}});X=()=>e.unsubscribe()}function ke(){$()}return a(async()=>{G.value=!0,await Promise.all([$(),we(),Te()]),G.value=!1,Ee(),De(),Oe()}),ee(()=>{J?.(),Y?.(),X?.()}),(t,a)=>(c(),i(`div`,ue,[G.value?(c(),i(`div`,de,[n(e(ae),{style:{width:`3rem`,height:`3rem`}}),r(`span`,null,l(e(B)(`processDetail.loading`)),1)])):q.value?(c(),i(`div`,fe,[a[2]||=r(`i`,{class:`ti ti-alert-triangle`,style:{"font-size":`2rem`,color:`var(--r-red-500)`}},null,-1),r(`p`,null,l(q.value),1),n(e(f),{label:e(B)(`processDetail.goBack`),icon:`ti ti-arrow-left`,severity:`secondary`,onClick:a[0]||=t=>e(z).back()},null,8,[`label`])])):V.value?(c(),i(te,{key:2},[r(`div`,pe,[r(`div`,me,[n(e(f),{icon:`ti ti-arrow-left`,variant:`text`,rounded:``,severity:`secondary`,"aria-label":e(B)(`processDetail.goBack`),onClick:a[1]||=t=>e(z).back()},null,8,[`aria-label`]),r(`div`,he,[r(`h1`,null,l(V.value.serviceId),1),r(`span`,g,l(V.value.id),1)]),n(e(oe),{value:V.value.state,severity:Q.value.severity,icon:Q.value.icon},null,8,[`value`,`severity`,`icon`])]),n(se,{"agent-id":p.agentId,"process-id":p.processId,state:V.value.state,onAction:ke},null,8,[`agent-id`,`process-id`,`state`])]),U.value||W.value?(c(),i(`section`,_,[r(`h2`,v,l(e(B)(`processDetail.metrics`)),1),U.value?(c(),ne(ce,{key:0,cpu:U.value.cpu,memory:U.value.memory},null,8,[`cpu`,`memory`])):(c(),i(`div`,y,[r(`div`,b,[n(e(d),{width:`4rem`,height:`0.75rem`,class:`mb-2`}),n(e(d),{width:`3rem`,height:`1.75rem`,class:`mb-3`}),n(e(d),{width:`100%`,height:`6px`,"border-radius":`4px`})]),r(`div`,x,[n(e(d),{width:`4rem`,height:`0.75rem`,class:`mb-2`}),n(e(d),{width:`3rem`,height:`1.75rem`,class:`mb-3`}),n(e(d),{width:`6rem`,height:`0.65rem`})])]))])):u(``,!0),r(`section`,S,[r(`div`,C,[V.value.pid?(c(),i(`div`,w,[r(`span`,T,l(e(B)(`processDetail.pid`)),1),r(`span`,E,l(V.value.pid),1)])):u(``,!0),V.value.agentId?(c(),i(`div`,D,[r(`span`,O,l(e(B)(`processDetail.agent`)),1),r(`span`,k,l(Ce.value),1)])):u(``,!0),r(`div`,A,[r(`span`,j,l(e(B)(`processDetail.restarts`)),1),r(`span`,M,l(V.value.restartCount),1)]),V.value.startedAt?(c(),i(`div`,N,[r(`span`,P,l(e(B)(`processDetail.started`)),1),r(`span`,F,l(new Date(V.value.startedAt).toLocaleString()),1)])):u(``,!0),V.value.exitCode==null?u(``,!0):(c(),i(`div`,I,[r(`span`,L,l(e(B)(`processDetail.exitCode`)),1),r(`span`,R,l(V.value.exitCode),1)])),V.value.cwd?(c(),i(`div`,ge,[r(`span`,_e,l(e(B)(`processDetail.cwd`)),1),r(`span`,ve,l(V.value.cwd),1)])):u(``,!0)])]),r(`section`,ye,[r(`h2`,be,l(e(B)(`processDetail.logs`)),1),r(`div`,xe,[n(le,{logs:H.value,loading:K.value,"service-label":V.value?.serviceId},null,8,[`logs`,`loading`,`service-label`])])])],64)):u(``,!0)]))}}),[[`__scopeId`,`data-v-99f49638`]]);export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{D as t,_ as n,b as r,g as i,k as a,mt as o,nn as s,rn as c}from"./runtime-core.esm-bundler-DujKY9QV.js";import{n as l}from"./vue-i18n-o7yraQpR.js";import{I as u,ft as d}from"./src-
|
|
1
|
+
import{B as e}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{D as t,_ as n,b as r,g as i,k as a,mt as o,nn as s,rn as c}from"./runtime-core.esm-bundler-DujKY9QV.js";import{n as l}from"./vue-i18n-o7yraQpR.js";import{I as u,ft as d}from"./src-Ck_MutzB.js";var f={class:`process-metrics`},p={class:`metric-card`},m={class:`metric-card__header`},h={class:`metric-card__label`},g={class:`metric-card__value`},_={class:`metric-card`},v={class:`metric-card__header`},y={class:`metric-card__label`},b={class:`metric-card__value`},x={class:`metric-card__sub`},S=d(a({__name:`ProcessMetrics`,props:{cpu:{},memory:{}},setup(a){let d=a,{t:S}=l();function C(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:e<1073741824?`${(e/1048576).toFixed(1)} MB`:`${(e/1073741824).toFixed(2)} GB`}let w=i(()=>Math.min(Math.round(d.cpu*100)/100,100)),T=i(()=>C(d.memory)),E=i(()=>d.cpu>=80?`#ef4444`:d.cpu>=50?`#f59e0b`:`#22c55e`);return(i,a)=>(o(),r(`div`,f,[n(`div`,p,[n(`div`,m,[a[0]||=n(`i`,{class:`ti ti-cpu`},null,-1),n(`span`,h,c(e(S)(`processMetrics.cpu`)),1)]),n(`div`,g,c(w.value)+`%`,1),t(e(u),{value:w.value,"show-value":!1,class:`metric-card__bar`,style:s({"--progress-fill":E.value})},null,8,[`value`,`style`])]),n(`div`,_,[n(`div`,v,[a[1]||=n(`i`,{class:`ti ti-database`},null,-1),n(`span`,y,c(e(S)(`processMetrics.memory`)),1)]),n(`div`,b,c(T.value),1),n(`div`,x,c(e(S)(`processMetrics.bytes`,{count:d.memory.toLocaleString()})),1)])]))}}),[[`__scopeId`,`data-v-0c146c1b`]]);export{S as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,C as t}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{$ as n,D as r,E as i,Ft as ee,Ht as a,_ as o,b as s,g as c,k as l,mt as u,o as d,qt as f,rn as p,v as m,y as h}from"./runtime-core.esm-bundler-DujKY9QV.js";import{C as g}from"./runtime-dom.esm-bundler-CyEVRK6B.js";import{n as te}from"./vue-i18n-o7yraQpR.js";import{n as _}from"./project-launch.store-
|
|
1
|
+
import{B as e,C as t}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{$ as n,D as r,E as i,Ft as ee,Ht as a,_ as o,b as s,g as c,k as l,mt as u,o as d,qt as f,rn as p,v as m,y as h}from"./runtime-core.esm-bundler-DujKY9QV.js";import{C as g}from"./runtime-dom.esm-bundler-CyEVRK6B.js";import{n as te}from"./vue-i18n-o7yraQpR.js";import{n as _}from"./project-launch.store-Im5SMon9.js";import{J as v,S as y,W as b,Y as x,dt as S,ft as C}from"./src-Ck_MutzB.js";import{r as w}from"./trpc-BQ0mLnfI.js";import{n as T}from"./project.store-CITAykC3.js";import{n as E}from"./cloud-auth-D_am4FlK.js";import{t as ne}from"./useProjectCatalog-CWHpf3Yj.js";import{r as D,t as re}from"./error-DpF7X5iu.js";import{t as ie}from"./OrgKeyPrompt-DtgelhnI.js";import{t as ae}from"./DirectoryPickerDialog-CVVg3SzI.js";var oe={class:`create-form`},se={class:`create-field`},ce={for:`new-project-name`},le={class:`create-field`},ue={for:`new-project-desc`},O={class:`create-field`},k={for:`new-project-target`},A={class:`create-hint`},j={key:0,class:`create-field`},M={class:`create-path`},N=[`title`],P={key:1,class:`create-hint`},F=C(l({__name:`ProjectCreateDialog`,props:n({initialTarget:{},localPath:{}},{visible:{type:Boolean,required:!0},visibleModifiers:{}}),emits:n([`created`],[`update:visible`]),setup(n,{emit:l}){let C=n,F=c(()=>C.initialTarget!==void 0),I=ee(n,`visible`),L=l,{t:R}=te(),z=T(),B=_(),V=ne(),H=t(``),U=t(``),W=t(`local`),G=t(!1),K=t(``),q=t(null),J=t(!1),Y=t(null),X=t(null),de=c(()=>[{id:`local`,name:R(`projectSwitcher.local`)},...V.orgGroups.value.map(e=>({id:e.orgId,name:e.name}))]),fe=c(()=>W.value===`local`&&!q.value),Z=c(()=>!!H.value.trim()&&!fe.value);a(I,e=>{e&&(H.value=``,U.value=``,W.value=C.initialTarget===void 0?B.activeOrgId??`local`:C.initialTarget??`local`,K.value=``,Y.value=null,X.value=null,q.value=C.localPath??null,C.localPath&&(H.value=Q(C.localPath)),F.value||V.refreshCloud())},{immediate:!0});function Q(e){return e.split(/[\\/]+/).filter(Boolean).at(-1)??``}async function pe(e){if(K.value=``,e.status===`importable`){G.value=!0;try{let t=await z.importLocal(e.path);B.setActiveProject(t.id,null),I.value=!1,L(`created`,{id:t.id,name:t.name,orgId:null})}catch(e){K.value=D(e,R)}finally{G.value=!1}return}q.value=e.path,H.value.trim()||(H.value=Q(e.path))}async function $(){if(!Z.value||G.value)return;let e=H.value.trim(),t=W.value===`local`?null:W.value;G.value=!0,K.value=``;try{let n=(X.value?.orgId===t?X.value:null)??await z.create({name:e,description:U.value.trim()||void 0,orgId:t,...t?{}:{localPath:q.value??void 0}});if(!n)throw Error(z.error??R(`projectSwitcher.createFailed`));X.value={id:n.id,name:n.name,orgId:t},t&&await w.cloudSync.trackProject.mutate({orgId:t,cloudUrl:E(),projectId:n.id}),X.value=null,B.setActiveProject(n.id,t),I.value=!1,L(`created`,{id:n.id,name:n.name,orgId:t})}catch(e){K.value=D(e,R),re(e)&&t&&(Y.value=t)}finally{G.value=!1}}async function me(){Y.value=null,K.value=``,await $()}return(t,n)=>(u(),s(d,null,[r(e(x),{visible:I.value,"onUpdate:visible":n[5]||=e=>I.value=e,header:e(R)(`projectSwitcher.createTitle`),modal:``,style:{width:`26rem`}},{footer:f(()=>[r(e(S),{label:e(R)(`actions.cancel`),severity:`secondary`,variant:`text`,disabled:G.value,onClick:n[4]||=e=>I.value=!1},null,8,[`label`,`disabled`]),r(e(S),{label:e(R)(`projectSwitcher.create`),icon:`ti ti-plus`,loading:G.value,disabled:!Z.value,onClick:$},null,8,[`label`,`loading`,`disabled`])]),default:f(()=>[o(`div`,oe,[o(`div`,se,[o(`label`,ce,p(e(R)(`projectSwitcher.nameLabel`)),1),r(e(v),{id:`new-project-name`,modelValue:H.value,"onUpdate:modelValue":n[0]||=e=>H.value=e,autofocus:``,placeholder:e(R)(`projectSwitcher.namePlaceholder`),onKeyup:g($,[`enter`])},null,8,[`modelValue`,`placeholder`])]),o(`div`,le,[o(`label`,ue,p(e(R)(`projectList.descriptionLabel`)),1),r(e(v),{id:`new-project-desc`,modelValue:U.value,"onUpdate:modelValue":n[1]||=e=>U.value=e,placeholder:e(R)(`projectList.descriptionPlaceholder`),onKeyup:g($,[`enter`])},null,8,[`modelValue`,`placeholder`])]),o(`div`,O,[F.value?h(``,!0):(u(),s(d,{key:0},[o(`label`,k,p(e(R)(`projectSwitcher.targetLabel`)),1),r(e(y),{inputId:`new-project-target`,modelValue:W.value,"onUpdate:modelValue":n[2]||=e=>W.value=e,options:de.value,optionLabel:`name`,optionValue:`id`},null,8,[`modelValue`,`options`])],64)),o(`small`,A,p(W.value===`local`?e(R)(`projectSwitcher.localHint`):e(R)(`projectSwitcher.cloudHint`)),1)]),W.value===`local`?(u(),s(`div`,j,[o(`label`,null,p(e(R)(`projectSwitcher.folderLabel`)),1),o(`div`,M,[q.value?(u(),s(`code`,{key:0,class:`create-path__value`,title:q.value},p(q.value),9,N)):(u(),s(`span`,P,p(e(R)(`projectSwitcher.folderNone`)),1)),C.localPath?h(``,!0):(u(),m(e(S),{key:2,label:q.value?e(R)(`projectSwitcher.folderChange`):e(R)(`projectSwitcher.folderChoose`),icon:`ti ti-folder-open`,size:`small`,severity:`secondary`,variant:`outlined`,"data-testid":`create-choose-folder`,onClick:n[3]||=e=>J.value=!0},null,8,[`label`]))])])):h(``,!0),K.value?(u(),m(e(b),{key:1,severity:`error`},{default:f(()=>[i(p(K.value),1)]),_:1})):h(``,!0)])]),_:1},8,[`visible`,`header`]),J.value?(u(),m(ae,{key:0,visible:J.value,"onUpdate:visible":n[6]||=e=>J.value=e,mode:`local`,onLocalChosen:pe},null,8,[`visible`])):h(``,!0),r(ie,{"org-id":Y.value,reference:`cloud`,title:e(R)(`projectSwitcher.keyPromptTitle`),hint:e(R)(`projectSwitcher.keyPromptHint`),"confirm-label":e(R)(`projectSwitcher.keyPromptUse`),onClose:n[7]||=e=>Y.value=null,onAdopted:me},null,8,[`org-id`,`title`,`hint`,`confirm-label`])],64))}}),[[`__scopeId`,`data-v-6fe25904`]]);export{F as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{Ht as t,k as n,mt as r,v as i,y as a}from"./runtime-core.esm-bundler-DujKY9QV.js";import{a as o,n as s}from"./project-launch.store-
|
|
1
|
+
import{C as e}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{Ht as t,k as n,mt as r,v as i,y as a}from"./runtime-core.esm-bundler-DujKY9QV.js";import{a as o,n as s}from"./project-launch.store-Im5SMon9.js";import{r as c}from"./trpc-BQ0mLnfI.js";import{n as l}from"./project.store-CITAykC3.js";import{t as u}from"./DirectoryPickerDialog-CVVg3SzI.js";var d=n({__name:`ProjectLocationGate`,setup(n){let d=l(),f=s(),{activeProjectId:p}=o(f),m=e(!1),h=e(``),g=e(null),_=e(``),v=new Set;function y(e,t){return`${e??`local`}:${t}`}return t([p,()=>d.projects.length],async([e])=>{if(!e||v.has(y(f.activeOrgId,e)))return;let t=d.getByRef({id:e,orgId:f.activeOrgId})??d.getById(e);if(t&&t.orgId){try{let{path:n}=await c.project.getLocalPath.query({id:e,orgId:t.orgId});if(n)return}catch{return}v.add(y(t.orgId,e)),h.value=e,g.value=t.orgId??null,_.value=t.name,m.value=!0}},{immediate:!0}),(e,t)=>h.value?(r(),i(u,{key:0,visible:m.value,"onUpdate:visible":t[0]||=e=>m.value=e,"project-id":h.value,"org-id":g.value,"project-name":_.value,required:``},null,8,[`visible`,`project-id`,`org-id`,`project-name`])):a(``,!0)}});export{d as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,C as t}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{$ as n,D as r,E as i,Ft as a,Ht as o,_ as s,b as c,k as l,mt as u,o as d,qt as f,rn as p,v as m,y as h}from"./runtime-core.esm-bundler-DujKY9QV.js";import{n as g}from"./vue-i18n-o7yraQpR.js";import{n as _}from"./project-launch.store-
|
|
1
|
+
import{B as e,C as t}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{$ as n,D as r,E as i,Ft as a,Ht as o,_ as s,b as c,k as l,mt as u,o as d,qt as f,rn as p,v as m,y as h}from"./runtime-core.esm-bundler-DujKY9QV.js";import{n as g}from"./vue-i18n-o7yraQpR.js";import{n as _}from"./project-launch.store-Im5SMon9.js";import{S as v,W as y,Y as b,dt as x,ft as S}from"./src-Ck_MutzB.js";import{r as C}from"./trpc-BQ0mLnfI.js";import{n as w}from"./project.store-CITAykC3.js";import{n as T}from"./cloud-auth-D_am4FlK.js";import{t as E}from"./useProjectCatalog-CWHpf3Yj.js";import{r as D,t as O}from"./error-DpF7X5iu.js";import{t as k}from"./OrgKeyPrompt-DtgelhnI.js";var A={class:`publish-form`},j={for:`publish-target`},M={class:`publish-hint`},N=S(l({__name:`ProjectPublishDialog`,props:n({project:{}},{visible:{type:Boolean,required:!0},visibleModifiers:{}}),emits:n([`published`],[`update:visible`]),setup(n,{emit:l}){let S=a(n,`visible`),N=n,P=l,{t:F}=g(),I=w(),L=_(),R=E(),z=t(null),B=t(!1),V=t(``),H=t(null);o(S,async e=>{e&&(V.value=``,z.value=R.orgGroups.value[0]?.orgId??null,await R.refreshCloud(),z.value??=R.orgGroups.value[0]?.orgId??null)},{immediate:!0});async function U(){let e=N.project,t=z.value;if(e&&t){B.value=!0,V.value=``;try{await C.cloudSync.publishProject.mutate({orgId:t,cloudUrl:T(),projectId:e.id}),await I.fetchAll(),L.activeProjectId===e.id&&L.setActiveProject(e.id,t),S.value=!1,P(`published`,t)}catch(e){V.value=D(e,F),O(e)&&(H.value=t)}finally{B.value=!1}}}async function W(){H.value=null,V.value=``,await U()}return(t,a)=>(u(),c(d,null,[r(e(b),{visible:S.value,"onUpdate:visible":a[2]||=e=>S.value=e,header:e(F)(`projectSwitcher.publishTitle`,{project:n.project?.name??``}),modal:``,style:{width:`26rem`}},{footer:f(()=>[r(e(x),{label:e(F)(`actions.cancel`),severity:`secondary`,variant:`text`,disabled:B.value,onClick:a[1]||=e=>S.value=!1},null,8,[`label`,`disabled`]),r(e(x),{label:e(F)(`projectSwitcher.publishAccept`),icon:`ti ti-cloud-upload`,loading:B.value,disabled:!z.value,onClick:U},null,8,[`label`,`loading`,`disabled`])]),default:f(()=>[s(`div`,A,[s(`label`,j,p(e(F)(`projectSwitcher.publishOrgLabel`)),1),r(e(v),{inputId:`publish-target`,modelValue:z.value,"onUpdate:modelValue":a[0]||=e=>z.value=e,options:e(R).orgGroups.value,optionLabel:`name`,optionValue:`orgId`},null,8,[`modelValue`,`options`]),s(`small`,M,p(e(F)(`projectSwitcher.publishHint`)),1),V.value?(u(),m(e(y),{key:0,severity:`error`},{default:f(()=>[i(p(V.value),1)]),_:1})):h(``,!0)])]),_:1},8,[`visible`,`header`]),r(k,{"org-id":H.value,reference:`cloud`,title:e(F)(`projectSwitcher.keyPromptTitle`),hint:e(F)(`projectSwitcher.keyPromptHint`),"confirm-label":e(F)(`projectSwitcher.keyPromptUse`),onClose:a[3]||=e=>H.value=null,onAdopted:W},null,8,[`org-id`,`title`,`hint`,`confirm-label`])],64))}}),[[`__scopeId`,`data-v-aa5680f5`]]);export{N as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{B as e,C as t}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{D as n,E as r,_ as i,b as a,ct as o,ft as s,k as c,mt as l,rn as u,tt as d}from"./runtime-core.esm-bundler-DujKY9QV.js";import{dt as f,ft as p}from"./src-
|
|
1
|
+
import{B as e,C as t}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{D as n,E as r,_ as i,b as a,ct as o,ft as s,k as c,mt as l,rn as u,tt as d}from"./runtime-core.esm-bundler-DujKY9QV.js";import{dt as f,ft as p}from"./src-Ck_MutzB.js";import{r as m}from"./trpc-BQ0mLnfI.js";var h={class:`random-job-test`},g={class:`random-job-test__actions`},_={class:`random-job-test__meta`},v={key:0,class:`random-job-test__empty`},y={key:1},b=`runeya:random-job-test:job-id`,x=`runeya:random-job-test:logs`,S=p(c({__name:`RandomJobTestPage`,setup(c){let p=t(null),S=t(!1),C=t([]),w=t(null),T=null;function E(){p.value?sessionStorage.setItem(b,p.value):sessionStorage.removeItem(b),sessionStorage.setItem(x,JSON.stringify(C.value))}function D(e){C.value=[...C.value,e],C.value.length>2e3&&(C.value=C.value.slice(C.value.length-2e3)),E(),d(()=>{w.value&&(w.value.scrollTop=w.value.scrollHeight)})}function O(){T?.unsubscribe(),T=null}function k(e){O(),T=m.debug.streamRandomJob.subscribe({jobId:e},{onData(e){e.type===`tick`?D(`[${new Date(e.at).toLocaleTimeString()}] #${e.index} -> ${e.value.toFixed(8)}`):(D(`[${new Date(e.at).toLocaleTimeString()}] done: ${e.reason}`),S.value=!1,p.value=null,E())},onError(e){D(`[sub] error: ${e.message}`),S.value=!1,E()},onComplete(){D(`[sub] complete`),S.value=!1,E()}}),D(`[sub] started for job ${e}`)}async function A(){if(S.value)return;C.value=[],E();let e=await m.debug.startRandomJob.mutate({intervalMs:300,maxTicks:1e3});p.value=e.jobId,S.value=!0,E(),D(`[job] started id=${e.jobId}, intervalMs=${e.intervalMs}, maxTicks=${e.maxTicks}`),k(e.jobId)}async function j(){if(p.value)try{await m.debug.stopRandomJob.mutate({jobId:p.value}),D(`[job] stop requested id=${p.value}`),S.value=!1,p.value=null,E()}catch(e){D(`[job] stop error: ${e.message}`)}}function M(){C.value=[],E()}return o(async()=>{let e=sessionStorage.getItem(x);if(e)try{let t=JSON.parse(e);Array.isArray(t)&&(C.value=t)}catch{}let t=sessionStorage.getItem(b);if(t){p.value=t;try{let e=await m.debug.randomJobStatus.query({jobId:t});S.value=e.running,E(),e.running?(D(`[job] reconnected id=${t}, tick=${e.tick}`),k(t)):(D(`[job] previous job ended (id=${t})`),p.value=null,E())}catch{S.value=!1,p.value=null,D(`[job] previous job not found`),E()}}}),s(()=>{O()}),(t,o)=>(l(),a(`div`,h,[o[3]||=i(`header`,{class:`random-job-test__header`},[i(`h1`,null,`Random Job Test`),i(`p`,null,`Click start to launch a server job and stream Math.random() values in real time.`)],-1),i(`div`,g,[n(e(f),{label:`Start job`,icon:`ti ti-player-play`,disabled:S.value,onClick:A},null,8,[`disabled`]),n(e(f),{label:`Stop`,icon:`ti ti-player-stop`,severity:`danger`,disabled:!S.value,onClick:j},null,8,[`disabled`]),n(e(f),{label:`Clear logs`,icon:`ti ti-trash`,severity:`secondary`,variant:`outlined`,onClick:M})]),i(`div`,_,[i(`span`,null,[o[0]||=i(`strong`,null,`Job ID:`,-1),r(` `+u(p.value??`none`),1)]),i(`span`,null,[o[1]||=i(`strong`,null,`Status:`,-1),r(` `+u(S.value?`running`:`idle`),1)]),i(`span`,null,[o[2]||=i(`strong`,null,`Lines:`,-1),r(` `+u(C.value.length),1)])]),i(`section`,{ref_key:`logsEl`,ref:w,class:`random-job-test__logs`,"aria-live":`polite`},[C.value.length===0?(l(),a(`div`,v,`No logs yet.`)):(l(),a(`pre`,y,u(C.value.join(`
|
|
2
2
|
`)),1))],512)]))}}),[[`__scopeId`,`data-v-96a7afb9`]]);export{S as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{B as e,C as t,N as n}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{Ct as r,D as i,E as a,Ft as o,Ht as s,J as c,Lt as l,Nt as u,Ut as d,Yt as f,_ as p,b as m,bt as h,ct as g,en as _,et as v,ft as y,g as b,gt as ee,k as x,mt as S,nn as te,o as C,qt as w,rn as T,tn as E,tt as D,v as O,wt as k,xt as A,y as j,z as ne}from"./runtime-core.esm-bundler-DujKY9QV.js";import{C as re,t as ie,w as ae}from"./runtime-dom.esm-bundler-CyEVRK6B.js";import{n as oe}from"./vue-i18n-o7yraQpR.js";import{a as se}from"./project-launch.store-AB257LRF.js";import{g as M,h as ce}from"./useApi-s_02lHjl-DZYO2tHU.js";import{C as le,J as N,O as ue,P as de,S as P,Y as fe,a as pe,c as me,dt as F,ft as he,q as ge}from"./src-DOcCcTQv.js";import{a as _e,n as ve,r as ye,s as be,t as xe}from"./scenario.store-B5ybSSzx.js";import{r as Se}from"./trpc-CAKhySL_.js";import{a as Ce,g as we,p as Te}from"./schemas-68I2iCLF.js";import{f as Ee,o as De,s as Oe}from"./dist-C9Qdh18x.js";import{A as ke,C as Ae,D as je,E as Me,O as Ne,S as Pe,T as Fe,j as Ie,k as Le,w as Re,x as ze}from"./index-Ci2pSJuu.js";import{t as Be}from"./uuid-XipkJWQw.js";var Ve={name:`ControlButton`,compatConfig:{MODE:3}},He=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Ue={type:`button`,class:`vue-flow__controls-button`};function I(e,t,n,r,i,a){return S(),m(`button`,Ue,[A(e.$slots,`default`)])}var L=He(Ve,[[`render`,I]]),We={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`},Ge=[p(`path`,{d:`M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z`},null,-1)];function Ke(e,t){return S(),m(`svg`,We,Ge)}var qe={render:Ke},Je={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 5`},Ye=[p(`path`,{d:`M0 0h32v4.2H0z`},null,-1)];function R(e,t){return S(),m(`svg`,Je,Ye)}var Xe={render:R},Ze={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 30`},Qe=[p(`path`,{d:`M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z`},null,-1)];function $e(e,t){return S(),m(`svg`,Ze,Qe)}var et={render:$e},tt={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`},nt=[p(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z`},null,-1)];function rt(e,t){return S(),m(`svg`,tt,nt)}var it={render:rt},at={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`},ot=[p(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z`},null,-1)];function st(e,t){return S(),m(`svg`,at,ot)}var z={render:st},ct=x({name:`Controls`,compatConfig:{MODE:3},props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>Ae.BottomLeft}},emits:[`zoomIn`,`zoomOut`,`fitView`,`interactionChange`],setup(t,{emit:r}){let{nodesDraggable:a,nodesConnectable:o,elementsSelectable:s,setInteractive:c,zoomIn:l,zoomOut:u,fitView:d,viewport:f,minZoom:p,maxZoom:h}=ke(),g=n(()=>a.value||o.value||s.value),_=n(()=>f.value.zoom<=p.value),v=n(()=>f.value.zoom>=h.value);function y(){l(),r(`zoomIn`)}function b(){u(),r(`zoomOut`)}function ee(){d(t.fitViewParams),r(`fitView`)}function x(){c(!g.value),r(`interactionChange`,!g.value)}return(t,n)=>(S(),O(e(Re),{class:`vue-flow__controls`,position:t.position},{default:w(()=>[A(t.$slots,`top`),t.showZoom?(S(),m(C,{key:0},[A(t.$slots,`control-zoom-in`,{},()=>[i(L,{class:`vue-flow__controls-zoomin`,disabled:v.value,onClick:y},{default:w(()=>[A(t.$slots,`icon-zoom-in`,{},()=>[(S(),O(k(e(qe))))])]),_:3},8,[`disabled`])]),A(t.$slots,`control-zoom-out`,{},()=>[i(L,{class:`vue-flow__controls-zoomout`,disabled:_.value,onClick:b},{default:w(()=>[A(t.$slots,`icon-zoom-out`,{},()=>[(S(),O(k(e(Xe))))])]),_:3},8,[`disabled`])])],64)):j(``,!0),t.showFitView?A(t.$slots,`control-fit-view`,{key:1},()=>[i(L,{class:`vue-flow__controls-fitview`,onClick:ee},{default:w(()=>[A(t.$slots,`icon-fit-view`,{},()=>[(S(),O(k(e(et))))])]),_:3})]):j(``,!0),t.showInteractive?A(t.$slots,`control-interactive`,{key:2},()=>[t.showInteractive?(S(),O(L,{key:0,class:`vue-flow__controls-interactive`,onClick:x},{default:w(()=>[g.value?A(t.$slots,`icon-unlock`,{key:0},()=>[(S(),O(k(e(z))))]):j(``,!0),g.value?j(``,!0):A(t.$slots,`icon-lock`,{key:1},()=>[(S(),O(k(e(it))))])]),_:3})):j(``,!0)]):j(``,!0),A(t.$slots,`default`)]),_:3},8,[`position`]))}}),B={value:()=>{}};function V(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new H(n)}function H(e){this._=e}function lt(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}H.prototype=V.prototype={constructor:H,on:function(e,t){var n=this._,r=lt(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=U(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=ut(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ut(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new H(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function U(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function ut(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=B,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var dt=`http://www.w3.org/1999/xhtml`,ft={svg:`http://www.w3.org/2000/svg`,xhtml:dt,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function pt(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),ft.hasOwnProperty(t)?{space:ft[t],local:e}:e}function mt(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===dt&&t.documentElement.namespaceURI===dt?t.createElement(e):t.createElementNS(n,e)}}function ht(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function gt(e){var t=pt(e);return(t.local?ht:mt)(t)}function _t(){}function vt(e){return e==null?_t:function(){return this.querySelector(e)}}function yt(e){typeof e!=`function`&&(e=vt(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new J(r,this._parents)}function bt(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function xt(){return[]}function St(e){return e==null?xt:function(){return this.querySelectorAll(e)}}function Ct(e){return function(){return bt(e.apply(this,arguments))}}function wt(e){e=typeof e==`function`?Ct(e):St(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new J(r,i)}function Tt(e){return function(){return this.matches(e)}}function Et(e){return function(t){return t.matches(e)}}var W=Array.prototype.find;function Dt(e){return function(){return W.call(this.children,e)}}function Ot(){return this.firstElementChild}function kt(e){return this.select(e==null?Ot:Dt(typeof e==`function`?e:Et(e)))}var At=Array.prototype.filter;function G(){return Array.from(this.children)}function jt(e){return function(){return At.call(this.children,e)}}function Mt(e){return this.selectAll(e==null?G:jt(typeof e==`function`?e:Et(e)))}function K(e){typeof e!=`function`&&(e=Tt(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new J(r,this._parents)}function Nt(e){return Array(e.length)}function Pt(){return new J(this._enter||this._groups.map(Nt),this._parents)}function Ft(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ft.prototype={constructor:Ft,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function It(e){return function(){return e}}function Lt(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new Ft(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function Rt(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new Ft(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function zt(e){return e.__data__}function Bt(e,t){if(!arguments.length)return Array.from(this,zt);var n=t?Rt:Lt,r=this._parents,i=this._groups;typeof e!=`function`&&(e=It(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=Vt(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new J(o,r),o._enter=s,o._exit=c,o}function Vt(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Ht(){return new J(this._exit||this._groups.map(Nt),this._parents)}function Ut(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Wt(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new J(s,this._parents)}function Gt(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Kt(e){e||=qt;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new J(i,this._parents).order()}function qt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Jt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Yt(){return Array.from(this)}function Xt(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function q(){let e=0;for(let t of this)++e;return e}function Zt(){return!this.node()}function Qt(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function $t(e){return function(){this.removeAttribute(e)}}function en(e){return function(){this.removeAttributeNS(e.space,e.local)}}function tn(e,t){return function(){this.setAttribute(e,t)}}function nn(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function rn(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function an(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function on(e,t){var n=pt(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?en:$t:typeof t==`function`?n.local?an:rn:n.local?nn:tn)(n,t))}function sn(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function cn(e){return function(){this.style.removeProperty(e)}}function ln(e,t,n){return function(){this.style.setProperty(e,t,n)}}function un(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function dn(e,t,n){return arguments.length>1?this.each((t==null?cn:typeof t==`function`?un:ln)(e,t,n??``)):fn(this.node(),e)}function fn(e,t){return e.style.getPropertyValue(t)||sn(e).getComputedStyle(e,null).getPropertyValue(t)}function pn(e){return function(){delete this[e]}}function mn(e,t){return function(){this[e]=t}}function hn(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function gn(e,t){return arguments.length>1?this.each((t==null?pn:typeof t==`function`?hn:mn)(e,t)):this.node()[e]}function _n(e){return e.trim().split(/^|\s+/)}function vn(e){return e.classList||new yn(e)}function yn(e){this._node=e,this._names=_n(e.getAttribute(`class`)||``)}yn.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function bn(e,t){for(var n=vn(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function xn(e,t){for(var n=vn(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Sn(e){return function(){bn(this,e)}}function Cn(e){return function(){xn(this,e)}}function wn(e,t){return function(){(t.apply(this,arguments)?bn:xn)(this,e)}}function Tn(e,t){var n=_n(e+``);if(arguments.length<2){for(var r=vn(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?wn:t?Sn:Cn)(n,t))}function En(){this.textContent=``}function Dn(e){return function(){this.textContent=e}}function On(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function kn(e){return arguments.length?this.each(e==null?En:(typeof e==`function`?On:Dn)(e)):this.node().textContent}function An(){this.innerHTML=``}function jn(e){return function(){this.innerHTML=e}}function Mn(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function Nn(e){return arguments.length?this.each(e==null?An:(typeof e==`function`?Mn:jn)(e)):this.node().innerHTML}function Pn(){this.nextSibling&&this.parentNode.appendChild(this)}function Fn(){return this.each(Pn)}function In(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ln(){return this.each(In)}function Rn(e){var t=typeof e==`function`?e:gt(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function zn(){return null}function Bn(e,t){var n=typeof e==`function`?e:gt(e),r=t==null?zn:typeof t==`function`?t:vt(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Vn(){var e=this.parentNode;e&&e.removeChild(this)}function Hn(){return this.each(Vn)}function Un(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Wn(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Gn(e){return this.select(e?Wn:Un)}function Kn(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function qn(e){return function(t){e.call(this,t,this.__data__)}}function Jn(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Yn(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Xn(e,t,n){return function(){var r=this.__on,i,a=qn(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Zn(e,t,n){var r=Jn(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?Xn:Yn,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function Qn(e,t,n){var r=sn(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function $n(e,t){return function(){return Qn(this,e,t)}}function er(e,t){return function(){return Qn(this,e,t.apply(this,arguments))}}function tr(e,t){return this.each((typeof t==`function`?er:$n)(e,t))}function*nr(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var rr=[null];function J(e,t){this._groups=e,this._parents=t}function ir(){return new J([[document.documentElement]],rr)}function ar(){return this}J.prototype=ir.prototype={constructor:J,select:yt,selectAll:wt,selectChild:kt,selectChildren:Mt,filter:K,data:Bt,enter:Pt,exit:Ht,join:Ut,merge:Wt,selection:ar,order:Gt,sort:Kt,call:Jt,nodes:Yt,node:Xt,size:q,empty:Zt,each:Qt,attr:on,style:dn,property:gn,classed:Tn,text:kn,html:Nn,raise:Fn,lower:Ln,append:Rn,insert:Bn,remove:Hn,clone:Gn,datum:Kn,on:Zn,dispatch:tr,[Symbol.iterator]:nr};function or(e){return typeof e==`string`?new J([[document.querySelector(e)]],[document.documentElement]):new J([[e]],rr)}function sr(e){let t;for(;t=e.sourceEvent;)e=t;return e}function cr(e,t){if(e=sr(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var lr={capture:!0,passive:!1};function ur(e){e.preventDefault(),e.stopImmediatePropagation()}function dr(e){var t=e.document.documentElement,n=or(e).on(`dragstart.drag`,ur,lr);`onselectstart`in t?n.on(`selectstart.drag`,ur,lr):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function fr(e,t){var n=e.document.documentElement,r=or(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,ur,lr),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function pr(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function mr(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function hr(){}var gr=.7,_r=1/gr,vr=`\\s*([+-]?\\d+)\\s*`,yr=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Y=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,br=/^#([0-9a-f]{3,8})$/,xr=RegExp(`^rgb\\(${vr},${vr},${vr}\\)$`),Sr=RegExp(`^rgb\\(${Y},${Y},${Y}\\)$`),Cr=RegExp(`^rgba\\(${vr},${vr},${vr},${yr}\\)$`),wr=RegExp(`^rgba\\(${Y},${Y},${Y},${yr}\\)$`),Tr=RegExp(`^hsl\\(${yr},${Y},${Y}\\)$`),Er=RegExp(`^hsla\\(${yr},${Y},${Y},${yr}\\)$`),Dr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};pr(hr,Mr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Or,formatHex:Or,formatHex8:kr,formatHsl:Ar,formatRgb:jr,toString:jr});function Or(){return this.rgb().formatHex()}function kr(){return this.rgb().formatHex8()}function Ar(){return Wr(this).formatHsl()}function jr(){return this.rgb().formatRgb()}function Mr(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=br.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Nr(t):n===3?new X(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Pr(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Pr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=xr.exec(e))?new X(t[1],t[2],t[3],1):(t=Sr.exec(e))?new X(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Cr.exec(e))?Pr(t[1],t[2],t[3],t[4]):(t=wr.exec(e))?Pr(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Tr.exec(e))?Ur(t[1],t[2]/100,t[3]/100,1):(t=Er.exec(e))?Ur(t[1],t[2]/100,t[3]/100,t[4]):Dr.hasOwnProperty(e)?Nr(Dr[e]):e===`transparent`?new X(NaN,NaN,NaN,0):null}function Nr(e){return new X(e>>16&255,e>>8&255,e&255,1)}function Pr(e,t,n,r){return r<=0&&(e=t=n=NaN),new X(e,t,n,r)}function Fr(e){return e instanceof hr||(e=Mr(e)),e?(e=e.rgb(),new X(e.r,e.g,e.b,e.opacity)):new X}function Ir(e,t,n,r){return arguments.length===1?Fr(e):new X(e,t,n,r??1)}function X(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}pr(X,Ir,mr(hr,{brighter(e){return e=e==null?_r:_r**+e,new X(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?gr:gr**+e,new X(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new X(Vr(this.r),Vr(this.g),Vr(this.b),Br(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Lr,formatHex:Lr,formatHex8:Rr,formatRgb:zr,toString:zr}));function Lr(){return`#${Hr(this.r)}${Hr(this.g)}${Hr(this.b)}`}function Rr(){return`#${Hr(this.r)}${Hr(this.g)}${Hr(this.b)}${Hr((isNaN(this.opacity)?1:this.opacity)*255)}`}function zr(){let e=Br(this.opacity);return`${e===1?`rgb(`:`rgba(`}${Vr(this.r)}, ${Vr(this.g)}, ${Vr(this.b)}${e===1?`)`:`, ${e})`}`}function Br(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Hr(e){return e=Vr(e),(e<16?`0`:``)+e.toString(16)}function Ur(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Z(e,t,n,r)}function Wr(e){if(e instanceof Z)return new Z(e.h,e.s,e.l,e.opacity);if(e instanceof hr||(e=Mr(e)),!e)return new Z;if(e instanceof Z)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Z(o,s,c,e.opacity)}function Gr(e,t,n,r){return arguments.length===1?Wr(e):new Z(e,t,n,r??1)}function Z(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}pr(Z,Gr,mr(hr,{brighter(e){return e=e==null?_r:_r**+e,new Z(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?gr:gr**+e,new Z(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new X(Jr(e>=240?e-240:e+120,i,r),Jr(e,i,r),Jr(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Z(Kr(this.h),qr(this.s),qr(this.l),Br(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Br(this.opacity);return`${e===1?`hsl(`:`hsla(`}${Kr(this.h)}, ${qr(this.s)*100}%, ${qr(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function Kr(e){return e=(e||0)%360,e<0?e+360:e}function qr(e){return Math.max(0,Math.min(1,e||0))}function Jr(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Yr=e=>()=>e;function Xr(e,t){return function(n){return e+n*t}}function Zr(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Qr(e){return(e=+e)==1?$r:function(t,n){return n-t?Zr(t,n,e):Yr(isNaN(t)?n:t)}}function $r(e,t){var n=t-e;return n?Xr(e,n):Yr(isNaN(e)?t:e)}var ei=function e(t){var n=Qr(t);function r(e,t){var r=n((e=Ir(e)).r,(t=Ir(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=$r(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r}(1);function ti(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var ni=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ri=new RegExp(ni.source,`g`);function ii(e){return function(){return e}}function ai(e){return function(t){return e(t)+``}}function oi(e,t){var n=ni.lastIndex=ri.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=ni.exec(e))&&(i=ri.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:ti(r,i)})),n=ri.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?ai(c[0].x):ii(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}var si=180/Math.PI,ci={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function li(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*si,skewX:Math.atan(c)*si,scaleX:o,scaleY:s}}var ui;function di(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?ci:li(t.a,t.b,t.c,t.d,t.e,t.f)}function fi(e){return e==null||(ui||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),ui.setAttribute(`transform`,e),!(e=ui.transform.baseVal.consolidate()))?ci:(e=e.matrix,li(e.a,e.b,e.c,e.d,e.e,e.f))}function pi(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:ti(e,i)},{i:c-2,x:ti(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:ti(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:ti(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:ti(e,n)},{i:s-2,x:ti(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var mi=pi(di,`px, `,`px)`,`deg)`),hi=pi(fi,`, `,`)`,`)`),gi=1e-12;function _i(e){return((e=Math.exp(e))+1/e)/2}function vi(e){return((e=Math.exp(e))-1/e)/2}function yi(e){return((e=Math.exp(2*e))-1)/(e+1)}var bi=function e(t,n,r){function i(e,i){var a=e[0],o=e[1],s=e[2],c=i[0],l=i[1],u=i[2],d=c-a,f=l-o,p=d*d+f*f,m,h;if(p<gi)h=Math.log(u/s)/t,m=function(e){return[a+e*d,o+e*f,s*Math.exp(t*e*h)]};else{var g=Math.sqrt(p),_=(u*u-s*s+r*p)/(2*s*n*g),v=(u*u-s*s-r*p)/(2*u*n*g),y=Math.log(Math.sqrt(_*_+1)-_);h=(Math.log(Math.sqrt(v*v+1)-v)-y)/t,m=function(e){var r=e*h,i=_i(y),c=s/(n*g)*(i*yi(t*r+y)-vi(y));return[a+c*d,o+c*f,s*i/_i(t*r+y)]}}return m.duration=h*1e3*t/Math.SQRT2,m}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i}(Math.SQRT2,2,4),xi=0,Si=0,Ci=0,wi=1e3,Ti,Ei,Di=0,Oi=0,ki=0,Ai=typeof performance==`object`&&performance.now?performance:Date,ji=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Mi(){return Oi||=(ji(Ni),Ai.now()+ki)}function Ni(){Oi=0}function Pi(){this._call=this._time=this._next=null}Pi.prototype=Fi.prototype={constructor:Pi,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?Mi():+n)+(t==null?0:+t),!this._next&&Ei!==this&&(Ei?Ei._next=this:Ti=this,Ei=this),this._call=e,this._time=n,Bi()},stop:function(){this._call&&(this._call=null,this._time=1/0,Bi())}};function Fi(e,t,n){var r=new Pi;return r.restart(e,t,n),r}function Ii(){Mi(),++xi;for(var e=Ti,t;e;)(t=Oi-e._time)>=0&&e._call.call(void 0,t),e=e._next;--xi}function Li(){Oi=(Di=Ai.now())+ki,xi=Si=0;try{Ii()}finally{xi=0,zi(),Oi=0}}function Ri(){var e=Ai.now(),t=e-Di;t>wi&&(ki-=t,Di=e)}function zi(){for(var e,t=Ti,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Ti=n);Ei=e,Bi(r)}function Bi(e){xi||(Si&&=clearTimeout(Si),e-Oi>24?(e<1/0&&(Si=setTimeout(Li,e-Ai.now()-ki)),Ci&&=clearInterval(Ci)):(Ci||=(Di=Ai.now(),setInterval(Ri,wi)),xi=1,ji(Li)))}function Vi(e,t,n){var r=new Pi;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var Hi=V(`start`,`end`,`cancel`,`interrupt`),Ui=[],Wi=0,Gi=1,Ki=2,qi=3,Ji=4,Yi=5,Xi=6;function Zi(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;$i(e,n,{name:t,index:r,group:i,on:Hi,tween:Ui,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Wi})}function Qi(e,t){var n=$(e,t);if(n.state>Wi)throw Error(`too late; already scheduled`);return n}function Q(e,t){var n=$(e,t);if(n.state>qi)throw Error(`too late; already running`);return n}function $(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function $i(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Fi(a,0,n.time);function a(e){n.state=Gi,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==Gi)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===qi)return Vi(o);f.state===Ji?(f.state=Xi,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=Xi,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(Vi(function(){n.state===qi&&(n.state=Ji,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=Ki,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===Ki){for(n.state=qi,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=Yi,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===Yi&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=Xi,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function ea(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>Ki&&r.state<Yi,r.state=Xi,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function ta(e){return this.each(function(){ea(this,e)})}function na(e,t){var n,r;return function(){var i=Q(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function ra(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=Q(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function ia(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=$(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?na:ra)(n,e,t))}function aa(e,t,n){var r=e._id;return e.each(function(){var e=Q(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return $(e,r).value[t]}}function oa(e,t){var n;return(typeof t==`number`?ti:t instanceof Mr?ei:(n=Mr(t))?(t=n,ei):oi)(e,t)}function sa(e){return function(){this.removeAttribute(e)}}function ca(e){return function(){this.removeAttributeNS(e.space,e.local)}}function la(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function ua(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function da(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function fa(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function pa(e,t){var n=pt(e),r=n===`transform`?hi:oa;return this.attrTween(e,typeof t==`function`?(n.local?fa:da)(n,r,aa(this,`attr.`+e,t)):t==null?(n.local?ca:sa)(n):(n.local?ua:la)(n,r,t))}function ma(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function ha(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function ga(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&ha(e,i)),n}return i._value=t,i}function _a(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&ma(e,i)),n}return i._value=t,i}function va(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=pt(e);return this.tween(n,(r.local?ga:_a)(r,t))}function ya(e,t){return function(){Qi(this,e).delay=+t.apply(this,arguments)}}function ba(e,t){return t=+t,function(){Qi(this,e).delay=t}}function xa(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?ya:ba)(t,e)):$(this.node(),t).delay}function Sa(e,t){return function(){Q(this,e).duration=+t.apply(this,arguments)}}function Ca(e,t){return t=+t,function(){Q(this,e).duration=t}}function wa(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Sa:Ca)(t,e)):$(this.node(),t).duration}function Ta(e,t){if(typeof t!=`function`)throw Error();return function(){Q(this,e).ease=t}}function Ea(e){var t=this._id;return arguments.length?this.each(Ta(t,e)):$(this.node(),t).ease}function Da(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();Q(this,e).ease=n}}function Oa(e){if(typeof e!=`function`)throw Error();return this.each(Da(this._id,e))}function ka(e){typeof e!=`function`&&(e=Tt(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new io(r,this._parents,this._name,this._id)}function Aa(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new io(o,this._parents,this._name,this._id)}function ja(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function Ma(e,t,n){var r,i,a=ja(t)?Qi:Q;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Na(e,t){var n=this._id;return arguments.length<2?$(this.node(),n).on.on(e):this.each(Ma(n,e,t))}function Pa(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Fa(){return this.on(`end.remove`,Pa(this._id))}function Ia(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=vt(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,Zi(l[f],t,n,f,l,$(u,n)));return new io(a,this._parents,t,n)}function La(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=St(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=$(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&Zi(p,t,n,h,f,m);a.push(f),o.push(u)}return new io(a,o,t,n)}var Ra=ir.prototype.constructor;function za(){return new Ra(this._groups,this._parents)}function Ba(e,t){var n,r,i;return function(){var a=fn(this,e),o=(this.style.removeProperty(e),fn(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function Va(e){return function(){this.style.removeProperty(e)}}function Ha(e,t,n){var r,i=n+``,a;return function(){var o=fn(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function Ua(e,t,n){var r,i,a;return function(){var o=fn(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),fn(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function Wa(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=Q(this,e),l=c.on,u=c.value[a]==null?s||=Va(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function Ga(e,t,n){var r=(e+=``)==`transform`?mi:oa;return t==null?this.styleTween(e,Ba(e,r)).on(`end.style.`+e,Va(e)):typeof t==`function`?this.styleTween(e,Ua(e,r,aa(this,`style.`+e,t))).each(Wa(this._id,e)):this.styleTween(e,Ha(e,r,t),n).on(`end.style.`+e,null)}function Ka(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function qa(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Ka(e,a,n)),r}return a._value=t,a}function Ja(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,qa(e,t,n??``))}function Ya(e){return function(){this.textContent=e}}function Xa(e){return function(){var t=e(this);this.textContent=t??``}}function Za(e){return this.tween(`text`,typeof e==`function`?Xa(aa(this,`text`,e)):Ya(e==null?``:e+``))}function Qa(e){return function(t){this.textContent=e.call(this,t)}}function $a(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Qa(r)),t}return r._value=e,r}function eo(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,$a(e))}function to(){for(var e=this._name,t=this._id,n=ao(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=$(c,t);Zi(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new io(r,this._parents,e,n)}function no(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=Q(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var ro=0;function io(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function ao(){return++ro}var oo=ir.prototype;io.prototype={constructor:io,select:Ia,selectAll:La,selectChild:oo.selectChild,selectChildren:oo.selectChildren,filter:ka,merge:Aa,selection:za,transition:to,call:oo.call,nodes:oo.nodes,node:oo.node,size:oo.size,empty:oo.empty,each:oo.each,on:Na,attr:pa,attrTween:va,style:Ga,styleTween:Ja,text:Za,textTween:eo,remove:Fa,tween:ia,delay:xa,duration:wa,ease:Ea,easeVarying:Oa,end:no,[Symbol.iterator]:oo[Symbol.iterator]};function so(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var co={time:null,delay:0,duration:250,ease:so};function lo(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function uo(e){var t,n;e instanceof io?(t=e._id,e=e._name):(t=ao(),(n=co).time=Mi(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&Zi(c,e,t,l,o,n||lo(c,t));return new io(r,this._parents,e,t)}ir.prototype.interrupt=ta,ir.prototype.transition=uo;var fo=e=>()=>e;function po(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function mo(e,t,n){this.k=e,this.x=t,this.y=n}mo.prototype={constructor:mo,scale:function(e){return e===1?this:new mo(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new mo(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var ho=new mo(1,0,0);mo.prototype;function go(e){e.stopImmediatePropagation()}function _o(e){e.preventDefault(),e.stopImmediatePropagation()}function vo(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function yo(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute(`viewBox`)?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function bo(){return this.__zoom||ho}function xo(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function So(){return navigator.maxTouchPoints||`ontouchstart`in this}function Co(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function wo(){var e=vo,t=yo,n=Co,r=xo,i=So,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,c=bi,l=V(`start`,`zoom`,`end`),u,d,f,p=500,m=150,h=0,g=10;function _(e){e.property(`__zoom`,bo).on(`wheel.zoom`,te,{passive:!1}).on(`mousedown.zoom`,C).on(`dblclick.zoom`,w).filter(i).on(`touchstart.zoom`,T).on(`touchmove.zoom`,E).on(`touchend.zoom touchcancel.zoom`,D).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}_.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property(`__zoom`,bo),e===i?i.interrupt().each(function(){x(this,arguments).event(r).start().zoom(null,typeof t==`function`?t.apply(this,arguments):t).end()}):ee(e,t,n,r)},_.scaleBy=function(e,t,n,r){_.scaleTo(e,function(){return this.__zoom.k*(typeof t==`function`?t.apply(this,arguments):t)},n,r)},_.scaleTo=function(e,r,i,a){_.transform(e,function(){var e=t.apply(this,arguments),a=this.__zoom,s=i==null?b(e):typeof i==`function`?i.apply(this,arguments):i,c=a.invert(s),l=typeof r==`function`?r.apply(this,arguments):r;return n(y(v(a,l),s,c),e,o)},i,a)},_.translateBy=function(e,r,i,a){_.transform(e,function(){return n(this.__zoom.translate(typeof r==`function`?r.apply(this,arguments):r,typeof i==`function`?i.apply(this,arguments):i),t.apply(this,arguments),o)},null,a)},_.translateTo=function(e,r,i,a,s){_.transform(e,function(){var e=t.apply(this,arguments),s=this.__zoom,c=a==null?b(e):typeof a==`function`?a.apply(this,arguments):a;return n(ho.translate(c[0],c[1]).scale(s.k).translate(typeof r==`function`?-r.apply(this,arguments):-r,typeof i==`function`?-i.apply(this,arguments):-i),e,o)},a,s)};function v(e,t){return t=Math.max(a[0],Math.min(a[1],t)),t===e.k?e:new mo(t,e.x,e.y)}function y(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new mo(e.k,r,i)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function ee(e,n,r,i){e.on(`start.zoom`,function(){x(this,arguments).event(i).start()}).on(`interrupt.zoom end.zoom`,function(){x(this,arguments).event(i).end()}).tween(`zoom`,function(){var e=this,a=arguments,o=x(e,a).event(i),s=t.apply(e,a),l=r==null?b(s):typeof r==`function`?r.apply(e,a):r,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),d=e.__zoom,f=typeof n==`function`?n.apply(e,a):n,p=c(d.invert(l).concat(u/d.k),f.invert(l).concat(u/f.k));return function(e){if(e===1)e=f;else{var t=p(e),n=u/t[2];e=new mo(n,l[0]-t[0]*n,l[1]-t[1]*n)}o.zoom(null,e)}})}function x(e,t,n){return!n&&e.__zooming||new S(e,t)}function S(e,n){this.that=e,this.args=n,this.active=0,this.sourceEvent=null,this.extent=t.apply(e,n),this.taps=0}S.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(`start`)),this},zoom:function(e,t){return this.mouse&&e!==`mouse`&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&e!==`touch`&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&e!==`touch`&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit(`zoom`),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(`end`)),this},emit:function(e){var t=or(this.that).datum();l.call(e,this.that,new po(e,{sourceEvent:this.sourceEvent,target:_,type:e,transform:this.that.__zoom,dispatch:l}),t)}};function te(t,...i){if(!e.apply(this,arguments))return;var s=x(this,i).event(t),c=this.__zoom,l=Math.max(a[0],Math.min(a[1],c.k*2**r.apply(this,arguments))),u=cr(t);if(s.wheel)(s.mouse[0][0]!==u[0]||s.mouse[0][1]!==u[1])&&(s.mouse[1]=c.invert(s.mouse[0]=u)),clearTimeout(s.wheel);else if(c.k===l)return;else s.mouse=[u,c.invert(u)],ea(this),s.start();_o(t),s.wheel=setTimeout(d,m),s.zoom(`mouse`,n(y(v(c,l),s.mouse[0],s.mouse[1]),s.extent,o));function d(){s.wheel=null,s.end()}}function C(t,...r){if(f||!e.apply(this,arguments))return;var i=t.currentTarget,a=x(this,r,!0).event(t),s=or(t.view).on(`mousemove.zoom`,d,!0).on(`mouseup.zoom`,p,!0),c=cr(t,i),l=t.clientX,u=t.clientY;dr(t.view),go(t),a.mouse=[c,this.__zoom.invert(c)],ea(this),a.start();function d(e){if(_o(e),!a.moved){var t=e.clientX-l,r=e.clientY-u;a.moved=t*t+r*r>h}a.event(e).zoom(`mouse`,n(y(a.that.__zoom,a.mouse[0]=cr(e,i),a.mouse[1]),a.extent,o))}function p(e){s.on(`mousemove.zoom mouseup.zoom`,null),fr(e.view,a.moved),_o(e),a.event(e).end()}}function w(r,...i){if(e.apply(this,arguments)){var a=this.__zoom,c=cr(r.changedTouches?r.changedTouches[0]:r,this),l=a.invert(c),u=a.k*(r.shiftKey?.5:2),d=n(y(v(a,u),c,l),t.apply(this,i),o);_o(r),s>0?or(this).transition().duration(s).call(ee,d,c,r):or(this).call(_.transform,d,c,r)}}function T(t,...n){if(e.apply(this,arguments)){var r=t.touches,i=r.length,a=x(this,n,t.changedTouches.length===i).event(t),o,s,c,l;for(go(t),s=0;s<i;++s)c=r[s],l=cr(c,this),l=[l,this.__zoom.invert(l),c.identifier],a.touch0?!a.touch1&&a.touch0[2]!==l[2]&&(a.touch1=l,a.taps=0):(a.touch0=l,o=!0,a.taps=1+!!u);u&&=clearTimeout(u),o&&(a.taps<2&&(d=l[0],u=setTimeout(function(){u=null},p)),ea(this),a.start())}}function E(e,...t){if(this.__zooming){var r=x(this,t).event(e),i=e.changedTouches,a=i.length,s,c,l,u;for(_o(e),s=0;s<a;++s)c=i[s],l=cr(c,this),r.touch0&&r.touch0[2]===c.identifier?r.touch0[0]=l:r.touch1&&r.touch1[2]===c.identifier&&(r.touch1[0]=l);if(c=r.that.__zoom,r.touch1){var d=r.touch0[0],f=r.touch0[1],p=r.touch1[0],m=r.touch1[1],h=(h=p[0]-d[0])*h+(h=p[1]-d[1])*h,g=(g=m[0]-f[0])*g+(g=m[1]-f[1])*g;c=v(c,Math.sqrt(h/g)),l=[(d[0]+p[0])/2,(d[1]+p[1])/2],u=[(f[0]+m[0])/2,(f[1]+m[1])/2]}else if(r.touch0)l=r.touch0[0],u=r.touch0[1];else return;r.zoom(`touch`,n(y(c,l,u),r.extent,o))}}function D(e,...t){if(this.__zooming){var n=x(this,t).event(e),r=e.changedTouches,i=r.length,a,o;for(go(e),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),a=0;a<i;++a)o=r[a],n.touch0&&n.touch0[2]===o.identifier?delete n.touch0:n.touch1&&n.touch1[2]===o.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),n.taps===2&&(o=cr(o,this),Math.hypot(d[0]-o[0],d[1]-o[1])<g)){var s=or(this).on(`dblclick.zoom`);s&&s.apply(this,arguments)}}}return _.wheelDelta=function(e){return arguments.length?(r=typeof e==`function`?e:fo(+e),_):r},_.filter=function(t){return arguments.length?(e=typeof t==`function`?t:fo(!!t),_):e},_.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:fo(!!e),_):i},_.extent=function(e){return arguments.length?(t=typeof e==`function`?e:fo([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),_):t},_.scaleExtent=function(e){return arguments.length?(a[0]=+e[0],a[1]=+e[1],_):[a[0],a[1]]},_.translateExtent=function(e){return arguments.length?(o[0][0]=+e[0][0],o[1][0]=+e[1][0],o[0][1]=+e[0][1],o[1][1]=+e[1][1],_):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},_.constrain=function(e){return arguments.length?(n=e,_):n},_.duration=function(e){return arguments.length?(s=+e,_):s},_.interpolate=function(e){return arguments.length?(c=e,_):c},_.on=function(){var e=l.on.apply(l,arguments);return e===l?_:e},_.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,_):Math.sqrt(h)},_.tapDistance=function(e){return arguments.length?(g=+e,_):g},_}var To=Symbol(`MiniMapSlots`),Eo=[`id`,`x`,`y`,`rx`,`ry`,`width`,`height`,`fill`,`stroke`,`stroke-width`,`shape-rendering`],Do=x({name:`MiniMapNode`,compatConfig:{MODE:3},inheritAttrs:!1,props:{id:{},type:{},selected:{type:Boolean},dragging:{type:Boolean},position:{},dimensions:{},borderRadius:{},color:{},shapeRendering:{},strokeColor:{},strokeWidth:{},hidden:{type:Boolean}},emits:[`click`,`dblclick`,`mouseenter`,`mousemove`,`mouseleave`],setup(t,{emit:r}){let i=t,a=c(To),o=u(),s=n(()=>o.style??{});function l(e){r(`click`,e)}function d(e){r(`dblclick`,e)}function f(e){r(`mouseenter`,e)}function p(e){r(`mousemove`,e)}function h(e){r(`mouseleave`,e)}return(t,n)=>!t.hidden&&t.dimensions.width!==0&&t.dimensions.height!==0?(S(),m(C,{key:0},[e(a)[`node-${i.type}`]?(S(),O(k(e(a)[`node-${i.type}`]),E(v({key:0},{...i,...t.$attrs})),null,16)):(S(),m(`rect`,v({key:1,id:t.id},t.$attrs,{class:[`vue-flow__minimap-node`,{selected:t.selected,dragging:t.dragging}],x:t.position.x,y:t.position.y,rx:t.borderRadius,ry:t.borderRadius,width:t.dimensions.width,height:t.dimensions.height,fill:t.color||s.value.background||s.value.backgroundColor,stroke:t.strokeColor,"stroke-width":t.strokeWidth,"shape-rendering":t.shapeRendering,onClick:l,onDblclick:d,onMouseenter:f,onMousemove:p,onMouseleave:h}),null,16,Eo))],64)):j(``,!0)}}),Oo=[`width`,`height`,`viewBox`,`aria-labelledby`],ko=[`id`],Ao=[`d`,`fill`,`stroke`,`stroke-width`],jo=x({name:`MiniMap`,compatConfig:{MODE:3},props:{nodeColor:{type:[String,Function],default:`#e2e2e2`},nodeStrokeColor:{type:[String,Function],default:`transparent`},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:`rgb(240, 240, 240, 0.6)`},maskStrokeColor:{default:`none`},maskStrokeWidth:{default:1},position:{default:`bottom-right`},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:{},height:{},ariaLabel:{default:`Vue Flow mini map`},inversePan:{type:Boolean,default:!1},zoomStep:{default:1},offsetScale:{default:5},maskBorderRadius:{default:0}},emits:[`click`,`nodeClick`,`nodeDblclick`,`nodeMouseenter`,`nodeMousemove`,`nodeMouseleave`],setup(r,{emit:i}){let a=l(),o=u(),{id:s,edges:c,viewport:f,translateExtent:g,dimensions:v,emits:y,d3Selection:x,d3Zoom:E,getNodesInitialized:D}=ke(),k=t();ee(To,a);let A=n(()=>r.width??o.style?.width??200),ne=n(()=>r.height??o.style?.height??150),re=typeof window>`u`||window.chrome?`crispEdges`:`geometricPrecision`,ie=b(()=>typeof r.nodeColor==`string`?()=>r.nodeColor:r.nodeColor),ae=b(()=>typeof r.nodeStrokeColor==`string`?()=>r.nodeStrokeColor:r.nodeStrokeColor),oe=b(()=>typeof r.nodeClassName==`string`?()=>r.nodeClassName:typeof r.nodeClassName==`function`?r.nodeClassName:()=>``),se=b(()=>Ne(D.value.filter(e=>!e.hidden))),M=b(()=>({x:-f.value.x/f.value.zoom,y:-f.value.y/f.value.zoom,width:v.value.width/f.value.zoom,height:v.value.height/f.value.zoom})),ce=b(()=>D.value&&D.value.length?Me(se.value,M.value):M.value),le=b(()=>{let e=ce.value.width/A.value,t=ce.value.height/ne.value;return Math.max(e,t)}),N=b(()=>{let e=le.value*A.value,t=le.value*ne.value,n=r.offsetScale*le.value;return{offset:n,x:ce.value.x-(e-ce.value.width)/2-n,y:ce.value.y-(t-ce.value.height)/2-n,width:e+n*2,height:t+n*2}}),ue=b(()=>!N.value.x||!N.value.y?``:`
|
|
1
|
+
import{B as e,C as t,N as n}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{Ct as r,D as i,E as a,Ft as o,Ht as s,J as c,Lt as l,Nt as u,Ut as d,Yt as f,_ as p,b as m,bt as h,ct as g,en as _,et as v,ft as y,g as b,gt as ee,k as x,mt as S,nn as te,o as C,qt as w,rn as T,tn as E,tt as D,v as O,wt as k,xt as A,y as j,z as ne}from"./runtime-core.esm-bundler-DujKY9QV.js";import{C as re,t as ie,w as ae}from"./runtime-dom.esm-bundler-CyEVRK6B.js";import{n as oe}from"./vue-i18n-o7yraQpR.js";import{a as se}from"./project-launch.store-Im5SMon9.js";import{g as M,h as ce}from"./useApi-s_02lHjl-DZYO2tHU.js";import{C as le,J as N,O as ue,P as de,S as P,Y as fe,a as pe,c as me,dt as F,ft as he,q as ge}from"./src-Ck_MutzB.js";import{a as _e,n as ve,r as ye,s as be,t as xe}from"./scenario.store-C9sSoRzb.js";import{r as Se}from"./trpc-BQ0mLnfI.js";import{a as Ce,g as we,p as Te}from"./schemas-68I2iCLF.js";import{f as Ee,o as De,s as Oe}from"./dist-C9Qdh18x.js";import{A as ke,C as Ae,D as je,E as Me,O as Ne,S as Pe,T as Fe,j as Ie,k as Le,w as Re,x as ze}from"./index-mvpLwxNT.js";import{t as Be}from"./uuid-XipkJWQw.js";var Ve={name:`ControlButton`,compatConfig:{MODE:3}},He=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Ue={type:`button`,class:`vue-flow__controls-button`};function I(e,t,n,r,i,a){return S(),m(`button`,Ue,[A(e.$slots,`default`)])}var L=He(Ve,[[`render`,I]]),We={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`},Ge=[p(`path`,{d:`M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z`},null,-1)];function Ke(e,t){return S(),m(`svg`,We,Ge)}var qe={render:Ke},Je={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 5`},Ye=[p(`path`,{d:`M0 0h32v4.2H0z`},null,-1)];function R(e,t){return S(),m(`svg`,Je,Ye)}var Xe={render:R},Ze={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 30`},Qe=[p(`path`,{d:`M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z`},null,-1)];function $e(e,t){return S(),m(`svg`,Ze,Qe)}var et={render:$e},tt={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`},nt=[p(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z`},null,-1)];function rt(e,t){return S(),m(`svg`,tt,nt)}var it={render:rt},at={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`},ot=[p(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z`},null,-1)];function st(e,t){return S(),m(`svg`,at,ot)}var z={render:st},ct=x({name:`Controls`,compatConfig:{MODE:3},props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>Ae.BottomLeft}},emits:[`zoomIn`,`zoomOut`,`fitView`,`interactionChange`],setup(t,{emit:r}){let{nodesDraggable:a,nodesConnectable:o,elementsSelectable:s,setInteractive:c,zoomIn:l,zoomOut:u,fitView:d,viewport:f,minZoom:p,maxZoom:h}=ke(),g=n(()=>a.value||o.value||s.value),_=n(()=>f.value.zoom<=p.value),v=n(()=>f.value.zoom>=h.value);function y(){l(),r(`zoomIn`)}function b(){u(),r(`zoomOut`)}function ee(){d(t.fitViewParams),r(`fitView`)}function x(){c(!g.value),r(`interactionChange`,!g.value)}return(t,n)=>(S(),O(e(Re),{class:`vue-flow__controls`,position:t.position},{default:w(()=>[A(t.$slots,`top`),t.showZoom?(S(),m(C,{key:0},[A(t.$slots,`control-zoom-in`,{},()=>[i(L,{class:`vue-flow__controls-zoomin`,disabled:v.value,onClick:y},{default:w(()=>[A(t.$slots,`icon-zoom-in`,{},()=>[(S(),O(k(e(qe))))])]),_:3},8,[`disabled`])]),A(t.$slots,`control-zoom-out`,{},()=>[i(L,{class:`vue-flow__controls-zoomout`,disabled:_.value,onClick:b},{default:w(()=>[A(t.$slots,`icon-zoom-out`,{},()=>[(S(),O(k(e(Xe))))])]),_:3},8,[`disabled`])])],64)):j(``,!0),t.showFitView?A(t.$slots,`control-fit-view`,{key:1},()=>[i(L,{class:`vue-flow__controls-fitview`,onClick:ee},{default:w(()=>[A(t.$slots,`icon-fit-view`,{},()=>[(S(),O(k(e(et))))])]),_:3})]):j(``,!0),t.showInteractive?A(t.$slots,`control-interactive`,{key:2},()=>[t.showInteractive?(S(),O(L,{key:0,class:`vue-flow__controls-interactive`,onClick:x},{default:w(()=>[g.value?A(t.$slots,`icon-unlock`,{key:0},()=>[(S(),O(k(e(z))))]):j(``,!0),g.value?j(``,!0):A(t.$slots,`icon-lock`,{key:1},()=>[(S(),O(k(e(it))))])]),_:3})):j(``,!0)]):j(``,!0),A(t.$slots,`default`)]),_:3},8,[`position`]))}}),B={value:()=>{}};function V(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new H(n)}function H(e){this._=e}function lt(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}H.prototype=V.prototype={constructor:H,on:function(e,t){var n=this._,r=lt(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=U(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=ut(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ut(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new H(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function U(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function ut(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=B,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var dt=`http://www.w3.org/1999/xhtml`,ft={svg:`http://www.w3.org/2000/svg`,xhtml:dt,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function pt(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),ft.hasOwnProperty(t)?{space:ft[t],local:e}:e}function mt(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===dt&&t.documentElement.namespaceURI===dt?t.createElement(e):t.createElementNS(n,e)}}function ht(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function gt(e){var t=pt(e);return(t.local?ht:mt)(t)}function _t(){}function vt(e){return e==null?_t:function(){return this.querySelector(e)}}function yt(e){typeof e!=`function`&&(e=vt(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new J(r,this._parents)}function bt(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function xt(){return[]}function St(e){return e==null?xt:function(){return this.querySelectorAll(e)}}function Ct(e){return function(){return bt(e.apply(this,arguments))}}function wt(e){e=typeof e==`function`?Ct(e):St(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new J(r,i)}function Tt(e){return function(){return this.matches(e)}}function Et(e){return function(t){return t.matches(e)}}var W=Array.prototype.find;function Dt(e){return function(){return W.call(this.children,e)}}function Ot(){return this.firstElementChild}function kt(e){return this.select(e==null?Ot:Dt(typeof e==`function`?e:Et(e)))}var At=Array.prototype.filter;function G(){return Array.from(this.children)}function jt(e){return function(){return At.call(this.children,e)}}function Mt(e){return this.selectAll(e==null?G:jt(typeof e==`function`?e:Et(e)))}function K(e){typeof e!=`function`&&(e=Tt(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new J(r,this._parents)}function Nt(e){return Array(e.length)}function Pt(){return new J(this._enter||this._groups.map(Nt),this._parents)}function Ft(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ft.prototype={constructor:Ft,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function It(e){return function(){return e}}function Lt(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new Ft(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function Rt(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new Ft(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function zt(e){return e.__data__}function Bt(e,t){if(!arguments.length)return Array.from(this,zt);var n=t?Rt:Lt,r=this._parents,i=this._groups;typeof e!=`function`&&(e=It(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=Vt(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new J(o,r),o._enter=s,o._exit=c,o}function Vt(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Ht(){return new J(this._exit||this._groups.map(Nt),this._parents)}function Ut(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Wt(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new J(s,this._parents)}function Gt(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Kt(e){e||=qt;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new J(i,this._parents).order()}function qt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Jt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Yt(){return Array.from(this)}function Xt(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function q(){let e=0;for(let t of this)++e;return e}function Zt(){return!this.node()}function Qt(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function $t(e){return function(){this.removeAttribute(e)}}function en(e){return function(){this.removeAttributeNS(e.space,e.local)}}function tn(e,t){return function(){this.setAttribute(e,t)}}function nn(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function rn(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function an(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function on(e,t){var n=pt(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?en:$t:typeof t==`function`?n.local?an:rn:n.local?nn:tn)(n,t))}function sn(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function cn(e){return function(){this.style.removeProperty(e)}}function ln(e,t,n){return function(){this.style.setProperty(e,t,n)}}function un(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function dn(e,t,n){return arguments.length>1?this.each((t==null?cn:typeof t==`function`?un:ln)(e,t,n??``)):fn(this.node(),e)}function fn(e,t){return e.style.getPropertyValue(t)||sn(e).getComputedStyle(e,null).getPropertyValue(t)}function pn(e){return function(){delete this[e]}}function mn(e,t){return function(){this[e]=t}}function hn(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function gn(e,t){return arguments.length>1?this.each((t==null?pn:typeof t==`function`?hn:mn)(e,t)):this.node()[e]}function _n(e){return e.trim().split(/^|\s+/)}function vn(e){return e.classList||new yn(e)}function yn(e){this._node=e,this._names=_n(e.getAttribute(`class`)||``)}yn.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function bn(e,t){for(var n=vn(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function xn(e,t){for(var n=vn(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Sn(e){return function(){bn(this,e)}}function Cn(e){return function(){xn(this,e)}}function wn(e,t){return function(){(t.apply(this,arguments)?bn:xn)(this,e)}}function Tn(e,t){var n=_n(e+``);if(arguments.length<2){for(var r=vn(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?wn:t?Sn:Cn)(n,t))}function En(){this.textContent=``}function Dn(e){return function(){this.textContent=e}}function On(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function kn(e){return arguments.length?this.each(e==null?En:(typeof e==`function`?On:Dn)(e)):this.node().textContent}function An(){this.innerHTML=``}function jn(e){return function(){this.innerHTML=e}}function Mn(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function Nn(e){return arguments.length?this.each(e==null?An:(typeof e==`function`?Mn:jn)(e)):this.node().innerHTML}function Pn(){this.nextSibling&&this.parentNode.appendChild(this)}function Fn(){return this.each(Pn)}function In(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ln(){return this.each(In)}function Rn(e){var t=typeof e==`function`?e:gt(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function zn(){return null}function Bn(e,t){var n=typeof e==`function`?e:gt(e),r=t==null?zn:typeof t==`function`?t:vt(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Vn(){var e=this.parentNode;e&&e.removeChild(this)}function Hn(){return this.each(Vn)}function Un(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Wn(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Gn(e){return this.select(e?Wn:Un)}function Kn(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function qn(e){return function(t){e.call(this,t,this.__data__)}}function Jn(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Yn(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Xn(e,t,n){return function(){var r=this.__on,i,a=qn(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Zn(e,t,n){var r=Jn(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?Xn:Yn,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function Qn(e,t,n){var r=sn(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function $n(e,t){return function(){return Qn(this,e,t)}}function er(e,t){return function(){return Qn(this,e,t.apply(this,arguments))}}function tr(e,t){return this.each((typeof t==`function`?er:$n)(e,t))}function*nr(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var rr=[null];function J(e,t){this._groups=e,this._parents=t}function ir(){return new J([[document.documentElement]],rr)}function ar(){return this}J.prototype=ir.prototype={constructor:J,select:yt,selectAll:wt,selectChild:kt,selectChildren:Mt,filter:K,data:Bt,enter:Pt,exit:Ht,join:Ut,merge:Wt,selection:ar,order:Gt,sort:Kt,call:Jt,nodes:Yt,node:Xt,size:q,empty:Zt,each:Qt,attr:on,style:dn,property:gn,classed:Tn,text:kn,html:Nn,raise:Fn,lower:Ln,append:Rn,insert:Bn,remove:Hn,clone:Gn,datum:Kn,on:Zn,dispatch:tr,[Symbol.iterator]:nr};function or(e){return typeof e==`string`?new J([[document.querySelector(e)]],[document.documentElement]):new J([[e]],rr)}function sr(e){let t;for(;t=e.sourceEvent;)e=t;return e}function cr(e,t){if(e=sr(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var lr={capture:!0,passive:!1};function ur(e){e.preventDefault(),e.stopImmediatePropagation()}function dr(e){var t=e.document.documentElement,n=or(e).on(`dragstart.drag`,ur,lr);`onselectstart`in t?n.on(`selectstart.drag`,ur,lr):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function fr(e,t){var n=e.document.documentElement,r=or(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,ur,lr),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function pr(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function mr(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function hr(){}var gr=.7,_r=1/gr,vr=`\\s*([+-]?\\d+)\\s*`,yr=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Y=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,br=/^#([0-9a-f]{3,8})$/,xr=RegExp(`^rgb\\(${vr},${vr},${vr}\\)$`),Sr=RegExp(`^rgb\\(${Y},${Y},${Y}\\)$`),Cr=RegExp(`^rgba\\(${vr},${vr},${vr},${yr}\\)$`),wr=RegExp(`^rgba\\(${Y},${Y},${Y},${yr}\\)$`),Tr=RegExp(`^hsl\\(${yr},${Y},${Y}\\)$`),Er=RegExp(`^hsla\\(${yr},${Y},${Y},${yr}\\)$`),Dr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};pr(hr,Mr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Or,formatHex:Or,formatHex8:kr,formatHsl:Ar,formatRgb:jr,toString:jr});function Or(){return this.rgb().formatHex()}function kr(){return this.rgb().formatHex8()}function Ar(){return Wr(this).formatHsl()}function jr(){return this.rgb().formatRgb()}function Mr(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=br.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Nr(t):n===3?new X(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Pr(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Pr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=xr.exec(e))?new X(t[1],t[2],t[3],1):(t=Sr.exec(e))?new X(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Cr.exec(e))?Pr(t[1],t[2],t[3],t[4]):(t=wr.exec(e))?Pr(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Tr.exec(e))?Ur(t[1],t[2]/100,t[3]/100,1):(t=Er.exec(e))?Ur(t[1],t[2]/100,t[3]/100,t[4]):Dr.hasOwnProperty(e)?Nr(Dr[e]):e===`transparent`?new X(NaN,NaN,NaN,0):null}function Nr(e){return new X(e>>16&255,e>>8&255,e&255,1)}function Pr(e,t,n,r){return r<=0&&(e=t=n=NaN),new X(e,t,n,r)}function Fr(e){return e instanceof hr||(e=Mr(e)),e?(e=e.rgb(),new X(e.r,e.g,e.b,e.opacity)):new X}function Ir(e,t,n,r){return arguments.length===1?Fr(e):new X(e,t,n,r??1)}function X(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}pr(X,Ir,mr(hr,{brighter(e){return e=e==null?_r:_r**+e,new X(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?gr:gr**+e,new X(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new X(Vr(this.r),Vr(this.g),Vr(this.b),Br(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Lr,formatHex:Lr,formatHex8:Rr,formatRgb:zr,toString:zr}));function Lr(){return`#${Hr(this.r)}${Hr(this.g)}${Hr(this.b)}`}function Rr(){return`#${Hr(this.r)}${Hr(this.g)}${Hr(this.b)}${Hr((isNaN(this.opacity)?1:this.opacity)*255)}`}function zr(){let e=Br(this.opacity);return`${e===1?`rgb(`:`rgba(`}${Vr(this.r)}, ${Vr(this.g)}, ${Vr(this.b)}${e===1?`)`:`, ${e})`}`}function Br(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Hr(e){return e=Vr(e),(e<16?`0`:``)+e.toString(16)}function Ur(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Z(e,t,n,r)}function Wr(e){if(e instanceof Z)return new Z(e.h,e.s,e.l,e.opacity);if(e instanceof hr||(e=Mr(e)),!e)return new Z;if(e instanceof Z)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Z(o,s,c,e.opacity)}function Gr(e,t,n,r){return arguments.length===1?Wr(e):new Z(e,t,n,r??1)}function Z(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}pr(Z,Gr,mr(hr,{brighter(e){return e=e==null?_r:_r**+e,new Z(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?gr:gr**+e,new Z(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new X(Jr(e>=240?e-240:e+120,i,r),Jr(e,i,r),Jr(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Z(Kr(this.h),qr(this.s),qr(this.l),Br(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Br(this.opacity);return`${e===1?`hsl(`:`hsla(`}${Kr(this.h)}, ${qr(this.s)*100}%, ${qr(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function Kr(e){return e=(e||0)%360,e<0?e+360:e}function qr(e){return Math.max(0,Math.min(1,e||0))}function Jr(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Yr=e=>()=>e;function Xr(e,t){return function(n){return e+n*t}}function Zr(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Qr(e){return(e=+e)==1?$r:function(t,n){return n-t?Zr(t,n,e):Yr(isNaN(t)?n:t)}}function $r(e,t){var n=t-e;return n?Xr(e,n):Yr(isNaN(e)?t:e)}var ei=function e(t){var n=Qr(t);function r(e,t){var r=n((e=Ir(e)).r,(t=Ir(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=$r(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r}(1);function ti(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var ni=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ri=new RegExp(ni.source,`g`);function ii(e){return function(){return e}}function ai(e){return function(t){return e(t)+``}}function oi(e,t){var n=ni.lastIndex=ri.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=ni.exec(e))&&(i=ri.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:ti(r,i)})),n=ri.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?ai(c[0].x):ii(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}var si=180/Math.PI,ci={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function li(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*si,skewX:Math.atan(c)*si,scaleX:o,scaleY:s}}var ui;function di(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?ci:li(t.a,t.b,t.c,t.d,t.e,t.f)}function fi(e){return e==null||(ui||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),ui.setAttribute(`transform`,e),!(e=ui.transform.baseVal.consolidate()))?ci:(e=e.matrix,li(e.a,e.b,e.c,e.d,e.e,e.f))}function pi(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:ti(e,i)},{i:c-2,x:ti(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:ti(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:ti(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:ti(e,n)},{i:s-2,x:ti(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var mi=pi(di,`px, `,`px)`,`deg)`),hi=pi(fi,`, `,`)`,`)`),gi=1e-12;function _i(e){return((e=Math.exp(e))+1/e)/2}function vi(e){return((e=Math.exp(e))-1/e)/2}function yi(e){return((e=Math.exp(2*e))-1)/(e+1)}var bi=function e(t,n,r){function i(e,i){var a=e[0],o=e[1],s=e[2],c=i[0],l=i[1],u=i[2],d=c-a,f=l-o,p=d*d+f*f,m,h;if(p<gi)h=Math.log(u/s)/t,m=function(e){return[a+e*d,o+e*f,s*Math.exp(t*e*h)]};else{var g=Math.sqrt(p),_=(u*u-s*s+r*p)/(2*s*n*g),v=(u*u-s*s-r*p)/(2*u*n*g),y=Math.log(Math.sqrt(_*_+1)-_);h=(Math.log(Math.sqrt(v*v+1)-v)-y)/t,m=function(e){var r=e*h,i=_i(y),c=s/(n*g)*(i*yi(t*r+y)-vi(y));return[a+c*d,o+c*f,s*i/_i(t*r+y)]}}return m.duration=h*1e3*t/Math.SQRT2,m}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i}(Math.SQRT2,2,4),xi=0,Si=0,Ci=0,wi=1e3,Ti,Ei,Di=0,Oi=0,ki=0,Ai=typeof performance==`object`&&performance.now?performance:Date,ji=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Mi(){return Oi||=(ji(Ni),Ai.now()+ki)}function Ni(){Oi=0}function Pi(){this._call=this._time=this._next=null}Pi.prototype=Fi.prototype={constructor:Pi,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?Mi():+n)+(t==null?0:+t),!this._next&&Ei!==this&&(Ei?Ei._next=this:Ti=this,Ei=this),this._call=e,this._time=n,Bi()},stop:function(){this._call&&(this._call=null,this._time=1/0,Bi())}};function Fi(e,t,n){var r=new Pi;return r.restart(e,t,n),r}function Ii(){Mi(),++xi;for(var e=Ti,t;e;)(t=Oi-e._time)>=0&&e._call.call(void 0,t),e=e._next;--xi}function Li(){Oi=(Di=Ai.now())+ki,xi=Si=0;try{Ii()}finally{xi=0,zi(),Oi=0}}function Ri(){var e=Ai.now(),t=e-Di;t>wi&&(ki-=t,Di=e)}function zi(){for(var e,t=Ti,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Ti=n);Ei=e,Bi(r)}function Bi(e){xi||(Si&&=clearTimeout(Si),e-Oi>24?(e<1/0&&(Si=setTimeout(Li,e-Ai.now()-ki)),Ci&&=clearInterval(Ci)):(Ci||=(Di=Ai.now(),setInterval(Ri,wi)),xi=1,ji(Li)))}function Vi(e,t,n){var r=new Pi;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var Hi=V(`start`,`end`,`cancel`,`interrupt`),Ui=[],Wi=0,Gi=1,Ki=2,qi=3,Ji=4,Yi=5,Xi=6;function Zi(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;$i(e,n,{name:t,index:r,group:i,on:Hi,tween:Ui,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Wi})}function Qi(e,t){var n=$(e,t);if(n.state>Wi)throw Error(`too late; already scheduled`);return n}function Q(e,t){var n=$(e,t);if(n.state>qi)throw Error(`too late; already running`);return n}function $(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function $i(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Fi(a,0,n.time);function a(e){n.state=Gi,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==Gi)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===qi)return Vi(o);f.state===Ji?(f.state=Xi,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=Xi,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(Vi(function(){n.state===qi&&(n.state=Ji,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=Ki,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===Ki){for(n.state=qi,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=Yi,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===Yi&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=Xi,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function ea(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>Ki&&r.state<Yi,r.state=Xi,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function ta(e){return this.each(function(){ea(this,e)})}function na(e,t){var n,r;return function(){var i=Q(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function ra(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=Q(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function ia(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=$(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?na:ra)(n,e,t))}function aa(e,t,n){var r=e._id;return e.each(function(){var e=Q(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return $(e,r).value[t]}}function oa(e,t){var n;return(typeof t==`number`?ti:t instanceof Mr?ei:(n=Mr(t))?(t=n,ei):oi)(e,t)}function sa(e){return function(){this.removeAttribute(e)}}function ca(e){return function(){this.removeAttributeNS(e.space,e.local)}}function la(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function ua(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function da(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function fa(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function pa(e,t){var n=pt(e),r=n===`transform`?hi:oa;return this.attrTween(e,typeof t==`function`?(n.local?fa:da)(n,r,aa(this,`attr.`+e,t)):t==null?(n.local?ca:sa)(n):(n.local?ua:la)(n,r,t))}function ma(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function ha(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function ga(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&ha(e,i)),n}return i._value=t,i}function _a(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&ma(e,i)),n}return i._value=t,i}function va(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=pt(e);return this.tween(n,(r.local?ga:_a)(r,t))}function ya(e,t){return function(){Qi(this,e).delay=+t.apply(this,arguments)}}function ba(e,t){return t=+t,function(){Qi(this,e).delay=t}}function xa(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?ya:ba)(t,e)):$(this.node(),t).delay}function Sa(e,t){return function(){Q(this,e).duration=+t.apply(this,arguments)}}function Ca(e,t){return t=+t,function(){Q(this,e).duration=t}}function wa(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Sa:Ca)(t,e)):$(this.node(),t).duration}function Ta(e,t){if(typeof t!=`function`)throw Error();return function(){Q(this,e).ease=t}}function Ea(e){var t=this._id;return arguments.length?this.each(Ta(t,e)):$(this.node(),t).ease}function Da(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();Q(this,e).ease=n}}function Oa(e){if(typeof e!=`function`)throw Error();return this.each(Da(this._id,e))}function ka(e){typeof e!=`function`&&(e=Tt(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new io(r,this._parents,this._name,this._id)}function Aa(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new io(o,this._parents,this._name,this._id)}function ja(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function Ma(e,t,n){var r,i,a=ja(t)?Qi:Q;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Na(e,t){var n=this._id;return arguments.length<2?$(this.node(),n).on.on(e):this.each(Ma(n,e,t))}function Pa(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Fa(){return this.on(`end.remove`,Pa(this._id))}function Ia(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=vt(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,Zi(l[f],t,n,f,l,$(u,n)));return new io(a,this._parents,t,n)}function La(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=St(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=$(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&Zi(p,t,n,h,f,m);a.push(f),o.push(u)}return new io(a,o,t,n)}var Ra=ir.prototype.constructor;function za(){return new Ra(this._groups,this._parents)}function Ba(e,t){var n,r,i;return function(){var a=fn(this,e),o=(this.style.removeProperty(e),fn(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function Va(e){return function(){this.style.removeProperty(e)}}function Ha(e,t,n){var r,i=n+``,a;return function(){var o=fn(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function Ua(e,t,n){var r,i,a;return function(){var o=fn(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),fn(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function Wa(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=Q(this,e),l=c.on,u=c.value[a]==null?s||=Va(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function Ga(e,t,n){var r=(e+=``)==`transform`?mi:oa;return t==null?this.styleTween(e,Ba(e,r)).on(`end.style.`+e,Va(e)):typeof t==`function`?this.styleTween(e,Ua(e,r,aa(this,`style.`+e,t))).each(Wa(this._id,e)):this.styleTween(e,Ha(e,r,t),n).on(`end.style.`+e,null)}function Ka(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function qa(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Ka(e,a,n)),r}return a._value=t,a}function Ja(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,qa(e,t,n??``))}function Ya(e){return function(){this.textContent=e}}function Xa(e){return function(){var t=e(this);this.textContent=t??``}}function Za(e){return this.tween(`text`,typeof e==`function`?Xa(aa(this,`text`,e)):Ya(e==null?``:e+``))}function Qa(e){return function(t){this.textContent=e.call(this,t)}}function $a(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Qa(r)),t}return r._value=e,r}function eo(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,$a(e))}function to(){for(var e=this._name,t=this._id,n=ao(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=$(c,t);Zi(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new io(r,this._parents,e,n)}function no(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=Q(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var ro=0;function io(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function ao(){return++ro}var oo=ir.prototype;io.prototype={constructor:io,select:Ia,selectAll:La,selectChild:oo.selectChild,selectChildren:oo.selectChildren,filter:ka,merge:Aa,selection:za,transition:to,call:oo.call,nodes:oo.nodes,node:oo.node,size:oo.size,empty:oo.empty,each:oo.each,on:Na,attr:pa,attrTween:va,style:Ga,styleTween:Ja,text:Za,textTween:eo,remove:Fa,tween:ia,delay:xa,duration:wa,ease:Ea,easeVarying:Oa,end:no,[Symbol.iterator]:oo[Symbol.iterator]};function so(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var co={time:null,delay:0,duration:250,ease:so};function lo(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function uo(e){var t,n;e instanceof io?(t=e._id,e=e._name):(t=ao(),(n=co).time=Mi(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&Zi(c,e,t,l,o,n||lo(c,t));return new io(r,this._parents,e,t)}ir.prototype.interrupt=ta,ir.prototype.transition=uo;var fo=e=>()=>e;function po(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function mo(e,t,n){this.k=e,this.x=t,this.y=n}mo.prototype={constructor:mo,scale:function(e){return e===1?this:new mo(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new mo(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var ho=new mo(1,0,0);mo.prototype;function go(e){e.stopImmediatePropagation()}function _o(e){e.preventDefault(),e.stopImmediatePropagation()}function vo(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function yo(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute(`viewBox`)?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function bo(){return this.__zoom||ho}function xo(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function So(){return navigator.maxTouchPoints||`ontouchstart`in this}function Co(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function wo(){var e=vo,t=yo,n=Co,r=xo,i=So,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,c=bi,l=V(`start`,`zoom`,`end`),u,d,f,p=500,m=150,h=0,g=10;function _(e){e.property(`__zoom`,bo).on(`wheel.zoom`,te,{passive:!1}).on(`mousedown.zoom`,C).on(`dblclick.zoom`,w).filter(i).on(`touchstart.zoom`,T).on(`touchmove.zoom`,E).on(`touchend.zoom touchcancel.zoom`,D).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}_.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property(`__zoom`,bo),e===i?i.interrupt().each(function(){x(this,arguments).event(r).start().zoom(null,typeof t==`function`?t.apply(this,arguments):t).end()}):ee(e,t,n,r)},_.scaleBy=function(e,t,n,r){_.scaleTo(e,function(){return this.__zoom.k*(typeof t==`function`?t.apply(this,arguments):t)},n,r)},_.scaleTo=function(e,r,i,a){_.transform(e,function(){var e=t.apply(this,arguments),a=this.__zoom,s=i==null?b(e):typeof i==`function`?i.apply(this,arguments):i,c=a.invert(s),l=typeof r==`function`?r.apply(this,arguments):r;return n(y(v(a,l),s,c),e,o)},i,a)},_.translateBy=function(e,r,i,a){_.transform(e,function(){return n(this.__zoom.translate(typeof r==`function`?r.apply(this,arguments):r,typeof i==`function`?i.apply(this,arguments):i),t.apply(this,arguments),o)},null,a)},_.translateTo=function(e,r,i,a,s){_.transform(e,function(){var e=t.apply(this,arguments),s=this.__zoom,c=a==null?b(e):typeof a==`function`?a.apply(this,arguments):a;return n(ho.translate(c[0],c[1]).scale(s.k).translate(typeof r==`function`?-r.apply(this,arguments):-r,typeof i==`function`?-i.apply(this,arguments):-i),e,o)},a,s)};function v(e,t){return t=Math.max(a[0],Math.min(a[1],t)),t===e.k?e:new mo(t,e.x,e.y)}function y(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new mo(e.k,r,i)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function ee(e,n,r,i){e.on(`start.zoom`,function(){x(this,arguments).event(i).start()}).on(`interrupt.zoom end.zoom`,function(){x(this,arguments).event(i).end()}).tween(`zoom`,function(){var e=this,a=arguments,o=x(e,a).event(i),s=t.apply(e,a),l=r==null?b(s):typeof r==`function`?r.apply(e,a):r,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),d=e.__zoom,f=typeof n==`function`?n.apply(e,a):n,p=c(d.invert(l).concat(u/d.k),f.invert(l).concat(u/f.k));return function(e){if(e===1)e=f;else{var t=p(e),n=u/t[2];e=new mo(n,l[0]-t[0]*n,l[1]-t[1]*n)}o.zoom(null,e)}})}function x(e,t,n){return!n&&e.__zooming||new S(e,t)}function S(e,n){this.that=e,this.args=n,this.active=0,this.sourceEvent=null,this.extent=t.apply(e,n),this.taps=0}S.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(`start`)),this},zoom:function(e,t){return this.mouse&&e!==`mouse`&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&e!==`touch`&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&e!==`touch`&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit(`zoom`),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(`end`)),this},emit:function(e){var t=or(this.that).datum();l.call(e,this.that,new po(e,{sourceEvent:this.sourceEvent,target:_,type:e,transform:this.that.__zoom,dispatch:l}),t)}};function te(t,...i){if(!e.apply(this,arguments))return;var s=x(this,i).event(t),c=this.__zoom,l=Math.max(a[0],Math.min(a[1],c.k*2**r.apply(this,arguments))),u=cr(t);if(s.wheel)(s.mouse[0][0]!==u[0]||s.mouse[0][1]!==u[1])&&(s.mouse[1]=c.invert(s.mouse[0]=u)),clearTimeout(s.wheel);else if(c.k===l)return;else s.mouse=[u,c.invert(u)],ea(this),s.start();_o(t),s.wheel=setTimeout(d,m),s.zoom(`mouse`,n(y(v(c,l),s.mouse[0],s.mouse[1]),s.extent,o));function d(){s.wheel=null,s.end()}}function C(t,...r){if(f||!e.apply(this,arguments))return;var i=t.currentTarget,a=x(this,r,!0).event(t),s=or(t.view).on(`mousemove.zoom`,d,!0).on(`mouseup.zoom`,p,!0),c=cr(t,i),l=t.clientX,u=t.clientY;dr(t.view),go(t),a.mouse=[c,this.__zoom.invert(c)],ea(this),a.start();function d(e){if(_o(e),!a.moved){var t=e.clientX-l,r=e.clientY-u;a.moved=t*t+r*r>h}a.event(e).zoom(`mouse`,n(y(a.that.__zoom,a.mouse[0]=cr(e,i),a.mouse[1]),a.extent,o))}function p(e){s.on(`mousemove.zoom mouseup.zoom`,null),fr(e.view,a.moved),_o(e),a.event(e).end()}}function w(r,...i){if(e.apply(this,arguments)){var a=this.__zoom,c=cr(r.changedTouches?r.changedTouches[0]:r,this),l=a.invert(c),u=a.k*(r.shiftKey?.5:2),d=n(y(v(a,u),c,l),t.apply(this,i),o);_o(r),s>0?or(this).transition().duration(s).call(ee,d,c,r):or(this).call(_.transform,d,c,r)}}function T(t,...n){if(e.apply(this,arguments)){var r=t.touches,i=r.length,a=x(this,n,t.changedTouches.length===i).event(t),o,s,c,l;for(go(t),s=0;s<i;++s)c=r[s],l=cr(c,this),l=[l,this.__zoom.invert(l),c.identifier],a.touch0?!a.touch1&&a.touch0[2]!==l[2]&&(a.touch1=l,a.taps=0):(a.touch0=l,o=!0,a.taps=1+!!u);u&&=clearTimeout(u),o&&(a.taps<2&&(d=l[0],u=setTimeout(function(){u=null},p)),ea(this),a.start())}}function E(e,...t){if(this.__zooming){var r=x(this,t).event(e),i=e.changedTouches,a=i.length,s,c,l,u;for(_o(e),s=0;s<a;++s)c=i[s],l=cr(c,this),r.touch0&&r.touch0[2]===c.identifier?r.touch0[0]=l:r.touch1&&r.touch1[2]===c.identifier&&(r.touch1[0]=l);if(c=r.that.__zoom,r.touch1){var d=r.touch0[0],f=r.touch0[1],p=r.touch1[0],m=r.touch1[1],h=(h=p[0]-d[0])*h+(h=p[1]-d[1])*h,g=(g=m[0]-f[0])*g+(g=m[1]-f[1])*g;c=v(c,Math.sqrt(h/g)),l=[(d[0]+p[0])/2,(d[1]+p[1])/2],u=[(f[0]+m[0])/2,(f[1]+m[1])/2]}else if(r.touch0)l=r.touch0[0],u=r.touch0[1];else return;r.zoom(`touch`,n(y(c,l,u),r.extent,o))}}function D(e,...t){if(this.__zooming){var n=x(this,t).event(e),r=e.changedTouches,i=r.length,a,o;for(go(e),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),a=0;a<i;++a)o=r[a],n.touch0&&n.touch0[2]===o.identifier?delete n.touch0:n.touch1&&n.touch1[2]===o.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),n.taps===2&&(o=cr(o,this),Math.hypot(d[0]-o[0],d[1]-o[1])<g)){var s=or(this).on(`dblclick.zoom`);s&&s.apply(this,arguments)}}}return _.wheelDelta=function(e){return arguments.length?(r=typeof e==`function`?e:fo(+e),_):r},_.filter=function(t){return arguments.length?(e=typeof t==`function`?t:fo(!!t),_):e},_.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:fo(!!e),_):i},_.extent=function(e){return arguments.length?(t=typeof e==`function`?e:fo([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),_):t},_.scaleExtent=function(e){return arguments.length?(a[0]=+e[0],a[1]=+e[1],_):[a[0],a[1]]},_.translateExtent=function(e){return arguments.length?(o[0][0]=+e[0][0],o[1][0]=+e[1][0],o[0][1]=+e[0][1],o[1][1]=+e[1][1],_):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},_.constrain=function(e){return arguments.length?(n=e,_):n},_.duration=function(e){return arguments.length?(s=+e,_):s},_.interpolate=function(e){return arguments.length?(c=e,_):c},_.on=function(){var e=l.on.apply(l,arguments);return e===l?_:e},_.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,_):Math.sqrt(h)},_.tapDistance=function(e){return arguments.length?(g=+e,_):g},_}var To=Symbol(`MiniMapSlots`),Eo=[`id`,`x`,`y`,`rx`,`ry`,`width`,`height`,`fill`,`stroke`,`stroke-width`,`shape-rendering`],Do=x({name:`MiniMapNode`,compatConfig:{MODE:3},inheritAttrs:!1,props:{id:{},type:{},selected:{type:Boolean},dragging:{type:Boolean},position:{},dimensions:{},borderRadius:{},color:{},shapeRendering:{},strokeColor:{},strokeWidth:{},hidden:{type:Boolean}},emits:[`click`,`dblclick`,`mouseenter`,`mousemove`,`mouseleave`],setup(t,{emit:r}){let i=t,a=c(To),o=u(),s=n(()=>o.style??{});function l(e){r(`click`,e)}function d(e){r(`dblclick`,e)}function f(e){r(`mouseenter`,e)}function p(e){r(`mousemove`,e)}function h(e){r(`mouseleave`,e)}return(t,n)=>!t.hidden&&t.dimensions.width!==0&&t.dimensions.height!==0?(S(),m(C,{key:0},[e(a)[`node-${i.type}`]?(S(),O(k(e(a)[`node-${i.type}`]),E(v({key:0},{...i,...t.$attrs})),null,16)):(S(),m(`rect`,v({key:1,id:t.id},t.$attrs,{class:[`vue-flow__minimap-node`,{selected:t.selected,dragging:t.dragging}],x:t.position.x,y:t.position.y,rx:t.borderRadius,ry:t.borderRadius,width:t.dimensions.width,height:t.dimensions.height,fill:t.color||s.value.background||s.value.backgroundColor,stroke:t.strokeColor,"stroke-width":t.strokeWidth,"shape-rendering":t.shapeRendering,onClick:l,onDblclick:d,onMouseenter:f,onMousemove:p,onMouseleave:h}),null,16,Eo))],64)):j(``,!0)}}),Oo=[`width`,`height`,`viewBox`,`aria-labelledby`],ko=[`id`],Ao=[`d`,`fill`,`stroke`,`stroke-width`],jo=x({name:`MiniMap`,compatConfig:{MODE:3},props:{nodeColor:{type:[String,Function],default:`#e2e2e2`},nodeStrokeColor:{type:[String,Function],default:`transparent`},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:`rgb(240, 240, 240, 0.6)`},maskStrokeColor:{default:`none`},maskStrokeWidth:{default:1},position:{default:`bottom-right`},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:{},height:{},ariaLabel:{default:`Vue Flow mini map`},inversePan:{type:Boolean,default:!1},zoomStep:{default:1},offsetScale:{default:5},maskBorderRadius:{default:0}},emits:[`click`,`nodeClick`,`nodeDblclick`,`nodeMouseenter`,`nodeMousemove`,`nodeMouseleave`],setup(r,{emit:i}){let a=l(),o=u(),{id:s,edges:c,viewport:f,translateExtent:g,dimensions:v,emits:y,d3Selection:x,d3Zoom:E,getNodesInitialized:D}=ke(),k=t();ee(To,a);let A=n(()=>r.width??o.style?.width??200),ne=n(()=>r.height??o.style?.height??150),re=typeof window>`u`||window.chrome?`crispEdges`:`geometricPrecision`,ie=b(()=>typeof r.nodeColor==`string`?()=>r.nodeColor:r.nodeColor),ae=b(()=>typeof r.nodeStrokeColor==`string`?()=>r.nodeStrokeColor:r.nodeStrokeColor),oe=b(()=>typeof r.nodeClassName==`string`?()=>r.nodeClassName:typeof r.nodeClassName==`function`?r.nodeClassName:()=>``),se=b(()=>Ne(D.value.filter(e=>!e.hidden))),M=b(()=>({x:-f.value.x/f.value.zoom,y:-f.value.y/f.value.zoom,width:v.value.width/f.value.zoom,height:v.value.height/f.value.zoom})),ce=b(()=>D.value&&D.value.length?Me(se.value,M.value):M.value),le=b(()=>{let e=ce.value.width/A.value,t=ce.value.height/ne.value;return Math.max(e,t)}),N=b(()=>{let e=le.value*A.value,t=le.value*ne.value,n=r.offsetScale*le.value;return{offset:n,x:ce.value.x-(e-ce.value.width)/2-n,y:ce.value.y-(t-ce.value.height)/2-n,width:e+n*2,height:t+n*2}}),ue=b(()=>!N.value.x||!N.value.y?``:`
|
|
2
2
|
M${N.value.x-N.value.offset},${N.value.y-N.value.offset}
|
|
3
3
|
h${N.value.width+N.value.offset*2}
|
|
4
4
|
v${N.value.height+N.value.offset*2}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,C as t}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{k as n,mt as r,v as i}from"./runtime-core.esm-bundler-DujKY9QV.js";import{n as a}from"./vue-i18n-o7yraQpR.js";import{P as o}from"./src-
|
|
1
|
+
import{B as e,C as t}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{k as n,mt as r,v as i}from"./runtime-core.esm-bundler-DujKY9QV.js";import{n as a}from"./vue-i18n-o7yraQpR.js";import{P as o}from"./src-Ck_MutzB.js";import{n as s}from"./cloud-client-CEVx-bg6.js";import{t as c}from"./src-COZZWm-m.js";import{t as l}from"./useProjectCloudOrg-B3rNPes5.js";var u=n({__name:`SendToChatDialog`,setup(n,{expose:u}){let{t:d}=a(),f=o(),{orgId:p,cloudUser:m}=l(),h=t(null);function g(e,t){return t?d(`sendToChat.${e}`,t):d(`sendToChat.${e}`)}function _(){f.add({severity:`success`,summary:d(`sendToChat.sent`),life:2500})}function v(e){p.value&&h.value?.open(e)}return u({open:v}),(t,n)=>(r(),i(e(c),{ref_key:`dialogRef`,ref:h,client:e(s),t:g,"current-user-id":e(m)?.id,"org-id":e(p),"lock-organization":``,onSent:_},null,8,[`client`,`current-user-id`,`org-id`]))}});export{u as t};
|