orcaq 1.1.7 → 1.1.8

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.
Files changed (173) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/-7uW7YTy.js +1 -0
  3. package/.output/public/_nuxt/{DzjHXopz.js → 5450EsIE.js} +1 -1
  4. package/.output/public/_nuxt/6mVUr42b.js +1 -0
  5. package/.output/public/_nuxt/7H5y5euK.js +1 -0
  6. package/.output/public/_nuxt/7iCr9_qw.js +26 -0
  7. package/.output/public/_nuxt/{CJnTtXrv.js → B0gkARnK.js} +1 -1
  8. package/.output/public/_nuxt/B21nC2NZ.js +1 -0
  9. package/.output/public/_nuxt/B232GDut.js +2 -0
  10. package/.output/public/_nuxt/{DtgJAz2h.js → B6N_D8QI.js} +1 -1
  11. package/.output/public/_nuxt/B7C8fo37.js +1 -0
  12. package/.output/public/_nuxt/BC82eJHt.js +1 -0
  13. package/.output/public/_nuxt/BHr4_sbs.js +9 -0
  14. package/.output/public/_nuxt/{DSOwr8Hs.js → BJvJ0Hlu.js} +4 -4
  15. package/.output/public/_nuxt/BK-6CJ0A.js +1 -0
  16. package/.output/public/_nuxt/BMVgfiQu.js +1 -0
  17. package/.output/public/_nuxt/BNh4NY7v.js +1 -0
  18. package/.output/public/_nuxt/{DuKway_J.js → BO3FEgXG.js} +1 -1
  19. package/.output/public/_nuxt/BQm1mt0O.js +1 -0
  20. package/.output/public/_nuxt/BRCvv3op.js +1 -0
  21. package/.output/public/_nuxt/{Cym7bWgs.js → BRWis86L.js} +1 -1
  22. package/.output/public/_nuxt/{CG4v011f.js → BRzWRTTF.js} +1 -1
  23. package/.output/public/_nuxt/{BRVpLa1E.js → BWTTrGtY.js} +2 -2
  24. package/.output/public/_nuxt/{CczQKYUP.js → BXMKgn-J.js} +1 -1
  25. package/.output/public/_nuxt/{C7A87LE3.js → BYaoWfSN.js} +1 -1
  26. package/.output/public/_nuxt/{Z5g5B4NJ.js → BalNYDR1.js} +1 -1
  27. package/.output/public/_nuxt/{DQdL5Jcl.js → BmfnP4qD.js} +1 -1
  28. package/.output/public/_nuxt/Bn6_QGSK.js +1 -0
  29. package/.output/public/_nuxt/{RTN5rY4m.js → BsCPQnkm.js} +1 -1
  30. package/.output/public/_nuxt/{39ZZCZCn.js → Bu6ybm3Z.js} +1 -1
  31. package/.output/public/_nuxt/{2TwRWQjG.js → BuTCm7Bo.js} +1 -1
  32. package/.output/public/_nuxt/BuzCyLCh.js +1 -0
  33. package/.output/public/_nuxt/{BCm7jnPt.js → BzNEuLKx.js} +1 -1
  34. package/.output/public/_nuxt/{DyFXtlg0.js → BzNNFvTW.js} +1 -1
  35. package/.output/public/_nuxt/{nrlEwpIH.js → BzqjH2-H.js} +1 -1
  36. package/.output/public/_nuxt/{D0oaRUYx.js → C-e53AuW.js} +1 -1
  37. package/.output/public/_nuxt/C0jXhwNq.js +1 -0
  38. package/.output/public/_nuxt/C6K-C4_d.js +1 -0
  39. package/.output/public/_nuxt/{D7uoAo-G.js → C6teO48Y.js} +5 -5
  40. package/.output/public/_nuxt/{DUvUg_V7.js → C874itvn.js} +1 -1
  41. package/.output/public/_nuxt/C8ZJ2pm_.js +1 -0
  42. package/.output/public/_nuxt/CA3O4M9L.js +1 -0
  43. package/.output/public/_nuxt/{DStg2VwN.js → CAjVwGyz.js} +1 -1
  44. package/.output/public/_nuxt/{B41tp0B8.js → CCC5u9Ni.js} +1 -1
  45. package/.output/public/_nuxt/{3vYvhEat.js → CCCJ2fw7.js} +1 -1
  46. package/.output/public/_nuxt/{vGkKA7iH.js → CFi6G8Aj.js} +2 -2
  47. package/.output/public/_nuxt/CKlMKmo6.js +1 -0
  48. package/.output/public/_nuxt/{BvD9dW-2.js → CMDq7o88.js} +1 -1
  49. package/.output/public/_nuxt/CMI-3q_e.js +1 -0
  50. package/.output/public/_nuxt/{D_fdC3mJ.js → CMnjMfEQ.js} +1 -1
  51. package/.output/public/_nuxt/{DTlu-CJn.js → CQFANjzf.js} +1 -1
  52. package/.output/public/_nuxt/{DEjwIQuc.js → CU5cwnUW.js} +1 -1
  53. package/.output/public/_nuxt/{BO-QgaRL.js → CXQ2zrsE.js} +1 -1
  54. package/.output/public/_nuxt/{BLEKzUmC.js → CXbrqQhC.js} +1 -1
  55. package/.output/public/_nuxt/CZXyfpHW.js +1 -0
  56. package/.output/public/_nuxt/CZgTP5wX.js +1 -0
  57. package/.output/public/_nuxt/{BhT0iBlH.js → Cd_fVKDw.js} +1 -1
  58. package/.output/public/_nuxt/CeXnSKvd.js +1 -0
  59. package/.output/public/_nuxt/Chw5tFzx.js +1 -0
  60. package/.output/public/_nuxt/CkLSGVwV.js +1 -0
  61. package/.output/public/_nuxt/Cqk0ImDE.js +1 -0
  62. package/.output/public/_nuxt/{Ch-A9iSC.js → CuXTA7ZW.js} +1 -1
  63. package/.output/public/_nuxt/Cv9v5fHN.js +1 -0
  64. package/.output/public/_nuxt/{LUfaevBS.js → CvbYm0uB.js} +1 -1
  65. package/.output/public/_nuxt/{BV4g1sVY.js → Cw1HIv3s.js} +1 -1
  66. package/.output/public/_nuxt/{DxF9DsEl.js → CyEOtFwE.js} +1 -1
  67. package/.output/public/_nuxt/{Clm3Z8VL.js → CyKRjZZo.js} +1 -1
  68. package/.output/public/_nuxt/{Cj9tYr3P.js → D4DMGxvZ.js} +1 -1
  69. package/.output/public/_nuxt/{BNnChlxR.js → D5GonnbJ.js} +1 -1
  70. package/.output/public/_nuxt/D5Oboajo.js +1 -0
  71. package/.output/public/_nuxt/D8egDyEO.js +1 -0
  72. package/.output/public/_nuxt/DBSV6YXN.js +1 -0
  73. package/.output/public/_nuxt/{gWmEw6BT.js → DCewvWOu.js} +1 -1
  74. package/.output/public/_nuxt/{BG_B-fo0.js → DG9CsZCx.js} +1 -1
  75. package/.output/public/_nuxt/{BOVFFCPB.js → DH2V7e8U.js} +1 -1
  76. package/.output/public/_nuxt/{DcXAnOS1.js → DHXwq7wT.js} +1 -1
  77. package/.output/public/_nuxt/DJXrgohw.js +2 -0
  78. package/.output/public/_nuxt/{CxZK-Vs6.js → DQRyK9Io.js} +1 -1
  79. package/.output/public/_nuxt/{B-u0WX5Q.js → DXVrM3CN.js} +1 -1
  80. package/.output/public/_nuxt/{XVZ0obUR.js → DZ4xLzJg.js} +1 -1
  81. package/.output/public/_nuxt/DZIoL4RO.js +1 -0
  82. package/.output/public/_nuxt/D_kY6P5P.js +1 -0
  83. package/.output/public/_nuxt/{DzN4YRfa.js → DgxTwFGe.js} +2 -2
  84. package/.output/public/_nuxt/DkX74xDd.js +1 -0
  85. package/.output/public/_nuxt/{DzaPC1WB.js → DmnufEYq.js} +1 -1
  86. package/.output/public/_nuxt/{CCk2r9DD.js → Dopm1f4X.js} +1 -1
  87. package/.output/public/_nuxt/{jJeqAxmP.js → Dpkaavgs.js} +1 -1
  88. package/.output/public/_nuxt/DpsqSAMo.js +20 -0
  89. package/.output/public/_nuxt/{CRDIOG8r.js → DrkGD_bQ.js} +1 -1
  90. package/.output/public/_nuxt/{DLIUYAz9.js → Dtry_3Qa.js} +1 -1
  91. package/.output/public/_nuxt/DwPmcz47.js +1 -0
  92. package/.output/public/_nuxt/DyjsVMbv.js +1 -0
  93. package/.output/public/_nuxt/{CBgbjsPd.js → FmHWbXNk.js} +1 -1
  94. package/.output/public/_nuxt/{CWGzL6OE.js → JxgekUqn.js} +1 -1
  95. package/.output/public/_nuxt/KoGK2wLb.js +1 -0
  96. package/.output/public/_nuxt/LU_a7qLd.js +1 -0
  97. package/.output/public/_nuxt/{1VXrIDkr.js → LxqkguPP.js} +1 -1
  98. package/.output/public/_nuxt/Q8x88Gcd.js +1 -0
  99. package/.output/public/_nuxt/{RFRrMFyH.js → R04uZjs6.js} +1 -1
  100. package/.output/public/_nuxt/So0hX8V0.js +31 -0
  101. package/.output/public/_nuxt/WGDY9i_Q.js +1 -0
  102. package/.output/public/_nuxt/{BZQUF1W4.js → WZQ8mcv9.js} +1 -1
  103. package/.output/public/_nuxt/{CrwM3gOU.js → XjywAggc.js} +1 -1
  104. package/.output/public/_nuxt/{_fileId_.DxhkUVGK.css → _fileId_.CiauI_x3.css} +1 -1
  105. package/.output/public/_nuxt/{z1xPtaLw.js → _uLivI44.js} +1 -1
  106. package/.output/public/_nuxt/builds/latest.json +1 -1
  107. package/.output/public/_nuxt/builds/meta/30582efd-125a-4f88-bd89-20a7b2ba8697.json +1 -0
  108. package/.output/public/_nuxt/{DRuCf0Sx.js → eQskTKIU.js} +1 -1
  109. package/.output/public/_nuxt/ecWNT6PZ.js +1 -0
  110. package/.output/public/_nuxt/entry.BcHy7sxf.css +1 -0
  111. package/.output/public/_nuxt/{BGAd-CMD.js → f6XRRKUb.js} +1 -1
  112. package/.output/public/_nuxt/jtwYTq7X.js +52 -0
  113. package/.output/public/_nuxt/{Bw-4PosZ.js → mcYTISF7.js} +1 -1
  114. package/.output/public/_nuxt/mcfKrWU-.js +1 -0
  115. package/.output/public/_nuxt/{CB56S0b2.js → soHTUlpn.js} +3 -3
  116. package/.output/public/_nuxt/tc7vkD0J.js +3 -0
  117. package/.output/public/_nuxt/vEHvfalB.js +53 -0
  118. package/.output/public/_nuxt/vP25tZUh.js +2 -0
  119. package/.output/public/_nuxt/{CpkrwN3Q.js → zndqWf9s.js} +1 -1
  120. package/.output/server/chunks/_/tables.factory.mjs +1 -1
  121. package/.output/server/chunks/build/client.manifest.mjs +794 -730
  122. package/.output/server/chunks/build/client.manifest.mjs.map +1 -1
  123. package/.output/server/chunks/nitro/nitro.mjs +676 -648
  124. package/.output/server/package.json +1 -1
  125. package/package.json +1 -1
  126. package/.output/public/_nuxt/1fIGBJPQ.js +0 -1
  127. package/.output/public/_nuxt/1kY3DHv7.js +0 -1
  128. package/.output/public/_nuxt/9bnMBg54.js +0 -1
  129. package/.output/public/_nuxt/BFMjnjgH.js +0 -1
  130. package/.output/public/_nuxt/BN2mQ8OV.js +0 -20
  131. package/.output/public/_nuxt/BNyWhB4W.js +0 -1
  132. package/.output/public/_nuxt/BXziI6Bt.js +0 -3
  133. package/.output/public/_nuxt/BZmEvFAZ.js +0 -28
  134. package/.output/public/_nuxt/Ba_fqsW2.js +0 -1
  135. package/.output/public/_nuxt/BbzZxPNQ.js +0 -1
  136. package/.output/public/_nuxt/Bhm1GL_M.js +0 -1
  137. package/.output/public/_nuxt/BiSZmDoN.js +0 -1
  138. package/.output/public/_nuxt/BjK8Fug8.js +0 -1
  139. package/.output/public/_nuxt/BjpSpz5C.js +0 -1
  140. package/.output/public/_nuxt/BkqB6n0T.js +0 -1
  141. package/.output/public/_nuxt/BoPjUGS6.js +0 -1
  142. package/.output/public/_nuxt/BtwwqY0e.js +0 -1
  143. package/.output/public/_nuxt/C0l_59dE.js +0 -1
  144. package/.output/public/_nuxt/C1TOiVRQ.js +0 -9
  145. package/.output/public/_nuxt/C80Zs8U0.js +0 -1
  146. package/.output/public/_nuxt/CFZerEKx.js +0 -2
  147. package/.output/public/_nuxt/CSPqdI4x.js +0 -1
  148. package/.output/public/_nuxt/CTYqoFvv.js +0 -1
  149. package/.output/public/_nuxt/CYJEOEaU.js +0 -1
  150. package/.output/public/_nuxt/CYu-xp_f.js +0 -1
  151. package/.output/public/_nuxt/CZvnl0uO.js +0 -52
  152. package/.output/public/_nuxt/CadjlDLt.js +0 -1
  153. package/.output/public/_nuxt/CeXr_3vU.js +0 -2
  154. package/.output/public/_nuxt/Culm7V2R.js +0 -53
  155. package/.output/public/_nuxt/CzBFxx8v.js +0 -1
  156. package/.output/public/_nuxt/D8KJQqug.js +0 -1
  157. package/.output/public/_nuxt/D8Z5BXgG.js +0 -26
  158. package/.output/public/_nuxt/DDK9-_jm.js +0 -1
  159. package/.output/public/_nuxt/DDQU7vSH.js +0 -1
  160. package/.output/public/_nuxt/DSEkO8kW.js +0 -1
  161. package/.output/public/_nuxt/Da1F0IxL.js +0 -1
  162. package/.output/public/_nuxt/DdtQIDaq.js +0 -1
  163. package/.output/public/_nuxt/Dfz8k_Rn.js +0 -1
  164. package/.output/public/_nuxt/DitYzGT4.js +0 -1
  165. package/.output/public/_nuxt/Djh3G2Nf.js +0 -1
  166. package/.output/public/_nuxt/DmWFeTaU.js +0 -1
  167. package/.output/public/_nuxt/_ltJfz1p.js +0 -1
  168. package/.output/public/_nuxt/builds/meta/1cbed594-12e2-48e6-bea9-7a9159c3c1d3.json +0 -1
  169. package/.output/public/_nuxt/dkyHOJLf.js +0 -1
  170. package/.output/public/_nuxt/entry.D1DMaixs.css +0 -1
  171. package/.output/public/_nuxt/ixgiI20S.js +0 -1
  172. package/.output/public/_nuxt/lisFd8W1.js +0 -2
  173. package/.output/public/_nuxt/uHyBIwWw.js +0 -1
@@ -1 +0,0 @@
1
- import{c as E,ak as Le,bB as ne,d as T,al as Oe,bS as qe,V as Q,a5 as fe,k as S,o as c,w as o,D as O,g as e,a6 as me,bE as Ne,am as Re,a as Me,r as G,e as h,F as P,f as t,a4 as q,s as j,z as p,cG as re,t as U,l as B,m as a,n as L,cH as ze,A as I,cI as He,bG as Fe,p as Y,j as te,Z as Ke,cJ as je,bg as D,bj as ve,bh as w,_ as Qe,h as Ge,bP as Ye,x as Xe,B as N,q as Je,bf as de,aX as Ze,bM as ge,bN as ye,bO as be,bQ as _e,b as We,R as ie,bL as et,bx as tt,i as M,by as st,a8 as at,bz as ot,Q as W,cK as z,ay as R,bc as lt,bR as nt}from"./D7uoAo-G.js";import{b as rt,d as dt,e as it,a as ut,c as H,_ as pt}from"./Da1F0IxL.js";import{i as ct,_ as ue}from"./BoPjUGS6.js";import{i as ft,u as mt,d as vt,a as gt}from"./BG_B-fo0.js";import{C as yt,a as bt,b as _t}from"./CSPqdI4x.js";import{u as xt}from"./B5rxJs06.js";import{_ as F}from"./DRuCf0Sx.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(ct(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[X,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=X(),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;xt(_,k,l.parentElement.value,{arrowKeyOptions:l.orientation,dir:l.direction.value,focus:!0})}return(_,k)=>(c(),S(e(yt),{"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=X(),l=se();return Q(),(g,m)=>(c(),S(e(bt),{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=X(),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=X(),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(_t),{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"],zt={key:0,viewBox:"0 0 12 12",class:"size-3 fill-current"},Ht={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",zt,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",Ht,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(ze),{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(He,{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"},Xt={class:"space-y-2"},Jt={class:"grid grid-cols-2 gap-4"},Zt={class:"space-y-2"},Wt={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",Xt,[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",Jt,[a("div",Zt,[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",Wt,[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(Xe),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(ut),{class:L(e(H)("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(pt),{class:"flex flex-col items-center justify-center p-0 w-full"},{default:o(()=>[a("div",{class:L(e(H)("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(Je(r.icon),{class:L(e(H)("size-12",r.iconClass))},null,8,["class"]))],2),a("div",_s,[a("span",{class:L(e(H)("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 Ze([{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"},zs={class:"space-y-2"},Hs={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"},Xs={class:"text-xs text-muted-foreground"},Js={class:"space-y-3"},Zs={class:"grid grid-cols-2 gap-2"},Ws={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"},ha=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=We(),b=E(()=>ft(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:J,isFormValid:Z,pickSqliteFile:Te,resetForm:Be}=mt({open:()=>d.open,editingConnection:()=>d.editingConnection,workspaceId:()=>d.workspaceId,onAddNew:A=>l("addNew",A),onUpdate:A=>l("update",A),onClose:g}),Pe=E(()=>vt.map(A=>{const s=gt(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=()=>{Z.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(W).STRING?(c(),h("span",$s," Connection String ")):y===e(W).FORM?(c(),h("span",As," Connection Form ")):y===e(W).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(z),{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(z),{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",zs,[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",Hs,[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(z),{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(J)},null,8,["modelValue","readonly"]),e(J)?(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",Xs,[e(J)?(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(z),{value:"managed",class:"space-y-6 pt-2"},{default:o(()=>[a("div",Js,[t(e(D),null,{default:o(()=>s[35]||(s[35]=[p("SQLite Provider")])),_:1}),a("div",Zs,[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",Ws,[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(Z)},{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(Z)},{default:o(()=>[p(U(A.editingConnection?"Update":"Create"),1)]),_:1},8,["disabled"])])]),_:1})],32))]),_:1})]),_:1},8,["open"]))}});export{ha as _};