@tapflowio/relay 0.22.0 → 0.23.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 (158) hide show
  1. package/dist/RelayServer.d.ts +18 -0
  2. package/dist/RelayServer.d.ts.map +1 -1
  3. package/dist/RelayServer.js +110 -12
  4. package/dist/RelayServer.js.map +1 -1
  5. package/dist/SessionManager.d.ts +4 -1
  6. package/dist/SessionManager.d.ts.map +1 -1
  7. package/dist/SessionManager.js +7 -0
  8. package/dist/SessionManager.js.map +1 -1
  9. package/dist/api/auth.d.ts.map +1 -1
  10. package/dist/api/auth.js +2 -1
  11. package/dist/api/auth.js.map +1 -1
  12. package/dist/api/passwordReset.d.ts +6 -2
  13. package/dist/api/passwordReset.d.ts.map +1 -1
  14. package/dist/api/passwordReset.js +21 -6
  15. package/dist/api/passwordReset.js.map +1 -1
  16. package/dist/index.d.ts +2 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +2 -1
  19. package/dist/index.js.map +1 -1
  20. package/dist/lib/clientAddress.d.ts +15 -0
  21. package/dist/lib/clientAddress.d.ts.map +1 -1
  22. package/dist/lib/clientAddress.js +21 -0
  23. package/dist/lib/clientAddress.js.map +1 -1
  24. package/dist/lib/config.d.ts +2 -0
  25. package/dist/lib/config.d.ts.map +1 -1
  26. package/dist/lib/config.js +6 -0
  27. package/dist/lib/config.js.map +1 -1
  28. package/dist/lib/proxyConfig.d.ts +10 -0
  29. package/dist/lib/proxyConfig.d.ts.map +1 -1
  30. package/dist/lib/proxyConfig.js +14 -0
  31. package/dist/lib/proxyConfig.js.map +1 -1
  32. package/dist/server.js +3 -1
  33. package/dist/server.js.map +1 -1
  34. package/package.json +5 -5
  35. package/public/assets/AppCenter-OTDuqwSf.js +21 -0
  36. package/public/assets/AppCenter-OTDuqwSf.js.br +0 -0
  37. package/public/assets/AppCenter-OTDuqwSf.js.gz +0 -0
  38. package/public/assets/{Default-2rFTkbo9.js → Default-D9GLpWlN.js} +1 -1
  39. package/public/assets/Default-D9GLpWlN.js.br +0 -0
  40. package/public/assets/Default-D9GLpWlN.js.gz +0 -0
  41. package/public/assets/{Invite-aN4DXJyM.js → Invite-Bhiam8En.js} +1 -1
  42. package/public/assets/Invite-Bhiam8En.js.br +0 -0
  43. package/public/assets/Invite-Bhiam8En.js.gz +0 -0
  44. package/public/assets/{MacResources-D3IlesXU.js → MacResources-DObzVJxQ.js} +1 -1
  45. package/public/assets/MacResources-DObzVJxQ.js.br +0 -0
  46. package/public/assets/MacResources-DObzVJxQ.js.gz +0 -0
  47. package/public/assets/{NotFound-BoDDivK5.js → NotFound-Dz_k_Mzf.js} +1 -1
  48. package/public/assets/NotFound-Dz_k_Mzf.js.br +0 -0
  49. package/public/assets/NotFound-Dz_k_Mzf.js.gz +0 -0
  50. package/public/assets/QASession-2crubOLY.js +150 -0
  51. package/public/assets/QASession-2crubOLY.js.br +0 -0
  52. package/public/assets/QASession-2crubOLY.js.gz +0 -0
  53. package/public/assets/{ResetPassword-DPc5kwQU.js → ResetPassword-EUm12ojo.js} +1 -1
  54. package/public/assets/ResetPassword-EUm12ojo.js.br +0 -0
  55. package/public/assets/ResetPassword-EUm12ojo.js.gz +0 -0
  56. package/public/assets/{Setup-CwPx_e_O.js → Setup-Fc_0RW0a.js} +1 -1
  57. package/public/assets/Setup-Fc_0RW0a.js.br +0 -0
  58. package/public/assets/Setup-Fc_0RW0a.js.gz +0 -0
  59. package/public/assets/Team-Ac5aOGgx.js +6 -0
  60. package/public/assets/Team-Ac5aOGgx.js.br +0 -0
  61. package/public/assets/Team-Ac5aOGgx.js.gz +0 -0
  62. package/public/assets/{Tokens-DdMMke73.js → Tokens-pEnCy-7l.js} +1 -1
  63. package/public/assets/Tokens-pEnCy-7l.js.br +0 -0
  64. package/public/assets/Tokens-pEnCy-7l.js.gz +0 -0
  65. package/public/assets/alert-dialog-DhOTocMh.js +1 -0
  66. package/public/assets/alert-dialog-DhOTocMh.js.br +0 -0
  67. package/public/assets/alert-dialog-DhOTocMh.js.gz +0 -0
  68. package/public/assets/{badge-CMf8d5RJ.js → badge-B4gbViMs.js} +1 -1
  69. package/public/assets/badge-B4gbViMs.js.br +0 -0
  70. package/public/assets/badge-B4gbViMs.js.gz +0 -0
  71. package/public/assets/build-format-DKGajT96.js +11 -0
  72. package/public/assets/build-format-DKGajT96.js.br +0 -0
  73. package/public/assets/build-format-DKGajT96.js.gz +0 -0
  74. package/public/assets/dialog-DEL1xxKJ.js +11 -0
  75. package/public/assets/dialog-DEL1xxKJ.js.br +0 -0
  76. package/public/assets/dialog-DEL1xxKJ.js.gz +0 -0
  77. package/public/assets/index-COIlCLCW.js +218 -0
  78. package/public/assets/index-COIlCLCW.js.br +0 -0
  79. package/public/assets/index-COIlCLCW.js.gz +0 -0
  80. package/public/assets/pencil-CPaoEKFm.js +6 -0
  81. package/public/assets/pencil-CPaoEKFm.js.br +0 -0
  82. package/public/assets/pencil-CPaoEKFm.js.gz +0 -0
  83. package/public/assets/resource-health-Ca4-5Rde.js +1 -0
  84. package/public/assets/resource-health-Ca4-5Rde.js.br +0 -0
  85. package/public/assets/resource-health-Ca4-5Rde.js.gz +0 -0
  86. package/public/assets/{table-CL9AvoTp.js → table-CSeGVnii.js} +1 -1
  87. package/public/assets/table-CSeGVnii.js.br +0 -0
  88. package/public/assets/table-CSeGVnii.js.gz +0 -0
  89. package/public/assets/trash-CD9Y9G-i.js +11 -0
  90. package/public/assets/trash-CD9Y9G-i.js.br +0 -0
  91. package/public/assets/trash-CD9Y9G-i.js.gz +0 -0
  92. package/public/assets/{vendor-charts-8kVeHLwY.js → vendor-charts-YPhPkjLw.js} +1 -1
  93. package/public/assets/vendor-charts-YPhPkjLw.js.br +0 -0
  94. package/public/assets/vendor-charts-YPhPkjLw.js.gz +0 -0
  95. package/public/assets/vendor-react-C5H_1fOn.js +49 -0
  96. package/public/assets/vendor-react-C5H_1fOn.js.br +0 -0
  97. package/public/assets/vendor-react-C5H_1fOn.js.gz +0 -0
  98. package/public/assets/{vendor-router-BFibuab1.js → vendor-router-CnmrRwJF.js} +1 -1
  99. package/public/assets/vendor-router-CnmrRwJF.js.br +0 -0
  100. package/public/assets/vendor-router-CnmrRwJF.js.gz +0 -0
  101. package/public/index.html +3 -3
  102. package/public/index.html.br +0 -0
  103. package/public/index.html.gz +0 -0
  104. package/public/assets/AppCenter-gbsJscjW.js +0 -21
  105. package/public/assets/AppCenter-gbsJscjW.js.br +0 -0
  106. package/public/assets/AppCenter-gbsJscjW.js.gz +0 -0
  107. package/public/assets/Default-2rFTkbo9.js.br +0 -0
  108. package/public/assets/Default-2rFTkbo9.js.gz +0 -0
  109. package/public/assets/Invite-aN4DXJyM.js.br +0 -0
  110. package/public/assets/Invite-aN4DXJyM.js.gz +0 -0
  111. package/public/assets/MacResources-D3IlesXU.js.br +0 -0
  112. package/public/assets/MacResources-D3IlesXU.js.gz +0 -0
  113. package/public/assets/NotFound-BoDDivK5.js.br +0 -0
  114. package/public/assets/NotFound-BoDDivK5.js.gz +0 -0
  115. package/public/assets/QASession-U29t9j0E.js +0 -140
  116. package/public/assets/QASession-U29t9j0E.js.br +0 -0
  117. package/public/assets/QASession-U29t9j0E.js.gz +0 -0
  118. package/public/assets/ResetPassword-DPc5kwQU.js.br +0 -0
  119. package/public/assets/ResetPassword-DPc5kwQU.js.gz +0 -0
  120. package/public/assets/Setup-CwPx_e_O.js.br +0 -0
  121. package/public/assets/Setup-CwPx_e_O.js.gz +0 -0
  122. package/public/assets/Team-DD9li-7M.js +0 -6
  123. package/public/assets/Team-DD9li-7M.js.br +0 -0
  124. package/public/assets/Team-DD9li-7M.js.gz +0 -0
  125. package/public/assets/Tokens-DdMMke73.js.br +0 -0
  126. package/public/assets/Tokens-DdMMke73.js.gz +0 -0
  127. package/public/assets/alert-dialog-DADd1jHN.js +0 -1
  128. package/public/assets/alert-dialog-DADd1jHN.js.br +0 -0
  129. package/public/assets/alert-dialog-DADd1jHN.js.gz +0 -0
  130. package/public/assets/badge-CMf8d5RJ.js.br +0 -0
  131. package/public/assets/badge-CMf8d5RJ.js.gz +0 -0
  132. package/public/assets/build-format-lp_8kSvq.js +0 -11
  133. package/public/assets/build-format-lp_8kSvq.js.br +0 -0
  134. package/public/assets/build-format-lp_8kSvq.js.gz +0 -0
  135. package/public/assets/dialog-pS8vHXXv.js +0 -11
  136. package/public/assets/dialog-pS8vHXXv.js.br +0 -0
  137. package/public/assets/dialog-pS8vHXXv.js.gz +0 -0
  138. package/public/assets/index-Cajf0T-5.js +0 -198
  139. package/public/assets/index-Cajf0T-5.js.br +0 -0
  140. package/public/assets/index-Cajf0T-5.js.gz +0 -0
  141. package/public/assets/pencil-LD1ga-Kk.js +0 -6
  142. package/public/assets/pencil-LD1ga-Kk.js.br +0 -0
  143. package/public/assets/pencil-LD1ga-Kk.js.gz +0 -0
  144. package/public/assets/resource-health-BScurILF.js +0 -1
  145. package/public/assets/resource-health-BScurILF.js.br +0 -0
  146. package/public/assets/resource-health-BScurILF.js.gz +0 -0
  147. package/public/assets/table-CL9AvoTp.js.br +0 -0
  148. package/public/assets/table-CL9AvoTp.js.gz +0 -0
  149. package/public/assets/trash-mvVp4nwq.js +0 -11
  150. package/public/assets/trash-mvVp4nwq.js.br +0 -0
  151. package/public/assets/trash-mvVp4nwq.js.gz +0 -0
  152. package/public/assets/vendor-charts-8kVeHLwY.js.br +0 -0
  153. package/public/assets/vendor-charts-8kVeHLwY.js.gz +0 -0
  154. package/public/assets/vendor-react-AJpf4YZ0.js +0 -49
  155. package/public/assets/vendor-react-AJpf4YZ0.js.br +0 -0
  156. package/public/assets/vendor-react-AJpf4YZ0.js.gz +0 -0
  157. package/public/assets/vendor-router-BFibuab1.js.br +0 -0
  158. package/public/assets/vendor-router-BFibuab1.js.gz +0 -0
@@ -1,6 +0,0 @@
1
- import{i,j as e}from"./vendor-react-AJpf4YZ0.js";import{W as K,ad as X,a5 as Y,B as r,I as N,L as A,h as Z,C as ee,c as se,d as ie,a as te,a4 as x,a2 as O,a3 as u,G as ne}from"./index-Cajf0T-5.js";import{D as ae,f as le,a as re,d as oe,e as ce,S as I,i as R,j as E,g as P,h as n}from"./dialog-pS8vHXXv.js";import{A as de,c as me,f as he,g as xe,d as ue,e as je,b as ve,a as pe}from"./alert-dialog-DADd1jHN.js";import{T as ge,d as fe,e as L,c as o,a as be,b as c}from"./table-CL9AvoTp.js";import{j as Se,l as ye}from"./publicLink-D6zKS_wu.js";import"./vendor-router-BFibuab1.js";/**
2
- * @license lucide-react v1.41.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 Ce=[["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"}]],ke=K("user-plus",Ce),we=O({email:u().email(),role:u().min(1)}),Te=O({token:u(),emailSent:ne(),inviteUrl:u().nullable()});function Le(){const[g,$]=i.useState([]),[V,f]=i.useState({}),[d,b]=i.useState(""),[F,S]=i.useState(!1),[H,m]=i.useState(""),y=i.useId(),C=i.useRef(null),[B,M]=i.useState(!1),[j,v]=i.useState(null),{register:Q,handleSubmit:_,control:z,reset:J,formState:{errors:k,isSubmitting:w}}=X({resolver:Y(we),mode:"onBlur",defaultValues:{email:"",role:"QA"}});function p(){fetch("/api/v1/team/members",{credentials:"include"}).then(s=>s.json()).then($)}i.useEffect(()=>{p()},[]),i.useEffect(()=>{var s;d&&((s=C.current)==null||s.focus())},[d]);async function U(s){m("");try{const t=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(!t.ok)throw new Error(`Server error: ${t.status}`);const l=Te.parse(await t.json()),h=l.inviteUrl??Se((await ye()).linkBase,`/invite?token=${l.token}`),a=await(navigator.clipboard?navigator.clipboard.writeText(h):Promise.reject(new Error("no clipboard"))).then(()=>!0,()=>!1);b(h),S(a),m(`${l.emailSent?`Invite email sent to ${s.email}.`:"Email could not be sent."} ${a?"Invite link copied to clipboard.":"Copy the invite link."}`),l.emailSent?x.success(`Invite email sent to ${s.email}`):a?x.warning("Invite link copied — email could not be sent. Check your SMTP settings."):x.warning("Email could not be sent. Copy the invite link from the dialog, and check your SMTP settings.")}catch{x.error("Failed to create invite link"),m("Failed to create invite link.")}}function T(s){M(s),s||(b(""),S(!1),m(""),J())}async function G(s,t){await fetch(`/api/v1/team/members/${s}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({role:t})}),p()}async function q(s){const h=(await(await fetch(`/api/v1/team/members/${s}/send-reset`,{method:"POST",credentials:"include"})).json()).emailSent?"Sent":"No SMTP";f(a=>({...a,[s]:h})),setTimeout(()=>f(a=>{const D={...a};return delete D[s],D}),3e3)}async function W(s){await fetch(`/api/v1/team/members/${s}`,{method:"DELETE",credentials:"include"}),v(null),p()}return e.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[e.jsx(de,{open:j!==null,onOpenChange:s=>{s||v(null)},children:e.jsxs(me,{children:[e.jsxs(he,{children:[e.jsx(xe,{children:"Remove this member?"}),e.jsx(ue,{children:"This member will lose access to the team immediately."})]}),e.jsxs(je,{children:[e.jsx(ve,{children:"Cancel"}),e.jsx(pe,{className:"bg-destructive/10 text-destructive hover:bg-destructive/20 border-0",onClick:()=>j!==null&&W(j),children:"Remove"})]})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h1",{className:"text-xl font-semibold",children:"Team"}),e.jsxs(ae,{open:B,onOpenChange:T,children:[e.jsx(le,{asChild:!0,children:e.jsxs(r,{size:"sm",children:[e.jsx(ke,{className:"mr-2 h-4 w-4"}),"Invite member"]})}),e.jsxs(re,{className:"sm:max-w-md",children:[e.jsx(oe,{children:e.jsx(ce,{children:"Invite team member"})}),e.jsx("p",{role:"status",className:"sr-only",children:H}),d?e.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[e.jsx("p",{id:y,className:"text-sm text-muted-foreground",children:F?"Invite link copied to clipboard:":"Copy this invite link:"}),e.jsx(N,{ref:C,readOnly:!0,value:d,"aria-labelledby":y,onFocus:s=>s.currentTarget.select(),className:"font-mono text-xs"}),e.jsx(r,{onClick:()=>T(!1),children:"Done"})]}):e.jsxs("form",{onSubmit:_(U),className:"flex flex-col gap-4 pt-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(A,{htmlFor:"invite-email",children:"Email"}),e.jsx(N,{id:"invite-email",type:"email",...Q("email")}),k.email&&e.jsx("p",{className:"text-sm text-destructive",children:k.email.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(A,{htmlFor:"invite-role",children:"Role"}),e.jsx(Z,{name:"role",control:z,render:({field:s})=>e.jsxs(I,{value:s.value,onValueChange:s.onChange,children:[e.jsx(R,{id:"invite-role",children:e.jsx(E,{})}),e.jsxs(P,{children:[e.jsx(n,{value:"Admin",children:"Admin"}),e.jsx(n,{value:"Developer",children:"Developer"}),e.jsx(n,{value:"QA",children:"QA"}),e.jsx(n,{value:"Viewer",children:"Viewer"})]})]})})]}),e.jsx(r,{type:"submit",disabled:w,children:w?"Creating link…":"Generate invite link"})]})]})]})]}),e.jsxs(ee,{children:[e.jsx(se,{children:e.jsxs(ie,{children:["Members (",g.length,")"]})}),e.jsx(te,{className:"px-4 pt-0 pb-2",children:e.jsxs(ge,{children:[e.jsx(fe,{children:e.jsxs(L,{children:[e.jsx(o,{children:"Nickname"}),e.jsx(o,{children:"Email"}),e.jsx(o,{children:"Role"}),e.jsx(o,{children:"Joined"}),e.jsx(o,{className:"w-10"})]})}),e.jsx(be,{children:g.map(s=>e.jsxs(L,{className:"hover:bg-transparent",children:[e.jsx(c,{className:"font-medium",children:s.display_name||"—"}),e.jsx(c,{className:"text-muted-foreground text-sm",children:s.email}),e.jsx(c,{children:e.jsxs(I,{value:s.role,onValueChange:t=>G(s.id,t),children:[e.jsx(R,{className:"h-7 w-28",children:e.jsx(E,{})}),e.jsxs(P,{children:[e.jsx(n,{value:"Admin",children:"Admin"}),e.jsx(n,{value:"Developer",children:"Developer"}),e.jsx(n,{value:"QA",children:"QA"}),e.jsx(n,{value:"Viewer",children:"Viewer"})]})]})}),e.jsx(c,{className:"text-muted-foreground text-sm",children:new Date(s.joined_at).toLocaleDateString()}),e.jsx(c,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(r,{variant:"secondary",size:"nav",onClick:()=>q(s.id),children:V[s.id]??"Reset pwd"}),e.jsx(r,{variant:"destructive",size:"nav",onClick:()=>v(s.id),children:"Remove"})]})})]},s.id))})]})})]})]})}export{Le as TeamSettings};
Binary file
Binary file
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{i as r,j as o}from"./vendor-react-AJpf4YZ0.js";import{m as O,a9 as u,j as T,K as S,n as b,k as $,i as m,Q as v,l as E,O as h,D as z,o as F,J as g,H as x}from"./index-Cajf0T-5.js";var H=Object.defineProperty,n=(t,e)=>H(t,"name",{value:e,configurable:!0}),k="AlertDialog",[M,pe]=h(k,[v]),c=v(),I=n(t=>{const{__scopeAlertDialog:e,...a}=t,l=c(e);return o.jsx(z,{...l,...a,modal:!0})},"AlertDialog"),J=r.forwardRef(n(function(e,a){const{__scopeAlertDialog:l,...i}=e,s=c(l);return o.jsx(F,{...s,...i,ref:a})},"AlertDialogTrigger")),K=n(t=>{const{__scopeAlertDialog:e,...a}=t,l=c(e);return o.jsx(O,{...l,...a})},"AlertDialogPortal"),L=r.forwardRef(n(function(e,a){const{__scopeAlertDialog:l,...i}=e,s=c(l);return o.jsx(E,{...s,...i,ref:a})},"AlertDialogOverlay")),Q="AlertDialogContent",[V,q]=M(Q),B=r.forwardRef(n(function(e,a){const{__scopeAlertDialog:l,children:i,...s}=e,p=c(l),f=r.useRef(null),P=u(a,f),D=r.useRef(null);return o.jsx(V,{scope:l,cancelRef:D,children:o.jsx(T,{role:"alertdialog",...p,...s,ref:P,onOpenAutoFocus:S(s.onOpenAutoFocus,d=>{var A;d.preventDefault(),(A=D.current)==null||A.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:i})})},"AlertDialogContent")),G=r.forwardRef(n(function(e,a){const{__scopeAlertDialog:l,...i}=e,s=c(l);return o.jsx(b,{...s,...i,ref:a})},"AlertDialogTitle")),U=r.forwardRef(n(function(e,a){const{__scopeAlertDialog:l,...i}=e,s=c(l);return o.jsx($,{...s,...i,ref:a})},"AlertDialogDescription")),W=r.forwardRef(n(function(e,a){const{__scopeAlertDialog:l,...i}=e,s=c(l);return o.jsx(m,{...s,...i,ref:a})},"AlertDialogAction")),X="AlertDialogCancel",Y=r.forwardRef(n(function(e,a){const{__scopeAlertDialog:l,...i}=e,{cancelRef:s}=q(X,l),p=c(l),f=u(a,s);return o.jsx(m,{...p,...i,ref:f})},"AlertDialogCancel")),Z=I,ee=J,ae=K,N=L,j=B,y=W,_=Y,C=G,R=U;const fe=Z,De=ee,te=ae,w=r.forwardRef(({className:t,...e},a)=>o.jsx(N,{className:g("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,ref:a}));w.displayName=N.displayName;const oe=r.forwardRef(({className:t,...e},a)=>o.jsxs(te,{children:[o.jsx(w,{}),o.jsx(j,{ref:a,className:g("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",t),...e})]}));oe.displayName=j.displayName;const le=({className:t,...e})=>o.jsx("div",{className:g("flex flex-col space-y-2 text-center sm:text-left",t),...e});le.displayName="AlertDialogHeader";const re=({className:t,...e})=>o.jsx("div",{className:g("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});re.displayName="AlertDialogFooter";const se=r.forwardRef(({className:t,...e},a)=>o.jsx(C,{ref:a,className:g("text-lg font-semibold",t),...e}));se.displayName=C.displayName;const ie=r.forwardRef(({className:t,...e},a)=>o.jsx(R,{ref:a,className:g("text-sm text-muted-foreground",t),...e}));ie.displayName=R.displayName;const ne=r.forwardRef(({className:t,...e},a)=>o.jsx(y,{ref:a,className:g(x(),t),...e}));ne.displayName=y.displayName;const ce=r.forwardRef(({className:t,...e},a)=>o.jsx(_,{ref:a,className:g(x({variant:"outline"}),"mt-2 sm:mt-0",t),...e}));ce.displayName=_.displayName;export{fe as A,ne as a,ce as b,oe as c,ie as d,re as e,le as f,se as g,De as h};
Binary file
Binary file
@@ -1,11 +0,0 @@
1
- import{W as r,I as o}from"./index-Cajf0T-5.js";import{j as i}from"./vendor-react-AJpf4YZ0.js";/**
2
- * @license lucide-react v1.41.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 c=[["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"}]],h=r("play",c);/**
7
- * @license lucide-react v1.41.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 d=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],l=r("search",d);function m({value:e,onChange:t,placeholder:a,className:n}){return i.jsxs("div",{className:"relative",children:[i.jsx(l,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),i.jsx(o,{placeholder:a,value:e,onChange:s=>t(s.target.value),className:`h-8 pl-8 ${n??"w-48"}`})]})}async function y(){const e=await fetch("/api/v1/apps",{credentials:"include"});return e.ok?(await e.json()).items:[]}async function b({appId:e,search:t,statusFilter:a}){const n=new URLSearchParams({app_id:String(e),limit:"100",sort:"uploaded_at",dir:"desc"});t&&n.set("q",t),a&&a!=="all"&&n.set("status",a);const s=await fetch(`/api/v1/builds?${n}`,{credentials:"include"});return s.ok?(await s.json()).items:[]}async function w(e){const t=await fetch("/api/v1/apps",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return t.status===409?{error:"App with this bundle ID and platform already exists"}:t.ok?t.json():null}async function _(e,t){await fetch(`/api/v1/builds/${e}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({status_label:t})})}async function j(e){const t=await fetch(`/api/v1/builds/${e}/schedule-deletion`,{method:"POST",credentials:"include"});if(!t.ok)throw new Error(`Failed to schedule deletion (${t.status})`);return(await t.json()).delete_after}async function v(e){const t=await fetch(`/api/v1/builds/${e}/schedule-deletion`,{method:"DELETE",credentials:"include"});if(!t.ok)throw new Error(`Failed to cancel scheduled deletion (${t.status})`)}async function g(e){const t=await fetch(`/api/v1/builds/${e}`,{credentials:"include"});return t.ok?t.json():null}function k(e){const t=new Map;for(const a of e){const n=a.version_name??"Unversioned";t.has(n)||t.set(n,[]),t.get(n).push(a)}return Array.from(t.entries()).map(([a,n])=>({versionName:a,builds:n}))}const S={Backlog:"backlog","In Progress":"progress",Done:"done",Rejected:"rejected"};function $(e){return e.version_name&&e.build_number?`${e.version_name} · build ${e.build_number}`:e.version_name??e.version_label??(e.build_number?`build ${e.build_number}`:"Build")}export{h as P,S,l as a,m as b,$ as c,v as d,w as e,g as f,y as g,b as h,k as i,j as s,_ as u};
@@ -1,11 +0,0 @@
1
- import{i as t,j as n,r as Ee}from"./vendor-react-AJpf4YZ0.js";import{W as De,a9 as U,A as nt,t as L,K as E,P as rt,af as X,s as st,a8 as ye,ae as Me,Y as Oe,N as at,a1 as lt,ac as ct,R as it,F as dt,p as ut,O as pt,$ as ft,g as mt,V as ht,ab as gt,aa as Pe,v as St,J as M,e as xt,D as vt,o as wt,m as yt,j as ke,i as Ct,X as bt,n as Le,l as Ae,k as Be}from"./index-Cajf0T-5.js";/**
2
- * @license lucide-react v1.41.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 It=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ve=De("chevron-down",It);/**
7
- * @license lucide-react v1.41.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 Tt=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Pt=De("chevron-up",Tt);var Nt=Object.defineProperty,Rt=(s,e)=>Nt(s,"name",{value:e,configurable:!0});function ve(s,[e,r]){return Math.min(r,Math.max(e,s))}Rt(ve,"clamp");var _t=Object.defineProperty,jt=(s,e)=>_t(s,"name",{value:e,configurable:!0});function He(s){const e=t.useRef({value:s,previous:s});return t.useMemo(()=>(e.current.value!==s&&(e.current.previous=e.current.value,e.current.value=s),e.current.previous),[s])}jt(He,"usePrevious");var Et=Object.defineProperty,x=(s,e)=>Et(s,"name",{value:e,configurable:!0}),Dt=[" ","Enter","ArrowUp","ArrowDown"],Mt=[" ","Enter"],ie="Select",[me,he,Ot]=at(ie),[re,Co]=pt(ie,[Ot,Oe]),Ce=Oe(),[kt,Z]=re(ie),[Lt,At]=re(ie);function Fe(s){const{__scopeSelect:e,children:r,open:o,defaultOpen:u,onOpenChange:i,value:f,defaultValue:c,onValueChange:l,dir:a,name:S,autoComplete:v,disabled:C,required:I,form:T,internal_do_not_use_render:R}=s,d=Ce(e),[h,y]=t.useState(null),[m,p]=t.useState(null),[_,j]=t.useState(!1),J=gt(a),[k,B]=Pe({prop:o,defaultProp:u??!1,onChange:i,caller:ie}),[Q,z]=Pe({prop:f,defaultProp:c,onChange:l,caller:ie}),W=t.useRef(null),$=t.useRef(Q);t.useEffect(()=>{const D=T?h==null?void 0:h.ownerDocument.getElementById(T):h==null?void 0:h.form;if(D instanceof HTMLFormElement){const F=x(()=>z($.current),"reset");return D.addEventListener("reset",F),()=>D.removeEventListener("reset",F)}},[T,h,z]);const ee=h?!!T||!!h.closest("form"):!0,[K,V]=t.useState(new Set),G=Me(),Y=Array.from(K).map(D=>D.props.value).join(";"),q=t.useCallback(D=>{V(F=>new Set(F).add(D))},[]),H=t.useCallback(D=>{V(F=>{const le=new Set(F);return le.delete(D),le})},[]),ae={required:I,trigger:h,onTriggerChange:y,valueNode:m,onValueNodeChange:p,valueNodeHasChildren:_,onValueNodeHasChildrenChange:j,contentId:G,value:Q,onValueChange:z,open:k,onOpenChange:B,dir:J,triggerPointerDownPosRef:W,disabled:C,name:S,autoComplete:v,form:T,nativeOptions:K,nativeSelectKey:Y,isFormControl:ee};return n.jsx(St,{...d,children:n.jsx(kt,{scope:e,...ae,children:n.jsx(me.Provider,{scope:e,children:n.jsx(Lt,{scope:e,onNativeOptionAdd:q,onNativeOptionRemove:H,children:Je(R)?R(ae):r})})})})}x(Fe,"SelectProvider");var Bt=x(s=>{const{__scopeSelect:e,children:r,...o}=s;return n.jsx(Fe,{__scopeSelect:e,...o,internal_do_not_use_render:({isFormControl:u})=>n.jsxs(n.Fragment,{children:[r,u?n.jsx(lo,{__scopeSelect:e}):null]})})},"Select"),Vt="SelectTrigger",Ue=t.forwardRef(x(function(e,r){const{__scopeSelect:o,disabled:u=!1,...i}=e,f=Ce(o),c=Z(Vt,o),l=c.disabled||u,a=U(r,c.onTriggerChange),S=he(o),v=t.useRef("touch"),[C,I,T]=Ie(d=>{const h=S().filter(p=>!p.disabled),y=h.find(p=>p.value===c.value),m=Te(h,d,y);m!==void 0&&c.onValueChange(m.value)}),R=x(d=>{l||(c.onOpenChange(!0),T()),d&&(c.triggerPointerDownPosRef.current={x:Math.round(d.pageX),y:Math.round(d.pageY)})},"handleOpen");return n.jsx(nt,{asChild:!0,...f,children:n.jsx(L.button,{type:"button",role:"combobox","aria-controls":c.open?c.contentId:void 0,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":ue(c.value)?"":void 0,...i,ref:a,onClick:E(i.onClick,d=>{d.currentTarget.focus(),v.current!=="mouse"&&R(d)}),onPointerDown:E(i.onPointerDown,d=>{v.current=d.pointerType;const h=d.target;h.hasPointerCapture(d.pointerId)&&h.releasePointerCapture(d.pointerId),d.button===0&&d.ctrlKey===!1&&d.pointerType==="mouse"&&(R(d),d.preventDefault())}),onKeyDown:E(i.onKeyDown,d=>{const h=C.current!=="";!(d.ctrlKey||d.altKey||d.metaKey)&&d.key.length===1&&I(d.key),!(h&&d.key===" ")&&Dt.includes(d.key)&&(R(),d.preventDefault())})})})},"SelectTrigger")),Ht="SelectValue",Ft=t.forwardRef(x(function(e,r){const{__scopeSelect:o,className:u,style:i,children:f,placeholder:c="",...l}=e,a=Z(Ht,o),{onValueNodeHasChildrenChange:S}=a,v=f!==void 0,C=U(r,a.onValueNodeChange);X(()=>{S(v)},[S,v]);const I=ue(a.value);return n.jsx(L.span,{...l,asChild:I?!1:l.asChild,ref:C,style:{pointerEvents:"none"},children:n.jsx(t.Fragment,{children:I?c:f},I?"placeholder":"value")})},"SelectValue")),Ut=t.forwardRef(x(function(e,r){const{__scopeSelect:o,children:u,...i}=e;return n.jsx(L.span,{"aria-hidden":!0,...i,ref:r,children:u||"▼"})},"SelectIcon")),Wt="SelectPortal",[$t,Kt]=re(Wt,{forceMount:void 0}),zt=x(s=>{const{__scopeSelect:e,forceMount:r,...o}=s;return n.jsx($t,{scope:s.__scopeSelect,forceMount:r,children:n.jsx(rt,{asChild:!0,...o})})},"SelectPortal"),ne="SelectContent",We=t.forwardRef(x(function(e,r){const o=Kt(ne,e.__scopeSelect),{forceMount:u=o.forceMount,...i}=e,f=Z(ne,e.__scopeSelect),[c,l]=t.useState();return X(()=>{l(new DocumentFragment)},[]),n.jsx(st,{present:u||f.open,children:({present:a})=>a?n.jsx(qt,{...i,ref:r}):n.jsx(Gt,{...i,fragment:c})})},"SelectContent")),Gt=t.forwardRef(x(function(e,r){const{__scopeSelect:o,children:u,fragment:i}=e;return i?Ee.createPortal(n.jsx($e,{scope:o,children:n.jsx(me.Slot,{scope:o,children:n.jsx("div",{ref:r,children:u})})}),i):null},"SelectContentFragment")),A=10,[$e,se]=re(ne),Yt=ft("SelectContent.RemoveScroll"),qt=t.forwardRef(x(function(e,r){const{__scopeSelect:o}=e,{position:u="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:f,onPointerDownOutside:c,side:l,sideOffset:a,align:S,alignOffset:v,arrowPadding:C,collisionBoundary:I,collisionPadding:T,sticky:R,hideWhenDetached:d,avoidCollisions:h,...y}=e,m=Z(ne,o),[p,_]=t.useState(null),[j,J]=t.useState(null),k=U(r,_),[B,Q]=t.useState(null),[z,W]=t.useState(null),$=he(o),[ee,K]=t.useState(!1),V=t.useRef(!1);t.useEffect(()=>{if(p)return lt(p)},[p]),ct();const G=t.useCallback(g=>{const[N,...O]=$().map(b=>b.ref.current),[P]=O.slice(-1),w=document.activeElement;for(const b of g)if(b===w||(b==null||b.scrollIntoView({block:"nearest"}),b===N&&j&&(j.scrollTop=0),b===P&&j&&(j.scrollTop=j.scrollHeight),b==null||b.focus(),document.activeElement!==w))return},[$,j]),Y=t.useCallback(()=>G([B,p]),[G,B,p]);t.useEffect(()=>{ee&&Y()},[ee,Y]);const{onOpenChange:q,triggerPointerDownPosRef:H}=m;t.useEffect(()=>{if(p){let g={x:0,y:0};const N=x(P=>{var w,b;g={x:Math.abs(Math.round(P.pageX)-(((w=H.current)==null?void 0:w.x)??0)),y:Math.abs(Math.round(P.pageY)-(((b=H.current)==null?void 0:b.y)??0))}},"handlePointerMove"),O=x(P=>{g.x<=10&&g.y<=10?P.preventDefault():P.composedPath().includes(p)||q(!1),document.removeEventListener("pointermove",N),H.current=null},"handlePointerUp");return H.current!==null&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",O,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",O,{capture:!0})}}},[p,q,H]),t.useEffect(()=>{const g=x(()=>q(!1),"close");return window.addEventListener("blur",g),window.addEventListener("resize",g),()=>{window.removeEventListener("blur",g),window.removeEventListener("resize",g)}},[q]);const[ae,D]=Ie(g=>{const N=$().filter(w=>!w.disabled),O=N.find(w=>w.ref.current===document.activeElement),P=Te(N,g,O);P&&setTimeout(()=>{var w;return(w=P.ref.current)==null?void 0:w.focus()})}),F=t.useCallback((g,N,O)=>{const P=!V.current&&!O;(m.value!==void 0&&m.value===N||P)&&(Q(g),P&&(V.current=!0))},[m.value]),le=t.useCallback(()=>p==null?void 0:p.focus(),[p]),ce=t.useCallback((g,N,O)=>{const P=!V.current&&!O;(m.value!==void 0&&m.value===N||P)&&W(g)},[m.value]),pe=u==="popper"?Ne:Xt,de=pe===Ne?{side:l,sideOffset:a,align:S,alignOffset:v,arrowPadding:C,collisionBoundary:I,collisionPadding:T,sticky:R,hideWhenDetached:d,avoidCollisions:h}:{};return n.jsx($e,{scope:o,content:p,viewport:j,onViewportChange:J,itemRefCallback:F,selectedItem:B,onItemLeave:le,itemTextRefCallback:ce,focusSelectedItem:Y,selectedItemText:z,position:u,isPositioned:ee,searchRef:ae,children:n.jsx(it,{as:Yt,allowPinchZoom:!0,children:n.jsx(dt,{asChild:!0,trapped:m.open,onMountAutoFocus:g=>{g.preventDefault()},onUnmountAutoFocus:E(i,g=>{var N;(N=m.trigger)==null||N.focus({preventScroll:!0}),g.preventDefault()}),children:n.jsx(ut,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:f,onPointerDownOutside:c,onFocusOutside:g=>g.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:n.jsx(pe,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:g=>g.preventDefault(),...y,...de,onPlaced:()=>K(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:E(y.onKeyDown,g=>{const N=g.ctrlKey||g.altKey||g.metaKey;if(g.key==="Tab"&&g.preventDefault(),!N&&g.key.length===1&&D(g.key),["ArrowUp","ArrowDown","Home","End"].includes(g.key)){let P=$().filter(w=>!w.disabled).map(w=>w.ref.current);if(["ArrowUp","End"].includes(g.key)&&(P=P.slice().reverse()),["ArrowUp","ArrowDown"].includes(g.key)){const w=g.target,b=P.indexOf(w);P=P.slice(b+1)}setTimeout(()=>G(P)),g.preventDefault()}})})})})})})},"SelectContentImpl")),Xt=t.forwardRef(x(function(e,r){const{__scopeSelect:o,onPlaced:u,...i}=e,f=Z(ne,o),c=se(ne,o),[l,a]=t.useState(null),[S,v]=t.useState(null),C=U(r,v),I=he(o),T=t.useRef(!1),R=t.useRef(!0),{viewport:d,selectedItem:h,selectedItemText:y,focusSelectedItem:m}=c,p=t.useCallback(()=>{if(f.trigger&&f.valueNode&&l&&S&&d&&h&&y){const k=f.trigger.getBoundingClientRect(),B=S.getBoundingClientRect(),Q=f.valueNode.getBoundingClientRect(),z=y.getBoundingClientRect();if(f.dir!=="rtl"){const w=z.left-B.left,b=Q.left-w,te=k.left-b,oe=k.width+te,ge=Math.max(oe,B.width),Se=window.innerWidth-A,xe=ve(b,[A,Math.max(A,Se-ge)]);l.style.minWidth=oe+"px",l.style.left=xe+"px"}else{const w=B.right-z.right,b=window.innerWidth-Q.right-w,te=window.innerWidth-k.right-b,oe=k.width+te,ge=Math.max(oe,B.width),Se=window.innerWidth-A,xe=ve(b,[A,Math.max(A,Se-ge)]);l.style.minWidth=oe+"px",l.style.right=xe+"px"}const W=I(),$=window.innerHeight-A*2,ee=d.scrollHeight,K=window.getComputedStyle(S),V=parseInt(K.borderTopWidth,10),G=parseInt(K.paddingTop,10),Y=parseInt(K.borderBottomWidth,10),q=parseInt(K.paddingBottom,10),H=V+G+ee+q+Y,ae=Math.min(h.offsetHeight*5,H),D=window.getComputedStyle(d),F=parseInt(D.paddingTop,10),le=parseInt(D.paddingBottom,10),ce=k.top+k.height/2-A,pe=$-ce,de=h.offsetHeight/2,g=h.offsetTop+de,N=V+G+g,O=H-N;if(N<=ce){const w=W.length>0&&h===W[W.length-1].ref.current;l.style.bottom="0px";const b=S.clientHeight-d.offsetTop-d.offsetHeight,te=Math.max(pe,de+(w?le:0)+b+Y),oe=N+te;l.style.height=oe+"px"}else{const w=W.length>0&&h===W[0].ref.current;l.style.top="0px";const te=Math.max(ce,V+d.offsetTop+(w?F:0)+de)+O;l.style.height=te+"px",d.scrollTop=N-ce+d.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=ae+"px",l.style.maxHeight=$+"px",u==null||u(),requestAnimationFrame(()=>T.current=!0)}},[I,f.trigger,f.valueNode,l,S,d,h,y,f.dir,u]);X(()=>p(),[p]);const[_,j]=t.useState();X(()=>{S&&j(window.getComputedStyle(S).zIndex)},[S]);const J=t.useCallback(k=>{k&&R.current===!0&&(p(),m==null||m(),R.current=!1)},[p,m]);return n.jsx(Zt,{scope:o,contentWrapper:l,shouldExpandOnScrollRef:T,onScrollButtonChange:J,children:n.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:n.jsx(L.div,{...i,ref:C,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})},"SelectItemAlignedPosition")),Ne=t.forwardRef(x(function(e,r){const{__scopeSelect:o,align:u="start",collisionPadding:i=A,...f}=e,c=Ce(o);return n.jsx(mt,{...c,...f,ref:r,align:u,collisionPadding:i,style:{boxSizing:"border-box",...f.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")),[Zt,be]=re(ne,{}),Re="SelectViewport",Jt=t.forwardRef(x(function(e,r){const{__scopeSelect:o,nonce:u,...i}=e,f=se(Re,o),c=be(Re,o),l=U(r,f.onViewportChange),a=t.useRef(0);return n.jsxs(n.Fragment,{children:[n.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:u}),n.jsx(me.Slot,{scope:o,children:n.jsx(L.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:E(i.onScroll,S=>{const v=S.currentTarget,{contentWrapper:C,shouldExpandOnScrollRef:I}=c;if(I!=null&&I.current&&C){const T=Math.abs(a.current-v.scrollTop);if(T>0){const R=window.innerHeight-A*2,d=parseFloat(C.style.minHeight),h=parseFloat(C.style.height),y=Math.max(d,h);if(y<R){const m=y+T,p=Math.min(R,m),_=m-p;C.style.height=p+"px",C.style.bottom==="0px"&&(v.scrollTop=_>0?_:0,C.style.justifyContent="flex-end")}}}a.current=v.scrollTop})})})]})},"SelectViewport")),Qt="SelectGroup",[bo,eo]=re(Qt),to="SelectLabel",Ke=t.forwardRef(x(function(e,r){const{__scopeSelect:o,...u}=e,i=eo(to,o);return n.jsx(L.div,{id:i.id,...u,ref:r})},"SelectLabel")),we="SelectItem",[oo,ze]=re(we),Ge=t.forwardRef(x(function(e,r){const{__scopeSelect:o,value:u,disabled:i=!1,textValue:f,...c}=e,l=Z(we,o),a=se(we,o),S=l.value===u,[v,C]=t.useState(f??""),[I,T]=t.useState(!1),R=ye(p=>{var _;return(_=a.itemRefCallback)==null?void 0:_.call(a,p,u,i)}),d=U(r,R),h=Me(),y=t.useRef("touch"),m=x(()=>{i||(l.onValueChange(u),l.onOpenChange(!1))},"handleSelect");return n.jsx(oo,{scope:o,value:u,disabled:i,textId:h,isSelected:S,onItemTextChange:t.useCallback(p=>{C(_=>_||((p==null?void 0:p.textContent)??"").trim())},[]),children:n.jsx(me.ItemSlot,{scope:o,value:u,disabled:i,textValue:v,children:n.jsx(L.div,{role:"option","aria-labelledby":h,"data-highlighted":I?"":void 0,"aria-selected":S&&I,"data-state":S?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...c,ref:d,onFocus:E(c.onFocus,()=>T(!0)),onBlur:E(c.onBlur,()=>T(!1)),onClick:E(c.onClick,()=>{y.current!=="mouse"&&m()}),onPointerUp:E(c.onPointerUp,()=>{y.current==="mouse"&&m()}),onPointerDown:E(c.onPointerDown,p=>{y.current=p.pointerType}),onPointerMove:E(c.onPointerMove,p=>{var _;y.current=p.pointerType,i?(_=a.onItemLeave)==null||_.call(a):y.current==="mouse"&&p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:E(c.onPointerLeave,p=>{var _;p.currentTarget===document.activeElement&&((_=a.onItemLeave)==null||_.call(a))}),onKeyDown:E(c.onKeyDown,p=>{var j;i||p.target!==p.currentTarget||((j=a.searchRef)==null?void 0:j.current)!==""&&p.key===" "||(Mt.includes(p.key)&&m(),p.key===" "&&p.preventDefault())})})})})},"SelectItem")),fe="SelectItemText",no=t.forwardRef(x(function(e,r){const{__scopeSelect:o,className:u,style:i,...f}=e,c=Z(fe,o),l=se(fe,o),a=ze(fe,o),S=At(fe,o),[v,C]=t.useState(null),I=ye(m=>{var p;return(p=l.itemTextRefCallback)==null?void 0:p.call(l,m,a.value,a.disabled)}),T=U(r,C,a.onItemTextChange,I),R=v==null?void 0:v.textContent,d=t.useMemo(()=>n.jsx("option",{value:a.value,disabled:a.disabled,children:R},a.value),[a.disabled,a.value,R]),{onNativeOptionAdd:h,onNativeOptionRemove:y}=S;return X(()=>(h(d),()=>y(d)),[h,y,d]),n.jsxs(n.Fragment,{children:[n.jsx(L.span,{id:a.textId,...f,ref:T}),a.isSelected&&c.valueNode&&!c.valueNodeHasChildren&&!ue(c.value)?Ee.createPortal(f.children,c.valueNode):null]})},"SelectItemText")),ro="SelectItemIndicator",so=t.forwardRef(x(function(e,r){const{__scopeSelect:o,...u}=e;return ze(ro,o).isSelected?n.jsx(L.span,{"aria-hidden":!0,...u,ref:r}):null},"SelectItemIndicator")),_e="SelectScrollUpButton",Ye=t.forwardRef(x(function(e,r){const o=se(_e,e.__scopeSelect),u=be(_e,e.__scopeSelect),[i,f]=t.useState(!1),c=U(r,u.onScrollButtonChange);return X(()=>{if(o.viewport&&o.isPositioned){let l=function(){const S=a.scrollTop>0;f(S)};x(l,"handleScroll");const a=o.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[o.viewport,o.isPositioned]),i?n.jsx(Xe,{...e,ref:c,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=o;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null},"SelectScrollUpButton")),je="SelectScrollDownButton",qe=t.forwardRef(x(function(e,r){const o=se(je,e.__scopeSelect),u=be(je,e.__scopeSelect),[i,f]=t.useState(!1),c=U(r,u.onScrollButtonChange);return X(()=>{if(o.viewport&&o.isPositioned){let l=function(){const S=a.scrollHeight-a.clientHeight,v=Math.ceil(a.scrollTop)<S;f(v)};x(l,"handleScroll");const a=o.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[o.viewport,o.isPositioned]),i?n.jsx(Xe,{...e,ref:c,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=o;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null},"SelectScrollDownButton")),Xe=t.forwardRef(x(function(e,r){const{__scopeSelect:o,onAutoScroll:u,...i}=e,f=se("SelectScrollButton",o),c=t.useRef(null),l=he(o),a=t.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return t.useEffect(()=>()=>a(),[a]),X(()=>{var v;const S=l().find(C=>C.ref.current===document.activeElement);(v=S==null?void 0:S.ref.current)==null||v.scrollIntoView({block:"nearest"})},[l]),n.jsx(L.div,{"aria-hidden":!0,...i,ref:r,style:{flexShrink:0,...i.style},onPointerDown:E(i.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(u,50))}),onPointerMove:E(i.onPointerMove,()=>{var S;(S=f.onItemLeave)==null||S.call(f),c.current===null&&(c.current=window.setInterval(u,50))}),onPointerLeave:E(i.onPointerLeave,()=>{a()})})},"SelectScrollButtonImpl")),Ze=t.forwardRef(x(function(e,r){const{__scopeSelect:o,...u}=e;return n.jsx(L.div,{"aria-hidden":!0,...u,ref:r})},"SelectSeparator")),ao="SelectBubbleInput",lo=t.forwardRef(x(function({__scopeSelect:e,...r},o){const u=Z(ao,e),{value:i,onValueChange:f,required:c,disabled:l,name:a,autoComplete:S,form:v}=u,{nativeOptions:C,nativeSelectKey:I}=u,T=t.useRef(null),R=U(o,T),d=i??"",h=He(d),y=Array.from(C).some(m=>(m.props.value??"")==="");return t.useEffect(()=>{const m=T.current;if(!m)return;const p=window.HTMLSelectElement.prototype,j=Object.getOwnPropertyDescriptor(p,"value").set;if(h!==d&&j){const J=new Event("change",{bubbles:!0});j.call(m,d),m.dispatchEvent(J)}},[h,d]),n.jsxs(L.select,{"aria-hidden":!0,required:c,tabIndex:-1,name:a,autoComplete:S,disabled:l,form:v,onChange:m=>f(m.target.value),...r,style:{...ht,...r.style},ref:R,defaultValue:d,children:[ue(i)&&!y?n.jsx("option",{value:""}):null,Array.from(C)]},I)},"SelectBubbleInput"));function Je(s){return typeof s=="function"}x(Je,"isFunction");function ue(s){return s===""||s===void 0}x(ue,"shouldShowPlaceholder");function Ie(s){const e=ye(s),r=t.useRef(""),o=t.useRef(0),u=t.useCallback(f=>{const c=r.current+f;e(c),x((function l(a){r.current=a,window.clearTimeout(o.current),a!==""&&(o.current=window.setTimeout(()=>l(""),1e3))}),"updateSearch")(c)},[e]),i=t.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return t.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,u,i]}x(Ie,"useTypeaheadSearch");function Te(s,e,r){const u=e.length>1&&Array.from(e).every(a=>a===e[0])?e[0]:e,i=r?s.indexOf(r):-1;let f=Qe(s,Math.max(i,0));u.length===1&&(f=f.filter(a=>a!==r));const l=f.find(a=>a.textValue.toLowerCase().startsWith(u.toLowerCase()));return l!==r?l:void 0}x(Te,"findNextItem");function Qe(s,e){return s.map((r,o)=>s[(e+o)%s.length])}x(Qe,"wrapArray");const Io=Bt,To=Ft,co=t.forwardRef(({className:s,children:e,...r},o)=>n.jsxs(Ue,{ref:o,className: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),...r,children:[e,n.jsx(Ut,{asChild:!0,children:n.jsx(Ve,{className:"h-4 w-4 opacity-50"})})]}));co.displayName=Ue.displayName;const et=t.forwardRef(({className:s,...e},r)=>n.jsx(Ye,{ref:r,className:M("flex cursor-default items-center justify-center py-1",s),...e,children:n.jsx(Pt,{className:"h-4 w-4"})}));et.displayName=Ye.displayName;const tt=t.forwardRef(({className:s,...e},r)=>n.jsx(qe,{ref:r,className:M("flex cursor-default items-center justify-center py-1",s),...e,children:n.jsx(Ve,{className:"h-4 w-4"})}));tt.displayName=qe.displayName;const io=t.forwardRef(({className:s,children:e,position:r="popper",...o},u)=>n.jsx(zt,{children:n.jsxs(We,{ref:u,className: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]",r==="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",s),position:r,...o,children:[n.jsx(et,{}),n.jsx(Jt,{className:M("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),n.jsx(tt,{})]})}));io.displayName=We.displayName;const uo=t.forwardRef(({className:s,...e},r)=>n.jsx(Ke,{ref:r,className:M("py-1.5 pl-8 pr-2 text-sm font-semibold",s),...e}));uo.displayName=Ke.displayName;const po=t.forwardRef(({className:s,children:e,...r},o)=>n.jsxs(Ge,{ref:o,className: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),...r,children:[n.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(so,{children:n.jsx(xt,{className:"h-4 w-4"})})}),n.jsx(no,{children:e})]}));po.displayName=Ge.displayName;const fo=t.forwardRef(({className:s,...e},r)=>n.jsx(Ze,{ref:r,className:M("-mx-1 my-1 h-px bg-muted",s),...e}));fo.displayName=Ze.displayName;const Po=vt,No=wt,mo=yt,ot=t.forwardRef(({className:s,...e},r)=>n.jsx(Ae,{ref:r,className: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",s),...e}));ot.displayName=Ae.displayName;const ho=t.forwardRef(({className:s,children:e,...r},o)=>n.jsxs(mo,{children:[n.jsx(ot,{}),n.jsxs(ke,{ref:o,className: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),...r,children:[e,n.jsxs(Ct,{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:[n.jsx(bt,{className:"h-4 w-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ho.displayName=ke.displayName;const go=({className:s,...e})=>n.jsx("div",{className:M("flex flex-col space-y-1.5 text-center sm:text-left",s),...e});go.displayName="DialogHeader";const So=({className:s,...e})=>n.jsx("div",{className:M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...e});So.displayName="DialogFooter";const xo=t.forwardRef(({className:s,...e},r)=>n.jsx(Le,{ref:r,className:M("text-lg font-semibold leading-none tracking-tight",s),...e}));xo.displayName=Le.displayName;const vo=t.forwardRef(({className:s,...e},r)=>n.jsx(Be,{ref:r,className:M("text-sm text-muted-foreground",s),...e}));vo.displayName=Be.displayName;export{Ve as C,Po as D,Io as S,ho as a,vo as b,So as c,go as d,xo as e,No as f,io as g,po as h,co as i,To as j,ve as k};
Binary file
Binary file