@tapflowio/relay 0.23.0 → 0.25.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 (204) hide show
  1. package/dist/RelayServer.d.ts +45 -0
  2. package/dist/RelayServer.d.ts.map +1 -1
  3. package/dist/RelayServer.js +263 -38
  4. package/dist/RelayServer.js.map +1 -1
  5. package/dist/api/apps.d.ts.map +1 -1
  6. package/dist/api/apps.js +6 -16
  7. package/dist/api/apps.js.map +1 -1
  8. package/dist/api/auth.d.ts +1 -1
  9. package/dist/api/auth.d.ts.map +1 -1
  10. package/dist/api/auth.js +13 -14
  11. package/dist/api/auth.js.map +1 -1
  12. package/dist/api/builds.d.ts +1 -1
  13. package/dist/api/builds.d.ts.map +1 -1
  14. package/dist/api/builds.js +15 -7
  15. package/dist/api/builds.js.map +1 -1
  16. package/dist/api/comments.d.ts.map +1 -1
  17. package/dist/api/comments.js +41 -15
  18. package/dist/api/comments.js.map +1 -1
  19. package/dist/api/invitations.d.ts +1 -1
  20. package/dist/api/invitations.d.ts.map +1 -1
  21. package/dist/api/invitations.js +7 -3
  22. package/dist/api/invitations.js.map +1 -1
  23. package/dist/api/passwordReset.js +2 -2
  24. package/dist/api/team.d.ts +2 -2
  25. package/dist/api/team.d.ts.map +1 -1
  26. package/dist/api/team.js +6 -2
  27. package/dist/api/team.js.map +1 -1
  28. package/dist/api/tokens.d.ts +1 -1
  29. package/dist/api/tokens.d.ts.map +1 -1
  30. package/dist/api/tokens.js +26 -7
  31. package/dist/api/tokens.js.map +1 -1
  32. package/dist/api/webhooks.d.ts.map +1 -1
  33. package/dist/api/webhooks.js +11 -5
  34. package/dist/api/webhooks.js.map +1 -1
  35. package/dist/index.d.ts +3 -1
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +2 -1
  38. package/dist/index.js.map +1 -1
  39. package/dist/lib/buildFiles.d.ts +23 -0
  40. package/dist/lib/buildFiles.d.ts.map +1 -0
  41. package/dist/lib/buildFiles.js +39 -0
  42. package/dist/lib/buildFiles.js.map +1 -0
  43. package/dist/lib/clientAddress.d.ts +7 -0
  44. package/dist/lib/clientAddress.d.ts.map +1 -1
  45. package/dist/lib/clientAddress.js +15 -0
  46. package/dist/lib/clientAddress.js.map +1 -1
  47. package/dist/lib/config.d.ts +26 -1
  48. package/dist/lib/config.d.ts.map +1 -1
  49. package/dist/lib/config.js +81 -17
  50. package/dist/lib/config.js.map +1 -1
  51. package/dist/lib/connectionAuth.d.ts +57 -2
  52. package/dist/lib/connectionAuth.d.ts.map +1 -1
  53. package/dist/lib/connectionAuth.js +65 -6
  54. package/dist/lib/connectionAuth.js.map +1 -1
  55. package/dist/lib/dataDir.d.ts +48 -1
  56. package/dist/lib/dataDir.d.ts.map +1 -1
  57. package/dist/lib/dataDir.js +108 -12
  58. package/dist/lib/dataDir.js.map +1 -1
  59. package/dist/middleware/auth.d.ts +44 -4
  60. package/dist/middleware/auth.d.ts.map +1 -1
  61. package/dist/middleware/auth.js +102 -30
  62. package/dist/middleware/auth.js.map +1 -1
  63. package/dist/server.js +2 -1
  64. package/dist/server.js.map +1 -1
  65. package/package.json +4 -4
  66. package/public/assets/AppCenter-D_1rFI40.js +26 -0
  67. package/public/assets/AppCenter-D_1rFI40.js.br +0 -0
  68. package/public/assets/AppCenter-D_1rFI40.js.gz +0 -0
  69. package/public/assets/Default-DF_X2_3I.js +1 -0
  70. package/public/assets/Default-DF_X2_3I.js.br +0 -0
  71. package/public/assets/Default-DF_X2_3I.js.gz +0 -0
  72. package/public/assets/Invite-DETTWdYp.js +1 -0
  73. package/public/assets/Invite-DETTWdYp.js.br +0 -0
  74. package/public/assets/Invite-DETTWdYp.js.gz +0 -0
  75. package/public/assets/MacResources--1Enisxs.js +1 -0
  76. package/public/assets/MacResources--1Enisxs.js.br +0 -0
  77. package/public/assets/MacResources--1Enisxs.js.gz +0 -0
  78. package/public/assets/NotFound-wHOnT2Fl.js +1 -0
  79. package/public/assets/NotFound-wHOnT2Fl.js.br +0 -0
  80. package/public/assets/NotFound-wHOnT2Fl.js.gz +0 -0
  81. package/public/assets/QASession-BjoD9Toj.js +150 -0
  82. package/public/assets/QASession-BjoD9Toj.js.br +0 -0
  83. package/public/assets/QASession-BjoD9Toj.js.gz +0 -0
  84. package/public/assets/ResetPassword-B9miyXTP.js +1 -0
  85. package/public/assets/ResetPassword-B9miyXTP.js.br +0 -0
  86. package/public/assets/ResetPassword-B9miyXTP.js.gz +0 -0
  87. package/public/assets/Setup-CywZCqHU.js +1 -0
  88. package/public/assets/Setup-CywZCqHU.js.br +0 -0
  89. package/public/assets/Setup-CywZCqHU.js.gz +0 -0
  90. package/public/assets/Team-CxdX_9mY.js +6 -0
  91. package/public/assets/Team-CxdX_9mY.js.br +0 -0
  92. package/public/assets/Team-CxdX_9mY.js.gz +0 -0
  93. package/public/assets/Tokens-BQnnawvG.js +1 -0
  94. package/public/assets/Tokens-BQnnawvG.js.br +0 -0
  95. package/public/assets/Tokens-BQnnawvG.js.gz +0 -0
  96. package/public/assets/alert-dialog-CuPdBkxF.js +1 -0
  97. package/public/assets/alert-dialog-CuPdBkxF.js.br +0 -0
  98. package/public/assets/alert-dialog-CuPdBkxF.js.gz +0 -0
  99. package/public/assets/badge-CSVsKOK_.js +1 -0
  100. package/public/assets/badge-CSVsKOK_.js.br +0 -0
  101. package/public/assets/badge-CSVsKOK_.js.gz +0 -0
  102. package/public/assets/build-format-l9BrlbZl.js +11 -0
  103. package/public/assets/build-format-l9BrlbZl.js.br +0 -0
  104. package/public/assets/build-format-l9BrlbZl.js.gz +0 -0
  105. package/public/assets/dialog-B6jt7-2f.js +11 -0
  106. package/public/assets/dialog-B6jt7-2f.js.br +0 -0
  107. package/public/assets/dialog-B6jt7-2f.js.gz +0 -0
  108. package/public/assets/index-Cm17I31a.js +218 -0
  109. package/public/assets/index-Cm17I31a.js.br +0 -0
  110. package/public/assets/index-Cm17I31a.js.gz +0 -0
  111. package/public/assets/index-D_P99bPX.css +1 -0
  112. package/public/assets/index-D_P99bPX.css.br +0 -0
  113. package/public/assets/index-D_P99bPX.css.gz +0 -0
  114. package/public/assets/list-view-Bp6pvsde.js +1 -0
  115. package/public/assets/list-view-Bp6pvsde.js.br +0 -0
  116. package/public/assets/list-view-Bp6pvsde.js.gz +0 -0
  117. package/public/assets/{pencil-CPaoEKFm.js → pencil-g-WiK1F2.js} +2 -2
  118. package/public/assets/pencil-g-WiK1F2.js.br +0 -0
  119. package/public/assets/pencil-g-WiK1F2.js.gz +0 -0
  120. package/public/assets/resource-health-BbeyA8an.js +1 -0
  121. package/public/assets/resource-health-BbeyA8an.js.br +0 -0
  122. package/public/assets/resource-health-BbeyA8an.js.gz +0 -0
  123. package/public/assets/{trash-CD9Y9G-i.js → trash-DHPg15P4.js} +3 -3
  124. package/public/assets/trash-DHPg15P4.js.br +0 -0
  125. package/public/assets/trash-DHPg15P4.js.gz +0 -0
  126. package/public/assets/useFocusAfterSwap-BY3N9f9v.js +1 -0
  127. package/public/assets/useFocusAfterSwap-BY3N9f9v.js.br +0 -0
  128. package/public/assets/useFocusAfterSwap-BY3N9f9v.js.gz +0 -0
  129. package/public/assets/{vendor-charts-YPhPkjLw.js → vendor-charts-BykzUV2D.js} +1 -1
  130. package/public/assets/vendor-charts-BykzUV2D.js.br +0 -0
  131. package/public/assets/vendor-charts-BykzUV2D.js.gz +0 -0
  132. package/public/assets/{vendor-react-C5H_1fOn.js → vendor-react-BlPSzrEe.js} +18 -10
  133. package/public/assets/vendor-react-BlPSzrEe.js.br +0 -0
  134. package/public/assets/vendor-react-BlPSzrEe.js.gz +0 -0
  135. package/public/assets/{vendor-router-CnmrRwJF.js → vendor-router-B_lVHrKl.js} +3 -3
  136. package/public/assets/vendor-router-B_lVHrKl.js.br +0 -0
  137. package/public/assets/vendor-router-B_lVHrKl.js.gz +0 -0
  138. package/public/index.html +4 -4
  139. package/public/index.html.br +0 -0
  140. package/public/index.html.gz +0 -0
  141. package/public/assets/AppCenter-OTDuqwSf.js +0 -21
  142. package/public/assets/AppCenter-OTDuqwSf.js.br +0 -0
  143. package/public/assets/AppCenter-OTDuqwSf.js.gz +0 -0
  144. package/public/assets/Default-D9GLpWlN.js +0 -1
  145. package/public/assets/Default-D9GLpWlN.js.br +0 -0
  146. package/public/assets/Default-D9GLpWlN.js.gz +0 -0
  147. package/public/assets/Invite-Bhiam8En.js +0 -1
  148. package/public/assets/Invite-Bhiam8En.js.br +0 -0
  149. package/public/assets/Invite-Bhiam8En.js.gz +0 -0
  150. package/public/assets/MacResources-DObzVJxQ.js +0 -3
  151. package/public/assets/MacResources-DObzVJxQ.js.br +0 -0
  152. package/public/assets/MacResources-DObzVJxQ.js.gz +0 -0
  153. package/public/assets/NotFound-Dz_k_Mzf.js +0 -1
  154. package/public/assets/NotFound-Dz_k_Mzf.js.br +0 -0
  155. package/public/assets/NotFound-Dz_k_Mzf.js.gz +0 -0
  156. package/public/assets/QASession-2crubOLY.js +0 -150
  157. package/public/assets/QASession-2crubOLY.js.br +0 -0
  158. package/public/assets/QASession-2crubOLY.js.gz +0 -0
  159. package/public/assets/ResetPassword-EUm12ojo.js +0 -1
  160. package/public/assets/ResetPassword-EUm12ojo.js.br +0 -0
  161. package/public/assets/ResetPassword-EUm12ojo.js.gz +0 -0
  162. package/public/assets/Setup-Fc_0RW0a.js +0 -1
  163. package/public/assets/Setup-Fc_0RW0a.js.br +0 -0
  164. package/public/assets/Setup-Fc_0RW0a.js.gz +0 -0
  165. package/public/assets/Team-Ac5aOGgx.js +0 -6
  166. package/public/assets/Team-Ac5aOGgx.js.br +0 -0
  167. package/public/assets/Team-Ac5aOGgx.js.gz +0 -0
  168. package/public/assets/Tokens-pEnCy-7l.js +0 -1
  169. package/public/assets/Tokens-pEnCy-7l.js.br +0 -0
  170. package/public/assets/Tokens-pEnCy-7l.js.gz +0 -0
  171. package/public/assets/alert-dialog-DhOTocMh.js +0 -1
  172. package/public/assets/alert-dialog-DhOTocMh.js.br +0 -0
  173. package/public/assets/alert-dialog-DhOTocMh.js.gz +0 -0
  174. package/public/assets/badge-B4gbViMs.js +0 -1
  175. package/public/assets/badge-B4gbViMs.js.br +0 -0
  176. package/public/assets/badge-B4gbViMs.js.gz +0 -0
  177. package/public/assets/build-format-DKGajT96.js +0 -11
  178. package/public/assets/build-format-DKGajT96.js.br +0 -0
  179. package/public/assets/build-format-DKGajT96.js.gz +0 -0
  180. package/public/assets/dialog-DEL1xxKJ.js +0 -11
  181. package/public/assets/dialog-DEL1xxKJ.js.br +0 -0
  182. package/public/assets/dialog-DEL1xxKJ.js.gz +0 -0
  183. package/public/assets/index-Bxs7CdEi.css +0 -1
  184. package/public/assets/index-Bxs7CdEi.css.br +0 -0
  185. package/public/assets/index-Bxs7CdEi.css.gz +0 -0
  186. package/public/assets/index-COIlCLCW.js +0 -218
  187. package/public/assets/index-COIlCLCW.js.br +0 -0
  188. package/public/assets/index-COIlCLCW.js.gz +0 -0
  189. package/public/assets/pencil-CPaoEKFm.js.br +0 -0
  190. package/public/assets/pencil-CPaoEKFm.js.gz +0 -0
  191. package/public/assets/resource-health-Ca4-5Rde.js +0 -1
  192. package/public/assets/resource-health-Ca4-5Rde.js.br +0 -0
  193. package/public/assets/resource-health-Ca4-5Rde.js.gz +0 -0
  194. package/public/assets/table-CSeGVnii.js +0 -1
  195. package/public/assets/table-CSeGVnii.js.br +0 -0
  196. package/public/assets/table-CSeGVnii.js.gz +0 -0
  197. package/public/assets/trash-CD9Y9G-i.js.br +0 -0
  198. package/public/assets/trash-CD9Y9G-i.js.gz +0 -0
  199. package/public/assets/vendor-charts-YPhPkjLw.js.br +0 -0
  200. package/public/assets/vendor-charts-YPhPkjLw.js.gz +0 -0
  201. package/public/assets/vendor-react-C5H_1fOn.js.br +0 -0
  202. package/public/assets/vendor-react-C5H_1fOn.js.gz +0 -0
  203. package/public/assets/vendor-router-CnmrRwJF.js.br +0 -0
  204. package/public/assets/vendor-router-CnmrRwJF.js.gz +0 -0
@@ -1,5 +1,5 @@
1
- import{i}from"./vendor-react-C5H_1fOn.js";/**
2
- * react-router v7.18.3
1
+ import{k as i}from"./vendor-react-BlPSzrEe.js";/**
2
+ * react-router v7.18.4
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -9,4 +9,4 @@ import{i}from"./vendor-react-C5H_1fOn.js";/**
9
9
  * @license MIT
10
10
  */var oe=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Pe=/^[\\/]{2}/;function qe(e,t){return t+e.replace(/\\/g,"/")}var ve="popstate";function Re(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Ge(e={}){function t(n,a){var c;let o=(c=a.state)==null?void 0:c.masked,{pathname:l,search:u,hash:s}=o||n.location;return re("",{pathname:l,search:u,hash:s},a.state&&a.state.usr||null,a.state&&a.state.key||"default",o?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,a){return typeof a=="string"?a:I(a)}return Qe(t,r,null,e)}function E(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function b(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Xe(){return Math.random().toString(36).substring(2,10)}function we(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function re(e,t,r=null,n,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?A(t):t,state:r,key:t&&t.key||n||Xe(),mask:a}}function I({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function A(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function Qe(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,l=a.history,u="POP",s=null,c=f();c==null&&(c=0,l.replaceState({...l.state,idx:c},""));function f(){return(l.state||{idx:null}).idx}function h(){u="POP";let p=f(),m=p==null?null:p-c;c=p,s&&s({action:u,location:g.location,delta:m})}function d(p,m){u="PUSH";let R=Re(p)?p:re(g.location,p,m);c=f()+1;let w=we(R,c),C=g.createHref(R.mask||R);try{l.pushState(w,"",C)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;a.location.assign(C)}o&&s&&s({action:u,location:g.location,delta:1})}function y(p,m){u="REPLACE";let R=Re(p)?p:re(g.location,p,m);c=f();let w=we(R,c),C=g.createHref(R.mask||R);l.replaceState(w,"",C),o&&s&&s({action:u,location:g.location,delta:0})}function v(p){return Ze(a,p)}let g={get action(){return u},get location(){return e(a,l)},listen(p){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(ve,h),s=p,()=>{a.removeEventListener(ve,h),s=null}},createHref(p){return t(a,p)},createURL:v,encodeLocation(p){let m=v(p);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:d,replace:y,go(p){return l.go(p)}};return g}function Ze(e,t,r=!1){let n="http://localhost";e&&(n=e.location.origin!=="null"?e.location.origin:e.location.href),E(n,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:I(t);return a=a.replace(/ $/,"%20"),!r&&Pe.test(a)&&(a=n+a),new URL(a,n)}function Le(e,t,r="/"){return et(e,t,r,!1)}function et(e,t,r,n,a){let o=typeof t=="string"?A(t):t,l=T(o.pathname||"/",r);if(l==null)return null;let u=tt(e),s=null,c=ht(l);for(let f=0;s==null&&f<u.length;++f)s=ft(u[f],c,n);return s}function tt(e){let t=ke(e);return rt(t),t}function ke(e,t=[],r=[],n="",a=!1){let o=(l,u,s=a,c)=>{let f={relativePath:c===void 0?l.path||"":c,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(n)&&s)return;E(f.relativePath.startsWith(n),`Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(n.length)}let h=P([n,f.relativePath]),d=r.concat(f);l.children&&l.children.length>0&&(E(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),ke(l.children,t,d,h,s)),!(l.path==null&&!l.index)&&t.push({path:h,score:ut(h,l.index),routesMeta:d.map((y,v)=>{let[g,p]=Ne(y.relativePath,y.caseSensitive,v===d.length-1);return{...y,matcher:g,compiledParams:p}})})};return e.forEach((l,u)=>{var s;if(l.path===""||!((s=l.path)!=null&&s.includes("?")))o(l,u);else for(let c of $e(l.path))o(l,u,!0,c)}),t}function $e(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let l=$e(n.join("/")),u=[];return u.push(...l.map(s=>s===""?o:[o,s].join("/"))),a&&u.push(...l),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function rt(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:ct(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var nt=/^:[\w-]+$/,at=3,ot=2,lt=1,it=10,st=-2,Ee=e=>e==="*";function ut(e,t){let r=e.split("/"),n=r.length;return r.some(Ee)&&(n+=st),t&&(n+=ot),r.filter(a=>!Ee(a)).reduce((a,o)=>a+(nt.test(o)?at:o===""?lt:it),n)}function ct(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function ft(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",l=[];for(let u=0;u<n.length;++u){let s=n[u],c=u===n.length-1,f=o==="/"?t:t.slice(o.length)||"/",h={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Te(h,f,s.matcher,s.compiledParams):J(h,f),y=s.route;if(!d&&c&&r&&!n[n.length-1].route.index&&(d=J({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},f)),!d)return null;Object.assign(a,d.params),l.push({params:a,pathname:P([o,d.pathname]),pathnameBase:pt(P([o,d.pathnameBase])),route:y}),d.pathnameBase!=="/"&&(o=P([o,d.pathnameBase]))}return l}function J(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Ne(e.path,e.caseSensitive,e.end);return Te(e,t,r,n)}function Te(e,t,r,n){let a=t.match(r);if(!a)return null;let o=a[0],l=U(o,1),u=a.slice(1);return{params:n.reduce((c,{paramName:f,isOptional:h},d)=>{if(f==="*"){let v=u[d]||"";l=U(o.slice(0,o.length-v.length),1)}const y=u[d];return h&&!y?c[f]=void 0:c[f]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:l,pattern:e}}function Ne(e,t=!1,r=!0){b(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,s,c,f)=>{if(n.push({paramName:u,isOptional:s!=null}),s){let h=f.charAt(c+l.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function ht(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return b(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function T(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function dt(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?A(e):e,o;return r?(r=Fe(r),r.startsWith("/")||r.startsWith("\\")?o=xe(r.substring(1),"/"):o=xe(r,t)):o=t,{pathname:o,search:gt(n),hash:yt(a)}}function xe(e,t){let r=U(t).split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Q(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function mt(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function le(e){let t=mt(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function K(e,t,r,n=!1){let a;typeof e=="string"?a=A(e):(a={...e},E(!a.pathname||!a.pathname.includes("?"),Q("?","pathname","search",a)),E(!a.pathname||!a.pathname.includes("#"),Q("#","pathname","hash",a)),E(!a.search||!a.search.includes("#"),Q("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,u;if(l==null)u=r;else{let h=t.length-1;if(!n&&l.startsWith("..")){let d=l.split("/");for(;d[0]==="..";)d.shift(),h-=1;a.pathname=d.join("/")}u=h>=0?t[h]:"/"}let s=dt(a,u),c=l&&l!=="/"&&l.endsWith("/"),f=(o||l===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(c||f)&&(s.pathname+="/"),s}var Fe=e=>e.replace(/[\\/]{2,}/g,"/"),P=e=>Fe(e.join("/"));function U(e,t=0){let r=e.length;for(;r>t&&e.charCodeAt(r-1)===47;)r--;return r===e.length?e:e.slice(0,r)}var pt=e=>U(e).replace(/^\/*/,"/"),gt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,yt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,vt=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Rt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function wt(e){let t=e.map(r=>r.route.path).filter(Boolean);return P(t)||"/"}var Ie=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function De(e,t){let r=e;if(typeof r!="string"||!oe.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(Ie)try{let o=new URL(window.location.href),l=Pe.test(r)?new URL(qe(r,o.protocol)):new URL(r),u=T(l.pathname,t);l.origin===o.origin&&u!=null?r=u+l.search+l.hash:a=!0}catch{b(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ce=new URL("http://localhost");function ie(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),Ce)}catch{return Ce}}function Z(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function Et(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}function se(e,t,r,n){let a=null;try{a=e==null?null:new URL(e,r)}catch{}let o=new URL(t,r),l=a!=null&&!Z(a,r),u=!Z(o,r);if(n==="reject"){if(l||u)throw new Error("External navigation is not allowed")}else if(u&&(a==null||!Et(e,a)||!Z(a,o)))throw new Error("External navigation is not allowed")}var Ue=["POST","PUT","PATCH","DELETE"];new Set(Ue);var xt=["GET",...Ue];new Set(xt);var Ct=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function St(e){try{return Ct.includes(new URL(e).protocol)}catch{return!1}}var O=i.createContext(null);O.displayName="DataRouter";var Y=i.createContext(null);Y.displayName="DataRouterState";var Ae=i.createContext(!1);function bt(){return i.useContext(Ae)}var Oe=i.createContext({isTransitioning:!1});Oe.displayName="ViewTransition";var Pt=i.createContext(new Map);Pt.displayName="Fetchers";var Lt=i.createContext(null);Lt.displayName="Await";var S=i.createContext(null);S.displayName="Navigation";var W=i.createContext(null);W.displayName="Location";var L=i.createContext({outlet:null,matches:[],isDataRoute:!1});L.displayName="Route";var ue=i.createContext(null);ue.displayName="RouteError";var Me="REACT_ROUTER_ERROR",kt="REDIRECT",$t="ROUTE_ERROR_RESPONSE";function Tt(e){if(e.startsWith(`${Me}:${kt}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Nt(e){if(e.startsWith(`${Me}:${$t}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new vt(t.status,t.statusText,t.data)}catch{}}function Ft(e,{relative:t}={}){E(M(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=i.useContext(S),{hash:a,pathname:o,search:l}=H(e,{relative:t}),u=o;return r!=="/"&&(u=o==="/"?r:P([r,o])),n.createHref({pathname:u,search:l,hash:a})}function M(){return i.useContext(W)!=null}function k(){return E(M(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(W).location}var _e="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Be(e){i.useContext(S).static||i.useLayoutEffect(e)}function ce(){let{isDataRoute:e}=i.useContext(L);return e?Kt():It()}function It(){E(M(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(O),{basename:t,navigator:r}=i.useContext(S),{matches:n}=i.useContext(L),{pathname:a}=k(),o=JSON.stringify(le(n)),l=i.useRef(!1);return Be(()=>{l.current=!0}),i.useCallback((s,c={})=>{if(b(l.current,_e),!l.current)return;if(typeof s=="number"){r.go(s);return}let f=K(s,JSON.parse(o),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:P([t,f.pathname])),se(typeof s=="string"?s:I(s),r.createHref(f),ie(r),"reject"),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,o,a,e])}var Dt=i.createContext(null);function Ut(e){let t=i.useContext(L).outlet;return i.useMemo(()=>t&&i.createElement(Dt.Provider,{value:e},t),[t,e])}function H(e,{relative:t}={}){let{matches:r}=i.useContext(L),{pathname:n}=k(),a=JSON.stringify(le(r));return i.useMemo(()=>K(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function At(e,t){return We(e,t)}function We(e,t,r){var p;E(M(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=i.useContext(S),{matches:a}=i.useContext(L),o=a[a.length-1],l=o?o.params:{},u=o?o.pathname:"/",s=o?o.pathnameBase:"/",c=o&&o.route;{let m=c&&c.path||"";je(u,!c||m.endsWith("*")||m.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${m}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
11
11
 
12
- Please change the parent <Route path="${m}"> to <Route path="${m==="/"?"*":`${m}/*`}">.`)}let f=k(),h;if(t){let m=typeof t=="string"?A(t):t;E(s==="/"||((p=m.pathname)==null?void 0:p.startsWith(s)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${m.pathname}" was given in the \`location\` prop.`),h=m}else h=f;let d=h.pathname||"/",y=d;if(s!=="/"){let m=s.replace(/^\//,"").split("/");y="/"+d.replace(/^\//,"").split("/").slice(m.length).join("/")}let v=r&&r.state.matches.length?r.state.matches.map(m=>Object.assign(m,{route:r.manifest[m.route.id]||m.route})):Le(e,{pathname:y});b(c||v!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),b(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=Wt(v&&v.map(m=>Object.assign({},m,{params:Object.assign({},l,m.params),pathname:P([s,n.encodeLocation?n.encodeLocation(m.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?s:P([s,n.encodeLocation?n.encodeLocation(m.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),a,r);return t&&g?i.createElement(W.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},g):g}function Ot(){let e=Jt(),t=Rt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=i.createElement(i.Fragment,null,i.createElement("p",null,"💿 Hey developer 👋"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:o},"ErrorBoundary")," or"," ",i.createElement("code",{style:o},"errorElement")," prop on your route.")),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),r?i.createElement("pre",{style:a},r):null,l)}var Mt=i.createElement(Ot,null),He=class extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=Nt(e.digest);r&&(e=r)}let t=e!==void 0?i.createElement(L.Provider,{value:this.props.routeContext},i.createElement(ue.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i.createElement(_t,{error:e},t):t}};He.contextType=Ae;var ee=new WeakMap;function _t({children:e,error:t}){let{basename:r,navigator:n}=i.useContext(S);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=Tt(t.digest);if(a){let o=ee.get(t);if(o)throw o;let l=De(a.location,r),u=l.absoluteURL||l.to;if(se(a.location,u,ie(n),"allow-explicit"),St(u))throw new Error("Invalid redirect location");if(Ie&&!ee.get(t))if(l.isExternal||a.reloadDocument)window.location.href=u;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:a.replace}));throw ee.set(t,s),s}return i.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u}`})}}return e}function Bt({routeContext:e,match:t,children:r}){let n=i.useContext(O);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(L.Provider,{value:e},r)}function Wt(e,t=[],r){let n=r==null?void 0:r.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n==null?void 0:n.errors;if(o!=null){let f=a.findIndex(h=>h.route.id&&(o==null?void 0:o[h.route.id])!==void 0);E(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let l=!1,u=-1;if(r&&n){l=n.renderFallback;for(let f=0;f<a.length;f++){let h=a[f];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=f),h.route.id){let{loaderData:d,errors:y}=n,v=h.route.loader&&!d.hasOwnProperty(h.route.id)&&(!y||y[h.route.id]===void 0);if(h.route.lazy||v){r.isStatic&&(l=!0),u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}}let s=r==null?void 0:r.onError,c=n&&s?(f,h)=>{var d,y;s(f,{location:n.location,params:((y=(d=n.matches)==null?void 0:d[0])==null?void 0:y.params)??{},pattern:wt(n.matches),errorInfo:h})}:void 0;return a.reduceRight((f,h,d)=>{let y,v=!1,g=null,p=null;n&&(y=o&&h.route.id?o[h.route.id]:void 0,g=h.route.errorElement||Mt,l&&(u<0&&d===0?(je("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,p=null):u===d&&(v=!0,p=h.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,d+1)),R=()=>{let w;return y?w=g:v?w=p:h.route.Component?w=i.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=f,i.createElement(Bt,{match:h,routeContext:{outlet:f,matches:m,isDataRoute:n!=null},children:w})};return n&&(h.route.ErrorBoundary||h.route.errorElement||d===0)?i.createElement(He,{location:n.location,revalidation:n.revalidation,component:g,error:y,children:R(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:c}):R()},null)}function fe(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ht(e){let t=i.useContext(O);return E(t,fe(e)),t}function jt(e){let t=i.useContext(Y);return E(t,fe(e)),t}function Vt(e){let t=i.useContext(L);return E(t,fe(e)),t}function he(e){let t=Vt(e),r=t.matches[t.matches.length-1];return E(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function zt(){return he("useRouteId")}function Jt(){var n;let e=i.useContext(ue),t=jt("useRouteError"),r=he("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function Kt(){let{router:e}=Ht("useNavigate"),t=he("useNavigate"),r=i.useRef(!1);return Be(()=>{r.current=!0}),i.useCallback(async(a,o={})=>{b(r.current,_e),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var Se={};function je(e,t,r){!t&&!Se[e]&&(Se[e]=!0,b(!1,r))}i.memo(Yt);function Yt({routes:e,manifest:t,future:r,state:n,isStatic:a,onError:o}){return We(e,void 0,{manifest:t,state:n,isStatic:a,onError:o})}function Nr({to:e,replace:t,state:r,relative:n}){E(M(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a,navigator:o}=i.useContext(S);b(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:l}=i.useContext(L),{pathname:u}=k(),s=ce(),c=K(e,le(l),u,n==="path");se(typeof e=="string"?e:I(e),o.createHref(c),ie(o),"reject");let f=JSON.stringify(c);return i.useEffect(()=>{s(JSON.parse(f),{replace:t,state:r,relative:n})},[s,f,n,t,r]),null}function Fr(e){return Ut(e.context)}function qt(e){E(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Gt({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,useTransitions:l}){E(!M(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),s=i.useMemo(()=>({basename:u,navigator:a,static:o,useTransitions:l,future:{}}),[u,a,o,l]);typeof r=="string"&&(r=A(r));let{pathname:c="/",search:f="",hash:h="",state:d=null,key:y="default",mask:v}=r,g=i.useMemo(()=>{let p=T(c,u);return p==null?null:{location:{pathname:p,search:f,hash:h,state:d,key:y,mask:v},navigationType:n}},[u,c,f,h,d,y,n,v]);return b(g!=null,`<Router basename="${u}"> is not able to match the URL "${c}${f}${h}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:i.createElement(S.Provider,{value:s},i.createElement(W.Provider,{children:t,value:g}))}function Ir({children:e,location:t}){return At(ne(e),t)}function ne(e,t=[]){let r=[];return i.Children.forEach(e,(n,a)=>{if(!i.isValidElement(n))return;let o=[...t,a];if(n.type===i.Fragment){r.push.apply(r,ne(n.props.children,o));return}E(n.type===qt,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),E(!n.props.index||!n.props.children,"An index route cannot have child routes.");let l={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(l.children=ne(n.props.children,o)),r.push(l)}),r}var V="get",z="application/x-www-form-urlencoded";function q(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Xt(e){return q(e)&&e.tagName.toLowerCase()==="button"}function Qt(e){return q(e)&&e.tagName.toLowerCase()==="form"}function Zt(e){return q(e)&&e.tagName.toLowerCase()==="input"}function er(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function tr(e,t){return e.button===0&&(!t||t==="_self")&&!er(e)}function ae(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function rr(e,t){let r=ae(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(o=>{r.append(a,o)})}),r}var j=null;function nr(){if(j===null)try{new FormData(document.createElement("form"),0),j=!1}catch{j=!0}return j}var ar=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function te(e){return e!=null&&!ar.has(e)?(b(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${z}"`),null):e}function or(e,t){let r,n,a,o,l;if(Qt(e)){let u=e.getAttribute("action");n=u?T(u,t):null,r=e.getAttribute("method")||V,a=te(e.getAttribute("enctype"))||z,o=new FormData(e)}else if(Xt(e)||Zt(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||u.getAttribute("action");if(n=s?T(s,t):null,r=e.getAttribute("formmethod")||u.getAttribute("method")||V,a=te(e.getAttribute("formenctype"))||te(u.getAttribute("enctype"))||z,o=new FormData(u,e),!nr()){let{name:c,type:f,value:h}=e;if(f==="image"){let d=c?`${c}.`:"";o.append(`${d}x`,"0"),o.append(`${d}y`,"0")}else c&&o.append(c,h)}}else{if(q(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=V,n=null,a=z,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function de(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ve(e,t,r,n){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:a.pathname==="/"?a.pathname=`_root.${n}`:t&&T(a.pathname,t)==="/"?a.pathname=`${U(t)}/_root.${n}`:a.pathname=`${U(a.pathname)}.${n}`,a}async function lr(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ir(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function sr(e,t,r){let n=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await lr(o,r);return l.links?l.links():[]}return[]}));return hr(n.flat(1).filter(ir).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function be(e,t,r,n,a,o){let l=(s,c)=>r[c]?s.route.id!==r[c].route.id:!0,u=(s,c)=>{var f;return r[c].pathname!==s.pathname||((f=r[c].route.path)==null?void 0:f.endsWith("*"))&&r[c].params["*"]!==s.params["*"]};return o==="assets"?t.filter((s,c)=>l(s,c)||u(s,c)):o==="data"?t.filter((s,c)=>{var h;let f=n.routes[s.route.id];if(!f||!f.hasLoader)return!1;if(l(s,c)||u(s,c))return!0;if(s.route.shouldRevalidate){let d=s.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((h=r[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function ur(e,t,{includeHydrateFallback:r}={}){return cr(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function cr(e){return[...new Set(e)]}function fr(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function hr(e,t){let r=new Set;return new Set(t),e.reduce((n,a)=>{let o=JSON.stringify(fr(a));return r.has(o)||(r.add(o),n.push({key:o,link:a})),n},[])}function me(){let e=i.useContext(O);return de(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function dr(){let e=i.useContext(Y);return de(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var pe=i.createContext(void 0);pe.displayName="FrameworkContext";function G(){let e=i.useContext(pe);return de(e,"You must render this element inside a <HydratedRouter> element"),e}function mr(e,t){let r=i.useContext(pe),[n,a]=i.useState(!1),[o,l]=i.useState(!1),{onFocus:u,onBlur:s,onMouseEnter:c,onMouseLeave:f,onTouchStart:h}=t,d=i.useRef(null);i.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let g=m=>{m.forEach(R=>{l(R.isIntersecting)})},p=new IntersectionObserver(g,{threshold:.5});return d.current&&p.observe(d.current),()=>{p.disconnect()}}},[e]),i.useEffect(()=>{if(n){let g=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(g)}}},[n]);let y=()=>{a(!0)},v=()=>{a(!1),l(!1)};return r?e!=="intent"?[o,d,{}]:[o,d,{onFocus:B(u,y),onBlur:B(s,v),onMouseEnter:B(c,y),onMouseLeave:B(f,v),onTouchStart:B(h,y)}]:[!1,d,{}]}function B(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function pr({page:e,...t}){let r=bt(),{nonce:n}=G(),{router:a}=me(),o=i.useMemo(()=>Le(a.routes,e,a.basename),[a.routes,e,a.basename]);return o?(t.nonce==null&&n&&(t={...t,nonce:n}),r?i.createElement(yr,{page:e,matches:o,...t}):i.createElement(vr,{page:e,matches:o,...t})):null}function gr(e){let{manifest:t,routeModules:r}=G(),[n,a]=i.useState([]);return i.useEffect(()=>{let o=!1;return sr(e,t,r).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,r]),n}function yr({page:e,matches:t,...r}){let n=k(),{future:a}=G(),{basename:o}=me(),l=i.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let u=Ve(e,o,a.v8_trailingSlashAwareDataRequests,"rsc"),s=!1,c=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?s=!0:c.push(f.route.id);return s&&c.length>0&&u.searchParams.set("_routes",c.join(",")),[u.pathname+u.search]},[o,a.v8_trailingSlashAwareDataRequests,e,n,t]);return i.createElement(i.Fragment,null,l.map(u=>i.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...r})))}function vr({page:e,matches:t,...r}){let n=k(),{future:a,manifest:o,routeModules:l}=G(),{basename:u}=me(),{loaderData:s,matches:c}=dr(),f=i.useMemo(()=>be(e,t,c,o,n,"data"),[e,t,c,o,n]),h=i.useMemo(()=>be(e,t,c,o,n,"assets"),[e,t,c,o,n]),d=i.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let g=new Set,p=!1;if(t.forEach(R=>{var C;let w=o.routes[R.route.id];!w||!w.hasLoader||(!f.some(x=>x.route.id===R.route.id)&&R.route.id in s&&((C=l[R.route.id])!=null&&C.shouldRevalidate)||w.hasClientLoader?p=!0:g.add(R.route.id))}),g.size===0)return[];let m=Ve(e,u,a.v8_trailingSlashAwareDataRequests,"data");return p&&g.size>0&&m.searchParams.set("_routes",t.filter(R=>g.has(R.route.id)).map(R=>R.route.id).join(",")),[m.pathname+m.search]},[u,a.v8_trailingSlashAwareDataRequests,s,n,o,f,t,e,l]),y=i.useMemo(()=>ur(h,o),[h,o]),v=gr(h);return i.createElement(i.Fragment,null,d.map(g=>i.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...r})),y.map(g=>i.createElement("link",{key:g,rel:"modulepreload",href:g,...r})),v.map(({key:g,link:p})=>i.createElement("link",{key:g,nonce:r.nonce,...p,crossOrigin:p.crossOrigin??r.crossOrigin})))}function Rr(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var wr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{wr&&(window.__reactRouterVersion="7.18.3")}catch{}function Dr({basename:e,children:t,useTransitions:r,window:n}){let a=i.useRef();a.current==null&&(a.current=Ge({window:n,v5Compat:!0}));let o=a.current,[l,u]=i.useState({action:o.action,location:o.location}),s=i.useCallback(c=>{r===!1?u(c):i.startTransition(()=>u(c))},[r]);return i.useLayoutEffect(()=>o.listen(s),[o,s]),i.createElement(Gt,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,useTransitions:r})}var ze=i.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:l,mask:u,state:s,target:c,to:f,preventScrollReset:h,viewTransition:d,defaultShouldRevalidate:y,...v},g){let{basename:p,navigator:m,useTransitions:R}=i.useContext(S),w=typeof f=="string"&&oe.test(f),C=De(f,p);f=C.to;let x=Ft(f,{relative:a}),$=k(),N=null;if(u){let F=K(u,[],$.mask?$.mask.pathname:"/",!0);p!=="/"&&(F.pathname=F.pathname==="/"?p:P([p,F.pathname])),N=m.createHref(F)}let[D,_,X]=mr(n,v),Ke=Sr(f,{replace:l,mask:u,state:s,target:c,preventScrollReset:h,relative:a,viewTransition:d,defaultShouldRevalidate:y,useTransitions:R});function Ye(F){t&&t(F),F.defaultPrevented||Ke(F)}let ge=!(C.isExternal||o),ye=i.createElement("a",{...v,...X,href:(ge?N:void 0)||C.absoluteURL||x,onClick:ge?Ye:t,ref:Rr(g,_),target:c,"data-discover":!w&&r==="render"?"true":void 0});return D&&!w?i.createElement(i.Fragment,null,ye,i.createElement(pr,{page:x})):ye});ze.displayName="Link";var Er=i.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:l,viewTransition:u,children:s,...c},f){let h=H(l,{relative:c.relative}),d=k(),y=i.useContext(Y),{navigator:v,basename:g}=i.useContext(S),p=y!=null&&$r(h)&&u===!0,m=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,R=d.pathname,w=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;r||(R=R.toLowerCase(),w=w?w.toLowerCase():null,m=m.toLowerCase()),w&&g&&(w=T(w,g)||w);const C=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let x=R===m||!a&&R.startsWith(m)&&R.charAt(C)==="/",$=w!=null&&(w===m||!a&&w.startsWith(m)&&w.charAt(m.length)==="/"),N={isActive:x,isPending:$,isTransitioning:p},D=x?t:void 0,_;typeof n=="function"?_=n(N):_=[n,x?"active":null,$?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let X=typeof o=="function"?o(N):o;return i.createElement(ze,{...c,"aria-current":D,className:_,ref:f,style:X,to:l,viewTransition:u},typeof s=="function"?s(N):s)});Er.displayName="NavLink";var xr=i.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:l=V,action:u,onSubmit:s,relative:c,preventScrollReset:f,viewTransition:h,defaultShouldRevalidate:d,...y},v)=>{let{useTransitions:g}=i.useContext(S),p=Lr(),m=kr(u,{relative:c}),R=l.toLowerCase()==="get"?"get":"post",w=typeof u=="string"&&oe.test(u),C=x=>{if(s&&s(x),x.defaultPrevented)return;x.preventDefault();let $=x.nativeEvent.submitter,N=($==null?void 0:$.getAttribute("formmethod"))||l,D=()=>p($||x.currentTarget,{fetcherKey:t,method:N,navigate:r,replace:a,state:o,relative:c,preventScrollReset:f,viewTransition:h,defaultShouldRevalidate:d});g&&r!==!1?i.startTransition(()=>D()):D()};return i.createElement("form",{ref:v,method:R,action:m,onSubmit:n?s:C,...y,"data-discover":!w&&e==="render"?"true":void 0})});xr.displayName="Form";function Cr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Je(e){let t=i.useContext(O);return E(t,Cr(e)),t}function Sr(e,{target:t,replace:r,mask:n,state:a,preventScrollReset:o,relative:l,viewTransition:u,defaultShouldRevalidate:s,useTransitions:c}={}){let f=ce(),h=k(),d=H(e,{relative:l});return i.useCallback(y=>{if(tr(y,t)){y.preventDefault();let v=r!==void 0?r:I(h)===I(d),g=()=>f(e,{replace:v,mask:n,state:a,preventScrollReset:o,relative:l,viewTransition:u,defaultShouldRevalidate:s});c?i.startTransition(()=>g()):g()}},[h,f,d,r,n,a,t,e,o,l,u,s,c])}function Ur(e){b(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=i.useRef(ae(e)),r=i.useRef(!1),n=k(),a=i.useMemo(()=>rr(n.search,r.current?null:t.current),[n.search]),o=ce(),l=i.useCallback((u,s)=>{const c=ae(typeof u=="function"?u(new URLSearchParams(a)):u);r.current=!0,o("?"+c,s)},[o,a]);return[a,l]}var br=0,Pr=()=>`__${String(++br)}__`;function Lr(){let{router:e}=Je("useSubmit"),{basename:t}=i.useContext(S),r=zt(),n=e.fetch,a=e.navigate;return i.useCallback(async(o,l={})=>{let{action:u,method:s,encType:c,formData:f,body:h}=or(o,t);if(l.navigate===!1){let d=l.fetcherKey||Pr();await n(d,r,l.action||u,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:f,body:h,formMethod:l.method||s,formEncType:l.encType||c,flushSync:l.flushSync})}else await a(l.action||u,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:f,body:h,formMethod:l.method||s,formEncType:l.encType||c,replace:l.replace,state:l.state,fromRouteId:r,flushSync:l.flushSync,viewTransition:l.viewTransition})},[n,a,t,r])}function kr(e,{relative:t}={}){let{basename:r}=i.useContext(S),n=i.useContext(L);E(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...H(e||".",{relative:t})},l=k();if(e==null){o.search=l.search;let u=new URLSearchParams(o.search),s=u.getAll("index");if(s.some(f=>f==="")){u.delete("index"),s.filter(h=>h).forEach(h=>u.append("index",h));let f=u.toString();o.search=f?`?${f}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:P([r,o.pathname])),I(o)}function $r(e,{relative:t}={}){let r=i.useContext(Oe);E(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Je("useViewTransitionState"),a=H(e,{relative:t});if(!r.isTransitioning)return!1;let o=T(r.currentLocation.pathname,n)||r.currentLocation.pathname,l=T(r.nextLocation.pathname,n)||r.nextLocation.pathname;return J(a.pathname,l)!=null||J(a.pathname,o)!=null}export{Dr as B,ze as L,Nr as N,Fr as O,qt as R,Ir as a,ce as b,Ur as c,k as u};
12
+ Please change the parent <Route path="${m}"> to <Route path="${m==="/"?"*":`${m}/*`}">.`)}let f=k(),h;if(t){let m=typeof t=="string"?A(t):t;E(s==="/"||((p=m.pathname)==null?void 0:p.startsWith(s)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${m.pathname}" was given in the \`location\` prop.`),h=m}else h=f;let d=h.pathname||"/",y=d;if(s!=="/"){let m=s.replace(/^\//,"").split("/");y="/"+d.replace(/^\//,"").split("/").slice(m.length).join("/")}let v=r&&r.state.matches.length?r.state.matches.map(m=>Object.assign(m,{route:r.manifest[m.route.id]||m.route})):Le(e,{pathname:y});b(c||v!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),b(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=Wt(v&&v.map(m=>Object.assign({},m,{params:Object.assign({},l,m.params),pathname:P([s,n.encodeLocation?n.encodeLocation(m.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?s:P([s,n.encodeLocation?n.encodeLocation(m.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),a,r);return t&&g?i.createElement(W.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},g):g}function Ot(){let e=Jt(),t=Rt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=i.createElement(i.Fragment,null,i.createElement("p",null,"💿 Hey developer 👋"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:o},"ErrorBoundary")," or"," ",i.createElement("code",{style:o},"errorElement")," prop on your route.")),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),r?i.createElement("pre",{style:a},r):null,l)}var Mt=i.createElement(Ot,null),He=class extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=Nt(e.digest);r&&(e=r)}let t=e!==void 0?i.createElement(L.Provider,{value:this.props.routeContext},i.createElement(ue.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i.createElement(_t,{error:e},t):t}};He.contextType=Ae;var ee=new WeakMap;function _t({children:e,error:t}){let{basename:r,navigator:n}=i.useContext(S);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=Tt(t.digest);if(a){let o=ee.get(t);if(o)throw o;let l=De(a.location,r),u=l.absoluteURL||l.to;if(se(a.location,u,ie(n),"allow-explicit"),St(u))throw new Error("Invalid redirect location");if(Ie&&!ee.get(t))if(l.isExternal||a.reloadDocument)window.location.href=u;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:a.replace}));throw ee.set(t,s),s}return i.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u}`})}}return e}function Bt({routeContext:e,match:t,children:r}){let n=i.useContext(O);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(L.Provider,{value:e},r)}function Wt(e,t=[],r){let n=r==null?void 0:r.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n==null?void 0:n.errors;if(o!=null){let f=a.findIndex(h=>h.route.id&&(o==null?void 0:o[h.route.id])!==void 0);E(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let l=!1,u=-1;if(r&&n){l=n.renderFallback;for(let f=0;f<a.length;f++){let h=a[f];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=f),h.route.id){let{loaderData:d,errors:y}=n,v=h.route.loader&&!d.hasOwnProperty(h.route.id)&&(!y||y[h.route.id]===void 0);if(h.route.lazy||v){r.isStatic&&(l=!0),u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}}let s=r==null?void 0:r.onError,c=n&&s?(f,h)=>{var d,y;s(f,{location:n.location,params:((y=(d=n.matches)==null?void 0:d[0])==null?void 0:y.params)??{},pattern:wt(n.matches),errorInfo:h})}:void 0;return a.reduceRight((f,h,d)=>{let y,v=!1,g=null,p=null;n&&(y=o&&h.route.id?o[h.route.id]:void 0,g=h.route.errorElement||Mt,l&&(u<0&&d===0?(je("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,p=null):u===d&&(v=!0,p=h.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,d+1)),R=()=>{let w;return y?w=g:v?w=p:h.route.Component?w=i.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=f,i.createElement(Bt,{match:h,routeContext:{outlet:f,matches:m,isDataRoute:n!=null},children:w})};return n&&(h.route.ErrorBoundary||h.route.errorElement||d===0)?i.createElement(He,{location:n.location,revalidation:n.revalidation,component:g,error:y,children:R(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:c}):R()},null)}function fe(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ht(e){let t=i.useContext(O);return E(t,fe(e)),t}function jt(e){let t=i.useContext(Y);return E(t,fe(e)),t}function Vt(e){let t=i.useContext(L);return E(t,fe(e)),t}function he(e){let t=Vt(e),r=t.matches[t.matches.length-1];return E(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function zt(){return he("useRouteId")}function Jt(){var n;let e=i.useContext(ue),t=jt("useRouteError"),r=he("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function Kt(){let{router:e}=Ht("useNavigate"),t=he("useNavigate"),r=i.useRef(!1);return Be(()=>{r.current=!0}),i.useCallback(async(a,o={})=>{b(r.current,_e),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var Se={};function je(e,t,r){!t&&!Se[e]&&(Se[e]=!0,b(!1,r))}i.memo(Yt);function Yt({routes:e,manifest:t,future:r,state:n,isStatic:a,onError:o}){return We(e,void 0,{manifest:t,state:n,isStatic:a,onError:o})}function Nr({to:e,replace:t,state:r,relative:n}){E(M(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a,navigator:o}=i.useContext(S);b(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:l}=i.useContext(L),{pathname:u}=k(),s=ce(),c=K(e,le(l),u,n==="path");se(typeof e=="string"?e:I(e),o.createHref(c),ie(o),"reject");let f=JSON.stringify(c);return i.useEffect(()=>{s(JSON.parse(f),{replace:t,state:r,relative:n})},[s,f,n,t,r]),null}function Fr(e){return Ut(e.context)}function qt(e){E(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Gt({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,useTransitions:l}){E(!M(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),s=i.useMemo(()=>({basename:u,navigator:a,static:o,useTransitions:l,future:{}}),[u,a,o,l]);typeof r=="string"&&(r=A(r));let{pathname:c="/",search:f="",hash:h="",state:d=null,key:y="default",mask:v}=r,g=i.useMemo(()=>{let p=T(c,u);return p==null?null:{location:{pathname:p,search:f,hash:h,state:d,key:y,mask:v},navigationType:n}},[u,c,f,h,d,y,n,v]);return b(g!=null,`<Router basename="${u}"> is not able to match the URL "${c}${f}${h}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:i.createElement(S.Provider,{value:s},i.createElement(W.Provider,{children:t,value:g}))}function Ir({children:e,location:t}){return At(ne(e),t)}function ne(e,t=[]){let r=[];return i.Children.forEach(e,(n,a)=>{if(!i.isValidElement(n))return;let o=[...t,a];if(n.type===i.Fragment){r.push.apply(r,ne(n.props.children,o));return}E(n.type===qt,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),E(!n.props.index||!n.props.children,"An index route cannot have child routes.");let l={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(l.children=ne(n.props.children,o)),r.push(l)}),r}var V="get",z="application/x-www-form-urlencoded";function q(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Xt(e){return q(e)&&e.tagName.toLowerCase()==="button"}function Qt(e){return q(e)&&e.tagName.toLowerCase()==="form"}function Zt(e){return q(e)&&e.tagName.toLowerCase()==="input"}function er(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function tr(e,t){return e.button===0&&(!t||t==="_self")&&!er(e)}function ae(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function rr(e,t){let r=ae(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(o=>{r.append(a,o)})}),r}var j=null;function nr(){if(j===null)try{new FormData(document.createElement("form"),0),j=!1}catch{j=!0}return j}var ar=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function te(e){return e!=null&&!ar.has(e)?(b(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${z}"`),null):e}function or(e,t){let r,n,a,o,l;if(Qt(e)){let u=e.getAttribute("action");n=u?T(u,t):null,r=e.getAttribute("method")||V,a=te(e.getAttribute("enctype"))||z,o=new FormData(e)}else if(Xt(e)||Zt(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||u.getAttribute("action");if(n=s?T(s,t):null,r=e.getAttribute("formmethod")||u.getAttribute("method")||V,a=te(e.getAttribute("formenctype"))||te(u.getAttribute("enctype"))||z,o=new FormData(u,e),!nr()){let{name:c,type:f,value:h}=e;if(f==="image"){let d=c?`${c}.`:"";o.append(`${d}x`,"0"),o.append(`${d}y`,"0")}else c&&o.append(c,h)}}else{if(q(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=V,n=null,a=z,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function de(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ve(e,t,r,n){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:a.pathname==="/"?a.pathname=`_root.${n}`:t&&T(a.pathname,t)==="/"?a.pathname=`${U(t)}/_root.${n}`:a.pathname=`${U(a.pathname)}.${n}`,a}async function lr(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ir(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function sr(e,t,r){let n=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await lr(o,r);return l.links?l.links():[]}return[]}));return hr(n.flat(1).filter(ir).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function be(e,t,r,n,a,o){let l=(s,c)=>r[c]?s.route.id!==r[c].route.id:!0,u=(s,c)=>{var f;return r[c].pathname!==s.pathname||((f=r[c].route.path)==null?void 0:f.endsWith("*"))&&r[c].params["*"]!==s.params["*"]};return o==="assets"?t.filter((s,c)=>l(s,c)||u(s,c)):o==="data"?t.filter((s,c)=>{var h;let f=n.routes[s.route.id];if(!f||!f.hasLoader)return!1;if(l(s,c)||u(s,c))return!0;if(s.route.shouldRevalidate){let d=s.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((h=r[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function ur(e,t,{includeHydrateFallback:r}={}){return cr(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function cr(e){return[...new Set(e)]}function fr(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function hr(e,t){let r=new Set;return new Set(t),e.reduce((n,a)=>{let o=JSON.stringify(fr(a));return r.has(o)||(r.add(o),n.push({key:o,link:a})),n},[])}function me(){let e=i.useContext(O);return de(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function dr(){let e=i.useContext(Y);return de(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var pe=i.createContext(void 0);pe.displayName="FrameworkContext";function G(){let e=i.useContext(pe);return de(e,"You must render this element inside a <HydratedRouter> element"),e}function mr(e,t){let r=i.useContext(pe),[n,a]=i.useState(!1),[o,l]=i.useState(!1),{onFocus:u,onBlur:s,onMouseEnter:c,onMouseLeave:f,onTouchStart:h}=t,d=i.useRef(null);i.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let g=m=>{m.forEach(R=>{l(R.isIntersecting)})},p=new IntersectionObserver(g,{threshold:.5});return d.current&&p.observe(d.current),()=>{p.disconnect()}}},[e]),i.useEffect(()=>{if(n){let g=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(g)}}},[n]);let y=()=>{a(!0)},v=()=>{a(!1),l(!1)};return r?e!=="intent"?[o,d,{}]:[o,d,{onFocus:B(u,y),onBlur:B(s,v),onMouseEnter:B(c,y),onMouseLeave:B(f,v),onTouchStart:B(h,y)}]:[!1,d,{}]}function B(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function pr({page:e,...t}){let r=bt(),{nonce:n}=G(),{router:a}=me(),o=i.useMemo(()=>Le(a.routes,e,a.basename),[a.routes,e,a.basename]);return o?(t.nonce==null&&n&&(t={...t,nonce:n}),r?i.createElement(yr,{page:e,matches:o,...t}):i.createElement(vr,{page:e,matches:o,...t})):null}function gr(e){let{manifest:t,routeModules:r}=G(),[n,a]=i.useState([]);return i.useEffect(()=>{let o=!1;return sr(e,t,r).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,r]),n}function yr({page:e,matches:t,...r}){let n=k(),{future:a}=G(),{basename:o}=me(),l=i.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let u=Ve(e,o,a.v8_trailingSlashAwareDataRequests,"rsc"),s=!1,c=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?s=!0:c.push(f.route.id);return s&&c.length>0&&u.searchParams.set("_routes",c.join(",")),[u.pathname+u.search]},[o,a.v8_trailingSlashAwareDataRequests,e,n,t]);return i.createElement(i.Fragment,null,l.map(u=>i.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...r})))}function vr({page:e,matches:t,...r}){let n=k(),{future:a,manifest:o,routeModules:l}=G(),{basename:u}=me(),{loaderData:s,matches:c}=dr(),f=i.useMemo(()=>be(e,t,c,o,n,"data"),[e,t,c,o,n]),h=i.useMemo(()=>be(e,t,c,o,n,"assets"),[e,t,c,o,n]),d=i.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let g=new Set,p=!1;if(t.forEach(R=>{var C;let w=o.routes[R.route.id];!w||!w.hasLoader||(!f.some(x=>x.route.id===R.route.id)&&R.route.id in s&&((C=l[R.route.id])!=null&&C.shouldRevalidate)||w.hasClientLoader?p=!0:g.add(R.route.id))}),g.size===0)return[];let m=Ve(e,u,a.v8_trailingSlashAwareDataRequests,"data");return p&&g.size>0&&m.searchParams.set("_routes",t.filter(R=>g.has(R.route.id)).map(R=>R.route.id).join(",")),[m.pathname+m.search]},[u,a.v8_trailingSlashAwareDataRequests,s,n,o,f,t,e,l]),y=i.useMemo(()=>ur(h,o),[h,o]),v=gr(h);return i.createElement(i.Fragment,null,d.map(g=>i.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...r})),y.map(g=>i.createElement("link",{key:g,rel:"modulepreload",href:g,...r})),v.map(({key:g,link:p})=>i.createElement("link",{key:g,nonce:r.nonce,...p,crossOrigin:p.crossOrigin??r.crossOrigin})))}function Rr(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var wr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{wr&&(window.__reactRouterVersion="7.18.4")}catch{}function Dr({basename:e,children:t,useTransitions:r,window:n}){let a=i.useRef();a.current==null&&(a.current=Ge({window:n,v5Compat:!0}));let o=a.current,[l,u]=i.useState({action:o.action,location:o.location}),s=i.useCallback(c=>{r===!1?u(c):i.startTransition(()=>u(c))},[r]);return i.useLayoutEffect(()=>o.listen(s),[o,s]),i.createElement(Gt,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,useTransitions:r})}var ze=i.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:l,mask:u,state:s,target:c,to:f,preventScrollReset:h,viewTransition:d,defaultShouldRevalidate:y,...v},g){let{basename:p,navigator:m,useTransitions:R}=i.useContext(S),w=typeof f=="string"&&oe.test(f),C=De(f,p);f=C.to;let x=Ft(f,{relative:a}),$=k(),N=null;if(u){let F=K(u,[],$.mask?$.mask.pathname:"/",!0);p!=="/"&&(F.pathname=F.pathname==="/"?p:P([p,F.pathname])),N=m.createHref(F)}let[D,_,X]=mr(n,v),Ke=Sr(f,{replace:l,mask:u,state:s,target:c,preventScrollReset:h,relative:a,viewTransition:d,defaultShouldRevalidate:y,useTransitions:R});function Ye(F){t&&t(F),F.defaultPrevented||Ke(F)}let ge=!(C.isExternal||o),ye=i.createElement("a",{...v,...X,href:(ge?N:void 0)||C.absoluteURL||x,onClick:ge?Ye:t,ref:Rr(g,_),target:c,"data-discover":!w&&r==="render"?"true":void 0});return D&&!w?i.createElement(i.Fragment,null,ye,i.createElement(pr,{page:x})):ye});ze.displayName="Link";var Er=i.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:l,viewTransition:u,children:s,...c},f){let h=H(l,{relative:c.relative}),d=k(),y=i.useContext(Y),{navigator:v,basename:g}=i.useContext(S),p=y!=null&&$r(h)&&u===!0,m=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,R=d.pathname,w=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;r||(R=R.toLowerCase(),w=w?w.toLowerCase():null,m=m.toLowerCase()),w&&g&&(w=T(w,g)||w);const C=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let x=R===m||!a&&R.startsWith(m)&&R.charAt(C)==="/",$=w!=null&&(w===m||!a&&w.startsWith(m)&&w.charAt(m.length)==="/"),N={isActive:x,isPending:$,isTransitioning:p},D=x?t:void 0,_;typeof n=="function"?_=n(N):_=[n,x?"active":null,$?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let X=typeof o=="function"?o(N):o;return i.createElement(ze,{...c,"aria-current":D,className:_,ref:f,style:X,to:l,viewTransition:u},typeof s=="function"?s(N):s)});Er.displayName="NavLink";var xr=i.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:l=V,action:u,onSubmit:s,relative:c,preventScrollReset:f,viewTransition:h,defaultShouldRevalidate:d,...y},v)=>{let{useTransitions:g}=i.useContext(S),p=Lr(),m=kr(u,{relative:c}),R=l.toLowerCase()==="get"?"get":"post",w=typeof u=="string"&&oe.test(u),C=x=>{if(s&&s(x),x.defaultPrevented)return;x.preventDefault();let $=x.nativeEvent.submitter,N=($==null?void 0:$.getAttribute("formmethod"))||l,D=()=>p($||x.currentTarget,{fetcherKey:t,method:N,navigate:r,replace:a,state:o,relative:c,preventScrollReset:f,viewTransition:h,defaultShouldRevalidate:d});g&&r!==!1?i.startTransition(()=>D()):D()};return i.createElement("form",{ref:v,method:R,action:m,onSubmit:n?s:C,...y,"data-discover":!w&&e==="render"?"true":void 0})});xr.displayName="Form";function Cr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Je(e){let t=i.useContext(O);return E(t,Cr(e)),t}function Sr(e,{target:t,replace:r,mask:n,state:a,preventScrollReset:o,relative:l,viewTransition:u,defaultShouldRevalidate:s,useTransitions:c}={}){let f=ce(),h=k(),d=H(e,{relative:l});return i.useCallback(y=>{if(tr(y,t)){y.preventDefault();let v=r!==void 0?r:I(h)===I(d),g=()=>f(e,{replace:v,mask:n,state:a,preventScrollReset:o,relative:l,viewTransition:u,defaultShouldRevalidate:s});c?i.startTransition(()=>g()):g()}},[h,f,d,r,n,a,t,e,o,l,u,s,c])}function Ur(e){b(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=i.useRef(ae(e)),r=i.useRef(!1),n=k(),a=i.useMemo(()=>rr(n.search,r.current?null:t.current),[n.search]),o=ce(),l=i.useCallback((u,s)=>{const c=ae(typeof u=="function"?u(new URLSearchParams(a)):u);r.current=!0,o("?"+c,s)},[o,a]);return[a,l]}var br=0,Pr=()=>`__${String(++br)}__`;function Lr(){let{router:e}=Je("useSubmit"),{basename:t}=i.useContext(S),r=zt(),n=e.fetch,a=e.navigate;return i.useCallback(async(o,l={})=>{let{action:u,method:s,encType:c,formData:f,body:h}=or(o,t);if(l.navigate===!1){let d=l.fetcherKey||Pr();await n(d,r,l.action||u,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:f,body:h,formMethod:l.method||s,formEncType:l.encType||c,flushSync:l.flushSync})}else await a(l.action||u,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:f,body:h,formMethod:l.method||s,formEncType:l.encType||c,replace:l.replace,state:l.state,fromRouteId:r,flushSync:l.flushSync,viewTransition:l.viewTransition})},[n,a,t,r])}function kr(e,{relative:t}={}){let{basename:r}=i.useContext(S),n=i.useContext(L);E(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...H(e||".",{relative:t})},l=k();if(e==null){o.search=l.search;let u=new URLSearchParams(o.search),s=u.getAll("index");if(s.some(f=>f==="")){u.delete("index"),s.filter(h=>h).forEach(h=>u.append("index",h));let f=u.toString();o.search=f?`?${f}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:P([r,o.pathname])),I(o)}function $r(e,{relative:t}={}){let r=i.useContext(Oe);E(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Je("useViewTransitionState"),a=H(e,{relative:t});if(!r.isTransitioning)return!1;let o=T(r.currentLocation.pathname,n)||r.currentLocation.pathname,l=T(r.nextLocation.pathname,n)||r.nextLocation.pathname;return J(a.pathname,l)!=null||J(a.pathname,o)!=null}export{Dr as B,ze as L,Nr as N,Fr as O,qt as R,Ir as a,ce as b,Ur as c,k as u};
package/public/index.html CHANGED
@@ -5,10 +5,10 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
7
7
  <title>tapflow</title>
8
- <script type="module" crossorigin src="/assets/index-COIlCLCW.js"></script>
9
- <link rel="modulepreload" crossorigin href="/assets/vendor-react-C5H_1fOn.js">
10
- <link rel="modulepreload" crossorigin href="/assets/vendor-router-CnmrRwJF.js">
11
- <link rel="stylesheet" crossorigin href="/assets/index-Bxs7CdEi.css">
8
+ <script type="module" crossorigin src="/assets/index-Cm17I31a.js"></script>
9
+ <link rel="modulepreload" crossorigin href="/assets/vendor-react-BlPSzrEe.js">
10
+ <link rel="modulepreload" crossorigin href="/assets/vendor-router-B_lVHrKl.js">
11
+ <link rel="stylesheet" crossorigin href="/assets/index-D_P99bPX.css">
12
12
  </head>
13
13
  <body>
14
14
  <div id="root"></div>
Binary file
Binary file
@@ -1,21 +0,0 @@
1
- import{i as r,j as e}from"./vendor-react-C5H_1fOn.js";import{a1 as C,B as y,L as b,a9 as D,W as K,I as M,S as X,f as ee}from"./index-COIlCLCW.js";import{e as se,S as ae,P as te,g as le,h as ne,i as re,b as ie,d as ce,s as oe,u as de}from"./build-format-DKGajT96.js";import{D as O,f as L,a as U,d as E,e as V,S as A,i as _,j as z,g as B,h as c,C as ue}from"./dialog-DEL1xxKJ.js";import{P as he,T as xe}from"./trash-CD9Y9G-i.js";import{B as T}from"./badge-B4gbViMs.js";import{A as pe,c as me,f as fe,g as ge,d as je,e as ve,b as Ne,a as Se}from"./alert-dialog-DhOTocMh.js";import{b as ye,c as we}from"./vendor-router-CnmrRwJF.js";/**
2
- * @license lucide-react v1.45.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 $={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};$.node;const be=C($);/**
7
- * @license lucide-react v1.45.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 q={name:"package",size:24,node:[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]};q.node;const De=C(q);/**
12
- * @license lucide-react v1.45.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const H={name:"timer-off",size:24,node:[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M4.6 11a8 8 0 0 0 1.7 8.7 8 8 0 0 0 8.7 1.7",key:"10he05"}],["path",{d:"M7.4 7.4a8 8 0 0 1 10.3 1 8 8 0 0 1 .9 10.2",key:"15f7sh"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M12 12v-2",key:"fwoke6"}]]};H.node;const ke=C(H);/**
17
- * @license lucide-react v1.45.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const Z={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};Z.node;const Ce=C(Z);function Ae({onSuccess:s,appId:l}){const[h,i]=r.useState(!1),[t,g]=r.useState(null),[o,x]=r.useState("none"),j=r.useRef(null);function p(n){if(n.preventDefault(),!t)return;const d=new FormData;d.append("file",t),o!=="none"&&d.append("status",o),l&&d.append("app_id",String(l));const w=fetch("/api/v1/builds",{method:"POST",credentials:"include",body:d}).then(async u=>{if(!u.ok){const m=await u.json().catch(()=>({}));throw new Error(m.error??"Upload failed. Check the file format.")}s()});D.promise(w,{loading:"Uploading build…",success:"Build uploaded",error:u=>u instanceof Error?u.message:"Failed to upload build"}),i(!1),g(null),x("none")}function N(n){i(n),n||(g(null),x("none"))}return e.jsxs(O,{open:h,onOpenChange:N,children:[e.jsx(L,{asChild:!0,children:e.jsxs(y,{size:"sm",children:[e.jsx(Ce,{className:"mr-2 h-4 w-4"}),"Upload build"]})}),e.jsxs(U,{className:"sm:max-w-md",children:[e.jsx(E,{children:e.jsx(V,{children:"Upload build"})}),e.jsxs("form",{onSubmit:p,className:"flex flex-col gap-4 pt-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{children:"File"}),e.jsx("div",{className:"flex h-24 cursor-pointer items-center justify-center rounded-md border-2 border-dashed text-sm text-muted-foreground hover:border-primary",onClick:()=>{var n;return(n=j.current)==null?void 0:n.click()},onDragOver:n=>n.preventDefault(),onDrop:n=>{n.preventDefault();const d=n.dataTransfer.files[0];d&&g(d)},children:t?t.name:"Click or drag to upload"}),e.jsx("input",{ref:j,type:"file",accept:".zip,.apk,.tgz,.tar.gz,application/gzip,application/x-gzip",className:"hidden",onChange:n=>{var d;return g(((d=n.target.files)==null?void 0:d[0])??null)}}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["iOS: ",e.jsx("code",{children:".app.zip"})," or ",e.jsx("code",{children:".tar.gz"})," / ",e.jsx("code",{children:".tgz"})," (e.g. an EAS simulator build)  · Android: ",e.jsx("code",{children:".apk"})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(b,{children:["Status ",e.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),e.jsxs(A,{value:o,onValueChange:x,children:[e.jsx(_,{children:e.jsx(z,{})}),e.jsxs(B,{children:[e.jsx(c,{value:"none",children:"None"}),e.jsx(c,{value:"Backlog",children:"Backlog"}),e.jsx(c,{value:"In Progress",children:"In Progress"}),e.jsx(c,{value:"Done",children:"Done"}),e.jsx(c,{value:"Rejected",children:"Rejected"})]})]})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(y,{type:"button",variant:"outline",className:"w-24",onClick:()=>i(!1),children:"Cancel"}),e.jsx(y,{type:"submit",className:"w-24",disabled:!t,children:"Upload"})]})]})]})]})}function k({className:s,...l}){return e.jsx("span",{className:K("font-mono text-xs tabular-nums tracking-tight",s),...l})}function _e({onSuccess:s}){const[l,h]=r.useState(!1),[i,t]=r.useState(""),[g,o]=r.useState(""),[x,j]=r.useState("ios"),[p,N]=r.useState(""),[n,d]=r.useState(!1);async function w(u){u.preventDefault(),N(""),d(!0);try{const m=await se({name:i.trim(),bundle_id_key:g.trim(),platform:x});if(!m){N("Failed to create app");return}if("error"in m){N(m.error);return}h(!1),t(""),o(""),j("ios"),D.success("App created"),s()}catch{D.error("Failed to create app — check your network")}finally{d(!1)}}return e.jsxs(O,{open:l,onOpenChange:h,children:[e.jsx(L,{asChild:!0,children:e.jsxs("button",{className:"flex w-full items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground transition-colors",children:[e.jsx(he,{className:"size-3.5 shrink-0"}),e.jsx("span",{children:"Add App"})]})}),e.jsxs(U,{className:"sm:max-w-sm",children:[e.jsx(E,{children:e.jsx(V,{children:"Add App"})}),e.jsxs("form",{onSubmit:w,className:"flex flex-col gap-4 pt-2",children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(b,{htmlFor:"app-name",children:"Name"}),e.jsx(M,{id:"app-name",value:i,onChange:u=>t(u.target.value),placeholder:"My App",required:!0})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(b,{htmlFor:"bundle-id",children:"Bundle ID"}),e.jsx(M,{id:"bundle-id",value:g,onChange:u=>o(u.target.value),placeholder:"com.example.myapp",required:!0})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(b,{htmlFor:"platform",children:"Platform"}),e.jsxs(A,{value:x,onValueChange:u=>j(u),children:[e.jsx(_,{id:"platform",children:e.jsx(z,{})}),e.jsxs(B,{children:[e.jsx(c,{value:"ios",children:"iOS"}),e.jsx(c,{value:"android",children:"Android"}),e.jsx(c,{value:"both",children:"Both"})]})]})]}),p&&e.jsx("p",{className:"text-sm text-destructive",children:p}),e.jsx(y,{type:"submit",disabled:n,className:"w-full",children:n?"Creating…":"Create App"})]})]})]})}function ze({apps:s,selectedAppId:l,onSelect:h,onAdd:i}){return e.jsxs("aside",{className:"w-64 shrink-0 border-r flex flex-col gap-1 p-3 overflow-y-auto",children:[e.jsx("span",{className:"px-2 pb-1 font-mono text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Apps"}),s.length===0&&e.jsx("span",{className:"px-2 text-sm text-muted-foreground",children:"No apps yet"}),s.map(t=>e.jsxs("button",{onClick:()=>h(t.id),className:["flex flex-col gap-0.5 rounded-md px-2 py-2 text-left text-sm hover:bg-accent overflow-hidden",t.id===l?"bg-accent font-medium":""].join(" "),children:[e.jsx("span",{className:"truncate",children:t.name}),e.jsx(k,{className:"text-muted-foreground truncate",children:t.bundle_id_key})]},t.id)),e.jsx("div",{className:"mt-1 border-t pt-1",children:e.jsx(_e,{onSuccess:i})})]})}function Be(s){const l=/[zZ]|[+-]\d{2}:?\d{2}$/.test(s),i=new Date(l?s:s.replace(" ","T")+"Z").getTime()-Date.now();if(i<=0)return{label:"Deleting…",urgent:!0};const t=Math.floor(i/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 Ie({build:s,isLast:l,onNavigate:h,onStatusChange:i,onScheduleDeletion:t,onCancelDeletion:g}){const[o,x]=r.useState(!1),j=s.status_label==="Done",p=s.delete_after?Be(s.delete_after):null;function N(n){i(s.id,n==="none"?null:n)}return e.jsxs(e.Fragment,{children:[e.jsx(pe,{open:o,onOpenChange:x,children:e.jsxs(me,{children:[e.jsxs(fe,{children:[e.jsx(ge,{children:"Schedule deletion?"}),e.jsx(je,{children:"Build files will be deleted after 7 days. You can cancel the scheduled deletion anytime before then."})]}),e.jsxs(ve,{children:[e.jsx(Ne,{children:"Cancel"}),e.jsx(Se,{onClick:()=>{t(s.id),x(!1)},children:"Schedule deletion"})]})]})}),e.jsxs("div",{className:["flex items-center gap-3 px-4 py-3",l?"":"border-b"].join(" "),children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("span",{className:"text-sm font-medium",children:["build ",e.jsx(k,{children:s.build_number??"—"})]}),e.jsx(T,{tone:s.platform==="ios"?"ios":"android",className:"text-xs capitalize",children:s.platform}),s.status_label&&e.jsx(T,{tone:ae[s.status_label],className:"text-xs",children:s.status_label}),p&&e.jsx(T,{tone:p.urgent?"rejected":"backlog",className:"text-xs",children:p.label})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:"14px",marginTop:"0.7rem",alignItems:"center"},className:"text-xs text-muted-foreground",children:[s.uploader&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:s.uploader}),e.jsx(X,{orientation:"vertical",className:"h-3"})]}),e.jsx(k,{children:new Date(s.uploaded_at).toLocaleDateString()})]})]}),e.jsxs(A,{value:s.status_label??"none",onValueChange:N,children:[e.jsx(_,{className:"h-9 w-32 text-xs",children:e.jsx(z,{})}),e.jsxs(B,{children:[e.jsx(c,{value:"none",children:e.jsx("span",{className:"text-muted-foreground",children:"—"})}),e.jsx(c,{value:"Backlog",children:"Backlog"}),e.jsx(c,{value:"In Progress",children:"In Progress"}),e.jsx(c,{value:"Done",children:"Done"}),e.jsx(c,{value:"Rejected",children:"Rejected"})]})]}),p?e.jsx(y,{size:"icon-sm",variant:"outline",onClick:()=>g(s.id),title:"Cancel scheduled deletion",children:e.jsx(ke,{className:"h-3.5 w-3.5"})}):e.jsx(y,{size:"icon-sm",variant:"destructive",onClick:()=>x(!0),title:"Schedule deletion",children:e.jsx(xe,{className:"h-3.5 w-3.5"})}),e.jsxs(y,{size:"sm",onClick:()=>h(s.id),disabled:j,children:[e.jsx(te,{className:"mr-1.5 h-3.5 w-3.5"}),"Start QA"]})]})]})}function Pe({versionName:s,builds:l,isOpen:h,onToggle:i,onNavigate:t,onStatusChange:g,onScheduleDeletion:o,onCancelDeletion:x}){return e.jsxs("div",{className:"rounded-lg shadow-card-2 overflow-hidden",children:[e.jsxs("button",{className:"flex w-full items-center gap-2 px-4 py-3 text-left hover:bg-accent/50 bg-card",onClick:i,children:[h?e.jsx(ue,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):e.jsx(ee,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),e.jsx(k,{className:"font-medium text-sm text-foreground",children:s}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",l.length," build",l.length>1?"s":"",")"]})]}),h&&e.jsx("div",{className:"border-t bg-card",children:l.map((j,p)=>e.jsx(Ie,{build:j,isLast:p===l.length-1,onNavigate:t,onStatusChange:g,onScheduleDeletion:o,onCancelDeletion:x},j.id))})]})}function Ve(){const s=ye(),[l,h]=we(),[i,t]=r.useState([]),[g,o]=r.useState([]),[x,j]=r.useState(""),[p,N]=r.useState("all"),[n,d]=r.useState(!0),[w,u]=r.useState(new Set),m=l.get("appId")?Number(l.get("appId")):null,F=i.find(a=>a.id===m)??null,I=r.useCallback(async()=>{const a=await le();t(a),!l.get("appId")&&a.length>0&&h({appId:String(a[0].id)},{replace:!0})},[l,h]),P=r.useCallback(async()=>{if(!m){o([]),d(!1);return}d(!0);try{const a=await ne({appId:m,search:x,statusFilter:p});o(a),a.length>0&&w.size===0&&u(new Set([a[0].version_name??"Unversioned"]))}finally{d(!1)}},[m,x,p]);r.useEffect(()=>{I()},[]),r.useEffect(()=>{P()},[P]);function G(a){a!==m&&(o([]),u(new Set)),h({appId:String(a)})}function Q(a){u(v=>{const f=new Set(v);return f.has(a)?f.delete(a):f.add(a),f})}async function W(a,v){await de(a,v),o(f=>f.map(S=>S.id===a?{...S,status_label:v}:S))}async function Y(a){try{const v=await oe(a);o(f=>f.map(S=>S.id===a?{...S,delete_after:v}:S))}catch{D.error("Failed to schedule deletion")}}async function J(a){try{await ce(a),o(v=>v.map(f=>f.id===a?{...f,delete_after:null}:f))}catch{D.error("Failed to cancel scheduled deletion")}}const R=re(g);return e.jsxs("div",{className:"flex h-full gap-0",children:[e.jsx(ze,{apps:i,selectedAppId:m,onSelect:G,onAdd:I}),e.jsxs("div",{className:"flex-1 flex flex-col gap-4 p-4 overflow-y-auto min-w-0",children:[e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[e.jsx("h1",{className:"text-xl font-semibold tracking-display-sm",children:F?F.name:"App Center"}),e.jsx(Ae,{onSuccess:()=>{I(),P()},appId:m})]}),m?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(ie,{placeholder:"Search version…",value:x,onChange:j}),e.jsxs(A,{value:p,onValueChange:N,children:[e.jsx(_,{className:"h-8 w-36",children:e.jsx(z,{placeholder:"Status"})}),e.jsxs(B,{children:[e.jsx(c,{value:"all",children:"All statuses"}),e.jsx(c,{value:"Backlog",children:"Backlog"}),e.jsx(c,{value:"In Progress",children:"In Progress"}),e.jsx(c,{value:"Done",children:"Done"}),e.jsx(c,{value:"Rejected",children:"Rejected"})]})]})]}),n?e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading…"}):R.length===0?e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center",children:[e.jsx(De,{className:"w-8 h-8 text-muted-foreground/40"}),e.jsx("p",{className:"text-sm font-medium",children:"No builds yet"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Upload the first build to get started."})]}):e.jsx("div",{className:"flex flex-col gap-2",children:R.map(({versionName:a,builds:v})=>e.jsx(Pe,{versionName:a,builds:v,isOpen:w.has(a),onToggle:()=>Q(a),onNavigate:f=>s(`/app-center/build?id=${f}`),onStatusChange:W,onScheduleDeletion:Y,onCancelDeletion:J},a))})]}):e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center",children:[e.jsx(be,{className:"w-8 h-8 text-muted-foreground/40"}),e.jsx("p",{className:"text-sm font-medium",children:"No app selected"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose an app from the sidebar to view its builds."})]})]})]})}export{Ve as AppCenter};
@@ -1 +0,0 @@
1
- import{i,j as e}from"./vendor-react-C5H_1fOn.js";import{an as X,ab as Z,ai as S,aa as y,am as I,C as g,c as j,d as v,a as w,L as m,I as u,S as H,h as M,a9 as n,B as h,N as ee,W as se,Q as ae,a7 as C,_ as $,a8 as p}from"./index-COIlCLCW.js";import{B as re}from"./badge-B4gbViMs.js";import{A as te,h as oe,c as ne,f as ie,g as le,d as ce,e as de,b as me,a as ue}from"./alert-dialog-DhOTocMh.js";import{P as O}from"./pencil-CPaoEKFm.js";import"./vendor-router-CnmrRwJF.js";const he=C({teamName:p().min(1),logo:$(File).nullable().optional()}),pe=C({displayName:p().min(1),avatar:$(File).nullable().optional()}),fe=C({currentPassword:p().min(1),newPassword:p().min(8),confirmPassword:p()}).refine(f=>f.newPassword===f.confirmPassword,{message:"Passwords do not match",path:["confirmPassword"]});function Ne(){const{resolvedTheme:f}=X(),V=f==="dark"?"/logo-dark.svg":"/logo.svg",{user:o}=Z(),b=(o==null?void 0:o.role)==="Admin",N=(o==null?void 0:o.role)==="Admin"||(o==null?void 0:o.role)==="Developer",[J,P]=i.useState(null),A=i.useRef(null),d=S({resolver:y(he),mode:"onBlur",defaultValues:{teamName:"",logo:null}});i.useEffect(()=>{b&&fetch("/api/v1/settings",{credentials:"include"}).then(s=>s.ok?s.json():null).then(s=>{s&&(d.reset({teamName:s.team_name,logo:null}),P(s.logo_url))})},[b]);async function Q(s){const a=new FormData;a.append("team_name",s.teamName),s.logo&&a.append("logo",s.logo);try{if(!(await fetch("/api/v1/settings",{method:"PATCH",credentials:"include",body:a})).ok){n.error("Failed to update workspace");return}n.success("Workspace updated")}catch{n.error("Failed to update workspace")}}const[k,F]=i.useState(null),D=i.useRef(null),c=S({resolver:y(pe),mode:"onBlur",defaultValues:{displayName:"",avatar:null}});i.useEffect(()=>{o&&(c.reset({displayName:o.displayName??"",avatar:null}),F(o.avatarUrl??null))},[o]);async function Y(s){const a=new FormData;a.append("display_name",s.displayName),s.avatar&&a.append("avatar",s.avatar);try{if(!(await fetch("/api/v1/profile",{method:"PATCH",credentials:"include",body:a})).ok){n.error("Failed to update profile");return}n.success("Profile updated")}catch{n.error("Failed to update profile")}}const t=S({resolver:y(fe),mode:"onBlur"});async function q(s){try{const a=await fetch("/api/v1/auth/change-password",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:s.currentPassword,newPassword:s.newPassword})});if(!a.ok){const r=await a.json();t.setError("root",{message:r.error??"Failed to change password"});return}t.reset(),n.success("Password changed")}catch{t.setError("root",{message:"Network error"})}}const[T,E]=i.useState([]),[B,L]=i.useState({}),[U,z]=i.useState({}),[R,_]=i.useState({});i.useEffect(()=>{N&&fetch("/api/v1/apps",{credentials:"include"}).then(s=>s.ok?s.json():null).then(s=>{if(!s)return;E(s.items);const a={};s.items.forEach(r=>{a[r.id]=r.name}),L(a)})},[N]);async function G(s){_(a=>({...a,[s]:!0}));try{if(!(await fetch(`/api/v1/apps/${s}`,{method:"DELETE",credentials:"include"})).ok){n.error("Failed to delete app");return}E(r=>r.filter(l=>l.id!==s)),n.success("App deleted")}catch{n.error("Failed to delete app")}finally{_(a=>({...a,[s]:!1}))}}async function K(s){z(a=>({...a,[s]:!0}));try{if(!(await fetch(`/api/v1/apps/${s}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:B[s]})})).ok){n.error("Failed to update app");return}n.success("App updated")}catch{n.error("Failed to update app")}finally{z(a=>({...a,[s]:!1}))}}const x=I({control:c.control,name:"displayName"});return e.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[e.jsx("h1",{className:"text-xl font-semibold tracking-display-sm",children:"Settings"}),b&&e.jsxs(g,{children:[e.jsx(j,{children:e.jsx(v,{children:"Workspace"})}),e.jsx(w,{children:e.jsxs("form",{onSubmit:d.handleSubmit(Q),className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(m,{htmlFor:"team-name",children:"Team name"}),e.jsx(u,{id:"team-name",placeholder:"My QA Team",...d.register("teamName")}),d.formState.errors.teamName&&e.jsx("p",{className:"text-sm text-destructive",children:d.formState.errors.teamName.message})]}),e.jsx(H,{}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(m,{children:["Logo ",e.jsx("span",{className:"text-muted-foreground text-xs",children:"(png · jpg, max 2MB)"})]}),e.jsx(M,{name:"logo",control:d.control,render:({field:s})=>e.jsxs("div",{className:"relative w-16 h-16",children:[e.jsx("img",{src:J??V,alt:"Workspace logo",className:"w-16 h-16 rounded-lg object-contain"}),e.jsx("button",{type:"button","aria-label":"Change logo",onClick:()=>{var a;return(a=A.current)==null?void 0:a.click()},className:"absolute bottom-0 right-0 w-6 h-6 rounded-full bg-background border border-border shadow-sm flex items-center justify-center hover:bg-accent transition-colors",children:e.jsx(O,{className:"w-3 h-3","aria-hidden":"true"})}),e.jsx("input",{ref:A,type:"file",accept:".png,.jpg,.jpeg",className:"hidden",onChange:a=>{var l;const r=(l=a.target.files)==null?void 0:l[0];if(r&&r.size>2*1024*1024){n.error("Image must be 2MB or less");return}r&&(s.onChange(r),P(URL.createObjectURL(r)))}})]})})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(h,{type:"submit",size:"sm",disabled:d.formState.isSubmitting,children:d.formState.isSubmitting?"Saving…":"Save changes"})})]})})]}),e.jsxs(g,{children:[e.jsx(j,{children:e.jsx(v,{children:"Profile"})}),e.jsx(w,{children:e.jsxs("form",{onSubmit:c.handleSubmit(Y),className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(m,{htmlFor:"display-name",children:"Nickname"}),e.jsx(u,{id:"display-name",placeholder:"Your name",...c.register("displayName")}),c.formState.errors.displayName&&e.jsx("p",{className:"text-sm text-destructive",children:c.formState.errors.displayName.message})]}),e.jsx(H,{}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(m,{children:["Avatar ",e.jsx("span",{className:"text-muted-foreground text-xs",children:"(png · jpg, max 2MB)"})]}),e.jsx(M,{name:"avatar",control:c.control,render:({field:s})=>{var a;return e.jsxs("div",{className:"relative w-14 h-14",children:[k?e.jsx("img",{src:k,alt:"Profile avatar",className:"w-14 h-14 rounded-full object-cover border"}):e.jsx("div",{className:"w-14 h-14 rounded-full flex items-center justify-center text-lg font-medium",style:(()=>{const r=ee(x||(o==null?void 0:o.email)||"");return{backgroundColor:r.bg,color:r.fg}})(),children:((a=x==null?void 0:x[0])==null?void 0:a.toUpperCase())??"?"}),e.jsx("button",{type:"button","aria-label":"Change avatar",onClick:()=>{var r;return(r=D.current)==null?void 0:r.click()},className:"absolute bottom-0 right-0 w-6 h-6 rounded-full bg-background border border-border shadow-sm flex items-center justify-center hover:bg-accent transition-colors",children:e.jsx(O,{className:"w-3 h-3","aria-hidden":"true"})}),e.jsx("input",{ref:D,type:"file",accept:".png,.jpg,.jpeg",className:"hidden",onChange:r=>{var W;const l=(W=r.target.files)==null?void 0:W[0];if(l&&l.size>2*1024*1024){n.error("Image must be 2MB or less");return}l&&(s.onChange(l),F(URL.createObjectURL(l)))}})]})}})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(h,{type:"submit",size:"sm",disabled:c.formState.isSubmitting,children:c.formState.isSubmitting?"Saving…":"Save changes"})})]})})]}),e.jsxs(g,{children:[e.jsx(j,{children:e.jsx(v,{children:"Password"})}),e.jsx(w,{children:e.jsxs("form",{onSubmit:t.handleSubmit(q),className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(m,{htmlFor:"current-password",children:"Current password"}),e.jsx(u,{id:"current-password",type:"password",...t.register("currentPassword")}),t.formState.errors.currentPassword&&e.jsx("p",{className:"text-sm text-destructive",children:t.formState.errors.currentPassword.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(m,{htmlFor:"new-password",children:"New password"}),e.jsx(u,{id:"new-password",type:"password",...t.register("newPassword")}),t.formState.errors.newPassword&&e.jsx("p",{className:"text-sm text-destructive",children:t.formState.errors.newPassword.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(m,{htmlFor:"confirm-password",children:"Confirm new password"}),e.jsx(u,{id:"confirm-password",type:"password",...t.register("confirmPassword")}),t.formState.errors.confirmPassword&&e.jsx("p",{className:"text-sm text-destructive",children:t.formState.errors.confirmPassword.message})]}),t.formState.errors.root&&e.jsx("p",{className:"text-sm text-destructive",children:t.formState.errors.root.message}),e.jsx("div",{className:"flex justify-end",children:e.jsx(h,{type:"submit",size:"sm",disabled:t.formState.isSubmitting,children:t.formState.isSubmitting?"Saving…":"Change password"})})]})})]}),N&&T.length>0&&e.jsxs(g,{children:[e.jsx(j,{children:e.jsx(v,{children:"Apps"})}),e.jsx(w,{children:e.jsx("div",{className:"flex flex-col divide-y divide-border",children:T.map(s=>e.jsxs("div",{className:"flex flex-col gap-2 py-4 first:pt-0 last:pb-0",children:[e.jsx(m,{htmlFor:`app-${s.id}`,children:"App Name"}),e.jsx(u,{id:`app-${s.id}`,value:B[s.id]??"",onChange:a=>L(r=>({...r,[s.id]:a.target.value}))}),e.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:s.bundle_id_key}),e.jsx(re,{tone:s.platform==="ios"?"ios":s.platform==="android"?"android":void 0,variant:s.platform==="both"?"secondary":void 0,className:"capitalize",children:s.platform})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx(h,{size:"sm",variant:"outline",disabled:U[s.id],onClick:()=>K(s.id),children:U[s.id]?"Saving…":"Save"}),e.jsxs(te,{children:[e.jsx(oe,{asChild:!0,children:e.jsx(h,{size:"sm",variant:"destructive",disabled:R[s.id],children:R[s.id]?"Deleting…":"Delete"})}),e.jsxs(ne,{children:[e.jsxs(ie,{children:[e.jsx(le,{children:"Delete app?"}),e.jsxs(ce,{children:["This will permanently delete ",e.jsx("strong",{children:s.name})," and all its builds. This action cannot be undone."]})]}),e.jsxs(de,{children:[e.jsx(me,{className:"w-24",children:"Cancel"}),e.jsx(ue,{className:se(ae({variant:"destructive"}),"w-24"),onClick:()=>G(s.id),children:"Delete"})]})]})]})]})]})]},s.id))})})]})]})}export{Ne as DefaultSettings};
@@ -1 +0,0 @@
1
- import{i as n,j as e}from"./vendor-react-C5H_1fOn.js";import{ai as A,aa as E,am as L,C as b,c as y,d as C,b as k,a as M,L as d,I as h,h as T,N as U,S as _,B as D,a7 as O,a8 as x,_ as Y}from"./index-COIlCLCW.js";import{b as z,c as H}from"./vendor-router-CnmrRwJF.js";import{P as V}from"./pencil-CPaoEKFm.js";const W=O({displayName:x().optional(),avatar:Y(File).nullable().optional(),password:x().min(8),confirm:x()}).refine(o=>o.password===o.confirm,{message:"Passwords do not match",path:["confirm"]});function K(){const o=z(),[S]=H(),c=S.get("token")??"",[f,m]=n.useState("loading"),[P,F]=n.useState(""),[v,R]=n.useState(null),j=n.useRef(null),{register:p,handleSubmit:B,control:g,setError:u,formState:{errors:t,isSubmitting:w}}=A({resolver:E(W),mode:"onBlur",defaultValues:{displayName:"",avatar:null}}),l=L({control:g,name:"displayName"})??"";n.useEffect(()=>{if(!c){m("invalid");return}fetch(`/api/v1/invitations/verify?token=${c}`).then(s=>s.ok?s.json():Promise.reject()).then(s=>{F(s.role),m("valid")}).catch(()=>m("invalid"))},[c]);async function I(s){var r;try{const a=new FormData;if(a.append("token",c),a.append("password",s.password),(r=s.displayName)!=null&&r.trim()&&a.append("display_name",s.displayName.trim()),s.avatar&&a.append("avatar",s.avatar),!(await fetch("/api/v1/invitations/accept",{method:"POST",body:a})).ok){u("root",{message:"Failed to accept invitation"});return}o("/app-center",{replace:!0})}catch{u("root",{message:"Network error. Please try again."})}}return f==="loading"?e.jsx("div",{className:"flex min-h-svh items-center justify-center"}):f==="invalid"?e.jsx("div",{className:"bg-mesh-gradient flex min-h-svh items-center justify-center overflow-hidden p-4",children:e.jsx(b,{level:4,className:"w-full max-w-sm text-center",children:e.jsxs(y,{children:[e.jsx(C,{children:"Invitation expired"}),e.jsx(k,{children:"This invite link is invalid or has expired. Ask your admin for a new one."})]})})}):e.jsx("div",{className:"bg-mesh-gradient flex min-h-svh items-center justify-center overflow-hidden p-4",children:e.jsxs(b,{level:4,className:"w-full max-w-sm",children:[e.jsxs(y,{className:"text-center",children:[e.jsx(C,{children:"Set up your account"}),e.jsxs(k,{children:["You're joining as ",e.jsx("strong",{children:P})]})]}),e.jsx(M,{children:e.jsxs("form",{onSubmit:B(I),className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(d,{htmlFor:"display-name",children:["Nickname ",e.jsx("span",{className:"text-muted-foreground text-xs",children:"(optional)"})]}),e.jsx(h,{id:"display-name",placeholder:"Your name",...p("displayName")})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(d,{children:["Avatar ",e.jsx("span",{className:"text-muted-foreground text-xs",children:"(optional, png · jpg, max 2MB)"})]}),e.jsx(T,{name:"avatar",control:g,render:({field:s})=>{var r;return e.jsxs("div",{className:"relative w-14 h-14",children:[v?e.jsx("img",{src:v,alt:"Avatar preview",className:"w-14 h-14 rounded-full object-cover border"}):e.jsx("div",{className:"w-14 h-14 rounded-full flex items-center justify-center text-lg font-medium",style:(()=>{const a=U(l);return{backgroundColor:a.bg,color:a.fg}})(),children:((r=l==null?void 0:l[0])==null?void 0:r.toUpperCase())??"?"}),e.jsx("button",{type:"button","aria-label":"Change avatar",onClick:()=>{var a;return(a=j.current)==null?void 0:a.click()},className:"absolute bottom-0 right-0 w-6 h-6 rounded-full bg-background border border-border shadow-sm flex items-center justify-center hover:bg-accent transition-colors",children:e.jsx(V,{className:"w-3 h-3","aria-hidden":"true"})}),e.jsx("input",{ref:j,type:"file",accept:"image/png,image/jpeg",className:"hidden",onChange:a=>{var N;const i=(N=a.target.files)==null?void 0:N[0];if(i){if(i.size>2*1024*1024){u("avatar",{message:"Max 2MB for avatar"});return}s.onChange(i),R(URL.createObjectURL(i))}}})]})}}),t.avatar&&e.jsx("p",{className:"text-sm text-destructive",children:t.avatar.message})]}),e.jsx(_,{}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(d,{htmlFor:"password",children:"Password"}),e.jsx(h,{id:"password",type:"password",...p("password")}),t.password&&e.jsx("p",{className:"text-sm text-destructive",children:t.password.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(d,{htmlFor:"confirm",children:"Confirm password"}),e.jsx(h,{id:"confirm",type:"password",...p("confirm")}),t.confirm&&e.jsx("p",{className:"text-sm text-destructive",children:t.confirm.message})]}),t.root&&e.jsx("p",{className:"text-sm text-destructive",children:t.root.message}),e.jsx(D,{type:"submit",disabled:w,className:"w-full",children:w?"Creating account…":"Create account"})]})})]})})}export{K as Invite};
Binary file
Binary file
@@ -1,3 +0,0 @@
1
- import{i as l,j as e}from"./vendor-react-C5H_1fOn.js";import{R as ge,u as ve,T as je,b as ye,c as we}from"./resource-health-Ca4-5Rde.js";import{ac as be,M as ke}from"./index-COIlCLCW.js";import{t as Me,i as ie,j as Ne,h as Se,g as $e,e as Ae,c as Ee,G as Le,A as Te,m as le,d as Re,a as Ce,b as De,L as Oe,B as Ie,f as fe,l as Pe,P as _e}from"./vendor-charts-YPhPkjLw.js";import"./vendor-router-CnmrRwJF.js";const Ue=n=>(document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n));function Fe(){return l.useSyncExternalStore(Ue,()=>document.visibilityState!=="hidden",()=>!0)}function Be(n,h){const[i,a]=l.useState(()=>Date.now());return l.useEffect(()=>{if(!h)return;a(Date.now());const o=setInterval(()=>a(Date.now()),n);return()=>clearInterval(o)},[n,h]),i}const Q={"1h":36e5,"6h":216e5,"24h":864e5,"7d":6048e5},He={"1h":Ne.every(10),"6h":ie,"24h":ie.every(3),"7d":Me};function Ge(n,h,i){return He[i].range(new Date(n),new Date(h+1))}function Xe(n,h){const i=new Date(n);return h==="7d"?`${i.getMonth()+1}/${i.getDate()}`:`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`}const Ve=2e3;function We(n){return Math.min(1e4,Math.max(1e3,Q[n]/Ve))}const ze={"1h":6e4,"6h":6e4,"24h":3e5,"7d":9e5},Z=n=>Math.round(n*10)/10;function Ye(n,h,i){let a;for(const c of n){const d=c.agentName===h?c.resources:void 0;d&&(!a||d.reportedAt>a.reportedAt)&&(a=d)}if(!a||i-a.reportedAt>ge)return null;const o=c=>Number.isFinite(c)?Z(c):null;return{cpu:o(a.cpuPercent),mem:o(a.memUsedMB/a.memTotalMB*100)}}const xe={cpu:{label:"CPU",color:"#60a5fa"},mem:{label:"RAM",color:"#a78bfa"}},ce={"1h":"1h","6h":"6h","24h":"24h","7d":"7d"};function at(){const[n,h]=l.useState([]),[i,a]=l.useState([]),[o,c]=l.useState(null),[d,$]=l.useState("24h"),[g,k]=l.useState(null),A=Fe(),I=Be(We(d),A),{setNode:E}=be();l.useEffect(()=>(E(e.jsx("span",{className:"text-sm font-medium",children:"Mac Resources"})),()=>E(null)),[E]);const P=l.useCallback(s=>{s.type==="agents:listed"&&h(s.sessions??[])},[]),{send:_,connected:U}=ve(P);l.useEffect(()=>{if(!U)return;_({type:"agents:list"});const s=setInterval(()=>_({type:"agents:list"}),1e4);return()=>clearInterval(s)},[U,_]),l.useEffect(()=>{fetch("/api/v1/agents",{credentials:"include"}).then(s=>s.ok?s.json():[]).then(a)},[]);const G=n.map(s=>s.agentName).filter(Boolean),M=[...new Set([...G,...i])],R=new Set(G);l.useEffect(()=>{!o&&M.length>0&&c(M[0])},[M.join(",")]);const u=o?`${o}
2
- ${d}`:null,v=l.useRef(null);l.useEffect(()=>{if(!o||!A)return;const s=`${o}
3
- ${d}`,T=ze[d],w=new AbortController;let F=0;const B=()=>{const V=++F,H=()=>!w.signal.aborted&&V===F;fetch(`/api/v1/agents/${encodeURIComponent(o)}/resources?range=${d}`,{credentials:"include",signal:w.signal}).then(x=>{if(!x.ok)throw new Error(`HTTP ${x.status}`);return x.json()}).then(x=>{H()&&(v.current={key:s,at:Date.now()},k({key:s,points:x}))}).catch(()=>{H()&&(v.current={key:s,at:Date.now()},k(x=>(x==null?void 0:x.key)===s?x:{key:s,points:[]}))})},b=v.current,N=(b==null?void 0:b.key)===s?Math.max(0,T-(Date.now()-b.at)):0;let f;const r=()=>{B(),f=setInterval(B,T)},C=N>0?setTimeout(r,N):void 0;return N===0&&r(),()=>{w.abort(),clearTimeout(C),clearInterval(f)}},[o,d,A]);const L=g!==null&&g.key===u,X=u!==null&&!L,y=(L?g.points:[]).map(s=>({time:s.recorded_at,cpu:Z(s.cpu_percent),mem:Z(s.mem_percent)})),m=o?Ye(n,o,I):null;return e.jsxs("div",{className:"flex h-full min-h-0",children:[e.jsx("h1",{className:"sr-only",children:"Mac Resources"}),e.jsxs("aside",{"aria-labelledby":"macs-heading",className:"w-64 shrink-0 border-r flex flex-col gap-1 p-3 overflow-y-auto",children:[e.jsx("h2",{id:"macs-heading",className:"px-2 pb-1 font-mono text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Macs"}),M.length===0?e.jsx("span",{className:"px-2 text-sm text-muted-foreground",children:U?"No agents yet.":"Connecting…"}):M.map(s=>{const T=R.has(s),w=o===s;return e.jsxs("button",{onClick:()=>c(s),"aria-current":w?"true":void 0,className:["flex items-center gap-2 rounded-md px-2 py-2 text-left text-sm hover:bg-accent transition-colors",w?"bg-accent font-medium":""].join(" "),children:[e.jsx("span",{className:`inline-block h-1.5 w-1.5 shrink-0 rounded-full ${T?"bg-emerald-400":"bg-muted-foreground/40"}`,"aria-hidden":"true"}),e.jsx("span",{className:"truncate min-w-0",children:s}),e.jsx("span",{className:"sr-only",children:T?"Online":"Offline"})]},s)})]}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:o?e.jsxs("div",{className:"flex flex-col gap-6 p-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-base font-semibold",children:o}),e.jsx(je,{value:d,onValueChange:s=>$(s),children:e.jsx(ye,{children:Object.keys(ce).map(s=>e.jsx(we,{value:s,children:ce[s]},s))})})]}),X?e.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading…"}):y.length===0?e.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"No data yet for this range. Data is collected every minute while the agent is connected."}):e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(me,{title:"CPU %",color:"cpu",data:y,dataKey:"cpu",range:d,now:I,live:(m==null?void 0:m.cpu)??null}),e.jsx(me,{title:"RAM %",color:"mem",data:y,dataKey:"mem",range:d,now:I,live:(m==null?void 0:m.mem)??null})]})]}):e.jsxs("div",{className:"flex h-full items-center justify-center gap-2 text-muted-foreground",children:[e.jsx(ke,{className:"h-8 w-8"}),e.jsx("p",{className:"text-sm",children:"Select a Mac to view resource history."})]})})]})}const ee=n=>new Date(n.time).getTime(),de=n=>new Date(n).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),z=n=>`${Math.round(n*10)/10}%`,Ke=fe(ee).left,qe=fe(n=>n.t).left,j={top:8,right:24,bottom:24,left:40},ue=16,he=6,Je=20,Qe=40;function me({title:n,color:h,data:i,dataKey:a,range:o,now:c,live:d}){const $=xe[h].color;return e.jsxs("div",{className:"rounded-lg border p-4 flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full",style:{background:$}}),e.jsx("h2",{className:"text-sm font-medium",children:n})]}),e.jsx("div",{className:"relative h-[220px] w-full",children:e.jsx(_e,{children:({width:g,height:k})=>g>0&&k>0?e.jsx(Ze,{width:g,height:k,data:i,dataKey:a,hex:$,range:o,now:c,live:d,label:n}):null})})]})}function Ze({width:n,height:h,data:i,dataKey:a,hex:o,range:c,now:d,live:$=null,label:g}){const k=`chart-hint-${a}`,[A,I]=l.useState(null),[E,P]=l.useState(!1),[_,U]=l.useState(null),[G,M]=l.useState(!1),R=G?_:null,u=n-j.left-j.right,v=h-j.top-j.bottom,L=d,X=L-Q[c],y=Se({domain:[X,L],range:[0,Math.max(0,u)]}),m=$e({domain:[0,100],range:[v,ue]}),s=u>0?Je/u*Q[c]:0,T=Ge(X-s,L+s,c),w=u>0?Math.min(.5,Qe/u):0,F=`fill-${a}`,B=`plot-${a}`,b=`axis-fade-${a}`,N=i[i.length-1],f=$!==null&&N?{t:Math.max(L,ee(N)+1),v:$,live:!0}:null,r=i.map(t=>({t:ee(t),v:t[a]}));f&&r.push(f);const C=t=>Math.min(y(t),u),V=f?C(f.t):0,H=f?m(f.v):0,x=Math.max(0,i.length-1),D=A===null?Math.max(0,r.length-1):A==="live"?f?r.length-1:x:Math.min(Ke(i,A),x),S=E?r[D]:void 0,Y=S?C(S.t):0,te=S?m(S.v):0,se=xe[a].label,ne=t=>`${se}, ${de(t.t)}, ${t.live?"latest, ":""}${z(t.v)}`,K=t=>{const p=r[t];p&&(I(p.live?"live":p.t),P(!0),U({now:t,text:ne(p)}))},W=()=>P(!1);l.useEffect(()=>{if(!E)return;const t=p=>{p.key==="Escape"&&P(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[E]);const pe=t=>{if(r.length===0)return;const p=D,O=t.key==="ArrowLeft"||t.key==="ArrowDown"?Math.max(0,p-1):t.key==="ArrowRight"||t.key==="ArrowUp"?Math.min(r.length-1,p+1):t.key==="Home"?0:t.key==="End"?r.length-1:null;O!==null&&(t.preventDefault(),K(O))},oe=t=>{const p=Pe(t);if(!p)return;const O=p.x-j.left,ae=qe(r,y.invert(O).getTime()),re=[r[ae-1],r[ae],f].reduce((q,J)=>J&&(!q||Math.abs(C(J.t)-O)<=Math.abs(C(q.t)-O))?J:q,void 0);re&&K(r.indexOf(re))};return e.jsxs(e.Fragment,{children:[e.jsxs("svg",{width:n,height:h,role:"group","aria-label":f?`${g}, last ${c}. Now ${z(f.v)}.`:N?`${g}, last ${c}. Latest ${z(N[a])}.`:`${g}, last ${c}. No samples.`,children:[e.jsx(Ae,{id:F,from:o,to:o,fromOpacity:.3,toOpacity:0,fromOffset:"5%",toOffset:"95%"}),e.jsx("clipPath",{id:B,children:e.jsx("rect",{x:0,y:0,width:Math.max(0,u),height:Math.max(0,v)})}),e.jsxs("linearGradient",{id:`${b}-grad`,gradientUnits:"userSpaceOnUse",x1:0,y1:0,x2:Math.max(0,u),y2:0,children:[e.jsx("stop",{offset:0,stopColor:"white",stopOpacity:0}),e.jsx("stop",{offset:w,stopColor:"white",stopOpacity:1}),e.jsx("stop",{offset:1-w,stopColor:"white",stopOpacity:1}),e.jsx("stop",{offset:1,stopColor:"white",stopOpacity:0})]}),e.jsx("mask",{id:b,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse",x:0,y:v,width:Math.max(0,u),height:j.bottom*2,children:e.jsx("rect",{x:0,y:v,width:Math.max(0,u),height:j.bottom*2,fill:`url(#${b}-grad)`})}),e.jsxs(Ee,{left:j.left,top:j.top,children:[e.jsx(Le,{scale:m,width:u,tickValues:[0,25,50,75,100],strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),e.jsxs("g",{clipPath:`url(#${B})`,children:[e.jsx(Te,{data:r,x:t=>y(t.t),y:t=>m(t.v),yScale:m,curve:le,fill:`url(#${F})`}),e.jsx(Re,{data:r,x:t=>y(t.t),y:t=>m(t.v),curve:le,stroke:o,strokeWidth:1.5})]}),e.jsx("g",{mask:`url(#${b})`,children:e.jsx(Ce,{top:v,scale:y,tickValues:T,tickFormat:t=>Xe(+t,c),hideAxisLine:!0,hideTicks:!0,tickLength:0,tickLabelProps:()=>({fontSize:11,fill:"currentColor",textAnchor:"middle",dy:6,className:"fill-muted-foreground"})})}),e.jsx(De,{scale:m,tickValues:[0,25,50,75,100],tickFormat:t=>`${t}%`,hideAxisLine:!0,hideTicks:!0,tickLabelProps:()=>({fontSize:11,fill:"currentColor",textAnchor:"end",dx:-4,dy:3,className:"fill-muted-foreground"})}),f&&e.jsxs("g",{className:"live-head","aria-hidden":"true",pointerEvents:"none",children:[e.jsx("circle",{cx:V,cy:H,r:he,fill:o,fillOpacity:.2}),e.jsx("circle",{cx:V,cy:H,r:3,fill:o,stroke:"hsl(var(--background))",strokeWidth:1.5})]}),S&&e.jsxs("g",{style:{transition:"transform 0.25s ease-out",transform:`translateX(${Y}px)`},pointerEvents:"none",children:[e.jsx(Oe,{from:{x:0,y:ue},to:{x:0,y:v},stroke:"hsl(var(--border))",strokeWidth:1}),e.jsx("circle",{cx:0,cy:0,r:3,fill:o,stroke:"hsl(var(--background))",strokeWidth:1.5,style:{transition:"transform 0.25s ease-out",transform:`translateY(${te}px)`}})]}),e.jsx(Ie,{x:0,y:0,width:Math.max(0,u)+he,height:Math.max(0,v),fill:"transparent",tabIndex:0,role:"slider","aria-label":`${g} samples`,"aria-valuemin":0,"aria-valuemax":Math.max(0,r.length-1),"aria-valuenow":R?Math.min(R.now,Math.max(0,r.length-1)):D,"aria-valuetext":R?R.text:r[D]?ne(r[D]):void 0,"aria-describedby":k,className:"outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",onFocus:()=>{M(!0),K(D)},onBlur:()=>{W(),M(!1)},onKeyDown:pe,onMouseMove:oe,onMouseLeave:W,onTouchMove:oe,onTouchEnd:W,onTouchCancel:W})]})]}),e.jsx("p",{id:k,className:"sr-only",children:"Use the arrow keys to read individual samples, and End for the latest value. Escape hides the reading."}),S&&e.jsxs("div",{"aria-hidden":"true",className:"pointer-events-none absolute top-0 left-0 whitespace-nowrap rounded-lg border bg-background px-3 py-2 text-xs text-foreground shadow-md",style:{transform:`translate(${Y+j.left}px, ${te+j.top}px) translate(${Y>u*.6?"calc(-100% - 12px)":"12px"}, -50%)`,transition:"transform 0.25s ease-out"},children:[e.jsxs("p",{className:"mb-1",children:["Date: ",de(S.t)]}),e.jsxs("p",{children:[se,": ",z(S.v)]})]})]})}export{Ze as AreaChartInner,at as MacResources};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-react-C5H_1fOn.js";function r({code:s,message:t}){return e.jsx("div",{className:"flex min-h-svh items-center justify-center bg-background p-4",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("span",{className:"text-lg font-semibold tracking-tight text-foreground",children:s}),e.jsx("span",{className:"h-6 w-px bg-border","aria-hidden":"true"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:t})]})})}function a(){return e.jsx(r,{code:404,message:"page not found"})}export{a as NotFound};