@hot-updater/console 1.2.0-rc.12 → 1.2.0-rc.13

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 (210) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{-native-builds-search-C-TGpFAm.js → -native-builds-search-DC2PutLU.js} +1 -1
  3. package/.output/public/assets/{ConsoleFeatureUnavailable-CUtcXuY2.js → ConsoleFeatureUnavailable-oMmbaqF6.js} +1 -1
  4. package/.output/public/assets/{EventDetails-Dl2RvPAk.js → EventDetails-ly7ygfdH.js} +1 -1
  5. package/.output/public/assets/{HashValueDisplay-6lNRxDJX.js → HashValueDisplay-BNoXZADg.js} +1 -1
  6. package/.output/public/assets/{InsightsPageHeader-DHhqY3DT.js → InsightsPageHeader-q2FgL8xS.js} +1 -1
  7. package/.output/public/assets/RolloutPercentageBadge-frllRncE.js +1 -0
  8. package/.output/public/assets/{StoreSubmission-ViTkW4eJ.js → StoreSubmission-D8BGGGgn.js} +1 -1
  9. package/.output/public/assets/api-BEEYDSCX.js +1 -0
  10. package/.output/public/assets/{api-keys-FueRkF9q.js → api-keys-B0N3SixL.js} +1 -1
  11. package/.output/public/assets/api-keys-DFAOfU4U.js +1 -0
  12. package/.output/public/assets/{index-DH9-mB8D.js → index-t0CToN0S.js} +3 -3
  13. package/.output/public/assets/insights-B0_8xNxr.js +1 -0
  14. package/.output/public/assets/{insights-B-0odqpt.js → insights-BbIzm_QG.js} +2 -2
  15. package/.output/public/assets/insights-BtmYg4vg.js +2 -0
  16. package/.output/public/assets/{insights-search-DghCbEnk.js → insights-search-B5cZsP6C.js} +1 -1
  17. package/.output/public/assets/{insights-usage-rpc-CKQH0pUS.js → insights-usage-rpc-zut_JaSS.js} +1 -1
  18. package/.output/public/assets/insights_.distribution-DLxq-IKU.js +1 -0
  19. package/.output/public/assets/insights_.distribution-izFBYfJL.js +2 -0
  20. package/.output/public/assets/{insights_.distribution-dvk6vYDM.js → insights_.distribution-rdeyNhH2.js} +1 -1
  21. package/.output/public/assets/{installations-B674P5Z5.js → installations-BRS-vuRJ.js} +2 -2
  22. package/.output/public/assets/installations-CWx7vYY5.js +1 -0
  23. package/.output/public/assets/{installations-BWxczZ2t.js → installations-Ce_dTa35.js} +1 -1
  24. package/.output/public/assets/native-builds-Br0onFRc.js +2 -0
  25. package/.output/public/assets/native-builds-CDYL3y0I.js +1 -0
  26. package/.output/public/assets/native-builds-DEWHul-_.js +1 -0
  27. package/.output/public/assets/native-builds_._buildId-D1XEPQ-V.js +1 -0
  28. package/.output/public/assets/native-builds_._buildId-x-uu1Vbr.js +2 -0
  29. package/.output/public/assets/{remote-config-B7ujqhLa.js → remote-config-Bw6sErCV.js} +3 -3
  30. package/.output/public/assets/{remote-config-WjpozBG5.js → remote-config-DQguWTMa.js} +1 -1
  31. package/.output/public/assets/remote-config-S3xj8r3x.js +1 -0
  32. package/.output/public/assets/{routes-CCD33Azv.js → routes-Dw8zgqXz.js} +2 -2
  33. package/.output/public/assets/routes-nKCEKnhh.js +1 -0
  34. package/.output/server/{__23tanstack-start-server-fn-resolver-C19x6erS.mjs → __23tanstack-start-server-fn-resolver-DI0OnlQe.mjs} +58 -46
  35. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +1 -1
  36. package/.output/server/_libs/_.mjs +2 -0
  37. package/.output/server/_ssr/{-native-builds-search-CwNcoXf4.mjs → -native-builds-search-Cl8EZ0Ud.mjs} +2 -2
  38. package/.output/server/_ssr/{BundleIdDisplay-Bf-L37zf.mjs → BundleIdDisplay-SAvC-NlE.mjs} +2 -2
  39. package/.output/server/_ssr/{ConsoleFeatureUnavailable-iNGya64h.mjs → ConsoleFeatureUnavailable-BgHEoZ36.mjs} +6 -6
  40. package/.output/server/_ssr/{EventDetails-CZofL6Hn.mjs → EventDetails-VaS25yjE.mjs} +7 -7
  41. package/.output/server/_ssr/{HashValueDisplay-DC1TLS-8.mjs → HashValueDisplay-BGc-x_l8.mjs} +2 -2
  42. package/.output/server/_ssr/{InsightsPageHeader-sVotAhl0.mjs → InsightsPageHeader-gMuNJt-f.mjs} +7 -7
  43. package/.output/server/_ssr/{NotFoundPage-COb0erGp.mjs → NotFoundPage-DsRI-J4h.mjs} +2 -2
  44. package/.output/server/_ssr/{PlatformIcon-CFLiTjh1.mjs → PlatformIcon-BsU0d0jN.mjs} +1 -1
  45. package/.output/server/_ssr/{RolloutPercentageBadge-BFBh0QWv.mjs → RolloutPercentageBadge-axz7VuIZ.mjs} +3 -3
  46. package/.output/server/_ssr/{StoreSubmission-Bvfq8pWk.mjs → StoreSubmission-BqXKtpqW.mjs} +5 -5
  47. package/.output/server/_ssr/{alert-dialog-C-Mck8_M.mjs → alert-dialog-lury59vV.mjs} +1 -1
  48. package/.output/server/_ssr/{api-oJajV-DG.mjs → api-BQ8ztUgU.mjs} +99 -22
  49. package/.output/server/_ssr/{api-keys-CcqDkOcC.mjs → api-keys-CHATVpa9.mjs} +2 -2
  50. package/.output/server/_ssr/{api-keys-B0L1sj-W.mjs → api-keys-DVChzF3r.mjs} +8 -8
  51. package/.output/server/_ssr/{api-keys-rpc-Do6Rbl0V.mjs → api-keys-rpc-DXPJTfdr.mjs} +4 -4
  52. package/.output/server/_ssr/{api-rpc-DE0zy7iY.mjs → api-rpc-BexxmTM9.mjs} +43 -18
  53. package/.output/server/_ssr/{auth-rpc-0I_10FKy.mjs → auth-rpc-BgNCvy2L.mjs} +5 -5
  54. package/.output/server/_ssr/{auth.server-cdIC1rxo.mjs → auth.server-43UW34Rd.mjs} +165 -149
  55. package/.output/server/_ssr/{badge-BZZCX8Wn.mjs → badge-BYB825vl.mjs} +1 -1
  56. package/.output/server/_ssr/{bundleActivity-MLrjNJCT.mjs → bundleActivity-BGVvqWx7.mjs} +1 -1
  57. package/.output/server/_ssr/{config.server-CydWUX0c.mjs → config.server-QRTmD4Hf.mjs} +4 -4
  58. package/.output/server/_ssr/{console-access-y52SJdFn.mjs → console-access-E91fYTIB.mjs} +2 -2
  59. package/.output/server/_ssr/{console-features-BTV-XuhQ.mjs → console-features-CgdQJQlX.mjs} +1 -1
  60. package/.output/server/_ssr/{console-features-api-BDrXaElT.mjs → console-features-api-CLRjxvy2.mjs} +5 -5
  61. package/.output/server/_ssr/{console-features-rpc-C9kKIDeK.mjs → console-features-rpc-C2rJ0u6i.mjs} +4 -4
  62. package/.output/server/_ssr/{createServerRpc-BVvRVOz5.mjs → createServerRpc-DJZel12M.mjs} +1 -1
  63. package/.output/server/_ssr/{databaseConfig-B_Bg7qS5.mjs → databaseConfig-XAvDetmn.mjs} +1 -1
  64. package/.output/server/_ssr/{databaseJsonValue-kS7cvEtz.mjs → databaseJsonValue-DuUoft8j.mjs} +1 -1
  65. package/.output/server/_ssr/{databaseRows-B6H8Cmgq.mjs → databaseRows-BtRVBD0C.mjs} +3 -3
  66. package/.output/server/_ssr/{dialog-DKsDLcYQ.mjs → dialog-CcF1pxfR.mjs} +1 -1
  67. package/.output/server/_ssr/{dist-TEpM_UAD.mjs → dist-B6-irDRA.mjs} +1 -1
  68. package/.output/server/_ssr/{downloadBundle-DCmr7vsj.mjs → downloadBundle-BX8ODCZT.mjs} +1 -1
  69. package/.output/server/_ssr/{empty-D-mnqnCP.mjs → empty-DkiJ7nWt.mjs} +2 -2
  70. package/.output/server/_ssr/{empty-plugin-adapters-zrZ0xs6n.mjs → empty-plugin-adapters-BYBYBaxo.mjs} +1 -1
  71. package/.output/server/_ssr/{failureReports-Cn_zU9S8.mjs → failureReports-C_CmBF4x.mjs} +3 -3
  72. package/.output/server/_ssr/{field-Bbw5SS9L.mjs → field-CHlDI06h.mjs} +2 -2
  73. package/.output/server/_ssr/{getBundleChildren-rtkEEJw5.mjs → getBundleChildren-BJTufthT.mjs} +2 -2
  74. package/.output/server/_ssr/{git-CTA8Aqr0.mjs → git-WSg7LY17.mjs} +2 -2
  75. package/.output/server/_ssr/{input-group-DXofNRNJ.mjs → input-group-BPZ4UtB5.mjs} +1 -1
  76. package/.output/server/_ssr/{insights-Dm2UdEf_.mjs → insights-B3YetvBK.mjs} +5 -5
  77. package/.output/server/_ssr/{insights-C7rhyg61.mjs → insights-CEABWFk4.mjs} +26 -26
  78. package/.output/server/_ssr/{insights-D6kIjZuE.mjs → insights-Dn32lJ18.mjs} +2 -2
  79. package/.output/server/_ssr/{insights-api-DNmt4PWL.mjs → insights-api-CYPf5853.mjs} +5 -5
  80. package/.output/server/_ssr/{insights-errors-7BCwFybo.mjs → insights-errors-Bz3sWNZm.mjs} +2 -2
  81. package/.output/server/_ssr/{insights-failures-B9VPkzZE.mjs → insights-failures-DNQ9qVVf.mjs} +2 -2
  82. package/.output/server/_ssr/{insights-failures-rpc-DkrdYXJk.mjs → insights-failures-rpc-CxPpBR1K.mjs} +11 -11
  83. package/.output/server/_ssr/{insights-recovery-BtXVU3ro.mjs → insights-recovery-DOkpqnQ8.mjs} +1 -1
  84. package/.output/server/_ssr/{insights-recovery-rpc-DWLnLF_s.mjs → insights-recovery-rpc-CwnQMTE3.mjs} +7 -7
  85. package/.output/server/_ssr/{insights-rpc-CdYYZ7lE.mjs → insights-rpc-CKd5ATFI.mjs} +4 -4
  86. package/.output/server/_ssr/{insights-search-HVXIz64-.mjs → insights-search-B_92_iEj.mjs} +4 -4
  87. package/.output/server/_ssr/{insights-usage-DiGnuxW8.mjs → insights-usage-4KDIN3Kg.mjs} +1 -1
  88. package/.output/server/_ssr/{insights-usage-rpc-CLHS5JhI.mjs → insights-usage-rpc-D90uHpJJ.mjs} +7 -7
  89. package/.output/server/_ssr/{insights-usage-rpc-BCMRZErp.mjs → insights-usage-rpc-RIMNhPtj.mjs} +4 -4
  90. package/.output/server/_ssr/{insightsUsage-ClAmoUz8.mjs → insightsUsage-DmQdJZqT.mjs} +3 -3
  91. package/.output/server/_ssr/{insights_.distribution-zbVsH0TU.mjs → insights_.distribution-D42mHSe0.mjs} +14 -14
  92. package/.output/server/_ssr/{insights_.distribution-3NzANTBS.mjs → insights_.distribution-D4QWsHNo.mjs} +5 -5
  93. package/.output/server/_ssr/{insights_.distribution-BTbT0Z4H.mjs → insights_.distribution-DwjIdjQi.mjs} +2 -2
  94. package/.output/server/_ssr/{installations-BsCupWHx.mjs → installations-BIu66J6Q.mjs} +2 -2
  95. package/.output/server/_ssr/{installations-3XOT2V1j.mjs → installations-CfmO_V_R.mjs} +4 -4
  96. package/.output/server/_ssr/{installations-CpjqEYh_.mjs → installations-DyzKzWuv.mjs} +11 -11
  97. package/.output/server/_ssr/{listReleases-D_GY00SQ.mjs → listReleases-CQEceg8j.mjs} +1 -1
  98. package/.output/server/_ssr/{request-guard-CPdRBuGW.mjs → local-console-Dtxlsav0.mjs} +2 -9
  99. package/.output/server/_ssr/native-artifact-H1MDP0Jz.mjs +593 -0
  100. package/.output/server/_ssr/{native-builds-CehTsEwY.mjs → native-builds-BCp8ICrn.mjs} +3 -3
  101. package/.output/server/_ssr/{native-builds-vYKOMlhp.mjs → native-builds-CqFeXByK.mjs} +17 -13
  102. package/.output/server/_ssr/{native-builds-DhXL5zf_.mjs → native-builds-qj346atQ.mjs} +49 -12
  103. package/.output/server/_ssr/{native-builds_._buildId-BHxp9NcZ.mjs → native-builds_._buildId-BAxkkEFo.mjs} +600 -168
  104. package/.output/server/_ssr/{native-builds_._buildId-euhJ0EI7.mjs → native-builds_._buildId-C8gsW-Rh.mjs} +3 -3
  105. package/.output/server/_ssr/nativeBuildDevice-nU480p5A.mjs +230 -0
  106. package/.output/server/_ssr/nativeBuildDownloadLink-c3tcq3G5.mjs +96 -0
  107. package/.output/server/_ssr/nativeBuildInstall-B-_lHDsS.mjs +203 -0
  108. package/.output/server/_ssr/nativeBuildQr-C5AFtpmE.mjs +115 -0
  109. package/.output/server/_ssr/{nativeBuilds-B_7BPjt_.mjs → nativeBuilds-CbxOJDhO.mjs} +61 -29
  110. package/.output/server/_ssr/{plugins-RIryUNWj.mjs → plugins-CX7wutet.mjs} +6 -6
  111. package/.output/server/_ssr/publicConsoleBase-3IHSHvqd.mjs +27 -0
  112. package/.output/server/_ssr/{qr-code-C7kNRIDX.mjs → qr-code-pENFuyy9.mjs} +1 -1
  113. package/.output/server/_ssr/{release-adoption-DoAtNPED.mjs → release-adoption-C7sUFDwa.mjs} +2 -2
  114. package/.output/server/_ssr/{release-adoption-rpc-BF8svHjV.mjs → release-adoption-rpc-BBwJO2hu.mjs} +9 -9
  115. package/.output/server/_ssr/{releaseAdoption-a2byXMfz.mjs → releaseAdoption-LLYlRnUB.mjs} +4 -4
  116. package/.output/server/_ssr/{releaseCatalogCompiler-DLcean2k.mjs → releaseCatalogCompiler-D9dAMI17.mjs} +3 -3
  117. package/.output/server/_ssr/{releaseManagement-DHUux2az.mjs → releaseManagement-EPhok_Py.mjs} +1 -1
  118. package/.output/server/_ssr/{releaseReachability-DZOK_dH-.mjs → releaseReachability-DaZ7ifUF.mjs} +2 -2
  119. package/.output/server/_ssr/{remote-config-Bn-BZgDt.mjs → remote-config-B1g7vrQD.mjs} +2 -2
  120. package/.output/server/_ssr/{remote-config-ofOYh91b.mjs → remote-config-BDijmvj1.mjs} +2 -2
  121. package/.output/server/_ssr/{remote-config-DdukdePk.mjs → remote-config-DjeXVIcr.mjs} +18 -18
  122. package/.output/server/_ssr/{remote-config-rpc-CzSU_Gwg.mjs → remote-config-rpc-B7bzKw4N.mjs} +5 -5
  123. package/.output/server/_ssr/request-guard-BPLyogIN.mjs +11 -0
  124. package/.output/server/_ssr/{router-BQikCEhb.mjs → router-DhxgFNWn.mjs} +101 -50
  125. package/.output/server/_ssr/{routes-Brx45XtQ.mjs → routes-BC-rBuu_.mjs} +25 -25
  126. package/.output/server/_ssr/{routes-CTo-A_dj.mjs → routes-BDriEBtF.mjs} +12 -12
  127. package/.output/server/_ssr/{runtime.server-BdMY1blX.mjs → runtime.server-BsTTLV-B.mjs} +4 -4
  128. package/.output/server/_ssr/{schema-ChlRtZIo.mjs → schema-3oDJJFWa.mjs} +1 -1
  129. package/.output/server/_ssr/{schema-migration-rpc-BcwNAFZJ.mjs → schema-migration-rpc-CNMqY0RE.mjs} +4 -4
  130. package/.output/server/_ssr/{select-Dk_Yv0IG.mjs → select-hFD2e3Bh.mjs} +1 -1
  131. package/.output/server/_ssr/{server-b1jUGuT2.mjs → server-D_hG9iIq.mjs} +6 -6
  132. package/.output/server/_ssr/{sidebar-CsRdKfb2.mjs → sidebar-Dmq4j1qr.mjs} +2 -2
  133. package/.output/server/_ssr/ssr.mjs +1 -1
  134. package/.output/server/_ssr/{start-BvDsQehg.mjs → start-RjhaPVFE.mjs} +2 -2
  135. package/.output/server/_ssr/{switch-DpYvZqIf.mjs → switch-CkNsEp9k.mjs} +2 -2
  136. package/.output/server/_ssr/{table-BAP-tdNn.mjs → table-CTtXogFJ.mjs} +1 -1
  137. package/.output/server/_ssr/{tabs-DGN9JEGV.mjs → tabs-BTKDM4AJ.mjs} +2 -2
  138. package/.output/server/_ssr/{updateFailures-n-tGv90S.mjs → updateFailures-DPYzv9bE.mjs} +3 -3
  139. package/.output/server/_ssr/{uuidv7-BIF4nb_q.mjs → uuidv7-CmHbryZT.mjs} +2 -2
  140. package/.output/server/_ssr/{version-CQ98ZBpL-CWSkTT9J.mjs → version-CQ98ZBpL-NmbU0MD2.mjs} +1 -1
  141. package/.output/server/_tanstack-start-manifest_v-BuGAtKIu.mjs +189 -0
  142. package/.output/server/index.mjs +275 -275
  143. package/package.json +7 -7
  144. package/src/components/features/native-builds/BuiltInBundleCard.tsx +82 -33
  145. package/src/components/features/native-builds/InstallCard.tsx +246 -46
  146. package/src/components/features/native-builds/IosInstall.tsx +300 -0
  147. package/src/components/features/native-builds/NativeBuildsTable.tsx +3 -0
  148. package/src/components/features/native-builds/PatchesCard.tsx +3 -2
  149. package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +4 -4
  150. package/src/components/features/native-builds/ServedNowCard.tsx +33 -1
  151. package/src/components/features/native-builds/StoreSubmission.tsx +1 -1
  152. package/src/lib/api-rpc.ts +55 -6
  153. package/src/lib/api.ts +85 -12
  154. package/src/lib/native-builds.ts +73 -11
  155. package/src/lib/server/local-console.ts +1 -1
  156. package/src/lib/server/nativeBuildDevice.ts +274 -0
  157. package/src/lib/server/nativeBuildDownloadLink.ts +193 -0
  158. package/src/lib/server/nativeBuildInstall.ts +355 -0
  159. package/src/lib/server/nativeBuildQr.ts +114 -24
  160. package/src/lib/server/nativeBuilds.ts +87 -33
  161. package/src/lib/server/plistText.ts +17 -0
  162. package/src/lib/server/publicConsoleBase.ts +17 -0
  163. package/src/routeTree.gen.ts +114 -0
  164. package/src/routes/[_]hot-updater/native-builds/$buildId/device-response.ts +17 -0
  165. package/src/routes/[_]hot-updater/native-builds/$buildId/device.ts +17 -0
  166. package/src/routes/[_]hot-updater/native-builds/$buildId/device[.]mobileconfig.ts +17 -0
  167. package/src/routes/[_]hot-updater/native-builds/$buildId/manifest[.]plist.ts +22 -0
  168. package/src/routes/[_]hot-updater/native-builds/preview-qr.ts +14 -0
  169. package/src/routes/api/native-builds/$buildId/download.ts +22 -1
  170. package/.output/public/assets/RolloutPercentageBadge-Cxogpi8F.js +0 -1
  171. package/.output/public/assets/api-P2g8dCNg.js +0 -1
  172. package/.output/public/assets/api-keys-DWQC2q6y.js +0 -1
  173. package/.output/public/assets/insights-BSVGfxSL.js +0 -1
  174. package/.output/public/assets/insights-NK5B6ReS.js +0 -2
  175. package/.output/public/assets/insights_.distribution-CJvgwcVZ.js +0 -2
  176. package/.output/public/assets/insights_.distribution-DblZM0mO.js +0 -1
  177. package/.output/public/assets/installations-Dv4kWQYz.js +0 -1
  178. package/.output/public/assets/native-builds-BGgFQTDW.js +0 -2
  179. package/.output/public/assets/native-builds-BOC71grI.js +0 -1
  180. package/.output/public/assets/native-builds-CxomzFqe.js +0 -1
  181. package/.output/public/assets/native-builds_._buildId-DD58_Phd.js +0 -1
  182. package/.output/public/assets/native-builds_._buildId-DvQDKnUQ.js +0 -2
  183. package/.output/public/assets/remote-config-gXeH6PBW.js +0 -1
  184. package/.output/public/assets/routes-BDdBIxYS.js +0 -1
  185. package/.output/server/_ssr/nativeBuildQr-84cnFQPX.mjs +0 -59
  186. package/.output/server/_tanstack-start-manifest_v-uhJWytDm.mjs +0 -184
  187. /package/.output/public/assets/{NotFoundPage-DZ3DxyRA.js → NotFoundPage-fiaucvsO.js} +0 -0
  188. /package/.output/public/assets/{PlatformIcon-BBWQlWm9.js → PlatformIcon-DCTtCP5t.js} +0 -0
  189. /package/.output/public/assets/{alert-dialog-BqYScr9y.js → alert-dialog-Z_RNBrFc.js} +0 -0
  190. /package/.output/public/assets/{badge-DWFcDWho.js → badge-UNnTz4Dl.js} +0 -0
  191. /package/.output/public/assets/{dialog-CNUPxNxH.js → dialog-C2U9bINi.js} +0 -0
  192. /package/.output/public/assets/{dist-CPlO6ko9.js → dist-UQUhRoJi.js} +0 -0
  193. /package/.output/public/assets/{empty-B3Uwdd6k.js → empty-PAp07lsC.js} +0 -0
  194. /package/.output/public/assets/{field-D-2-mnNh.js → field-DhKRWFG5.js} +0 -0
  195. /package/.output/public/assets/{history-DqHlgSuV.js → history-DakJoeSM.js} +0 -0
  196. /package/.output/public/assets/{input-group-D3OUBk4n.js → input-group-BJfBVqeI.js} +0 -0
  197. /package/.output/public/assets/{key-round-DwNKkHhy.js → key-round-DzBe6DHr.js} +0 -0
  198. /package/.output/public/assets/{list--NIee1FZ.js → list-B6GeoQ_b.js} +0 -0
  199. /package/.output/public/assets/{plus-BReVKct-.js → plus-BVhOauU3.js} +0 -0
  200. /package/.output/public/assets/{refresh-cw-B9HHjLej.js → refresh-cw-C6svDMfM.js} +0 -0
  201. /package/.output/public/assets/{relativeTime-YQt84dYr.js → relativeTime-BscR0TsX.js} +0 -0
  202. /package/.output/public/assets/{rotate-cw-Cv2aVbYr.js → rotate-cw-CxFW64IG.js} +0 -0
  203. /package/.output/public/assets/{search-BCel4Oy6.js → search-bIYGuFCt.js} +0 -0
  204. /package/.output/public/assets/{smartphone-CMaSy_ir.js → smartphone-Bn5FtEwt.js} +0 -0
  205. /package/.output/public/assets/{switch-BpdiHL_t.js → switch-DtUu1RCw.js} +0 -0
  206. /package/.output/public/assets/{table-Bpy3SvSo.js → table-B22H8-RL.js} +0 -0
  207. /package/.output/public/assets/{tabs-Xmt7tZeG.js → tabs-Fgz3sA51.js} +0 -0
  208. /package/.output/public/assets/{undo-2-CUX96_BG.js → undo-2-7gOxArtb.js} +0 -0
  209. /package/.output/public/assets/{uuidv7-zXMtwR9Q.js → uuidv7-BLyD3pAM.js} +0 -0
  210. /package/.output/public/assets/{valueToPercent-BLwGy_xK.js → valueToPercent-DRLgSP0P.js} +0 -0
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/insights-B0_8xNxr.js","assets/ConsoleFeatureUnavailable-oMmbaqF6.js","assets/sidebar-Di9SN47G.js","assets/console-features-api-DEXSwFtc.js","assets/arrow-up-right-DK8Zdg40.js","assets/NotFoundPage-fiaucvsO.js","assets/link-DTEyW70e.js","assets/empty-PAp07lsC.js","assets/insights-BbIzm_QG.js","assets/alert-dialog-Z_RNBrFc.js","assets/select-CBIU0_M1.js","assets/useCompositeListItem-JmyDfo3-.js","assets/check-CXVR3s3X.js","assets/tabs-Fgz3sA51.js","assets/insights-usage-rpc-zut_JaSS.js","assets/valueToPercent-DRLgSP0P.js","assets/EventDetails-ly7ygfdH.js","assets/insights-api-BVCXJsoV.js","assets/useInfiniteQuery-DX4WpBRG.js","assets/copy-DsuLj3oj.js","assets/download-Cf24LBde.js","assets/input-group-BJfBVqeI.js","assets/smartphone-Bn5FtEwt.js","assets/badge-UNnTz4Dl.js","assets/dist-UQUhRoJi.js","assets/HashValueDisplay-BNoXZADg.js","assets/InsightsPageHeader-q2FgL8xS.js","assets/list-B6GeoQ_b.js","assets/arrow-right-CNII8TYn.js","assets/chevron-right-BoUXo82O.js","assets/circle-off-C7Muo0ss.js","assets/refresh-cw-C6svDMfM.js","assets/rotate-cw-CxFW64IG.js","assets/undo-2-7gOxArtb.js","assets/insights-search-B5cZsP6C.js","assets/uuidv7-BLyD3pAM.js","assets/PlatformIcon-DCTtCP5t.js","assets/table-B22H8-RL.js","assets/api-BEEYDSCX.js","assets/useMutation-DbYw7boA.js"])))=>i.map(i=>d[i]);
2
+ import{n as e,r as t,t as n}from"./preload-helper-B44EvKhG.js";import{r}from"./console-features-api-DEXSwFtc.js";import{a as i}from"./insights-search-B5cZsP6C.js";var a=t(`/insights`)({beforeLoad:({context:e})=>r(e.queryClient,`insightsAnalytics`),notFoundComponent:e(()=>n(()=>import(`./insights-B0_8xNxr.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),`notFoundComponent`),component:e(()=>n(()=>import(`./insights-BbIzm_QG.js`),__vite__mapDeps([8,2,9,10,11,12,13,14,15,6,16,17,18,19,20,21,22,23,24,25,26,3,27,7,28,4,29,30,31,32,33,34,35,36,37,38,39])),`component`),validateSearch:i});export{a as t};
@@ -1 +1 @@
1
- import{Fn as e,Wr as t,ii as n,it as r,nt as i,ti as a,tt as o}from"./sidebar-Di9SN47G.js";import{b as s}from"./insights-api-BVCXJsoV.js";import{m as c,t as l}from"./uuidv7-zXMtwR9Q.js";var u=n(a(),1),d=t();function f({label:t,children:n}){let a=(0,u.useId)(),[c,l]=(0,u.useState)(!1);return(0,d.jsxs)(o,{open:c,onOpenChange:l,triggerId:a,children:[(0,d.jsx)(r,{id:a,"aria-describedby":c?`${a}-description`:void 0,closeOnClick:!1,onClick:()=>l(e=>!e),render:(0,d.jsx)(e,{"aria-label":t,className:`size-11 sm:size-7`,size:`icon`,variant:`ghost`}),children:(0,d.jsx)(s,{})}),(0,d.jsx)(i,{id:`${a}-description`,role:`tooltip`,className:`max-w-64`,side:`bottom`,children:n})]})}var p=e=>typeof e==`string`&&e.trim().length>0&&e.length<=1024?e:void 0,m=e=>e===`24h`||e===`7d`||e===`30d`?e:void 0,h=e=>e===`adoption`||e===`crashes`?e:void 0,g=e=>e===`12m`?e:m(e),_=`production`,v=e=>e===`all`||e===`ios`||e===`android`?e:void 0;function y(e){return{platform:v(e.platform),channel:p(e.channel),appVersion:p(e.appVersion),window:g(e.window),bundleWindow:m(e.bundleWindow),releaseId:p(e.releaseId),healthChart:h(e.healthChart),bundles:p(e.bundles)}}function b(e){return{...y(e),version:p(e.version),page:typeof e.page==`number`&&Number.isSafeInteger(e.page)&&e.page>0?e.page:void 0}}function x(e,t=Date.now()){if(!c(e))return`7d`;let n=t-l(e);return n<=864e5?`24h`:n<=7*864e5?`7d`:`30d`}var S=e=>e===void 0?void 0:[...new Set(e.split(`,`).filter(e=>e.length>0))];export{y as a,b as i,x as n,f as o,S as r,_ as t};
1
+ import{Fn as e,Wr as t,ii as n,it as r,nt as i,ti as a,tt as o}from"./sidebar-Di9SN47G.js";import{b as s}from"./insights-api-BVCXJsoV.js";import{m as c,t as l}from"./uuidv7-BLyD3pAM.js";var u=n(a(),1),d=t();function f({label:t,children:n}){let a=(0,u.useId)(),[c,l]=(0,u.useState)(!1);return(0,d.jsxs)(o,{open:c,onOpenChange:l,triggerId:a,children:[(0,d.jsx)(r,{id:a,"aria-describedby":c?`${a}-description`:void 0,closeOnClick:!1,onClick:()=>l(e=>!e),render:(0,d.jsx)(e,{"aria-label":t,className:`size-11 sm:size-7`,size:`icon`,variant:`ghost`}),children:(0,d.jsx)(s,{})}),(0,d.jsx)(i,{id:`${a}-description`,role:`tooltip`,className:`max-w-64`,side:`bottom`,children:n})]})}var p=e=>typeof e==`string`&&e.trim().length>0&&e.length<=1024?e:void 0,m=e=>e===`24h`||e===`7d`||e===`30d`?e:void 0,h=e=>e===`adoption`||e===`crashes`?e:void 0,g=e=>e===`12m`?e:m(e),_=`production`,v=e=>e===`all`||e===`ios`||e===`android`?e:void 0;function y(e){return{platform:v(e.platform),channel:p(e.channel),appVersion:p(e.appVersion),window:g(e.window),bundleWindow:m(e.bundleWindow),releaseId:p(e.releaseId),healthChart:h(e.healthChart),bundles:p(e.bundles)}}function b(e){return{...y(e),version:p(e.version),page:typeof e.page==`number`&&Number.isSafeInteger(e.page)&&e.page>0?e.page:void 0}}function x(e,t=Date.now()){if(!c(e))return`7d`;let n=t-l(e);return n<=864e5?`24h`:n<=7*864e5?`7d`:`30d`}var S=e=>e===void 0?void 0:[...new Set(e.split(`,`).filter(e=>e.length>0))];export{y as a,b as i,x as n,f as o,S as r,_ as t};
@@ -1 +1 @@
1
- import{Bn as e,Gr as t,Jn as n,Ln as r,Ut as i,Vr as a,Wr as o,ii as s,nr as c,qt as l,ti as u}from"./sidebar-Di9SN47G.js";import{r as d,t as f}from"./valueToPercent-BLwGy_xK.js";var p=s(u()),m=p.createContext(void 0);function h(){let e=p.useContext(m);if(e===void 0)throw Error(n(51));return e}var g=function(e){return e.complete=`data-complete`,e.indeterminate=`data-indeterminate`,e.progressing=`data-progressing`,e}({}),_={status(e){return e===`progressing`?{[g.progressing]:``}:e===`complete`?{[g.complete]:``}:e===`indeterminate`?{[g.indeterminate]:``}:null}},v=o();function y(e,t){return t==null?`indeterminate progress`:e||`${t}%`}var b=p.forwardRef(function(t,n){let{format:r,getAriaValueText:a=y,locale:o,max:s=100,min:c=0,value:u,render:f,className:h,children:g,style:b,...x}=t,[S,C]=p.useState(),w=l(r),T=`indeterminate`;Number.isFinite(u)&&(T=u===s?`complete`:`progressing`);let E=d(u,o,w.current),D=p.useMemo(()=>({status:T}),[T]),O={"aria-labelledby":S,"aria-valuemax":s,"aria-valuemin":c,"aria-valuenow":u??void 0,"aria-valuetext":a(E,u),role:`progressbar`,children:(0,v.jsxs)(p.Fragment,{children:[g,(0,v.jsx)(`span`,{role:`presentation`,style:i,children:`x`})]})},k=p.useMemo(()=>({formattedValue:E,max:s,min:c,setLabelId:C,state:D,status:T,value:u}),[E,s,c,C,D,T,u]),A=e(`div`,t,{state:D,ref:n,props:[O,x],stateAttributesMapping:_});return(0,v.jsx)(m.Provider,{value:k,children:A})}),x=p.forwardRef(function(t,n){let{render:r,className:i,style:a,...o}=t,{state:s}=h();return e(`div`,t,{state:s,ref:n,props:o,stateAttributesMapping:_})}),S=p.forwardRef(function(t,n){let{render:r,className:i,style:a,...o}=t,{max:s,min:c,value:l,state:u}=h(),d=Number.isFinite(l)&&l!==null?f(l,c,s):null;return e(`div`,t,{state:u,ref:n,props:[{style:d==null?{}:{insetInlineStart:0,height:`inherit`,width:`${d}%`}},o],stateAttributesMapping:_})});function C({className:e,children:t,value:n,...i}){return(0,v.jsxs)(b,{value:n,"data-slot":`progress`,className:r(`w-full`,e),...i,children:[t,(0,v.jsx)(w,{children:(0,v.jsx)(T,{})})]})}function w({className:e,...t}){return(0,v.jsx)(x,{className:r(`relative flex h-1 w-full items-center overflow-x-hidden rounded-md bg-muted`,e),"data-slot":`progress-track`,...t})}function T({className:e,...t}){return(0,v.jsx)(S,{"data-slot":`progress-indicator`,className:r(`h-full bg-primary transition-transform motion-reduce:transition-none`,e),...t})}var E=a({method:`GET`}).middleware([c]).handler(t(`8a98cd9c178e4a54185d62c25a95f09d3d59850c43d3f5baa1563e1614ad942e`));export{C as n,E as t};
1
+ import{Bn as e,Gr as t,Jn as n,Ln as r,Ut as i,Vr as a,Wr as o,ii as s,nr as c,qt as l,ti as u}from"./sidebar-Di9SN47G.js";import{r as d,t as f}from"./valueToPercent-DRLgSP0P.js";var p=s(u()),m=p.createContext(void 0);function h(){let e=p.useContext(m);if(e===void 0)throw Error(n(51));return e}var g=function(e){return e.complete=`data-complete`,e.indeterminate=`data-indeterminate`,e.progressing=`data-progressing`,e}({}),_={status(e){return e===`progressing`?{[g.progressing]:``}:e===`complete`?{[g.complete]:``}:e===`indeterminate`?{[g.indeterminate]:``}:null}},v=o();function y(e,t){return t==null?`indeterminate progress`:e||`${t}%`}var b=p.forwardRef(function(t,n){let{format:r,getAriaValueText:a=y,locale:o,max:s=100,min:c=0,value:u,render:f,className:h,children:g,style:b,...x}=t,[S,C]=p.useState(),w=l(r),T=`indeterminate`;Number.isFinite(u)&&(T=u===s?`complete`:`progressing`);let E=d(u,o,w.current),D=p.useMemo(()=>({status:T}),[T]),O={"aria-labelledby":S,"aria-valuemax":s,"aria-valuemin":c,"aria-valuenow":u??void 0,"aria-valuetext":a(E,u),role:`progressbar`,children:(0,v.jsxs)(p.Fragment,{children:[g,(0,v.jsx)(`span`,{role:`presentation`,style:i,children:`x`})]})},k=p.useMemo(()=>({formattedValue:E,max:s,min:c,setLabelId:C,state:D,status:T,value:u}),[E,s,c,C,D,T,u]),A=e(`div`,t,{state:D,ref:n,props:[O,x],stateAttributesMapping:_});return(0,v.jsx)(m.Provider,{value:k,children:A})}),x=p.forwardRef(function(t,n){let{render:r,className:i,style:a,...o}=t,{state:s}=h();return e(`div`,t,{state:s,ref:n,props:o,stateAttributesMapping:_})}),S=p.forwardRef(function(t,n){let{render:r,className:i,style:a,...o}=t,{max:s,min:c,value:l,state:u}=h(),d=Number.isFinite(l)&&l!==null?f(l,c,s):null;return e(`div`,t,{state:u,ref:n,props:[{style:d==null?{}:{insetInlineStart:0,height:`inherit`,width:`${d}%`}},o],stateAttributesMapping:_})});function C({className:e,children:t,value:n,...i}){return(0,v.jsxs)(b,{value:n,"data-slot":`progress`,className:r(`w-full`,e),...i,children:[t,(0,v.jsx)(w,{children:(0,v.jsx)(T,{})})]})}function w({className:e,...t}){return(0,v.jsx)(x,{className:r(`relative flex h-1 w-full items-center overflow-x-hidden rounded-md bg-muted`,e),"data-slot":`progress-track`,...t})}function T({className:e,...t}){return(0,v.jsx)(S,{"data-slot":`progress-indicator`,className:r(`h-full bg-primary transition-transform motion-reduce:transition-none`,e),...t})}var E=a({method:`GET`}).middleware([c]).handler(t(`8a98cd9c178e4a54185d62c25a95f09d3d59850c43d3f5baa1563e1614ad942e`));export{C as n,E as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./ConsoleFeatureUnavailable-oMmbaqF6.js";var t=e;export{t as notFoundComponent};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/insights_.distribution-DLxq-IKU.js","assets/ConsoleFeatureUnavailable-oMmbaqF6.js","assets/sidebar-Di9SN47G.js","assets/console-features-api-DEXSwFtc.js","assets/arrow-up-right-DK8Zdg40.js","assets/NotFoundPage-fiaucvsO.js","assets/link-DTEyW70e.js","assets/empty-PAp07lsC.js","assets/insights_.distribution-rdeyNhH2.js","assets/select-CBIU0_M1.js","assets/useCompositeListItem-JmyDfo3-.js","assets/check-CXVR3s3X.js","assets/insights-usage-rpc-zut_JaSS.js","assets/valueToPercent-DRLgSP0P.js","assets/arrow-left-g9cKqXuC.js","assets/insights-api-BVCXJsoV.js","assets/useInfiniteQuery-DX4WpBRG.js","assets/rotate-cw-CxFW64IG.js","assets/badge-UNnTz4Dl.js","assets/insights-search-B5cZsP6C.js","assets/uuidv7-BLyD3pAM.js","assets/PlatformIcon-DCTtCP5t.js","assets/InsightsPageHeader-q2FgL8xS.js","assets/tabs-Fgz3sA51.js","assets/list-B6GeoQ_b.js","assets/field-DhKRWFG5.js"])))=>i.map(i=>d[i]);
2
+ import{n as e,r as t,t as n}from"./preload-helper-B44EvKhG.js";import{r}from"./console-features-api-DEXSwFtc.js";import{i}from"./insights-search-B5cZsP6C.js";var a=t(`/insights_/distribution`)({beforeLoad:({context:e})=>r(e.queryClient,`insightsAnalytics`),notFoundComponent:e(()=>n(()=>import(`./insights_.distribution-DLxq-IKU.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),`notFoundComponent`),component:e(()=>n(()=>import(`./insights_.distribution-rdeyNhH2.js`),__vite__mapDeps([8,2,9,10,11,12,13,6,14,4,15,16,17,18,19,20,21,22,23,3,24,7,25])),`component`),validateSearch:i});export{a as t};
@@ -1 +1 @@
1
- import{$ as e,Fn as t,In as n,Wr as r,ar as i}from"./sidebar-Di9SN47G.js";import{t as a}from"./link-DTEyW70e.js";import{t as o}from"./arrow-left-g9cKqXuC.js";import{t as s}from"./arrow-up-right-DK8Zdg40.js";import{o as c,u as l}from"./insights-api-BVCXJsoV.js";import{a as u,i as d,n as f,o as p,r as m,t as h}from"./select-CBIU0_M1.js";import{t as g}from"./rotate-cw-Cv2aVbYr.js";import{a as _,d as v,i as y,l as ee,n as te,o as ne,s as re,t as b,u as x}from"./badge-DWFcDWho.js";import{a as S,o as C}from"./insights-search-DghCbEnk.js";import{i as w,o as T,r as E,t as D}from"./empty-B3Uwdd6k.js";import{t as O}from"./PlatformIcon-BBWQlWm9.js";import{a as k,t as A}from"./field-D-2-mnNh.js";import{t as j}from"./insights_.distribution-CJvgwcVZ.js";import{i as M}from"./valueToPercent-BLwGy_xK.js";import{n as N,t as P}from"./insights-usage-rpc-CKQH0pUS.js";import{c as ie,n as F,o as I,t as L}from"./InsightsPageHeader-DHhqY3DT.js";var R=r(),z=20,B=new Intl.DateTimeFormat(`en`,{month:`short`,day:`numeric`,timeZone:`UTC`}),V=e=>e.releaseId??(e.builtinBundleId?`Built-in bundle ${e.builtinBundleId}`:`Unknown bundle`);function H({bundleId:e}){return(0,R.jsxs)(`div`,{className:`flex min-h-11 min-w-0 flex-wrap items-center gap-2 md:min-h-9`,children:[(0,R.jsx)(F,{}),(0,R.jsx)(M,{bundleId:e,className:`text-muted-foreground`})]})}function U(){let r=j.useSearch(),M=c(),F=j.useNavigate(),U={platform:r.platform??`all`,channel:r.channel??`production`,appVersion:r.appVersion,window:r.window??`24h`},W=i({queryKey:[`insights`,`app-usage`,U],queryFn:()=>P({data:U}),staleTime:3e4}),G=W.error?void 0:W.data,K=G?`since ${B.format(G.distributionSinceMs)}, 00:00 UTC`:`in this period`,q=(G?.bundleDistribution??[]).filter(e=>!r.version||e.appVersion===r.version),J=q.reduce((e,t)=>e+t.installations,0),Y=Math.max(1,Math.ceil(q.length/z)),X=Math.min(r.page??1,Y),Z=[...new Set([...G?.versions.map(e=>e.name)??[],...r.version?[r.version]:[]])],Q=S(r),$=e=>void F({search:{...r,page:void 0,...e}});return(0,R.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,R.jsx)(L,{view:`distribution`,overviewSearch:Q}),(0,R.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 px-4 py-6 sm:p-8`,children:(0,R.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col gap-6`,children:[(0,R.jsxs)(a,{to:`/insights`,search:Q,className:n({variant:`ghost`,className:`h-11 w-fit sm:h-9`}),children:[(0,R.jsx)(o,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Back to overview`]}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-4`,children:[(0,R.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight`,children:`Distribution`}),(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsx)(I,{twelveMonths:l(M),window:U.window,onWindowChange:e=>$({window:e})}),(0,R.jsx)(t,{"aria-label":`Refresh distribution`,variant:`ghost`,size:`icon`,className:`size-11 sm:size-9`,disabled:W.isFetching,onClick:()=>void W.refetch(),children:(0,R.jsx)(g,{"aria-hidden":`true`})})]})]}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-4`,children:[(0,R.jsxs)(A,{className:`w-full sm:w-64`,children:[(0,R.jsx)(k,{htmlFor:`distribution-version`,children:`App version`}),(0,R.jsxs)(h,{items:Object.fromEntries([[`all`,`All versions`],...Z.map(e=>[`version:${e}`,e])]),value:r.version?`version:${r.version}`:`all`,onValueChange:e=>{e!==null&&$({version:e===`all`?void 0:e.slice(8)})},children:[(0,R.jsx)(u,{id:`distribution-version`,className:`min-h-11 w-full sm:min-h-9`,children:(0,R.jsx)(p,{})}),(0,R.jsx)(f,{children:(0,R.jsxs)(m,{children:[(0,R.jsx)(d,{value:`all`,children:`All versions`}),Z.map(e=>(0,R.jsx)(d,{value:`version:${e}`,children:e},e))]})})]})]}),(0,R.jsxs)(`div`,{className:`flex min-h-9 flex-wrap items-center gap-2`,"aria-label":`Distribution scope`,children:[(0,R.jsxs)(b,{variant:`outline`,className:`gap-1.5`,children:[U.platform===`all`?null:(0,R.jsx)(O,{platform:U.platform,className:`size-3.5`}),U.platform===`all`?`All platforms`:U.platform===`ios`?`iOS`:`Android`]}),(0,R.jsx)(b,{variant:`outline`,children:U.channel}),U.appVersion?(0,R.jsxs)(b,{variant:`outline`,children:[`Reports from `,U.appVersion]}):null]})]}),(0,R.jsxs)(ne,{"aria-label":`Bundles by app version`,role:`region`,className:`min-w-0`,children:[(0,R.jsxs)(x,{className:`flex flex-col gap-3`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,R.jsx)(v,{children:`Bundles by app version`}),(0,R.jsxs)(C,{label:`How bundle distribution is counted`,children:[`Each installation counts once, by its latest report`,` `,K,`. Shares are within each app version. Built-in bundle: the bundle the native build shipped, by its ID. Unknown bundle: no deployment and no built-in bundle ID.`]})]}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1`,children:[W.isPending?(0,R.jsx)(e,{className:`h-9 w-16`}):(0,R.jsx)(`p`,{className:`text-3xl font-semibold tabular-nums`,children:G?`${G.truncated?`≥`:``}${J.toLocaleString()}`:`—`}),(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Reporting installations`})]})]}),(0,R.jsxs)(re,{className:`flex min-w-0 flex-col gap-4`,children:[G?.truncated?(0,R.jsxs)(te,{children:[(0,R.jsx)(_,{children:`Partial history`}),(0,R.jsxs)(y,{children:[`Counts and shares reflect reports since`,` `,new Date(G.sinceMs).toLocaleString(`en`,{timeZone:`UTC`}),` `,`UTC. Choose a shorter period for a more complete view.`]})]}):null,W.isPending?(0,R.jsx)(e,{"aria-label":`Loading bundle distribution`,className:`h-64`}):W.error?(0,R.jsxs)(`div`,{className:`flex flex-col items-start gap-4`,children:[(0,R.jsx)(ie,{error:W.error,fallbackTitle:`Distribution unavailable`}),(0,R.jsx)(t,{variant:`outline`,onClick:()=>void W.refetch(),children:`Retry distribution`})]}):q.length===0?(0,R.jsxs)(D,{children:[(0,R.jsxs)(w,{children:[(0,R.jsx)(T,{children:`No bundles reported`}),(0,R.jsx)(E,{children:`Choose another version or period, or change the filters in the overview.`})]}),(0,R.jsx)(t,{variant:`outline`,onClick:()=>$({version:void 0}),children:`Show all versions`})]}):(0,R.jsxs)(`div`,{className:`min-w-0`,children:[(0,R.jsxs)(`div`,{"aria-hidden":`true`,className:`hidden grid-cols-[8rem_minmax(0,1fr)_7rem_7rem] gap-4 border-b px-3 pb-3 text-xs text-muted-foreground md:grid`,children:[(0,R.jsx)(`span`,{children:`App version`}),(0,R.jsx)(`span`,{children:`Bundle ID`}),(0,R.jsx)(`span`,{className:`text-right`,children:`Active installations`}),(0,R.jsx)(`span`,{className:`text-right`,children:`Version share`})]}),(0,R.jsx)(`ul`,{"aria-label":`Bundle distribution`,className:`divide-y`,children:q.slice((X-1)*z,X*z).map(e=>{let t=G?.versions.find(t=>t.name===e.appVersion)?.installations??0,n=t>0?e.installations/t*100:0;return(0,R.jsxs)(`li`,{className:`grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 gap-y-3 px-1 py-4 md:grid-cols-[8rem_minmax(0,1fr)_7rem_7rem] md:px-3`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,R.jsx)(`span`,{className:`truncate text-sm font-medium`,title:e.appVersion,children:e.appVersion}),(0,R.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,R.jsx)(O,{platform:e.platform,className:`size-3.5`}),e.platform===`ios`?`iOS`:`Android`]})]}),(0,R.jsxs)(`div`,{className:`col-span-2 row-start-2 min-w-0 md:col-span-1 md:row-auto`,children:[e.releaseId?(0,R.jsxs)(a,{to:`/`,search:{releaseId:e.releaseId},"aria-label":`Review bundle ${e.releaseId} for app version ${e.appVersion}`,className:`flex min-h-11 min-w-0 items-center gap-2 text-xs underline-offset-4 hover:underline md:min-h-9`,children:[(0,R.jsx)(`span`,{className:`break-all font-mono`,children:e.releaseId}),(0,R.jsx)(s,{"aria-hidden":`true`,className:`size-3.5 shrink-0`})]}):e.builtinBundleId?null:(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Unknown bundle`}),e.builtinBundleId?(0,R.jsx)(H,{bundleId:e.builtinBundleId}):null]}),(0,R.jsxs)(`div`,{className:`col-start-2 row-start-1 text-right md:col-auto md:row-auto`,children:[(0,R.jsx)(`span`,{className:`text-sm font-medium tabular-nums`,children:e.installations.toLocaleString()}),(0,R.jsx)(`span`,{className:`ml-1 text-xs text-muted-foreground md:sr-only`,children:`active`}),(0,R.jsxs)(`p`,{className:`mt-1 text-xs tabular-nums text-muted-foreground md:hidden`,children:[n.toFixed(1),`% of version`]})]}),(0,R.jsxs)(`div`,{className:`hidden flex-col gap-2 md:flex`,children:[(0,R.jsxs)(`span`,{className:`text-right text-sm tabular-nums`,children:[n.toFixed(1),`%`]}),(0,R.jsx)(N,{"aria-label":`${V(e)} share in ${e.appVersion} on ${e.platform}`,value:n})]})]},JSON.stringify([e.appVersion,e.platform,e.releaseId,e.builtinBundleId]))})})]})]}),G&&q.length>0?(0,R.jsxs)(ee,{className:`flex flex-wrap items-center justify-between gap-3 border-t pt-4`,children:[(0,R.jsxs)(`p`,{className:`text-xs tabular-nums text-muted-foreground`,children:[(X-1)*z+1,`–`,Math.min(X*z,q.length),` of `,q.length]}),(0,R.jsxs)(`nav`,{"aria-label":`Distribution pages`,className:`flex gap-2`,children:[(0,R.jsx)(t,{variant:`outline`,className:`h-11 sm:h-9`,disabled:X<=1,onClick:()=>$({page:X-1}),children:`Previous`}),(0,R.jsx)(t,{variant:`outline`,className:`h-11 sm:h-9`,disabled:X>=Y,onClick:()=>$({page:X+1}),children:`Next`})]})]}):null]})]})})]})}export{U as component};
1
+ import{$ as e,Fn as t,In as n,Wr as r,ar as i}from"./sidebar-Di9SN47G.js";import{t as a}from"./link-DTEyW70e.js";import{t as o}from"./arrow-left-g9cKqXuC.js";import{t as s}from"./arrow-up-right-DK8Zdg40.js";import{o as c,u as l}from"./insights-api-BVCXJsoV.js";import{a as u,i as d,n as f,o as p,r as m,t as h}from"./select-CBIU0_M1.js";import{t as g}from"./rotate-cw-CxFW64IG.js";import{a as _,d as v,i as y,l as ee,n as te,o as ne,s as re,t as b,u as x}from"./badge-UNnTz4Dl.js";import{a as S,o as C}from"./insights-search-B5cZsP6C.js";import{i as w,o as T,r as E,t as D}from"./empty-PAp07lsC.js";import{t as O}from"./PlatformIcon-DCTtCP5t.js";import{a as k,t as A}from"./field-DhKRWFG5.js";import{t as j}from"./insights_.distribution-izFBYfJL.js";import{i as M}from"./valueToPercent-DRLgSP0P.js";import{n as N,t as P}from"./insights-usage-rpc-zut_JaSS.js";import{c as ie,n as F,o as I,t as L}from"./InsightsPageHeader-q2FgL8xS.js";var R=r(),z=20,B=new Intl.DateTimeFormat(`en`,{month:`short`,day:`numeric`,timeZone:`UTC`}),V=e=>e.releaseId??(e.builtinBundleId?`Built-in bundle ${e.builtinBundleId}`:`Unknown bundle`);function H({bundleId:e}){return(0,R.jsxs)(`div`,{className:`flex min-h-11 min-w-0 flex-wrap items-center gap-2 md:min-h-9`,children:[(0,R.jsx)(F,{}),(0,R.jsx)(M,{bundleId:e,className:`text-muted-foreground`})]})}function U(){let r=j.useSearch(),M=c(),F=j.useNavigate(),U={platform:r.platform??`all`,channel:r.channel??`production`,appVersion:r.appVersion,window:r.window??`24h`},W=i({queryKey:[`insights`,`app-usage`,U],queryFn:()=>P({data:U}),staleTime:3e4}),G=W.error?void 0:W.data,K=G?`since ${B.format(G.distributionSinceMs)}, 00:00 UTC`:`in this period`,q=(G?.bundleDistribution??[]).filter(e=>!r.version||e.appVersion===r.version),J=q.reduce((e,t)=>e+t.installations,0),Y=Math.max(1,Math.ceil(q.length/z)),X=Math.min(r.page??1,Y),Z=[...new Set([...G?.versions.map(e=>e.name)??[],...r.version?[r.version]:[]])],Q=S(r),$=e=>void F({search:{...r,page:void 0,...e}});return(0,R.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,R.jsx)(L,{view:`distribution`,overviewSearch:Q}),(0,R.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 px-4 py-6 sm:p-8`,children:(0,R.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col gap-6`,children:[(0,R.jsxs)(a,{to:`/insights`,search:Q,className:n({variant:`ghost`,className:`h-11 w-fit sm:h-9`}),children:[(0,R.jsx)(o,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Back to overview`]}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-4`,children:[(0,R.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight`,children:`Distribution`}),(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsx)(I,{twelveMonths:l(M),window:U.window,onWindowChange:e=>$({window:e})}),(0,R.jsx)(t,{"aria-label":`Refresh distribution`,variant:`ghost`,size:`icon`,className:`size-11 sm:size-9`,disabled:W.isFetching,onClick:()=>void W.refetch(),children:(0,R.jsx)(g,{"aria-hidden":`true`})})]})]}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-4`,children:[(0,R.jsxs)(A,{className:`w-full sm:w-64`,children:[(0,R.jsx)(k,{htmlFor:`distribution-version`,children:`App version`}),(0,R.jsxs)(h,{items:Object.fromEntries([[`all`,`All versions`],...Z.map(e=>[`version:${e}`,e])]),value:r.version?`version:${r.version}`:`all`,onValueChange:e=>{e!==null&&$({version:e===`all`?void 0:e.slice(8)})},children:[(0,R.jsx)(u,{id:`distribution-version`,className:`min-h-11 w-full sm:min-h-9`,children:(0,R.jsx)(p,{})}),(0,R.jsx)(f,{children:(0,R.jsxs)(m,{children:[(0,R.jsx)(d,{value:`all`,children:`All versions`}),Z.map(e=>(0,R.jsx)(d,{value:`version:${e}`,children:e},e))]})})]})]}),(0,R.jsxs)(`div`,{className:`flex min-h-9 flex-wrap items-center gap-2`,"aria-label":`Distribution scope`,children:[(0,R.jsxs)(b,{variant:`outline`,className:`gap-1.5`,children:[U.platform===`all`?null:(0,R.jsx)(O,{platform:U.platform,className:`size-3.5`}),U.platform===`all`?`All platforms`:U.platform===`ios`?`iOS`:`Android`]}),(0,R.jsx)(b,{variant:`outline`,children:U.channel}),U.appVersion?(0,R.jsxs)(b,{variant:`outline`,children:[`Reports from `,U.appVersion]}):null]})]}),(0,R.jsxs)(ne,{"aria-label":`Bundles by app version`,role:`region`,className:`min-w-0`,children:[(0,R.jsxs)(x,{className:`flex flex-col gap-3`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,R.jsx)(v,{children:`Bundles by app version`}),(0,R.jsxs)(C,{label:`How bundle distribution is counted`,children:[`Each installation counts once, by its latest report`,` `,K,`. Shares are within each app version. Built-in bundle: the bundle the native build shipped, by its ID. Unknown bundle: no deployment and no built-in bundle ID.`]})]}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1`,children:[W.isPending?(0,R.jsx)(e,{className:`h-9 w-16`}):(0,R.jsx)(`p`,{className:`text-3xl font-semibold tabular-nums`,children:G?`${G.truncated?`≥`:``}${J.toLocaleString()}`:`—`}),(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Reporting installations`})]})]}),(0,R.jsxs)(re,{className:`flex min-w-0 flex-col gap-4`,children:[G?.truncated?(0,R.jsxs)(te,{children:[(0,R.jsx)(_,{children:`Partial history`}),(0,R.jsxs)(y,{children:[`Counts and shares reflect reports since`,` `,new Date(G.sinceMs).toLocaleString(`en`,{timeZone:`UTC`}),` `,`UTC. Choose a shorter period for a more complete view.`]})]}):null,W.isPending?(0,R.jsx)(e,{"aria-label":`Loading bundle distribution`,className:`h-64`}):W.error?(0,R.jsxs)(`div`,{className:`flex flex-col items-start gap-4`,children:[(0,R.jsx)(ie,{error:W.error,fallbackTitle:`Distribution unavailable`}),(0,R.jsx)(t,{variant:`outline`,onClick:()=>void W.refetch(),children:`Retry distribution`})]}):q.length===0?(0,R.jsxs)(D,{children:[(0,R.jsxs)(w,{children:[(0,R.jsx)(T,{children:`No bundles reported`}),(0,R.jsx)(E,{children:`Choose another version or period, or change the filters in the overview.`})]}),(0,R.jsx)(t,{variant:`outline`,onClick:()=>$({version:void 0}),children:`Show all versions`})]}):(0,R.jsxs)(`div`,{className:`min-w-0`,children:[(0,R.jsxs)(`div`,{"aria-hidden":`true`,className:`hidden grid-cols-[8rem_minmax(0,1fr)_7rem_7rem] gap-4 border-b px-3 pb-3 text-xs text-muted-foreground md:grid`,children:[(0,R.jsx)(`span`,{children:`App version`}),(0,R.jsx)(`span`,{children:`Bundle ID`}),(0,R.jsx)(`span`,{className:`text-right`,children:`Active installations`}),(0,R.jsx)(`span`,{className:`text-right`,children:`Version share`})]}),(0,R.jsx)(`ul`,{"aria-label":`Bundle distribution`,className:`divide-y`,children:q.slice((X-1)*z,X*z).map(e=>{let t=G?.versions.find(t=>t.name===e.appVersion)?.installations??0,n=t>0?e.installations/t*100:0;return(0,R.jsxs)(`li`,{className:`grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 gap-y-3 px-1 py-4 md:grid-cols-[8rem_minmax(0,1fr)_7rem_7rem] md:px-3`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,R.jsx)(`span`,{className:`truncate text-sm font-medium`,title:e.appVersion,children:e.appVersion}),(0,R.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,R.jsx)(O,{platform:e.platform,className:`size-3.5`}),e.platform===`ios`?`iOS`:`Android`]})]}),(0,R.jsxs)(`div`,{className:`col-span-2 row-start-2 min-w-0 md:col-span-1 md:row-auto`,children:[e.releaseId?(0,R.jsxs)(a,{to:`/`,search:{releaseId:e.releaseId},"aria-label":`Review bundle ${e.releaseId} for app version ${e.appVersion}`,className:`flex min-h-11 min-w-0 items-center gap-2 text-xs underline-offset-4 hover:underline md:min-h-9`,children:[(0,R.jsx)(`span`,{className:`break-all font-mono`,children:e.releaseId}),(0,R.jsx)(s,{"aria-hidden":`true`,className:`size-3.5 shrink-0`})]}):e.builtinBundleId?null:(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Unknown bundle`}),e.builtinBundleId?(0,R.jsx)(H,{bundleId:e.builtinBundleId}):null]}),(0,R.jsxs)(`div`,{className:`col-start-2 row-start-1 text-right md:col-auto md:row-auto`,children:[(0,R.jsx)(`span`,{className:`text-sm font-medium tabular-nums`,children:e.installations.toLocaleString()}),(0,R.jsx)(`span`,{className:`ml-1 text-xs text-muted-foreground md:sr-only`,children:`active`}),(0,R.jsxs)(`p`,{className:`mt-1 text-xs tabular-nums text-muted-foreground md:hidden`,children:[n.toFixed(1),`% of version`]})]}),(0,R.jsxs)(`div`,{className:`hidden flex-col gap-2 md:flex`,children:[(0,R.jsxs)(`span`,{className:`text-right text-sm tabular-nums`,children:[n.toFixed(1),`%`]}),(0,R.jsx)(N,{"aria-label":`${V(e)} share in ${e.appVersion} on ${e.platform}`,value:n})]})]},JSON.stringify([e.appVersion,e.platform,e.releaseId,e.builtinBundleId]))})})]})]}),G&&q.length>0?(0,R.jsxs)(ee,{className:`flex flex-wrap items-center justify-between gap-3 border-t pt-4`,children:[(0,R.jsxs)(`p`,{className:`text-xs tabular-nums text-muted-foreground`,children:[(X-1)*z+1,`–`,Math.min(X*z,q.length),` of `,q.length]}),(0,R.jsxs)(`nav`,{"aria-label":`Distribution pages`,className:`flex gap-2`,children:[(0,R.jsx)(t,{variant:`outline`,className:`h-11 sm:h-9`,disabled:X<=1,onClick:()=>$({page:X-1}),children:`Previous`}),(0,R.jsx)(t,{variant:`outline`,className:`h-11 sm:h-9`,disabled:X>=Y,onClick:()=>$({page:X+1}),children:`Next`})]})]}):null]})]})})]})}export{U as component};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/installations-Dv4kWQYz.js","assets/ConsoleFeatureUnavailable-CUtcXuY2.js","assets/sidebar-Di9SN47G.js","assets/console-features-api-DEXSwFtc.js","assets/arrow-up-right-DK8Zdg40.js","assets/NotFoundPage-DZ3DxyRA.js","assets/link-DTEyW70e.js","assets/empty-B3Uwdd6k.js","assets/installations-BWxczZ2t.js","assets/preload-helper-B44EvKhG.js","assets/useCompositeListItem-JmyDfo3-.js","assets/EventDetails-Dl2RvPAk.js","assets/insights-api-BVCXJsoV.js","assets/useInfiniteQuery-DX4WpBRG.js","assets/check-CXVR3s3X.js","assets/copy-DsuLj3oj.js","assets/download-Cf24LBde.js","assets/input-group-D3OUBk4n.js","assets/smartphone-CMaSy_ir.js","assets/badge-DWFcDWho.js","assets/dist-CPlO6ko9.js","assets/HashValueDisplay-6lNRxDJX.js","assets/InsightsPageHeader-DHhqY3DT.js","assets/tabs-Xmt7tZeG.js","assets/list--NIee1FZ.js","assets/arrow-left-g9cKqXuC.js","assets/refresh-cw-B9HHjLej.js","assets/search-BCel4Oy6.js","assets/field-D-2-mnNh.js","assets/table-Bpy3SvSo.js"])))=>i.map(i=>d[i]);
2
- import{n as e,r as t,t as n}from"./preload-helper-B44EvKhG.js";import{r}from"./console-features-api-DEXSwFtc.js";var i=864e5,a={"24h":{period:`24 hours`,durationMs:i},"7d":{period:`7 days`,durationMs:7*i},"30d":{period:`30 days`,durationMs:30*i},"90d":{period:`90 days`,durationMs:90*i}},o=Object.keys(a),s=e=>o[o.indexOf(e)+1],c=(e,t)=>({beforeReceivedAtMs:t,sinceMs:Math.max(0,t-a[e].durationMs)}),l=e=>typeof e==`string`&&e.length>0?e:void 0,u=e=>typeof e==`number`&&Number.isSafeInteger(e)&&e>=0?e:void 0,d=e=>o.find(t=>t===e);function f(e){let t=p(e.search);return t.query===void 0&&t.installId===void 0?`/installations?eventsBefore=${t.eventsBefore??`new`}&eventsRange=${t.eventsRange??`7d`}&eventsCursor=${t.eventsCursor??`first`}`:e.state.__TSR_key}function p(e){return{query:typeof e.query==`string`?e.query:void 0,installId:typeof e.installId==`string`?e.installId:void 0,eventsCursor:l(e.eventsCursor),eventsBefore:u(e.eventsBefore),eventsRange:d(e.eventsRange),searchCursor:l(e.searchCursor),historyCursor:l(e.historyCursor),historyBefore:u(e.historyBefore)}}var m=t(`/installations`)({beforeLoad:({context:e})=>r(e.queryClient,`insights`),notFoundComponent:e(()=>n(()=>import(`./installations-Dv4kWQYz.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),`notFoundComponent`),component:e(()=>n(()=>import(`./installations-BWxczZ2t.js`),__vite__mapDeps([8,2,9,6,10,11,12,13,14,15,16,17,18,19,20,21,22,23,3,24,7,25,4,26,27,28,29])),`component`),staticData:{scrollRestorationKey:f},validateSearch:p});export{a,c as i,f as n,s as o,o as r,m as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/installations-CWx7vYY5.js","assets/ConsoleFeatureUnavailable-oMmbaqF6.js","assets/sidebar-Di9SN47G.js","assets/console-features-api-DEXSwFtc.js","assets/arrow-up-right-DK8Zdg40.js","assets/NotFoundPage-fiaucvsO.js","assets/link-DTEyW70e.js","assets/empty-PAp07lsC.js","assets/installations-Ce_dTa35.js","assets/preload-helper-B44EvKhG.js","assets/useCompositeListItem-JmyDfo3-.js","assets/EventDetails-ly7ygfdH.js","assets/insights-api-BVCXJsoV.js","assets/useInfiniteQuery-DX4WpBRG.js","assets/check-CXVR3s3X.js","assets/copy-DsuLj3oj.js","assets/download-Cf24LBde.js","assets/input-group-BJfBVqeI.js","assets/smartphone-Bn5FtEwt.js","assets/badge-UNnTz4Dl.js","assets/dist-UQUhRoJi.js","assets/HashValueDisplay-BNoXZADg.js","assets/InsightsPageHeader-q2FgL8xS.js","assets/tabs-Fgz3sA51.js","assets/list-B6GeoQ_b.js","assets/arrow-left-g9cKqXuC.js","assets/refresh-cw-C6svDMfM.js","assets/search-bIYGuFCt.js","assets/field-DhKRWFG5.js","assets/table-B22H8-RL.js"])))=>i.map(i=>d[i]);
2
+ import{n as e,r as t,t as n}from"./preload-helper-B44EvKhG.js";import{r}from"./console-features-api-DEXSwFtc.js";var i=864e5,a={"24h":{period:`24 hours`,durationMs:i},"7d":{period:`7 days`,durationMs:7*i},"30d":{period:`30 days`,durationMs:30*i},"90d":{period:`90 days`,durationMs:90*i}},o=Object.keys(a),s=e=>o[o.indexOf(e)+1],c=(e,t)=>({beforeReceivedAtMs:t,sinceMs:Math.max(0,t-a[e].durationMs)}),l=e=>typeof e==`string`&&e.length>0?e:void 0,u=e=>typeof e==`number`&&Number.isSafeInteger(e)&&e>=0?e:void 0,d=e=>o.find(t=>t===e);function f(e){let t=p(e.search);return t.query===void 0&&t.installId===void 0?`/installations?eventsBefore=${t.eventsBefore??`new`}&eventsRange=${t.eventsRange??`7d`}&eventsCursor=${t.eventsCursor??`first`}`:e.state.__TSR_key}function p(e){return{query:typeof e.query==`string`?e.query:void 0,installId:typeof e.installId==`string`?e.installId:void 0,eventsCursor:l(e.eventsCursor),eventsBefore:u(e.eventsBefore),eventsRange:d(e.eventsRange),searchCursor:l(e.searchCursor),historyCursor:l(e.historyCursor),historyBefore:u(e.historyBefore)}}var m=t(`/installations`)({beforeLoad:({context:e})=>r(e.queryClient,`insights`),notFoundComponent:e(()=>n(()=>import(`./installations-CWx7vYY5.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),`notFoundComponent`),component:e(()=>n(()=>import(`./installations-Ce_dTa35.js`),__vite__mapDeps([8,2,9,6,10,11,12,13,14,15,16,17,18,19,20,21,22,23,3,24,7,25,4,26,27,28,29])),`component`),staticData:{scrollRestorationKey:f},validateSearch:p});export{a,c as i,f as n,s as o,o as r,m as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./ConsoleFeatureUnavailable-oMmbaqF6.js";var t=e;export{t as notFoundComponent};
@@ -1 +1 @@
1
- import{$ as e,Fn as t,In as n,Ln as r,Wr as i,et as a,ii as o,rr as s,ti as c}from"./sidebar-Di9SN47G.js";import{h as l,i as u,m as d,t as f}from"./link-DTEyW70e.js";import{o as p,s as m}from"./preload-helper-B44EvKhG.js";import{a as h,n as g,o as _,r as v,t as y}from"./EventDetails-Dl2RvPAk.js";import{t as b}from"./arrow-left-g9cKqXuC.js";import{t as x}from"./arrow-up-right-DK8Zdg40.js";import{a as S,c as C,i as w,l as T,n as E,o as ee,r as te}from"./insights-api-BVCXJsoV.js";import{t as D}from"./check-CXVR3s3X.js";import{a as O}from"./useCompositeListItem-JmyDfo3-.js";import{t as k}from"./refresh-cw-B9HHjLej.js";import{i as A,n as j,r as M,t as N}from"./input-group-D3OUBk4n.js";import{t as P}from"./search-BCel4Oy6.js";import{c as ne,d as F,o as I,s as L,u as R}from"./badge-DWFcDWho.js";import{a as z,i as re,n as ie,o as ae,r as oe,t as B}from"./installations-B674P5Z5.js";import{a as se,t as ce}from"./field-D-2-mnNh.js";import{a as V,i as H,n as le,o as U,r as W,t as G}from"./table-Bpy3SvSo.js";import{n as ue,t as K}from"./HashValueDisplay-6lNRxDJX.js";import{a as de,c as q,n as fe,r as pe,t as me}from"./InsightsPageHeader-DHhqY3DT.js";function he(){l(u(),!0)}function ge(e){return he(),d(u(),e)}function _e(e){let t=u();return m(t.stores.location,p(e,t))}var J=o(c(),1),Y=i();function ve({events:e,formatter:t,renderIdentity:n}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`p`,{className:`px-4 pb-2 text-xs text-muted-foreground sm:px-6`,children:`Time in your browser zone`}),(0,Y.jsx)(`ol`,{"aria-label":`Events`,className:`divide-y border-y`,children:e.map(e=>(0,Y.jsxs)(`li`,{className:`flex min-w-0 flex-col gap-3 px-4 py-4 sm:px-6`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-1`,children:[(0,Y.jsx)(v,{event:e}),(0,Y.jsx)(`div`,{className:`text-xs tabular-nums`,children:(0,Y.jsx)(g,{value:e.receivedAtMs,formatter:t,touch:!0})})]}),n?.(e),(0,Y.jsxs)(`dl`,{className:`flex flex-wrap gap-x-2 gap-y-1 text-sm`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`dt`,{className:`sr-only`,children:`App`}),(0,Y.jsxs)(`dd`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]})]}),(0,Y.jsxs)(`div`,{className:`min-w-0 text-muted-foreground`,children:[(0,Y.jsx)(`dt`,{className:`sr-only`,children:`Channel`}),(0,Y.jsx)(`dd`,{className:`wrap-anywhere`,children:e.channel})]})]}),(0,Y.jsx)(`div`,{className:`text-xs`,"aria-label":`Bundle`,children:(0,Y.jsx)(y,{event:e,touch:!0})})]},e.id))})]})}function X({hasPrevious:e,label:n,nextCursor:r,onNext:i,onPrevious:a,pageLength:o,pageNumber:s}){return(0,Y.jsxs)(`nav`,{"aria-label":`${n} pagination`,className:`flex flex-wrap items-center justify-between gap-3 border-t px-4 py-3 sm:px-6`,children:[(0,Y.jsxs)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:[`Page `,s,` · `,o.toLocaleString(),` rows`]}),(0,Y.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Y.jsx)(t,{className:`h-11 min-w-11 px-3 lg:h-8 lg:min-w-0 lg:px-2`,disabled:!e,onClick:a,size:`sm`,type:`button`,variant:`outline`,children:`Previous`}),(0,Y.jsx)(t,{className:`h-11 min-w-11 px-3 lg:h-8 lg:min-w-0 lg:px-2`,disabled:r===null,onClick:i,size:`sm`,type:`button`,variant:`outline`,children:`Next`})]})]})}var ye=e=>oe.filter((t,n)=>n===0||z[t].durationMs<=e*864e5);function be({event:e,eventsLocation:t,touch:r=!1}){return(0,Y.jsxs)(`div`,{className:r?`flex min-w-0 flex-wrap items-center justify-between gap-2`:`flex min-w-0 flex-col items-start gap-2`,children:[(0,Y.jsxs)(f,{className:n({className:r?`-ml-2 h-auto min-h-11 min-w-0 flex-1 justify-start gap-2 whitespace-normal text-sm`:`-ml-2 max-w-full justify-start`,size:`sm`,variant:`ghost`}),to:`/installations`,search:{...t,query:e.installId||void 0,installId:e.installId},state:e=>({insightsPagination:{eventsBack:e.insightsPagination?.eventsBack}}),"aria-label":`View history for ${e.userId??`anonymous installation`} (${e.installId})`,children:[(0,Y.jsx)(`span`,{className:r?`min-w-0 text-left wrap-anywhere`:`truncate`,children:e.userId??`Anonymous installation`}),(0,Y.jsx)(x,{"aria-hidden":`true`,"data-icon":`inline-end`})]}),(0,Y.jsx)(K,{value:e.installId,maxLength:13,buttonClassName:r?`min-h-11 px-3`:void 0})]})}function xe({children:n,description:r,error:i,eventsLocation:a,history:o,isFetching:s,isLoading:c,onNext:l,onPrevious:u,onRangeChange:d,onRefresh:f,pageNumber:p,range:m,rawDays:h=90,title:b=`All events`}){let x=_(),S=p>1,C=ye(h),w=m===void 0?void 0:ae(m),T=w!==void 0&&C.includes(w)?w:void 0,E=T!==void 0&&d?(0,Y.jsx)(t,{className:`h-11 px-3 lg:h-8`,onClick:()=>d(T),type:`button`,variant:`outline`,children:`Show the last ${z[T].period}`}):null;return(0,Y.jsxs)(I,{className:`@container min-w-0 shadow-sm`,"aria-busy":s,children:[(0,Y.jsxs)(R,{className:`gap-4 p-4 sm:p-6`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Y.jsx)(F,{children:(0,Y.jsx)(`h2`,{children:b})}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[m!==void 0&&d?(0,Y.jsx)(de,{label:`Time range`,onPeriodChange:d,period:m,periods:C.map(e=>({value:e,name:`Last ${z[e].period}`}))}):null,(0,Y.jsxs)(t,{className:`h-11 lg:h-8`,disabled:s,onClick:f,size:`lg`,variant:`outline`,children:[(0,Y.jsx)(k,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Refresh`]})]})]}),r?(0,Y.jsx)(ne,{children:r}):null]}),n]}),(0,Y.jsx)(L,{className:`min-w-0 p-0`,children:c?(0,Y.jsxs)(`div`,{className:`flex flex-col gap-4 p-6`,role:`status`,"aria-label":`Loading events`,children:[(0,Y.jsx)(e,{className:`h-12 w-full`}),(0,Y.jsx)(e,{className:`h-12 w-full`}),(0,Y.jsx)(e,{className:`h-12 w-full`})]}):i?(0,Y.jsx)(`div`,{className:`px-6 pb-6`,children:(0,Y.jsx)(q,{error:i,fallbackTitle:`Event history unavailable`})}):o?(0,Y.jsxs)(Y.Fragment,{children:[o.data.length>0?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`@[58rem]:hidden`,children:(0,Y.jsx)(ve,{events:o.data,formatter:x,renderIdentity:e=>(0,Y.jsx)(be,{event:e,eventsLocation:a,touch:!0})})}),(0,Y.jsx)(`div`,{className:`hidden @[58rem]:block`,children:(0,Y.jsxs)(G,{className:`min-w-4xl table-fixed`,children:[(0,Y.jsx)(V,{children:(0,Y.jsxs)(U,{className:`[&>th]:px-4 sm:[&>th]:px-6`,children:[(0,Y.jsx)(H,{className:`w-64`,children:`Time`}),(0,Y.jsx)(H,{className:`w-48`,children:`Event`}),(0,Y.jsx)(H,{className:`w-48`,children:`User / installation`}),(0,Y.jsx)(H,{className:`w-32`,children:`App`}),(0,Y.jsx)(H,{className:`w-52`,children:`Bundle`})]})}),(0,Y.jsx)(le,{children:o.data.map(e=>(0,Y.jsxs)(U,{className:`[&>td]:px-4 [&>td]:py-4 [&>td]:align-top sm:[&>td]:px-6`,children:[(0,Y.jsx)(W,{className:`whitespace-normal text-xs tabular-nums`,children:(0,Y.jsx)(g,{value:e.receivedAtMs,formatter:x})}),(0,Y.jsx)(W,{children:(0,Y.jsx)(v,{event:e})}),(0,Y.jsx)(W,{children:(0,Y.jsx)(be,{event:e,eventsLocation:a})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsxs)(`span`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]}),(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:e.channel})]})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsx)(y,{event:e})})]},e.id))})]})})]}):(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 px-4 pb-4 sm:px-6 sm:pb-6`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:S?`No older events in this range.`:m===void 0?b===`All events`?`No events recorded yet`:`No matching reports in this period`:`No events in the last ${z[m].period}.`}),S?null:E]}),m!==void 0&&o.nextCursor===null&&(o.data.length>0||S)?(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-t px-4 py-3 sm:px-6`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Start of range reached`}),E]}):null,o.data.length>0||S||o.nextCursor?(0,Y.jsx)(X,{hasPrevious:S,label:b,nextCursor:o.nextCursor,onNext:l,onPrevious:u,pageLength:o.data.length,pageNumber:p}):null]}):null})]})}var Se=e=>e.userId??`—`,Ce=e=>`lastKnownBundleId`in e?e.lastKnownBundleId:e.type===`UPDATE_DOWNLOADED`||e.type===`UPDATE_FAILED`?e.fromBundleId:e.toBundleId;function we({error:n,history:r,isLoading:i,onNext:o,onPrevious:s,onRefresh:c,pageNumber:l,retention:u=C,selectedEvent:d,selectedInstallId:f}){let p=_(),m=d?Ce(d):void 0,b=d&&`pendingBundleId`in d?d.pendingBundleId:d&&`type`in d&&d.type===`UPDATE_DOWNLOADED`?d.toBundleId:null;return(0,Y.jsxs)(I,{className:`@container min-h-0 min-w-0 shadow-sm`,children:[(0,Y.jsx)(R,{className:`p-4 sm:p-6`,children:(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,Y.jsx)(F,{className:`text-sm font-medium`,children:(0,Y.jsx)(`h2`,{children:f===void 0?`Select an installation`:`Installation history`})}),f===void 0?null:(0,Y.jsxs)(ne,{children:[`Bundle changes and update failures are kept for`,` `,T(u.rawDays),`; the latest report, for`,` `,T(u.dailyDays),` after the installation last reports.`]})]}),c&&f!==void 0?(0,Y.jsxs)(t,{className:`h-11 lg:h-8`,size:`lg`,variant:`outline`,onClick:c,disabled:i,children:[(0,Y.jsx)(k,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Refresh`]}):null]})}),(0,Y.jsxs)(L,{className:`min-h-0 p-0`,children:[f!==void 0&&d?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`section`,{"aria-labelledby":`latest-installation-state`,className:`px-4 pb-4 sm:px-6 sm:pb-6`,children:[(0,Y.jsx)(`h3`,{className:`sr-only`,id:`latest-installation-state`,children:`Latest reported state`}),(0,Y.jsxs)(`dl`,{className:`grid grid-cols-2 gap-4 @[36rem]:grid-cols-3`,children:[(0,Y.jsxs)(`div`,{className:`col-span-2 min-w-0 @[36rem]:col-span-1`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`User ID`}),(0,Y.jsx)(`dd`,{className:`mt-1 text-sm font-medium wrap-anywhere`,children:Se(d)})]}),(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Install ID`}),(0,Y.jsx)(`dd`,{className:`mt-1 font-mono text-xs`,children:(0,Y.jsx)(K,{value:f,buttonClassName:`min-h-11 px-3 lg:min-h-0 lg:px-1.5`})})]}),(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Last known bundle`}),(0,Y.jsxs)(`dd`,{className:`mt-1 flex min-w-0 flex-wrap items-center gap-2 font-mono text-xs`,children:[m?(0,Y.jsx)(K,{value:m,buttonClassName:`min-h-11 px-3 lg:min-h-0 lg:px-1.5`}):`—`,pe(m,d.minBundleId)?(0,Y.jsx)(fe,{}):null]})]}),b?(0,Y.jsxs)(`div`,{className:`col-span-2 min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Downloaded · Not launched yet`}),(0,Y.jsx)(`dd`,{className:`mt-1 text-xs`,children:(0,Y.jsx)(K,{value:b})})]}):null]}),d.httpResponse?(0,Y.jsx)(`div`,{className:`mt-4`,children:(0,Y.jsx)(h,{event:d})}):null]}),(0,Y.jsx)(a,{})]}):null,f===void 0?null:i?(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3 p-6`,role:`status`,"aria-label":`Loading installation history`,children:[(0,Y.jsx)(e,{className:`h-10 w-full`}),(0,Y.jsx)(e,{className:`h-10 w-full`}),(0,Y.jsx)(e,{className:`h-10 w-full`})]}):n?(0,Y.jsx)(`div`,{className:`p-6`,children:(0,Y.jsx)(q,{error:n instanceof Error?n:Error(),fallbackTitle:`Installation history unavailable`})}):r&&r.data.length>0?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`@[48rem]:hidden`,children:(0,Y.jsx)(ve,{events:r.data,formatter:p})}),(0,Y.jsx)(`div`,{className:`hidden @[48rem]:block`,children:(0,Y.jsxs)(G,{className:`min-w-3xl table-fixed`,children:[(0,Y.jsx)(V,{children:(0,Y.jsxs)(U,{className:`[&>th]:px-4 sm:[&>th]:px-6`,children:[(0,Y.jsx)(H,{className:`w-64`,children:`Time`}),(0,Y.jsx)(H,{className:`w-48`,children:`Event`}),(0,Y.jsx)(H,{className:`w-32`,children:`App`}),(0,Y.jsx)(H,{className:`w-52`,children:`Bundle`})]})}),(0,Y.jsx)(le,{children:r.data.map(e=>(0,Y.jsxs)(U,{className:`[&>td]:px-4 [&>td]:py-4 [&>td]:align-top sm:[&>td]:px-6`,children:[(0,Y.jsx)(W,{className:`whitespace-normal text-xs tabular-nums`,children:(0,Y.jsx)(g,{value:e.receivedAtMs,formatter:p})}),(0,Y.jsx)(W,{children:(0,Y.jsx)(v,{event:e})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsxs)(`span`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]}),(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:e.channel})]})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsx)(y,{event:e})})]},e.id))})]})}),(0,Y.jsx)(X,{hasPrevious:l>1,label:`Installation history`,nextCursor:r.nextCursor,onNext:o,onPrevious:s,pageLength:r.data.length,pageNumber:l})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`p-6 text-sm text-muted-foreground`,children:l>1?`No older bundle changes.`:`No bundle changes recorded yet.`}),r&&(l>1||r.nextCursor)?(0,Y.jsx)(X,{hasPrevious:l>1,label:`Installation history`,nextCursor:r.nextCursor,onNext:o,onPrevious:s,pageLength:0,pageNumber:l}):null]})]})]})}var Te=e=>e.lastKnownBundleId,Ee=e=>e.userId??`—`;function De({error:e,onNext:i,onPrevious:a,onSelect:o,pageNumber:s,results:c,selectedInstallId:l}){let[u,d]=(0,J.useState)(!1),f=(0,J.useId)(),p=(0,J.useRef)(null),m=!e&&c&&c.data.length>0;return(0,Y.jsxs)(I,{className:`min-h-0 min-w-0 shadow-sm`,children:[(0,Y.jsx)(R,{className:`p-4 sm:px-6`,children:(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Y.jsx)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:(0,Y.jsx)(F,{className:`text-sm font-medium`,children:(0,Y.jsx)(`h2`,{children:`Matching installations`})})}),(0,Y.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:m?(0,Y.jsx)(t,{"aria-controls":f,"aria-expanded":u,"aria-label":u?`Hide matching installations`:`Show matching installations`,className:`size-11 lg:hidden`,onClick:()=>d(!u),ref:p,size:`icon-lg`,variant:`ghost`,children:(0,Y.jsx)(O,{"aria-hidden":`true`,className:r(u&&`rotate-180`)})}):null})]})}),(0,Y.jsxs)(L,{className:r(`min-h-0 p-0`,m&&!u&&`hidden lg:block`),id:f,children:[e?(0,Y.jsx)(`div`,{className:`p-6`,children:(0,Y.jsx)(q,{error:e instanceof Error?e:Error(),fallbackTitle:`Installation search unavailable`})}):c&&c.data.length>0?(0,Y.jsx)(`ul`,{"aria-label":`Matching installations`,className:`divide-y`,children:c.data.map(e=>{let t=Te(e),n=e.installId===l;return(0,Y.jsx)(`li`,{children:(0,Y.jsxs)(`button`,{"aria-label":`${Ee(e)}, install ID ${e.installId}`,"aria-pressed":n,className:`group flex w-full min-w-0 flex-col gap-2 border-l-2 border-transparent px-4 py-4 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:border-ring focus-visible:bg-muted/40 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/30 aria-pressed:border-primary aria-pressed:bg-muted/60 motion-reduce:transition-none sm:px-6`,onClick:()=>{o(e.installId),d(!1),p.current?.focus()},type:`button`,children:[(0,Y.jsxs)(`span`,{className:`flex w-full min-w-0 items-center justify-between gap-3`,children:[(0,Y.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium`,children:Ee(e)}),n?(0,Y.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 text-xs font-medium text-primary`,children:[(0,Y.jsx)(D,{"aria-hidden":`true`,className:`size-3.5`}),(0,Y.jsx)(`span`,{className:`sr-only`,children:`Selected`})]}):null]}),(0,Y.jsx)(`span`,{className:`flex flex-wrap items-center gap-2`,children:(0,Y.jsx)(`span`,{className:`font-mono text-xs`,title:e.installId,children:ue(e.installId)})}),(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,Y.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Bundle`}),t?(0,Y.jsx)(`span`,{className:`font-mono text-xs`,title:t,children:ue(t)}):(0,Y.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`—`})]})]})},e.installId)})}):(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 p-4 sm:px-6`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No matches`}),(0,Y.jsx)(`a`,{className:n({variant:`outline`,className:`h-11 px-3 lg:h-8`}),href:`#installation-history-search`,children:`Edit search`})]}),c&&(c.data.length>0||s>1||c.nextCursor)?(0,Y.jsx)(X,{hasPrevious:s>1,label:`Installation results`,nextCursor:c.nextCursor,onNext:i,onPrevious:a,pageLength:c.data.length,pageNumber:s}):null]})]})}function Oe({draftQuery:e,onDraftQueryChange:n,onSubmit:r,onClear:i}){return(0,Y.jsx)(`form`,{"aria-label":`Find installation`,onSubmit:t=>{t.preventDefault(),e.trim()&&r()},role:`search`,children:(0,Y.jsxs)(ce,{className:`gap-2`,children:[(0,Y.jsx)(se,{className:`sr-only`,htmlFor:`installation-history-search`,children:`User ID or installation ID`}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Y.jsxs)(N,{className:`h-11 w-auto min-w-0 flex-1 basis-44 lg:h-8`,children:[(0,Y.jsx)(j,{children:(0,Y.jsx)(P,{"aria-hidden":`true`})}),(0,Y.jsx)(A,{autoComplete:`off`,className:`h-11 text-base md:text-base lg:h-8 lg:text-xs`,id:`installation-history-search`,maxLength:1024,name:`installation`,onChange:e=>n(e.target.value),placeholder:`User ID or installation ID`,spellCheck:!1,type:`search`,value:e}),e.length>0?(0,Y.jsx)(j,{align:`inline-end`,children:(0,Y.jsx)(M,{"aria-label":`Clear installation lookup`,className:`size-11 lg:size-5`,onClick:i,size:`icon-xs`,children:(0,Y.jsx)(s,{"aria-hidden":`true`})})}):null]}),(0,Y.jsx)(t,{"aria-label":`Find installation`,className:`h-11 px-3 lg:h-8`,disabled:e.trim().length===0,size:`lg`,type:`submit`,variant:`outline`,children:`Find`})]})]})})}function ke(){return(0,Y.jsxs)(`div`,{className:`grid items-stretch gap-6 lg:min-h-96 lg:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)]`,children:[(0,Y.jsx)(e,{className:`h-64 w-full lg:h-full`}),(0,Y.jsx)(e,{className:`h-64 w-full lg:h-full`})]})}var Ae=20,je=50,Z=()=>Date.now(),Q=(e,t)=>[...e,t??``],$=e=>({cursor:e?.at(-1)||void 0,stack:e.slice(0,-1)});function Me(){let e=B.useSearch(),n=B.useNavigate(),r=ee(),[i,a]=(0,J.useState)(e.query??``),[o]=(0,J.useState)(Z),[s]=(0,J.useState)(Z),c=_e({select:e=>e.state.insightsPagination}),l=c?.eventsBack??[],u=c?.searchBack??[],d=c?.historyBack??[],f=e.query?.trim()??``,p=f.length>0,m=e.installId!==void 0,h=p||m,g=e.eventsBefore??o,_=e.eventsRange??`7d`,v=e.historyBefore??s,y=(t,r=!1,i={})=>{n({to:`/installations`,search:{...e,...t},state:e=>({...e,insightsPagination:{...e.insightsPagination,...i}}),replace:r})};(0,J.useEffect)(()=>{a(e.query??``)},[e.query]),(0,J.useEffect)(()=>{e.eventsBefore===void 0&&y({eventsBefore:g},!0)},[g,e.eventsBefore]),(0,J.useEffect)(()=>{m&&e.historyBefore===void 0&&y({historyBefore:v},!0)},[m,v,e.historyBefore]);let x=E({...re(_,g),cursor:e.eventsCursor,limit:20},!h),C=S({cursor:e.searchCursor,identity:f,limit:Ae},p);(0,J.useEffect)(()=>{let e=C.data?.data[0]?.installId;!p||m||e===void 0||y({historyBefore:Z(),historyCursor:void 0,installId:e},!0,{historyBack:[]})},[p,m,C.data?.data]);let D=w(e.installId??``,m),O=te({beforeReceivedAtMs:v,cursor:e.historyCursor,installId:e.installId??``,limit:je},m),k=D.data??C.data?.data.find(({installId:t})=>t===e.installId)??O.data?.data[0],A=h?`installation-history-${e.historyCursor??`first`}`:`all-events-${e.eventsCursor??`first`}`,j=(0,J.useRef)(null),M=ge({id:A,getKey:ie});(0,J.useLayoutEffect)(()=>{!h&&!x.isLoading&&j.current&&(j.current.scrollTop=M?.scrollY??0)},[x.isLoading,h,M?.scrollY,A]);let N=()=>{a(``),y({historyBefore:void 0,historyCursor:void 0,installId:void 0,query:void 0,searchCursor:void 0},!1,{historyBack:[],searchBack:[]})},P=(0,Y.jsx)(Oe,{draftQuery:i,onClear:N,onDraftQueryChange:a,onSubmit:()=>{let e=i.trim();if(!e){N();return}y({historyBefore:void 0,historyCursor:void 0,installId:void 0,query:e,searchCursor:void 0},!1,{historyBack:[],searchBack:[]})}});return(0,Y.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,Y.jsx)(me,{view:`events`}),(0,Y.jsx)(`div`,{ref:j,"data-scroll-restoration-id":A,id:`insights-events-scroll`,className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,Y.jsxs)(`div`,{className:`mx-auto flex w-full max-w-7xl flex-col gap-4 sm:gap-6`,children:[h?(0,Y.jsx)(I,{className:`shadow-sm`,children:(0,Y.jsxs)(L,{className:`flex flex-col gap-3 p-4 sm:p-6`,children:[(0,Y.jsxs)(t,{className:`-ml-2 h-11 self-start lg:h-8`,onClick:N,variant:`ghost`,children:[(0,Y.jsx)(b,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Back to all events`]}),P]})}):null,h?C.isLoading&&p?(0,Y.jsx)(ke,{}):(0,Y.jsxs)(`div`,{className:`grid min-h-0 min-w-0 items-stretch gap-4 sm:gap-6 ${p?`lg:min-h-96 lg:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)]`:`lg:grid-cols-1`}`,children:[p?(0,Y.jsx)(De,{error:C.error,onNext:()=>{C.data?.nextCursor&&y({installId:void 0,searchCursor:C.data.nextCursor},!0,{searchBack:Q(u,e.searchCursor)})},onPrevious:()=>{let e=$(u);y({installId:void 0,searchCursor:e.cursor},!0,{searchBack:e.stack})},onSelect:e=>{y({historyBefore:Z(),historyCursor:void 0,installId:e},!1,{historyBack:[]})},pageNumber:u.length+1,results:C.data,selectedInstallId:e.installId}):null,(0,Y.jsx)(we,{error:O.error??D.error,history:O.data,isLoading:O.isLoading||D.isLoading,onNext:()=>{O.data?.nextCursor&&y({historyCursor:O.data.nextCursor},!0,{historyBack:Q(d,e.historyCursor)})},onPrevious:()=>{let e=$(d);y({historyCursor:e.cursor},!0,{historyBack:e.stack})},onRefresh:()=>{y({historyBefore:Z(),historyCursor:void 0},!0,{historyBack:[]})},pageNumber:d.length+1,retention:r,selectedEvent:k,selectedInstallId:e.installId})]}):(0,Y.jsx)(xe,{description:`Downloads, launches, crashes, update failures, and other changes to what an installation runs, newest first, kept for ${T(r.rawDays)}. Launches that change nothing aren't listed.`,error:x.error,eventsLocation:{eventsBefore:g,eventsCursor:e.eventsCursor,eventsRange:e.eventsRange},history:x.data,isFetching:x.isFetching,isLoading:x.isLoading,onNext:()=>{x.data?.nextCursor&&y({eventsCursor:x.data.nextCursor},!0,{eventsBack:Q(l,e.eventsCursor)})},onPrevious:()=>{let e=$(l);y({eventsCursor:e.cursor},!0,{eventsBack:e.stack})},onRangeChange:e=>{y({eventsBefore:Z(),eventsCursor:void 0,eventsRange:e},!1,{eventsBack:[]})},onRefresh:()=>{y({eventsBefore:Z(),eventsCursor:void 0},!0,{eventsBack:[]})},pageNumber:l.length+1,range:_,rawDays:r.rawDays,children:P})]})},A)]})}export{Me as component};
1
+ import{$ as e,Fn as t,In as n,Ln as r,Wr as i,et as a,ii as o,rr as s,ti as c}from"./sidebar-Di9SN47G.js";import{h as l,i as u,m as d,t as f}from"./link-DTEyW70e.js";import{o as p,s as m}from"./preload-helper-B44EvKhG.js";import{a as h,n as g,o as _,r as v,t as y}from"./EventDetails-ly7ygfdH.js";import{t as b}from"./arrow-left-g9cKqXuC.js";import{t as x}from"./arrow-up-right-DK8Zdg40.js";import{a as S,c as C,i as w,l as T,n as E,o as ee,r as te}from"./insights-api-BVCXJsoV.js";import{t as D}from"./check-CXVR3s3X.js";import{a as O}from"./useCompositeListItem-JmyDfo3-.js";import{t as k}from"./refresh-cw-C6svDMfM.js";import{i as A,n as j,r as M,t as N}from"./input-group-BJfBVqeI.js";import{t as P}from"./search-bIYGuFCt.js";import{c as ne,d as F,o as I,s as L,u as R}from"./badge-UNnTz4Dl.js";import{a as z,i as re,n as ie,o as ae,r as oe,t as B}from"./installations-BRS-vuRJ.js";import{a as se,t as ce}from"./field-DhKRWFG5.js";import{a as V,i as H,n as le,o as U,r as W,t as G}from"./table-B22H8-RL.js";import{n as ue,t as K}from"./HashValueDisplay-BNoXZADg.js";import{a as de,c as q,n as fe,r as pe,t as me}from"./InsightsPageHeader-q2FgL8xS.js";function he(){l(u(),!0)}function ge(e){return he(),d(u(),e)}function _e(e){let t=u();return m(t.stores.location,p(e,t))}var J=o(c(),1),Y=i();function ve({events:e,formatter:t,renderIdentity:n}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`p`,{className:`px-4 pb-2 text-xs text-muted-foreground sm:px-6`,children:`Time in your browser zone`}),(0,Y.jsx)(`ol`,{"aria-label":`Events`,className:`divide-y border-y`,children:e.map(e=>(0,Y.jsxs)(`li`,{className:`flex min-w-0 flex-col gap-3 px-4 py-4 sm:px-6`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-1`,children:[(0,Y.jsx)(v,{event:e}),(0,Y.jsx)(`div`,{className:`text-xs tabular-nums`,children:(0,Y.jsx)(g,{value:e.receivedAtMs,formatter:t,touch:!0})})]}),n?.(e),(0,Y.jsxs)(`dl`,{className:`flex flex-wrap gap-x-2 gap-y-1 text-sm`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`dt`,{className:`sr-only`,children:`App`}),(0,Y.jsxs)(`dd`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]})]}),(0,Y.jsxs)(`div`,{className:`min-w-0 text-muted-foreground`,children:[(0,Y.jsx)(`dt`,{className:`sr-only`,children:`Channel`}),(0,Y.jsx)(`dd`,{className:`wrap-anywhere`,children:e.channel})]})]}),(0,Y.jsx)(`div`,{className:`text-xs`,"aria-label":`Bundle`,children:(0,Y.jsx)(y,{event:e,touch:!0})})]},e.id))})]})}function X({hasPrevious:e,label:n,nextCursor:r,onNext:i,onPrevious:a,pageLength:o,pageNumber:s}){return(0,Y.jsxs)(`nav`,{"aria-label":`${n} pagination`,className:`flex flex-wrap items-center justify-between gap-3 border-t px-4 py-3 sm:px-6`,children:[(0,Y.jsxs)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:[`Page `,s,` · `,o.toLocaleString(),` rows`]}),(0,Y.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Y.jsx)(t,{className:`h-11 min-w-11 px-3 lg:h-8 lg:min-w-0 lg:px-2`,disabled:!e,onClick:a,size:`sm`,type:`button`,variant:`outline`,children:`Previous`}),(0,Y.jsx)(t,{className:`h-11 min-w-11 px-3 lg:h-8 lg:min-w-0 lg:px-2`,disabled:r===null,onClick:i,size:`sm`,type:`button`,variant:`outline`,children:`Next`})]})]})}var ye=e=>oe.filter((t,n)=>n===0||z[t].durationMs<=e*864e5);function be({event:e,eventsLocation:t,touch:r=!1}){return(0,Y.jsxs)(`div`,{className:r?`flex min-w-0 flex-wrap items-center justify-between gap-2`:`flex min-w-0 flex-col items-start gap-2`,children:[(0,Y.jsxs)(f,{className:n({className:r?`-ml-2 h-auto min-h-11 min-w-0 flex-1 justify-start gap-2 whitespace-normal text-sm`:`-ml-2 max-w-full justify-start`,size:`sm`,variant:`ghost`}),to:`/installations`,search:{...t,query:e.installId||void 0,installId:e.installId},state:e=>({insightsPagination:{eventsBack:e.insightsPagination?.eventsBack}}),"aria-label":`View history for ${e.userId??`anonymous installation`} (${e.installId})`,children:[(0,Y.jsx)(`span`,{className:r?`min-w-0 text-left wrap-anywhere`:`truncate`,children:e.userId??`Anonymous installation`}),(0,Y.jsx)(x,{"aria-hidden":`true`,"data-icon":`inline-end`})]}),(0,Y.jsx)(K,{value:e.installId,maxLength:13,buttonClassName:r?`min-h-11 px-3`:void 0})]})}function xe({children:n,description:r,error:i,eventsLocation:a,history:o,isFetching:s,isLoading:c,onNext:l,onPrevious:u,onRangeChange:d,onRefresh:f,pageNumber:p,range:m,rawDays:h=90,title:b=`All events`}){let x=_(),S=p>1,C=ye(h),w=m===void 0?void 0:ae(m),T=w!==void 0&&C.includes(w)?w:void 0,E=T!==void 0&&d?(0,Y.jsx)(t,{className:`h-11 px-3 lg:h-8`,onClick:()=>d(T),type:`button`,variant:`outline`,children:`Show the last ${z[T].period}`}):null;return(0,Y.jsxs)(I,{className:`@container min-w-0 shadow-sm`,"aria-busy":s,children:[(0,Y.jsxs)(R,{className:`gap-4 p-4 sm:p-6`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Y.jsx)(F,{children:(0,Y.jsx)(`h2`,{children:b})}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[m!==void 0&&d?(0,Y.jsx)(de,{label:`Time range`,onPeriodChange:d,period:m,periods:C.map(e=>({value:e,name:`Last ${z[e].period}`}))}):null,(0,Y.jsxs)(t,{className:`h-11 lg:h-8`,disabled:s,onClick:f,size:`lg`,variant:`outline`,children:[(0,Y.jsx)(k,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Refresh`]})]})]}),r?(0,Y.jsx)(ne,{children:r}):null]}),n]}),(0,Y.jsx)(L,{className:`min-w-0 p-0`,children:c?(0,Y.jsxs)(`div`,{className:`flex flex-col gap-4 p-6`,role:`status`,"aria-label":`Loading events`,children:[(0,Y.jsx)(e,{className:`h-12 w-full`}),(0,Y.jsx)(e,{className:`h-12 w-full`}),(0,Y.jsx)(e,{className:`h-12 w-full`})]}):i?(0,Y.jsx)(`div`,{className:`px-6 pb-6`,children:(0,Y.jsx)(q,{error:i,fallbackTitle:`Event history unavailable`})}):o?(0,Y.jsxs)(Y.Fragment,{children:[o.data.length>0?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`@[58rem]:hidden`,children:(0,Y.jsx)(ve,{events:o.data,formatter:x,renderIdentity:e=>(0,Y.jsx)(be,{event:e,eventsLocation:a,touch:!0})})}),(0,Y.jsx)(`div`,{className:`hidden @[58rem]:block`,children:(0,Y.jsxs)(G,{className:`min-w-4xl table-fixed`,children:[(0,Y.jsx)(V,{children:(0,Y.jsxs)(U,{className:`[&>th]:px-4 sm:[&>th]:px-6`,children:[(0,Y.jsx)(H,{className:`w-64`,children:`Time`}),(0,Y.jsx)(H,{className:`w-48`,children:`Event`}),(0,Y.jsx)(H,{className:`w-48`,children:`User / installation`}),(0,Y.jsx)(H,{className:`w-32`,children:`App`}),(0,Y.jsx)(H,{className:`w-52`,children:`Bundle`})]})}),(0,Y.jsx)(le,{children:o.data.map(e=>(0,Y.jsxs)(U,{className:`[&>td]:px-4 [&>td]:py-4 [&>td]:align-top sm:[&>td]:px-6`,children:[(0,Y.jsx)(W,{className:`whitespace-normal text-xs tabular-nums`,children:(0,Y.jsx)(g,{value:e.receivedAtMs,formatter:x})}),(0,Y.jsx)(W,{children:(0,Y.jsx)(v,{event:e})}),(0,Y.jsx)(W,{children:(0,Y.jsx)(be,{event:e,eventsLocation:a})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsxs)(`span`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]}),(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:e.channel})]})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsx)(y,{event:e})})]},e.id))})]})})]}):(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 px-4 pb-4 sm:px-6 sm:pb-6`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:S?`No older events in this range.`:m===void 0?b===`All events`?`No events recorded yet`:`No matching reports in this period`:`No events in the last ${z[m].period}.`}),S?null:E]}),m!==void 0&&o.nextCursor===null&&(o.data.length>0||S)?(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-t px-4 py-3 sm:px-6`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Start of range reached`}),E]}):null,o.data.length>0||S||o.nextCursor?(0,Y.jsx)(X,{hasPrevious:S,label:b,nextCursor:o.nextCursor,onNext:l,onPrevious:u,pageLength:o.data.length,pageNumber:p}):null]}):null})]})}var Se=e=>e.userId??`—`,Ce=e=>`lastKnownBundleId`in e?e.lastKnownBundleId:e.type===`UPDATE_DOWNLOADED`||e.type===`UPDATE_FAILED`?e.fromBundleId:e.toBundleId;function we({error:n,history:r,isLoading:i,onNext:o,onPrevious:s,onRefresh:c,pageNumber:l,retention:u=C,selectedEvent:d,selectedInstallId:f}){let p=_(),m=d?Ce(d):void 0,b=d&&`pendingBundleId`in d?d.pendingBundleId:d&&`type`in d&&d.type===`UPDATE_DOWNLOADED`?d.toBundleId:null;return(0,Y.jsxs)(I,{className:`@container min-h-0 min-w-0 shadow-sm`,children:[(0,Y.jsx)(R,{className:`p-4 sm:p-6`,children:(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,Y.jsx)(F,{className:`text-sm font-medium`,children:(0,Y.jsx)(`h2`,{children:f===void 0?`Select an installation`:`Installation history`})}),f===void 0?null:(0,Y.jsxs)(ne,{children:[`Bundle changes and update failures are kept for`,` `,T(u.rawDays),`; the latest report, for`,` `,T(u.dailyDays),` after the installation last reports.`]})]}),c&&f!==void 0?(0,Y.jsxs)(t,{className:`h-11 lg:h-8`,size:`lg`,variant:`outline`,onClick:c,disabled:i,children:[(0,Y.jsx)(k,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Refresh`]}):null]})}),(0,Y.jsxs)(L,{className:`min-h-0 p-0`,children:[f!==void 0&&d?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`section`,{"aria-labelledby":`latest-installation-state`,className:`px-4 pb-4 sm:px-6 sm:pb-6`,children:[(0,Y.jsx)(`h3`,{className:`sr-only`,id:`latest-installation-state`,children:`Latest reported state`}),(0,Y.jsxs)(`dl`,{className:`grid grid-cols-2 gap-4 @[36rem]:grid-cols-3`,children:[(0,Y.jsxs)(`div`,{className:`col-span-2 min-w-0 @[36rem]:col-span-1`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`User ID`}),(0,Y.jsx)(`dd`,{className:`mt-1 text-sm font-medium wrap-anywhere`,children:Se(d)})]}),(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Install ID`}),(0,Y.jsx)(`dd`,{className:`mt-1 font-mono text-xs`,children:(0,Y.jsx)(K,{value:f,buttonClassName:`min-h-11 px-3 lg:min-h-0 lg:px-1.5`})})]}),(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Last known bundle`}),(0,Y.jsxs)(`dd`,{className:`mt-1 flex min-w-0 flex-wrap items-center gap-2 font-mono text-xs`,children:[m?(0,Y.jsx)(K,{value:m,buttonClassName:`min-h-11 px-3 lg:min-h-0 lg:px-1.5`}):`—`,pe(m,d.minBundleId)?(0,Y.jsx)(fe,{}):null]})]}),b?(0,Y.jsxs)(`div`,{className:`col-span-2 min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Downloaded · Not launched yet`}),(0,Y.jsx)(`dd`,{className:`mt-1 text-xs`,children:(0,Y.jsx)(K,{value:b})})]}):null]}),d.httpResponse?(0,Y.jsx)(`div`,{className:`mt-4`,children:(0,Y.jsx)(h,{event:d})}):null]}),(0,Y.jsx)(a,{})]}):null,f===void 0?null:i?(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3 p-6`,role:`status`,"aria-label":`Loading installation history`,children:[(0,Y.jsx)(e,{className:`h-10 w-full`}),(0,Y.jsx)(e,{className:`h-10 w-full`}),(0,Y.jsx)(e,{className:`h-10 w-full`})]}):n?(0,Y.jsx)(`div`,{className:`p-6`,children:(0,Y.jsx)(q,{error:n instanceof Error?n:Error(),fallbackTitle:`Installation history unavailable`})}):r&&r.data.length>0?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`@[48rem]:hidden`,children:(0,Y.jsx)(ve,{events:r.data,formatter:p})}),(0,Y.jsx)(`div`,{className:`hidden @[48rem]:block`,children:(0,Y.jsxs)(G,{className:`min-w-3xl table-fixed`,children:[(0,Y.jsx)(V,{children:(0,Y.jsxs)(U,{className:`[&>th]:px-4 sm:[&>th]:px-6`,children:[(0,Y.jsx)(H,{className:`w-64`,children:`Time`}),(0,Y.jsx)(H,{className:`w-48`,children:`Event`}),(0,Y.jsx)(H,{className:`w-32`,children:`App`}),(0,Y.jsx)(H,{className:`w-52`,children:`Bundle`})]})}),(0,Y.jsx)(le,{children:r.data.map(e=>(0,Y.jsxs)(U,{className:`[&>td]:px-4 [&>td]:py-4 [&>td]:align-top sm:[&>td]:px-6`,children:[(0,Y.jsx)(W,{className:`whitespace-normal text-xs tabular-nums`,children:(0,Y.jsx)(g,{value:e.receivedAtMs,formatter:p})}),(0,Y.jsx)(W,{children:(0,Y.jsx)(v,{event:e})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsxs)(`span`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]}),(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:e.channel})]})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsx)(y,{event:e})})]},e.id))})]})}),(0,Y.jsx)(X,{hasPrevious:l>1,label:`Installation history`,nextCursor:r.nextCursor,onNext:o,onPrevious:s,pageLength:r.data.length,pageNumber:l})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`p-6 text-sm text-muted-foreground`,children:l>1?`No older bundle changes.`:`No bundle changes recorded yet.`}),r&&(l>1||r.nextCursor)?(0,Y.jsx)(X,{hasPrevious:l>1,label:`Installation history`,nextCursor:r.nextCursor,onNext:o,onPrevious:s,pageLength:0,pageNumber:l}):null]})]})]})}var Te=e=>e.lastKnownBundleId,Ee=e=>e.userId??`—`;function De({error:e,onNext:i,onPrevious:a,onSelect:o,pageNumber:s,results:c,selectedInstallId:l}){let[u,d]=(0,J.useState)(!1),f=(0,J.useId)(),p=(0,J.useRef)(null),m=!e&&c&&c.data.length>0;return(0,Y.jsxs)(I,{className:`min-h-0 min-w-0 shadow-sm`,children:[(0,Y.jsx)(R,{className:`p-4 sm:px-6`,children:(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Y.jsx)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:(0,Y.jsx)(F,{className:`text-sm font-medium`,children:(0,Y.jsx)(`h2`,{children:`Matching installations`})})}),(0,Y.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:m?(0,Y.jsx)(t,{"aria-controls":f,"aria-expanded":u,"aria-label":u?`Hide matching installations`:`Show matching installations`,className:`size-11 lg:hidden`,onClick:()=>d(!u),ref:p,size:`icon-lg`,variant:`ghost`,children:(0,Y.jsx)(O,{"aria-hidden":`true`,className:r(u&&`rotate-180`)})}):null})]})}),(0,Y.jsxs)(L,{className:r(`min-h-0 p-0`,m&&!u&&`hidden lg:block`),id:f,children:[e?(0,Y.jsx)(`div`,{className:`p-6`,children:(0,Y.jsx)(q,{error:e instanceof Error?e:Error(),fallbackTitle:`Installation search unavailable`})}):c&&c.data.length>0?(0,Y.jsx)(`ul`,{"aria-label":`Matching installations`,className:`divide-y`,children:c.data.map(e=>{let t=Te(e),n=e.installId===l;return(0,Y.jsx)(`li`,{children:(0,Y.jsxs)(`button`,{"aria-label":`${Ee(e)}, install ID ${e.installId}`,"aria-pressed":n,className:`group flex w-full min-w-0 flex-col gap-2 border-l-2 border-transparent px-4 py-4 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:border-ring focus-visible:bg-muted/40 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/30 aria-pressed:border-primary aria-pressed:bg-muted/60 motion-reduce:transition-none sm:px-6`,onClick:()=>{o(e.installId),d(!1),p.current?.focus()},type:`button`,children:[(0,Y.jsxs)(`span`,{className:`flex w-full min-w-0 items-center justify-between gap-3`,children:[(0,Y.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium`,children:Ee(e)}),n?(0,Y.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 text-xs font-medium text-primary`,children:[(0,Y.jsx)(D,{"aria-hidden":`true`,className:`size-3.5`}),(0,Y.jsx)(`span`,{className:`sr-only`,children:`Selected`})]}):null]}),(0,Y.jsx)(`span`,{className:`flex flex-wrap items-center gap-2`,children:(0,Y.jsx)(`span`,{className:`font-mono text-xs`,title:e.installId,children:ue(e.installId)})}),(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,Y.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Bundle`}),t?(0,Y.jsx)(`span`,{className:`font-mono text-xs`,title:t,children:ue(t)}):(0,Y.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`—`})]})]})},e.installId)})}):(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 p-4 sm:px-6`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No matches`}),(0,Y.jsx)(`a`,{className:n({variant:`outline`,className:`h-11 px-3 lg:h-8`}),href:`#installation-history-search`,children:`Edit search`})]}),c&&(c.data.length>0||s>1||c.nextCursor)?(0,Y.jsx)(X,{hasPrevious:s>1,label:`Installation results`,nextCursor:c.nextCursor,onNext:i,onPrevious:a,pageLength:c.data.length,pageNumber:s}):null]})]})}function Oe({draftQuery:e,onDraftQueryChange:n,onSubmit:r,onClear:i}){return(0,Y.jsx)(`form`,{"aria-label":`Find installation`,onSubmit:t=>{t.preventDefault(),e.trim()&&r()},role:`search`,children:(0,Y.jsxs)(ce,{className:`gap-2`,children:[(0,Y.jsx)(se,{className:`sr-only`,htmlFor:`installation-history-search`,children:`User ID or installation ID`}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Y.jsxs)(N,{className:`h-11 w-auto min-w-0 flex-1 basis-44 lg:h-8`,children:[(0,Y.jsx)(j,{children:(0,Y.jsx)(P,{"aria-hidden":`true`})}),(0,Y.jsx)(A,{autoComplete:`off`,className:`h-11 text-base md:text-base lg:h-8 lg:text-xs`,id:`installation-history-search`,maxLength:1024,name:`installation`,onChange:e=>n(e.target.value),placeholder:`User ID or installation ID`,spellCheck:!1,type:`search`,value:e}),e.length>0?(0,Y.jsx)(j,{align:`inline-end`,children:(0,Y.jsx)(M,{"aria-label":`Clear installation lookup`,className:`size-11 lg:size-5`,onClick:i,size:`icon-xs`,children:(0,Y.jsx)(s,{"aria-hidden":`true`})})}):null]}),(0,Y.jsx)(t,{"aria-label":`Find installation`,className:`h-11 px-3 lg:h-8`,disabled:e.trim().length===0,size:`lg`,type:`submit`,variant:`outline`,children:`Find`})]})]})})}function ke(){return(0,Y.jsxs)(`div`,{className:`grid items-stretch gap-6 lg:min-h-96 lg:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)]`,children:[(0,Y.jsx)(e,{className:`h-64 w-full lg:h-full`}),(0,Y.jsx)(e,{className:`h-64 w-full lg:h-full`})]})}var Ae=20,je=50,Z=()=>Date.now(),Q=(e,t)=>[...e,t??``],$=e=>({cursor:e?.at(-1)||void 0,stack:e.slice(0,-1)});function Me(){let e=B.useSearch(),n=B.useNavigate(),r=ee(),[i,a]=(0,J.useState)(e.query??``),[o]=(0,J.useState)(Z),[s]=(0,J.useState)(Z),c=_e({select:e=>e.state.insightsPagination}),l=c?.eventsBack??[],u=c?.searchBack??[],d=c?.historyBack??[],f=e.query?.trim()??``,p=f.length>0,m=e.installId!==void 0,h=p||m,g=e.eventsBefore??o,_=e.eventsRange??`7d`,v=e.historyBefore??s,y=(t,r=!1,i={})=>{n({to:`/installations`,search:{...e,...t},state:e=>({...e,insightsPagination:{...e.insightsPagination,...i}}),replace:r})};(0,J.useEffect)(()=>{a(e.query??``)},[e.query]),(0,J.useEffect)(()=>{e.eventsBefore===void 0&&y({eventsBefore:g},!0)},[g,e.eventsBefore]),(0,J.useEffect)(()=>{m&&e.historyBefore===void 0&&y({historyBefore:v},!0)},[m,v,e.historyBefore]);let x=E({...re(_,g),cursor:e.eventsCursor,limit:20},!h),C=S({cursor:e.searchCursor,identity:f,limit:Ae},p);(0,J.useEffect)(()=>{let e=C.data?.data[0]?.installId;!p||m||e===void 0||y({historyBefore:Z(),historyCursor:void 0,installId:e},!0,{historyBack:[]})},[p,m,C.data?.data]);let D=w(e.installId??``,m),O=te({beforeReceivedAtMs:v,cursor:e.historyCursor,installId:e.installId??``,limit:je},m),k=D.data??C.data?.data.find(({installId:t})=>t===e.installId)??O.data?.data[0],A=h?`installation-history-${e.historyCursor??`first`}`:`all-events-${e.eventsCursor??`first`}`,j=(0,J.useRef)(null),M=ge({id:A,getKey:ie});(0,J.useLayoutEffect)(()=>{!h&&!x.isLoading&&j.current&&(j.current.scrollTop=M?.scrollY??0)},[x.isLoading,h,M?.scrollY,A]);let N=()=>{a(``),y({historyBefore:void 0,historyCursor:void 0,installId:void 0,query:void 0,searchCursor:void 0},!1,{historyBack:[],searchBack:[]})},P=(0,Y.jsx)(Oe,{draftQuery:i,onClear:N,onDraftQueryChange:a,onSubmit:()=>{let e=i.trim();if(!e){N();return}y({historyBefore:void 0,historyCursor:void 0,installId:void 0,query:e,searchCursor:void 0},!1,{historyBack:[],searchBack:[]})}});return(0,Y.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,Y.jsx)(me,{view:`events`}),(0,Y.jsx)(`div`,{ref:j,"data-scroll-restoration-id":A,id:`insights-events-scroll`,className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,Y.jsxs)(`div`,{className:`mx-auto flex w-full max-w-7xl flex-col gap-4 sm:gap-6`,children:[h?(0,Y.jsx)(I,{className:`shadow-sm`,children:(0,Y.jsxs)(L,{className:`flex flex-col gap-3 p-4 sm:p-6`,children:[(0,Y.jsxs)(t,{className:`-ml-2 h-11 self-start lg:h-8`,onClick:N,variant:`ghost`,children:[(0,Y.jsx)(b,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Back to all events`]}),P]})}):null,h?C.isLoading&&p?(0,Y.jsx)(ke,{}):(0,Y.jsxs)(`div`,{className:`grid min-h-0 min-w-0 items-stretch gap-4 sm:gap-6 ${p?`lg:min-h-96 lg:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)]`:`lg:grid-cols-1`}`,children:[p?(0,Y.jsx)(De,{error:C.error,onNext:()=>{C.data?.nextCursor&&y({installId:void 0,searchCursor:C.data.nextCursor},!0,{searchBack:Q(u,e.searchCursor)})},onPrevious:()=>{let e=$(u);y({installId:void 0,searchCursor:e.cursor},!0,{searchBack:e.stack})},onSelect:e=>{y({historyBefore:Z(),historyCursor:void 0,installId:e},!1,{historyBack:[]})},pageNumber:u.length+1,results:C.data,selectedInstallId:e.installId}):null,(0,Y.jsx)(we,{error:O.error??D.error,history:O.data,isLoading:O.isLoading||D.isLoading,onNext:()=>{O.data?.nextCursor&&y({historyCursor:O.data.nextCursor},!0,{historyBack:Q(d,e.historyCursor)})},onPrevious:()=>{let e=$(d);y({historyCursor:e.cursor},!0,{historyBack:e.stack})},onRefresh:()=>{y({historyBefore:Z(),historyCursor:void 0},!0,{historyBack:[]})},pageNumber:d.length+1,retention:r,selectedEvent:k,selectedInstallId:e.installId})]}):(0,Y.jsx)(xe,{description:`Downloads, launches, crashes, update failures, and other changes to what an installation runs, newest first, kept for ${T(r.rawDays)}. Launches that change nothing aren't listed.`,error:x.error,eventsLocation:{eventsBefore:g,eventsCursor:e.eventsCursor,eventsRange:e.eventsRange},history:x.data,isFetching:x.isFetching,isLoading:x.isLoading,onNext:()=>{x.data?.nextCursor&&y({eventsCursor:x.data.nextCursor},!0,{eventsBack:Q(l,e.eventsCursor)})},onPrevious:()=>{let e=$(l);y({eventsCursor:e.cursor},!0,{eventsBack:e.stack})},onRangeChange:e=>{y({eventsBefore:Z(),eventsCursor:void 0,eventsRange:e},!1,{eventsBack:[]})},onRefresh:()=>{y({eventsBefore:Z(),eventsCursor:void 0},!0,{eventsBack:[]})},pageNumber:l.length+1,range:_,rawDays:r.rawDays,children:P})]})},A)]})}export{Me as component};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-builds-DEWHul-_.js","assets/sidebar-Di9SN47G.js","assets/preload-helper-B44EvKhG.js","assets/link-DTEyW70e.js","assets/select-CBIU0_M1.js","assets/useCompositeListItem-JmyDfo3-.js","assets/check-CXVR3s3X.js","assets/arrow-up-right-DK8Zdg40.js","assets/native-builds-CDYL3y0I.js","assets/relativeTime-BscR0TsX.js","assets/uuidv7-BLyD3pAM.js","assets/chevron-right-BoUXo82O.js","assets/download-Cf24LBde.js","assets/-native-builds-search-DC2PutLU.js","assets/refresh-cw-C6svDMfM.js","assets/StoreSubmission-D8BGGGgn.js","assets/copy-DsuLj3oj.js","assets/badge-UNnTz4Dl.js","assets/dist-UQUhRoJi.js","assets/api-BEEYDSCX.js","assets/useMutation-DbYw7boA.js","assets/PlatformIcon-DCTtCP5t.js","assets/dialog-C2U9bINi.js","assets/table-B22H8-RL.js"])))=>i.map(i=>d[i]);
2
+ import{n as e,r as t,t as n}from"./preload-helper-B44EvKhG.js";import{n as r}from"./-native-builds-search-DC2PutLU.js";var i=t(`/native-builds`)({component:e(()=>n(()=>import(`./native-builds-DEWHul-_.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23])),`component`),validateSearch:r});export{i as t};
@@ -0,0 +1 @@
1
+ import{Wr as e,ii as t,ir as n}from"./sidebar-Di9SN47G.js";import{f as r,p as i,t as a}from"./uuidv7-BLyD3pAM.js";import{n as o,t as s}from"./relativeTime-BscR0TsX.js";var c=n(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),l=t(o(),1),u=t(s(),1),d=e();l.default.extend(u.default);function f({uuid:e,format:t=`relative`}){let n=(0,l.default)(a(e));return t===`relative`?(0,d.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:n.fromNow()}):t===`absolute`?(0,d.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:n.format(`YYYY-MM-DD HH:mm:ss`)}):(0,d.jsxs)(`div`,{className:`flex flex-col`,children:[(0,d.jsx)(`span`,{className:`text-sm`,children:n.fromNow()}),(0,d.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n.format(`YYYY-MM-DD HH:mm:ss`)})]})}var p=e=>{let t=e.trim();if(t.startsWith(`git@`)){let e=t.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(e)return`https://${e[1]}/${e[2]}`}if(t.startsWith(`ssh://`))try{let e=new URL(t);return`https://${e.hostname}${e.pathname}`.replace(/\/+$/,``).replace(/\.git$/,``)}catch{return t.replace(/\/+$/,``).replace(/\.git$/,``)}return t.replace(/\/+$/,``).replace(/\.git$/,``)},m=(e,t)=>{if(!e?.trim())return null;let n=p(e);try{let{hostname:e}=new URL(n);if(e.includes(`gitlab`))return`${n}/-/commit/${t}`;if(e.includes(`bitbucket`))return`${n}/commits/${t}`}catch{}return`${n}/commit/${t}`},h=e=>/^[\w@%+=:,./-]+$/.test(e)?e:`'${e.replaceAll(`'`,`'\\''`)}'`,g={apk:{label:`APK`,installs:`Android device or emulator`},aab:{label:`AAB`,installs:`Google Play or bundletool`},app:{label:`Simulator app`,installs:`iOS Simulator`},ipa:{label:`IPA`,installs:`registered iOS devices`}},_=e=>e===`ios`?`iOS`:`Android`,v=e=>`/api/native-builds/${encodeURIComponent(e)}/download`,y=(e,t,n)=>`${e.origin}${b(e,t)}${v(t)}?t=${encodeURIComponent(n)}`,b=(e,t)=>{let n=x(t);return e.pathname.endsWith(n)?e.pathname.slice(0,-n.length):``},x=e=>`/native-builds/${encodeURIComponent(e)}`,S=3600*1e3,C=`hot-updater-ios-udid`,w=/^(?:[0-9a-f]{40}|[0-9a-f]{8}-[0-9a-f]{16})$/iu,T=e=>`/_hot-updater/native-builds/${encodeURIComponent(e)}/device.mobileconfig`,E=e=>`/_hot-updater/native-builds/${encodeURIComponent(e)}/manifest.plist`,D=e=>`npx hot-updater native-build devices add --udid ${e} --name "Teammate's iPhone"`,O=(e,t,n)=>{let r=`${e.origin}${b(e,t)}${E(t)}?t=${encodeURIComponent(n)}`;return`itms-services://?action=download-manifest&url=${encodeURIComponent(r)}`},k=e=>i(e.channel_id.slice(8)),A=e=>{if(e.fingerprintHash!==null)return{platform:e.platform,channel:e.channel,fingerprintHash:e.fingerprintHash,appVersion:null};let t=e.targetAppVersion;return t===null||r(t)!==t?null:{platform:e.platform,channel:e.channel,fingerprintHash:null,appVersion:t}},j=e=>{let t=(e.artifact_storage_uri.split(/[?#]/,1)[0]??``).split(`/`).at(-1)??``;try{return decodeURIComponent(t)}catch{return t}},M=e=>e.app_version===null?{label:`Fingerprint`,value:e.fingerprint_hash??``}:{label:`App version`,value:e.app_version},N=[`B`,`KB`,`MB`,`GB`],P=e=>{let t=e,n=0;for(;t>=1024&&n<N.length-1;)t/=1024,n+=1;return`${n===0?t:t.toFixed(1)} ${N[n]}`},F=e=>`npx hot-updater native-build install ${h(e.id)}`;export{A as _,P as a,f as b,D as c,j as d,F as f,_ as g,M as h,b as i,T as l,y as m,C as n,g as o,O as p,S as r,k as s,w as t,v as u,h as v,c as x,m as y};
@@ -0,0 +1 @@
1
+ import{$ as e,Fn as t,In as n,Wr as r,ir as i,p as a}from"./sidebar-Di9SN47G.js";import{t as o}from"./link-DTEyW70e.js";import{a as s}from"./preload-helper-B44EvKhG.js";import{t as c}from"./arrow-up-right-DK8Zdg40.js";import{a as l,b as u,d,g as f,h as ee,o as p,s as m,u as h,x as g}from"./native-builds-CDYL3y0I.js";import{t as _}from"./chevron-right-BoUXo82O.js";import{a as v,i as y,n as te,o as ne,r as re,t as ie}from"./select-CBIU0_M1.js";import{t as ae}from"./download-Cf24LBde.js";import{r as oe}from"./-native-builds-search-DC2PutLU.js";import{t as b}from"./refresh-cw-C6svDMfM.js";import{a as x,i as S,r as C,t as w}from"./StoreSubmission-D8BGGGgn.js";import{a as T,f as E,i as D,n as O,o as k,r as A,s as j,t as M}from"./badge-UNnTz4Dl.js";import{t as N}from"./native-builds-Br0onFRc.js";import{t as P}from"./PlatformIcon-DCTtCP5t.js";import{a as F,n as I,o as L,r as R,s as z,t as B}from"./dialog-C2U9bINi.js";import{h as se,i as V}from"./api-BEEYDSCX.js";import{a as H,i as U,n as W,o as G,r as K,t as ce}from"./table-B22H8-RL.js";var le=i(`file-up`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),ue=i(`hard-drive-download`,[[`path`,{d:`M12 2v8`,key:`1q4o3n`}],[`path`,{d:`m16 6-4 4-4-4`,key:`6wukr`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,key:`w68u3i`}],[`path`,{d:`M6 18h.01`,key:`uhywen`}],[`path`,{d:`M10 18h.01`,key:`h775k`}]]),q=r(),J=`npx hot-updater native-build import <file>`,Y=`https://hot-updater.dev/docs/guides/native-build#import-a-build-made-elsewhere`;function de(){return(0,q.jsxs)(B,{children:[(0,q.jsxs)(z,{render:(0,q.jsx)(t,{"aria-label":`Import a build`,className:`min-h-11 sm:min-h-7`,size:`sm`,variant:`outline`}),children:[(0,q.jsx)(le,{"data-icon":`inline-start`}),(0,q.jsx)(`span`,{className:`hidden sm:inline`,children:`Import a build`})]}),(0,q.jsxs)(I,{className:`sm:max-w-lg`,children:[(0,q.jsxs)(F,{children:[(0,q.jsx)(L,{children:`Import a build`}),(0,q.jsx)(R,{children:`Track an .ipa, .aab, .apk or .app built elsewhere as a patch base.`})]}),(0,q.jsx)(x,{label:`the import command`,value:J,wrap:!0}),(0,q.jsxs)(`a`,{className:n({className:`min-h-11 w-full sm:min-h-8 sm:w-fit`,variant:`outline`}),href:Y,rel:`noreferrer`,target:`_blank`,children:[`Import guide`,(0,q.jsx)(c,{"data-icon":`inline-end`})]})]})]})}var fe=`https://hot-updater.dev/docs/guides/native-build#how-a-build-is-tracked`,pe=6;function me({channel:e,paged:r,onClearChannel:i,onNewest:a}){return(0,q.jsx)(G,{children:(0,q.jsx)(K,{className:`h-44 text-center text-muted-foreground`,colSpan:pe,children:(0,q.jsxs)(`div`,{className:`mx-auto flex max-w-sm flex-col items-center gap-2 whitespace-normal`,children:[(0,q.jsx)(ue,{"aria-hidden":`true`,className:`size-5`}),r?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`font-medium text-foreground`,children:`No more native builds`}),(0,q.jsx)(t,{className:`mt-1 min-h-11 sm:min-h-8`,onClick:a,variant:`outline`,children:`Show the newest builds`})]}):e===void 0?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`font-medium text-foreground`,children:`No native builds`}),(0,q.jsxs)(`p`,{children:[`Build one with`,` `,(0,q.jsx)(`code`,{className:`font-mono text-xs`,children:`native-build android`}),` `,`or `,(0,q.jsx)(`code`,{className:`font-mono text-xs`,children:`native-build ios`}),`, or import one built elsewhere:`]}),(0,q.jsx)(`div`,{className:`w-full text-left`,children:(0,q.jsx)(x,{label:`the import command`,value:J,wrap:!0})}),(0,q.jsxs)(`a`,{className:n({className:`mt-1 min-h-11 sm:min-h-8`,variant:`outline`}),href:fe,rel:`noreferrer`,target:`_blank`,children:[`Native build guide`,(0,q.jsx)(c,{"data-icon":`inline-end`})]}),(0,q.jsxs)(`a`,{className:n({className:`min-h-11 sm:min-h-8`,variant:`outline`}),href:Y,rel:`noreferrer`,target:`_blank`,children:[`Import guide`,(0,q.jsx)(c,{"data-icon":`inline-end`})]})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`font-medium text-foreground`,children:[`No native build embeds `,(0,q.jsx)(`span`,{translate:`no`,children:e})]}),(0,q.jsx)(`p`,{children:`A build embeds the channel it was built on. Build one on this channel, or list every channel's builds.`}),(0,q.jsx)(t,{className:`mt-1 min-h-11 sm:min-h-8`,onClick:i,variant:`outline`,children:`Show all channels`})]})]})})})}function he(){return Array.from({length:3},(t,n)=>(0,q.jsxs)(G,{children:[(0,q.jsxs)(K,{className:`space-y-2 py-3`,children:[n===0?(0,q.jsx)(`span`,{className:`sr-only`,children:`Loading native builds`}):null,(0,q.jsx)(e,{className:`h-3.5 w-40`}),(0,q.jsx)(e,{className:`h-3 w-24`})]}),(0,q.jsx)(K,{className:`hidden md:table-cell`,children:(0,q.jsx)(e,{className:`h-5 w-20`})}),(0,q.jsx)(K,{className:`hidden xl:table-cell`,children:(0,q.jsx)(e,{className:`h-3.5 w-28`})}),(0,q.jsx)(K,{className:`hidden xl:table-cell`,children:(0,q.jsx)(e,{className:`h-3.5 w-14`})}),(0,q.jsx)(K,{className:`hidden sm:table-cell`,children:(0,q.jsx)(e,{className:`h-3.5 w-20`})}),(0,q.jsx)(K,{children:(0,q.jsx)(e,{className:`ml-auto h-6 w-16`})})]},n))}function ge({build:e,onChannel:t}){let r=s(),i=ee(e),a=m(e),c=`${f(e.platform)} ${p[e.artifact_kind].label}`;return(0,q.jsxs)(G,{className:`cursor-pointer`,onClick:()=>void r({to:`/native-builds/$buildId`,params:{buildId:e.id}}),children:[(0,q.jsx)(K,{className:`py-3 whitespace-normal`,children:(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,q.jsx)(P,{className:`size-3.5 shrink-0 text-muted-foreground`,platform:e.platform}),(0,q.jsx)(o,{className:`font-medium underline-offset-4 hover:underline`,onClick:e=>e.stopPropagation(),params:{buildId:e.id},to:`/native-builds/$buildId`,children:c}),(0,q.jsx)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:l(e.byte_size)}),(0,q.jsx)(w,{build:e,withTime:!0}),e.store_build===!0?(0,q.jsx)(M,{variant:`secondary`,children:`Store build`}):null]}),(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground`,children:[(0,q.jsx)(`span`,{children:i.label}),e.fingerprint_hash===null?(0,q.jsx)(`span`,{className:`font-mono text-foreground`,translate:`no`,children:i.value}):(0,q.jsx)(S,{label:`fingerprint`,length:12,value:e.fingerprint_hash}),e.build_number?(0,q.jsxs)(`span`,{className:`tabular-nums`,translate:`no`,children:[`· build `,e.build_number]}):null,(0,q.jsxs)(`span`,{className:`md:hidden`,translate:`no`,children:[`· `,a]}),e.git_commit_hash===null?null:(0,q.jsxs)(`span`,{className:`inline-flex items-center gap-1 xl:hidden`,children:[`· commit `,(0,q.jsx)(C,{hash:e.git_commit_hash})]})]}),(0,q.jsxs)(`div`,{className:`text-xs text-muted-foreground xl:hidden`,children:[`Built-in bundle`,` `,(0,q.jsx)(`span`,{className:`font-mono [overflow-wrap:anywhere] text-foreground`,translate:`no`,children:e.min_bundle_id})]})]})}),(0,q.jsx)(K,{className:`hidden md:table-cell`,children:(0,q.jsx)(`button`,{"aria-label":`Show the builds that embed ${a}`,className:`rounded-md text-left focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none`,onClick:e=>{e.stopPropagation(),t(a)},type:`button`,children:(0,q.jsx)(M,{className:`whitespace-nowrap`,translate:`no`,variant:`outline`,children:a})})}),(0,q.jsx)(K,{className:`hidden xl:table-cell`,children:(0,q.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,translate:`no`,children:e.min_bundle_id})}),(0,q.jsx)(K,{className:`hidden xl:table-cell`,children:(0,q.jsx)(C,{hash:e.git_commit_hash})}),(0,q.jsx)(K,{className:`hidden sm:table-cell`,children:(0,q.jsx)(u,{uuid:e.id})}),(0,q.jsx)(K,{className:`text-right`,children:(0,q.jsxs)(`a`,{"aria-label":`Download ${d(e)}`,className:n({className:`min-h-11 sm:min-h-7`,size:`sm`,variant:`outline`}),download:!0,href:h(e.id),onClick:e=>e.stopPropagation(),children:[(0,q.jsx)(ae,{"data-icon":`inline-start`}),`Download`]})})]})}function X({builds:e,channel:n,paged:r,onChannel:i,onPage:a}){let o=e.data?.data,{next:s,previous:c}=e.data??{};return e.isError?(0,q.jsx)(`div`,{className:`p-4`,children:(0,q.jsxs)(O,{variant:`destructive`,children:[(0,q.jsx)(E,{}),(0,q.jsx)(T,{children:`Native builds couldn't be loaded`}),(0,q.jsx)(D,{children:`Check your connection and try again.`}),(0,q.jsx)(A,{children:(0,q.jsxs)(t,{onClick:()=>void e.refetch(),size:`xs`,variant:`outline`,children:[(0,q.jsx)(b,{"data-icon":`inline-start`}),`Retry`]})})]})}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(ce,{"aria-busy":e.isPlaceholderData,"aria-label":`Native builds`,children:[(0,q.jsx)(H,{children:(0,q.jsxs)(G,{children:[(0,q.jsx)(U,{children:`Build`}),(0,q.jsx)(U,{className:`hidden md:table-cell`,children:`Channel`}),(0,q.jsx)(U,{className:`hidden xl:table-cell`,children:`Built-in bundle`}),(0,q.jsx)(U,{className:`hidden xl:table-cell`,children:`Commit`}),(0,q.jsx)(U,{className:`hidden sm:table-cell`,children:`Created`}),(0,q.jsx)(U,{className:`text-right`,children:(0,q.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,q.jsx)(W,{children:e.isLoading?(0,q.jsx)(he,{}):o?.length===0?(0,q.jsx)(me,{channel:n,onClearChannel:()=>i(void 0),onNewest:()=>a({}),paged:r}):o?.map(e=>(0,q.jsx)(ge,{build:e,onChannel:i},e.id))})]}),s!==void 0||c!==void 0?(0,q.jsxs)(`nav`,{"aria-label":`Native build pages`,className:`flex items-center justify-end gap-2 border-t px-4 py-2`,children:[(0,q.jsxs)(t,{className:`min-h-11 sm:min-h-7`,disabled:c===void 0||e.isPlaceholderData,onClick:()=>a({after:c}),size:`sm`,variant:`ghost`,children:[(0,q.jsx)(g,{"data-icon":`inline-start`}),`Newer`]}),(0,q.jsxs)(t,{className:`min-h-11 sm:min-h-7`,disabled:s===void 0||e.isPlaceholderData,onClick:()=>a({before:s}),size:`sm`,variant:`ghost`,children:[`Older`,(0,q.jsx)(_,{"data-icon":`inline-end`})]})]}):null]})}var Z=`all`,Q=`channel:`,$=e=>`${Q}${e}`;function _e({search:e,onSearchChange:n}){let{channel:r,before:i,after:o}=e,s=se(e),c=V(),l=c.data?.map(({name:e})=>e)??[],u=r===void 0||l.includes(r)?l:[r,...l],d=e=>n(e===void 0?{}:{channel:e});return(0,q.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,q.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b bg-background px-3 py-3 sm:min-h-12 sm:flex-nowrap sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm`,children:[(0,q.jsx)(a,{className:`-ml-1 size-11 lg:size-7`}),(0,q.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,q.jsx)(oe,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,q.jsx)(`h1`,{className:`text-sm font-medium`,children:`Native builds`})]}),(0,q.jsx)(`p`,{className:`basis-full pl-12 text-xs text-muted-foreground sm:basis-auto sm:pl-0`,children:`Store and test builds, each the built-in bundle its OTAs patch from.`})]}),(0,q.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,q.jsxs)(k,{className:`mx-auto w-full max-w-6xl overflow-hidden shadow-sm`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 border-b px-4 py-3`,children:[(0,q.jsxs)(ie,{items:[{label:`All channels`,value:Z},...u.map(e=>({label:e,value:$(e)}))],onOpenChange:e=>{e&&c.refetch()},onValueChange:e=>d(e?.startsWith(Q)?e.slice(8):void 0),value:r===void 0?Z:$(r),children:[(0,q.jsx)(v,{"aria-label":`Channel`,className:`h-11 min-w-0 flex-1 text-xs sm:h-8 sm:w-48 sm:flex-none`,children:(0,q.jsx)(ne,{})}),(0,q.jsx)(te,{children:(0,q.jsxs)(re,{children:[(0,q.jsx)(y,{value:Z,children:`All channels`}),u.map(e=>(0,q.jsx)(y,{translate:`no`,value:$(e),children:e},e))]})})]}),(0,q.jsx)(`div`,{className:`ml-auto`,children:(0,q.jsx)(de,{})}),(0,q.jsx)(t,{"aria-label":`Refresh native builds`,className:`size-11 sm:size-7`,disabled:s.isLoading,onClick:()=>void s.refetch(),size:`icon-sm`,variant:`ghost`,children:(0,q.jsx)(b,{"aria-hidden":`true`})})]}),(0,q.jsx)(j,{className:`p-0`,children:(0,q.jsx)(X,{builds:s,channel:r,onChannel:d,onPage:e=>n({...r===void 0?{}:{channel:r},...e}),paged:i!==void 0||o!==void 0})})]})})]})}function ve(){let e=N.useSearch(),t=N.useNavigate();return(0,q.jsx)(_e,{onSearchChange:e=>void t({search:e}),search:e})}export{ve as component};
@@ -0,0 +1 @@
1
+ import{$ as e,Fn as t,In as n,Ln as r,Wr as i,ii as a,ir as o,p as s,ti as c}from"./sidebar-Di9SN47G.js";import{t as l}from"./link-DTEyW70e.js";import{t as u}from"./arrow-up-right-DK8Zdg40.js";import{a as d,b as f,c as p,d as m,f as ee,g as h,h as te,i as ne,l as re,m as ie,n as ae,o as oe,p as se,r as ce,t as le,u as ue,v as g,x as de}from"./native-builds-CDYL3y0I.js";import{t as fe}from"./chevron-right-BoUXo82O.js";import{n as pe,t as _}from"./native-builds_._buildId-x-uu1Vbr.js";import{t as me}from"./download-Cf24LBde.js";import{n as he,t as ge}from"./RolloutPercentageBadge-frllRncE.js";import{n as _e,t as ve}from"./history-DakJoeSM.js";import{r as ye}from"./-native-builds-search-DC2PutLU.js";import{t as be}from"./refresh-cw-C6svDMfM.js";import{a as v,i as xe,n as y,r as Se,t as Ce}from"./StoreSubmission-D8BGGGgn.js";import{t as we}from"./smartphone-Bn5FtEwt.js";import{a as b,d as x,f as S,i as C,n as w,o as T,r as Te,s as E,t as D,u as O}from"./badge-UNnTz4Dl.js";import{n as Ee}from"./dist-UQUhRoJi.js";import{r as De}from"./uuidv7-BLyD3pAM.js";import{a as k,i as A,n as j,o as M,r as N,t as P}from"./empty-PAp07lsC.js";import{n as Oe}from"./relativeTime-BscR0TsX.js";import{t as ke}from"./PlatformIcon-DCTtCP5t.js";import{d as Ae,f as je,l as Me,m as Ne,p as Pe,u as Fe}from"./api-BEEYDSCX.js";import{a as Ie,i as F,n as Le,o as I,r as L,t as Re}from"./table-B22H8-RL.js";var ze=o(`package-open`,[[`path`,{d:`M12 22v-9`,key:`x3hkom`}],[`path`,{d:`M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z`,key:`2ntwy6`}],[`path`,{d:`M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13`,key:`1pmm1c`}],[`path`,{d:`M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z`,key:`12ttoo`}]]),R=i();function z({label:e,children:t}){return(0,R.jsxs)(`div`,{className:`grid gap-1 sm:grid-cols-[10rem_minmax(0,1fr)] sm:gap-4`,children:[(0,R.jsx)(`dt`,{className:`text-xs font-medium text-muted-foreground`,children:e}),(0,R.jsx)(`dd`,{className:`min-w-0 text-sm`,children:t})]})}function Be({detail:e}){let{build:n,channel:r}=e,i=Me();if(r.startsWith(`sandbox-`))return null;let a=n.store_build!==!0;return(0,R.jsx)(t,{className:`min-h-11 shrink-0 sm:min-h-8`,disabled:i.isPending,onClick:()=>i.mutate({id:n.id,storeBuild:a},{onSuccess:()=>{Ee.success(a?`Marked as the store build`:`Mark cleared`)},onError:e=>{Ee.error(`Could not change the mark`,{description:e.message})}}),size:`sm`,type:`button`,variant:`outline`,children:a?`Mark as store build`:`Clear mark`})}function Ve({detail:e}){let{build:t,newestInScope:n,storeBuildInScope:r}=e,i=r??n;if(i===null)return null;let a=i.id===t.id;return(0,R.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-md border bg-muted/40 p-3 text-xs sm:flex-row sm:items-center sm:justify-between`,children:[(0,R.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,R.jsx)(a?pe:ve,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`}),r?.id===t.id?(0,R.jsxs)(`p`,{children:[(0,R.jsx)(`span`,{className:`font-medium`,children:`Store build.`}),` New deploys to this scope patch from this build.`]}):a?(0,R.jsxs)(`p`,{children:[(0,R.jsx)(`span`,{className:`font-medium`,children:`Current baseline.`}),` The newest build, and no store build is marked. New deploys to this scope patch from this build.`]}):(0,R.jsxs)(`p`,{children:[(0,R.jsx)(`span`,{className:`font-medium`,children:`Not the base.`}),` New deploys patch from`,` `,(0,R.jsxs)(l,{className:`inline-flex items-center gap-0.5 font-medium underline underline-offset-4`,params:{buildId:i.id},to:`/native-builds/$buildId`,children:[h(i.platform),` `,oe[i.artifact_kind].label,` ·`,` `,(0,R.jsx)(f,{uuid:i.id}),(0,R.jsx)(u,{"aria-hidden":`true`,className:`size-3`})]}),`, so this one gets no new patches.`]})]}),(0,R.jsx)(Be,{detail:e})]})}function He({detail:e}){let{build:t,builtInBundle:n,channel:r}=e,i=te(t),a=n?.childCount??0;return(0,R.jsxs)(T,{className:`overflow-hidden shadow-sm`,children:[(0,R.jsx)(O,{className:`border-b px-4 py-3`,children:(0,R.jsx)(x,{className:`text-sm`,children:(0,R.jsx)(`h2`,{children:`Built-in bundle`})})}),(0,R.jsxs)(E,{className:`flex flex-col gap-4 p-4 sm:p-6`,children:[(0,R.jsxs)(`dl`,{className:`flex flex-col gap-3`,children:[(0,R.jsx)(z,{label:`Bundle ID`,children:(0,R.jsx)(`span`,{className:`break-all font-mono text-xs`,translate:`no`,children:t.min_bundle_id})}),(0,R.jsx)(z,{label:`OTAs patching from it`,children:(0,R.jsx)(`span`,{className:`tabular-nums`,children:a===1?`1 bundle`:`${a} bundles`})}),(0,R.jsx)(z,{label:`Scope`,children:(0,R.jsxs)(`span`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,R.jsx)(l,{"aria-label":`Show the builds that embed ${r}`,search:{channel:r},to:`/native-builds`,children:(0,R.jsx)(D,{translate:`no`,variant:`outline`,children:r})}),(0,R.jsx)(`span`,{className:`text-xs`,children:h(t.platform)}),(0,R.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`· `,i.label]}),t.fingerprint_hash===null?(0,R.jsx)(`span`,{className:`font-mono text-xs`,translate:`no`,children:i.value}):(0,R.jsx)(xe,{label:`fingerprint`,length:12,value:t.fingerprint_hash})]})}),t.build_number?(0,R.jsx)(z,{label:`Build number`,children:(0,R.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,translate:`no`,children:t.build_number})}):null,y(t)?(0,R.jsx)(z,{label:`Store`,children:(0,R.jsx)(Ce,{build:t,withTime:!0})}):null,(0,R.jsx)(z,{label:`Commit`,children:(0,R.jsx)(Se,{hash:t.git_commit_hash})}),(0,R.jsx)(z,{label:`Created`,children:(0,R.jsx)(f,{format:`both`,uuid:t.id})})]}),(0,R.jsx)(Ve,{detail:e}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`A store or test install of this build runs this bundle until its first OTA. That OTA downloads as a patch from this bundle when one exists, and as the full bundle otherwise.`})]})]})}var B=a(c(),1),Ue=a(Oe(),1),V=(e=>(e[e.Border=-1]=`Border`,e[e.Data=0]=`Data`,e[e.Function=1]=`Function`,e[e.Position=2]=`Position`,e[e.Timing=3]=`Timing`,e[e.Alignment=4]=`Alignment`,e))(V||{}),We=[0,1],Ge=[1,0],Ke=[2,3],qe=[3,2],Je={L:We,M:Ge,Q:Ke,H:qe},Ye=/^\d*$/,Xe=/^[A-Z0-9 $%*+./:-]*$/,H=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`,U=1,W=40,Ze=3,Qe=3,G=40,$e=10,et=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],tt=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],nt=class{constructor(e,t,n,r){if(this.version=e,this.ecc=t,e<U||e>W)throw RangeError(`Version value out of range`);if(r<-1||r>7)throw RangeError(`Mask value out of range`);this.size=e*4+17;let i=Array.from({length:this.size}).fill(!1);for(let e=0;e<this.size;e++)this.modules.push(i.slice()),this.types.push(i.map(()=>0));this.drawFunctionPatterns();let a=this.addEccAndInterleave(n);if(this.drawCodewords(a),r===-1){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);let n=this.getPenaltyScore();n<e&&(r=t,e=n),this.applyMask(t)}}this.mask=r,this.applyMask(r),this.drawFormatBits(r)}size;mask;modules=[];types=[];getModule(e,t){return e>=0&&e<this.size&&t>=0&&t<this.size&&this.modules[t][e]}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0,V.Timing),this.setFunctionModule(e,6,e%2==0,V.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)n===0&&r===0||n===0&&r===t-1||n===t-1&&r===0||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.ecc[1]<<3|e,n=t;for(let e=0;e<10;e++)n=n<<1^(n>>>9)*1335;let r=(t<<10|n)^21522;for(let e=0;e<=5;e++)this.setFunctionModule(8,e,q(r,e));this.setFunctionModule(8,7,q(r,6)),this.setFunctionModule(8,8,q(r,7)),this.setFunctionModule(7,8,q(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,q(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,q(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,q(r,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;for(let e=0;e<18;e++){let n=q(t,e),r=this.size-11+e%3,i=Math.floor(e/3);this.setFunctionModule(r,i,n),this.setFunctionModule(i,r,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;a>=0&&a<this.size&&o>=0&&o<this.size&&this.setFunctionModule(a,o,i!==2&&i!==4,V.Position)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,Math.max(Math.abs(r),Math.abs(n))!==1,V.Alignment)}setFunctionModule(e,t,n,r=V.Function){this.modules[t][e]=n,this.types[t][e]=r}addEccAndInterleave(e){let t=this.version,n=this.ecc;if(e.length!==X(t,n))throw RangeError(`Invalid argument`);let r=tt[n[0]][t],i=et[n[0]][t],a=Math.floor(Y(t)/8),o=r-a%r,s=Math.floor(a/r),c=[],l=ht(i);for(let t=0,n=0;t<r;t++){let r=e.slice(n,n+s-i+(t<o?0:1));n+=r.length;let a=gt(r,l);t<o&&r.push(0),c.push(r.concat(a))}let u=[];for(let e=0;e<c[0].length;e++)c.forEach((t,n)=>{(e!==s-i||n>=o)&&u.push(t[e])});return u}drawCodewords(e){if(e.length!==Math.floor(Y(this.version)/8))throw RangeError(`Invalid argument`);let t=0;for(let n=this.size-1;n>=1;n-=2){n===6&&(n=5);for(let r=0;r<this.size;r++)for(let i=0;i<2;i++){let a=n-i,o=n+1&2?r:this.size-1-r;!this.types[o][a]&&t<e.length*8&&(this.modules[o][a]=q(e[t>>>3],7-(t&7)),t++)}}}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw Error(`Unreachable`)}!this.types[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let t=0;t<this.size;t++){let n=!1,r=0,i=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[t][a]===n?(r++,r===5?e+=Ze:r>5&&e++):(this.finderPenaltyAddHistory(r,i),n||(e+=this.finderPenaltyCountPatterns(i)*G),n=this.modules[t][a],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,i)*G}for(let t=0;t<this.size;t++){let n=!1,r=0,i=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[a][t]===n?(r++,r===5?e+=Ze:r>5&&e++):(this.finderPenaltyAddHistory(r,i),n||(e+=this.finderPenaltyCountPatterns(i)*G),n=this.modules[a][t],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,i)*G}for(let t=0;t<this.size-1;t++)for(let n=0;n<this.size-1;n++){let r=this.modules[t][n];r===this.modules[t][n+1]&&r===this.modules[t+1][n]&&r===this.modules[t+1][n+1]&&(e+=Qe)}let t=0;for(let e of this.modules)t=e.reduce((e,t)=>e+ +!!t,t);let n=this.size*this.size,r=Math.ceil(Math.abs(t*20-n*10)/n)-1;return e+=r*$e,e}getAlignmentPatternPositions(){if(this.version===1)return[];{let e=Math.floor(this.version/7)+2,t=this.version===32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}finderPenaltyCountPatterns(e){let t=e[1],n=t>0&&e[2]===t&&e[3]===t*3&&e[4]===t&&e[5]===t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]===0&&(e+=this.size),t.pop(),t.unshift(e)}};function K(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function q(e,t){return(e>>>t&1)!=0}var J=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError(`Invalid argument`);this.bitData=n.slice()}getData(){return this.bitData.slice()}},rt=[1,10,12,14],it=[2,9,11,13],at=[4,8,16,16];function ot(e,t){return e[Math.floor((t+7)/17)+1]}function st(e){let t=[];for(let n of e)K(n,8,t);return new J(at,e.length,t)}function ct(e){if(!dt(e))throw RangeError(`String contains non-numeric characters`);let t=[];for(let n=0;n<e.length;){let r=Math.min(e.length-n,3);K(Number.parseInt(e.substring(n,n+r),10),r*3+1,t),n+=r}return new J(rt,e.length,t)}function lt(e){if(!ft(e))throw RangeError(`String contains unencodable characters in alphanumeric mode`);let t=[],n;for(n=0;n+2<=e.length;n+=2){let r=H.indexOf(e.charAt(n))*45;r+=H.indexOf(e.charAt(n+1)),K(r,11,t)}return n<e.length&&K(H.indexOf(e.charAt(n)),6,t),new J(it,e.length,t)}function ut(e){return e===``?[]:dt(e)?[ct(e)]:ft(e)?[lt(e)]:[st(mt(e))]}function dt(e){return Ye.test(e)}function ft(e){return Xe.test(e)}function pt(e,t){let n=0;for(let r of e){let e=ot(r.mode,t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}function mt(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)e.charAt(n)===`%`?(t.push(Number.parseInt(e.substring(n+1,n+3),16)),n+=2):t.push(e.charCodeAt(n));return t}function Y(e){if(e<U||e>W)throw RangeError(`Version number out of range`);let t=(16*e+128)*e+64;if(e>=2){let n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function X(e,t){return Math.floor(Y(e)/8)-et[t[0]][e]*tt[t[0]][e]}function ht(e){if(e<1||e>255)throw RangeError(`Degree out of range`);let t=[];for(let n=0;n<e-1;n++)t.push(0);t.push(1);let n=1;for(let r=0;r<e;r++){for(let e=0;e<t.length;e++)t[e]=Z(t[e],n),e+1<t.length&&(t[e]^=t[e+1]);n=Z(n,2)}return t}function gt(e,t){let n=t.map(e=>0);for(let r of e){let e=r^n.shift();n.push(0),t.forEach((t,r)=>n[r]^=Z(t,e))}return n}function Z(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return n}function _t(e,t,n=1,r=40,i=-1,a=!0){if(!(U<=n&&n<=r&&r<=W)||i<-1||i>7)throw RangeError(`Invalid value`);let o,s;for(o=n;;o++){let n=X(o,t)*8,i=pt(e,o);if(i<=n){s=i;break}if(o>=r)throw RangeError(`Data too long`)}for(let e of[Ge,Ke,qe])a&&s<=X(o,e)*8&&(t=e);let c=[];for(let t of e){K(t.mode[0],4,c),K(t.numChars,ot(t.mode,o),c);for(let e of t.getData())c.push(e)}let l=X(o,t)*8;K(0,Math.min(4,l-c.length),c),K(0,(8-c.length%8)%8,c);for(let e=236;c.length<l;e^=253)K(e,8,c);let u=Array.from({length:Math.ceil(c.length/8)},()=>0);return c.forEach((e,t)=>u[t>>>3]|=e<<7-(t&7)),new nt(o,t,u,i)}function vt(e,t){let{ecc:n=`L`,boostEcc:r=!1,minVersion:i=1,maxVersion:a=40,maskPattern:o=-1,border:s=1}=t||{},c=typeof e==`string`?ut(e):Array.isArray(e)?[st(e)]:void 0;if(!c)throw Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);let l=_t(c,Je[n],i,a,o,r),u=yt({version:l.version,maskPattern:l.mask,size:l.size,data:l.modules,types:l.types},s);return t?.invert&&(u.data=u.data.map(e=>e.map(e=>!e))),t?.onEncoded?.(u),u}function yt(e,t=1){if(!t)return e;let{size:n}=e,r=n+t*2;e.size=r,e.data.forEach(e=>{for(let n=0;n<t;n++)e.unshift(!1),e.push(!1)});for(let n=0;n<t;n++)e.data.unshift(Array.from({length:r},e=>!1)),e.data.push(Array.from({length:r},e=>!1));let i=V.Border;e.types.forEach(e=>{for(let n=0;n<t;n++)e.unshift(i),e.push(i)});for(let n=0;n<t;n++)e.types.unshift(Array.from({length:r},e=>i)),e.types.push(Array.from({length:r},e=>i));return e}var bt=e=>{let{data:t,size:n}=vt(e,{ecc:`M`,border:4}),r=``;return t.forEach((e,t)=>e.forEach((e,n)=>{e&&(r+=`M${n} ${t}h1v1h-1z`)})),{size:n,path:r}};function xt({value:e,label:t,className:n}){let{size:i,path:a}=(0,B.useMemo)(()=>bt(e),[e]);return(0,R.jsxs)(`svg`,{"aria-label":t,className:r(`aspect-square rounded-md`,n),role:`img`,shapeRendering:`crispEdges`,viewBox:`0 0 ${i} ${i}`,children:[(0,R.jsx)(`rect`,{fill:`#fff`,height:i,width:i}),(0,R.jsx)(`path`,{d:a,fill:`#000`})]})}var St=`With the same bundle ID, this install replaces the App Store's copy of the app on this iPhone.`,Q=`h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit`,Ct=e=>/iPhone|iPod|iPad/u.test(e.userAgent)||/Macintosh/u.test(e.userAgent)&&e.maxTouchPoints>1,wt=()=>{let[e,t]=(0,B.useState)(null);return(0,B.useEffect)(()=>{let e=null;try{e=window.localStorage.getItem(ae)}catch{}t({ios:Ct(navigator),udid:e!==null&&le.test(e)?e:null})},[]),e},Tt=300*1e3,Et=(e,t)=>{let[,n]=(0,B.useReducer)(e=>e+1,0),r=e+ce-Tt;return(0,B.useEffect)(()=>{if(!t)return;let e=setTimeout(n,Math.max(0,r-Date.now()));return document.addEventListener(`visibilitychange`,n),window.addEventListener(`pageshow`,n),()=>{clearTimeout(e),document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`pageshow`,n)}},[r,t]),t&&Date.now()>=r};function Dt({fetching:e,onRenew:n}){return(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,R.jsxs)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:[`This install link has expired.`,e?` Getting a new one.`:``]}),e?null:(0,R.jsx)(t,{className:Q,onClick:n,variant:`outline`,children:`Get a new link`})]})}function Ot({build:e,token:t,secondary:r=!1}){return(0,R.jsx)(`a`,{className:n({className:Q,variant:r?`outline`:`default`}),href:se(window.location,e.id,t),children:r?`Install anyway`:`Install`})}function $(){return(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`On iOS 16 or later, the app opens only with Developer Mode on: Settings, Privacy & Security, Developer Mode.`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:St})]})}function kt({build:e,outline:t=!1}){return(0,R.jsxs)(`a`,{className:n({className:Q,variant:t?`outline`:`default`}),href:`${ne(window.location,e.id)}${re(e.id)}`,children:[(0,R.jsx)(we,{"data-icon":`inline-start`}),`Check this iPhone`]})}function At({build:t,udid:n}){let r=Pe(t.id,n),{refetch:i}=r,a=Et(r.dataUpdatedAt,r.data?.status===`installable`);if((0,B.useEffect)(()=>{a&&i()},[a,i]),r.isPending)return(0,R.jsx)(e,{"aria-label":`Reading this IPA`,className:`h-11 w-full`});let o=r.data;if(o===void 0||o.status===`unavailable`)return(0,R.jsxs)(w,{children:[(0,R.jsx)(S,{}),(0,R.jsx)(b,{children:`Installation details unavailable`}),(0,R.jsx)(C,{children:`The Console couldn't read this IPA from storage in parts, which takes an HTTPS download link that answers Range requests. Xcode or Apple Configurator still installs the download over USB.`})]});if(o.status===`store`)return(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This IPA is an App Store export, which installs through TestFlight, not from this page.`});if(o.status===`expired`)return(0,R.jsxs)(w,{variant:`destructive`,children:[(0,R.jsx)(S,{}),(0,R.jsx)(b,{children:`This build's profile has expired`}),(0,R.jsxs)(C,{children:[`It expired on `,(0,Ue.default)(o.expiresAt).format(`YYYY-MM-DD`),`. A maintainer rebuilds it to install again.`]})]});let s=o.link.status===`issued`?o.link.token:null;if(o.link.status===`no-secret`)return(0,R.jsxs)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:[`Set `,o.link.secretName,` on the Console to install from this page.`]});if(s===null)return null;let c=({secondary:e=!1}={})=>a?(0,R.jsx)(Dt,{fetching:r.isFetching,onRenew:()=>void i()}):(0,R.jsx)(Ot,{build:t,secondary:e,token:s});return o.device===`included`?(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:`This iPhone is in this build.`}),c(),(0,R.jsx)($,{})]}):o.device===`not-included`?(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:`Not in this build`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This IPA was signed without this iPhone. Send a maintainer this command, then open the newer build once they've rebuilt. Send it only if this is your iPhone.`})]}),(0,R.jsx)(v,{label:`the command that registers this iPhone`,value:p(n??``),wrap:!0}),c({secondary:!0}),(0,R.jsx)($,{})]}):(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:`Is this iPhone in this build?`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`iOS installs this IPA only on the devices it lists. A profile reads this iPhone's ID and nothing else: allow the download, then install it from Settings, where iOS calls it not signed. Nothing stays installed.`})]}),(0,R.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:flex-wrap`,children:[(0,R.jsx)(kt,{build:t}),c({secondary:!0})]}),(0,R.jsx)($,{})]})}var jt={ipa:`The .ipa installs only on devices its signing profile allows (development or ad hoc); an App Store export reaches testers through TestFlight.`,aab:`The .aab installs through Google Play or bundletool, not from the file.`},Mt={apk:`Scan with an Android phone's camera, then open the APK to install it.`,ipa:`Scan to download. ${jt.ipa}`,aab:`Scan to download. ${jt.aab}`,app:`Scan to download the .app.zip on a Mac.`};function Nt(){let{origin:e,pathname:t}=window.location;return(0,R.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,R.jsx)(xt,{className:`size-48`,label:`Open this page on an iPhone`,value:`${e}${t}`}),(0,R.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:`Scan with an iPhone to install this build from here. The phone signs in to the Console first.`})]})}function Pt({build:e,url:t,note:n}){return(0,R.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,R.jsx)(xt,{className:`size-48`,label:`Download ${m(e)}`,value:t}),(0,R.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:Mt[e.artifact_kind]}),n?(0,R.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:n}):null]})}function Ft({message:e}){return(0,R.jsxs)(w,{variant:`destructive`,children:[(0,R.jsx)(S,{}),(0,R.jsx)(b,{children:`The download link couldn't be created`}),(0,R.jsx)(C,{children:e})]})}function It({build:t}){let n=je(t.id),r=n.data?.url;if(r===null){let e=jt[t.artifact_kind];return(0,R.jsxs)(`div`,{className:`flex flex-col gap-2 text-xs text-muted-foreground`,children:[(0,R.jsx)(`p`,{children:`This storage gives no download link a phone can open without signing in, so there is no QR code. Download the build here, or open this page on the phone signed in to the console.`}),e?(0,R.jsx)(`p`,{children:e}):null]})}return r===void 0?n.isError?(0,R.jsx)(Ft,{message:n.error.message}):(0,R.jsx)(e,{className:`size-48`}):(0,R.jsx)(Pt,{build:t,note:`This link expires. If the download fails, reload this page.`,url:r})}function Lt({build:e}){return(0,R.jsx)(`span`,{className:`font-mono text-foreground`,translate:`no`,children:e.submitted_version??`this build`})}var Rt={testflight:{name:`App Store Connect`,url:`https://appstoreconnect.apple.com/apps`},"play-internal":{name:`Play Console`,url:`https://play.google.com/console`}};function zt({build:e}){let t=Rt[e.submitted_to];return(0,R.jsxs)(T,{className:`overflow-hidden shadow-sm`,children:[(0,R.jsx)(O,{className:`border-b px-4 py-3`,children:(0,R.jsx)(x,{className:`text-sm`,children:(0,R.jsx)(`h2`,{children:`Install`})})}),(0,R.jsxs)(E,{className:`flex min-w-0 flex-col gap-4 p-4 sm:p-6`,children:[(0,R.jsx)(Bt,{build:e}),(0,R.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:flex-wrap`,children:[(0,R.jsxs)(`a`,{className:n({className:`h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit`}),href:t.url,rel:`noreferrer`,target:`_blank`,children:[(0,R.jsx)(he,{"data-icon":`inline-start`}),`Open `,t.name]}),(0,R.jsxs)(`a`,{className:n({className:`h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit`,variant:`outline`}),download:!0,href:ue(e.id),children:[(0,R.jsx)(me,{"data-icon":`inline-start`}),(0,R.jsxs)(`span`,{className:`text-left [overflow-wrap:anywhere]`,children:[`Download `,m(e)]})]})]})]})]})}function Bt({build:e}){switch(e.artifact_kind){case`apk`:return(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Your browser needs the "Install unknown apps" permission.`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`If this package is already installed with another signing key, such as a Play copy, the install fails. Uninstall that copy first, or build with sandbox: true, whose .sandbox ID installs beside it.`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`On an emulator or a phone over USB, install and open it from your project:`}),(0,R.jsx)(v,{label:`the install command`,value:ee(e)})]});case`app`:return(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`It runs only in the iOS Simulator. In your project, install and open it on the booted one:`}),(0,R.jsx)(v,{label:`the install command`,value:ee(e)})]});case`aab`:return y(e)?(0,R.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Submitted to Google Play internal testing as`,` `,(0,R.jsx)(Lt,{build:e}),`. Testers get it once its release is rolled out; on an app Play Console hasn't published, the release is a draft you roll out in Play Console.`]}):(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`For testers, build and release to internal testing:`}),(0,R.jsx)(v,{label:`the Google Play command`,value:`npx hot-updater google-play upload`})]});case`ipa`:return y(e)?(0,R.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`On TestFlight as `,(0,R.jsx)(Lt,{build:e}),`. Internal testers install it from the TestFlight app once App Store Connect has processed it, and a preview's pull request comment shows that state.`]}):(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Over USB, Xcode or Apple Configurator installs it. For testers without a registered device:`}),(0,R.jsx)(v,{label:`the TestFlight command`,value:`npx hot-updater testflight`})]})}}function Vt({link:e,url:t}){return e?.status===`no-secret`?(0,R.jsxs)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:[`Set `,e.secretName,` on the Console to create links.`]}):e?.status!==`issued`||t===null?null:(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,R.jsx)(v,{label:`the download link`,value:t}),(0,R.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Anyone with this link can download this build until`,` `,(0,Ue.default)(e.expiresAt).format(`YYYY-MM-DD`),`.`]})]})}function Ht({build:e}){return y(e)&&(e.artifact_kind===`ipa`||e.artifact_kind===`aab`)?(0,R.jsx)(zt,{build:e}):(0,R.jsx)(Ut,{build:e})}function Ut({build:t}){let r=m(t),i=Ae(t.id),a=i.data?.status===`issued`?ie(window.location,t.id,i.data.token):null,o=wt(),s=t.artifact_kind===`ipa`,c=s&&o?.ios===!0;return(0,R.jsxs)(T,{className:`overflow-hidden shadow-sm`,children:[(0,R.jsx)(O,{className:`border-b px-4 py-3`,children:(0,R.jsx)(x,{className:`text-sm`,children:(0,R.jsx)(`h2`,{children:`Install`})})}),(0,R.jsxs)(E,{className:c?`flex min-w-0 flex-col gap-6 p-4 sm:p-6`:`grid gap-6 p-4 sm:grid-cols-[12rem_minmax(0,1fr)] sm:p-6`,children:[c?(0,R.jsx)(At,{build:t,udid:o.udid}):s&&a!==null?(0,R.jsx)(Nt,{}):a===null?i.data===void 0?i.isError?(0,R.jsx)(Ft,{message:i.error.message}):(0,R.jsx)(e,{className:`size-48`}):(0,R.jsx)(It,{build:t}):(0,R.jsx)(Pt,{build:t,url:a}),(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,R.jsx)(Bt,{build:t}),(0,R.jsxs)(`a`,{className:n({className:`h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit`,variant:`outline`}),download:!0,href:a??ue(t.id),children:[(0,R.jsx)(me,{"data-icon":`inline-start`}),(0,R.jsxs)(`span`,{className:`text-left [overflow-wrap:anywhere]`,children:[`Download `,r]})]}),(0,R.jsx)(Vt,{link:i.data,url:a})]})]})]})}var Wt=`https://hot-updater.dev/docs/guides/bundle-diffing#first-ota-update`;function Gt({detail:r,page:i,onPage:a}){let o=i.before!==void 0||i.after!==void 0,s=Ne(r.build.min_bundle_id,i,o),c=o?s.data:r.patches,{next:p,previous:m}=c??{};return(0,R.jsxs)(T,{className:`overflow-hidden shadow-sm`,id:`patches`,children:[(0,R.jsx)(O,{className:`border-b px-4 py-3`,children:(0,R.jsx)(x,{className:`text-sm`,children:(0,R.jsx)(`h2`,{children:`Patches from this build`})})}),(0,R.jsxs)(E,{className:`p-0`,children:[o&&s.isError?(0,R.jsx)(`div`,{className:`p-4`,children:(0,R.jsxs)(w,{variant:`destructive`,children:[(0,R.jsx)(S,{}),(0,R.jsx)(b,{children:`Patches couldn't be loaded`}),(0,R.jsx)(C,{children:s.error.message}),(0,R.jsx)(Te,{children:(0,R.jsxs)(t,{onClick:()=>void s.refetch(),size:`xs`,variant:`outline`,children:[(0,R.jsx)(be,{"data-icon":`inline-start`}),`Retry`]})})]})}):c===void 0?(0,R.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,R.jsx)(`span`,{className:`sr-only`,children:`Loading patches`}),(0,R.jsx)(e,{className:`h-4 w-full`}),(0,R.jsx)(e,{className:`h-4 w-2/3`})]}):c.data.length===0?o?(0,R.jsxs)(P,{className:`py-10`,children:[(0,R.jsx)(A,{children:(0,R.jsx)(M,{children:`No more patches`})}),(0,R.jsx)(t,{className:`min-h-11 sm:min-h-8`,onClick:()=>a({}),variant:`outline`,children:`Show the newest patches`})]}):(0,R.jsxs)(P,{className:`py-10`,children:[(0,R.jsxs)(A,{children:[(0,R.jsx)(k,{variant:`icon`,children:(0,R.jsx)(_e,{})}),(0,R.jsx)(M,{children:`No patches from this build`}),(0,R.jsxs)(N,{children:[`A deploy adds a patch from this build's bundle while it is its scope's store build, or its newest build with none marked, and the deploy config turns patches on, with`,` `,(0,R.jsx)(`code`,{className:`font-mono`,children:`patch`}),` in`,` `,(0,R.jsx)(`code`,{className:`font-mono`,children:`hot-updater.config.ts`}),`.`]})]}),(0,R.jsx)(j,{children:(0,R.jsxs)(`a`,{className:n({className:`min-h-11 sm:min-h-8`,variant:`outline`}),href:Wt,rel:`noreferrer`,target:`_blank`,children:[`Bundle diffing guide`,(0,R.jsx)(u,{"data-icon":`inline-end`})]})})]}):(0,R.jsxs)(Re,{"aria-busy":o&&s.isPlaceholderData,"aria-label":`Patches from this build`,className:`table-fixed`,children:[(0,R.jsx)(Ie,{children:(0,R.jsxs)(I,{children:[(0,R.jsx)(F,{children:`Target bundle`}),(0,R.jsx)(F,{className:`w-28`,children:`Patch size`}),(0,R.jsx)(F,{className:`hidden w-32 sm:table-cell`,children:`Created`})]})}),(0,R.jsx)(Le,{children:c.data.map(e=>(0,R.jsxs)(I,{children:[(0,R.jsx)(L,{className:`py-3 whitespace-normal`,children:(0,R.jsx)(l,{className:`block font-mono text-xs [overflow-wrap:anywhere] underline-offset-4 hover:underline`,search:{bundleId:e.bundleId},title:e.bundleId,to:`/`,translate:`no`,children:e.bundleId})}),(0,R.jsx)(L,{className:`text-xs tabular-nums`,children:d(e.byteSize)}),(0,R.jsx)(L,{className:`hidden sm:table-cell`,children:(0,R.jsx)(f,{uuid:e.bundleId})})]},e.bundleId))})]}),p!==void 0||m!==void 0?(0,R.jsxs)(`nav`,{"aria-label":`Patch pages`,className:`flex items-center justify-end gap-2 border-t px-4 py-2`,children:[(0,R.jsxs)(t,{className:`min-h-11 sm:min-h-7`,disabled:m===void 0||o&&s.isPlaceholderData,onClick:()=>a({after:m}),size:`sm`,variant:`ghost`,children:[(0,R.jsx)(de,{"data-icon":`inline-start`}),`Newer`]}),(0,R.jsxs)(t,{className:`min-h-11 sm:min-h-7`,disabled:p===void 0||o&&s.isPlaceholderData,onClick:()=>a({before:p}),size:`sm`,variant:`ghost`,children:[`Older`,(0,R.jsx)(fe,{"data-icon":`inline-end`})]})]}):null]})]})}var Kt=(e,t)=>{let n=e.data.find(e=>e.bundleId===t);if(n!==void 0)return{kind:`patch`,byteSize:n.byteSize};let r=e.data.at(-1)?.bundleId;return e.next!==void 0&&r!==void 0&&t<r?{kind:`unknown`}:{kind:`full`}};function qt({download:e}){switch(e.kind){case`patch`:return(0,R.jsxs)(`span`,{className:`text-xs`,children:[`Patch`,` `,(0,R.jsxs)(`span`,{className:`text-muted-foreground tabular-nums`,children:[`(`,d(e.byteSize),`)`]})]});case`full`:return(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Full bundle`});case`unknown`:return(0,R.jsx)(`a`,{className:`text-xs underline-offset-4 hover:underline`,href:`#patches`,children:`See patches`})}}function Jt({detail:e}){let{build:t,channel:r,servedNow:i,patches:a,catalogScopeKey:o}=e,s=i.find(({rolloutCohortCount:e,targetCohorts:t})=>e>0||t.length>0)?.bundleId,c=t.store_build===!0&&s!=null&&Kt(a,s).kind===`full`?[`npx hot-updater patch`,`-p ${t.platform}`,`-c ${g(r)}`,`-b ${g(s)}`,`--base-artifact-id ${g(t.min_bundle_id)}`].join(` `):null,d=(0,R.jsxs)(l,{className:`inline-flex items-center gap-0.5 underline-offset-4 hover:underline`,search:{scopeKey:o},to:`/`,children:[`All releases in this scope`,(0,R.jsx)(u,{"aria-hidden":`true`,className:`size-3`})]});return(0,R.jsxs)(T,{className:`overflow-hidden shadow-sm`,children:[(0,R.jsx)(O,{className:`border-b px-4 py-3`,children:(0,R.jsx)(x,{className:`text-sm`,children:(0,R.jsx)(`h2`,{children:`Served now`})})}),(0,R.jsx)(E,{className:`p-0`,children:i.length===0?(0,R.jsxs)(P,{className:`py-10`,children:[(0,R.jsxs)(A,{children:[(0,R.jsx)(k,{variant:`icon`,children:(0,R.jsx)(ze,{})}),(0,R.jsx)(M,{children:`No OTA for this build yet`}),(0,R.jsxs)(N,{children:[`No release in this build's scope is newer than its built-in bundle. Deploy one with`,` `,(0,R.jsx)(`code`,{className:`font-mono`,children:`hot-updater deploy`}),`, and it shows here.`]})]}),(0,R.jsx)(j,{children:(0,R.jsx)(l,{className:n({className:`min-h-11 sm:min-h-8`,variant:`outline`}),search:{scopeKey:o},to:`/`,children:`All releases in this scope`})})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(Re,{"aria-label":`Served now`,className:`table-fixed`,children:[(0,R.jsx)(Ie,{children:(0,R.jsxs)(I,{children:[(0,R.jsx)(F,{children:`Bundle`}),(0,R.jsx)(F,{className:`hidden w-40 md:table-cell`,children:`Rollout`}),(0,R.jsx)(F,{className:`hidden w-32 sm:table-cell`,children:`Created`}),(0,R.jsx)(F,{className:`w-32`,children:`First OTA download`})]})}),(0,R.jsx)(Le,{children:i.map(e=>{let t=e.bundleId,n=e.rolloutCohortCount/De*100;return(0,R.jsxs)(I,{children:[(0,R.jsx)(L,{className:`py-3 whitespace-normal`,children:(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,R.jsx)(l,{className:`font-mono text-xs [overflow-wrap:anywhere] underline-offset-4 hover:underline`,search:{releaseId:e.releaseId},title:t,to:`/`,translate:`no`,children:t}),e.message?(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.message}):null]})}),(0,R.jsx)(L,{className:`hidden md:table-cell`,children:(0,R.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[e.targetCohorts.length>0?(0,R.jsx)(D,{variant:`secondary`,children:e.targetCohorts.length===1?`1 cohort`:`${e.targetCohorts.length} cohorts`}):(0,R.jsx)(ge,{percentage:n}),e.shouldForceUpdate?(0,R.jsx)(D,{variant:`outline`,children:`Forced`}):null]})}),(0,R.jsx)(L,{className:`hidden sm:table-cell`,children:(0,R.jsx)(f,{uuid:t})}),(0,R.jsx)(L,{children:(0,R.jsx)(qt,{download:Kt(a,t)})})]},e.releaseId)})})]}),c===null?null:(0,R.jsxs)(`div`,{className:`flex flex-col gap-2 border-t px-4 py-3 text-xs`,children:[(0,R.jsx)(`p`,{children:`The OTA fresh installs get first has no patch from this store build, so they download all of it. Add one from your project:`}),(0,R.jsx)(v,{label:`the patch command`,value:c})]}),(0,R.jsxs)(`p`,{className:`border-t px-4 py-3 text-xs text-muted-foreground`,children:[`What the update check serves an install of this build now, newest first: not the history. `,d]})]})})]})}function Yt({buildId:r,search:i,onSearchChange:a}){let o=Fe(r),c=o.data,u={...i.patchesBefore===void 0?{}:{before:i.patchesBefore},...i.patchesAfter===void 0?{}:{after:i.patchesAfter}};return(0,R.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,R.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 items-center gap-x-2 border-b bg-background px-3 py-3 sm:min-h-12 sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm`,children:[(0,R.jsx)(s,{className:`-ml-1 size-11 lg:size-7`}),(0,R.jsxs)(l,{className:n({className:`min-h-11 sm:min-h-7`,size:`sm`,variant:`ghost`}),to:`/native-builds`,children:[(0,R.jsx)(de,{"data-icon":`inline-start`}),`Native builds`]}),c?(0,R.jsxs)(`h1`,{className:`flex min-w-0 items-center gap-1.5 text-sm font-medium`,children:[(0,R.jsx)(ke,{className:`size-3.5 shrink-0 text-muted-foreground`,platform:c.build.platform}),(0,R.jsxs)(`span`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:[h(c.build.platform),` `,oe[c.build.artifact_kind].label,` ·`,` `,(0,R.jsx)(`span`,{translate:`no`,children:c.channel})]}),(0,R.jsx)(`span`,{className:`hidden text-xs font-normal text-muted-foreground tabular-nums sm:inline`,children:d(c.build.byte_size)})]}):(0,R.jsx)(`h1`,{className:`sr-only`,children:`Native build`})]}),(0,R.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,R.jsx)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-4 sm:gap-6`,children:o.isError?(0,R.jsxs)(w,{variant:`destructive`,children:[(0,R.jsx)(S,{}),(0,R.jsx)(b,{children:`The native build couldn't be loaded`}),(0,R.jsx)(C,{children:o.error.message}),(0,R.jsx)(Te,{children:(0,R.jsxs)(t,{onClick:()=>void o.refetch(),size:`xs`,variant:`outline`,children:[(0,R.jsx)(be,{"data-icon":`inline-start`}),`Retry`]})})]}):c===void 0?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`sr-only`,children:`Loading the native build`}),(0,R.jsx)(e,{className:`h-56 w-full rounded-xl`}),(0,R.jsx)(e,{className:`h-64 w-full rounded-xl`})]}):c===null?(0,R.jsxs)(P,{className:`border py-16`,children:[(0,R.jsxs)(A,{children:[(0,R.jsx)(k,{variant:`icon`,children:(0,R.jsx)(ye,{})}),(0,R.jsx)(M,{children:`Native build not found`}),(0,R.jsxs)(N,{children:[`No native build has this ID. It may have been deleted with`,` `,(0,R.jsx)(`code`,{className:`font-mono`,children:`native-build delete`}),`, or be from another console.`]})]}),(0,R.jsx)(j,{children:(0,R.jsx)(l,{className:n({className:`min-h-11 sm:min-h-8`,variant:`outline`}),to:`/native-builds`,children:`Show all native builds`})})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Ht,{build:c.build}),(0,R.jsx)(He,{detail:c}),(0,R.jsx)(Jt,{detail:c}),(0,R.jsx)(Gt,{detail:c,onPage:e=>a({...e.before===void 0?{}:{patchesBefore:e.before},...e.after===void 0?{}:{patchesAfter:e.after}}),page:u})]})})})]})}function Xt(){let{buildId:e}=_.useParams(),t=_.useSearch(),n=_.useNavigate();return(0,R.jsx)(Yt,{buildId:e,onSearchChange:e=>void n({search:e,replace:!0}),search:t})}export{Xt as component};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-builds_._buildId-D1XEPQ-V.js","assets/sidebar-Di9SN47G.js","assets/link-DTEyW70e.js","assets/relativeTime-BscR0TsX.js","assets/arrow-up-right-DK8Zdg40.js","assets/native-builds-CDYL3y0I.js","assets/uuidv7-BLyD3pAM.js","assets/chevron-right-BoUXo82O.js","assets/download-Cf24LBde.js","assets/RolloutPercentageBadge-frllRncE.js","assets/badge-UNnTz4Dl.js","assets/history-DakJoeSM.js","assets/-native-builds-search-DC2PutLU.js","assets/refresh-cw-C6svDMfM.js","assets/StoreSubmission-D8BGGGgn.js","assets/copy-DsuLj3oj.js","assets/dist-UQUhRoJi.js","assets/api-BEEYDSCX.js","assets/useMutation-DbYw7boA.js","assets/smartphone-Bn5FtEwt.js","assets/PlatformIcon-DCTtCP5t.js","assets/empty-PAp07lsC.js","assets/table-B22H8-RL.js"])))=>i.map(i=>d[i]);
2
+ import{ir as e}from"./sidebar-Di9SN47G.js";import{n as t,r as n,t as r}from"./preload-helper-B44EvKhG.js";import{t as i}from"./-native-builds-search-DC2PutLU.js";var a=e(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),o=n(`/native-builds_/$buildId`)({component:t(()=>r(()=>import(`./native-builds_._buildId-D1XEPQ-V.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])),`component`),validateSearch:i});export{a as n,o as t};