@hot-updater/console 1.2.0-rc.3 → 1.2.0-rc.30
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.
- package/.output/nitro.json +1 -1
- package/.output/public/assets/{-native-builds-search-C-TGpFAm.js → -native-builds-search-DdHwfe4q.js} +1 -1
- package/.output/public/assets/BundleIdDisplay-CTBdtFQ8.js +1 -0
- package/.output/public/assets/ChannelBadge-CEabmopB.js +1 -0
- package/.output/public/assets/CompositeItem-KUM5yQVr.js +1 -0
- package/.output/public/assets/{ConsoleFeatureUnavailable-CUtcXuY2.js → ConsoleFeatureUnavailable-Be-0iTww.js} +1 -1
- package/.output/public/assets/{EventDetails-Dl2RvPAk.js → EventDetails-bDOYte1z.js} +1 -1
- package/.output/public/assets/HashValueDisplay-D2f0HmyU.js +1 -0
- package/.output/public/assets/{InsightsPageHeader-DHhqY3DT.js → InsightsPageHeader-Cj2ROSQO.js} +1 -1
- package/.output/public/assets/IosInstall-CHI2C4Yd.js +1 -0
- package/.output/public/assets/NativeBuildsNav-DaqxQPnG.js +1 -0
- package/.output/public/assets/{NotFoundPage-DZ3DxyRA.js → NotFoundPage-CVBtl68B.js} +1 -1
- package/.output/public/assets/{PlatformIcon-BBWQlWm9.js → PlatformIcon-DVnzzGqM.js} +1 -1
- package/.output/public/assets/RelativeTime-B4PK8qDw.js +1 -0
- package/.output/public/assets/RolloutPercentageBadge-D_I0Raj2.js +1 -0
- package/.output/public/assets/RowReason-B7VM1ztc.js +1 -0
- package/.output/public/assets/SandboxBadge-BVxHg_HF.js +1 -0
- package/.output/public/assets/TargetDisplay-KU7JhIWG.js +1 -0
- package/.output/public/assets/{alert-dialog-BqYScr9y.js → alert-dialog-Ch0QxRsa.js} +1 -1
- package/.output/public/assets/api-C1OPeiG1.js +1 -0
- package/.output/public/assets/api-keys-DLC8jjaM.js +1 -0
- package/.output/public/assets/api-keys-eDnzgFAf.js +1 -0
- package/.output/public/assets/arrow-left-DQjHJAnT.js +1 -0
- package/.output/public/assets/arrow-right-CXp_K3xK.js +1 -0
- package/.output/public/assets/arrow-up-right-BFafIOrq.js +1 -0
- package/.output/public/assets/badge-FZMD5vvS.js +1 -0
- package/.output/public/assets/card-CyHYmHue.js +1 -0
- package/.output/public/assets/check-CqWNyG93.js +1 -0
- package/.output/public/assets/chevron-right-DNbYTBX1.js +1 -0
- package/.output/public/assets/{circle-off-C7Muo0ss.js → circle-off-BCkZpskJ.js} +1 -1
- package/.output/public/assets/{clipboard-DQbOcrL7.js → clipboard-DZrZK5gR.js} +1 -1
- package/.output/public/assets/{console-features-api-DEXSwFtc.js → console-features-api-BO5V64P3.js} +1 -1
- package/.output/public/assets/{copy-DsuLj3oj.js → copy-CH1__JAW.js} +1 -1
- package/.output/public/assets/dialog-BLj71-Nf.js +1 -0
- package/.output/public/assets/{dist-CPlO6ko9.js → dist-DAM__Tdz.js} +1 -1
- package/.output/public/assets/{download-Cf24LBde.js → download-B2GjTySo.js} +1 -1
- package/.output/public/assets/empty--YaE5Z4p.js +1 -0
- package/.output/public/assets/field-CdhSgWhI.js +1 -0
- package/.output/public/assets/git-branch-DG1VDaKq.js +1 -0
- package/.output/public/assets/history-C0wv4htz.js +1 -0
- package/.output/public/assets/index-CgwVUC2n.js +10 -0
- package/.output/public/assets/{input-group-D3OUBk4n.js → input-group-XKLcUGoa.js} +1 -1
- package/.output/public/assets/insights-C94CdeAA.js +1 -0
- package/.output/public/assets/insights-DILMVpk8.js +2 -0
- package/.output/public/assets/insights-_j_ieOyh.js +42 -0
- package/.output/public/assets/insights-api-B6Gj74n5.js +1 -0
- package/.output/public/assets/{insights-search-DghCbEnk.js → insights-search-Bgvg6wSP.js} +1 -1
- package/.output/public/assets/insights-usage-rpc-BUCinjSN.js +1 -0
- package/.output/public/assets/insights_.distribution-Bb6_S-hD.js +2 -0
- package/.output/public/assets/insights_.distribution-CRkGNelG.js +1 -0
- package/.output/public/assets/insights_.distribution-CyAu3RN3.js +1 -0
- package/.output/public/assets/installations-BA01mqJE.js +1 -0
- package/.output/public/assets/installations-BsD6LgNc.js +2 -0
- package/.output/public/assets/installations-CYTzndfP.js +1 -0
- package/.output/public/assets/{key-round-DwNKkHhy.js → key-round-D7UgdXyA.js} +1 -1
- package/.output/public/assets/{link-DTEyW70e.js → link-CN3iHC4A.js} +2 -2
- package/.output/public/assets/{list--NIee1FZ.js → list-Bm-CfN5g.js} +1 -1
- package/.output/public/assets/loader-circle-iMqC-8ZE.js +1 -0
- package/.output/public/assets/native-builds-BMbws1g5.js +2 -0
- package/.output/public/assets/native-builds-xgHiHQML.js +1 -0
- package/.output/public/assets/native-builds_._buildId-B04z9yfk.js +1 -0
- package/.output/public/assets/native-builds_._buildId-DaMmTcHo.js +2 -0
- package/.output/public/assets/native-builds_.devices-CTzpCVsb.js +1 -0
- package/.output/public/assets/native-builds_.devices-D_kl2-bc.js +2 -0
- package/.output/public/assets/package-BmfoZ5Zj.js +1 -0
- package/.output/public/assets/plus-Db0KxLZp.js +1 -0
- package/.output/public/assets/preload-helper-CRQjUQaZ.js +1 -0
- package/.output/public/assets/{refresh-cw-B9HHjLej.js → refresh-cw-BHhBYjS8.js} +1 -1
- package/.output/public/assets/{relativeTime-YQt84dYr.js → relativeTime-BYRt19mj.js} +1 -1
- package/.output/public/assets/remote-config-Cxkr7_BP.js +1 -0
- package/.output/public/assets/remote-config-DAOyn5xL.js +1 -0
- package/.output/public/assets/remote-config-DXv25LX1.js +6 -0
- package/.output/public/assets/{rotate-cw-Cv2aVbYr.js → rotate-cw-Ba-slJea.js} +1 -1
- package/.output/public/assets/routes-DM3TyTLW.js +2 -0
- package/.output/public/assets/routes-Des97uK_.js +1 -0
- package/.output/public/assets/search-dJG2BYmx.js +1 -0
- package/.output/public/assets/select-CA8r-UUe.js +1 -0
- package/.output/public/assets/send-DuMOCzbD.js +1 -0
- package/.output/public/assets/{sidebar-Di9SN47G.js → sidebar-yC7KdImc.js} +1 -1
- package/.output/public/assets/smartphone-D1C6BRd_.js +1 -0
- package/.output/public/assets/styles-BHLI87EH.css +2 -0
- package/.output/public/assets/switch-BsV3d4km.js +1 -0
- package/.output/public/assets/table-D8YjT_ht.js +1 -0
- package/.output/public/assets/tabs-RdhEl9sE.js +1 -0
- package/.output/public/assets/trash-2-B5KIvrXy.js +1 -0
- package/.output/public/assets/{undo-2-CUX96_BG.js → undo-2-CFcU9dIB.js} +1 -1
- package/.output/public/assets/{useCompositeListItem-JmyDfo3-.js → useCompositeListItem-lAmUsXcc.js} +1 -1
- package/.output/public/assets/{useMutation-DbYw7boA.js → useMutation-w3qYaU2L.js} +1 -1
- package/.output/public/assets/valueToPercent-Bn8p2lng.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-DJQS4eWX.mjs → __23tanstack-start-server-fn-resolver-q4YFIDyr.mjs} +94 -46
- package/.output/server/_chunks/ssr-renderer.mjs +2 -2
- package/.output/server/_libs/@base-ui/react+[...].mjs +1488 -183
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +1 -1
- package/.output/server/_libs/_.mjs +2 -0
- package/.output/server/_libs/lucide-react.mjs +22 -28
- package/.output/server/_libs/next-themes.mjs +1 -1
- package/.output/server/_libs/react-redux+[...].mjs +1 -1
- package/.output/server/_libs/recharts+[...].mjs +1 -1
- package/.output/server/_libs/sonner.mjs +1 -1
- package/.output/server/_libs/tanstack__react-query.mjs +1 -1
- package/.output/server/_ssr/{-native-builds-search-CwNcoXf4.mjs → -native-builds-search-Mm_AZoRU.mjs} +9 -3
- package/.output/server/_ssr/{BundleIdDisplay-LdRkYdnN.mjs → BundleIdDisplay-DvzlYWq8.mjs} +3 -3
- package/.output/server/_ssr/ChannelBadge-qF_Pc5Ud.mjs +23 -0
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-BN-FZ8eG.mjs → ConsoleFeatureUnavailable-DKUgr0N_.mjs} +7 -7
- package/.output/server/_ssr/{EventDetails-B77sWxgh.mjs → EventDetails-T1XtYEDD.mjs} +8 -8
- package/.output/server/_ssr/{HashValueDisplay-C4Vs4cmO.mjs → HashValueDisplay-Cas_zjIS.mjs} +7 -7
- package/.output/server/_ssr/{InsightsPageHeader-Dx4jJ7X0.mjs → InsightsPageHeader-BrllhUl2.mjs} +8 -8
- package/.output/server/_ssr/IosInstall-CEHI8F2M.mjs +615 -0
- package/.output/server/_ssr/NativeBuildsNav-2xSHyA1a.mjs +38 -0
- package/.output/server/_ssr/{NotFoundPage-DB5cXeVZ.mjs → NotFoundPage-D6H9vxj_.mjs} +3 -3
- package/.output/server/_ssr/{PlatformIcon-CFLiTjh1.mjs → PlatformIcon-BpGOEXjU.mjs} +13 -3
- package/.output/server/_ssr/RelativeTime-DpEVzDP9.mjs +237 -0
- package/.output/server/_ssr/{git-CTA8Aqr0.mjs → RolloutPercentageBadge-DW8-_w30.mjs} +20 -4
- package/.output/server/_ssr/RowReason-C-PjIxzq.mjs +186 -0
- package/.output/server/_ssr/SandboxBadge-CDdNew0R.mjs +97 -0
- package/.output/server/_ssr/TargetDisplay-BBsP7IaZ.mjs +83 -0
- package/.output/server/_ssr/{alert-dialog-DxboqQmd.mjs → alert-dialog-Bd4E9xdw.mjs} +2 -2
- package/.output/server/_ssr/{api-cvzOLlTy.mjs → api-BT7aA8UM.mjs} +167 -33
- package/.output/server/_ssr/{api-keys-C3QCQvpV.mjs → api-keys-D2NvcQZv.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-CrbGr02t.mjs → api-keys-DjWpM20P.mjs} +11 -10
- package/.output/server/_ssr/{api-keys-rpc-BcTQzRLj.mjs → api-keys-rpc-nM5H7V7f.mjs} +4 -4
- package/.output/server/_ssr/{api-rpc-B48nsUak.mjs → api-rpc-DX4HynbW.mjs} +83 -35
- package/.output/server/_ssr/{auth-rpc-C0gtG9nJ.mjs → auth-rpc-LCxTtYz2.mjs} +5 -5
- package/.output/server/_ssr/{auth.server-B0JikHOQ.mjs → auth.server-CERo_xef.mjs} +797 -174
- package/.output/server/_ssr/{badge-oO-0mLsr.mjs → badge-Dpp4q7sD.mjs} +4 -45
- package/.output/server/_ssr/{bundleActivity-MLrjNJCT.mjs → bundleActivity-BP40zYSt.mjs} +1 -1
- package/.output/server/_ssr/card-CFCftDfI.mjs +49 -0
- package/.output/server/_ssr/{config.server-CJVHGJtr.mjs → config.server-5W5WD8x2.mjs} +4 -4
- package/.output/server/_ssr/{console-access-4TW5Af_n.mjs → console-access-B0S5YFUa.mjs} +2 -2
- package/.output/server/_ssr/{console-features-api-DfzZRyXa.mjs → console-features-api-CV_EReEj.mjs} +4 -4
- package/.output/server/_ssr/{console-features-rpc-DqNpa3U9.mjs → console-features-rpc-D3xlQsuy.mjs} +4 -4
- package/.output/server/_ssr/{console-features-BTV-XuhQ.mjs → console-features-xaGDhRC9.mjs} +1 -1
- package/.output/server/_ssr/{createServerRpc-BVvRVOz5.mjs → createServerRpc-DJZel12M.mjs} +1 -1
- package/.output/server/_ssr/{databaseConfig-B_Bg7qS5.mjs → databaseConfig-XAvDetmn.mjs} +1 -1
- package/.output/server/_ssr/{databaseJsonValue-kS7cvEtz.mjs → databaseJsonValue-DuUoft8j.mjs} +1 -1
- package/.output/server/_ssr/{databaseRows-B6H8Cmgq.mjs → databaseRows-BtRVBD0C.mjs} +3 -3
- package/.output/server/_ssr/deviceProfileToken-CwWb1lPq.mjs +82 -0
- package/.output/server/_ssr/{dialog-DsuMZ5oh.mjs → dialog-DQR_QI_X.mjs} +2 -2
- package/.output/server/_ssr/{dist-TEpM_UAD.mjs → dist-B6-irDRA.mjs} +1 -1
- package/.output/server/_ssr/{downloadBundle-DCmr7vsj.mjs → downloadBundle-DnoYpi36.mjs} +1 -1
- package/.output/server/_ssr/{empty-r4kJO91t.mjs → empty-C7PFnkCH.mjs} +3 -3
- package/.output/server/_ssr/{empty-plugin-adapters-zrZ0xs6n.mjs → empty-plugin-adapters-BYBYBaxo.mjs} +1 -1
- package/.output/server/_ssr/{failureReports-Cn_zU9S8.mjs → failureReports-BA2eg11O.mjs} +3 -3
- package/.output/server/_ssr/{field-DfXmt9CS.mjs → field-BqYN8sZT.mjs} +3 -3
- package/.output/server/_ssr/foldedPage-CqpVk31Q.mjs +176 -0
- package/.output/server/_ssr/{getBundleChildren-rtkEEJw5.mjs → getBundleChildren-CdqFonhl.mjs} +2 -2
- package/.output/server/_ssr/{input-group-BCO7zTpU.mjs → input-group-Brv0mmyp.mjs} +2 -2
- package/.output/server/_ssr/{insights-CRu5FUj8.mjs → insights--xI3A0KI.mjs} +5 -5
- package/.output/server/_ssr/{insights-DrrhPDER.mjs → insights-CD1e3EnW.mjs} +2 -2
- package/.output/server/_ssr/{insights-Csqlj6u7.mjs → insights-Dd0VdO-1.mjs} +27 -26
- package/.output/server/_ssr/{insights-api-NW5VCXqg.mjs → insights-api-Bt2XVa4Y.mjs} +5 -5
- package/.output/server/_ssr/{insights-errors-7BCwFybo.mjs → insights-errors-CXHg1lLV.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-B9VPkzZE.mjs → insights-failures-7zH97WOO.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-rpc-CoFrAOK9.mjs → insights-failures-rpc-DBGzXP5A.mjs} +11 -11
- package/.output/server/_ssr/{insights-recovery-BtXVU3ro.mjs → insights-recovery-BhOg6kz2.mjs} +1 -1
- package/.output/server/_ssr/{insights-recovery-rpc-sud_FyGW.mjs → insights-recovery-rpc-C6fAh-i_.mjs} +7 -7
- package/.output/server/_ssr/{insights-rpc-Ce2Isz9q.mjs → insights-rpc-pThKC9oj.mjs} +4 -4
- package/.output/server/_ssr/{insights-search-B0O3YoO2.mjs → insights-search-iFN4UaUv.mjs} +5 -5
- package/.output/server/_ssr/{insights-usage-DiGnuxW8.mjs → insights-usage-h8fipPTv.mjs} +1 -1
- package/.output/server/_ssr/{insights-usage-rpc-Cwf1t4aW.mjs → insights-usage-rpc-B-RLvdLZ.mjs} +5 -5
- package/.output/server/_ssr/{insights-usage-rpc-C-cS2F9s.mjs → insights-usage-rpc-CGHZQ9jq.mjs} +7 -7
- package/.output/server/_ssr/{insightsUsage-ClAmoUz8.mjs → insightsUsage-BjSiV_X_.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-DIkh5VqM.mjs → insights_.distribution-C6iXJ93Y.mjs} +15 -14
- package/.output/server/_ssr/{insights_.distribution-D52TkQ2V.mjs → insights_.distribution-E6Ns2aN7.mjs} +2 -2
- package/.output/server/_ssr/{insights_.distribution--3aR6Kpy.mjs → insights_.distribution-xHmfwwa5.mjs} +5 -5
- package/.output/server/_ssr/{installations-Bu4Lb0x9.mjs → installations-7V-Xyui8.mjs} +12 -12
- package/.output/server/_ssr/{installations-DftevpDt.mjs → installations-CZnN6slr.mjs} +4 -4
- package/.output/server/_ssr/{installations-C818mFCp.mjs → installations-D6Upc9Rt.mjs} +2 -2
- package/.output/server/_ssr/ios-devices-rpc-CXuHk24G.mjs +139 -0
- package/.output/server/_ssr/iosDeviceProfile-BESi_onx.mjs +176 -0
- package/.output/server/_ssr/iosDevices-BmvvvZRo.mjs +129 -0
- package/.output/server/_ssr/listReleases-DYYA5alS.mjs +94 -0
- package/.output/server/_ssr/{request-guard-CPdRBuGW.mjs → local-console-Dtxlsav0.mjs} +2 -9
- package/.output/server/_ssr/{native-builds-DOASMwGh.mjs → native-builds-BUojmVWC.mjs} +3 -3
- package/.output/server/_ssr/native-builds-BXBkklfA.mjs +197 -0
- package/.output/server/_ssr/native-builds-BhDCE89P.mjs +717 -0
- package/.output/server/_ssr/{native-builds_._buildId-CTytnLBB.mjs → native-builds_._buildId-DRiCNDdO.mjs} +3 -3
- package/.output/server/_ssr/native-builds_._buildId-DkMpG-OB.mjs +1176 -0
- package/.output/server/_ssr/native-builds_.devices-DSideebA.mjs +10 -0
- package/.output/server/_ssr/native-builds_.devices-DsOx1R36.mjs +702 -0
- package/.output/server/_ssr/nativeBuildDownloadLink-DDAUVU8q.mjs +96 -0
- package/.output/server/_ssr/nativeBuildInstall-CcBrfTsc.mjs +250 -0
- package/.output/server/_ssr/nativeBuilds-Cub0EUGN.mjs +287 -0
- package/.output/server/_ssr/{plugins-RIryUNWj.mjs → plugins-CX7wutet.mjs} +6 -6
- package/.output/server/_ssr/publicConsoleBase-f67NLLXZ.mjs +610 -0
- package/.output/server/_ssr/{release-adoption-DoAtNPED.mjs → release-adoption-DeICczY7.mjs} +2 -2
- package/.output/server/_ssr/{release-adoption-rpc-OizwttJD.mjs → release-adoption-rpc-BjMXMi9A.mjs} +9 -9
- package/.output/server/_ssr/{releaseAdoption-a2byXMfz.mjs → releaseAdoption-kHZo8P90.mjs} +4 -4
- package/.output/server/_ssr/{releaseCatalogCompiler-DLcean2k.mjs → releaseCatalogCompiler-D9dAMI17.mjs} +3 -3
- package/.output/server/_ssr/{releaseManagement-DHUux2az.mjs → releaseManagement-EPhok_Py.mjs} +1 -1
- package/.output/server/_ssr/{releaseReachability-DZOK_dH-.mjs → releaseReachability-DaZ7ifUF.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-DaBgnVnL.mjs → remote-config-B1iZuZOF.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-Dypc_nuk.mjs → remote-config-C_DprbJz.mjs} +23 -22
- package/.output/server/_ssr/{remote-config-DZu7gJLL.mjs → remote-config-C_q6FBE4.mjs} +3 -3
- package/.output/server/_ssr/{remote-config-rpc-DOfPhqli.mjs → remote-config-rpc-BFTPcMfZ.mjs} +5 -5
- package/.output/server/_ssr/request-guard-BPLyogIN.mjs +11 -0
- package/.output/server/_ssr/{router-BkRbvels.mjs → router-BDXPwfwl.mjs} +92 -59
- package/.output/server/_ssr/{routes-D9JnXVWL.mjs → routes-BJeztqpQ.mjs} +388 -432
- package/.output/server/_ssr/{routes-BeTsUkNX.mjs → routes-DpapxHLc.mjs} +14 -17
- package/.output/server/_ssr/{runtime.server-BdMY1blX.mjs → runtime.server-CkSbWaZm.mjs} +4 -4
- package/.output/server/_ssr/{schema-ChlRtZIo.mjs → schema-3oDJJFWa.mjs} +1 -1
- package/.output/server/_ssr/{schema-migration-rpc-B2VGxRY6.mjs → schema-migration-rpc-a4bLEdaP.mjs} +4 -4
- package/.output/server/_ssr/{select-Cywc0NmT.mjs → select-C9HpIZxd.mjs} +2 -2
- package/.output/server/_ssr/{server-Ds-fU1zf.mjs → server-C8ZmMWnn.mjs} +7 -7
- package/.output/server/_ssr/{sidebar-t0NiN0-2.mjs → sidebar-BrVL3L7R.mjs} +3 -3
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{start-BvDsQehg.mjs → start-D3noqqOK.mjs} +2 -2
- package/.output/server/_ssr/{switch-D1T38CnM.mjs → switch-DtnsoZHO.mjs} +3 -3
- package/.output/server/_ssr/{table-L9ZQgxNF.mjs → table-Bg7nCnct.mjs} +2 -2
- package/.output/server/_ssr/{tabs-BiByrAnU.mjs → tabs-BEIoGLTL.mjs} +4 -4
- package/.output/server/_ssr/{updateFailures-n-tGv90S.mjs → updateFailures-D0bP_Ume.mjs} +3 -3
- package/.output/server/_ssr/{uuidv7-BIF4nb_q.mjs → uuidv7-CmHbryZT.mjs} +2 -2
- package/.output/server/_ssr/{version-CQ98ZBpL-CWSkTT9J.mjs → version-CQ98ZBpL-NmbU0MD2.mjs} +1 -1
- package/.output/server/_tanstack-start-manifest_v-C_TPyfFP.mjs +225 -0
- package/.output/server/index.mjs +479 -381
- package/lib/index.d.mts +9 -0
- package/package.json +7 -30
- package/src/components/ChannelBadge.tsx +9 -9
- package/src/components/DataTable.tsx +347 -0
- package/src/components/FoldedRows.tsx +219 -0
- package/src/components/HashValueDisplay.tsx +6 -3
- package/src/components/PlatformIcon.tsx +10 -0
- package/src/components/RelativeTime.tsx +31 -0
- package/src/components/RowReason.tsx +56 -0
- package/src/components/TargetDisplay.tsx +69 -0
- package/src/components/ThemeProvider.tsx +11 -2
- package/src/components/features/api-keys/ApiKeysPage.tsx +1 -1
- package/src/components/features/channels/ChannelManagementDialog.tsx +5 -10
- package/src/components/features/insights/ReleaseActivity.tsx +1 -1
- package/src/components/features/native-builds/BuiltInBundleCard.tsx +108 -58
- package/src/components/features/native-builds/CommitLink.tsx +3 -2
- package/src/components/features/native-builds/ImportBuild.tsx +1 -1
- package/src/components/features/native-builds/InstallCard.tsx +310 -67
- package/src/components/features/native-builds/IosDevicesPage.tsx +944 -0
- package/src/components/features/native-builds/IosInstall.tsx +632 -0
- package/src/components/features/native-builds/IpaDevicesCard.tsx +111 -0
- package/src/components/features/native-builds/NativeBuildDetailPage.tsx +21 -4
- package/src/components/features/native-builds/NativeBuildsNav.tsx +44 -0
- package/src/components/features/native-builds/NativeBuildsPage.tsx +65 -76
- package/src/components/features/native-builds/NativeBuildsTable.tsx +668 -318
- package/src/components/features/native-builds/OlderBuildLabel.tsx +61 -0
- package/src/components/features/native-builds/PatchesCard.tsx +3 -2
- package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +4 -4
- package/src/components/features/native-builds/SandboxBadge.tsx +21 -0
- package/src/components/features/native-builds/ServedNowCard.tsx +33 -1
- package/src/components/features/native-builds/ShortHash.tsx +6 -3
- package/src/components/features/native-builds/StoreSubmission.tsx +18 -12
- package/src/components/features/native-builds/playTracks.ts +19 -0
- package/src/components/features/remote-config/PublishDialog.tsx +4 -1
- package/src/components/features/remote-config/VersionsCard.tsx +5 -2
- package/src/components/ui/badge.tsx +2 -0
- package/src/components/ui/sonner.tsx +3 -1
- package/src/index.ts +9 -0
- package/src/lib/api-rpc.ts +124 -35
- package/src/lib/api.ts +150 -14
- package/src/lib/ios-devices-api.ts +110 -0
- package/src/lib/ios-devices-rpc.ts +183 -0
- package/src/lib/native-builds.ts +160 -17
- package/src/lib/server/console-runtime.server.ts +9 -2
- package/src/lib/server/deviceProfileToken.ts +187 -0
- package/src/lib/server/foldedPage.ts +360 -0
- package/src/lib/server/iosDeviceProfile.ts +230 -0
- package/src/lib/server/iosDevices.ts +223 -0
- package/src/lib/server/listReleases.ts +101 -62
- package/src/lib/server/local-console.ts +1 -1
- package/src/lib/server/nativeBuildDownloadLink.ts +193 -0
- package/src/lib/server/nativeBuildInstall.ts +495 -0
- package/src/lib/server/nativeBuilds.ts +308 -59
- package/src/lib/server/plistText.ts +17 -0
- package/src/lib/server/publicConsoleBase.ts +17 -0
- package/src/routeTree.gen.ts +85 -18
- package/src/routes/-native-builds-search.ts +20 -0
- package/src/routes/[_]hot-updater/devices/device-response.ts +21 -0
- package/src/routes/[_]hot-updater/devices/device[.]mobileconfig.ts +17 -0
- package/src/routes/[_]hot-updater/native-builds/$buildId/manifest[.]plist.ts +22 -0
- package/src/routes/api/native-builds/$buildId/download.ts +22 -1
- package/src/routes/index.tsx +541 -532
- package/src/routes/native-builds_.devices.tsx +21 -0
- package/src/styles.css +24 -0
- package/.output/public/assets/HashValueDisplay-6lNRxDJX.js +0 -1
- package/.output/public/assets/RolloutPercentageBadge-Cxogpi8F.js +0 -1
- package/.output/public/assets/StoreSubmission-ViTkW4eJ.js +0 -1
- package/.output/public/assets/api-P2g8dCNg.js +0 -1
- package/.output/public/assets/api-keys-DWQC2q6y.js +0 -1
- package/.output/public/assets/api-keys-FueRkF9q.js +0 -1
- package/.output/public/assets/arrow-left-g9cKqXuC.js +0 -1
- package/.output/public/assets/arrow-right-CNII8TYn.js +0 -1
- package/.output/public/assets/arrow-up-right-DK8Zdg40.js +0 -1
- package/.output/public/assets/badge-DWFcDWho.js +0 -1
- package/.output/public/assets/check-CXVR3s3X.js +0 -1
- package/.output/public/assets/chevron-right-BoUXo82O.js +0 -1
- package/.output/public/assets/dialog-CNUPxNxH.js +0 -1
- package/.output/public/assets/empty-B3Uwdd6k.js +0 -1
- package/.output/public/assets/field-D-2-mnNh.js +0 -1
- package/.output/public/assets/history-DqHlgSuV.js +0 -1
- package/.output/public/assets/index-CqP5HPV6.js +0 -10
- package/.output/public/assets/insights-B-0odqpt.js +0 -42
- package/.output/public/assets/insights-BSVGfxSL.js +0 -1
- package/.output/public/assets/insights-NK5B6ReS.js +0 -2
- package/.output/public/assets/insights-api-BVCXJsoV.js +0 -1
- package/.output/public/assets/insights-usage-rpc-CKQH0pUS.js +0 -1
- package/.output/public/assets/insights_.distribution-CJvgwcVZ.js +0 -2
- package/.output/public/assets/insights_.distribution-DblZM0mO.js +0 -1
- package/.output/public/assets/insights_.distribution-dvk6vYDM.js +0 -1
- package/.output/public/assets/installations-B674P5Z5.js +0 -2
- package/.output/public/assets/installations-BWxczZ2t.js +0 -1
- package/.output/public/assets/installations-Dv4kWQYz.js +0 -1
- package/.output/public/assets/native-builds-BOC71grI.js +0 -1
- package/.output/public/assets/native-builds-D6rldpSh.js +0 -2
- package/.output/public/assets/native-builds-DAy2678K.js +0 -1
- package/.output/public/assets/native-builds_._buildId-DD58_Phd.js +0 -1
- package/.output/public/assets/native-builds_._buildId-DvQDKnUQ.js +0 -2
- package/.output/public/assets/plus-BReVKct-.js +0 -1
- package/.output/public/assets/preload-helper-B44EvKhG.js +0 -1
- package/.output/public/assets/remote-config-B7ujqhLa.js +0 -6
- package/.output/public/assets/remote-config-WjpozBG5.js +0 -1
- package/.output/public/assets/remote-config-gXeH6PBW.js +0 -1
- package/.output/public/assets/routes-BDdBIxYS.js +0 -1
- package/.output/public/assets/routes-CCD33Azv.js +0 -2
- package/.output/public/assets/search-BCel4Oy6.js +0 -1
- package/.output/public/assets/select-CBIU0_M1.js +0 -1
- package/.output/public/assets/smartphone-CMaSy_ir.js +0 -1
- package/.output/public/assets/styles-uK-0vUMk.css +0 -2
- package/.output/public/assets/switch-BpdiHL_t.js +0 -1
- package/.output/public/assets/table-Bpy3SvSo.js +0 -1
- package/.output/public/assets/tabs-Xmt7tZeG.js +0 -1
- package/.output/public/assets/useInfiniteQuery-DX4WpBRG.js +0 -1
- package/.output/public/assets/valueToPercent-BLwGy_xK.js +0 -1
- package/.output/server/_ssr/RolloutPercentageBadge-vmwE8iae.mjs +0 -21
- package/.output/server/_ssr/StoreSubmission-DE4vgy5B.mjs +0 -139
- package/.output/server/_ssr/listReleases-D_GY00SQ.mjs +0 -79
- package/.output/server/_ssr/native-builds-CWjU--fI.mjs +0 -510
- package/.output/server/_ssr/native-builds-DhXL5zf_.mjs +0 -137
- package/.output/server/_ssr/native-builds_._buildId-D4lYJLIU.mjs +0 -813
- package/.output/server/_ssr/nativeBuildQr-84cnFQPX.mjs +0 -59
- package/.output/server/_ssr/nativeBuilds-B_7BPjt_.mjs +0 -133
- package/.output/server/_ssr/qr-code-C7kNRIDX.mjs +0 -22
- package/.output/server/_tanstack-start-manifest_v-B5nsO5L4.mjs +0 -184
- package/src/lib/server/nativeBuildQr.ts +0 -73
- package/src/routes/[_]hot-updater/native-builds/qr.ts +0 -14
- /package/.output/public/assets/{uuidv7-zXMtwR9Q.js → uuidv7-DAoOOpz9.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,Di as t,Ri as n,Vi as r,Vr as i,_r as a,gr as o,p as s}from"./sidebar-yC7KdImc.js";import{t as c}from"./link-CN3iHC4A.js";import{t as l}from"./arrow-up-right-BFafIOrq.js";import{E as u,S as d,T as f,_ as p,b as ee,d as m,g as te,m as h,n as ne,p as re,r as ie,t as ae,v as g,w as _,x as oe}from"./TargetDisplay-KU7JhIWG.js";import{t as v}from"./chevron-right-DNbYTBX1.js";import{n as se,t as y}from"./native-builds_._buildId-DaMmTcHo.js";import{t as b}from"./download-B2GjTySo.js";import{i as ce,n as le,r as x,t as ue}from"./RolloutPercentageBadge-D_I0Raj2.js";import{t as de}from"./git-branch-DG1VDaKq.js";import{i as fe}from"./-native-builds-search-DdHwfe4q.js";import{t as pe}from"./history-C0wv4htz.js";import{t as S}from"./refresh-cw-BHhBYjS8.js";import{t as me}from"./smartphone-D1C6BRd_.js";import{a as C,i as w,n as T,o as E,r as D,t as O}from"./badge-FZMD5vvS.js";import{n as k}from"./dist-DAM__Tdz.js";import{a as A,n as j,o as M,t as N}from"./card-CyHYmHue.js";import{r as he}from"./uuidv7-DAoOOpz9.js";import{a as P,i as F,n as I,o as L,r as R,t as z}from"./empty--YaE5Z4p.js";import{n as ge}from"./relativeTime-BYRt19mj.js";import{t as _e}from"./PlatformIcon-DVnzzGqM.js";import{a as ve,d as ye,f as be,h as xe,l as Se,u as Ce}from"./api-C1OPeiG1.js";import{a as B,i as V,n as H,o as U,r as W,t as G}from"./table-D8YjT_ht.js";import{t as we}from"./BundleIdDisplay-CTBdtFQ8.js";import{t as Te}from"./ChannelBadge-CEabmopB.js";import{a as K,n as Ee,r as q,t as De}from"./SandboxBadge-BVxHg_HF.js";import{l as J,n as Oe,o as ke,t as Ae}from"./IosInstall-CHI2C4Yd.js";var je=i(`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`}]]),Y=t();function X({value:e,length:t,shown:n=e.slice(0,t),label:r}){let i=async()=>{try{await navigator.clipboard.writeText(e),k.success(`Copied to clipboard`,{description:e})}catch{k.error(`Could not copy the ${r}`)}};return(0,Y.jsx)(`button`,{"aria-label":`Copy the ${r} ${e}`,className:`relative cursor-copy rounded-sm font-mono after:absolute after:-inset-x-2 after:-inset-y-4 sm:after:hidden text-xs whitespace-nowrap tabular-nums underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none`,onClick:e=>{e.stopPropagation(),i()},title:e,translate:`no`,type:`button`,children:n})}function Me({hash:e}){let t=ve();if(e===null)return(0,Y.jsx)(ne,{});let n=le(t.data?.console.gitUrl,e);return n===null?(0,Y.jsx)(X,{label:`commit`,length:7,value:e}):(0,Y.jsx)(`a`,{className:`relative font-mono text-xs whitespace-nowrap underline-offset-4 after:absolute after:-inset-x-2 after:-inset-y-4 hover:underline sm:after:hidden`,href:n,onClick:e=>e.stopPropagation(),rel:`noreferrer`,target:`_blank`,title:e,translate:`no`,children:e.slice(0,7)})}function Z({label:e,children:t}){return(0,Y.jsxs)(`div`,{className:`grid gap-1 sm:grid-cols-[10rem_minmax(0,1fr)] sm:gap-4`,children:[(0,Y.jsx)(`dt`,{className:`text-xs font-medium text-muted-foreground`,children:e}),(0,Y.jsx)(`dd`,{className:`min-w-0 text-sm`,children:t})]})}function Ne({detail:e}){let{build:t}=e,n=Se();if(t.is_sandbox)return null;let r=!t.is_store_build;return(0,Y.jsx)(o,{className:`min-h-11 shrink-0 sm:min-h-8`,disabled:n.isPending,onClick:()=>n.mutate({id:t.id,storeBuild:r},{onSuccess:()=>{k.success(r?`Marked as the store build`:`Mark cleared`)},onError:e=>{k.error(`Could not change the mark`,{description:e.message})}}),size:`sm`,type:`button`,variant:`outline`,children:r?`Mark as store build`:`Clear mark`})}function Pe({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,Y.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,Y.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Y.jsx)(a?se:pe,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`}),r?.id===t.id?(0,Y.jsxs)(`p`,{children:[(0,Y.jsx)(`span`,{className:`font-medium`,children:`Store build.`}),` New deploys to this scope patch from this build.`]}):a?(0,Y.jsxs)(`p`,{children:[(0,Y.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,Y.jsxs)(`p`,{children:[(0,Y.jsx)(`span`,{className:`font-medium`,children:`Not the base.`}),` New deploys patch from`,` `,(0,Y.jsxs)(c,{className:`inline-flex items-center gap-0.5 font-medium underline underline-offset-4`,params:{buildId:i.id},to:`/native-builds/$buildId`,children:[ee(i)??(0,Y.jsxs)(Y.Fragment,{children:[d(i.platform),` `,h[i.artifact_kind].label,` ·`,` `,(0,Y.jsx)(x,{uuid:i.id})]}),(0,Y.jsx)(l,{"aria-hidden":`true`,className:`size-3`})]}),`, so this one gets no new patches.`]})]}),(0,Y.jsx)(Ne,{detail:e})]})}function Fe({detail:e}){let{build:t,builtInBundle:n,channel:r}=e,i=n?.childCount??0;return(0,Y.jsxs)(N,{className:`overflow-hidden shadow-sm`,children:[(0,Y.jsx)(A,{className:`border-b px-4 py-3`,children:(0,Y.jsx)(M,{className:`text-sm`,children:(0,Y.jsx)(`h2`,{children:`Built-in bundle`})})}),(0,Y.jsxs)(j,{className:`flex flex-col gap-4 p-4 sm:p-6`,children:[(0,Y.jsxs)(`dl`,{className:`flex flex-col gap-3`,children:[(0,Y.jsx)(Z,{label:`Bundle ID`,children:(0,Y.jsx)(we,{bundleId:t.min_bundle_id})}),(0,Y.jsx)(Z,{label:`OTAs patching from it`,children:(0,Y.jsx)(`span`,{className:`tabular-nums`,children:i===1?`1 bundle`:`${i} bundles`})}),(0,Y.jsx)(Z,{label:`Scope`,children:(0,Y.jsxs)(`span`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,Y.jsx)(c,{"aria-label":`Show the builds that embed ${r}`,className:`relative rounded-md after:absolute after:inset-x-0 after:-inset-y-[11px] sm:after:hidden`,search:{channel:r},to:`/native-builds`,children:(0,Y.jsx)(Te,{channel:r})}),(0,Y.jsx)(`span`,{className:`text-xs`,children:d(t.platform)})]})}),(0,Y.jsx)(Z,{label:`Target`,children:(0,Y.jsx)(`span`,{className:`text-xs`,children:(0,Y.jsx)(ie,{appVersion:t.app_version,fingerprintHash:t.fingerprint_hash})})}),(0,Y.jsx)(Z,{label:`Build key`,children:(0,Y.jsx)(`span`,{className:`text-xs`,children:(0,Y.jsx)(ae,{value:t.build_key})})}),t.build_number?(0,Y.jsx)(Z,{label:`Build`,children:(0,Y.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,translate:`no`,children:t.build_number})}):null,q(t)?(0,Y.jsx)(Z,{label:`Store`,children:(0,Y.jsx)(Ee,{build:t,withTime:!0})}):null,(0,Y.jsx)(Z,{label:`Commit`,children:(0,Y.jsx)(Me,{hash:t.git_commit_hash})}),(0,Y.jsx)(Z,{label:`Created`,children:(0,Y.jsx)(x,{format:`both`,uuid:t.id})})]}),(0,Y.jsx)(Pe,{detail:e}),(0,Y.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 Ie=r(ge(),1),Q=r(n(),1),$={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.`},Le={apk:`Scan with an Android phone's camera, then open the APK to install it.`,ipa:`Scan to download. ${$.ipa}`,aab:`Scan to download. ${$.aab}`,app:`Scan to download the .app.zip on a Mac.`};function Re(){let{origin:e,pathname:t}=window.location;return(0,Y.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,Y.jsx)(J,{className:`size-48`,label:`Open this page on an iPhone`,value:`${e}${t}`}),(0,Y.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 ze({build:e,url:t,note:n}){return(0,Y.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,Y.jsx)(J,{className:`size-48`,label:`Download ${p(e)}`,value:t}),(0,Y.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:Le[e.artifact_kind]}),n?(0,Y.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:n}):null]})}function Be({message:e}){return(0,Y.jsxs)(T,{variant:`destructive`,children:[(0,Y.jsx)(E,{}),(0,Y.jsx)(C,{children:`The download link couldn't be created`}),(0,Y.jsx)(w,{children:e})]})}function Ve({build:t}){let n=be(t.id),r=n.data?.url;if(r===null){let e=$[t.artifact_kind];return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2 text-xs text-muted-foreground`,children:[(0,Y.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,Y.jsx)(`p`,{children:e}):null]})}return r===void 0?n.isError?(0,Y.jsx)(Be,{message:n.error.message}):(0,Y.jsx)(e,{className:`size-48`}):(0,Y.jsx)(ze,{build:t,note:`This link expires. If the download fails, reload this page.`,url:r})}function He({build:e}){return(0,Y.jsx)(`span`,{className:`font-mono text-foreground`,translate:`no`,children:e.submitted_version??`this build`})}function Ue({build:e}){let t=e.submitted_to===`testflight`?{name:`App Store Connect`,url:`https://appstoreconnect.apple.com/apps`}:{name:`Play Console`,url:`https://play.google.com/console`};return(0,Y.jsxs)(N,{className:`overflow-hidden shadow-sm`,children:[(0,Y.jsx)(A,{className:`border-b px-4 py-3`,children:(0,Y.jsx)(M,{className:`text-sm`,children:(0,Y.jsx)(`h2`,{children:`Install`})})}),(0,Y.jsxs)(j,{className:`flex min-w-0 flex-col gap-4 p-4 sm:p-6`,children:[(0,Y.jsx)(We,{build:e}),(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:flex-wrap`,children:[(0,Y.jsxs)(`a`,{className:a({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,Y.jsx)(ce,{"data-icon":`inline-start`}),`Open `,t.name]}),(0,Y.jsxs)(`a`,{className:a({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:te(e.id),children:[(0,Y.jsx)(b,{"data-icon":`inline-start`}),(0,Y.jsxs)(`span`,{className:`text-left [overflow-wrap:anywhere]`,children:[`Download `,p(e)]})]})]})]})]})}function We({build:e}){switch(e.artifact_kind){case`apk`:return(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Y.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Your browser needs the "Install unknown apps" permission.`}),e.is_sandbox?(0,Y.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Its .sandbox ID installs it beside a Play copy.`}):(0,Y.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,Y.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,Y.jsx)(f,{label:`the install command`,value:g(e)})]});case`app`:return(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Y.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,Y.jsx)(f,{label:`the install command`,value:g(e)})]});case`aab`:return q(e)?(0,Y.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Submitted to`,` `,e.submitted_to===`play-internal`?K[`play-internal`].name:K[e.submitted_to].label,` `,`as `,(0,Y.jsx)(He,{build:e}),`.`,` `,e.submitted_to===`play-production`?`Users`:`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,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Y.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`For testers, build and release to internal testing:`}),(0,Y.jsx)(f,{label:`the Google Play command`,value:`npx hot-updater google-play upload`})]});case`ipa`:return q(e)?(0,Y.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`On TestFlight as `,(0,Y.jsx)(He,{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,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Y.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Over USB, Xcode or Apple Configurator installs it. For testers without a registered device:`}),(0,Y.jsx)(f,{label:`the TestFlight command`,value:`npx hot-updater testflight`})]})}}function Ge({link:e,url:t}){return e?.status===`no-secret`?(0,Y.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,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Y.jsx)(f,{label:`the download link`,value:t}),(0,Y.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Anyone with this link can download this build until`,` `,(0,Y.jsxs)(`span`,{className:`whitespace-nowrap`,children:[(0,Ie.default)(e.expiresAt).format(`YYYY-MM-DD`),`.`]})]})]})}function Ke({build:e}){return q(e)&&(e.artifact_kind===`ipa`||e.artifact_kind===`aab`)?(0,Y.jsx)(Ue,{build:e}):(0,Y.jsx)(Je,{build:e})}function qe({children:e}){let[t,n]=(0,Q.useState)(!1),r=(0,Q.useId)();return(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3 border-t pt-3`,children:[(0,Y.jsxs)(`button`,{"aria-controls":r,"aria-expanded":t,className:`group/other -mx-1 flex min-h-11 items-center gap-1.5 self-start rounded-md px-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none motion-reduce:transition-none sm:min-h-8`,onClick:()=>n(e=>!e),type:`button`,children:[(0,Y.jsx)(v,{"aria-hidden":`true`,className:`size-3.5 shrink-0 transition-transform group-aria-expanded/other:rotate-90 motion-reduce:transition-none`}),`Other ways to install`]}),(0,Y.jsx)(`div`,{hidden:!t,id:r,children:e})]})}function Je({build:t}){let n=p(t),r=ye(t.id),i=r.data?.status===`issued`?oe(window.location,t.id,r.data.token):null,o=Oe(),s=t.artifact_kind===`ipa`,c=s&&o?.ios===!0,l=(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,Y.jsx)(We,{build:t}),(0,Y.jsxs)(`a`,{className:a({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:i??te(t.id),children:[(0,Y.jsx)(b,{"data-icon":`inline-start`}),(0,Y.jsxs)(`span`,{className:`text-left [overflow-wrap:anywhere]`,children:[`Download `,n]})]}),(0,Y.jsx)(Ge,{link:r.data,url:i})]});return(0,Y.jsxs)(N,{className:`overflow-hidden shadow-sm`,children:[(0,Y.jsx)(A,{className:`border-b px-4 py-3`,children:(0,Y.jsx)(M,{className:`text-sm`,children:(0,Y.jsx)(`h2`,{children:`Install`})})}),c?(0,Y.jsxs)(j,{className:`flex min-w-0 flex-col gap-4 p-4 sm:p-6`,children:[(0,Y.jsx)(Ae,{build:t,device:o}),(0,Y.jsx)(qe,{children:l})]}):(0,Y.jsxs)(j,{className:`grid gap-6 p-4 sm:grid-cols-[12rem_minmax(0,1fr)] sm:p-6`,children:[s&&i!==null?(0,Y.jsx)(Re,{}):i===null?r.data===void 0?r.isError?(0,Y.jsx)(Be,{message:r.error.message}):(0,Y.jsx)(e,{className:`size-48`}):(0,Y.jsx)(Ve,{build:t}):(0,Y.jsx)(ze,{build:t,url:i}),l]})]})}function Ye({build:t}){let n=ke(t.id),r=n.data;if(r?.status===`store`||r?.status===`enterprise`)return null;let i=r?.status===`listed`?r.devices:null;return(0,Y.jsxs)(N,{className:`overflow-hidden shadow-sm`,children:[(0,Y.jsxs)(A,{className:`flex flex-row items-center gap-2 border-b px-4 py-3`,children:[(0,Y.jsx)(M,{className:`text-sm`,children:(0,Y.jsx)(`h2`,{children:`Devices in this build`})}),i===null?null:(0,Y.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:i.length}),(0,Y.jsx)(c,{className:a({className:`ml-auto h-11 sm:h-7`,size:`sm`,variant:`ghost`}),to:`/native-builds/devices`,children:`iOS devices`})]}),(0,Y.jsx)(j,{className:`p-0`,children:n.isPending?(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,Y.jsx)(`span`,{className:`sr-only`,children:`Reading this IPA's devices`}),(0,Y.jsx)(e,{className:`h-8 w-full`}),(0,Y.jsx)(e,{className:`h-8 w-full`})]}):n.isError||r?.status===`unavailable`?(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 p-4 text-xs text-muted-foreground`,children:[(0,Y.jsx)(`p`,{className:`min-w-0 flex-1`,children:`The Console couldn't read this IPA's devices from storage.`}),(0,Y.jsxs)(o,{className:`h-11 sm:h-7`,onClick:()=>void n.refetch(),size:`sm`,variant:`outline`,children:[(0,Y.jsx)(S,{"data-icon":`inline-start`}),`Retry`]})]}):i?.length===0?(0,Y.jsx)(`p`,{className:`p-4 text-xs text-muted-foreground`,children:`This IPA lists no devices.`}):(0,Y.jsx)(`ul`,{"aria-label":`Devices in this build`,className:`divide-y`,children:i?.map(e=>(0,Y.jsxs)(`li`,{className:`flex min-h-11 min-w-0 items-center gap-3 px-4 py-2 text-sm`,children:[(0,Y.jsx)(me,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`}),(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-col items-start`,children:[(0,Y.jsx)(`span`,{className:e.name===null?`truncate text-muted-foreground`:`truncate`,children:e.name??`Unknown device`}),(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Y.jsx)(X,{label:`UDID`,shown:re(e.udid),value:e.udid})})]})]},e.udid))})})]})}var Xe=`https://hot-updater.dev/docs/guides/bundle-diffing#first-ota-update`;function Ze({detail:t,page:n,onPage:r}){let i=n.before!==void 0||n.after!==void 0,s=xe(t.build.min_bundle_id,n,i),d=i?s.data:t.patches,{next:f,previous:p}=d??{};return(0,Y.jsxs)(N,{className:`overflow-hidden shadow-sm`,id:`patches`,children:[(0,Y.jsx)(A,{className:`border-b px-4 py-3`,children:(0,Y.jsx)(M,{className:`text-sm`,children:(0,Y.jsx)(`h2`,{children:`Patches from this build`})})}),(0,Y.jsxs)(j,{className:`p-0`,children:[i&&s.isError?(0,Y.jsx)(`div`,{className:`p-4`,children:(0,Y.jsxs)(T,{variant:`destructive`,children:[(0,Y.jsx)(E,{}),(0,Y.jsx)(C,{children:`Patches couldn't be loaded`}),(0,Y.jsx)(w,{children:s.error.message}),(0,Y.jsx)(D,{children:(0,Y.jsxs)(o,{onClick:()=>void s.refetch(),size:`xs`,variant:`outline`,children:[(0,Y.jsx)(S,{"data-icon":`inline-start`}),`Retry`]})})]})}):d===void 0?(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,Y.jsx)(`span`,{className:`sr-only`,children:`Loading patches`}),(0,Y.jsx)(e,{className:`h-4 w-full`}),(0,Y.jsx)(e,{className:`h-4 w-2/3`})]}):d.data.length===0?i?(0,Y.jsxs)(z,{className:`py-10`,children:[(0,Y.jsx)(F,{children:(0,Y.jsx)(L,{children:`No more patches`})}),(0,Y.jsx)(o,{className:`min-h-11 sm:min-h-8`,onClick:()=>r({}),variant:`outline`,children:`Show the newest patches`})]}):(0,Y.jsxs)(z,{className:`py-10`,children:[(0,Y.jsxs)(F,{children:[(0,Y.jsx)(P,{variant:`icon`,children:(0,Y.jsx)(de,{})}),(0,Y.jsx)(L,{children:`No patches from this build`}),(0,Y.jsxs)(R,{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,Y.jsx)(`code`,{className:`font-mono`,children:`patch`}),` in`,` `,(0,Y.jsx)(`code`,{className:`font-mono`,children:`hot-updater.config.ts`}),`.`]})]}),(0,Y.jsx)(I,{children:(0,Y.jsxs)(`a`,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),href:Xe,rel:`noreferrer`,target:`_blank`,children:[`Bundle diffing guide`,(0,Y.jsx)(l,{"data-icon":`inline-end`})]})})]}):(0,Y.jsxs)(G,{"aria-busy":i&&s.isPlaceholderData,"aria-label":`Patches from this build`,className:`table-fixed`,children:[(0,Y.jsx)(B,{children:(0,Y.jsxs)(U,{children:[(0,Y.jsx)(V,{children:`Target bundle`}),(0,Y.jsx)(V,{className:`w-28`,children:`Patch size`}),(0,Y.jsx)(V,{className:`hidden w-32 sm:table-cell`,children:`Created`})]})}),(0,Y.jsx)(H,{children:d.data.map(e=>(0,Y.jsxs)(U,{children:[(0,Y.jsx)(W,{className:`py-3 whitespace-normal`,children:(0,Y.jsx)(c,{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,Y.jsx)(W,{className:`text-xs tabular-nums`,children:m(e.byteSize)}),(0,Y.jsx)(W,{className:`hidden sm:table-cell`,children:(0,Y.jsx)(x,{uuid:e.bundleId})})]},e.bundleId))})]}),f!==void 0||p!==void 0?(0,Y.jsxs)(`nav`,{"aria-label":`Patch pages`,className:`flex items-center justify-end gap-2 border-t px-4 py-2`,children:[(0,Y.jsxs)(o,{className:`min-h-11 sm:min-h-7`,disabled:p===void 0||i&&s.isPlaceholderData,onClick:()=>r({after:p}),size:`sm`,variant:`ghost`,children:[(0,Y.jsx)(u,{"data-icon":`inline-start`}),`Newer`]}),(0,Y.jsxs)(o,{className:`min-h-11 sm:min-h-7`,disabled:f===void 0||i&&s.isPlaceholderData,onClick:()=>r({before:f}),size:`sm`,variant:`ghost`,children:[`Older`,(0,Y.jsx)(v,{"data-icon":`inline-end`})]})]}):null]})]})}var Qe=(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 $e({download:e}){switch(e.kind){case`patch`:return(0,Y.jsxs)(`span`,{className:`text-xs`,children:[`Patch`,` `,(0,Y.jsxs)(`span`,{className:`text-muted-foreground tabular-nums`,children:[`(`,m(e.byteSize),`)`]})]});case`full`:return(0,Y.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Full bundle`});case`unknown`:return(0,Y.jsx)(`a`,{className:`text-xs underline-offset-4 hover:underline`,href:`#patches`,children:`See patches`})}}function et({detail:e}){let{build:t,channel:n,servedNow:r,patches:i,catalogScopeKey:o}=e,s=r.find(({rolloutCohortCount:e,targetCohorts:t})=>e>0||t.length>0)?.bundleId,u=t.is_store_build&&s!=null&&Qe(i,s).kind===`full`?[`npx hot-updater patch`,`-p ${t.platform}`,`-c ${_(n)}`,`-b ${_(s)}`,`--base-artifact-id ${_(t.min_bundle_id)}`].join(` `):null,d=(0,Y.jsxs)(c,{className:`inline-flex items-center gap-0.5 underline-offset-4 hover:underline`,search:{scopeKey:o},to:`/`,children:[`All releases in this scope`,(0,Y.jsx)(l,{"aria-hidden":`true`,className:`size-3`})]});return(0,Y.jsxs)(N,{className:`overflow-hidden shadow-sm`,children:[(0,Y.jsx)(A,{className:`border-b px-4 py-3`,children:(0,Y.jsx)(M,{className:`text-sm`,children:(0,Y.jsx)(`h2`,{children:`Served now`})})}),(0,Y.jsx)(j,{className:`p-0`,children:r.length===0?(0,Y.jsxs)(z,{className:`py-10`,children:[(0,Y.jsxs)(F,{children:[(0,Y.jsx)(P,{variant:`icon`,children:(0,Y.jsx)(je,{})}),(0,Y.jsx)(L,{children:`No OTA for this build yet`}),(0,Y.jsxs)(R,{children:[`No release in this build's scope is newer than its built-in bundle. Deploy one with`,` `,(0,Y.jsx)(`code`,{className:`font-mono`,children:`hot-updater deploy`}),`, and it shows here.`]})]}),(0,Y.jsx)(I,{children:(0,Y.jsx)(c,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),search:{scopeKey:o},to:`/`,children:`All releases in this scope`})})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(G,{"aria-label":`Served now`,className:`table-fixed`,children:[(0,Y.jsx)(B,{children:(0,Y.jsxs)(U,{children:[(0,Y.jsx)(V,{children:`Bundle`}),(0,Y.jsx)(V,{className:`hidden w-40 md:table-cell`,children:`Rollout`}),(0,Y.jsx)(V,{className:`hidden w-32 sm:table-cell`,children:`Created`}),(0,Y.jsx)(V,{className:`w-32`,children:`First OTA download`})]})}),(0,Y.jsx)(H,{children:r.map(e=>{let t=e.bundleId,n=e.rolloutCohortCount/he*100;return(0,Y.jsxs)(U,{children:[(0,Y.jsx)(W,{className:`py-3 whitespace-normal`,children:(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Y.jsx)(c,{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,Y.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.message}):null]})}),(0,Y.jsx)(W,{className:`hidden md:table-cell`,children:(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[e.targetCohorts.length>0?(0,Y.jsx)(O,{variant:`secondary`,children:e.targetCohorts.length===1?`1 cohort`:`${e.targetCohorts.length} cohorts`}):(0,Y.jsx)(ue,{percentage:n}),e.shouldForceUpdate?(0,Y.jsx)(O,{variant:`outline`,children:`Forced`}):null]})}),(0,Y.jsx)(W,{className:`hidden sm:table-cell`,children:(0,Y.jsx)(x,{uuid:t})}),(0,Y.jsx)(W,{children:(0,Y.jsx)($e,{download:Qe(i,t)})})]},e.releaseId)})})]}),u===null?null:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2 border-t px-4 py-3 text-xs`,children:[(0,Y.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,Y.jsx)(f,{label:`the patch command`,value:u})]}),(0,Y.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 tt({buildId:t,search:n,onSearchChange:r}){let i=Ce(t),l=i.data,f={...n.patchesBefore===void 0?{}:{before:n.patchesBefore},...n.patchesAfter===void 0?{}:{after:n.patchesAfter}};return(0,Y.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,Y.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,Y.jsx)(s,{className:`-ml-1 size-11 lg:size-7`}),(0,Y.jsxs)(c,{className:a({className:`min-h-11 sm:min-h-7`,size:`sm`,variant:`ghost`}),to:`/native-builds`,children:[(0,Y.jsx)(u,{"data-icon":`inline-start`}),`Native builds`]}),l?(0,Y.jsxs)(`h1`,{className:`flex min-w-0 items-center gap-1.5 text-sm font-medium`,children:[(0,Y.jsx)(_e,{className:`size-3.5 shrink-0 text-muted-foreground`,platform:l.build.platform}),(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5`,children:[(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 whitespace-nowrap`,children:[(0,Y.jsxs)(`span`,{className:`sr-only`,children:[d(l.build.platform),` `]}),h[l.build.artifact_kind].label,(0,Y.jsx)(De,{build:l.build})]}),(0,Y.jsxs)(`span`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:[`· `,(0,Y.jsx)(`span`,{translate:`no`,children:l.channel})]})]}),(0,Y.jsx)(`span`,{className:`hidden text-xs font-normal text-muted-foreground tabular-nums sm:inline`,children:m(l.build.byte_size)})]}):(0,Y.jsx)(`h1`,{className:`sr-only`,children:`Native build`})]}),(0,Y.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,Y.jsx)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-4 sm:gap-6`,children:i.isError?(0,Y.jsxs)(T,{variant:`destructive`,children:[(0,Y.jsx)(E,{}),(0,Y.jsx)(C,{children:`The native build couldn't be loaded`}),(0,Y.jsx)(w,{children:i.error.message}),(0,Y.jsx)(D,{children:(0,Y.jsxs)(o,{onClick:()=>void i.refetch(),size:`xs`,variant:`outline`,children:[(0,Y.jsx)(S,{"data-icon":`inline-start`}),`Retry`]})})]}):l===void 0?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`span`,{className:`sr-only`,children:`Loading the native build`}),(0,Y.jsx)(e,{className:`h-56 w-full rounded-xl`}),(0,Y.jsx)(e,{className:`h-64 w-full rounded-xl`})]}):l===null?(0,Y.jsxs)(z,{className:`border py-16`,children:[(0,Y.jsxs)(F,{children:[(0,Y.jsx)(P,{variant:`icon`,children:(0,Y.jsx)(fe,{})}),(0,Y.jsx)(L,{children:`Native build not found`}),(0,Y.jsxs)(R,{children:[`No native build has this ID. It may have been deleted with`,` `,(0,Y.jsx)(`code`,{className:`font-mono`,children:`native-build delete`}),`, or be from another console.`]})]}),(0,Y.jsx)(I,{children:(0,Y.jsx)(c,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),to:`/native-builds`,children:`Show all native builds`})})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Ke,{build:l.build}),l.build.artifact_kind===`ipa`&&!q(l.build)?(0,Y.jsx)(Ye,{build:l.build}):null,(0,Y.jsx)(Fe,{detail:l}),(0,Y.jsx)(et,{detail:l}),(0,Y.jsx)(Ze,{detail:l,onPage:e=>r({...e.before===void 0?{}:{patchesBefore:e.before},...e.after===void 0?{}:{patchesAfter:e.after}}),page:f})]})})})]})}function nt(){let{buildId:e}=y.useParams(),t=y.useSearch(),n=y.useNavigate();return(0,Y.jsx)(tt,{buildId:e,onSearchChange:e=>void n({search:e,replace:!0}),search:t})}export{nt as component};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-builds_._buildId-B04z9yfk.js","assets/sidebar-yC7KdImc.js","assets/link-CN3iHC4A.js","assets/relativeTime-BYRt19mj.js","assets/arrow-up-right-BFafIOrq.js","assets/TargetDisplay-KU7JhIWG.js","assets/copy-CH1__JAW.js","assets/key-round-D7UgdXyA.js","assets/package-BmfoZ5Zj.js","assets/dist-DAM__Tdz.js","assets/HashValueDisplay-D2f0HmyU.js","assets/uuidv7-DAoOOpz9.js","assets/chevron-right-DNbYTBX1.js","assets/download-B2GjTySo.js","assets/RolloutPercentageBadge-D_I0Raj2.js","assets/badge-FZMD5vvS.js","assets/git-branch-DG1VDaKq.js","assets/-native-builds-search-DdHwfe4q.js","assets/history-C0wv4htz.js","assets/refresh-cw-BHhBYjS8.js","assets/smartphone-D1C6BRd_.js","assets/IosInstall-CHI2C4Yd.js","assets/useMutation-w3qYaU2L.js","assets/loader-circle-iMqC-8ZE.js","assets/send-DuMOCzbD.js","assets/field-CdhSgWhI.js","assets/api-C1OPeiG1.js","assets/preload-helper-CRQjUQaZ.js","assets/BundleIdDisplay-CTBdtFQ8.js","assets/ChannelBadge-CEabmopB.js","assets/PlatformIcon-DVnzzGqM.js","assets/SandboxBadge-BVxHg_HF.js","assets/card-CyHYmHue.js","assets/empty--YaE5Z4p.js","assets/table-D8YjT_ht.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{Vr as e}from"./sidebar-yC7KdImc.js";import{i as t,r as n,t as r}from"./preload-helper-CRQjUQaZ.js";import{n as i}from"./-native-builds-search-DdHwfe4q.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=t(`/native-builds_/$buildId`)({component:n(()=>r(()=>import(`./native-builds_._buildId-B04z9yfk.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,24,25,26,27,28,29,30,31,32,33,34])),`component`),validateSearch:i});export{a as n,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,A as t,An as n,Ar as r,At as i,Bt as a,C as o,Cr as s,Ct as c,Di as l,Dt as u,Er as d,Et as f,Ft as p,Gt as m,Hn as h,Ht as g,In as _,Jt as v,Kt as ee,L as te,Li as y,Lr as b,Mr as x,Mt as S,Nr as C,Or as w,Ot as T,Pr as E,Pt as ne,Qn as D,Qt as O,Ri as k,Rr as re,Rt as A,Sn as j,Sr as ie,St as M,Tr as N,Tt as ae,Ut as P,Vi as F,Vr as I,Vt as oe,Wt as L,Xt as se,Yt as R,Z as z,Zt as B,_r as V,_t as ce,ct as H,dt as le,en as U,fr as ue,ft as W,gr as G,gt as de,h as fe,hn as pe,hr as me,jn as he,jr as ge,kr as K,kt as _e,lt as q,mr as J,mt as ve,nn as ye,ot as be,p as Y,pr as xe,pt as Se,qt as Ce,rn as X,st as we,tn as Te,tt as Ee,ur as De,ut as Oe,vn as ke,vr as Ae,vt as je,wn as Me,wt as Ne,xr as Pe,xt as Fe,yt as Ie}from"./sidebar-yC7KdImc.js";import{t as Le}from"./link-CN3iHC4A.js";import{t as Re}from"./check-CqWNyG93.js";import{n as ze,r as Be}from"./useCompositeListItem-lAmUsXcc.js";import{T as Ve,a as He,f as Ue,i as We,n as Ge,p as Ke,u as qe}from"./TargetDisplay-KU7JhIWG.js";import{F as Je,P as Ye,a as Xe,i as Ze,l as Qe,n as $e,o as et,r as tt,s as nt,t as rt,u as it}from"./select-CA8r-UUe.js";import{i as at}from"./-native-builds-search-DdHwfe4q.js";import{t as ot}from"./loader-circle-iMqC-8ZE.js";import{n as st,t as ct}from"./CompositeItem-KUM5yQVr.js";import{t as lt}from"./refresh-cw-BHhBYjS8.js";import{t as ut}from"./smartphone-D1C6BRd_.js";import{t as dt}from"./trash-2-B5KIvrXy.js";import{a as ft,i as pt,n as mt,o as ht,r as gt,t as _t}from"./badge-FZMD5vvS.js";import{a as vt,n as yt,o as bt,t as xt}from"./card-CyHYmHue.js";import{t as St}from"./uuidv7-DAoOOpz9.js";import{n as Ct}from"./relativeTime-BYRt19mj.js";import{a as wt,i as Tt,l as Et,n as Dt,o as Ot,r as kt,s as At,t as jt}from"./alert-dialog-Ch0QxRsa.js";import{a as Mt,i as Nt,n as Pt,o as Ft,r as It,t as Lt}from"./dialog-BLj71-Nf.js";import{a as Rt,i as zt,n as Bt,r as Vt,t as Ht}from"./field-CdhSgWhI.js";import{t as Ut}from"./native-builds_.devices-D_kl2-bc.js";import{i as Z,o as Wt,r as Gt}from"./table-D8YjT_ht.js";import{a as Kt,c as qt,f as Jt,i as Yt,l as Xt,n as Zt,r as Qt,s as $t,t as en}from"./RelativeTime-B4PK8qDw.js";import{t as tn}from"./NativeBuildsNav-DaqxQPnG.js";import{a as nn,c as rn,i as an,l as on,n as sn,r as cn,s as ln}from"./IosInstall-CHI2C4Yd.js";var un=I(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),Q=F(k()),dn=Q.createContext(void 0);function fn(e=!0){let t=Q.useContext(dn);if(t===void 0&&!e)throw Error(K(25));return t}var pn=Q.createContext(void 0);function mn(e){let t=Q.useContext(pn);if(t===void 0&&!e)throw Error(K(33));return t}var hn=Q.createContext(void 0);function gn(e){let t=Q.useContext(hn);if(t===void 0&&!e)throw Error(K(36));return t}function _n(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,{events:l}=a.useState(`floatingTreeRoot`),u=fn(!0),d=u!==void 0;return Q.useMemo(()=>({id:r,role:`menuitem`,tabIndex:n?0:-1,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&l.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&l.emit(`close`,{domEvent:e,reason:_})},onMouseUp(e){if(u){let t=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,d&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||d&&!De&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!d||e.button===2)&&(!c||c.type===`regular-item`)&&s.current.click()}}),[t,n,r,l,i,a,o,s,u,d,c])}var vn={type:`regular-item`};function yn(e){let{closeOnClick:t,disabled:n=!1,highlighted:i,id:a,store:o,typingRef:s=o.context.typingRef,nativeButton:c,itemMetadata:l,nodeId:u}=e,f=Q.useRef(null),{getButtonProps:p,buttonRef:m}=d({disabled:n,focusableWhenDisabled:!0,native:c,composite:!0}),h=_n({closeOnClick:t,highlighted:i,id:a,nodeId:u,store:o,typingRef:s,itemRef:f,itemMetadata:l}),g=Q.useCallback(e=>r(h,{onMouseEnter(){l.type===`submenu-trigger`&&l.setActive()}},e,p),[h,p,l]),_=N(f,m);return Q.useMemo(()=>({getItemProps:g,itemRef:_}),[g,_])}var bn=Q.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,d=ze({label:a}),f=mn(!0),p=W(i),{store:m}=gn(),h=m.useState(`isActive`,d.index),g=m.useState(`itemProps`),{getItemProps:_,itemRef:v}=yn({closeOnClick:c,disabled:s,highlighted:h,id:p,store:m,nativeButton:o,nodeId:f?.context.nodeId,itemMetadata:vn});return Pe(`div`,e,{state:{disabled:s,highlighted:h},props:[g,u,_],ref:[v,t,d.ref]})}),$=l(),xn={...Se,...S},Sn=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s}=gn(),{side:c,align:l}=mn(),u=nt(!0)!=null,d=s.useState(`open`),f=s.useState(`transitionStatus`),p=s.useState(`popupProps`),m=s.useState(`mounted`),h=s.useState(`instantType`),_=s.useState(`activeTriggerElement`),v=s.useState(`parent`),ee=s.useState(`lastOpenChangeReason`),y=s.useState(`rootId`),b=s.useState(`floatingRootContext`),x=s.useState(`floatingTreeRoot`),S=s.useState(`closeDelay`),C=s.useState(`activeTriggerElement`),w=s.useState(`hoverEnabled`),T=s.useState(`disabled`),E=v.type===`context-menu`;_e({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),Q.useEffect(()=>{function e(e){s.setOpen(!1,j(e.reason,e.domEvent))}return x.events.on(`close`,e),()=>{x.events.off(`close`,e)}},[x.events,s]),je(b,{enabled:w&&!T&&!E&&v.type!==`menubar`,closeDelay:S});let ne=Q.useCallback(e=>{s.set(`popupElement`,e)},[s]),D=Pe(`div`,e,{state:{transitionStatus:f,side:c,align:l,open:d,nested:v.type===`menu`,instant:h},ref:[t,s.context.popupRef,ne],stateAttributesMapping:xn,props:[p,{onKeyDown(e){u&&te.has(e.key)&&e.stopPropagation()}},H(f),o,{"data-rootownerid":y}]}),O=v.type===void 0||E;return(_||v.type===`menubar`&&ee!==`outside-press`)&&(O=!0),(0,$.jsx)(g,{context:b,modal:E,disabled:!m,returnFocus:a===void 0?O:a,initialFocus:v.type!==`menu`,restoreFocus:!0,externalTree:v.type===`menubar`?void 0:x,previousFocusableElement:C,nextFocusableElement:v.type===void 0?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:v.type===void 0?s.context.beforeContentFocusGuardRef:void 0,children:D})}),Cn=Q.createContext(void 0);function wn(){let e=Q.useContext(Cn);if(e===void 0)throw Error(K(32));return e}var Tn=Q.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=gn();return i.useState(`mounted`)||n?(0,$.jsx)(Cn.Provider,{value:n,children:(0,$.jsx)(R,{ref:t,...r})}):null}),En=Q.forwardRef(function(e,n){let{anchor:r,positionMethod:a=`absolute`,className:o,render:s,side:c,align:l,sideOffset:u=0,alignOffset:d=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p=5,arrowPadding:m=5,sticky:g=!1,disableAnchorTracking:_=!1,collisionAvoidance:v=se,style:ee,...te}=e,{store:y}=gn(),b=wn(),x=fn(!0),S=y.useState(`parent`),C=y.useState(`floatingRootContext`),w=y.useState(`floatingTreeRoot`),T=y.useState(`mounted`),E=y.useState(`open`),ne=y.useState(`modal`),D=y.useState(`openMethod`),O=y.useState(`activeTriggerElement`),k=y.useState(`transitionStatus`),re=y.useState(`positionerElement`),A=y.useState(`instantType`),ie=y.useState(`hasViewport`),M=y.useState(`lastOpenChangeReason`),N=y.useState(`floatingNodeId`),ae=y.useState(`floatingParentNodeId`),F=C.useState(`domReferenceElement`),I=Q.useRef(null),oe=i(re,!1,!1),L=r,R=u,z=d,V=l,ce=v;S.type===`context-menu`&&(L=r??S.context?.anchor,V??=`start`,!c&&V!==`center`&&(z=e.alignOffset??2,R=e.sideOffset??-5));let H=c,le=V;S.type===`menu`?(H??=`inline-end`,le??=`start`,ce=e.collisionAvoidance??B):S.type===`menubar`&&(H??=`bottom`,le??=`start`);let U=S.type===`context-menu`,W=q({anchor:L,floatingRootContext:C,positionMethod:x?`fixed`:a,mounted:T,side:H,sideOffset:R,align:le,alignOffset:z,arrowPadding:U?0:m,collisionBoundary:f,collisionPadding:p,sticky:g,nodeId:N,keepMounted:b,disableAnchorTracking:_,collisionAvoidance:ce,shiftCrossAxis:U&&!(`side`in ce&&ce.side===`flip`),externalTree:w,adaptiveOrigin:ie?Oe:void 0});Q.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===N&&y.set(`hoverEnabled`,!1),e.nodeId!==N&&e.parentNodeId===y.select(`floatingParentNodeId`)&&y.setOpen(!1,j(h)))}return w.events.on(`menuopenchange`,e),()=>{w.events.off(`menuopenchange`,e)}},[y,w.events,N]),Q.useEffect(()=>{if(y.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==y.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;y.setOpen(!1,j(t))}return w.events.on(`menuopenchange`,e),()=>{w.events.off(`menuopenchange`,e)}},[w.events,y]);let G=ue();Q.useEffect(()=>{E||G.clear()},[E,G]),Q.useEffect(()=>{function e(e){if(!(!E||e.nodeId!==y.select(`floatingParentNodeId`)))if(e.target&&O&&O!==e.target){let e=y.select(`closeDelay`);e>0?G.isStarted()||G.start(e,()=>{y.setOpen(!1,j(h))}):y.setOpen(!1,j(h))}else G.clear()}return w.events.on(`itemhover`,e),()=>{w.events.off(`itemhover`,e)}},[w.events,E,O,y,G]),Q.useEffect(()=>{let e={open:E,nodeId:N,parentNodeId:ae,reason:y.select(`lastOpenChangeReason`)};w.events.emit(`menuopenchange`,e)},[w.events,E,y,N,ae]),ge(()=>{let e=F,t=I.current;if(e&&(I.current=e),t&&e&&e!==t){y.set(`instantType`,void 0);let e=new AbortController;return oe(()=>{y.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[F,oe,y]);let de={open:E,side:W.side,align:W.align,anchorHidden:W.anchorHidden,nested:S.type===`menu`,instant:A},fe=S.type===`menubar`&&S.context.modal;Qe(E&&(fe||ne&&M!==`trigger-hover`),D===`touch`,re,O);let pe=we(e,de,{styles:W.positionerStyles,transitionStatus:k,props:te,refs:[n,y.useStateSetter(`positionerElement`)],hidden:!T,inert:!E}),me=T&&S.type!==`menu`&&(S.type!==`menubar`&&ne&&M!==`trigger-hover`||S.type===`menubar`&&S.context.modal),he=null;return S.type===`menubar`?he=S.context.contentElement:S.type===void 0&&(he=O),(0,$.jsxs)(pn.Provider,{value:W,children:[me&&(0,$.jsx)(t,{ref:S.type===`context-menu`||S.type===`nested-context-menu`?S.context.internalBackdropRef:null,inert:be(!E),cutout:he}),(0,$.jsx)(P,{id:N,children:(0,$.jsx)(Be,{elementsRef:y.context.itemDomElements,labelsRef:y.context.itemLabels,children:pe})})]})}),Dn=Q.createContext(null);function On(e){let t=Q.useContext(Dn);if(t===null&&!e)throw Error(K(5));return t}var kn={...M,disabled:A(e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled),modal:A(e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0)),openMethod:A(e=>e.openMethod),allowMouseEnter:A(e=>e.allowMouseEnter),stickIfOpen:A(e=>e.stickIfOpen),parent:A(e=>e.parent),rootId:A(e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId),activeIndex:A(e=>e.activeIndex),isActive:A((e,t)=>e.activeIndex===t),hoverEnabled:A(e=>e.hoverEnabled),instantType:A(e=>e.instantType),lastOpenChangeReason:A(e=>e.openChangeReason),floatingTreeRoot:A(e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot),floatingNodeId:A(e=>e.floatingNodeId),floatingParentNodeId:A(e=>e.floatingParentNodeId),itemProps:A(e=>e.itemProps),closeDelay:A(e=>e.closeDelay),hasViewport:A(e=>e.hasViewport),keyboardEventRelay:A(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)})},An=class e extends p{constructor(e){super({...jn(),...e},{positionerRef:Q.createRef(),popupRef:Q.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:Q.createRef(),beforeContentFocusGuardRef:Q.createRef(),onOpenChangeComplete:void 0,triggerElements:new c},kn),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);t===i&&n===a&&r===o||(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}static useStore(t,n){let r=C(()=>new e(n)).current;return t??r}unsubscribeParentListener=null};function jn(){return{...Fe(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new v,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:s,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}var Mn=Q.createContext(void 0);function Nn(){return Q.useContext(Mn)}var Pn=J(function(e){let{children:t,open:n,onOpenChange:i,onOpenChangeComplete:c,defaultOpen:l=!1,disabled:d=!1,modal:p,loopFocus:h=!0,orientation:g=`vertical`,actionsRef:_,closeParentOnEsc:v=!1,handle:te,triggerId:y,defaultTriggerId:b=null,highlightItemOnHover:S=!0}=e,C=fn(!0),w=gn(!0),T=On(!0),E=Nn(),D=Q.useMemo(()=>E&&w?{type:`menu`,store:w.store}:T?{type:`menubar`,context:T}:C&&!w?{type:`context-menu`,context:C}:{type:void 0},[C,w,T,E]),k=An.useStore(te?.store,{open:l,openProp:n,activeTriggerId:b,triggerIdProp:y,parent:D});xe(()=>{n===void 0&&k.state.open===!1&&l===!0&&k.update({open:!0,activeTriggerId:b})}),k.useControlledProp(`openProp`,n),k.useControlledProp(`triggerIdProp`,y),k.useContextCallback(`onOpenChangeComplete`,c);let re=O(),A=O(),M=k.useState(`floatingTreeRoot`),N=m(M),P=ee(),F=k.useState(`open`),I=k.useState(`activeTriggerElement`),oe=k.useState(`positionerElement`),se=k.useState(`hoverEnabled`),R=k.useState(`disabled`),z=k.useState(`lastOpenChangeReason`),B=k.useState(`parent`),V=k.useState(`activeIndex`),ce=k.useState(`payload`),H=k.useState(`floatingParentNodeId`),U=Q.useRef(null),W=Q.useRef(B.type!==`context-menu`),G=ue(),de=Q.useRef(!0),fe=ue(),pe=H!=null,{openMethod:me,triggerProps:K}=o(F);k.useSyncedValues({disabled:d,modal:B.type===void 0?p:void 0,openMethod:me,rootId:re}),ae(k);let{forceUnmount:_e}=f(F,k,()=>{k.update({allowMouseEnter:!1,stickIfOpen:!0})});ge(()=>{C&&!w?k.update({parent:{type:`context-menu`,context:C},floatingNodeId:N,floatingParentNodeId:P}):w&&k.update({floatingNodeId:N,floatingParentNodeId:P})},[C,w,N,P,k]),Q.useEffect(()=>{if(F||(U.current=null),B.type===`context-menu`){if(!F){G.clear(),W.current=!1;return}G.start(500,()=>{W.current=!0})}},[G,F,B.type]),ge(()=>{!F&&!se&&k.set(`hoverEnabled`,!0)},[F,se,k]);let q=x((e,t)=>{let n=t.reason;if(F===e&&t.trigger===I&&z===n||(t.preventUnmountOnClose=()=>{k.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&(t.trigger=I??void 0),i?.(e,t),t.isCanceled))return;k.state.floatingRootContext.dispatchOpenChange(e,t);let r=t.event;if(e===!1&&r?.type===`click`&&r.pointerType===`touch`&&!de.current)return;if(!e&&V!==null){let e=k.context.itemDomElements.current[V];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}e&&n===`trigger-focus`?(de.current=!1,fe.start(300,()=>{de.current=!0})):(de.current=!0,fe.clear());let a=(n===`trigger-press`||n===`item-press`)&&r.detail===0&&r?.isTrusted,o=!e&&(n===`escape-key`||n==null),s={open:e,openChangeReason:n};U.current=t.event??null;let c=t.trigger?.id??null;(c||e)&&(s.activeTriggerId=c,s.activeTriggerElement=t.trigger??null),k.update(s),B.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?k.set(`instantType`,`group`):a||o?k.set(`instantType`,a?`click`:`dismiss`):k.set(`instantType`,void 0)}),J=ne({popupStore:k,floatingId:A,nested:P!=null,onOpenChange:q}),ve=J.context.events;Q.useEffect(()=>{let e=({open:e,eventDetails:t})=>q(e,t);return ve.on(`setOpen`,e),()=>{ve?.off(`setOpen`,e)}},[ve,q]);let ye=Q.useCallback(()=>{k.setOpen(!1,j(he))},[k]);Q.useImperativeHandle(_,()=>({unmount:_e,close:ye}),[_e,ye]);let be;B.type===`context-menu`&&(be=B.context),Q.useImperativeHandle(be?.positionerRef,()=>oe,[oe]),Q.useImperativeHandle(be?.actionsRef,()=>({setOpen:q}),[q]);let Y=a(J,{enabled:!R,bubbles:{escapeKey:v&&B.type===`menu`},outsidePress(){return B.type!==`context-menu`||U.current?.type===`contextmenu`?!0:W.current},externalTree:pe?M:void 0}),Se=le(),Ce=Q.useCallback(e=>{k.select(`activeIndex`)!==e&&k.set(`activeIndex`,e)},[k]),X=Je(J,{enabled:!R,listRef:k.context.itemDomElements,activeIndex:V,nested:B.type!==void 0,loopFocus:h,orientation:g,parentOrientation:B.type===`menubar`?B.context.orientation:void 0,rtl:Se===`rtl`,disabledIndices:ie,onNavigate:Ce,openOnArrowKeyDown:B.type!==`context-menu`,externalTree:pe?M:void 0,focusItemOnHover:S}),we=Q.useCallback(e=>{k.context.typingRef.current=e},[k]),Te=Ye(J,{listRef:k.context.itemLabels,elementsRef:k.context.itemDomElements,activeIndex:V,resetMs:500,onMatch:e=>{F&&e!==V&&k.set(`activeIndex`,e)},onTyping:we});u(k,{floatingRootContext:J,activeTriggerProps:Q.useMemo(()=>{let e=r(Te.reference,X.reference,Y.reference,{onMouseMove(){k.set(`allowMouseEnter`,!0)}},K);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=F,e},[k,Te.reference,X.reference,Y.reference,K,F]),inactiveTriggerProps:Q.useMemo(()=>{let e=r(X.trigger,Y.trigger,K);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[X.trigger,Y.trigger,K]),popupProps:Q.useMemo(()=>r(Ne,{id:A,role:`menu`,"aria-labelledby":I?.id,onMouseMove(){k.set(`allowMouseEnter`,!0),B.type===`menu`&&k.set(`hoverEnabled`,!1)},onClick(){k.select(`hoverEnabled`)&&k.set(`hoverEnabled`,!1)},onKeyDown(e){let t=k.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},Te.floating,X.floating,Y.floating),[I,A,B.type,k,Te.floating,X.floating,Y.floating]),itemProps:X.item??s});let Ee=Q.useMemo(()=>({store:k,parent:D}),[k,D]),De=(0,$.jsx)(hn.Provider,{value:Ee,children:typeof t==`function`?t({payload:ce}):t});return B.type===void 0||B.type===`context-menu`?(0,$.jsx)(L,{externalTree:M,children:De}):De});function Fn(e){if(b(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`)??void 0;if(!re(e))return Fn(E(e))}var In=F(y());function Ln(e,t){let r=Q.useRef(null);function i(t){In.flushSync(()=>{e.setOpen(!1,j(n,t.nativeEvent,t.currentTarget))}),ye(r.current)?.focus()}function a(r){let i=e.select(`positionerElement`);if(i&&X(r,i))e.context.beforeContentFocusGuardRef.current?.focus();else{In.flushSync(()=>{e.setOpen(!1,j(n,r.nativeEvent,r.currentTarget))});let a=Te(e.context.triggerFocusTargetRef.current||t.current);for(;a!==null&&D(i,a);){let e=a;if(a=U(a),a===e)break}a?.focus()}}return{preFocusGuardRef:r,handlePreFocusGuardFocus:i,handleFocusTargetFocus:a}}function Rn(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=Q.useRef(!1);return Q.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,ke(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:s,[t,n,r])}var zn=2,Bn=me(function(e,t){let{render:n,className:i,style:a,disabled:o=!1,nativeButton:c=!0,id:l,openOnHover:u,delay:f=100,closeDelay:p=0,handle:h,payload:g,..._}=e,te=gn(!0),y=h?.store??te?.store;if(!y)throw Error(K(85));let b=W(l),S=y.useState(`isTriggerActive`,b),C=y.useState(`floatingRootContext`),E=y.useState(`isOpenedByTrigger`,b),ne=y.useState(`triggerPopupId`,b),O=Q.useRef(null),k=Hn(),re=w(!0),A=Ce(),j=Q.useMemo(()=>A??new v,[A]),{registerTrigger:ie,isMountedByThisTrigger:M}=T(b,O,y,{payload:g,closeDelay:p,parent:k,floatingTreeRoot:j,floatingNodeId:m(j),floatingParentNodeId:ee(),keyboardEventRelay:re?.relayKeyboardEvent}),N=k.type===`menubar`,ae=y.useState(`disabled`),P=o||ae||N&&k.context.disabled,{getButtonProps:F,buttonRef:I}=d({disabled:P,native:c});Q.useEffect(()=>{!E&&k.type===void 0&&(y.context.allowMouseUpTriggerRef.current=!1)},[y,E,k.type]);let L=Q.useRef(null),se=ue(),R=x(e=>{if(!L.current)return;se.clear(),y.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if(D(L.current,t)||D(y.select(`positionerElement`),t)||t===L.current||t!=null&&Fn(t)===y.select(`rootId`))return;let n=it(L.current);e.clientX>=n.left-zn&&e.clientX<=n.right+zn&&e.clientY>=n.top-zn&&e.clientY<=n.bottom+zn||j.events.emit(`close`,{domEvent:e,reason:Me})});Q.useEffect(()=>{E&&y.select(`lastOpenChangeReason`)===`trigger-hover`&&ke(L.current).addEventListener(`mouseup`,R,{once:!0})},[E,R,y]);let z=N&&k.context.hasSubmenuOpen,B=ce(C,{enabled:(u??z)&&!P&&k.type!==`context-menu`&&(!N||z&&!M),handleClose:de({blockPointerEvents:!N}),mouseOnly:!0,move:!1,restMs:k.type===void 0?f:void 0,delay:{close:p},triggerElementRef:O,externalTree:j,isActiveTrigger:S,isClosing:()=>y.select(`transitionStatus`)===`ending`}),V=Vn(E,y.select(`lastOpenChangeReason`)),H=oe(C,{enabled:!P&&k.type!==`context-menu`,event:E&&N?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:k.type===void 0?V:!1}),le=Ie(C,{enabled:!P&&z}),U=Rn({open:E,enabled:N,mouseDownAction:`open`}),G=Q.useMemo(()=>r(le.reference,H.reference),[le.reference,H.reference]),fe=y.useState(`triggerProps`,M),{preFocusGuardRef:me,handlePreFocusGuardFocus:he,handleFocusTargetFocus:ge}=Ln(y,O),_e={disabled:P,open:E},q=[L,t,I,ie,O],J=[G,B??s,fe,{"aria-haspopup":`menu`,"aria-controls":ne,id:b,onMouseDown:e=>{y.select(`open`)||(se.start(200,()=>{y.context.allowMouseUpTriggerRef.current=!0}),ke(e.currentTarget).addEventListener(`mouseup`,R,{once:!0}))}},N?{role:`menuitem`}:{},U,_,F],ye=Pe(`button`,e,{enabled:!N,stateAttributesMapping:ve,state:_e,ref:q,props:J});return N?(0,$.jsx)(ct,{tag:`button`,render:n,className:i,style:a,state:_e,refs:q,props:J,stateAttributesMapping:ve}):E?(0,$.jsxs)(Q.Fragment,{children:[(0,$.jsx)(pe,{ref:me,onFocus:he},`${b}-pre-focus-guard`),(0,$.jsx)(Q.Fragment,{children:ye},b),(0,$.jsx)(pe,{ref:y.context.triggerFocusTargetRef,onFocus:ge},`${b}-post-focus-guard`)]}):(0,$.jsx)(Q.Fragment,{children:ye},b)});function Vn(e,t){let n=ue(),[r,i]=Q.useState(!1);return ge(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Hn(){let e=fn(!0),t=gn(!0),n=On(!0);return Q.useMemo(()=>n?{type:`menubar`,context:n}:e&&!t?{type:`context-menu`,context:e}:{type:void 0},[e,t,n])}var Un=F(Ct(),1);function Wn({...e}){return(0,$.jsx)(Pn,{"data-slot":`dropdown-menu`,...e})}function Gn({...e}){return(0,$.jsx)(Bn,{"data-slot":`dropdown-menu-trigger`,...e})}function Kn({align:e=`start`,alignOffset:t=0,side:n=`bottom`,sideOffset:r=4,className:i,...a}){return(0,$.jsx)(Tn,{children:(0,$.jsx)(En,{className:`isolate z-50 outline-none`,align:e,alignOffset:t,side:n,sideOffset:r,children:(0,$.jsx)(Sn,{"data-slot":`dropdown-menu-content`,className:Ae(`dark z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,i),...a})})})}function qn({className:e,inset:t,variant:n=`default`,...r}){return(0,$.jsx)(bn,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:Ae(`group/dropdown-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive`,e),...r})}function Jn({className:e,...t}){return(0,$.jsx)(Ee,{"data-slot":`dropdown-menu-separator`,className:Ae(`-mx-1 my-1 h-px bg-border/50`,e),...t})}var Yn={pending:`Requested`,approved:`Approved`,registered:`Registered`},Xn={pending:`warning`,approved:`secondary`,registered:`muted`},Zn=`all`,Qn=6,$n=()=>window.location.pathname.endsWith(`/native-builds/devices`)?window.location.pathname.slice(0,-He.length):qe(window.location,``),er=(e,t)=>({approve:t.canApprove&&e.status===`pending`,rename:t.canApprove,remove:t.canApprove,withdraw:!t.canApprove&&e.status===`pending`&&e.requested_by===t.email}),tr=e=>e.status===`approved`&&e.apple_error!==null,nr=e=>e.requested_by??`Added from a terminal`;function rr({device:e,inTable:t=!1}){return e.apple_error===null?null:t?(0,$.jsx)(`span`,{className:`line-clamp-2 max-w-48 text-xs whitespace-normal text-muted-foreground`,title:e.apple_error,children:e.apple_error}):(0,$.jsx)(`span`,{className:`max-w-64 text-xs whitespace-normal text-muted-foreground`,children:e.apple_error})}function ir({device:e,withError:t=!0}){return(0,$.jsxs)(`div`,{className:`flex min-w-0 shrink-0 flex-col items-start gap-1`,children:[tr(e)?(0,$.jsx)(_t,{variant:`warning`,children:`Apple refused`}):(0,$.jsx)(_t,{variant:Xn[e.status],children:Yn[e.status]}),t?(0,$.jsx)(rr,{device:e,inTable:!0}):null]})}function ar({device:e}){if(e.build_id===null)return(0,$.jsx)(Ge,{});let t=`A build`;try{t=`Build of ${(0,Un.default)(St(e.build_id)).format(`MMM D`)}`}catch{}return(0,$.jsx)(Le,{className:`text-xs font-medium underline-offset-4 hover:underline`,params:{buildId:e.build_id},to:`/native-builds/$buildId`,children:t})}function or({device:e,viewer:t,onOpen:n}){let r=er(e,t);return!r.approve&&!r.rename&&!r.remove&&!r.withdraw?null:(0,$.jsxs)(`div`,{className:`flex items-center justify-end gap-1`,children:[r.approve?(0,$.jsxs)(G,{className:`h-11 sm:h-8`,onClick:()=>n({kind:`approve`,device:e}),size:`sm`,children:[(0,$.jsx)(Re,{"data-icon":`inline-start`}),`Approve`]}):null,r.withdraw?(0,$.jsx)(G,{className:`h-11 sm:h-8`,onClick:()=>n({kind:`remove`,device:e}),size:`sm`,variant:`outline`,children:`Withdraw`}):null,r.rename||r.remove?(0,$.jsxs)(Wn,{children:[(0,$.jsx)(Gn,{render:(0,$.jsx)(G,{"aria-label":`More actions for ${e.name}`,className:`size-11 sm:size-8`,size:`icon-sm`,variant:`ghost`}),children:(0,$.jsx)(un,{"aria-hidden":`true`})}),(0,$.jsxs)(Kn,{align:`end`,children:[(0,$.jsxs)(qn,{onClick:()=>n({kind:`rename`,device:e}),children:[(0,$.jsx)(st,{"aria-hidden":`true`}),`Rename`]}),(0,$.jsx)(Jn,{}),(0,$.jsxs)(qn,{onClick:()=>n({kind:`remove`,device:e}),variant:`destructive`,children:[(0,$.jsx)(dt,{"aria-hidden":`true`}),e.status===`pending`?`Decline`:`Remove`]})]})]}):null]})}function sr({device:e,viewer:t,onOpen:n}){return(0,$.jsxs)(Wt,{children:[(0,$.jsx)(Gt,{className:`font-medium`,children:e.name}),(0,$.jsx)(Gt,{children:(0,$.jsx)(`span`,{className:`font-mono text-xs`,title:e.udid,translate:`no`,children:Ke(e.udid)})}),(0,$.jsx)(Gt,{className:`text-xs`,children:e.requested_by??(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:nr(e)})}),(0,$.jsx)(Gt,{children:(0,$.jsx)(ir,{device:e})}),(0,$.jsx)(Gt,{className:`text-xs`,children:(0,$.jsx)(en,{ms:e.created_at_ms})}),(0,$.jsx)(Gt,{children:(0,$.jsx)(ar,{device:e})}),(0,$.jsx)(Gt,{className:`text-right`,children:(0,$.jsx)(or,{device:e,onOpen:n,viewer:t})})]})}function cr({device:e,viewer:t,onOpen:n}){return(0,$.jsxs)(Zt,{className:`cursor-default gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,$.jsx)(`p`,{className:`truncate text-sm font-medium`,children:e.name}),(0,$.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,translate:`no`,children:Ke(e.udid)})]}),(0,$.jsx)(ir,{device:e,withError:!1})]}),(0,$.jsx)(rr,{device:e}),(0,$.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground`,children:[(0,$.jsx)(`span`,{children:nr(e)}),(0,$.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,$.jsx)(en,{ms:e.created_at_ms}),e.build_id===null?null:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,$.jsx)(ar,{device:e})]})]}),(0,$.jsx)(or,{device:e,onOpen:n,viewer:t})]})}function lr({target:e,onClose:t}){let n=cn(),r=rn(),i=e.kind===`approve`?n:r,[a,o]=(0,Q.useState)(e.device.name),s=a.trim();return(0,$.jsx)(Lt,{onOpenChange:e=>e?null:t(),open:!0,children:(0,$.jsxs)(Pt,{children:[(0,$.jsxs)(Mt,{children:[(0,$.jsx)(Ft,{children:e.kind===`approve`?`Approve ${e.device.name}?`:`Rename ${e.device.name}`}),(0,$.jsx)(It,{children:e.kind===`approve`?`The next ad hoc build registers this iPhone with your Apple account. Each new iPhone uses one of the account's 100 a year, and removing it never gives the slot back.`:`The registry shows this name. The next ad hoc build doesn't rename it at Apple.`})]}),(0,$.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),s!==``&&i.mutate({id:e.device.id,name:s},{onSuccess:t})},children:[(0,$.jsxs)(zt,{children:[e.kind===`approve`?(0,$.jsxs)(`dl`,{className:`grid grid-cols-[auto_minmax(0,1fr)] gap-x-4 gap-y-1 text-sm`,children:[(0,$.jsx)(`dt`,{className:`text-muted-foreground`,children:`Requested by`}),(0,$.jsx)(`dd`,{className:`truncate`,children:e.device.requested_by??`Terminal (CLI)`}),(0,$.jsx)(`dt`,{className:`text-muted-foreground`,children:`UDID`}),(0,$.jsx)(`dd`,{className:`font-mono text-xs break-all select-all`,translate:`no`,children:e.device.udid})]}):null,(0,$.jsxs)(Ht,{"data-invalid":i.isError||void 0,children:[(0,$.jsx)(Rt,{htmlFor:`ios-device-dialog-name`,children:`Name`}),(0,$.jsx)(z,{autoComplete:`off`,id:`ios-device-dialog-name`,maxLength:100,onChange:e=>o(e.target.value),value:a}),e.kind===`approve`?(0,$.jsx)(Bt,{children:`The iPhone's ID comes from the person who asked. Approve devices you recognize.`}):null,(0,$.jsx)(Vt,{children:i.isError?`Couldn't ${e.kind===`approve`?`approve`:`rename`} ${e.device.name}. Check your connection and try again.`:null})]})]}),(0,$.jsx)(Nt,{className:`mt-4`,children:(0,$.jsxs)(G,{className:`h-11 sm:h-8`,disabled:s===``||i.isPending,type:`submit`,children:[i.isPending?(0,$.jsx)(ot,{className:`animate-spin motion-reduce:animate-none`,"data-icon":`inline-start`}):(0,$.jsx)(Re,{"data-icon":`inline-start`}),e.kind===`approve`?`Approve`:`Rename`]})})]})]})})}function ur({device:e,viewer:t,onClose:n}){let r=ln(),i=!t.canApprove,a=e.status===`pending`;return(0,$.jsx)(jt,{onOpenChange:e=>e?null:n(),open:!0,children:(0,$.jsxs)(Tt,{children:[(0,$.jsxs)(At,{children:[(0,$.jsx)(Et,{children:i?`Withdraw ${e.name}?`:a?`Decline ${e.name}?`:`Remove ${e.name}?`}),(0,$.jsx)(wt,{children:a?`It leaves the list. Its owner can request it again.`:`It leaves the list. New ad hoc builds keep it until it's disabled at Apple.`})]}),a||!t.canApprove?null:(0,$.jsx)(`div`,{className:`flex min-w-0 flex-col text-xs text-muted-foreground [&_code]:break-words [&_code]:whitespace-normal`,children:(0,$.jsx)(Ve,{label:`the command that disables it`,value:`npx hot-updater native-build devices remove --udid ${e.udid}`,wrap:!0})}),r.isError?(0,$.jsxs)(`p`,{className:`text-xs text-destructive`,role:`alert`,children:[`Couldn't `,i?`withdraw`:a?`decline`:`remove`,` `,e.name,`. Check your connection and try again.`]}):null,(0,$.jsxs)(Ot,{children:[(0,$.jsx)(kt,{disabled:r.isPending,children:`Cancel`}),(0,$.jsxs)(Dt,{disabled:r.isPending,onClick:t=>{t.preventDefault(),r.mutate({udid:e.udid},{onSuccess:n})},variant:`destructive`,children:[r.isPending?(0,$.jsx)(ot,{className:`animate-spin motion-reduce:animate-none`,"data-icon":`inline-start`}):null,i?`Withdraw`:a?`Decline`:`Remove`]})]})]})})}function dr({status:e,secretName:t}){return(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:e===`local-console`?`iPhones register through your hosted Console: an iPhone can't reach this computer's.`:`Set ${t} on this Console to register iPhones.`})}function fr({view:t,devices:n}){let r=sn(),[i,a]=(0,Q.useState)(null),o=i??t?.defaultName??``,[s,c]=(0,Q.useState)(o);(0,Q.useEffect)(()=>{let e=setTimeout(()=>c(o.trim()),400);return()=>clearTimeout(e)},[o]);let l=r?.ios===!0,u=an({mode:`register`,name:s||`iPhone`},l&&t?.registration===`ready`),d=r===null||window.location.protocol===`https:`,f=r?.requested&&r.udid!==null?n?.find(e=>e.udid===r.udid?.toLowerCase()):void 0,p=r===null?(0,$.jsx)(e,{"aria-label":`Loading`,className:`h-36 w-full`}):f===void 0?t!==void 0&&(t.registration===`local-console`||t.registration===`no-secret`)?(0,$.jsx)(dr,{secretName:t.secretName,status:t.registration}):l?d?u.data?.status===`local-console`?(0,$.jsx)(dr,{status:`local-console`}):u.data?.status===`no-secret`?(0,$.jsx)(dr,{secretName:u.data.secretName,status:`no-secret`}):(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,$.jsxs)(Ht,{children:[(0,$.jsx)(Rt,{htmlFor:`ios-device-register-name`,children:`This iPhone's name`}),(0,$.jsx)(z,{autoComplete:`off`,className:`h-11`,id:`ios-device-register-name`,maxLength:100,onChange:e=>a(e.target.value),value:o})]}),u.data?.status===`issued`&&s===o.trim()?(0,$.jsxs)(`a`,{className:V({className:`h-auto min-h-11 w-full whitespace-normal`}),href:Ue($n(),u.data.token),children:[(0,$.jsx)(ut,{"data-icon":`inline-start`}),`Install profile`]}):(0,$.jsx)(e,{"aria-label":`Preparing the profile`,className:`h-11 w-full`}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Safari only. Allow the download, then install it in Settings, where iOS calls it not signed. Safari comes back here, and nothing stays installed.`})]}):(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:`iPhones need this Console on HTTPS.`}):(0,$.jsxs)(`div`,{className:`flex flex-col items-start gap-4 sm:flex-row sm:items-center`,children:[(0,$.jsx)(on,{className:`size-36 shrink-0`,label:`Open this page on an iPhone`,value:`${window.location.origin}${$n()}${He}`}),(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,$.jsx)(`p`,{className:`text-sm font-medium`,children:`Open this page on the iPhone, in Safari.`}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`It installs a profile that reads the iPhone's ID, then lists the iPhone here as requested. Nothing stays installed.`})]})]}):(0,$.jsxs)(`p`,{className:`text-sm`,role:`status`,children:[(0,$.jsx)(`span`,{className:`font-medium`,children:f.name}),` ·`,` `,Yn[f.status],`.`,` `,f.status===`pending`?`A maintainer approves it next, and it joins the next ad hoc build.`:`It joins the next ad hoc build.`]});return(0,$.jsxs)(xt,{className:`shadow-sm`,children:[(0,$.jsx)(vt,{className:`border-b px-4 py-3`,children:(0,$.jsx)(bt,{className:`text-sm`,children:(0,$.jsx)(`h2`,{children:`Register an iPhone`})})}),(0,$.jsx)(yt,{className:`p-4 sm:p-6`,children:p})]})}function pr({search:e,onSearchChange:t}){let n=fe(),r=nn(e.status),i=r.data,a=i?.devices,[o,s]=(0,Q.useState)(null),c=()=>s(null),l=(0,$.jsx)($t,{icon:ut,title:e.status===void 0?`No iPhones yet`:`No ${Yn[e.status].toLowerCase()} iPhones`,children:e.status===void 0?(0,$.jsx)(`p`,{children:`Open this page on an iPhone to register it.`}):(0,$.jsx)(G,{className:`h-11 sm:h-8`,onClick:()=>t({}),size:`sm`,variant:`outline`,children:`Show all`})});return(0,$.jsxs)(`div`,{className:`flex h-svh min-h-0 min-w-0 flex-col`,children:[(0,$.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,$.jsx)(Y,{className:`-ml-1 size-11 lg:size-7`}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(at,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,$.jsx)(`h1`,{className:`text-sm font-medium`,children:`Native builds`})]}),(0,$.jsx)(`p`,{className:`basis-full pl-12 text-xs text-muted-foreground sm:basis-auto sm:pl-0`,children:`The iPhones and iPads ad hoc builds install on. Android needs none.`})]}),(0,$.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-4 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:[(0,$.jsx)(tn,{current:`devices`}),(0,$.jsx)(fr,{devices:a,view:i}),i!==void 0&&!i.viewer.approversConfigured?(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5 text-xs text-muted-foreground`,children:[(0,$.jsx)(`p`,{children:`Nobody approves in this Console. Approve from a terminal:`}),(0,$.jsx)(Ve,{label:`the approve command`,value:We})]}):null,(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsxs)(rt,{items:[{label:`All statuses`,value:Zn},...Object.keys(Yn).map(e=>({label:Yn[e],value:e}))],onValueChange:e=>t(e===null||e===Zn?{}:{status:e}),value:e.status??Zn,children:[(0,$.jsx)(Xe,{"aria-label":`Status`,className:`min-w-0 flex-1 text-xs data-[size=default]:h-11 sm:w-44 sm:flex-none sm:data-[size=default]:h-8`,children:(0,$.jsx)(et,{})}),(0,$.jsx)($e,{children:(0,$.jsxs)(tt,{children:[(0,$.jsx)(Ze,{value:Zn,children:`All statuses`}),Object.keys(Yn).map(e=>(0,$.jsx)(Ze,{value:e,children:Yn[e]},e))]})})]}),(0,$.jsx)(G,{"aria-label":`Refresh iOS devices`,className:`ml-auto size-11 sm:size-7`,disabled:r.isFetching,onClick:()=>void r.refetch(),size:`icon-sm`,variant:`ghost`,children:(0,$.jsx)(lt,{"aria-hidden":`true`})})]}),r.isError?(0,$.jsxs)(mt,{variant:`destructive`,children:[(0,$.jsx)(ht,{}),(0,$.jsx)(ft,{children:`iOS devices couldn't be loaded`}),(0,$.jsx)(pt,{children:`Check your connection and try again.`}),(0,$.jsx)(gt,{children:(0,$.jsxs)(G,{onClick:()=>void r.refetch(),size:`xs`,variant:`outline`,children:[(0,$.jsx)(lt,{"data-icon":`inline-start`}),`Retry`]})})]}):(0,$.jsx)(qt,{children:n?(0,$.jsx)(`div`,{"aria-busy":r.isPlaceholderData,"aria-label":`iOS devices`,className:`aria-busy:opacity-60`,role:`list`,children:r.isLoading?(0,$.jsx)(Qt,{label:`Loading iOS devices`}):a?.length===0?(0,$.jsx)(Yt,{children:l}):a?.map(e=>(0,$.jsx)(`div`,{className:`border-b last:border-b-0`,role:`listitem`,children:(0,$.jsx)(cr,{device:e,onOpen:s,viewer:i.viewer})},e.id))}):(0,$.jsx)(Kt,{"aria-busy":r.isPlaceholderData,"aria-label":`iOS devices`,className:`aria-busy:opacity-60`,header:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Z,{children:`Name`}),(0,$.jsx)(Z,{children:`UDID`}),(0,$.jsx)(Z,{children:`Requested by`}),(0,$.jsx)(Z,{children:`Status`}),(0,$.jsx)(Z,{children:`Added`}),(0,$.jsx)(Z,{children:`Build`}),(0,$.jsx)(Z,{className:`text-right`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]}),children:r.isLoading?(0,$.jsx)(Jt,{columns:Qn+1,label:`Loading iOS devices`}):a?.length===0?(0,$.jsx)(Xt,{columns:Qn+1,children:l}):a?.map(e=>(0,$.jsx)(sr,{device:e,onOpen:s,viewer:i.viewer},e.id))})})]}),o!==null&&o.kind!==`remove`?(0,$.jsx)(lr,{onClose:c,target:o},o.device.id):null,o?.kind===`remove`&&i!==void 0?(0,$.jsx)(ur,{device:o.device,onClose:c,viewer:i.viewer},o.device.id):null]})}function mr(){let e=Ut.useSearch(),t=Ut.useNavigate();return(0,$.jsx)(pr,{onSearchChange:e=>void t({search:e,replace:!0}),search:e})}export{mr as component};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-builds_.devices-CTzpCVsb.js","assets/sidebar-yC7KdImc.js","assets/alert-dialog-Ch0QxRsa.js","assets/select-CA8r-UUe.js","assets/useCompositeListItem-lAmUsXcc.js","assets/check-CqWNyG93.js","assets/CompositeItem-KUM5yQVr.js","assets/tabs-RdhEl9sE.js","assets/link-CN3iHC4A.js","assets/relativeTime-BYRt19mj.js","assets/TargetDisplay-KU7JhIWG.js","assets/copy-CH1__JAW.js","assets/key-round-D7UgdXyA.js","assets/package-BmfoZ5Zj.js","assets/dist-DAM__Tdz.js","assets/HashValueDisplay-D2f0HmyU.js","assets/uuidv7-DAoOOpz9.js","assets/-native-builds-search-DdHwfe4q.js","assets/loader-circle-iMqC-8ZE.js","assets/refresh-cw-BHhBYjS8.js","assets/smartphone-D1C6BRd_.js","assets/trash-2-B5KIvrXy.js","assets/badge-FZMD5vvS.js","assets/IosInstall-CHI2C4Yd.js","assets/useMutation-w3qYaU2L.js","assets/send-DuMOCzbD.js","assets/field-CdhSgWhI.js","assets/api-C1OPeiG1.js","assets/preload-helper-CRQjUQaZ.js","assets/RelativeTime-B4PK8qDw.js","assets/chevron-right-DNbYTBX1.js","assets/table-D8YjT_ht.js","assets/NativeBuildsNav-DaqxQPnG.js","assets/card-CyHYmHue.js","assets/dialog-BLj71-Nf.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e,r as t,t as n}from"./preload-helper-CRQjUQaZ.js";import{t as r}from"./-native-builds-search-DdHwfe4q.js";var i=e(`/native-builds_/devices`)({component:t(()=>n(()=>import(`./native-builds_.devices-CTzpCVsb.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,24,25,26,27,28,29,30,31,32,33,34])),`component`),validateSearch:r});export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Vr as e}from"./sidebar-yC7KdImc.js";var t=e(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Vr as e}from"./sidebar-yC7KdImc.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Di as e,Ni as t,Qr as n,Ri as r,Ti as i,Ur as a,Vi as o,ei as s,ji as c,ti as l}from"./sidebar-yC7KdImc.js";import{S as u,_ as d,g as f,i as p,n as m,p as h,r as g,t as _,v,w as y}from"./link-CN3iHC4A.js";var b=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=h:this.parentRoute||c();let r=n?h:t?.path;r&&r!==`/`&&(r=d(r));let i=t?.id||r,a=n?h:f((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:f(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=v(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>t({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},x=class extends b{constructor(e){super(e)}},S=o(r(),1),C=S.use,w=S.useLayoutEffect,T=i();function E(e,t){return e===t}function D(e,t=e=>e,n){let r=n?.compare??E,i=(0,S.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,S.useCallback)(()=>e.get(),[e]);return(0,T.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var O={};function k(e,t){let n=S.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=y(n.current,i):i}}function A(e){let t=p(),n=S.useContext(e.from?m:g),r=e.from??n,i=t.stores.getMatchStore(r),a=k(e,t),o=D(i,e=>e?a(e):O);if(o!==O)return o;(e.shouldThrow??!0)&&c()}function j(e){return A({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function M(e){let{select:t,...n}=e;return A({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function N(e){return A({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function P(e){return A({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function F(e){let t=p();return S.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function I(e){return A({...e,select:t=>e.select?e.select(t.context):t.context})}var L=e(),R=class extends b{constructor(e){super(e),this.useMatch=e=>A({...e,from:this.id}),this.useRouteContext=e=>I({...e,from:this.id}),this.useSearch=e=>P({...e,from:this.id}),this.useParams=e=>N({...e,from:this.id}),this.useLoaderDeps=e=>M({...e,from:this.id}),this.useLoaderData=e=>j({...e,from:this.id}),this.useNavigate=()=>F({from:this.fullPath}),this.Link=S.forwardRef((e,t)=>(0,L.jsx)(_,{ref:t,from:this.fullPath,...e}))}};function z(e){return new R(e)}function B(){return e=>H(e)}var V=class extends x{constructor(e){super(e),this.useMatch=e=>A({...e,from:this.id}),this.useRouteContext=e=>I({...e,from:this.id}),this.useSearch=e=>P({...e,from:this.id}),this.useParams=e=>N({...e,from:this.id}),this.useLoaderDeps=e=>M({...e,from:this.id}),this.useLoaderData=e=>j({...e,from:this.id}),this.useNavigate=()=>F({from:this.fullPath}),this.Link=S.forwardRef((e,t)=>(0,L.jsx)(_,{ref:t,from:this.fullPath,...e}))}};function H(e){return new V(e)}function U(e){return e=>{let t=z(e);return t.isRoot=!1,t}}function W(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(u(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r)if(C)C(a());else throw a();return S.createElement(r,e)};return o.preload=a,o}var G=class extends n{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:c}=r,u=n.fetchMeta?.fetchMore?.direction,d=o&&u===`forward`,f=i&&u===`forward`,p=o&&u===`backward`,m=i&&u===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:s(t,n.data),hasPreviousPage:l(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:c&&!d&&!p,isRefetching:a&&!f&&!m}}};function K(e,t){return a(e,G,t)}var q=`modulepreload`,J=function(e){return`/`+e},Y={},X=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=J(t,n),t in Y)return;Y[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:q,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};export{B as a,D as c,U as i,C as l,K as n,F as o,W as r,k as s,X as t,w as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Vr as e}from"./sidebar-yC7KdImc.js";var t=e(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{zi as e}from"./sidebar-yC7KdImc.js";var t=e(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),n=e(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_relativeTime=r()})(e,(function(){return function(e,t,n){e||={};var r=t.prototype,i={future:`in %s`,past:`%s ago`,s:`a few seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function a(e,t,n,i){return r.fromToBase(e,t,n,i)}n.en.relativeTime=i,r.fromToBase=function(t,r,a,o,s){for(var c,l,u,d=a.$locale().relativeTime||i,f=e.thresholds||[{l:`s`,r:44,d:`second`},{l:`m`,r:89},{l:`mm`,r:44,d:`minute`},{l:`h`,r:89},{l:`hh`,r:21,d:`hour`},{l:`d`,r:35},{l:`dd`,r:25,d:`day`},{l:`M`,r:45},{l:`MM`,r:10,d:`month`},{l:`y`,r:17},{l:`yy`,d:`year`}],p=f.length,m=0;m<p;m+=1){var h=f[m];h.d&&(c=o?n(t).diff(a,h.d,!0):a.diff(t,h.d,!0));var g=(e.rounding||Math.round)(Math.abs(c));if(u=c>0,g<=h.r||!h.r){g<=1&&m>0&&(h=f[m-1]);var _=d[h.l];s&&(g=s(``+g)),l=typeof _==`string`?_.replace(`%d`,g):_(g,r,h.l,u);break}}if(r)return l;var v=u?d.future:d.past;return typeof v==`function`?v(l):v.replace(`%s`,l)},r.to=function(e,t){return a(e,t,this,!0)},r.from=function(e,t){return a(e,t,this)};var o=function(e){return e.$u?n.utc():n()};r.toNow=function(e){return this.to(o(this),e)},r.fromNow=function(e){return this.from(o(this),e)}}}))}));export{t as n,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Di as e}from"./sidebar-yC7KdImc.js";import{n as t,t as n}from"./remote-config-DXv25LX1.js";var r=e();function i(){let{tab:e=`parameters`}=n.useSearch(),i=n.useNavigate();return(0,r.jsx)(t,{onTabChange:e=>void i({search:e===`parameters`?{}:{tab:e},replace:!0}),tab:e})}export{i as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./ConsoleFeatureUnavailable-Be-0iTww.js";var t=e;export{t as notFoundComponent};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/remote-config-DAOyn5xL.js","assets/ConsoleFeatureUnavailable-Be-0iTww.js","assets/sidebar-yC7KdImc.js","assets/console-features-api-BO5V64P3.js","assets/arrow-up-right-BFafIOrq.js","assets/NotFoundPage-CVBtl68B.js","assets/link-CN3iHC4A.js","assets/empty--YaE5Z4p.js","assets/remote-config-Cxkr7_BP.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$ as e,Bn as t,Br as n,Di as r,Er as i,Hr as a,Mr as o,Oi as s,Ri as c,Si as l,Sn as u,Sr as d,Vi as f,Vr as p,Z as m,di as h,ft as g,gr as _,kr as v,p as y,vr as b,wi as x,xr as S,yr as C,zr as w}from"./sidebar-yC7KdImc.js";import{i as T,n as ee,r as te,t as E}from"./preload-helper-CRQjUQaZ.js";import{t as D}from"./useMutation-w3qYaU2L.js";import{r as O}from"./console-features-api-BO5V64P3.js";import{t as k}from"./arrow-right-CXp_K3xK.js";import{i as ne}from"./useCompositeListItem-lAmUsXcc.js";import{a as re,i as A,n as ie,o as j,r as ae,s as oe,t as se}from"./select-CA8r-UUe.js";import{t as ce}from"./clipboard-DZrZK5gR.js";import{t as le}from"./git-branch-DG1VDaKq.js";import{t as ue}from"./history-C0wv4htz.js";import{t as de}from"./loader-circle-iMqC-8ZE.js";import{n as fe,t as pe}from"./CompositeItem-KUM5yQVr.js";import{t as M}from"./plus-Db0KxLZp.js";import{t as me}from"./refresh-cw-BHhBYjS8.js";import{i as he,n as ge,o as _e,r as ve,s as ye,t as be}from"./input-group-XKLcUGoa.js";import{t as xe}from"./search-dJG2BYmx.js";import{i as Se,n as N,r as Ce,t as we}from"./switch-BsV3d4km.js";import{t as Te}from"./smartphone-D1C6BRd_.js";import{t as Ee}from"./trash-2-B5KIvrXy.js";import{a as P,i as F,n as I,o as L,r as R,t as z}from"./badge-FZMD5vvS.js";import{t as De}from"./undo-2-CFcU9dIB.js";import{n as B}from"./dist-DAM__Tdz.js";import{a as Oe,n as ke,o as Ae,r as je,t as Me}from"./card-CyHYmHue.js";import{a as Ne,i as Pe,n as Fe,o as Ie,r as Le,t as Re}from"./empty--YaE5Z4p.js";import{n as ze,t as Be}from"./relativeTime-BYRt19mj.js";import{i as Ve,n as He,o as Ue,r as We,t as Ge}from"./tabs-RdhEl9sE.js";import{a as Ke,i as qe,l as Je,n as Ye,o as Xe,r as Ze,s as Qe,t as $e}from"./alert-dialog-Ch0QxRsa.js";import{t as et}from"./PlatformIcon-DVnzzGqM.js";import{a as tt,i as nt,n as rt,o as it,r as at,t as V}from"./dialog-BLj71-Nf.js";import{a as H,i as ot,n as st,o as ct,r as U,s as lt,t as W}from"./field-CdhSgWhI.js";import{i as ut}from"./api-C1OPeiG1.js";var dt=p(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),ft=p(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),pt=p(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),mt=p(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),ht=p(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),G=f(c()),K=r(),gt=f(ze(),1),_t=f(Be(),1),vt=x({method:`GET`}).middleware([w]).handler(s(`0ccfae64b399b03d820328fa98a38e2caa0b622d3da5a7ca633c5a0e8101e3f6`)),yt=x({method:`GET`}).middleware([w]).handler(s(`3377db68b9d1d971971595469029c0466da0777a177b294d655cd0c039737f1a`)),bt=x({method:`GET`}).middleware([w]).handler(s(`af71e3c55a659ce46093e33b9d70e729359610eec7d576502e8f0e26c785b317`)),xt=x({method:`POST`}).middleware([w]).handler(s(`4182bf9ccbb675700638f30bc6122517ccd90b16a339a6823a0f5f6c808d70a6`)),St=x({method:`POST`}).middleware([w]).handler(s(`98c10bdc514eb4d3fe65af546be44452b492a81092cfe45625778a4c9f731727`)),Ct=x({method:`POST`}).middleware([w]).handler(s(`1371bff16085636e2c44b60a573ae434b556c63045c40a0a93a93ab69ec47999`)),q={all:[`remote-config`],active:[`remote-config`,`active`],versions:[`remote-config`,`versions`],version:e=>[`remote-config`,`version`,e],preview:e=>[`remote-config`,`preview`,e]},wt=()=>a({queryKey:q.active,queryFn:()=>vt(),staleTime:6e4}),Tt=({enabled:e})=>ee({queryKey:q.versions,queryFn:({pageParam:e})=>yt({data:e===void 0?{}:{cursor:e}}),initialPageParam:void 0,getNextPageParam:e=>e.next,staleTime:6e4,enabled:e}),Et=e=>a({queryKey:q.version(e??0),queryFn:()=>bt({data:{version:e}}),enabled:e!==null,staleTime:1/0}),Dt=()=>{let e=l();return async()=>{await Promise.all([e.invalidateQueries({queryKey:q.active}),e.invalidateQueries({queryKey:q.versions})])}},Ot=()=>{let e=Dt();return D({mutationFn:e=>xt({data:e}),onSuccess:async t=>{(t.status===`published`||t.status===`conflict`)&&await e()}})},kt=()=>D({mutationFn:e=>St({data:e}),onSuccess:Dt()}),At=e=>a({queryKey:q.preview(e),queryFn:()=>Ct({data:e}),placeholderData:h,staleTime:1/0}),J={STRING:`String`,NUMBER:`Number`,BOOLEAN:`Boolean`,JSON:`JSON`},Y={platform:`Platform`,channel:`Channel`,appVersion:`App version`,percent:`Percentage of installs`,cohort:`Cohort`,fingerprint:`Fingerprint`,dateTime:`Date and time`},X=(e,t)=>e!==void 0&&Object.hasOwn(e,t)?e[t]:void 0,jt=(e,t)=>JSON.stringify(e)===JSON.stringify(t),Mt=(e,t,n,r)=>{let i=Object.entries(e.parameters),a=t===null?-1:i.findIndex(([e])=>e===t),o=a===-1?[...i.filter(([e])=>e!==n),[n,r]]:i.map((e,t)=>t===a?[n,r]:e);return{...e,parameters:Object.fromEntries(o)}},Nt=(e,t)=>({...e,parameters:Object.fromEntries(Object.entries(e.parameters).filter(([e])=>e!==t))}),Pt=(e,t)=>Object.fromEntries(Object.entries(e.parameters).map(([e,n])=>{let{conditionalValues:r,...i}=n,a=Object.entries(r??{}).flatMap(([e,n])=>{let r=t(e);return r===null?[]:[[r,n]]});return[e,a.length===0?i:{...i,conditionalValues:Object.fromEntries(a)}]})),Ft=(e,t,n)=>t===null?{...e,conditions:[...e.conditions,n]}:{conditions:e.conditions.map(e=>e.name===t?n:e),parameters:t===n.name?e.parameters:Pt(e,e=>e===t?n.name:e)},It=(e,t)=>({conditions:e.conditions.filter(e=>e.name!==t),parameters:Pt(e,e=>e===t?null:e)}),Lt=(e,t,n)=>{let r=t+n;if(r<0||r>=e.conditions.length)return e;let i=[...e.conditions];return[i[t],i[r]]=[i[r],i[t]],{...e,conditions:i}},Rt=(e,t)=>Object.entries(e.parameters).filter(([,e])=>X(e.conditionalValues,t)!==void 0).map(([e])=>e),zt=(e,t=3)=>e.length<=t?e.join(`, `):`${e.slice(0,t).join(`, `)} +${e.length-t}`,Bt=e=>Number.isInteger(e)?String(e):e.toFixed(1),Vt=e=>{let t=new Intl.DateTimeFormat(`en`,{timeZone:e,timeZoneName:e===`UTC`?`short`:`shortOffset`,year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`});return e=>t.format(new Date(e))},Ht=Vt(`UTC`),Ut=(e=new Date)=>{let t=new Date(e);t.setMinutes(60,0,0);let n=new Date(e);n.setDate(n.getDate()+1),n.setHours(9,0,0,0);let r=new Date(e);return r.setSeconds(0,0),[{label:`Now`,iso:r.toISOString()},{label:`Next hour`,iso:t.toISOString()},{label:`Tomorrow 09:00`,iso:n.toISOString()}]},Wt=(e,t=new Date)=>{let n=e===void 0?t:new Date(e),r=e=>{let t=new Date(n);return t.setDate(t.getDate()+e),t.setSeconds(0,0),t.toISOString()};return[{label:`+1 day`,iso:r(1)},{label:`+1 week`,iso:r(7)}]},Gt=e=>{if(e===void 0)return``;let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`},Kt=e=>{if(e.length===0)return;let t=new Date(e).getTime();return Number.isFinite(t)?new Date(t).toISOString():void 0},qt=(e,t=Ht)=>{switch(e.type){case`platform`:return`Platform is ${zt(e.platforms.map(e=>e===`ios`?`iOS`:`Android`))}`;case`channel`:return`Channel is ${zt(e.channels)}`;case`appVersion`:return`App version ${e.range}`;case`cohort`:return`Cohort is ${zt(e.cohorts)}`;case`percent`:return e.from===0?`${Bt(e.to)}% of installs`:`${Bt(e.from)}–${Bt(e.to)}% of installs`;case`fingerprint`:return`Fingerprint is ${zt(e.hashes.map(e=>e.slice(0,8)))}`;case`dateTime`:return e.from!==void 0&&e.to!==void 0?`From ${t(e.from)} until ${t(e.to)}`:e.from===void 0?`Until ${t(e.to??``)}`:`From ${t(e.from)}`}},Z=e=>`value`in e?e.value.length===0?`""`:e.value:`In-app default`,Jt=()=>{let e=crypto.getRandomValues(new Uint8Array(6));return Array.from(e,e=>e.toString(36).padStart(2,`0`)).join(``).slice(0,8)},Yt=(e,t)=>({added:Object.keys(t).filter(t=>!Object.hasOwn(e,t)),changed:Object.keys(t).filter(n=>Object.hasOwn(e,n)&&JSON.stringify(e[n])!==JSON.stringify(t[n])),removed:Object.keys(e).filter(e=>!Object.hasOwn(t,e))}),Xt=(e,t)=>{let n=e=>Object.fromEntries(e.conditions.map(e=>[e.name,e])),r=(e,t)=>e.conditions.map(({name:e})=>e).filter(e=>t.conditions.some(t=>t.name===e));return{parameters:Yt(e.parameters,t.parameters),conditions:Yt(n(e),n(t)),reordered:r(e,t).join(`
|
|
3
|
+
`)!==r(t,e).join(`
|
|
4
|
+
`)}},Q=`Not set`,Zt=(e,t)=>{let n=[],r=(e,t,r)=>{(t===null?r!==Q:t!==r)&&n.push({field:e,before:t,after:r})};r(`Type`,e===null?null:J[e.valueType],J[t.valueType]),r(`Default`,e===null?null:Z(e.defaultValue),Z(t.defaultValue));let i=new Set([...Object.keys(e?.conditionalValues??{}),...Object.keys(t.conditionalValues??{})]);for(let n of i){let i=X(e?.conditionalValues,n),a=X(t.conditionalValues,n);r(`When ${n}`,e===null?null:i===void 0?Q:Z(i),a===void 0?Q:Z(a))}return r(`Description`,e===null?null:e.description??Q,t.description??Q),n},Qt=(e,t,n=Ht)=>{let r=e=>e.rules.map(e=>qt(e,n)).join(` · `),i=r(t);if(e===null)return[{field:`Rules`,before:null,after:i}];let a=r(e);return a===i?[]:[{field:`Rules`,before:a,after:i}]},$t=`hot-updater:remote-config-draft`,$=e=>typeof e==`object`&&!!e&&!Array.isArray(e),en=e=>$(e)&&(typeof e.value==`string`||e.useInAppDefault===!0),tn=e=>$(e)&&$(e.parameters)&&Array.isArray(e.conditions)&&Object.values(e.parameters).every(e=>$(e)&&Object.hasOwn(J,String(e.valueType))&&en(e.defaultValue)&&(e.conditionalValues===void 0||$(e.conditionalValues)&&Object.values(e.conditionalValues).every(en)))&&e.conditions.every(e=>$(e)&&typeof e.name==`string`&&Array.isArray(e.rules)&&e.rules.every(e=>$(e)&&Object.hasOwn(Y,String(e.type)))),nn=e=>{try{let t=window.localStorage.getItem($t);if(t===null)return null;let n=JSON.parse(t);return!$(n)||n.baseVersion!==e.version||!tn(n.base)||!tn(n.template)||!jt(n.base,e.template)||jt(n.template,e.template)?null:{baseVersion:e.version,base:n.base,template:n.template}}catch{return null}},rn=e=>{try{return e===null?window.localStorage.removeItem($t):window.localStorage.setItem($t,JSON.stringify(e)),!0}catch{return!1}},an=/^[A-Za-z_][A-Za-z0-9_]{0,255}$/u,on=(e,t)=>e.length===0?`Enter a key.`:an.test(e)?t.includes(e)?`Another parameter uses this key.`:null:`Start with a letter or _, then use letters, digits, and _.`,sn=(e,t)=>{if(e===`NUMBER`)return t.trim().length>0&&Number.isFinite(Number(t))?null:`Enter a number.`;if(e===`JSON`)try{return JSON.parse(t),null}catch{return`Enter valid JSON.`}return e===`BOOLEAN`&&t!==`true`&&t!==`false`?`Choose true or false.`:null},cn=(e,t,n)=>{let r=e.map(e=>qt(e,n)).join(` · `),i=r.length<=100?r:`${r.slice(0,99).trimEnd()}…`;if(i.length===0||!t.includes(i))return i;for(let e=2;;e+=1){let n=` (${e})`,r=`${i.slice(0,100-n.length)}${n}`;if(!t.includes(r))return r}},ln=(e,t)=>{let n=e.trim();return n.length===0?`Enter a name.`:n.length>100?`Use 100 characters or fewer.`:t.includes(n)?`Another condition uses this name.`:null},un=e=>[...new Set(e.split(/[\n,]/u).map(e=>e.trim()).filter(e=>e.length>0))],dn=e=>{switch(e.type){case`platform`:return e.platforms.length===0?`Choose a platform.`:null;case`channel`:return e.channels.length===0?`Enter a channel.`:null;case`appVersion`:return e.range.trim().length===0?`Enter a version range, such as >=1.4.0.`:null;case`cohort`:return e.cohorts.length===0?`Enter a cohort.`:null;case`percent`:return e.from>=e.to||e.from<0||e.to>100||Math.abs(e.to*10-Math.round(e.to*10))>1e-9||Math.abs(e.from*10-Math.round(e.from*10))>1e-9?`Use a range from 0 to 100 in steps of 0.1.`:null;case`fingerprint`:return e.hashes.length===0?`Enter a fingerprint.`:null;case`dateTime`:return e.from===void 0&&e.to===void 0?`Choose a start, an end, or both.`:e.from!==void 0&&e.to!==void 0&&e.from>=e.to?`End after the start.`:null}},fn=e=>{switch(e){case`platform`:return{type:e,platforms:[`ios`]};case`channel`:return{type:e,channels:[]};case`appVersion`:return{type:e,range:``};case`cohort`:return{type:e,cohorts:[]};case`percent`:return{type:e,seed:Jt(),from:0,to:10};case`fingerprint`:return{type:e,hashes:[]};case`dateTime`:return{type:e,from:Ut()[1].iso}}},pn=G.createContext(void 0);function mn(e=!0){let t=G.useContext(pn);if(t===void 0&&!e)throw Error(v(7));return t}var hn=G.forwardRef(function(e,n){let{className:r,defaultPressed:a=!1,disabled:o=!1,form:s,onPressedChange:c,pressed:l,render:d,type:f,value:p,nativeButton:m=!0,style:h,..._}=e,v=g(p||void 0),y=mn(),b=y?.value??[],x=y?void 0:a,C=(o||y?.disabled)??!1,[w,T]=ne({controlled:y?v!==void 0&&b.indexOf(v)>-1:l,default:x,name:`Toggle`,state:`pressed`}),{getButtonProps:ee,buttonRef:te}=i({disabled:C,native:m}),E={disabled:C,pressed:w},D=[te,n],O=[{"aria-pressed":w,onClick(e){let n=!w,r=u(t,e.nativeEvent);v&&y?.setGroupValue?.(v,n,r),c?.(n,r),!r.isCanceled&&T(n)}},_,ee],k=S(`button`,e,{enabled:!y,state:E,ref:D,props:O});return y?(0,K.jsx)(pe,{tag:`button`,render:d,className:r,style:h,state:E,refs:D,props:O}):k}),gn=function(e){return e.disabled=`data-disabled`,e.orientation=`data-orientation`,e.multiple=`data-multiple`,e}({}),_n={multiple(e){return e?{[gn.multiple]:``}:null}},vn=G.forwardRef(function(e,t){let{defaultValue:n,disabled:r=!1,loopFocus:i=!0,onValueChange:a,orientation:s=`horizontal`,multiple:c=!1,value:l,className:u,render:f,style:p,...m}=e,h=oe(!0),g=G.useMemo(()=>l!==void 0||n!==void 0,[l,n]),_=(h?.disabled??!1)||r,[v,y]=ne({controlled:l,default:l===void 0?n??d:void 0,name:`ToggleGroup`,state:`value`}),b=o((e,t,n)=>{let r;c?(r=v.slice(),t?r.push(e):r.splice(v.indexOf(e),1)):r=t?[e]:[],a?.(r,n),!n.isCanceled&&y(r)}),x={disabled:_,multiple:c,orientation:s},C=G.useMemo(()=>({disabled:_,orientation:s,setGroupValue:b,value:v,isValueInitialized:g}),[_,s,b,v,g]),w={role:`group`},T=S(`div`,e,{enabled:!!h,state:x,ref:t,props:[w,m],stateAttributesMapping:_n});return(0,K.jsx)(pn.Provider,{value:C,children:h?T:(0,K.jsx)(Ue,{render:f,className:u,style:p,state:x,refs:[t],props:[w,m],stateAttributesMapping:_n,loopFocus:i,enableHomeAndEndKeys:!0,orientation:s})})}),yn=C(`group/toggle inline-flex items-center justify-center gap-1 rounded-md text-xs font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent hover:bg-muted`},size:{default:`h-7 min-w-7 px-2 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5`,sm:`h-6 min-w-6 rounded-[min(var(--radius-md),8px)] px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,lg:`h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`}},defaultVariants:{variant:`default`,size:`default`}}),bn=G.createContext({size:`default`,variant:`default`,spacing:2,orientation:`horizontal`});function xn({className:e,variant:t,size:n,spacing:r=2,orientation:i=`horizontal`,children:a,...o}){return(0,K.jsx)(vn,{"data-slot":`toggle-group`,"data-variant":t,"data-size":n,"data-spacing":r,"data-orientation":i,style:{"--gap":r},className:b(`group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[size=sm]:rounded-[min(var(--radius-md),8px)] data-vertical:flex-col data-vertical:items-stretch`,e),...o,children:(0,K.jsx)(bn.Provider,{value:{variant:t,size:n,spacing:r,orientation:i},children:a})})}function Sn({className:e,children:t,variant:n=`default`,size:r=`default`,...i}){let a=G.useContext(bn);return(0,K.jsx)(hn,{"data-slot":`toggle-group-item`,"data-variant":a.variant||n,"data-size":a.size||r,"data-spacing":a.spacing,className:b(`shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t`,yn({variant:a.variant||n,size:a.size||r}),e),...i,children:t})}function Cn(){let[e,t]=(0,G.useState)(`UTC`);return(0,G.useEffect)(()=>{t(Intl.DateTimeFormat().resolvedOptions().timeZone)},[]),{timeZone:e,dateTimeText:(0,G.useMemo)(()=>Vt(e),[e])}}var wn=Object.keys(Y);function Tn({id:e,values:t,onChange:n,placeholder:r,multiline:i=!1}){let[a,o]=(0,G.useState)(t.join(`, `)),[s,c]=(0,G.useState)(t);s!==t&&(c(t),un(a).join(`
|
|
5
|
+
`)!==t.join(`
|
|
6
|
+
`)&&o(t.join(`, `)));let l=e=>{o(e),n(un(e))};return i?(0,K.jsx)(_e,{className:`min-h-20 font-mono text-xs`,id:e,onChange:e=>l(e.target.value),placeholder:r,spellCheck:!1,value:a}):(0,K.jsx)(m,{autoComplete:`off`,className:`min-h-11 sm:min-h-9`,id:e,onChange:e=>l(e.target.value),placeholder:r,value:a})}function En({id:e,label:t,value:r,presets:i,onChange:a}){return(0,K.jsxs)(W,{children:[(0,K.jsx)(H,{htmlFor:e,children:t}),(0,K.jsxs)(be,{className:`h-11 sm:h-9`,children:[(0,K.jsx)(he,{className:`h-11 tabular-nums sm:h-9`,id:e,onChange:e=>a(Kt(e.target.value)),type:`datetime-local`,value:Gt(r)}),r===void 0?null:(0,K.jsx)(ge,{align:`inline-end`,children:(0,K.jsx)(ve,{"aria-label":`Clear ${t.toLowerCase()}`,className:`size-11 sm:size-5`,onClick:()=>a(void 0),size:`icon-xs`,children:(0,K.jsx)(n,{})})})]}),(0,K.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:i.map(e=>(0,K.jsx)(_,{"aria-pressed":e.iso===r,className:`min-h-11 sm:min-h-6`,onClick:()=>a(e.iso),size:`xs`,type:`button`,variant:e.iso===r?`secondary`:`outline`,children:e.label},e.label))})]})}function Dn({rule:e,onChange:t}){let n=(0,G.useId)(),r=ut();switch(e.type){case`platform`:return(0,K.jsx)(xn,{"aria-label":`Platforms`,multiple:!0,onValueChange:n=>t({...e,platforms:n.filter(e=>e===`ios`||e===`android`)}),value:[...e.platforms],variant:`outline`,children:[`ios`,`android`].map(e=>(0,K.jsxs)(Sn,{className:`min-h-11 px-3 sm:min-h-8`,value:e,children:[(0,K.jsx)(et,{className:`size-3.5`,platform:e}),e===`ios`?`iOS`:`Android`]},e))});case`channel`:{let i=(r.data??[]).map(({name:e})=>e).filter(t=>!e.channels.includes(t));return(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,K.jsx)(Tn,{id:`${n}-channels`,onChange:n=>t({...e,channels:n}),placeholder:`production, beta`,values:e.channels}),i.length>0?(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Add:`}),i.slice(0,8).map(n=>(0,K.jsxs)(_,{className:`min-h-11 sm:min-h-6`,onClick:()=>t({...e,channels:[...e.channels,n]}),size:`xs`,type:`button`,variant:`outline`,children:[(0,K.jsx)(M,{"data-icon":`inline-start`}),n]},n))]}):null]})}case`appVersion`:return(0,K.jsx)(m,{"aria-label":`App version range`,autoComplete:`off`,className:`min-h-11 font-mono sm:min-h-9`,onChange:n=>t({...e,range:n.target.value}),placeholder:`>=1.4.0`,value:e.range});case`cohort`:return(0,K.jsx)(Tn,{id:`${n}-cohorts`,onChange:n=>t({...e,cohorts:n}),placeholder:`1, 2, beta-testers`,values:e.cohorts});case`percent`:return(0,K.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-[repeat(2,minmax(0,8rem))_minmax(0,1fr)]`,children:[(0,K.jsxs)(W,{children:[(0,K.jsx)(H,{htmlFor:`${n}-from`,children:`From %`}),(0,K.jsx)(m,{className:`min-h-11 tabular-nums sm:min-h-9`,id:`${n}-from`,inputMode:`decimal`,max:100,min:0,onChange:n=>t({...e,from:Number(n.target.value)}),step:.1,type:`number`,value:e.from})]}),(0,K.jsxs)(W,{children:[(0,K.jsx)(H,{htmlFor:`${n}-to`,children:`To %`}),(0,K.jsx)(m,{className:`min-h-11 tabular-nums sm:min-h-9`,id:`${n}-to`,inputMode:`decimal`,max:100,min:0,onChange:n=>t({...e,to:Number(n.target.value)}),step:.1,type:`number`,value:e.to})]}),(0,K.jsxs)(W,{children:[(0,K.jsx)(H,{htmlFor:`${n}-seed`,children:`Seed`}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsx)(m,{autoComplete:`off`,className:`min-h-11 font-mono sm:min-h-9`,id:`${n}-seed`,onChange:n=>t({...e,seed:n.target.value}),value:e.seed}),(0,K.jsx)(_,{"aria-label":`New seed`,className:`size-11 sm:size-9`,onClick:()=>t({...e,seed:Jt()}),size:`icon`,type:`button`,variant:`outline`,children:(0,K.jsx)(me,{})})]})]})]});case`fingerprint`:return(0,K.jsx)(Tn,{id:`${n}-hashes`,multiline:!0,onChange:n=>t({...e,hashes:n}),placeholder:`One fingerprint hash per line`,values:e.hashes});case`dateTime`:{let r=(n,r)=>{let{[n]:i,...a}=e;t(r===void 0?a:{...a,[n]:r})};return(0,K.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,K.jsx)(En,{id:`${n}-from`,label:`From`,onChange:e=>r(`from`,e),presets:Ut(),value:e.from}),(0,K.jsx)(En,{id:`${n}-until`,label:`Until`,onChange:e=>r(`to`,e),presets:Wt(e.from),value:e.to})]})}}}var On={platform:`Devices on any of these platforms.`,channel:`Devices on any of these channels, separated by commas.`,appVersion:`A semver range of native app versions, as release targets use: 2.x, >=1.4.0 <2.0.0.`,percent:`Installs whose numeric cohort lands in this share. Rules with one seed split the same order, so 0–10 and 10–20 never overlap.`,cohort:`Numeric cohorts from 1 to 1000, or custom cohort names.`,fingerprint:`Native builds with any of these fingerprints.`,dateTime:`Leave either end empty to keep it open. Devices get the change at their next fetch.`};function kn({open:e,onOpenChange:t,condition:n,takenNames:r,onSave:i}){let a=Ce(e);return(0,K.jsx)(V,{onOpenChange:t,open:e,children:(0,K.jsx)(rt,{className:`max-h-[calc(100svh-2rem)] overflow-y-auto sm:max-w-xl`,children:(0,K.jsx)(An,{condition:n,onCancel:()=>t(!1),onSave:e=>{i(e),t(!1)},takenNames:r},a)})})}function An({condition:e,takenNames:t,onSave:n,onCancel:r}){let i=(0,G.useId)(),{dateTimeText:a,timeZone:o}=Cn(),[s,c]=(0,G.useState)(()=>e===null||e.name===cn(e.rules,t,a)?``:e.name),[l,u]=(0,G.useState)(e===null?[fn(`platform`)]:[...e.rules]),[d,f]=(0,G.useState)(!1),p=cn(l,t,a),h=s.trim().length===0?p:s,g=ln(h,t),v=l.map(dn),y=wn.filter(e=>!l.some(t=>t.type===e)),b=g!==null||l.length===0||v.some(e=>e!==null);return(0,K.jsxs)(`form`,{className:`flex flex-col gap-4`,noValidate:!0,onSubmit:e=>{e.preventDefault(),e.stopPropagation(),f(!0),!b&&n({name:h.trim(),rules:l.map(e=>e.type===`appVersion`?{...e,range:e.range.trim()}:e)})},children:[(0,K.jsxs)(tt,{children:[(0,K.jsx)(it,{children:e===null?`Add condition`:`Edit condition`}),(0,K.jsx)(at,{children:`A device matches when it matches every rule.`})]}),(0,K.jsxs)(ot,{children:[(0,K.jsxs)(W,{"data-invalid":d&&g!==null||void 0,children:[(0,K.jsx)(H,{htmlFor:`${i}-name`,children:`Name`}),(0,K.jsx)(m,{autoComplete:`off`,className:`min-h-11 sm:min-h-9`,id:`${i}-name`,maxLength:101,onChange:e=>c(e.target.value),placeholder:p||`Beta testers on iOS`,value:s}),(0,K.jsx)(st,{children:`Optional: without one, it is named after its rules.`}),(0,K.jsx)(U,{children:d?g:null})]}),(0,K.jsxs)(lt,{children:[(0,K.jsx)(ct,{variant:`label`,children:`Rules`}),l.length===0?(0,K.jsx)(U,{children:d?`Add at least one rule.`:null}):null,(0,K.jsx)(`ol`,{className:`flex flex-col gap-3`,children:l.map((e,t)=>(0,K.jsx)(`li`,{className:`rounded-lg border p-3`,children:(0,K.jsxs)(W,{"data-invalid":d&&v[t]!==null||void 0,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium`,children:Y[e.type]}),(0,K.jsx)(_,{"aria-label":`Remove the ${Y[e.type].toLowerCase()} rule`,className:`size-11 sm:size-7`,onClick:()=>u(l.filter((e,n)=>n!==t)),size:`icon-sm`,type:`button`,variant:`ghost`,children:(0,K.jsx)(Ee,{})})]}),(0,K.jsx)(Dn,{onChange:e=>u(l.map((n,r)=>r===t?e:n)),rule:e}),(0,K.jsx)(st,{children:e.type===`dateTime`?`In your time zone, ${o}. ${On.dateTime}`:On[e.type]}),(0,K.jsx)(U,{children:d?v[t]:null})]})},e.type))}),y.length>0?(0,K.jsxs)(se,{items:Object.fromEntries(y.map(e=>[e,Y[e]])),onValueChange:e=>{e!==null&&u([...l,fn(e)])},value:null,children:[(0,K.jsxs)(re,{"aria-label":`Add a rule`,className:`min-h-11 w-full sm:min-h-9 sm:w-56`,children:[(0,K.jsx)(M,{"aria-hidden":`true`,className:`size-3.5`}),(0,K.jsx)(j,{placeholder:`Add a rule`})]}),(0,K.jsx)(ie,{alignItemWithTrigger:!1,children:(0,K.jsx)(ae,{children:y.map(e=>(0,K.jsx)(A,{value:e,children:Y[e]},e))})})]}):null]})]}),(0,K.jsxs)(nt,{children:[(0,K.jsx)(_,{onClick:r,type:`button`,variant:`outline`,children:`Cancel`}),(0,K.jsx)(_,{type:`submit`,children:e===null?`Add condition`:`Save condition`})]})]})}function jn({condition:e,dateTimeText:t}){let n=e.rules.map(e=>qt(e,t)).join(` · `);return n===e.name?null:(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n})}function Mn({template:e,onSaveCondition:t,onRemoveCondition:n,onMoveCondition:r}){let[i,a]=(0,G.useState)(null),[o,s]=(0,G.useState)(null),c=N(i),l=N(o),{dateTimeText:u}=Cn(),{conditions:d}=e,f=c?.condition?.name??null,p=t=>{let r=Rt(e,t);r.length===0?n(t):s({name:t,users:r})};return(0,K.jsxs)(Me,{className:`overflow-hidden shadow-sm`,children:[(0,K.jsxs)(Oe,{className:`flex-row flex-wrap items-center justify-between gap-3 space-y-0 border-b px-4 py-3 sm:px-6`,children:[(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(Ae,{className:`text-sm`,children:(0,K.jsx)(`h2`,{children:`Conditions`})}),(0,K.jsx)(je,{className:`text-xs`,children:`Listed by priority: when several match a device, the first wins.`})]}),(0,K.jsxs)(_,{className:`min-h-11 sm:min-h-7`,onClick:()=>a({condition:null}),children:[(0,K.jsx)(M,{"data-icon":`inline-start`}),`Add condition`]})]}),(0,K.jsx)(ke,{className:`p-0`,children:d.length===0?(0,K.jsxs)(Re,{className:`py-10`,children:[(0,K.jsxs)(Pe,{children:[(0,K.jsx)(Ne,{variant:`icon`,children:(0,K.jsx)(le,{})}),(0,K.jsx)(Ie,{children:`No conditions`}),(0,K.jsx)(Le,{children:`Add a condition to give some devices other values: a platform, channel, app version range, cohort, or a share of installs.`})]}),(0,K.jsx)(Fe,{children:(0,K.jsxs)(_,{className:`min-h-11 sm:min-h-7`,onClick:()=>a({condition:null}),children:[(0,K.jsx)(M,{"data-icon":`inline-start`}),`Add condition`]})})]}):(0,K.jsx)(`ol`,{"aria-label":`Conditions`,className:`divide-y`,children:d.map((t,n)=>{let i=Rt(e,t.name);return(0,K.jsxs)(`li`,{className:`grid gap-3 px-4 py-3 sm:px-6 md:grid-cols-[auto_minmax(0,1fr)_auto] md:items-center`,children:[(0,K.jsx)(`span`,{"aria-label":`Priority ${n+1}`,className:`flex size-6 items-center justify-center rounded-md bg-muted text-xs font-medium tabular-nums`,children:n+1}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`p`,{className:`truncate text-sm font-medium`,children:t.name}),(0,K.jsx)(jn,{condition:t,dateTimeText:u}),(0,K.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:i.length===0?`No parameter uses it yet`:`Sets ${i.length===1?`1 parameter`:`${i.length} parameters`}: ${i.slice(0,3).join(`, `)}${i.length>3?`…`:``}`})]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-1 md:justify-end`,children:[(0,K.jsx)(_,{"aria-label":`Move ${t.name} up`,className:`size-11 md:size-7`,disabled:n===0,onClick:()=>r(n,-1),size:`icon`,variant:`ghost`,children:(0,K.jsx)(ft,{})}),(0,K.jsx)(_,{"aria-label":`Move ${t.name} down`,className:`size-11 md:size-7`,disabled:n===d.length-1,onClick:()=>r(n,1),size:`icon`,variant:`ghost`,children:(0,K.jsx)(dt,{})}),(0,K.jsxs)(_,{"aria-label":`Edit ${t.name}`,className:`min-h-11 md:min-h-7`,onClick:()=>a({condition:t}),size:`sm`,variant:`outline`,children:[(0,K.jsx)(fe,{"data-icon":`inline-start`}),`Edit`]}),(0,K.jsx)(_,{"aria-label":`Delete ${t.name}`,className:`size-11 md:size-7`,onClick:()=>p(t.name),size:`icon`,variant:`ghost`,children:(0,K.jsx)(Ee,{})})]})]},t.name)})})}),(0,K.jsx)(kn,{condition:c?.condition??null,onOpenChange:e=>{e||a(null)},onSave:e=>t(f,e),open:i!==null,takenNames:d.map(({name:e})=>e).filter(e=>e!==f)}),(0,K.jsx)($e,{onOpenChange:e=>{e||s(null)},open:o!==null,children:(0,K.jsxs)(qe,{children:[(0,K.jsxs)(Qe,{children:[(0,K.jsxs)(Je,{children:[`Delete `,l?.name,`?`]}),(0,K.jsxs)(Ke,{children:[l?.users.length===1?`1 parameter has a value for it`:`${l?.users.length} parameters have a value for it`,` `,`(`,l?.users.join(`, `),`). Those values are removed too, so matching devices get the default value after you publish.`]})]}),(0,K.jsxs)(Xe,{children:[(0,K.jsx)(Ze,{children:`Cancel`}),(0,K.jsx)(Ye,{onClick:e=>{e.preventDefault(),o!==null&&n(o.name),s(null)},variant:`destructive`,children:`Delete condition`})]})]})})]})}var Nn=e=>e===`BOOLEAN`?`false`:e===`NUMBER`?`0`:e===`JSON`?`{}`:``,Pn=(e,t)=>`value`in t?sn(e,t.value):null;function Fn({id:e,label:t,valueType:n,value:r,onChange:i,showErrors:a}){let o=!(`value`in r),s=`value`in r?r.value:``,c=a?Pn(n,r):null,l=e=>i({value:e});return(0,K.jsxs)(W,{"data-invalid":c!==null||void 0,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,K.jsx)(H,{htmlFor:e,id:`${e}-label`,children:t}),(0,K.jsxs)(`div`,{className:`flex min-h-11 items-center gap-2 text-xs text-muted-foreground sm:min-h-0`,children:[(0,K.jsx)(we,{checked:o,id:`${e}-in-app-default`,onCheckedChange:e=>i(e?{useInAppDefault:!0}:{value:Nn(n)})}),(0,K.jsx)(`label`,{htmlFor:`${e}-in-app-default`,children:`Use in-app default`})]})]}),o?(0,K.jsxs)(`p`,{className:`rounded-md border border-dashed px-3 py-2 text-xs text-muted-foreground`,id:e,children:[`Devices keep the default set in the app's`,` `,(0,K.jsxs)(`code`,{className:`font-mono`,children:[`remoteConfig(`,`{ defaults }`,`)`]}),`.`]}):n===`BOOLEAN`?(0,K.jsxs)(xn,{"aria-labelledby":`${e}-label`,id:e,onValueChange:e=>{let[t]=e;(t===`true`||t===`false`)&&l(t)},value:[s],variant:`outline`,children:[(0,K.jsx)(Sn,{className:`min-h-11 px-4 sm:min-h-8`,value:`true`,children:`true`}),(0,K.jsx)(Sn,{className:`min-h-11 px-4 sm:min-h-8`,value:`false`,children:`false`})]}):n===`NUMBER`?(0,K.jsx)(m,{"aria-invalid":c!==null||void 0,autoComplete:`off`,className:`min-h-11 font-mono sm:min-h-9`,id:e,inputMode:`decimal`,onChange:e=>l(e.target.value),value:s}):n===`JSON`?(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,K.jsx)(_e,{"aria-invalid":c!==null||void 0,className:`min-h-24 font-mono text-xs`,id:e,onChange:e=>l(e.target.value),spellCheck:!1,value:s}),(0,K.jsxs)(_,{className:`self-start`,disabled:sn(`JSON`,s)!==null,onClick:()=>l(JSON.stringify(JSON.parse(s),null,2)),size:`sm`,type:`button`,variant:`outline`,children:[(0,K.jsx)(pt,{"data-icon":`inline-start`}),`Format JSON`]})]}):(0,K.jsx)(_e,{"aria-invalid":c!==null||void 0,className:`min-h-11 text-sm sm:min-h-9`,id:e,onChange:e=>l(e.target.value),rows:2,value:s}),(0,K.jsx)(U,{children:c})]})}var In=Object.keys(J),Ln={STRING:`getString`,NUMBER:`getNumber`,BOOLEAN:`getBoolean`,JSON:`getString`},Rn=(e,t)=>`value`in e&&Pn(t,e)!==null?{value:Nn(t)}:e;function zn({open:e,onOpenChange:t,parameterKey:n,parameter:r,takenKeys:i,conditions:a,onSave:o,onAddCondition:s}){let c=Ce(e);return(0,K.jsx)(V,{onOpenChange:t,open:e,children:(0,K.jsx)(rt,{className:`max-h-[calc(100svh-2rem)] overflow-y-auto data-nested-dialog-open:after:absolute data-nested-dialog-open:after:inset-0 data-nested-dialog-open:after:rounded-xl data-nested-dialog-open:after:bg-background/70 sm:max-w-2xl`,children:(0,K.jsx)(Bn,{conditions:a,onAddCondition:s,onCancel:()=>t(!1),onSave:(e,n)=>{o(e,n),t(!1)},parameter:r,parameterKey:n,takenKeys:i},c)})})}function Bn({parameterKey:e,parameter:t,takenKeys:r,conditions:i,onSave:a,onCancel:o,onAddCondition:s}){let c=(0,G.useId)(),{dateTimeText:l}=Cn(),[u,d]=(0,G.useState)(e??``),[f,p]=(0,G.useState)(t?.valueType??`STRING`),[h,g]=(0,G.useState)(t?.description??``),v=h.trim().length>256,[y,b]=(0,G.useState)(t?.defaultValue??{value:``}),[x,S]=(0,G.useState)(t?.conditionalValues??{}),[C,w]=(0,G.useState)({}),[T,ee]=(0,G.useState)(!1),[te,E]=(0,G.useState)(!1),D=on(u.trim(),r),O=i.filter(({name:e})=>X(x,e)!==void 0),k=i.filter(({name:e})=>X(x,e)===void 0),ne=D!==null||v||[y,...Object.values(x)].some(e=>Pn(f,e)!==null),oe=e=>{p(e),b(Rn(y,e)),S(Object.fromEntries(Object.entries(x).map(([t,n])=>[t,Rn(n,e)])))},ce=e=>{let t=X(C,e);S({...x,[e]:t===void 0?{value:Nn(f)}:Rn(t,f)})},le=e=>{let{[e]:t,...n}=x;t!==void 0&&w({...C,[e]:t}),S(n)};return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`form`,{className:`flex flex-col gap-4`,noValidate:!0,onSubmit:e=>{if(e.preventDefault(),ee(!0),ne)return;let t=Object.fromEntries(O.map(({name:e})=>[e,X(x,e)]));a(u.trim(),{valueType:f,defaultValue:y,...Object.keys(t).length===0?{}:{conditionalValues:t},...h.trim().length===0?{}:{description:h.trim()}})},children:[(0,K.jsxs)(tt,{children:[(0,K.jsx)(it,{children:e===null?`Add parameter`:`Edit parameter`}),(0,K.jsxs)(at,{children:[`The app reads it with`,` `,(0,K.jsxs)(`code`,{className:`font-mono`,children:[`hotUpdater.remoteConfig.`,Ln[f],`("`,u.trim()||`key`,`")`]}),`, which is null when neither the server nor the app's defaults have a value.`]})]}),(0,K.jsxs)(ot,{children:[(0,K.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-[minmax(0,1fr)_11rem]`,children:[(0,K.jsxs)(W,{"data-invalid":T&&D!==null||void 0,children:[(0,K.jsx)(H,{htmlFor:`${c}-key`,children:`Key`}),(0,K.jsx)(m,{autoComplete:`off`,className:`min-h-11 font-mono sm:min-h-9`,id:`${c}-key`,maxLength:257,onChange:e=>d(e.target.value),placeholder:`welcome_message`,spellCheck:!1,value:u}),(0,K.jsx)(U,{children:T?D:null})]}),(0,K.jsxs)(W,{children:[(0,K.jsx)(H,{htmlFor:`${c}-type`,children:`Type`}),(0,K.jsxs)(se,{items:J,onValueChange:e=>{e!==null&&oe(e)},value:f,children:[(0,K.jsx)(re,{className:`min-h-11 w-full sm:min-h-9`,id:`${c}-type`,children:(0,K.jsx)(j,{})}),(0,K.jsx)(ie,{children:(0,K.jsx)(ae,{children:In.map(e=>(0,K.jsx)(A,{value:e,children:J[e]},e))})})]})]})]}),(0,K.jsxs)(W,{"data-invalid":v||void 0,children:[(0,K.jsx)(H,{htmlFor:`${c}-description`,children:`Description`}),(0,K.jsx)(m,{autoComplete:`off`,className:`min-h-11 sm:min-h-9`,id:`${c}-description`,onChange:e=>g(e.target.value),placeholder:`Optional: what the app does with it`,value:h}),(0,K.jsx)(U,{children:v?`Use 256 characters or fewer.`:null})]}),(0,K.jsx)(Fn,{id:`${c}-default`,label:`Default value`,onChange:b,showErrors:T,value:y,valueType:f}),(0,K.jsxs)(lt,{children:[(0,K.jsx)(ct,{variant:`label`,children:`Conditional values`}),(0,K.jsx)(st,{children:`Devices that match a condition get its value. When several match, the first in the Conditions list wins. Removing a value keeps the condition, and its devices get the default value.`}),O.length>0?(0,K.jsx)(`ul`,{className:`flex flex-col gap-3`,children:O.map(e=>(0,K.jsxs)(`li`,{className:`rounded-lg border p-3`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-start justify-between gap-2`,children:[(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`p`,{className:`truncate text-sm font-medium`,children:e.name}),(0,K.jsx)(jn,{condition:e,dateTimeText:l})]}),(0,K.jsxs)(_,{"aria-label":`Remove the value for ${e.name}`,className:`min-h-11 shrink-0 text-muted-foreground sm:min-h-7`,onClick:()=>le(e.name),size:`sm`,type:`button`,variant:`ghost`,children:[(0,K.jsx)(n,{"data-icon":`inline-start`}),`Remove value`]})]}),(0,K.jsx)(Fn,{id:`${c}-${e.name}`,label:(0,K.jsxs)(K.Fragment,{children:[`Value`,(0,K.jsxs)(`span`,{className:`sr-only`,children:[` for `,e.name]})]}),onChange:t=>S({...x,[e.name]:t}),showErrors:T,value:X(x,e.name),valueType:f})]},e.name))}):null,(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[k.length>0?(0,K.jsxs)(se,{items:Object.fromEntries(k.map(({name:e})=>[e,e])),onValueChange:e=>{e!==null&&ce(e)},value:null,children:[(0,K.jsxs)(re,{"aria-label":`Add a value for a condition`,className:`min-h-11 w-full sm:min-h-9 sm:w-64`,children:[(0,K.jsx)(M,{"aria-hidden":`true`,className:`size-3.5`}),(0,K.jsx)(j,{placeholder:`Add a value for a condition`})]}),(0,K.jsx)(ie,{alignItemWithTrigger:!1,children:(0,K.jsx)(ae,{children:k.map(({name:e})=>(0,K.jsx)(A,{value:e,children:e},e))})})]}):null,(0,K.jsxs)(_,{className:`min-h-11 sm:min-h-9`,onClick:()=>E(!0),type:`button`,variant:`outline`,children:[(0,K.jsx)(M,{"data-icon":`inline-start`}),`New condition`]})]})]})]}),(0,K.jsxs)(nt,{children:[(0,K.jsx)(_,{onClick:o,type:`button`,variant:`outline`,children:`Cancel`}),(0,K.jsx)(_,{type:`submit`,children:e===null?`Add parameter`:`Save parameter`})]})]}),(0,K.jsx)(kn,{condition:null,onOpenChange:E,onSave:e=>{s(e),ce(e.name)},open:te,takenNames:i.map(({name:e})=>e)})]})}function Vn({text:e}){return(0,K.jsx)(`span`,{className:`line-clamp-2 block min-w-0 break-words font-mono text-xs text-foreground`,title:e,children:e})}function Hn({parameterKey:e,parameter:t,conditions:n,onEdit:r,onRemove:i}){let a=n.filter(({name:e})=>X(t.conditionalValues,e)!==void 0);return(0,K.jsxs)(`li`,{className:`grid gap-3 px-4 py-3 sm:px-6 md:grid-cols-[minmax(0,15rem)_minmax(0,1fr)_auto] md:items-start`,children:[(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`truncate font-mono text-sm font-medium`,children:e}),(0,K.jsx)(z,{className:`shrink-0`,variant:`outline`,children:J[t.valueType]})]}),t.description===void 0?null:(0,K.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:t.description})]}),(0,K.jsxs)(`dl`,{className:`grid min-w-0 grid-cols-[minmax(0,9rem)_minmax(0,1fr)] gap-x-3 gap-y-1.5 text-xs`,children:[a.map(({name:e})=>(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`line-clamp-2 break-words text-muted-foreground`,title:e,children:e}),(0,K.jsx)(`dd`,{className:`min-w-0`,children:(0,K.jsx)(Vn,{text:Z(X(t.conditionalValues,e))})})]},e)),(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Default`}),(0,K.jsx)(`dd`,{className:`min-w-0`,children:`value`in t.defaultValue?(0,K.jsx)(Vn,{text:Z(t.defaultValue)}):(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`In-app default`})})]}),(0,K.jsxs)(`div`,{className:`flex gap-1 md:justify-end`,children:[(0,K.jsxs)(_,{"aria-label":`Edit ${e}`,className:`min-h-11 md:min-h-7`,onClick:r,size:`sm`,variant:`outline`,children:[(0,K.jsx)(fe,{"data-icon":`inline-start`}),`Edit`]}),(0,K.jsx)(_,{"aria-label":`Delete ${e}`,className:`size-11 md:size-7`,onClick:i,size:`icon`,variant:`ghost`,children:(0,K.jsx)(Ee,{})})]})]})}function Un({template:e,onSaveParameter:t,onRemoveParameter:n,onAddCondition:r}){let[i,a]=(0,G.useState)(null),o=N(i),[s,c]=(0,G.useState)(``),l=Object.keys(e.parameters),u=l.filter(e=>e.toLowerCase().includes(s.trim().toLowerCase())),d=o?.key??null;return(0,K.jsxs)(Me,{className:`overflow-hidden shadow-sm`,children:[(0,K.jsxs)(Oe,{className:`flex-row flex-wrap items-center justify-between gap-3 space-y-0 border-b px-4 py-3 sm:px-6`,children:[(0,K.jsx)(Ae,{className:`text-sm`,children:(0,K.jsx)(`h2`,{children:`Parameters`})}),(0,K.jsxs)(`div`,{className:`flex w-full flex-wrap gap-2 sm:w-auto`,children:[l.length>5?(0,K.jsxs)(be,{className:`min-h-11 w-full sm:min-h-8 sm:w-56`,children:[(0,K.jsx)(ge,{children:(0,K.jsx)(xe,{"aria-hidden":`true`})}),(0,K.jsx)(he,{"aria-label":`Filter parameters by key`,className:`text-base sm:text-xs`,onChange:e=>c(e.target.value),placeholder:`Filter by key`,value:s})]}):null,(0,K.jsxs)(_,{className:`min-h-11 sm:min-h-7`,onClick:()=>a({key:null,parameter:null}),children:[(0,K.jsx)(M,{"data-icon":`inline-start`}),`Add parameter`]})]})]}),(0,K.jsx)(ke,{className:`p-0`,children:l.length===0?(0,K.jsxs)(Re,{className:`py-10`,children:[(0,K.jsxs)(Pe,{children:[(0,K.jsx)(Ne,{variant:`icon`,children:(0,K.jsx)(Se,{})}),(0,K.jsx)(Ie,{children:`No parameters`}),(0,K.jsx)(Le,{children:`Add a parameter, give it a default, then publish to change the app without a new build.`})]}),(0,K.jsx)(Fe,{children:(0,K.jsxs)(_,{className:`min-h-11 sm:min-h-7`,onClick:()=>a({key:null,parameter:null}),children:[(0,K.jsx)(M,{"data-icon":`inline-start`}),`Add parameter`]})})]}):u.length===0?(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-2 px-4 py-10 text-center text-xs text-muted-foreground`,children:[(0,K.jsx)(`p`,{className:`font-medium text-foreground`,children:`No matching keys`}),(0,K.jsx)(_,{onClick:()=>c(``),size:`sm`,variant:`outline`,children:`Clear filter`})]}):(0,K.jsx)(`ul`,{"aria-label":`Parameters`,className:`divide-y`,children:u.map(t=>(0,K.jsx)(Hn,{conditions:e.conditions,onEdit:()=>a({key:t,parameter:e.parameters[t]??null}),onRemove:()=>n(t),parameter:e.parameters[t],parameterKey:t},t))})}),(0,K.jsx)(zn,{conditions:e.conditions,onAddCondition:r,onOpenChange:e=>{e||a(null)},onSave:(e,n)=>t(d,e,n),open:i!==null,parameter:o?.parameter??null,parameterKey:d,takenKeys:l.filter(e=>e!==d)})]})}var Wn={platform:`ios`,channel:`production`,appVersion:`1.0.0`,cohort:`1`,fingerprintHash:``,at:``},Gn=(e,t=300)=>{let[n,r]=(0,G.useState)(e);return(0,G.useEffect)(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n};function Kn({template:t,isDraft:n}){let r=(0,G.useId)(),[i,a]=(0,G.useState)(Wn),{at:o,...s}=Gn(i),c=Kt(o),l=At({template:t,context:{...s,...c===void 0?{}:{now:Date.parse(c)}}}),u=Object.keys(t.parameters),d=(e,t)=>a({...i,[e]:t});return(0,K.jsxs)(Me,{className:`overflow-hidden shadow-sm`,children:[(0,K.jsxs)(Oe,{className:`border-b px-4 py-3 sm:px-6`,children:[(0,K.jsx)(Ae,{className:`text-sm`,children:(0,K.jsx)(`h2`,{children:`Preview a device`})}),(0,K.jsx)(je,{className:`text-xs`,children:n?`The values this device would get once your changes are published, now or at the time you pick.`:`The values this device gets from the active version, now or at the time you pick.`})]}),(0,K.jsxs)(ke,{className:`flex flex-col gap-4 p-4 sm:p-6`,children:[(0,K.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2 xl:grid-cols-3`,children:[(0,K.jsxs)(W,{children:[(0,K.jsx)(H,{htmlFor:`${r}-platform`,children:`Platform`}),(0,K.jsxs)(se,{items:{ios:`iOS`,android:`Android`},onValueChange:e=>{(e===`ios`||e===`android`)&&d(`platform`,e)},value:i.platform,children:[(0,K.jsx)(re,{className:`min-h-11 w-full sm:min-h-9`,id:`${r}-platform`,children:(0,K.jsxs)(j,{children:[(0,K.jsx)(et,{className:`size-3.5`,platform:i.platform}),i.platform===`ios`?`iOS`:`Android`]})}),(0,K.jsx)(ie,{children:(0,K.jsxs)(ae,{children:[(0,K.jsxs)(A,{value:`ios`,children:[(0,K.jsx)(et,{className:`size-3.5`,platform:`ios`}),`iOS`]}),(0,K.jsxs)(A,{value:`android`,children:[(0,K.jsx)(et,{className:`size-3.5`,platform:`android`}),`Android`]})]})})]})]}),[[`channel`,`Channel`,`production`],[`appVersion`,`App version`,`1.0.0`],[`cohort`,`Cohort`,`1-1000 or a name`],[`fingerprintHash`,`Fingerprint`,`Optional`]].map(([e,t,n])=>(0,K.jsxs)(W,{children:[(0,K.jsx)(H,{htmlFor:`${r}-${e}`,children:t}),(0,K.jsx)(m,{autoComplete:`off`,className:`min-h-11 text-base sm:min-h-9 sm:text-xs`,id:`${r}-${e}`,onChange:t=>d(e,t.target.value),placeholder:n,spellCheck:!1,value:i[e]})]},e)),(0,K.jsxs)(W,{children:[(0,K.jsx)(H,{htmlFor:`${r}-at`,children:`Time`}),(0,K.jsxs)(be,{className:`h-11 sm:h-9`,children:[(0,K.jsx)(he,{className:`h-11 text-base tabular-nums sm:h-9 sm:text-xs`,id:`${r}-at`,onChange:e=>d(`at`,e.target.value),type:`datetime-local`,value:i.at}),i.at.length===0?null:(0,K.jsx)(ge,{align:`inline-end`,children:(0,K.jsx)(ve,{className:`min-h-11 sm:min-h-6`,onClick:()=>d(`at`,``),size:`xs`,children:`Now`})})]})]})]}),u.length===0?(0,K.jsx)(Re,{className:`border py-8`,children:(0,K.jsxs)(Pe,{children:[(0,K.jsx)(Ne,{variant:`icon`,children:(0,K.jsx)(Te,{})}),(0,K.jsx)(Ie,{children:`Nothing to preview`}),(0,K.jsx)(Le,{children:`Add a parameter, and its value for this device shows here.`})]})}):l.data?.status===`invalid`?(0,K.jsxs)(I,{variant:`destructive`,children:[(0,K.jsx)(L,{}),(0,K.jsx)(P,{children:`The draft has problems to fix first`}),(0,K.jsx)(F,{children:(0,K.jsx)(`ul`,{className:`list-disc pl-4`,children:l.data.issues.slice(0,5).map(e=>(0,K.jsxs)(`li`,{children:[e.path===``?``:`${e.path}: `,e.message]},`${e.path}:${e.message}`))})})]}):l.isError?(0,K.jsxs)(I,{variant:`destructive`,children:[(0,K.jsx)(L,{}),(0,K.jsx)(P,{children:`The preview couldn't be loaded`}),(0,K.jsx)(F,{children:`Check the connection, then change a field to try again.`})]}):l.data===void 0?(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,K.jsx)(`span`,{className:`sr-only`,children:`Loading the preview`}),u.slice(0,4).map(t=>(0,K.jsx)(e,{className:`h-8 w-full`},t))]}):(0,K.jsx)(`dl`,{"aria-busy":l.isFetching||void 0,className:`divide-y rounded-lg border`,children:u.map(e=>{let t=l.data.status===`ok`?l.data.parameters[e]:void 0;return(0,K.jsxs)(`div`,{className:`grid gap-1 px-3 py-2.5 sm:grid-cols-[minmax(0,14rem)_minmax(0,1fr)_auto] sm:items-center sm:gap-3`,children:[(0,K.jsx)(`dt`,{className:`truncate font-mono text-xs font-medium`,children:e}),(0,K.jsx)(`dd`,{className:`min-w-0 truncate font-mono text-xs`,children:t===void 0?`…`:t.value===null?(0,K.jsx)(`span`,{className:`font-sans text-muted-foreground`,children:`In-app default`}):(0,K.jsx)(`span`,{title:t.value,children:t.value.length===0?`""`:t.value})}),(0,K.jsx)(`dd`,{children:t?.condition===void 0?null:t.condition===null?(0,K.jsx)(z,{variant:`outline`,children:`Default value`}):(0,K.jsx)(z,{variant:`secondary`,children:t.condition})})]},e)})})]})]})}function qn({name:e,fields:t}){return(0,K.jsxs)(`li`,{className:`min-w-0`,children:[(0,K.jsx)(`p`,{className:`break-words font-mono`,children:e}),t.length===0?null:(0,K.jsx)(`ul`,{className:`mt-0.5 flex flex-col gap-0.5`,children:t.map(e=>(0,K.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5 text-muted-foreground`,children:[(0,K.jsx)(`span`,{children:e.field}),e.before===null?null:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`max-w-full truncate font-mono line-through decoration-muted-foreground/60`,title:e.before,children:e.before}),(0,K.jsx)(k,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,K.jsx)(`span`,{className:`sr-only`,children:`to`})]}),(0,K.jsx)(`span`,{className:`max-w-full truncate font-mono text-foreground`,title:e.after,children:e.after})]},e.field))})]})}function Jn({label:e,changes:t,describe:n}){let r=[[`Added`,t.added],[`Changed`,t.changed],[`Removed`,t.removed]];return r.every(([,e])=>e.length===0)?null:(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`text-xs font-medium`,children:e}),(0,K.jsx)(`dl`,{className:`mt-1 grid grid-cols-[5rem_minmax(0,1fr)] gap-x-3 gap-y-1 text-xs`,children:r.map(([e,t])=>t.length===0?null:(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,K.jsx)(`dd`,{className:`min-w-0`,children:e===`Removed`?(0,K.jsx)(`span`,{className:`break-words font-mono`,children:t.join(`, `)}):(0,K.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:t.map(e=>(0,K.jsx)(qn,{fields:n(e),name:e},e))})})]},e))})]})}function Yn({open:e,onOpenChange:t,base:n,baseVersion:r,draft:i,onPublished:a,onLoadLatest:o,onPublishOver:s}){let c=(0,G.useId)(),l=Ot(),[u,d]=(0,G.useState)(``),[f,p]=(0,G.useState)(null),{dateTimeText:h}=Cn(),g=Xt(n,i),v=e=>{let t=Object.hasOwn(n.parameters,e)?n.parameters[e]:null,r=Object.hasOwn(i.parameters,e)?i.parameters[e]:null;return r===null?[]:Zt(t,r)},y=e=>{let t=n.conditions.find(t=>t.name===e)??null,r=i.conditions.find(t=>t.name===e)??null;return r===null?[]:Qt(t,r,h)},b=u.trim().length>256,x=e=>{l.isPending||(t(e),e||(p(null),l.reset()))};return(0,K.jsx)(V,{onOpenChange:x,open:e,children:(0,K.jsx)(rt,{className:`max-h-[calc(100svh-2rem)] overflow-y-auto sm:max-w-lg`,children:(0,K.jsxs)(`form`,{className:`flex flex-col gap-4`,noValidate:!0,onSubmit:async e=>{if(e.preventDefault(),!b)try{let e=await l.mutateAsync({template:i,baseVersion:r,...u.trim().length===0?{}:{description:u.trim()}});p(e),e.status===`published`&&(B.success(`Published version ${e.version.version}`),d(``),p(null),t(!1),a())}catch(e){B.error(e instanceof Error?e.message:`Unable to publish`)}},children:[(0,K.jsxs)(tt,{children:[(0,K.jsx)(it,{children:`Publish changes`}),(0,K.jsxs)(at,{children:[`This becomes version `,r+1,`. Devices get its values on their next fetch; earlier versions stay available to roll back to.`]})]}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,K.jsx)(Jn,{changes:g.parameters,describe:v,label:`Parameters`}),(0,K.jsx)(Jn,{changes:g.conditions,describe:y,label:`Conditions`}),g.reordered?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Condition priority changed.`}):null]}),f?.status===`invalid`?(0,K.jsxs)(I,{variant:`destructive`,children:[(0,K.jsx)(L,{}),(0,K.jsx)(P,{children:`The server refused the template`}),(0,K.jsx)(F,{children:(0,K.jsx)(`ul`,{className:`list-disc pl-4`,children:f.issues.slice(0,6).map(e=>(0,K.jsxs)(`li`,{children:[e.path===``?``:`${e.path}: `,e.message]},`${e.path}:${e.message}`))})})]}):null,f?.status===`conflict`?(0,K.jsxs)(I,{children:[(0,K.jsx)(L,{}),(0,K.jsxs)(P,{children:[`Version `,f.currentVersion,` was published while you edited`]}),(0,K.jsx)(F,{children:`Load it to review what changed, or publish yours after it, replacing its values.`}),(0,K.jsxs)(`div`,{className:`col-span-full mt-2 flex flex-wrap gap-2`,children:[(0,K.jsxs)(_,{onClick:()=>{x(!1),o()},size:`sm`,type:`button`,variant:`outline`,children:[`Load version `,f.currentVersion]}),(0,K.jsx)(_,{onClick:()=>{s(f.currentVersion),p(null)},size:`sm`,type:`button`,variant:`ghost`,children:`Publish mine after it`})]})]}):null,(0,K.jsxs)(W,{"data-invalid":b||void 0,children:[(0,K.jsx)(H,{htmlFor:`${c}-description`,children:`Description`}),(0,K.jsx)(m,{autoComplete:`off`,className:`min-h-11 sm:min-h-9`,id:`${c}-description`,onChange:e=>d(e.target.value),placeholder:`What changed and why`,value:u}),(0,K.jsx)(st,{children:`Shown in the version history.`}),(0,K.jsx)(U,{children:b?`Use 256 characters or fewer.`:null})]}),(0,K.jsxs)(nt,{children:[(0,K.jsx)(_,{disabled:l.isPending,onClick:()=>x(!1),type:`button`,variant:`outline`,children:`Cancel`}),(0,K.jsxs)(_,{disabled:l.isPending||f?.status===`conflict`,type:`submit`,children:[l.isPending?(0,K.jsx)(de,{className:`animate-spin motion-reduce:animate-none`,"data-icon":`inline-start`}):(0,K.jsx)(ht,{"data-icon":`inline-start`}),`Publish version `,r+1]})]})]})})})}function Xn({ms:e}){let t=new Date(e);return(0,K.jsx)(`time`,{className:`tabular-nums`,dateTime:t.toISOString(),title:`${t.toISOString().replace(`T`,` `).slice(0,19)} UTC`,children:(0,gt.default)(e).format(`YYYY/MM/DD HH:mm`)})}function Zn({open:t,version:n,onOpenChange:r}){let i=Et(n),a=i.data===null||i.data===void 0?null:JSON.stringify(i.data.template,null,2);return(0,K.jsx)(V,{onOpenChange:r,open:t,children:(0,K.jsxs)(rt,{className:`max-h-[calc(100svh-2rem)] grid-rows-[auto_minmax(0,1fr)] sm:max-w-2xl`,children:[(0,K.jsxs)(tt,{children:[(0,K.jsxs)(it,{children:[`Version `,n]}),(0,K.jsx)(at,{children:`The template as it was published, in the JSON the admin API takes.`})]}),i.isLoading?(0,K.jsx)(e,{className:`h-48 w-full`}):i.isError?(0,K.jsxs)(I,{variant:`destructive`,children:[(0,K.jsx)(L,{}),(0,K.jsx)(P,{children:`This version couldn't be loaded`}),(0,K.jsx)(F,{children:`Check the connection and try again.`}),(0,K.jsx)(R,{children:(0,K.jsxs)(_,{onClick:()=>void i.refetch(),size:`xs`,variant:`outline`,children:[(0,K.jsx)(me,{"data-icon":`inline-start`}),`Retry`]})})]}):a===null?(0,K.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Version `,n,` no longer exists.`]}):(0,K.jsxs)(`div`,{className:`flex min-h-0 flex-col gap-2`,children:[(0,K.jsx)(`pre`,{className:`min-h-0 overflow-auto rounded-md bg-muted p-3 font-mono text-xs`,children:a}),(0,K.jsxs)(_,{className:`self-end`,onClick:()=>{navigator.clipboard.writeText(a).then(()=>B.success(`Template JSON copied`),()=>B.error(`Unable to copy the template`))},size:`sm`,variant:`outline`,children:[(0,K.jsx)(ce,{"data-icon":`inline-start`}),`Copy JSON`]})]})]})})}function Qn({activeVersion:t,hasDraft:n,onRolledBack:r,onStartEditing:i}){let a=Tt({enabled:!0}),o=kt(),[s,c]=(0,G.useState)(null),[l,u]=(0,G.useState)(null),d=N(s),f=N(l),p=a.data?.pages.flatMap(e=>e.versions)??[],m=async e=>{if(e.preventDefault(),l!==null)try{let e=await o.mutateAsync({version:l.source,baseVersion:l.next-1});e.status===`published`?(B.success(`Version ${e.version.version} restores version ${l.source}`),r()):e.status===`conflict`?B.error(`Version ${e.currentVersion} was published meanwhile. Review it, then roll back again.`):B.error(`That version no longer exists.`),u(null)}catch(e){B.error(e instanceof Error?e.message:`Unable to roll back`)}};return(0,K.jsxs)(Me,{className:`overflow-hidden shadow-sm`,children:[(0,K.jsx)(Oe,{className:`border-b px-4 py-3 sm:px-6`,children:(0,K.jsx)(Ae,{className:`text-sm`,children:(0,K.jsx)(`h2`,{children:`Versions`})})}),(0,K.jsx)(ke,{className:`p-0`,children:a.isError?(0,K.jsx)(`div`,{className:`p-4`,children:(0,K.jsxs)(I,{variant:`destructive`,children:[(0,K.jsx)(L,{}),(0,K.jsx)(P,{children:`Versions couldn't be loaded`}),(0,K.jsx)(F,{children:`Check the connection and try again.`}),(0,K.jsx)(R,{children:(0,K.jsxs)(_,{onClick:()=>void a.refetch(),size:`xs`,variant:`outline`,children:[(0,K.jsx)(me,{"data-icon":`inline-start`}),`Retry`]})})]})}):a.isLoading?(0,K.jsxs)(`div`,{className:`flex flex-col gap-3 p-4 sm:p-6`,children:[(0,K.jsx)(`span`,{className:`sr-only`,children:`Loading versions`}),Array.from({length:3},(t,n)=>(0,K.jsx)(e,{className:`h-10 w-full`},n))]}):p.length===0?(0,K.jsxs)(Re,{className:`py-10`,children:[(0,K.jsxs)(Pe,{children:[(0,K.jsx)(Ne,{variant:`icon`,children:(0,K.jsx)(ue,{})}),(0,K.jsx)(Ie,{children:`No versions yet`}),(0,K.jsx)(Le,{children:`Your first publish becomes version 1. Every publish after it is kept here, ready to roll back to.`})]}),(0,K.jsx)(Fe,{children:(0,K.jsx)(_,{className:`min-h-11 sm:min-h-7`,onClick:i,children:`Add a parameter`})})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`ol`,{"aria-label":`Versions`,className:`divide-y`,children:p.map(e=>(0,K.jsxs)(`li`,{className:`grid gap-2 px-4 py-3 sm:px-6 md:grid-cols-[minmax(0,1fr)_auto] md:items-center`,children:[(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsxs)(`span`,{className:`text-sm font-medium tabular-nums`,children:[`Version `,e.version]}),e.version===t?(0,K.jsx)(z,{children:`Active`}):null,e.updateType===`ROLLBACK`?(0,K.jsxs)(z,{variant:`outline`,children:[`Rollback to v`,e.rollbackSource]}):null]}),(0,K.jsxs)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:[(0,K.jsx)(Xn,{ms:e.createdAtMs}),e.description===null||e.updateType===`ROLLBACK`&&e.description===`Rollback to version ${e.rollbackSource}`?null:(0,K.jsxs)(K.Fragment,{children:[` · `,e.description]})]})]}),(0,K.jsxs)(`div`,{className:`flex gap-1 md:justify-end`,children:[(0,K.jsxs)(_,{"aria-label":`View version ${e.version}`,className:`min-h-11 md:min-h-7`,onClick:()=>c(e.version),size:`sm`,variant:`ghost`,children:[(0,K.jsx)(mt,{"data-icon":`inline-start`}),`View`]}),(0,K.jsxs)(_,{"aria-label":`Roll back to version ${e.version}`,className:`min-h-11 md:min-h-7`,disabled:e.version===t,onClick:()=>u({source:e.version,next:t+1}),size:`sm`,variant:`outline`,children:[(0,K.jsx)(ye,{"data-icon":`inline-start`}),`Roll back`]})]})]},e.version))}),a.hasNextPage?(0,K.jsx)(`div`,{className:`border-t px-4 py-3 sm:px-6`,children:(0,K.jsxs)(_,{className:`min-h-11 w-full sm:min-h-7 sm:w-auto`,disabled:a.isFetchingNextPage,onClick:()=>void a.fetchNextPage(),variant:`outline`,children:[a.isFetchingNextPage?(0,K.jsx)(de,{className:`animate-spin motion-reduce:animate-none`,"data-icon":`inline-start`}):null,`Load older versions`]})}):null]})}),(0,K.jsx)(Zn,{onOpenChange:e=>{e||c(null)},open:s!==null,version:d}),(0,K.jsx)($e,{onOpenChange:e=>{!o.isPending&&!e&&u(null)},open:l!==null,children:(0,K.jsxs)(qe,{children:[(0,K.jsxs)(Qe,{children:[(0,K.jsxs)(Je,{children:[`Roll back to version `,f?.source,`?`]}),(0,K.jsxs)(Ke,{children:[`Version `,f?.next,` will publish a copy of version`,` `,f?.source,`, and devices get its values on their next fetch.`,n?` Your unpublished changes are discarded.`:``]})]}),(0,K.jsxs)(Xe,{children:[(0,K.jsx)(Ze,{disabled:o.isPending,children:`Cancel`}),(0,K.jsxs)(Ye,{disabled:o.isPending,onClick:e=>void m(e),children:[o.isPending?(0,K.jsx)(de,{className:`animate-spin motion-reduce:animate-none`,"data-icon":`inline-start`}):(0,K.jsx)(ye,{"data-icon":`inline-start`}),`Roll back`]})]})]})})]})}gt.default.extend(_t.default);var $n=[`parameters`,`conditions`,`preview`,`versions`];function er({tab:t,onTabChange:n}){let r=wt(),[i,a]=(0,G.useState)(null),[o,s]=(0,G.useState)(!1),[c,l]=(0,G.useState)(!1),[u,d]=(0,G.useState)(!1),f=r.data,p=i?.template??f?.template,m=i!==null&&f!==void 0&&!jt(i.template,f.template),h=m&&f!==void 0&&i.baseVersion!==f.version;(0,G.useEffect)(()=>{if(o||f===void 0)return;s(!0);let e=nn(f);e!==null&&(a(e),l(!0))},[f,o]),(0,G.useEffect)(()=>{if(i===null||!m||rn(i))return;let e=e=>e.preventDefault();return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[i,m]);let g=()=>{a(null),l(!1),rn(null)},v=e=>{f===void 0||p===void 0||(l(!1),a({baseVersion:i?.baseVersion??f.version,base:i?.base??f.template,template:e(p)}))},b={parameters:p===void 0?null:Object.keys(p.parameters).length,conditions:p?.conditions.length??null};return(0,K.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,K.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-x-3 gap-y-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,K.jsx)(y,{className:`-ml-1 size-11 lg:size-7`}),(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(Se,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,K.jsx)(`h1`,{className:`text-sm font-medium`,children:`Remote Config`})]}),f===void 0?null:(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:f.version===0?`Nothing published yet`:(0,K.jsxs)(K.Fragment,{children:[`Version `,f.version,f.updatedAtMs===null?null:(0,K.jsxs)(K.Fragment,{children:[` · published `,(0,K.jsx)(`time`,{dateTime:new Date(f.updatedAtMs).toISOString(),title:(0,gt.default)(f.updatedAtMs).format(`YYYY/MM/DD HH:mm:ss`),children:(0,gt.default)(f.updatedAtMs).fromNow()})]})]})}),m?(0,K.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,K.jsx)(z,{className:`hidden sm:inline-flex`,variant:`secondary`,children:`Unpublished changes`}),(0,K.jsxs)(_,{className:`min-h-11 lg:min-h-7`,onClick:g,variant:`ghost`,children:[(0,K.jsx)(De,{"data-icon":`inline-start`}),`Discard`]}),(0,K.jsxs)(_,{className:`min-h-11 lg:min-h-7`,onClick:()=>d(!0),children:[(0,K.jsx)(ht,{"data-icon":`inline-start`}),`Publish changes`]})]}):null]}),(0,K.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,K.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-4`,children:[r.isError?(0,K.jsxs)(I,{variant:`destructive`,children:[(0,K.jsx)(L,{}),(0,K.jsx)(P,{children:`Remote Config couldn't be loaded`}),(0,K.jsx)(F,{children:`Check the connection and try again.`}),(0,K.jsx)(R,{children:(0,K.jsxs)(_,{onClick:()=>void r.refetch(),size:`xs`,variant:`outline`,children:[(0,K.jsx)(me,{"data-icon":`inline-start`}),`Retry`]})})]}):null,c&&m&&i!==null?(0,K.jsxs)(I,{children:[(0,K.jsx)(ue,{}),(0,K.jsx)(P,{children:`Your unpublished changes are back`}),(0,K.jsxs)(F,{children:[`This browser kept them from your last visit, on version`,` `,i.baseVersion,`.`]}),(0,K.jsx)(R,{children:(0,K.jsx)(_,{onClick:g,size:`xs`,variant:`outline`,children:`Discard them`})})]}):null,h&&i!==null&&f!==void 0?(0,K.jsxs)(I,{children:[(0,K.jsx)(L,{}),(0,K.jsxs)(P,{children:[`Version `,f.version,` was published while you edited`]}),(0,K.jsxs)(F,{children:[`Your draft started from version `,i.baseVersion,`. Discard it to review version `,f.version,`, or publish yours after it.`]}),(0,K.jsx)(R,{children:(0,K.jsxs)(_,{onClick:g,size:`xs`,variant:`outline`,children:[`Load version `,f.version]})})]}):null,(0,K.jsxs)(Ge,{onValueChange:e=>n(e),value:t,children:[(0,K.jsx)(We,{"aria-label":`Remote Config views`,className:`max-w-full group-data-horizontal/tabs:h-auto`,children:[[`parameters`,`Parameters`,b.parameters],[`conditions`,`Conditions`,b.conditions],[`preview`,`Preview`,null],[`versions`,`Versions`,null]].map(([e,t,n])=>(0,K.jsxs)(Ve,{className:`min-h-11 flex-none px-3 lg:min-h-7`,value:e,children:[t,n===null?null:(0,K.jsx)(`span`,{className:`tabular-nums text-muted-foreground`,children:n})]},e))}),p===void 0||f===void 0?r.isError?null:(0,K.jsxs)(`div`,{className:`flex flex-col gap-3 pt-2`,children:[(0,K.jsx)(`span`,{className:`sr-only`,children:`Loading Remote Config`}),(0,K.jsx)(e,{className:`h-14 w-full`}),(0,K.jsx)(e,{className:`h-14 w-full`}),(0,K.jsx)(e,{className:`h-14 w-full`})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(He,{value:`parameters`,children:(0,K.jsx)(Un,{onAddCondition:e=>v(t=>Ft(t,null,e)),onRemoveParameter:e=>v(t=>Nt(t,e)),onSaveParameter:(e,t,n)=>v(r=>Mt(r,e,t,n)),template:p})}),(0,K.jsx)(He,{value:`conditions`,children:(0,K.jsx)(Mn,{onMoveCondition:(e,t)=>v(n=>Lt(n,e,t)),onRemoveCondition:e=>v(t=>It(t,e)),onSaveCondition:(e,t)=>v(n=>Ft(n,e,t)),template:p})}),(0,K.jsx)(He,{value:`preview`,children:(0,K.jsx)(Kn,{isDraft:m,template:p})}),(0,K.jsx)(He,{value:`versions`,children:(0,K.jsx)(Qn,{activeVersion:f.version,hasDraft:m,onRolledBack:g,onStartEditing:()=>n(`parameters`)})})]})]})]})}),f!==void 0&&i!==null?(0,K.jsx)(Yn,{base:f.template,baseVersion:i.baseVersion,draft:i.template,onLoadLatest:g,onOpenChange:d,onPublishOver:e=>a({...i,baseVersion:e,base:f.template}),onPublished:g,open:u}):null]})}var tr=T(`/remote-config`)({beforeLoad:({context:e})=>O(e.queryClient,`remoteConfig`),notFoundComponent:te(()=>E(()=>import(`./remote-config-DAOyn5xL.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),`notFoundComponent`),component:te(()=>E(()=>import(`./remote-config-Cxkr7_BP.js`),__vite__mapDeps([8,2])),`component`),validateSearch:e=>$n.includes(e.tab)&&e.tab!==`parameters`?{tab:e.tab}:{}});export{er as n,tr as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Vr as e}from"./sidebar-yC7KdImc.js";var t=e(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]);export{t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-Des97uK_.js","assets/sidebar-yC7KdImc.js","assets/alert-dialog-Ch0QxRsa.js","assets/select-CA8r-UUe.js","assets/useCompositeListItem-lAmUsXcc.js","assets/check-CqWNyG93.js","assets/switch-BsV3d4km.js","assets/valueToPercent-Bn8p2lng.js","assets/link-CN3iHC4A.js","assets/arrow-right-CXp_K3xK.js","assets/arrow-up-right-BFafIOrq.js","assets/TargetDisplay-KU7JhIWG.js","assets/copy-CH1__JAW.js","assets/key-round-D7UgdXyA.js","assets/package-BmfoZ5Zj.js","assets/dist-DAM__Tdz.js","assets/HashValueDisplay-D2f0HmyU.js","assets/uuidv7-DAoOOpz9.js","assets/chevron-right-DNbYTBX1.js","assets/circle-off-BCkZpskJ.js","assets/download-B2GjTySo.js","assets/RolloutPercentageBadge-D_I0Raj2.js","assets/relativeTime-BYRt19mj.js","assets/badge-FZMD5vvS.js","assets/list-Bm-CfN5g.js","assets/loader-circle-iMqC-8ZE.js","assets/plus-Db0KxLZp.js","assets/input-group-XKLcUGoa.js","assets/trash-2-B5KIvrXy.js","assets/BundleIdDisplay-CTBdtFQ8.js","assets/ChannelBadge-CEabmopB.js","assets/RelativeTime-B4PK8qDw.js","assets/table-D8YjT_ht.js","assets/RowReason-B7VM1ztc.js","assets/insights-search-Bgvg6wSP.js","assets/insights-api-B6Gj74n5.js","assets/preload-helper-CRQjUQaZ.js","assets/PlatformIcon-DVnzzGqM.js","assets/card-CyHYmHue.js","assets/dialog-BLj71-Nf.js","assets/field-CdhSgWhI.js","assets/api-C1OPeiG1.js","assets/useMutation-w3qYaU2L.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$ as e,Di as t,Hr as n,Oi as r,Vr as i,_r as a,et as o,vr as s,wi as c,zr as l}from"./sidebar-yC7KdImc.js";import{t as u}from"./link-CN3iHC4A.js";import{i as d,r as f,t as p}from"./preload-helper-CRQjUQaZ.js";import{a as m,i as h,o as g}from"./console-features-api-BO5V64P3.js";import{_,m as v,s as ee,x as y}from"./insights-api-B6Gj74n5.js";import{t as b}from"./key-round-D7UgdXyA.js";import{i as x}from"./switch-BsV3d4km.js";import{n as S,o as C}from"./insights-search-Bgvg6wSP.js";import{a as w,i as T,n as E,o as D,t as O}from"./card-CyHYmHue.js";var k=i(`chart-line`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`m19 9-5 5-4-4-3 3`,key:`2osh9i`}]]),A=t(),j={apiKeys:{navigation:{icon:(0,A.jsx)(b,{}),paths:[`/api-keys`],link:({onClick:e})=>(0,A.jsx)(u,{to:`/api-keys`,onClick:e})}}},M=c({method:`GET`}).middleware([l]).handler(r(`b4bf4c461903edcdc44eea52468c737b5b600a586f542138ff022dcbbe86c45c`));function N(e){let t=e.map(({releaseId:e,platform:t,channel:n})=>({releaseId:e,platform:t,channel:n})).sort((e,t)=>e.releaseId.localeCompare(t.releaseId));return n({queryKey:[`bundle-activity`,t],queryFn:()=>M({data:t}),enabled:t.length>0,staleTime:3e4})}var P=[{label:`Downloaded`,field:`downloads`,color:`text-primary/85`},{label:`Launched`,field:`launched`,color:`text-success/85`},{label:`Crashed`,field:`failedLaunches`,color:`text-warning/85`}],F=e=>{let t=e.launched+e.failedLaunches;return t===0?`—`:`${(e.failedLaunches/t*100).toFixed(2)}%`},I=e=>Math.max(0,e.downloads-e.launched-e.failedLaunches);function L(){return(0,A.jsx)(C,{label:`About release insight metrics`,children:`Downloaded: got this bundle. Launched: ran it. Crashed: crashed on it and rolled back. Once every installation restarts, Downloaded = Launched + Crashed.`})}function R({report:t,loading:n=!1,input:r,variant:i=`inline`}){if(!t)return n?(0,A.jsx)(e,{"aria-label":`Loading release insights`,className:i===`card`?`h-16 w-full`:`h-4 w-40`}):(0,A.jsx)(`span`,{"aria-label":`Release insights unavailable`,className:`text-sm text-muted-foreground`,children:`—`});let a=r?.builtIn===!0,o=a?0:I(t),c=(0,A.jsx)(`dl`,{className:s(i===`card`?`grid grid-cols-[1fr_1fr_auto] gap-4`:`flex min-w-[220px] flex-wrap items-baseline gap-x-3 gap-y-1`),children:P.map(({label:e,field:n,color:r})=>(0,A.jsxs)(`div`,{className:s(`flex`,i===`card`?`min-w-0 flex-col gap-1`:`items-baseline gap-1.5 whitespace-nowrap`),children:[(0,A.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:e}),(0,A.jsxs)(`dd`,{className:s(`flex flex-wrap items-baseline gap-x-1.5 tabular-nums`,i===`card`?`text-xl font-semibold`:`text-sm font-medium`,t[n]>0&&!(n===`downloads`&&a)?r:`text-muted-foreground`),children:[n===`downloads`&&a?(0,A.jsx)(`span`,{title:`The built-in bundle is never downloaded`,children:`—`}):t[n].toLocaleString(),n===`failedLaunches`?(0,A.jsxs)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:[`(`,F(t),`)`]}):null]})]},n))});return(0,A.jsxs)(`div`,{className:s(`flex`,i===`card`?`flex-col gap-2`:`items-center gap-1`),children:[r?(0,A.jsx)(u,{className:`relative min-w-0 rounded-sm after:absolute after:inset-x-0 after:-inset-y-3 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring sm:after:hidden`,to:`/insights`,search:{platform:r.platform,channel:r.channel,releaseId:r.releaseId,bundleWindow:S(r.releaseId)},children:c}):c,i===`card`&&o>0?(0,A.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[o.toLocaleString(),` downloaded but not launched yet: waiting for a restart, or passed over for a newer bundle.`]}):null,i===`inline`?(0,A.jsx)(L,{}):null]})}function z({input:t}){let n=ee({platform:t.platform,channel:t.channel,releaseId:t.releaseId}),r=n.data;return(0,A.jsxs)(`div`,{className:`flex items-center gap-1`,children:[r?(0,A.jsx)(`dl`,{children:(0,A.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-1.5`,children:[(0,A.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Download failures`}),(0,A.jsxs)(`dd`,{className:s(`flex items-baseline gap-1.5 text-sm font-medium tabular-nums`,r.failedUpdates>0?`text-warning/85`:`text-muted-foreground`),children:[r.failedUpdates.toLocaleString(),(0,A.jsxs)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:[`(`,_(v(r)),`)`]})]})]})}):n.isPending?(0,A.jsx)(e,{"aria-label":`Loading download failures`,className:`h-4 w-40`}):(0,A.jsx)(`span`,{"aria-label":`Download failures unavailable`,className:`text-sm text-muted-foreground`,children:`—`}),(0,A.jsx)(C,{label:`About download failures`,children:`Failed downloads or installs of this bundle, at most one per installation a day. Rate = failures ÷ (failures + downloads).`})]})}function B({input:e}){let t=N([e]);return(0,A.jsxs)(O,{children:[(0,A.jsxs)(w,{className:`flex-row items-center justify-between px-4 pt-4 pb-3`,children:[(0,A.jsx)(D,{className:`text-sm font-medium`,children:`Insights`}),(0,A.jsx)(L,{})]}),(0,A.jsxs)(E,{className:`flex flex-col gap-3 px-4 pb-4`,children:[(0,A.jsx)(R,{variant:`card`,input:e,loading:t.isFetching,report:t.data?.[e.releaseId]}),(0,A.jsx)(o,{}),(0,A.jsx)(z,{input:e})]}),(0,A.jsx)(T,{className:`px-4 pb-4`,children:(0,A.jsxs)(u,{className:a({variant:`outline`,size:`sm`}),to:`/insights`,search:{platform:e.platform,channel:e.channel,releaseId:e.releaseId,bundleWindow:S(e.releaseId),healthChart:`adoption`},children:[(0,A.jsx)(k,{"aria-hidden":`true`,"data-icon":`inline-start`}),`View adoption`]})})]})}function V({input:e}){return h(`insightsAnalytics`)?null:(0,A.jsxs)(O,{children:[(0,A.jsx)(w,{className:`px-4 pt-4 pb-3`,children:(0,A.jsx)(D,{className:`text-sm font-medium`,children:`Insights`})}),(0,A.jsx)(E,{className:`px-4 pb-4`,children:(0,A.jsx)(z,{input:e})})]})}function H({releaseId:e,releases:t}){let n=N(t);return(0,A.jsx)(R,{input:t.find(t=>t.releaseId===e),loading:n.isFetching,report:n.data?.[e]})}var U={Cell:H},W={insights:{navigation:{icon:(0,A.jsx)(y,{}),paths:[`/insights`,`/insights/distribution`,`/installations`],link:({features:e,onClick:t})=>e.insightsAnalytics?(0,A.jsx)(u,{to:`/insights`,onClick:t}):(0,A.jsx)(u,{to:`/installations`,onClick:t})},releaseSection:({release:e})=>(0,A.jsx)(V,{input:e})},insightsAnalytics:{releaseColumn:U,releaseSection:({release:e})=>(0,A.jsx)(B,{input:e})}},G={remoteConfig:{navigation:{icon:(0,A.jsx)(x,{}),paths:[`/remote-config`],link:({onClick:e})=>(0,A.jsx)(u,{to:`/remote-config`,onClick:e})}}},K={...W,...j,...G},q=Object.keys(g),J=()=>{let e=m().data?.features;return e===void 0?[]:q.flatMap(t=>{let n=K[t];return n!==void 0&&e[t]?[{...n,feature:t,label:g[t].label,features:e}]:[]})},Y=()=>J().flatMap(({feature:e,label:t,releaseColumn:n})=>n===void 0?[]:[{...n,feature:e,label:t}]);function X({release:e}){return J().map(({feature:t,releaseSection:n})=>n===void 0?null:(0,A.jsx)(n,{release:e},t))}var Z=e=>typeof e==`string`&&e.trim().length>0?e.trim():void 0;function Q(e){let t=Z(e.beforeReleaseId),n=t?void 0:Z(e.afterReleaseId),r=e.enabled===!0||e.enabled===`true`?!0:e.enabled===!1||e.enabled===`false`?!1:void 0,i=Z(e.bundleId),a=i?void 0:Z(e.scopeKey),o=i||a?void 0:Z(e.channelId),s=o===void 0?void 0:e.platform===`android`?`android`:`ios`;return{afterReleaseId:n,beforeReleaseId:t,bundleId:i,channelId:o,enabled:a||o?r:void 0,platform:s,releaseId:Z(e.releaseId),scopeKey:a}}function $(e){let t=e.enabled===void 0?{}:{enabled:e.enabled};return e.bundleId?{kind:`bundle`,bundleId:e.bundleId}:e.scopeKey?{kind:`scope`,scopeKey:e.scopeKey,...t}:e.channelId&&e.platform?{kind:`channelPlatform`,channelId:e.channelId,platform:e.platform,...t}:{kind:`all`}}function te(e){return $(e).kind!==`all`}function ne(e,t){let n={...e,...t};return t.bundleId?Q({bundleId:n.bundleId}):t.scopeKey?Q({scopeKey:n.scopeKey,enabled:n.enabled}):`channelId`in t||`platform`in t?Q({channelId:n.channelId,enabled:n.enabled,platform:n.platform}):Q({bundleId:n.bundleId,channelId:n.channelId,enabled:n.enabled,platform:n.platform,scopeKey:n.scopeKey})}var re=d(`/`)({component:f(()=>p(()=>import(`./routes-Des97uK_.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,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42])),`component`),validateSearch:Q});export{X as a,ne as i,te as n,J as o,$ as r,Y as s,re as t};
|