railwatch 0.3.4 → 0.3.5

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 (167) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +32 -0
  3. data/app/jobs/railwatch/prune_telemetry_job.rb +20 -1
  4. data/app/models/railwatch/telemetry_record.rb +48 -0
  5. data/db/railwatch_telemetry_migrate/20260903000000_enable_incremental_vacuum.rb +62 -0
  6. data/docs/embedded.md +47 -1
  7. data/lib/railwatch/version.rb +1 -1
  8. data/lib/tasks/railwatch_tasks.rake +161 -0
  9. data/public/railwatch/assets/{app-layout-yh-sPWgK.js → app-layout-CdJ5Qjms.js} +1 -1
  10. data/public/railwatch/assets/{app-wordmark-nbjkzxwQ.js → app-wordmark-B-0yZiDb.js} +1 -1
  11. data/public/railwatch/assets/{appearance-CDuRvQTB.js → appearance-CU28GBf1.js} +1 -1
  12. data/public/railwatch/assets/application-CwshqwM6.css +1 -0
  13. data/public/railwatch/assets/{arrow-up-DVtOGdVA.js → arrow-up-DY1fS0tD.js} +1 -1
  14. data/public/railwatch/assets/{auth-layout-TCwPpS1K.js → auth-layout-C3FKuUJz.js} +1 -1
  15. data/public/railwatch/assets/{badge-Daw4Hvr8.js → badge-DKvItdlb.js} +1 -1
  16. data/public/railwatch/assets/{braces-DhFbHPsz.js → braces-Bse5Gh3K.js} +1 -1
  17. data/public/railwatch/assets/{card-BX_3HXcJ.js → card-C9j_ffR9.js} +1 -1
  18. data/public/railwatch/assets/{chart-B14-N9g7.js → chart-Cmh6JEww.js} +1 -1
  19. data/public/railwatch/assets/{chart-hover-Vy52H4uD.js → chart-hover-B0SjyWFy.js} +1 -1
  20. data/public/railwatch/assets/{chart-panel-Cb4S_ej_.js → chart-panel-DKNxoauI.js} +1 -1
  21. data/public/railwatch/assets/{checkbox-D3aRSsBj.js → checkbox-BsBkRg5n.js} +1 -1
  22. data/public/railwatch/assets/{code-KvW8k7Jr.js → code-C879Qwgg.js} +1 -1
  23. data/public/railwatch/assets/{copy-block-BKFGd11J.js → copy-block-DtO_3esq.js} +1 -1
  24. data/public/railwatch/assets/{copy-id-Djks1fXB.js → copy-id-SeLCKsW2.js} +1 -1
  25. data/public/railwatch/assets/{cursor-load-more-BXV0f1D_.js → cursor-load-more-OpHbe_kE.js} +1 -1
  26. data/public/railwatch/assets/{data-table-iv1bdF6u.js → data-table-Bc3ZRnpb.js} +1 -1
  27. data/public/railwatch/assets/{edit-__9yJlO3.js → edit-BMpgcQhU.js} +1 -1
  28. data/public/railwatch/assets/{edit-DMKUF8Zi.js → edit-CTD1jSWh.js} +1 -1
  29. data/public/railwatch/assets/{edit-BZc_Iawe.js → edit-DDvf9mkq.js} +1 -1
  30. data/public/railwatch/assets/{empty-state-6j_0AaQQ.js → empty-state-CkPROZB0.js} +1 -1
  31. data/public/railwatch/assets/env-layout-aGQgTZRg.js +1 -0
  32. data/public/railwatch/assets/{execution-path-CzgBUi5e.js → execution-path-BX5NcXUZ.js} +1 -1
  33. data/public/railwatch/assets/{filter-bar-9SU5NrzX.js → filter-bar-C0O2rJVr.js} +1 -1
  34. data/public/railwatch/assets/{flamegraph-qcekju8V.js → flamegraph-Vj4QSAlT.js} +1 -1
  35. data/public/railwatch/assets/{frames-Cyu7KMxZ.js → frames-CTiGwm4E.js} +1 -1
  36. data/public/railwatch/assets/{google-sign-in-button-DsTSfmzY.js → google-sign-in-button-BzogBGeF.js} +1 -1
  37. data/public/railwatch/assets/index-B-kuWp-m.js +1 -0
  38. data/public/railwatch/assets/{index-1ol1-QWI.js → index-B2_QluAw.js} +1 -1
  39. data/public/railwatch/assets/index-B69Iad2U.js +1 -0
  40. data/public/railwatch/assets/index-BCLvKVhP.js +1 -0
  41. data/public/railwatch/assets/index-BKgAm-w2.js +1 -0
  42. data/public/railwatch/assets/index-BRN_bXV_.js +1 -0
  43. data/public/railwatch/assets/index-Ble4RoA3.js +1 -0
  44. data/public/railwatch/assets/index-Bvy021Vv.js +1 -0
  45. data/public/railwatch/assets/index-CCLMaY9k.js +1 -0
  46. data/public/railwatch/assets/index-CD4HIHq0.js +1 -0
  47. data/public/railwatch/assets/{index-Cmlwy1-V.js → index-CPQKOQxV.js} +1 -1
  48. data/public/railwatch/assets/{index-CeYKnapu.js → index-CY6lbwAC.js} +1 -1
  49. data/public/railwatch/assets/index-C__S10ze.js +1 -0
  50. data/public/railwatch/assets/index-ChQ1_u8u.js +1 -0
  51. data/public/railwatch/assets/index-CtT4T6kp.js +1 -0
  52. data/public/railwatch/assets/index-CxU1Jj35.js +1 -0
  53. data/public/railwatch/assets/index-D3Axxkk2.js +1 -0
  54. data/public/railwatch/assets/index-D5YVcrqR.js +1 -0
  55. data/public/railwatch/assets/index-D9cV-IQr.js +1 -0
  56. data/public/railwatch/assets/index-DbyRgbzQ.js +1 -0
  57. data/public/railwatch/assets/index-Dcxd_H-U.js +1 -0
  58. data/public/railwatch/assets/index-Dep2XomH.js +1 -0
  59. data/public/railwatch/assets/{index-DlumCsWY.js → index-DepurF6s.js} +2 -2
  60. data/public/railwatch/assets/{index-BRiq3SNR.js → index-DigUOHQ8.js} +1 -1
  61. data/public/railwatch/assets/index-DkgImCOg.js +1 -0
  62. data/public/railwatch/assets/{index-DU9F5b5d.js → index-DxuDLoTc.js} +1 -1
  63. data/public/railwatch/assets/{index-OqI59zPb.js → index-Dy7Wg880.js} +1 -1
  64. data/public/railwatch/assets/index-FgpFDA1Z.js +1 -0
  65. data/public/railwatch/assets/index-LaTKDe0-.js +1 -0
  66. data/public/railwatch/assets/index-Wb_U2_hz.js +1 -0
  67. data/public/railwatch/assets/index-chS28dvS.js +1 -0
  68. data/public/railwatch/assets/index-jSEU_Yp7.js +1 -0
  69. data/public/railwatch/assets/index-uuKg6Zqn.js +1 -0
  70. data/public/railwatch/assets/index-y2c8xKzI.js +1 -0
  71. data/public/railwatch/assets/index-z2YfKBJl.js +1 -0
  72. data/public/railwatch/assets/{inertia-TViv6kNv.js → inertia-CgBdJDaE.js} +2 -2
  73. data/public/railwatch/assets/{input-error-LxImUkxv.js → input-error-DfpIawjl.js} +1 -1
  74. data/public/railwatch/assets/{json-viewer-Ar4cjPDW.js → json-viewer-CH7nEIUs.js} +1 -1
  75. data/public/railwatch/assets/klass-BTg1l2AO.js +1 -0
  76. data/public/railwatch/assets/{label-COUKWqE_.js → label-BWgQzHCO.js} +1 -1
  77. data/public/railwatch/assets/{layout-DNSLAkw_.js → layout-neknbxn-.js} +1 -1
  78. data/public/railwatch/assets/{live-dot-ChfUtY3p.js → live-dot-Bejk0a5o.js} +1 -1
  79. data/public/railwatch/assets/{nav-CNnDqPlm.js → nav-C1M8941-.js} +1 -1
  80. data/public/railwatch/assets/{new-D4uewYC8.js → new-B8CzyoMu.js} +1 -1
  81. data/public/railwatch/assets/{new-Be55nmt9.js → new-BnGIYM37.js} +1 -1
  82. data/public/railwatch/assets/{new-Bi_xQiIb.js → new-DElC-JCS.js} +1 -1
  83. data/public/railwatch/assets/{new-D05SajFR.js → new-DGYPcz7w.js} +1 -1
  84. data/public/railwatch/assets/{new-84S8ZJq9.js → new-DLgCLBiW.js} +1 -1
  85. data/public/railwatch/assets/{new-BvCT8TMg.js → new-bBwawsEg.js} +1 -1
  86. data/public/railwatch/assets/{onboarding-CYZi5Cqc.js → onboarding-CW0jUhHT.js} +1 -1
  87. data/public/railwatch/assets/{origin-identity-6q1-CBts.js → origin-identity-bJMxeEHB.js} +1 -1
  88. data/public/railwatch/assets/{percentile-picker-gFZCXtdb.js → percentile-picker-DLAnTKY3.js} +1 -1
  89. data/public/railwatch/assets/{relative-time-IOOgl5n2.js → relative-time-BHbJh8HW.js} +1 -1
  90. data/public/railwatch/assets/release-health-2O1GRclB.js +1 -0
  91. data/public/railwatch/assets/route-DSw8aIZa.js +1 -0
  92. data/public/railwatch/assets/{segmented-h1VdDTqE.js → segmented-Dg8CES94.js} +1 -1
  93. data/public/railwatch/assets/{select-_AJsUa7X.js → select-CqKpvI98.js} +1 -1
  94. data/public/railwatch/assets/{separator-BwwTYtCF.js → separator-BOp2LHw3.js} +1 -1
  95. data/public/railwatch/assets/{series-chart-DaFPefku.js → series-chart-COEtj3PY.js} +1 -1
  96. data/public/railwatch/assets/show-B40560ZT.js +1 -0
  97. data/public/railwatch/assets/{show-C4Ltf5i9.js → show-B7Zqjlqc.js} +1 -1
  98. data/public/railwatch/assets/{show-CeTL4B37.js → show-BAxMoNvw.js} +2 -2
  99. data/public/railwatch/assets/show-B_QVoqKE.js +1 -0
  100. data/public/railwatch/assets/show-Bbs1i46N.js +1 -0
  101. data/public/railwatch/assets/{show-DACku6AD.js → show-C-xpDkoj.js} +3 -3
  102. data/public/railwatch/assets/{show-DgSIoRvA.js → show-C9Y1To9_.js} +1 -1
  103. data/public/railwatch/assets/show-CGv85sRo.js +1 -0
  104. data/public/railwatch/assets/{show-BM6X2Mpo.js → show-CPh-7VGL.js} +1 -1
  105. data/public/railwatch/assets/show-C_9M2nLy.js +1 -0
  106. data/public/railwatch/assets/{show-DIOSGcXV.js → show-DFlP1ktM.js} +2 -2
  107. data/public/railwatch/assets/show-DqtE0LI6.js +1 -0
  108. data/public/railwatch/assets/{show-C8sHalnw.js → show-DrhEDGPn.js} +1 -1
  109. data/public/railwatch/assets/{show-JxFtB4eK.js → show-HjjzcKRq.js} +2 -2
  110. data/public/railwatch/assets/show-Zr2xV4OD.js +1 -0
  111. data/public/railwatch/assets/show-dRDz8OVu.js +1 -0
  112. data/public/railwatch/assets/{show-DYteoYWW.js → show-pbkvGRER.js} +1 -1
  113. data/public/railwatch/assets/{sort-header-DpFzXblu.js → sort-header-DBxQ_KFX.js} +1 -1
  114. data/public/railwatch/assets/{sparkline-cell-C3-5vFkP.js → sparkline-cell-BbfXw3kA.js} +1 -1
  115. data/public/railwatch/assets/stat-Cd8QaTGw.js +1 -0
  116. data/public/railwatch/assets/{status-badge-8jVV-LA4.js → status-badge-Ys4b0fcG.js} +1 -1
  117. data/public/railwatch/assets/{tenant-path-G-6u9A-o.js → tenant-path-CQWzaNYR.js} +1 -1
  118. data/public/railwatch/assets/{text-link-DfsiaCcP.js → text-link-BY8FY-CJ.js} +1 -1
  119. data/public/railwatch/assets/{textarea-Dye72uP7.js → textarea-Bq2jjOMC.js} +1 -1
  120. data/public/railwatch/assets/{timeline-CD7WHnbo.js → timeline-SxStCFO2.js} +1 -1
  121. data/public/railwatch/assets/{transition-B_AW8rMK.js → transition-CQ9yvfPa.js} +1 -1
  122. data/public/railwatch/assets/{use-clipboard-ColgLyQ2.js → use-clipboard-3hTXU91g.js} +1 -1
  123. data/public/railwatch/assets/use-live-LwJStJvD.js +1 -0
  124. data/public/railwatch/manifest.json +1289 -1236
  125. metadata +117 -115
  126. data/public/railwatch/assets/application-DD4nJA5I.css +0 -1
  127. data/public/railwatch/assets/env-layout-DrT8rO6P.js +0 -1
  128. data/public/railwatch/assets/index-5jI4aFzC.js +0 -1
  129. data/public/railwatch/assets/index-9KTrVnrc.js +0 -1
  130. data/public/railwatch/assets/index-B0-8lcTp.js +0 -1
  131. data/public/railwatch/assets/index-B7jjfNfO.js +0 -1
  132. data/public/railwatch/assets/index-BBchRy0M.js +0 -1
  133. data/public/railwatch/assets/index-BgKj9xhr.js +0 -1
  134. data/public/railwatch/assets/index-BkTZqqOu.js +0 -1
  135. data/public/railwatch/assets/index-BprKx8QO.js +0 -1
  136. data/public/railwatch/assets/index-C3jzvPs3.js +0 -1
  137. data/public/railwatch/assets/index-Cbs6gGyQ.js +0 -1
  138. data/public/railwatch/assets/index-CdRZ6AWF.js +0 -1
  139. data/public/railwatch/assets/index-Cwx6058d.js +0 -1
  140. data/public/railwatch/assets/index-D4CSdbHv.js +0 -1
  141. data/public/railwatch/assets/index-DEFMSkdG.js +0 -1
  142. data/public/railwatch/assets/index-DFiHEBSh.js +0 -1
  143. data/public/railwatch/assets/index-DL4vWdWJ.js +0 -1
  144. data/public/railwatch/assets/index-DaXgPcGL.js +0 -1
  145. data/public/railwatch/assets/index-DbtaU-EE.js +0 -1
  146. data/public/railwatch/assets/index-DeOe83F4.js +0 -1
  147. data/public/railwatch/assets/index-DiucHN4B.js +0 -1
  148. data/public/railwatch/assets/index-DlnR_l9o.js +0 -1
  149. data/public/railwatch/assets/index-DmRd7aIG.js +0 -1
  150. data/public/railwatch/assets/index-DxSh2UpM.js +0 -1
  151. data/public/railwatch/assets/index-MIMGuFNt.js +0 -1
  152. data/public/railwatch/assets/index-P4rC7IlX.js +0 -1
  153. data/public/railwatch/assets/index-gpPOcFWq.js +0 -1
  154. data/public/railwatch/assets/index-oVkururr.js +0 -1
  155. data/public/railwatch/assets/index-p9puqVge.js +0 -1
  156. data/public/railwatch/assets/klass-CJ-J4INB.js +0 -1
  157. data/public/railwatch/assets/release-health-DC8oc7uw.js +0 -1
  158. data/public/railwatch/assets/route-Dv6LAWvT.js +0 -1
  159. data/public/railwatch/assets/show-B7NCgkEo.js +0 -1
  160. data/public/railwatch/assets/show-BKqyKjBK.js +0 -1
  161. data/public/railwatch/assets/show-BNw4tN5q.js +0 -1
  162. data/public/railwatch/assets/show-BO3bnG5h.js +0 -1
  163. data/public/railwatch/assets/show-BhrAVAEA.js +0 -1
  164. data/public/railwatch/assets/show-CpfgV1jP.js +0 -1
  165. data/public/railwatch/assets/show-DQp_1n-B.js +0 -1
  166. data/public/railwatch/assets/show-DVNz46RI.js +0 -1
  167. data/public/railwatch/assets/stat-s4RpOS9w.js +0 -1
@@ -1 +1 @@
1
- import{a4 as te,r as s,c as B,j as A}from"./inertia-TViv6kNv.js";import{u as Be}from"./chart-hover-Vy52H4uD.js";import{i as K,e as Ve,s as ae,D as re,f as ye,g as Nt,Z as ne,L as R,u as xe,h as Ct,j as _t,k as Y,l as Ge,m as $,n as X,o as Mt,p as ie,q as oe,r as Xe,t as ge,v as H,w as Ye,x as be,y as le,z as He,S as Ue,A as qe,E as se,F as Ze,G as Je,H as Qe,I as et,J as tt,K as at,M as Tt,N as U,O as q,P as rt,Q as nt,T as _,U as it,V as ot,W as lt,_ as Kt,$ as Wt,a0 as Rt,a1 as Pe,a2 as Ae,a3 as $t,a4 as zt,a5 as Ft,a6 as Bt,a7 as Vt,a8 as Gt,a9 as ue,aa as Z,ab as st,ac as ct,R as Xt,C as Ie,X as Ee,Y as ke,a as je,b as Oe,c as ce,B as de,d as Yt}from"./chart-B14-N9g7.js";import{m as ut}from"./format-B9SDkrWj.js";function fe(){return fe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},fe.apply(null,arguments)}var dt=t=>{var{cx:e,cy:a,r,className:n}=t,o=te("recharts-dot",n);return K(e)&&K(a)&&K(r)?s.createElement("circle",fe({},ae(t),Ve(t),{className:o,cx:e,cy:a,r})):null},Ht=["points"];function Ke(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function pe(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Ke(Object(a),!0).forEach(function(r){Ut(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Ke(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function Ut(t,e,a){return(e=qt(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function qt(t){var e=Zt(t,"string");return typeof e=="symbol"?e:e+""}function Zt(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function J(){return J=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},J.apply(null,arguments)}function Jt(t,e){if(t==null)return{};var a,r,n=Qt(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)a=o[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Qt(t,e){if(t==null)return{};var a={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;a[r]=t[r]}return a}function ea(t){var{option:e,dotProps:a,className:r}=t;if(s.isValidElement(e))return s.cloneElement(e,a);if(typeof e=="function")return e(a);var n=te(r,typeof e!="boolean"?e.className:""),o=a??{},{points:l}=o,i=Jt(o,Ht);return s.createElement(dt,J({},i,{className:n}))}function ta(t,e){return t==null?!1:e?!0:t.length===1}function pt(t){var{points:e,dot:a,className:r,dotClassName:n,dataKey:o,baseProps:l,needClip:i,clipPathId:c,zIndex:u=re.scatter}=t;if(!ta(e,a))return null;var d=ye(a),p=Nt(a),f=e.map((m,h)=>{var g,b,y=pe(pe(pe({r:3},l),p),{},{index:h,cx:(g=m.x)!==null&&g!==void 0?g:void 0,cy:(b=m.y)!==null&&b!==void 0?b:void 0,dataKey:o,value:m.value,payload:m.payload,points:e});return s.createElement(ea,{key:"dot-".concat(h),option:a,dotProps:y,className:n})}),v={};return i&&c!=null&&(v.clipPath="url(#clipPath-".concat(d?"":"dots-").concat(c,")")),s.createElement(ne,{zIndex:u},s.createElement(R,J({className:r},v),f))}function We(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function ve(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?We(Object(a),!0).forEach(function(r){aa(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):We(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function aa(t,e,a){return(e=ra(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function ra(t){var e=na(t,"string");return typeof e=="symbol"?e:e+""}function na(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ia=t=>{var{point:e,childIndex:a,mainColor:r,activeDot:n,dataKey:o,clipPath:l}=t;if(n===!1||e.x==null||e.y==null)return null;var i={index:a,dataKey:o,cx:e.x,cy:e.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:e.payload,value:e.value},c=ve(ve(ve({},i),Ge(n)),Ve(n)),u;return s.isValidElement(n)?u=s.cloneElement(n,c):typeof n=="function"?u=n(c):u=s.createElement(dt,c),s.createElement(R,{className:"recharts-active-dot",clipPath:l},u)};function me(t){var{points:e,mainColor:a,activeDot:r,itemDataKey:n,clipPath:o,zIndex:l=re.activeDot}=t,i=xe(Ct),c=_t();if(e==null||c==null)return null;var u=e.find(d=>c.includes(d.payload));return Y(u)?null:s.createElement(ne,{zIndex:l},s.createElement(ia,{point:u,childIndex:Number(i),mainColor:a,dataKey:n,activeDot:r,clipPath:o}))}var vt=(t,e,a,r)=>ie(t,"xAxis",e,r),ft=(t,e,a,r)=>oe(t,"xAxis",e,r),mt=(t,e,a,r)=>ie(t,"yAxis",a,r),ht=(t,e,a,r)=>oe(t,"yAxis",a,r),oa=$([X,vt,mt,ft,ht],(t,e,a,r,n)=>ge(t,"xAxis")?H(e,r,!1):H(a,n,!1)),la=(t,e,a,r,n)=>n;function sa(t){return t.type==="line"}var ca=$([Xe,la],(t,e)=>t.filter(sa).find(a=>a.id===e)),ua=$([X,vt,mt,ft,ht,ca,oa,Mt],(t,e,a,r,n,o,l,i)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:d}=i;if(!(o==null||e==null||a==null||r==null||n==null||r.length===0||n.length===0||l==null||t!=="horizontal"&&t!=="vertical")){var{dataKey:p,data:f}=o,v;if(f!=null&&f.length>0?v=f:v=c?.slice(u,d+1),v!=null)return La({layout:t,xAxis:e,yAxis:a,xAxisTicks:r,yAxisTicks:n,dataKey:p,bandSize:l,displayedData:v})}});function yt(t){var e=Ge(t),a=3,r=2;if(e!=null){var{r:n,strokeWidth:o}=e,l=Number(n),i=Number(o);return(Number.isNaN(l)||l<0)&&(l=a),(Number.isNaN(i)||i<0)&&(i=r),{r:l,strokeWidth:i}}return{r:a,strokeWidth:r}}var da=["id"],pa=["type","layout","connectNulls","needClip","shape"],va=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function V(){return V=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},V.apply(null,arguments)}function Re(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function M(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Re(Object(a),!0).forEach(function(r){fa(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Re(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function fa(t,e,a){return(e=ma(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function ma(t){var e=ha(t,"string");return typeof e=="symbol"?e:e+""}function ha(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Se(t,e){if(t==null)return{};var a,r,n=ya(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)a=o[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function ya(t,e){if(t==null)return{};var a={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;a[r]=t[r]}return a}var xa=t=>{var{dataKey:e,name:a,stroke:r,legendType:n,hide:o}=t;return[{inactive:o,dataKey:e,type:n,color:r,value:se(a,e),payload:t}]},ga=s.memo(t=>{var{dataKey:e,data:a,stroke:r,strokeWidth:n,fill:o,name:l,hide:i,unit:c,tooltipType:u,id:d}=t,p={dataDefinedOnItem:a,getPosition:Je,settings:{stroke:r,strokeWidth:n,fill:o,dataKey:e,nameKey:void 0,name:se(l,e),hide:i,type:u,color:r,unit:c,graphicalItemId:d}};return s.createElement(Ze,{tooltipEntrySettings:p})}),xt=(t,e)=>"".concat(e,"px ").concat(t,"px");function ba(t,e){for(var a=t.length%2!==0?[...t,0]:t,r=[],n=0;n<e;++n)r.push(...a);return r}var Pa=(t,e,a)=>{var r=a.reduce((f,v)=>f+v,0);if(!r)return xt(e,t);for(var n=Math.floor(t/r),o=t%r,l=[],i=0,c=0;i<a.length;c+=(u=a[i])!==null&&u!==void 0?u:0,++i){var u,d=a[i];if(d!=null&&c+d>o){l=[...a.slice(0,i),o-c];break}}var p=l.length%2===0?[0,e]:[e];return[...ba(a,n),...l,...p].map(f=>"".concat(f,"px")).join(", ")};function Aa(t){var{clipPathId:e,points:a,props:r}=t,{dot:n,dataKey:o,needClip:l}=r,{id:i}=r,c=Se(r,da),u=ae(c);return s.createElement(pt,{points:a,dot:n,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:u,needClip:l,clipPathId:e})}function Ia(t){var{showLabels:e,children:a,points:r}=t,n=s.useMemo(()=>r?.map(o=>{var l,i,c={x:(l=o.x)!==null&&l!==void 0?l:0,y:(i=o.y)!==null&&i!==void 0?i:0,width:0,lowerWidth:0,upperWidth:0,height:0};return M(M({},c),{},{value:o.value,payload:o.payload,viewBox:c,parentViewBox:void 0,fill:void 0})}),[r]);return s.createElement(ot,{value:e?n:void 0},a)}function $e(t){var{clipPathId:e,pathRef:a,points:r,strokeDasharray:n,props:o}=t,{type:l,layout:i,connectNulls:c,needClip:u,shape:d}=o,p=Se(o,pa),f=M(M({},lt(p)),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(e,")"):void 0,points:r,type:l,layout:i,connectNulls:c,strokeDasharray:n??o.strokeDasharray});return s.createElement(s.Fragment,null,r?.length>1&&s.createElement(Kt,V({shapeType:"curve",option:d},f,{pathRef:a})),s.createElement(Aa,{points:r,clipPathId:e,props:o}))}function Ea(t){try{return t&&t.getTotalLength&&t.getTotalLength()||0}catch{return 0}}function ka(t){var{clipPathId:e,props:a,pathRef:r,previousPointsRef:n,longestAnimatedLengthRef:o}=t,{points:l,strokeDasharray:i,isAnimationActive:c,animationBegin:u,animationDuration:d,animationEasing:p,animateNewValues:f,width:v,height:m,onAnimationEnd:h,onAnimationStart:g}=a,b=n.current,y=rt(l,"recharts-line-"),P=s.useRef(y),[x,I]=s.useState(!1),E=!x,k=s.useCallback(()=>{typeof h=="function"&&h(),I(!1)},[h]),j=s.useCallback(()=>{typeof g=="function"&&g(),I(!0)},[g]),O=Ea(r.current),w=s.useRef(0);P.current!==y&&(w.current=o.current,P.current=y);var L=w.current;return s.createElement(Ia,{points:l,showLabels:E},a.children,s.createElement(nt,{animationId:y,begin:u,duration:d,isActive:c,easing:p,onAnimationEnd:k,onAnimationStart:j,key:y},S=>{var D=_(L,O+L,S),T=Math.min(D,O),N;if(c)if(i){var wt="".concat(i).split(/[,\s]+/gim).map(C=>parseFloat(C));N=Pa(T,O,wt)}else N=xt(O,T);else N=i==null?void 0:String(i);if(S>0&&O>0&&(n.current=l,o.current=Math.max(o.current,T)),b){var Lt=b.length/l.length,_e=S===1?l:l.map((C,Dt)=>{var Me=Math.floor(Dt*Lt);if(b[Me]){var Te=b[Me];return M(M({},C),{},{x:_(Te.x,C.x,S),y:_(Te.y,C.y,S)})}return f?M(M({},C),{},{x:_(v*2,C.x,S),y:_(m/2,C.y,S)}):M(M({},C),{},{x:C.x,y:C.y})});return n.current=_e,s.createElement($e,{props:a,points:_e,clipPathId:e,pathRef:r,strokeDasharray:N})}return s.createElement($e,{props:a,points:l,clipPathId:e,pathRef:r,strokeDasharray:N})}),s.createElement(it,{label:a.label}))}function ja(t){var{clipPathId:e,props:a}=t,r=s.useRef(null),n=s.useRef(0),o=s.useRef(null);return s.createElement(ka,{props:a,clipPathId:e,previousPointsRef:r,longestAnimatedLengthRef:n,pathRef:o})}var Oa=(t,e)=>{var a,r;return{x:(a=t.x)!==null&&a!==void 0?a:void 0,y:(r=t.y)!==null&&r!==void 0?r:void 0,value:t.value,errorVal:U(t.payload,e)}};class Sa extends s.Component{render(){var{hide:e,dot:a,points:r,className:n,xAxisId:o,yAxisId:l,top:i,left:c,width:u,height:d,id:p,needClip:f,zIndex:v}=this.props;if(e)return null;var m=te("recharts-line",n),h=p,{r:g,strokeWidth:b}=yt(a),y=ye(a),P=g*2+b,x=f?"url(#clipPath-".concat(y?"":"dots-").concat(h,")"):void 0;return s.createElement(ne,{zIndex:v},s.createElement(R,{className:m},f&&s.createElement("defs",null,s.createElement(at,{clipPathId:h,xAxisId:o,yAxisId:l}),!y&&s.createElement("clipPath",{id:"clipPath-dots-".concat(h)},s.createElement("rect",{x:c-P/2,y:i-P/2,width:u+P,height:d+P}))),s.createElement(Tt,{xAxisId:o,yAxisId:l,data:r,dataPointFormatter:Oa,errorBarOffset:0},s.createElement(ja,{props:this.props,clipPathId:h}))),s.createElement(me,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:x}))}}var gt={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:re.line,type:"linear"};function wa(t){var e=be(t,gt),{activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:o,animationEasing:l,connectNulls:i,dot:c,hide:u,isAnimationActive:d,label:p,legendType:f,xAxisId:v,yAxisId:m,id:h}=e,g=Se(e,va),{needClip:b}=Qe(v,m),y=et(),P=tt(),x=le(),I=xe(w=>ua(w,v,m,x,h));if(P!=="horizontal"&&P!=="vertical"||I==null||y==null)return null;var{height:E,width:k,x:j,y:O}=y;return s.createElement(Sa,V({},g,{id:h,connectNulls:i,dot:c,activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:o,animationEasing:l,isAnimationActive:d,hide:u,label:p,legendType:f,xAxisId:v,yAxisId:m,points:I,layout:P,height:E,width:k,left:j,top:O,needClip:b}))}function La(t){var{layout:e,xAxis:a,yAxis:r,xAxisTicks:n,yAxisTicks:o,dataKey:l,bandSize:i,displayedData:c}=t;return c.map((u,d)=>{var p=U(u,l);if(e==="horizontal"){var f=q({axis:a,ticks:n,bandSize:i,entry:u,index:d}),v=Y(p)?null:r.scale.map(p);return{x:f,y:v??null,value:p,payload:u}}var m=Y(p)?null:a.scale.map(p),h=q({axis:r,ticks:o,bandSize:i,entry:u,index:d});return m==null||h==null?null:{x:m,y:h,value:p,payload:u}}).filter(Boolean)}function Da(t){var e=be(t,gt),a=le();return s.createElement(He,{id:e.id,type:"line"},r=>s.createElement(s.Fragment,null,s.createElement(Ue,{legendPayload:xa(e)}),s.createElement(ga,{dataKey:e.dataKey,data:e.data,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,unit:e.unit,tooltipType:e.tooltipType,id:r}),s.createElement(qe,{type:"line",id:r,data:e.data,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,dataKey:e.dataKey,hide:e.hide,isPanorama:a}),s.createElement(wa,V({},e,{id:r}))))}var he=s.memo(Da,Ye);he.displayName="Line";var bt=(t,e,a)=>ie(t,"xAxis",Pe(t,e),a),Pt=(t,e,a)=>oe(t,"xAxis",Pe(t,e),a),At=(t,e,a)=>ie(t,"yAxis",Ae(t,e),a),It=(t,e,a)=>oe(t,"yAxis",Ae(t,e),a),Na=$([X,bt,At,Pt,It],(t,e,a,r,n)=>ge(t,"xAxis")?H(e,r,!1):H(a,n,!1)),Ca=(t,e)=>e,Et=$([Xe,Ca],(t,e)=>t.filter(a=>a.type==="area").find(a=>a.id===e)),kt=t=>{var e=X(t),a=ge(e,"xAxis");return a?"yAxis":"xAxis"},_a=(t,e)=>{var a=kt(t);return a==="yAxis"?Ae(t,e):Pe(t,e)},Ma=(t,e,a)=>zt(t,kt(t),_a(t,e),a),Ta=$([Et,Ma],(t,e)=>{var a;if(!(t==null||e==null)){var{stackId:r}=t,n=$t(t);if(!(r==null||n==null)){var o=(a=e[r])===null||a===void 0?void 0:a.stackedData,l=o?.find(i=>i.key===n);if(l!=null)return l.map(i=>[i[0],i[1]])}}}),Ka=$([X,bt,At,Pt,It,Ta,Wt,Na,Et,Rt],(t,e,a,r,n,o,l,i,c,u)=>{var{chartData:d,dataStartIndex:p,dataEndIndex:f}=l;if(!(c==null||t!=="horizontal"&&t!=="vertical"||e==null||a==null||r==null||n==null||r.length===0||n.length===0||i==null)){var{data:v}=c,m;if(v&&v.length>0?m=v:m=d?.slice(p,f+1),m!=null)return rr({layout:t,xAxis:e,yAxis:a,xAxisTicks:r,yAxisTicks:n,dataStartIndex:p,areaSettings:c,stackedData:o,displayedData:m,chartBaseValue:u,bandSize:i})}}),Wa=["id"],Ra=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function W(){return W=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},W.apply(null,arguments)}function jt(t,e){if(t==null)return{};var a,r,n=$a(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)a=o[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function $a(t,e){if(t==null)return{};var a={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;a[r]=t[r]}return a}function ze(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function z(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?ze(Object(a),!0).forEach(function(r){za(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ze(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function za(t,e,a){return(e=Fa(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function Fa(t){var e=Ba(t,"string");return typeof e=="symbol"?e:e+""}function Ba(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Q(t,e){return t&&t!=="none"?t:e}var Va=t=>{var{dataKey:e,name:a,stroke:r,fill:n,legendType:o,hide:l}=t;return[{inactive:l,dataKey:e,type:o,color:Q(r,n),value:se(a,e),payload:t}]},Ga=s.memo(t=>{var{dataKey:e,data:a,stroke:r,strokeWidth:n,fill:o,name:l,hide:i,unit:c,tooltipType:u,id:d}=t,p={dataDefinedOnItem:a,getPosition:Je,settings:{stroke:r,strokeWidth:n,fill:o,dataKey:e,nameKey:void 0,name:se(l,e),hide:i,type:u,color:Q(r,o),unit:c,graphicalItemId:d}};return s.createElement(Ze,{tooltipEntrySettings:p})});function Xa(t){var{clipPathId:e,points:a,props:r}=t,{needClip:n,dot:o,dataKey:l}=r,i=ae(r);return s.createElement(pt,{points:a,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:l,baseProps:i,needClip:n,clipPathId:e})}function Ya(t){var{showLabels:e,children:a,points:r}=t,n=r.map(o=>{var l,i,c={x:(l=o.x)!==null&&l!==void 0?l:0,y:(i=o.y)!==null&&i!==void 0?i:0,width:0,lowerWidth:0,upperWidth:0,height:0};return z(z({},c),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:c,fill:void 0})});return s.createElement(ot,{value:e?n:void 0},a)}function Fe(t){var{points:e,baseLine:a,needClip:r,clipPathId:n,props:o}=t,{layout:l,type:i,stroke:c,connectNulls:u,isRange:d}=o,{id:p}=o,f=jt(o,Wa),v=ae(f),m=lt(f);return s.createElement(s.Fragment,null,e?.length>1&&s.createElement(R,{clipPath:r?"url(#clipPath-".concat(n,")"):void 0},s.createElement(ue,W({},m,{id:p,points:e,connectNulls:u,type:i,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&s.createElement(ue,W({},v,{className:"recharts-area-curve",layout:l,type:i,connectNulls:u,fill:"none",points:e})),c!=="none"&&d&&Array.isArray(a)&&s.createElement(ue,W({},v,{className:"recharts-area-curve",layout:l,type:i,connectNulls:u,fill:"none",points:a}))),s.createElement(Xa,{points:e,props:f,clipPathId:n}))}function Ha(t){var e,a,{alpha:r,baseLine:n,points:o,strokeWidth:l}=t,i=(e=o[0])===null||e===void 0?void 0:e.y,c=(a=o[o.length-1])===null||a===void 0?void 0:a.y;if(!Z(i)||!Z(c))return null;var u=r*Math.abs(i-c),d=Math.max(...o.map(p=>p.x||0));return K(n)?d=Math.max(n,d):n&&Array.isArray(n)&&n.length&&(d=Math.max(...n.map(p=>p.x||0),d)),K(d)?s.createElement("rect",{x:0,y:i<c?i:i-u,width:d+(l?parseInt("".concat(l),10):1),height:Math.floor(u)}):null}function Ua(t){var e,a,{alpha:r,baseLine:n,points:o,strokeWidth:l}=t,i=(e=o[0])===null||e===void 0?void 0:e.x,c=(a=o[o.length-1])===null||a===void 0?void 0:a.x;if(!Z(i)||!Z(c))return null;var u=r*Math.abs(i-c),d=Math.max(...o.map(p=>p.y||0));return K(n)?d=Math.max(n,d):n&&Array.isArray(n)&&n.length&&(d=Math.max(...n.map(p=>p.y||0),d)),K(d)?s.createElement("rect",{x:i<c?i:i-u,y:0,width:u,height:Math.floor(d+(l?parseInt("".concat(l),10):1))}):null}function qa(t){var{alpha:e,layout:a,points:r,baseLine:n,strokeWidth:o}=t;return a==="vertical"?s.createElement(Ha,{alpha:e,points:r,baseLine:n,strokeWidth:o}):s.createElement(Ua,{alpha:e,points:r,baseLine:n,strokeWidth:o})}function Za(t){var{needClip:e,clipPathId:a,props:r,previousPointsRef:n,previousBaselineRef:o}=t,{points:l,baseLine:i,isAnimationActive:c,animationBegin:u,animationDuration:d,animationEasing:p,onAnimationStart:f,onAnimationEnd:v}=r,m=s.useMemo(()=>({points:l,baseLine:i}),[l,i]),h=rt(m,"recharts-area-"),g=Vt(),[b,y]=s.useState(!1),P=!b,x=s.useCallback(()=>{typeof v=="function"&&v(),y(!1)},[v]),I=s.useCallback(()=>{typeof f=="function"&&f(),y(!0)},[f]);if(g==null)return null;var E=n.current,k=o.current;return s.createElement(Ya,{showLabels:P,points:l},r.children,s.createElement(nt,{animationId:h,begin:u,duration:d,isActive:c,easing:p,onAnimationEnd:x,onAnimationStart:I,key:h},j=>{if(E){var O=E.length/l.length,w=j===1?l:l.map((S,D)=>{var T=Math.floor(D*O);if(E[T]){var N=E[T];return z(z({},S),{},{x:_(N.x,S.x,j),y:_(N.y,S.y,j)})}return S}),L;return K(i)?L=_(k,i,j):Y(i)||Gt(i)?L=_(k,0,j):L=i.map((S,D)=>{var T=Math.floor(D*O);if(Array.isArray(k)&&k[T]){var N=k[T];return z(z({},S),{},{x:_(N.x,S.x,j),y:_(N.y,S.y,j)})}return S}),j>0&&(n.current=w,o.current=L),s.createElement(Fe,{points:w,baseLine:L,needClip:e,clipPathId:a,props:r})}return j>0&&(n.current=l,o.current=i),s.createElement(R,null,c&&s.createElement("defs",null,s.createElement("clipPath",{id:"animationClipPath-".concat(a)},s.createElement(qa,{alpha:j,points:l,baseLine:i,layout:g,strokeWidth:r.strokeWidth}))),s.createElement(R,{clipPath:"url(#animationClipPath-".concat(a,")")},s.createElement(Fe,{points:l,baseLine:i,needClip:e,clipPathId:a,props:r})))}),s.createElement(it,{label:r.label}))}function Ja(t){var{needClip:e,clipPathId:a,props:r}=t,n=s.useRef(null),o=s.useRef();return s.createElement(Za,{needClip:e,clipPathId:a,props:r,previousPointsRef:n,previousBaselineRef:o})}class Qa extends s.PureComponent{render(){var{hide:e,dot:a,points:r,className:n,top:o,left:l,needClip:i,xAxisId:c,yAxisId:u,width:d,height:p,id:f,baseLine:v,zIndex:m}=this.props;if(e)return null;var h=te("recharts-area",n),g=f,{r:b,strokeWidth:y}=yt(a),P=ye(a),x=b*2+y,I=i?"url(#clipPath-".concat(P?"":"dots-").concat(g,")"):void 0;return s.createElement(ne,{zIndex:m},s.createElement(R,{className:h},i&&s.createElement("defs",null,s.createElement(at,{clipPathId:g,xAxisId:c,yAxisId:u}),!P&&s.createElement("clipPath",{id:"clipPath-dots-".concat(g)},s.createElement("rect",{x:l-x/2,y:o-x/2,width:d+x,height:p+x}))),s.createElement(Ja,{needClip:i,clipPathId:g,props:this.props})),s.createElement(me,{points:r,mainColor:Q(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}),this.props.isRange&&Array.isArray(v)&&s.createElement(me,{points:v,mainColor:Q(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}))}}var er={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:re.area};function tr(t){var e,{activeDot:a,animationBegin:r,animationDuration:n,animationEasing:o,connectNulls:l,dot:i,fill:c,fillOpacity:u,hide:d,isAnimationActive:p,legendType:f,stroke:v,xAxisId:m,yAxisId:h}=t,g=jt(t,Ra),b=tt(),y=Bt(),{needClip:P}=Qe(m,h),x=le(),{points:I,isRange:E,baseLine:k}=(e=xe(D=>Ka(D,t.id,x)))!==null&&e!==void 0?e:{},j=et();if(b!=="horizontal"&&b!=="vertical"||j==null||y!=="AreaChart"&&y!=="ComposedChart")return null;var{height:O,width:w,x:L,y:S}=j;return!I||!I.length?null:s.createElement(Qa,W({},g,{activeDot:a,animationBegin:r,animationDuration:n,animationEasing:o,baseLine:k,connectNulls:l,dot:i,fill:c,fillOpacity:u,height:O,hide:d,layout:b,isAnimationActive:p,isRange:E,legendType:f,needClip:P,points:I,stroke:v,width:w,left:L,top:S,xAxisId:m,yAxisId:h}))}var ar=(t,e,a,r,n)=>{var o=a??e;if(K(o))return o;var l=t==="horizontal"?n:r,i=l.scale.domain();if(l.type==="number"){var c=Math.max(i[0],i[1]),u=Math.min(i[0],i[1]);return o==="dataMin"?u:o==="dataMax"||c<0?c:Math.max(Math.min(i[0],i[1]),0)}return o==="dataMin"?i[0]:o==="dataMax"?i[1]:i[0]};function rr(t){var{areaSettings:{connectNulls:e,baseValue:a,dataKey:r},stackedData:n,layout:o,chartBaseValue:l,xAxis:i,yAxis:c,displayedData:u,dataStartIndex:d,xAxisTicks:p,yAxisTicks:f,bandSize:v}=t,m=n&&n.length,h=ar(o,l,a,i,c),g=o==="horizontal",b=!1,y=u.map((x,I)=>{var E,k,j,O;if(m)O=n[d+I];else{var w=U(x,r);Array.isArray(w)?(O=w,b=!0):O=[h,w]}var L=(E=(k=O)===null||k===void 0?void 0:k[1])!==null&&E!==void 0?E:null,S=L==null||m&&!e&&U(x,r)==null;if(g){var D;return{x:q({axis:i,ticks:p,bandSize:v,entry:x,index:I}),y:S?null:(D=c.scale.map(L))!==null&&D!==void 0?D:null,value:O,payload:x}}return{x:S?null:(j=i.scale.map(L))!==null&&j!==void 0?j:null,y:q({axis:c,ticks:f,bandSize:v,entry:x,index:I}),value:O,payload:x}}),P;return m||b?P=y.map(x=>{var I,E=Array.isArray(x.value)?x.value[0]:null;if(g){var k;return{x:x.x,y:E!=null&&x.y!=null&&(k=c.scale.map(E))!==null&&k!==void 0?k:null,payload:x.payload}}return{x:E!=null&&(I=i.scale.map(E))!==null&&I!==void 0?I:null,y:x.y,payload:x.payload}}):P=g?c.scale.map(h):i.scale.map(h),{points:y,baseLine:P??0,isRange:b}}function nr(t){var e=be(t,er),a=le();return s.createElement(He,{id:e.id,type:"area"},r=>s.createElement(s.Fragment,null,s.createElement(Ue,{legendPayload:Va(e)}),s.createElement(Ga,{dataKey:e.dataKey,data:e.data,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,unit:e.unit,tooltipType:e.tooltipType,id:r}),s.createElement(qe,{type:"area",id:r,data:e.data,dataKey:e.dataKey,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,stackId:Ft(e.stackId),hide:e.hide,barSize:void 0,baseValue:e.baseValue,isPanorama:a,connectNulls:e.connectNulls}),s.createElement(tr,W({},e,{id:r}))))}var we=s.memo(nr,Ye);we.displayName="Area";var ir=["axis"],or=s.forwardRef((t,e)=>s.createElement(st,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:ir,tooltipPayloadSearcher:ct,categoricalChartProps:t,ref:e})),lr=["axis"],Ot=s.forwardRef((t,e)=>s.createElement(st,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:lr,tooltipPayloadSearcher:ct,categoricalChartProps:t,ref:e}));const ee={count:{label:"OK",color:"var(--ok)"},errors:{label:"5xx",color:"var(--danger)"},client_errors:{label:"4xx",color:"var(--warning)"},p50:{label:"p50",color:"var(--primary)"},p95:{label:"p95",color:"var(--primary)"},p99:{label:"p99",color:"var(--primary)"},avg:{label:"avg",color:"var(--warning)"}};function Le(t){return new Date(t).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function G(t){return new Date(t).toLocaleString(void 0,{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"})}const F={fontSize:10,fontFamily:"var(--font-mono)"};function De(t=[]){return t.map(e=>A.jsx(Xt,{x:new Date(e.at).toISOString(),stroke:"var(--primary)",strokeDasharray:"3 3",label:{value:e.ref,position:"insideTopRight",fontSize:9,fill:"var(--primary)",fontFamily:"var(--font-mono)"}},e.deploy))}function Ne(){const t=B.c(2),{setHoveredKey:e}=Be();let a;return t[0]!==e?(a={onMouseMove:r=>{typeof r?.activeLabel=="string"&&e(r.activeLabel)},onMouseLeave:()=>e(null)},t[0]=e,t[1]=a):a=t[1],a}function Ce(t){const e=B.c(11),{data:a}=t;if(a.length===0)return null;let r;e[0]!==a[0].t?(r=G(a[0].t),e[0]=a[0].t,e[1]=r):r=e[1];let n;e[2]!==r?(n=A.jsx("span",{children:r}),e[2]=r,e[3]=n):n=e[3];const o=a[a.length-1];let l;e[4]!==o.t?(l=G(o.t),e[4]=o.t,e[5]=l):l=e[5];let i;e[6]!==l?(i=A.jsx("span",{children:l}),e[6]=l,e[7]=i):i=e[7];let c;return e[8]!==n||e[9]!==i?(c=A.jsxs("div",{className:"text-muted-foreground mt-1 flex justify-between font-mono text-[10px]",children:[n,i]}),e[8]=n,e[9]=i,e[10]=c):c=e[10],c}function kr(t){const e=B.c(27),{data:a,deploys:r,label:n,className:o}=t,l=n===void 0?"Requests":n,i=o===void 0?"h-40":o;let c;e[0]!==l?(c={...ee,count:{...ee.count,label:l}},e[0]=l,e[1]=c):c=e[1];const u=c,d=Ne(),p=`${i} w-full`;let f;e[2]!==a?(f=a.map(ur),e[2]=a,e[3]=f):f=e[3];const v=d.onMouseMove,m=d.onMouseLeave;let h,g,b;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=A.jsx(Ie,{vertical:!1,strokeDasharray:"2 4"}),b=A.jsx(Ee,{dataKey:"t",tickFormatter:Le,tickLine:!1,axisLine:!1,minTickGap:40,tick:F}),h=A.jsx(ke,{width:36,tickLine:!1,axisLine:!1,tick:F,tickFormatter:cr}),e[4]=h,e[5]=g,e[6]=b):(h=e[4],g=e[5],b=e[6]);let y,P,x;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=A.jsx(je,{content:A.jsx(Oe,{labelFormatter:sr})}),P=A.jsx(de,{dataKey:"ok",name:"count",fill:"var(--color-count)",stackId:"a"}),x=A.jsx(de,{dataKey:"client_errors",fill:"var(--color-client_errors)",stackId:"a"}),e[7]=y,e[8]=P,e[9]=x):(y=e[7],P=e[8],x=e[9]);let I;e[10]===Symbol.for("react.memo_cache_sentinel")?(I=A.jsx(de,{dataKey:"errors",fill:"var(--color-errors)",stackId:"a",radius:[2,2,0,0]}),e[10]=I):I=e[10];let E;e[11]!==r?(E=De(r),e[11]=r,e[12]=E):E=e[12];let k;e[13]!==d.onMouseLeave||e[14]!==d.onMouseMove||e[15]!==E||e[16]!==f?(k=A.jsxs(Yt,{data:f,barCategoryGap:2,onMouseMove:v,onMouseLeave:m,children:[g,b,h,y,P,x,I,E]}),e[13]=d.onMouseLeave,e[14]=d.onMouseMove,e[15]=E,e[16]=f,e[17]=k):k=e[17];let j;e[18]!==u||e[19]!==k||e[20]!==p?(j=A.jsx(ce,{config:u,className:p,children:k}),e[18]=u,e[19]=k,e[20]=p,e[21]=j):j=e[21];let O;e[22]!==a?(O=A.jsx(Ce,{data:a}),e[22]=a,e[23]=O):O=e[23];let w;return e[24]!==j||e[25]!==O?(w=A.jsxs("div",{children:[j,O]}),e[24]=j,e[25]=O,e[26]=w):w=e[26],w}function sr(t){return G(String(t))}function cr(t){return St(Number(t))}function ur(t){return{...t,t:new Date(t.t).toISOString(),ok:Math.max(0,t.count-t.errors-t.client_errors)}}const dr={ok:{label:"ok",color:"var(--ok)"},errored:{label:"errored",color:"var(--warning)"},crashed:{label:"crashed",color:"var(--danger)"}};function jr(t){const e=B.c(23),{data:a,deploys:r,className:n}=t,o=n===void 0?"h-40":n,l=Ne(),i=`${o} w-full`;let c;e[0]!==a?(c=a.map(mr),e[0]=a,e[1]=c):c=e[1];const u=l.onMouseMove,d=l.onMouseLeave;let p,f,v;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=A.jsx(Ie,{vertical:!1,strokeDasharray:"2 4"}),f=A.jsx(Ee,{dataKey:"t",tickFormatter:Le,tickLine:!1,axisLine:!1,minTickGap:40,tick:F}),v=A.jsx(ke,{width:36,tickLine:!1,axisLine:!1,tick:F,tickFormatter:fr}),e[2]=p,e[3]=f,e[4]=v):(p=e[2],f=e[3],v=e[4]);let m,h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=A.jsx(je,{content:A.jsx(Oe,{labelFormatter:vr})}),m=["ok","errored","crashed"],e[5]=m,e[6]=h):(m=e[5],h=e[6]);let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g=m.map(pr),e[7]=g):g=e[7];let b;e[8]!==r?(b=De(r),e[8]=r,e[9]=b):b=e[9];let y;e[10]!==l.onMouseLeave||e[11]!==l.onMouseMove||e[12]!==b||e[13]!==c?(y=A.jsxs(Ot,{data:c,onMouseMove:u,onMouseLeave:d,children:[p,f,v,h,g,b]}),e[10]=l.onMouseLeave,e[11]=l.onMouseMove,e[12]=b,e[13]=c,e[14]=y):y=e[14];let P;e[15]!==y||e[16]!==i?(P=A.jsx(ce,{config:dr,className:i,children:y}),e[15]=y,e[16]=i,e[17]=P):P=e[17];let x;e[18]!==a?(x=A.jsx(Ce,{data:a}),e[18]=a,e[19]=x):x=e[19];let I;return e[20]!==P||e[21]!==x?(I=A.jsxs("div",{children:[P,x]}),e[20]=P,e[21]=x,e[22]=I):I=e[22],I}function pr(t){return A.jsx(we,{dataKey:t,stackId:"sessions",stroke:`var(--color-${t})`,fill:`var(--color-${t})`,fillOpacity:.3,strokeWidth:1.25,isAnimationActive:!1},t)}function vr(t){return G(String(t))}function fr(t){return St(Number(t))}function mr(t){return{...t,t:new Date(t.t).toISOString()}}function Or(t){const e=B.c(26),{data:a,deploys:r,percentile:n,className:o}=t,l=n===void 0?"p95":n,i=o===void 0?"h-40":o,c=Ne(),u=`${i} w-full`;let d;e[0]!==a?(d=a.map(gr),e[0]=a,e[1]=d):d=e[1];const p=c.onMouseMove,f=c.onMouseLeave;let v,m,h;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=A.jsx(Ie,{vertical:!1,strokeDasharray:"2 4"}),m=A.jsx(Ee,{dataKey:"t",tickFormatter:Le,tickLine:!1,axisLine:!1,minTickGap:40,tick:F}),h=A.jsx(ke,{width:44,tickLine:!1,axisLine:!1,tick:F,tickFormatter:xr}),e[2]=v,e[3]=m,e[4]=h):(v=e[2],m=e[3],h=e[4]);let g;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=A.jsx(je,{content:A.jsx(Oe,{labelFormatter:yr,formatter:hr})}),e[5]=g):g=e[5];const b=`var(--color-${l})`;let y;e[6]!==l||e[7]!==b?(y=A.jsx(he,{dataKey:l,stroke:b,dot:!1,strokeWidth:1.75,isAnimationActive:!1}),e[6]=l,e[7]=b,e[8]=y):y=e[8];let P;e[9]===Symbol.for("react.memo_cache_sentinel")?(P=A.jsx(he,{dataKey:"avg",stroke:"var(--color-avg)",dot:!1,strokeWidth:1.25,strokeOpacity:.8,isAnimationActive:!1}),e[9]=P):P=e[9];let x;e[10]!==r?(x=De(r),e[10]=r,e[11]=x):x=e[11];let I;e[12]!==c.onMouseLeave||e[13]!==c.onMouseMove||e[14]!==y||e[15]!==x||e[16]!==d?(I=A.jsxs(or,{data:d,onMouseMove:p,onMouseLeave:f,children:[v,m,h,g,y,P,x]}),e[12]=c.onMouseLeave,e[13]=c.onMouseMove,e[14]=y,e[15]=x,e[16]=d,e[17]=I):I=e[17];let E;e[18]!==I||e[19]!==u?(E=A.jsx(ce,{config:ee,className:u,children:I}),e[18]=I,e[19]=u,e[20]=E):E=e[20];let k;e[21]!==a?(k=A.jsx(Ce,{data:a}),e[21]=a,e[22]=k):k=e[22];let j;return e[23]!==E||e[24]!==k?(j=A.jsxs("div",{children:[E,k]}),e[23]=E,e[24]=k,e[25]=j):j=e[25],j}function hr(t,e){return[ut(Number(t)),String(e)]}function yr(t){return G(String(t))}function xr(t){return ut(Number(t),0)}function gr(t){return{...t,t:new Date(t.t).toISOString()}}function Sr(t){const e=B.c(21),{data:a,className:r,hoverKey:n}=t,o=r===void 0?"h-10 w-32":r,{hoveredKey:l,setHoveredKey:i}=Be(),c=n!=null&&l===n;let u;e[0]!==a?(u=a.map(br),e[0]=a,e[1]=u):u=e[1];let d;e[2]!==n||e[3]!==i?(d=n?()=>i(n):void 0,e[2]=n,e[3]=i,e[4]=d):d=e[4];let p;e[5]!==n||e[6]!==i?(p=n?()=>i(null):void 0,e[5]=n,e[6]=i,e[7]=p):p=e[7];const f=c?"var(--primary)":"var(--muted-foreground)",v=c?"var(--primary)":"var(--muted-foreground)",m=c?.35:.15,h=c?2:1.25;let g;e[8]!==f||e[9]!==v||e[10]!==m||e[11]!==h?(g=A.jsx(we,{dataKey:"v",stroke:f,fill:v,fillOpacity:m,strokeWidth:h,isAnimationActive:!1}),e[8]=f,e[9]=v,e[10]=m,e[11]=h,e[12]=g):g=e[12];let b;e[13]!==u||e[14]!==d||e[15]!==p||e[16]!==g?(b=A.jsx(Ot,{data:u,onMouseEnter:d,onMouseLeave:p,children:g}),e[13]=u,e[14]=d,e[15]=p,e[16]=g,e[17]=b):b=e[17];let y;return e[18]!==o||e[19]!==b?(y=A.jsx(ce,{config:ee,className:o,children:b}),e[18]=o,e[19]=b,e[20]=y):y=e[20],y}function br(t){return{v:t}}function St(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(t>=1e4?0:1)}k`:String(t)}export{we as A,Or as L,Sr as S,kr as T,Ot as a,jr as b};
1
+ import{a4 as te,r as s,c as B,j as A}from"./inertia-CgBdJDaE.js";import{u as Be}from"./chart-hover-B0SjyWFy.js";import{i as K,e as Ve,s as ae,D as re,f as ye,g as Nt,Z as ne,L as R,u as xe,h as Ct,j as _t,k as Y,l as Ge,m as $,n as X,o as Mt,p as ie,q as oe,r as Xe,t as ge,v as H,w as Ye,x as be,y as le,z as He,S as Ue,A as qe,E as se,F as Ze,G as Je,H as Qe,I as et,J as tt,K as at,M as Tt,N as U,O as q,P as rt,Q as nt,T as _,U as it,V as ot,W as lt,_ as Kt,$ as Wt,a0 as Rt,a1 as Pe,a2 as Ae,a3 as $t,a4 as zt,a5 as Ft,a6 as Bt,a7 as Vt,a8 as Gt,a9 as ue,aa as Z,ab as st,ac as ct,R as Xt,C as Ie,X as Ee,Y as ke,a as je,b as Oe,c as ce,B as de,d as Yt}from"./chart-Cmh6JEww.js";import{m as ut}from"./format-B9SDkrWj.js";function fe(){return fe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},fe.apply(null,arguments)}var dt=t=>{var{cx:e,cy:a,r,className:n}=t,o=te("recharts-dot",n);return K(e)&&K(a)&&K(r)?s.createElement("circle",fe({},ae(t),Ve(t),{className:o,cx:e,cy:a,r})):null},Ht=["points"];function Ke(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function pe(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Ke(Object(a),!0).forEach(function(r){Ut(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Ke(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function Ut(t,e,a){return(e=qt(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function qt(t){var e=Zt(t,"string");return typeof e=="symbol"?e:e+""}function Zt(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function J(){return J=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},J.apply(null,arguments)}function Jt(t,e){if(t==null)return{};var a,r,n=Qt(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)a=o[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Qt(t,e){if(t==null)return{};var a={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;a[r]=t[r]}return a}function ea(t){var{option:e,dotProps:a,className:r}=t;if(s.isValidElement(e))return s.cloneElement(e,a);if(typeof e=="function")return e(a);var n=te(r,typeof e!="boolean"?e.className:""),o=a??{},{points:l}=o,i=Jt(o,Ht);return s.createElement(dt,J({},i,{className:n}))}function ta(t,e){return t==null?!1:e?!0:t.length===1}function pt(t){var{points:e,dot:a,className:r,dotClassName:n,dataKey:o,baseProps:l,needClip:i,clipPathId:c,zIndex:u=re.scatter}=t;if(!ta(e,a))return null;var d=ye(a),p=Nt(a),f=e.map((m,h)=>{var g,b,y=pe(pe(pe({r:3},l),p),{},{index:h,cx:(g=m.x)!==null&&g!==void 0?g:void 0,cy:(b=m.y)!==null&&b!==void 0?b:void 0,dataKey:o,value:m.value,payload:m.payload,points:e});return s.createElement(ea,{key:"dot-".concat(h),option:a,dotProps:y,className:n})}),v={};return i&&c!=null&&(v.clipPath="url(#clipPath-".concat(d?"":"dots-").concat(c,")")),s.createElement(ne,{zIndex:u},s.createElement(R,J({className:r},v),f))}function We(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function ve(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?We(Object(a),!0).forEach(function(r){aa(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):We(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function aa(t,e,a){return(e=ra(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function ra(t){var e=na(t,"string");return typeof e=="symbol"?e:e+""}function na(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ia=t=>{var{point:e,childIndex:a,mainColor:r,activeDot:n,dataKey:o,clipPath:l}=t;if(n===!1||e.x==null||e.y==null)return null;var i={index:a,dataKey:o,cx:e.x,cy:e.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:e.payload,value:e.value},c=ve(ve(ve({},i),Ge(n)),Ve(n)),u;return s.isValidElement(n)?u=s.cloneElement(n,c):typeof n=="function"?u=n(c):u=s.createElement(dt,c),s.createElement(R,{className:"recharts-active-dot",clipPath:l},u)};function me(t){var{points:e,mainColor:a,activeDot:r,itemDataKey:n,clipPath:o,zIndex:l=re.activeDot}=t,i=xe(Ct),c=_t();if(e==null||c==null)return null;var u=e.find(d=>c.includes(d.payload));return Y(u)?null:s.createElement(ne,{zIndex:l},s.createElement(ia,{point:u,childIndex:Number(i),mainColor:a,dataKey:n,activeDot:r,clipPath:o}))}var vt=(t,e,a,r)=>ie(t,"xAxis",e,r),ft=(t,e,a,r)=>oe(t,"xAxis",e,r),mt=(t,e,a,r)=>ie(t,"yAxis",a,r),ht=(t,e,a,r)=>oe(t,"yAxis",a,r),oa=$([X,vt,mt,ft,ht],(t,e,a,r,n)=>ge(t,"xAxis")?H(e,r,!1):H(a,n,!1)),la=(t,e,a,r,n)=>n;function sa(t){return t.type==="line"}var ca=$([Xe,la],(t,e)=>t.filter(sa).find(a=>a.id===e)),ua=$([X,vt,mt,ft,ht,ca,oa,Mt],(t,e,a,r,n,o,l,i)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:d}=i;if(!(o==null||e==null||a==null||r==null||n==null||r.length===0||n.length===0||l==null||t!=="horizontal"&&t!=="vertical")){var{dataKey:p,data:f}=o,v;if(f!=null&&f.length>0?v=f:v=c?.slice(u,d+1),v!=null)return La({layout:t,xAxis:e,yAxis:a,xAxisTicks:r,yAxisTicks:n,dataKey:p,bandSize:l,displayedData:v})}});function yt(t){var e=Ge(t),a=3,r=2;if(e!=null){var{r:n,strokeWidth:o}=e,l=Number(n),i=Number(o);return(Number.isNaN(l)||l<0)&&(l=a),(Number.isNaN(i)||i<0)&&(i=r),{r:l,strokeWidth:i}}return{r:a,strokeWidth:r}}var da=["id"],pa=["type","layout","connectNulls","needClip","shape"],va=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function V(){return V=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},V.apply(null,arguments)}function Re(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function M(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Re(Object(a),!0).forEach(function(r){fa(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Re(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function fa(t,e,a){return(e=ma(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function ma(t){var e=ha(t,"string");return typeof e=="symbol"?e:e+""}function ha(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Se(t,e){if(t==null)return{};var a,r,n=ya(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)a=o[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function ya(t,e){if(t==null)return{};var a={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;a[r]=t[r]}return a}var xa=t=>{var{dataKey:e,name:a,stroke:r,legendType:n,hide:o}=t;return[{inactive:o,dataKey:e,type:n,color:r,value:se(a,e),payload:t}]},ga=s.memo(t=>{var{dataKey:e,data:a,stroke:r,strokeWidth:n,fill:o,name:l,hide:i,unit:c,tooltipType:u,id:d}=t,p={dataDefinedOnItem:a,getPosition:Je,settings:{stroke:r,strokeWidth:n,fill:o,dataKey:e,nameKey:void 0,name:se(l,e),hide:i,type:u,color:r,unit:c,graphicalItemId:d}};return s.createElement(Ze,{tooltipEntrySettings:p})}),xt=(t,e)=>"".concat(e,"px ").concat(t,"px");function ba(t,e){for(var a=t.length%2!==0?[...t,0]:t,r=[],n=0;n<e;++n)r.push(...a);return r}var Pa=(t,e,a)=>{var r=a.reduce((f,v)=>f+v,0);if(!r)return xt(e,t);for(var n=Math.floor(t/r),o=t%r,l=[],i=0,c=0;i<a.length;c+=(u=a[i])!==null&&u!==void 0?u:0,++i){var u,d=a[i];if(d!=null&&c+d>o){l=[...a.slice(0,i),o-c];break}}var p=l.length%2===0?[0,e]:[e];return[...ba(a,n),...l,...p].map(f=>"".concat(f,"px")).join(", ")};function Aa(t){var{clipPathId:e,points:a,props:r}=t,{dot:n,dataKey:o,needClip:l}=r,{id:i}=r,c=Se(r,da),u=ae(c);return s.createElement(pt,{points:a,dot:n,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:u,needClip:l,clipPathId:e})}function Ia(t){var{showLabels:e,children:a,points:r}=t,n=s.useMemo(()=>r?.map(o=>{var l,i,c={x:(l=o.x)!==null&&l!==void 0?l:0,y:(i=o.y)!==null&&i!==void 0?i:0,width:0,lowerWidth:0,upperWidth:0,height:0};return M(M({},c),{},{value:o.value,payload:o.payload,viewBox:c,parentViewBox:void 0,fill:void 0})}),[r]);return s.createElement(ot,{value:e?n:void 0},a)}function $e(t){var{clipPathId:e,pathRef:a,points:r,strokeDasharray:n,props:o}=t,{type:l,layout:i,connectNulls:c,needClip:u,shape:d}=o,p=Se(o,pa),f=M(M({},lt(p)),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(e,")"):void 0,points:r,type:l,layout:i,connectNulls:c,strokeDasharray:n??o.strokeDasharray});return s.createElement(s.Fragment,null,r?.length>1&&s.createElement(Kt,V({shapeType:"curve",option:d},f,{pathRef:a})),s.createElement(Aa,{points:r,clipPathId:e,props:o}))}function Ea(t){try{return t&&t.getTotalLength&&t.getTotalLength()||0}catch{return 0}}function ka(t){var{clipPathId:e,props:a,pathRef:r,previousPointsRef:n,longestAnimatedLengthRef:o}=t,{points:l,strokeDasharray:i,isAnimationActive:c,animationBegin:u,animationDuration:d,animationEasing:p,animateNewValues:f,width:v,height:m,onAnimationEnd:h,onAnimationStart:g}=a,b=n.current,y=rt(l,"recharts-line-"),P=s.useRef(y),[x,I]=s.useState(!1),E=!x,k=s.useCallback(()=>{typeof h=="function"&&h(),I(!1)},[h]),j=s.useCallback(()=>{typeof g=="function"&&g(),I(!0)},[g]),O=Ea(r.current),w=s.useRef(0);P.current!==y&&(w.current=o.current,P.current=y);var L=w.current;return s.createElement(Ia,{points:l,showLabels:E},a.children,s.createElement(nt,{animationId:y,begin:u,duration:d,isActive:c,easing:p,onAnimationEnd:k,onAnimationStart:j,key:y},S=>{var D=_(L,O+L,S),T=Math.min(D,O),N;if(c)if(i){var wt="".concat(i).split(/[,\s]+/gim).map(C=>parseFloat(C));N=Pa(T,O,wt)}else N=xt(O,T);else N=i==null?void 0:String(i);if(S>0&&O>0&&(n.current=l,o.current=Math.max(o.current,T)),b){var Lt=b.length/l.length,_e=S===1?l:l.map((C,Dt)=>{var Me=Math.floor(Dt*Lt);if(b[Me]){var Te=b[Me];return M(M({},C),{},{x:_(Te.x,C.x,S),y:_(Te.y,C.y,S)})}return f?M(M({},C),{},{x:_(v*2,C.x,S),y:_(m/2,C.y,S)}):M(M({},C),{},{x:C.x,y:C.y})});return n.current=_e,s.createElement($e,{props:a,points:_e,clipPathId:e,pathRef:r,strokeDasharray:N})}return s.createElement($e,{props:a,points:l,clipPathId:e,pathRef:r,strokeDasharray:N})}),s.createElement(it,{label:a.label}))}function ja(t){var{clipPathId:e,props:a}=t,r=s.useRef(null),n=s.useRef(0),o=s.useRef(null);return s.createElement(ka,{props:a,clipPathId:e,previousPointsRef:r,longestAnimatedLengthRef:n,pathRef:o})}var Oa=(t,e)=>{var a,r;return{x:(a=t.x)!==null&&a!==void 0?a:void 0,y:(r=t.y)!==null&&r!==void 0?r:void 0,value:t.value,errorVal:U(t.payload,e)}};class Sa extends s.Component{render(){var{hide:e,dot:a,points:r,className:n,xAxisId:o,yAxisId:l,top:i,left:c,width:u,height:d,id:p,needClip:f,zIndex:v}=this.props;if(e)return null;var m=te("recharts-line",n),h=p,{r:g,strokeWidth:b}=yt(a),y=ye(a),P=g*2+b,x=f?"url(#clipPath-".concat(y?"":"dots-").concat(h,")"):void 0;return s.createElement(ne,{zIndex:v},s.createElement(R,{className:m},f&&s.createElement("defs",null,s.createElement(at,{clipPathId:h,xAxisId:o,yAxisId:l}),!y&&s.createElement("clipPath",{id:"clipPath-dots-".concat(h)},s.createElement("rect",{x:c-P/2,y:i-P/2,width:u+P,height:d+P}))),s.createElement(Tt,{xAxisId:o,yAxisId:l,data:r,dataPointFormatter:Oa,errorBarOffset:0},s.createElement(ja,{props:this.props,clipPathId:h}))),s.createElement(me,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:x}))}}var gt={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:re.line,type:"linear"};function wa(t){var e=be(t,gt),{activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:o,animationEasing:l,connectNulls:i,dot:c,hide:u,isAnimationActive:d,label:p,legendType:f,xAxisId:v,yAxisId:m,id:h}=e,g=Se(e,va),{needClip:b}=Qe(v,m),y=et(),P=tt(),x=le(),I=xe(w=>ua(w,v,m,x,h));if(P!=="horizontal"&&P!=="vertical"||I==null||y==null)return null;var{height:E,width:k,x:j,y:O}=y;return s.createElement(Sa,V({},g,{id:h,connectNulls:i,dot:c,activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:o,animationEasing:l,isAnimationActive:d,hide:u,label:p,legendType:f,xAxisId:v,yAxisId:m,points:I,layout:P,height:E,width:k,left:j,top:O,needClip:b}))}function La(t){var{layout:e,xAxis:a,yAxis:r,xAxisTicks:n,yAxisTicks:o,dataKey:l,bandSize:i,displayedData:c}=t;return c.map((u,d)=>{var p=U(u,l);if(e==="horizontal"){var f=q({axis:a,ticks:n,bandSize:i,entry:u,index:d}),v=Y(p)?null:r.scale.map(p);return{x:f,y:v??null,value:p,payload:u}}var m=Y(p)?null:a.scale.map(p),h=q({axis:r,ticks:o,bandSize:i,entry:u,index:d});return m==null||h==null?null:{x:m,y:h,value:p,payload:u}}).filter(Boolean)}function Da(t){var e=be(t,gt),a=le();return s.createElement(He,{id:e.id,type:"line"},r=>s.createElement(s.Fragment,null,s.createElement(Ue,{legendPayload:xa(e)}),s.createElement(ga,{dataKey:e.dataKey,data:e.data,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,unit:e.unit,tooltipType:e.tooltipType,id:r}),s.createElement(qe,{type:"line",id:r,data:e.data,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,dataKey:e.dataKey,hide:e.hide,isPanorama:a}),s.createElement(wa,V({},e,{id:r}))))}var he=s.memo(Da,Ye);he.displayName="Line";var bt=(t,e,a)=>ie(t,"xAxis",Pe(t,e),a),Pt=(t,e,a)=>oe(t,"xAxis",Pe(t,e),a),At=(t,e,a)=>ie(t,"yAxis",Ae(t,e),a),It=(t,e,a)=>oe(t,"yAxis",Ae(t,e),a),Na=$([X,bt,At,Pt,It],(t,e,a,r,n)=>ge(t,"xAxis")?H(e,r,!1):H(a,n,!1)),Ca=(t,e)=>e,Et=$([Xe,Ca],(t,e)=>t.filter(a=>a.type==="area").find(a=>a.id===e)),kt=t=>{var e=X(t),a=ge(e,"xAxis");return a?"yAxis":"xAxis"},_a=(t,e)=>{var a=kt(t);return a==="yAxis"?Ae(t,e):Pe(t,e)},Ma=(t,e,a)=>zt(t,kt(t),_a(t,e),a),Ta=$([Et,Ma],(t,e)=>{var a;if(!(t==null||e==null)){var{stackId:r}=t,n=$t(t);if(!(r==null||n==null)){var o=(a=e[r])===null||a===void 0?void 0:a.stackedData,l=o?.find(i=>i.key===n);if(l!=null)return l.map(i=>[i[0],i[1]])}}}),Ka=$([X,bt,At,Pt,It,Ta,Wt,Na,Et,Rt],(t,e,a,r,n,o,l,i,c,u)=>{var{chartData:d,dataStartIndex:p,dataEndIndex:f}=l;if(!(c==null||t!=="horizontal"&&t!=="vertical"||e==null||a==null||r==null||n==null||r.length===0||n.length===0||i==null)){var{data:v}=c,m;if(v&&v.length>0?m=v:m=d?.slice(p,f+1),m!=null)return rr({layout:t,xAxis:e,yAxis:a,xAxisTicks:r,yAxisTicks:n,dataStartIndex:p,areaSettings:c,stackedData:o,displayedData:m,chartBaseValue:u,bandSize:i})}}),Wa=["id"],Ra=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function W(){return W=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},W.apply(null,arguments)}function jt(t,e){if(t==null)return{};var a,r,n=$a(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)a=o[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function $a(t,e){if(t==null)return{};var a={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;a[r]=t[r]}return a}function ze(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function z(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?ze(Object(a),!0).forEach(function(r){za(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ze(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function za(t,e,a){return(e=Fa(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function Fa(t){var e=Ba(t,"string");return typeof e=="symbol"?e:e+""}function Ba(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Q(t,e){return t&&t!=="none"?t:e}var Va=t=>{var{dataKey:e,name:a,stroke:r,fill:n,legendType:o,hide:l}=t;return[{inactive:l,dataKey:e,type:o,color:Q(r,n),value:se(a,e),payload:t}]},Ga=s.memo(t=>{var{dataKey:e,data:a,stroke:r,strokeWidth:n,fill:o,name:l,hide:i,unit:c,tooltipType:u,id:d}=t,p={dataDefinedOnItem:a,getPosition:Je,settings:{stroke:r,strokeWidth:n,fill:o,dataKey:e,nameKey:void 0,name:se(l,e),hide:i,type:u,color:Q(r,o),unit:c,graphicalItemId:d}};return s.createElement(Ze,{tooltipEntrySettings:p})});function Xa(t){var{clipPathId:e,points:a,props:r}=t,{needClip:n,dot:o,dataKey:l}=r,i=ae(r);return s.createElement(pt,{points:a,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:l,baseProps:i,needClip:n,clipPathId:e})}function Ya(t){var{showLabels:e,children:a,points:r}=t,n=r.map(o=>{var l,i,c={x:(l=o.x)!==null&&l!==void 0?l:0,y:(i=o.y)!==null&&i!==void 0?i:0,width:0,lowerWidth:0,upperWidth:0,height:0};return z(z({},c),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:c,fill:void 0})});return s.createElement(ot,{value:e?n:void 0},a)}function Fe(t){var{points:e,baseLine:a,needClip:r,clipPathId:n,props:o}=t,{layout:l,type:i,stroke:c,connectNulls:u,isRange:d}=o,{id:p}=o,f=jt(o,Wa),v=ae(f),m=lt(f);return s.createElement(s.Fragment,null,e?.length>1&&s.createElement(R,{clipPath:r?"url(#clipPath-".concat(n,")"):void 0},s.createElement(ue,W({},m,{id:p,points:e,connectNulls:u,type:i,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&s.createElement(ue,W({},v,{className:"recharts-area-curve",layout:l,type:i,connectNulls:u,fill:"none",points:e})),c!=="none"&&d&&Array.isArray(a)&&s.createElement(ue,W({},v,{className:"recharts-area-curve",layout:l,type:i,connectNulls:u,fill:"none",points:a}))),s.createElement(Xa,{points:e,props:f,clipPathId:n}))}function Ha(t){var e,a,{alpha:r,baseLine:n,points:o,strokeWidth:l}=t,i=(e=o[0])===null||e===void 0?void 0:e.y,c=(a=o[o.length-1])===null||a===void 0?void 0:a.y;if(!Z(i)||!Z(c))return null;var u=r*Math.abs(i-c),d=Math.max(...o.map(p=>p.x||0));return K(n)?d=Math.max(n,d):n&&Array.isArray(n)&&n.length&&(d=Math.max(...n.map(p=>p.x||0),d)),K(d)?s.createElement("rect",{x:0,y:i<c?i:i-u,width:d+(l?parseInt("".concat(l),10):1),height:Math.floor(u)}):null}function Ua(t){var e,a,{alpha:r,baseLine:n,points:o,strokeWidth:l}=t,i=(e=o[0])===null||e===void 0?void 0:e.x,c=(a=o[o.length-1])===null||a===void 0?void 0:a.x;if(!Z(i)||!Z(c))return null;var u=r*Math.abs(i-c),d=Math.max(...o.map(p=>p.y||0));return K(n)?d=Math.max(n,d):n&&Array.isArray(n)&&n.length&&(d=Math.max(...n.map(p=>p.y||0),d)),K(d)?s.createElement("rect",{x:i<c?i:i-u,y:0,width:u,height:Math.floor(d+(l?parseInt("".concat(l),10):1))}):null}function qa(t){var{alpha:e,layout:a,points:r,baseLine:n,strokeWidth:o}=t;return a==="vertical"?s.createElement(Ha,{alpha:e,points:r,baseLine:n,strokeWidth:o}):s.createElement(Ua,{alpha:e,points:r,baseLine:n,strokeWidth:o})}function Za(t){var{needClip:e,clipPathId:a,props:r,previousPointsRef:n,previousBaselineRef:o}=t,{points:l,baseLine:i,isAnimationActive:c,animationBegin:u,animationDuration:d,animationEasing:p,onAnimationStart:f,onAnimationEnd:v}=r,m=s.useMemo(()=>({points:l,baseLine:i}),[l,i]),h=rt(m,"recharts-area-"),g=Vt(),[b,y]=s.useState(!1),P=!b,x=s.useCallback(()=>{typeof v=="function"&&v(),y(!1)},[v]),I=s.useCallback(()=>{typeof f=="function"&&f(),y(!0)},[f]);if(g==null)return null;var E=n.current,k=o.current;return s.createElement(Ya,{showLabels:P,points:l},r.children,s.createElement(nt,{animationId:h,begin:u,duration:d,isActive:c,easing:p,onAnimationEnd:x,onAnimationStart:I,key:h},j=>{if(E){var O=E.length/l.length,w=j===1?l:l.map((S,D)=>{var T=Math.floor(D*O);if(E[T]){var N=E[T];return z(z({},S),{},{x:_(N.x,S.x,j),y:_(N.y,S.y,j)})}return S}),L;return K(i)?L=_(k,i,j):Y(i)||Gt(i)?L=_(k,0,j):L=i.map((S,D)=>{var T=Math.floor(D*O);if(Array.isArray(k)&&k[T]){var N=k[T];return z(z({},S),{},{x:_(N.x,S.x,j),y:_(N.y,S.y,j)})}return S}),j>0&&(n.current=w,o.current=L),s.createElement(Fe,{points:w,baseLine:L,needClip:e,clipPathId:a,props:r})}return j>0&&(n.current=l,o.current=i),s.createElement(R,null,c&&s.createElement("defs",null,s.createElement("clipPath",{id:"animationClipPath-".concat(a)},s.createElement(qa,{alpha:j,points:l,baseLine:i,layout:g,strokeWidth:r.strokeWidth}))),s.createElement(R,{clipPath:"url(#animationClipPath-".concat(a,")")},s.createElement(Fe,{points:l,baseLine:i,needClip:e,clipPathId:a,props:r})))}),s.createElement(it,{label:r.label}))}function Ja(t){var{needClip:e,clipPathId:a,props:r}=t,n=s.useRef(null),o=s.useRef();return s.createElement(Za,{needClip:e,clipPathId:a,props:r,previousPointsRef:n,previousBaselineRef:o})}class Qa extends s.PureComponent{render(){var{hide:e,dot:a,points:r,className:n,top:o,left:l,needClip:i,xAxisId:c,yAxisId:u,width:d,height:p,id:f,baseLine:v,zIndex:m}=this.props;if(e)return null;var h=te("recharts-area",n),g=f,{r:b,strokeWidth:y}=yt(a),P=ye(a),x=b*2+y,I=i?"url(#clipPath-".concat(P?"":"dots-").concat(g,")"):void 0;return s.createElement(ne,{zIndex:m},s.createElement(R,{className:h},i&&s.createElement("defs",null,s.createElement(at,{clipPathId:g,xAxisId:c,yAxisId:u}),!P&&s.createElement("clipPath",{id:"clipPath-dots-".concat(g)},s.createElement("rect",{x:l-x/2,y:o-x/2,width:d+x,height:p+x}))),s.createElement(Ja,{needClip:i,clipPathId:g,props:this.props})),s.createElement(me,{points:r,mainColor:Q(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}),this.props.isRange&&Array.isArray(v)&&s.createElement(me,{points:v,mainColor:Q(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}))}}var er={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:re.area};function tr(t){var e,{activeDot:a,animationBegin:r,animationDuration:n,animationEasing:o,connectNulls:l,dot:i,fill:c,fillOpacity:u,hide:d,isAnimationActive:p,legendType:f,stroke:v,xAxisId:m,yAxisId:h}=t,g=jt(t,Ra),b=tt(),y=Bt(),{needClip:P}=Qe(m,h),x=le(),{points:I,isRange:E,baseLine:k}=(e=xe(D=>Ka(D,t.id,x)))!==null&&e!==void 0?e:{},j=et();if(b!=="horizontal"&&b!=="vertical"||j==null||y!=="AreaChart"&&y!=="ComposedChart")return null;var{height:O,width:w,x:L,y:S}=j;return!I||!I.length?null:s.createElement(Qa,W({},g,{activeDot:a,animationBegin:r,animationDuration:n,animationEasing:o,baseLine:k,connectNulls:l,dot:i,fill:c,fillOpacity:u,height:O,hide:d,layout:b,isAnimationActive:p,isRange:E,legendType:f,needClip:P,points:I,stroke:v,width:w,left:L,top:S,xAxisId:m,yAxisId:h}))}var ar=(t,e,a,r,n)=>{var o=a??e;if(K(o))return o;var l=t==="horizontal"?n:r,i=l.scale.domain();if(l.type==="number"){var c=Math.max(i[0],i[1]),u=Math.min(i[0],i[1]);return o==="dataMin"?u:o==="dataMax"||c<0?c:Math.max(Math.min(i[0],i[1]),0)}return o==="dataMin"?i[0]:o==="dataMax"?i[1]:i[0]};function rr(t){var{areaSettings:{connectNulls:e,baseValue:a,dataKey:r},stackedData:n,layout:o,chartBaseValue:l,xAxis:i,yAxis:c,displayedData:u,dataStartIndex:d,xAxisTicks:p,yAxisTicks:f,bandSize:v}=t,m=n&&n.length,h=ar(o,l,a,i,c),g=o==="horizontal",b=!1,y=u.map((x,I)=>{var E,k,j,O;if(m)O=n[d+I];else{var w=U(x,r);Array.isArray(w)?(O=w,b=!0):O=[h,w]}var L=(E=(k=O)===null||k===void 0?void 0:k[1])!==null&&E!==void 0?E:null,S=L==null||m&&!e&&U(x,r)==null;if(g){var D;return{x:q({axis:i,ticks:p,bandSize:v,entry:x,index:I}),y:S?null:(D=c.scale.map(L))!==null&&D!==void 0?D:null,value:O,payload:x}}return{x:S?null:(j=i.scale.map(L))!==null&&j!==void 0?j:null,y:q({axis:c,ticks:f,bandSize:v,entry:x,index:I}),value:O,payload:x}}),P;return m||b?P=y.map(x=>{var I,E=Array.isArray(x.value)?x.value[0]:null;if(g){var k;return{x:x.x,y:E!=null&&x.y!=null&&(k=c.scale.map(E))!==null&&k!==void 0?k:null,payload:x.payload}}return{x:E!=null&&(I=i.scale.map(E))!==null&&I!==void 0?I:null,y:x.y,payload:x.payload}}):P=g?c.scale.map(h):i.scale.map(h),{points:y,baseLine:P??0,isRange:b}}function nr(t){var e=be(t,er),a=le();return s.createElement(He,{id:e.id,type:"area"},r=>s.createElement(s.Fragment,null,s.createElement(Ue,{legendPayload:Va(e)}),s.createElement(Ga,{dataKey:e.dataKey,data:e.data,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,unit:e.unit,tooltipType:e.tooltipType,id:r}),s.createElement(qe,{type:"area",id:r,data:e.data,dataKey:e.dataKey,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,stackId:Ft(e.stackId),hide:e.hide,barSize:void 0,baseValue:e.baseValue,isPanorama:a,connectNulls:e.connectNulls}),s.createElement(tr,W({},e,{id:r}))))}var we=s.memo(nr,Ye);we.displayName="Area";var ir=["axis"],or=s.forwardRef((t,e)=>s.createElement(st,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:ir,tooltipPayloadSearcher:ct,categoricalChartProps:t,ref:e})),lr=["axis"],Ot=s.forwardRef((t,e)=>s.createElement(st,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:lr,tooltipPayloadSearcher:ct,categoricalChartProps:t,ref:e}));const ee={count:{label:"OK",color:"var(--ok)"},errors:{label:"5xx",color:"var(--danger)"},client_errors:{label:"4xx",color:"var(--warning)"},p50:{label:"p50",color:"var(--primary)"},p95:{label:"p95",color:"var(--primary)"},p99:{label:"p99",color:"var(--primary)"},avg:{label:"avg",color:"var(--warning)"}};function Le(t){return new Date(t).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function G(t){return new Date(t).toLocaleString(void 0,{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"})}const F={fontSize:10,fontFamily:"var(--font-mono)"};function De(t=[]){return t.map(e=>A.jsx(Xt,{x:new Date(e.at).toISOString(),stroke:"var(--primary)",strokeDasharray:"3 3",label:{value:e.ref,position:"insideTopRight",fontSize:9,fill:"var(--primary)",fontFamily:"var(--font-mono)"}},e.deploy))}function Ne(){const t=B.c(2),{setHoveredKey:e}=Be();let a;return t[0]!==e?(a={onMouseMove:r=>{typeof r?.activeLabel=="string"&&e(r.activeLabel)},onMouseLeave:()=>e(null)},t[0]=e,t[1]=a):a=t[1],a}function Ce(t){const e=B.c(11),{data:a}=t;if(a.length===0)return null;let r;e[0]!==a[0].t?(r=G(a[0].t),e[0]=a[0].t,e[1]=r):r=e[1];let n;e[2]!==r?(n=A.jsx("span",{children:r}),e[2]=r,e[3]=n):n=e[3];const o=a[a.length-1];let l;e[4]!==o.t?(l=G(o.t),e[4]=o.t,e[5]=l):l=e[5];let i;e[6]!==l?(i=A.jsx("span",{children:l}),e[6]=l,e[7]=i):i=e[7];let c;return e[8]!==n||e[9]!==i?(c=A.jsxs("div",{className:"text-muted-foreground mt-1 flex justify-between font-mono text-[10px]",children:[n,i]}),e[8]=n,e[9]=i,e[10]=c):c=e[10],c}function kr(t){const e=B.c(27),{data:a,deploys:r,label:n,className:o}=t,l=n===void 0?"Requests":n,i=o===void 0?"h-40":o;let c;e[0]!==l?(c={...ee,count:{...ee.count,label:l}},e[0]=l,e[1]=c):c=e[1];const u=c,d=Ne(),p=`${i} w-full`;let f;e[2]!==a?(f=a.map(ur),e[2]=a,e[3]=f):f=e[3];const v=d.onMouseMove,m=d.onMouseLeave;let h,g,b;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=A.jsx(Ie,{vertical:!1,strokeDasharray:"2 4"}),b=A.jsx(Ee,{dataKey:"t",tickFormatter:Le,tickLine:!1,axisLine:!1,minTickGap:40,tick:F}),h=A.jsx(ke,{width:36,tickLine:!1,axisLine:!1,tick:F,tickFormatter:cr}),e[4]=h,e[5]=g,e[6]=b):(h=e[4],g=e[5],b=e[6]);let y,P,x;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=A.jsx(je,{content:A.jsx(Oe,{labelFormatter:sr})}),P=A.jsx(de,{dataKey:"ok",name:"count",fill:"var(--color-count)",stackId:"a"}),x=A.jsx(de,{dataKey:"client_errors",fill:"var(--color-client_errors)",stackId:"a"}),e[7]=y,e[8]=P,e[9]=x):(y=e[7],P=e[8],x=e[9]);let I;e[10]===Symbol.for("react.memo_cache_sentinel")?(I=A.jsx(de,{dataKey:"errors",fill:"var(--color-errors)",stackId:"a",radius:[2,2,0,0]}),e[10]=I):I=e[10];let E;e[11]!==r?(E=De(r),e[11]=r,e[12]=E):E=e[12];let k;e[13]!==d.onMouseLeave||e[14]!==d.onMouseMove||e[15]!==E||e[16]!==f?(k=A.jsxs(Yt,{data:f,barCategoryGap:2,onMouseMove:v,onMouseLeave:m,children:[g,b,h,y,P,x,I,E]}),e[13]=d.onMouseLeave,e[14]=d.onMouseMove,e[15]=E,e[16]=f,e[17]=k):k=e[17];let j;e[18]!==u||e[19]!==k||e[20]!==p?(j=A.jsx(ce,{config:u,className:p,children:k}),e[18]=u,e[19]=k,e[20]=p,e[21]=j):j=e[21];let O;e[22]!==a?(O=A.jsx(Ce,{data:a}),e[22]=a,e[23]=O):O=e[23];let w;return e[24]!==j||e[25]!==O?(w=A.jsxs("div",{children:[j,O]}),e[24]=j,e[25]=O,e[26]=w):w=e[26],w}function sr(t){return G(String(t))}function cr(t){return St(Number(t))}function ur(t){return{...t,t:new Date(t.t).toISOString(),ok:Math.max(0,t.count-t.errors-t.client_errors)}}const dr={ok:{label:"ok",color:"var(--ok)"},errored:{label:"errored",color:"var(--warning)"},crashed:{label:"crashed",color:"var(--danger)"}};function jr(t){const e=B.c(23),{data:a,deploys:r,className:n}=t,o=n===void 0?"h-40":n,l=Ne(),i=`${o} w-full`;let c;e[0]!==a?(c=a.map(mr),e[0]=a,e[1]=c):c=e[1];const u=l.onMouseMove,d=l.onMouseLeave;let p,f,v;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=A.jsx(Ie,{vertical:!1,strokeDasharray:"2 4"}),f=A.jsx(Ee,{dataKey:"t",tickFormatter:Le,tickLine:!1,axisLine:!1,minTickGap:40,tick:F}),v=A.jsx(ke,{width:36,tickLine:!1,axisLine:!1,tick:F,tickFormatter:fr}),e[2]=p,e[3]=f,e[4]=v):(p=e[2],f=e[3],v=e[4]);let m,h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=A.jsx(je,{content:A.jsx(Oe,{labelFormatter:vr})}),m=["ok","errored","crashed"],e[5]=m,e[6]=h):(m=e[5],h=e[6]);let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g=m.map(pr),e[7]=g):g=e[7];let b;e[8]!==r?(b=De(r),e[8]=r,e[9]=b):b=e[9];let y;e[10]!==l.onMouseLeave||e[11]!==l.onMouseMove||e[12]!==b||e[13]!==c?(y=A.jsxs(Ot,{data:c,onMouseMove:u,onMouseLeave:d,children:[p,f,v,h,g,b]}),e[10]=l.onMouseLeave,e[11]=l.onMouseMove,e[12]=b,e[13]=c,e[14]=y):y=e[14];let P;e[15]!==y||e[16]!==i?(P=A.jsx(ce,{config:dr,className:i,children:y}),e[15]=y,e[16]=i,e[17]=P):P=e[17];let x;e[18]!==a?(x=A.jsx(Ce,{data:a}),e[18]=a,e[19]=x):x=e[19];let I;return e[20]!==P||e[21]!==x?(I=A.jsxs("div",{children:[P,x]}),e[20]=P,e[21]=x,e[22]=I):I=e[22],I}function pr(t){return A.jsx(we,{dataKey:t,stackId:"sessions",stroke:`var(--color-${t})`,fill:`var(--color-${t})`,fillOpacity:.3,strokeWidth:1.25,isAnimationActive:!1},t)}function vr(t){return G(String(t))}function fr(t){return St(Number(t))}function mr(t){return{...t,t:new Date(t.t).toISOString()}}function Or(t){const e=B.c(26),{data:a,deploys:r,percentile:n,className:o}=t,l=n===void 0?"p95":n,i=o===void 0?"h-40":o,c=Ne(),u=`${i} w-full`;let d;e[0]!==a?(d=a.map(gr),e[0]=a,e[1]=d):d=e[1];const p=c.onMouseMove,f=c.onMouseLeave;let v,m,h;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=A.jsx(Ie,{vertical:!1,strokeDasharray:"2 4"}),m=A.jsx(Ee,{dataKey:"t",tickFormatter:Le,tickLine:!1,axisLine:!1,minTickGap:40,tick:F}),h=A.jsx(ke,{width:44,tickLine:!1,axisLine:!1,tick:F,tickFormatter:xr}),e[2]=v,e[3]=m,e[4]=h):(v=e[2],m=e[3],h=e[4]);let g;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=A.jsx(je,{content:A.jsx(Oe,{labelFormatter:yr,formatter:hr})}),e[5]=g):g=e[5];const b=`var(--color-${l})`;let y;e[6]!==l||e[7]!==b?(y=A.jsx(he,{dataKey:l,stroke:b,dot:!1,strokeWidth:1.75,isAnimationActive:!1}),e[6]=l,e[7]=b,e[8]=y):y=e[8];let P;e[9]===Symbol.for("react.memo_cache_sentinel")?(P=A.jsx(he,{dataKey:"avg",stroke:"var(--color-avg)",dot:!1,strokeWidth:1.25,strokeOpacity:.8,isAnimationActive:!1}),e[9]=P):P=e[9];let x;e[10]!==r?(x=De(r),e[10]=r,e[11]=x):x=e[11];let I;e[12]!==c.onMouseLeave||e[13]!==c.onMouseMove||e[14]!==y||e[15]!==x||e[16]!==d?(I=A.jsxs(or,{data:d,onMouseMove:p,onMouseLeave:f,children:[v,m,h,g,y,P,x]}),e[12]=c.onMouseLeave,e[13]=c.onMouseMove,e[14]=y,e[15]=x,e[16]=d,e[17]=I):I=e[17];let E;e[18]!==I||e[19]!==u?(E=A.jsx(ce,{config:ee,className:u,children:I}),e[18]=I,e[19]=u,e[20]=E):E=e[20];let k;e[21]!==a?(k=A.jsx(Ce,{data:a}),e[21]=a,e[22]=k):k=e[22];let j;return e[23]!==E||e[24]!==k?(j=A.jsxs("div",{children:[E,k]}),e[23]=E,e[24]=k,e[25]=j):j=e[25],j}function hr(t,e){return[ut(Number(t)),String(e)]}function yr(t){return G(String(t))}function xr(t){return ut(Number(t),0)}function gr(t){return{...t,t:new Date(t.t).toISOString()}}function Sr(t){const e=B.c(21),{data:a,className:r,hoverKey:n}=t,o=r===void 0?"h-10 w-32":r,{hoveredKey:l,setHoveredKey:i}=Be(),c=n!=null&&l===n;let u;e[0]!==a?(u=a.map(br),e[0]=a,e[1]=u):u=e[1];let d;e[2]!==n||e[3]!==i?(d=n?()=>i(n):void 0,e[2]=n,e[3]=i,e[4]=d):d=e[4];let p;e[5]!==n||e[6]!==i?(p=n?()=>i(null):void 0,e[5]=n,e[6]=i,e[7]=p):p=e[7];const f=c?"var(--primary)":"var(--muted-foreground)",v=c?"var(--primary)":"var(--muted-foreground)",m=c?.35:.15,h=c?2:1.25;let g;e[8]!==f||e[9]!==v||e[10]!==m||e[11]!==h?(g=A.jsx(we,{dataKey:"v",stroke:f,fill:v,fillOpacity:m,strokeWidth:h,isAnimationActive:!1}),e[8]=f,e[9]=v,e[10]=m,e[11]=h,e[12]=g):g=e[12];let b;e[13]!==u||e[14]!==d||e[15]!==p||e[16]!==g?(b=A.jsx(Ot,{data:u,onMouseEnter:d,onMouseLeave:p,children:g}),e[13]=u,e[14]=d,e[15]=p,e[16]=g,e[17]=b):b=e[17];let y;return e[18]!==o||e[19]!==b?(y=A.jsx(ce,{config:ee,className:o,children:b}),e[18]=o,e[19]=b,e[20]=y):y=e[20],y}function br(t){return{v:t}}function St(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(t>=1e4?0:1)}k`:String(t)}export{we as A,Or as L,Sr as S,kr as T,Ot as a,jr as b};
@@ -0,0 +1 @@
1
+ import{c as B,u as G,ag as J,j as s,L as K}from"./inertia-CgBdJDaE.js";import{F as M}from"./flamegraph-Vj4QSAlT.js";import{P as O,E as Q}from"./env-layout-aGQgTZRg.js";import{S as N,a as T}from"./stat-Cd8QaTGw.js";import{C as U,a as V}from"./card-C9j_ffR9.js";import{e as X}from"./execution-path-BX5NcXUZ.js";import{w as Y,c as Z,m as A,b as ee}from"./format-B9SDkrWj.js";import"./data-table-Bc3ZRnpb.js";import"./chart-hover-B0SjyWFy.js";import"./empty-state-CkPROZB0.js";import"./segmented-Dg8CES94.js";import"./label-BWgQzHCO.js";import"./index-Dy7Wg880.js";import"./app-wordmark-B-0yZiDb.js";import"./badge-DKvItdlb.js";import"./app-layout-CdJ5Qjms.js";import"./live-dot-Bejk0a5o.js";import"./index-B2_QluAw.js";import"./checkbox-BsBkRg5n.js";import"./use-live-LwJStJvD.js";import"./arrow-up-DY1fS0tD.js";function Pe(i){const e=B.c(71),{environment:z,window:I}=G().props,l=z.application_id,r=z.id,t=i.profile,L=t.execution_preview??"Profile";let o;e[0]!==l||e[1]!==r||e[2]!==I?(o=J(l,r,{window:I}),e[0]=l,e[1]=r,e[2]=I,e[3]=o):o=e[3];let a;e[4]!==o?(a={title:"Profiles",href:o},e[4]=o,e[5]=a):a=e[5];const F=t.execution_preview??`Profile ${t.id}`;let n;e[6]!==F?(n={title:F,href:"#"},e[6]=F,e[7]=n):n=e[7];let c;e[8]!==a||e[9]!==n?(c=[a,n],e[8]=a,e[9]=n,e[10]=c):c=e[10];const R=t.execution_preview??`Profile ${t.id}`;let p;e[11]!==R?(p=s.jsx("span",{className:"font-mono",children:R}),e[11]=R,e[12]=p):p=e[12];let d;e[13]!==t.occurred_at?(d=Y(t.occurred_at),e[13]=t.occurred_at,e[14]=d):d=e[14];let f;e[15]!==d?(f=s.jsx("span",{children:d}),e[15]=d,e[16]=f):f=e[16];const D=t.mode?` · ${t.mode}`:"";let m;e[17]!==D||e[18]!==t.profiler?(m=s.jsxs("span",{children:[t.profiler,D]}),e[17]=D,e[18]=t.profiler,e[19]=m):m=e[19];let u;e[20]!==t.server?(u=t.server&&s.jsxs("span",{children:["server ",t.server]}),e[20]=t.server,e[21]=u):u=e[21];let x;e[22]!==t.deploy?(x=t.deploy&&s.jsxs("span",{children:["deploy ",t.deploy.slice(0,12)]}),e[22]=t.deploy,e[23]=x):x=e[23];let v;e[24]!==l||e[25]!==r||e[26]!==t.execution_id||e[27]!==t.execution_source?(v=t.execution_id&&s.jsx(K,{className:"hover:underline",href:X({applicationId:l,environmentId:r,source:t.execution_source,executionId:t.execution_id}),children:"view execution"}),e[24]=l,e[25]=r,e[26]=t.execution_id,e[27]=t.execution_source,e[28]=v):v=e[28];let h;e[29]!==m||e[30]!==u||e[31]!==x||e[32]!==v||e[33]!==f?(h=s.jsxs("span",{className:"flex flex-wrap gap-x-3 text-xs",children:[f,m,u,x,v]}),e[29]=m,e[30]=u,e[31]=x,e[32]=v,e[33]=f,e[34]=h):h=e[34];let j;e[35]!==h||e[36]!==p?(j=s.jsx(O,{withWindow:!1,title:p,description:h}),e[35]=h,e[36]=p,e[37]=j):j=e[37];let _;e[38]!==t.samples?(_=Z(t.samples),e[38]=t.samples,e[39]=_):_=e[39];let w;e[40]!==_?(w=s.jsx(N,{label:"Samples",value:_}),e[40]=_,e[41]=w):w=e[41];let y;e[42]!==t.duration?(y=A(t.duration),e[42]=t.duration,e[43]=y):y=e[43];let P;e[44]!==t.interval?(P=t.interval?`every ${A(t.interval/1e3,2)}`:void 0,e[44]=t.interval,e[45]=P):P=e[45];let b;e[46]!==y||e[47]!==P?(b=s.jsx(N,{label:"Duration",value:y,hint:P}),e[46]=y,e[47]=P,e[48]=b):b=e[48];const H=t.mode??void 0;let S;e[49]!==H||e[50]!==t.profiler?(S=s.jsx(N,{label:"Profiler",value:t.profiler,hint:H}),e[49]=H,e[50]=t.profiler,e[51]=S):S=e[51];let g;e[52]!==t.stacks_bytes?(g=ee(t.stacks_bytes),e[52]=t.stacks_bytes,e[53]=g):g=e[53];const W=i.truncated?"truncated for display":"uncompressed",q=i.truncated?"warning":void 0;let k;e[54]!==g||e[55]!==W||e[56]!==q?(k=s.jsx(N,{label:"Stacks",value:g,hint:W,tone:q}),e[54]=g,e[55]=W,e[56]=q,e[57]=k):k=e[57];let E;e[58]!==w||e[59]!==b||e[60]!==S||e[61]!==k?(E=s.jsxs(T,{children:[w,b,S,k]}),e[58]=w,e[59]=b,e[60]=S,e[61]=k,e[62]=E):E=e[62];let $;e[63]!==i.collapsed?($=s.jsx(U,{children:s.jsx(V,{className:"pt-4",children:s.jsx(M,{collapsed:i.collapsed})})}),e[63]=i.collapsed,e[64]=$):$=e[64];let C;return e[65]!==L||e[66]!==j||e[67]!==E||e[68]!==$||e[69]!==c?(C=s.jsxs(Q,{title:L,crumbs:c,children:[j,E,$]}),e[65]=L,e[66]=j,e[67]=E,e[68]=$,e[69]=c,e[70]=C):C=e[70],C}export{Pe as default};
@@ -1,2 +1,2 @@
1
- import{c as L,r as z,j as s,aW as B,F as $,u as V,H as J,a2 as H,aX as M,e as I,aY as W}from"./inertia-TViv6kNv.js";import{G as q}from"./google-sign-in-button-DsTSfmzY.js";import{H as E,S as U}from"./layout-DNSLAkw_.js";import{I as g}from"./input-error-LxImUkxv.js";import{B as S}from"./app-wordmark-nbjkzxwQ.js";import{v as K,D as Y,a as Z,s as X,w as Q,c as ee,b as se}from"./live-dot-ChfUtY3p.js";import{L as N,I as D}from"./label-COUKWqE_.js";import{C as R}from"./copy-block-BKFGd11J.js";import{A as te}from"./app-layout-yh-sPWgK.js";import{K as re}from"./transition-B_AW8rMK.js";import"./separator-BwwTYtCF.js";import"./index-OqI59zPb.js";import"./index-1ol1-QWI.js";import"./use-clipboard-ColgLyQ2.js";import"./checkbox-D3aRSsBj.js";function ae(t){const e=L.c(22),{blockingAccounts:r,provider:a,recentlyAuthenticated:o,email:n}=t,w=z.useRef(null);let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(E,{title:"Delete user",description:"Delete your login and personal settings. Shared account data stays with its remaining owners."}),e[0]=j):j=e[0];let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs("div",{className:"relative space-y-0.5 text-red-600 dark:text-red-100",children:[s.jsx("p",{className:"font-medium",children:"Warning"}),s.jsx("p",{className:"text-sm",children:"Please proceed with caution, this cannot be undone."})]}),e[1]=f):f=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(K,{asChild:!0,children:s.jsx(S,{variant:"destructive",children:"Delete user"})}),e[2]=l):l=e[2];let y,c;e[3]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Y,{children:"Are you sure you want to delete your user?"}),c=s.jsx(Z,{children:"This deletes your login, sessions, and personal settings. It does not delete shared accounts or their telemetry. Transfer or delete every account you solely own first."}),e[3]=y,e[4]=c):(y=e[3],c=e[4]);let d;e[5]!==r?(d=r.length>0&&s.jsxs("div",{className:"border-destructive/30 bg-destructive/5 rounded-md border p-3 text-sm",children:["Transfer or delete these accounts first:"," ",r.map(oe).join(", "),"."]}),e[5]=r,e[6]=d):d=e[6];let i;e[7]!==a||e[8]!==o?(i=a&&!o&&s.jsx(q,{label:"Confirm with Google",reauthenticateFor:"user",separated:!1}),e[7]=a,e[8]=o,e[9]=i):i=e[9];let m,u,_;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=B(),_={preserveScroll:!0},m=()=>w.current?.focus(),e[10]=m,e[11]=u,e[12]=_):(m=e[10],u=e[11],_=e[12]);let p;e[13]!==r.length||e[14]!==n||e[15]!==a||e[16]!==o?(p=s.jsx($,{method:"delete",action:u,options:_,onError:m,resetOnSuccess:!0,className:"space-y-6",children:v=>{const{resetAndClearErrors:b,processing:k,errors:x}=v;return s.jsxs(s.Fragment,{children:[a?s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"user-deletion-confirmation",children:"Enter your email to confirm"}),s.jsx(D,{id:"user-deletion-confirmation",name:"confirmation",placeholder:n,autoComplete:"off"}),s.jsx(g,{messages:x.password_challenge})]}):s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"password_challenge",className:"sr-only",children:"Password"}),s.jsx(D,{id:"password_challenge",type:"password",name:"password_challenge",ref:w,placeholder:"Password",autoComplete:"current-password"}),s.jsx(g,{messages:x.password_challenge})]}),s.jsx(g,{messages:x.account_ownership}),s.jsxs(X,{children:[s.jsx(Q,{asChild:!0,children:s.jsx(S,{variant:"secondary",onClick:()=>b(),children:"Cancel"})}),s.jsx(S,{variant:"destructive",disabled:k||r.length>0||!!a&&!o,asChild:!0,children:s.jsx("button",{type:"submit",children:"Delete user"})})]})]})}}),e[13]=r.length,e[14]=n,e[15]=a,e[16]=o,e[17]=p):p=e[17];let h;return e[18]!==p||e[19]!==d||e[20]!==i?(h=s.jsxs("div",{className:"space-y-6",children:[j,s.jsxs("div",{className:"space-y-4 rounded-lg border border-red-100 bg-red-50 p-4 dark:border-red-200/10 dark:bg-red-700/10",children:[f,s.jsxs(ee,{children:[l,s.jsxs(se,{children:[y,c,d,i,p]})]})]})]}),e[18]=p,e[19]=d,e[20]=i,e[21]=h):h=e[21],h}function oe(t){return t.name}const ne="rwp_your_token_here";function ie(t,e){const r=`Bearer ${e??ne}`;return[{id:"claude-code",label:"Claude Code",hint:"Run this in the project you want the assistant to work in.",code:`claude mcp add railwatch --transport http ${t} --header "Authorization: ${r}"`},{id:"claude-desktop",label:"Claude Desktop",hint:"claude_desktop_config.json — Claude Desktop speaks stdio, so mcp-remote bridges it to HTTP.",code:JSON.stringify({mcpServers:{railwatch:{command:"npx",args:["-y","mcp-remote",t,"--header",`Authorization: ${r}`]}}},null,2)},{id:"cursor",label:"Cursor",hint:".cursor/mcp.json in the project, or ~/.cursor/mcp.json for every project.",code:JSON.stringify({mcpServers:{railwatch:{url:t,headers:{Authorization:r}}}},null,2)},{id:"vscode",label:"VS Code",hint:".vscode/mcp.json in the workspace.",code:JSON.stringify({servers:{railwatch:{type:"http",url:t,headers:{Authorization:r}}}},null,2)},{id:"zed",label:"Zed",hint:"settings.json — also via the mcp-remote bridge.",code:JSON.stringify({context_servers:{railwatch:{source:"custom",command:"npx",args:["-y","mcp-remote",t,"--header",`Authorization: ${r}`]}}},null,2)},{id:"curl",label:"Test it with curl",hint:"Lists every tool the server exposes. If this returns JSON, the token works.",code:[`curl -sS ${t} \\`,` -H "Authorization: ${r}" \\`,' -H "Content-Type: application/json" \\',` -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'`].join(`
1
+ import{c as L,r as z,j as s,aW as B,F as $,u as V,H as J,a2 as H,aX as M,e as I,aY as W}from"./inertia-CgBdJDaE.js";import{G as q}from"./google-sign-in-button-BzogBGeF.js";import{H as E,S as U}from"./layout-neknbxn-.js";import{I as g}from"./input-error-DfpIawjl.js";import{B as S}from"./app-wordmark-B-0yZiDb.js";import{v as K,D as Y,a as Z,s as X,w as Q,c as ee,b as se}from"./live-dot-Bejk0a5o.js";import{L as N,I as D}from"./label-BWgQzHCO.js";import{C as R}from"./copy-block-DtO_3esq.js";import{A as te}from"./app-layout-CdJ5Qjms.js";import{K as re}from"./transition-CQ9yvfPa.js";import"./separator-BOp2LHw3.js";import"./index-Dy7Wg880.js";import"./index-B2_QluAw.js";import"./use-clipboard-3hTXU91g.js";import"./checkbox-BsBkRg5n.js";function ae(t){const e=L.c(22),{blockingAccounts:r,provider:a,recentlyAuthenticated:o,email:n}=t,w=z.useRef(null);let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(E,{title:"Delete user",description:"Delete your login and personal settings. Shared account data stays with its remaining owners."}),e[0]=j):j=e[0];let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs("div",{className:"relative space-y-0.5 text-red-600 dark:text-red-100",children:[s.jsx("p",{className:"font-medium",children:"Warning"}),s.jsx("p",{className:"text-sm",children:"Please proceed with caution, this cannot be undone."})]}),e[1]=f):f=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(K,{asChild:!0,children:s.jsx(S,{variant:"destructive",children:"Delete user"})}),e[2]=l):l=e[2];let y,c;e[3]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Y,{children:"Are you sure you want to delete your user?"}),c=s.jsx(Z,{children:"This deletes your login, sessions, and personal settings. It does not delete shared accounts or their telemetry. Transfer or delete every account you solely own first."}),e[3]=y,e[4]=c):(y=e[3],c=e[4]);let d;e[5]!==r?(d=r.length>0&&s.jsxs("div",{className:"border-destructive/30 bg-destructive/5 rounded-md border p-3 text-sm",children:["Transfer or delete these accounts first:"," ",r.map(oe).join(", "),"."]}),e[5]=r,e[6]=d):d=e[6];let i;e[7]!==a||e[8]!==o?(i=a&&!o&&s.jsx(q,{label:"Confirm with Google",reauthenticateFor:"user",separated:!1}),e[7]=a,e[8]=o,e[9]=i):i=e[9];let m,u,_;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=B(),_={preserveScroll:!0},m=()=>w.current?.focus(),e[10]=m,e[11]=u,e[12]=_):(m=e[10],u=e[11],_=e[12]);let p;e[13]!==r.length||e[14]!==n||e[15]!==a||e[16]!==o?(p=s.jsx($,{method:"delete",action:u,options:_,onError:m,resetOnSuccess:!0,className:"space-y-6",children:v=>{const{resetAndClearErrors:b,processing:k,errors:x}=v;return s.jsxs(s.Fragment,{children:[a?s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"user-deletion-confirmation",children:"Enter your email to confirm"}),s.jsx(D,{id:"user-deletion-confirmation",name:"confirmation",placeholder:n,autoComplete:"off"}),s.jsx(g,{messages:x.password_challenge})]}):s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"password_challenge",className:"sr-only",children:"Password"}),s.jsx(D,{id:"password_challenge",type:"password",name:"password_challenge",ref:w,placeholder:"Password",autoComplete:"current-password"}),s.jsx(g,{messages:x.password_challenge})]}),s.jsx(g,{messages:x.account_ownership}),s.jsxs(X,{children:[s.jsx(Q,{asChild:!0,children:s.jsx(S,{variant:"secondary",onClick:()=>b(),children:"Cancel"})}),s.jsx(S,{variant:"destructive",disabled:k||r.length>0||!!a&&!o,asChild:!0,children:s.jsx("button",{type:"submit",children:"Delete user"})})]})]})}}),e[13]=r.length,e[14]=n,e[15]=a,e[16]=o,e[17]=p):p=e[17];let h;return e[18]!==p||e[19]!==d||e[20]!==i?(h=s.jsxs("div",{className:"space-y-6",children:[j,s.jsxs("div",{className:"space-y-4 rounded-lg border border-red-100 bg-red-50 p-4 dark:border-red-200/10 dark:bg-red-700/10",children:[f,s.jsxs(ee,{children:[l,s.jsxs(se,{children:[y,c,d,i,p]})]})]})]}),e[18]=p,e[19]=d,e[20]=i,e[21]=h):h=e[21],h}function oe(t){return t.name}const ne="rwp_your_token_here";function ie(t,e){const r=`Bearer ${e??ne}`;return[{id:"claude-code",label:"Claude Code",hint:"Run this in the project you want the assistant to work in.",code:`claude mcp add railwatch --transport http ${t} --header "Authorization: ${r}"`},{id:"claude-desktop",label:"Claude Desktop",hint:"claude_desktop_config.json — Claude Desktop speaks stdio, so mcp-remote bridges it to HTTP.",code:JSON.stringify({mcpServers:{railwatch:{command:"npx",args:["-y","mcp-remote",t,"--header",`Authorization: ${r}`]}}},null,2)},{id:"cursor",label:"Cursor",hint:".cursor/mcp.json in the project, or ~/.cursor/mcp.json for every project.",code:JSON.stringify({mcpServers:{railwatch:{url:t,headers:{Authorization:r}}}},null,2)},{id:"vscode",label:"VS Code",hint:".vscode/mcp.json in the workspace.",code:JSON.stringify({servers:{railwatch:{type:"http",url:t,headers:{Authorization:r}}}},null,2)},{id:"zed",label:"Zed",hint:"settings.json — also via the mcp-remote bridge.",code:JSON.stringify({context_servers:{railwatch:{source:"custom",command:"npx",args:["-y","mcp-remote",t,"--header",`Authorization: ${r}`]}}},null,2)},{id:"curl",label:"Test it with curl",hint:"Lists every tool the server exposes. If this returns JSON, the token works.",code:[`curl -sS ${t} \\`,` -H "Authorization: ${r}" \\`,' -H "Content-Type: application/json" \\',` -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'`].join(`
2
2
  `)}]}function le(t){const e=L.c(5),{url:r,token:a}=t;let o;e[0]!==a||e[1]!==r?(o=ie(r,a).map(ce),e[0]=a,e[1]=r,e[2]=o):o=e[2];let n;return e[3]!==o?(n=s.jsx("div",{className:"space-y-4",children:o}),e[3]=o,e[4]=n):n=e[4],n}function ce(t){return s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-sm font-medium",children:t.label}),s.jsx("p",{className:"text-muted-foreground text-xs",children:t.hint}),s.jsx(R,{code:t.code,className:"mt-1.5"})]},t.id)}const T=[{title:"Profile settings",href:H()}],de=[{value:"github",label:"GitHub"},{value:"gitlab",label:"GitLab"},{value:"vscode",label:"VS Code"},{value:"cursor",label:"Cursor"},{value:"zed",label:"Zed"},{value:"rubymine",label:"RubyMine"},{value:"textmate",label:"TextMate"}],me=["vscode","cursor","zed","rubymine","textmate"];function Fe(t){const e=L.c(43),{auth:r}=V().props,[a,o]=z.useState(r.user.editor);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(J,{title:T[T.length-1].title}),e[0]=n):n=e[0];let w;e[1]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(E,{title:"Profile information",description:"Update your name and where source links open"}),e[1]=w):w=e[1];let j,f;e[2]===Symbol.for("react.memo_cache_sentinel")?(j=H(),f={preserveScroll:!0},e[2]=j,e[3]=f):(j=e[2],f=e[3]);let l;e[4]!==r.user.editor_root||e[5]!==r.user.name||e[6]!==a||e[7]!==t.weekly_digest?(l=s.jsxs("div",{className:"space-y-6",children:[w,s.jsx($,{method:"patch",action:j,options:f,className:"space-y-6",children:F=>{const{errors:P,processing:C,recentlySuccessful:G}=F;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"name",children:"Name"}),s.jsx(D,{id:"name",name:"name",className:"mt-1 block w-full",defaultValue:r.user.name,required:!0,autoComplete:"name",placeholder:"Full name"}),s.jsx(g,{className:"mt-2",messages:P.name})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"editor",children:"Editor"}),s.jsx("select",{id:"editor",name:"editor",value:a,onChange:O=>o(O.target.value),className:"border-input bg-background h-9 rounded-md border px-3 text-sm",children:de.map(xe)}),s.jsx(g,{className:"mt-2",messages:P.editor}),s.jsx("span",{className:"text-muted-foreground text-xs",children:"Where a file:line in a stack trace opens — the application's repository, or this machine's editor."})]}),me.includes(a)&&s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"editor_root",children:"Local checkout path"}),s.jsx(D,{id:"editor_root",name:"editor_root",className:"mt-1 block w-full",defaultValue:r.user.editor_root??"",placeholder:"/Users/you/code/widgets"}),s.jsx(g,{className:"mt-2",messages:P.editor_root})]}),s.jsxs("label",{className:"flex items-start gap-3 text-sm",children:[s.jsx("input",{type:"hidden",name:"weekly_digest",value:"0"}),s.jsx("input",{type:"checkbox",name:"weekly_digest",value:"1",defaultChecked:t.weekly_digest,className:"mt-0.5"}),s.jsxs("span",{children:[s.jsx("span",{className:"font-medium",children:"Weekly digest"}),s.jsx("span",{className:"text-muted-foreground block text-xs",children:"A Monday email with requests, p95, failures, new and resolved issues, and deploys for each account you belong to."})]})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(S,{disabled:C,children:"Save"}),s.jsx(re,{show:G,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:s.jsx("p",{className:"text-sm text-neutral-600",children:"Saved"})})]})]})}})]}),e[4]=r.user.editor_root,e[5]=r.user.name,e[6]=a,e[7]=t.weekly_digest,e[8]=l):l=e[8];let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(E,{title:"API & MCP tokens",description:"Create independently revocable tokens with only the surfaces, actions, and applications each client needs."}),e[9]=y):y=e[9];let c;e[10]!==t.mcp_token?(c=t.mcp_token&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-sm",children:"Your new API & MCP token (shown once, copy it now):"}),s.jsx(R,{code:t.mcp_token})]}),e[10]=t.mcp_token,e[11]=c):c=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=M(),e[12]=d):d=e[12];let i;e[13]!==t.token_scopes||e[14]!==t.token_targets?(i=s.jsx($,{method:"post",action:d,className:"grid gap-4 rounded-md border p-4",children:F=>{const{processing:P,errors:C}=F;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"token-name",children:"Token name"}),s.jsx(D,{id:"token-name",name:"name",defaultValue:"API & MCP token",maxLength:100,required:!0}),s.jsx(g,{messages:C.name})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"token-restriction",children:"Data access"}),s.jsx("select",{id:"token-restriction",name:"restriction",className:"border-input bg-background h-9 rounded-md border px-3 text-sm",children:t.token_targets.map(pe)}),s.jsx(g,{messages:C.restriction})]}),s.jsxs("fieldset",{className:"grid gap-2",children:[s.jsx("legend",{className:"text-sm font-medium",children:"Scopes"}),s.jsx("input",{type:"hidden",name:"scopes_present",value:"1"}),s.jsx("div",{className:"grid grid-cols-2 gap-2",children:t.token_scopes.map(he)}),s.jsx(g,{messages:C.scopes})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"token-expiry",children:"Expiry"}),s.jsxs("select",{id:"token-expiry",name:"expires_in_days",className:"border-input bg-background h-9 rounded-md border px-3 text-sm",defaultValue:"0",children:[s.jsx("option",{value:"0",children:"Never"}),s.jsx("option",{value:"7",children:"7 days"}),s.jsx("option",{value:"30",children:"30 days"}),s.jsx("option",{value:"90",children:"90 days"}),s.jsx("option",{value:"365",children:"1 year"})]}),s.jsx(g,{messages:C.expires_in_days})]}),s.jsx(S,{className:"w-fit",disabled:P,children:"Generate token"})]})}}),e[13]=t.token_scopes,e[14]=t.token_targets,e[15]=i):i=e[15];let m;e[16]!==t.api_tokens?(m=t.api_tokens.length===0?s.jsx("p",{className:"text-muted-foreground text-sm",children:"No API tokens yet."}):t.api_tokens.map(ue),e[16]=t.api_tokens,e[17]=m):m=e[17];let u;e[18]!==m?(u=s.jsx("div",{className:"space-y-3",children:m}),e[18]=m,e[19]=u):u=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("p",{className:"text-sm font-medium",children:"Connect an assistant"}),e[20]=_):_=e[20];const p=t.mcp_token?"These blocks already contain the token above. Paste one into your client and restart it.":"Generate a token to get these blocks filled in — until then they carry a placeholder. The same output comes from bin/rails railwatch:mcp in your app.";let h;e[21]!==p?(h=s.jsxs("div",{children:[_,s.jsx("p",{className:"text-muted-foreground text-xs",children:p})]}),e[21]=p,e[22]=h):h=e[22];let v;e[23]!==t.mcp_token||e[24]!==t.mcp_url?(v=s.jsx(le,{url:t.mcp_url,token:t.mcp_token}),e[23]=t.mcp_token,e[24]=t.mcp_url,e[25]=v):v=e[25];let b;e[26]!==h||e[27]!==v?(b=s.jsxs("div",{className:"space-y-3 border-t pt-6",children:[h,v]}),e[26]=h,e[27]=v,e[28]=b):b=e[28];let k;e[29]!==u||e[30]!==b||e[31]!==c||e[32]!==i?(k=s.jsxs("div",{className:"space-y-6",children:[y,c,i,u,b]}),e[29]=u,e[30]=b,e[31]=c,e[32]=i,e[33]=k):k=e[33];let x;e[34]!==r.session.recently_authenticated||e[35]!==r.user.email||e[36]!==r.user.provider||e[37]!==t.deletion.blocking_accounts?(x=s.jsx(ae,{blockingAccounts:t.deletion.blocking_accounts,provider:r.user.provider,recentlyAuthenticated:r.session.recently_authenticated,email:r.user.email}),e[34]=r.session.recently_authenticated,e[35]=r.user.email,e[36]=r.user.provider,e[37]=t.deletion.blocking_accounts,e[38]=x):x=e[38];let A;return e[39]!==k||e[40]!==x||e[41]!==l?(A=s.jsxs(te,{breadcrumbs:T,children:[n,s.jsxs(U,{children:[l,k,x]})]}),e[39]=k,e[40]=x,e[41]=l,e[42]=A):A=e[42],A}function ue(t){return s.jsxs("div",{className:"flex items-start justify-between gap-4 rounded-md border p-3",children:[s.jsxs("div",{className:"min-w-0 space-y-1",children:[s.jsx("p",{className:"font-medium",children:t.name}),s.jsxs("p",{className:"text-muted-foreground text-xs",children:[t.scopes.join(", ")," · ",t.restriction]}),s.jsxs("p",{className:"text-muted-foreground text-xs",children:[t.revoked_at?`Revoked ${new Date(t.revoked_at).toLocaleString()}`:t.expires_at?`Expires ${new Date(t.expires_at).toLocaleString()}`:"Never expires",t.last_used_at?` · Last used ${new Date(t.last_used_at).toLocaleString()}`:" · Never used"]})]}),!t.revoked_at&&s.jsxs("div",{className:"flex shrink-0 gap-2",children:[s.jsx(S,{type:"button",variant:"outline",size:"sm",onClick:()=>I.post(M(),{name:t.name,scopes_present:"1",scopes:t.scopes,replace_token_id:t.id}),children:"Regenerate"}),s.jsx(S,{type:"button",variant:"outline",size:"sm",onClick:()=>I.delete(W(),{data:{token_id:t.id}}),children:"Revoke"})]})]},t.id)}function he(t){return s.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[s.jsx("input",{type:"checkbox",name:"scopes[]",value:t,defaultChecked:!0}),t]},t)}function pe(t){return s.jsx("option",{value:t.value,children:t.label},t.value)}function xe(t){return s.jsx("option",{value:t.value,children:t.label},t.value)}export{Fe as default};
@@ -1,2 +1,2 @@
1
- import{B as Xt,c as is,r as Q,S as ys,i as mt,j as s,L as Mt,I as Zt,U as vs,e as Qt,V as bs,H as Ns,F as ks,J as ws}from"./inertia-TViv6kNv.js";import{D as nt}from"./data-table-iv1bdF6u.js";import{S as Ss,E as Cs,B as $s,a as Ls,C as Is}from"./frames-Cyu7KMxZ.js";import{J as rs}from"./json-viewer-Ar4cjPDW.js";import{R as ls}from"./relative-time-IOOgl5n2.js";import{S as dt,a as Ts}from"./stat-s4RpOS9w.js";import{I as as}from"./status-badge-8jVV-LA4.js";import{f as As,g as Ms,h as Rs,i as zs,A as Ds,j as Fs,k as Bs,l as Es,m as Ps,n as Os}from"./app-layout-yh-sPWgK.js";import{B as ut}from"./badge-Daw4Hvr8.js";import{B as O}from"./app-wordmark-nbjkzxwQ.js";import{C as c,b as d,c as m,a as o}from"./card-BX_3HXcJ.js";import{C as cs,X as os,Y as ds,a as ms,b as us,B as fs,c as hs,d as xs,R as Ks}from"./chart-B14-N9g7.js";import{S as es,a as ts,b as ss,c as ns,d as Yt}from"./select-_AJsUa7X.js";import{T as Vs}from"./textarea-Dye72uP7.js";import{u as Gs}from"./use-clipboard-ColgLyQ2.js";import{e as Wt}from"./execution-path-CzgBUi5e.js";import{c as Rt,a as At,w as rt,b as Us}from"./format-B9SDkrWj.js";import{C as Hs}from"./index-1ol1-QWI.js";import"./chart-hover-Vy52H4uD.js";import"./empty-state-6j_0AaQQ.js";import"./source-link-B2183i2-.js";import"./live-dot-ChfUtY3p.js";import"./index-OqI59zPb.js";import"./arrow-up-DVtOGdVA.js";import"./checkbox-D3aRSsBj.js";import"./label-COUKWqE_.js";const qs=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Js=Xt("git-merge",qs);const Qs=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Ws=Xt("globe",Qs);const Xs=[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M8 3H3v5",key:"15dfkv"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3",key:"1qrqzj"}],["path",{d:"m15 9 6-6",key:"ko1vev"}]],Ys=Xt("split",Xs),Zs={count:{label:"Occurrences",color:"var(--chart-5)"}},en={value:{label:"Measured value",color:"var(--chart-2)"}},tn={report:"Fingerprint passed to Railwatch.report.",error:"Fingerprint from the error's own #railwatch_fingerprint.",resolver:"Fingerprint from the app's Railwatch.fingerprint block.",default:"Railwatch's default: exception class, top in-app frame, and the message with its variable data removed."};function sn(t,e){return e?e.kind==="query"?e.group_hash?ws(t.application.id,t.environment.id,e.group_hash):null:Wt({applicationId:t.application.id,environmentId:t.environment.id,source:e.kind,executionId:e.execution_id}):null}function nn(t,e){const n=t.data;switch(t.kind){case"created":return"opened this issue";case"status":return`changed status ${n.from} → ${n.to}`;case"priority":return`changed priority ${n.from} → ${n.to}`;case"assignee":{const i=n.from_id?e.get(Number(n.from_id))??"someone":"unassigned",l=n.to_id?e.get(Number(n.to_id))??"someone":"unassigned";return`reassigned ${i} → ${l}`}case"merge":return`merged this issue into ${n.target_key}`;case"absorbed":return`merged ${n.source_key} into this issue (${n.occurrences} events)`;case"unmerge":return"unmerged this issue";case"split":{const i=Array.isArray(t.data.into)?t.data.into:[];return n.from_key?`split ${n.occurrences} events out of ${n.from_key}`:`split ${n.occurrences} events by message into ${i.join(", ")}`}case"regressed":return"regressed — a new occurrence reopened this issue";case"alert":return`sent a "${n.event}" alert via ${n.integration}`;case"agent":return`acted via ${String(n.agent??"an AI agent")} (MCP)`;case"comment":return"commented";default:return String(t.kind)}}function rn(t){const e=t.issue,n=[];if(n.push(`# ${e.key}: ${e.title}`),e.culprit&&n.push(`Culprit: ${e.culprit}`),n.push(`Environment: ${e.application.name} / ${e.environment.name}`),t.detection?.available&&(n.push(""),n.push("## Detector measurement"),n.push(`${t.detection.metric} for ${t.detection.target}: ${it(t.detection.measurement?.value,t.detection.unit)}`),t.detection.measurement?.limit!=null&&n.push(`Limit: ${it(t.detection.measurement.limit,t.detection.unit)}`),t.detection.baseline?.mean!=null&&n.push(`Baseline: ${it(t.detection.baseline.mean,t.detection.unit)} (${t.detection.baseline.sigmas}σ)`),n.push(`Underlying telemetry: ${t.detection.telemetry_type} ${t.detection.telemetry_group_hash}`)),t.latest){n.push(""),n.push(`## ${t.latest.class_name}`),n.push(t.latest.message);const i=t.latest.frames.filter(l=>l.in_app);if(i.length>0){n.push(""),n.push("### Frames");for(const l of i)if(n.push(`${l.file}:${l.line} in \`${l.function}\``),l.code)for(const[B,T]of Object.entries(l.code))n.push(`${B}: ${T}`)}t.latest.context&&(n.push(""),n.push("### Context"),n.push(String(t.latest.context)))}return n.join(`
2
- `)}function it(t,e){return t==null?"–":e==="milliseconds"?`${t.toLocaleString()} ms`:e==="percent"?`${t.toLocaleString()}%`:e==="events_per_minute"?`${t.toLocaleString()} / min`:t.toLocaleString()}function ln(t){const e=is.c(80),{issue:n,detail:i}=t;if(!i.available){let y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(d,{children:s.jsx(m,{children:"Detector sample"})}),e[0]=y):y=e[0];let u;return e[1]!==n.sample?(u=s.jsxs(c,{children:[y,s.jsx(o,{children:s.jsx(rs,{data:n.sample})})]}),e[1]=n.sample,e[2]=u):u=e[2],u}let l;e[3]!==i.representative_records?(l=i.representative_records??[],e[3]=i.representative_records,e[4]=l):l=e[4];const B=l;let T;e[5]!==i.deploy_comparison?(T=i.deploy_comparison??[],e[5]=i.deploy_comparison,e[6]=T):T=e[6];const q=T;let v;e[7]!==i.trend?(v=i.trend??[],e[7]=i.trend,e[8]=v):v=e[8];const K=v,a=i.metric==="missed",W=a?"Missed scheduled task":i.kind==="anomaly"?"Anomaly measurement":"Threshold breach";let b;e[9]!==W?(b=s.jsx(d,{children:s.jsx(m,{children:W})}),e[9]=W,e[10]=b):b=e[10];let E;e[11]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("p",{className:"text-muted-foreground text-xs",children:"Target"}),e[11]=E):E=e[11];let A;e[12]!==i.target?(A=s.jsxs("div",{children:[E,s.jsx("p",{className:"font-mono text-sm",children:i.target})]}),e[12]=i.target,e[13]=A):A=e[13];const lt=a?"Schedule":"Metric";let P;e[14]!==lt?(P=s.jsx("p",{className:"text-muted-foreground text-xs",children:lt}),e[14]=lt,e[15]=P):P=e[15];const at=a?i.rule?.schedule:i.metric;let M;e[16]!==at?(M=s.jsx("p",{className:"text-sm",children:at}),e[16]=at,e[17]=M):M=e[17];let V;e[18]!==M||e[19]!==P?(V=s.jsxs("div",{children:[P,M]}),e[18]=M,e[19]=P,e[20]=V):V=e[20];const ct=a?"Expected":"Measured";let N;e[21]!==ct?(N=s.jsx("p",{className:"text-muted-foreground text-xs",children:ct}),e[21]=ct,e[22]=N):N=e[22];let R;e[23]!==i.measurement?.value||e[24]!==i.rule||e[25]!==i.unit||e[26]!==a?(R=a&&i.rule?.expected?rt(i.rule.expected):it(i.measurement?.value,i.unit),e[23]=i.measurement?.value,e[24]=i.rule,e[25]=i.unit,e[26]=a,e[27]=R):R=e[27];let k;e[28]!==R?(k=s.jsx("p",{className:"text-sm font-semibold",children:R}),e[28]=R,e[29]=k):k=e[29];let w;e[30]!==N||e[31]!==k?(w=s.jsxs("div",{children:[N,k]}),e[30]=N,e[31]=k,e[32]=w):w=e[32];const G=a?"Last run":i.kind==="anomaly"?"Baseline":"Limit";let S;e[33]!==G?(S=s.jsx("p",{className:"text-muted-foreground text-xs",children:G}),e[33]=G,e[34]=S):S=e[34];let z;e[35]!==i.baseline?.mean||e[36]!==i.kind||e[37]!==i.measurement?.limit||e[38]!==i.rule||e[39]!==i.unit||e[40]!==a?(z=a&&i.rule?.last_run?rt(i.rule.last_run):i.kind==="anomaly"?it(i.baseline?.mean,i.unit):it(i.measurement?.limit,i.unit),e[35]=i.baseline?.mean,e[36]=i.kind,e[37]=i.measurement?.limit,e[38]=i.rule,e[39]=i.unit,e[40]=a,e[41]=z):z=e[41];let C;e[42]!==z?(C=s.jsx("p",{className:"text-sm",children:z}),e[42]=z,e[43]=C):C=e[43];let U;e[44]!==S||e[45]!==C?(U=s.jsxs("div",{children:[S,C]}),e[44]=S,e[45]=C,e[46]=U):U=e[46];let f;e[47]!==V||e[48]!==w||e[49]!==U||e[50]!==A?(f=s.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[A,V,w,U]}),e[47]=V,e[48]=w,e[49]=U,e[50]=A,e[51]=f):f=e[51];const D=i.window?.minutes,J=i.baseline?.sigmas!=null&&` · ${i.baseline.sigmas}σ above a ${i.baseline.days}-day baseline`;let h;e[52]!==i.telemetry_group_hash||e[53]!==i.telemetry_type||e[54]!==D||e[55]!==J?(h=s.jsxs("p",{className:"text-muted-foreground text-xs",children:[i.telemetry_type," group ",i.telemetry_group_hash," ·"," ",D," minute window",J]}),e[52]=i.telemetry_group_hash,e[53]=i.telemetry_type,e[54]=D,e[55]=J,e[56]=h):h=e[56];let H;e[57]!==f||e[58]!==h?(H=s.jsxs(o,{className:"space-y-4",children:[f,h]}),e[57]=f,e[58]=h,e[59]=H):H=e[59];let x;e[60]!==H||e[61]!==b?(x=s.jsxs(c,{children:[b,H]}),e[60]=H,e[61]=b,e[62]=x):x=e[62];let p;e[63]!==i.metric||e[64]!==K?(p=K.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsxs(m,{children:[i.metric," trend (30d)"]})}),s.jsx(o,{children:s.jsx(hs,{config:en,className:"h-48 w-full",children:s.jsxs(xs,{data:K,children:[s.jsx(cs,{vertical:!1}),s.jsx(os,{dataKey:"day",tickLine:!1,axisLine:!1,minTickGap:24,tickFormatter:gn}),s.jsx(ds,{width:45,tickLine:!1,axisLine:!1}),s.jsx(ms,{content:s.jsx(us,{})}),s.jsx(fs,{dataKey:"value",fill:"var(--color-value)",radius:2})]})})})]}),e[63]=i.metric,e[64]=K,e[65]=p):p=e[65];let $;e[66]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(d,{children:s.jsx(m,{children:"Representative telemetry"})}),e[66]=$):$=e[66];let g;e[67]!==n?(g=y=>{const u=sn(n,y.drilldown);u&&Qt.visit(u)},e[67]=n,e[68]=g):g=e[68];let L;e[69]===Symbol.for("react.memo_cache_sentinel")?(L=[{key:"when",header:"When",cell:xn},{key:"record",header:"Record",className:"max-w-0",cell:hn},{key:"duration",header:"Duration",align:"right",cell:fn},{key:"deploy",header:"Deploy",cell:un}],e[69]=L):L=e[69];let j;e[70]!==B||e[71]!==g?(j=s.jsxs(c,{children:[$,s.jsx(o,{children:s.jsx(nt,{rows:B,rowKey:pn,empty:"Representative raw telemetry has been pruned.",onRowClick:g,columns:L})})]}),e[70]=B,e[71]=g,e[72]=j):j=e[72];let _;e[73]!==q?(_=q.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Deploy comparison (30d)"})}),s.jsx(o,{children:s.jsx(nt,{rows:q,rowKey:mn,columns:[{key:"deploy",header:"Deploy",cell:dn},{key:"events",header:"Events",align:"right",cell:on},{key:"avg",header:"Avg",align:"right",cell:cn},{key:"max",header:"Max",align:"right",cell:an}]})})]}),e[73]=q,e[74]=_):_=e[74];let I;return e[75]!==x||e[76]!==p||e[77]!==j||e[78]!==_?(I=s.jsxs(s.Fragment,{children:[x,p,j,_]}),e[75]=x,e[76]=p,e[77]=j,e[78]=_,e[79]=I):I=e[79],I}function an(t){return`${t.max_ms} ms`}function cn(t){return`${t.avg_ms} ms`}function on(t){return Rt(t.events)}function dn(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy.slice(0,12)})}function mn(t){return t.deploy}function un(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy?.slice(0,10)})}function fn(t){return`${t.duration_ms.toLocaleString()} ms`}function hn(t){return s.jsx("span",{className:"block truncate font-mono text-xs",children:t.name})}function xn(t){return s.jsx("span",{className:"text-xs",children:rt(t.occurred_at)})}function pn(t){return`${t.record_type}-${t.record_id}`}function gn(t){return new Date(t).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function yi(t){const e=is.c(255),n=t.issue;let i;e[0]!==n.id?(i=(r,F)=>{const ot=F===void 0?{}:F;return Qt.patch(mt(n.id),{action_name:r,...ot},{preserveScroll:!0})},e[0]=n.id,e[1]=i):i=e[1];const l=i,[,B]=Gs(),[T,q]=Q.useState(!1),[v,K]=Q.useState(!1),[a,W]=Q.useState("");let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=[],e[2]=b):b=e[2];const[E,A]=Q.useState(b),[lt,P]=Q.useState(!1),[at,M]=Q.useState(!1),V=new Map(t.members.map(qn)),ct=Fs();let N;e[3]!==n.application.id||e[4]!==n.environment.id?(N=r=>Wt({applicationId:n.application.id,environmentId:n.environment.id,source:r.execution_source,executionId:r.execution_id}),e[3]=n.application.id,e[4]=n.environment.id,e[5]=N):N=e[5];const R=N;let k;e[6]!==n.application.id||e[7]!==n.environment.id||e[8]!==t.latest?(k=t.latest?Wt({applicationId:n.application.id,environmentId:n.environment.id,source:t.latest.execution_source,executionId:t.latest.execution_id}):null,e[6]=n.application.id,e[7]=n.environment.id,e[8]=t.latest,e[9]=k):k=e[9];const w=k;let G,S;e[10]!==n.id||e[11]!==v||e[12]!==a?(G=()=>{if(!v)return;const r=new AbortController,F=window.setTimeout(()=>{P(!0),M(!1),fetch(bs(n.id,{q:a}),{headers:{Accept:"application/json"},credentials:"same-origin",signal:r.signal}).then(Hn).then(ot=>{const{issues:Tt}=ot;return A(Tt)}).catch(()=>{r.signal.aborted||(A([]),M(!0))}).finally(()=>{r.signal.aborted||P(!1)})},150);return()=>{window.clearTimeout(F),r.abort()}},S=[n.id,v,a],e[10]=n.id,e[11]=v,e[12]=a,e[13]=G,e[14]=S):(G=e[13],S=e[14]),Q.useEffect(G,S);const z=Ds;let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C={title:"Issues",href:ys()},e[15]=C):C=e[15];const U=n.key;let f;e[16]!==n.id?(f=mt(n.id),e[16]=n.id,e[17]=f):f=e[17];let D;e[18]!==n.key||e[19]!==f?(D=[C,{title:U,href:f}],e[18]=n.key,e[19]=f,e[20]=D):D=e[20];const J=`${n.key} ${n.title}`;let h;e[21]!==J?(h=s.jsx(Ns,{title:J}),e[21]=J,e[22]=h):h=e[22];const H="flex flex-1 flex-col gap-4 p-3 md:gap-5 md:px-6 md:pt-2 md:pb-6";let x;e[23]!==n.key?(x=s.jsx("span",{className:"font-mono text-sm font-semibold",children:n.key}),e[23]=n.key,e[24]=x):x=e[24];let p;e[25]!==n.status?(p=s.jsx(as,{status:n.status}),e[25]=n.status,e[26]=p):p=e[26];let $;e[27]!==n.kind?($=s.jsx(ut,{variant:"outline",children:n.kind}),e[27]=n.kind,e[28]=$):$=e[28];let g;e[29]!==n.source?(g=n.source==="browser"&&s.jsxs(ut,{variant:"outline",className:"gap-1",children:[s.jsx(Ws,{className:"size-3"}),"browser"]}),e[29]=n.source,e[30]=g):g=e[30];let L;e[31]!==n.application.name||e[32]!==n.environment.name?(L=s.jsxs("span",{className:"text-muted-foreground text-xs",children:[n.application.name," · ",n.environment.name]}),e[31]=n.application.name,e[32]=n.environment.name,e[33]=L):L=e[33];let j;e[34]!==x||e[35]!==p||e[36]!==$||e[37]!==g||e[38]!==L?(j=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[x,p,$,g,L]}),e[34]=x,e[35]=p,e[36]=$,e[37]=g,e[38]=L,e[39]=j):j=e[39];let _;e[40]!==n.title?(_=s.jsx("h1",{className:"mt-1 text-lg font-semibold break-words",children:n.title}),e[40]=n.title,e[41]=_):_=e[41];let I;e[42]!==n.culprit||e[43]!==n.sample?(I=n.culprit&&s.jsx("div",{className:"text-muted-foreground",children:s.jsx(Ss,{location:n.culprit,deploy:n.sample.deploy})}),e[42]=n.culprit,e[43]=n.sample,e[44]=I):I=e[44];let y;e[45]!==j||e[46]!==_||e[47]!==I?(y=s.jsxs("div",{className:"min-w-0",children:[j,_,I]}),e[45]=j,e[46]=_,e[47]=I,e[48]=y):y=e[48];let u;e[49]!==l?(u=r=>l("priority",{priority:r}),e[49]=l,e[50]=u):u=e[50];let ft;e[51]===Symbol.for("react.memo_cache_sentinel")?(ft=s.jsx(ts,{className:"w-28",children:s.jsx(ss,{})}),e[51]=ft):ft=e[51];let ht;e[52]===Symbol.for("react.memo_cache_sentinel")?(ht=s.jsx(ns,{children:["low","normal","high","urgent"].map(Un)}),e[52]=ht):ht=e[52];let X;e[53]!==n.priority||e[54]!==u?(X=s.jsxs(es,{value:n.priority,onValueChange:u,children:[ft,ht]}),e[53]=n.priority,e[54]=u,e[55]=X):X=e[55];const zt=n.assignee?String(n.assignee.id):"none";let Y;e[56]!==l?(Y=r=>l("assign",{assignee_id:r==="none"?null:r}),e[56]=l,e[57]=Y):Y=e[57];let xt;e[58]===Symbol.for("react.memo_cache_sentinel")?(xt=s.jsx(ts,{className:"w-40",children:s.jsx(ss,{placeholder:"Assign"})}),e[58]=xt):xt=e[58];let pt;e[59]===Symbol.for("react.memo_cache_sentinel")?(pt=s.jsx(Yt,{value:"none",children:"Unassigned"}),e[59]=pt):pt=e[59];let Z;e[60]!==t.members?(Z=t.members.map(Gn),e[60]=t.members,e[61]=Z):Z=e[61];let ee;e[62]!==Z?(ee=s.jsxs(ns,{children:[pt,Z]}),e[62]=Z,e[63]=ee):ee=e[63];let te;e[64]!==zt||e[65]!==Y||e[66]!==ee?(te=s.jsxs(es,{value:zt,onValueChange:Y,children:[xt,ee]}),e[64]=zt,e[65]=Y,e[66]=ee,e[67]=te):te=e[67];let se;e[68]!==l||e[69]!==n.status?(se=n.status==="merged"?s.jsx(O,{size:"sm",variant:"outline",onClick:()=>l("unmerge"),children:"Unmerge"}):n.status==="open"?s.jsxs(s.Fragment,{children:[s.jsx(O,{size:"sm",onClick:()=>l("resolve"),children:"Resolve"}),s.jsx(O,{size:"sm",variant:"outline",onClick:()=>l("ignore"),children:"Ignore"})]}):s.jsx(O,{size:"sm",variant:"outline",onClick:()=>l("reopen"),children:"Reopen"}),e[68]=l,e[69]=n.status,e[70]=se):se=e[70];let ne;e[71]!==n.status?(ne=n.status!=="merged"&&s.jsxs(O,{size:"sm",variant:"outline",onClick:()=>K(!0),children:[s.jsx(Js,{"data-icon":"inline-start"}),"Merge into…"]}),e[71]=n.status,e[72]=ne):ne=e[72];let ie;e[73]!==B||e[74]!==t?(ie=()=>{(async()=>await B(rn(t))&&(q(!0),setTimeout(()=>q(!1),1200)))()},e[73]=B,e[74]=t,e[75]=ie):ie=e[75];let re;e[76]!==T?(re=T?s.jsx(Hs,{className:"size-3.5"}):s.jsx(Is,{className:"size-3.5"}),e[76]=T,e[77]=re):re=e[77];let le;e[78]!==ie||e[79]!==re?(le=s.jsxs(O,{size:"sm",variant:"outline",onClick:ie,children:[re,"Copy for AI"]}),e[78]=ie,e[79]=re,e[80]=le):le=e[80];let ae;e[81]!==X||e[82]!==te||e[83]!==se||e[84]!==ne||e[85]!==le?(ae=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[X,te,se,ne,le]}),e[81]=X,e[82]=te,e[83]=se,e[84]=ne,e[85]=le,e[86]=ae):ae=e[86];let ce;e[87]!==y||e[88]!==ae?(ce=s.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[y,ae]}),e[87]=y,e[88]=ae,e[89]=ce):ce=e[89];let oe;e[90]!==l||e[91]!==t.merged_into?(oe=t.merged_into&&s.jsxs("div",{className:"bg-muted flex flex-wrap items-center justify-between gap-2 rounded-md border px-4 py-3 text-sm",children:[s.jsxs("span",{children:["Merged into"," ",s.jsx(Mt,{href:mt(t.merged_into.id),className:"font-mono font-semibold underline",children:t.merged_into.key})," ",s.jsx("span",{className:"text-muted-foreground",children:t.merged_into.title})]}),s.jsx(O,{size:"sm",variant:"outline",onClick:()=>l("unmerge"),children:"Unmerge"})]}),e[90]=l,e[91]=t.merged_into,e[92]=oe):oe=e[92];let gt;e[93]===Symbol.for("react.memo_cache_sentinel")?(gt=r=>{K(r),r||(W(""),A([]),M(!1))},e[93]=gt):gt=e[93];let de;e[94]!==a?(de=s.jsx(Bs,{placeholder:"Search issues by key or title…",value:a,onValueChange:W}),e[94]=a,e[95]=de):de=e[95];const Dt=lt?"Searching…":at?"Search failed. Try again.":"No open issues found.";let me;e[96]!==Dt?(me=s.jsx(Es,{children:Dt}),e[96]=Dt,e[97]=me):me=e[97];let ue;e[98]!==l||e[99]!==E?(ue=E.length>0&&s.jsx(As,{children:E.map(r=>s.jsxs(Ms,{value:`${r.key} ${r.title}`,onSelect:()=>{l("merge",{target_id:r.id}),K(!1)},children:[s.jsx("span",{className:"font-mono font-semibold",children:r.key}),s.jsx("span",{className:"text-muted-foreground truncate",children:r.title})]},r.id))}),e[98]=l,e[99]=E,e[100]=ue):ue=e[100];let fe;e[101]!==me||e[102]!==ue?(fe=s.jsxs(Ps,{children:[me,ue]}),e[101]=me,e[102]=ue,e[103]=fe):fe=e[103];let he;e[104]!==v||e[105]!==de||e[106]!==fe?(he=s.jsxs(Os,{open:v,onOpenChange:gt,title:"Merge into…",description:"Search issues to merge this one into",children:[de,fe]}),e[104]=v,e[105]=de,e[106]=fe,e[107]=he):he=e[107];const Ft=t.detection?.count_label??"Events",Bt=t.detection?.breached_windows??n.occurrences;let xe;e[108]!==Bt?(xe=Rt(Bt),e[108]=Bt,e[109]=xe):xe=e[109];let pe;e[110]!==Ft||e[111]!==xe?(pe=s.jsx(dt,{label:Ft,value:xe}),e[110]=Ft,e[111]=xe,e[112]=pe):pe=e[112];const Et=t.detection?"Events in measured window":"Users affected";let ge;e[113]!==n.affected_users||e[114]!==t.detection?(ge=t.detection?t.detection.event_count==null?"–":Rt(t.detection.event_count):n.affected_users,e[113]=n.affected_users,e[114]=t.detection,e[115]=ge):ge=e[115];let je;e[116]!==Et||e[117]!==ge?(je=s.jsx(dt,{label:Et,value:ge}),e[116]=Et,e[117]=ge,e[118]=je):je=e[118];let _e;e[119]!==n.first_seen_at?(_e=At(n.first_seen_at),e[119]=n.first_seen_at,e[120]=_e):_e=e[120];let ye;e[121]!==n.first_seen_at?(ye=rt(n.first_seen_at),e[121]=n.first_seen_at,e[122]=ye):ye=e[122];let ve;e[123]!==_e||e[124]!==ye?(ve=s.jsx(dt,{label:"First seen",value:_e,hint:ye}),e[123]=_e,e[124]=ye,e[125]=ve):ve=e[125];let be;e[126]!==n.last_seen_at?(be=At(n.last_seen_at),e[126]=n.last_seen_at,e[127]=be):be=e[127];let Ne;e[128]!==n.last_seen_at?(Ne=rt(n.last_seen_at),e[128]=n.last_seen_at,e[129]=Ne):Ne=e[129];let ke;e[130]!==be||e[131]!==Ne?(ke=s.jsx(dt,{label:"Last seen",value:be,hint:Ne}),e[130]=be,e[131]=Ne,e[132]=ke):ke=e[132];const Pt=n.regressed_at?"Regressed":"Resolved";let we;e[133]!==n.regressed_at||e[134]!==n.resolved_at?(we=n.regressed_at?At(n.regressed_at):n.resolved_at?At(n.resolved_at):"–",e[133]=n.regressed_at,e[134]=n.resolved_at,e[135]=we):we=e[135];let Se;e[136]!==n.resolved_in_deploy?(Se=n.resolved_in_deploy?`in ${n.resolved_in_deploy.slice(0,12)}`:void 0,e[136]=n.resolved_in_deploy,e[137]=Se):Se=e[137];const Ot=n.regressed_at?"destructive":void 0;let Ce;e[138]!==Pt||e[139]!==we||e[140]!==Se||e[141]!==Ot?(Ce=s.jsx(dt,{label:Pt,value:we,hint:Se,tone:Ot}),e[138]=Pt,e[139]=we,e[140]=Se,e[141]=Ot,e[142]=Ce):Ce=e[142];let $e;e[143]!==pe||e[144]!==je||e[145]!==ve||e[146]!==ke||e[147]!==Ce?($e=s.jsxs(Ts,{children:[pe,je,ve,ke,Ce]}),e[143]=pe,e[144]=je,e[145]=ve,e[146]=ke,e[147]=Ce,e[148]=$e):$e=e[148];const ps="grid gap-6 lg:grid-cols-3";let Le;e[149]!==n||e[150]!==w||e[151]!==t.breadcrumbs||e[152]!==t.browser_breadcrumbs||e[153]!==t.detection||e[154]!==t.latest?(Le=t.detection?s.jsx(ln,{issue:n,detail:t.detection}):t.latest?s.jsxs(c,{children:[s.jsxs(d,{className:"flex-row items-center justify-between",children:[s.jsx(m,{children:"Latest occurrence"}),w&&s.jsxs(Mt,{className:"text-xs underline",href:w,children:["Open ",t.latest.execution_preview]})]}),s.jsxs(o,{children:[s.jsx(Cs,{exception:t.latest,deploy:t.latest.deploy}),s.jsxs("div",{className:"mt-4 space-y-4",children:[s.jsx($s,{entries:t.breadcrumbs}),s.jsx(Ls,{crumbs:t.browser_breadcrumbs})]}),(t.latest.ruby_version??t.latest.rails_version)&&s.jsxs("p",{className:"text-muted-foreground mt-3 text-xs",children:["Ruby ",t.latest.ruby_version," · Rails"," ",t.latest.rails_version]})]})]}):s.jsx(c,{children:s.jsx(o,{children:s.jsx(rs,{data:n.sample})})}),e[149]=n,e[150]=w,e[151]=t.breadcrumbs,e[152]=t.browser_breadcrumbs,e[153]=t.detection,e[154]=t.latest,e[155]=Le):Le=e[155];const Kt=t.detection?"hidden":void 0;let jt;e[156]===Symbol.for("react.memo_cache_sentinel")?(jt=s.jsx(d,{children:s.jsx(m,{children:"Occurrences (30d)"})}),e[156]=jt):jt=e[156];let Ie;e[157]!==R?(Ie=r=>{const F=R(r);F&&Qt.visit(F)},e[157]=R,e[158]=Ie):Ie=e[158];let _t;e[159]===Symbol.for("react.memo_cache_sentinel")?(_t=[{key:"when",header:"When",cell:Kn},{key:"in",header:"In",cell:On},{key:"u",header:"User",cell:Pn},{key:"t",header:"Tenant",cell:En},{key:"d",header:"Deploy",cell:Bn},{key:"h",header:"",cell:Fn}],e[159]=_t):_t=e[159];let Te;e[160]!==t.occurrences||e[161]!==Ie?(Te=s.jsx(o,{children:s.jsx(nt,{rows:t.occurrences,rowKey:Vn,empty:"Raw occurrences have been pruned.",onRowClick:Ie,columns:_t})}),e[160]=t.occurrences,e[161]=Ie,e[162]=Te):Te=e[162];let Ae;e[163]!==Kt||e[164]!==Te?(Ae=s.jsxs(c,{className:Kt,children:[jt,Te]}),e[163]=Kt,e[164]=Te,e[165]=Ae):Ae=e[165];let Me;e[166]!==n.application.id||e[167]!==n.environment.id||e[168]!==t.attachments?(Me=t.attachments.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Attachments"})}),s.jsx(o,{children:s.jsx(nt,{rows:t.attachments,rowKey:Dn,columns:[{key:"name",header:"Name",className:"max-w-0",cell:zn},{key:"in",header:"In",cell:Rn},{key:"size",header:"Size",align:"right",cell:Mn},{key:"links",header:"",align:"right",cell:r=>s.jsxs("span",{className:"flex justify-end gap-3",children:[r.viewable&&s.jsx("a",{className:"text-primary hover:underline",href:Zt(n.application.id,n.environment.id,r.id,{view:1}),children:"View"}),s.jsx("a",{className:"text-primary hover:underline",href:Zt(n.application.id,n.environment.id,r.id),children:"Download"})]})}]})})]}),e[166]=n.application.id,e[167]=n.environment.id,e[168]=t.attachments,e[169]=Me):Me=e[169];let Re;e[170]!==Le||e[171]!==Ae||e[172]!==Me?(Re=s.jsxs("div",{className:"space-y-6 lg:col-span-2",children:[Le,Ae,Me]}),e[170]=Le,e[171]=Ae,e[172]=Me,e[173]=Re):Re=e[173];const gs="space-y-6",Vt=t.detection?"hidden":void 0;let yt;e[174]===Symbol.for("react.memo_cache_sentinel")?(yt=s.jsx(d,{children:s.jsx(m,{children:"Daily (30d)"})}),e[174]=yt):yt=e[174];const js=t.daily;let vt,bt,Nt;e[175]===Symbol.for("react.memo_cache_sentinel")?(vt=s.jsx(cs,{vertical:!1}),bt=s.jsx(os,{dataKey:"day",tickLine:!1,axisLine:!1,minTickGap:24,tickFormatter:An}),Nt=s.jsx(ds,{width:28,tickLine:!1,axisLine:!1,allowDecimals:!1}),e[175]=vt,e[176]=bt,e[177]=Nt):(vt=e[175],bt=e[176],Nt=e[177]);let kt,wt;e[178]===Symbol.for("react.memo_cache_sentinel")?(kt=s.jsx(ms,{content:s.jsx(us,{labelFormatter:Tn})}),wt=s.jsx(fs,{dataKey:"count",fill:"var(--color-count)",radius:2}),e[178]=kt,e[179]=wt):(kt=e[178],wt=e[179]);let ze;e[180]!==t.deploys?(ze=t.deploys.map(In),e[180]=t.deploys,e[181]=ze):ze=e[181];let De;e[182]!==t.daily||e[183]!==ze?(De=s.jsx(o,{children:s.jsx(hs,{config:Zs,className:"h-40 w-full",children:s.jsxs(xs,{data:js,children:[vt,bt,Nt,kt,wt,ze]})})}),e[182]=t.daily,e[183]=ze,e[184]=De):De=e[184];let Fe;e[185]!==Vt||e[186]!==De?(Fe=s.jsxs(c,{className:Vt,children:[yt,De]}),e[185]=Vt,e[186]=De,e[187]=Fe):Fe=e[187];const Gt=t.detection?"hidden":void 0;let St;e[188]===Symbol.for("react.memo_cache_sentinel")?(St=s.jsx(d,{children:s.jsx(m,{children:"Grouping"})}),e[188]=St):St=e[188];let Be;e[189]!==t.fingerprint?(Be=t.fingerprint.length>0&&s.jsx("div",{className:"flex flex-wrap gap-1",children:t.fingerprint.map(Ln)}),e[189]=t.fingerprint,e[190]=Be):Be=e[190];const Ut=tn[t.fingerprint_source??"default"]??`Fingerprint from ${t.fingerprint_source}.`;let Ee;e[191]!==Ut?(Ee=s.jsx("p",{className:"text-muted-foreground text-xs",children:Ut}),e[191]=Ut,e[192]=Ee):Ee=e[192];let Pe;e[193]!==l||e[194]!==t.distinct_messages||e[195]!==t.top_messages?(Pe=t.distinct_messages>1&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"space-y-1",children:t.top_messages.map($n)}),s.jsxs(O,{size:"sm",variant:"outline",onClick:()=>l("split",{by:"message"}),children:[s.jsx(Ys,{className:"size-3.5"}),"Split into ",t.distinct_messages," issues"]})]}),e[193]=l,e[194]=t.distinct_messages,e[195]=t.top_messages,e[196]=Pe):Pe=e[196];let Oe;e[197]!==Be||e[198]!==Ee||e[199]!==Pe?(Oe=s.jsxs(o,{className:"space-y-3",children:[Be,Ee,Pe]}),e[197]=Be,e[198]=Ee,e[199]=Pe,e[200]=Oe):Oe=e[200];let Ke;e[201]!==Gt||e[202]!==Oe?(Ke=s.jsxs(c,{className:Gt,children:[St,Oe]}),e[201]=Gt,e[202]=Oe,e[203]=Ke):Ke=e[203];let Ve;e[204]!==t.related_issues?(Ve=t.related_issues.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Related issues"})}),s.jsx(o,{className:"space-y-2",children:t.related_issues.map(Cn)})]}),e[204]=t.related_issues,e[205]=Ve):Ve=e[205];let Ge;e[206]!==t.merged_issues?(Ge=t.merged_issues.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Merged issues"})}),s.jsx(o,{className:"space-y-2",children:t.merged_issues.map(Sn)})]}),e[206]=t.merged_issues,e[207]=Ge):Ge=e[207];let Ue;e[208]!==t.alerts?(Ue=t.alerts.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Alerts"})}),s.jsx(o,{className:"space-y-2",children:t.alerts.map(wn)})]}),e[208]=t.alerts,e[209]=Ue):Ue=e[209];let Ct;e[210]===Symbol.for("react.memo_cache_sentinel")?(Ct=s.jsx(d,{children:s.jsx(m,{children:"By deploy"})}),e[210]=Ct):Ct=e[210];let He;e[211]!==t.by_deploy?(He=Object.entries(t.by_deploy),e[211]=t.by_deploy,e[212]=He):He=e[212];let $t;e[213]===Symbol.for("react.memo_cache_sentinel")?($t=[{key:"d",header:"Deploy",cell:Nn},{key:"n",header:"Count",align:"right",cell:bn}],e[213]=$t):$t=e[213];let qe;e[214]!==He?(qe=s.jsxs(c,{children:[Ct,s.jsx(o,{children:s.jsx(nt,{rows:He,rowKey:kn,columns:$t})})]}),e[214]=He,e[215]=qe):qe=e[215];let Je;e[216]!==t.by_tenant?(Je=Object.keys(t.by_tenant).length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"By tenant"})}),s.jsx(o,{children:s.jsx(nt,{rows:Object.entries(t.by_tenant),rowKey:vn,columns:[{key:"t",header:"Tenant",cell:yn},{key:"n",header:"Count",align:"right",cell:_n}]})})]}),e[216]=t.by_tenant,e[217]=Je):Je=e[217];const Ht=c;let Qe;e[218]===Symbol.for("react.memo_cache_sentinel")?(Qe=s.jsx(d,{children:s.jsx(m,{children:"Activity"})}),e[218]=Qe):Qe=e[218];const qt=o,_s="space-y-3",Jt=t.activities.map(r=>{const F=r.data.source==="linear",ot=typeof r.data.author_name=="string"?r.data.author_name:"Linear",Tt=r.user?.name??(F?ot:"System");return s.jsxs("div",{className:"flex gap-2 text-sm",children:[s.jsx(Rs,{className:"size-6",children:s.jsx(zs,{className:"text-[10px]",children:r.user||F?ct(Tt):"sys"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"text-xs",children:[s.jsx("span",{className:"font-medium",children:Tt})," ",s.jsx("span",{className:"text-muted-foreground",children:nn(r,V)})," ",s.jsx(ls,{iso:r.created_at,className:"text-muted-foreground"})]}),r.kind==="comment"&&s.jsx("div",{className:"mt-0.5 whitespace-pre-wrap",children:String(r.data.body)})]})]},r.id)});let We;e[219]!==n.id?(We=vs(n.id),e[219]=n.id,e[220]=We):We=e[220];let Lt;e[221]===Symbol.for("react.memo_cache_sentinel")?(Lt={preserveScroll:!0},e[221]=Lt):Lt=e[221];let Xe;e[222]!==We?(Xe=s.jsx(ks,{method:"post",action:We,options:Lt,resetOnSuccess:!0,className:"space-y-2",children:jn}),e[222]=We,e[223]=Xe):Xe=e[223];let Ye;e[224]!==qt||e[225]!==Jt||e[226]!==Xe?(Ye=s.jsxs(qt,{className:_s,children:[Jt,Xe]}),e[224]=qt,e[225]=Jt,e[226]=Xe,e[227]=Ye):Ye=e[227];let Ze;e[228]!==Ht||e[229]!==Qe||e[230]!==Ye?(Ze=s.jsxs(Ht,{children:[Qe,Ye]}),e[228]=Ht,e[229]=Qe,e[230]=Ye,e[231]=Ze):Ze=e[231];let et;e[232]!==qe||e[233]!==Je||e[234]!==Ze||e[235]!==Fe||e[236]!==Ke||e[237]!==Ve||e[238]!==Ge||e[239]!==Ue?(et=s.jsxs("div",{className:gs,children:[Fe,Ke,Ve,Ge,Ue,qe,Je,Ze]}),e[232]=qe,e[233]=Je,e[234]=Ze,e[235]=Fe,e[236]=Ke,e[237]=Ve,e[238]=Ge,e[239]=Ue,e[240]=et):et=e[240];let tt;e[241]!==et||e[242]!==Re?(tt=s.jsxs("div",{className:ps,children:[Re,et]}),e[241]=et,e[242]=Re,e[243]=tt):tt=e[243];let st;e[244]!==tt||e[245]!==ce||e[246]!==oe||e[247]!==he||e[248]!==$e?(st=s.jsxs("div",{className:H,children:[ce,oe,he,$e,tt]}),e[244]=tt,e[245]=ce,e[246]=oe,e[247]=he,e[248]=$e,e[249]=st):st=e[249];let It;return e[250]!==z||e[251]!==h||e[252]!==st||e[253]!==D?(It=s.jsxs(z,{breadcrumbs:D,children:[h,st]}),e[250]=z,e[251]=h,e[252]=st,e[253]=D,e[254]=It):It=e[254],It}function jn(t){const{processing:e}=t;return s.jsxs(s.Fragment,{children:[s.jsx(Vs,{name:"body",placeholder:"Add a comment…",required:!0,rows:3}),s.jsx(O,{size:"sm",disabled:e,children:"Comment"})]})}function _n(t){const[,e]=t;return e}function yn(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e})}function vn(t){const[e]=t;return e}function bn(t){const[,e]=t;return e}function Nn(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e??"unknown"})}function kn(t){const[e]=t;return e??"none"}function wn(t){return s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",title:t.error??void 0,children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ut,{variant:t.status==="failed"?"destructive":"outline",className:"capitalize",children:t.status}),s.jsxs("span",{children:[t.event," via ",t.integration.name]}),s.jsx(ls,{iso:t.sent_at,className:"text-muted-foreground"})]}),t.error&&s.jsx("span",{className:"text-destructive",children:t.error})]},t.id)}function Sn(t){return s.jsxs(Mt,{href:mt(t.id),className:"hover:bg-muted/60 -mx-2 flex flex-col rounded px-2 py-1 text-xs",children:[s.jsx("span",{className:"font-mono font-semibold",children:t.key}),s.jsx("span",{className:"text-muted-foreground line-clamp-1",children:t.title})]},t.id)}function Cn(t){return s.jsxs(Mt,{href:mt(t.id),className:"hover:bg-muted/60 -mx-2 flex flex-col rounded px-2 py-1 text-xs",children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-mono font-semibold",children:t.key}),s.jsx(as,{status:t.status})]}),s.jsx("span",{className:"text-muted-foreground line-clamp-1",children:t.title}),s.jsx("span",{className:"text-muted-foreground",children:t.environment.name})]},t.id)}function $n(t){return s.jsxs("div",{className:"flex items-start justify-between gap-2 text-xs",children:[s.jsx("span",{className:"line-clamp-1 font-mono",children:t.message}),s.jsx("span",{className:"text-muted-foreground",children:Rt(t.count)})]},t.message)}function Ln(t,e){return s.jsx("span",{className:"bg-muted rounded px-1.5 py-0.5 font-mono text-[11px] break-all",children:t},`${e}-${t}`)}function In(t){return s.jsx(Ks,{x:t.at.slice(0,10),stroke:"var(--muted-foreground)",strokeDasharray:"3 3",label:{value:t.ref,position:"insideTopRight",fontSize:10}},t.deploy)}function Tn(t){return String(t)}function An(t){return new Date(t).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Mn(t){return Us(t.bytes)}function Rn(t){return s.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:t.execution_preview??"–"})}function zn(t){return s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"truncate font-mono text-xs",children:t.name}),t.truncated&&s.jsx(ut,{variant:"secondary",children:"truncated"})]})}function Dn(t){return t.id}function Fn(t){return t.handled?s.jsx(ut,{variant:"secondary",children:"handled"}):null}function Bn(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy?.slice(0,10)})}function En(t){return s.jsx("span",{className:"font-mono text-xs",children:t.tenant??""})}function Pn(t){return s.jsx("span",{className:"font-mono text-xs",children:t.user_ref??""})}function On(t){return s.jsxs("span",{className:"font-mono text-xs",children:[t.execution_source," ",t.execution_preview]})}function Kn(t){return s.jsx("span",{className:"text-xs",children:rt(t.occurred_at)})}function Vn(t){return t.id}function Gn(t){return s.jsx(Yt,{value:String(t.id),children:t.name},t.id)}function Un(t){return s.jsx(Yt,{value:t,children:t},t)}function Hn(t){if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.json()}function qn(t){return[t.id,t.name]}export{yi as default};
1
+ import{B as Xt,c as is,r as Q,S as ys,i as mt,j as s,L as Mt,I as Zt,U as vs,e as Qt,V as bs,H as Ns,F as ks,J as ws}from"./inertia-CgBdJDaE.js";import{D as nt}from"./data-table-Bc3ZRnpb.js";import{S as Ss,E as Cs,B as $s,a as Ls,C as Is}from"./frames-CTiGwm4E.js";import{J as rs}from"./json-viewer-CH7nEIUs.js";import{R as ls}from"./relative-time-BHbJh8HW.js";import{S as dt,a as Ts}from"./stat-Cd8QaTGw.js";import{I as as}from"./status-badge-Ys4b0fcG.js";import{f as As,g as Ms,h as Rs,i as zs,A as Ds,j as Fs,k as Bs,l as Es,m as Ps,n as Os}from"./app-layout-CdJ5Qjms.js";import{B as ut}from"./badge-DKvItdlb.js";import{B as O}from"./app-wordmark-B-0yZiDb.js";import{C as c,b as d,c as m,a as o}from"./card-C9j_ffR9.js";import{C as cs,X as os,Y as ds,a as ms,b as us,B as fs,c as hs,d as xs,R as Ks}from"./chart-Cmh6JEww.js";import{S as es,a as ts,b as ss,c as ns,d as Yt}from"./select-CqKpvI98.js";import{T as Vs}from"./textarea-Bq2jjOMC.js";import{u as Gs}from"./use-clipboard-3hTXU91g.js";import{e as Wt}from"./execution-path-BX5NcXUZ.js";import{c as Rt,a as At,w as rt,b as Us}from"./format-B9SDkrWj.js";import{C as Hs}from"./index-B2_QluAw.js";import"./chart-hover-B0SjyWFy.js";import"./empty-state-CkPROZB0.js";import"./source-link-B2183i2-.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./use-live-LwJStJvD.js";import"./arrow-up-DY1fS0tD.js";import"./checkbox-BsBkRg5n.js";import"./label-BWgQzHCO.js";const qs=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Js=Xt("git-merge",qs);const Qs=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Ws=Xt("globe",Qs);const Xs=[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M8 3H3v5",key:"15dfkv"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3",key:"1qrqzj"}],["path",{d:"m15 9 6-6",key:"ko1vev"}]],Ys=Xt("split",Xs),Zs={count:{label:"Occurrences",color:"var(--chart-5)"}},en={value:{label:"Measured value",color:"var(--chart-2)"}},tn={report:"Fingerprint passed to Railwatch.report.",error:"Fingerprint from the error's own #railwatch_fingerprint.",resolver:"Fingerprint from the app's Railwatch.fingerprint block.",default:"Railwatch's default: exception class, top in-app frame, and the message with its variable data removed."};function sn(t,e){return e?e.kind==="query"?e.group_hash?ws(t.application.id,t.environment.id,e.group_hash):null:Wt({applicationId:t.application.id,environmentId:t.environment.id,source:e.kind,executionId:e.execution_id}):null}function nn(t,e){const n=t.data;switch(t.kind){case"created":return"opened this issue";case"status":return`changed status ${n.from} → ${n.to}`;case"priority":return`changed priority ${n.from} → ${n.to}`;case"assignee":{const i=n.from_id?e.get(Number(n.from_id))??"someone":"unassigned",l=n.to_id?e.get(Number(n.to_id))??"someone":"unassigned";return`reassigned ${i} → ${l}`}case"merge":return`merged this issue into ${n.target_key}`;case"absorbed":return`merged ${n.source_key} into this issue (${n.occurrences} events)`;case"unmerge":return"unmerged this issue";case"split":{const i=Array.isArray(t.data.into)?t.data.into:[];return n.from_key?`split ${n.occurrences} events out of ${n.from_key}`:`split ${n.occurrences} events by message into ${i.join(", ")}`}case"regressed":return"regressed — a new occurrence reopened this issue";case"alert":return`sent a "${n.event}" alert via ${n.integration}`;case"agent":return`acted via ${String(n.agent??"an AI agent")} (MCP)`;case"comment":return"commented";default:return String(t.kind)}}function rn(t){const e=t.issue,n=[];if(n.push(`# ${e.key}: ${e.title}`),e.culprit&&n.push(`Culprit: ${e.culprit}`),n.push(`Environment: ${e.application.name} / ${e.environment.name}`),t.detection?.available&&(n.push(""),n.push("## Detector measurement"),n.push(`${t.detection.metric} for ${t.detection.target}: ${it(t.detection.measurement?.value,t.detection.unit)}`),t.detection.measurement?.limit!=null&&n.push(`Limit: ${it(t.detection.measurement.limit,t.detection.unit)}`),t.detection.baseline?.mean!=null&&n.push(`Baseline: ${it(t.detection.baseline.mean,t.detection.unit)} (${t.detection.baseline.sigmas}σ)`),n.push(`Underlying telemetry: ${t.detection.telemetry_type} ${t.detection.telemetry_group_hash}`)),t.latest){n.push(""),n.push(`## ${t.latest.class_name}`),n.push(t.latest.message);const i=t.latest.frames.filter(l=>l.in_app);if(i.length>0){n.push(""),n.push("### Frames");for(const l of i)if(n.push(`${l.file}:${l.line} in \`${l.function}\``),l.code)for(const[B,T]of Object.entries(l.code))n.push(`${B}: ${T}`)}t.latest.context&&(n.push(""),n.push("### Context"),n.push(String(t.latest.context)))}return n.join(`
2
+ `)}function it(t,e){return t==null?"–":e==="milliseconds"?`${t.toLocaleString()} ms`:e==="percent"?`${t.toLocaleString()}%`:e==="events_per_minute"?`${t.toLocaleString()} / min`:t.toLocaleString()}function ln(t){const e=is.c(80),{issue:n,detail:i}=t;if(!i.available){let y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(d,{children:s.jsx(m,{children:"Detector sample"})}),e[0]=y):y=e[0];let u;return e[1]!==n.sample?(u=s.jsxs(c,{children:[y,s.jsx(o,{children:s.jsx(rs,{data:n.sample})})]}),e[1]=n.sample,e[2]=u):u=e[2],u}let l;e[3]!==i.representative_records?(l=i.representative_records??[],e[3]=i.representative_records,e[4]=l):l=e[4];const B=l;let T;e[5]!==i.deploy_comparison?(T=i.deploy_comparison??[],e[5]=i.deploy_comparison,e[6]=T):T=e[6];const q=T;let v;e[7]!==i.trend?(v=i.trend??[],e[7]=i.trend,e[8]=v):v=e[8];const K=v,a=i.metric==="missed",W=a?"Missed scheduled task":i.kind==="anomaly"?"Anomaly measurement":"Threshold breach";let b;e[9]!==W?(b=s.jsx(d,{children:s.jsx(m,{children:W})}),e[9]=W,e[10]=b):b=e[10];let E;e[11]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("p",{className:"text-muted-foreground text-xs",children:"Target"}),e[11]=E):E=e[11];let A;e[12]!==i.target?(A=s.jsxs("div",{children:[E,s.jsx("p",{className:"font-mono text-sm",children:i.target})]}),e[12]=i.target,e[13]=A):A=e[13];const lt=a?"Schedule":"Metric";let P;e[14]!==lt?(P=s.jsx("p",{className:"text-muted-foreground text-xs",children:lt}),e[14]=lt,e[15]=P):P=e[15];const at=a?i.rule?.schedule:i.metric;let M;e[16]!==at?(M=s.jsx("p",{className:"text-sm",children:at}),e[16]=at,e[17]=M):M=e[17];let V;e[18]!==M||e[19]!==P?(V=s.jsxs("div",{children:[P,M]}),e[18]=M,e[19]=P,e[20]=V):V=e[20];const ct=a?"Expected":"Measured";let N;e[21]!==ct?(N=s.jsx("p",{className:"text-muted-foreground text-xs",children:ct}),e[21]=ct,e[22]=N):N=e[22];let R;e[23]!==i.measurement?.value||e[24]!==i.rule||e[25]!==i.unit||e[26]!==a?(R=a&&i.rule?.expected?rt(i.rule.expected):it(i.measurement?.value,i.unit),e[23]=i.measurement?.value,e[24]=i.rule,e[25]=i.unit,e[26]=a,e[27]=R):R=e[27];let k;e[28]!==R?(k=s.jsx("p",{className:"text-sm font-semibold",children:R}),e[28]=R,e[29]=k):k=e[29];let w;e[30]!==N||e[31]!==k?(w=s.jsxs("div",{children:[N,k]}),e[30]=N,e[31]=k,e[32]=w):w=e[32];const G=a?"Last run":i.kind==="anomaly"?"Baseline":"Limit";let S;e[33]!==G?(S=s.jsx("p",{className:"text-muted-foreground text-xs",children:G}),e[33]=G,e[34]=S):S=e[34];let z;e[35]!==i.baseline?.mean||e[36]!==i.kind||e[37]!==i.measurement?.limit||e[38]!==i.rule||e[39]!==i.unit||e[40]!==a?(z=a&&i.rule?.last_run?rt(i.rule.last_run):i.kind==="anomaly"?it(i.baseline?.mean,i.unit):it(i.measurement?.limit,i.unit),e[35]=i.baseline?.mean,e[36]=i.kind,e[37]=i.measurement?.limit,e[38]=i.rule,e[39]=i.unit,e[40]=a,e[41]=z):z=e[41];let C;e[42]!==z?(C=s.jsx("p",{className:"text-sm",children:z}),e[42]=z,e[43]=C):C=e[43];let U;e[44]!==S||e[45]!==C?(U=s.jsxs("div",{children:[S,C]}),e[44]=S,e[45]=C,e[46]=U):U=e[46];let f;e[47]!==V||e[48]!==w||e[49]!==U||e[50]!==A?(f=s.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[A,V,w,U]}),e[47]=V,e[48]=w,e[49]=U,e[50]=A,e[51]=f):f=e[51];const D=i.window?.minutes,J=i.baseline?.sigmas!=null&&` · ${i.baseline.sigmas}σ above a ${i.baseline.days}-day baseline`;let h;e[52]!==i.telemetry_group_hash||e[53]!==i.telemetry_type||e[54]!==D||e[55]!==J?(h=s.jsxs("p",{className:"text-muted-foreground text-xs",children:[i.telemetry_type," group ",i.telemetry_group_hash," ·"," ",D," minute window",J]}),e[52]=i.telemetry_group_hash,e[53]=i.telemetry_type,e[54]=D,e[55]=J,e[56]=h):h=e[56];let H;e[57]!==f||e[58]!==h?(H=s.jsxs(o,{className:"space-y-4",children:[f,h]}),e[57]=f,e[58]=h,e[59]=H):H=e[59];let x;e[60]!==H||e[61]!==b?(x=s.jsxs(c,{children:[b,H]}),e[60]=H,e[61]=b,e[62]=x):x=e[62];let p;e[63]!==i.metric||e[64]!==K?(p=K.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsxs(m,{children:[i.metric," trend (30d)"]})}),s.jsx(o,{children:s.jsx(hs,{config:en,className:"h-48 w-full",children:s.jsxs(xs,{data:K,children:[s.jsx(cs,{vertical:!1}),s.jsx(os,{dataKey:"day",tickLine:!1,axisLine:!1,minTickGap:24,tickFormatter:gn}),s.jsx(ds,{width:45,tickLine:!1,axisLine:!1}),s.jsx(ms,{content:s.jsx(us,{})}),s.jsx(fs,{dataKey:"value",fill:"var(--color-value)",radius:2})]})})})]}),e[63]=i.metric,e[64]=K,e[65]=p):p=e[65];let $;e[66]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(d,{children:s.jsx(m,{children:"Representative telemetry"})}),e[66]=$):$=e[66];let g;e[67]!==n?(g=y=>{const u=sn(n,y.drilldown);u&&Qt.visit(u)},e[67]=n,e[68]=g):g=e[68];let L;e[69]===Symbol.for("react.memo_cache_sentinel")?(L=[{key:"when",header:"When",cell:xn},{key:"record",header:"Record",className:"max-w-0",cell:hn},{key:"duration",header:"Duration",align:"right",cell:fn},{key:"deploy",header:"Deploy",cell:un}],e[69]=L):L=e[69];let j;e[70]!==B||e[71]!==g?(j=s.jsxs(c,{children:[$,s.jsx(o,{children:s.jsx(nt,{rows:B,rowKey:pn,empty:"Representative raw telemetry has been pruned.",onRowClick:g,columns:L})})]}),e[70]=B,e[71]=g,e[72]=j):j=e[72];let _;e[73]!==q?(_=q.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Deploy comparison (30d)"})}),s.jsx(o,{children:s.jsx(nt,{rows:q,rowKey:mn,columns:[{key:"deploy",header:"Deploy",cell:dn},{key:"events",header:"Events",align:"right",cell:on},{key:"avg",header:"Avg",align:"right",cell:cn},{key:"max",header:"Max",align:"right",cell:an}]})})]}),e[73]=q,e[74]=_):_=e[74];let I;return e[75]!==x||e[76]!==p||e[77]!==j||e[78]!==_?(I=s.jsxs(s.Fragment,{children:[x,p,j,_]}),e[75]=x,e[76]=p,e[77]=j,e[78]=_,e[79]=I):I=e[79],I}function an(t){return`${t.max_ms} ms`}function cn(t){return`${t.avg_ms} ms`}function on(t){return Rt(t.events)}function dn(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy.slice(0,12)})}function mn(t){return t.deploy}function un(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy?.slice(0,10)})}function fn(t){return`${t.duration_ms.toLocaleString()} ms`}function hn(t){return s.jsx("span",{className:"block truncate font-mono text-xs",children:t.name})}function xn(t){return s.jsx("span",{className:"text-xs",children:rt(t.occurred_at)})}function pn(t){return`${t.record_type}-${t.record_id}`}function gn(t){return new Date(t).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function vi(t){const e=is.c(255),n=t.issue;let i;e[0]!==n.id?(i=(r,F)=>{const ot=F===void 0?{}:F;return Qt.patch(mt(n.id),{action_name:r,...ot},{preserveScroll:!0})},e[0]=n.id,e[1]=i):i=e[1];const l=i,[,B]=Gs(),[T,q]=Q.useState(!1),[v,K]=Q.useState(!1),[a,W]=Q.useState("");let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=[],e[2]=b):b=e[2];const[E,A]=Q.useState(b),[lt,P]=Q.useState(!1),[at,M]=Q.useState(!1),V=new Map(t.members.map(qn)),ct=Fs();let N;e[3]!==n.application.id||e[4]!==n.environment.id?(N=r=>Wt({applicationId:n.application.id,environmentId:n.environment.id,source:r.execution_source,executionId:r.execution_id}),e[3]=n.application.id,e[4]=n.environment.id,e[5]=N):N=e[5];const R=N;let k;e[6]!==n.application.id||e[7]!==n.environment.id||e[8]!==t.latest?(k=t.latest?Wt({applicationId:n.application.id,environmentId:n.environment.id,source:t.latest.execution_source,executionId:t.latest.execution_id}):null,e[6]=n.application.id,e[7]=n.environment.id,e[8]=t.latest,e[9]=k):k=e[9];const w=k;let G,S;e[10]!==n.id||e[11]!==v||e[12]!==a?(G=()=>{if(!v)return;const r=new AbortController,F=window.setTimeout(()=>{P(!0),M(!1),fetch(bs(n.id,{q:a}),{headers:{Accept:"application/json"},credentials:"same-origin",signal:r.signal}).then(Hn).then(ot=>{const{issues:Tt}=ot;return A(Tt)}).catch(()=>{r.signal.aborted||(A([]),M(!0))}).finally(()=>{r.signal.aborted||P(!1)})},150);return()=>{window.clearTimeout(F),r.abort()}},S=[n.id,v,a],e[10]=n.id,e[11]=v,e[12]=a,e[13]=G,e[14]=S):(G=e[13],S=e[14]),Q.useEffect(G,S);const z=Ds;let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C={title:"Issues",href:ys()},e[15]=C):C=e[15];const U=n.key;let f;e[16]!==n.id?(f=mt(n.id),e[16]=n.id,e[17]=f):f=e[17];let D;e[18]!==n.key||e[19]!==f?(D=[C,{title:U,href:f}],e[18]=n.key,e[19]=f,e[20]=D):D=e[20];const J=`${n.key} ${n.title}`;let h;e[21]!==J?(h=s.jsx(Ns,{title:J}),e[21]=J,e[22]=h):h=e[22];const H="flex flex-1 flex-col gap-4 p-3 md:gap-5 md:px-6 md:pt-2 md:pb-6";let x;e[23]!==n.key?(x=s.jsx("span",{className:"font-mono text-sm font-semibold",children:n.key}),e[23]=n.key,e[24]=x):x=e[24];let p;e[25]!==n.status?(p=s.jsx(as,{status:n.status}),e[25]=n.status,e[26]=p):p=e[26];let $;e[27]!==n.kind?($=s.jsx(ut,{variant:"outline",children:n.kind}),e[27]=n.kind,e[28]=$):$=e[28];let g;e[29]!==n.source?(g=n.source==="browser"&&s.jsxs(ut,{variant:"outline",className:"gap-1",children:[s.jsx(Ws,{className:"size-3"}),"browser"]}),e[29]=n.source,e[30]=g):g=e[30];let L;e[31]!==n.application.name||e[32]!==n.environment.name?(L=s.jsxs("span",{className:"text-muted-foreground text-xs",children:[n.application.name," · ",n.environment.name]}),e[31]=n.application.name,e[32]=n.environment.name,e[33]=L):L=e[33];let j;e[34]!==x||e[35]!==p||e[36]!==$||e[37]!==g||e[38]!==L?(j=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[x,p,$,g,L]}),e[34]=x,e[35]=p,e[36]=$,e[37]=g,e[38]=L,e[39]=j):j=e[39];let _;e[40]!==n.title?(_=s.jsx("h1",{className:"mt-1 text-lg font-semibold break-words",children:n.title}),e[40]=n.title,e[41]=_):_=e[41];let I;e[42]!==n.culprit||e[43]!==n.sample?(I=n.culprit&&s.jsx("div",{className:"text-muted-foreground",children:s.jsx(Ss,{location:n.culprit,deploy:n.sample.deploy})}),e[42]=n.culprit,e[43]=n.sample,e[44]=I):I=e[44];let y;e[45]!==j||e[46]!==_||e[47]!==I?(y=s.jsxs("div",{className:"min-w-0",children:[j,_,I]}),e[45]=j,e[46]=_,e[47]=I,e[48]=y):y=e[48];let u;e[49]!==l?(u=r=>l("priority",{priority:r}),e[49]=l,e[50]=u):u=e[50];let ft;e[51]===Symbol.for("react.memo_cache_sentinel")?(ft=s.jsx(ts,{className:"w-28",children:s.jsx(ss,{})}),e[51]=ft):ft=e[51];let ht;e[52]===Symbol.for("react.memo_cache_sentinel")?(ht=s.jsx(ns,{children:["low","normal","high","urgent"].map(Un)}),e[52]=ht):ht=e[52];let X;e[53]!==n.priority||e[54]!==u?(X=s.jsxs(es,{value:n.priority,onValueChange:u,children:[ft,ht]}),e[53]=n.priority,e[54]=u,e[55]=X):X=e[55];const zt=n.assignee?String(n.assignee.id):"none";let Y;e[56]!==l?(Y=r=>l("assign",{assignee_id:r==="none"?null:r}),e[56]=l,e[57]=Y):Y=e[57];let xt;e[58]===Symbol.for("react.memo_cache_sentinel")?(xt=s.jsx(ts,{className:"w-40",children:s.jsx(ss,{placeholder:"Assign"})}),e[58]=xt):xt=e[58];let pt;e[59]===Symbol.for("react.memo_cache_sentinel")?(pt=s.jsx(Yt,{value:"none",children:"Unassigned"}),e[59]=pt):pt=e[59];let Z;e[60]!==t.members?(Z=t.members.map(Gn),e[60]=t.members,e[61]=Z):Z=e[61];let ee;e[62]!==Z?(ee=s.jsxs(ns,{children:[pt,Z]}),e[62]=Z,e[63]=ee):ee=e[63];let te;e[64]!==zt||e[65]!==Y||e[66]!==ee?(te=s.jsxs(es,{value:zt,onValueChange:Y,children:[xt,ee]}),e[64]=zt,e[65]=Y,e[66]=ee,e[67]=te):te=e[67];let se;e[68]!==l||e[69]!==n.status?(se=n.status==="merged"?s.jsx(O,{size:"sm",variant:"outline",onClick:()=>l("unmerge"),children:"Unmerge"}):n.status==="open"?s.jsxs(s.Fragment,{children:[s.jsx(O,{size:"sm",onClick:()=>l("resolve"),children:"Resolve"}),s.jsx(O,{size:"sm",variant:"outline",onClick:()=>l("ignore"),children:"Ignore"})]}):s.jsx(O,{size:"sm",variant:"outline",onClick:()=>l("reopen"),children:"Reopen"}),e[68]=l,e[69]=n.status,e[70]=se):se=e[70];let ne;e[71]!==n.status?(ne=n.status!=="merged"&&s.jsxs(O,{size:"sm",variant:"outline",onClick:()=>K(!0),children:[s.jsx(Js,{"data-icon":"inline-start"}),"Merge into…"]}),e[71]=n.status,e[72]=ne):ne=e[72];let ie;e[73]!==B||e[74]!==t?(ie=()=>{(async()=>await B(rn(t))&&(q(!0),setTimeout(()=>q(!1),1200)))()},e[73]=B,e[74]=t,e[75]=ie):ie=e[75];let re;e[76]!==T?(re=T?s.jsx(Hs,{className:"size-3.5"}):s.jsx(Is,{className:"size-3.5"}),e[76]=T,e[77]=re):re=e[77];let le;e[78]!==ie||e[79]!==re?(le=s.jsxs(O,{size:"sm",variant:"outline",onClick:ie,children:[re,"Copy for AI"]}),e[78]=ie,e[79]=re,e[80]=le):le=e[80];let ae;e[81]!==X||e[82]!==te||e[83]!==se||e[84]!==ne||e[85]!==le?(ae=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[X,te,se,ne,le]}),e[81]=X,e[82]=te,e[83]=se,e[84]=ne,e[85]=le,e[86]=ae):ae=e[86];let ce;e[87]!==y||e[88]!==ae?(ce=s.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[y,ae]}),e[87]=y,e[88]=ae,e[89]=ce):ce=e[89];let oe;e[90]!==l||e[91]!==t.merged_into?(oe=t.merged_into&&s.jsxs("div",{className:"bg-muted flex flex-wrap items-center justify-between gap-2 rounded-md border px-4 py-3 text-sm",children:[s.jsxs("span",{children:["Merged into"," ",s.jsx(Mt,{href:mt(t.merged_into.id),className:"font-mono font-semibold underline",children:t.merged_into.key})," ",s.jsx("span",{className:"text-muted-foreground",children:t.merged_into.title})]}),s.jsx(O,{size:"sm",variant:"outline",onClick:()=>l("unmerge"),children:"Unmerge"})]}),e[90]=l,e[91]=t.merged_into,e[92]=oe):oe=e[92];let gt;e[93]===Symbol.for("react.memo_cache_sentinel")?(gt=r=>{K(r),r||(W(""),A([]),M(!1))},e[93]=gt):gt=e[93];let de;e[94]!==a?(de=s.jsx(Bs,{placeholder:"Search issues by key or title…",value:a,onValueChange:W}),e[94]=a,e[95]=de):de=e[95];const Dt=lt?"Searching…":at?"Search failed. Try again.":"No open issues found.";let me;e[96]!==Dt?(me=s.jsx(Es,{children:Dt}),e[96]=Dt,e[97]=me):me=e[97];let ue;e[98]!==l||e[99]!==E?(ue=E.length>0&&s.jsx(As,{children:E.map(r=>s.jsxs(Ms,{value:`${r.key} ${r.title}`,onSelect:()=>{l("merge",{target_id:r.id}),K(!1)},children:[s.jsx("span",{className:"font-mono font-semibold",children:r.key}),s.jsx("span",{className:"text-muted-foreground truncate",children:r.title})]},r.id))}),e[98]=l,e[99]=E,e[100]=ue):ue=e[100];let fe;e[101]!==me||e[102]!==ue?(fe=s.jsxs(Ps,{children:[me,ue]}),e[101]=me,e[102]=ue,e[103]=fe):fe=e[103];let he;e[104]!==v||e[105]!==de||e[106]!==fe?(he=s.jsxs(Os,{open:v,onOpenChange:gt,title:"Merge into…",description:"Search issues to merge this one into",children:[de,fe]}),e[104]=v,e[105]=de,e[106]=fe,e[107]=he):he=e[107];const Ft=t.detection?.count_label??"Events",Bt=t.detection?.breached_windows??n.occurrences;let xe;e[108]!==Bt?(xe=Rt(Bt),e[108]=Bt,e[109]=xe):xe=e[109];let pe;e[110]!==Ft||e[111]!==xe?(pe=s.jsx(dt,{label:Ft,value:xe}),e[110]=Ft,e[111]=xe,e[112]=pe):pe=e[112];const Et=t.detection?"Events in measured window":"Users affected";let ge;e[113]!==n.affected_users||e[114]!==t.detection?(ge=t.detection?t.detection.event_count==null?"–":Rt(t.detection.event_count):n.affected_users,e[113]=n.affected_users,e[114]=t.detection,e[115]=ge):ge=e[115];let je;e[116]!==Et||e[117]!==ge?(je=s.jsx(dt,{label:Et,value:ge}),e[116]=Et,e[117]=ge,e[118]=je):je=e[118];let _e;e[119]!==n.first_seen_at?(_e=At(n.first_seen_at),e[119]=n.first_seen_at,e[120]=_e):_e=e[120];let ye;e[121]!==n.first_seen_at?(ye=rt(n.first_seen_at),e[121]=n.first_seen_at,e[122]=ye):ye=e[122];let ve;e[123]!==_e||e[124]!==ye?(ve=s.jsx(dt,{label:"First seen",value:_e,hint:ye}),e[123]=_e,e[124]=ye,e[125]=ve):ve=e[125];let be;e[126]!==n.last_seen_at?(be=At(n.last_seen_at),e[126]=n.last_seen_at,e[127]=be):be=e[127];let Ne;e[128]!==n.last_seen_at?(Ne=rt(n.last_seen_at),e[128]=n.last_seen_at,e[129]=Ne):Ne=e[129];let ke;e[130]!==be||e[131]!==Ne?(ke=s.jsx(dt,{label:"Last seen",value:be,hint:Ne}),e[130]=be,e[131]=Ne,e[132]=ke):ke=e[132];const Pt=n.regressed_at?"Regressed":"Resolved";let we;e[133]!==n.regressed_at||e[134]!==n.resolved_at?(we=n.regressed_at?At(n.regressed_at):n.resolved_at?At(n.resolved_at):"–",e[133]=n.regressed_at,e[134]=n.resolved_at,e[135]=we):we=e[135];let Se;e[136]!==n.resolved_in_deploy?(Se=n.resolved_in_deploy?`in ${n.resolved_in_deploy.slice(0,12)}`:void 0,e[136]=n.resolved_in_deploy,e[137]=Se):Se=e[137];const Ot=n.regressed_at?"destructive":void 0;let Ce;e[138]!==Pt||e[139]!==we||e[140]!==Se||e[141]!==Ot?(Ce=s.jsx(dt,{label:Pt,value:we,hint:Se,tone:Ot}),e[138]=Pt,e[139]=we,e[140]=Se,e[141]=Ot,e[142]=Ce):Ce=e[142];let $e;e[143]!==pe||e[144]!==je||e[145]!==ve||e[146]!==ke||e[147]!==Ce?($e=s.jsxs(Ts,{children:[pe,je,ve,ke,Ce]}),e[143]=pe,e[144]=je,e[145]=ve,e[146]=ke,e[147]=Ce,e[148]=$e):$e=e[148];const ps="grid gap-6 lg:grid-cols-3";let Le;e[149]!==n||e[150]!==w||e[151]!==t.breadcrumbs||e[152]!==t.browser_breadcrumbs||e[153]!==t.detection||e[154]!==t.latest?(Le=t.detection?s.jsx(ln,{issue:n,detail:t.detection}):t.latest?s.jsxs(c,{children:[s.jsxs(d,{className:"flex-row items-center justify-between",children:[s.jsx(m,{children:"Latest occurrence"}),w&&s.jsxs(Mt,{className:"text-xs underline",href:w,children:["Open ",t.latest.execution_preview]})]}),s.jsxs(o,{children:[s.jsx(Cs,{exception:t.latest,deploy:t.latest.deploy}),s.jsxs("div",{className:"mt-4 space-y-4",children:[s.jsx($s,{entries:t.breadcrumbs}),s.jsx(Ls,{crumbs:t.browser_breadcrumbs})]}),(t.latest.ruby_version??t.latest.rails_version)&&s.jsxs("p",{className:"text-muted-foreground mt-3 text-xs",children:["Ruby ",t.latest.ruby_version," · Rails"," ",t.latest.rails_version]})]})]}):s.jsx(c,{children:s.jsx(o,{children:s.jsx(rs,{data:n.sample})})}),e[149]=n,e[150]=w,e[151]=t.breadcrumbs,e[152]=t.browser_breadcrumbs,e[153]=t.detection,e[154]=t.latest,e[155]=Le):Le=e[155];const Kt=t.detection?"hidden":void 0;let jt;e[156]===Symbol.for("react.memo_cache_sentinel")?(jt=s.jsx(d,{children:s.jsx(m,{children:"Occurrences (30d)"})}),e[156]=jt):jt=e[156];let Ie;e[157]!==R?(Ie=r=>{const F=R(r);F&&Qt.visit(F)},e[157]=R,e[158]=Ie):Ie=e[158];let _t;e[159]===Symbol.for("react.memo_cache_sentinel")?(_t=[{key:"when",header:"When",cell:Kn},{key:"in",header:"In",cell:On},{key:"u",header:"User",cell:Pn},{key:"t",header:"Tenant",cell:En},{key:"d",header:"Deploy",cell:Bn},{key:"h",header:"",cell:Fn}],e[159]=_t):_t=e[159];let Te;e[160]!==t.occurrences||e[161]!==Ie?(Te=s.jsx(o,{children:s.jsx(nt,{rows:t.occurrences,rowKey:Vn,empty:"Raw occurrences have been pruned.",onRowClick:Ie,columns:_t})}),e[160]=t.occurrences,e[161]=Ie,e[162]=Te):Te=e[162];let Ae;e[163]!==Kt||e[164]!==Te?(Ae=s.jsxs(c,{className:Kt,children:[jt,Te]}),e[163]=Kt,e[164]=Te,e[165]=Ae):Ae=e[165];let Me;e[166]!==n.application.id||e[167]!==n.environment.id||e[168]!==t.attachments?(Me=t.attachments.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Attachments"})}),s.jsx(o,{children:s.jsx(nt,{rows:t.attachments,rowKey:Dn,columns:[{key:"name",header:"Name",className:"max-w-0",cell:zn},{key:"in",header:"In",cell:Rn},{key:"size",header:"Size",align:"right",cell:Mn},{key:"links",header:"",align:"right",cell:r=>s.jsxs("span",{className:"flex justify-end gap-3",children:[r.viewable&&s.jsx("a",{className:"text-primary hover:underline",href:Zt(n.application.id,n.environment.id,r.id,{view:1}),children:"View"}),s.jsx("a",{className:"text-primary hover:underline",href:Zt(n.application.id,n.environment.id,r.id),children:"Download"})]})}]})})]}),e[166]=n.application.id,e[167]=n.environment.id,e[168]=t.attachments,e[169]=Me):Me=e[169];let Re;e[170]!==Le||e[171]!==Ae||e[172]!==Me?(Re=s.jsxs("div",{className:"space-y-6 lg:col-span-2",children:[Le,Ae,Me]}),e[170]=Le,e[171]=Ae,e[172]=Me,e[173]=Re):Re=e[173];const gs="space-y-6",Vt=t.detection?"hidden":void 0;let yt;e[174]===Symbol.for("react.memo_cache_sentinel")?(yt=s.jsx(d,{children:s.jsx(m,{children:"Daily (30d)"})}),e[174]=yt):yt=e[174];const js=t.daily;let vt,bt,Nt;e[175]===Symbol.for("react.memo_cache_sentinel")?(vt=s.jsx(cs,{vertical:!1}),bt=s.jsx(os,{dataKey:"day",tickLine:!1,axisLine:!1,minTickGap:24,tickFormatter:An}),Nt=s.jsx(ds,{width:28,tickLine:!1,axisLine:!1,allowDecimals:!1}),e[175]=vt,e[176]=bt,e[177]=Nt):(vt=e[175],bt=e[176],Nt=e[177]);let kt,wt;e[178]===Symbol.for("react.memo_cache_sentinel")?(kt=s.jsx(ms,{content:s.jsx(us,{labelFormatter:Tn})}),wt=s.jsx(fs,{dataKey:"count",fill:"var(--color-count)",radius:2}),e[178]=kt,e[179]=wt):(kt=e[178],wt=e[179]);let ze;e[180]!==t.deploys?(ze=t.deploys.map(In),e[180]=t.deploys,e[181]=ze):ze=e[181];let De;e[182]!==t.daily||e[183]!==ze?(De=s.jsx(o,{children:s.jsx(hs,{config:Zs,className:"h-40 w-full",children:s.jsxs(xs,{data:js,children:[vt,bt,Nt,kt,wt,ze]})})}),e[182]=t.daily,e[183]=ze,e[184]=De):De=e[184];let Fe;e[185]!==Vt||e[186]!==De?(Fe=s.jsxs(c,{className:Vt,children:[yt,De]}),e[185]=Vt,e[186]=De,e[187]=Fe):Fe=e[187];const Gt=t.detection?"hidden":void 0;let St;e[188]===Symbol.for("react.memo_cache_sentinel")?(St=s.jsx(d,{children:s.jsx(m,{children:"Grouping"})}),e[188]=St):St=e[188];let Be;e[189]!==t.fingerprint?(Be=t.fingerprint.length>0&&s.jsx("div",{className:"flex flex-wrap gap-1",children:t.fingerprint.map(Ln)}),e[189]=t.fingerprint,e[190]=Be):Be=e[190];const Ut=tn[t.fingerprint_source??"default"]??`Fingerprint from ${t.fingerprint_source}.`;let Ee;e[191]!==Ut?(Ee=s.jsx("p",{className:"text-muted-foreground text-xs",children:Ut}),e[191]=Ut,e[192]=Ee):Ee=e[192];let Pe;e[193]!==l||e[194]!==t.distinct_messages||e[195]!==t.top_messages?(Pe=t.distinct_messages>1&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"space-y-1",children:t.top_messages.map($n)}),s.jsxs(O,{size:"sm",variant:"outline",onClick:()=>l("split",{by:"message"}),children:[s.jsx(Ys,{className:"size-3.5"}),"Split into ",t.distinct_messages," issues"]})]}),e[193]=l,e[194]=t.distinct_messages,e[195]=t.top_messages,e[196]=Pe):Pe=e[196];let Oe;e[197]!==Be||e[198]!==Ee||e[199]!==Pe?(Oe=s.jsxs(o,{className:"space-y-3",children:[Be,Ee,Pe]}),e[197]=Be,e[198]=Ee,e[199]=Pe,e[200]=Oe):Oe=e[200];let Ke;e[201]!==Gt||e[202]!==Oe?(Ke=s.jsxs(c,{className:Gt,children:[St,Oe]}),e[201]=Gt,e[202]=Oe,e[203]=Ke):Ke=e[203];let Ve;e[204]!==t.related_issues?(Ve=t.related_issues.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Related issues"})}),s.jsx(o,{className:"space-y-2",children:t.related_issues.map(Cn)})]}),e[204]=t.related_issues,e[205]=Ve):Ve=e[205];let Ge;e[206]!==t.merged_issues?(Ge=t.merged_issues.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Merged issues"})}),s.jsx(o,{className:"space-y-2",children:t.merged_issues.map(Sn)})]}),e[206]=t.merged_issues,e[207]=Ge):Ge=e[207];let Ue;e[208]!==t.alerts?(Ue=t.alerts.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Alerts"})}),s.jsx(o,{className:"space-y-2",children:t.alerts.map(wn)})]}),e[208]=t.alerts,e[209]=Ue):Ue=e[209];let Ct;e[210]===Symbol.for("react.memo_cache_sentinel")?(Ct=s.jsx(d,{children:s.jsx(m,{children:"By deploy"})}),e[210]=Ct):Ct=e[210];let He;e[211]!==t.by_deploy?(He=Object.entries(t.by_deploy),e[211]=t.by_deploy,e[212]=He):He=e[212];let $t;e[213]===Symbol.for("react.memo_cache_sentinel")?($t=[{key:"d",header:"Deploy",cell:Nn},{key:"n",header:"Count",align:"right",cell:bn}],e[213]=$t):$t=e[213];let qe;e[214]!==He?(qe=s.jsxs(c,{children:[Ct,s.jsx(o,{children:s.jsx(nt,{rows:He,rowKey:kn,columns:$t})})]}),e[214]=He,e[215]=qe):qe=e[215];let Je;e[216]!==t.by_tenant?(Je=Object.keys(t.by_tenant).length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"By tenant"})}),s.jsx(o,{children:s.jsx(nt,{rows:Object.entries(t.by_tenant),rowKey:vn,columns:[{key:"t",header:"Tenant",cell:yn},{key:"n",header:"Count",align:"right",cell:_n}]})})]}),e[216]=t.by_tenant,e[217]=Je):Je=e[217];const Ht=c;let Qe;e[218]===Symbol.for("react.memo_cache_sentinel")?(Qe=s.jsx(d,{children:s.jsx(m,{children:"Activity"})}),e[218]=Qe):Qe=e[218];const qt=o,_s="space-y-3",Jt=t.activities.map(r=>{const F=r.data.source==="linear",ot=typeof r.data.author_name=="string"?r.data.author_name:"Linear",Tt=r.user?.name??(F?ot:"System");return s.jsxs("div",{className:"flex gap-2 text-sm",children:[s.jsx(Rs,{className:"size-6",children:s.jsx(zs,{className:"text-[10px]",children:r.user||F?ct(Tt):"sys"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"text-xs",children:[s.jsx("span",{className:"font-medium",children:Tt})," ",s.jsx("span",{className:"text-muted-foreground",children:nn(r,V)})," ",s.jsx(ls,{iso:r.created_at,className:"text-muted-foreground"})]}),r.kind==="comment"&&s.jsx("div",{className:"mt-0.5 whitespace-pre-wrap",children:String(r.data.body)})]})]},r.id)});let We;e[219]!==n.id?(We=vs(n.id),e[219]=n.id,e[220]=We):We=e[220];let Lt;e[221]===Symbol.for("react.memo_cache_sentinel")?(Lt={preserveScroll:!0},e[221]=Lt):Lt=e[221];let Xe;e[222]!==We?(Xe=s.jsx(ks,{method:"post",action:We,options:Lt,resetOnSuccess:!0,className:"space-y-2",children:jn}),e[222]=We,e[223]=Xe):Xe=e[223];let Ye;e[224]!==qt||e[225]!==Jt||e[226]!==Xe?(Ye=s.jsxs(qt,{className:_s,children:[Jt,Xe]}),e[224]=qt,e[225]=Jt,e[226]=Xe,e[227]=Ye):Ye=e[227];let Ze;e[228]!==Ht||e[229]!==Qe||e[230]!==Ye?(Ze=s.jsxs(Ht,{children:[Qe,Ye]}),e[228]=Ht,e[229]=Qe,e[230]=Ye,e[231]=Ze):Ze=e[231];let et;e[232]!==qe||e[233]!==Je||e[234]!==Ze||e[235]!==Fe||e[236]!==Ke||e[237]!==Ve||e[238]!==Ge||e[239]!==Ue?(et=s.jsxs("div",{className:gs,children:[Fe,Ke,Ve,Ge,Ue,qe,Je,Ze]}),e[232]=qe,e[233]=Je,e[234]=Ze,e[235]=Fe,e[236]=Ke,e[237]=Ve,e[238]=Ge,e[239]=Ue,e[240]=et):et=e[240];let tt;e[241]!==et||e[242]!==Re?(tt=s.jsxs("div",{className:ps,children:[Re,et]}),e[241]=et,e[242]=Re,e[243]=tt):tt=e[243];let st;e[244]!==tt||e[245]!==ce||e[246]!==oe||e[247]!==he||e[248]!==$e?(st=s.jsxs("div",{className:H,children:[ce,oe,he,$e,tt]}),e[244]=tt,e[245]=ce,e[246]=oe,e[247]=he,e[248]=$e,e[249]=st):st=e[249];let It;return e[250]!==z||e[251]!==h||e[252]!==st||e[253]!==D?(It=s.jsxs(z,{breadcrumbs:D,children:[h,st]}),e[250]=z,e[251]=h,e[252]=st,e[253]=D,e[254]=It):It=e[254],It}function jn(t){const{processing:e}=t;return s.jsxs(s.Fragment,{children:[s.jsx(Vs,{name:"body",placeholder:"Add a comment…",required:!0,rows:3}),s.jsx(O,{size:"sm",disabled:e,children:"Comment"})]})}function _n(t){const[,e]=t;return e}function yn(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e})}function vn(t){const[e]=t;return e}function bn(t){const[,e]=t;return e}function Nn(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e??"unknown"})}function kn(t){const[e]=t;return e??"none"}function wn(t){return s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",title:t.error??void 0,children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ut,{variant:t.status==="failed"?"destructive":"outline",className:"capitalize",children:t.status}),s.jsxs("span",{children:[t.event," via ",t.integration.name]}),s.jsx(ls,{iso:t.sent_at,className:"text-muted-foreground"})]}),t.error&&s.jsx("span",{className:"text-destructive",children:t.error})]},t.id)}function Sn(t){return s.jsxs(Mt,{href:mt(t.id),className:"hover:bg-muted/60 -mx-2 flex flex-col rounded px-2 py-1 text-xs",children:[s.jsx("span",{className:"font-mono font-semibold",children:t.key}),s.jsx("span",{className:"text-muted-foreground line-clamp-1",children:t.title})]},t.id)}function Cn(t){return s.jsxs(Mt,{href:mt(t.id),className:"hover:bg-muted/60 -mx-2 flex flex-col rounded px-2 py-1 text-xs",children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-mono font-semibold",children:t.key}),s.jsx(as,{status:t.status})]}),s.jsx("span",{className:"text-muted-foreground line-clamp-1",children:t.title}),s.jsx("span",{className:"text-muted-foreground",children:t.environment.name})]},t.id)}function $n(t){return s.jsxs("div",{className:"flex items-start justify-between gap-2 text-xs",children:[s.jsx("span",{className:"line-clamp-1 font-mono",children:t.message}),s.jsx("span",{className:"text-muted-foreground",children:Rt(t.count)})]},t.message)}function Ln(t,e){return s.jsx("span",{className:"bg-muted rounded px-1.5 py-0.5 font-mono text-[11px] break-all",children:t},`${e}-${t}`)}function In(t){return s.jsx(Ks,{x:t.at.slice(0,10),stroke:"var(--muted-foreground)",strokeDasharray:"3 3",label:{value:t.ref,position:"insideTopRight",fontSize:10}},t.deploy)}function Tn(t){return String(t)}function An(t){return new Date(t).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Mn(t){return Us(t.bytes)}function Rn(t){return s.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:t.execution_preview??"–"})}function zn(t){return s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"truncate font-mono text-xs",children:t.name}),t.truncated&&s.jsx(ut,{variant:"secondary",children:"truncated"})]})}function Dn(t){return t.id}function Fn(t){return t.handled?s.jsx(ut,{variant:"secondary",children:"handled"}):null}function Bn(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy?.slice(0,10)})}function En(t){return s.jsx("span",{className:"font-mono text-xs",children:t.tenant??""})}function Pn(t){return s.jsx("span",{className:"font-mono text-xs",children:t.user_ref??""})}function On(t){return s.jsxs("span",{className:"font-mono text-xs",children:[t.execution_source," ",t.execution_preview]})}function Kn(t){return s.jsx("span",{className:"text-xs",children:rt(t.occurred_at)})}function Vn(t){return t.id}function Gn(t){return s.jsx(Yt,{value:String(t.id),children:t.name},t.id)}function Un(t){return s.jsx(Yt,{value:t,children:t},t)}function Hn(t){if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.json()}function qn(t){return[t.id,t.name]}export{vi as default};
@@ -0,0 +1 @@
1
+ import{c as L,u as U,ap as W,j as t,L as K,y as F,i as G}from"./inertia-CgBdJDaE.js";import{C as J}from"./chart-panel-DKNxoauI.js";import{D as z}from"./data-table-Bc3ZRnpb.js";import{E as A}from"./empty-state-CkPROZB0.js";import{P as Q,E as V}from"./env-layout-aGQgTZRg.js";import{b as X}from"./series-chart-COEtj3PY.js";import{I as Y}from"./status-badge-Ys4b0fcG.js";import{B as Z}from"./app-wordmark-B-0yZiDb.js";import{C as M,a as T,b as q,c as B}from"./card-C9j_ffR9.js";import{w as ee,c as R,m as se,a as te}from"./format-B9SDkrWj.js";import{ReleaseHealthStrip as re}from"./release-health-2O1GRclB.js";import{E as ie,O as le}from"./app-layout-CdJ5Qjms.js";import"./chart-hover-B0SjyWFy.js";import"./badge-DKvItdlb.js";import"./use-live-LwJStJvD.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./index-B2_QluAw.js";import"./segmented-Dg8CES94.js";import"./label-BWgQzHCO.js";import"./chart-Cmh6JEww.js";import"./stat-Cd8QaTGw.js";import"./arrow-up-DY1fS0tD.js";import"./checkbox-BsBkRg5n.js";function H(s){const e=L.c(6),{rows:o,empty:l}=s;let r;e[0]!==l?(r=t.jsx(A,{icon:le,...l}),e[0]=l,e[1]=r):r=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=[{key:"k",header:"Issue",cell:ne},{key:"t",header:"Title",cell:ae},{key:"s",header:"",cell:oe}],e[2]=i):i=e[2];let a;return e[3]!==o||e[4]!==r?(a=t.jsx(z,{rows:o,rowKey:me,empty:r,columns:i}),e[3]=o,e[4]=r,e[5]=a):a=e[5],a}function oe(s){return t.jsx(Y,{status:s.status})}function ae(s){return t.jsx("span",{className:"line-clamp-1 text-xs",children:s.title})}function ne(s){return t.jsx(K,{className:"font-mono text-xs hover:underline",href:G(s.id),children:s.key})}function me(s){return s.id}function Ue(s){const e=L.c(58),{environment:o,window:l}=U().props,r=o.application_id,i=o.id,a=s.release.ref;let n;e[0]!==r||e[1]!==i||e[2]!==l?(n=W(r,i,{window:l}),e[0]=r,e[1]=i,e[2]=l,e[3]=n):n=e[3];let m;e[4]!==n?(m={title:"Releases",href:n},e[4]=n,e[5]=m):m=e[5];let c;e[6]!==s.release.ref?(c={title:s.release.ref,href:"#"},e[6]=s.release.ref,e[7]=c):c=e[7];let d;e[8]!==m||e[9]!==c?(d=[m,c],e[8]=m,e[9]=c,e[10]=d):d=e[10];let u;e[11]!==s.release.deploy?(u=t.jsx("span",{className:"font-mono",children:s.release.deploy}),e[11]=s.release.deploy,e[12]=u):u=e[12];let g;e[13]!==s.release.deployed_at?(g=s.release.deployed_at?ee(s.release.deployed_at):"never deployed",e[13]=s.release.deployed_at,e[14]=g):g=e[14];const O=`${g}${s.release.name?` · ${s.release.name}`:""}${s.release.previous_ref?` · after ${s.release.previous_ref}`:""}`;let f;e[15]!==r||e[16]!==i||e[17]!==s.release.deploy_id?(f=s.release.deploy_id&&t.jsx(Z,{asChild:!0,variant:"outline",size:"sm",children:t.jsx(K,{href:F(r,i,s.release.deploy_id),children:"Deploy"})}),e[15]=r,e[16]=i,e[17]=s.release.deploy_id,e[18]=f):f=e[18];let h;e[19]!==u||e[20]!==O||e[21]!==f?(h=t.jsx(Q,{withWindow:!1,title:u,description:O,actions:f}),e[19]=u,e[20]=O,e[21]=f,e[22]=h):h=e[22];const D=s.release.previous_ref?`vs ${s.release.previous_ref}`:void 0;let y;e[23]!==s.previous_summary||e[24]!==s.summary||e[25]!==D?(y=t.jsx(re,{health:s.summary,previous:s.previous_summary,deltaCaption:D}),e[23]=s.previous_summary,e[24]=s.summary,e[25]=D,e[26]=y):y=e[26];let p;e[27]!==s.summary.sessions?(p=R(s.summary.sessions),e[27]=s.summary.sessions,e[28]=p):p=e[28];let x;e[29]!==s.series?(x=t.jsx(X,{data:s.series}),e[29]=s.series,e[30]=x):x=e[30];let _;e[31]!==p||e[32]!==x?(_=t.jsx(J,{label:"Sessions by status",value:p,children:x}),e[31]=p,e[32]=x,e[33]=_):_=e[33];let S;e[34]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(q,{children:t.jsx(B,{children:"Issues first seen in this release"})}),e[34]=S):S=e[34];let k;e[35]===Symbol.for("react.memo_cache_sentinel")?(k={title:"No new issues in this release",description:"Issues first seen while this release was live would show here."},e[35]=k):k=e[35];let j;e[36]!==s.new_issues?(j=t.jsxs(M,{children:[S,t.jsx(T,{children:t.jsx(H,{rows:s.new_issues,empty:k})})]}),e[36]=s.new_issues,e[37]=j):j=e[37];let N;e[38]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(q,{children:t.jsx(B,{children:"Issues resolved in this release"})}),e[38]=N):N=e[38];let C;e[39]===Symbol.for("react.memo_cache_sentinel")?(C={title:"No issues marked resolved in this release",description:"Issues resolved and tagged with this deploy would show here."},e[39]=C):C=e[39];let v;e[40]!==s.resolved_issues?(v=t.jsxs(M,{children:[N,t.jsx(T,{children:t.jsx(H,{rows:s.resolved_issues,empty:C})})]}),e[40]=s.resolved_issues,e[41]=v):v=e[41];let w;e[42]!==j||e[43]!==v?(w=t.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[j,v]}),e[42]=j,e[43]=v,e[44]=w):w=e[44];let E;e[45]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("h2",{className:"text-sm font-semibold",children:"Sessions"}),e[45]=E):E=e[45];let $,I;e[46]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(A,{icon:ie,title:"No sessions reported for this release",description:"Sessions come from the browser client and the gem's request middleware; config.track_sessions turns both off."}),I=[{key:"id",header:"Session",cell:xe},{key:"source",hideOnMobile:!0,header:"Source",cell:pe},{key:"status",header:"Status",cell:ye},{key:"user",hideOnMobile:!0,header:"User",cell:he},{key:"duration",header:"Duration",align:"right",cell:fe},{key:"activity",hideOnMobile:!0,header:"Requests / visits",align:"right",cell:ue},{key:"errors",hideOnMobile:!0,header:"Errors",align:"right",cell:de},{key:"started",header:"Started",align:"right",cell:ce}],e[46]=$,e[47]=I):($=e[46],I=e[47]);let b;e[48]!==s.sessions?(b=t.jsx(z,{rows:s.sessions,rowKey:je,rowClassName:_e,empty:$,columns:I}),e[48]=s.sessions,e[49]=b):b=e[49];let P;return e[50]!==s.release.ref||e[51]!==y||e[52]!==_||e[53]!==w||e[54]!==b||e[55]!==d||e[56]!==h?(P=t.jsxs(V,{title:a,crumbs:d,children:[h,y,_,w,E,b]}),e[50]=s.release.ref,e[51]=y,e[52]=_,e[53]=w,e[54]=b,e[55]=d,e[56]=h,e[57]=P):P=e[57],P}function ce(s){return te(s.started_at)}function de(s){return t.jsx("span",{className:s.errors?"text-destructive":"",children:R(s.errors)})}function ue(s){return`${R(s.requests)} / ${R(s.visits)}`}function fe(s){return se(s.duration)}function he(s){return t.jsx("span",{className:"font-mono text-xs",children:s.user_ref})}function ye(s){return t.jsx("span",{className:s.status==="crashed"?"text-destructive text-xs font-semibold":"text-xs",children:s.status})}function pe(s){return t.jsx("span",{className:"text-xs",children:s.source})}function xe(s){return t.jsx("span",{className:"font-mono text-xs",children:s.session_id})}function _e(s){return s.status==="crashed"?"bg-destructive/5":void 0}function je(s){return s.id}export{Ue as default};
@@ -0,0 +1 @@
1
+ import{c as g,u as v,an as P,j as s,e as C,t as E,L as N,i as S}from"./inertia-CgBdJDaE.js";import{D as y}from"./data-table-Bc3ZRnpb.js";import{P as $,E as b}from"./env-layout-aGQgTZRg.js";import{I,S as R}from"./status-badge-Ys4b0fcG.js";import{C as D,b as H,c as K,a as L}from"./card-C9j_ffR9.js";import{a as w,w as T,m as B}from"./format-B9SDkrWj.js";import"./chart-hover-B0SjyWFy.js";import"./empty-state-CkPROZB0.js";import"./badge-DKvItdlb.js";import"./app-wordmark-B-0yZiDb.js";import"./app-layout-CdJ5Qjms.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./index-B2_QluAw.js";import"./checkbox-BsBkRg5n.js";import"./label-BWgQzHCO.js";import"./use-live-LwJStJvD.js";import"./segmented-Dg8CES94.js";function xe(t){const e=g.c(31),{environment:j,window:_}=v().props,r=j.application_id,i=j.id,n=t.person?.name??t.person_ref;let o;e[0]!==r||e[1]!==i||e[2]!==_?(o=P(r,i,{window:_}),e[0]=r,e[1]=i,e[2]=_,e[3]=o):o=e[3];let a;e[4]!==o?(a={title:"Users",href:o},e[4]=o,e[5]=a):a=e[5];let l;e[6]!==n?(l={title:n,href:"#"},e[6]=n,e[7]=l):l=e[7];let c;e[8]!==a||e[9]!==l?(c=[a,l],e[8]=a,e[9]=l,e[10]=c):c=e[10];let u;e[11]!==t.person?(u=t.person?`${t.person.email??""} ${t.person.tenant?`· tenant ${t.person.tenant}`:""} · first seen ${w(t.person.first_seen_at)} · last seen ${w(t.person.last_seen_at)}`:"Not yet identified.",e[11]=t.person,e[12]=u):u=e[12];let m;e[13]!==n||e[14]!==u?(m=s.jsx($,{title:n,description:u}),e[13]=n,e[14]=u,e[15]=m):m=e[15];let d;e[16]!==t.issues?(d=t.issues.length>0&&s.jsxs(D,{children:[s.jsx(H,{children:s.jsx(K,{children:"Issues affecting this user"})}),s.jsx(L,{children:s.jsx(y,{rows:t.issues,rowKey:V,columns:[{key:"k",header:"Issue",cell:Q},{key:"t",header:"Title",cell:O},{key:"s",header:"",cell:M},{key:"n",header:"Hits",align:"right",cell:J}]})})]}),e[16]=t.issues,e[17]=d):d=e[17];let p;e[18]!==r||e[19]!==i?(p=k=>k.execution_id&&C.visit(E(r,i,k.execution_id)),e[18]=r,e[19]=i,e[20]=p):p=e[20];let x;e[21]===Symbol.for("react.memo_cache_sentinel")?(x=[{key:"when",header:"When",cell:F},{key:"k",header:"Kind",cell:A},{key:"n",header:"Name",cell:z},{key:"st",header:"Status",cell:W},{key:"d",header:"Duration",align:"right",cell:U},{key:"ex",header:"Exception",cell:q}],e[21]=x):x=e[21];let f;e[22]!==t.executions||e[23]!==p?(f=s.jsx(y,{rows:t.executions,rowKey:G,onRowClick:p,columns:x}),e[22]=t.executions,e[23]=p,e[24]=f):f=e[24];let h;return e[25]!==n||e[26]!==c||e[27]!==m||e[28]!==d||e[29]!==f?(h=s.jsxs(b,{title:n,crumbs:c,children:[m,d,f]}),e[25]=n,e[26]=c,e[27]=m,e[28]=d,e[29]=f,e[30]=h):h=e[30],h}function q(t){return s.jsx("span",{className:"text-destructive line-clamp-1 text-xs",children:t.exception_preview??""})}function U(t){return B(t.duration)}function W(t){return s.jsx(R,{status:t.status,outcome:t.outcome})}function z(t){return s.jsx("span",{className:"font-mono text-xs",children:t.name})}function A(t){return t.kind}function F(t){return s.jsx("span",{className:"text-xs",children:T(t.occurred_at)})}function G(t){return t.execution_id}function J(t){return t.count}function M(t){return s.jsx(I,{status:t.status})}function O(t){return s.jsx("span",{className:"line-clamp-1 text-xs",children:t.title})}function Q(t){return s.jsx(N,{className:"font-mono text-xs hover:underline",href:S(t.id),children:t.key})}function V(t){return t.id}export{xe as default};
@@ -1,3 +1,3 @@
1
- import{c as ge,u as je,ae as _e,j as s,L as me,t as de,C as ue}from"./inertia-TViv6kNv.js";import{V as be,D as ye}from"./chart-panel-Cb4S_ej_.js";import{M as xe}from"./code-KvW8k7Jr.js";import{C as we}from"./copy-id-Djks1fXB.js";import{D as ne}from"./data-table-iv1bdF6u.js";import{E as ve}from"./empty-state-6j_0AaQQ.js";import{P as Ee,E as Se}from"./env-layout-DrT8rO6P.js";import{S as X,a as Ne}from"./stat-s4RpOS9w.js";import{C as ie,a as re,b as oe,c as ae}from"./card-BX_3HXcJ.js";import{c as fe,m as P,w as he}from"./format-B9SDkrWj.js";import{D as Ce}from"./app-layout-yh-sPWgK.js";import"./series-chart-DaFPefku.js";import"./chart-hover-Vy52H4uD.js";import"./chart-B14-N9g7.js";import"./app-wordmark-nbjkzxwQ.js";import"./use-clipboard-ColgLyQ2.js";import"./index-1ol1-QWI.js";import"./badge-Daw4Hvr8.js";import"./live-dot-ChfUtY3p.js";import"./index-OqI59zPb.js";import"./segmented-h1VdDTqE.js";import"./label-COUKWqE_.js";import"./arrow-up-DVtOGdVA.js";import"./checkbox-D3aRSsBj.js";const Le=[{test:/\bSCAN\b/i,skip:/\bUSING\s+(?:COVERING\s+)?INDEX\b/i,message:"Reads every row of the table — no index covers this filter."},{test:/\bSeq Scan\b/i,message:"Sequential scan — Postgres reads the whole table; an index on the filtered column avoids it."},{test:/\bUSING TEMP B-TREE\b/i,message:"Builds a temporary B-tree to sort — an index matching the ORDER BY removes it."},{test:/filesort/i,message:"Filesort — MySQL sorts the rows itself; an index matching the ORDER BY removes it."},{test:/\btype:\s*ALL\b/i,message:"Join type ALL — MySQL has no usable index and scans the whole table."}];function Re(t){return t.split(`
2
- `).flatMap((e,o)=>Le.filter(i=>i.test.test(e)&&!i.skip?.test(e)).map(i=>({line:o+1,message:i.message})))}function xt(t){const e=ge.c(86),{environment:o,window:i}=je().props,l=o.application_id,n=o.id,r=t.summary,a=t.explain?.plan??"";let q;e[0]!==a?(q=Re(a),e[0]=a,e[1]=q):q=e[1];const Y=q;let c;e[2]!==l||e[3]!==n||e[4]!==i?(c=_e(l,n,{window:i}),e[2]=l,e[3]=n,e[4]=i,e[5]=c):c=e[5];let m;e[6]!==c?(m={title:"Queries",href:c},e[6]=c,e[7]=m):m=e[7];let I;e[8]===Symbol.for("react.memo_cache_sentinel")?(I={title:"Query",href:"#"},e[8]=I):I=e[8];let d;e[9]!==m?(d=[m,I],e[9]=m,e[10]=d):d=e[10];let u;e[11]!==t.sql?(u=t.sql?s.jsx(we,{value:t.sql,label:"Copy SQL"}):void 0,e[11]=t.sql,e[12]=u):u=e[12];let x;e[13]!==u?(x=s.jsx(Ee,{title:"Query",actions:u}),e[13]=u,e[14]=x):x=e[14];const J=t.sql??"No samples in this window.";let f;e[15]!==J?(f=s.jsx("pre",{className:"bg-muted/60 overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:J}),e[15]=J,e[16]=f):f=e[16];let h;e[17]!==t.roles?(h=t.roles.length>0&&s.jsx("div",{className:"text-muted-foreground font-mono text-[11px]",children:t.roles.map(Ue).join(" · ")}),e[17]=t.roles,e[18]=h):h=e[18];let p;e[19]!==r.count?(p=fe(r.count),e[19]=r.count,e[20]=p):p=e[20];let g;e[21]!==p?(g=s.jsx(X,{label:"Executions",value:p}),e[21]=p,e[22]=g):g=e[22];const z=r.avg/1e3;let j;e[23]!==z?(j=P(z,2),e[23]=z,e[24]=j):j=e[24];let _;e[25]!==j?(_=s.jsx(X,{label:"Avg",value:j}),e[25]=j,e[26]=_):_=e[26];const Z=r.p95/1e3;let b;e[27]!==Z?(b=P(Z,2),e[27]=Z,e[28]=b):b=e[28];const ee=r.p99/1e3;let M;e[29]!==ee?(M=P(ee,2),e[29]=ee,e[30]=M):M=e[30];const te=`p99 ${M}`;let y;e[31]!==b||e[32]!==te?(y=s.jsx(X,{label:"p95",value:b,hint:te}),e[31]=b,e[32]=te,e[33]=y):y=e[33];const se=r.max/1e3;let w;e[34]!==se?(w=P(se,2),e[34]=se,e[35]=w):w=e[35];let v;e[36]!==w?(v=s.jsx(X,{label:"Max",value:w}),e[36]=w,e[37]=v):v=e[37];let E;e[38]!==g||e[39]!==_||e[40]!==y||e[41]!==v?(E=s.jsxs(Ne,{children:[g,_,y,v]}),e[38]=g,e[39]=_,e[40]=y,e[41]=v,e[42]=E):E=e[42];let T;e[43]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(oe,{children:s.jsx(ae,{children:"Query plan"})}),e[43]=T):T=e[43];let S;e[44]!==l||e[45]!==n||e[46]!==t.explain||e[47]!==a||e[48]!==Y?(S=s.jsxs(ie,{children:[T,s.jsx(re,{children:t.explain?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-muted-foreground mb-2 font-mono text-[11px]",children:[he(t.explain.occurred_at)," · ",P(t.explain.duration,2),t.explain.execution_id&&s.jsxs(s.Fragment,{children:[" · ",s.jsx(me,{className:"hover:underline",href:de(l,n,t.explain.execution_id),children:t.explain.execution_id})]})]}),s.jsx("div",{className:"bg-muted/60 overflow-x-auto rounded-lg p-3 font-mono text-xs",children:a.split(`
3
- `).map((Q,ce)=>{const le=Y.filter(pe=>pe.line===ce+1);return s.jsxs("div",{className:ue("py-0.5",le.length>0&&"border-warning border-l-2 pl-2"),children:[s.jsx("div",{className:ue("whitespace-pre",le.length>0&&"text-warning"),children:Q}),le.map(Oe)]},ce)})})]}):s.jsxs("p",{className:"text-muted-foreground text-xs",children:["Enable plans for slow queries with"," ",s.jsx(xe,{children:"RAILWATCH_CAPTURE_QUERY_EXPLAIN=true"})," (threshold"," ",s.jsx(xe,{children:"RAILWATCH_EXPLAIN_THRESHOLD_MS"}),", default 100ms)"]})})]}),e[44]=l,e[45]=n,e[46]=t.explain,e[47]=a,e[48]=Y,e[49]=S):S=e[49];let N;e[50]!==t.series?(N=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(be,{legend:"outcome",label:"Executions",seriesLabel:"Executions",data:t.series}),s.jsx(ye,{label:"Duration",data:t.series})]}),e[50]=t.series,e[51]=N):N=e[51];let B;e[52]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(oe,{children:s.jsx(ae,{children:"Called from"})}),e[52]=B):B=e[52];let H,O;e[53]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(ve,{icon:Ce,title:"No source captured",description:"A backtrace location wasn't available for this query."}),O=[{key:"s",header:"Source",cell:Be},{key:"n",header:"Count",align:"right",cell:Te}],e[53]=H,e[54]=O):(H=e[53],O=e[54]);let C;e[55]!==t.sources?(C=s.jsxs(ie,{children:[B,s.jsx(re,{children:s.jsx(ne,{rows:t.sources,rowKey:He,empty:H,columns:O})})]}),e[55]=t.sources,e[56]=C):C=e[56];let U;e[57]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(oe,{children:s.jsx(ae,{children:"Executions"})}),e[57]=U):U=e[57];let W;e[58]===Symbol.for("react.memo_cache_sentinel")?(W=[{key:"c",header:"Execution",cell:Ie},{key:"n",header:"Count",align:"right",cell:qe}],e[58]=W):W=e[58];let L;e[59]!==t.callers?(L=s.jsxs(ie,{children:[U,s.jsx(re,{children:s.jsx(ne,{rows:t.callers,rowKey:Me,columns:W})})]}),e[59]=t.callers,e[60]=L):L=e[60];let R;e[61]!==C||e[62]!==L?(R=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[C,L]}),e[61]=C,e[62]=L,e[63]=R):R=e[63];let $;e[64]===Symbol.for("react.memo_cache_sentinel")?($={key:"when",header:"When",cell:Pe},e[64]=$):$=e[64];let k;e[65]!==l||e[66]!==n?(k={key:"in",header:"In",cell:Q=>Q.execution_id?s.jsx(me,{className:"font-mono text-xs hover:underline",href:de(l,n,Q.execution_id),children:Q.execution_preview}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},e[65]=l,e[66]=n,e[67]=k):k=e[67];let F,G,K;e[68]===Symbol.for("react.memo_cache_sentinel")?(F={key:"rows",hideOnMobile:!0,header:"Rows",align:"right",cell:Ae},G={key:"conn",hideOnMobile:!0,header:"DB",cell:De},K={key:"d",header:"Duration",align:"right",cell:ke},e[68]=F,e[69]=G,e[70]=K):(F=e[68],G=e[69],K=e[70]);let D;e[71]!==k?(D=[$,k,F,G,K],e[71]=k,e[72]=D):D=e[72];let A;e[73]!==t.samples||e[74]!==D?(A=s.jsx(ne,{rows:t.samples,rowKey:Qe,columns:D}),e[73]=t.samples,e[74]=D,e[75]=A):A=e[75];let V;return e[76]!==E||e[77]!==S||e[78]!==N||e[79]!==R||e[80]!==d||e[81]!==A||e[82]!==x||e[83]!==f||e[84]!==h?(V=s.jsxs(Se,{title:"Query",crumbs:d,children:[x,f,h,E,S,N,R,A]}),e[76]=E,e[77]=S,e[78]=N,e[79]=R,e[80]=d,e[81]=A,e[82]=x,e[83]=f,e[84]=h,e[85]=V):V=e[85],V}function ke(t){return P(t.duration,2)}function De(t){return t.connection}function Ae(t){return t.row_count??"–"}function Pe(t){return s.jsx("span",{className:"text-xs",children:he(t.occurred_at)})}function Qe(t){return t.id}function qe(t){const[,e]=t;return e}function Ie(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e})}function Me(t){const[e]=t;return e}function Te(t){const[,e]=t;return e}function Be(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e})}function He(t){const[e]=t;return e}function Oe(t){return s.jsx("div",{className:"text-warning/80 mt-0.5 text-[11px] whitespace-normal",children:t.message},t.message)}function Ue(t){const[e,o]=t;return`${e} ${fe(o)}`}export{xt as default};
1
+ import{c as ge,u as je,ae as _e,j as s,L as me,t as de,C as ue}from"./inertia-CgBdJDaE.js";import{V as be,D as ye}from"./chart-panel-DKNxoauI.js";import{M as xe}from"./code-C879Qwgg.js";import{C as we}from"./copy-id-SeLCKsW2.js";import{D as ne}from"./data-table-Bc3ZRnpb.js";import{E as ve}from"./empty-state-CkPROZB0.js";import{P as Ee,E as Se}from"./env-layout-aGQgTZRg.js";import{S as X,a as Ne}from"./stat-Cd8QaTGw.js";import{C as ie,a as re,b as oe,c as ae}from"./card-C9j_ffR9.js";import{c as fe,m as P,w as he}from"./format-B9SDkrWj.js";import{D as Ce}from"./app-layout-CdJ5Qjms.js";import"./series-chart-COEtj3PY.js";import"./chart-hover-B0SjyWFy.js";import"./chart-Cmh6JEww.js";import"./app-wordmark-B-0yZiDb.js";import"./use-clipboard-3hTXU91g.js";import"./index-B2_QluAw.js";import"./badge-DKvItdlb.js";import"./use-live-LwJStJvD.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./segmented-Dg8CES94.js";import"./label-BWgQzHCO.js";import"./arrow-up-DY1fS0tD.js";import"./checkbox-BsBkRg5n.js";const Le=[{test:/\bSCAN\b/i,skip:/\bUSING\s+(?:COVERING\s+)?INDEX\b/i,message:"Reads every row of the table — no index covers this filter."},{test:/\bSeq Scan\b/i,message:"Sequential scan — Postgres reads the whole table; an index on the filtered column avoids it."},{test:/\bUSING TEMP B-TREE\b/i,message:"Builds a temporary B-tree to sort — an index matching the ORDER BY removes it."},{test:/filesort/i,message:"Filesort — MySQL sorts the rows itself; an index matching the ORDER BY removes it."},{test:/\btype:\s*ALL\b/i,message:"Join type ALL — MySQL has no usable index and scans the whole table."}];function Re(t){return t.split(`
2
+ `).flatMap((e,o)=>Le.filter(i=>i.test.test(e)&&!i.skip?.test(e)).map(i=>({line:o+1,message:i.message})))}function ft(t){const e=ge.c(86),{environment:o,window:i}=je().props,l=o.application_id,n=o.id,r=t.summary,a=t.explain?.plan??"";let q;e[0]!==a?(q=Re(a),e[0]=a,e[1]=q):q=e[1];const Y=q;let c;e[2]!==l||e[3]!==n||e[4]!==i?(c=_e(l,n,{window:i}),e[2]=l,e[3]=n,e[4]=i,e[5]=c):c=e[5];let m;e[6]!==c?(m={title:"Queries",href:c},e[6]=c,e[7]=m):m=e[7];let I;e[8]===Symbol.for("react.memo_cache_sentinel")?(I={title:"Query",href:"#"},e[8]=I):I=e[8];let d;e[9]!==m?(d=[m,I],e[9]=m,e[10]=d):d=e[10];let u;e[11]!==t.sql?(u=t.sql?s.jsx(we,{value:t.sql,label:"Copy SQL"}):void 0,e[11]=t.sql,e[12]=u):u=e[12];let x;e[13]!==u?(x=s.jsx(Ee,{title:"Query",actions:u}),e[13]=u,e[14]=x):x=e[14];const J=t.sql??"No samples in this window.";let f;e[15]!==J?(f=s.jsx("pre",{className:"bg-muted/60 overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:J}),e[15]=J,e[16]=f):f=e[16];let h;e[17]!==t.roles?(h=t.roles.length>0&&s.jsx("div",{className:"text-muted-foreground font-mono text-[11px]",children:t.roles.map(Ue).join(" · ")}),e[17]=t.roles,e[18]=h):h=e[18];let p;e[19]!==r.count?(p=fe(r.count),e[19]=r.count,e[20]=p):p=e[20];let g;e[21]!==p?(g=s.jsx(X,{label:"Executions",value:p}),e[21]=p,e[22]=g):g=e[22];const z=r.avg/1e3;let j;e[23]!==z?(j=P(z,2),e[23]=z,e[24]=j):j=e[24];let _;e[25]!==j?(_=s.jsx(X,{label:"Avg",value:j}),e[25]=j,e[26]=_):_=e[26];const Z=r.p95/1e3;let b;e[27]!==Z?(b=P(Z,2),e[27]=Z,e[28]=b):b=e[28];const ee=r.p99/1e3;let M;e[29]!==ee?(M=P(ee,2),e[29]=ee,e[30]=M):M=e[30];const te=`p99 ${M}`;let y;e[31]!==b||e[32]!==te?(y=s.jsx(X,{label:"p95",value:b,hint:te}),e[31]=b,e[32]=te,e[33]=y):y=e[33];const se=r.max/1e3;let w;e[34]!==se?(w=P(se,2),e[34]=se,e[35]=w):w=e[35];let v;e[36]!==w?(v=s.jsx(X,{label:"Max",value:w}),e[36]=w,e[37]=v):v=e[37];let E;e[38]!==g||e[39]!==_||e[40]!==y||e[41]!==v?(E=s.jsxs(Ne,{children:[g,_,y,v]}),e[38]=g,e[39]=_,e[40]=y,e[41]=v,e[42]=E):E=e[42];let T;e[43]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(oe,{children:s.jsx(ae,{children:"Query plan"})}),e[43]=T):T=e[43];let S;e[44]!==l||e[45]!==n||e[46]!==t.explain||e[47]!==a||e[48]!==Y?(S=s.jsxs(ie,{children:[T,s.jsx(re,{children:t.explain?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-muted-foreground mb-2 font-mono text-[11px]",children:[he(t.explain.occurred_at)," · ",P(t.explain.duration,2),t.explain.execution_id&&s.jsxs(s.Fragment,{children:[" · ",s.jsx(me,{className:"hover:underline",href:de(l,n,t.explain.execution_id),children:t.explain.execution_id})]})]}),s.jsx("div",{className:"bg-muted/60 overflow-x-auto rounded-lg p-3 font-mono text-xs",children:a.split(`
3
+ `).map((Q,ce)=>{const le=Y.filter(pe=>pe.line===ce+1);return s.jsxs("div",{className:ue("py-0.5",le.length>0&&"border-warning border-l-2 pl-2"),children:[s.jsx("div",{className:ue("whitespace-pre",le.length>0&&"text-warning"),children:Q}),le.map(Oe)]},ce)})})]}):s.jsxs("p",{className:"text-muted-foreground text-xs",children:["Enable plans for slow queries with"," ",s.jsx(xe,{children:"RAILWATCH_CAPTURE_QUERY_EXPLAIN=true"})," (threshold"," ",s.jsx(xe,{children:"RAILWATCH_EXPLAIN_THRESHOLD_MS"}),", default 100ms)"]})})]}),e[44]=l,e[45]=n,e[46]=t.explain,e[47]=a,e[48]=Y,e[49]=S):S=e[49];let N;e[50]!==t.series?(N=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(be,{legend:"outcome",label:"Executions",seriesLabel:"Executions",data:t.series}),s.jsx(ye,{label:"Duration",data:t.series})]}),e[50]=t.series,e[51]=N):N=e[51];let B;e[52]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(oe,{children:s.jsx(ae,{children:"Called from"})}),e[52]=B):B=e[52];let H,O;e[53]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(ve,{icon:Ce,title:"No source captured",description:"A backtrace location wasn't available for this query."}),O=[{key:"s",header:"Source",cell:Be},{key:"n",header:"Count",align:"right",cell:Te}],e[53]=H,e[54]=O):(H=e[53],O=e[54]);let C;e[55]!==t.sources?(C=s.jsxs(ie,{children:[B,s.jsx(re,{children:s.jsx(ne,{rows:t.sources,rowKey:He,empty:H,columns:O})})]}),e[55]=t.sources,e[56]=C):C=e[56];let U;e[57]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(oe,{children:s.jsx(ae,{children:"Executions"})}),e[57]=U):U=e[57];let W;e[58]===Symbol.for("react.memo_cache_sentinel")?(W=[{key:"c",header:"Execution",cell:Ie},{key:"n",header:"Count",align:"right",cell:qe}],e[58]=W):W=e[58];let L;e[59]!==t.callers?(L=s.jsxs(ie,{children:[U,s.jsx(re,{children:s.jsx(ne,{rows:t.callers,rowKey:Me,columns:W})})]}),e[59]=t.callers,e[60]=L):L=e[60];let R;e[61]!==C||e[62]!==L?(R=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[C,L]}),e[61]=C,e[62]=L,e[63]=R):R=e[63];let $;e[64]===Symbol.for("react.memo_cache_sentinel")?($={key:"when",header:"When",cell:Pe},e[64]=$):$=e[64];let k;e[65]!==l||e[66]!==n?(k={key:"in",header:"In",cell:Q=>Q.execution_id?s.jsx(me,{className:"font-mono text-xs hover:underline",href:de(l,n,Q.execution_id),children:Q.execution_preview}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},e[65]=l,e[66]=n,e[67]=k):k=e[67];let F,G,K;e[68]===Symbol.for("react.memo_cache_sentinel")?(F={key:"rows",hideOnMobile:!0,header:"Rows",align:"right",cell:Ae},G={key:"conn",hideOnMobile:!0,header:"DB",cell:De},K={key:"d",header:"Duration",align:"right",cell:ke},e[68]=F,e[69]=G,e[70]=K):(F=e[68],G=e[69],K=e[70]);let D;e[71]!==k?(D=[$,k,F,G,K],e[71]=k,e[72]=D):D=e[72];let A;e[73]!==t.samples||e[74]!==D?(A=s.jsx(ne,{rows:t.samples,rowKey:Qe,columns:D}),e[73]=t.samples,e[74]=D,e[75]=A):A=e[75];let V;return e[76]!==E||e[77]!==S||e[78]!==N||e[79]!==R||e[80]!==d||e[81]!==A||e[82]!==x||e[83]!==f||e[84]!==h?(V=s.jsxs(Se,{title:"Query",crumbs:d,children:[x,f,h,E,S,N,R,A]}),e[76]=E,e[77]=S,e[78]=N,e[79]=R,e[80]=d,e[81]=A,e[82]=x,e[83]=f,e[84]=h,e[85]=V):V=e[85],V}function ke(t){return P(t.duration,2)}function De(t){return t.connection}function Ae(t){return t.row_count??"–"}function Pe(t){return s.jsx("span",{className:"text-xs",children:he(t.occurred_at)})}function Qe(t){return t.id}function qe(t){const[,e]=t;return e}function Ie(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e})}function Me(t){const[e]=t;return e}function Te(t){const[,e]=t;return e}function Be(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e})}function He(t){const[e]=t;return e}function Oe(t){return s.jsx("div",{className:"text-warning/80 mt-0.5 text-[11px] whitespace-normal",children:t.message},t.message)}function Ue(t){const[e,o]=t;return`${e} ${fe(o)}`}export{ft as default};
@@ -1 +1 @@
1
- import{c as v,u as y,j as e,H as _,aG as f,F as w,L as N,aJ as S}from"./inertia-TViv6kNv.js";import{H as b,S as E}from"./layout-DNSLAkw_.js";import{I as u}from"./input-error-LxImUkxv.js";import{B as F}from"./app-wordmark-nbjkzxwQ.js";import{L as p,I as h}from"./label-COUKWqE_.js";import{A as L}from"./app-layout-yh-sPWgK.js";import{K as k}from"./transition-B_AW8rMK.js";import"./separator-BwwTYtCF.js";import"./index-OqI59zPb.js";import"./live-dot-ChfUtY3p.js";import"./index-1ol1-QWI.js";import"./checkbox-D3aRSsBj.js";const c=[{title:"Email settings",href:f()}];function G(){const s=v.c(9),{auth:t}=y().props;let a;s[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(_,{title:c[c.length-1].title}),s[0]=a):a=s[0];let r;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(b,{title:"Update email",description:"Update your email address and verify it"}),s[1]=r):r=s[1];let i,l,o,n;s[2]===Symbol.for("react.memo_cache_sentinel")?(i=f(),l={preserveScroll:!0},o=["password_challenge"],n=["password_challenge"],s[2]=i,s[3]=l,s[4]=o,s[5]=n):(i=s[2],l=s[3],o=s[4],n=s[5]);let m;return s[6]!==t.user.email||s[7]!==t.user.verified?(m=e.jsxs(L,{breadcrumbs:c,children:[a,e.jsx(E,{children:e.jsxs("div",{className:"space-y-6",children:[r,e.jsx(w,{method:"patch",action:i,options:l,resetOnError:o,resetOnSuccess:n,className:"space-y-6",children:x=>{const{errors:d,processing:j,recentlySuccessful:g}=x;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(p,{htmlFor:"email",children:"Email address"}),e.jsx(h,{id:"email",type:"email",name:"email",className:"mt-1 block w-full",defaultValue:t.user.email,required:!0,autoComplete:"username",placeholder:"Email address"}),e.jsx(u,{className:"mt-2",messages:d.email})]}),!t.user.verified&&e.jsx("div",{children:e.jsxs("p",{className:"text-muted-foreground -mt-4 text-sm",children:["Your email address is unverified."," ",e.jsx(N,{href:S(),method:"post",as:"button",className:"text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500",children:"Click here to resend the verification email."})]})}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(p,{htmlFor:"password_challenge",children:"Current password"}),e.jsx(h,{id:"password_challenge",name:"password_challenge",type:"password",className:"mt-1 block w-full",autoComplete:"current-password",placeholder:"Current password"}),e.jsx(u,{messages:d.password_challenge})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(F,{disabled:j,children:"Save"}),e.jsx(k,{show:g,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:e.jsx("p",{className:"text-sm text-neutral-600",children:"Saved"})})]})]})}})]})})]}),s[6]=t.user.email,s[7]=t.user.verified,s[8]=m):m=s[8],m}export{G as default};
1
+ import{c as v,u as y,j as e,H as _,aG as f,F as w,L as N,aJ as S}from"./inertia-CgBdJDaE.js";import{H as b,S as E}from"./layout-neknbxn-.js";import{I as u}from"./input-error-DfpIawjl.js";import{B as F}from"./app-wordmark-B-0yZiDb.js";import{L as p,I as h}from"./label-BWgQzHCO.js";import{A as L}from"./app-layout-CdJ5Qjms.js";import{K as k}from"./transition-CQ9yvfPa.js";import"./separator-BOp2LHw3.js";import"./index-Dy7Wg880.js";import"./live-dot-Bejk0a5o.js";import"./index-B2_QluAw.js";import"./checkbox-BsBkRg5n.js";const c=[{title:"Email settings",href:f()}];function G(){const s=v.c(9),{auth:t}=y().props;let a;s[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(_,{title:c[c.length-1].title}),s[0]=a):a=s[0];let r;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(b,{title:"Update email",description:"Update your email address and verify it"}),s[1]=r):r=s[1];let i,l,o,n;s[2]===Symbol.for("react.memo_cache_sentinel")?(i=f(),l={preserveScroll:!0},o=["password_challenge"],n=["password_challenge"],s[2]=i,s[3]=l,s[4]=o,s[5]=n):(i=s[2],l=s[3],o=s[4],n=s[5]);let m;return s[6]!==t.user.email||s[7]!==t.user.verified?(m=e.jsxs(L,{breadcrumbs:c,children:[a,e.jsx(E,{children:e.jsxs("div",{className:"space-y-6",children:[r,e.jsx(w,{method:"patch",action:i,options:l,resetOnError:o,resetOnSuccess:n,className:"space-y-6",children:x=>{const{errors:d,processing:j,recentlySuccessful:g}=x;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(p,{htmlFor:"email",children:"Email address"}),e.jsx(h,{id:"email",type:"email",name:"email",className:"mt-1 block w-full",defaultValue:t.user.email,required:!0,autoComplete:"username",placeholder:"Email address"}),e.jsx(u,{className:"mt-2",messages:d.email})]}),!t.user.verified&&e.jsx("div",{children:e.jsxs("p",{className:"text-muted-foreground -mt-4 text-sm",children:["Your email address is unverified."," ",e.jsx(N,{href:S(),method:"post",as:"button",className:"text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500",children:"Click here to resend the verification email."})]})}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(p,{htmlFor:"password_challenge",children:"Current password"}),e.jsx(h,{id:"password_challenge",name:"password_challenge",type:"password",className:"mt-1 block w-full",autoComplete:"current-password",placeholder:"Current password"}),e.jsx(u,{messages:d.password_challenge})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(F,{disabled:j,children:"Save"}),e.jsx(k,{show:g,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:e.jsx("p",{className:"text-sm text-neutral-600",children:"Saved"})})]})]})}})]})})]}),s[6]=t.user.email,s[7]=t.user.verified,s[8]=m):m=s[8],m}export{G as default};
@@ -0,0 +1 @@
1
+ import{c as se,u as ne,af as re,j as s,L as oe,t as ie}from"./inertia-CgBdJDaE.js";import{V as ae,D as le}from"./chart-panel-DKNxoauI.js";import{D as Z}from"./data-table-Bc3ZRnpb.js";import{E as ee}from"./empty-state-CkPROZB0.js";import{P as ce,E as me}from"./env-layout-aGQgTZRg.js";import{S as T,a as ue}from"./stat-Cd8QaTGw.js";import{S as de}from"./status-badge-Ys4b0fcG.js";import{C as pe,a as fe,b as xe,c as he}from"./card-C9j_ffR9.js";import{c as Y,m as P,w as je}from"./format-B9SDkrWj.js";import{B as te}from"./braces-Bse5Gh3K.js";import"./series-chart-COEtj3PY.js";import"./chart-hover-B0SjyWFy.js";import"./chart-Cmh6JEww.js";import"./badge-DKvItdlb.js";import"./app-wordmark-B-0yZiDb.js";import"./app-layout-CdJ5Qjms.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./index-B2_QluAw.js";import"./checkbox-BsBkRg5n.js";import"./label-BWgQzHCO.js";import"./use-live-LwJStJvD.js";import"./segmented-Dg8CES94.js";import"./arrow-up-DY1fS0tD.js";function ge(t){const e=se.c(5),{attributes:i}=t;let a;e[0]!==i?(a=Object.entries(i),e[0]=i,e[1]=a):a=e[1];const r=a;if(r.length===0){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"}),e[2]=n):n=e[2],n}let o;return e[3]!==r?(o=s.jsx("span",{className:"flex flex-wrap gap-1",children:r.map(ye)}),e[3]=r,e[4]=o):o=e[4],o}function ye(t){const[e,i]=t;return s.jsxs("span",{className:"bg-muted rounded-sm px-1.5 font-mono text-[10px]",children:[e,"=",String(i)]},e)}function et(t){const e=se.c(73),{environment:i,window:a}=ne().props,r=i.application_id,o=i.id,n=t.summary.current,V=t.name??"Span";let l;e[0]!==r||e[1]!==o||e[2]!==a?(l=re(r,o,{window:a}),e[0]=r,e[1]=o,e[2]=a,e[3]=l):l=e[3];let c;e[4]!==l?(c={title:"Spans",href:l},e[4]=l,e[5]=c):c=e[5];const W=t.name??"Span";let m;e[6]!==W?(m={title:W,href:"#"},e[6]=W,e[7]=m):m=e[7];let u;e[8]!==c||e[9]!==m?(u=[c,m],e[8]=c,e[9]=m,e[10]=u):u=e[10];const q=t.name??"Span";let d;e[11]!==q?(d=s.jsx(ce,{title:s.jsx("span",{className:"font-mono",children:q}),description:"Every recording of this span in the window."}),e[11]=q,e[12]=d):d=e[12];let p;e[13]!==n.count?(p=Y(n.count),e[13]=n.count,e[14]=p):p=e[14];let f;e[15]!==n.count||e[16]!==t.summary.previous.count?(f={current:n.count,previous:t.summary.previous.count,goodDirection:"up"},e[15]=n.count,e[16]=t.summary.previous.count,e[17]=f):f=e[17];let x;e[18]!==p||e[19]!==f?(x=s.jsx(T,{label:"Recorded",value:p,delta:f,deltaCaption:"vs previous period"}),e[18]=p,e[19]=f,e[20]=x):x=e[20];let h;e[21]!==n.errors?(h=Y(n.errors),e[21]=n.errors,e[22]=h):h=e[22];const F=n.errors?"destructive":void 0;let j;e[23]!==h||e[24]!==F?(j=s.jsx(T,{label:"Failed",value:h,tone:F}),e[23]=h,e[24]=F,e[25]=j):j=e[25];const I=n.p95/1e3;let g;e[26]!==I?(g=P(I,2),e[26]=I,e[27]=g):g=e[27];const z=n.p99/1e3;let C;e[28]!==z?(C=P(z,2),e[28]=z,e[29]=C):C=e[29];const G=`p99 ${C}`;let y;e[30]!==g||e[31]!==G?(y=s.jsx(T,{label:"p95",value:g,hint:G}),e[30]=g,e[31]=G,e[32]=y):y=e[32];const J=n.max/1e3;let b;e[33]!==J?(b=P(J,2),e[33]=J,e[34]=b):b=e[34];const Q=n.avg/1e3;let D;e[35]!==Q?(D=P(Q,2),e[35]=Q,e[36]=D):D=e[36];const U=`avg ${D}`;let v;e[37]!==b||e[38]!==U?(v=s.jsx(T,{label:"Max",value:b,hint:U}),e[37]=b,e[38]=U,e[39]=v):v=e[39];let _;e[40]!==x||e[41]!==j||e[42]!==y||e[43]!==v?(_=s.jsxs(ue,{children:[x,j,y,v]}),e[40]=x,e[41]=j,e[42]=y,e[43]=v,e[44]=_):_=e[44];let S;e[45]!==t.series?(S=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(ae,{legend:"outcome",label:"Recordings",seriesLabel:"Spans",data:t.series}),s.jsx(le,{label:"Duration",data:t.series})]}),e[45]=t.series,e[46]=S):S=e[46];let R;e[47]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(xe,{children:s.jsx(he,{children:"Attributes"})}),e[47]=R):R=e[47];let L,M;e[48]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(ee,{icon:te,title:"No attributes recorded",description:"Pass a hash to Railwatch.span to tag each recording."}),M=[{key:"k",header:"Key",cell:Pe},{key:"v",header:"Most common values",cell:ke},{key:"n",header:"Spans",align:"right",cell:Ne}],e[48]=L,e[49]=M):(L=e[48],M=e[49]);let w;e[50]!==t.facets?(w=s.jsxs(pe,{children:[R,s.jsx(fe,{children:s.jsx(Z,{rows:t.facets,rowKey:Ce,empty:L,columns:M})})]}),e[50]=t.facets,e[51]=w):w=e[51];let $,A,B;e[52]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(ee,{icon:te,title:"No recordings in this window",description:"Widen the time window to see older recordings of this span."}),A={key:"when",header:"When",cell:Se},B={key:"status",header:"Status",cell:_e},e[52]=$,e[53]=A,e[54]=B):($=e[52],A=e[53],B=e[54]);let N;e[55]!==r||e[56]!==o?(N={key:"in",hideOnMobile:!0,header:"In",cell:X=>X.execution_id?s.jsx(oe,{className:"font-mono text-xs hover:underline",href:ie(r,o,X.execution_id),children:X.execution_preview}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},e[55]=r,e[56]=o,e[57]=N):N=e[57];let K,O;e[58]===Symbol.for("react.memo_cache_sentinel")?(K={key:"attrs",hideOnMobile:!0,header:"Attributes",cell:ve},O={key:"d",header:"Duration",align:"right",cell:be},e[58]=K,e[59]=O):(K=e[58],O=e[59]);let k;e[60]!==N?(k=[A,B,N,K,O],e[60]=N,e[61]=k):k=e[61];let E;e[62]!==t.samples||e[63]!==k?(E=s.jsx(Z,{rows:t.samples,rowKey:we,empty:$,columns:k}),e[62]=t.samples,e[63]=k,e[64]=E):E=e[64];let H;return e[65]!==V||e[66]!==_||e[67]!==S||e[68]!==w||e[69]!==E||e[70]!==u||e[71]!==d?(H=s.jsxs(me,{title:V,crumbs:u,children:[d,_,S,w,E]}),e[65]=V,e[66]=_,e[67]=S,e[68]=w,e[69]=E,e[70]=u,e[71]=d,e[72]=H):H=e[72],H}function be(t){return P(t.duration,2)}function ve(t){return s.jsx(ge,{attributes:t.attributes})}function _e(t){return s.jsx(de,{outcome:t.status})}function Se(t){return s.jsx("span",{className:"text-xs",children:je(t.occurred_at)})}function we(t){return t.id}function Ne(t){return Y(t.count)}function ke(t){return s.jsx("span",{className:"flex flex-wrap gap-1",children:t.values.map(Ee)})}function Ee(t){const[e,i]=t;return s.jsxs("span",{className:"bg-muted rounded-sm px-1.5 font-mono text-[10px]",children:[e,s.jsxs("span",{className:"text-muted-foreground",children:[" ×",i]})]},e)}function Pe(t){return s.jsx("span",{className:"font-mono text-xs",children:t.key})}function Ce(t){return t.key}export{et as default};
@@ -1 +1 @@
1
- import{B,c as C,u as H,r as L,j as s,L as E,C as I,H as z}from"./inertia-TViv6kNv.js";import{M as D,a as F}from"./nav-CNnDqPlm.js";import{B as R}from"./app-wordmark-nbjkzxwQ.js";const $=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],O=B("menu",$);function G(t){const e=C.c(36),{auth:S}=H().props,[f,w]=L.useState(!1);let o;if(e[0]!==t.doc.id||e[1]!==t.nav){let v;e[3]!==t.doc.id?(v=M=>s.jsxs("div",{children:[s.jsx("div",{className:"label-caps mb-2",children:M.title}),s.jsx("ul",{className:"space-y-0.5",children:M.docs.map(k=>s.jsx("li",{children:s.jsx(E,{href:k.href,onClick:()=>w(!1),className:I("hover:bg-accent block rounded-md px-2 py-1",k.id===t.doc.id?"bg-accent font-medium":"text-muted-foreground"),children:k.title})},k.id))})]},M.section),e[3]=t.doc.id,e[4]=v):v=e[4],o=t.nav.map(v),e[0]=t.doc.id,e[1]=t.nav,e[2]=o}else o=e[2];let h;e[5]!==o?(h=s.jsx("nav",{className:"space-y-6 text-sm",children:o}),e[5]=o,e[6]=h):h=e[6];const l=h,N=`${t.doc.title} · Docs`;let n;e[7]!==N?(n=s.jsx(z,{title:N}),e[7]=N,e[8]=n):n=e[8];const y=!!S?.user;let a;e[9]!==y?(a=s.jsx(D,{signedIn:y}),e[9]=y,e[10]=a):a=e[10];let r;e[11]!==l?(r=s.jsx("aside",{className:"hidden w-56 shrink-0 md:block",children:s.jsx("div",{className:"sticky top-6",children:l})}),e[11]=l,e[12]=r):r=e[12];let u,j;e[13]===Symbol.for("react.memo_cache_sentinel")?(u=()=>w(P),j=s.jsx(O,{className:"size-4"}),e[13]=u,e[14]=j):(u=e[13],j=e[14]);const _=f?"Hide contents":"Contents";let c;e[15]!==_?(c=s.jsxs(R,{variant:"outline",size:"sm",onClick:u,children:[j,_]}),e[15]=_,e[16]=c):c=e[16];let i;e[17]!==f||e[18]!==l?(i=f&&s.jsx("div",{className:"bg-card mt-3 rounded-lg border p-4",children:l}),e[17]=f,e[18]=l,e[19]=i):i=e[19];let d;e[20]!==c||e[21]!==i?(d=s.jsxs("div",{className:"mb-4 md:hidden",children:[c,i]}),e[20]=c,e[21]=i,e[22]=d):d=e[22];let m;e[23]!==t.doc.html?(m=s.jsx("article",{className:"prose prose-neutral dark:prose-invert prose-headings:scroll-mt-6 prose-headings:font-semibold prose-headings:tracking-tight prose-h1:text-3xl prose-a:text-primary prose-code:rounded prose-code:bg-muted prose-code:px-1 prose-code:py-0.5 prose-code:font-mono prose-code:text-[0.85em] prose-code:font-normal prose-code:before:content-none prose-code:after:content-none prose-pre:bg-muted prose-pre:text-foreground prose-pre:border prose-table:text-sm prose-th:label-caps max-w-none",dangerouslySetInnerHTML:{__html:t.doc.html}}),e[23]=t.doc.html,e[24]=m):m=e[24];let p;e[25]!==d||e[26]!==m?(p=s.jsxs("div",{className:"min-w-0 flex-1",children:[d,m]}),e[25]=d,e[26]=m,e[27]=p):p=e[27];let x;e[28]!==p||e[29]!==r?(x=s.jsxs("div",{className:"mx-auto flex w-full max-w-6xl gap-10 px-6 pb-16",children:[r,p]}),e[28]=p,e[29]=r,e[30]=x):x=e[30];let b;e[31]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(F,{}),e[31]=b):b=e[31];let g;return e[32]!==x||e[33]!==n||e[34]!==a?(g=s.jsxs(s.Fragment,{children:[n,a,x,b]}),e[32]=x,e[33]=n,e[34]=a,e[35]=g):g=e[35],g}function P(t){return!t}export{G as default};
1
+ import{B,c as C,u as H,r as L,j as s,L as E,C as I,H as z}from"./inertia-CgBdJDaE.js";import{M as D,a as F}from"./nav-C1M8941-.js";import{B as R}from"./app-wordmark-B-0yZiDb.js";const $=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],O=B("menu",$);function G(t){const e=C.c(36),{auth:S}=H().props,[f,w]=L.useState(!1);let o;if(e[0]!==t.doc.id||e[1]!==t.nav){let v;e[3]!==t.doc.id?(v=M=>s.jsxs("div",{children:[s.jsx("div",{className:"label-caps mb-2",children:M.title}),s.jsx("ul",{className:"space-y-0.5",children:M.docs.map(k=>s.jsx("li",{children:s.jsx(E,{href:k.href,onClick:()=>w(!1),className:I("hover:bg-accent block rounded-md px-2 py-1",k.id===t.doc.id?"bg-accent font-medium":"text-muted-foreground"),children:k.title})},k.id))})]},M.section),e[3]=t.doc.id,e[4]=v):v=e[4],o=t.nav.map(v),e[0]=t.doc.id,e[1]=t.nav,e[2]=o}else o=e[2];let h;e[5]!==o?(h=s.jsx("nav",{className:"space-y-6 text-sm",children:o}),e[5]=o,e[6]=h):h=e[6];const l=h,N=`${t.doc.title} · Docs`;let n;e[7]!==N?(n=s.jsx(z,{title:N}),e[7]=N,e[8]=n):n=e[8];const y=!!S?.user;let a;e[9]!==y?(a=s.jsx(D,{signedIn:y}),e[9]=y,e[10]=a):a=e[10];let r;e[11]!==l?(r=s.jsx("aside",{className:"hidden w-56 shrink-0 md:block",children:s.jsx("div",{className:"sticky top-6",children:l})}),e[11]=l,e[12]=r):r=e[12];let u,j;e[13]===Symbol.for("react.memo_cache_sentinel")?(u=()=>w(P),j=s.jsx(O,{className:"size-4"}),e[13]=u,e[14]=j):(u=e[13],j=e[14]);const _=f?"Hide contents":"Contents";let c;e[15]!==_?(c=s.jsxs(R,{variant:"outline",size:"sm",onClick:u,children:[j,_]}),e[15]=_,e[16]=c):c=e[16];let i;e[17]!==f||e[18]!==l?(i=f&&s.jsx("div",{className:"bg-card mt-3 rounded-lg border p-4",children:l}),e[17]=f,e[18]=l,e[19]=i):i=e[19];let d;e[20]!==c||e[21]!==i?(d=s.jsxs("div",{className:"mb-4 md:hidden",children:[c,i]}),e[20]=c,e[21]=i,e[22]=d):d=e[22];let m;e[23]!==t.doc.html?(m=s.jsx("article",{className:"prose prose-neutral dark:prose-invert prose-headings:scroll-mt-6 prose-headings:font-semibold prose-headings:tracking-tight prose-h1:text-3xl prose-a:text-primary prose-code:rounded prose-code:bg-muted prose-code:px-1 prose-code:py-0.5 prose-code:font-mono prose-code:text-[0.85em] prose-code:font-normal prose-code:before:content-none prose-code:after:content-none prose-pre:bg-muted prose-pre:text-foreground prose-pre:border prose-table:text-sm prose-th:label-caps max-w-none",dangerouslySetInnerHTML:{__html:t.doc.html}}),e[23]=t.doc.html,e[24]=m):m=e[24];let p;e[25]!==d||e[26]!==m?(p=s.jsxs("div",{className:"min-w-0 flex-1",children:[d,m]}),e[25]=d,e[26]=m,e[27]=p):p=e[27];let x;e[28]!==p||e[29]!==r?(x=s.jsxs("div",{className:"mx-auto flex w-full max-w-6xl gap-10 px-6 pb-16",children:[r,p]}),e[28]=p,e[29]=r,e[30]=x):x=e[30];let b;e[31]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(F,{}),e[31]=b):b=e[31];let g;return e[32]!==x||e[33]!==n||e[34]!==a?(g=s.jsxs(s.Fragment,{children:[n,a,x,b]}),e[32]=x,e[33]=n,e[34]=a,e[35]=g):g=e[35],g}function P(t){return!t}export{G as default};