orcaq 1.1.9 → 1.1.10
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{ljX6O69y.js → -WSV_TU1.js} +1 -1
- package/.output/public/_nuxt/{DDNFAZ6A.js → 0U50G6dt.js} +1 -1
- package/.output/public/_nuxt/{Cgc3lXst.js → 0yW2dL-K.js} +1 -1
- package/.output/public/_nuxt/{DZJEpoYA.js → 1V1SIDI5.js} +1 -1
- package/.output/public/_nuxt/{CiGbpFVs.js → 24W1ftax.js} +1 -1
- package/.output/public/_nuxt/{Dcf3u1x9.js → 339BCoyy.js} +1 -1
- package/.output/public/_nuxt/{B6aTbrvX.js → 9PqzQzi0.js} +1 -1
- package/.output/public/_nuxt/{Cilp0euQ.js → 9Skr9Ccw.js} +1 -1
- package/.output/public/_nuxt/{BP23Jaxf.js → 9eKRx5AF.js} +1 -1
- package/.output/public/_nuxt/{CX2dGf8T.js → 9vfu7pKH.js} +1 -1
- package/.output/public/_nuxt/B79M7zD1.js +1 -0
- package/.output/public/_nuxt/{CAnZNTn6.js → BDw-ivE-.js} +1 -1
- package/.output/public/_nuxt/{Btu3pVWi.js → BFOjhnLA.js} +1 -1
- package/.output/public/_nuxt/{B-E4SrDA.js → BFYNB1ok.js} +1 -1
- package/.output/public/_nuxt/{DrfFcngk.js → BIBdWmGh.js} +1 -1
- package/.output/public/_nuxt/{CfglFxLQ.js → BIDVPCgr.js} +1 -1
- package/.output/public/_nuxt/{CT4V-SdE.js → BJMwGHo7.js} +1 -1
- package/.output/public/_nuxt/{B-OC4Wzf.js → BKh6DDUh.js} +1 -1
- package/.output/public/_nuxt/{CGlRJg9T.js → BLDVl9Iw.js} +1 -1
- package/.output/public/_nuxt/{DMhhDVL0.js → BNgGNFV2.js} +1 -1
- package/.output/public/_nuxt/{CjE9xodL.js → BP-G5cXp.js} +1 -1
- package/.output/public/_nuxt/{ImQ5Dcjp.js → BS966b0P.js} +1 -1
- package/.output/public/_nuxt/{BIYjBgOJ.js → B_Oy26qU.js} +1 -1
- package/.output/public/_nuxt/Bdou58NY.js +1 -0
- package/.output/public/_nuxt/{CHFYZcjC.js → BjfaOtB-.js} +1 -1
- package/.output/public/_nuxt/{Dpdssse1.js → BlngscFe.js} +1 -1
- package/.output/public/_nuxt/{DB45HoaN.js → BsXv3P9A.js} +1 -1
- package/.output/public/_nuxt/{DNL5Q-iy.js → Buh85F8i.js} +1 -1
- package/.output/public/_nuxt/{DYFx7Tau.js → Bvi2huT8.js} +1 -1
- package/.output/public/_nuxt/{W2el5otm.js → BxlUlYz1.js} +1 -1
- package/.output/public/_nuxt/{BqQfmS94.js → ByJGqBjE.js} +1 -1
- package/.output/public/_nuxt/{D8dLCNO1.js → C-M7J4rh.js} +1 -1
- package/.output/public/_nuxt/{DDgsZmht.js → C04-ICJx.js} +1 -1
- package/.output/public/_nuxt/{Ce00XEKL.js → C2Czrs1u.js} +1 -1
- package/.output/public/_nuxt/{C4zVAAUp.js → C5Feel6b.js} +1 -1
- package/.output/public/_nuxt/{jgZoykhT.js → CAVSZeVY.js} +1 -1
- package/.output/public/_nuxt/{BblWMS7J.js → CAcViJl9.js} +3 -3
- package/.output/public/_nuxt/{B2Wngdut.js → CBge6eLY.js} +1 -1
- package/.output/public/_nuxt/{lFU3Ma5J.js → CC8wYgAN.js} +1 -1
- package/.output/public/_nuxt/{yPPOBtqs.js → CEIpXOz0.js} +1 -1
- package/.output/public/_nuxt/CI85gLx4.js +1 -0
- package/.output/public/_nuxt/{CH3m0zKs.js → CJeCcjmd.js} +1 -1
- package/.output/public/_nuxt/{V_GiMERb.js → CJuYfiL1.js} +1 -1
- package/.output/public/_nuxt/{BWpduGRB.js → CNErkSjF.js} +1 -1
- package/.output/public/_nuxt/COII6plA.js +31 -0
- package/.output/public/_nuxt/{EzQMUIRl.js → CRCn6mdA.js} +1 -1
- package/.output/public/_nuxt/{w8sha2t6.js → CUtdecax.js} +1 -1
- package/.output/public/_nuxt/{CQi4GvAy.js → CYm7TuhP.js} +1 -1
- package/.output/public/_nuxt/{CM7fDldV.js → CbkolJXg.js} +1 -1
- package/.output/public/_nuxt/{DngnCd9Q.js → CeA2-eDW.js} +1 -1
- package/.output/public/_nuxt/CgY96xS_.js +1 -0
- package/.output/public/_nuxt/{BX-NC3FD.js → Ch9kUYU-.js} +1 -1
- package/.output/public/_nuxt/{DeGwWuWf.js → Ch_iEFHi.js} +1 -1
- package/.output/public/_nuxt/{D_dxq6Av.js → Co6sZiuo.js} +1 -1
- package/.output/public/_nuxt/{BlVXGJOG.js → Cu7zvuYQ.js} +1 -1
- package/.output/public/_nuxt/CwcaMelw.js +1 -0
- package/.output/public/_nuxt/{s10hyhzI.js → CxFAImHj.js} +1 -1
- package/.output/public/_nuxt/{DcIKg-oA.js → D-yya4MN.js} +29 -29
- package/.output/public/_nuxt/{CCwJzmTT.js → D0NZRXnm.js} +1 -1
- package/.output/public/_nuxt/{CB2XoHaK.js → D6XDbGbI.js} +1 -1
- package/.output/public/_nuxt/{DEBj_roB.js → D8JEzGOU.js} +1 -1
- package/.output/public/_nuxt/{DsHltPpv.js → D8wbEppA.js} +1 -1
- package/.output/public/_nuxt/{Dgh1FhxQ.js → D9h-2lVu.js} +1 -1
- package/.output/public/_nuxt/{B1ydsdXg.js → DANeHzIE.js} +1 -1
- package/.output/public/_nuxt/{C9JT2-RE.js → DBku6oAz.js} +1 -1
- package/.output/public/_nuxt/{BeMg7yb6.js → DDXEeq1n.js} +2 -2
- package/.output/public/_nuxt/DESxUB7o.js +1 -0
- package/.output/public/_nuxt/{CBy17iCN.js → DHG-KJyJ.js} +1 -1
- package/.output/public/_nuxt/DHXbNYui.js +1 -0
- package/.output/public/_nuxt/{bJGrilFb.js → DI0LPDTd.js} +1 -1
- package/.output/public/_nuxt/{RpDfSk0l.js → DKSZP8GP.js} +1 -1
- package/.output/public/_nuxt/{C1GKs4YV.js → DL1qmlP8.js} +1 -1
- package/.output/public/_nuxt/{mtBjWkj4.js → DN4-koTG.js} +1 -1
- package/.output/public/_nuxt/{Bc7Kpanq.js → DO1jmufl.js} +1 -1
- package/.output/public/_nuxt/{B9vFZSzU.js → DOuNj3Jn.js} +1 -1
- package/.output/public/_nuxt/{UowwUtRH.js → DPUO8R7l.js} +1 -1
- package/.output/public/_nuxt/{CSIDbD5d.js → DahDvheq.js} +1 -1
- package/.output/public/_nuxt/{D33qa5aT.js → DbHH7dzg.js} +1 -1
- package/.output/public/_nuxt/{DD6NieRw.js → DbehhcO7.js} +23 -23
- package/.output/public/_nuxt/{B-cBPXHS.js → DeTqfKUd.js} +1 -1
- package/.output/public/_nuxt/{C6ajLfO0.js → Df85byjM.js} +1 -1
- package/.output/public/_nuxt/{BY0VC_fp.js → DizXDCtS.js} +1 -1
- package/.output/public/_nuxt/{lPZuSUw2.js → DjKlFOO8.js} +1 -1
- package/.output/public/_nuxt/{CV3uHXW4.js → DjLd7E2v.js} +1 -1
- package/.output/public/_nuxt/{D0TQTmc_.js → DnBjpGBx.js} +1 -1
- package/.output/public/_nuxt/{BZOLz5Xw.js → DnQ4Mwo_.js} +1 -1
- package/.output/public/_nuxt/{RCyqQNC4.js → DqYakCiF.js} +1 -1
- package/.output/public/_nuxt/{BkHJ3kuB.js → DqunUhPG.js} +1 -1
- package/.output/public/_nuxt/{DdjYB9eX.js → Dr1ZFb1n.js} +1 -1
- package/.output/public/_nuxt/Dsis422h.js +1 -0
- package/.output/public/_nuxt/{BorA7uj6.js → Du_4PNZI.js} +1 -1
- package/.output/public/_nuxt/{BgFbw5aK.js → DvTZ16yM.js} +1 -1
- package/.output/public/_nuxt/{QZbgg6bx.js → Dvt9REJL.js} +1 -1
- package/.output/public/_nuxt/{DghZRCwT.js → DxMpy-ot.js} +1 -1
- package/.output/public/_nuxt/{CqwK0iC2.js → DyLnyCs4.js} +1 -1
- package/.output/public/_nuxt/{BcbezgEJ.js → FakvzamF.js} +1 -1
- package/.output/public/_nuxt/LcPL138_.js +1 -0
- package/.output/public/_nuxt/{C0kVUAwR.js → P7T0pdFZ.js} +1 -1
- package/.output/public/_nuxt/{CM4UzWO5.js → Rhi-lAfN.js} +1 -1
- package/.output/public/_nuxt/{CwEAH09c.js → S7ftI9sn.js} +1 -1
- package/.output/public/_nuxt/{C4fd0pgB.js → T01BrTsW.js} +1 -1
- package/.output/public/_nuxt/{CmROOZW3.js → WqpfmT0s.js} +1 -1
- package/.output/public/_nuxt/XhSVj1eQ.js +16 -0
- package/.output/public/_nuxt/{D6FGhPpz.js → _fXjN5Pd.js} +1 -1
- package/.output/public/_nuxt/{CvFBHqKj.js → agpUpIJe.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/39c2c89f-bb28-470e-b95a-b7776149dc9f.json +1 -0
- package/.output/public/_nuxt/{CsRqTS8p.js → dDyWVWO8.js} +1 -1
- package/.output/public/_nuxt/entry.BeX6Jkel.css +1 -0
- package/.output/public/_nuxt/{Ck7gJ0Ru.js → f6qCSD-K.js} +1 -1
- package/.output/public/_nuxt/{CRtMS55w.js → goG5gpyv.js} +1 -1
- package/.output/public/_nuxt/{B3ZoiMh5.js → hbGkF-4Z.js} +1 -1
- package/.output/public/_nuxt/{CkVRbNxk.js → jDSo3fNb.js} +1 -1
- package/.output/public/_nuxt/{CvrjITPr.js → k4d17TZz.js} +1 -1
- package/.output/public/_nuxt/{FrxNy5Hb.js → m4Dxzyfa.js} +2 -2
- package/.output/public/_nuxt/{Dzy2Amcc.js → ndyknmtb.js} +4 -4
- package/.output/public/_nuxt/{DuvFgQqu.js → vIV0z0PD.js} +1 -1
- package/.output/public/_nuxt/{DI-I25kb.js → wTs8ybMd.js} +1 -1
- package/.output/public/_nuxt/{Ds4LpS8e.js → ymlmmOzU.js} +1 -1
- package/.output/server/chunks/_/tables.factory.mjs +133 -43
- package/.output/server/chunks/_/tables.factory.mjs.map +1 -1
- package/.output/server/chunks/build/client.manifest.mjs +817 -806
- package/.output/server/chunks/build/client.manifest.mjs.map +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +701 -694
- package/.output/server/package.json +1 -1
- package/package.json +1 -1
- package/.output/public/_nuxt/B3jyHGmo.js +0 -1
- package/.output/public/_nuxt/BFxd7ZWZ.js +0 -1
- package/.output/public/_nuxt/BI0OYmAG.js +0 -1
- package/.output/public/_nuxt/BMwuBt1W.js +0 -1
- package/.output/public/_nuxt/Cv8aMucD.js +0 -31
- package/.output/public/_nuxt/DA2L1Ivx.js +0 -1
- package/.output/public/_nuxt/DBIf1geQ.js +0 -1
- package/.output/public/_nuxt/DX42Brjy.js +0 -1
- package/.output/public/_nuxt/DYBPW385.js +0 -1
- package/.output/public/_nuxt/builds/meta/657bdee4-fa56-4862-bc13-309345429302.json +0 -1
- package/.output/public/_nuxt/entry.CQwtqNMg.css +0 -1
- package/.output/public/_nuxt/ngeX9iiO.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as X,r as Z,I as ee,i as u,H as h,c as l,b as c,u as e,o as a,F as O,q as y,w as n,a as s,J as te,e as d,n as q,_ as oe,t as r,L as ae,f as _,l as ne,M as re,N as se,O as le}from"./
|
|
1
|
+
import{d as X,r as Z,I as ee,i as u,H as h,c as l,b as c,u as e,o as a,F as O,q as y,w as n,a as s,J as te,e as d,n as q,_ as oe,t as r,L as ae,f as _,l as ne,M as re,N as se,O as le}from"./DbehhcO7.js";import{_ as de,a as ie,b as ue}from"./CeA2-eDW.js";const ce=["disabled"],me={class:"truncate leading-none"},pe={class:"truncate leading-none"},fe={class:"flex flex-col gap-1"},ve={class:"text-sm font-medium"},_e={class:"text-xs text-muted-foreground"},ge={key:0,class:"text-xs text-muted-foreground"},xe={key:0,class:"text-xs text-muted-foreground whitespace-pre-wrap border rounded-sm p-2 bg-muted/30 max-h-32 overflow-y-auto"},be={key:1,class:"text-xs text-muted-foreground"},we={key:2,class:"h-1.5 w-full overflow-hidden rounded-full bg-muted"},he={key:3,class:"text-xs text-yellow-500"},ye={key:4,class:"text-xs text-destructive"},Ce={key:5,class:"text-xs text-muted-foreground"},ke={class:"flex gap-2"},Be=X({__name:"ElectronUpdateIndicator",props:{side:{default:"bottom"},align:{default:"end"}},setup($e){const x=Z(!1),{isSupported:H,status:t,availableUpdate:g,readyToRestartUpdate:m,isBusy:C,lastCheckedAt:k,lastError:$,downloadTotalBytes:D,downloadedBytes:b,downloadProgress:T,isDownloadStalled:p,installUpdate:J,restartToApplyUpdate:M,cancelDownload:Y,retryDownload:j}=ee(),f=u(()=>m.value??g.value),G=u(()=>H.value?m.value?!0:["available","downloading"].includes(t.value)||t.value==="error"&&!!g.value:!1),B=u(()=>{var v;return(v=f.value)!=null&&v.date?new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(f.value.date)):null}),U=u(()=>k.value?new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(k.value)):null),F=u(()=>b.value?D.value?`${h(b.value)} / ${h(D.value)}`:`${h(b.value)} downloaded`:null),S=u(()=>m.value?"hugeicons:package-delivered":t.value==="downloading"&&p.value?"hugeicons:alert-circle":t.value==="downloading"?"hugeicons:download-04":t.value==="error"?"hugeicons:alert-circle":"hugeicons:arrow-up-01"),z=u(()=>m.value?"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 shadow-emerald-500/10 hover:bg-emerald-500/15 dark:text-emerald-300":t.value==="downloading"&&p.value?"border-amber-500/40 bg-amber-500/10 text-amber-700 shadow-amber-500/10 hover:bg-amber-500/15 dark:text-amber-300":t.value==="downloading"?"border-[#0169CC]/40 bg-[#0169CC]/10 text-[#0169CC] shadow-[#0169CC]/10 hover:bg-[#0169CC]/15 dark:text-[#4EA3FF]":t.value==="error"?"border-destructive/40 bg-destructive/10 text-destructive shadow-destructive/10 hover:bg-destructive/15":"border-[#0169CC]/40 bg-[#0169CC]/10 text-[#0169CC] shadow-[#0169CC]/10 hover:bg-[#0169CC]/15 dark:text-[#4EA3FF]"),I=u(()=>m.value?"Restart":t.value==="downloading"&&p.value?"Stalled":t.value==="downloading"?`${T.value}%`:t.value==="error"?"Failed":"Update");return(v,o)=>{const P=oe,A=te,E=ae,L=le,K=ie,w=se,Q=ue,W=de;return e(G)?(a(),l(O,{key:0},[e(m)?(a(),y(L,{key:0},{default:n(()=>[s(A,{"as-child":""},{default:n(()=>[d("button",{class:q(["h-7 max-w-[148px] flex items-center gap-1.5 rounded-md border px-2.5 text-xs font-semibold shadow-sm cursor-pointer transition-colors",e(z)]),disabled:e(C),onClick:o[0]||(o[0]=i=>e(M)())},[s(P,{name:e(S),class:"size-4!"},null,8,["name"]),d("span",me,r(e(I)),1)],10,ce)]),_:1}),s(E,null,{default:n(()=>[_(" v"+r(e(m).version)+" ready — click to restart ",1)]),_:1})]),_:1})):(a(),y(L,{key:1},{default:n(()=>[s(W,{open:e(x),"onUpdate:open":o[4]||(o[4]=i=>ne(x)?x.value=i:null)},{default:n(()=>[s(K,{"as-child":""},{default:n(()=>[s(A,{"as-child":""},{default:n(()=>[d("button",{class:q(["h-7 max-w-[148px] flex items-center gap-1.5 rounded-md border px-2.5 text-xs font-semibold shadow-sm cursor-pointer transition-colors",e(z)])},[s(P,{name:e(S),class:"size-4!"},null,8,["name"]),d("span",pe,r(e(I)),1)],2)]),_:1}),s(E,null,{default:n(()=>{var i;return[_(" v"+r((i=e(g))==null?void 0:i.version)+" available ",1)]}),_:1})]),_:1}),s(Q,{class:"w-80 p-4 flex flex-col gap-3",align:v.align,side:v.side},{default:n(()=>{var i,N,R;return[d("div",fe,[d("p",ve," Update "+r((i=e(g))==null?void 0:i.version)+" is available ",1),d("p",_e," Current version: "+r((N=e(f))==null?void 0:N.currentVersion),1),e(B)?(a(),l("p",ge," Published: "+r(e(B)),1)):c("",!0)]),(R=e(f))!=null&&R.body?(a(),l("p",xe,r(e(f).body),1)):c("",!0),e(F)?(a(),l("p",be," Downloading: "+r(e(F)),1)):c("",!0),e(t)==="downloading"?(a(),l("div",we,[d("div",{class:"h-full rounded-full bg-blue-500 transition-all duration-300",style:re({width:`${e(T)}%`})},null,4)])):c("",!0),e(p)?(a(),l("p",he," Download appears to have stalled. You can retry or cancel. ")):c("",!0),e($)&&e(t)==="error"?(a(),l("p",ye,r(e($)),1)):c("",!0),e(U)?(a(),l("p",Ce," Last checked: "+r(e(U)),1)):c("",!0),d("div",ke,[e(t)==="downloading"&&e(p)?(a(),l(O,{key:0},[s(w,{size:"sm",variant:"outline",class:"flex-1",onClick:o[1]||(o[1]=V=>e(Y)())},{default:n(()=>o[5]||(o[5]=[_(" Cancel ")])),_:1}),s(w,{size:"sm",class:"flex-1",onClick:o[2]||(o[2]=V=>e(j)())},{default:n(()=>o[6]||(o[6]=[_(" Retry ")])),_:1})],64)):(a(),y(w,{key:1,size:"sm",class:"flex-1",disabled:e(C)||e(t)==="downloading",onClick:o[3]||(o[3]=V=>e(J)())},{default:n(()=>[_(r(e(t)==="downloading"?"Downloading…":e(t)==="error"?"Retry download":"Download update"),1)]),_:1},8,["disabled"]))])]}),_:1},8,["align","side"])]),_:1},8,["open"])]),_:1}))],64)):c("",!0)}}});export{Be as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as E,aj as Le,bE as ne,d as T,ak as Oe,bV as qe,a0 as Q,aa as fe,q as S,o as c,w as o,E as O,u as e,ab as me,bH as Ne,al as Re,h as Me,r as G,c as h,F as P,a as t,N as q,x as j,f as p,cH as re,t as U,b as B,e as a,n as L,cI as He,_ as I,cJ as ze,bJ as Fe,s as Y,p as te,a4 as Ke,cK as je,bj as D,bm as ve,bk as w,k as Qe,m as Ge,bS as Ye,z as Je,B as N,v as Xe,bi as de,a_ as We,bP as ge,bQ as ye,bR as be,bT as _e,j as Ze,D as ie,bO as et,bA as tt,l as M,bB as st,M as at,bC as ot,X as Z,cL as H,ax as R,bf as lt,bU as nt}from"./DD6NieRw.js";import{_ as rt,a as dt,b as it}from"./DngnCd9Q.js";import{i as ut,_ as ue}from"./D33qa5aT.js";import{i as pt,u as ct,d as ft,a as mt}from"./Cilp0euQ.js";import{C as vt,a as gt,b as yt}from"./DDgsZmht.js";import{u as bt}from"./B5rxJs06.js";import{_ as F}from"./BZOLz5Xw.js";import{a as _t,c as z,_ as xt}from"./CkVRbNxk.js";function ht({type:f,defaultValue:r,modelValue:d}){const l=d||r;return d!==void 0||r!==void 0?Array.isArray(l)?"multiple":"single":f??"single"}function Dt({type:f,defaultValue:r,modelValue:d}){return f||ht({type:f,defaultValue:r,modelValue:d})}function kt({type:f,defaultValue:r}){return r!==void 0?r:f==="single"?void 0:[]}function Ct(f,r){const d=E(()=>Dt(f)),l=Le(f,"modelValue",r,{defaultValue:kt(f),passive:f.modelValue===void 0,deep:!0});function g(x){if(d.value==="single")l.value=ne(x,l.value)?void 0:x;else{const b=Array.isArray(l.value)?[...l.value||[]]:[l.value].filter(Boolean);if(ut(b,x)){const n=b.findIndex(i=>ne(i,x));b.splice(n,1)}else b.push(x);l.value=b}}const m=E(()=>d.value==="single");return{modelValue:l,changeModelValue:g,isSingle:m}}const[J,Vt]=fe("AccordionRoot");var St=T({__name:"AccordionRoot",props:{collapsible:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},orientation:{type:String,required:!1,default:"vertical"},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},type:{type:String,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1}},emits:["update:modelValue"],setup(f,{emit:r}){const d=f,l=r,{dir:g,disabled:m,unmountOnHide:x}=Oe(d),b=qe(g),{modelValue:n,changeModelValue:i,isSingle:V}=Ct(d,l),{forwardRef:_,currentElement:k}=Q();return Vt({disabled:m,direction:b,orientation:d.orientation,parentElement:k,isSingle:V,collapsible:d.collapsible,modelValue:n,changeModelValue:i,unmountOnHide:x}),(C,u)=>(c(),S(e(me),{ref:e(_),"as-child":C.asChild,as:C.as},{default:o(()=>[O(C.$slots,"default",{modelValue:e(n)})]),_:3},8,["as-child","as"]))}}),wt=St,ee=function(f){return f.Open="open",f.Closed="closed",f}(ee||{});const[se,$t]=fe("AccordionItem");var At=T({__name:"AccordionItem",props:{disabled:{type:Boolean,required:!1},value:{type:String,required:!0},unmountOnHide:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(f,{expose:r}){const d=f,l=J(),g=E(()=>l.isSingle.value?d.value===l.modelValue.value:Array.isArray(l.modelValue.value)&&l.modelValue.value.includes(d.value)),m=E(()=>l.disabled.value||d.disabled),x=E(()=>m.value?"":void 0),b=E(()=>g.value?ee.Open:ee.Closed);r({open:g,dataDisabled:x});const{currentRef:n,currentElement:i}=Q();$t({open:g,dataState:b,disabled:m,dataDisabled:x,triggerId:"",currentRef:n,currentElement:i,value:E(()=>d.value)});function V(_){var v;const k=_.target;if(Array.from(((v=l.parentElement.value)==null?void 0:v.querySelectorAll("[data-reka-collection-item]"))??[]).findIndex($=>$===k)===-1)return null;bt(_,k,l.parentElement.value,{arrowKeyOptions:l.orientation,dir:l.direction.value,focus:!0})}return(_,k)=>(c(),S(e(vt),{"data-orientation":e(l).orientation,"data-disabled":x.value,"data-state":b.value,disabled:m.value,open:g.value,as:d.as,"as-child":d.asChild,"unmount-on-hide":d.unmountOnHide??e(l).unmountOnHide.value,onKeydown:Ne(V,["up","down","left","right","home","end"])},{default:o(()=>[O(_.$slots,"default",{open:g.value})]),_:3},8,["data-orientation","data-disabled","data-state","disabled","open","as","as-child","unmount-on-hide"]))}}),It=At,Et=T({__name:"AccordionContent",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(f){const r=f,d=J(),l=se();return Q(),(g,m)=>(c(),S(e(gt),{role:"region","as-child":r.asChild,as:g.as,"force-mount":r.forceMount,"aria-labelledby":e(l).triggerId,"data-state":e(l).dataState.value,"data-disabled":e(l).dataDisabled.value,"data-orientation":e(d).orientation,style:{"--reka-accordion-content-width":"var(--reka-collapsible-content-width)","--reka-accordion-content-height":"var(--reka-collapsible-content-height)"},onContentFound:m[0]||(m[0]=x=>e(d).changeModelValue(e(l).value.value))},{default:o(()=>[O(g.$slots,"default")]),_:3},8,["as-child","as","force-mount","aria-labelledby","data-state","data-disabled","data-orientation"]))}}),Tt=Et,Bt=T({__name:"AccordionHeader",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h3"}},setup(f){const r=f,d=J(),l=se();return Q(),(g,m)=>(c(),S(e(me),{as:r.as,"as-child":r.asChild,"data-orientation":e(d).orientation,"data-state":e(l).dataState.value,"data-disabled":e(l).dataDisabled.value},{default:o(()=>[O(g.$slots,"default")]),_:3},8,["as","as-child","data-orientation","data-state","data-disabled"]))}}),Pt=Bt,Ut=T({__name:"AccordionTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(f){const r=f,d=J(),l=se();l.triggerId||(l.triggerId=Re(void 0,"reka-accordion-trigger"));function g(){const m=d.isSingle.value&&l.open.value&&!d.collapsible;l.disabled.value||m||d.changeModelValue(l.value.value)}return(m,x)=>(c(),S(e(yt),{id:e(l).triggerId,ref:e(l).currentRef,"data-reka-collection-item":"",as:r.as,"as-child":r.asChild,"aria-disabled":e(l).disabled.value||void 0,"aria-expanded":e(l).open.value||!1,"data-disabled":e(l).dataDisabled.value,"data-orientation":e(d).orientation,"data-state":e(l).dataState.value,disabled:e(l).disabled.value,onClick:g},{default:o(()=>[O(m.$slots,"default")]),_:3},8,["id","as","as-child","aria-disabled","aria-expanded","data-disabled","data-orientation","data-state","disabled"]))}}),Lt=Ut;const Ot={key:0,class:"text-sm text-muted-foreground"},qt={key:0,class:"px-2 py-1 text-xs text-muted-foreground select-none"},Nt={role:"listbox","aria-multiselectable":"true",class:"space-y-0.5"},Rt=["aria-selected","aria-disabled"],Mt=["disabled","onClick"],Ht={key:0,viewBox:"0 0 12 12",class:"size-3 fill-current"},zt={class:"flex-1 truncate text-left"},Ft={key:1,class:"px-2 py-3 text-center text-xs text-muted-foreground"},pe=3,Kt=T({__name:"EnvTagPicker",props:{modelValue:{}},emits:["update:modelValue"],setup(f,{emit:r}){const d=f,l=r,g=Me(),m=E(()=>d.modelValue.length>=pe);function x(_){return d.modelValue.includes(_)}function b(_){x(_)?l("update:modelValue",d.modelValue.filter(k=>k!==_)):m.value||l("update:modelValue",[...d.modelValue,_])}const n=E(()=>g.tags.filter(_=>d.modelValue.includes(_.id))),i=G(!1);function V(_){m.value||l("update:modelValue",[...d.modelValue,_.id])}return(_,k)=>{const C=I;return c(),h(P,null,[t(e(rt),null,{default:o(()=>[t(e(dt),{"as-child":""},{default:o(()=>[t(e(q),{type:"button",variant:"outline",class:"h-auto min-h-9 w-full justify-start gap-1 px-2 py-1 flex-wrap"},{default:o(()=>[n.value.length===0?(c(),h("span",Ot,"Assign tags…")):(c(!0),h(P,{key:1},j(n.value,u=>(c(),h("span",{key:u.id,class:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs font-medium"},[t(re,{color:u.color,size:"sm"},null,8,["color"]),p(" "+U(u.name),1)]))),128))]),_:1})]),_:1}),t(e(it),{class:"w-56 p-1",align:"start","side-offset":4,"restore-focus":!1},{default:o(()=>[m.value?(c(),h("p",qt," Max "+U(pe)+" tags selected ")):B("",!0),a("ul",Nt,[(c(!0),h(P,null,j(e(g).tags,u=>(c(),h("li",{key:u.id,role:"option","aria-selected":x(u.id),"aria-disabled":m.value&&!x(u.id)},[a("button",{type:"button",class:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-sm transition-colors hover:bg-accent focus-visible:bg-accent focus-visible:outline-none disabled:pointer-events-none disabled:opacity-40",disabled:m.value&&!x(u.id),onClick:v=>b(u.id)},[a("span",{class:L(["flex size-4 items-center justify-center rounded-sm border",x(u.id)?"border-primary bg-primary text-primary-foreground":"border-input"])},[x(u.id)?(c(),h("svg",Ht,k[2]||(k[2]=[a("path",{d:"M10 3L5 8.5 2 5.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,-1)]))):B("",!0)],2),t(re,{color:u.color,size:"md"},null,8,["color"]),a("span",zt,U(u.name),1)],8,Mt)],8,Rt))),128))]),e(g).tags.length===0?(c(),h("p",Ft," No tags configured ")):B("",!0),t(e(He),{class:"my-1"}),a("button",{type:"button",class:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground transition-colors focus-visible:outline-none focus-visible:bg-accent",onClick:k[0]||(k[0]=u=>i.value=!0)},[t(C,{name:"hugeicons:plus-sign",class:"size-4"}),k[3]||(k[3]=p(" Add new tag "))])]),_:1})]),_:1}),t(ze,{open:i.value,"onUpdate:open":k[1]||(k[1]=u=>i.value=u),onCreated:V},null,8,["open"])],64)}}}),ce=T({__name:"Accordion",props:{collapsible:{type:Boolean},disabled:{type:Boolean},dir:{},orientation:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},type:{},modelValue:{},defaultValue:{}},emits:["update:modelValue"],setup(f,{emit:r}){const g=Fe(f,r);return(m,x)=>(c(),S(e(wt),Y({"data-slot":"accordion"},e(g)),{default:o(()=>[O(m.$slots,"default")]),_:3},16))}}),xe=T({__name:"AccordionContent",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(f){const r=f,d=E(()=>{const{class:l,...g}=r;return g});return(l,g)=>(c(),S(e(Tt),Y({"data-slot":"accordion-content"},d.value,{class:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"}),{default:o(()=>[a("div",{class:L(e(te)("pt-0 pb-4",r.class))},[O(l.$slots,"default")],2)]),_:3},16))}}),he=T({__name:"AccordionItem",props:{disabled:{type:Boolean},value:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(f){const r=f,d=E(()=>{const{class:g,...m}=r;return m}),l=Ke(d);return(g,m)=>(c(),S(e(It),Y({"data-slot":"accordion-item"},e(l),{class:e(te)("border-b last:border-b-0",r.class)}),{default:o(()=>[O(g.$slots,"default")]),_:3},16,["class"]))}}),De=T({__name:"AccordionTrigger",props:{asChild:{type:Boolean},as:{},class:{}},setup(f){const r=f,d=E(()=>{const{class:l,...g}=r;return g});return(l,g)=>(c(),S(e(Pt),{class:"flex"},{default:o(()=>[t(e(Lt),Y({"data-slot":"accordion-trigger"},d.value,{class:e(te)("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",r.class)}),{default:o(()=>[O(l.$slots,"default"),O(l.$slots,"icon",{},()=>[t(e(je),{class:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})])]),_:3},16,["class"])]),_:3}))}});function K(f){const r=G(!1);return{isDragging:r,onDragOver:m=>{m.preventDefault(),r.value=!0},onDragLeave:()=>{r.value=!1},onDrop:async m=>{var i;m.preventDefault(),r.value=!1;const x=(i=m.dataTransfer)==null?void 0:i.files;if(!x||x.length===0)return;const b=x[0],n=new FileReader;n.onload=V=>{var k;const _=(k=V.target)==null?void 0:k.result;f&&f(_)},n.readAsText(b)}}}const jt={class:"flex items-center gap-2"},Qt={class:"flex items-center justify-between"},Gt={class:"grid grid-cols-4 gap-4"},Yt={class:"col-span-3 space-y-2"},Jt={class:"space-y-2"},Xt={class:"grid grid-cols-2 gap-4"},Wt={class:"space-y-2"},Zt={class:"space-y-2"},es={class:"relative"},ts=["aria-label"],ss={class:"flex items-center gap-2"},as={class:"space-y-4 pt-2 border-t"},os={class:"flex items-center gap-2"},ls={key:0,class:"space-y-2"},ns=T({__name:"ConnectionSSHTunnel",props:{formData:{}},setup(f){const r=f,{onDragOver:d,onDragLeave:l,onDrop:g,isDragging:m}=K(b=>{r.formData.sshPrivateKey=b}),x=G(!1);return(b,n)=>(c(),S(e(he),{value:"ssh"},{default:o(()=>[t(e(De),{class:"hover:no-underline"},{default:o(()=>[a("div",jt,[t(e(I),{name:"lucide:terminal",class:"size-4 text-primary"}),n[9]||(n[9]=a("span",null,"SSH Tunnel",-1))])]),_:1}),t(e(xe),{class:"space-y-4 pt-4 px-1"},{default:o(()=>[a("div",Qt,[t(e(D),{for:"ssh-enabled"},{default:o(()=>n[10]||(n[10]=[p("Over SSH")])),_:1}),t(e(ve),{id:"ssh-enabled","model-value":b.formData.sshEnabled,"onUpdate:modelValue":n[0]||(n[0]=i=>b.formData.sshEnabled=i)},null,8,["model-value"])]),b.formData.sshEnabled?(c(),h(P,{key:0},[a("div",Gt,[a("div",Yt,[t(e(D),{for:"ssh-host"},{default:o(()=>n[11]||(n[11]=[p("Server")])),_:1}),t(e(w),{id:"ssh-host",placeholder:"e.g. ssh.example.com or 1.2.3.4",modelValue:b.formData.sshHost,"onUpdate:modelValue":n[1]||(n[1]=i=>b.formData.sshHost=i)},null,8,["modelValue"])]),a("div",Jt,[t(e(D),{for:"ssh-port"},{default:o(()=>n[12]||(n[12]=[p("Port")])),_:1}),t(e(w),{id:"ssh-port",type:"number",placeholder:"22",modelValue:b.formData.sshPort,"onUpdate:modelValue":n[2]||(n[2]=i=>b.formData.sshPort=i)},null,8,["modelValue"])])]),a("div",Xt,[a("div",Wt,[t(e(D),{for:"ssh-user"},{default:o(()=>n[13]||(n[13]=[p("User")])),_:1}),t(e(w),{id:"ssh-user",placeholder:"e.g. root or ubuntu",modelValue:b.formData.sshUsername,"onUpdate:modelValue":n[3]||(n[3]=i=>b.formData.sshUsername=i)},null,8,["modelValue"])]),a("div",Zt,[t(e(D),{for:"ssh-password"},{default:o(()=>n[14]||(n[14]=[p("Password")])),_:1}),a("div",es,[t(e(w),{id:"ssh-password",type:e(x)?"text":"password",placeholder:"SSH password (optional if using key)",modelValue:b.formData.sshPassword,"onUpdate:modelValue":n[4]||(n[4]=i=>b.formData.sshPassword=i),class:"pr-8"},null,8,["type","modelValue"]),a("button",{type:"button",class:"absolute right-2 top-1/2 h-4 cursor-pointer -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",onClick:n[5]||(n[5]=i=>x.value=!e(x)),"aria-label":e(x)?"Hide password":"Show password"},[t(e(I),{name:e(x)?"hugeicons:view":"hugeicons:view-off",class:"size-4!"},null,8,["name"])],8,ts)])])]),a("div",ss,[t(e(ue),{id:"ssh-keychain","model-value":b.formData.sshStoreInKeychain,"onUpdate:modelValue":n[6]||(n[6]=i=>b.formData.sshStoreInKeychain=i)},null,8,["model-value"]),t(e(D),{for:"ssh-keychain",class:"text-sm font-normal"},{default:o(()=>n[15]||(n[15]=[p("Store in keychain")])),_:1})]),a("div",as,[a("div",os,[t(e(ue),{id:"ssh-use-key","model-value":b.formData.sshUseKey,"onUpdate:modelValue":n[7]||(n[7]=i=>b.formData.sshUseKey=i)},null,8,["model-value"]),t(e(D),{for:"ssh-use-key",class:"text-sm font-semibold"},{default:o(()=>n[16]||(n[16]=[p("SSH Key Authentication")])),_:1})]),b.formData.sshUseKey?(c(),h("div",ls,[t(e(D),{for:"ssh-key-file"},{default:o(()=>n[17]||(n[17]=[p("Private Key")])),_:1}),t(e(F),{id:"ssh-key-file",modelValue:b.formData.sshPrivateKey,"onUpdate:modelValue":n[8]||(n[8]=i=>b.formData.sshPrivateKey=i),placeholder:"-----BEGIN OPENSSH PRIVATE KEY-----\\n...\\n-----END OPENSSH PRIVATE KEY-----",class:L(["min-h-[100px] max-h-[200px] text-xs font-mono",e(m)?"ring-2 ring-primary":""]),onDragover:e(d),onDragleave:e(l),onDrop:e(g)},null,8,["modelValue","class","onDragover","onDragleave","onDrop"]),n[18]||(n[18]=a("p",{class:"text-xs text-muted-foreground"}," Drop a .pem / .key file here, or paste the SSH private key content ",-1))])):B("",!0)])],64)):B("",!0)]),_:1})]),_:1}))}}),rs={class:"flex items-center gap-2"},ds={class:"flex items-center justify-between"},is={class:"space-y-2"},us={class:"space-y-4"},ps={class:"space-y-2"},cs={class:"space-y-2"},fs={class:"space-y-2"},ms=T({__name:"ConnectionSSLConfig",props:{formData:{}},setup(f){const r=f,{onDragOver:d,onDragLeave:l,onDrop:g,isDragging:m}=K(u=>{r.formData.sslCA=u}),{onDragOver:x,onDragLeave:b,onDrop:n,isDragging:i}=K(u=>{r.formData.sslCert=u}),{onDragOver:V,onDragLeave:_,onDrop:k,isDragging:C}=K(u=>{r.formData.sslKey=u});return(u,v)=>(c(),S(e(he),{value:"ssl"},{default:o(()=>[t(e(De),{class:"hover:no-underline"},{default:o(()=>[a("div",rs,[t(e(I),{name:"hugeicons:security-check",class:"size-4 text-primary"}),v[5]||(v[5]=a("span",null,"SSL Configuration",-1))])]),_:1}),t(e(xe),{class:"space-y-4 pt-4 px-1"},{default:o(()=>[a("div",ds,[t(e(D),{for:"ssl-enabled"},{default:o(()=>v[6]||(v[6]=[p("Enable SSL")])),_:1}),t(e(ve),{id:"ssl-enabled","model-value":u.formData.sslEnabled,"onUpdate:modelValue":v[0]||(v[0]=$=>u.formData.sslEnabled=$)},null,8,["model-value"])]),u.formData.sslEnabled?(c(),h(P,{key:0},[a("div",is,[t(e(D),{for:"ssl-mode"},{default:o(()=>v[7]||(v[7]=[p("SSL Mode")])),_:1}),t(e(Qe),{modelValue:u.formData.sslMode,"onUpdate:modelValue":v[1]||(v[1]=$=>u.formData.sslMode=$)},{default:o(()=>[t(e(Ge),{id:"ssl-mode"},{default:o(()=>[t(e(Ye),{placeholder:"Select mode"})]),_:1}),t(e(Je),null,{default:o(()=>[t(e(N),{value:"disable"},{default:o(()=>v[8]||(v[8]=[p("Disable")])),_:1}),t(e(N),{value:"preferred"},{default:o(()=>v[9]||(v[9]=[p("Preferred")])),_:1}),t(e(N),{value:"require"},{default:o(()=>v[10]||(v[10]=[p("Require")])),_:1}),t(e(N),{value:"verify-ca"},{default:o(()=>v[11]||(v[11]=[p("Verify CA")])),_:1}),t(e(N),{value:"verify-full"},{default:o(()=>v[12]||(v[12]=[p("Verify Full")])),_:1})]),_:1})]),_:1},8,["modelValue"])]),a("div",us,[a("div",ps,[t(e(D),{for:"ssl-ca"},{default:o(()=>v[13]||(v[13]=[p("CA Certificate")])),_:1}),t(e(F),{id:"ssl-ca",modelValue:u.formData.sslCA,"onUpdate:modelValue":v[2]||(v[2]=$=>u.formData.sslCA=$),placeholder:"-----BEGIN CERTIFICATE-----\\n...\\n-----END CERTIFICATE-----",class:L(["min-h-[80px] max-h-[160px] text-xs font-mono",e(m)?"ring-2 ring-primary":""]),onDragover:e(d),onDragleave:e(l),onDrop:e(g)},null,8,["modelValue","class","onDragover","onDragleave","onDrop"]),v[14]||(v[14]=a("p",{class:"text-xs text-muted-foreground"}," Drop a .pem / .crt file here, or paste the CA certificate content ",-1))]),a("div",cs,[t(e(D),{for:"ssl-cert"},{default:o(()=>v[15]||(v[15]=[p("Client Certificate")])),_:1}),t(e(F),{id:"ssl-cert",modelValue:u.formData.sslCert,"onUpdate:modelValue":v[3]||(v[3]=$=>u.formData.sslCert=$),placeholder:"-----BEGIN CERTIFICATE-----\\n...\\n-----END CERTIFICATE-----",class:L(["min-h-[80px] max-h-[160px] text-xs font-mono",e(i)?"ring-2 ring-primary":""]),onDragover:e(x),onDragleave:e(b),onDrop:e(n)},null,8,["modelValue","class","onDragover","onDragleave","onDrop"]),v[16]||(v[16]=a("p",{class:"text-xs text-muted-foreground"}," Drop a .pem / .crt file here, or paste the client certificate content ",-1))]),a("div",fs,[t(e(D),{for:"ssl-key"},{default:o(()=>v[17]||(v[17]=[p("SSL Key")])),_:1}),t(e(F),{id:"ssl-key",modelValue:u.formData.sslKey,"onUpdate:modelValue":v[4]||(v[4]=$=>u.formData.sslKey=$),placeholder:"-----BEGIN RSA PRIVATE KEY-----\\n...\\n-----END RSA PRIVATE KEY-----",class:L(["min-h-[80px] max-h-[160px] text-xs font-mono",e(C)?"ring-2 ring-primary":""]),onDragover:e(V),onDragleave:e(_),onDrop:e(k)},null,8,["modelValue","class","onDragover","onDragleave","onDrop"]),v[18]||(v[18]=a("p",{class:"text-xs text-muted-foreground"}," Drop a .pem / .key file here, or paste the private key content ",-1))])])],64)):B("",!0)]),_:1})]),_:1}))}}),vs={key:0,class:"flex items-center gap-2 rounded-md border p-3 text-sm"},gs={key:1,class:"flex items-center gap-2 rounded-md border border-green-200 bg-green-50 p-3 text-sm text-green-600 dark:border-green-900 dark:bg-green-950/50 dark:text-green-400"},ys={key:2,class:"flex items-center gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-600 dark:border-red-900 dark:bg-red-950/50 dark:text-red-400"},bs=T({__name:"ConnectionStatusSection",props:{testStatus:{},errorMessage:{}},setup(f){const r=f;return(d,l)=>(c(),h(P,null,[d.testStatus==="testing"?(c(),h("div",vs,[t(e(I),{name:"hugeicons:loading-03",class:"animate-spin size-5!"}),l[0]||(l[0]=a("span",null,"Testing connection...",-1))])):B("",!0),d.testStatus==="success"?(c(),h("div",gs,[t(e(I),{name:"hugeicons:checkmark-circle-02",class:"shrink-0 size-4"}),l[1]||(l[1]=a("span",null,"Connection successful! Your database is ready to use.",-1))])):B("",!0),d.testStatus==="error"?(c(),h("div",ys,[t(e(I),{name:"hugeicons:cancel-01",class:"shrink-0 size-4"}),a("span",null,U(r.errorMessage||"Connection failed. Please check your details and try again."),1)])):B("",!0)],64))}}),_s={class:"flex flex-col items-center gap-1.5 text-center"},xs={key:0,class:"text-xxs leading-4 text-muted-foreground px-2"},hs={class:"flex items-center justify-center gap-1.5 min-h-3.5"},Ds=T({__name:"DatabaseTypeCard",props:{name:{},icon:{},description:{},selected:{type:Boolean},isSupport:{type:Boolean},isBeta:{type:Boolean},iconClass:{},unsupportedLabel:{}},setup(f){return(r,d)=>(c(),S(e(_t),{class:L(e(z)("relative",r.isSupport?"cursor-pointer":"opacity-90 cursor-not-allowed ",r.selected&&r.isSupport?"border-muted-foreground shadow-lg":"border-transparent bg-background"))},{default:o(()=>[t(e(xt),{class:"flex flex-col items-center justify-center p-0 w-full"},{default:o(()=>[a("div",{class:L(e(z)("flex items-center justify-center rounded-xl p-2 transition-transform duration-300",r.selected&&r.isSupport?"scale-105":"group-hover:scale-105",!r.isSupport&&"opacity-40"))},[(c(),S(Xe(r.icon),{class:L(e(z)("size-12",r.iconClass))},null,8,["class"]))],2),a("div",_s,[a("span",{class:L(e(z)("text-sm font-medium tracking-tight transition-colors",r.selected&&r.isSupport?"text-primary":"text-foreground/70",!r.isSupport&&"text-muted-foreground"))},U(r.name),3),r.description?(c(),h("p",xs,U(r.description),1)):B("",!0),a("div",hs,[r.isBeta?(c(),S(e(de),{key:0,variant:"outline",class:"text-[9px] px-1.5 py-0 h-3.5 uppercase tracking-widest font-bold border-amber-500/40 text-amber-600"},{default:o(()=>d[0]||(d[0]=[p(" Beta ")])),_:1})):B("",!0),r.isSupport?B("",!0):(c(),S(e(de),{key:1,variant:"secondary",class:"text-[9px] px-1.5 py-0 h-3.5 uppercase tracking-widest font-bold opacity-60"},{default:o(()=>[p(U(r.unsupportedLabel||"Soon"),1)]),_:1}))])])]),_:1})]),_:1},8,["class"]))}}),ks={class:"flex flex-col h-full overflow-hidden"},Cs={class:"flex-1 overflow-y-auto px-6 pb-4 pt-1"},Vs={id:"tour-database-type-cards",class:"grid grid-cols-2 gap-3 py-2 md:grid-cols-4"},Ss=T({__name:"ConnectionStepType",props:{databaseOptions:{},dbType:{}},emits:["next","close"],setup(f,{emit:r}){const d=f,l=r,g=n=>{n.isSupport&&n.onClick()},m=E(()=>d.databaseOptions.filter(n=>n.isSupport)),x=()=>{const n=m.value.findIndex(_=>_.type===d.dbType);let i=0;n!==-1&&(i=(n+1)%m.value.length);const V=m.value[i];V&&g(V)},b=()=>{const n=m.value.findIndex(_=>_.type===d.dbType);let i=m.value.length-1;n!==-1&&(i=(n-1+m.value.length)%m.value.length);const V=m.value[i];V&&g(V)};return We([{key:"arrowdown",excludeInput:!0,isPreventDefault:!0,callback:x},{key:"arrowright",excludeInput:!0,isPreventDefault:!0,callback:x},{key:"arrowup",excludeInput:!0,isPreventDefault:!0,callback:b},{key:"arrowleft",excludeInput:!0,isPreventDefault:!0,callback:b},{key:"enter",excludeInput:!0,isPreventDefault:!0,callback:()=>{d.dbType&&l("next")}}]),(n,i)=>{const V=I;return c(),h("div",ks,[t(e(ge),{class:"p-6 pb-3"},{default:o(()=>[t(e(ye),null,{default:o(()=>i[2]||(i[2]=[p("Select Database Type")])),_:1}),t(e(be),null,{default:o(()=>i[3]||(i[3]=[p("Choose the type of database you want to connect to")])),_:1})]),_:1}),a("div",Cs,[a("div",Vs,[(c(!0),h(P,null,j(n.databaseOptions,_=>(c(),S(Ds,{key:_.type,name:_.name,icon:_.icon,description:_.description,selected:_.isActive,onClick:()=>g(_),isSupport:_.isSupport,isBeta:_.isBeta,"unsupported-label":_.unsupportedLabel,iconClass:"size-10!"},null,8,["name","icon","description","selected","onClick","isSupport","isBeta","unsupported-label"]))),128))])]),t(e(_e),{class:"flex items-center justify-end gap-2 px-6 pb-6 pt-3"},{default:o(()=>[t(e(q),{variant:"outline",onClick:i[0]||(i[0]=_=>n.$emit("close")),size:"sm"},{default:o(()=>i[4]||(i[4]=[p(" Cancel ")])),_:1}),t(e(q),{id:"tour-database-type-next",onClick:i[1]||(i[1]=_=>n.$emit("next")),disabled:!n.dbType,size:"sm"},{default:o(()=>[i[5]||(i[5]=p(" Next ")),t(V,{name:"hugeicons:arrow-right-02"})]),_:1},8,["disabled"])]),_:1})])}}}),ws={class:"flex-1 overflow-y-auto p-4 space-y-4"},$s={key:0,id:"tour-connection-string-tab"},As={key:1,id:"tour-connection-form-tab"},Is={key:2},Es={key:3},Ts={class:"grid grid-cols-3 gap-3 mt-2"},Bs={class:"col-span-2 space-y-2"},Ps={class:"col-span-1 space-y-2"},Us={class:"space-y-2"},Ls={class:"text-xs text-muted-foreground"},Os={class:"space-y-4"},qs={class:"grid grid-cols-4 gap-2"},Ns={class:"col-span-3 space-y-2"},Rs={class:"space-y-2"},Ms={class:"grid grid-cols-2 gap-2"},Hs={class:"space-y-2"},zs={class:"space-y-2"},Fs={class:"relative"},Ks=["aria-label"],js={class:"space-y-2"},Qs={key:0,class:"space-y-4"},Gs={class:"space-y-2"},Ys={class:"flex gap-2"},Js={class:"text-xs text-muted-foreground"},Xs={class:"space-y-3"},Ws={class:"grid grid-cols-2 gap-2"},Zs={class:"text-left"},ea={class:"font-medium"},ta={class:"text-left"},sa={class:"font-medium"},aa={key:0,class:"grid grid-cols-2 gap-3"},oa={class:"space-y-2"},la={class:"space-y-2"},na={class:"col-span-2 space-y-2"},ra={class:"col-span-2 space-y-2"},da={key:1,class:"grid grid-cols-2 gap-3"},ia={class:"col-span-2 space-y-2"},ua={class:"col-span-2 space-y-2"},pa={class:"col-span-2 space-y-2"},ca={class:"flex flex-1 space-x-2"},fa={class:"flex space-x-2"},Da=T({__name:"CreateConnectionModal",props:{open:{type:Boolean},editingConnection:{},workspaceId:{}},emits:["update:open","addNew","update"],setup(f,{emit:r}){const d=f,l=r,g=()=>{l("update:open",!1),setTimeout(Be,300)},m=G(!1),x=Ze(),b=E(()=>pt(x.public.sqlite3ConnectionsEnabled)),{step:n,dbType:i,connectionName:V,connectionMethod:_,connectionString:k,formData:C,managedSqlite:u,tagIds:v,testStatus:$,testErrorMessage:ke,handleNext:Ce,handleBack:Ve,handleTestConnection:Se,handleCreateConnection:we,getDefaultPort:$e,getConnectionPlaceholder:ae,availableConnectionMethods:oe,structuredTargetLabel:Ae,structuredTargetPlaceholder:Ie,canUseNetworkOptions:Ee,canPickSqliteFile:X,isFormValid:W,pickSqliteFile:Te,resetForm:Be}=ct({open:()=>d.open,editingConnection:()=>d.editingConnection,workspaceId:()=>d.workspaceId,onAddNew:A=>l("addNew",A),onUpdate:A=>l("update",A),onClose:g}),Pe=E(()=>ft.map(A=>{const s=mt(A,b.value);return{...A,isSupport:s?!1:A.isSupport,unsupportedLabel:s?"Disabled":A.unsupportedLabel,isActive:i.value===A.type,onClick:()=>i.value=A.type}})),le=E({get:()=>i.value===ie.ORACLE?C.serviceName:C.database,set:A=>{if(i.value===ie.ORACLE){C.serviceName=A;return}C.database=A}}),Ue=()=>{W.value&&$.value!=="testing"&&we()};return(A,s)=>(c(),S(e(et),{open:A.open,"onUpdate:open":s[20]||(s[20]=y=>A.$emit("update:open",y))},{default:o(()=>[t(e(nt),{class:"max-w-[60vw]! w-full h-[60vh]! max-h-[90vh] p-0 flex flex-col overflow-hidden"},{default:o(()=>[e(n)===1?(c(),S(Ss,{key:0,"database-options":Pe.value,"db-type":e(i),onNext:e(Ce),onClose:g},null,8,["database-options","db-type","onNext"])):(c(),h("form",{key:1,onSubmit:lt(Ue,["prevent"]),class:"flex flex-col h-full overflow-hidden"},[t(e(ge),{class:"p-6 pb-2"},{default:o(()=>[t(e(ye),null,{default:o(()=>s[21]||(s[21]=[p("Connection Details")])),_:1}),t(e(be),null,{default:o(()=>[p(" Enter the details for your "+U(e(i))+" database ",1)]),_:1})]),_:1}),a("div",ws,[t(e(tt),{modelValue:e(_),"onUpdate:modelValue":s[19]||(s[19]=y=>M(_)?_.value=y:null),class:"w-full"},{default:o(()=>[t(e(st),{class:"grid w-fit",style:at({gridTemplateColumns:`repeat(${e(oe).length}, minmax(0, 1fr))`}),id:"tour-connection-method-tabs"},{default:o(()=>[(c(!0),h(P,null,j(e(oe),y=>(c(),S(e(ot),{key:y,value:y,class:"cursor-pointer"},{default:o(()=>[y===e(Z).STRING?(c(),h("span",$s," Connection String ")):y===e(Z).FORM?(c(),h("span",As," Connection Form ")):y===e(Z).MANAGED?(c(),h("span",Is," Managed SQLite ")):(c(),h("span",Es,"Database File"))]),_:2},1032,["value"]))),128))]),_:1},8,["style"]),a("div",Ts,[a("div",Bs,[t(e(D),{for:"connection-name",class:"flex items-center gap-2"},{default:o(()=>[t(e(I),{name:"hugeicons:database",class:"h-3.5 w-3.5 text-muted-foreground"}),s[22]||(s[22]=p(" Connection Name ")),s[23]||(s[23]=a("span",{class:"text-destructive"},"*",-1))]),_:1}),t(e(w),{id:"connection-name",placeholder:"My Database Connection",modelValue:e(V),"onUpdate:modelValue":s[0]||(s[0]=y=>M(V)?V.value=y:null)},null,8,["modelValue"])]),a("div",Ps,[t(e(D),{class:"flex items-center gap-2"},{default:o(()=>[t(e(I),{name:"hugeicons:tag-01",class:"h-3.5 w-3.5 text-muted-foreground"}),s[24]||(s[24]=p(" Environment Tags "))]),_:1}),t(e(Kt),{modelValue:e(v),"onUpdate:modelValue":s[1]||(s[1]=y=>M(v)?v.value=y:null)},null,8,["modelValue"])])]),t(e(H),{value:"string",class:"space-y-4 pt-4"},{default:o(()=>[a("div",Us,[t(e(D),{for:"connection-string",class:"flex items-center gap-2"},{default:o(()=>[t(e(I),{name:"hugeicons:connect",class:"h-3.5 w-3.5 text-muted-foreground"}),s[25]||(s[25]=p(" Connection String ")),s[26]||(s[26]=a("span",{class:"text-destructive"},"*",-1))]),_:1}),t(e(w),{id:"connection-string",placeholder:e(ae)(),modelValue:e(k),"onUpdate:modelValue":s[2]||(s[2]=y=>M(k)?k.value=y:null),class:"font-mono text-sm"},null,8,["placeholder","modelValue"]),a("p",Ls," Example: "+U(e(ae)()),1)])]),_:1}),t(e(H),{value:"form",class:"space-y-6 pt-2"},{default:o(()=>[a("div",Os,[a("div",qs,[a("div",Ns,[t(e(D),{for:"host"},{default:o(()=>s[27]||(s[27]=[p("Host "),a("span",{class:"text-destructive"},"*",-1)])),_:1}),t(e(w),{id:"host",placeholder:"localhost",modelValue:e(C).host,"onUpdate:modelValue":s[3]||(s[3]=y=>e(C).host=y)},null,8,["modelValue"])]),a("div",Rs,[t(e(D),{for:"port"},{default:o(()=>s[28]||(s[28]=[p("Port "),a("span",{class:"text-destructive"},"*",-1)])),_:1}),t(e(w),{id:"port",placeholder:e($e)(),modelValue:e(C).port,"onUpdate:modelValue":s[4]||(s[4]=y=>e(C).port=y)},null,8,["placeholder","modelValue"])])]),a("div",Ms,[a("div",Hs,[t(e(D),{for:"username"},{default:o(()=>s[29]||(s[29]=[p("User "),a("span",{class:"text-destructive"},"*",-1)])),_:1}),t(e(w),{id:"username",placeholder:"username",modelValue:e(C).username,"onUpdate:modelValue":s[5]||(s[5]=y=>e(C).username=y)},null,8,["modelValue"])]),a("div",zs,[t(e(D),{for:"password"},{default:o(()=>s[30]||(s[30]=[p("Password")])),_:1}),a("div",Fs,[t(e(w),{id:"password",type:e(m)?"text":"password",placeholder:"••••••••",modelValue:e(C).password,"onUpdate:modelValue":s[6]||(s[6]=y=>e(C).password=y),class:"pr-8"},null,8,["type","modelValue"]),a("button",{type:"button",class:"absolute right-2 top-1/2 h-5 cursor-pointer -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",onClick:s[7]||(s[7]=y=>m.value=!e(m)),"aria-label":e(m)?"Hide password":"Show password"},[t(e(I),{name:e(m)?"hugeicons:view":"hugeicons:view-off",class:"size-4!"},null,8,["name"])],8,Ks)])])]),a("div",js,[t(e(D),{for:"structured-target"},{default:o(()=>[p(U(e(Ae))+" ",1),s[31]||(s[31]=a("span",{class:"text-destructive"},"*",-1))]),_:1}),t(e(w),{id:"structured-target",placeholder:e(Ie),modelValue:le.value,"onUpdate:modelValue":s[8]||(s[8]=y=>le.value=y)},null,8,["placeholder","modelValue"])])]),e(Ee)?(c(),h("div",Qs,[t(e(ce),{type:"single",collapsible:"",class:"w-full border px-4 rounded-lg shadow"},{default:o(()=>[t(ms,{"form-data":e(C)},null,8,["form-data"])]),_:1}),t(e(ce),{type:"single",collapsible:"",class:"w-full border px-4 rounded-lg shadow"},{default:o(()=>[t(ns,{"form-data":e(C)},null,8,["form-data"])]),_:1})])):B("",!0)]),_:1}),t(e(H),{value:"file",class:"space-y-4 pt-4"},{default:o(()=>[a("div",Gs,[t(e(D),{for:"file-path",class:"flex items-center gap-2"},{default:o(()=>[t(e(I),{name:"hugeicons:file-01",class:"h-3.5 w-3.5 text-muted-foreground"}),s[32]||(s[32]=p(" SQLite File ")),s[33]||(s[33]=a("span",{class:"text-destructive"},"*",-1))]),_:1}),a("div",Ys,[t(e(w),{id:"file-path",placeholder:"/Users/you/data/app.sqlite",modelValue:e(C).filePath,"onUpdate:modelValue":s[9]||(s[9]=y=>e(C).filePath=y),readonly:e(X)},null,8,["modelValue","readonly"]),e(X)?(c(),S(e(q),{key:0,type:"button",variant:"outline",onClick:e(Te)},{default:o(()=>s[34]||(s[34]=[p(" Browse ")])),_:1},8,["onClick"])):B("",!0)]),a("p",Js,[e(X)?(c(),h(P,{key:0},[p(" Choose a local SQLite database file from the desktop app. ")],64)):b.value?(c(),h(P,{key:1},[p(" Enter a SQLite file path that this app runtime can read. In hosted web deployments, this path is on the server. ")],64)):(c(),h(P,{key:2},[p(" SQLite file connections are disabled in this deployment. ")],64))])])]),_:1}),t(e(H),{value:"managed",class:"space-y-6 pt-2"},{default:o(()=>[a("div",Xs,[t(e(D),null,{default:o(()=>s[35]||(s[35]=[p("SQLite Provider")])),_:1}),a("div",Ws,[t(e(q),{type:"button",variant:e(u).provider===e(R).CLOUDFLARE_D1?"default":"outline",class:"justify-start h-auto py-3",onClick:s[10]||(s[10]=y=>e(u).provider=e(R).CLOUDFLARE_D1)},{default:o(()=>[a("div",Zs,[a("div",ea,[t(e(I),{name:"devicon:cloudflare",class:"h-4 w-4 inline-block"}),s[36]||(s[36]=p(" Cloudflare D1 "))]),s[37]||(s[37]=a("div",{class:"text-xs opacity-80"}," Remote SQLite over the Cloudflare API ",-1))])]),_:1},8,["variant"]),t(e(q),{type:"button",variant:e(u).provider===e(R).TURSO?"default":"outline",class:"justify-start h-auto py-3",onClick:s[11]||(s[11]=y=>e(u).provider=e(R).TURSO)},{default:o(()=>[a("div",ta,[a("div",sa,[t(e(I),{name:"simple-icons:turso",class:"text-[#4ff8d2]"}),s[38]||(s[38]=p(" Turso "))]),s[39]||(s[39]=a("div",{class:"text-xs opacity-80"}," libSQL endpoint with optional branch routing ",-1))])]),_:1},8,["variant"])])]),e(u).provider===e(R).CLOUDFLARE_D1?(c(),h("div",aa,[a("div",oa,[t(e(D),{for:"d1-account-id"},{default:o(()=>s[40]||(s[40]=[p("Account ID "),a("span",{class:"text-destructive"},"*",-1)])),_:1}),t(e(w),{id:"d1-account-id",modelValue:e(u).accountId,"onUpdate:modelValue":s[12]||(s[12]=y=>e(u).accountId=y),placeholder:"Cloudflare account ID"},null,8,["modelValue"])]),a("div",la,[t(e(D),{for:"d1-database-id"},{default:o(()=>s[41]||(s[41]=[p("Database ID "),a("span",{class:"text-destructive"},"*",-1)])),_:1}),t(e(w),{id:"d1-database-id",modelValue:e(u).databaseId,"onUpdate:modelValue":s[13]||(s[13]=y=>e(u).databaseId=y),placeholder:"D1 database ID"},null,8,["modelValue"])]),a("div",na,[t(e(D),{for:"d1-database-name"},{default:o(()=>s[42]||(s[42]=[p("Database Name")])),_:1}),t(e(w),{id:"d1-database-name",modelValue:e(u).databaseName,"onUpdate:modelValue":s[14]||(s[14]=y=>e(u).databaseName=y),placeholder:"Optional display name"},null,8,["modelValue"])]),a("div",ra,[t(e(D),{for:"d1-api-token"},{default:o(()=>s[43]||(s[43]=[p("API Token "),a("span",{class:"text-destructive"},"*",-1)])),_:1}),t(e(w),{id:"d1-api-token",type:"password",modelValue:e(u).apiToken,"onUpdate:modelValue":s[15]||(s[15]=y=>e(u).apiToken=y),placeholder:"Cloudflare API token"},null,8,["modelValue"])])])):(c(),h("div",da,[a("div",ia,[t(e(D),{for:"turso-url"},{default:o(()=>s[44]||(s[44]=[p("Database URL "),a("span",{class:"text-destructive"},"*",-1)])),_:1}),t(e(w),{id:"turso-url",modelValue:e(u).url,"onUpdate:modelValue":s[16]||(s[16]=y=>e(u).url=y),placeholder:"libsql://your-db.turso.io",class:"font-mono text-sm"},null,8,["modelValue"])]),a("div",ua,[t(e(D),{for:"turso-auth-token"},{default:o(()=>s[45]||(s[45]=[p("Auth Token "),a("span",{class:"text-destructive"},"*",-1)])),_:1}),t(e(w),{id:"turso-auth-token",type:"password",modelValue:e(u).authToken,"onUpdate:modelValue":s[17]||(s[17]=y=>e(u).authToken=y),placeholder:"Turso auth token"},null,8,["modelValue"])]),a("div",pa,[t(e(D),{for:"turso-branch-name"},{default:o(()=>s[46]||(s[46]=[p("Branch")])),_:1}),t(e(w),{id:"turso-branch-name",modelValue:e(u).branchName,"onUpdate:modelValue":s[18]||(s[18]=y=>e(u).branchName=y),placeholder:"main"},null,8,["modelValue"])])])),s[47]||(s[47]=a("p",{class:"text-xs text-muted-foreground"}," Managed SQLite providers stay on the SQL-family workspace after validation, but use provider-specific transport under the hood. ",-1))]),_:1})]),_:1},8,["modelValue"]),t(bs,{"test-status":e($),"error-message":e(ke)},null,8,["test-status","error-message"])]),t(e(_e),{class:"p-6 pt-4 flex flex-col-reverse gap-2 sm:flex-row sm:justify-between sm:space-x-2"},{default:o(()=>[a("div",ca,[t(e(q),{type:"button",variant:"outline",onClick:e(Ve),size:"sm"},{default:o(()=>[t(e(I),{name:"hugeicons:arrow-left-02"}),s[48]||(s[48]=p(" Back "))]),_:1},8,["onClick"])]),a("div",fa,[t(e(q),{type:"button",variant:"outline",onClick:e(Se),size:"sm",disabled:e($)==="testing"||!e(W)},{default:o(()=>[e($)==="testing"?(c(),S(e(I),{key:0,name:"hugeicons:loading-03",class:"mr-2 size-4 animate-spin"})):B("",!0),s[49]||(s[49]=p(" Test "))]),_:1},8,["onClick","disabled"]),t(e(q),{id:"tour-create-update-connection-btn",type:"submit",size:"sm",disabled:e($)==="testing"||!e(W)},{default:o(()=>[p(U(A.editingConnection?"Update":"Create"),1)]),_:1},8,["disabled"])])]),_:1})],32))]),_:1})]),_:1},8,["open"]))}});export{Da as _};
|
|
1
|
+
import{i as E,aj as Le,bE as ne,d as T,ak as Oe,bV as qe,a0 as Q,aa as fe,q as S,o as c,w as o,E as O,u as e,ab as me,bH as Ne,al as Re,h as Me,r as G,c as h,F as P,a as t,N as q,x as j,f as p,cH as re,t as U,b as B,e as a,n as L,cI as He,_ as I,cJ as ze,bJ as Fe,s as Y,p as te,a4 as Ke,cK as je,bj as D,bm as ve,bk as w,k as Qe,m as Ge,bS as Ye,z as Je,B as N,v as Xe,bi as de,a_ as We,bP as ge,bQ as ye,bR as be,bT as _e,j as Ze,D as ie,bO as et,bA as tt,l as M,bB as st,M as at,bC as ot,X as Z,cL as H,ax as R,bf as lt,bU as nt}from"./DbehhcO7.js";import{_ as rt,a as dt,b as it}from"./CeA2-eDW.js";import{i as ut,_ as ue}from"./DbHH7dzg.js";import{i as pt,u as ct,d as ft,a as mt}from"./9Skr9Ccw.js";import{C as vt,a as gt,b as yt}from"./C04-ICJx.js";import{u as bt}from"./B5rxJs06.js";import{_ as F}from"./DnQ4Mwo_.js";import{a as _t,c as z,_ as xt}from"./jDSo3fNb.js";function ht({type:f,defaultValue:r,modelValue:d}){const l=d||r;return d!==void 0||r!==void 0?Array.isArray(l)?"multiple":"single":f??"single"}function Dt({type:f,defaultValue:r,modelValue:d}){return f||ht({type:f,defaultValue:r,modelValue:d})}function kt({type:f,defaultValue:r}){return r!==void 0?r:f==="single"?void 0:[]}function Ct(f,r){const d=E(()=>Dt(f)),l=Le(f,"modelValue",r,{defaultValue:kt(f),passive:f.modelValue===void 0,deep:!0});function g(x){if(d.value==="single")l.value=ne(x,l.value)?void 0:x;else{const b=Array.isArray(l.value)?[...l.value||[]]:[l.value].filter(Boolean);if(ut(b,x)){const n=b.findIndex(i=>ne(i,x));b.splice(n,1)}else b.push(x);l.value=b}}const m=E(()=>d.value==="single");return{modelValue:l,changeModelValue:g,isSingle:m}}const[J,Vt]=fe("AccordionRoot");var St=T({__name:"AccordionRoot",props:{collapsible:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},orientation:{type:String,required:!1,default:"vertical"},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},type:{type:String,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1}},emits:["update:modelValue"],setup(f,{emit:r}){const d=f,l=r,{dir:g,disabled:m,unmountOnHide:x}=Oe(d),b=qe(g),{modelValue:n,changeModelValue:i,isSingle:V}=Ct(d,l),{forwardRef:_,currentElement:k}=Q();return Vt({disabled:m,direction:b,orientation:d.orientation,parentElement:k,isSingle:V,collapsible:d.collapsible,modelValue:n,changeModelValue:i,unmountOnHide:x}),(C,u)=>(c(),S(e(me),{ref:e(_),"as-child":C.asChild,as:C.as},{default:o(()=>[O(C.$slots,"default",{modelValue:e(n)})]),_:3},8,["as-child","as"]))}}),wt=St,ee=function(f){return f.Open="open",f.Closed="closed",f}(ee||{});const[se,$t]=fe("AccordionItem");var At=T({__name:"AccordionItem",props:{disabled:{type:Boolean,required:!1},value:{type:String,required:!0},unmountOnHide:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(f,{expose:r}){const d=f,l=J(),g=E(()=>l.isSingle.value?d.value===l.modelValue.value:Array.isArray(l.modelValue.value)&&l.modelValue.value.includes(d.value)),m=E(()=>l.disabled.value||d.disabled),x=E(()=>m.value?"":void 0),b=E(()=>g.value?ee.Open:ee.Closed);r({open:g,dataDisabled:x});const{currentRef:n,currentElement:i}=Q();$t({open:g,dataState:b,disabled:m,dataDisabled:x,triggerId:"",currentRef:n,currentElement:i,value:E(()=>d.value)});function V(_){var v;const k=_.target;if(Array.from(((v=l.parentElement.value)==null?void 0:v.querySelectorAll("[data-reka-collection-item]"))??[]).findIndex($=>$===k)===-1)return null;bt(_,k,l.parentElement.value,{arrowKeyOptions:l.orientation,dir:l.direction.value,focus:!0})}return(_,k)=>(c(),S(e(vt),{"data-orientation":e(l).orientation,"data-disabled":x.value,"data-state":b.value,disabled:m.value,open:g.value,as:d.as,"as-child":d.asChild,"unmount-on-hide":d.unmountOnHide??e(l).unmountOnHide.value,onKeydown:Ne(V,["up","down","left","right","home","end"])},{default:o(()=>[O(_.$slots,"default",{open:g.value})]),_:3},8,["data-orientation","data-disabled","data-state","disabled","open","as","as-child","unmount-on-hide"]))}}),It=At,Et=T({__name:"AccordionContent",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(f){const r=f,d=J(),l=se();return Q(),(g,m)=>(c(),S(e(gt),{role:"region","as-child":r.asChild,as:g.as,"force-mount":r.forceMount,"aria-labelledby":e(l).triggerId,"data-state":e(l).dataState.value,"data-disabled":e(l).dataDisabled.value,"data-orientation":e(d).orientation,style:{"--reka-accordion-content-width":"var(--reka-collapsible-content-width)","--reka-accordion-content-height":"var(--reka-collapsible-content-height)"},onContentFound:m[0]||(m[0]=x=>e(d).changeModelValue(e(l).value.value))},{default:o(()=>[O(g.$slots,"default")]),_:3},8,["as-child","as","force-mount","aria-labelledby","data-state","data-disabled","data-orientation"]))}}),Tt=Et,Bt=T({__name:"AccordionHeader",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h3"}},setup(f){const r=f,d=J(),l=se();return Q(),(g,m)=>(c(),S(e(me),{as:r.as,"as-child":r.asChild,"data-orientation":e(d).orientation,"data-state":e(l).dataState.value,"data-disabled":e(l).dataDisabled.value},{default:o(()=>[O(g.$slots,"default")]),_:3},8,["as","as-child","data-orientation","data-state","data-disabled"]))}}),Pt=Bt,Ut=T({__name:"AccordionTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(f){const r=f,d=J(),l=se();l.triggerId||(l.triggerId=Re(void 0,"reka-accordion-trigger"));function g(){const m=d.isSingle.value&&l.open.value&&!d.collapsible;l.disabled.value||m||d.changeModelValue(l.value.value)}return(m,x)=>(c(),S(e(yt),{id:e(l).triggerId,ref:e(l).currentRef,"data-reka-collection-item":"",as:r.as,"as-child":r.asChild,"aria-disabled":e(l).disabled.value||void 0,"aria-expanded":e(l).open.value||!1,"data-disabled":e(l).dataDisabled.value,"data-orientation":e(d).orientation,"data-state":e(l).dataState.value,disabled:e(l).disabled.value,onClick:g},{default:o(()=>[O(m.$slots,"default")]),_:3},8,["id","as","as-child","aria-disabled","aria-expanded","data-disabled","data-orientation","data-state","disabled"]))}}),Lt=Ut;const Ot={key:0,class:"text-sm text-muted-foreground"},qt={key:0,class:"px-2 py-1 text-xs text-muted-foreground select-none"},Nt={role:"listbox","aria-multiselectable":"true",class:"space-y-0.5"},Rt=["aria-selected","aria-disabled"],Mt=["disabled","onClick"],Ht={key:0,viewBox:"0 0 12 12",class:"size-3 fill-current"},zt={class:"flex-1 truncate text-left"},Ft={key:1,class:"px-2 py-3 text-center text-xs text-muted-foreground"},pe=3,Kt=T({__name:"EnvTagPicker",props:{modelValue:{}},emits:["update:modelValue"],setup(f,{emit:r}){const d=f,l=r,g=Me(),m=E(()=>d.modelValue.length>=pe);function x(_){return d.modelValue.includes(_)}function b(_){x(_)?l("update:modelValue",d.modelValue.filter(k=>k!==_)):m.value||l("update:modelValue",[...d.modelValue,_])}const n=E(()=>g.tags.filter(_=>d.modelValue.includes(_.id))),i=G(!1);function V(_){m.value||l("update:modelValue",[...d.modelValue,_.id])}return(_,k)=>{const C=I;return c(),h(P,null,[t(e(rt),null,{default:o(()=>[t(e(dt),{"as-child":""},{default:o(()=>[t(e(q),{type:"button",variant:"outline",class:"h-auto min-h-9 w-full justify-start gap-1 px-2 py-1 flex-wrap"},{default:o(()=>[n.value.length===0?(c(),h("span",Ot,"Assign tags…")):(c(!0),h(P,{key:1},j(n.value,u=>(c(),h("span",{key:u.id,class:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs font-medium"},[t(re,{color:u.color,size:"sm"},null,8,["color"]),p(" "+U(u.name),1)]))),128))]),_:1})]),_:1}),t(e(it),{class:"w-56 p-1",align:"start","side-offset":4,"restore-focus":!1},{default:o(()=>[m.value?(c(),h("p",qt," Max "+U(pe)+" tags selected ")):B("",!0),a("ul",Nt,[(c(!0),h(P,null,j(e(g).tags,u=>(c(),h("li",{key:u.id,role:"option","aria-selected":x(u.id),"aria-disabled":m.value&&!x(u.id)},[a("button",{type:"button",class:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-sm transition-colors hover:bg-accent focus-visible:bg-accent focus-visible:outline-none disabled:pointer-events-none disabled:opacity-40",disabled:m.value&&!x(u.id),onClick:v=>b(u.id)},[a("span",{class:L(["flex size-4 items-center justify-center rounded-sm border",x(u.id)?"border-primary bg-primary text-primary-foreground":"border-input"])},[x(u.id)?(c(),h("svg",Ht,k[2]||(k[2]=[a("path",{d:"M10 3L5 8.5 2 5.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,-1)]))):B("",!0)],2),t(re,{color:u.color,size:"md"},null,8,["color"]),a("span",zt,U(u.name),1)],8,Mt)],8,Rt))),128))]),e(g).tags.length===0?(c(),h("p",Ft," No tags configured ")):B("",!0),t(e(He),{class:"my-1"}),a("button",{type:"button",class:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground transition-colors focus-visible:outline-none focus-visible:bg-accent",onClick:k[0]||(k[0]=u=>i.value=!0)},[t(C,{name:"hugeicons:plus-sign",class:"size-4"}),k[3]||(k[3]=p(" Add new tag "))])]),_:1})]),_:1}),t(ze,{open:i.value,"onUpdate:open":k[1]||(k[1]=u=>i.value=u),onCreated:V},null,8,["open"])],64)}}}),ce=T({__name:"Accordion",props:{collapsible:{type:Boolean},disabled:{type:Boolean},dir:{},orientation:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},type:{},modelValue:{},defaultValue:{}},emits:["update:modelValue"],setup(f,{emit:r}){const g=Fe(f,r);return(m,x)=>(c(),S(e(wt),Y({"data-slot":"accordion"},e(g)),{default:o(()=>[O(m.$slots,"default")]),_:3},16))}}),xe=T({__name:"AccordionContent",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(f){const r=f,d=E(()=>{const{class:l,...g}=r;return g});return(l,g)=>(c(),S(e(Tt),Y({"data-slot":"accordion-content"},d.value,{class:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"}),{default:o(()=>[a("div",{class:L(e(te)("pt-0 pb-4",r.class))},[O(l.$slots,"default")],2)]),_:3},16))}}),he=T({__name:"AccordionItem",props:{disabled:{type:Boolean},value:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(f){const r=f,d=E(()=>{const{class:g,...m}=r;return m}),l=Ke(d);return(g,m)=>(c(),S(e(It),Y({"data-slot":"accordion-item"},e(l),{class:e(te)("border-b last:border-b-0",r.class)}),{default:o(()=>[O(g.$slots,"default")]),_:3},16,["class"]))}}),De=T({__name:"AccordionTrigger",props:{asChild:{type:Boolean},as:{},class:{}},setup(f){const r=f,d=E(()=>{const{class:l,...g}=r;return g});return(l,g)=>(c(),S(e(Pt),{class:"flex"},{default:o(()=>[t(e(Lt),Y({"data-slot":"accordion-trigger"},d.value,{class:e(te)("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",r.class)}),{default:o(()=>[O(l.$slots,"default"),O(l.$slots,"icon",{},()=>[t(e(je),{class:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})])]),_:3},16,["class"])]),_:3}))}});function K(f){const r=G(!1);return{isDragging:r,onDragOver:m=>{m.preventDefault(),r.value=!0},onDragLeave:()=>{r.value=!1},onDrop:async m=>{var i;m.preventDefault(),r.value=!1;const x=(i=m.dataTransfer)==null?void 0:i.files;if(!x||x.length===0)return;const b=x[0],n=new FileReader;n.onload=V=>{var k;const _=(k=V.target)==null?void 0:k.result;f&&f(_)},n.readAsText(b)}}}const jt={class:"flex items-center gap-2"},Qt={class:"flex items-center justify-between"},Gt={class:"grid grid-cols-4 gap-4"},Yt={class:"col-span-3 space-y-2"},Jt={class:"space-y-2"},Xt={class:"grid grid-cols-2 gap-4"},Wt={class:"space-y-2"},Zt={class:"space-y-2"},es={class:"relative"},ts=["aria-label"],ss={class:"flex items-center gap-2"},as={class:"space-y-4 pt-2 border-t"},os={class:"flex items-center gap-2"},ls={key:0,class:"space-y-2"},ns=T({__name:"ConnectionSSHTunnel",props:{formData:{}},setup(f){const r=f,{onDragOver:d,onDragLeave:l,onDrop:g,isDragging:m}=K(b=>{r.formData.sshPrivateKey=b}),x=G(!1);return(b,n)=>(c(),S(e(he),{value:"ssh"},{default:o(()=>[t(e(De),{class:"hover:no-underline"},{default:o(()=>[a("div",jt,[t(e(I),{name:"lucide:terminal",class:"size-4 text-primary"}),n[9]||(n[9]=a("span",null,"SSH Tunnel",-1))])]),_:1}),t(e(xe),{class:"space-y-4 pt-4 px-1"},{default:o(()=>[a("div",Qt,[t(e(D),{for:"ssh-enabled"},{default:o(()=>n[10]||(n[10]=[p("Over SSH")])),_:1}),t(e(ve),{id:"ssh-enabled","model-value":b.formData.sshEnabled,"onUpdate:modelValue":n[0]||(n[0]=i=>b.formData.sshEnabled=i)},null,8,["model-value"])]),b.formData.sshEnabled?(c(),h(P,{key:0},[a("div",Gt,[a("div",Yt,[t(e(D),{for:"ssh-host"},{default:o(()=>n[11]||(n[11]=[p("Server")])),_:1}),t(e(w),{id:"ssh-host",placeholder:"e.g. ssh.example.com or 1.2.3.4",modelValue:b.formData.sshHost,"onUpdate:modelValue":n[1]||(n[1]=i=>b.formData.sshHost=i)},null,8,["modelValue"])]),a("div",Jt,[t(e(D),{for:"ssh-port"},{default:o(()=>n[12]||(n[12]=[p("Port")])),_:1}),t(e(w),{id:"ssh-port",type:"number",placeholder:"22",modelValue:b.formData.sshPort,"onUpdate:modelValue":n[2]||(n[2]=i=>b.formData.sshPort=i)},null,8,["modelValue"])])]),a("div",Xt,[a("div",Wt,[t(e(D),{for:"ssh-user"},{default:o(()=>n[13]||(n[13]=[p("User")])),_:1}),t(e(w),{id:"ssh-user",placeholder:"e.g. root or ubuntu",modelValue:b.formData.sshUsername,"onUpdate:modelValue":n[3]||(n[3]=i=>b.formData.sshUsername=i)},null,8,["modelValue"])]),a("div",Zt,[t(e(D),{for:"ssh-password"},{default:o(()=>n[14]||(n[14]=[p("Password")])),_:1}),a("div",es,[t(e(w),{id:"ssh-password",type:e(x)?"text":"password",placeholder:"SSH password (optional if using key)",modelValue:b.formData.sshPassword,"onUpdate:modelValue":n[4]||(n[4]=i=>b.formData.sshPassword=i),class:"pr-8"},null,8,["type","modelValue"]),a("button",{type:"button",class:"absolute right-2 top-1/2 h-4 cursor-pointer -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",onClick:n[5]||(n[5]=i=>x.value=!e(x)),"aria-label":e(x)?"Hide password":"Show password"},[t(e(I),{name:e(x)?"hugeicons:view":"hugeicons:view-off",class:"size-4!"},null,8,["name"])],8,ts)])])]),a("div",ss,[t(e(ue),{id:"ssh-keychain","model-value":b.formData.sshStoreInKeychain,"onUpdate:modelValue":n[6]||(n[6]=i=>b.formData.sshStoreInKeychain=i)},null,8,["model-value"]),t(e(D),{for:"ssh-keychain",class:"text-sm font-normal"},{default:o(()=>n[15]||(n[15]=[p("Store in keychain")])),_:1})]),a("div",as,[a("div",os,[t(e(ue),{id:"ssh-use-key","model-value":b.formData.sshUseKey,"onUpdate:modelValue":n[7]||(n[7]=i=>b.formData.sshUseKey=i)},null,8,["model-value"]),t(e(D),{for:"ssh-use-key",class:"text-sm font-semibold"},{default:o(()=>n[16]||(n[16]=[p("SSH Key Authentication")])),_:1})]),b.formData.sshUseKey?(c(),h("div",ls,[t(e(D),{for:"ssh-key-file"},{default:o(()=>n[17]||(n[17]=[p("Private Key")])),_:1}),t(e(F),{id:"ssh-key-file",modelValue:b.formData.sshPrivateKey,"onUpdate:modelValue":n[8]||(n[8]=i=>b.formData.sshPrivateKey=i),placeholder:"-----BEGIN OPENSSH PRIVATE KEY-----\\n...\\n-----END OPENSSH PRIVATE KEY-----",class:L(["min-h-[100px] max-h-[200px] text-xs font-mono",e(m)?"ring-2 ring-primary":""]),onDragover:e(d),onDragleave:e(l),onDrop:e(g)},null,8,["modelValue","class","onDragover","onDragleave","onDrop"]),n[18]||(n[18]=a("p",{class:"text-xs text-muted-foreground"}," Drop a .pem / .key file here, or paste the SSH private key content ",-1))])):B("",!0)])],64)):B("",!0)]),_:1})]),_:1}))}}),rs={class:"flex items-center gap-2"},ds={class:"flex items-center justify-between"},is={class:"space-y-2"},us={class:"space-y-4"},ps={class:"space-y-2"},cs={class:"space-y-2"},fs={class:"space-y-2"},ms=T({__name:"ConnectionSSLConfig",props:{formData:{}},setup(f){const r=f,{onDragOver:d,onDragLeave:l,onDrop:g,isDragging:m}=K(u=>{r.formData.sslCA=u}),{onDragOver:x,onDragLeave:b,onDrop:n,isDragging:i}=K(u=>{r.formData.sslCert=u}),{onDragOver:V,onDragLeave:_,onDrop:k,isDragging:C}=K(u=>{r.formData.sslKey=u});return(u,v)=>(c(),S(e(he),{value:"ssl"},{default:o(()=>[t(e(De),{class:"hover:no-underline"},{default:o(()=>[a("div",rs,[t(e(I),{name:"hugeicons:security-check",class:"size-4 text-primary"}),v[5]||(v[5]=a("span",null,"SSL Configuration",-1))])]),_:1}),t(e(xe),{class:"space-y-4 pt-4 px-1"},{default:o(()=>[a("div",ds,[t(e(D),{for:"ssl-enabled"},{default:o(()=>v[6]||(v[6]=[p("Enable SSL")])),_:1}),t(e(ve),{id:"ssl-enabled","model-value":u.formData.sslEnabled,"onUpdate:modelValue":v[0]||(v[0]=$=>u.formData.sslEnabled=$)},null,8,["model-value"])]),u.formData.sslEnabled?(c(),h(P,{key:0},[a("div",is,[t(e(D),{for:"ssl-mode"},{default:o(()=>v[7]||(v[7]=[p("SSL Mode")])),_:1}),t(e(Qe),{modelValue:u.formData.sslMode,"onUpdate:modelValue":v[1]||(v[1]=$=>u.formData.sslMode=$)},{default:o(()=>[t(e(Ge),{id:"ssl-mode"},{default:o(()=>[t(e(Ye),{placeholder:"Select mode"})]),_:1}),t(e(Je),null,{default:o(()=>[t(e(N),{value:"disable"},{default:o(()=>v[8]||(v[8]=[p("Disable")])),_:1}),t(e(N),{value:"preferred"},{default:o(()=>v[9]||(v[9]=[p("Preferred")])),_:1}),t(e(N),{value:"require"},{default:o(()=>v[10]||(v[10]=[p("Require")])),_:1}),t(e(N),{value:"verify-ca"},{default:o(()=>v[11]||(v[11]=[p("Verify CA")])),_:1}),t(e(N),{value:"verify-full"},{default:o(()=>v[12]||(v[12]=[p("Verify Full")])),_:1})]),_:1})]),_:1},8,["modelValue"])]),a("div",us,[a("div",ps,[t(e(D),{for:"ssl-ca"},{default:o(()=>v[13]||(v[13]=[p("CA Certificate")])),_:1}),t(e(F),{id:"ssl-ca",modelValue:u.formData.sslCA,"onUpdate:modelValue":v[2]||(v[2]=$=>u.formData.sslCA=$),placeholder:"-----BEGIN CERTIFICATE-----\\n...\\n-----END CERTIFICATE-----",class:L(["min-h-[80px] max-h-[160px] text-xs font-mono",e(m)?"ring-2 ring-primary":""]),onDragover:e(d),onDragleave:e(l),onDrop:e(g)},null,8,["modelValue","class","onDragover","onDragleave","onDrop"]),v[14]||(v[14]=a("p",{class:"text-xs text-muted-foreground"}," Drop a .pem / .crt file here, or paste the CA certificate content ",-1))]),a("div",cs,[t(e(D),{for:"ssl-cert"},{default:o(()=>v[15]||(v[15]=[p("Client Certificate")])),_:1}),t(e(F),{id:"ssl-cert",modelValue:u.formData.sslCert,"onUpdate:modelValue":v[3]||(v[3]=$=>u.formData.sslCert=$),placeholder:"-----BEGIN CERTIFICATE-----\\n...\\n-----END CERTIFICATE-----",class:L(["min-h-[80px] max-h-[160px] text-xs font-mono",e(i)?"ring-2 ring-primary":""]),onDragover:e(x),onDragleave:e(b),onDrop:e(n)},null,8,["modelValue","class","onDragover","onDragleave","onDrop"]),v[16]||(v[16]=a("p",{class:"text-xs text-muted-foreground"}," Drop a .pem / .crt file here, or paste the client certificate content ",-1))]),a("div",fs,[t(e(D),{for:"ssl-key"},{default:o(()=>v[17]||(v[17]=[p("SSL Key")])),_:1}),t(e(F),{id:"ssl-key",modelValue:u.formData.sslKey,"onUpdate:modelValue":v[4]||(v[4]=$=>u.formData.sslKey=$),placeholder:"-----BEGIN RSA PRIVATE KEY-----\\n...\\n-----END RSA PRIVATE KEY-----",class:L(["min-h-[80px] max-h-[160px] text-xs font-mono",e(C)?"ring-2 ring-primary":""]),onDragover:e(V),onDragleave:e(_),onDrop:e(k)},null,8,["modelValue","class","onDragover","onDragleave","onDrop"]),v[18]||(v[18]=a("p",{class:"text-xs text-muted-foreground"}," Drop a .pem / .key file here, or paste the private key content ",-1))])])],64)):B("",!0)]),_:1})]),_:1}))}}),vs={key:0,class:"flex items-center gap-2 rounded-md border p-3 text-sm"},gs={key:1,class:"flex items-center gap-2 rounded-md border border-green-200 bg-green-50 p-3 text-sm text-green-600 dark:border-green-900 dark:bg-green-950/50 dark:text-green-400"},ys={key:2,class:"flex items-center gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-600 dark:border-red-900 dark:bg-red-950/50 dark:text-red-400"},bs=T({__name:"ConnectionStatusSection",props:{testStatus:{},errorMessage:{}},setup(f){const r=f;return(d,l)=>(c(),h(P,null,[d.testStatus==="testing"?(c(),h("div",vs,[t(e(I),{name:"hugeicons:loading-03",class:"animate-spin size-5!"}),l[0]||(l[0]=a("span",null,"Testing connection...",-1))])):B("",!0),d.testStatus==="success"?(c(),h("div",gs,[t(e(I),{name:"hugeicons:checkmark-circle-02",class:"shrink-0 size-4"}),l[1]||(l[1]=a("span",null,"Connection successful! Your database is ready to use.",-1))])):B("",!0),d.testStatus==="error"?(c(),h("div",ys,[t(e(I),{name:"hugeicons:cancel-01",class:"shrink-0 size-4"}),a("span",null,U(r.errorMessage||"Connection failed. Please check your details and try again."),1)])):B("",!0)],64))}}),_s={class:"flex flex-col items-center gap-1.5 text-center"},xs={key:0,class:"text-xxs leading-4 text-muted-foreground px-2"},hs={class:"flex items-center justify-center gap-1.5 min-h-3.5"},Ds=T({__name:"DatabaseTypeCard",props:{name:{},icon:{},description:{},selected:{type:Boolean},isSupport:{type:Boolean},isBeta:{type:Boolean},iconClass:{},unsupportedLabel:{}},setup(f){return(r,d)=>(c(),S(e(_t),{class:L(e(z)("relative",r.isSupport?"cursor-pointer":"opacity-90 cursor-not-allowed ",r.selected&&r.isSupport?"border-muted-foreground shadow-lg":"border-transparent bg-background"))},{default:o(()=>[t(e(xt),{class:"flex flex-col items-center justify-center p-0 w-full"},{default:o(()=>[a("div",{class:L(e(z)("flex items-center justify-center rounded-xl p-2 transition-transform duration-300",r.selected&&r.isSupport?"scale-105":"group-hover:scale-105",!r.isSupport&&"opacity-40"))},[(c(),S(Xe(r.icon),{class:L(e(z)("size-12",r.iconClass))},null,8,["class"]))],2),a("div",_s,[a("span",{class:L(e(z)("text-sm font-medium tracking-tight transition-colors",r.selected&&r.isSupport?"text-primary":"text-foreground/70",!r.isSupport&&"text-muted-foreground"))},U(r.name),3),r.description?(c(),h("p",xs,U(r.description),1)):B("",!0),a("div",hs,[r.isBeta?(c(),S(e(de),{key:0,variant:"outline",class:"text-[9px] px-1.5 py-0 h-3.5 uppercase tracking-widest font-bold border-amber-500/40 text-amber-600"},{default:o(()=>d[0]||(d[0]=[p(" Beta ")])),_:1})):B("",!0),r.isSupport?B("",!0):(c(),S(e(de),{key:1,variant:"secondary",class:"text-[9px] px-1.5 py-0 h-3.5 uppercase tracking-widest font-bold opacity-60"},{default:o(()=>[p(U(r.unsupportedLabel||"Soon"),1)]),_:1}))])])]),_:1})]),_:1},8,["class"]))}}),ks={class:"flex flex-col h-full overflow-hidden"},Cs={class:"flex-1 overflow-y-auto px-6 pb-4 pt-1"},Vs={id:"tour-database-type-cards",class:"grid grid-cols-2 gap-3 py-2 md:grid-cols-4"},Ss=T({__name:"ConnectionStepType",props:{databaseOptions:{},dbType:{}},emits:["next","close"],setup(f,{emit:r}){const d=f,l=r,g=n=>{n.isSupport&&n.onClick()},m=E(()=>d.databaseOptions.filter(n=>n.isSupport)),x=()=>{const n=m.value.findIndex(_=>_.type===d.dbType);let i=0;n!==-1&&(i=(n+1)%m.value.length);const V=m.value[i];V&&g(V)},b=()=>{const n=m.value.findIndex(_=>_.type===d.dbType);let i=m.value.length-1;n!==-1&&(i=(n-1+m.value.length)%m.value.length);const V=m.value[i];V&&g(V)};return We([{key:"arrowdown",excludeInput:!0,isPreventDefault:!0,callback:x},{key:"arrowright",excludeInput:!0,isPreventDefault:!0,callback:x},{key:"arrowup",excludeInput:!0,isPreventDefault:!0,callback:b},{key:"arrowleft",excludeInput:!0,isPreventDefault:!0,callback:b},{key:"enter",excludeInput:!0,isPreventDefault:!0,callback:()=>{d.dbType&&l("next")}}]),(n,i)=>{const V=I;return c(),h("div",ks,[t(e(ge),{class:"p-6 pb-3"},{default:o(()=>[t(e(ye),null,{default:o(()=>i[2]||(i[2]=[p("Select Database Type")])),_:1}),t(e(be),null,{default:o(()=>i[3]||(i[3]=[p("Choose the type of database you want to connect to")])),_:1})]),_:1}),a("div",Cs,[a("div",Vs,[(c(!0),h(P,null,j(n.databaseOptions,_=>(c(),S(Ds,{key:_.type,name:_.name,icon:_.icon,description:_.description,selected:_.isActive,onClick:()=>g(_),isSupport:_.isSupport,isBeta:_.isBeta,"unsupported-label":_.unsupportedLabel,iconClass:"size-10!"},null,8,["name","icon","description","selected","onClick","isSupport","isBeta","unsupported-label"]))),128))])]),t(e(_e),{class:"flex items-center justify-end gap-2 px-6 pb-6 pt-3"},{default:o(()=>[t(e(q),{variant:"outline",onClick:i[0]||(i[0]=_=>n.$emit("close")),size:"sm"},{default:o(()=>i[4]||(i[4]=[p(" Cancel ")])),_:1}),t(e(q),{id:"tour-database-type-next",onClick:i[1]||(i[1]=_=>n.$emit("next")),disabled:!n.dbType,size:"sm"},{default:o(()=>[i[5]||(i[5]=p(" Next ")),t(V,{name:"hugeicons:arrow-right-02"})]),_:1},8,["disabled"])]),_:1})])}}}),ws={class:"flex-1 overflow-y-auto p-4 space-y-4"},$s={key:0,id:"tour-connection-string-tab"},As={key:1,id:"tour-connection-form-tab"},Is={key:2},Es={key:3},Ts={class:"grid grid-cols-3 gap-3 mt-2"},Bs={class:"col-span-2 space-y-2"},Ps={class:"col-span-1 space-y-2"},Us={class:"space-y-2"},Ls={class:"text-xs text-muted-foreground"},Os={class:"space-y-4"},qs={class:"grid grid-cols-4 gap-2"},Ns={class:"col-span-3 space-y-2"},Rs={class:"space-y-2"},Ms={class:"grid grid-cols-2 gap-2"},Hs={class:"space-y-2"},zs={class:"space-y-2"},Fs={class:"relative"},Ks=["aria-label"],js={class:"space-y-2"},Qs={key:0,class:"space-y-4"},Gs={class:"space-y-2"},Ys={class:"flex gap-2"},Js={class:"text-xs text-muted-foreground"},Xs={class:"space-y-3"},Ws={class:"grid grid-cols-2 gap-2"},Zs={class:"text-left"},ea={class:"font-medium"},ta={class:"text-left"},sa={class:"font-medium"},aa={key:0,class:"grid grid-cols-2 gap-3"},oa={class:"space-y-2"},la={class:"space-y-2"},na={class:"col-span-2 space-y-2"},ra={class:"col-span-2 space-y-2"},da={key:1,class:"grid grid-cols-2 gap-3"},ia={class:"col-span-2 space-y-2"},ua={class:"col-span-2 space-y-2"},pa={class:"col-span-2 space-y-2"},ca={class:"flex flex-1 space-x-2"},fa={class:"flex space-x-2"},Da=T({__name:"CreateConnectionModal",props:{open:{type:Boolean},editingConnection:{},workspaceId:{}},emits:["update:open","addNew","update"],setup(f,{emit:r}){const d=f,l=r,g=()=>{l("update:open",!1),setTimeout(Be,300)},m=G(!1),x=Ze(),b=E(()=>pt(x.public.sqlite3ConnectionsEnabled)),{step:n,dbType:i,connectionName:V,connectionMethod:_,connectionString:k,formData:C,managedSqlite:u,tagIds:v,testStatus:$,testErrorMessage:ke,handleNext:Ce,handleBack:Ve,handleTestConnection:Se,handleCreateConnection:we,getDefaultPort:$e,getConnectionPlaceholder:ae,availableConnectionMethods:oe,structuredTargetLabel:Ae,structuredTargetPlaceholder:Ie,canUseNetworkOptions:Ee,canPickSqliteFile:X,isFormValid:W,pickSqliteFile:Te,resetForm:Be}=ct({open:()=>d.open,editingConnection:()=>d.editingConnection,workspaceId:()=>d.workspaceId,onAddNew:A=>l("addNew",A),onUpdate:A=>l("update",A),onClose:g}),Pe=E(()=>ft.map(A=>{const s=mt(A,b.value);return{...A,isSupport:s?!1:A.isSupport,unsupportedLabel:s?"Disabled":A.unsupportedLabel,isActive:i.value===A.type,onClick:()=>i.value=A.type}})),le=E({get:()=>i.value===ie.ORACLE?C.serviceName:C.database,set:A=>{if(i.value===ie.ORACLE){C.serviceName=A;return}C.database=A}}),Ue=()=>{W.value&&$.value!=="testing"&&we()};return(A,s)=>(c(),S(e(et),{open:A.open,"onUpdate:open":s[20]||(s[20]=y=>A.$emit("update:open",y))},{default:o(()=>[t(e(nt),{class:"max-w-[60vw]! w-full h-[60vh]! max-h-[90vh] p-0 flex flex-col overflow-hidden"},{default:o(()=>[e(n)===1?(c(),S(Ss,{key:0,"database-options":Pe.value,"db-type":e(i),onNext:e(Ce),onClose:g},null,8,["database-options","db-type","onNext"])):(c(),h("form",{key:1,onSubmit:lt(Ue,["prevent"]),class:"flex flex-col h-full overflow-hidden"},[t(e(ge),{class:"p-6 pb-2"},{default:o(()=>[t(e(ye),null,{default:o(()=>s[21]||(s[21]=[p("Connection Details")])),_:1}),t(e(be),null,{default:o(()=>[p(" Enter the details for your "+U(e(i))+" database ",1)]),_:1})]),_:1}),a("div",ws,[t(e(tt),{modelValue:e(_),"onUpdate:modelValue":s[19]||(s[19]=y=>M(_)?_.value=y:null),class:"w-full"},{default:o(()=>[t(e(st),{class:"grid w-fit",style:at({gridTemplateColumns:`repeat(${e(oe).length}, minmax(0, 1fr))`}),id:"tour-connection-method-tabs"},{default:o(()=>[(c(!0),h(P,null,j(e(oe),y=>(c(),S(e(ot),{key:y,value:y,class:"cursor-pointer"},{default:o(()=>[y===e(Z).STRING?(c(),h("span",$s," Connection String ")):y===e(Z).FORM?(c(),h("span",As," Connection Form ")):y===e(Z).MANAGED?(c(),h("span",Is," Managed SQLite ")):(c(),h("span",Es,"Database File"))]),_:2},1032,["value"]))),128))]),_:1},8,["style"]),a("div",Ts,[a("div",Bs,[t(e(D),{for:"connection-name",class:"flex items-center gap-2"},{default:o(()=>[t(e(I),{name:"hugeicons:database",class:"h-3.5 w-3.5 text-muted-foreground"}),s[22]||(s[22]=p(" Connection Name ")),s[23]||(s[23]=a("span",{class:"text-destructive"},"*",-1))]),_:1}),t(e(w),{id:"connection-name",placeholder:"My Database Connection",modelValue:e(V),"onUpdate:modelValue":s[0]||(s[0]=y=>M(V)?V.value=y:null)},null,8,["modelValue"])]),a("div",Ps,[t(e(D),{class:"flex items-center gap-2"},{default:o(()=>[t(e(I),{name:"hugeicons:tag-01",class:"h-3.5 w-3.5 text-muted-foreground"}),s[24]||(s[24]=p(" Environment Tags "))]),_:1}),t(e(Kt),{modelValue:e(v),"onUpdate:modelValue":s[1]||(s[1]=y=>M(v)?v.value=y:null)},null,8,["modelValue"])])]),t(e(H),{value:"string",class:"space-y-4 pt-4"},{default:o(()=>[a("div",Us,[t(e(D),{for:"connection-string",class:"flex items-center gap-2"},{default:o(()=>[t(e(I),{name:"hugeicons:connect",class:"h-3.5 w-3.5 text-muted-foreground"}),s[25]||(s[25]=p(" Connection String ")),s[26]||(s[26]=a("span",{class:"text-destructive"},"*",-1))]),_:1}),t(e(w),{id:"connection-string",placeholder:e(ae)(),modelValue:e(k),"onUpdate:modelValue":s[2]||(s[2]=y=>M(k)?k.value=y:null),class:"font-mono text-sm"},null,8,["placeholder","modelValue"]),a("p",Ls," Example: "+U(e(ae)()),1)])]),_:1}),t(e(H),{value:"form",class:"space-y-6 pt-2"},{default:o(()=>[a("div",Os,[a("div",qs,[a("div",Ns,[t(e(D),{for:"host"},{default:o(()=>s[27]||(s[27]=[p("Host "),a("span",{class:"text-destructive"},"*",-1)])),_:1}),t(e(w),{id:"host",placeholder:"localhost",modelValue:e(C).host,"onUpdate:modelValue":s[3]||(s[3]=y=>e(C).host=y)},null,8,["modelValue"])]),a("div",Rs,[t(e(D),{for:"port"},{default:o(()=>s[28]||(s[28]=[p("Port "),a("span",{class:"text-destructive"},"*",-1)])),_:1}),t(e(w),{id:"port",placeholder:e($e)(),modelValue:e(C).port,"onUpdate:modelValue":s[4]||(s[4]=y=>e(C).port=y)},null,8,["placeholder","modelValue"])])]),a("div",Ms,[a("div",Hs,[t(e(D),{for:"username"},{default:o(()=>s[29]||(s[29]=[p("User "),a("span",{class:"text-destructive"},"*",-1)])),_:1}),t(e(w),{id:"username",placeholder:"username",modelValue:e(C).username,"onUpdate:modelValue":s[5]||(s[5]=y=>e(C).username=y)},null,8,["modelValue"])]),a("div",zs,[t(e(D),{for:"password"},{default:o(()=>s[30]||(s[30]=[p("Password")])),_:1}),a("div",Fs,[t(e(w),{id:"password",type:e(m)?"text":"password",placeholder:"••••••••",modelValue:e(C).password,"onUpdate:modelValue":s[6]||(s[6]=y=>e(C).password=y),class:"pr-8"},null,8,["type","modelValue"]),a("button",{type:"button",class:"absolute right-2 top-1/2 h-5 cursor-pointer -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",onClick:s[7]||(s[7]=y=>m.value=!e(m)),"aria-label":e(m)?"Hide password":"Show password"},[t(e(I),{name:e(m)?"hugeicons:view":"hugeicons:view-off",class:"size-4!"},null,8,["name"])],8,Ks)])])]),a("div",js,[t(e(D),{for:"structured-target"},{default:o(()=>[p(U(e(Ae))+" ",1),s[31]||(s[31]=a("span",{class:"text-destructive"},"*",-1))]),_:1}),t(e(w),{id:"structured-target",placeholder:e(Ie),modelValue:le.value,"onUpdate:modelValue":s[8]||(s[8]=y=>le.value=y)},null,8,["placeholder","modelValue"])])]),e(Ee)?(c(),h("div",Qs,[t(e(ce),{type:"single",collapsible:"",class:"w-full border px-4 rounded-lg shadow"},{default:o(()=>[t(ms,{"form-data":e(C)},null,8,["form-data"])]),_:1}),t(e(ce),{type:"single",collapsible:"",class:"w-full border px-4 rounded-lg shadow"},{default:o(()=>[t(ns,{"form-data":e(C)},null,8,["form-data"])]),_:1})])):B("",!0)]),_:1}),t(e(H),{value:"file",class:"space-y-4 pt-4"},{default:o(()=>[a("div",Gs,[t(e(D),{for:"file-path",class:"flex items-center gap-2"},{default:o(()=>[t(e(I),{name:"hugeicons:file-01",class:"h-3.5 w-3.5 text-muted-foreground"}),s[32]||(s[32]=p(" SQLite File ")),s[33]||(s[33]=a("span",{class:"text-destructive"},"*",-1))]),_:1}),a("div",Ys,[t(e(w),{id:"file-path",placeholder:"/Users/you/data/app.sqlite",modelValue:e(C).filePath,"onUpdate:modelValue":s[9]||(s[9]=y=>e(C).filePath=y),readonly:e(X)},null,8,["modelValue","readonly"]),e(X)?(c(),S(e(q),{key:0,type:"button",variant:"outline",onClick:e(Te)},{default:o(()=>s[34]||(s[34]=[p(" Browse ")])),_:1},8,["onClick"])):B("",!0)]),a("p",Js,[e(X)?(c(),h(P,{key:0},[p(" Choose a local SQLite database file from the desktop app. ")],64)):b.value?(c(),h(P,{key:1},[p(" Enter a SQLite file path that this app runtime can read. In hosted web deployments, this path is on the server. ")],64)):(c(),h(P,{key:2},[p(" SQLite file connections are disabled in this deployment. ")],64))])])]),_:1}),t(e(H),{value:"managed",class:"space-y-6 pt-2"},{default:o(()=>[a("div",Xs,[t(e(D),null,{default:o(()=>s[35]||(s[35]=[p("SQLite Provider")])),_:1}),a("div",Ws,[t(e(q),{type:"button",variant:e(u).provider===e(R).CLOUDFLARE_D1?"default":"outline",class:"justify-start h-auto py-3",onClick:s[10]||(s[10]=y=>e(u).provider=e(R).CLOUDFLARE_D1)},{default:o(()=>[a("div",Zs,[a("div",ea,[t(e(I),{name:"devicon:cloudflare",class:"h-4 w-4 inline-block"}),s[36]||(s[36]=p(" Cloudflare D1 "))]),s[37]||(s[37]=a("div",{class:"text-xs opacity-80"}," Remote SQLite over the Cloudflare API ",-1))])]),_:1},8,["variant"]),t(e(q),{type:"button",variant:e(u).provider===e(R).TURSO?"default":"outline",class:"justify-start h-auto py-3",onClick:s[11]||(s[11]=y=>e(u).provider=e(R).TURSO)},{default:o(()=>[a("div",ta,[a("div",sa,[t(e(I),{name:"simple-icons:turso",class:"text-[#4ff8d2]"}),s[38]||(s[38]=p(" Turso "))]),s[39]||(s[39]=a("div",{class:"text-xs opacity-80"}," libSQL endpoint with optional branch routing ",-1))])]),_:1},8,["variant"])])]),e(u).provider===e(R).CLOUDFLARE_D1?(c(),h("div",aa,[a("div",oa,[t(e(D),{for:"d1-account-id"},{default:o(()=>s[40]||(s[40]=[p("Account ID "),a("span",{class:"text-destructive"},"*",-1)])),_:1}),t(e(w),{id:"d1-account-id",modelValue:e(u).accountId,"onUpdate:modelValue":s[12]||(s[12]=y=>e(u).accountId=y),placeholder:"Cloudflare account ID"},null,8,["modelValue"])]),a("div",la,[t(e(D),{for:"d1-database-id"},{default:o(()=>s[41]||(s[41]=[p("Database ID "),a("span",{class:"text-destructive"},"*",-1)])),_:1}),t(e(w),{id:"d1-database-id",modelValue:e(u).databaseId,"onUpdate:modelValue":s[13]||(s[13]=y=>e(u).databaseId=y),placeholder:"D1 database ID"},null,8,["modelValue"])]),a("div",na,[t(e(D),{for:"d1-database-name"},{default:o(()=>s[42]||(s[42]=[p("Database Name")])),_:1}),t(e(w),{id:"d1-database-name",modelValue:e(u).databaseName,"onUpdate:modelValue":s[14]||(s[14]=y=>e(u).databaseName=y),placeholder:"Optional display name"},null,8,["modelValue"])]),a("div",ra,[t(e(D),{for:"d1-api-token"},{default:o(()=>s[43]||(s[43]=[p("API Token "),a("span",{class:"text-destructive"},"*",-1)])),_:1}),t(e(w),{id:"d1-api-token",type:"password",modelValue:e(u).apiToken,"onUpdate:modelValue":s[15]||(s[15]=y=>e(u).apiToken=y),placeholder:"Cloudflare API token"},null,8,["modelValue"])])])):(c(),h("div",da,[a("div",ia,[t(e(D),{for:"turso-url"},{default:o(()=>s[44]||(s[44]=[p("Database URL "),a("span",{class:"text-destructive"},"*",-1)])),_:1}),t(e(w),{id:"turso-url",modelValue:e(u).url,"onUpdate:modelValue":s[16]||(s[16]=y=>e(u).url=y),placeholder:"libsql://your-db.turso.io",class:"font-mono text-sm"},null,8,["modelValue"])]),a("div",ua,[t(e(D),{for:"turso-auth-token"},{default:o(()=>s[45]||(s[45]=[p("Auth Token "),a("span",{class:"text-destructive"},"*",-1)])),_:1}),t(e(w),{id:"turso-auth-token",type:"password",modelValue:e(u).authToken,"onUpdate:modelValue":s[17]||(s[17]=y=>e(u).authToken=y),placeholder:"Turso auth token"},null,8,["modelValue"])]),a("div",pa,[t(e(D),{for:"turso-branch-name"},{default:o(()=>s[46]||(s[46]=[p("Branch")])),_:1}),t(e(w),{id:"turso-branch-name",modelValue:e(u).branchName,"onUpdate:modelValue":s[18]||(s[18]=y=>e(u).branchName=y),placeholder:"main"},null,8,["modelValue"])])])),s[47]||(s[47]=a("p",{class:"text-xs text-muted-foreground"}," Managed SQLite providers stay on the SQL-family workspace after validation, but use provider-specific transport under the hood. ",-1))]),_:1})]),_:1},8,["modelValue"]),t(bs,{"test-status":e($),"error-message":e(ke)},null,8,["test-status","error-message"])]),t(e(_e),{class:"p-6 pt-4 flex flex-col-reverse gap-2 sm:flex-row sm:justify-between sm:space-x-2"},{default:o(()=>[a("div",ca,[t(e(q),{type:"button",variant:"outline",onClick:e(Ve),size:"sm"},{default:o(()=>[t(e(I),{name:"hugeicons:arrow-left-02"}),s[48]||(s[48]=p(" Back "))]),_:1},8,["onClick"])]),a("div",fa,[t(e(q),{type:"button",variant:"outline",onClick:e(Se),size:"sm",disabled:e($)==="testing"||!e(W)},{default:o(()=>[e($)==="testing"?(c(),S(e(I),{key:0,name:"hugeicons:loading-03",class:"mr-2 size-4 animate-spin"})):B("",!0),s[49]||(s[49]=p(" Test "))]),_:1},8,["onClick","disabled"]),t(e(q),{id:"tour-create-update-connection-btn",type:"submit",size:"sm",disabled:e($)==="testing"||!e(W)},{default:o(()=>[p(U(A.editingConnection?"Update":"Create"),1)]),_:1},8,["disabled"])])]),_:1})],32))]),_:1})]),_:1},8,["open"]))}});export{Da as _};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as p,q as _t,t as xt,s as vt,g as bt,b as wt,a as St,c as lt,B as Lt,d as H,ac as Et,A as At,k as Tt}from"./Dzy2Amcc.js";import{o as Mt}from"./CmKTTxBW.js";import"./DD6NieRw.js";import"./Gi6I4Gst.js";function Nt(t){for(var e=t.length/6|0,i=new Array(e),a=0;a<e;)i[a]="#"+t.slice(a*6,++a*6);return i}const It=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ct(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i<a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i<h||i===void 0&&h>=h)&&(i=h)}return i}function pt(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function nt(t,e){let i=0;if(e===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+e(h,++a,t))&&(i+=h)}return i}function Pt(t){return t.target.depth}function Ct(t){return t.depth}function Ot(t,e){return e-1-t.height}function mt(t,e){return t.sourceLinks.length?t.depth:e-1}function Dt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function X(t){return function(){return t}}function ut(t,e){return Q(t.source,e.source)||t.index-e.index}function ht(t,e){return Q(t.target,e.target)||t.index-e.index}function Q(t,e){return t.y0-e.y0}function it(t){return t.value}function $t(t){return t.index}function zt(t){return t.nodes}function jt(t){return t.links}function ft(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function yt({nodes:t}){for(const e of t){let i=e.y0,a=i;for(const h of e.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of e.targetLinks)h.y1=a+h.width/2,a+=h.width}}function Bt(){let t=0,e=0,i=1,a=1,h=24,d=8,m,_=$t,s=mt,o,l,x=zt,v=jt,y=6;function b(){const n={nodes:x.apply(null,arguments),links:v.apply(null,arguments)};return M(n),T(n),N(n),C(n),S(n),yt(n),n}b.update=function(n){return yt(n),n},b.nodeId=function(n){return arguments.length?(_=typeof n=="function"?n:X(n),b):_},b.nodeAlign=function(n){return arguments.length?(s=typeof n=="function"?n:X(n),b):s},b.nodeSort=function(n){return arguments.length?(o=n,b):o},b.nodeWidth=function(n){return arguments.length?(h=+n,b):h},b.nodePadding=function(n){return arguments.length?(d=m=+n,b):d},b.nodes=function(n){return arguments.length?(x=typeof n=="function"?n:X(n),b):x},b.links=function(n){return arguments.length?(v=typeof n=="function"?n:X(n),b):v},b.linkSort=function(n){return arguments.length?(l=n,b):l},b.size=function(n){return arguments.length?(t=e=0,i=+n[0],a=+n[1],b):[i-t,a-e]},b.extent=function(n){return arguments.length?(t=+n[0][0],i=+n[1][0],e=+n[0][1],a=+n[1][1],b):[[t,e],[i,a]]},b.iterations=function(n){return arguments.length?(y=+n,b):y};function M({nodes:n,links:f}){for(const[c,r]of n.entries())r.index=c,r.sourceLinks=[],r.targetLinks=[];const u=new Map(n.map((c,r)=>[_(c,r,n),c]));for(const[c,r]of f.entries()){r.index=c;let{source:k,target:w}=r;typeof k!="object"&&(k=r.source=ft(u,k)),typeof w!="object"&&(w=r.target=ft(u,w)),k.sourceLinks.push(r),w.targetLinks.push(r)}if(l!=null)for(const{sourceLinks:c,targetLinks:r}of n)c.sort(l),r.sort(l)}function T({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function N({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const k of u){k.depth=r;for(const{target:w}of k.sourceLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function C({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const k of u){k.height=r;for(const{source:w}of k.targetLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function $({nodes:n}){const f=ct(n,r=>r.depth)+1,u=(i-t-h)/(f-1),c=new Array(f);for(const r of n){const k=Math.max(0,Math.min(f-1,Math.floor(s.call(null,r,f))));r.layer=k,r.x0=t+k*u,r.x1=r.x0+h,c[k]?c[k].push(r):c[k]=[r]}if(o)for(const r of c)r.sort(o);return c}function R(n){const f=pt(n,u=>(a-e-(u.length-1)*m)/nt(u,it));for(const u of n){let c=e;for(const r of u){r.y0=c,r.y1=c+r.value*f,c=r.y1+m;for(const k of r.sourceLinks)k.width=k.value*f}c=(a-c+m)/(u.length+1);for(let r=0;r<u.length;++r){const k=u[r];k.y0+=c*(r+1),k.y1+=c*(r+1)}A(u)}}function S(n){const f=$(n);m=Math.min(d,(a-e)/(ct(f,u=>u.length)-1)),R(f);for(let u=0;u<y;++u){const c=Math.pow(.99,u),r=Math.max(1-c,(u+1)/y);B(f,c,r),P(f,c,r)}}function P(n,f,u){for(let c=1,r=n.length;c<r;++c){const k=n[c];for(const w of k){let L=0,F=0;for(const{source:Y,value:et}of w.targetLinks){let q=et*(w.layer-Y.layer);L+=z(Y,w)*q,F+=q}if(!(F>0))continue;let G=(L/F-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&k.sort(Q),O(k,u)}}function B(n,f,u){for(let c=n.length,r=c-2;r>=0;--r){const k=n[r];for(const w of k){let L=0,F=0;for(const{target:Y,value:et}of w.sourceLinks){let q=et*(Y.layer-w.layer);L+=I(w,Y)*q,F+=q}if(!(F>0))continue;let G=(L/F-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&k.sort(Q),O(k,u)}}function O(n,f){const u=n.length>>1,c=n[u];g(n,c.y0-m,u-1,f),D(n,c.y1+m,u+1,f),g(n,a,n.length-1,f),D(n,e,0,f)}function D(n,f,u,c){for(;u<n.length;++u){const r=n[u],k=(f-r.y0)*c;k>1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+m}}function g(n,f,u,c){for(;u>=0;--u){const r=n[u],k=(r.y1-f)*c;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-m}}function E({sourceLinks:n,targetLinks:f}){if(l===void 0){for(const{source:{sourceLinks:u}}of f)u.sort(ht);for(const{target:{targetLinks:u}}of n)u.sort(ut)}}function A(n){if(l===void 0)for(const{sourceLinks:f,targetLinks:u}of n)f.sort(ht),u.sort(ut)}function z(n,f){let u=n.y0-(n.sourceLinks.length-1)*m/2;for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u+=r+m}for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u-=r}return u}function I(n,f){let u=f.y0-(f.targetLinks.length-1)*m/2;for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u+=r+m}for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u-=r}return u}return b}var st=Math.PI,rt=2*st,V=1e-6,Rt=rt-V;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function kt(){return new ot}ot.prototype=kt.prototype={constructor:ot,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,a){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,e,i,a,h,d){this._+="C"+ +t+","+ +e+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+d)},arcTo:function(t,e,i,a,h){t=+t,e=+e,i=+i,a=+a,h=+h;var d=this._x1,m=this._y1,_=i-t,s=a-e,o=d-t,l=m-e,x=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(x>V)if(!(Math.abs(l*_-s*o)>V)||!h)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var v=i-d,y=a-m,b=_*_+s*s,M=v*v+y*y,T=Math.sqrt(b),N=Math.sqrt(x),C=h*Math.tan((st-Math.acos((b+x-M)/(2*T*N)))/2),$=C/N,R=C/T;Math.abs($-1)>V&&(this._+="L"+(t+$*o)+","+(e+$*l)),this._+="A"+h+","+h+",0,0,"+ +(l*v>o*y)+","+(this._x1=t+R*_)+","+(this._y1=e+R*s)}},arc:function(t,e,i,a,h,d){t=+t,e=+e,i=+i,d=!!d;var m=i*Math.cos(a),_=i*Math.sin(a),s=t+m,o=e+_,l=1^d,x=d?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>V||Math.abs(this._y1-o)>V)&&(this._+="L"+s+","+o),i&&(x<0&&(x=x%rt+rt),x>Rt?this._+="A"+i+","+i+",0,1,"+l+","+(t-m)+","+(e-_)+"A"+i+","+i+",0,1,"+l+","+(this._x1=s)+","+(this._y1=o):x>V&&(this._+="A"+i+","+i+",0,"+ +(x>=st)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=e+i*Math.sin(h))))},rect:function(t,e,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Ft(t){return t[0]}function Vt(t){return t[1]}var Wt=Array.prototype.slice;function Ut(t){return t.source}function Gt(t){return t.target}function Yt(t){var e=Ut,i=Gt,a=Ft,h=Vt,d=null;function m(){var _,s=Wt.call(arguments),o=e.apply(this,s),l=i.apply(this,s);if(d||(d=_=kt()),t(d,+a.apply(this,(s[0]=o,s)),+h.apply(this,s),+a.apply(this,(s[0]=l,s)),+h.apply(this,s)),_)return d=null,_+""||null}return m.source=function(_){return arguments.length?(e=_,m):e},m.target=function(_){return arguments.length?(i=_,m):i},m.x=function(_){return arguments.length?(a=typeof _=="function"?_:dt(+_),m):a},m.y=function(_){return arguments.length?(h=typeof _=="function"?_:dt(+_),m):h},m.context=function(_){return arguments.length?(d=_??null,m):d},m}function qt(t,e,i,a,h){t.moveTo(e,i),t.bezierCurveTo(e=(e+a)/2,i,e,h,a,h)}function Ht(){return Yt(qt)}function Xt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Ht().source(Xt).target(Qt)}var at=function(){var t=p(function(_,s,o,l){for(o=o||{},l=_.length;l--;o[_[l]]=s);return o},"o"),e=[1,9],i=[1,10],a=[1,5,10,12],h={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:p(function(s,o,l,x,v,y,b){var M=y.length-1;switch(v){case 7:const T=x.findOrCreateNode(y[M-4].trim().replaceAll('""','"')),N=x.findOrCreateNode(y[M-2].trim().replaceAll('""','"')),C=parseFloat(y[M].trim());x.addLink(T,N,C);break;case 8:case 9:case 11:this.$=y[M];break;case 10:this.$=y[M-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:p(function(s,o){if(o.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=o,l}},"parseError"),parse:p(function(s){var o=this,l=[0],x=[],v=[null],y=[],b=this.table,M="",T=0,N=0,C=2,$=1,R=y.slice.call(arguments,1),S=Object.create(this.lexer),P={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(P.yy[B]=this.yy[B]);S.setInput(s,P.yy),P.yy.lexer=S,P.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var O=S.yylloc;y.push(O);var D=S.options&&S.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function g(L){l.length=l.length-2*L,v.length=v.length-L,y.length=y.length-L}p(g,"popStack");function E(){var L;return L=x.pop()||S.lex()||$,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=o.symbols_[L]||L),L}p(E,"lex");for(var A,z,I,n,f={},u,c,r,k;;){if(z=l[l.length-1],this.defaultActions[z]?I=this.defaultActions[z]:((A===null||typeof A>"u")&&(A=E()),I=b[z]&&b[z][A]),typeof I>"u"||!I.length||!I[0]){var w="";k=[];for(u in b[z])this.terminals_[u]&&u>C&&k.push("'"+this.terminals_[u]+"'");S.showPosition?w="Parse error on line "+(T+1)+`:
|
|
1
|
+
import{_ as p,q as _t,t as xt,s as vt,g as bt,b as wt,a as St,c as lt,B as Lt,d as H,ac as Et,A as At,k as Tt}from"./ndyknmtb.js";import{o as Mt}from"./CmKTTxBW.js";import"./DbehhcO7.js";import"./Gi6I4Gst.js";function Nt(t){for(var e=t.length/6|0,i=new Array(e),a=0;a<e;)i[a]="#"+t.slice(a*6,++a*6);return i}const It=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ct(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i<a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i<h||i===void 0&&h>=h)&&(i=h)}return i}function pt(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function nt(t,e){let i=0;if(e===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+e(h,++a,t))&&(i+=h)}return i}function Pt(t){return t.target.depth}function Ct(t){return t.depth}function Ot(t,e){return e-1-t.height}function mt(t,e){return t.sourceLinks.length?t.depth:e-1}function Dt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function X(t){return function(){return t}}function ut(t,e){return Q(t.source,e.source)||t.index-e.index}function ht(t,e){return Q(t.target,e.target)||t.index-e.index}function Q(t,e){return t.y0-e.y0}function it(t){return t.value}function $t(t){return t.index}function zt(t){return t.nodes}function jt(t){return t.links}function ft(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function yt({nodes:t}){for(const e of t){let i=e.y0,a=i;for(const h of e.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of e.targetLinks)h.y1=a+h.width/2,a+=h.width}}function Bt(){let t=0,e=0,i=1,a=1,h=24,d=8,m,_=$t,s=mt,o,l,x=zt,v=jt,y=6;function b(){const n={nodes:x.apply(null,arguments),links:v.apply(null,arguments)};return M(n),T(n),N(n),C(n),S(n),yt(n),n}b.update=function(n){return yt(n),n},b.nodeId=function(n){return arguments.length?(_=typeof n=="function"?n:X(n),b):_},b.nodeAlign=function(n){return arguments.length?(s=typeof n=="function"?n:X(n),b):s},b.nodeSort=function(n){return arguments.length?(o=n,b):o},b.nodeWidth=function(n){return arguments.length?(h=+n,b):h},b.nodePadding=function(n){return arguments.length?(d=m=+n,b):d},b.nodes=function(n){return arguments.length?(x=typeof n=="function"?n:X(n),b):x},b.links=function(n){return arguments.length?(v=typeof n=="function"?n:X(n),b):v},b.linkSort=function(n){return arguments.length?(l=n,b):l},b.size=function(n){return arguments.length?(t=e=0,i=+n[0],a=+n[1],b):[i-t,a-e]},b.extent=function(n){return arguments.length?(t=+n[0][0],i=+n[1][0],e=+n[0][1],a=+n[1][1],b):[[t,e],[i,a]]},b.iterations=function(n){return arguments.length?(y=+n,b):y};function M({nodes:n,links:f}){for(const[c,r]of n.entries())r.index=c,r.sourceLinks=[],r.targetLinks=[];const u=new Map(n.map((c,r)=>[_(c,r,n),c]));for(const[c,r]of f.entries()){r.index=c;let{source:k,target:w}=r;typeof k!="object"&&(k=r.source=ft(u,k)),typeof w!="object"&&(w=r.target=ft(u,w)),k.sourceLinks.push(r),w.targetLinks.push(r)}if(l!=null)for(const{sourceLinks:c,targetLinks:r}of n)c.sort(l),r.sort(l)}function T({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function N({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const k of u){k.depth=r;for(const{target:w}of k.sourceLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function C({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const k of u){k.height=r;for(const{source:w}of k.targetLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function $({nodes:n}){const f=ct(n,r=>r.depth)+1,u=(i-t-h)/(f-1),c=new Array(f);for(const r of n){const k=Math.max(0,Math.min(f-1,Math.floor(s.call(null,r,f))));r.layer=k,r.x0=t+k*u,r.x1=r.x0+h,c[k]?c[k].push(r):c[k]=[r]}if(o)for(const r of c)r.sort(o);return c}function R(n){const f=pt(n,u=>(a-e-(u.length-1)*m)/nt(u,it));for(const u of n){let c=e;for(const r of u){r.y0=c,r.y1=c+r.value*f,c=r.y1+m;for(const k of r.sourceLinks)k.width=k.value*f}c=(a-c+m)/(u.length+1);for(let r=0;r<u.length;++r){const k=u[r];k.y0+=c*(r+1),k.y1+=c*(r+1)}A(u)}}function S(n){const f=$(n);m=Math.min(d,(a-e)/(ct(f,u=>u.length)-1)),R(f);for(let u=0;u<y;++u){const c=Math.pow(.99,u),r=Math.max(1-c,(u+1)/y);B(f,c,r),P(f,c,r)}}function P(n,f,u){for(let c=1,r=n.length;c<r;++c){const k=n[c];for(const w of k){let L=0,F=0;for(const{source:Y,value:et}of w.targetLinks){let q=et*(w.layer-Y.layer);L+=z(Y,w)*q,F+=q}if(!(F>0))continue;let G=(L/F-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&k.sort(Q),O(k,u)}}function B(n,f,u){for(let c=n.length,r=c-2;r>=0;--r){const k=n[r];for(const w of k){let L=0,F=0;for(const{target:Y,value:et}of w.sourceLinks){let q=et*(Y.layer-w.layer);L+=I(w,Y)*q,F+=q}if(!(F>0))continue;let G=(L/F-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&k.sort(Q),O(k,u)}}function O(n,f){const u=n.length>>1,c=n[u];g(n,c.y0-m,u-1,f),D(n,c.y1+m,u+1,f),g(n,a,n.length-1,f),D(n,e,0,f)}function D(n,f,u,c){for(;u<n.length;++u){const r=n[u],k=(f-r.y0)*c;k>1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+m}}function g(n,f,u,c){for(;u>=0;--u){const r=n[u],k=(r.y1-f)*c;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-m}}function E({sourceLinks:n,targetLinks:f}){if(l===void 0){for(const{source:{sourceLinks:u}}of f)u.sort(ht);for(const{target:{targetLinks:u}}of n)u.sort(ut)}}function A(n){if(l===void 0)for(const{sourceLinks:f,targetLinks:u}of n)f.sort(ht),u.sort(ut)}function z(n,f){let u=n.y0-(n.sourceLinks.length-1)*m/2;for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u+=r+m}for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u-=r}return u}function I(n,f){let u=f.y0-(f.targetLinks.length-1)*m/2;for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u+=r+m}for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u-=r}return u}return b}var st=Math.PI,rt=2*st,V=1e-6,Rt=rt-V;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function kt(){return new ot}ot.prototype=kt.prototype={constructor:ot,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,a){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,e,i,a,h,d){this._+="C"+ +t+","+ +e+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+d)},arcTo:function(t,e,i,a,h){t=+t,e=+e,i=+i,a=+a,h=+h;var d=this._x1,m=this._y1,_=i-t,s=a-e,o=d-t,l=m-e,x=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(x>V)if(!(Math.abs(l*_-s*o)>V)||!h)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var v=i-d,y=a-m,b=_*_+s*s,M=v*v+y*y,T=Math.sqrt(b),N=Math.sqrt(x),C=h*Math.tan((st-Math.acos((b+x-M)/(2*T*N)))/2),$=C/N,R=C/T;Math.abs($-1)>V&&(this._+="L"+(t+$*o)+","+(e+$*l)),this._+="A"+h+","+h+",0,0,"+ +(l*v>o*y)+","+(this._x1=t+R*_)+","+(this._y1=e+R*s)}},arc:function(t,e,i,a,h,d){t=+t,e=+e,i=+i,d=!!d;var m=i*Math.cos(a),_=i*Math.sin(a),s=t+m,o=e+_,l=1^d,x=d?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>V||Math.abs(this._y1-o)>V)&&(this._+="L"+s+","+o),i&&(x<0&&(x=x%rt+rt),x>Rt?this._+="A"+i+","+i+",0,1,"+l+","+(t-m)+","+(e-_)+"A"+i+","+i+",0,1,"+l+","+(this._x1=s)+","+(this._y1=o):x>V&&(this._+="A"+i+","+i+",0,"+ +(x>=st)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=e+i*Math.sin(h))))},rect:function(t,e,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Ft(t){return t[0]}function Vt(t){return t[1]}var Wt=Array.prototype.slice;function Ut(t){return t.source}function Gt(t){return t.target}function Yt(t){var e=Ut,i=Gt,a=Ft,h=Vt,d=null;function m(){var _,s=Wt.call(arguments),o=e.apply(this,s),l=i.apply(this,s);if(d||(d=_=kt()),t(d,+a.apply(this,(s[0]=o,s)),+h.apply(this,s),+a.apply(this,(s[0]=l,s)),+h.apply(this,s)),_)return d=null,_+""||null}return m.source=function(_){return arguments.length?(e=_,m):e},m.target=function(_){return arguments.length?(i=_,m):i},m.x=function(_){return arguments.length?(a=typeof _=="function"?_:dt(+_),m):a},m.y=function(_){return arguments.length?(h=typeof _=="function"?_:dt(+_),m):h},m.context=function(_){return arguments.length?(d=_??null,m):d},m}function qt(t,e,i,a,h){t.moveTo(e,i),t.bezierCurveTo(e=(e+a)/2,i,e,h,a,h)}function Ht(){return Yt(qt)}function Xt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Ht().source(Xt).target(Qt)}var at=function(){var t=p(function(_,s,o,l){for(o=o||{},l=_.length;l--;o[_[l]]=s);return o},"o"),e=[1,9],i=[1,10],a=[1,5,10,12],h={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:p(function(s,o,l,x,v,y,b){var M=y.length-1;switch(v){case 7:const T=x.findOrCreateNode(y[M-4].trim().replaceAll('""','"')),N=x.findOrCreateNode(y[M-2].trim().replaceAll('""','"')),C=parseFloat(y[M].trim());x.addLink(T,N,C);break;case 8:case 9:case 11:this.$=y[M];break;case 10:this.$=y[M-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:p(function(s,o){if(o.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=o,l}},"parseError"),parse:p(function(s){var o=this,l=[0],x=[],v=[null],y=[],b=this.table,M="",T=0,N=0,C=2,$=1,R=y.slice.call(arguments,1),S=Object.create(this.lexer),P={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(P.yy[B]=this.yy[B]);S.setInput(s,P.yy),P.yy.lexer=S,P.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var O=S.yylloc;y.push(O);var D=S.options&&S.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function g(L){l.length=l.length-2*L,v.length=v.length-L,y.length=y.length-L}p(g,"popStack");function E(){var L;return L=x.pop()||S.lex()||$,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=o.symbols_[L]||L),L}p(E,"lex");for(var A,z,I,n,f={},u,c,r,k;;){if(z=l[l.length-1],this.defaultActions[z]?I=this.defaultActions[z]:((A===null||typeof A>"u")&&(A=E()),I=b[z]&&b[z][A]),typeof I>"u"||!I.length||!I[0]){var w="";k=[];for(u in b[z])this.terminals_[u]&&u>C&&k.push("'"+this.terminals_[u]+"'");S.showPosition?w="Parse error on line "+(T+1)+`:
|
|
2
2
|
`+S.showPosition()+`
|
|
3
3
|
Expecting `+k.join(", ")+", got '"+(this.terminals_[A]||A)+"'":w="Parse error on line "+(T+1)+": Unexpected "+(A==$?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(w,{text:S.match,token:this.terminals_[A]||A,line:S.yylineno,loc:O,expected:k})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+A);switch(I[0]){case 1:l.push(A),v.push(S.yytext),y.push(S.yylloc),l.push(I[1]),A=null,N=S.yyleng,M=S.yytext,T=S.yylineno,O=S.yylloc;break;case 2:if(c=this.productions_[I[1]][1],f.$=v[v.length-c],f._$={first_line:y[y.length-(c||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(c||1)].first_column,last_column:y[y.length-1].last_column},D&&(f._$.range=[y[y.length-(c||1)].range[0],y[y.length-1].range[1]]),n=this.performAction.apply(f,[M,N,T,P.yy,I[1],v,y].concat(R)),typeof n<"u")return n;c&&(l=l.slice(0,-1*c*2),v=v.slice(0,-1*c),y=y.slice(0,-1*c)),l.push(this.productions_[I[1]][0]),v.push(f.$),y.push(f._$),r=b[l[l.length-2]][l[l.length-1]],l.push(r);break;case 3:return!0}}return!0},"parse")},d=function(){var _={EOF:1,parseError:p(function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},"parseError"),setInput:p(function(s,o){return this.yy=o||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:p(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:p(function(s){var o=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===x.length?this.yylloc.first_column:0)+x[x.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:p(function(s){this.unput(this.match.slice(s))},"less"),pastInput:p(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as r,c as n,n as o,u as a,p as l,E as c,o as d,aR as u}from"./
|
|
1
|
+
import{d as r,c as n,n as o,u as a,p as l,E as c,o as d,aR as u}from"./DbehhcO7.js";const f=r({__name:"Alert",props:{class:{},variant:{}},setup(t){const s=t;return(e,i)=>(d(),n("div",{class:o(a(l)(a(v)({variant:e.variant}),s.class)),role:"alert"},[c(e.$slots,"default")],2))}}),g=r({__name:"AlertDescription",props:{class:{}},setup(t){const s=t;return(e,i)=>(d(),n("div",{class:o(a(l)("text-sm [&_p]:leading-relaxed",s.class))},[c(e.$slots,"default")],2))}}),v=u("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}});export{f as _,g as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as te}from"./
|
|
1
|
+
import{g as te}from"./BDw-ivE-.js";import{s as ee}from"./BjfaOtB-.js";import{_ as f,l as b,c as F,r as se,u as ie,a as re,b as ae,g as ne,s as oe,q as le,t as ce,ab as he,k as W,A as ue}from"./ndyknmtb.js";var vt=function(){var e=f(function(V,o,h,n){for(h=h||{},n=V.length;n--;h[V[n]]=o);return h},"o"),t=[1,2],s=[1,3],a=[1,4],i=[2,4],l=[1,9],d=[1,11],S=[1,16],p=[1,17],T=[1,18],_=[1,19],m=[1,33],k=[1,20],A=[1,21],$=[1,22],x=[1,23],R=[1,24],u=[1,26],L=[1,27],I=[1,28],N=[1,29],G=[1,30],P=[1,31],B=[1,32],at=[1,35],nt=[1,36],ot=[1,37],lt=[1,38],K=[1,34],y=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ct=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],gt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(o,h,n,g,E,r,Z){var c=r.length-1;switch(E){case 3:return g.setRootDoc(r[c]),r[c];case 4:this.$=[];break;case 5:r[c]!="nl"&&(r[c-1].push(r[c]),this.$=r[c-1]);break;case 6:case 7:this.$=r[c];break;case 8:this.$="nl";break;case 12:this.$=r[c];break;case 13:const tt=r[c-1];tt.description=g.trimColon(r[c]),this.$=tt;break;case 14:this.$={stmt:"relation",state1:r[c-2],state2:r[c]};break;case 15:const Tt=g.trimColon(r[c]);this.$={stmt:"relation",state1:r[c-3],state2:r[c-1],description:Tt};break;case 19:this.$={stmt:"state",id:r[c-3],type:"default",description:"",doc:r[c-1]};break;case 20:var U=r[c],X=r[c-2].trim();if(r[c].match(":")){var ut=r[c].split(":");U=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:U,type:"default",description:X};break;case 21:this.$={stmt:"state",id:r[c-3],type:"default",description:r[c-5],doc:r[c-1]};break;case 22:this.$={stmt:"state",id:r[c],type:"fork"};break;case 23:this.$={stmt:"state",id:r[c],type:"join"};break;case 24:this.$={stmt:"state",id:r[c],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[c-1].trim(),note:{position:r[c-2].trim(),text:r[c].trim()}};break;case 29:this.$=r[c].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=r[c].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[c-3],url:r[c-2],tooltip:r[c-1]};break;case 33:this.$={stmt:"click",id:r[c-3],url:r[c-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[c-1].trim(),classes:r[c].trim()};break;case 36:this.$={stmt:"style",id:r[c-1].trim(),styleClass:r[c].trim()};break;case 37:this.$={stmt:"applyClass",id:r[c-1].trim(),styleClass:r[c].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[c].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:r[c-2].trim(),classes:[r[c].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:r[c-2].trim(),classes:[r[c].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:t,5:s,6:a},{1:[3]},{3:5,4:t,5:s,6:a},{3:6,4:t,5:s,6:a},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:l,5:d,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:p,19:T,22:_,24:m,25:k,26:A,27:$,28:x,29:R,32:25,33:u,35:L,37:I,38:N,41:G,45:P,48:B,51:at,52:nt,53:ot,54:lt,57:K},e(y,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:S,17:p,19:T,22:_,24:m,25:k,26:A,27:$,28:x,29:R,32:25,33:u,35:L,37:I,38:N,41:G,45:P,48:B,51:at,52:nt,53:ot,54:lt,57:K},e(y,[2,7]),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(y,[2,11]),e(y,[2,12],{14:[1,40],15:[1,41]}),e(y,[2,16]),{18:[1,42]},e(y,[2,18],{20:[1,43]}),{23:[1,44]},e(y,[2,22]),e(y,[2,23]),e(y,[2,24]),e(y,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(y,[2,28]),{34:[1,49]},{36:[1,50]},e(y,[2,31]),{13:51,24:m,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(ct,[2,44],{58:[1,56]}),e(ct,[2,45],{58:[1,57]}),e(y,[2,38]),e(y,[2,39]),e(y,[2,40]),e(y,[2,41]),e(y,[2,6]),e(y,[2,13]),{13:58,24:m,57:K},e(y,[2,17]),e(xt,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(y,[2,29]),e(y,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(y,[2,14],{14:[1,71]}),{4:l,5:d,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:p,19:T,21:[1,72],22:_,24:m,25:k,26:A,27:$,28:x,29:R,32:25,33:u,35:L,37:I,38:N,41:G,45:P,48:B,51:at,52:nt,53:ot,54:lt,57:K},e(y,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(y,[2,34]),e(y,[2,35]),e(y,[2,36]),e(y,[2,37]),e(ct,[2,46]),e(ct,[2,47]),e(y,[2,15]),e(y,[2,19]),e(xt,i,{7:78}),e(y,[2,26]),e(y,[2,27]),{5:[1,79]},{5:[1,80]},{4:l,5:d,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:p,19:T,21:[1,81],22:_,24:m,25:k,26:A,27:$,28:x,29:R,32:25,33:u,35:L,37:I,38:N,41:G,45:P,48:B,51:at,52:nt,53:ot,54:lt,57:K},e(y,[2,32]),e(y,[2,33]),e(y,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(o,h){if(h.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=h,n}},"parseError"),parse:f(function(o){var h=this,n=[0],g=[],E=[null],r=[],Z=this.table,c="",U=0,X=0,ut=2,tt=1,Tt=r.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(j.yy[Et]=this.yy[Et]);D.setInput(o,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var _t=D.yylloc;r.push(_t);var Qt=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(O){n.length=n.length-2*O,E.length=E.length-O,r.length=r.length-O}f(Zt,"popStack");function Lt(){var O;return O=g.pop()||D.lex()||tt,typeof O!="number"&&(O instanceof Array&&(g=O,O=g.pop()),O=h.symbols_[O]||O),O}f(Lt,"lex");for(var C,H,w,mt,J={},dt,Y,Ot,ft;;){if(H=n[n.length-1],this.defaultActions[H]?w=this.defaultActions[H]:((C===null||typeof C>"u")&&(C=Lt()),w=Z[H]&&Z[H][C]),typeof w>"u"||!w.length||!w[0]){var bt="";ft=[];for(dt in Z[H])this.terminals_[dt]&&dt>ut&&ft.push("'"+this.terminals_[dt]+"'");D.showPosition?bt="Parse error on line "+(U+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+ft.join(", ")+", got '"+(this.terminals_[C]||C)+"'":bt="Parse error on line "+(U+1)+": Unexpected "+(C==tt?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(bt,{text:D.match,token:this.terminals_[C]||C,line:D.yylineno,loc:_t,expected:ft})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+C);switch(w[0]){case 1:n.push(C),E.push(D.yytext),r.push(D.yylloc),n.push(w[1]),C=null,X=D.yyleng,c=D.yytext,U=D.yylineno,_t=D.yylloc;break;case 2:if(Y=this.productions_[w[1]][1],J.$=E[E.length-Y],J._$={first_line:r[r.length-(Y||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(Y||1)].first_column,last_column:r[r.length-1].last_column},Qt&&(J._$.range=[r[r.length-(Y||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(J,[c,X,U,j.yy,w[1],E,r].concat(Tt)),typeof mt<"u")return mt;Y&&(n=n.slice(0,-1*Y*2),E=E.slice(0,-1*Y),r=r.slice(0,-1*Y)),n.push(this.productions_[w[1]][0]),E.push(J.$),r.push(J._$),Ot=Z[n[n.length-2]][n[n.length-1]],n.push(Ot);break;case 3:return!0}}return!0},"parse")},qt=function(){var V={EOF:1,parseError:f(function(h,n){if(this.yy.parser)this.yy.parser.parseError(h,n);else throw new Error(h)},"parseError"),setInput:f(function(o,h){return this.yy=h||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:f(function(o){var h=o.length,n=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===g.length?this.yylloc.first_column:0)+g[g.length-n.length].length-n[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(o){this.unput(this.match.slice(o))},"less"),pastInput:f(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var fv=Object.defineProperty;var dv=(t,e,n)=>e in t?fv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Fn=(t,e,n)=>dv(t,typeof e!="symbol"?e+"":e,n);import{g2 as hv,ag as ir}from"./DD6NieRw.js";function Ye(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function Pt(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function Un(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function pv(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function cs(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Xm{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var i;const n=this.types[e.container.$type];if(!n)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=(i=n.properties[e.property])==null?void 0:i.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){const n=this.types[e];return n||{name:e,properties:{},superTypes:[]}}isInstance(e,n){return Ye(e)&&this.isSubtype(e.$type,n)}isSubtype(e,n){if(e===n)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[n];if(i!==void 0)return i;{const s=this.types[e],a=s?s.superTypes.some(o=>this.isSubtype(o,n)):!1;return r[n]=a,a}}getAllSubTypes(e){const n=this.allSubtypes[e];if(n)return n;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function Ws(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Jm(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Zm(t){return Ws(t)&&typeof t.fullText=="string"}class We{constructor(e,n){this.startFn=e,this.nextFn=n}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)n++,r=e.next();return n}toArray(){const e=[],n=this.iterator();let r;do r=n.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,n){const r=this.map(i=>[e?e(i):i,n?n(i):i]);return new Map(r)}toString(){return this.join()}concat(e){return new We(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),n=>{let r;if(!n.firstDone){do if(r=this.nextFn(n.first),!r.done)return r;while(!r.done);n.firstDone=!0}do if(r=n.iterator.next(),!r.done)return r;while(!r.done);return ht})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=mv(i.value)),s=!0;while(!i.done);return r}indexOf(e,n=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=n&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(!e(r.value))return!1;r=n.next()}return!0}some(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return!0;r=n.next()}return!1}forEach(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;)e(i.value,r),i=n.next(),r++}map(e){return new We(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?ht:{done:!1,value:e(i)}})}filter(e){return new We(this.startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return ht})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,n){const r=this.iterator();let i=n,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,n){return this.recursiveReduce(this.iterator(),e,n)}recursiveReduce(e,n,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,n,r);return s===void 0?i.value:n(s,i.value)}find(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return r.value;r=n.next()}}findIndex(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(e(i.value))return r;i=n.next(),r++}return-1}includes(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(r.value===e)return!0;r=n.next()}return!1}flatMap(e){return new We(()=>({this:this.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(n.this);if(!r){const s=e(i);if(Co(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return ht})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new We(()=>({this:n.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=n.nextFn(r.this);if(!i)if(Co(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return ht})}head(){const n=this.iterator().next();if(!n.done)return n.value}tail(e=1){return new We(()=>{const n=this.startFn();for(let r=0;r<e;r++)if(this.nextFn(n).done)return n;return n},this.nextFn)}limit(e){return new We(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?ht:this.nextFn(n.state)))}distinct(e){return new We(()=>({set:new Set,internalState:this.startFn()}),n=>{let r;do if(r=this.nextFn(n.internalState),!r.done){const i=e?e(r.value):r.value;if(!n.set.has(i))return n.set.add(i),r}while(!r.done);return ht})}exclude(e,n){const r=new Set;for(const i of e){const s=n?n(i):i;r.add(s)}return this.filter(i=>{const s=n?n(i):i;return!r.has(s)})}}function mv(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function Co(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Qm=new We(()=>{},()=>ht),ht=Object.freeze({done:!0,value:void 0});function Re(...t){if(t.length===1){const e=t[0];if(e instanceof We)return e;if(Co(e))return new We(()=>e[Symbol.iterator](),n=>n.next());if(typeof e.length=="number")return new We(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:ht)}return t.length>1?new We(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const n=e.iterator.next();if(!n.done)return n;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const n=t[e.collIndex++];Co(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.iterator||e.array||e.collIndex<t.length);return ht}):Qm}class wf extends We{constructor(e,n,r){super(()=>({iterators:r!=null&&r.includeRoot?[[e][Symbol.iterator]()]:[n(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(n(a.value)[Symbol.iterator]()),a}return ht})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var Pu;(function(t){function e(s){return s.reduce((a,o)=>a+o,0)}t.sum=e;function n(s){return s.reduce((a,o)=>a*o,0)}t.product=n;function r(s){return s.reduce((a,o)=>Math.min(a,o))}t.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}t.max=i})(Pu||(Pu={}));function Iu(t,e={}){for(const[n,r]of Object.entries(t))n.startsWith("$")||(Array.isArray(r)?r.forEach((i,s)=>{Ye(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=s,e.deep&&Iu(i,e))}):Ye(r)&&(r.$container=t,r.$containerProperty=n,e.deep&&Iu(r,e)))}function ic(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function yn(t){const n=fo(t).$document;if(!n)throw new Error("AST node has no document.");return n}function fo(t){for(;t.$container;)t=t.$container;return t}function Pd(t){return Pt(t)?t.ref?[t.ref]:[]:Un(t)?t.items.map(e=>e.ref):[]}function Cf(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e==null?void 0:e.range;return new We(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndex<r.keys.length;){const i=r.keys[r.keyIndex];if(!i.startsWith("$")){const s=t[i];if(Ye(s)){if(r.keyIndex++,Id(s,n))return{done:!1,value:s}}else if(Array.isArray(s)){for(;r.arrayIndex<s.length;){const a=r.arrayIndex++,o=s[a];if(Ye(o)&&Id(o,n))return{done:!1,value:o}}r.arrayIndex=0}}r.keyIndex++}return ht})}function da(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new wf(t,n=>Cf(n,e))}function Tn(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new wf(t,n=>Cf(n,e),{includeRoot:!0})}function Id(t,e){var r;if(!e)return!0;const n=(r=t.$cstNode)==null?void 0:r.range;return n?Fv(n,e):!1}function No(t){return new We(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const n=e.keys[e.keyIndex];if(!n.startsWith("$")){const r=t[n];if(Pt(r)||Un(r))return e.keyIndex++,{done:!1,value:{reference:r,container:t,property:n}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){const i=e.arrayIndex++,s=r[i];if(Pt(s)||Un(r))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return ht})}function gv(t,e){const n=t.getTypeMetaData(e.$type),r=e;for(const i of Object.values(n.properties))i.defaultValue!==void 0&&r[i.name]===void 0&&(r[i.name]=eg(i.defaultValue))}function eg(t){return Array.isArray(t)?[...t.map(eg)]:t}const dt={$type:"AbstractElement",cardinality:"cardinality"};function yv(t){return te.isInstance(t,dt.$type)}const ho={$type:"AbstractParserRule"};function ha(t){return te.isInstance(t,ho.$type)}const Ha={$type:"AbstractRule"},Ct={$type:"AbstractType"},yr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function sc(t){return te.isInstance(t,yr.$type)}const po={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function tg(t){return te.isInstance(t,po.$type)}const kd={$type:"ArrayLiteral",elements:"elements"},Od={$type:"ArrayType",elementType:"elementType"},Tr={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Sr(t){return te.isInstance(t,Tr.$type)}const ku={$type:"BooleanLiteral",true:"true"};function Tv(t){return te.isInstance(t,ku.$type)}const vr={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function vv(t){return te.isInstance(t,vr.$type)}const Vr={$type:"Condition"},mo={$type:"Conjunction",left:"left",right:"right"};function $v(t){return te.isInstance(t,mo.$type)}const $r={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function ac(t){return te.isInstance(t,$r.$type)}const go={$type:"Disjunction",left:"left",right:"right"};function Rv(t){return te.isInstance(t,go.$type)}const Ou={$type:"EndOfFile",cardinality:"cardinality"};function Ev(t){return te.isInstance(t,Ou.$type)}const sr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},Ld={$type:"GrammarImport",path:"path"},ei={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Nf(t){return te.isInstance(t,ei.$type)}const Lu={$type:"InferredType",name:"name"};function ng(t){return te.isInstance(t,Lu.$type)}const un={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function Po(t){return te.isInstance(t,un.$type)}const Xc={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},xd={$type:"InfixRuleOperators",precedences:"precedences"},ks={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function Av(t){return te.isInstance(t,ks.$type)}const Os={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function br(t){return te.isInstance(t,Os.$type)}const Va={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},ti={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function _v(t){return te.isInstance(t,ti.$type)}const xu={$type:"Negation",value:"value"};function Sv(t){return te.isInstance(t,xu.$type)}const Md={$type:"NumberLiteral",value:"value"},Ya={$type:"Parameter",name:"name"},Mu={$type:"ParameterReference",parameter:"parameter"};function bv(t){return te.isInstance(t,Mu.$type)}const Gt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Sn(t){return te.isInstance(t,Gt.$type)}const Jc={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},ni={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function wv(t){return te.isInstance(t,ni.$type)}const Du={$type:"ReturnType",name:"name"};function Cv(t){return te.isInstance(t,Du.$type)}const ri={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function wr(t){return te.isInstance(t,ri.$type)}const Ls={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function Nv(t){return te.isInstance(t,Ls.$type)}const Dd={$type:"StringLiteral",value:"value"},ii={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Pv(t){return te.isInstance(t,ii.$type)}const Tt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},si={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Iv(t){return te.isInstance(t,si.$type)}const Gn={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function bn(t){return te.isInstance(t,Gn.$type)}const ai={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function kv(t){return te.isInstance(t,ai.$type)}const yo={$type:"Type",name:"name",type:"type"};function Ov(t){return te.isInstance(t,yo.$type)}const us={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},ls={$type:"TypeDefinition"},Fd={$type:"UnionType",types:"types"},To={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function rg(t){return te.isInstance(t,To.$type)}const oi={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Lv(t){return te.isInstance(t,oi.$type)}const fs={$type:"ValueLiteral"},xs={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function xv(t){return te.isInstance(t,xs.$type)}class ig extends Xm{constructor(){super(...arguments),this.types={AbstractElement:{name:dt.$type,properties:{cardinality:{name:dt.cardinality}},superTypes:[]},AbstractParserRule:{name:ho.$type,properties:{},superTypes:[Ha.$type,Ct.$type]},AbstractRule:{name:Ha.$type,properties:{},superTypes:[]},AbstractType:{name:Ct.$type,properties:{},superTypes:[]},Action:{name:yr.$type,properties:{cardinality:{name:yr.cardinality},feature:{name:yr.feature},inferredType:{name:yr.inferredType},operator:{name:yr.operator},type:{name:yr.type,referenceType:Ct.$type}},superTypes:[dt.$type]},Alternatives:{name:po.$type,properties:{cardinality:{name:po.cardinality},elements:{name:po.elements,defaultValue:[]}},superTypes:[dt.$type]},ArrayLiteral:{name:kd.$type,properties:{elements:{name:kd.elements,defaultValue:[]}},superTypes:[fs.$type]},ArrayType:{name:Od.$type,properties:{elementType:{name:Od.elementType}},superTypes:[ls.$type]},Assignment:{name:Tr.$type,properties:{cardinality:{name:Tr.cardinality},feature:{name:Tr.feature},operator:{name:Tr.operator},predicate:{name:Tr.predicate},terminal:{name:Tr.terminal}},superTypes:[dt.$type]},BooleanLiteral:{name:ku.$type,properties:{true:{name:ku.true,defaultValue:!1}},superTypes:[Vr.$type,fs.$type]},CharacterRange:{name:vr.$type,properties:{cardinality:{name:vr.cardinality},left:{name:vr.left},lookahead:{name:vr.lookahead},parenthesized:{name:vr.parenthesized,defaultValue:!1},right:{name:vr.right}},superTypes:[Tt.$type]},Condition:{name:Vr.$type,properties:{},superTypes:[]},Conjunction:{name:mo.$type,properties:{left:{name:mo.left},right:{name:mo.right}},superTypes:[Vr.$type]},CrossReference:{name:$r.$type,properties:{cardinality:{name:$r.cardinality},deprecatedSyntax:{name:$r.deprecatedSyntax,defaultValue:!1},isMulti:{name:$r.isMulti,defaultValue:!1},terminal:{name:$r.terminal},type:{name:$r.type,referenceType:Ct.$type}},superTypes:[dt.$type]},Disjunction:{name:go.$type,properties:{left:{name:go.left},right:{name:go.right}},superTypes:[Vr.$type]},EndOfFile:{name:Ou.$type,properties:{cardinality:{name:Ou.cardinality}},superTypes:[dt.$type]},Grammar:{name:sr.$type,properties:{imports:{name:sr.imports,defaultValue:[]},interfaces:{name:sr.interfaces,defaultValue:[]},isDeclared:{name:sr.isDeclared,defaultValue:!1},name:{name:sr.name},rules:{name:sr.rules,defaultValue:[]},types:{name:sr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Ld.$type,properties:{path:{name:Ld.path}},superTypes:[]},Group:{name:ei.$type,properties:{cardinality:{name:ei.cardinality},elements:{name:ei.elements,defaultValue:[]},guardCondition:{name:ei.guardCondition},predicate:{name:ei.predicate}},superTypes:[dt.$type]},InferredType:{name:Lu.$type,properties:{name:{name:Lu.name}},superTypes:[Ct.$type]},InfixRule:{name:un.$type,properties:{call:{name:un.call},dataType:{name:un.dataType},inferredType:{name:un.inferredType},name:{name:un.name},operators:{name:un.operators},parameters:{name:un.parameters,defaultValue:[]},returnType:{name:un.returnType,referenceType:Ct.$type}},superTypes:[ho.$type]},InfixRuleOperatorList:{name:Xc.$type,properties:{associativity:{name:Xc.associativity},operators:{name:Xc.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:xd.$type,properties:{precedences:{name:xd.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:ks.$type,properties:{attributes:{name:ks.attributes,defaultValue:[]},name:{name:ks.name},superTypes:{name:ks.superTypes,defaultValue:[],referenceType:Ct.$type}},superTypes:[Ct.$type]},Keyword:{name:Os.$type,properties:{cardinality:{name:Os.cardinality},predicate:{name:Os.predicate},value:{name:Os.value}},superTypes:[dt.$type]},NamedArgument:{name:Va.$type,properties:{calledByName:{name:Va.calledByName,defaultValue:!1},parameter:{name:Va.parameter,referenceType:Ya.$type},value:{name:Va.value}},superTypes:[]},NegatedToken:{name:ti.$type,properties:{cardinality:{name:ti.cardinality},lookahead:{name:ti.lookahead},parenthesized:{name:ti.parenthesized,defaultValue:!1},terminal:{name:ti.terminal}},superTypes:[Tt.$type]},Negation:{name:xu.$type,properties:{value:{name:xu.value}},superTypes:[Vr.$type]},NumberLiteral:{name:Md.$type,properties:{value:{name:Md.value}},superTypes:[fs.$type]},Parameter:{name:Ya.$type,properties:{name:{name:Ya.name}},superTypes:[]},ParameterReference:{name:Mu.$type,properties:{parameter:{name:Mu.parameter,referenceType:Ya.$type}},superTypes:[Vr.$type]},ParserRule:{name:Gt.$type,properties:{dataType:{name:Gt.dataType},definition:{name:Gt.definition},entry:{name:Gt.entry,defaultValue:!1},fragment:{name:Gt.fragment,defaultValue:!1},inferredType:{name:Gt.inferredType},name:{name:Gt.name},parameters:{name:Gt.parameters,defaultValue:[]},returnType:{name:Gt.returnType,referenceType:Ct.$type}},superTypes:[ho.$type]},ReferenceType:{name:Jc.$type,properties:{isMulti:{name:Jc.isMulti,defaultValue:!1},referenceType:{name:Jc.referenceType}},superTypes:[ls.$type]},RegexToken:{name:ni.$type,properties:{cardinality:{name:ni.cardinality},lookahead:{name:ni.lookahead},parenthesized:{name:ni.parenthesized,defaultValue:!1},regex:{name:ni.regex}},superTypes:[Tt.$type]},ReturnType:{name:Du.$type,properties:{name:{name:Du.name}},superTypes:[]},RuleCall:{name:ri.$type,properties:{arguments:{name:ri.arguments,defaultValue:[]},cardinality:{name:ri.cardinality},predicate:{name:ri.predicate},rule:{name:ri.rule,referenceType:Ha.$type}},superTypes:[dt.$type]},SimpleType:{name:Ls.$type,properties:{primitiveType:{name:Ls.primitiveType},stringType:{name:Ls.stringType},typeRef:{name:Ls.typeRef,referenceType:Ct.$type}},superTypes:[ls.$type]},StringLiteral:{name:Dd.$type,properties:{value:{name:Dd.value}},superTypes:[fs.$type]},TerminalAlternatives:{name:ii.$type,properties:{cardinality:{name:ii.cardinality},elements:{name:ii.elements,defaultValue:[]},lookahead:{name:ii.lookahead},parenthesized:{name:ii.parenthesized,defaultValue:!1}},superTypes:[Tt.$type]},TerminalElement:{name:Tt.$type,properties:{cardinality:{name:Tt.cardinality},lookahead:{name:Tt.lookahead},parenthesized:{name:Tt.parenthesized,defaultValue:!1}},superTypes:[dt.$type]},TerminalGroup:{name:si.$type,properties:{cardinality:{name:si.cardinality},elements:{name:si.elements,defaultValue:[]},lookahead:{name:si.lookahead},parenthesized:{name:si.parenthesized,defaultValue:!1}},superTypes:[Tt.$type]},TerminalRule:{name:Gn.$type,properties:{definition:{name:Gn.definition},fragment:{name:Gn.fragment,defaultValue:!1},hidden:{name:Gn.hidden,defaultValue:!1},name:{name:Gn.name},type:{name:Gn.type}},superTypes:[Ha.$type]},TerminalRuleCall:{name:ai.$type,properties:{cardinality:{name:ai.cardinality},lookahead:{name:ai.lookahead},parenthesized:{name:ai.parenthesized,defaultValue:!1},rule:{name:ai.rule,referenceType:Gn.$type}},superTypes:[Tt.$type]},Type:{name:yo.$type,properties:{name:{name:yo.name},type:{name:yo.type}},superTypes:[Ct.$type]},TypeAttribute:{name:us.$type,properties:{defaultValue:{name:us.defaultValue},isOptional:{name:us.isOptional,defaultValue:!1},name:{name:us.name},type:{name:us.type}},superTypes:[]},TypeDefinition:{name:ls.$type,properties:{},superTypes:[]},UnionType:{name:Fd.$type,properties:{types:{name:Fd.types,defaultValue:[]}},superTypes:[ls.$type]},UnorderedGroup:{name:To.$type,properties:{cardinality:{name:To.cardinality},elements:{name:To.elements,defaultValue:[]}},superTypes:[dt.$type]},UntilToken:{name:oi.$type,properties:{cardinality:{name:oi.cardinality},lookahead:{name:oi.lookahead},parenthesized:{name:oi.parenthesized,defaultValue:!1},terminal:{name:oi.terminal}},superTypes:[Tt.$type]},ValueLiteral:{name:fs.$type,properties:{},superTypes:[]},Wildcard:{name:xs.$type,properties:{cardinality:{name:xs.cardinality},lookahead:{name:xs.lookahead},parenthesized:{name:xs.parenthesized,defaultValue:!1}},superTypes:[Tt.$type]}}}}const te=new ig;function Fu(t){return new wf(t,e=>Ws(e)?e.content:[],{includeRoot:!0})}function Mv(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Gu(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function Io(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var hn;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(hn||(hn={}));function Dv(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return hn.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return hn.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,r=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return n&&r?hn.Inside:n?hn.OverlapBack:r?hn.OverlapFront:hn.Outside}function Fv(t,e){return Dv(t,e)>hn.After}const Gv=/^[\w\p{L}]$/u;function jv(t,e){if(t){const n=Uv(t,!0);if(n&&Gd(n,e))return n;if(Zm(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(Gd(s,e))return s}}}}function Gd(t,e){return Jm(t)&&e.includes(t.tokenType.name)}function Uv(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const i=n.content[r];if(e||!i.hidden)return i}t=n}}class sg extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function pa(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function Zc(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function ds(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function Yr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function zv(){throw Error("Internal Error - Should never get here!")}function jd(t){return t.type==="Character"}const ko=[];for(let t=W("0");t<=W("9");t++)ko.push(t);const Oo=[W("_")].concat(ko);for(let t=W("a");t<=W("z");t++)Oo.push(t);for(let t=W("A");t<=W("Z");t++)Oo.push(t);const Ud=[W(" "),W("\f"),W(`
|
|
1
|
+
var fv=Object.defineProperty;var dv=(t,e,n)=>e in t?fv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Fn=(t,e,n)=>dv(t,typeof e!="symbol"?e+"":e,n);import{g2 as hv,ag as ir}from"./DbehhcO7.js";function Ye(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function Pt(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function Un(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function pv(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function cs(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Xm{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var i;const n=this.types[e.container.$type];if(!n)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=(i=n.properties[e.property])==null?void 0:i.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){const n=this.types[e];return n||{name:e,properties:{},superTypes:[]}}isInstance(e,n){return Ye(e)&&this.isSubtype(e.$type,n)}isSubtype(e,n){if(e===n)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[n];if(i!==void 0)return i;{const s=this.types[e],a=s?s.superTypes.some(o=>this.isSubtype(o,n)):!1;return r[n]=a,a}}getAllSubTypes(e){const n=this.allSubtypes[e];if(n)return n;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function Ws(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Jm(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Zm(t){return Ws(t)&&typeof t.fullText=="string"}class We{constructor(e,n){this.startFn=e,this.nextFn=n}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)n++,r=e.next();return n}toArray(){const e=[],n=this.iterator();let r;do r=n.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,n){const r=this.map(i=>[e?e(i):i,n?n(i):i]);return new Map(r)}toString(){return this.join()}concat(e){return new We(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),n=>{let r;if(!n.firstDone){do if(r=this.nextFn(n.first),!r.done)return r;while(!r.done);n.firstDone=!0}do if(r=n.iterator.next(),!r.done)return r;while(!r.done);return ht})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=mv(i.value)),s=!0;while(!i.done);return r}indexOf(e,n=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=n&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(!e(r.value))return!1;r=n.next()}return!0}some(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return!0;r=n.next()}return!1}forEach(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;)e(i.value,r),i=n.next(),r++}map(e){return new We(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?ht:{done:!1,value:e(i)}})}filter(e){return new We(this.startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return ht})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,n){const r=this.iterator();let i=n,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,n){return this.recursiveReduce(this.iterator(),e,n)}recursiveReduce(e,n,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,n,r);return s===void 0?i.value:n(s,i.value)}find(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return r.value;r=n.next()}}findIndex(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(e(i.value))return r;i=n.next(),r++}return-1}includes(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(r.value===e)return!0;r=n.next()}return!1}flatMap(e){return new We(()=>({this:this.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(n.this);if(!r){const s=e(i);if(Co(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return ht})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new We(()=>({this:n.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=n.nextFn(r.this);if(!i)if(Co(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return ht})}head(){const n=this.iterator().next();if(!n.done)return n.value}tail(e=1){return new We(()=>{const n=this.startFn();for(let r=0;r<e;r++)if(this.nextFn(n).done)return n;return n},this.nextFn)}limit(e){return new We(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?ht:this.nextFn(n.state)))}distinct(e){return new We(()=>({set:new Set,internalState:this.startFn()}),n=>{let r;do if(r=this.nextFn(n.internalState),!r.done){const i=e?e(r.value):r.value;if(!n.set.has(i))return n.set.add(i),r}while(!r.done);return ht})}exclude(e,n){const r=new Set;for(const i of e){const s=n?n(i):i;r.add(s)}return this.filter(i=>{const s=n?n(i):i;return!r.has(s)})}}function mv(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function Co(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Qm=new We(()=>{},()=>ht),ht=Object.freeze({done:!0,value:void 0});function Re(...t){if(t.length===1){const e=t[0];if(e instanceof We)return e;if(Co(e))return new We(()=>e[Symbol.iterator](),n=>n.next());if(typeof e.length=="number")return new We(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:ht)}return t.length>1?new We(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const n=e.iterator.next();if(!n.done)return n;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const n=t[e.collIndex++];Co(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.iterator||e.array||e.collIndex<t.length);return ht}):Qm}class wf extends We{constructor(e,n,r){super(()=>({iterators:r!=null&&r.includeRoot?[[e][Symbol.iterator]()]:[n(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(n(a.value)[Symbol.iterator]()),a}return ht})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var Pu;(function(t){function e(s){return s.reduce((a,o)=>a+o,0)}t.sum=e;function n(s){return s.reduce((a,o)=>a*o,0)}t.product=n;function r(s){return s.reduce((a,o)=>Math.min(a,o))}t.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}t.max=i})(Pu||(Pu={}));function Iu(t,e={}){for(const[n,r]of Object.entries(t))n.startsWith("$")||(Array.isArray(r)?r.forEach((i,s)=>{Ye(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=s,e.deep&&Iu(i,e))}):Ye(r)&&(r.$container=t,r.$containerProperty=n,e.deep&&Iu(r,e)))}function ic(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function yn(t){const n=fo(t).$document;if(!n)throw new Error("AST node has no document.");return n}function fo(t){for(;t.$container;)t=t.$container;return t}function Pd(t){return Pt(t)?t.ref?[t.ref]:[]:Un(t)?t.items.map(e=>e.ref):[]}function Cf(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e==null?void 0:e.range;return new We(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndex<r.keys.length;){const i=r.keys[r.keyIndex];if(!i.startsWith("$")){const s=t[i];if(Ye(s)){if(r.keyIndex++,Id(s,n))return{done:!1,value:s}}else if(Array.isArray(s)){for(;r.arrayIndex<s.length;){const a=r.arrayIndex++,o=s[a];if(Ye(o)&&Id(o,n))return{done:!1,value:o}}r.arrayIndex=0}}r.keyIndex++}return ht})}function da(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new wf(t,n=>Cf(n,e))}function Tn(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new wf(t,n=>Cf(n,e),{includeRoot:!0})}function Id(t,e){var r;if(!e)return!0;const n=(r=t.$cstNode)==null?void 0:r.range;return n?Fv(n,e):!1}function No(t){return new We(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const n=e.keys[e.keyIndex];if(!n.startsWith("$")){const r=t[n];if(Pt(r)||Un(r))return e.keyIndex++,{done:!1,value:{reference:r,container:t,property:n}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){const i=e.arrayIndex++,s=r[i];if(Pt(s)||Un(r))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return ht})}function gv(t,e){const n=t.getTypeMetaData(e.$type),r=e;for(const i of Object.values(n.properties))i.defaultValue!==void 0&&r[i.name]===void 0&&(r[i.name]=eg(i.defaultValue))}function eg(t){return Array.isArray(t)?[...t.map(eg)]:t}const dt={$type:"AbstractElement",cardinality:"cardinality"};function yv(t){return te.isInstance(t,dt.$type)}const ho={$type:"AbstractParserRule"};function ha(t){return te.isInstance(t,ho.$type)}const Ha={$type:"AbstractRule"},Ct={$type:"AbstractType"},yr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function sc(t){return te.isInstance(t,yr.$type)}const po={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function tg(t){return te.isInstance(t,po.$type)}const kd={$type:"ArrayLiteral",elements:"elements"},Od={$type:"ArrayType",elementType:"elementType"},Tr={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Sr(t){return te.isInstance(t,Tr.$type)}const ku={$type:"BooleanLiteral",true:"true"};function Tv(t){return te.isInstance(t,ku.$type)}const vr={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function vv(t){return te.isInstance(t,vr.$type)}const Vr={$type:"Condition"},mo={$type:"Conjunction",left:"left",right:"right"};function $v(t){return te.isInstance(t,mo.$type)}const $r={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function ac(t){return te.isInstance(t,$r.$type)}const go={$type:"Disjunction",left:"left",right:"right"};function Rv(t){return te.isInstance(t,go.$type)}const Ou={$type:"EndOfFile",cardinality:"cardinality"};function Ev(t){return te.isInstance(t,Ou.$type)}const sr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},Ld={$type:"GrammarImport",path:"path"},ei={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Nf(t){return te.isInstance(t,ei.$type)}const Lu={$type:"InferredType",name:"name"};function ng(t){return te.isInstance(t,Lu.$type)}const un={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function Po(t){return te.isInstance(t,un.$type)}const Xc={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},xd={$type:"InfixRuleOperators",precedences:"precedences"},ks={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function Av(t){return te.isInstance(t,ks.$type)}const Os={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function br(t){return te.isInstance(t,Os.$type)}const Va={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},ti={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function _v(t){return te.isInstance(t,ti.$type)}const xu={$type:"Negation",value:"value"};function Sv(t){return te.isInstance(t,xu.$type)}const Md={$type:"NumberLiteral",value:"value"},Ya={$type:"Parameter",name:"name"},Mu={$type:"ParameterReference",parameter:"parameter"};function bv(t){return te.isInstance(t,Mu.$type)}const Gt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Sn(t){return te.isInstance(t,Gt.$type)}const Jc={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},ni={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function wv(t){return te.isInstance(t,ni.$type)}const Du={$type:"ReturnType",name:"name"};function Cv(t){return te.isInstance(t,Du.$type)}const ri={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function wr(t){return te.isInstance(t,ri.$type)}const Ls={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function Nv(t){return te.isInstance(t,Ls.$type)}const Dd={$type:"StringLiteral",value:"value"},ii={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Pv(t){return te.isInstance(t,ii.$type)}const Tt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},si={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Iv(t){return te.isInstance(t,si.$type)}const Gn={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function bn(t){return te.isInstance(t,Gn.$type)}const ai={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function kv(t){return te.isInstance(t,ai.$type)}const yo={$type:"Type",name:"name",type:"type"};function Ov(t){return te.isInstance(t,yo.$type)}const us={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},ls={$type:"TypeDefinition"},Fd={$type:"UnionType",types:"types"},To={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function rg(t){return te.isInstance(t,To.$type)}const oi={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Lv(t){return te.isInstance(t,oi.$type)}const fs={$type:"ValueLiteral"},xs={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function xv(t){return te.isInstance(t,xs.$type)}class ig extends Xm{constructor(){super(...arguments),this.types={AbstractElement:{name:dt.$type,properties:{cardinality:{name:dt.cardinality}},superTypes:[]},AbstractParserRule:{name:ho.$type,properties:{},superTypes:[Ha.$type,Ct.$type]},AbstractRule:{name:Ha.$type,properties:{},superTypes:[]},AbstractType:{name:Ct.$type,properties:{},superTypes:[]},Action:{name:yr.$type,properties:{cardinality:{name:yr.cardinality},feature:{name:yr.feature},inferredType:{name:yr.inferredType},operator:{name:yr.operator},type:{name:yr.type,referenceType:Ct.$type}},superTypes:[dt.$type]},Alternatives:{name:po.$type,properties:{cardinality:{name:po.cardinality},elements:{name:po.elements,defaultValue:[]}},superTypes:[dt.$type]},ArrayLiteral:{name:kd.$type,properties:{elements:{name:kd.elements,defaultValue:[]}},superTypes:[fs.$type]},ArrayType:{name:Od.$type,properties:{elementType:{name:Od.elementType}},superTypes:[ls.$type]},Assignment:{name:Tr.$type,properties:{cardinality:{name:Tr.cardinality},feature:{name:Tr.feature},operator:{name:Tr.operator},predicate:{name:Tr.predicate},terminal:{name:Tr.terminal}},superTypes:[dt.$type]},BooleanLiteral:{name:ku.$type,properties:{true:{name:ku.true,defaultValue:!1}},superTypes:[Vr.$type,fs.$type]},CharacterRange:{name:vr.$type,properties:{cardinality:{name:vr.cardinality},left:{name:vr.left},lookahead:{name:vr.lookahead},parenthesized:{name:vr.parenthesized,defaultValue:!1},right:{name:vr.right}},superTypes:[Tt.$type]},Condition:{name:Vr.$type,properties:{},superTypes:[]},Conjunction:{name:mo.$type,properties:{left:{name:mo.left},right:{name:mo.right}},superTypes:[Vr.$type]},CrossReference:{name:$r.$type,properties:{cardinality:{name:$r.cardinality},deprecatedSyntax:{name:$r.deprecatedSyntax,defaultValue:!1},isMulti:{name:$r.isMulti,defaultValue:!1},terminal:{name:$r.terminal},type:{name:$r.type,referenceType:Ct.$type}},superTypes:[dt.$type]},Disjunction:{name:go.$type,properties:{left:{name:go.left},right:{name:go.right}},superTypes:[Vr.$type]},EndOfFile:{name:Ou.$type,properties:{cardinality:{name:Ou.cardinality}},superTypes:[dt.$type]},Grammar:{name:sr.$type,properties:{imports:{name:sr.imports,defaultValue:[]},interfaces:{name:sr.interfaces,defaultValue:[]},isDeclared:{name:sr.isDeclared,defaultValue:!1},name:{name:sr.name},rules:{name:sr.rules,defaultValue:[]},types:{name:sr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Ld.$type,properties:{path:{name:Ld.path}},superTypes:[]},Group:{name:ei.$type,properties:{cardinality:{name:ei.cardinality},elements:{name:ei.elements,defaultValue:[]},guardCondition:{name:ei.guardCondition},predicate:{name:ei.predicate}},superTypes:[dt.$type]},InferredType:{name:Lu.$type,properties:{name:{name:Lu.name}},superTypes:[Ct.$type]},InfixRule:{name:un.$type,properties:{call:{name:un.call},dataType:{name:un.dataType},inferredType:{name:un.inferredType},name:{name:un.name},operators:{name:un.operators},parameters:{name:un.parameters,defaultValue:[]},returnType:{name:un.returnType,referenceType:Ct.$type}},superTypes:[ho.$type]},InfixRuleOperatorList:{name:Xc.$type,properties:{associativity:{name:Xc.associativity},operators:{name:Xc.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:xd.$type,properties:{precedences:{name:xd.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:ks.$type,properties:{attributes:{name:ks.attributes,defaultValue:[]},name:{name:ks.name},superTypes:{name:ks.superTypes,defaultValue:[],referenceType:Ct.$type}},superTypes:[Ct.$type]},Keyword:{name:Os.$type,properties:{cardinality:{name:Os.cardinality},predicate:{name:Os.predicate},value:{name:Os.value}},superTypes:[dt.$type]},NamedArgument:{name:Va.$type,properties:{calledByName:{name:Va.calledByName,defaultValue:!1},parameter:{name:Va.parameter,referenceType:Ya.$type},value:{name:Va.value}},superTypes:[]},NegatedToken:{name:ti.$type,properties:{cardinality:{name:ti.cardinality},lookahead:{name:ti.lookahead},parenthesized:{name:ti.parenthesized,defaultValue:!1},terminal:{name:ti.terminal}},superTypes:[Tt.$type]},Negation:{name:xu.$type,properties:{value:{name:xu.value}},superTypes:[Vr.$type]},NumberLiteral:{name:Md.$type,properties:{value:{name:Md.value}},superTypes:[fs.$type]},Parameter:{name:Ya.$type,properties:{name:{name:Ya.name}},superTypes:[]},ParameterReference:{name:Mu.$type,properties:{parameter:{name:Mu.parameter,referenceType:Ya.$type}},superTypes:[Vr.$type]},ParserRule:{name:Gt.$type,properties:{dataType:{name:Gt.dataType},definition:{name:Gt.definition},entry:{name:Gt.entry,defaultValue:!1},fragment:{name:Gt.fragment,defaultValue:!1},inferredType:{name:Gt.inferredType},name:{name:Gt.name},parameters:{name:Gt.parameters,defaultValue:[]},returnType:{name:Gt.returnType,referenceType:Ct.$type}},superTypes:[ho.$type]},ReferenceType:{name:Jc.$type,properties:{isMulti:{name:Jc.isMulti,defaultValue:!1},referenceType:{name:Jc.referenceType}},superTypes:[ls.$type]},RegexToken:{name:ni.$type,properties:{cardinality:{name:ni.cardinality},lookahead:{name:ni.lookahead},parenthesized:{name:ni.parenthesized,defaultValue:!1},regex:{name:ni.regex}},superTypes:[Tt.$type]},ReturnType:{name:Du.$type,properties:{name:{name:Du.name}},superTypes:[]},RuleCall:{name:ri.$type,properties:{arguments:{name:ri.arguments,defaultValue:[]},cardinality:{name:ri.cardinality},predicate:{name:ri.predicate},rule:{name:ri.rule,referenceType:Ha.$type}},superTypes:[dt.$type]},SimpleType:{name:Ls.$type,properties:{primitiveType:{name:Ls.primitiveType},stringType:{name:Ls.stringType},typeRef:{name:Ls.typeRef,referenceType:Ct.$type}},superTypes:[ls.$type]},StringLiteral:{name:Dd.$type,properties:{value:{name:Dd.value}},superTypes:[fs.$type]},TerminalAlternatives:{name:ii.$type,properties:{cardinality:{name:ii.cardinality},elements:{name:ii.elements,defaultValue:[]},lookahead:{name:ii.lookahead},parenthesized:{name:ii.parenthesized,defaultValue:!1}},superTypes:[Tt.$type]},TerminalElement:{name:Tt.$type,properties:{cardinality:{name:Tt.cardinality},lookahead:{name:Tt.lookahead},parenthesized:{name:Tt.parenthesized,defaultValue:!1}},superTypes:[dt.$type]},TerminalGroup:{name:si.$type,properties:{cardinality:{name:si.cardinality},elements:{name:si.elements,defaultValue:[]},lookahead:{name:si.lookahead},parenthesized:{name:si.parenthesized,defaultValue:!1}},superTypes:[Tt.$type]},TerminalRule:{name:Gn.$type,properties:{definition:{name:Gn.definition},fragment:{name:Gn.fragment,defaultValue:!1},hidden:{name:Gn.hidden,defaultValue:!1},name:{name:Gn.name},type:{name:Gn.type}},superTypes:[Ha.$type]},TerminalRuleCall:{name:ai.$type,properties:{cardinality:{name:ai.cardinality},lookahead:{name:ai.lookahead},parenthesized:{name:ai.parenthesized,defaultValue:!1},rule:{name:ai.rule,referenceType:Gn.$type}},superTypes:[Tt.$type]},Type:{name:yo.$type,properties:{name:{name:yo.name},type:{name:yo.type}},superTypes:[Ct.$type]},TypeAttribute:{name:us.$type,properties:{defaultValue:{name:us.defaultValue},isOptional:{name:us.isOptional,defaultValue:!1},name:{name:us.name},type:{name:us.type}},superTypes:[]},TypeDefinition:{name:ls.$type,properties:{},superTypes:[]},UnionType:{name:Fd.$type,properties:{types:{name:Fd.types,defaultValue:[]}},superTypes:[ls.$type]},UnorderedGroup:{name:To.$type,properties:{cardinality:{name:To.cardinality},elements:{name:To.elements,defaultValue:[]}},superTypes:[dt.$type]},UntilToken:{name:oi.$type,properties:{cardinality:{name:oi.cardinality},lookahead:{name:oi.lookahead},parenthesized:{name:oi.parenthesized,defaultValue:!1},terminal:{name:oi.terminal}},superTypes:[Tt.$type]},ValueLiteral:{name:fs.$type,properties:{},superTypes:[]},Wildcard:{name:xs.$type,properties:{cardinality:{name:xs.cardinality},lookahead:{name:xs.lookahead},parenthesized:{name:xs.parenthesized,defaultValue:!1}},superTypes:[Tt.$type]}}}}const te=new ig;function Fu(t){return new wf(t,e=>Ws(e)?e.content:[],{includeRoot:!0})}function Mv(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Gu(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function Io(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var hn;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(hn||(hn={}));function Dv(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return hn.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return hn.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,r=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return n&&r?hn.Inside:n?hn.OverlapBack:r?hn.OverlapFront:hn.Outside}function Fv(t,e){return Dv(t,e)>hn.After}const Gv=/^[\w\p{L}]$/u;function jv(t,e){if(t){const n=Uv(t,!0);if(n&&Gd(n,e))return n;if(Zm(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(Gd(s,e))return s}}}}function Gd(t,e){return Jm(t)&&e.includes(t.tokenType.name)}function Uv(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const i=n.content[r];if(e||!i.hidden)return i}t=n}}class sg extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function pa(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function Zc(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function ds(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function Yr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function zv(){throw Error("Internal Error - Should never get here!")}function jd(t){return t.type==="Character"}const ko=[];for(let t=W("0");t<=W("9");t++)ko.push(t);const Oo=[W("_")].concat(ko);for(let t=W("a");t<=W("z");t++)Oo.push(t);for(let t=W("A");t<=W("Z");t++)Oo.push(t);const Ud=[W(" "),W("\f"),W(`
|
|
2
2
|
`),W("\r"),W(" "),W("\v"),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W("\u2028"),W("\u2029"),W(" "),W(" "),W(" "),W("\uFEFF")],qv=/[0-9a-fA-F]/,Xa=/[0-9]/,Bv=/[1-9]/;class ag{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const n=this.disjunction();this.consumeChar("/");const r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":ds(r,"global");break;case"i":ds(r,"ignoreCase");break;case"m":ds(r,"multiLine");break;case"u":ds(r,"unicode");break;case"y":ds(r,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:n,loc:this.loc(0)}}disjunction(){const e=[],n=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(n)}}alternative(){const e=[],n=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(n)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let n;switch(this.popChar()){case"=":n="Lookahead";break;case"!":n="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":n="Lookbehind";break;case"!":n="NegativeLookbehind"}break}}Yr(n);const r=this.disjunction();return this.consumeChar(")"),{type:n,value:r,loc:this.loc(e)}}return zv()}quantifier(e=!1){let n;const r=this.idx;switch(this.popChar()){case"*":n={atLeast:0,atMost:1/0};break;case"+":n={atLeast:1,atMost:1/0};break;case"?":n={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":n={atLeast:i,atMost:i};break;case",":let s;this.isDigit()?(s=this.integerIncludingZero(),n={atLeast:i,atMost:s}):n={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&n===void 0)return;Yr(n);break}if(!(e===!0&&n===void 0)&&Yr(n))return this.peekChar(0)==="?"?(this.consumeChar("?"),n.greedy=!1):n.greedy=!0,n.type="Quantifier",n.loc=this.loc(r),n}atom(){let e;const n=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Yr(e))return e.loc=this.loc(n),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[W(`
|
|
3
3
|
`),W("\r"),W("\u2028"),W("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,n=!1;switch(this.popChar()){case"d":e=ko;break;case"D":e=ko,n=!0;break;case"s":e=Ud;break;case"S":e=Ud,n=!0;break;case"w":e=Oo;break;case"W":e=Oo,n=!0;break}if(Yr(e))return{type:"Set",value:e,complement:n}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=W("\f");break;case"n":e=W(`
|
|
4
4
|
`);break;case"r":e=W("\r");break;case"t":e=W(" ");break;case"v":e=W("\v");break}if(Yr(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:W("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:W(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as a,c as s,a as e,C as t}from"./CRCn6mdA.js";import{_ as i}from"./ndyknmtb.js";import"./CbkolJXg.js";import"./Ch9kUYU-.js";import"./BDw-ivE-.js";import"./BjfaOtB-.js";import"./DbehhcO7.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
|