@tapflowio/relay 0.23.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/dist/RelayServer.d.ts.map +1 -1
  2. package/dist/RelayServer.js +18 -8
  3. package/dist/RelayServer.js.map +1 -1
  4. package/dist/api/auth.d.ts +1 -1
  5. package/dist/api/auth.d.ts.map +1 -1
  6. package/dist/api/auth.js +11 -3
  7. package/dist/api/auth.js.map +1 -1
  8. package/dist/api/builds.d.ts +1 -1
  9. package/dist/api/builds.d.ts.map +1 -1
  10. package/dist/api/builds.js +8 -2
  11. package/dist/api/builds.js.map +1 -1
  12. package/dist/index.d.ts +3 -1
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +2 -1
  15. package/dist/index.js.map +1 -1
  16. package/dist/lib/buildFiles.d.ts +23 -0
  17. package/dist/lib/buildFiles.d.ts.map +1 -0
  18. package/dist/lib/buildFiles.js +39 -0
  19. package/dist/lib/buildFiles.js.map +1 -0
  20. package/dist/lib/config.d.ts +26 -1
  21. package/dist/lib/config.d.ts.map +1 -1
  22. package/dist/lib/config.js +81 -17
  23. package/dist/lib/config.js.map +1 -1
  24. package/dist/lib/dataDir.d.ts +48 -1
  25. package/dist/lib/dataDir.d.ts.map +1 -1
  26. package/dist/lib/dataDir.js +108 -12
  27. package/dist/lib/dataDir.js.map +1 -1
  28. package/dist/middleware/auth.js +3 -3
  29. package/dist/middleware/auth.js.map +1 -1
  30. package/dist/server.js +2 -1
  31. package/dist/server.js.map +1 -1
  32. package/package.json +4 -4
  33. package/public/assets/AppCenter-BHz6vh5p.js +26 -0
  34. package/public/assets/AppCenter-BHz6vh5p.js.br +0 -0
  35. package/public/assets/AppCenter-BHz6vh5p.js.gz +0 -0
  36. package/public/assets/Default-bCqU0Qz9.js +1 -0
  37. package/public/assets/Default-bCqU0Qz9.js.br +0 -0
  38. package/public/assets/Default-bCqU0Qz9.js.gz +0 -0
  39. package/public/assets/Invite-EVMTsuNz.js +1 -0
  40. package/public/assets/Invite-EVMTsuNz.js.br +0 -0
  41. package/public/assets/Invite-EVMTsuNz.js.gz +0 -0
  42. package/public/assets/MacResources-fCn40Tf5.js +1 -0
  43. package/public/assets/MacResources-fCn40Tf5.js.br +0 -0
  44. package/public/assets/MacResources-fCn40Tf5.js.gz +0 -0
  45. package/public/assets/NotFound-wHOnT2Fl.js +1 -0
  46. package/public/assets/NotFound-wHOnT2Fl.js.br +0 -0
  47. package/public/assets/NotFound-wHOnT2Fl.js.gz +0 -0
  48. package/public/assets/QASession-CL-eyFxG.js +150 -0
  49. package/public/assets/QASession-CL-eyFxG.js.br +0 -0
  50. package/public/assets/QASession-CL-eyFxG.js.gz +0 -0
  51. package/public/assets/ResetPassword-D-SFg4ap.js +1 -0
  52. package/public/assets/ResetPassword-D-SFg4ap.js.br +0 -0
  53. package/public/assets/ResetPassword-D-SFg4ap.js.gz +0 -0
  54. package/public/assets/Setup-ULjvIfAi.js +1 -0
  55. package/public/assets/Setup-ULjvIfAi.js.br +0 -0
  56. package/public/assets/Setup-ULjvIfAi.js.gz +0 -0
  57. package/public/assets/Team-DH91GD4w.js +6 -0
  58. package/public/assets/Team-DH91GD4w.js.br +0 -0
  59. package/public/assets/Team-DH91GD4w.js.gz +0 -0
  60. package/public/assets/Tokens-DImLpOVZ.js +1 -0
  61. package/public/assets/Tokens-DImLpOVZ.js.br +0 -0
  62. package/public/assets/Tokens-DImLpOVZ.js.gz +0 -0
  63. package/public/assets/alert-dialog-CwcUyDZQ.js +1 -0
  64. package/public/assets/alert-dialog-CwcUyDZQ.js.br +0 -0
  65. package/public/assets/alert-dialog-CwcUyDZQ.js.gz +0 -0
  66. package/public/assets/badge-B4QAWrzA.js +1 -0
  67. package/public/assets/badge-B4QAWrzA.js.br +0 -0
  68. package/public/assets/badge-B4QAWrzA.js.gz +0 -0
  69. package/public/assets/build-format-CtmRXihN.js +11 -0
  70. package/public/assets/build-format-CtmRXihN.js.br +0 -0
  71. package/public/assets/build-format-CtmRXihN.js.gz +0 -0
  72. package/public/assets/dialog-BAFN_ONP.js +11 -0
  73. package/public/assets/dialog-BAFN_ONP.js.br +0 -0
  74. package/public/assets/dialog-BAFN_ONP.js.gz +0 -0
  75. package/public/assets/index-COOWQXpW.js +218 -0
  76. package/public/assets/index-COOWQXpW.js.br +0 -0
  77. package/public/assets/index-COOWQXpW.js.gz +0 -0
  78. package/public/assets/index-ozCdBYxk.css +1 -0
  79. package/public/assets/index-ozCdBYxk.css.br +0 -0
  80. package/public/assets/index-ozCdBYxk.css.gz +0 -0
  81. package/public/assets/list-view-Rrqp8TkG.js +1 -0
  82. package/public/assets/list-view-Rrqp8TkG.js.br +0 -0
  83. package/public/assets/list-view-Rrqp8TkG.js.gz +0 -0
  84. package/public/assets/{pencil-CPaoEKFm.js → pencil-CAHyK7Qf.js} +2 -2
  85. package/public/assets/pencil-CAHyK7Qf.js.br +0 -0
  86. package/public/assets/pencil-CAHyK7Qf.js.gz +0 -0
  87. package/public/assets/resource-health-BRpSwarg.js +1 -0
  88. package/public/assets/resource-health-BRpSwarg.js.br +0 -0
  89. package/public/assets/resource-health-BRpSwarg.js.gz +0 -0
  90. package/public/assets/{trash-CD9Y9G-i.js → trash-CkO-5TRA.js} +3 -3
  91. package/public/assets/trash-CkO-5TRA.js.br +0 -0
  92. package/public/assets/trash-CkO-5TRA.js.gz +0 -0
  93. package/public/assets/useFocusAfterSwap-BY3N9f9v.js +1 -0
  94. package/public/assets/useFocusAfterSwap-BY3N9f9v.js.br +0 -0
  95. package/public/assets/useFocusAfterSwap-BY3N9f9v.js.gz +0 -0
  96. package/public/assets/{vendor-charts-YPhPkjLw.js → vendor-charts-BykzUV2D.js} +1 -1
  97. package/public/assets/vendor-charts-BykzUV2D.js.br +0 -0
  98. package/public/assets/vendor-charts-BykzUV2D.js.gz +0 -0
  99. package/public/assets/{vendor-react-C5H_1fOn.js → vendor-react-BlPSzrEe.js} +18 -10
  100. package/public/assets/vendor-react-BlPSzrEe.js.br +0 -0
  101. package/public/assets/vendor-react-BlPSzrEe.js.gz +0 -0
  102. package/public/assets/{vendor-router-CnmrRwJF.js → vendor-router-B_lVHrKl.js} +3 -3
  103. package/public/assets/vendor-router-B_lVHrKl.js.br +0 -0
  104. package/public/assets/vendor-router-B_lVHrKl.js.gz +0 -0
  105. package/public/index.html +4 -4
  106. package/public/index.html.br +0 -0
  107. package/public/index.html.gz +0 -0
  108. package/public/assets/AppCenter-OTDuqwSf.js +0 -21
  109. package/public/assets/AppCenter-OTDuqwSf.js.br +0 -0
  110. package/public/assets/AppCenter-OTDuqwSf.js.gz +0 -0
  111. package/public/assets/Default-D9GLpWlN.js +0 -1
  112. package/public/assets/Default-D9GLpWlN.js.br +0 -0
  113. package/public/assets/Default-D9GLpWlN.js.gz +0 -0
  114. package/public/assets/Invite-Bhiam8En.js +0 -1
  115. package/public/assets/Invite-Bhiam8En.js.br +0 -0
  116. package/public/assets/Invite-Bhiam8En.js.gz +0 -0
  117. package/public/assets/MacResources-DObzVJxQ.js +0 -3
  118. package/public/assets/MacResources-DObzVJxQ.js.br +0 -0
  119. package/public/assets/MacResources-DObzVJxQ.js.gz +0 -0
  120. package/public/assets/NotFound-Dz_k_Mzf.js +0 -1
  121. package/public/assets/NotFound-Dz_k_Mzf.js.br +0 -0
  122. package/public/assets/NotFound-Dz_k_Mzf.js.gz +0 -0
  123. package/public/assets/QASession-2crubOLY.js +0 -150
  124. package/public/assets/QASession-2crubOLY.js.br +0 -0
  125. package/public/assets/QASession-2crubOLY.js.gz +0 -0
  126. package/public/assets/ResetPassword-EUm12ojo.js +0 -1
  127. package/public/assets/ResetPassword-EUm12ojo.js.br +0 -0
  128. package/public/assets/ResetPassword-EUm12ojo.js.gz +0 -0
  129. package/public/assets/Setup-Fc_0RW0a.js +0 -1
  130. package/public/assets/Setup-Fc_0RW0a.js.br +0 -0
  131. package/public/assets/Setup-Fc_0RW0a.js.gz +0 -0
  132. package/public/assets/Team-Ac5aOGgx.js +0 -6
  133. package/public/assets/Team-Ac5aOGgx.js.br +0 -0
  134. package/public/assets/Team-Ac5aOGgx.js.gz +0 -0
  135. package/public/assets/Tokens-pEnCy-7l.js +0 -1
  136. package/public/assets/Tokens-pEnCy-7l.js.br +0 -0
  137. package/public/assets/Tokens-pEnCy-7l.js.gz +0 -0
  138. package/public/assets/alert-dialog-DhOTocMh.js +0 -1
  139. package/public/assets/alert-dialog-DhOTocMh.js.br +0 -0
  140. package/public/assets/alert-dialog-DhOTocMh.js.gz +0 -0
  141. package/public/assets/badge-B4gbViMs.js +0 -1
  142. package/public/assets/badge-B4gbViMs.js.br +0 -0
  143. package/public/assets/badge-B4gbViMs.js.gz +0 -0
  144. package/public/assets/build-format-DKGajT96.js +0 -11
  145. package/public/assets/build-format-DKGajT96.js.br +0 -0
  146. package/public/assets/build-format-DKGajT96.js.gz +0 -0
  147. package/public/assets/dialog-DEL1xxKJ.js +0 -11
  148. package/public/assets/dialog-DEL1xxKJ.js.br +0 -0
  149. package/public/assets/dialog-DEL1xxKJ.js.gz +0 -0
  150. package/public/assets/index-Bxs7CdEi.css +0 -1
  151. package/public/assets/index-Bxs7CdEi.css.br +0 -0
  152. package/public/assets/index-Bxs7CdEi.css.gz +0 -0
  153. package/public/assets/index-COIlCLCW.js +0 -218
  154. package/public/assets/index-COIlCLCW.js.br +0 -0
  155. package/public/assets/index-COIlCLCW.js.gz +0 -0
  156. package/public/assets/pencil-CPaoEKFm.js.br +0 -0
  157. package/public/assets/pencil-CPaoEKFm.js.gz +0 -0
  158. package/public/assets/resource-health-Ca4-5Rde.js +0 -1
  159. package/public/assets/resource-health-Ca4-5Rde.js.br +0 -0
  160. package/public/assets/resource-health-Ca4-5Rde.js.gz +0 -0
  161. package/public/assets/table-CSeGVnii.js +0 -1
  162. package/public/assets/table-CSeGVnii.js.br +0 -0
  163. package/public/assets/table-CSeGVnii.js.gz +0 -0
  164. package/public/assets/trash-CD9Y9G-i.js.br +0 -0
  165. package/public/assets/trash-CD9Y9G-i.js.gz +0 -0
  166. package/public/assets/vendor-charts-YPhPkjLw.js.br +0 -0
  167. package/public/assets/vendor-charts-YPhPkjLw.js.gz +0 -0
  168. package/public/assets/vendor-react-C5H_1fOn.js.br +0 -0
  169. package/public/assets/vendor-react-C5H_1fOn.js.gz +0 -0
  170. package/public/assets/vendor-router-CnmrRwJF.js.br +0 -0
  171. package/public/assets/vendor-router-CnmrRwJF.js.gz +0 -0
@@ -0,0 +1,6 @@
1
+ import{k as a,j as e}from"./vendor-react-BlPSzrEe.js";import{a0 as ne,aH as le,aG as re,aD as oe,au as ce,B as o,I as F,L,F as P,h as de,C as me,c as he,d as ue,a as xe,at as j,an as q,as as v,ao as $,J as je,af as ve}from"./index-COOWQXpW.js";import{D as pe,f as ge,a as fe,d as be,e as ye,S as O,i as Q,j as V,g as H,h as t}from"./dialog-BAFN_ONP.js";import{A as Se,c as Ce,f as ke,g as we,d as Te,e as De,b as Ne,a as Ae}from"./alert-dialog-CwcUyDZQ.js";import{l as Ie,T as Re,d as Ee,e as M,c,a as Fe,L as Le,b as d}from"./list-view-Rrqp8TkG.js";import{j as Pe,l as $e}from"./publicLink-D6zKS_wu.js";import{u as Oe}from"./useFocusAfterSwap-BY3N9f9v.js";import"./vendor-router-B_lVHrKl.js";/**
2
+ * @license lucide-react v1.47.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const B={name:"user-plus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};B.node;const Qe=ne(B),Ve=q({email:v().email("Enter a valid email"),role:v().min(1,"Pick a role")}),He=q({token:v(),emailSent:je(),inviteUrl:v().nullable()});function Ge(){var I,R;const _=le(),m=re({queryKey:$.teamMembers,queryFn:ve}),f=m.data??[],b=Ie(m),y=a.useRef(null),z=Oe(b,y),[J,S]=a.useState({}),[h,C]=a.useState(""),[K,k]=a.useState(!1),[U,u]=a.useState(""),w=a.useId(),T=a.useRef(null),[G,W]=a.useState(!1),[p,g]=a.useState(null),{register:X,handleSubmit:Y,control:Z,reset:ee,formState:{errors:l,isSubmitting:D}}=oe({resolver:ce(Ve),defaultValues:{email:"",role:"QA"}}),N=()=>{_.invalidateQueries({queryKey:$.teamMembers})};a.useEffect(()=>{var s;h&&((s=T.current)==null||s.focus())},[h]);async function se(s){u("");try{const i=await fetch("/api/v1/team/invite",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:s.email,role:s.role})});if(!i.ok)throw new Error(`Server error: ${i.status}`);const r=He.parse(await i.json()),x=r.inviteUrl??Pe((await $e()).linkBase,`/invite?token=${r.token}`),n=await(navigator.clipboard?navigator.clipboard.writeText(x):Promise.reject(new Error("no clipboard"))).then(()=>!0,()=>!1);C(x),k(n),u(`${r.emailSent?`Invite email sent to ${s.email}.`:"Email could not be sent."} ${n?"Invite link copied to clipboard.":"Copy the invite link."}`),r.emailSent?j.success(`Invite email sent to ${s.email}`):n?j.warning("Invite link copied — email could not be sent. Check your SMTP settings."):j.warning("Email could not be sent. Copy the invite link from the dialog, and check your SMTP settings.")}catch{j.error("Failed to create invite link"),u("Failed to create invite link.")}}function A(s){W(s),s||(C(""),k(!1),u(""),ee())}async function ae(s,i){await fetch(`/api/v1/team/members/${s}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({role:i})}),N()}async function ie(s){const x=(await(await fetch(`/api/v1/team/members/${s}/send-reset`,{method:"POST",credentials:"include"})).json()).emailSent?"Sent":"No SMTP";S(n=>({...n,[s]:x})),setTimeout(()=>S(n=>{const E={...n};return delete E[s],E}),3e3)}async function te(s){await fetch(`/api/v1/team/members/${s}`,{method:"DELETE",credentials:"include"}),g(null),N()}return e.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[e.jsx(Se,{open:p!==null,onOpenChange:s=>{s||g(null)},children:e.jsxs(Ce,{children:[e.jsxs(ke,{children:[e.jsx(we,{children:"Remove this member?"}),e.jsx(Te,{children:"This member will lose access to the team immediately."})]}),e.jsxs(De,{children:[e.jsx(Ne,{children:"Cancel"}),e.jsx(Ae,{className:"bg-destructive/10 text-destructive hover:bg-destructive/20 border-0",onClick:()=>p!==null&&te(p),children:"Remove"})]})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h1",{className:"text-xl font-semibold",children:"Team"}),e.jsxs(pe,{open:G,onOpenChange:A,children:[e.jsx(ge,{asChild:!0,children:e.jsxs(o,{ref:y,size:"sm",children:[e.jsx(Qe,{className:"mr-2 h-4 w-4"}),"Invite member"]})}),e.jsxs(fe,{className:"sm:max-w-md",children:[e.jsx(be,{children:e.jsx(ye,{children:"Invite team member"})}),e.jsx("p",{role:"status",className:"sr-only",children:U}),h?e.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[e.jsx("p",{id:w,className:"text-sm text-muted-foreground",children:K?"Invite link copied to clipboard:":"Copy this invite link:"}),e.jsx(F,{ref:T,readOnly:!0,value:h,"aria-labelledby":w,onFocus:s=>s.currentTarget.select(),className:"font-mono text-xs"}),e.jsx(o,{onClick:()=>A(!1),children:"Done"})]}):e.jsxs("form",{onSubmit:Y(se),className:"flex flex-col gap-4 pt-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(L,{htmlFor:"invite-email",children:"Email"}),e.jsx(F,{id:"invite-email",type:"email","aria-required":"true","aria-invalid":!!l.email,"aria-describedby":l.email?"email-error":void 0,...X("email")}),e.jsx(P,{id:"email-error",message:(I=l.email)==null?void 0:I.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(L,{htmlFor:"invite-role",children:"Role"}),e.jsx(de,{name:"role",control:Z,render:({field:s})=>e.jsxs(O,{value:s.value,onValueChange:s.onChange,children:[e.jsx(Q,{id:"invite-role","aria-invalid":!!l.role,"aria-describedby":l.role?"role-error":void 0,children:e.jsx(V,{})}),e.jsxs(H,{children:[e.jsx(t,{value:"Admin",children:"Admin"}),e.jsx(t,{value:"Developer",children:"Developer"}),e.jsx(t,{value:"QA",children:"QA"}),e.jsx(t,{value:"Viewer",children:"Viewer"})]})]})}),e.jsx(P,{id:"role-error",message:(R=l.role)==null?void 0:R.message})]}),e.jsx(o,{type:"submit",disabled:D,children:D?"Creating link…":"Generate invite link"})]})]})]})]}),e.jsxs(me,{children:[e.jsx(he,{children:e.jsxs(ue,{children:["Members",m.data?` (${f.length})`:""]})}),e.jsx(xe,{className:"px-4 pt-0 pb-2",children:e.jsxs(Re,{children:[e.jsx(Ee,{children:e.jsxs(M,{children:[e.jsx(c,{children:"Nickname"}),e.jsx(c,{children:"Email"}),e.jsx(c,{children:"Role"}),e.jsx(c,{children:"Joined"}),e.jsx(c,{className:"w-10"})]})}),e.jsxs(Fe,{...z,children:[e.jsx(Le,{view:b,colSpan:5,noun:"team members",emptyText:"No members yet.",onRetry:()=>{m.refetch()}}),f.map(s=>e.jsxs(M,{className:"hover:bg-transparent",children:[e.jsx(d,{className:"font-medium",children:s.display_name||"—"}),e.jsx(d,{className:"text-muted-foreground text-sm",children:s.email}),e.jsx(d,{children:e.jsxs(O,{value:s.role,onValueChange:i=>ae(s.id,i),children:[e.jsx(Q,{className:"h-7 w-28",children:e.jsx(V,{})}),e.jsxs(H,{children:[e.jsx(t,{value:"Admin",children:"Admin"}),e.jsx(t,{value:"Developer",children:"Developer"}),e.jsx(t,{value:"QA",children:"QA"}),e.jsx(t,{value:"Viewer",children:"Viewer"})]})]})}),e.jsx(d,{className:"text-muted-foreground text-sm",children:new Date(s.joined_at).toLocaleDateString()}),e.jsx(d,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(o,{variant:"secondary",size:"nav",onClick:()=>ie(s.id),children:J[s.id]??"Reset pwd"}),e.jsx(o,{variant:"destructive",size:"nav",onClick:()=>g(s.id),children:"Remove"})]})})]},s.id))]})]})})]})]})}export{Ge as TeamSettings};
@@ -0,0 +1 @@
1
+ import{k as a,j as e}from"./vendor-react-BlPSzrEe.js";import{aH as X,aG as Y,aD as Z,au as ee,B as d,I as h,at as t,L as y,F as L,C as se,c as ae,d as te,b as re,a as ne,an as oe,as as P,ao as q,ag as ie}from"./index-COOWQXpW.js";import{B as O}from"./badge-B4QAWrzA.js";import{A as le,c as ce,f as de,g as xe,d as ue,e as me,b as he}from"./alert-dialog-CwcUyDZQ.js";import{D as pe,f as je,a as ge,d as fe,e as ye,S as ke,i as ve,j as be,g as we,h as H}from"./dialog-BAFN_ONP.js";import{l as Ne,T as Te,d as De,e as Q,c as x,a as Ce,L as Se,b as u}from"./list-view-Rrqp8TkG.js";import{l as Ae}from"./publicLink-D6zKS_wu.js";import{u as Fe}from"./useFocusAfterSwap-BY3N9f9v.js";import{P as Re,T as Ie}from"./trash-CkO-5TRA.js";import"./vendor-router-B_lVHrKl.js";const Ee=oe({name:P().min(1,"Give the token a name"),expiresDays:P().refine(p=>{const r=parseInt(p,10);return!isNaN(r)&&r>=1&&r<=365},{message:"Must be between 1 and 365"})});function We(){var E,B;const p=X(),r=Y({queryKey:q.tokens,queryFn:ie}),V=r.data??[],k=Ne(r),v=a.useRef(null),z=Fe(k,v),[K,W]=a.useState(!1),[n,b]=a.useState(""),[c,w]=a.useState("api"),[N,T]=a.useState(""),[j,g]=a.useState(null),D=a.useId(),C=a.useId(),f=a.useRef(null),[_,o]=a.useState(""),{register:S,handleSubmit:$,reset:G,formState:{errors:i,isSubmitting:A}}=Z({resolver:ee(Ee),defaultValues:{name:"",expiresDays:"30"}}),F=()=>{p.invalidateQueries({queryKey:q.tokens})};a.useEffect(()=>{var s;n&&((s=f.current)==null||s.focus())},[n]);async function M(s){o("");try{const m=await fetch("/api/v1/tokens",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.name,expires_in_days:parseInt(s.expiresDays,10),...c==="agent"?{scope:"agent"}:{}})});if(!m.ok){const l=await m.json().catch(()=>null);t.error((l==null?void 0:l.error)??"Failed to create token"),o((l==null?void 0:l.error)??"Failed to create token");return}const U=await m.json();c==="agent"&&T((await Ae()).agentWsBase),t.success("Token created"),b(U.token),F()}catch{t.error("Network error"),o("Network error")}}function R(s){W(s),s||(b(""),w("api"),T(""),o(""),G())}async function J(s){try{return(await fetch(`/api/v1/tokens/${s}`,{method:"DELETE",credentials:"include"})).ok?(t.success("Token revoked"),F(),!0):(t.error("Failed to revoke token"),!1)}catch{return t.error("Network error"),!1}}function I(s){return s.expires_at&&new Date(s.expires_at)<new Date}return e.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h1",{className:"text-xl font-semibold",children:"Personal Access Tokens"}),e.jsxs(pe,{open:K,onOpenChange:R,children:[e.jsx(je,{asChild:!0,children:e.jsxs(d,{ref:v,size:"sm",children:[e.jsx(Re,{className:"mr-2 h-4 w-4"}),"New token"]})}),e.jsxs(ge,{className:"sm:max-w-md",children:[e.jsx(fe,{children:e.jsx(ye,{children:"Create token"})}),e.jsx("p",{role:"status",className:"sr-only",children:_}),n?e.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[e.jsx("p",{id:D,className:"text-sm text-muted-foreground",children:"Copy this token now — it won't be shown again."}),e.jsx(h,{ref:f,readOnly:!0,value:n,"aria-labelledby":D,onFocus:s=>s.currentTarget.select(),className:"font-mono text-xs"}),c==="agent"&&N&&e.jsxs(e.Fragment,{children:[e.jsx("p",{id:C,className:"text-sm text-muted-foreground",children:"Run this on the agent Mac to connect it to this relay:"}),e.jsx(h,{readOnly:!0,value:`tapflow agent start --relay ${N} --token ${n}`,"aria-labelledby":C,onFocus:s=>s.currentTarget.select(),className:"font-mono text-xs"})]}),e.jsx(d,{onClick:()=>{o(""),(navigator.clipboard?navigator.clipboard.writeText(n):Promise.reject(new Error("no clipboard"))).then(()=>{t.success("Token copied to clipboard"),R(!1)}).catch(()=>{var s;t.error("Failed to copy — copy manually"),o("Could not copy the token. Select it and copy it by hand."),(s=f.current)==null||s.focus()})},children:"Copy & close"})]}):e.jsxs("form",{onSubmit:$(M),className:"flex flex-col gap-4 pt-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(y,{htmlFor:"token-name",children:"Name"}),e.jsx(h,{id:"token-name",placeholder:"e.g. ci-deploy","aria-required":"true","aria-invalid":!!i.name,"aria-describedby":i.name?"name-error":void 0,...S("name")}),e.jsx(L,{id:"name-error",message:(E=i.name)==null?void 0:E.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(y,{htmlFor:"expires",children:"Expires in (days)"}),e.jsx(h,{id:"expires",type:"number","aria-required":"true","aria-invalid":!!i.expiresDays,"aria-describedby":i.expiresDays?"expiresDays-error":void 0,...S("expiresDays")}),e.jsx(L,{id:"expiresDays-error",message:(B=i.expiresDays)==null?void 0:B.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(y,{htmlFor:"token-type",children:"Type"}),e.jsxs(ke,{value:c,onValueChange:s=>w(s),children:[e.jsx(ve,{id:"token-type",children:e.jsx(be,{})}),e.jsxs(we,{children:[e.jsx(H,{value:"api",children:"API — CI uploads & API access"}),e.jsx(H,{value:"agent",children:"Agent — connect remote device agents (Admin only)"})]})]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Scope: ",e.jsx(O,{variant:"secondary",children:c==="agent"?"agent":"view, builds:write"})]}),e.jsx(d,{type:"submit",disabled:A,children:A?"Creating…":"Create token"})]})]})]})]}),e.jsxs(se,{children:[e.jsxs(ae,{children:[e.jsx(te,{children:"Active tokens"}),e.jsxs(re,{children:["Use these tokens with ",e.jsx("code",{className:"text-xs",children:"Authorization: Bearer <token>"})," for API deployments."]})]}),e.jsx(ne,{className:"px-4 pt-0 pb-2",children:e.jsxs(Te,{children:[e.jsx(De,{children:e.jsxs(Q,{children:[e.jsx(x,{children:"Name"}),e.jsx(x,{children:"Scope"}),e.jsx(x,{children:"Last used"}),e.jsx(x,{children:"Expires"}),e.jsx(x,{className:"w-10"})]})}),e.jsxs(Ce,{...z,children:[e.jsx(Se,{view:k,colSpan:5,noun:"tokens",emptyText:"No tokens yet.",onRetry:()=>{r.refetch()}}),V.map(s=>e.jsxs(Q,{className:"hover:bg-transparent",children:[e.jsx(u,{className:"font-medium",children:s.name}),e.jsx(u,{children:e.jsx(O,{variant:"secondary",children:s.scope})}),e.jsx(u,{className:"text-muted-foreground text-sm",children:s.last_used_at?new Date(s.last_used_at).toLocaleDateString():"Never"}),e.jsx(u,{children:s.expires_at?e.jsx("span",{className:I(s)?"text-destructive text-sm":"text-muted-foreground text-sm",children:I(s)?"Expired":new Date(s.expires_at).toLocaleDateString()}):e.jsx("span",{className:"text-muted-foreground text-sm",children:"Never"})}),e.jsx(u,{children:e.jsx(d,{variant:"destructive",size:"icon",className:"h-7 w-7","aria-label":"Revoke token",onClick:()=>g(s.id),children:e.jsx(Ie,{className:"h-4 w-4"})})})]},s.id))]})]})})]}),e.jsx(le,{open:j!==null,onOpenChange:s=>{s||g(null)},children:e.jsxs(ce,{children:[e.jsxs(de,{children:[e.jsx(xe,{children:"Revoke token?"}),e.jsx(ue,{children:"Any active API calls using this token will immediately fail."})]}),e.jsxs(me,{children:[e.jsx(he,{children:"Cancel"}),e.jsx(d,{variant:"destructive",onClick:async()=>{if(j===null)return;await J(j)&&g(null)},children:"Revoke"})]})]})})]})}export{We as TokenSettings};
@@ -0,0 +1 @@
1
+ import{k as n,j as i,f as d}from"./vendor-react-BlPSzrEe.js";import{m as O,az as u,j as S,Q as T,n as b,k as E,i as v,$ as x,Z as h,D as z,o as k,l as F,O as f,K as N}from"./index-COOWQXpW.js";var H=Object.defineProperty,c=(s,t)=>H(s,"name",{value:t,configurable:!0}),M="AlertDialog",[I,fe]=h(M,[x]),p=x(),K=c(s=>{const{__scopeAlertDialog:t,...e}=s,a=p(t);return i.jsx(z,{...a,...e,modal:!0})},"AlertDialog"),L=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(k,{...o,...l,ref:e})},"AlertDialogTrigger")),Q=c(s=>{const{__scopeAlertDialog:t,...e}=s,a=p(t);return i.jsx(O,{...a,...e})},"AlertDialogPortal"),V=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(F,{...o,...l,ref:e})},"AlertDialogOverlay")),Z="AlertDialogContent",[q,B]=I(Z),G=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,children:l,...o}=t,r=p(a),g=n.useRef(null),$=u(e,g),m=n.useRef(null);return i.jsx(q,{scope:a,cancelRef:m,children:i.jsx(S,{role:"alertdialog",...r,...o,ref:$,onOpenAutoFocus:T(o.onOpenAutoFocus,D=>{var A;D.preventDefault(),(A=m.current)==null||A.focus({preventScroll:!0})}),onPointerDownOutside:D=>D.preventDefault(),onInteractOutside:D=>D.preventDefault(),children:l})})},"AlertDialogContent")),J=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(b,{...o,...l,ref:e})},"AlertDialogTitle")),U=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(E,{...o,...l,ref:e})},"AlertDialogDescription")),W=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(v,{...o,...l,ref:e})},"AlertDialogAction")),X="AlertDialogCancel",Y=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,{cancelRef:o}=B(X,a),r=p(a),g=u(e,o);return i.jsx(v,{...r,...l,ref:g})},"AlertDialogCancel")),ee=K,te=L,ae=Q,_=V,y=G,j=W,R=Y,C=J,w=U;const De=ee,me=te,le=ae,P=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(_,{className:o,...l,ref:t}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});P.displayName=_.displayName;const oe=n.forwardRef((s,t)=>{const e=d.c(10);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(P,{}),e[3]=o):o=e[3];let r;e[4]!==a?(r=f("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),e[4]=a,e[5]=r):r=e[5];let g;return e[6]!==l||e[7]!==t||e[8]!==r?(g=i.jsxs(le,{children:[o,i.jsx(y,{ref:t,className:r,...l})]}),e[6]=l,e[7]=t,e[8]=r,e[9]=g):g=e[9],g});oe.displayName=y.displayName;const se=s=>{const t=d.c(8);let e,a;t[0]!==s?({className:e,...a}=s,t[0]=s,t[1]=e,t[2]=a):(e=t[1],a=t[2]);let l;t[3]!==e?(l=f("flex flex-col space-y-2 text-center sm:text-left",e),t[3]=e,t[4]=l):l=t[4];let o;return t[5]!==a||t[6]!==l?(o=i.jsx("div",{className:l,...a}),t[5]=a,t[6]=l,t[7]=o):o=t[7],o};se.displayName="AlertDialogHeader";const re=s=>{const t=d.c(8);let e,a;t[0]!==s?({className:e,...a}=s,t[0]=s,t[1]=e,t[2]=a):(e=t[1],a=t[2]);let l;t[3]!==e?(l=f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),t[3]=e,t[4]=l):l=t[4];let o;return t[5]!==a||t[6]!==l?(o=i.jsx("div",{className:l,...a}),t[5]=a,t[6]=l,t[7]=o):o=t[7],o};re.displayName="AlertDialogFooter";const ie=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("text-lg font-semibold",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(C,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});ie.displayName=C.displayName;const ne=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("text-sm text-muted-foreground",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(w,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});ne.displayName=w.displayName;const ce=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f(N(),a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(j,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});ce.displayName=j.displayName;const pe=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f(N({variant:"outline"}),"mt-2 sm:mt-0",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(R,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});pe.displayName=R.displayName;export{De as A,ce as a,pe as b,oe as c,ne as d,re as e,se as f,ie as g,me as h};
@@ -0,0 +1 @@
1
+ import{f as i,j as b}from"./vendor-react-BlPSzrEe.js";import{O as l,a4 as g}from"./index-COOWQXpW.js";const x=g("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"},tone:{backlog:"border-transparent bg-zinc-100 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",progress:"border-transparent bg-blue-50 text-blue-700 dark:bg-blue-950 dark:text-blue-300",done:"border-transparent bg-green-50 text-green-700 dark:bg-green-950 dark:text-green-300",rejected:"border-transparent bg-red-50 text-red-700 dark:bg-red-950 dark:text-red-300",ios:"border-transparent bg-sky-50 text-sky-700 dark:bg-sky-950 dark:text-sky-300",android:"border-transparent bg-emerald-50 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-300"}},defaultVariants:{variant:"default"}});function u(o){const e=i.c(12);let r,t,a,n;e[0]!==o?({className:r,variant:n,tone:a,...t}=o,e[0]=o,e[1]=r,e[2]=t,e[3]=a,e[4]=n):(r=e[1],t=e[2],a=e[3],n=e[4]);let d;e[5]!==r||e[6]!==a||e[7]!==n?(d=l(x({variant:n,tone:a}),r),e[5]=r,e[6]=a,e[7]=n,e[8]=d):d=e[8];let s;return e[9]!==t||e[10]!==d?(s=b.jsx("div",{className:d,...t}),e[9]=t,e[10]=d,e[11]=s):s=e[11],s}export{u as B};
@@ -0,0 +1,11 @@
1
+ import{a0 as m,I as g}from"./index-COOWQXpW.js";import{f as y,j as f}from"./vendor-react-BlPSzrEe.js";/**
2
+ * @license lucide-react v1.47.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const b={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};b.node;const w=m(b);/**
7
+ * @license lucide-react v1.47.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const h={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};h.node;const v=m(h);function x(n){const e=y.c(11),{value:t,onChange:r,placeholder:i,className:_,"aria-label":l,"aria-describedby":c,ref:u}=n;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=f.jsx(v,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),e[0]=o):o=e[0];let a;e[1]!==r?(a=$=>r($.target.value),e[1]=r,e[2]=a):a=e[2];const d=`h-8 pl-8 ${_??"w-48"}`;let s;return e[3]!==l||e[4]!==c||e[5]!==i||e[6]!==u||e[7]!==a||e[8]!==d||e[9]!==t?(s=f.jsxs("div",{className:"relative",children:[o,f.jsx(g,{ref:u,"aria-label":l,"aria-describedby":c,placeholder:i,value:t,onChange:a,className:d})]}),e[3]=l,e[4]=c,e[5]=i,e[6]=u,e[7]=a,e[8]=d,e[9]=t,e[10]=s):s=e[10],s}const k={Backlog:"backlog","In Progress":"progress",Done:"done",Rejected:"rejected"};function M(n){return n.version_name&&n.build_number?`${n.version_name} · build ${n.build_number}`:n.version_name??n.version_label??(n.build_number?`build ${n.build_number}`:"Build")}function N(n){return`${n.platform} build ${n.build_number??"without a number"}, ${n.version_name??"Unversioned"}`}function p(n){const e=/[zZ]|[+-]\d{2}:?\d{2}$/.test(n);return new Date(e?n:n.replace(" ","T")+"Z").getTime()-Date.now()}function S(n){const e=p(n);if(e<=0)return{label:"Deleting…",urgent:!0};const t=Math.floor(e/36e5);return t<1?{label:"Deletes in < 1h",urgent:!0}:t<24?{label:`Deletes in ${t}h`,urgent:t<6}:{label:`Deletes in ${Math.floor(t/24)}d`,urgent:!1}}function T(n){const e=p(n);if(e<=0)return"now";if(e<36e5)return"within an hour";const t=Math.round(e/36e5);if(t<24)return`in ${t} hour${t===1?"":"s"}`;const r=Math.round(e/864e5);return`in ${r} day${r===1?"":"s"}`}export{w as P,k as S,v as a,x as b,M as c,N as d,T as e,S as f};
@@ -0,0 +1,11 @@
1
+ import{k as d,j as u,r as De,f as k}from"./vendor-react-BlPSzrEe.js";import{a0 as Me,az as U,A as lt,u as L,Q as E,P as at,aF as Z,t as ct,ay as Ce,aE as Oe,a1 as ke,Y as it,aj as dt,aC as ut,R as pt,q as ft,p as mt,Z as ht,a3 as gt,g as St,V as xt,aB as vt,aA as _e,w as wt,O as M,e as yt,D as Ct,o as bt,m as It,j as Ae,n as Le,l as Be,i as Tt,X as Pt,k as Ve}from"./index-COOWQXpW.js";/**
2
+ * @license lucide-react v1.47.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const He={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};He.node;const Fe=Me(He);/**
7
+ * @license lucide-react v1.47.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const $e={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};$e.node;const _t=Me($e);var Nt=Object.defineProperty,Rt=(l,o)=>Nt(l,"name",{value:o,configurable:!0});function we(l,[o,e]){return Math.min(e,Math.max(o,l))}Rt(we,"clamp");var jt=Object.defineProperty,Et=(l,o)=>jt(l,"name",{value:o,configurable:!0});function Ue(l){const o=d.useRef({value:l,previous:l});return d.useMemo(()=>(o.current.value!==l&&(o.current.previous=o.current.value,o.current.value=l),o.current.previous),[l])}Et(Ue,"usePrevious");var Dt=Object.defineProperty,x=(l,o)=>Dt(l,"name",{value:o,configurable:!0}),Mt=[" ","Enter","ArrowUp","ArrowDown"],Ot=[" ","Enter"],de="Select",[he,ge,kt]=it(de),[re,bo]=ht(de,[kt,ke]),be=ke(),[At,Q]=re(de),[Lt,Bt]=re(de);function We(l){const{__scopeSelect:o,children:e,open:t,defaultOpen:s,onOpenChange:n,value:r,defaultValue:a,onValueChange:c,dir:i,name:m,autoComplete:v,disabled:w,required:y,form:C,internal_do_not_use_render:I}=l,p=be(o),[g,T]=d.useState(null),[h,f]=d.useState(null),[R,j]=d.useState(!1),J=vt(i),[A,V]=_e({prop:t,defaultProp:s??!1,onChange:n,caller:de}),[ee,G]=_e({prop:r,defaultProp:a,onChange:c,caller:de}),W=d.useRef(null),K=d.useRef(ee);d.useEffect(()=>{const D=C?g==null?void 0:g.ownerDocument.getElementById(C):g==null?void 0:g.form;if(D instanceof HTMLFormElement){const $=x(()=>G(K.current),"reset");return D.addEventListener("reset",$),()=>D.removeEventListener("reset",$)}},[C,g,G]);const te=g?!!C||!!g.closest("form"):!0,[z,H]=d.useState(new Set),Y=Oe(),q=Array.from(z).map(D=>D.props.value).join(";"),X=d.useCallback(D=>{H($=>new Set($).add(D))},[]),F=d.useCallback(D=>{H($=>{const ce=new Set($);return ce.delete(D),ce})},[]),ae={required:y,trigger:g,onTriggerChange:T,valueNode:h,onValueNodeChange:f,valueNodeHasChildren:R,onValueNodeHasChildrenChange:j,contentId:Y,value:ee,onValueChange:G,open:A,onOpenChange:V,dir:J,triggerPointerDownPosRef:W,disabled:w,name:m,autoComplete:v,form:C,nativeOptions:z,nativeSelectKey:q,isFormControl:te};return u.jsx(wt,{...p,children:u.jsx(At,{scope:o,...ae,children:u.jsx(he.Provider,{scope:o,children:u.jsx(Lt,{scope:o,onNativeOptionAdd:X,onNativeOptionRemove:F,children:tt(I)?I(ae):e})})})})}x(We,"SelectProvider");var Vt=x(l=>{const{__scopeSelect:o,children:e,...t}=l;return u.jsx(We,{__scopeSelect:o,...t,internal_do_not_use_render:({isFormControl:s})=>u.jsxs(u.Fragment,{children:[e,s?u.jsx(co,{__scopeSelect:o}):null]})})},"Select"),Ht="SelectTrigger",Ke=d.forwardRef(x(function(o,e){const{__scopeSelect:t,disabled:s=!1,...n}=o,r=be(t),a=Q(Ht,t),c=a.disabled||s,i=U(e,a.onTriggerChange),m=ge(t),v=d.useRef("touch"),[w,y,C]=Te(p=>{const g=m().filter(f=>!f.disabled),T=g.find(f=>f.value===a.value),h=Pe(g,p,T);h!==void 0&&a.onValueChange(h.value)}),I=x(p=>{c||(a.onOpenChange(!0),C()),p&&(a.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})},"handleOpen");return u.jsx(lt,{asChild:!0,...r,children:u.jsx(L.button,{type:"button",role:"combobox","aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":pe(a.value)?"":void 0,...n,ref:i,onClick:E(n.onClick,p=>{p.currentTarget.focus(),v.current!=="mouse"&&I(p)}),onPointerDown:E(n.onPointerDown,p=>{v.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(I(p),p.preventDefault())}),onKeyDown:E(n.onKeyDown,p=>{const g=w.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&y(p.key),!(g&&p.key===" ")&&Mt.includes(p.key)&&(I(),p.preventDefault())})})})},"SelectTrigger")),Ft="SelectValue",$t=d.forwardRef(x(function(o,e){const{__scopeSelect:t,className:s,style:n,children:r,placeholder:a="",...c}=o,i=Q(Ft,t),{onValueNodeHasChildrenChange:m}=i,v=r!==void 0,w=U(e,i.onValueNodeChange);Z(()=>{m(v)},[m,v]);const y=pe(i.value);return u.jsx(L.span,{...c,asChild:y?!1:c.asChild,ref:w,style:{pointerEvents:"none"},children:u.jsx(d.Fragment,{children:y?a:r},y?"placeholder":"value")})},"SelectValue")),Ut=d.forwardRef(x(function(o,e){const{__scopeSelect:t,children:s,...n}=o;return u.jsx(L.span,{"aria-hidden":!0,...n,ref:e,children:s||"▼"})},"SelectIcon")),Wt="SelectPortal",[Kt,zt]=re(Wt,{forceMount:void 0}),Gt=x(l=>{const{__scopeSelect:o,forceMount:e,...t}=l;return u.jsx(Kt,{scope:l.__scopeSelect,forceMount:e,children:u.jsx(at,{asChild:!0,...t})})},"SelectPortal"),se="SelectContent",ze=d.forwardRef(x(function(o,e){const t=zt(se,o.__scopeSelect),{forceMount:s=t.forceMount,...n}=o,r=Q(se,o.__scopeSelect),[a,c]=d.useState();return Z(()=>{c(new DocumentFragment)},[]),u.jsx(ct,{present:s||r.open,children:({present:i})=>i?u.jsx(Xt,{...n,ref:e}):u.jsx(Yt,{...n,fragment:a})})},"SelectContent")),Yt=d.forwardRef(x(function(o,e){const{__scopeSelect:t,children:s,fragment:n}=o;return n?De.createPortal(u.jsx(Ge,{scope:t,children:u.jsx(he.Slot,{scope:t,children:u.jsx("div",{ref:e,children:s})})}),n):null},"SelectContentFragment")),B=10,[Ge,le]=re(se),qt=gt("SelectContent.RemoveScroll"),Xt=d.forwardRef(x(function(o,e){const{__scopeSelect:t}=o,{position:s="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:r,onPointerDownOutside:a,side:c,sideOffset:i,align:m,alignOffset:v,arrowPadding:w,collisionBoundary:y,collisionPadding:C,sticky:I,hideWhenDetached:p,avoidCollisions:g,...T}=o,h=Q(se,t),[f,R]=d.useState(null),[j,J]=d.useState(null),A=U(e,R),[V,ee]=d.useState(null),[G,W]=d.useState(null),K=ge(t),[te,z]=d.useState(!1),H=d.useRef(!1);d.useEffect(()=>{if(f)return dt(f)},[f]),ut();const Y=d.useCallback(S=>{const[N,...O]=K().map(P=>P.ref.current),[_]=O.slice(-1),b=document.activeElement;for(const P of S)if(P===b||(P==null||P.scrollIntoView({block:"nearest"}),P===N&&j&&(j.scrollTop=0),P===_&&j&&(j.scrollTop=j.scrollHeight),P==null||P.focus(),document.activeElement!==b))return},[K,j]),q=d.useCallback(()=>Y([V,f]),[Y,V,f]);d.useEffect(()=>{te&&q()},[te,q]);const{onOpenChange:X,triggerPointerDownPosRef:F}=h;d.useEffect(()=>{if(f){let S={x:0,y:0};const N=x(_=>{var b,P;S={x:Math.abs(Math.round(_.pageX)-(((b=F.current)==null?void 0:b.x)??0)),y:Math.abs(Math.round(_.pageY)-(((P=F.current)==null?void 0:P.y)??0))}},"handlePointerMove"),O=x(_=>{S.x<=10&&S.y<=10?_.preventDefault():_.composedPath().includes(f)||X(!1),document.removeEventListener("pointermove",N),F.current=null},"handlePointerUp");return F.current!==null&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",O,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",O,{capture:!0})}}},[f,X,F]),d.useEffect(()=>{const S=x(()=>X(!1),"close");return window.addEventListener("blur",S),window.addEventListener("resize",S),()=>{window.removeEventListener("blur",S),window.removeEventListener("resize",S)}},[X]);const[ae,D]=Te(S=>{const N=K().filter(b=>!b.disabled),O=N.find(b=>b.ref.current===document.activeElement),_=Pe(N,S,O);_&&setTimeout(()=>{var b;return(b=_.ref.current)==null?void 0:b.focus()})}),$=d.useCallback((S,N,O)=>{const _=!H.current&&!O;(h.value!==void 0&&h.value===N||_)&&(ee(S),_&&(H.current=!0))},[h.value]),ce=d.useCallback(()=>f==null?void 0:f.focus(),[f]),ie=d.useCallback((S,N,O)=>{const _=!H.current&&!O;(h.value!==void 0&&h.value===N||_)&&W(S)},[h.value]),fe=s==="popper"?Ne:Zt,ue=fe===Ne?{side:c,sideOffset:i,align:m,alignOffset:v,arrowPadding:w,collisionBoundary:y,collisionPadding:C,sticky:I,hideWhenDetached:p,avoidCollisions:g}:{};return u.jsx(Ge,{scope:t,content:f,viewport:j,onViewportChange:J,itemRefCallback:$,selectedItem:V,onItemLeave:ce,itemTextRefCallback:ie,focusSelectedItem:q,selectedItemText:G,position:s,isPositioned:te,searchRef:ae,children:u.jsx(pt,{as:qt,allowPinchZoom:!0,children:u.jsx(ft,{asChild:!0,trapped:h.open,onMountAutoFocus:S=>{S.preventDefault()},onUnmountAutoFocus:E(n,S=>{var N;(N=h.trigger)==null||N.focus({preventScroll:!0}),S.preventDefault()}),children:u.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:S=>S.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:u.jsx(fe,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:S=>S.preventDefault(),...T,...ue,onPlaced:()=>z(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:E(T.onKeyDown,S=>{const N=S.ctrlKey||S.altKey||S.metaKey;if(S.key==="Tab"&&S.preventDefault(),!N&&S.key.length===1&&D(S.key),["ArrowUp","ArrowDown","Home","End"].includes(S.key)){let _=K().filter(b=>!b.disabled).map(b=>b.ref.current);if(["ArrowUp","End"].includes(S.key)&&(_=_.slice().reverse()),["ArrowUp","ArrowDown"].includes(S.key)){const b=S.target,P=_.indexOf(b);_=_.slice(P+1)}setTimeout(()=>Y(_)),S.preventDefault()}})})})})})})},"SelectContentImpl")),Zt=d.forwardRef(x(function(o,e){const{__scopeSelect:t,onPlaced:s,...n}=o,r=Q(se,t),a=le(se,t),[c,i]=d.useState(null),[m,v]=d.useState(null),w=U(e,v),y=ge(t),C=d.useRef(!1),I=d.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:T,focusSelectedItem:h}=a,f=d.useCallback(()=>{if(r.trigger&&r.valueNode&&c&&m&&p&&g&&T){const A=r.trigger.getBoundingClientRect(),V=m.getBoundingClientRect(),ee=r.valueNode.getBoundingClientRect(),G=T.getBoundingClientRect();if(r.dir!=="rtl"){const b=G.left-V.left,P=ee.left-b,oe=A.left-P,ne=A.width+oe,Se=Math.max(ne,V.width),xe=window.innerWidth-B,ve=we(P,[B,Math.max(B,xe-Se)]);c.style.minWidth=ne+"px",c.style.left=ve+"px"}else{const b=V.right-G.right,P=window.innerWidth-ee.right-b,oe=window.innerWidth-A.right-P,ne=A.width+oe,Se=Math.max(ne,V.width),xe=window.innerWidth-B,ve=we(P,[B,Math.max(B,xe-Se)]);c.style.minWidth=ne+"px",c.style.right=ve+"px"}const W=y(),K=window.innerHeight-B*2,te=p.scrollHeight,z=window.getComputedStyle(m),H=parseInt(z.borderTopWidth,10),Y=parseInt(z.paddingTop,10),q=parseInt(z.borderBottomWidth,10),X=parseInt(z.paddingBottom,10),F=H+Y+te+X+q,ae=Math.min(g.offsetHeight*5,F),D=window.getComputedStyle(p),$=parseInt(D.paddingTop,10),ce=parseInt(D.paddingBottom,10),ie=A.top+A.height/2-B,fe=K-ie,ue=g.offsetHeight/2,S=g.offsetTop+ue,N=H+Y+S,O=F-N;if(N<=ie){const b=W.length>0&&g===W[W.length-1].ref.current;c.style.bottom="0px";const P=m.clientHeight-p.offsetTop-p.offsetHeight,oe=Math.max(fe,ue+(b?ce:0)+P+q),ne=N+oe;c.style.height=ne+"px"}else{const b=W.length>0&&g===W[0].ref.current;c.style.top="0px";const oe=Math.max(ie,H+p.offsetTop+(b?$:0)+ue)+O;c.style.height=oe+"px",p.scrollTop=N-ie+p.offsetTop}c.style.margin=`${B}px 0`,c.style.minHeight=ae+"px",c.style.maxHeight=K+"px",s==null||s(),requestAnimationFrame(()=>C.current=!0)}},[y,r.trigger,r.valueNode,c,m,p,g,T,r.dir,s]);Z(()=>f(),[f]);const[R,j]=d.useState();Z(()=>{m&&j(window.getComputedStyle(m).zIndex)},[m]);const J=d.useCallback(A=>{A&&I.current===!0&&(f(),h==null||h(),I.current=!1)},[f,h]);return u.jsx(Qt,{scope:t,contentWrapper:c,shouldExpandOnScrollRef:C,onScrollButtonChange:J,children:u.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:u.jsx(L.div,{...n,ref:w,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})},"SelectItemAlignedPosition")),Ne=d.forwardRef(x(function(o,e){const{__scopeSelect:t,align:s="start",collisionPadding:n=B,...r}=o,a=be(t);return u.jsx(St,{...a,...r,ref:e,align:s,collisionPadding:n,style:{boxSizing:"border-box",...r.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[Qt,Ie]=re(se,{}),Re="SelectViewport",Jt=d.forwardRef(x(function(o,e){const{__scopeSelect:t,nonce:s,...n}=o,r=le(Re,t),a=Ie(Re,t),c=U(e,r.onViewportChange),i=d.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),u.jsx(he.Slot,{scope:t,children:u.jsx(L.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:E(n.onScroll,m=>{const v=m.currentTarget,{contentWrapper:w,shouldExpandOnScrollRef:y}=a;if(y!=null&&y.current&&w){const C=Math.abs(i.current-v.scrollTop);if(C>0){const I=window.innerHeight-B*2,p=parseFloat(w.style.minHeight),g=parseFloat(w.style.height),T=Math.max(p,g);if(T<I){const h=T+C,f=Math.min(I,h),R=h-f;w.style.height=f+"px",w.style.bottom==="0px"&&(v.scrollTop=R>0?R:0,w.style.justifyContent="flex-end")}}}i.current=v.scrollTop})})})]})},"SelectViewport")),eo="SelectGroup",[Io,to]=re(eo),oo="SelectLabel",Ye=d.forwardRef(x(function(o,e){const{__scopeSelect:t,...s}=o,n=to(oo,t);return u.jsx(L.div,{id:n.id,...s,ref:e})},"SelectLabel")),ye="SelectItem",[no,qe]=re(ye),Xe=d.forwardRef(x(function(o,e){const{__scopeSelect:t,value:s,disabled:n=!1,textValue:r,...a}=o,c=Q(ye,t),i=le(ye,t),m=c.value===s,[v,w]=d.useState(r??""),[y,C]=d.useState(!1),I=Ce(f=>{var R;return(R=i.itemRefCallback)==null?void 0:R.call(i,f,s,n)}),p=U(e,I),g=Oe(),T=d.useRef("touch"),h=x(()=>{n||(c.onValueChange(s),c.onOpenChange(!1))},"handleSelect");return u.jsx(no,{scope:t,value:s,disabled:n,textId:g,isSelected:m,onItemTextChange:d.useCallback(f=>{w(R=>R||((f==null?void 0:f.textContent)??"").trim())},[]),children:u.jsx(he.ItemSlot,{scope:t,value:s,disabled:n,textValue:v,children:u.jsx(L.div,{role:"option","aria-labelledby":g,"data-highlighted":y?"":void 0,"aria-selected":m&&y,"data-state":m?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...a,ref:p,onFocus:E(a.onFocus,()=>C(!0)),onBlur:E(a.onBlur,()=>C(!1)),onClick:E(a.onClick,()=>{T.current!=="mouse"&&h()}),onPointerUp:E(a.onPointerUp,()=>{T.current==="mouse"&&h()}),onPointerDown:E(a.onPointerDown,f=>{T.current=f.pointerType}),onPointerMove:E(a.onPointerMove,f=>{var R;T.current=f.pointerType,n?(R=i.onItemLeave)==null||R.call(i):T.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:E(a.onPointerLeave,f=>{var R;f.currentTarget===document.activeElement&&((R=i.onItemLeave)==null||R.call(i))}),onKeyDown:E(a.onKeyDown,f=>{var j;n||f.target!==f.currentTarget||((j=i.searchRef)==null?void 0:j.current)!==""&&f.key===" "||(Ot.includes(f.key)&&h(),f.key===" "&&f.preventDefault())})})})})},"SelectItem")),me="SelectItemText",so=d.forwardRef(x(function(o,e){const{__scopeSelect:t,className:s,style:n,...r}=o,a=Q(me,t),c=le(me,t),i=qe(me,t),m=Bt(me,t),[v,w]=d.useState(null),y=Ce(h=>{var f;return(f=c.itemTextRefCallback)==null?void 0:f.call(c,h,i.value,i.disabled)}),C=U(e,w,i.onItemTextChange,y),I=v==null?void 0:v.textContent,p=d.useMemo(()=>u.jsx("option",{value:i.value,disabled:i.disabled,children:I},i.value),[i.disabled,i.value,I]),{onNativeOptionAdd:g,onNativeOptionRemove:T}=m;return Z(()=>(g(p),()=>T(p)),[g,T,p]),u.jsxs(u.Fragment,{children:[u.jsx(L.span,{id:i.textId,...r,ref:C}),i.isSelected&&a.valueNode&&!a.valueNodeHasChildren&&!pe(a.value)?De.createPortal(r.children,a.valueNode):null]})},"SelectItemText")),ro="SelectItemIndicator",lo=d.forwardRef(x(function(o,e){const{__scopeSelect:t,...s}=o;return qe(ro,t).isSelected?u.jsx(L.span,{"aria-hidden":!0,...s,ref:e}):null},"SelectItemIndicator")),je="SelectScrollUpButton",Ze=d.forwardRef(x(function(o,e){const t=le(je,o.__scopeSelect),s=Ie(je,o.__scopeSelect),[n,r]=d.useState(!1),a=U(e,s.onScrollButtonChange);return Z(()=>{if(t.viewport&&t.isPositioned){let c=function(){const m=i.scrollTop>0;r(m)};x(c,"handleScroll");const i=t.viewport;return c(),i.addEventListener("scroll",c),()=>i.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),n?u.jsx(Je,{...o,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:i}=t;c&&i&&(c.scrollTop=c.scrollTop-i.offsetHeight)}}):null},"SelectScrollUpButton")),Ee="SelectScrollDownButton",Qe=d.forwardRef(x(function(o,e){const t=le(Ee,o.__scopeSelect),s=Ie(Ee,o.__scopeSelect),[n,r]=d.useState(!1),a=U(e,s.onScrollButtonChange);return Z(()=>{if(t.viewport&&t.isPositioned){let c=function(){const m=i.scrollHeight-i.clientHeight,v=Math.ceil(i.scrollTop)<m;r(v)};x(c,"handleScroll");const i=t.viewport;return c(),i.addEventListener("scroll",c),()=>i.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),n?u.jsx(Je,{...o,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:i}=t;c&&i&&(c.scrollTop=c.scrollTop+i.offsetHeight)}}):null},"SelectScrollDownButton")),Je=d.forwardRef(x(function(o,e){const{__scopeSelect:t,onAutoScroll:s,...n}=o,r=le("SelectScrollButton",t),a=d.useRef(null),c=ge(t),i=d.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return d.useEffect(()=>()=>i(),[i]),Z(()=>{var v;const m=c().find(w=>w.ref.current===document.activeElement);(v=m==null?void 0:m.ref.current)==null||v.scrollIntoView({block:"nearest"})},[c]),u.jsx(L.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:E(n.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(s,50))}),onPointerMove:E(n.onPointerMove,()=>{var m;(m=r.onItemLeave)==null||m.call(r),a.current===null&&(a.current=window.setInterval(s,50))}),onPointerLeave:E(n.onPointerLeave,()=>{i()})})},"SelectScrollButtonImpl")),et=d.forwardRef(x(function(o,e){const{__scopeSelect:t,...s}=o;return u.jsx(L.div,{"aria-hidden":!0,...s,ref:e})},"SelectSeparator")),ao="SelectBubbleInput",co=d.forwardRef(x(function({__scopeSelect:o,...e},t){const s=Q(ao,o),{value:n,onValueChange:r,required:a,disabled:c,name:i,autoComplete:m,form:v}=s,{nativeOptions:w,nativeSelectKey:y}=s,C=d.useRef(null),I=U(t,C),p=n??"",g=Ue(p),T=Array.from(w).some(h=>(h.props.value??"")==="");return d.useEffect(()=>{const h=C.current;if(!h)return;const f=window.HTMLSelectElement.prototype,j=Object.getOwnPropertyDescriptor(f,"value").set;if(g!==p&&j){const J=new Event("change",{bubbles:!0});j.call(h,p),h.dispatchEvent(J)}},[g,p]),u.jsxs(L.select,{"aria-hidden":!0,required:a,tabIndex:-1,name:i,autoComplete:m,disabled:c,form:v,onChange:h=>r(h.target.value),...e,style:{...xt,...e.style},ref:I,defaultValue:p,children:[pe(n)&&!T?u.jsx("option",{value:""}):null,Array.from(w)]},y)},"SelectBubbleInput"));function tt(l){return typeof l=="function"}x(tt,"isFunction");function pe(l){return l===""||l===void 0}x(pe,"shouldShowPlaceholder");function Te(l){const o=Ce(l),e=d.useRef(""),t=d.useRef(0),s=d.useCallback(r=>{const a=e.current+r;o(a),x((function c(i){e.current=i,window.clearTimeout(t.current),i!==""&&(t.current=window.setTimeout(()=>c(""),1e3))}),"updateSearch")(a)},[o]),n=d.useCallback(()=>{e.current="",window.clearTimeout(t.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(t.current),[]),[e,s,n]}x(Te,"useTypeaheadSearch");function Pe(l,o,e){const s=o.length>1&&Array.from(o).every(i=>i===o[0])?o[0]:o,n=e?l.indexOf(e):-1;let r=ot(l,Math.max(n,0));s.length===1&&(r=r.filter(i=>i!==e));const c=r.find(i=>i.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==e?c:void 0}x(Pe,"findNextItem");function ot(l,o){return l.map((e,t)=>l[(o+t)%l.length])}x(ot,"wrapArray");const To=Vt,Po=$t,io=d.forwardRef((l,o)=>{const e=k.c(12);let t,s,n;e[0]!==l?({className:s,children:t,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let r;e[4]!==s?(r=M("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),e[4]=s,e[5]=r):r=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=u.jsx(Ut,{asChild:!0,children:u.jsx(Fe,{className:"h-4 w-4 opacity-50"})}),e[6]=a):a=e[6];let c;return e[7]!==t||e[8]!==n||e[9]!==o||e[10]!==r?(c=u.jsxs(Ke,{ref:o,className:r,...n,children:[t,a]}),e[7]=t,e[8]=n,e[9]=o,e[10]=r,e[11]=c):c=e[11],c});io.displayName=Ke.displayName;const nt=d.forwardRef((l,o)=>{const e=k.c(10);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=u.jsx(_t,{className:"h-4 w-4"}),e[5]=r):r=e[5];let a;return e[6]!==s||e[7]!==o||e[8]!==n?(a=u.jsx(Ze,{ref:o,className:n,...s,children:r}),e[6]=s,e[7]=o,e[8]=n,e[9]=a):a=e[9],a});nt.displayName=Ze.displayName;const st=d.forwardRef((l,o)=>{const e=k.c(10);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=u.jsx(Fe,{className:"h-4 w-4"}),e[5]=r):r=e[5];let a;return e[6]!==s||e[7]!==o||e[8]!==n?(a=u.jsx(Qe,{ref:o,className:n,...s,children:r}),e[6]=s,e[7]=o,e[8]=n,e[9]=a):a=e[9],a});st.displayName=Qe.displayName;const uo=d.forwardRef((l,o)=>{const e=k.c(21);let t,s,n,r;e[0]!==l?({className:s,children:t,position:r,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n,e[4]=r):(t=e[1],s=e[2],n=e[3],r=e[4]);const a=r===void 0?"popper":r,c=a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let i;e[5]!==s||e[6]!==c?(i=M("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",c,s),e[5]=s,e[6]=c,e[7]=i):i=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=u.jsx(nt,{}),e[8]=m):m=e[8];const v=a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]";let w;e[9]!==v?(w=M("p-1",v),e[9]=v,e[10]=w):w=e[10];let y;e[11]!==t||e[12]!==w?(y=u.jsx(Jt,{className:w,children:t}),e[11]=t,e[12]=w,e[13]=y):y=e[13];let C;e[14]===Symbol.for("react.memo_cache_sentinel")?(C=u.jsx(st,{}),e[14]=C):C=e[14];let I;return e[15]!==a||e[16]!==n||e[17]!==o||e[18]!==i||e[19]!==y?(I=u.jsx(Gt,{children:u.jsxs(ze,{ref:o,className:i,position:a,...n,children:[m,y,C]})}),e[15]=a,e[16]=n,e[17]=o,e[18]=i,e[19]=y,e[20]=I):I=e[20],I});uo.displayName=ze.displayName;const po=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("py-1.5 pl-8 pr-2 text-sm font-semibold",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Ye,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});po.displayName=Ye.displayName;const fo=d.forwardRef((l,o)=>{const e=k.c(14);let t,s,n;e[0]!==l?({className:s,children:t,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let r;e[4]!==s?(r=M("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),e[4]=s,e[5]=r):r=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(lo,{children:u.jsx(yt,{className:"h-4 w-4"})})}),e[6]=a):a=e[6];let c;e[7]!==t?(c=u.jsx(so,{children:t}),e[7]=t,e[8]=c):c=e[8];let i;return e[9]!==n||e[10]!==o||e[11]!==r||e[12]!==c?(i=u.jsxs(Xe,{ref:o,className:r,...n,children:[a,c]}),e[9]=n,e[10]=o,e[11]=r,e[12]=c,e[13]=i):i=e[13],i});fo.displayName=Xe.displayName;const mo=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("-mx-1 my-1 h-px bg-muted",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(et,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});mo.displayName=et.displayName;const _o=Ct,No=bt,ho=It,rt=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Be,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});rt.displayName=Be.displayName;const go=d.forwardRef((l,o)=>{const e=k.c(13);let t,s,n;e[0]!==l?({className:s,children:t,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=u.jsx(rt,{}),e[4]=r):r=e[4];let a;e[5]!==s?(a=M("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),e[5]=s,e[6]=a):a=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=u.jsxs(Tt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[u.jsx(Pt,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]}),e[7]=c):c=e[7];let i;return e[8]!==t||e[9]!==n||e[10]!==o||e[11]!==a?(i=u.jsxs(ho,{children:[r,u.jsxs(Ae,{ref:o,className:a,...n,children:[t,c]})]}),e[8]=t,e[9]=n,e[10]=o,e[11]=a,e[12]=i):i=e[12],i});go.displayName=Ae.displayName;const So=l=>{const o=k.c(8);let e,t;o[0]!==l?({className:e,...t}=l,o[0]=l,o[1]=e,o[2]=t):(e=o[1],t=o[2]);let s;o[3]!==e?(s=M("flex flex-col space-y-1.5 text-center sm:text-left",e),o[3]=e,o[4]=s):s=o[4];let n;return o[5]!==t||o[6]!==s?(n=u.jsx("div",{className:s,...t}),o[5]=t,o[6]=s,o[7]=n):n=o[7],n};So.displayName="DialogHeader";const xo=l=>{const o=k.c(8);let e,t;o[0]!==l?({className:e,...t}=l,o[0]=l,o[1]=e,o[2]=t):(e=o[1],t=o[2]);let s;o[3]!==e?(s=M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),o[3]=e,o[4]=s):s=o[4];let n;return o[5]!==t||o[6]!==s?(n=u.jsx("div",{className:s,...t}),o[5]=t,o[6]=s,o[7]=n):n=o[7],n};xo.displayName="DialogFooter";const vo=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("text-lg font-semibold leading-none tracking-tight",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Le,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});vo.displayName=Le.displayName;const wo=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("text-sm text-muted-foreground",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Ve,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});wo.displayName=Ve.displayName;export{Fe as C,_o as D,To as S,go as a,wo as b,xo as c,So as d,vo as e,No as f,uo as g,fo as h,io as i,Po as j,we as k};