@hot-updater/console 1.2.0-rc.39 → 1.2.0-rc.40
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-CRhUT348.js → -native-builds-search-qeto9-fq.js} +1 -1
- package/.output/public/assets/{BundleIdDisplay-Cz5MehaS.js → BundleIdDisplay-BKaGARD1.js} +1 -1
- package/.output/public/assets/{ChannelBadge-B7DxBTj3.js → ChannelBadge-CPc1M44L.js} +1 -1
- package/.output/public/assets/{CompositeItem-AJPwCjWh.js → CompositeItem-B541MSYC.js} +1 -1
- package/.output/public/assets/{ConsoleFeatureUnavailable-PXmQqkJQ.js → ConsoleFeatureUnavailable-C6aryy7j.js} +1 -1
- package/.output/public/assets/{EventDetails-C7rnoh47.js → EventDetails-BdqU96Wu.js} +1 -1
- package/.output/public/assets/{HashValueDisplay-DDz2Ecy7.js → HashValueDisplay-BHL4xWSY.js} +1 -1
- package/.output/public/assets/InsightsPageHeader-D0Nxcccp.js +1 -0
- package/.output/public/assets/{IosInstall-CJ0427uA.js → IosInstall-CgNa8B4v.js} +1 -1
- package/.output/public/assets/{NativeBuildsNav-CZSaxAYo.js → NativeBuildsNav-BxAmQr2E.js} +1 -1
- package/.output/public/assets/{NotFoundPage-DIwHXtYM.js → NotFoundPage-haKPLHiT.js} +1 -1
- package/.output/public/assets/{PlatformIcon-DjcYGkV6.js → PlatformIcon-DYsYaYt6.js} +1 -1
- package/.output/public/assets/{QrCode-DJ5leikY.js → QrCode-BSNEn_M-.js} +1 -1
- package/.output/public/assets/{RelativeTime-DxYXSuC4.js → RelativeTime-CdQ86VoP.js} +1 -1
- package/.output/public/assets/{RolloutPercentageBadge-Di_Ca_ss.js → RolloutPercentageBadge-Cd1UNLL0.js} +1 -1
- package/.output/public/assets/{RowReason-BvjPxMrd.js → RowReason-CEI-_T6G.js} +1 -1
- package/.output/public/assets/{SandboxBadge-B_edulK_.js → SandboxBadge-CqGX5DiH.js} +1 -1
- package/.output/public/assets/{TargetDisplay-CyBWoX-f.js → TargetDisplay-DMZHMgWk.js} +1 -1
- package/.output/public/assets/{alert-dialog-C6K18pl_.js → alert-dialog-Cj7AOTIE.js} +1 -1
- package/.output/public/assets/{api-keys-D3TC5aQy.js → api-keys-B9XQLCZ8.js} +1 -1
- package/.output/public/assets/api-keys-D4tjInrB.js +1 -0
- package/.output/public/assets/{api-sTvbSydX.js → api-tJRzijjy.js} +1 -1
- package/.output/public/assets/arrow-left-68S4uy4I.js +1 -0
- package/.output/public/assets/arrow-right-DjRwIoF1.js +1 -0
- package/.output/public/assets/arrow-up-right-C_1ALUCD.js +1 -0
- package/.output/public/assets/{badge-Cf3eoJjl.js → badge-zMibJGR5.js} +1 -1
- package/.output/public/assets/{card-CHIqYgB7.js → card-pYZSDIxg.js} +1 -1
- package/.output/public/assets/check-C3VCvMOV.js +1 -0
- package/.output/public/assets/chevron-right-RAuPv9r1.js +1 -0
- package/.output/public/assets/{circle-off-BZFOMb8J.js → circle-off-DvYMC5yF.js} +1 -1
- package/.output/public/assets/{clipboard-D8uvj6FN.js → clipboard-D0JWZ1KF.js} +1 -1
- package/.output/public/assets/{console-features-api-De6tXQnd.js → console-features-api-CtbGqKyr.js} +1 -1
- package/.output/public/assets/{copy-BxI24-g-.js → copy-BjVLMKbo.js} +1 -1
- package/.output/public/assets/{dialog-ZrH3ul9A.js → dialog-DlAv6zou.js} +1 -1
- package/.output/public/assets/{dist-Dh2hrHKj.js → dist-BEmib-ZM.js} +1 -1
- package/.output/public/assets/{download-ekENI2Sw.js → download-CgpaZb23.js} +1 -1
- package/.output/public/assets/{empty-Oq7fhUu4.js → empty-Bwao2ztZ.js} +1 -1
- package/.output/public/assets/{field-BHPxgJmr.js → field-BiSGCVoS.js} +1 -1
- package/.output/public/assets/{git-branch-BOz43vpU.js → git-branch-BGatQV8Q.js} +1 -1
- package/.output/public/assets/{history-Bz8IgNln.js → history-Ci4dhphE.js} +1 -1
- package/.output/public/assets/{index-MllyLAwb.js → index-D7PWINwc.js} +3 -3
- package/.output/public/assets/{input-group-cEQZv88S.js → input-group-CPboh0Rx.js} +1 -1
- package/.output/public/assets/insights-B7GL298D.js +1 -0
- package/.output/public/assets/{insights-DvMY7nq6.js → insights-BzKbxWIo.js} +1 -1
- package/.output/public/assets/insights-Q2nAkSMz.js +2 -0
- package/.output/public/assets/{insights-api-CXXCRZhF.js → insights-api-D4-FZeEI.js} +1 -1
- package/.output/public/assets/{insights-search-BCR_lahU.js → insights-search-DkovoDrZ.js} +1 -1
- package/.output/public/assets/{insights-usage-rpc-BG7EOn2n.js → insights-usage-rpc-DkJgbAYm.js} +1 -1
- package/.output/public/assets/insights_.distribution-BafQuEd0.js +1 -0
- package/.output/public/assets/insights_.distribution-DHU1udei.js +2 -0
- package/.output/public/assets/{insights_.distribution-QzaOKttT.js → insights_.distribution-DmeI9XZw.js} +1 -1
- package/.output/public/assets/{installations-BryK0NqR.js → installations-ClsF2q6A.js} +2 -2
- package/.output/public/assets/installations-CmuNX_Ok.js +1 -0
- package/.output/public/assets/{installations-CzsM7ZGi.js → installations-oGkAO7nb.js} +1 -1
- package/.output/public/assets/{key-round-Dy3paJP6.js → key-round-BkeLvA1m.js} +1 -1
- package/.output/public/assets/{link-D95E0fwF.js → link-CRMwpc7-.js} +1 -1
- package/.output/public/assets/{list-ClzEOP6k.js → list-DQ9YBIDW.js} +1 -1
- package/.output/public/assets/loader-circle-8lunBReu.js +1 -0
- package/.output/public/assets/native-builds-DJlYvvPY.js +2 -0
- package/.output/public/assets/{native-builds-BYQ8bQGN.js → native-builds-NyGMlBx2.js} +1 -1
- package/.output/public/assets/{native-builds-3qvP-53q.js → native-builds-uKuvmyXZ.js} +1 -1
- package/.output/public/assets/{native-builds_._buildId-D2-0EtFr.js → native-builds_._buildId-DZqylSRq.js} +1 -1
- package/.output/public/assets/native-builds_._buildId-Dza7vEcy.js +2 -0
- package/.output/public/assets/{native-builds_.devices-OQV8P5Hf.js → native-builds_.devices-BykEftlY.js} +1 -1
- package/.output/public/assets/native-builds_.devices-DH1JB1zr.js +2 -0
- package/.output/public/assets/plus-DztQIXYL.js +1 -0
- package/.output/public/assets/{preload-helper-52zhjEsw.js → preload-helper-CE9OukVC.js} +1 -1
- package/.output/public/assets/{relativeTime-CdKwnwWK.js → relativeTime-Dbefsycs.js} +1 -1
- package/.output/public/assets/remote-config-BiD075AT.js +1 -0
- package/.output/public/assets/{remote-config-DNSdmvmp.js → remote-config-CBirPcRR.js} +3 -3
- package/.output/public/assets/remote-config-r945bivi.js +1 -0
- package/.output/public/assets/{rotate-cw-CyYMmYDu.js → rotate-cw-BFQcpUTO.js} +1 -1
- package/.output/public/assets/{routes-DgbtNsWJ.js → routes-5U4k3N1_.js} +1 -1
- package/.output/public/assets/{routes-DkzFq9jv.js → routes-DWjGfLRs.js} +2 -2
- package/.output/public/assets/search-BfEqtE64.js +1 -0
- package/.output/public/assets/{select-DSZKLAHH.js → select-DIyG5G-V.js} +1 -1
- package/.output/public/assets/sidebar-BmzmPGuv.js +3 -0
- package/.output/public/assets/smartphone-Dy13ukaU.js +1 -0
- package/.output/public/assets/{switch-Bvelc7zQ.js → switch-B_7OwJhK.js} +1 -1
- package/.output/public/assets/{table-tm9RvUbS.js → table-Bo1jU9-v.js} +1 -1
- package/.output/public/assets/{tabs-TD0mdxc_.js → tabs-DARDj-XC.js} +1 -1
- package/.output/public/assets/{trash-2-SV8_CRNk.js → trash-2-DI0biNI-.js} +1 -1
- package/.output/public/assets/{undo-2-K3gpHMd2.js → undo-2-CxhBbgJw.js} +1 -1
- package/.output/public/assets/{useCompositeListItem-B9ONn9qn.js → useCompositeListItem-Cbk_weKW.js} +1 -1
- package/.output/public/assets/{useMutation-BWX97JX2.js → useMutation-D7IuoOLE.js} +1 -1
- package/.output/server/{__23tanstack-start-server-fn-resolver-D-ox_XZH.mjs → __23tanstack-start-server-fn-resolver-CSEErUrV.mjs} +58 -58
- package/.output/server/_libs/_.mjs +1 -1
- package/.output/server/_ssr/{BundleIdDisplay-Dobgd7p0.mjs → BundleIdDisplay-BfMtMws8.mjs} +2 -2
- package/.output/server/_ssr/{ChannelBadge-Dp9lOdkW.mjs → ChannelBadge-CyjOxlfr.mjs} +3 -3
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-sMoqvehk.mjs → ConsoleFeatureUnavailable-D5a8SXzu.mjs} +5 -5
- package/.output/server/_ssr/{EventDetails-B2lRHRhs.mjs → EventDetails-XaXslOac.mjs} +6 -6
- package/.output/server/_ssr/{HashValueDisplay-DgOVBPz-.mjs → HashValueDisplay-CtrIkPNM.mjs} +2 -2
- package/.output/server/_ssr/{InsightsPageHeader-CFrO8ZhS.mjs → InsightsPageHeader-CK76Vycr.mjs} +9 -9
- package/.output/server/_ssr/{IosInstall-COL13Y9Q.mjs → IosInstall-BD2HpMsh.mjs} +6 -6
- package/.output/server/_ssr/{NativeBuildsNav-DADiCA79.mjs → NativeBuildsNav-DvFscYEN.mjs} +3 -3
- package/.output/server/_ssr/{NotFoundPage-C6fy3EQE.mjs → NotFoundPage-CQc5Envb.mjs} +2 -2
- package/.output/server/_ssr/{QrCode-pjBmMRNW.mjs → QrCode-VPGDhoTy.mjs} +2 -2
- package/.output/server/_ssr/{RelativeTime-ybh_YpRa.mjs → RelativeTime-D6qU9XeU.mjs} +3 -3
- package/.output/server/_ssr/{RolloutPercentageBadge-Ck1Qz_u9.mjs → RolloutPercentageBadge-7HdtPPd8.mjs} +3 -3
- package/.output/server/_ssr/{RowReason-DrDg86zk.mjs → RowReason-CR2C_0d9.mjs} +4 -4
- package/.output/server/_ssr/{SandboxBadge-BVLfk_MI.mjs → SandboxBadge-HQv4waT2.mjs} +2 -2
- package/.output/server/_ssr/{TargetDisplay-CcNoERcA.mjs → TargetDisplay-BQ3rf-jt.mjs} +3 -3
- package/.output/server/_ssr/{alert-dialog-Cneyp4SL.mjs → alert-dialog-DZfV4jo0.mjs} +1 -1
- package/.output/server/_ssr/{api-D1iTDB8X.mjs → api-C3S89RIl.mjs} +3 -3
- package/.output/server/_ssr/{api-keys-BmByedx3.mjs → api-keys-DhgkyA5L.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-rpc-De0gejNE.mjs → api-keys-rpc-PnrzjW84.mjs} +3 -3
- package/.output/server/_ssr/{api-keys-L22cEsbx.mjs → api-keys-tydhn1tu.mjs} +9 -9
- package/.output/server/_ssr/{api-rpc-CLUkjEzc.mjs → api-rpc-D8qYGyez.mjs} +7 -7
- package/.output/server/_ssr/{auth-rpc-BR35Xq9A.mjs → auth-rpc-rMdoXrTW.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-DGB_iSU1.mjs → auth.server-YE2ZZC0j.mjs} +2 -2
- package/.output/server/_ssr/{badge-Cr_XmvdA.mjs → badge-NON1cyRV.mjs} +1 -1
- package/.output/server/_ssr/{card-DmZaoqKT.mjs → card-CVw7zPaM.mjs} +1 -1
- package/.output/server/_ssr/{config.server-B5Dghtv-.mjs → config.server-BYkojQAW.mjs} +3 -3
- package/.output/server/_ssr/{console-access-GUnQkD3j.mjs → console-access-CRyGs-sb.mjs} +2 -2
- package/.output/server/_ssr/{console-features-api-rDUY2XrP.mjs → console-features-api-DwbIx8oM.mjs} +3 -3
- package/.output/server/_ssr/{console-features-rpc-BJrkm9dz.mjs → console-features-rpc-erZu7BIN.mjs} +3 -3
- package/.output/server/_ssr/{dialog-BvTfEtqZ.mjs → dialog-ZuUCxUNo.mjs} +1 -1
- package/.output/server/_ssr/{empty-DD6BahGF.mjs → empty-4FbiMhrz.mjs} +2 -2
- package/.output/server/_ssr/{field-BTahddUR.mjs → field-B9YWRLoo.mjs} +2 -2
- package/.output/server/_ssr/{input-group-DtCeEJ9x.mjs → input-group-sETcyyLC.mjs} +1 -1
- package/.output/server/_ssr/{insights-ChiX0NMe.mjs → insights-BjtOex57.mjs} +19 -19
- package/.output/server/_ssr/{insights-DMnvHO-N.mjs → insights-CkJWItoo.mjs} +2 -2
- package/.output/server/_ssr/{insights-BKG9fP-a.mjs → insights-K6CFztcF.mjs} +5 -5
- package/.output/server/_ssr/{insights-api-Cpr7F9Zq.mjs → insights-api-9jE9dp-3.mjs} +3 -3
- package/.output/server/_ssr/{insights-failures-rpc-ClIZ5YAr.mjs → insights-failures-rpc-XxbDFtKo.mjs} +4 -4
- package/.output/server/_ssr/{insights-recovery-rpc-9vTxL0b9.mjs → insights-recovery-rpc-CFeoyZEw.mjs} +3 -3
- package/.output/server/_ssr/{insights-rpc-ntVL4dMr.mjs → insights-rpc-TAS-cemx.mjs} +3 -3
- package/.output/server/_ssr/{insights-search-BDC6qL_N.mjs → insights-search-DL8LLP6s.mjs} +2 -2
- package/.output/server/_ssr/{insights-usage-rpc-B3tWIvs7.mjs → insights-usage-rpc-CrAA5_Wn.mjs} +3 -3
- package/.output/server/_ssr/{insights-usage-rpc-D1AH4wIp.mjs → insights-usage-rpc-DGSVT5eB.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-Bs9C7zLO.mjs → insights_.distribution-C9nMSRtr.mjs} +5 -5
- package/.output/server/_ssr/{insights_.distribution-16p6uw87.mjs → insights_.distribution-CK5_wfLT.mjs} +2 -2
- package/.output/server/_ssr/{insights_.distribution-BQyY6j-B.mjs → insights_.distribution-DDr3vglh.mjs} +13 -13
- package/.output/server/_ssr/{installations-DD36dmtY.mjs → installations-BvGL_EXM.mjs} +2 -2
- package/.output/server/_ssr/{installations-BjPcHbsA.mjs → installations-CRHGd6SX.mjs} +4 -4
- package/.output/server/_ssr/{installations-DkAGd1RB.mjs → installations-CWutybSC.mjs} +11 -11
- package/.output/server/_ssr/{ios-devices-rpc-CUe5hM5d.mjs → ios-devices-rpc-CCx4TvyR.mjs} +7 -7
- package/.output/server/_ssr/{iosDeviceCookie-DeLAGIDy.mjs → iosDeviceCookie-B3FPj65l.mjs} +3 -3
- package/.output/server/_ssr/{iosDeviceProfile-DEhxhqB1.mjs → iosDeviceProfile-Cclrfk8N.mjs} +2 -2
- package/.output/server/_ssr/{iosDevices-DC6OSIpz.mjs → iosDevices-DMXaKH8F.mjs} +2 -2
- package/.output/server/_ssr/{native-builds-83NqyJmR.mjs → native-builds-BGDsGYAp.mjs} +2 -2
- package/.output/server/_ssr/{native-builds-BVCLjZy3.mjs → native-builds-BPiSm8HX.mjs} +14 -14
- package/.output/server/_ssr/{native-builds_._buildId-CW246wU-.mjs → native-builds_._buildId-B749BEMp.mjs} +15 -15
- package/.output/server/_ssr/{native-builds_._buildId-Dz3ZOBO4.mjs → native-builds_._buildId-CS9w0JIp.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_.devices-BcgwCDYe.mjs → native-builds_.devices-BPT8_91w.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_.devices-Cb1j7l0p.mjs → native-builds_.devices-w_jDlH8K.mjs} +15 -15
- package/.output/server/_ssr/{nativeBuildDownloadLink-S98Fp4EL.mjs → nativeBuildDownloadLink-CXibRgym.mjs} +2 -2
- package/.output/server/_ssr/{nativeBuildInstall-CGx9_h9k.mjs → nativeBuildInstall-BLuyTfXE.mjs} +3 -3
- package/.output/server/_ssr/{release-adoption-rpc-CH1S7Q72.mjs → release-adoption-rpc-DOdELZNl.mjs} +5 -5
- package/.output/server/_ssr/{remote-config-B37Kf8E_.mjs → remote-config-C5mPNt0s.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-D5eSR-Oj.mjs → remote-config-DuOo-AFR.mjs} +17 -17
- package/.output/server/_ssr/{remote-config-rpc-C47nnyek.mjs → remote-config-rpc-rEe5HBxX.mjs} +3 -3
- package/.output/server/_ssr/{remote-config-Bt9nmY6h.mjs → remote-config-xbBIsBh1.mjs} +2 -2
- package/.output/server/_ssr/{router-CHveNRca.mjs → router-Bc5Zx-dc.mjs} +32 -32
- package/.output/server/_ssr/{routes-Dfa8uOh-.mjs → routes-CUQ96XR2.mjs} +8 -8
- package/.output/server/_ssr/{routes-t2IGGOuQ.mjs → routes-DCOnxOlA.mjs} +21 -21
- package/.output/server/_ssr/{schema-migration-rpc-LvcWmZNf.mjs → schema-migration-rpc-DK_ceMAg.mjs} +3 -3
- package/.output/server/_ssr/{select-BM4VyXJ2.mjs → select-dGQiTkaZ.mjs} +1 -1
- package/.output/server/_ssr/{server-ChOocPzQ.mjs → server-l-C5qBnr.mjs} +3 -3
- package/.output/server/_ssr/{sidebar-DaVgRP2d.mjs → sidebar-Ccd4WNjQ.mjs} +12 -5
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{switch-BSixbqb5.mjs → switch-CC7UK0Nw.mjs} +2 -2
- package/.output/server/_ssr/{table-DIgStkYT.mjs → table-BAlgZdxo.mjs} +1 -1
- package/.output/server/_ssr/{tabs-BcBESH4i.mjs → tabs-Bm7PWhQk.mjs} +2 -2
- package/.output/server/_tanstack-start-manifest_v-C_zDNaKT.mjs +223 -0
- package/.output/server/index.mjs +381 -381
- package/package.json +7 -7
- package/src/components/features/insights/InsightsPageHeader.tsx +10 -15
- package/src/components/ui/button.tsx +11 -2
- package/.output/public/assets/InsightsPageHeader-C7BMHQtN.js +0 -1
- package/.output/public/assets/api-keys-BhEu-4kH.js +0 -1
- package/.output/public/assets/arrow-left-CxxDwBQs.js +0 -1
- package/.output/public/assets/arrow-right-jHG0fJt7.js +0 -1
- package/.output/public/assets/arrow-up-right-BPRe5soE.js +0 -1
- package/.output/public/assets/check-Dz_5aNwx.js +0 -1
- package/.output/public/assets/chevron-right-CuYrscDY.js +0 -1
- package/.output/public/assets/insights-Cl7F_W3G.js +0 -1
- package/.output/public/assets/insights-Z2S8xvnR.js +0 -2
- package/.output/public/assets/insights_.distribution-BYakpdgY.js +0 -2
- package/.output/public/assets/insights_.distribution-D9yFYdru.js +0 -1
- package/.output/public/assets/installations-D758kWNf.js +0 -1
- package/.output/public/assets/loader-circle-BUfUHW-o.js +0 -1
- package/.output/public/assets/native-builds-CnaQgVq6.js +0 -2
- package/.output/public/assets/native-builds_._buildId-D-eAGzXZ.js +0 -2
- package/.output/public/assets/native-builds_.devices-D8CsVAuR.js +0 -2
- package/.output/public/assets/plus-CNhNPLpx.js +0 -1
- package/.output/public/assets/remote-config-Bt6V_XHg.js +0 -1
- package/.output/public/assets/remote-config-CSJSQdOv.js +0 -1
- package/.output/public/assets/search-C9QXSW-Z.js +0 -1
- package/.output/public/assets/sidebar-UnsNYOry.js +0 -3
- package/.output/public/assets/smartphone-NAD6OBaK.js +0 -1
- package/.output/server/_tanstack-start-manifest_v-CR_uX94i.mjs +0 -223
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,Br as t,Di as n,Ri as r,Vi as i,_r as a,et as o,gr as s,vr as c}from"./sidebar-UnsNYOry.js";import{h as l,i as u,m as d,t as f}from"./link-D95E0fwF.js";import{c as p,s as m}from"./preload-helper-52zhjEsw.js";import{a as h,n as g,o as _,r as v,t as y}from"./EventDetails-C7rnoh47.js";import{t as b}from"./arrow-left-CxxDwBQs.js";import{t as x}from"./arrow-up-right-BPRe5soE.js";import{a as S,c as C,i as w,l as T,n as E,o as ee,r as te}from"./insights-api-CXXCRZhF.js";import{t as D}from"./check-Dz_5aNwx.js";import{a as O}from"./useCompositeListItem-B9ONn9qn.js";import{r as k}from"./dist-Dh2hrHKj.js";import{i as A,n as j,r as M,t as N}from"./input-group-cEQZv88S.js";import{t as P}from"./search-C9QXSW-Z.js";import{a as F,n as I,o as L,r as R,t as z}from"./card-CHIqYgB7.js";import{a as ne,t as re}from"./field-BHPxgJmr.js";import{a as B,i as ie,n as ae,o as oe,r as se,t as ce}from"./installations-BryK0NqR.js";import{a as V,i as H,n as le,o as U,r as W,t as G}from"./table-tm9RvUbS.js";import{n as ue,t as K}from"./HashValueDisplay-DDz2Ecy7.js";import{a as de,c as q,n as fe,r as pe,t as me}from"./InsightsPageHeader-C7BMHQtN.js";function he(){l(u(),!0)}function ge(e){return he(),d(u(),e)}function _e(e){let t=u();return p(t.stores.location,m(e,t))}var J=i(r(),1),Y=n();function ve({events:e,formatter:t,renderIdentity:n}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`p`,{className:`px-4 pb-2 text-xs text-muted-foreground sm:px-6`,children:`Time in your browser zone`}),(0,Y.jsx)(`ol`,{"aria-label":`Events`,className:`divide-y border-y`,children:e.map(e=>(0,Y.jsxs)(`li`,{className:`flex min-w-0 flex-col gap-3 px-4 py-4 sm:px-6`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-1`,children:[(0,Y.jsx)(v,{event:e}),(0,Y.jsx)(`div`,{className:`text-xs tabular-nums`,children:(0,Y.jsx)(g,{value:e.receivedAtMs,formatter:t,touch:!0})})]}),n?.(e),(0,Y.jsxs)(`dl`,{className:`flex flex-wrap gap-x-2 gap-y-1 text-sm`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`dt`,{className:`sr-only`,children:`App`}),(0,Y.jsxs)(`dd`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]})]}),(0,Y.jsxs)(`div`,{className:`min-w-0 text-muted-foreground`,children:[(0,Y.jsx)(`dt`,{className:`sr-only`,children:`Channel`}),(0,Y.jsx)(`dd`,{className:`wrap-anywhere`,children:e.channel})]})]}),(0,Y.jsx)(`div`,{className:`text-xs`,"aria-label":`Bundle`,children:(0,Y.jsx)(y,{event:e,touch:!0})})]},e.id))})]})}function X({hasPrevious:e,label:t,nextCursor:n,onNext:r,onPrevious:i,pageLength:a,pageNumber:o}){return(0,Y.jsxs)(`nav`,{"aria-label":`${t} pagination`,className:`flex flex-wrap items-center justify-between gap-3 border-t px-4 py-3 sm:px-6`,children:[(0,Y.jsxs)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:[`Page `,o,` · `,a.toLocaleString(),` rows`]}),(0,Y.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Y.jsx)(s,{className:`h-11 min-w-11 px-3 lg:h-8 lg:min-w-0 lg:px-2`,disabled:!e,onClick:i,size:`sm`,type:`button`,variant:`outline`,children:`Previous`}),(0,Y.jsx)(s,{className:`h-11 min-w-11 px-3 lg:h-8 lg:min-w-0 lg:px-2`,disabled:n===null,onClick:r,size:`sm`,type:`button`,variant:`outline`,children:`Next`})]})]})}var ye=e=>se.filter((t,n)=>n===0||B[t].durationMs<=e*864e5);function be({event:e,eventsLocation:t,touch:n=!1}){return(0,Y.jsxs)(`div`,{className:n?`flex min-w-0 flex-wrap items-center justify-between gap-2`:`flex min-w-0 flex-col items-start gap-2`,children:[(0,Y.jsxs)(f,{className:a({className:n?`-ml-2 h-auto min-h-11 min-w-0 flex-1 justify-start gap-2 whitespace-normal text-sm`:`-ml-2 max-w-full justify-start`,size:`sm`,variant:`ghost`}),to:`/installations`,search:{...t,query:e.installId||void 0,installId:e.installId},state:e=>({insightsPagination:{eventsBack:e.insightsPagination?.eventsBack}}),"aria-label":`View history for ${e.userId??`anonymous installation`} (${e.installId})`,children:[(0,Y.jsx)(`span`,{className:n?`min-w-0 text-left wrap-anywhere`:`truncate`,children:e.userId??`Anonymous installation`}),(0,Y.jsx)(x,{"aria-hidden":`true`,"data-icon":`inline-end`})]}),(0,Y.jsx)(K,{value:e.installId,maxLength:13,buttonClassName:n?`min-h-11 px-3`:void 0})]})}function xe({children:t,description:n,error:r,eventsLocation:i,history:a,isFetching:o,isLoading:c,onNext:l,onPrevious:u,onRangeChange:d,onRefresh:f,pageNumber:p,range:m,rawDays:h=90,title:b=`All events`}){let x=_(),S=p>1,C=ye(h),w=m===void 0?void 0:oe(m),T=w!==void 0&&C.includes(w)?w:void 0,E=T!==void 0&&d?(0,Y.jsx)(s,{className:`h-11 px-3 lg:h-8`,onClick:()=>d(T),type:`button`,variant:`outline`,children:`Show the last ${B[T].period}`}):null;return(0,Y.jsxs)(z,{className:`@container min-w-0 shadow-sm`,"aria-busy":o,children:[(0,Y.jsxs)(F,{className:`gap-4 p-4 sm:p-6`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Y.jsx)(L,{children:(0,Y.jsx)(`h2`,{children:b})}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[m!==void 0&&d?(0,Y.jsx)(de,{label:`Time range`,onPeriodChange:d,period:m,periods:C.map(e=>({value:e,name:`Last ${B[e].period}`}))}):null,(0,Y.jsxs)(s,{className:`h-11 lg:h-8`,disabled:o,onClick:f,size:`lg`,variant:`outline`,children:[(0,Y.jsx)(k,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Refresh`]})]})]}),n?(0,Y.jsx)(R,{children:n}):null]}),t]}),(0,Y.jsx)(I,{className:`min-w-0 p-0`,children:c?(0,Y.jsxs)(`div`,{className:`flex flex-col gap-4 p-6`,role:`status`,"aria-label":`Loading events`,children:[(0,Y.jsx)(e,{className:`h-12 w-full`}),(0,Y.jsx)(e,{className:`h-12 w-full`}),(0,Y.jsx)(e,{className:`h-12 w-full`})]}):r?(0,Y.jsx)(`div`,{className:`px-6 pb-6`,children:(0,Y.jsx)(q,{error:r,fallbackTitle:`Event history unavailable`})}):a?(0,Y.jsxs)(Y.Fragment,{children:[a.data.length>0?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`@[58rem]:hidden`,children:(0,Y.jsx)(ve,{events:a.data,formatter:x,renderIdentity:e=>(0,Y.jsx)(be,{event:e,eventsLocation:i,touch:!0})})}),(0,Y.jsx)(`div`,{className:`hidden @[58rem]:block`,children:(0,Y.jsxs)(G,{className:`min-w-4xl table-fixed`,children:[(0,Y.jsx)(V,{children:(0,Y.jsxs)(U,{className:`[&>th]:px-4 sm:[&>th]:px-6`,children:[(0,Y.jsx)(H,{className:`w-64`,children:`Time`}),(0,Y.jsx)(H,{className:`w-48`,children:`Event`}),(0,Y.jsx)(H,{className:`w-48`,children:`User / installation`}),(0,Y.jsx)(H,{className:`w-32`,children:`App`}),(0,Y.jsx)(H,{className:`w-52`,children:`Bundle`})]})}),(0,Y.jsx)(le,{children:a.data.map(e=>(0,Y.jsxs)(U,{className:`[&>td]:px-4 [&>td]:py-4 [&>td]:align-top sm:[&>td]:px-6`,children:[(0,Y.jsx)(W,{className:`whitespace-normal text-xs tabular-nums`,children:(0,Y.jsx)(g,{value:e.receivedAtMs,formatter:x})}),(0,Y.jsx)(W,{children:(0,Y.jsx)(v,{event:e})}),(0,Y.jsx)(W,{children:(0,Y.jsx)(be,{event:e,eventsLocation:i})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsxs)(`span`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]}),(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:e.channel})]})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsx)(y,{event:e})})]},e.id))})]})})]}):(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 px-4 pb-4 sm:px-6 sm:pb-6`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:S?`No older events in this range.`:m===void 0?b===`All events`?`No events recorded yet`:`No matching reports in this period`:`No events in the last ${B[m].period}.`}),S?null:E]}),m!==void 0&&a.nextCursor===null&&(a.data.length>0||S)?(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-t px-4 py-3 sm:px-6`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Start of range reached`}),E]}):null,a.data.length>0||S||a.nextCursor?(0,Y.jsx)(X,{hasPrevious:S,label:b,nextCursor:a.nextCursor,onNext:l,onPrevious:u,pageLength:a.data.length,pageNumber:p}):null]}):null})]})}var Se=e=>e.userId??`—`,Ce=e=>`lastKnownBundleId`in e?e.lastKnownBundleId:e.type===`UPDATE_DOWNLOADED`||e.type===`UPDATE_FAILED`?e.fromBundleId:e.toBundleId;function we({error:t,history:n,isLoading:r,onNext:i,onPrevious:a,onRefresh:c,pageNumber:l,retention:u=C,selectedEvent:d,selectedInstallId:f}){let p=_(),m=d?Ce(d):void 0,b=d&&`pendingBundleId`in d?d.pendingBundleId:d&&`type`in d&&d.type===`UPDATE_DOWNLOADED`?d.toBundleId:null;return(0,Y.jsxs)(z,{className:`@container min-h-0 min-w-0 shadow-sm`,children:[(0,Y.jsx)(F,{className:`p-4 sm:p-6`,children:(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,Y.jsx)(L,{className:`text-sm font-medium`,children:(0,Y.jsx)(`h2`,{children:f===void 0?`Select an installation`:`Installation history`})}),f===void 0?null:(0,Y.jsxs)(R,{children:[`Bundle changes and update failures are kept for`,` `,T(u.rawDays),`; the latest report, for`,` `,T(u.dailyDays),` after the installation last reports.`]})]}),c&&f!==void 0?(0,Y.jsxs)(s,{className:`h-11 lg:h-8`,size:`lg`,variant:`outline`,onClick:c,disabled:r,children:[(0,Y.jsx)(k,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Refresh`]}):null]})}),(0,Y.jsxs)(I,{className:`min-h-0 p-0`,children:[f!==void 0&&d?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`section`,{"aria-labelledby":`latest-installation-state`,className:`px-4 pb-4 sm:px-6 sm:pb-6`,children:[(0,Y.jsx)(`h3`,{className:`sr-only`,id:`latest-installation-state`,children:`Latest reported state`}),(0,Y.jsxs)(`dl`,{className:`grid grid-cols-2 gap-4 @[36rem]:grid-cols-3`,children:[(0,Y.jsxs)(`div`,{className:`col-span-2 min-w-0 @[36rem]:col-span-1`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`User ID`}),(0,Y.jsx)(`dd`,{className:`mt-1 text-sm font-medium wrap-anywhere`,children:Se(d)})]}),(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Install ID`}),(0,Y.jsx)(`dd`,{className:`mt-1 font-mono text-xs`,children:(0,Y.jsx)(K,{value:f,buttonClassName:`min-h-11 px-3 lg:min-h-0 lg:px-1.5`})})]}),(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Last known bundle`}),(0,Y.jsxs)(`dd`,{className:`mt-1 flex min-w-0 flex-wrap items-center gap-2 font-mono text-xs`,children:[m?(0,Y.jsx)(K,{value:m,buttonClassName:`min-h-11 px-3 lg:min-h-0 lg:px-1.5`}):`—`,pe(m,d.minBundleId)?(0,Y.jsx)(fe,{}):null]})]}),b?(0,Y.jsxs)(`div`,{className:`col-span-2 min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Downloaded · Not launched yet`}),(0,Y.jsx)(`dd`,{className:`mt-1 text-xs`,children:(0,Y.jsx)(K,{value:b})})]}):null]}),d.httpResponse?(0,Y.jsx)(`div`,{className:`mt-4`,children:(0,Y.jsx)(h,{event:d})}):null]}),(0,Y.jsx)(o,{})]}):null,f===void 0?null:r?(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3 p-6`,role:`status`,"aria-label":`Loading installation history`,children:[(0,Y.jsx)(e,{className:`h-10 w-full`}),(0,Y.jsx)(e,{className:`h-10 w-full`}),(0,Y.jsx)(e,{className:`h-10 w-full`})]}):t?(0,Y.jsx)(`div`,{className:`p-6`,children:(0,Y.jsx)(q,{error:t instanceof Error?t:Error(),fallbackTitle:`Installation history unavailable`})}):n&&n.data.length>0?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`@[48rem]:hidden`,children:(0,Y.jsx)(ve,{events:n.data,formatter:p})}),(0,Y.jsx)(`div`,{className:`hidden @[48rem]:block`,children:(0,Y.jsxs)(G,{className:`min-w-3xl table-fixed`,children:[(0,Y.jsx)(V,{children:(0,Y.jsxs)(U,{className:`[&>th]:px-4 sm:[&>th]:px-6`,children:[(0,Y.jsx)(H,{className:`w-64`,children:`Time`}),(0,Y.jsx)(H,{className:`w-48`,children:`Event`}),(0,Y.jsx)(H,{className:`w-32`,children:`App`}),(0,Y.jsx)(H,{className:`w-52`,children:`Bundle`})]})}),(0,Y.jsx)(le,{children:n.data.map(e=>(0,Y.jsxs)(U,{className:`[&>td]:px-4 [&>td]:py-4 [&>td]:align-top sm:[&>td]:px-6`,children:[(0,Y.jsx)(W,{className:`whitespace-normal text-xs tabular-nums`,children:(0,Y.jsx)(g,{value:e.receivedAtMs,formatter:p})}),(0,Y.jsx)(W,{children:(0,Y.jsx)(v,{event:e})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsxs)(`span`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]}),(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:e.channel})]})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsx)(y,{event:e})})]},e.id))})]})}),(0,Y.jsx)(X,{hasPrevious:l>1,label:`Installation history`,nextCursor:n.nextCursor,onNext:i,onPrevious:a,pageLength:n.data.length,pageNumber:l})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`p-6 text-sm text-muted-foreground`,children:l>1?`No older bundle changes.`:`No bundle changes recorded yet.`}),n&&(l>1||n.nextCursor)?(0,Y.jsx)(X,{hasPrevious:l>1,label:`Installation history`,nextCursor:n.nextCursor,onNext:i,onPrevious:a,pageLength:0,pageNumber:l}):null]})]})]})}var Te=e=>e.lastKnownBundleId,Ee=e=>e.userId??`—`;function De({error:e,onNext:t,onPrevious:n,onSelect:r,pageNumber:i,results:o,selectedInstallId:l}){let[u,d]=(0,J.useState)(!1),f=(0,J.useId)(),p=(0,J.useRef)(null),m=!e&&o&&o.data.length>0;return(0,Y.jsxs)(z,{className:`min-h-0 min-w-0 shadow-sm`,children:[(0,Y.jsx)(F,{className:`p-4 sm:px-6`,children:(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Y.jsx)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:(0,Y.jsx)(L,{className:`text-sm font-medium`,children:(0,Y.jsx)(`h2`,{children:`Matching installations`})})}),(0,Y.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:m?(0,Y.jsx)(s,{"aria-controls":f,"aria-expanded":u,"aria-label":u?`Hide matching installations`:`Show matching installations`,className:`size-11 lg:hidden`,onClick:()=>d(!u),ref:p,size:`icon-lg`,variant:`ghost`,children:(0,Y.jsx)(O,{"aria-hidden":`true`,className:c(u&&`rotate-180`)})}):null})]})}),(0,Y.jsxs)(I,{className:c(`min-h-0 p-0`,m&&!u&&`hidden lg:block`),id:f,children:[e?(0,Y.jsx)(`div`,{className:`p-6`,children:(0,Y.jsx)(q,{error:e instanceof Error?e:Error(),fallbackTitle:`Installation search unavailable`})}):o&&o.data.length>0?(0,Y.jsx)(`ul`,{"aria-label":`Matching installations`,className:`divide-y`,children:o.data.map(e=>{let t=Te(e),n=e.installId===l;return(0,Y.jsx)(`li`,{children:(0,Y.jsxs)(`button`,{"aria-label":`${Ee(e)}, install ID ${e.installId}`,"aria-pressed":n,className:`group flex w-full min-w-0 flex-col gap-2 border-l-2 border-transparent px-4 py-4 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:border-ring focus-visible:bg-muted/40 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/30 aria-pressed:border-primary aria-pressed:bg-muted/60 motion-reduce:transition-none sm:px-6`,onClick:()=>{r(e.installId),d(!1),p.current?.focus()},type:`button`,children:[(0,Y.jsxs)(`span`,{className:`flex w-full min-w-0 items-center justify-between gap-3`,children:[(0,Y.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium`,children:Ee(e)}),n?(0,Y.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 text-xs font-medium text-primary`,children:[(0,Y.jsx)(D,{"aria-hidden":`true`,className:`size-3.5`}),(0,Y.jsx)(`span`,{className:`sr-only`,children:`Selected`})]}):null]}),(0,Y.jsx)(`span`,{className:`flex flex-wrap items-center gap-2`,children:(0,Y.jsx)(`span`,{className:`font-mono text-xs`,title:e.installId,children:ue(e.installId)})}),(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,Y.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Bundle`}),t?(0,Y.jsx)(`span`,{className:`font-mono text-xs`,title:t,children:ue(t)}):(0,Y.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`—`})]})]})},e.installId)})}):(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 p-4 sm:px-6`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No matches`}),(0,Y.jsx)(`a`,{className:a({variant:`outline`,className:`h-11 px-3 lg:h-8`}),href:`#installation-history-search`,children:`Edit search`})]}),o&&(o.data.length>0||i>1||o.nextCursor)?(0,Y.jsx)(X,{hasPrevious:i>1,label:`Installation results`,nextCursor:o.nextCursor,onNext:t,onPrevious:n,pageLength:o.data.length,pageNumber:i}):null]})]})}function Oe({draftQuery:e,onDraftQueryChange:n,onSubmit:r,onClear:i}){return(0,Y.jsx)(`form`,{"aria-label":`Find installation`,onSubmit:t=>{t.preventDefault(),e.trim()&&r()},role:`search`,children:(0,Y.jsxs)(re,{className:`gap-2`,children:[(0,Y.jsx)(ne,{className:`sr-only`,htmlFor:`installation-history-search`,children:`User ID or installation ID`}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Y.jsxs)(N,{className:`h-11 w-auto min-w-0 flex-1 basis-44 lg:h-8`,children:[(0,Y.jsx)(j,{children:(0,Y.jsx)(P,{"aria-hidden":`true`})}),(0,Y.jsx)(A,{autoComplete:`off`,className:`h-11 text-base md:text-base lg:h-8 lg:text-xs`,id:`installation-history-search`,maxLength:1024,name:`installation`,onChange:e=>n(e.target.value),placeholder:`User ID or installation ID`,spellCheck:!1,type:`search`,value:e}),e.length>0?(0,Y.jsx)(j,{align:`inline-end`,children:(0,Y.jsx)(M,{"aria-label":`Clear installation lookup`,className:`size-11 lg:size-5`,onClick:i,size:`icon-xs`,children:(0,Y.jsx)(t,{"aria-hidden":`true`})})}):null]}),(0,Y.jsx)(s,{"aria-label":`Find installation`,className:`h-11 px-3 lg:h-8`,disabled:e.trim().length===0,size:`lg`,type:`submit`,variant:`outline`,children:`Find`})]})]})})}function ke(){return(0,Y.jsxs)(`div`,{className:`grid items-stretch gap-6 lg:min-h-96 lg:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)]`,children:[(0,Y.jsx)(e,{className:`h-64 w-full lg:h-full`}),(0,Y.jsx)(e,{className:`h-64 w-full lg:h-full`})]})}var Ae=20,je=50,Z=()=>Date.now(),Q=(e,t)=>[...e,t??``],$=e=>({cursor:e?.at(-1)||void 0,stack:e.slice(0,-1)});function Me(){let e=ce.useSearch(),t=ce.useNavigate(),n=ee(),[r,i]=(0,J.useState)(e.query??``),[a]=(0,J.useState)(Z),[o]=(0,J.useState)(Z),c=_e({select:e=>e.state.insightsPagination}),l=c?.eventsBack??[],u=c?.searchBack??[],d=c?.historyBack??[],f=e.query?.trim()??``,p=f.length>0,m=e.installId!==void 0,h=p||m,g=e.eventsBefore??a,_=e.eventsRange??`7d`,v=e.historyBefore??o,y=(n,r=!1,i={})=>{t({to:`/installations`,search:{...e,...n},state:e=>({...e,insightsPagination:{...e.insightsPagination,...i}}),replace:r})};(0,J.useEffect)(()=>{i(e.query??``)},[e.query]),(0,J.useEffect)(()=>{e.eventsBefore===void 0&&y({eventsBefore:g},!0)},[g,e.eventsBefore]),(0,J.useEffect)(()=>{m&&e.historyBefore===void 0&&y({historyBefore:v},!0)},[m,v,e.historyBefore]);let x=E({...ie(_,g),cursor:e.eventsCursor,limit:20},!h),C=S({cursor:e.searchCursor,identity:f,limit:Ae},p);(0,J.useEffect)(()=>{let e=C.data?.data[0]?.installId;!p||m||e===void 0||y({historyBefore:Z(),historyCursor:void 0,installId:e},!0,{historyBack:[]})},[p,m,C.data?.data]);let D=w(e.installId??``,m),O=te({beforeReceivedAtMs:v,cursor:e.historyCursor,installId:e.installId??``,limit:je},m),k=D.data??C.data?.data.find(({installId:t})=>t===e.installId)??O.data?.data[0],A=h?`installation-history-${e.historyCursor??`first`}`:`all-events-${e.eventsCursor??`first`}`,j=(0,J.useRef)(null),M=ge({id:A,getKey:ae});(0,J.useLayoutEffect)(()=>{!h&&!x.isLoading&&j.current&&(j.current.scrollTop=M?.scrollY??0)},[x.isLoading,h,M?.scrollY,A]);let N=()=>{i(``),y({historyBefore:void 0,historyCursor:void 0,installId:void 0,query:void 0,searchCursor:void 0},!1,{historyBack:[],searchBack:[]})},P=(0,Y.jsx)(Oe,{draftQuery:r,onClear:N,onDraftQueryChange:i,onSubmit:()=>{let e=r.trim();if(!e){N();return}y({historyBefore:void 0,historyCursor:void 0,installId:void 0,query:e,searchCursor:void 0},!1,{historyBack:[],searchBack:[]})}});return(0,Y.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,Y.jsx)(me,{view:`events`}),(0,Y.jsx)(`div`,{ref:j,"data-scroll-restoration-id":A,id:`insights-events-scroll`,className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,Y.jsxs)(`div`,{className:`mx-auto flex w-full max-w-7xl flex-col gap-4 sm:gap-6`,children:[h?(0,Y.jsx)(z,{className:`shadow-sm`,children:(0,Y.jsxs)(I,{className:`flex flex-col gap-3 p-4 sm:p-6`,children:[(0,Y.jsxs)(s,{className:`-ml-2 h-11 self-start lg:h-8`,onClick:N,variant:`ghost`,children:[(0,Y.jsx)(b,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Back to all events`]}),P]})}):null,h?C.isLoading&&p?(0,Y.jsx)(ke,{}):(0,Y.jsxs)(`div`,{className:`grid min-h-0 min-w-0 items-stretch gap-4 sm:gap-6 ${p?`lg:min-h-96 lg:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)]`:`lg:grid-cols-1`}`,children:[p?(0,Y.jsx)(De,{error:C.error,onNext:()=>{C.data?.nextCursor&&y({installId:void 0,searchCursor:C.data.nextCursor},!0,{searchBack:Q(u,e.searchCursor)})},onPrevious:()=>{let e=$(u);y({installId:void 0,searchCursor:e.cursor},!0,{searchBack:e.stack})},onSelect:e=>{y({historyBefore:Z(),historyCursor:void 0,installId:e},!1,{historyBack:[]})},pageNumber:u.length+1,results:C.data,selectedInstallId:e.installId}):null,(0,Y.jsx)(we,{error:O.error??D.error,history:O.data,isLoading:O.isLoading||D.isLoading,onNext:()=>{O.data?.nextCursor&&y({historyCursor:O.data.nextCursor},!0,{historyBack:Q(d,e.historyCursor)})},onPrevious:()=>{let e=$(d);y({historyCursor:e.cursor},!0,{historyBack:e.stack})},onRefresh:()=>{y({historyBefore:Z(),historyCursor:void 0},!0,{historyBack:[]})},pageNumber:d.length+1,retention:n,selectedEvent:k,selectedInstallId:e.installId})]}):(0,Y.jsx)(xe,{description:`Downloads, launches, crashes, update failures, and other changes to what an installation runs, newest first, kept for ${T(n.rawDays)}. Launches that change nothing aren't listed.`,error:x.error,eventsLocation:{eventsBefore:g,eventsCursor:e.eventsCursor,eventsRange:e.eventsRange},history:x.data,isFetching:x.isFetching,isLoading:x.isLoading,onNext:()=>{x.data?.nextCursor&&y({eventsCursor:x.data.nextCursor},!0,{eventsBack:Q(l,e.eventsCursor)})},onPrevious:()=>{let e=$(l);y({eventsCursor:e.cursor},!0,{eventsBack:e.stack})},onRangeChange:e=>{y({eventsBefore:Z(),eventsCursor:void 0,eventsRange:e},!1,{eventsBack:[]})},onRefresh:()=>{y({eventsBefore:Z(),eventsCursor:void 0},!0,{eventsBack:[]})},pageNumber:l.length+1,range:_,rawDays:n.rawDays,children:P})]})},A)]})}export{Me as component};
|
|
1
|
+
import{$ as e,Br as t,Di as n,Ri as r,Vi as i,_r as a,et as o,gr as s,vr as c}from"./sidebar-BmzmPGuv.js";import{h as l,i as u,m as d,t as f}from"./link-CRMwpc7-.js";import{c as p,s as m}from"./preload-helper-CE9OukVC.js";import{a as h,n as g,o as _,r as v,t as y}from"./EventDetails-BdqU96Wu.js";import{t as b}from"./arrow-left-68S4uy4I.js";import{t as x}from"./arrow-up-right-C_1ALUCD.js";import{a as S,c as C,i as w,l as T,n as E,o as ee,r as te}from"./insights-api-D4-FZeEI.js";import{t as D}from"./check-C3VCvMOV.js";import{a as O}from"./useCompositeListItem-Cbk_weKW.js";import{r as k}from"./dist-BEmib-ZM.js";import{i as A,n as j,r as M,t as N}from"./input-group-CPboh0Rx.js";import{t as P}from"./search-BfEqtE64.js";import{a as F,n as I,o as L,r as R,t as z}from"./card-pYZSDIxg.js";import{a as ne,t as re}from"./field-BiSGCVoS.js";import{a as B,i as ie,n as ae,o as oe,r as se,t as ce}from"./installations-ClsF2q6A.js";import{a as V,i as H,n as le,o as U,r as W,t as G}from"./table-Bo1jU9-v.js";import{n as ue,t as K}from"./HashValueDisplay-BHL4xWSY.js";import{a as de,c as q,n as fe,r as pe,t as me}from"./InsightsPageHeader-D0Nxcccp.js";function he(){l(u(),!0)}function ge(e){return he(),d(u(),e)}function _e(e){let t=u();return p(t.stores.location,m(e,t))}var J=i(r(),1),Y=n();function ve({events:e,formatter:t,renderIdentity:n}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`p`,{className:`px-4 pb-2 text-xs text-muted-foreground sm:px-6`,children:`Time in your browser zone`}),(0,Y.jsx)(`ol`,{"aria-label":`Events`,className:`divide-y border-y`,children:e.map(e=>(0,Y.jsxs)(`li`,{className:`flex min-w-0 flex-col gap-3 px-4 py-4 sm:px-6`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-1`,children:[(0,Y.jsx)(v,{event:e}),(0,Y.jsx)(`div`,{className:`text-xs tabular-nums`,children:(0,Y.jsx)(g,{value:e.receivedAtMs,formatter:t,touch:!0})})]}),n?.(e),(0,Y.jsxs)(`dl`,{className:`flex flex-wrap gap-x-2 gap-y-1 text-sm`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`dt`,{className:`sr-only`,children:`App`}),(0,Y.jsxs)(`dd`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]})]}),(0,Y.jsxs)(`div`,{className:`min-w-0 text-muted-foreground`,children:[(0,Y.jsx)(`dt`,{className:`sr-only`,children:`Channel`}),(0,Y.jsx)(`dd`,{className:`wrap-anywhere`,children:e.channel})]})]}),(0,Y.jsx)(`div`,{className:`text-xs`,"aria-label":`Bundle`,children:(0,Y.jsx)(y,{event:e,touch:!0})})]},e.id))})]})}function X({hasPrevious:e,label:t,nextCursor:n,onNext:r,onPrevious:i,pageLength:a,pageNumber:o}){return(0,Y.jsxs)(`nav`,{"aria-label":`${t} pagination`,className:`flex flex-wrap items-center justify-between gap-3 border-t px-4 py-3 sm:px-6`,children:[(0,Y.jsxs)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:[`Page `,o,` · `,a.toLocaleString(),` rows`]}),(0,Y.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Y.jsx)(s,{className:`h-11 min-w-11 px-3 lg:h-8 lg:min-w-0 lg:px-2`,disabled:!e,onClick:i,size:`sm`,type:`button`,variant:`outline`,children:`Previous`}),(0,Y.jsx)(s,{className:`h-11 min-w-11 px-3 lg:h-8 lg:min-w-0 lg:px-2`,disabled:n===null,onClick:r,size:`sm`,type:`button`,variant:`outline`,children:`Next`})]})]})}var ye=e=>se.filter((t,n)=>n===0||B[t].durationMs<=e*864e5);function be({event:e,eventsLocation:t,touch:n=!1}){return(0,Y.jsxs)(`div`,{className:n?`flex min-w-0 flex-wrap items-center justify-between gap-2`:`flex min-w-0 flex-col items-start gap-2`,children:[(0,Y.jsxs)(f,{className:a({className:n?`-ml-2 h-auto min-h-11 min-w-0 flex-1 justify-start gap-2 whitespace-normal text-sm`:`-ml-2 max-w-full justify-start`,size:`sm`,variant:`ghost`}),to:`/installations`,search:{...t,query:e.installId||void 0,installId:e.installId},state:e=>({insightsPagination:{eventsBack:e.insightsPagination?.eventsBack}}),"aria-label":`View history for ${e.userId??`anonymous installation`} (${e.installId})`,children:[(0,Y.jsx)(`span`,{className:n?`min-w-0 text-left wrap-anywhere`:`truncate`,children:e.userId??`Anonymous installation`}),(0,Y.jsx)(x,{"aria-hidden":`true`,"data-icon":`inline-end`})]}),(0,Y.jsx)(K,{value:e.installId,maxLength:13,buttonClassName:n?`min-h-11 px-3`:void 0})]})}function xe({children:t,description:n,error:r,eventsLocation:i,history:a,isFetching:o,isLoading:c,onNext:l,onPrevious:u,onRangeChange:d,onRefresh:f,pageNumber:p,range:m,rawDays:h=90,title:b=`All events`}){let x=_(),S=p>1,C=ye(h),w=m===void 0?void 0:oe(m),T=w!==void 0&&C.includes(w)?w:void 0,E=T!==void 0&&d?(0,Y.jsx)(s,{className:`h-11 px-3 lg:h-8`,onClick:()=>d(T),type:`button`,variant:`outline`,children:`Show the last ${B[T].period}`}):null;return(0,Y.jsxs)(z,{className:`@container min-w-0 shadow-sm`,"aria-busy":o,children:[(0,Y.jsxs)(F,{className:`gap-4 p-4 sm:p-6`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Y.jsx)(L,{children:(0,Y.jsx)(`h2`,{children:b})}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[m!==void 0&&d?(0,Y.jsx)(de,{label:`Time range`,onPeriodChange:d,period:m,periods:C.map(e=>({value:e,name:`Last ${B[e].period}`}))}):null,(0,Y.jsxs)(s,{className:`h-11 lg:h-8`,disabled:o,onClick:f,size:`lg`,variant:`outline`,children:[(0,Y.jsx)(k,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Refresh`]})]})]}),n?(0,Y.jsx)(R,{children:n}):null]}),t]}),(0,Y.jsx)(I,{className:`min-w-0 p-0`,children:c?(0,Y.jsxs)(`div`,{className:`flex flex-col gap-4 p-6`,role:`status`,"aria-label":`Loading events`,children:[(0,Y.jsx)(e,{className:`h-12 w-full`}),(0,Y.jsx)(e,{className:`h-12 w-full`}),(0,Y.jsx)(e,{className:`h-12 w-full`})]}):r?(0,Y.jsx)(`div`,{className:`px-6 pb-6`,children:(0,Y.jsx)(q,{error:r,fallbackTitle:`Event history unavailable`})}):a?(0,Y.jsxs)(Y.Fragment,{children:[a.data.length>0?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`@[58rem]:hidden`,children:(0,Y.jsx)(ve,{events:a.data,formatter:x,renderIdentity:e=>(0,Y.jsx)(be,{event:e,eventsLocation:i,touch:!0})})}),(0,Y.jsx)(`div`,{className:`hidden @[58rem]:block`,children:(0,Y.jsxs)(G,{className:`min-w-4xl table-fixed`,children:[(0,Y.jsx)(V,{children:(0,Y.jsxs)(U,{className:`[&>th]:px-4 sm:[&>th]:px-6`,children:[(0,Y.jsx)(H,{className:`w-64`,children:`Time`}),(0,Y.jsx)(H,{className:`w-48`,children:`Event`}),(0,Y.jsx)(H,{className:`w-48`,children:`User / installation`}),(0,Y.jsx)(H,{className:`w-32`,children:`App`}),(0,Y.jsx)(H,{className:`w-52`,children:`Bundle`})]})}),(0,Y.jsx)(le,{children:a.data.map(e=>(0,Y.jsxs)(U,{className:`[&>td]:px-4 [&>td]:py-4 [&>td]:align-top sm:[&>td]:px-6`,children:[(0,Y.jsx)(W,{className:`whitespace-normal text-xs tabular-nums`,children:(0,Y.jsx)(g,{value:e.receivedAtMs,formatter:x})}),(0,Y.jsx)(W,{children:(0,Y.jsx)(v,{event:e})}),(0,Y.jsx)(W,{children:(0,Y.jsx)(be,{event:e,eventsLocation:i})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsxs)(`span`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]}),(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:e.channel})]})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsx)(y,{event:e})})]},e.id))})]})})]}):(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 px-4 pb-4 sm:px-6 sm:pb-6`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:S?`No older events in this range.`:m===void 0?b===`All events`?`No events recorded yet`:`No matching reports in this period`:`No events in the last ${B[m].period}.`}),S?null:E]}),m!==void 0&&a.nextCursor===null&&(a.data.length>0||S)?(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-t px-4 py-3 sm:px-6`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Start of range reached`}),E]}):null,a.data.length>0||S||a.nextCursor?(0,Y.jsx)(X,{hasPrevious:S,label:b,nextCursor:a.nextCursor,onNext:l,onPrevious:u,pageLength:a.data.length,pageNumber:p}):null]}):null})]})}var Se=e=>e.userId??`—`,Ce=e=>`lastKnownBundleId`in e?e.lastKnownBundleId:e.type===`UPDATE_DOWNLOADED`||e.type===`UPDATE_FAILED`?e.fromBundleId:e.toBundleId;function we({error:t,history:n,isLoading:r,onNext:i,onPrevious:a,onRefresh:c,pageNumber:l,retention:u=C,selectedEvent:d,selectedInstallId:f}){let p=_(),m=d?Ce(d):void 0,b=d&&`pendingBundleId`in d?d.pendingBundleId:d&&`type`in d&&d.type===`UPDATE_DOWNLOADED`?d.toBundleId:null;return(0,Y.jsxs)(z,{className:`@container min-h-0 min-w-0 shadow-sm`,children:[(0,Y.jsx)(F,{className:`p-4 sm:p-6`,children:(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,Y.jsx)(L,{className:`text-sm font-medium`,children:(0,Y.jsx)(`h2`,{children:f===void 0?`Select an installation`:`Installation history`})}),f===void 0?null:(0,Y.jsxs)(R,{children:[`Bundle changes and update failures are kept for`,` `,T(u.rawDays),`; the latest report, for`,` `,T(u.dailyDays),` after the installation last reports.`]})]}),c&&f!==void 0?(0,Y.jsxs)(s,{className:`h-11 lg:h-8`,size:`lg`,variant:`outline`,onClick:c,disabled:r,children:[(0,Y.jsx)(k,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Refresh`]}):null]})}),(0,Y.jsxs)(I,{className:`min-h-0 p-0`,children:[f!==void 0&&d?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`section`,{"aria-labelledby":`latest-installation-state`,className:`px-4 pb-4 sm:px-6 sm:pb-6`,children:[(0,Y.jsx)(`h3`,{className:`sr-only`,id:`latest-installation-state`,children:`Latest reported state`}),(0,Y.jsxs)(`dl`,{className:`grid grid-cols-2 gap-4 @[36rem]:grid-cols-3`,children:[(0,Y.jsxs)(`div`,{className:`col-span-2 min-w-0 @[36rem]:col-span-1`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`User ID`}),(0,Y.jsx)(`dd`,{className:`mt-1 text-sm font-medium wrap-anywhere`,children:Se(d)})]}),(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Install ID`}),(0,Y.jsx)(`dd`,{className:`mt-1 font-mono text-xs`,children:(0,Y.jsx)(K,{value:f,buttonClassName:`min-h-11 px-3 lg:min-h-0 lg:px-1.5`})})]}),(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Last known bundle`}),(0,Y.jsxs)(`dd`,{className:`mt-1 flex min-w-0 flex-wrap items-center gap-2 font-mono text-xs`,children:[m?(0,Y.jsx)(K,{value:m,buttonClassName:`min-h-11 px-3 lg:min-h-0 lg:px-1.5`}):`—`,pe(m,d.minBundleId)?(0,Y.jsx)(fe,{}):null]})]}),b?(0,Y.jsxs)(`div`,{className:`col-span-2 min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Downloaded · Not launched yet`}),(0,Y.jsx)(`dd`,{className:`mt-1 text-xs`,children:(0,Y.jsx)(K,{value:b})})]}):null]}),d.httpResponse?(0,Y.jsx)(`div`,{className:`mt-4`,children:(0,Y.jsx)(h,{event:d})}):null]}),(0,Y.jsx)(o,{})]}):null,f===void 0?null:r?(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3 p-6`,role:`status`,"aria-label":`Loading installation history`,children:[(0,Y.jsx)(e,{className:`h-10 w-full`}),(0,Y.jsx)(e,{className:`h-10 w-full`}),(0,Y.jsx)(e,{className:`h-10 w-full`})]}):t?(0,Y.jsx)(`div`,{className:`p-6`,children:(0,Y.jsx)(q,{error:t instanceof Error?t:Error(),fallbackTitle:`Installation history unavailable`})}):n&&n.data.length>0?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`@[48rem]:hidden`,children:(0,Y.jsx)(ve,{events:n.data,formatter:p})}),(0,Y.jsx)(`div`,{className:`hidden @[48rem]:block`,children:(0,Y.jsxs)(G,{className:`min-w-3xl table-fixed`,children:[(0,Y.jsx)(V,{children:(0,Y.jsxs)(U,{className:`[&>th]:px-4 sm:[&>th]:px-6`,children:[(0,Y.jsx)(H,{className:`w-64`,children:`Time`}),(0,Y.jsx)(H,{className:`w-48`,children:`Event`}),(0,Y.jsx)(H,{className:`w-32`,children:`App`}),(0,Y.jsx)(H,{className:`w-52`,children:`Bundle`})]})}),(0,Y.jsx)(le,{children:n.data.map(e=>(0,Y.jsxs)(U,{className:`[&>td]:px-4 [&>td]:py-4 [&>td]:align-top sm:[&>td]:px-6`,children:[(0,Y.jsx)(W,{className:`whitespace-normal text-xs tabular-nums`,children:(0,Y.jsx)(g,{value:e.receivedAtMs,formatter:p})}),(0,Y.jsx)(W,{children:(0,Y.jsx)(v,{event:e})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsxs)(`span`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]}),(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:e.channel})]})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsx)(y,{event:e})})]},e.id))})]})}),(0,Y.jsx)(X,{hasPrevious:l>1,label:`Installation history`,nextCursor:n.nextCursor,onNext:i,onPrevious:a,pageLength:n.data.length,pageNumber:l})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`p-6 text-sm text-muted-foreground`,children:l>1?`No older bundle changes.`:`No bundle changes recorded yet.`}),n&&(l>1||n.nextCursor)?(0,Y.jsx)(X,{hasPrevious:l>1,label:`Installation history`,nextCursor:n.nextCursor,onNext:i,onPrevious:a,pageLength:0,pageNumber:l}):null]})]})]})}var Te=e=>e.lastKnownBundleId,Ee=e=>e.userId??`—`;function De({error:e,onNext:t,onPrevious:n,onSelect:r,pageNumber:i,results:o,selectedInstallId:l}){let[u,d]=(0,J.useState)(!1),f=(0,J.useId)(),p=(0,J.useRef)(null),m=!e&&o&&o.data.length>0;return(0,Y.jsxs)(z,{className:`min-h-0 min-w-0 shadow-sm`,children:[(0,Y.jsx)(F,{className:`p-4 sm:px-6`,children:(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Y.jsx)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:(0,Y.jsx)(L,{className:`text-sm font-medium`,children:(0,Y.jsx)(`h2`,{children:`Matching installations`})})}),(0,Y.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:m?(0,Y.jsx)(s,{"aria-controls":f,"aria-expanded":u,"aria-label":u?`Hide matching installations`:`Show matching installations`,className:`size-11 lg:hidden`,onClick:()=>d(!u),ref:p,size:`icon-lg`,variant:`ghost`,children:(0,Y.jsx)(O,{"aria-hidden":`true`,className:c(u&&`rotate-180`)})}):null})]})}),(0,Y.jsxs)(I,{className:c(`min-h-0 p-0`,m&&!u&&`hidden lg:block`),id:f,children:[e?(0,Y.jsx)(`div`,{className:`p-6`,children:(0,Y.jsx)(q,{error:e instanceof Error?e:Error(),fallbackTitle:`Installation search unavailable`})}):o&&o.data.length>0?(0,Y.jsx)(`ul`,{"aria-label":`Matching installations`,className:`divide-y`,children:o.data.map(e=>{let t=Te(e),n=e.installId===l;return(0,Y.jsx)(`li`,{children:(0,Y.jsxs)(`button`,{"aria-label":`${Ee(e)}, install ID ${e.installId}`,"aria-pressed":n,className:`group flex w-full min-w-0 flex-col gap-2 border-l-2 border-transparent px-4 py-4 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:border-ring focus-visible:bg-muted/40 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/30 aria-pressed:border-primary aria-pressed:bg-muted/60 motion-reduce:transition-none sm:px-6`,onClick:()=>{r(e.installId),d(!1),p.current?.focus()},type:`button`,children:[(0,Y.jsxs)(`span`,{className:`flex w-full min-w-0 items-center justify-between gap-3`,children:[(0,Y.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium`,children:Ee(e)}),n?(0,Y.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 text-xs font-medium text-primary`,children:[(0,Y.jsx)(D,{"aria-hidden":`true`,className:`size-3.5`}),(0,Y.jsx)(`span`,{className:`sr-only`,children:`Selected`})]}):null]}),(0,Y.jsx)(`span`,{className:`flex flex-wrap items-center gap-2`,children:(0,Y.jsx)(`span`,{className:`font-mono text-xs`,title:e.installId,children:ue(e.installId)})}),(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,Y.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Bundle`}),t?(0,Y.jsx)(`span`,{className:`font-mono text-xs`,title:t,children:ue(t)}):(0,Y.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`—`})]})]})},e.installId)})}):(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 p-4 sm:px-6`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No matches`}),(0,Y.jsx)(`a`,{className:a({variant:`outline`,className:`h-11 px-3 lg:h-8`}),href:`#installation-history-search`,children:`Edit search`})]}),o&&(o.data.length>0||i>1||o.nextCursor)?(0,Y.jsx)(X,{hasPrevious:i>1,label:`Installation results`,nextCursor:o.nextCursor,onNext:t,onPrevious:n,pageLength:o.data.length,pageNumber:i}):null]})]})}function Oe({draftQuery:e,onDraftQueryChange:n,onSubmit:r,onClear:i}){return(0,Y.jsx)(`form`,{"aria-label":`Find installation`,onSubmit:t=>{t.preventDefault(),e.trim()&&r()},role:`search`,children:(0,Y.jsxs)(re,{className:`gap-2`,children:[(0,Y.jsx)(ne,{className:`sr-only`,htmlFor:`installation-history-search`,children:`User ID or installation ID`}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Y.jsxs)(N,{className:`h-11 w-auto min-w-0 flex-1 basis-44 lg:h-8`,children:[(0,Y.jsx)(j,{children:(0,Y.jsx)(P,{"aria-hidden":`true`})}),(0,Y.jsx)(A,{autoComplete:`off`,className:`h-11 text-base md:text-base lg:h-8 lg:text-xs`,id:`installation-history-search`,maxLength:1024,name:`installation`,onChange:e=>n(e.target.value),placeholder:`User ID or installation ID`,spellCheck:!1,type:`search`,value:e}),e.length>0?(0,Y.jsx)(j,{align:`inline-end`,children:(0,Y.jsx)(M,{"aria-label":`Clear installation lookup`,className:`size-11 lg:size-5`,onClick:i,size:`icon-xs`,children:(0,Y.jsx)(t,{"aria-hidden":`true`})})}):null]}),(0,Y.jsx)(s,{"aria-label":`Find installation`,className:`h-11 px-3 lg:h-8`,disabled:e.trim().length===0,size:`lg`,type:`submit`,variant:`outline`,children:`Find`})]})]})})}function ke(){return(0,Y.jsxs)(`div`,{className:`grid items-stretch gap-6 lg:min-h-96 lg:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)]`,children:[(0,Y.jsx)(e,{className:`h-64 w-full lg:h-full`}),(0,Y.jsx)(e,{className:`h-64 w-full lg:h-full`})]})}var Ae=20,je=50,Z=()=>Date.now(),Q=(e,t)=>[...e,t??``],$=e=>({cursor:e?.at(-1)||void 0,stack:e.slice(0,-1)});function Me(){let e=ce.useSearch(),t=ce.useNavigate(),n=ee(),[r,i]=(0,J.useState)(e.query??``),[a]=(0,J.useState)(Z),[o]=(0,J.useState)(Z),c=_e({select:e=>e.state.insightsPagination}),l=c?.eventsBack??[],u=c?.searchBack??[],d=c?.historyBack??[],f=e.query?.trim()??``,p=f.length>0,m=e.installId!==void 0,h=p||m,g=e.eventsBefore??a,_=e.eventsRange??`7d`,v=e.historyBefore??o,y=(n,r=!1,i={})=>{t({to:`/installations`,search:{...e,...n},state:e=>({...e,insightsPagination:{...e.insightsPagination,...i}}),replace:r})};(0,J.useEffect)(()=>{i(e.query??``)},[e.query]),(0,J.useEffect)(()=>{e.eventsBefore===void 0&&y({eventsBefore:g},!0)},[g,e.eventsBefore]),(0,J.useEffect)(()=>{m&&e.historyBefore===void 0&&y({historyBefore:v},!0)},[m,v,e.historyBefore]);let x=E({...ie(_,g),cursor:e.eventsCursor,limit:20},!h),C=S({cursor:e.searchCursor,identity:f,limit:Ae},p);(0,J.useEffect)(()=>{let e=C.data?.data[0]?.installId;!p||m||e===void 0||y({historyBefore:Z(),historyCursor:void 0,installId:e},!0,{historyBack:[]})},[p,m,C.data?.data]);let D=w(e.installId??``,m),O=te({beforeReceivedAtMs:v,cursor:e.historyCursor,installId:e.installId??``,limit:je},m),k=D.data??C.data?.data.find(({installId:t})=>t===e.installId)??O.data?.data[0],A=h?`installation-history-${e.historyCursor??`first`}`:`all-events-${e.eventsCursor??`first`}`,j=(0,J.useRef)(null),M=ge({id:A,getKey:ae});(0,J.useLayoutEffect)(()=>{!h&&!x.isLoading&&j.current&&(j.current.scrollTop=M?.scrollY??0)},[x.isLoading,h,M?.scrollY,A]);let N=()=>{i(``),y({historyBefore:void 0,historyCursor:void 0,installId:void 0,query:void 0,searchCursor:void 0},!1,{historyBack:[],searchBack:[]})},P=(0,Y.jsx)(Oe,{draftQuery:r,onClear:N,onDraftQueryChange:i,onSubmit:()=>{let e=r.trim();if(!e){N();return}y({historyBefore:void 0,historyCursor:void 0,installId:void 0,query:e,searchCursor:void 0},!1,{historyBack:[],searchBack:[]})}});return(0,Y.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,Y.jsx)(me,{view:`events`}),(0,Y.jsx)(`div`,{ref:j,"data-scroll-restoration-id":A,id:`insights-events-scroll`,className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,Y.jsxs)(`div`,{className:`mx-auto flex w-full max-w-7xl flex-col gap-4 sm:gap-6`,children:[h?(0,Y.jsx)(z,{className:`shadow-sm`,children:(0,Y.jsxs)(I,{className:`flex flex-col gap-3 p-4 sm:p-6`,children:[(0,Y.jsxs)(s,{className:`-ml-2 h-11 self-start lg:h-8`,onClick:N,variant:`ghost`,children:[(0,Y.jsx)(b,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Back to all events`]}),P]})}):null,h?C.isLoading&&p?(0,Y.jsx)(ke,{}):(0,Y.jsxs)(`div`,{className:`grid min-h-0 min-w-0 items-stretch gap-4 sm:gap-6 ${p?`lg:min-h-96 lg:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)]`:`lg:grid-cols-1`}`,children:[p?(0,Y.jsx)(De,{error:C.error,onNext:()=>{C.data?.nextCursor&&y({installId:void 0,searchCursor:C.data.nextCursor},!0,{searchBack:Q(u,e.searchCursor)})},onPrevious:()=>{let e=$(u);y({installId:void 0,searchCursor:e.cursor},!0,{searchBack:e.stack})},onSelect:e=>{y({historyBefore:Z(),historyCursor:void 0,installId:e},!1,{historyBack:[]})},pageNumber:u.length+1,results:C.data,selectedInstallId:e.installId}):null,(0,Y.jsx)(we,{error:O.error??D.error,history:O.data,isLoading:O.isLoading||D.isLoading,onNext:()=>{O.data?.nextCursor&&y({historyCursor:O.data.nextCursor},!0,{historyBack:Q(d,e.historyCursor)})},onPrevious:()=>{let e=$(d);y({historyCursor:e.cursor},!0,{historyBack:e.stack})},onRefresh:()=>{y({historyBefore:Z(),historyCursor:void 0},!0,{historyBack:[]})},pageNumber:d.length+1,retention:n,selectedEvent:k,selectedInstallId:e.installId})]}):(0,Y.jsx)(xe,{description:`Downloads, launches, crashes, update failures, and other changes to what an installation runs, newest first, kept for ${T(n.rawDays)}. Launches that change nothing aren't listed.`,error:x.error,eventsLocation:{eventsBefore:g,eventsCursor:e.eventsCursor,eventsRange:e.eventsRange},history:x.data,isFetching:x.isFetching,isLoading:x.isLoading,onNext:()=>{x.data?.nextCursor&&y({eventsCursor:x.data.nextCursor},!0,{eventsBack:Q(l,e.eventsCursor)})},onPrevious:()=>{let e=$(l);y({eventsCursor:e.cursor},!0,{eventsBack:e.stack})},onRangeChange:e=>{y({eventsBefore:Z(),eventsCursor:void 0,eventsRange:e},!1,{eventsBack:[]})},onRefresh:()=>{y({eventsBefore:Z(),eventsCursor:void 0},!0,{eventsBack:[]})},pageNumber:l.length+1,range:_,rawDays:n.rawDays,children:P})]})},A)]})}export{Me as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Vr as e}from"./sidebar-
|
|
1
|
+
import{Vr as e}from"./sidebar-BmzmPGuv.js";var t=e(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]);export{t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ai as e,Di as t,Mi as n,Pi as r,Ri as i,Vi as a,ji as o,ki as s}from"./sidebar-UnsNYOry.js";function c(e){return e.replaceAll(`/`,`#`)}function l(e){return e[e.length-1]}function u(e,t){return typeof e==`function`?e(t):e}var d=Object.prototype.hasOwnProperty;function f(e){for(let t in e)if(d.call(e,t))return!0;return!1}var p=()=>Object.create(null),m=(e,t)=>h(e,t,!0);function h(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(g(e)&&g(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&l(a)!==`${o-1}`||c&&l(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let u=0,f,m,_;if(i){for(;u<c&&(_=u,m=e[_],f=t[_],f=m===f?m:typeof m==`object`?h(m,f,n,r):f,f===m);u++);if(u===c&&o===c)return e}else{let i=o===c,l=!0;for(;u<c;u++){_=s[u],m=e[_];let o=t[_];f=m===o?m:typeof m==`object`?h(m,o,n,r):o,i&&=f===m&&(a[u]===_||d.call(e,_)),l&&=Object.is(f,o),a[u]=f}if(i)return Object.getOwnPropertySymbols(e).length?t:e;if(l)return t}let v=i?s.fill(0):n?p():{};for(let o=0;o<c;o++)_=i?o:s[o],i?(m=e[_],o>u&&(f=t[_],f=m===f?m:typeof m==`object`?h(m,f,n,r):f),v[_]=o<u?m:f):v[_]=a[o];return v}function g(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function _(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!_(a,o,n,r))return!1}return!0}if(g(e)&&g(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!_(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!_(e[a],t[a],n,r)))return!1;return i===0}return!1}function v(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}function y(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}var b=/[\x00-\x1f\x7f"<>`{}]/g;function x(e){return e.replace(b,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function S(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return x(t)}var C=[`http:`,`https:`,`mailto:`,`tel:`];function w(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var T=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function E(e,t){if(!e)return!1;if(T.test(e))return!0;let n=w(e);return n?!t.has(n):!1}var D={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},O=/[&><\u2028\u2029]/g;function k(e){return e.replace(O,e=>D[e])}function A(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=S(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=S(r?e.slice(r):e)}return t}function ee(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function j(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function M(e){return e.replace(/\/{2,}/g,`/`)}function N(e){return e===`/`?e:e.replace(/^\/+/,``)}function P(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function te(e){return P(N(e))}function ne(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function re(e,t,n=`never`,r){if(t.includes(`//`)&&(t=M(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=M(e)),o=e.split(`/`);o.length>1&&l(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(l(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?M(s):s)||`/`;return a&&r&&r.set(a,c),c}function ie(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function ae(e){return e==null||e===``}function oe(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function se(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(!(t===3&&f==null)){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&ae(f)){if(c===`/`&&!d)continue;f=``}o+=c+oe(s,f,r)+(d||``)}}return o+a||`/`}function ce(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var F=4,le=5;function ue(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function de(e,t,n){let r=e.slice(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.slice(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.slice(s,a);return[o?3:c?1:2,c||`_splat`,r.slice(0,i),e.slice(t+a+1,c?n:e.length)]}}return r}function I(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,u=s.length,d=s.endsWith(`/`)?u-1:u,f=c?.caseSensitive??e,p=c?.params?.parse??c?.parseParams,m,h=a?n-1:0;if(!r||s.includes(`$`)){m=a?.slice()??[];let e=l(m);e&&typeof e!=`string`&&e[0]===2&&(m[m.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),d)],h=u)}for(;o<u;){let e=o,t=s.indexOf(`/`,e),n=t===-1?u:t,a=de(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;f?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=L(r);c=n,t.set(e,n)}}else{let t=a[0],l=a[2],g=a[3]??``;if(t===2&&(n=u,o=n+1),m&&h<n&&(h<e-1&&m.push(s.slice(h,e-1)),a[2]=`/`+l,t===2&&a[3]!==void 0&&d<u&&(a[3]=g.slice(0,-1)),m.push(a),h=n),!r)continue;let _=f&&!!(l||g);f||(l=l.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!p&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===l&&e.suffix===g);if(y)c=y;else{let e=L(r,t,_,l,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}m&&h<d&&m.push(s.slice(h,d));let g=m?.slice();if(!r)return g;if(p&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=L(r,le);(r.pathless??=[]).push(e),r=e}let _=(t.path||!t.children)&&!t.isRoot;if(_&&d<u){let e=L(r,F);r.index=e,r=e}return r.parse=p??null,r.priority=c?.params?.priority??0,r.route||(r.data=g,_&&(r.route=t)),[r,o,g]}function fe(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function L(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function pe(e,t){let n=L(),r=[];function i(e,t,n,a){let[o,s,c]=I(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(fe);t.masksTree=n,t.flatCache=ce(1e3)}function me(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=ve(e,t.masksTree);return t.flatCache.set(e,r),r}function he(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=L(),I(t,{from:e},1,o),i.singleCache.set(a,o)),ve(r,o,n)}function ge(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=ve(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=be(a.route)),t.matchCache.set(r,a),a}function _e(e,t=!1){let n=L(),r=[],i={},a={},s=0;function c(e,n,l,u){if(e.init(s),e.id in i&&o(),i[e.id]=e,s!==0&&e.path){let t=P(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}s++;let[d,f,p]=I(t,e,n,l,r,u);if(e._interpolation=p,e.children)for(let t of e.children)c(t,f,d,p)}c(e,1,n);for(let e of r)e.sort(fe);return{processedTree:{segmentTree:n,singleCache:ce(1e3),matchCache:ce(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function ve(e,t,n=!1){let r=e.split(`/`),i=Se(e,r,t,n);if(!i)return null;let[a]=ye(e,r,i);return{route:i.node.route,rawParams:a}}function ye(e,t,n){let r=xe(n.node),i=n.node.data&&ue(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===F)break;if(u.kind===le){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function be(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function xe(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Se(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!l(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,u=null;for(;s.length;){let n=s.pop(),{node:i,index:l,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!Ee(u,n))continue;if(i.parse){if(!Te(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==F&&Ee(c,n)&&(c=n);let _=l===o;if(_&&(i.route&&(!a||i.kind===F||i.kind===2)&&Ee(u,n)&&(u=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[l],y;if(_&&i.index){let n={node:i.index,index:l,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Te(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&we(f,o))return n;Ee(u,n)&&(u=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(_||!(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)))){if(a){if(_)continue;let e=t.slice(l).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:l,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:l+1,skipped:d,statics:f,dynamics:p,optionals:m+Ce(o,l),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:l+1,skipped:d,statics:f,dynamics:p+Ce(o,l),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:l+1,skipped:d,statics:f+Ce(o,l),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:l+1,skipped:d,statics:f+Ce(o,l),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:l,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(u)return u;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function Ce(e,t){return 2**(e-t-1)}function we(e,t){return e===2**(t-1)-1}function Te(e,t,n){let r,i;try{[r,i]=ye(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Ee(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===F)>(e.node.kind===F)||t.node.kind===F==(e.node.kind===F)&&t.node.depth>e.node.depth))):!0}function De(){try{return sessionStorage}catch{return}}var Oe=`tsr-scroll-restoration-v1_3`,ke=De();function Ae(){try{return JSON.parse(ke?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var R=Ae(),je=`data-scroll-restoration-id`,Me=e=>e.state.__TSR_key||e.href;function Ne(e){let t=e.getAttribute(je);if(t)return`[${je}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}function Pe(e,t){let n=R[(t.getKey||Me)(e.latestLocation)];if(!n)return;if(t.id)return n[`[${je}="${t.id}"]`];let r=t.getElement?.();if(r)return n[r===window?z:Ne(r)]}var Fe=!1,z=`window`;function Ie(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Le(e){let t=new Set;for(let n of e){if(n===z)continue;let e=Ie(n);e&&t.add(e)}return t}function Re(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||Me,a=new Set,o=e=>{let t=R[e]||={};for(let e of a)e===document?t[z]={scrollX,scrollY}:e.isConnected&&(t[Ne(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,Fe=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Fe||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{ke?.setItem(Oe,JSON.stringify(R))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),!r.r&&(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=R[d];if(e){let t=R[u];for(let n in e){if(n===z){if(s)continue}else{let e=Ie(n);if(!e||s&&o&&(l??=Le(o),l.has(e)))continue}t||=R[u]={},t[n]??=e[n]}}}Fe=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Le(o));let t=e&&i&&c,s=r.e?R[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===z){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Ie(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{Fe=!1}}))}var ze=/^(?:\s|["[{\d-]|fa|nu|tr)/,Be=He(JSON.parse),Ve=Ue(JSON.stringify,JSON.parse);function He(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=s(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!ze.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function Ue(t,n){let r=n===JSON.parse;function i(e){if(e&&typeof e==`object`)try{return t(e)}catch{}else if(n&&typeof e==`string`){if(r&&!ze.test(e))return e;try{return n(e),t(e)}catch{}}return e}return t=>{let n=e(t,i);return n?`?${n}`:``}}var We=`__root__`;function Ge(e,t,n){let r=te(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=M(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>Ke(n,s.input({url:e})),output:({url:e})=>s.output({url:qe(n,e)})}:s}function Ke(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function qe(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Je(e){let t=e;return{get(){return t},set(e){t=u(e,t)}}}function Ye(e){return{get(){return e()}}}function Xe(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{j(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var B=`__TSR_index`,Ze=`popstate`,Qe=`beforeunload`,$e=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function et(e){let t=$e.exec(e);return t?`/`+e.slice(t[0].length):e}function tt(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
|
|
1
|
+
import{Ai as e,Di as t,Mi as n,Pi as r,Ri as i,Vi as a,ji as o,ki as s}from"./sidebar-BmzmPGuv.js";function c(e){return e.replaceAll(`/`,`#`)}function l(e){return e[e.length-1]}function u(e,t){return typeof e==`function`?e(t):e}var d=Object.prototype.hasOwnProperty;function f(e){for(let t in e)if(d.call(e,t))return!0;return!1}var p=()=>Object.create(null),m=(e,t)=>h(e,t,!0);function h(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(g(e)&&g(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&l(a)!==`${o-1}`||c&&l(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let u=0,f,m,_;if(i){for(;u<c&&(_=u,m=e[_],f=t[_],f=m===f?m:typeof m==`object`?h(m,f,n,r):f,f===m);u++);if(u===c&&o===c)return e}else{let i=o===c,l=!0;for(;u<c;u++){_=s[u],m=e[_];let o=t[_];f=m===o?m:typeof m==`object`?h(m,o,n,r):o,i&&=f===m&&(a[u]===_||d.call(e,_)),l&&=Object.is(f,o),a[u]=f}if(i)return Object.getOwnPropertySymbols(e).length?t:e;if(l)return t}let v=i?s.fill(0):n?p():{};for(let o=0;o<c;o++)_=i?o:s[o],i?(m=e[_],o>u&&(f=t[_],f=m===f?m:typeof m==`object`?h(m,f,n,r):f),v[_]=o<u?m:f):v[_]=a[o];return v}function g(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function _(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!_(a,o,n,r))return!1}return!0}if(g(e)&&g(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!_(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!_(e[a],t[a],n,r)))return!1;return i===0}return!1}function v(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}function y(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}var b=/[\x00-\x1f\x7f"<>`{}]/g;function x(e){return e.replace(b,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function S(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return x(t)}var C=[`http:`,`https:`,`mailto:`,`tel:`];function w(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var T=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function E(e,t){if(!e)return!1;if(T.test(e))return!0;let n=w(e);return n?!t.has(n):!1}var D={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},O=/[&><\u2028\u2029]/g;function k(e){return e.replace(O,e=>D[e])}function A(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=S(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=S(r?e.slice(r):e)}return t}function ee(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function j(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function M(e){return e.replace(/\/{2,}/g,`/`)}function N(e){return e===`/`?e:e.replace(/^\/+/,``)}function P(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function te(e){return P(N(e))}function ne(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function re(e,t,n=`never`,r){if(t.includes(`//`)&&(t=M(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=M(e)),o=e.split(`/`);o.length>1&&l(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(l(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?M(s):s)||`/`;return a&&r&&r.set(a,c),c}function ie(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function ae(e){return e==null||e===``}function oe(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function se(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(!(t===3&&f==null)){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&ae(f)){if(c===`/`&&!d)continue;f=``}o+=c+oe(s,f,r)+(d||``)}}return o+a||`/`}function ce(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var F=4,le=5;function ue(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function de(e,t,n){let r=e.slice(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.slice(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.slice(s,a);return[o?3:c?1:2,c||`_splat`,r.slice(0,i),e.slice(t+a+1,c?n:e.length)]}}return r}function I(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,u=s.length,d=s.endsWith(`/`)?u-1:u,f=c?.caseSensitive??e,p=c?.params?.parse??c?.parseParams,m,h=a?n-1:0;if(!r||s.includes(`$`)){m=a?.slice()??[];let e=l(m);e&&typeof e!=`string`&&e[0]===2&&(m[m.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),d)],h=u)}for(;o<u;){let e=o,t=s.indexOf(`/`,e),n=t===-1?u:t,a=de(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;f?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=L(r);c=n,t.set(e,n)}}else{let t=a[0],l=a[2],g=a[3]??``;if(t===2&&(n=u,o=n+1),m&&h<n&&(h<e-1&&m.push(s.slice(h,e-1)),a[2]=`/`+l,t===2&&a[3]!==void 0&&d<u&&(a[3]=g.slice(0,-1)),m.push(a),h=n),!r)continue;let _=f&&!!(l||g);f||(l=l.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!p&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===l&&e.suffix===g);if(y)c=y;else{let e=L(r,t,_,l,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}m&&h<d&&m.push(s.slice(h,d));let g=m?.slice();if(!r)return g;if(p&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=L(r,le);(r.pathless??=[]).push(e),r=e}let _=(t.path||!t.children)&&!t.isRoot;if(_&&d<u){let e=L(r,F);r.index=e,r=e}return r.parse=p??null,r.priority=c?.params?.priority??0,r.route||(r.data=g,_&&(r.route=t)),[r,o,g]}function fe(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function L(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function pe(e,t){let n=L(),r=[];function i(e,t,n,a){let[o,s,c]=I(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(fe);t.masksTree=n,t.flatCache=ce(1e3)}function me(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=ve(e,t.masksTree);return t.flatCache.set(e,r),r}function he(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=L(),I(t,{from:e},1,o),i.singleCache.set(a,o)),ve(r,o,n)}function ge(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=ve(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=be(a.route)),t.matchCache.set(r,a),a}function _e(e,t=!1){let n=L(),r=[],i={},a={},s=0;function c(e,n,l,u){if(e.init(s),e.id in i&&o(),i[e.id]=e,s!==0&&e.path){let t=P(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}s++;let[d,f,p]=I(t,e,n,l,r,u);if(e._interpolation=p,e.children)for(let t of e.children)c(t,f,d,p)}c(e,1,n);for(let e of r)e.sort(fe);return{processedTree:{segmentTree:n,singleCache:ce(1e3),matchCache:ce(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function ve(e,t,n=!1){let r=e.split(`/`),i=Se(e,r,t,n);if(!i)return null;let[a]=ye(e,r,i);return{route:i.node.route,rawParams:a}}function ye(e,t,n){let r=xe(n.node),i=n.node.data&&ue(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===F)break;if(u.kind===le){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function be(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function xe(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Se(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!l(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,u=null;for(;s.length;){let n=s.pop(),{node:i,index:l,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!Ee(u,n))continue;if(i.parse){if(!Te(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==F&&Ee(c,n)&&(c=n);let _=l===o;if(_&&(i.route&&(!a||i.kind===F||i.kind===2)&&Ee(u,n)&&(u=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[l],y;if(_&&i.index){let n={node:i.index,index:l,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Te(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&we(f,o))return n;Ee(u,n)&&(u=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(_||!(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)))){if(a){if(_)continue;let e=t.slice(l).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:l,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:l+1,skipped:d,statics:f,dynamics:p,optionals:m+Ce(o,l),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:l+1,skipped:d,statics:f,dynamics:p+Ce(o,l),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:l+1,skipped:d,statics:f+Ce(o,l),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:l+1,skipped:d,statics:f+Ce(o,l),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:l,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(u)return u;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function Ce(e,t){return 2**(e-t-1)}function we(e,t){return e===2**(t-1)-1}function Te(e,t,n){let r,i;try{[r,i]=ye(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Ee(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===F)>(e.node.kind===F)||t.node.kind===F==(e.node.kind===F)&&t.node.depth>e.node.depth))):!0}function De(){try{return sessionStorage}catch{return}}var Oe=`tsr-scroll-restoration-v1_3`,ke=De();function Ae(){try{return JSON.parse(ke?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var R=Ae(),je=`data-scroll-restoration-id`,Me=e=>e.state.__TSR_key||e.href;function Ne(e){let t=e.getAttribute(je);if(t)return`[${je}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}function Pe(e,t){let n=R[(t.getKey||Me)(e.latestLocation)];if(!n)return;if(t.id)return n[`[${je}="${t.id}"]`];let r=t.getElement?.();if(r)return n[r===window?z:Ne(r)]}var Fe=!1,z=`window`;function Ie(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Le(e){let t=new Set;for(let n of e){if(n===z)continue;let e=Ie(n);e&&t.add(e)}return t}function Re(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||Me,a=new Set,o=e=>{let t=R[e]||={};for(let e of a)e===document?t[z]={scrollX,scrollY}:e.isConnected&&(t[Ne(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,Fe=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Fe||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{ke?.setItem(Oe,JSON.stringify(R))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),!r.r&&(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=R[d];if(e){let t=R[u];for(let n in e){if(n===z){if(s)continue}else{let e=Ie(n);if(!e||s&&o&&(l??=Le(o),l.has(e)))continue}t||=R[u]={},t[n]??=e[n]}}}Fe=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Le(o));let t=e&&i&&c,s=r.e?R[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===z){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Ie(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{Fe=!1}}))}var ze=/^(?:\s|["[{\d-]|fa|nu|tr)/,Be=He(JSON.parse),Ve=Ue(JSON.stringify,JSON.parse);function He(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=s(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!ze.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function Ue(t,n){let r=n===JSON.parse;function i(e){if(e&&typeof e==`object`)try{return t(e)}catch{}else if(n&&typeof e==`string`){if(r&&!ze.test(e))return e;try{return n(e),t(e)}catch{}}return e}return t=>{let n=e(t,i);return n?`?${n}`:``}}var We=`__root__`;function Ge(e,t,n){let r=te(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=M(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>Ke(n,s.input({url:e})),output:({url:e})=>s.output({url:qe(n,e)})}:s}function Ke(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function qe(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Je(e){let t=e;return{get(){return t},set(e){t=u(e,t)}}}function Ye(e){return{get(){return e()}}}function Xe(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{j(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var B=`__TSR_index`,Ze=`popstate`,Qe=`beforeunload`,$e=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function et(e){let t=$e.exec(e);return t?`/`+e.slice(t[0].length):e}function tt(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
|
|
2
2
|
\r`.includes(e)?``:encodeURIComponent(e))),et(e)}function nt(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async n=>{let r=n.navigateOpts?.ignoreBlocker?void 0:e.getBlockers?.();if(typeof document<`u`&&r?.length&&(n.type===`PUSH`||n.type===`REPLACE`))for(let i of r){let r=at(n.path,n.state);if(await i.blockerFn({currentLocation:t,nextLocation:r,action:n.type})){e.onBlocked?.();return}}n.task()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[B];i=rt(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[B];i=rt(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[B]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function rt(e,t){let n=ot();return{...t,key:n,__TSR_key:n,[B]:e}}function it(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>tt(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>at(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=ot();t.history.replaceState({[B]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=at(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[B]-l.state[B],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=nt({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:s,flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Qe,x,{capture:!0}),t.removeEventListener(Ze,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(Qe,x,{capture:!0}),t.addEventListener(Ze,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function at(e,t){let n=tt(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=ot();t={[B]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.slice(0,r>-1?i>-1?Math.min(r,i):r:i>-1?i:n.length),hash:r>-1?n.slice(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function ot(){return(Math.random()+1).toString(36).slice(7)}function st(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function ct(e){return e.pathname+e.search+e.hash}function lt(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function ut(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function dt(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function ft({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function pt(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function mt(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var ht=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=it()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`);let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&te(n)?Ge(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Xe(this.latestLocation,e),Re(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=_e(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&pe(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:ce(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:A(e),external:!1,searchStr:o,search:m(t?.search,i),hash:A(r.slice(1)),state:h(t?.state,a)}}let o=Ke(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:A(et(o.pathname)),external:!!this.rewrite&&st(o,this.origin),searchStr:c,search:m(t?.search,s),hash:A(o.hash.slice(1)),state:h(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=ge(P(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=at(n.href,{});n={...n,to:Ke(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=e._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>i??=this.matchRoutesLightweight(a()),s=n.to?`${n.to}`:`.`,c=re(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[P(c)],u=c.includes(`$`),d;if(l)d=l._branch??=be(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let m=u?l?._interpolation??I(!1,{fullPath:c},0):void 0,h;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(h??=bt(n.params,e),!f(h))break;h===e&&(h=Object.assign(p(),h));try{Object.assign(h,t(h))}catch{}}}h??=bt(n.params,xt(n.params,m)?o()[3]:St);let g=e.leaveParams?c:et(A(m?se(c,m,h,this.pathParamsDecoder):c)),_=Ct(d,e._includeValidateSearch),v=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,yt(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},y=_.length?wt(_,v(),n):n.search===!0?v():typeof n.search==`function`?n.search(v()):n.search||St,b=this.options.stringifySearch(y),x=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,S=x?`#${x}`:``,C=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:St,w=`${g}${b}${S}`,T,E,D=!1;if(this.rewrite){let e=new URL(w,this.origin),t=e.origin,n=qe(this.rewrite,e);T=ct(e),st(n,t)?(E=n.href,D=!0):E=et(ct(n))}else T=ee(w),E=T;return{publicHref:E,href:T,pathname:g,search:y,searchStr:b,state:C,hash:x??``,external:D,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=me(r.pathname,this.processedTree);if(t){let i=Object.assign(p(),t.rawParams),{from:a,params:o,...s}=t.route,c=bt(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return gt(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=P(this.latestLocation.href)===P(n.href)&&_(ft(n.state),ft(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?w(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}return gt(this,!a&&r?r:n,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await cn(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(dt(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));this._committed=t.map(t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&<(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t});for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(T.test(n)||(r=w(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:st(e,this.origin)||(n=ct(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=V,this.preloadRoute=e=>ln(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?re(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=he(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!_(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?_(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=ie(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Ve,parseSearch:e.parseSearch??Be,protocolAllowlist:e.protocolAllowlist??C}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=I(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[i,a,o]=this.getMatchedRoutes(e.pathname),s=i,c=!1;(o?o.path!==`/`&&a[`**`]:P(e.pathname))&&(this.options.notFoundRoute?s=[...s,this.options.notFoundRoute]:c=!0);let l=c?Tt(this.options.notFoundMode,s):void 0,u=Array(s.length),d=this._committed,f=(e,t)=>{let n=d[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?d.find(t=>t.routeId===e.id):void 0},g;for(let i=0;i<s.length;i++){let o=s[i],c=u[i-1],d,_,v;{let n=c?.search??e.search,r=c?._strictSearch??void 0;try{let e=yt(o.options.validateSearch,{...n})??void 0;d={...n,...e},_={...r,...e}}catch(e){let r=e;if(e instanceof _t||(r=new _t(e.message,{cause:e})),t?.throwOnError)throw r;d=n,_={},v=r}}let y=``,b=``;try{y=o.options.loaderDeps?.({search:d})??``,b=y&&JSON.stringify(y)||``}catch(e){if(t?.throwOnError)throw e;v??=e}let x=p(),S=o._interpolation?se(o.fullPath,o._interpolation,a,this.pathParamsDecoder,x):o.fullPath,C=o.id+S+b,w=f(o,i),T=this._cache.get(C)??(w?.id===C?w:void 0);g=T?._strictParams??Object.assign(x,g);let E;if(!T)try{Et(o,g)}catch(e){if(E=r(e)||n(e)?e:new vt(e.message,{cause:e}),t?.throwOnError)throw E}let D=w?`stay`:`enter`,O;if(T)O={...T,cause:D,search:m(w?w.search:T.search,d),_strictSearch:_,searchError:v};else{let e=lt(o)?`pending`:`success`;O={id:C,ssr:o.options.ssr,index:i,routeId:o.id,params:w?.params??g,_strictParams:g,pathname:S,updatedAt:Date.now(),search:w?m(w.search,d):d,_strictSearch:_,searchError:v,status:e,isFetching:!1,error:void 0,paramsError:E,context:{},abortController:t?._controller??new AbortController,cause:D,loaderDeps:w?h(w.loaderDeps,y):y,invalid:!1,preload:!1,staticData:o.options.staticData||{},fullPath:o.fullPath}}let k=l===o.id;O._notFound&&!k&&(O.error=void 0),O._notFound=k,u[i]=O}for(let e=0;e<u.length;e++){let n=u[e];n.params=n.cause===`stay`?m(n.params,g):g,t?._controller&&(n.context={})}return u}matchRoutesLightweight(e){let t=l(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=l(a),c={...e.search};for(let e of a)try{Object.assign(c,yt(e.options.validateSearch,c))}catch{}let u=n&&n.routeId===s.id&&n.pathname===e.pathname,d;if(u)d=n.params;else{let e=o;for(let t of a)try{Et(t,e)}catch{}d=e}let f=[a,s.fullPath,c,d];return this.lightweightCache.set(e,[r,f]),f}};async function gt(e,t,{replace:n,ignoreBlocker:r}){if(!E(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var _t=class extends Error{},vt=class extends Error{};function yt(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new _t(`Async validation not supported`);if(n.issues)throw new _t(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function bt(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function xt(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!d.call(e,t[1]))}var St=Object.freeze({});function Ct(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=yt(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function wt(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=u(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function Tt(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return We}function Et(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function Dt(e,t){return e.options[t]?.preload?.()}function Ot(e,t){let n=Dt(e,`component`),r=Dt(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function V(e,t,n){let r=()=>t===!1?void 0:t?Dt(e,t):Ot(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function kt(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function At(e,t,n){let r=e._tx;return t&&r?.[2]===n&&!r[3].some(e=>e.routeId===t)}function jt(e){let t=e.length;for(let n=0;n<t;n++){let r=e[n];if(r._assetEnd!==void 0){t=Math.min(t,Math.max(n+1,r._assetEnd));continue}if(r.status!==`success`||r._notFound){t=n+1;break}}return t<e.length?e.slice(0,t):e}var H=0,U=1,Mt=2,W=3,G=[4];function Nt(e){return typeof e[0]==`number`}function K(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function q(e,t){return e.routesById[t.routeId]}function Pt(e,t,i){return n(e)?[W,e]:r(e)?(e.routeId||=i,[Mt,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[U,e]):[H,e]}function Ft(e,t){let n=Pt(t,!0,e.id);if(n[0]!==U)return n;try{e.options.onError?.(n[1])}catch(t){n=Pt(t,!0,e.id)}return n}function It(e,t,n,r,i){return i[0].signal.aborted?G:Yt(e,t,n,Ft(n,r),i)}async function Lt(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=q(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return J(e,r),[i,It(e,t,u,a,n)]}if(c.aborted)return[i,G];let p=r.paramsError??r.searchError;if(p!==void 0)return J(e,r),[i,It(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{Bt(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?K(a,c):a);if(c.aborted)return[i,G];let s=Yt(e,t,u,Pt(o,!1,u.id),n);if(s[0]!==H)return J(e,r),[i,s];r.context={...r.context,...o}}catch(a){return J(e,r),[i,It(e,t,u,a,n)]}finally{r.status=h,Bt(e,r,!1,n[0])}}i()}function Rt(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function J(e,t){let n=t._flight;t._flight=void 0,Rt(e,t,n)?.abort()}function Y(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Rt(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function zt(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Bt(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function Vt(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function Ht(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return G;if(!i)return[H,void 0];let l=n._flight;Bt(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Vt(e,t,n,r,s,a,!!o[3]))).then(e=>Pt(e,!1,r.id),e=>Pt(e,!0,r.id)).then(t=>(t[0]!==H&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===U&&l[2]?Ft(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Yt(e,t,r,await K(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return J(e,n),G}finally{Bt(e,n,!1,s)}}function Ut(e,t,n){t[0]!==W&&(e.status=`success`,e.error=void 0,t[0]===H?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function Wt(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&J(e,r)}function Gt(e,t){return t[0]===U||t[0]===Mt?{...e,status:t[0]===U?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Kt(e,t,n,r,i,a,o){let s=t[1][n],c=q(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(Vt(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=G)),!p)if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}catch(n){s.invalid=!0,J(e,s),p=It(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!!(m&&f&&s.status===`success`&&!l&&!a[4]&&((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)!==`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,Rt(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?Ht(e,t,s,c,g,i,a).then(t=>(Ut(s,t,l),t[0]===H&&(m&&!a[0].signal.aborted&&Wt(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[H,s.loaderData]),T=(async()=>{try{let e=V(c,void 0,C);e&&await K(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,It(e,t,c,r,a)]}let r=await w;x&&r[0]===H&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>Gt(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let D=Ht(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,Ut(E,e,!1),e));return(t[2]??=[]).push([n,D,T,E]),D.then(e=>Gt(E,e))}async function qt(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=q(e,t[n]);try{let e=V(i,!1);e&&await K(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function X(e,t){t[2]&&=(Y(e,t[2].map(e=>e[3])),void 0)}async function Jt(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=W)throw[a,t];!i&&t[0]!==H&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===W)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Yt(e,t,n,r,i,a){for(;r[0]===W;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[W,t]:[W,t,a]}return[W,o,n]}catch(e){r=a?[U,e]:Ft(n,e),a=!0}}return r}async function Xt(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===Mt?qt(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=W)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==H&&t[0]<W&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=W){let n=s[1];if(n[0]!==W||n[1].options.reloadDocument||n[2])return X(e,t),n;c=!0,s=[0,[U,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===U?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=q(e,u);try{await K(i?Promise.resolve().then(()=>V(m,l===U?`errorComponent`:`notFoundComponent`)):Promise.all([V(m),V(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return X(e,t),G}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),X(e,t),Y(e,o),p()):u.status=`success`}return t}async function Zt(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=q(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await K(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function Qt(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await qt(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=Kt(e,i,t,u,f,r,l)},m=await Lt(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===Mt){let t=await qt(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=W&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=Xt(e,i,u,r[0],Jt(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=Jt(i[2],void 0,void 0,h.then(e=>Nt(e)?0:kt(n).length,()=>0))),o=await h}catch(t){if(X(e,i),t===a&&a.aborted)return G;throw t}return Nt(o)?o:Zt(e,o,a,r[6]===n.length?r[6]:0)}function $t(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=q(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>$t(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function Z(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function en(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!kt(t[3]).some(e=>e.id===n[1]))return;let i;try{await K(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function tn(e,t){e._committed=t,e.stores.setMatches(t)}function nn(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=kt(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=q(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=pt(n);tn(e,n),Y(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),mt(e,i,n,a,l,t)}async function rn(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function an(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function on(e,t,n,r,i){let a=n.map(e=>({...e}));zt(a);for(let t of r)J(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Xt(e,o,r,t[0],i)}catch(t){throw Y(e,a),t}if(Nt(s)){Y(e,a),s[0]===W&&e._tx===t&&e._committed===n&&await an(e,t,s);return}if(await Zt(e,s,t[0].signal),e._tx!==t||e._committed!==n){Y(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),J(e,n))}tn(e,a),Y(e,n,a)}async function sn(e,t,n,r,i,a){let o=await Qt(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(Nt(o)){let n=o[0]===W&&e._tx===t;if((!n||o[1].options.reloadDocument)&&Z(e,t),Y(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){Z(e,t);return}await an(e,t,o);return}let s=o[1];if(e._tx===t&&await en(e,t),e._tx!==t){Z(e,t),Y(e,s),X(e,o);return}let c=t[2],l=dt(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await en(e,t),e._tx!==t){Z(e,t),Y(e,s),X(e,o);return}let n=await e.startTransition(()=>{Z(e,t),nn(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){X(e,o);return}u?.length&&on(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function cn(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=dt(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await rn(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});zt(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Y(e,m),await rn(e,n);return}e._preflight=void 0;let g,_=()=>sn(e,y,f,()=>$t(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>rn(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Bt(e,t,!1)}n[0].abort(),Y(e,n[3],y[3],!0)}if(e._tx!==y){Y(e,y[3]),y[3]=[],g?.(),await rn(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&$t(e,y),g?.(_()),await y[5]}async function ln(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let i=e._committed,a=new AbortController,o,s,c;try{try{o=e.matchRoutes(n,{_controller:a}),zt(o),s=(e._preloads??=new Map).set(a,o),c=await Qt(e,n,o,[a,t,i,!0])}finally{s&&(s=s.delete(a),Y(e,o)),a.abort()}if(!Nt(c))return c[1];if(!s||c.length<3)return;n=c[2]}catch(e){r(e)||console.error(e);return}}}async function un(e){let t=window.$_TSR,n=e.options.serializationAdapters;n?.length&&(t.t=new Map(n.map(e=>[e.key,e.fromSerializable])),t.buffer.forEach(e=>e())),t.initialized=!0;let r=t.router;e.ssr={manifest:r.manifest},e.options.ssr={nonce:document.querySelector(`meta[property="csp-nonce"]`)?.content};let i=r.matches,a=new AbortController,o=e._preflight;e._preflight=a,o?.abort();let s=()=>e._preflight===a,l,u,d,f;try{if(await K(e.options.hydrate?.(r.dehydratedData),a.signal),!s())return;let t=e.history.location;d=t.href,f=t.state,e.updateLatestLocation(),l=e.latestLocation,e.stores.location.set(l),u=e.matchRoutes(l,{_controller:a})}catch(t){if(s()&&(e._preflight=void 0),a.abort(t),t!==a.signal)throw t}if(!s())return;let p=[],m,h=0,g=t=>{h=Math.min(h,t+1);let n=p.splice(t);for(let t of n)q(e,t).options.loader&&(t.status===`success`||!t.invalid&&`loaderData`in t)&&Wt(e,{...t,status:`success`,error:void 0,preload:!0},e._cache.get(t.id));Y(e,n)},_=i.length>u.length?u.findIndex(e=>e._notFound)+1:i.length,v=!1;for(let t=0;t<_;t++){let n=u[t],r=i[t];if(r.i!==c(n.id)){m??=t;break}h=t+1;let a=q(e,n);if((`l`in r||r.s===`success`&&r.e===void 0&&a.options.loader)&&(n.loaderData=r.l),n.status=r.s,n.ssr=r.ssr,a.options.ssr=n.ssr,n.updatedAt=r.u,n.error=r.e,n._notFound||=r.g,n.status===`error`||n.status===`notFound`||n._notFound){v=!0,p.push(n),(n.ssr===!1||n.ssr===`data-only`)&&(m??=t);break}if(n.status===`pending`){m??=t;break}p.push(n),n.ssr===`data-only`&&(m??=t)}!v&&p.length===_&&_<u.length&&(m=_);let y=p.map(async t=>{try{let n=q(e,t);return await(t._notFound?Promise.all([V(n),V(n,`notFoundComponent`)]):V(n,t.status===`error`?`errorComponent`:t.status===`notFound`?`notFoundComponent`:void 0)),!0}catch{return!1}}),b=0;try{for(;b<y.length&&await K(y[b],a.signal);)b++}catch{return}if(!s())return;b<p.length&&g(b);let x=Math.max(m===p.length?p.length+1:p.length,b<y.length?b:h);for(let t=0;t<x;t++){let n=u[t],r=q(e,n),o=u[t-1]?.context??e.options.context??{},c;if(r.options.context){try{c=n._ctx=r.options.context({deps:n.loaderDeps,params:n.params,context:o,location:l,navigate:t=>e.navigate({...t,_fromLocation:l}),buildLocation:e.buildLocation,cause:n.cause,abortController:a,preload:!1,matches:u,routeId:r.id})||{}}catch{if(!s())return;if(n.status!==`error`&&n.status!==`notFound`&&!n._notFound){m=Math.min(m??t,t),g(t);break}}if(!s())return}n.context={...o,...c,...p[t]&&i[t].b}}if(await Zt(e,[l,u],a.signal,0,h),!s())return;let S=m!==void 0||p.length<_,C=v&&p.length===_?u:p,w=S?u:C,T;if(S&&m!==void 0){let e=w[m];T=e.ssr===`data-only`&&h>m+1?h:void 0,w=w.slice(),w[m]={...e,status:`pending`,ssr:e.ssr===`data-only`?`data-only`:!1,_assetEnd:T}}let E=()=>{let t=e.history.location;return S&&!e._tx&&t.href===d&&t.state===f&&e._committed===C&&C.length&&!a.signal.aborted?a:void 0},D=[E,t=>{if(e._handoff!==D)return;e._handoff=void 0;let n=C.length;if(!t||!E()||C.some((e,n)=>e.id!==t[n]?.id)){a.abort();return}let r=T;if(r!==void 0){for(let e=n;e<r;e++)if(u[e]?.id!==t[e]?.id){r=e>m+1?e:void 0;break}}let i=C.map(e=>({...e}));r!==void 0&&(i[m]._assetEnd=r),Y(e,t.splice(0,n,...i));for(let e=n;e<t.length;e++){let n=t[e],r=u[e];r?.id===n.id&&r._ctx&&(n._ctx=r._ctx),n.abortController=a}return n}];e._committed=C,e._lifecycleEnd=pt(C),e._handoff=D,e._preflight=void 0,e.batch(()=>{e.stores.setMatches(w),e.stores.status.set(`idle`),S||e.stores.resolvedLocation.set(e.stores.location.get())})}var dn=`Error preloading route! ☝️`,Q=a(i(),1),fn=Q.createContext(null);function pn(e){return Q.useContext(fn)}function mn(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{At(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(o).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var hn=Q.createContext(void 0),gn=Q.createContext(void 0);t();function _n(...e){let t=Q.useRef(e),n=t.current;return e.forEach((e,t)=>{_(n[t],e,!1,!0)||(n[t]=e)}),t.current}function vn(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(dn)})}function yn(e,t){let n=typeof e==`string`&&w(e);if(n)return t.has(n)?e:null}function bn(e,t,n,r){let i=ne(e.pathname,r),a=ne(t.pathname,r);return(n?.exact?i!==a:!(i.startsWith(a)&&(i.length===a.length||i[a.length]===`/`)))||(n?.includeSearch??!0)&&!_(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function xn(e,t,n){let r=pn(),i=Q.useRef(null),a=Q.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,disabled:u,target:d,onClick:f,onBlur:p,onFocus:m,onMouseEnter:h,onMouseLeave:g,onTouchStart:_}=e,[v,y,b]=_n(e.search,e.params,o),x=Q.useContext(hn),S=(r.stores._linkScopes??={})[x]??=mn(r,x),[C,T,E]=Q.useMemo(()=>{let t=yn(s,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,o,c=()=>{let e=S[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),o=On(t,r,u),s=u||o&&!w(o)?bn(e,t,b,r.basepath):void 0;(!a||a[0]!==o||a[1]!==s)&&(a=[o,s]),i=e}return a};return[n,c,b?.includeHash&&(()=>{let e=c();return e[1]?o??=[e[0],!1]:e})]},[r,S,e.from,e.hash,e.href,s,v,y,e.state,e.mask,e.unsafeRelative,b,u]),[D,O]=Q.useSyncExternalStore(S[1],T,E||T),k=O===void 0&&D,A=u||D===void 0,ee=Q.useRef(!1),j=e.reloadDocument||k||A?!1:c??r.options.defaultPreload,M=l??r.options.defaultPreloadDelay??0,N=Q.useCallback(e=>{let t=e?.isIntersecting;if(!(t??j===`intent`)){t===!1&&Dn(i);return}if(!M){vn(r,C);return}i.t??=setTimeout(()=>{i.t=void 0,vn(r,C)},M)},[r,C,i,j,M]);Q.useEffect(()=>{if(!j)return;j===`render`&&!ee.current&&(ee.current=!0,vn(r,C));let e=!0,t;return j===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&N(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),Dn(i)}},[r,C,j,N,i]);let P=Tn(e,n);if(P.ref=t?a:i,k)return P.href=k,P;let te=t=>{let n=d??t.currentTarget.getAttribute(`target`);!A&&!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(!n||n===`_self`)&&t.button===0&&(t.preventDefault(),Dn(i),r.navigate({...e,_fromLocation:C._fromLocation}))},ne=()=>{j===`intent`&&vn(r,C)},re=()=>{j===`intent`&&Dn(i)};return P.onClick=$(f,te),P.onBlur=$(p,re),P.onFocus=$(m,N),P.onMouseEnter=$(h,N),P.onMouseLeave=$(g,re),P.onTouchStart=$(_,ne),En(P,e,O,D,A,n)}var Sn={},Cn={className:`active`},wn=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function Tn(e,t){let n={};for(let r in e)wn.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function En(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:d}=t,f=u(n?o:s,{})??(n?Cn:Sn);Object.assign(e,f),e.href=r,a!==`a`&&(e.disabled=i),e.target=d;let p=f.style;(l||p)&&(e.style=l&&p?{...l,...p}:l||p);let m=f.className;return(c||m)&&(e.className=c?m?`${c} ${m}`:c:m),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var Dn=e=>{clearTimeout(e.t),e.t=void 0},$=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function On(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!((r.external||i!==r.publicHref)&&E(i,t.protocolAllowlist)))return i}var kn=Q.memo(Q.forwardRef((e,t)=>{let n=e._asChild||`a`,r=xn(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return Q.createElement(n,r,i)}),An);function An(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!wn.has(r)||!_(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}export{y as C,v as S,N as _,fn as a,k as b,ht as c,Je as d,Ye as f,M as g,Re as h,pn as i,ut as l,Pe as m,gn as n,jt as o,We as p,hn as r,un as s,kn as t,dt as u,P as v,h as w,f as x,_ as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Vr as e}from"./sidebar-
|
|
1
|
+
import{Vr as e}from"./sidebar-BmzmPGuv.js";var t=e(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Vr as e}from"./sidebar-BmzmPGuv.js";var t=e(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]);export{t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-builds-NyGMlBx2.js","assets/sidebar-BmzmPGuv.js","assets/preload-helper-CE9OukVC.js","assets/link-CRMwpc7-.js","assets/select-DIyG5G-V.js","assets/useCompositeListItem-Cbk_weKW.js","assets/check-C3VCvMOV.js","assets/arrow-up-right-C_1ALUCD.js","assets/TargetDisplay-DMZHMgWk.js","assets/copy-BjVLMKbo.js","assets/key-round-BkeLvA1m.js","assets/native-builds-uKuvmyXZ.js","assets/constants-zSb7FXDh.js","assets/dist-BEmib-ZM.js","assets/HashValueDisplay-BHL4xWSY.js","assets/-native-builds-search-qeto9-fq.js","assets/history-Ci4dhphE.js","assets/badge-zMibJGR5.js","assets/ChannelBadge-CPc1M44L.js","assets/RelativeTime-CdQ86VoP.js","assets/relativeTime-Dbefsycs.js","assets/chevron-right-RAuPv9r1.js","assets/table-Bo1jU9-v.js","assets/RowReason-CEI-_T6G.js","assets/PlatformIcon-DYsYaYt6.js","assets/NativeBuildsNav-BxAmQr2E.js","assets/tabs-DARDj-XC.js","assets/SandboxBadge-CqGX5DiH.js","assets/dialog-DlAv6zou.js","assets/api-tJRzijjy.js","assets/useMutation-D7IuoOLE.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e,r as t,t as n}from"./preload-helper-CE9OukVC.js";import{i as r}from"./-native-builds-search-qeto9-fq.js";var i=e(`/native-builds`)({component:t(()=>n(()=>import(`./native-builds-NyGMlBx2.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])),`component`),validateSearch:r});export{i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Di as e,Vr as t,_r as n,gr as r,h as i,p as a}from"./sidebar-UnsNYOry.js";import{t as o}from"./link-D95E0fwF.js";import{o as s}from"./preload-helper-52zhjEsw.js";import{t as c}from"./arrow-up-right-BPRe5soE.js";import{i as l,n as u,r as d,t as f}from"./TargetDisplay-CyBWoX-f.js";import{a as p,i as m,n as ee,o as te,r as ne,t as re}from"./select-DSZKLAHH.js";import{o as h,t as ie}from"./-native-builds-search-CRhUT348.js";import{t as g}from"./history-Bz8IgNln.js";import{C as _,d as v,g as y,h as b,x as ae}from"./native-builds-3qvP-53q.js";import{r as x}from"./dist-Dh2hrHKj.js";import{a as S,i as oe,n as C,o as w,r as T,t as se}from"./badge-Cf3eoJjl.js";import{r as ce,t as E}from"./constants-zSb7FXDh.js";import{g as le,i as ue,p as de}from"./api-sTvbSydX.js";import{t as D}from"./native-builds-CnaQgVq6.js";import{n as fe,t as pe}from"./PlatformIcon-DjcYGkV6.js";import{a as me,n as he,o as ge,r as _e,s as ve,t as ye}from"./dialog-ZrH3ul9A.js";import{i as O,r as k}from"./table-tm9RvUbS.js";import{t as be}from"./ChannelBadge-B7DxBTj3.js";import{a as xe,c as Se,d as Ce,f as we,i as Te,l as Ee,n as De,o as A,p as Oe,r as ke,s as j,t as M,u as Ae}from"./RelativeTime-DxYXSuC4.js";import{a as N,c as je,i as P,l as Me,n as Ne,o as Pe,r as Fe,s as Ie,t as Le}from"./RowReason-BvjPxMrd.js";import{t as Re}from"./NativeBuildsNav-CZSaxAYo.js";import{i as ze,n as Be,r as F,t as I}from"./SandboxBadge-B_edulK_.js";var Ve=t(`file-up`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),L=e(),R=`npx hot-updater native-build import <file>`,z=`https://hot-updater.dev/docs/guides/native-build#import-a-build-made-elsewhere`;function He(){return(0,L.jsxs)(ye,{children:[(0,L.jsxs)(ve,{render:(0,L.jsx)(r,{"aria-label":`Import a build`,className:`min-h-11 min-w-11 sm:min-h-7 sm:min-w-0`,size:`sm`,variant:`outline`}),children:[(0,L.jsx)(Ve,{"data-icon":`inline-start`}),(0,L.jsx)(`span`,{className:`hidden sm:inline`,children:`Import a build`})]}),(0,L.jsxs)(he,{className:`sm:max-w-lg`,children:[(0,L.jsxs)(me,{children:[(0,L.jsx)(ge,{children:`Import a build`}),(0,L.jsx)(_e,{children:`Track an .ipa, .aab, .apk or .app built elsewhere as a patch base.`})]}),(0,L.jsx)(l,{label:`the import command`,value:R,wrap:!0}),(0,L.jsxs)(`a`,{className:n({className:`min-h-11 w-full sm:min-h-8 sm:w-fit`,variant:`outline`}),href:z,rel:`noreferrer`,target:`_blank`,children:[`Import guide`,(0,L.jsx)(c,{"data-icon":`inline-end`})]})]})]})}var Ue={"app-store":`App Store`,"ad-hoc":`ad hoc`,development:`development`,enterprise:`enterprise`},B=e=>{let t=b[e.artifact_kind].label,n=e.submitted_to===null?e.artifact_kind===`ipa`&&e.export_method!==null?`${Ue[e.export_method]} ${t}`:t:`${ze[e.submitted_to]} build`;return e.is_sandbox?`sandbox ${n}`:n},We=e=>{if(e===void 0)return{sentence:`A newer build on its channel reaches people the same way.`,label:`Older: a newer build on its channel reaches people the same way`};let t=ae(e);return{sentence:`A newer ${B(e)} exists${t===null?`.`:`: ${t}`}`,label:`Older: a newer ${B(e)} exists${t===null?``:`, ${t}`}`}};function V({newer:e}){let t=We(e);return(0,L.jsx)(Le,{icon:g,label:t.label,reason:t.sentence,children:`Older`})}var Ge=`https://hot-updater.dev/docs/guides/native-build#how-a-build-is-tracked`,H=9,U=e=>e===void 0?{channels:`all`}:{channel:e},Ke={one:`older build`,other:`older builds`};function qe({channel:e,paged:t,folded:i,onClearChannel:a}){return t||i?(0,L.jsx)(j,{icon:h,title:i?`Each build here has a newer one`:`No more native builds`,children:(0,L.jsx)(o,{className:n({className:`mt-1 min-h-11 sm:min-h-8`,variant:`outline`}),search:U(e),to:`/native-builds`,children:`Show the newest builds`})}):e===void 0?(0,L.jsxs)(j,{icon:h,title:`No native builds`,children:[(0,L.jsxs)(`p`,{children:[`Build one with`,` `,(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:`native-build android`}),` or`,` `,(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:`native-build ios`}),`, or import one built elsewhere:`]}),(0,L.jsx)(`div`,{className:`w-full text-left`,children:(0,L.jsx)(l,{label:`the import command`,value:R,wrap:!0})}),(0,L.jsxs)(`a`,{className:n({className:`mt-1 min-h-11 sm:min-h-8`,variant:`outline`}),href:Ge,rel:`noreferrer`,target:`_blank`,children:[`Native build guide`,(0,L.jsx)(c,{"data-icon":`inline-end`})]}),(0,L.jsxs)(`a`,{className:n({className:`min-h-11 sm:min-h-8`,variant:`outline`}),href:z,rel:`noreferrer`,target:`_blank`,children:[`Import guide`,(0,L.jsx)(c,{"data-icon":`inline-end`})]})]}):(0,L.jsxs)(j,{icon:h,title:(0,L.jsxs)(L.Fragment,{children:[`No native build embeds `,(0,L.jsx)(`span`,{translate:`no`,children:e})]}),children:[(0,L.jsx)(`p`,{children:`A build embeds the channel it was built on. Build one on this channel, or list every channel's builds.`}),(0,L.jsx)(r,{className:`mt-1 min-h-11 sm:min-h-8`,onClick:a,variant:`outline`,children:`Show all channels`})]})}var W=e=>`${_(e.platform)} ${b[e.artifact_kind].label}`;function G({build:e}){return(0,L.jsx)(o,{"aria-label":W(e),className:`relative rounded-sm font-medium whitespace-nowrap text-foreground transition-colors underline-offset-4 after:absolute after:-inset-x-[10px] after:-inset-y-[10px] hover:text-primary hover:underline focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:after:hidden`,params:{buildId:e.id},to:`/native-builds/$buildId`,children:b[e.artifact_kind].label})}function K({build:e,inTable:t=!1,older:n=!1,newer:r}){return t?(0,L.jsxs)(`span`,{className:`flex max-w-24 flex-wrap items-center gap-x-1.5 gap-y-1`,children:[(0,L.jsx)(G,{build:e}),(0,L.jsx)(I,{build:e}),n?(0,L.jsx)(V,{newer:r}):null]}):(0,L.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-1`,children:[(0,L.jsx)(G,{build:e}),(0,L.jsx)(I,{build:e})]})}function q({channel:e,onChannel:t}){return(0,L.jsx)(`button`,{"aria-label":`Show the builds that embed ${e}`,className:`relative flex max-w-full min-w-0 rounded-md text-left after:absolute after:-inset-x-1 after:-inset-y-[11px] focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:after:hidden`,onClick:()=>t(e),title:e,type:`button`,children:(0,L.jsx)(be,{channel:e,className:`block max-w-32 truncate`})})}function Je({build:e}){return!F(e)&&!e.is_store_build?(0,L.jsx)(u,{}):(0,L.jsx)(J,{build:e,className:`flex flex-col items-start gap-1`})}function J({build:e,className:t}){return(0,L.jsxs)(`span`,{className:t,children:[(0,L.jsx)(Be,{build:e}),e.is_store_build?(0,L.jsx)(se,{className:`px-1.5`,variant:`muted`,children:`Store build`}):null]})}function Ye({build:e}){return e.build_number?(0,L.jsx)(`span`,{className:`font-mono tabular-nums`,translate:`no`,children:e.build_number}):(0,L.jsx)(u,{})}var Y=e=>ce(e.id);function X({build:e,older:t=!1,newer:n,onChannel:r}){let i=s(),a=y(e);return(0,L.jsxs)(Ce,{"aria-label":`Open native build ${e.id}`,className:`data-[older=true]:bg-muted/60 data-[older=true]:saturate-50 data-[older=true]:hover:bg-muted/60 data-[older=true]:hover:saturate-100 data-[older=true]:focus-within:saturate-100`,"data-older":t?!0:void 0,onOpen:()=>void i({to:`/native-builds/$buildId`,params:{buildId:e.id}}),children:[(0,L.jsx)(k,{children:(0,L.jsx)(K,{build:e,inTable:!0,newer:n,older:t})}),(0,L.jsx)(k,{children:(0,L.jsx)(q,{channel:a,onChannel:r})}),(0,L.jsx)(k,{className:`whitespace-nowrap`,children:(0,L.jsx)(fe,{platform:e.platform})}),(0,L.jsx)(k,{children:(0,L.jsx)(Ye,{build:e})}),(0,L.jsx)(k,{children:(0,L.jsx)(d,{appVersion:e.app_version,fingerprintHash:e.fingerprint_hash,nativeAppVersion:e.native_app_version})}),(0,L.jsx)(k,{children:(0,L.jsx)(f,{value:e.build_key})}),(0,L.jsx)(k,{children:(0,L.jsx)(Je,{build:e})}),(0,L.jsx)(k,{className:`whitespace-nowrap text-muted-foreground tabular-nums`,children:v(e.byte_size)}),(0,L.jsx)(k,{className:`text-xs text-muted-foreground`,children:(0,L.jsx)(M,{ms:Y(e)})})]})}function Z({build:e,older:t=!1,newer:n,onChannel:r}){let i=s(),a=y(e),o=F(e)||e.is_store_build;return(0,L.jsxs)(De,{"aria-label":`Native build ${W(e)} ${e.id}`,className:`gap-3 border-b-0 data-[older=true]:bg-muted/60 data-[older=true]:saturate-50 data-[older=true]:hover:bg-muted/60 data-[older=true]:hover:saturate-100 data-[older=true]:focus-within:saturate-100`,"data-older":t?!0:void 0,onClick:Oe(()=>void i({to:`/native-builds/$buildId`,params:{buildId:e.id}})),children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-x-2.5`,children:[(0,L.jsx)(pe,{className:`size-4 shrink-0 text-muted-foreground`,platform:e.platform}),(0,L.jsx)(K,{build:e}),t?(0,L.jsx)(V,{newer:n}):null]}),(0,L.jsx)(`div`,{className:`flex min-w-0`,children:(0,L.jsx)(q,{channel:a,onChannel:r})}),(0,L.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground`,children:[(0,L.jsx)(`span`,{className:`sr-only`,children:_(e.platform)}),e.build_number?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`span`,{translate:`no`,children:[`Build`,` `,(0,L.jsx)(`span`,{className:`font-mono tabular-nums text-foreground`,children:e.build_number})]}),(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`·`})]}):null,(0,L.jsx)(`span`,{className:`tabular-nums`,children:v(e.byte_size)}),(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,L.jsx)(M,{ms:Y(e)})]}),(0,L.jsxs)(`div`,{className:`flex flex-wrap items-end gap-x-4 gap-y-6 text-xs`,children:[(0,L.jsxs)(`span`,{className:`flex items-center`,children:[(0,L.jsx)(`span`,{className:`sr-only`,children:`Target `}),(0,L.jsx)(d,{appVersion:e.app_version,fingerprintHash:e.fingerprint_hash,nativeAppVersion:e.native_app_version})]}),e.build_key?(0,L.jsxs)(`span`,{className:`flex items-center`,children:[(0,L.jsx)(`span`,{className:`sr-only`,children:`Build key `}),(0,L.jsx)(f,{value:e.build_key})]}):null]}),o?(0,L.jsx)(J,{build:e,className:`flex flex-wrap items-center gap-1.5`}):null]})}function Xe({fold:e,channel:t,isMobile:n,open:r,onOpenChange:i,onChannel:a}){let o=de(t,{...e.from===void 0?{}:{from:e.from},to:e.to},r),s=o.data?.pages??[],c=Object.assign({},...s.map(e=>e.newer)),l=s.flatMap(e=>e.rows),u=n?void 0:H,d=o.isError?(0,L.jsx)(P,{columns:u,label:`Older builds`,onRetry:()=>void o.refetch(),state:`error`}):o.isPending||o.isFetchingNextPage?(0,L.jsx)(P,{columns:u,label:`Loading older builds`,state:`loading`}):o.hasNextPage?(0,L.jsx)(P,{columns:u,label:`Older builds`,onMore:()=>void o.fetchNextPage(),state:`more`}):null,f={label:Pe(e,Ke),open:r,onOpenChange:i,panelId:`native-build-fold-${e.to}`};return n?(0,L.jsxs)(Ne,{...f,inList:!0,children:[l.map(e=>(0,L.jsx)(`div`,{className:`border-b last:border-b-0`,role:`listitem`,children:(0,L.jsx)(Z,{build:e,newer:c[e.id],older:!0,onChannel:a})},e.id)),d]}):(0,L.jsxs)(Fe,{...f,columns:H,children:[l.map(e=>(0,L.jsx)(X,{build:e,newer:c[e.id],older:!0,onChannel:a},e.id)),d]})}function Ze({builds:e,channel:t,paged:n,onChannel:a}){let o=i(),s=Me(),c=e.data?.entries,{next:l,previous:u}=e.data??{},d=c?.filter(({kind:e})=>e===`row`).length??0;if(e.isError)return(0,L.jsxs)(C,{variant:`destructive`,children:[(0,L.jsx)(w,{}),(0,L.jsx)(S,{children:`Native builds couldn't be loaded`}),(0,L.jsx)(oe,{children:`Check your connection and try again.`}),(0,L.jsx)(T,{children:(0,L.jsxs)(r,{onClick:()=>void e.refetch(),size:`xs`,variant:`outline`,children:[(0,L.jsx)(x,{"data-icon":`inline-start`}),`Retry`]})})]});let f=(0,L.jsx)(qe,{channel:t,folded:(c?.length??0)>0,onClearChannel:()=>a(void 0),paged:n}),p=e=>(0,L.jsx)(Xe,{channel:t,fold:e,isMobile:o,onChannel:a,onOpenChange:t=>s.set(N(e),t),open:s.isOpen(N(e))},`fold-${e.to}`);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Se,{children:o?(0,L.jsx)(`div`,{"aria-busy":e.isPlaceholderData,"aria-label":`Native builds`,className:`h-full overflow-y-auto aria-busy:opacity-60`,role:`list`,children:e.isPending?(0,L.jsx)(ke,{label:`Loading native builds`}):(0,L.jsxs)(L.Fragment,{children:[d===0?(0,L.jsx)(Te,{children:f}):null,c?.map(e=>e.kind===`fold`?p(e):(0,L.jsx)(`div`,{className:`border-b last:border-b-0`,role:`listitem`,children:(0,L.jsx)(Z,{build:e.row,onChannel:a})},e.row.id))]})}):(0,L.jsx)(xe,{"aria-busy":e.isPlaceholderData,"aria-label":`Native builds`,className:`aria-busy:opacity-60 [&_td]:px-1.5 [&_th]:px-1.5`,header:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(O,{children:`Artifact`}),(0,L.jsx)(O,{children:`Channel`}),(0,L.jsx)(O,{children:`Platform`}),(0,L.jsx)(O,{children:`Build`}),(0,L.jsx)(O,{children:`Target`}),(0,L.jsx)(O,{children:`Build key`}),(0,L.jsx)(O,{children:`Store`}),(0,L.jsx)(O,{children:`Size`}),(0,L.jsx)(O,{children:`Created`})]}),rowGroups:!0,children:e.isPending?(0,L.jsx)(A,{children:(0,L.jsx)(we,{columns:H,label:`Loading native builds`})}):(0,L.jsxs)(L.Fragment,{children:[d===0?(0,L.jsx)(A,{children:(0,L.jsx)(Ee,{columns:H,children:f})}):null,je(c??[]).map(e=>e.kind===`fold`?p(e.fold):(0,L.jsx)(A,{children:e.rows.map(e=>(0,L.jsx)(X,{build:e,onChannel:a},e.id))},`rows-${e.rows[0].id}`))]})})}),e.isPending||c===void 0?null:(0,L.jsx)(Ae,{count:d,folded:{...Ie(c),label:`older`},label:`Native build pages`,noun:[`build`,`builds`],pending:e.isPlaceholderData,newest:n?{search:U(t),to:`/native-builds`}:void 0,next:l===void 0?void 0:{search:{...U(t),before:l},to:`/native-builds`},previous:u===void 0?void 0:{search:{...U(t),...u},to:`/native-builds`}})]})}var Q=`channel:`,Qe={data:void 0,isError:!1,isPending:!0,isPlaceholderData:!1,refetch:()=>void 0},$=e=>`${Q}${e}`;function $e({search:e,onSearchChange:t}){let n=ue(),i=n.data?.map(({name:e})=>e)??[],o=ie(e,n.data&&i),s=o===void 0,c=s&&n.isError,{channel:l,before:u,after:d}=o??e,f=le(o??{},{enabled:!s}),g=s?Qe:f,_=l===void 0||i.includes(l)?i:[l,...i],v=e=>t(e===void 0?{channels:`all`}:{channel:e});return(0,L.jsxs)(`div`,{className:`flex h-svh min-h-0 min-w-0 flex-col`,children:[(0,L.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,L.jsx)(a,{className:`-ml-1 size-11 lg:size-7`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,L.jsx)(h,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,L.jsx)(`h1`,{className:`text-sm font-medium`,children:`Native builds`})]}),(0,L.jsx)(`p`,{className:`basis-full pl-12 text-xs text-muted-foreground sm:basis-auto sm:pl-0`,children:`Store and test builds, each the built-in bundle its OTAs patch from.`})]}),(0,L.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-4 bg-muted/5 p-3 sm:p-6`,children:[(0,L.jsx)(Re,{current:`builds`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsxs)(re,{disabled:s,items:[{label:E,value:`all`},..._.map(e=>({label:e,value:$(e)}))],onOpenChange:e=>{e&&n.refetch()},onValueChange:e=>v(e?.startsWith(Q)?e.slice(8):void 0),value:s?null:l===void 0?`all`:$(l),children:[(0,L.jsx)(p,{"aria-label":`Channel`,className:`min-w-0 flex-1 text-xs data-[size=default]:h-11 sm:w-48 sm:flex-none sm:data-[size=default]:h-8`,children:(0,L.jsx)(te,{})}),(0,L.jsx)(ee,{children:(0,L.jsxs)(ne,{children:[(0,L.jsx)(m,{value:`all`,children:E}),_.map(e=>(0,L.jsx)(m,{translate:`no`,value:$(e),children:e},e))]})})]}),(0,L.jsx)(`div`,{className:`ml-auto`,children:(0,L.jsx)(He,{})}),(0,L.jsx)(r,{"aria-label":`Refresh native builds`,className:`size-11 sm:size-7`,disabled:g.isPending,onClick:()=>void g.refetch(),size:`icon-sm`,variant:`ghost`,children:(0,L.jsx)(x,{"aria-hidden":`true`})})]}),c?(0,L.jsxs)(C,{variant:`destructive`,children:[(0,L.jsx)(w,{}),(0,L.jsx)(S,{children:`Channels couldn't be loaded`}),(0,L.jsx)(oe,{children:`Native builds show once the channels load.`}),(0,L.jsx)(T,{children:(0,L.jsxs)(r,{className:`min-h-11 sm:min-h-7`,onClick:()=>void n.refetch(),size:`xs`,variant:`outline`,children:[(0,L.jsx)(x,{"data-icon":`inline-start`}),`Retry`]})})]}):(0,L.jsx)(Ze,{builds:g,channel:l,onChannel:v,paged:u!==void 0||d!==void 0})]})]})}function et(){let e=D.useSearch(),t=D.useNavigate();return(0,L.jsx)($e,{onSearchChange:e=>void t({search:e}),search:e})}export{et as component};
|
|
1
|
+
import{Di as e,Vr as t,_r as n,gr as r,h as i,p as a}from"./sidebar-BmzmPGuv.js";import{t as o}from"./link-CRMwpc7-.js";import{o as s}from"./preload-helper-CE9OukVC.js";import{t as c}from"./arrow-up-right-C_1ALUCD.js";import{i as l,n as u,r as d,t as f}from"./TargetDisplay-DMZHMgWk.js";import{a as p,i as m,n as ee,o as te,r as ne,t as re}from"./select-DIyG5G-V.js";import{o as h,t as ie}from"./-native-builds-search-qeto9-fq.js";import{t as g}from"./history-Ci4dhphE.js";import{C as _,d as v,g as y,h as b,x as ae}from"./native-builds-uKuvmyXZ.js";import{r as x}from"./dist-BEmib-ZM.js";import{a as S,i as oe,n as C,o as w,r as T,t as se}from"./badge-zMibJGR5.js";import{r as ce,t as E}from"./constants-zSb7FXDh.js";import{g as le,i as ue,p as de}from"./api-tJRzijjy.js";import{t as D}from"./native-builds-DJlYvvPY.js";import{n as fe,t as pe}from"./PlatformIcon-DYsYaYt6.js";import{a as me,n as he,o as ge,r as _e,s as ve,t as ye}from"./dialog-DlAv6zou.js";import{i as O,r as k}from"./table-Bo1jU9-v.js";import{t as be}from"./ChannelBadge-CPc1M44L.js";import{a as xe,c as Se,d as Ce,f as we,i as Te,l as Ee,n as De,o as A,p as Oe,r as ke,s as j,t as M,u as Ae}from"./RelativeTime-CdQ86VoP.js";import{a as N,c as je,i as P,l as Me,n as Ne,o as Pe,r as Fe,s as Ie,t as Le}from"./RowReason-CEI-_T6G.js";import{t as Re}from"./NativeBuildsNav-BxAmQr2E.js";import{i as ze,n as Be,r as F,t as I}from"./SandboxBadge-CqGX5DiH.js";var Ve=t(`file-up`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),L=e(),R=`npx hot-updater native-build import <file>`,z=`https://hot-updater.dev/docs/guides/native-build#import-a-build-made-elsewhere`;function He(){return(0,L.jsxs)(ye,{children:[(0,L.jsxs)(ve,{render:(0,L.jsx)(r,{"aria-label":`Import a build`,className:`min-h-11 min-w-11 sm:min-h-7 sm:min-w-0`,size:`sm`,variant:`outline`}),children:[(0,L.jsx)(Ve,{"data-icon":`inline-start`}),(0,L.jsx)(`span`,{className:`hidden sm:inline`,children:`Import a build`})]}),(0,L.jsxs)(he,{className:`sm:max-w-lg`,children:[(0,L.jsxs)(me,{children:[(0,L.jsx)(ge,{children:`Import a build`}),(0,L.jsx)(_e,{children:`Track an .ipa, .aab, .apk or .app built elsewhere as a patch base.`})]}),(0,L.jsx)(l,{label:`the import command`,value:R,wrap:!0}),(0,L.jsxs)(`a`,{className:n({className:`min-h-11 w-full sm:min-h-8 sm:w-fit`,variant:`outline`}),href:z,rel:`noreferrer`,target:`_blank`,children:[`Import guide`,(0,L.jsx)(c,{"data-icon":`inline-end`})]})]})]})}var Ue={"app-store":`App Store`,"ad-hoc":`ad hoc`,development:`development`,enterprise:`enterprise`},B=e=>{let t=b[e.artifact_kind].label,n=e.submitted_to===null?e.artifact_kind===`ipa`&&e.export_method!==null?`${Ue[e.export_method]} ${t}`:t:`${ze[e.submitted_to]} build`;return e.is_sandbox?`sandbox ${n}`:n},We=e=>{if(e===void 0)return{sentence:`A newer build on its channel reaches people the same way.`,label:`Older: a newer build on its channel reaches people the same way`};let t=ae(e);return{sentence:`A newer ${B(e)} exists${t===null?`.`:`: ${t}`}`,label:`Older: a newer ${B(e)} exists${t===null?``:`, ${t}`}`}};function V({newer:e}){let t=We(e);return(0,L.jsx)(Le,{icon:g,label:t.label,reason:t.sentence,children:`Older`})}var Ge=`https://hot-updater.dev/docs/guides/native-build#how-a-build-is-tracked`,H=9,U=e=>e===void 0?{channels:`all`}:{channel:e},Ke={one:`older build`,other:`older builds`};function qe({channel:e,paged:t,folded:i,onClearChannel:a}){return t||i?(0,L.jsx)(j,{icon:h,title:i?`Each build here has a newer one`:`No more native builds`,children:(0,L.jsx)(o,{className:n({className:`mt-1 min-h-11 sm:min-h-8`,variant:`outline`}),search:U(e),to:`/native-builds`,children:`Show the newest builds`})}):e===void 0?(0,L.jsxs)(j,{icon:h,title:`No native builds`,children:[(0,L.jsxs)(`p`,{children:[`Build one with`,` `,(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:`native-build android`}),` or`,` `,(0,L.jsx)(`code`,{className:`font-mono text-xs`,children:`native-build ios`}),`, or import one built elsewhere:`]}),(0,L.jsx)(`div`,{className:`w-full text-left`,children:(0,L.jsx)(l,{label:`the import command`,value:R,wrap:!0})}),(0,L.jsxs)(`a`,{className:n({className:`mt-1 min-h-11 sm:min-h-8`,variant:`outline`}),href:Ge,rel:`noreferrer`,target:`_blank`,children:[`Native build guide`,(0,L.jsx)(c,{"data-icon":`inline-end`})]}),(0,L.jsxs)(`a`,{className:n({className:`min-h-11 sm:min-h-8`,variant:`outline`}),href:z,rel:`noreferrer`,target:`_blank`,children:[`Import guide`,(0,L.jsx)(c,{"data-icon":`inline-end`})]})]}):(0,L.jsxs)(j,{icon:h,title:(0,L.jsxs)(L.Fragment,{children:[`No native build embeds `,(0,L.jsx)(`span`,{translate:`no`,children:e})]}),children:[(0,L.jsx)(`p`,{children:`A build embeds the channel it was built on. Build one on this channel, or list every channel's builds.`}),(0,L.jsx)(r,{className:`mt-1 min-h-11 sm:min-h-8`,onClick:a,variant:`outline`,children:`Show all channels`})]})}var W=e=>`${_(e.platform)} ${b[e.artifact_kind].label}`;function G({build:e}){return(0,L.jsx)(o,{"aria-label":W(e),className:`relative rounded-sm font-medium whitespace-nowrap text-foreground transition-colors underline-offset-4 after:absolute after:-inset-x-[10px] after:-inset-y-[10px] hover:text-primary hover:underline focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:after:hidden`,params:{buildId:e.id},to:`/native-builds/$buildId`,children:b[e.artifact_kind].label})}function K({build:e,inTable:t=!1,older:n=!1,newer:r}){return t?(0,L.jsxs)(`span`,{className:`flex max-w-24 flex-wrap items-center gap-x-1.5 gap-y-1`,children:[(0,L.jsx)(G,{build:e}),(0,L.jsx)(I,{build:e}),n?(0,L.jsx)(V,{newer:r}):null]}):(0,L.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-1`,children:[(0,L.jsx)(G,{build:e}),(0,L.jsx)(I,{build:e})]})}function q({channel:e,onChannel:t}){return(0,L.jsx)(`button`,{"aria-label":`Show the builds that embed ${e}`,className:`relative flex max-w-full min-w-0 rounded-md text-left after:absolute after:-inset-x-1 after:-inset-y-[11px] focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:after:hidden`,onClick:()=>t(e),title:e,type:`button`,children:(0,L.jsx)(be,{channel:e,className:`block max-w-32 truncate`})})}function Je({build:e}){return!F(e)&&!e.is_store_build?(0,L.jsx)(u,{}):(0,L.jsx)(J,{build:e,className:`flex flex-col items-start gap-1`})}function J({build:e,className:t}){return(0,L.jsxs)(`span`,{className:t,children:[(0,L.jsx)(Be,{build:e}),e.is_store_build?(0,L.jsx)(se,{className:`px-1.5`,variant:`muted`,children:`Store build`}):null]})}function Ye({build:e}){return e.build_number?(0,L.jsx)(`span`,{className:`font-mono tabular-nums`,translate:`no`,children:e.build_number}):(0,L.jsx)(u,{})}var Y=e=>ce(e.id);function X({build:e,older:t=!1,newer:n,onChannel:r}){let i=s(),a=y(e);return(0,L.jsxs)(Ce,{"aria-label":`Open native build ${e.id}`,className:`data-[older=true]:bg-muted/60 data-[older=true]:saturate-50 data-[older=true]:hover:bg-muted/60 data-[older=true]:hover:saturate-100 data-[older=true]:focus-within:saturate-100`,"data-older":t?!0:void 0,onOpen:()=>void i({to:`/native-builds/$buildId`,params:{buildId:e.id}}),children:[(0,L.jsx)(k,{children:(0,L.jsx)(K,{build:e,inTable:!0,newer:n,older:t})}),(0,L.jsx)(k,{children:(0,L.jsx)(q,{channel:a,onChannel:r})}),(0,L.jsx)(k,{className:`whitespace-nowrap`,children:(0,L.jsx)(fe,{platform:e.platform})}),(0,L.jsx)(k,{children:(0,L.jsx)(Ye,{build:e})}),(0,L.jsx)(k,{children:(0,L.jsx)(d,{appVersion:e.app_version,fingerprintHash:e.fingerprint_hash,nativeAppVersion:e.native_app_version})}),(0,L.jsx)(k,{children:(0,L.jsx)(f,{value:e.build_key})}),(0,L.jsx)(k,{children:(0,L.jsx)(Je,{build:e})}),(0,L.jsx)(k,{className:`whitespace-nowrap text-muted-foreground tabular-nums`,children:v(e.byte_size)}),(0,L.jsx)(k,{className:`text-xs text-muted-foreground`,children:(0,L.jsx)(M,{ms:Y(e)})})]})}function Z({build:e,older:t=!1,newer:n,onChannel:r}){let i=s(),a=y(e),o=F(e)||e.is_store_build;return(0,L.jsxs)(De,{"aria-label":`Native build ${W(e)} ${e.id}`,className:`gap-3 border-b-0 data-[older=true]:bg-muted/60 data-[older=true]:saturate-50 data-[older=true]:hover:bg-muted/60 data-[older=true]:hover:saturate-100 data-[older=true]:focus-within:saturate-100`,"data-older":t?!0:void 0,onClick:Oe(()=>void i({to:`/native-builds/$buildId`,params:{buildId:e.id}})),children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-x-2.5`,children:[(0,L.jsx)(pe,{className:`size-4 shrink-0 text-muted-foreground`,platform:e.platform}),(0,L.jsx)(K,{build:e}),t?(0,L.jsx)(V,{newer:n}):null]}),(0,L.jsx)(`div`,{className:`flex min-w-0`,children:(0,L.jsx)(q,{channel:a,onChannel:r})}),(0,L.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground`,children:[(0,L.jsx)(`span`,{className:`sr-only`,children:_(e.platform)}),e.build_number?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`span`,{translate:`no`,children:[`Build`,` `,(0,L.jsx)(`span`,{className:`font-mono tabular-nums text-foreground`,children:e.build_number})]}),(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`·`})]}):null,(0,L.jsx)(`span`,{className:`tabular-nums`,children:v(e.byte_size)}),(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,L.jsx)(M,{ms:Y(e)})]}),(0,L.jsxs)(`div`,{className:`flex flex-wrap items-end gap-x-4 gap-y-6 text-xs`,children:[(0,L.jsxs)(`span`,{className:`flex items-center`,children:[(0,L.jsx)(`span`,{className:`sr-only`,children:`Target `}),(0,L.jsx)(d,{appVersion:e.app_version,fingerprintHash:e.fingerprint_hash,nativeAppVersion:e.native_app_version})]}),e.build_key?(0,L.jsxs)(`span`,{className:`flex items-center`,children:[(0,L.jsx)(`span`,{className:`sr-only`,children:`Build key `}),(0,L.jsx)(f,{value:e.build_key})]}):null]}),o?(0,L.jsx)(J,{build:e,className:`flex flex-wrap items-center gap-1.5`}):null]})}function Xe({fold:e,channel:t,isMobile:n,open:r,onOpenChange:i,onChannel:a}){let o=de(t,{...e.from===void 0?{}:{from:e.from},to:e.to},r),s=o.data?.pages??[],c=Object.assign({},...s.map(e=>e.newer)),l=s.flatMap(e=>e.rows),u=n?void 0:H,d=o.isError?(0,L.jsx)(P,{columns:u,label:`Older builds`,onRetry:()=>void o.refetch(),state:`error`}):o.isPending||o.isFetchingNextPage?(0,L.jsx)(P,{columns:u,label:`Loading older builds`,state:`loading`}):o.hasNextPage?(0,L.jsx)(P,{columns:u,label:`Older builds`,onMore:()=>void o.fetchNextPage(),state:`more`}):null,f={label:Pe(e,Ke),open:r,onOpenChange:i,panelId:`native-build-fold-${e.to}`};return n?(0,L.jsxs)(Ne,{...f,inList:!0,children:[l.map(e=>(0,L.jsx)(`div`,{className:`border-b last:border-b-0`,role:`listitem`,children:(0,L.jsx)(Z,{build:e,newer:c[e.id],older:!0,onChannel:a})},e.id)),d]}):(0,L.jsxs)(Fe,{...f,columns:H,children:[l.map(e=>(0,L.jsx)(X,{build:e,newer:c[e.id],older:!0,onChannel:a},e.id)),d]})}function Ze({builds:e,channel:t,paged:n,onChannel:a}){let o=i(),s=Me(),c=e.data?.entries,{next:l,previous:u}=e.data??{},d=c?.filter(({kind:e})=>e===`row`).length??0;if(e.isError)return(0,L.jsxs)(C,{variant:`destructive`,children:[(0,L.jsx)(w,{}),(0,L.jsx)(S,{children:`Native builds couldn't be loaded`}),(0,L.jsx)(oe,{children:`Check your connection and try again.`}),(0,L.jsx)(T,{children:(0,L.jsxs)(r,{onClick:()=>void e.refetch(),size:`xs`,variant:`outline`,children:[(0,L.jsx)(x,{"data-icon":`inline-start`}),`Retry`]})})]});let f=(0,L.jsx)(qe,{channel:t,folded:(c?.length??0)>0,onClearChannel:()=>a(void 0),paged:n}),p=e=>(0,L.jsx)(Xe,{channel:t,fold:e,isMobile:o,onChannel:a,onOpenChange:t=>s.set(N(e),t),open:s.isOpen(N(e))},`fold-${e.to}`);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Se,{children:o?(0,L.jsx)(`div`,{"aria-busy":e.isPlaceholderData,"aria-label":`Native builds`,className:`h-full overflow-y-auto aria-busy:opacity-60`,role:`list`,children:e.isPending?(0,L.jsx)(ke,{label:`Loading native builds`}):(0,L.jsxs)(L.Fragment,{children:[d===0?(0,L.jsx)(Te,{children:f}):null,c?.map(e=>e.kind===`fold`?p(e):(0,L.jsx)(`div`,{className:`border-b last:border-b-0`,role:`listitem`,children:(0,L.jsx)(Z,{build:e.row,onChannel:a})},e.row.id))]})}):(0,L.jsx)(xe,{"aria-busy":e.isPlaceholderData,"aria-label":`Native builds`,className:`aria-busy:opacity-60 [&_td]:px-1.5 [&_th]:px-1.5`,header:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(O,{children:`Artifact`}),(0,L.jsx)(O,{children:`Channel`}),(0,L.jsx)(O,{children:`Platform`}),(0,L.jsx)(O,{children:`Build`}),(0,L.jsx)(O,{children:`Target`}),(0,L.jsx)(O,{children:`Build key`}),(0,L.jsx)(O,{children:`Store`}),(0,L.jsx)(O,{children:`Size`}),(0,L.jsx)(O,{children:`Created`})]}),rowGroups:!0,children:e.isPending?(0,L.jsx)(A,{children:(0,L.jsx)(we,{columns:H,label:`Loading native builds`})}):(0,L.jsxs)(L.Fragment,{children:[d===0?(0,L.jsx)(A,{children:(0,L.jsx)(Ee,{columns:H,children:f})}):null,je(c??[]).map(e=>e.kind===`fold`?p(e.fold):(0,L.jsx)(A,{children:e.rows.map(e=>(0,L.jsx)(X,{build:e,onChannel:a},e.id))},`rows-${e.rows[0].id}`))]})})}),e.isPending||c===void 0?null:(0,L.jsx)(Ae,{count:d,folded:{...Ie(c),label:`older`},label:`Native build pages`,noun:[`build`,`builds`],pending:e.isPlaceholderData,newest:n?{search:U(t),to:`/native-builds`}:void 0,next:l===void 0?void 0:{search:{...U(t),before:l},to:`/native-builds`},previous:u===void 0?void 0:{search:{...U(t),...u},to:`/native-builds`}})]})}var Q=`channel:`,Qe={data:void 0,isError:!1,isPending:!0,isPlaceholderData:!1,refetch:()=>void 0},$=e=>`${Q}${e}`;function $e({search:e,onSearchChange:t}){let n=ue(),i=n.data?.map(({name:e})=>e)??[],o=ie(e,n.data&&i),s=o===void 0,c=s&&n.isError,{channel:l,before:u,after:d}=o??e,f=le(o??{},{enabled:!s}),g=s?Qe:f,_=l===void 0||i.includes(l)?i:[l,...i],v=e=>t(e===void 0?{channels:`all`}:{channel:e});return(0,L.jsxs)(`div`,{className:`flex h-svh min-h-0 min-w-0 flex-col`,children:[(0,L.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,L.jsx)(a,{className:`-ml-1 size-11 lg:size-7`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,L.jsx)(h,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,L.jsx)(`h1`,{className:`text-sm font-medium`,children:`Native builds`})]}),(0,L.jsx)(`p`,{className:`basis-full pl-12 text-xs text-muted-foreground sm:basis-auto sm:pl-0`,children:`Store and test builds, each the built-in bundle its OTAs patch from.`})]}),(0,L.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-4 bg-muted/5 p-3 sm:p-6`,children:[(0,L.jsx)(Re,{current:`builds`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsxs)(re,{disabled:s,items:[{label:E,value:`all`},..._.map(e=>({label:e,value:$(e)}))],onOpenChange:e=>{e&&n.refetch()},onValueChange:e=>v(e?.startsWith(Q)?e.slice(8):void 0),value:s?null:l===void 0?`all`:$(l),children:[(0,L.jsx)(p,{"aria-label":`Channel`,className:`min-w-0 flex-1 text-xs data-[size=default]:h-11 sm:w-48 sm:flex-none sm:data-[size=default]:h-8`,children:(0,L.jsx)(te,{})}),(0,L.jsx)(ee,{children:(0,L.jsxs)(ne,{children:[(0,L.jsx)(m,{value:`all`,children:E}),_.map(e=>(0,L.jsx)(m,{translate:`no`,value:$(e),children:e},e))]})})]}),(0,L.jsx)(`div`,{className:`ml-auto`,children:(0,L.jsx)(He,{})}),(0,L.jsx)(r,{"aria-label":`Refresh native builds`,className:`size-11 sm:size-7`,disabled:g.isPending,onClick:()=>void g.refetch(),size:`icon-sm`,variant:`ghost`,children:(0,L.jsx)(x,{"aria-hidden":`true`})})]}),c?(0,L.jsxs)(C,{variant:`destructive`,children:[(0,L.jsx)(w,{}),(0,L.jsx)(S,{children:`Channels couldn't be loaded`}),(0,L.jsx)(oe,{children:`Native builds show once the channels load.`}),(0,L.jsx)(T,{children:(0,L.jsxs)(r,{className:`min-h-11 sm:min-h-7`,onClick:()=>void n.refetch(),size:`xs`,variant:`outline`,children:[(0,L.jsx)(x,{"data-icon":`inline-start`}),`Retry`]})})]}):(0,L.jsx)(Ze,{builds:g,channel:l,onChannel:v,paged:u!==void 0||d!==void 0})]})]})}function et(){let e=D.useSearch(),t=D.useNavigate();return(0,L.jsx)($e,{onSearchChange:e=>void t({search:e}),search:e})}export{et as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Vr as e}from"./sidebar-
|
|
1
|
+
import{Vr as e}from"./sidebar-BmzmPGuv.js";import{h as t,m as n}from"./constants-zSb7FXDh.js";var r=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`}]]);new TextDecoder;var i=`sandbox-`,a=e=>e.startsWith(i),o=1048576;64*o,1024*o;var s=1048576;16*s,256*s,2048*s;var c=1048576;1*c,8*c;var l=e=>/^[\w@%+=:,./-]+$/.test(e)?e:`'${e.replaceAll(`'`,`'\\''`)}'`,u={apk:{label:`APK`,installs:`Android device or emulator`},aab:{label:`AAB`,installs:`Google Play or bundletool`},app:{label:`Simulator app`,installs:`iOS Simulator`},ipa:{label:`IPA`,installs:`registered iOS devices`}},d=e=>e===`ios`?`iOS`:`Android`,f=e=>{let t=e.submitted_version??[e.app_version??e.native_app_version??null,e.build_number===null?null:`(${e.build_number})`].filter(e=>e!==null).join(` `);return t===``?null:`${d(e.platform)} ${t}`},p=e=>`/api/native-builds/${encodeURIComponent(e)}/download`,m=(e,t,n)=>`${e.origin}${h(e,t)}${p(t)}?t=${encodeURIComponent(n)}`,h=(e,t)=>{let n=v(t);return e.pathname.endsWith(n)?e.pathname.slice(0,-n.length):``},g=(e,t)=>{let n=e.pathname.replace(/\/$/u,``),r=t.replace(/\/$/u,``);return n.endsWith(r)?n.slice(0,n.length-r.length):``},_=e=>{let t=e.pathname.lastIndexOf(`/native-builds`);return t<0?``:e.pathname.slice(0,t)},v=e=>`/native-builds/${encodeURIComponent(e)}`,y=3600*1e3,b=`hot-updater-ios-udid`,x=`hot-updater-ios-device-receipt`,S=`hot-updater-ios-device-pending-receipt`,C=e=>{try{let t=e.split(`.`)[0].replaceAll(`-`,`+`).replaceAll(`_`,`/`),n=JSON.parse(atob(t)).x;return typeof n==`number`?n:0}catch{return 0}},w=e=>{try{let t=JSON.parse(window.sessionStorage.getItem(`hot-updater-ios-device-pending-receipt`)??`null`);return typeof t?.receipt==`string`?C(t.receipt)<=Date.now()?(window.sessionStorage.removeItem(S),null):e!==null&&t.udid===e?t.receipt:null:null}catch{return null}},T=(e,t)=>{try{window.sessionStorage.setItem(S,JSON.stringify({udid:e,receipt:t}))}catch{}},E=e=>{try{JSON.parse(window.sessionStorage.getItem(`hot-updater-ios-device-pending-receipt`)??`null`)?.receipt===e&&window.sessionStorage.removeItem(S)}catch{}},D=/^(?:[0-9a-f]{40}|[0-9a-f]{8}-[0-9a-f]{16})$/iu,O=`/native-builds/devices`,k=`/_hot-updater/devices/device.mobileconfig`,A=(e,t)=>`${e}${k}?t=${encodeURIComponent(t)}`,j=`npx hot-updater native-build devices add`,M=e=>`…${e.slice(-6)}`,N=e=>`/_hot-updater/native-builds/${encodeURIComponent(e)}/manifest.plist`,P=(e,t,n)=>{let r=`${e.origin}${h(e,t)}${N(t)}?t=${encodeURIComponent(n)}`;return`itms-services://?action=download-manifest&url=${encodeURIComponent(r)}`},F=e=>t(e.channel_id.slice(8)),I=`Deploys make no patches from a sandbox build's built-in bundle.`,L=e=>{if(a(e.channel))return null;if(e.fingerprintHash!==null)return{platform:e.platform,channel:e.channel,fingerprintHash:e.fingerprintHash,appVersion:null};let t=e.targetAppVersion;return t===null||n(t)!==t?null:{platform:e.platform,channel:e.channel,fingerprintHash:null,appVersion:t}},R=e=>{let t=(e.artifact_storage_uri.split(/[?#]/,1)[0]??``).split(`/`).at(-1)??``;try{return decodeURIComponent(t)}catch{return t}},z=[`B`,`KB`,`MB`,`GB`],B=e=>{let t=e,n=0;for(;t>=1024&&n<z.length-1;)t/=1024,n+=1;return`${n===0?t:t.toFixed(1)} ${z[n]}`},V=e=>`npx hot-updater native-build install ${l(e.id)}`;export{d as C,l as D,E,r as O,m as S,L as T,p as _,b as a,P as b,g as c,B as d,T as f,F as g,u as h,D as i,h as l,M as m,O as n,y as o,A as p,x as r,I as s,j as t,_ as u,R as v,w,f as x,V as y};
|
|
@@ -1 +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-UnsNYOry.js";import{t as c}from"./link-D95E0fwF.js";import{t as l}from"./arrow-up-right-BPRe5soE.js";import{a as u,i as d,n as f,r as p,t as ee}from"./TargetDisplay-CyBWoX-f.js";import{t as m}from"./chevron-right-CuYrscDY.js";import{n as te,t as h}from"./native-builds_._buildId-D-eAGzXZ.js";import{t as ne}from"./download-ekENI2Sw.js";import{t as re}from"./git-branch-BOz43vpU.js";import{o as ie}from"./-native-builds-search-CRhUT348.js";import{t as ae}from"./history-Bz8IgNln.js";import{C as g,D as _,S as oe,_ as v,d as y,h as b,m as se,s as x,v as S,x as ce,y as C}from"./native-builds-3qvP-53q.js";import{n as w,r as T}from"./dist-Dh2hrHKj.js";import{t as le}from"./smartphone-NAD6OBaK.js";import{a as E,i as D,n as O,o as k,r as ue,t as A}from"./badge-Cf3eoJjl.js";import{a as j,n as M,o as N,t as P}from"./card-CHIqYgB7.js";import{a as de}from"./constants-zSb7FXDh.js";import{n as fe}from"./relativeTime-CdKwnwWK.js";import{a as pe,d as me,f as he,h as ge,l as _e,u as ve}from"./api-sTvbSydX.js";import{a as ye,m as be,n as xe}from"./IosInstall-CJ0427uA.js";import{a as F,i as I,n as L,o as R,r as z,t as B}from"./empty-Oq7fhUu4.js";import{t as Se}from"./PlatformIcon-DjcYGkV6.js";import{a as V,i as H,n as U,o as W,r as G,t as K}from"./table-tm9RvUbS.js";import{t as Ce}from"./BundleIdDisplay-Cz5MehaS.js";import{t as we}from"./ChannelBadge-B7DxBTj3.js";import{n as Te,r as q,t as Ee}from"./RolloutPercentageBadge-Di_Ca_ss.js";import{n as De,r as J,t as Oe}from"./SandboxBadge-B_edulK_.js";import{t as Y}from"./QrCode-DJ5leikY.js";var ke=i(`circle-slash`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]),Ae=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`}]]),X=t();function Z({value:e,length:t,shown:n=e.slice(0,t),label:r}){let i=async()=>{try{await navigator.clipboard.writeText(e),w.success(`Copied to clipboard`,{description:e})}catch{w.error(`Could not copy the ${r}`)}};return(0,X.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 je({hash:e}){let t=pe();if(e===null)return(0,X.jsx)(f,{});let n=Te(t.data?.console.gitUrl,e);return n===null?(0,X.jsx)(Z,{label:`commit`,length:7,value:e}):(0,X.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 Q({label:e,children:t}){return(0,X.jsxs)(`div`,{className:`grid gap-1 sm:grid-cols-[10rem_minmax(0,1fr)] sm:gap-4`,children:[(0,X.jsx)(`dt`,{className:`text-xs font-medium text-muted-foreground`,children:e}),(0,X.jsx)(`dd`,{className:`min-w-0 text-sm`,children:t})]})}function Me({detail:e}){let{build:t}=e,n=_e();if(t.is_sandbox)return null;let r=!t.is_store_build;return(0,X.jsx)(o,{className:`min-h-11 shrink-0 sm:min-h-8`,disabled:n.isPending,onClick:()=>n.mutate({id:t.id,storeBuild:r},{onSuccess:()=>{w.success(r?`Marked as the store build`:`Mark cleared`)},onError:e=>{w.error(`Could not change the mark`,{description:e.message})}}),size:`sm`,type:`button`,variant:`outline`,children:r?`Mark as store build`:`Clear mark`})}function Ne({detail:e}){let{build:t,newestInScope:n,storeBuildInScope:r}=e;if(t.is_sandbox)return(0,X.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border bg-muted/40 p-3 text-xs`,children:[(0,X.jsx)(ke,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`}),(0,X.jsxs)(`p`,{children:[(0,X.jsx)(`span`,{className:`font-medium`,children:`No patch base.`}),` `,x]})]});let i=r??n;if(i===null)return null;let a=i.id===t.id;return(0,X.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,X.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,X.jsx)(a?te:ae,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`}),r?.id===t.id?(0,X.jsxs)(`p`,{children:[(0,X.jsx)(`span`,{className:`font-medium`,children:`Store build.`}),` New deploys to this scope patch from this build.`]}):a?(0,X.jsxs)(`p`,{children:[(0,X.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,X.jsxs)(`p`,{children:[(0,X.jsx)(`span`,{className:`font-medium`,children:`Not the base.`}),` New deploys patch from`,` `,(0,X.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:[ce(i)??(0,X.jsxs)(X.Fragment,{children:[g(i.platform),` `,b[i.artifact_kind].label,` ·`,` `,(0,X.jsx)(q,{uuid:i.id})]}),(0,X.jsx)(l,{"aria-hidden":`true`,className:`size-3`})]}),`, so this one gets no new patches.`]})]}),(0,X.jsx)(Me,{detail:e})]})}function Pe({detail:e}){let{build:t,builtInBundle:n,channel:r}=e,i=n?.childCount??0;return(0,X.jsxs)(P,{className:`overflow-hidden shadow-sm`,children:[(0,X.jsx)(j,{className:`border-b px-4 py-3`,children:(0,X.jsx)(N,{className:`text-sm`,children:(0,X.jsx)(`h2`,{children:`Built-in bundle`})})}),(0,X.jsxs)(M,{className:`flex flex-col gap-4 p-4 sm:p-6`,children:[(0,X.jsxs)(`dl`,{className:`flex flex-col gap-3`,children:[(0,X.jsx)(Q,{label:`Bundle ID`,children:(0,X.jsx)(Ce,{bundleId:t.min_bundle_id})}),(0,X.jsx)(Q,{label:`OTAs patching from it`,children:(0,X.jsx)(`span`,{className:`tabular-nums`,children:i===1?`1 bundle`:`${i} bundles`})}),(0,X.jsx)(Q,{label:`Scope`,children:(0,X.jsxs)(`span`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,X.jsx)(c,{"aria-label":`Show the builds that embed ${r}`,className:`relative rounded-md after:absolute after:-inset-x-1 after:-inset-y-[11px] sm:after:hidden`,search:{channel:r},to:`/native-builds`,children:(0,X.jsx)(we,{channel:r})}),(0,X.jsx)(`span`,{className:`text-xs`,children:g(t.platform)})]})}),(0,X.jsx)(Q,{label:`Target`,children:(0,X.jsx)(`span`,{className:`text-xs`,children:(0,X.jsx)(p,{appVersion:t.app_version,fingerprintHash:t.fingerprint_hash,nativeAppVersion:t.native_app_version})})}),(0,X.jsx)(Q,{label:`Build key`,children:(0,X.jsx)(`span`,{className:`text-xs`,children:(0,X.jsx)(ee,{value:t.build_key})})}),t.build_number?(0,X.jsx)(Q,{label:`Build`,children:(0,X.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,translate:`no`,children:t.build_number})}):null,(0,X.jsx)(Q,{label:`Commit`,children:(0,X.jsx)(je,{hash:t.git_commit_hash})}),(0,X.jsx)(Q,{label:`Created`,children:(0,X.jsx)(q,{format:`both`,uuid:t.id})})]}),(0,X.jsx)(Ne,{detail:e}),(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t.is_sandbox?`An install of this build runs this bundle until it opens an OTA.`:`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 Fe=r(fe(),1),$=r(n(),1),Ie=`The .ipa installs only on devices its signing profile allows (development or ad hoc)`,Le=e=>{switch(e.artifact_kind){case`ipa`:return e.is_sandbox?`${Ie}.`:`${Ie}; an App Store export reaches testers through TestFlight.`;case`aab`:return`The .aab installs through Google Play or bundletool, not from the file.`;default:return}},Re=e=>{switch(e.artifact_kind){case`apk`:return`Scan with an Android phone's camera, then open the APK to install it.`;case`app`:return`Scan to download the .app.zip on a Mac.`;default:return`Scan to download. ${Le(e)}`}};function ze(){let{origin:e,pathname:t}=window.location;return(0,X.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,X.jsx)(Y,{className:`size-48`,label:`Open this page on an iPhone`,value:`${e}${t}`}),(0,X.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 Be({build:e,url:t,note:n}){return(0,X.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,X.jsx)(Y,{className:`size-48`,label:`Download ${S(e)}`,value:t}),(0,X.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:Re(e)}),n?(0,X.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:n}):null]})}function Ve({message:e}){return(0,X.jsxs)(O,{variant:`destructive`,children:[(0,X.jsx)(k,{}),(0,X.jsx)(E,{children:`The download link couldn't be created`}),(0,X.jsx)(D,{children:e})]})}function He({build:t}){let n=he(t.id),r=n.data?.url;if(r===null){let e=Le(t);return(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 text-xs text-muted-foreground`,children:[(0,X.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,X.jsx)(`p`,{children:e}):null]})}return r===void 0?n.isError?(0,X.jsx)(Ve,{message:n.error.message}):(0,X.jsx)(e,{className:`size-48`}):(0,X.jsx)(Be,{build:t,note:`This link expires. If the download fails, reload this page.`,url:r})}function Ue({build:e,href:t}){return(0,X.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:e.artifact_kind===`ipa`?`ghost`:`outline`}),download:!0,href:t,children:[(0,X.jsx)(ne,{"data-icon":`inline-start`}),(0,X.jsxs)(`span`,{className:`text-left [overflow-wrap:anywhere]`,children:[`Download `,S(e)]})]})}function We({build:e}){return(0,X.jsxs)(P,{className:`overflow-hidden shadow-sm`,children:[(0,X.jsx)(j,{className:`border-b px-4 py-3`,children:(0,X.jsx)(N,{className:`text-sm`,children:(0,X.jsx)(`h2`,{children:`Install`})})}),(0,X.jsxs)(M,{className:`flex min-w-0 flex-col gap-4 p-4 sm:p-6`,children:[(0,X.jsx)(De,{build:e,withTime:!0}),(0,X.jsx)(Ge,{build:e}),(0,X.jsx)(Ue,{build:e,href:v(e.id)})]})]})}function Ge({build:e}){switch(e.artifact_kind){case`apk`:return(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Your browser needs the "Install unknown apps" permission.`}),e.is_sandbox?(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Its .sandbox ID installs it beside a Play copy.`}):(0,X.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,X.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,X.jsx)(d,{label:`the install command`,value:C(e)})]});case`app`:return(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,X.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,X.jsx)(d,{label:`the install command`,value:C(e)})]});case`aab`:return J(e)?(0,X.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[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,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`For testers, build and release to internal testing:`}),(0,X.jsx)(d,{label:`the Google Play command`,value:`npx hot-updater google-play upload`})]});case`ipa`:return J(e)?(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Internal testers install it from the TestFlight app once App Store Connect has processed it.`}):(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Over USB, Xcode or Apple Configurator installs it.`})}}function Ke({link:e,url:t}){return e?.status===`no-secret`?(0,X.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,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,X.jsx)(d,{label:`the download link`,value:t}),(0,X.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Anyone with this link can download this build until`,` `,(0,X.jsxs)(`span`,{className:`whitespace-nowrap`,children:[(0,Fe.default)(e.expiresAt).format(`YYYY-MM-DD`),`.`]})]})]})}function qe({build:e}){return J(e)&&(e.artifact_kind===`ipa`||e.artifact_kind===`aab`)?(0,X.jsx)(We,{build:e}):(0,X.jsx)(Ye,{build:e})}function Je({children:e}){let[t,n]=(0,$.useState)(!1),r=(0,$.useId)();return(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3 border-t pt-3`,children:[(0,X.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,X.jsx)(m,{"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,X.jsx)(`div`,{hidden:!t,id:r,children:e})]})}function Ye({build:t}){let n=me(t.id),r=n.data?.status===`issued`?oe(window.location,t.id,n.data.token):null,i=ye(),a=t.artifact_kind===`ipa`,o=a&&i?.ios===!0,s=(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,X.jsx)(Ge,{build:t}),(0,X.jsx)(Ue,{build:t,href:r??v(t.id)}),(0,X.jsx)(Ke,{link:n.data,url:r})]});return(0,X.jsxs)(P,{className:`overflow-hidden shadow-sm`,children:[(0,X.jsx)(j,{className:`border-b px-4 py-3`,children:(0,X.jsx)(N,{className:`text-sm`,children:(0,X.jsx)(`h2`,{children:`Install`})})}),o?(0,X.jsxs)(M,{className:`flex min-w-0 flex-col gap-4 p-4 sm:p-6`,children:[(0,X.jsx)(xe,{build:t,device:i}),(0,X.jsx)(Je,{children:s})]}):(0,X.jsxs)(M,{className:`grid gap-6 p-4 sm:grid-cols-[12rem_minmax(0,1fr)] sm:p-6`,children:[a&&r!==null?(0,X.jsx)(ze,{}):r===null?n.data===void 0?n.isError?(0,X.jsx)(Ve,{message:n.error.message}):(0,X.jsx)(e,{className:`size-48`}):(0,X.jsx)(He,{build:t}):(0,X.jsx)(Be,{build:t,url:r}),s]})]})}function Xe({build:t}){let n=be(t.id),r=n.data;if(r?.status===`store`||r?.status===`enterprise`)return null;let i=r?.status===`listed`?r.devices:null;return(0,X.jsxs)(P,{className:`overflow-hidden shadow-sm`,children:[(0,X.jsxs)(j,{className:`flex flex-row items-center gap-2 border-b px-4 py-3`,children:[(0,X.jsx)(N,{className:`text-sm`,children:(0,X.jsx)(`h2`,{children:`Devices in this build`})}),i===null?null:(0,X.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:i.length}),(0,X.jsx)(c,{className:a({className:`ml-auto h-11 sm:h-7`,size:`sm`,variant:`ghost`}),to:`/native-builds/devices`,children:`iOS devices`})]}),(0,X.jsx)(M,{className:`p-0`,children:n.isPending?(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,X.jsx)(`span`,{className:`sr-only`,children:`Reading this IPA's devices`}),(0,X.jsx)(e,{className:`h-8 w-full`}),(0,X.jsx)(e,{className:`h-8 w-full`})]}):n.isError||r?.status===`unavailable`?(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 p-4 text-xs text-muted-foreground`,children:[(0,X.jsx)(`p`,{className:`min-w-0 flex-1`,children:`The Console couldn't read this IPA's devices from storage.`}),(0,X.jsxs)(o,{className:`h-11 sm:h-7`,onClick:()=>void n.refetch(),size:`sm`,variant:`outline`,children:[(0,X.jsx)(T,{"data-icon":`inline-start`}),`Retry`]})]}):i?.length===0?(0,X.jsx)(`p`,{className:`p-4 text-xs text-muted-foreground`,children:`This IPA lists no devices.`}):(0,X.jsx)(`ul`,{"aria-label":`Devices in this build`,className:`divide-y`,children:i?.map(e=>(0,X.jsxs)(`li`,{className:`flex min-h-11 min-w-0 items-center gap-3 px-4 py-2 text-sm`,children:[(0,X.jsx)(le,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`}),(0,X.jsxs)(`span`,{className:`flex min-w-0 flex-col items-start`,children:[(0,X.jsx)(`span`,{className:e.name===null?`truncate text-muted-foreground`:`truncate`,children:e.name??`Unknown device`}),(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:(0,X.jsx)(Z,{label:`UDID`,shown:se(e.udid),value:e.udid})})]})]},e.udid))})})]})}var Ze=`https://hot-updater.dev/docs/guides/bundle-diffing#first-ota-update`;function Qe({detail:t,page:n,onPage:r}){let i=n.before!==void 0||n.after!==void 0,s=ge(t.build.min_bundle_id,n,i),d=i?s.data:t.patches,{next:f,previous:p}=d??{};return(0,X.jsxs)(P,{className:`overflow-hidden shadow-sm`,id:`patches`,children:[(0,X.jsx)(j,{className:`border-b px-4 py-3`,children:(0,X.jsx)(N,{className:`text-sm`,children:(0,X.jsx)(`h2`,{children:`Patches from this build`})})}),(0,X.jsxs)(M,{className:`p-0`,children:[i&&s.isError?(0,X.jsx)(`div`,{className:`p-4`,children:(0,X.jsxs)(O,{variant:`destructive`,children:[(0,X.jsx)(k,{}),(0,X.jsx)(E,{children:`Patches couldn't be loaded`}),(0,X.jsx)(D,{children:s.error.message}),(0,X.jsx)(ue,{children:(0,X.jsxs)(o,{onClick:()=>void s.refetch(),size:`xs`,variant:`outline`,children:[(0,X.jsx)(T,{"data-icon":`inline-start`}),`Retry`]})})]})}):d===void 0?(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,X.jsx)(`span`,{className:`sr-only`,children:`Loading patches`}),(0,X.jsx)(e,{className:`h-4 w-full`}),(0,X.jsx)(e,{className:`h-4 w-2/3`})]}):d.data.length===0?i?(0,X.jsxs)(B,{className:`py-10`,children:[(0,X.jsx)(I,{children:(0,X.jsx)(R,{children:`No more patches`})}),(0,X.jsx)(o,{className:`min-h-11 sm:min-h-8`,onClick:()=>r({}),variant:`outline`,children:`Show the newest patches`})]}):(0,X.jsxs)(B,{className:`py-10`,children:[(0,X.jsxs)(I,{children:[(0,X.jsx)(F,{variant:`icon`,children:(0,X.jsx)(re,{})}),(0,X.jsx)(R,{children:`No patches from this build`}),(0,X.jsx)(z,{children:t.build.is_sandbox?x:(0,X.jsxs)(X.Fragment,{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,X.jsx)(`code`,{className:`font-mono`,children:`patch`}),` in`,` `,(0,X.jsx)(`code`,{className:`font-mono`,children:`hot-updater.config.ts`}),`.`]})})]}),t.build.is_sandbox?null:(0,X.jsx)(L,{children:(0,X.jsxs)(`a`,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),href:Ze,rel:`noreferrer`,target:`_blank`,children:[`Bundle diffing guide`,(0,X.jsx)(l,{"data-icon":`inline-end`})]})})]}):(0,X.jsxs)(K,{"aria-busy":i&&s.isPlaceholderData,"aria-label":`Patches from this build`,className:`table-fixed`,children:[(0,X.jsx)(V,{children:(0,X.jsxs)(W,{children:[(0,X.jsx)(H,{children:`Target bundle`}),(0,X.jsx)(H,{className:`w-28`,children:`Patch size`}),(0,X.jsx)(H,{className:`hidden w-32 sm:table-cell`,children:`Created`})]})}),(0,X.jsx)(U,{children:d.data.map(e=>(0,X.jsxs)(W,{children:[(0,X.jsx)(G,{className:`py-3 whitespace-normal`,children:(0,X.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,X.jsx)(G,{className:`text-xs tabular-nums`,children:y(e.byteSize)}),(0,X.jsx)(G,{className:`hidden sm:table-cell`,children:(0,X.jsx)(q,{uuid:e.bundleId})})]},e.bundleId))})]}),f!==void 0||p!==void 0?(0,X.jsxs)(`nav`,{"aria-label":`Patch pages`,className:`flex items-center justify-end gap-2 border-t px-4 py-2`,children:[(0,X.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,X.jsx)(u,{"data-icon":`inline-start`}),`Newer`]}),(0,X.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,X.jsx)(m,{"data-icon":`inline-end`})]})]}):null]})]})}var $e=(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 et({download:e}){switch(e.kind){case`patch`:return(0,X.jsxs)(`span`,{className:`text-xs`,children:[`Patch`,` `,(0,X.jsxs)(`span`,{className:`text-muted-foreground tabular-nums`,children:[`(`,y(e.byteSize),`)`]})]});case`full`:return(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Full bundle`});case`unknown`:return(0,X.jsx)(`a`,{className:`text-xs underline-offset-4 hover:underline`,href:`#patches`,children:`See patches`})}}function tt({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&&$e(i,s).kind===`full`?[`npx hot-updater patch`,`-p ${t.platform}`,`-c ${_(n)}`,`-b ${_(s)}`,`--base-artifact-id ${_(t.min_bundle_id)}`].join(` `):null,f=(0,X.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,X.jsx)(l,{"aria-hidden":`true`,className:`size-3`})]});return(0,X.jsxs)(P,{className:`overflow-hidden shadow-sm`,children:[(0,X.jsx)(j,{className:`border-b px-4 py-3`,children:(0,X.jsx)(N,{className:`text-sm`,children:(0,X.jsx)(`h2`,{children:`Served now`})})}),(0,X.jsx)(M,{className:`p-0`,children:r.length===0?(0,X.jsxs)(B,{className:`py-10`,children:[(0,X.jsxs)(I,{children:[(0,X.jsx)(F,{variant:`icon`,children:(0,X.jsx)(Ae,{})}),(0,X.jsx)(R,{children:`No OTA for this build yet`}),(0,X.jsxs)(z,{children:[`No release in this build's scope is newer than its built-in bundle. Deploy one with`,` `,(0,X.jsx)(`code`,{className:`font-mono`,children:`hot-updater deploy`}),`, and it shows here.`]})]}),(0,X.jsx)(L,{children:(0,X.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,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(K,{"aria-label":`Served now`,className:`table-fixed`,children:[(0,X.jsx)(V,{children:(0,X.jsxs)(W,{children:[(0,X.jsx)(H,{children:`Bundle`}),(0,X.jsx)(H,{className:`hidden w-40 md:table-cell`,children:`Rollout`}),(0,X.jsx)(H,{className:`hidden w-32 sm:table-cell`,children:`Created`}),(0,X.jsx)(H,{className:`w-32`,children:`First OTA download`})]})}),(0,X.jsx)(U,{children:r.map(e=>{let t=e.bundleId,n=e.rolloutCohortCount/de*100;return(0,X.jsxs)(W,{children:[(0,X.jsx)(G,{className:`py-3 whitespace-normal`,children:(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,X.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,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.message}):null]})}),(0,X.jsx)(G,{className:`hidden md:table-cell`,children:(0,X.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[e.targetCohorts.length>0?(0,X.jsx)(A,{variant:`secondary`,children:e.targetCohorts.length===1?`1 cohort`:`${e.targetCohorts.length} cohorts`}):(0,X.jsx)(Ee,{percentage:n}),e.shouldForceUpdate?(0,X.jsx)(A,{variant:`outline`,children:`Forced`}):null]})}),(0,X.jsx)(G,{className:`hidden sm:table-cell`,children:(0,X.jsx)(q,{uuid:t})}),(0,X.jsx)(G,{children:(0,X.jsx)(et,{download:$e(i,t)})})]},e.releaseId)})})]}),u===null?null:(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 border-t px-4 py-3 text-xs`,children:[(0,X.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,X.jsx)(d,{label:`the patch command`,value:u})]}),(0,X.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. `,f]})]})})]})}function nt({buildId:t,search:n,onSearchChange:r}){let i=ve(t),l=i.data,d={...n.patchesBefore===void 0?{}:{before:n.patchesBefore},...n.patchesAfter===void 0?{}:{after:n.patchesAfter}};return(0,X.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,X.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,X.jsx)(s,{className:`-ml-1 size-11 lg:size-7`}),(0,X.jsxs)(c,{className:a({className:`min-h-11 sm:min-h-7`,size:`sm`,variant:`ghost`}),search:l?{channel:l.channel}:{channels:`all`},to:`/native-builds`,children:[(0,X.jsx)(u,{"data-icon":`inline-start`}),`Native builds`]}),l?(0,X.jsxs)(`h1`,{className:`flex min-w-0 items-center gap-1.5 text-sm font-medium`,children:[(0,X.jsx)(Se,{className:`size-3.5 shrink-0 text-muted-foreground`,platform:l.build.platform}),(0,X.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5`,children:[(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 whitespace-nowrap`,children:[(0,X.jsxs)(`span`,{className:`sr-only`,children:[g(l.build.platform),` `]}),b[l.build.artifact_kind].label,(0,X.jsx)(Oe,{build:l.build})]}),(0,X.jsxs)(`span`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:[`· `,(0,X.jsx)(`span`,{translate:`no`,children:l.channel})]})]}),(0,X.jsx)(`span`,{className:`hidden text-xs font-normal text-muted-foreground tabular-nums sm:inline`,children:y(l.build.byte_size)})]}):(0,X.jsx)(`h1`,{className:`sr-only`,children:`Native build`})]}),(0,X.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,X.jsx)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-4 sm:gap-6`,children:i.isError?(0,X.jsxs)(O,{variant:`destructive`,children:[(0,X.jsx)(k,{}),(0,X.jsx)(E,{children:`The native build couldn't be loaded`}),(0,X.jsx)(D,{children:i.error.message}),(0,X.jsx)(ue,{children:(0,X.jsxs)(o,{onClick:()=>void i.refetch(),size:`xs`,variant:`outline`,children:[(0,X.jsx)(T,{"data-icon":`inline-start`}),`Retry`]})})]}):l===void 0?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{className:`sr-only`,children:`Loading the native build`}),(0,X.jsx)(e,{className:`h-56 w-full rounded-xl`}),(0,X.jsx)(e,{className:`h-64 w-full rounded-xl`})]}):l===null?(0,X.jsxs)(B,{className:`border py-16`,children:[(0,X.jsxs)(I,{children:[(0,X.jsx)(F,{variant:`icon`,children:(0,X.jsx)(ie,{})}),(0,X.jsx)(R,{children:`Native build not found`}),(0,X.jsx)(z,{children:`No native build has this ID. It may have been deleted, or be from another console.`})]}),(0,X.jsx)(L,{children:(0,X.jsx)(c,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),search:{channels:`all`},to:`/native-builds`,children:`Show all native builds`})})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(qe,{build:l.build}),l.build.artifact_kind===`ipa`&&!J(l.build)?(0,X.jsx)(Xe,{build:l.build}):null,(0,X.jsx)(Pe,{detail:l}),(0,X.jsx)(tt,{detail:l}),(0,X.jsx)(Qe,{detail:l,onPage:e=>r({...e.before===void 0?{}:{patchesBefore:e.before},...e.after===void 0?{}:{patchesAfter:e.after}}),page:d})]})})})]})}function rt(){let{buildId:e}=h.useParams(),t=h.useSearch(),n=h.useNavigate();return(0,X.jsx)(nt,{buildId:e,onSearchChange:e=>void n({search:e,replace:!0}),search:t})}export{rt as component};
|
|
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-BmzmPGuv.js";import{t as c}from"./link-CRMwpc7-.js";import{t as l}from"./arrow-up-right-C_1ALUCD.js";import{a as u,i as d,n as f,r as p,t as ee}from"./TargetDisplay-DMZHMgWk.js";import{t as m}from"./chevron-right-RAuPv9r1.js";import{n as te,t as h}from"./native-builds_._buildId-Dza7vEcy.js";import{t as ne}from"./download-CgpaZb23.js";import{t as re}from"./git-branch-BGatQV8Q.js";import{o as ie}from"./-native-builds-search-qeto9-fq.js";import{t as ae}from"./history-Ci4dhphE.js";import{C as g,D as _,S as oe,_ as v,d as y,h as b,m as se,s as x,v as S,x as ce,y as C}from"./native-builds-uKuvmyXZ.js";import{n as w,r as T}from"./dist-BEmib-ZM.js";import{t as le}from"./smartphone-Dy13ukaU.js";import{a as E,i as D,n as O,o as k,r as ue,t as A}from"./badge-zMibJGR5.js";import{a as j,n as M,o as N,t as P}from"./card-pYZSDIxg.js";import{a as de}from"./constants-zSb7FXDh.js";import{n as fe}from"./relativeTime-Dbefsycs.js";import{a as pe,d as me,f as he,h as ge,l as _e,u as ve}from"./api-tJRzijjy.js";import{a as ye,m as be,n as xe}from"./IosInstall-CgNa8B4v.js";import{a as F,i as I,n as L,o as R,r as z,t as B}from"./empty-Bwao2ztZ.js";import{t as Se}from"./PlatformIcon-DYsYaYt6.js";import{a as V,i as H,n as U,o as W,r as G,t as K}from"./table-Bo1jU9-v.js";import{t as Ce}from"./BundleIdDisplay-BKaGARD1.js";import{t as we}from"./ChannelBadge-CPc1M44L.js";import{n as Te,r as q,t as Ee}from"./RolloutPercentageBadge-Cd1UNLL0.js";import{n as De,r as J,t as Oe}from"./SandboxBadge-CqGX5DiH.js";import{t as Y}from"./QrCode-BSNEn_M-.js";var ke=i(`circle-slash`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]),Ae=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`}]]),X=t();function Z({value:e,length:t,shown:n=e.slice(0,t),label:r}){let i=async()=>{try{await navigator.clipboard.writeText(e),w.success(`Copied to clipboard`,{description:e})}catch{w.error(`Could not copy the ${r}`)}};return(0,X.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 je({hash:e}){let t=pe();if(e===null)return(0,X.jsx)(f,{});let n=Te(t.data?.console.gitUrl,e);return n===null?(0,X.jsx)(Z,{label:`commit`,length:7,value:e}):(0,X.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 Q({label:e,children:t}){return(0,X.jsxs)(`div`,{className:`grid gap-1 sm:grid-cols-[10rem_minmax(0,1fr)] sm:gap-4`,children:[(0,X.jsx)(`dt`,{className:`text-xs font-medium text-muted-foreground`,children:e}),(0,X.jsx)(`dd`,{className:`min-w-0 text-sm`,children:t})]})}function Me({detail:e}){let{build:t}=e,n=_e();if(t.is_sandbox)return null;let r=!t.is_store_build;return(0,X.jsx)(o,{className:`min-h-11 shrink-0 sm:min-h-8`,disabled:n.isPending,onClick:()=>n.mutate({id:t.id,storeBuild:r},{onSuccess:()=>{w.success(r?`Marked as the store build`:`Mark cleared`)},onError:e=>{w.error(`Could not change the mark`,{description:e.message})}}),size:`sm`,type:`button`,variant:`outline`,children:r?`Mark as store build`:`Clear mark`})}function Ne({detail:e}){let{build:t,newestInScope:n,storeBuildInScope:r}=e;if(t.is_sandbox)return(0,X.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border bg-muted/40 p-3 text-xs`,children:[(0,X.jsx)(ke,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`}),(0,X.jsxs)(`p`,{children:[(0,X.jsx)(`span`,{className:`font-medium`,children:`No patch base.`}),` `,x]})]});let i=r??n;if(i===null)return null;let a=i.id===t.id;return(0,X.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,X.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,X.jsx)(a?te:ae,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`}),r?.id===t.id?(0,X.jsxs)(`p`,{children:[(0,X.jsx)(`span`,{className:`font-medium`,children:`Store build.`}),` New deploys to this scope patch from this build.`]}):a?(0,X.jsxs)(`p`,{children:[(0,X.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,X.jsxs)(`p`,{children:[(0,X.jsx)(`span`,{className:`font-medium`,children:`Not the base.`}),` New deploys patch from`,` `,(0,X.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:[ce(i)??(0,X.jsxs)(X.Fragment,{children:[g(i.platform),` `,b[i.artifact_kind].label,` ·`,` `,(0,X.jsx)(q,{uuid:i.id})]}),(0,X.jsx)(l,{"aria-hidden":`true`,className:`size-3`})]}),`, so this one gets no new patches.`]})]}),(0,X.jsx)(Me,{detail:e})]})}function Pe({detail:e}){let{build:t,builtInBundle:n,channel:r}=e,i=n?.childCount??0;return(0,X.jsxs)(P,{className:`overflow-hidden shadow-sm`,children:[(0,X.jsx)(j,{className:`border-b px-4 py-3`,children:(0,X.jsx)(N,{className:`text-sm`,children:(0,X.jsx)(`h2`,{children:`Built-in bundle`})})}),(0,X.jsxs)(M,{className:`flex flex-col gap-4 p-4 sm:p-6`,children:[(0,X.jsxs)(`dl`,{className:`flex flex-col gap-3`,children:[(0,X.jsx)(Q,{label:`Bundle ID`,children:(0,X.jsx)(Ce,{bundleId:t.min_bundle_id})}),(0,X.jsx)(Q,{label:`OTAs patching from it`,children:(0,X.jsx)(`span`,{className:`tabular-nums`,children:i===1?`1 bundle`:`${i} bundles`})}),(0,X.jsx)(Q,{label:`Scope`,children:(0,X.jsxs)(`span`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,X.jsx)(c,{"aria-label":`Show the builds that embed ${r}`,className:`relative rounded-md after:absolute after:-inset-x-1 after:-inset-y-[11px] sm:after:hidden`,search:{channel:r},to:`/native-builds`,children:(0,X.jsx)(we,{channel:r})}),(0,X.jsx)(`span`,{className:`text-xs`,children:g(t.platform)})]})}),(0,X.jsx)(Q,{label:`Target`,children:(0,X.jsx)(`span`,{className:`text-xs`,children:(0,X.jsx)(p,{appVersion:t.app_version,fingerprintHash:t.fingerprint_hash,nativeAppVersion:t.native_app_version})})}),(0,X.jsx)(Q,{label:`Build key`,children:(0,X.jsx)(`span`,{className:`text-xs`,children:(0,X.jsx)(ee,{value:t.build_key})})}),t.build_number?(0,X.jsx)(Q,{label:`Build`,children:(0,X.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,translate:`no`,children:t.build_number})}):null,(0,X.jsx)(Q,{label:`Commit`,children:(0,X.jsx)(je,{hash:t.git_commit_hash})}),(0,X.jsx)(Q,{label:`Created`,children:(0,X.jsx)(q,{format:`both`,uuid:t.id})})]}),(0,X.jsx)(Ne,{detail:e}),(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t.is_sandbox?`An install of this build runs this bundle until it opens an OTA.`:`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 Fe=r(fe(),1),$=r(n(),1),Ie=`The .ipa installs only on devices its signing profile allows (development or ad hoc)`,Le=e=>{switch(e.artifact_kind){case`ipa`:return e.is_sandbox?`${Ie}.`:`${Ie}; an App Store export reaches testers through TestFlight.`;case`aab`:return`The .aab installs through Google Play or bundletool, not from the file.`;default:return}},Re=e=>{switch(e.artifact_kind){case`apk`:return`Scan with an Android phone's camera, then open the APK to install it.`;case`app`:return`Scan to download the .app.zip on a Mac.`;default:return`Scan to download. ${Le(e)}`}};function ze(){let{origin:e,pathname:t}=window.location;return(0,X.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,X.jsx)(Y,{className:`size-48`,label:`Open this page on an iPhone`,value:`${e}${t}`}),(0,X.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 Be({build:e,url:t,note:n}){return(0,X.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,X.jsx)(Y,{className:`size-48`,label:`Download ${S(e)}`,value:t}),(0,X.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:Re(e)}),n?(0,X.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:n}):null]})}function Ve({message:e}){return(0,X.jsxs)(O,{variant:`destructive`,children:[(0,X.jsx)(k,{}),(0,X.jsx)(E,{children:`The download link couldn't be created`}),(0,X.jsx)(D,{children:e})]})}function He({build:t}){let n=he(t.id),r=n.data?.url;if(r===null){let e=Le(t);return(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 text-xs text-muted-foreground`,children:[(0,X.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,X.jsx)(`p`,{children:e}):null]})}return r===void 0?n.isError?(0,X.jsx)(Ve,{message:n.error.message}):(0,X.jsx)(e,{className:`size-48`}):(0,X.jsx)(Be,{build:t,note:`This link expires. If the download fails, reload this page.`,url:r})}function Ue({build:e,href:t}){return(0,X.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:e.artifact_kind===`ipa`?`ghost`:`outline`}),download:!0,href:t,children:[(0,X.jsx)(ne,{"data-icon":`inline-start`}),(0,X.jsxs)(`span`,{className:`text-left [overflow-wrap:anywhere]`,children:[`Download `,S(e)]})]})}function We({build:e}){return(0,X.jsxs)(P,{className:`overflow-hidden shadow-sm`,children:[(0,X.jsx)(j,{className:`border-b px-4 py-3`,children:(0,X.jsx)(N,{className:`text-sm`,children:(0,X.jsx)(`h2`,{children:`Install`})})}),(0,X.jsxs)(M,{className:`flex min-w-0 flex-col gap-4 p-4 sm:p-6`,children:[(0,X.jsx)(De,{build:e,withTime:!0}),(0,X.jsx)(Ge,{build:e}),(0,X.jsx)(Ue,{build:e,href:v(e.id)})]})]})}function Ge({build:e}){switch(e.artifact_kind){case`apk`:return(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Your browser needs the "Install unknown apps" permission.`}),e.is_sandbox?(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Its .sandbox ID installs it beside a Play copy.`}):(0,X.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,X.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,X.jsx)(d,{label:`the install command`,value:C(e)})]});case`app`:return(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,X.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,X.jsx)(d,{label:`the install command`,value:C(e)})]});case`aab`:return J(e)?(0,X.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[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,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`For testers, build and release to internal testing:`}),(0,X.jsx)(d,{label:`the Google Play command`,value:`npx hot-updater google-play upload`})]});case`ipa`:return J(e)?(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Internal testers install it from the TestFlight app once App Store Connect has processed it.`}):(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Over USB, Xcode or Apple Configurator installs it.`})}}function Ke({link:e,url:t}){return e?.status===`no-secret`?(0,X.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,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,X.jsx)(d,{label:`the download link`,value:t}),(0,X.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Anyone with this link can download this build until`,` `,(0,X.jsxs)(`span`,{className:`whitespace-nowrap`,children:[(0,Fe.default)(e.expiresAt).format(`YYYY-MM-DD`),`.`]})]})]})}function qe({build:e}){return J(e)&&(e.artifact_kind===`ipa`||e.artifact_kind===`aab`)?(0,X.jsx)(We,{build:e}):(0,X.jsx)(Ye,{build:e})}function Je({children:e}){let[t,n]=(0,$.useState)(!1),r=(0,$.useId)();return(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3 border-t pt-3`,children:[(0,X.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,X.jsx)(m,{"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,X.jsx)(`div`,{hidden:!t,id:r,children:e})]})}function Ye({build:t}){let n=me(t.id),r=n.data?.status===`issued`?oe(window.location,t.id,n.data.token):null,i=ye(),a=t.artifact_kind===`ipa`,o=a&&i?.ios===!0,s=(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,X.jsx)(Ge,{build:t}),(0,X.jsx)(Ue,{build:t,href:r??v(t.id)}),(0,X.jsx)(Ke,{link:n.data,url:r})]});return(0,X.jsxs)(P,{className:`overflow-hidden shadow-sm`,children:[(0,X.jsx)(j,{className:`border-b px-4 py-3`,children:(0,X.jsx)(N,{className:`text-sm`,children:(0,X.jsx)(`h2`,{children:`Install`})})}),o?(0,X.jsxs)(M,{className:`flex min-w-0 flex-col gap-4 p-4 sm:p-6`,children:[(0,X.jsx)(xe,{build:t,device:i}),(0,X.jsx)(Je,{children:s})]}):(0,X.jsxs)(M,{className:`grid gap-6 p-4 sm:grid-cols-[12rem_minmax(0,1fr)] sm:p-6`,children:[a&&r!==null?(0,X.jsx)(ze,{}):r===null?n.data===void 0?n.isError?(0,X.jsx)(Ve,{message:n.error.message}):(0,X.jsx)(e,{className:`size-48`}):(0,X.jsx)(He,{build:t}):(0,X.jsx)(Be,{build:t,url:r}),s]})]})}function Xe({build:t}){let n=be(t.id),r=n.data;if(r?.status===`store`||r?.status===`enterprise`)return null;let i=r?.status===`listed`?r.devices:null;return(0,X.jsxs)(P,{className:`overflow-hidden shadow-sm`,children:[(0,X.jsxs)(j,{className:`flex flex-row items-center gap-2 border-b px-4 py-3`,children:[(0,X.jsx)(N,{className:`text-sm`,children:(0,X.jsx)(`h2`,{children:`Devices in this build`})}),i===null?null:(0,X.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:i.length}),(0,X.jsx)(c,{className:a({className:`ml-auto h-11 sm:h-7`,size:`sm`,variant:`ghost`}),to:`/native-builds/devices`,children:`iOS devices`})]}),(0,X.jsx)(M,{className:`p-0`,children:n.isPending?(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,X.jsx)(`span`,{className:`sr-only`,children:`Reading this IPA's devices`}),(0,X.jsx)(e,{className:`h-8 w-full`}),(0,X.jsx)(e,{className:`h-8 w-full`})]}):n.isError||r?.status===`unavailable`?(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 p-4 text-xs text-muted-foreground`,children:[(0,X.jsx)(`p`,{className:`min-w-0 flex-1`,children:`The Console couldn't read this IPA's devices from storage.`}),(0,X.jsxs)(o,{className:`h-11 sm:h-7`,onClick:()=>void n.refetch(),size:`sm`,variant:`outline`,children:[(0,X.jsx)(T,{"data-icon":`inline-start`}),`Retry`]})]}):i?.length===0?(0,X.jsx)(`p`,{className:`p-4 text-xs text-muted-foreground`,children:`This IPA lists no devices.`}):(0,X.jsx)(`ul`,{"aria-label":`Devices in this build`,className:`divide-y`,children:i?.map(e=>(0,X.jsxs)(`li`,{className:`flex min-h-11 min-w-0 items-center gap-3 px-4 py-2 text-sm`,children:[(0,X.jsx)(le,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`}),(0,X.jsxs)(`span`,{className:`flex min-w-0 flex-col items-start`,children:[(0,X.jsx)(`span`,{className:e.name===null?`truncate text-muted-foreground`:`truncate`,children:e.name??`Unknown device`}),(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:(0,X.jsx)(Z,{label:`UDID`,shown:se(e.udid),value:e.udid})})]})]},e.udid))})})]})}var Ze=`https://hot-updater.dev/docs/guides/bundle-diffing#first-ota-update`;function Qe({detail:t,page:n,onPage:r}){let i=n.before!==void 0||n.after!==void 0,s=ge(t.build.min_bundle_id,n,i),d=i?s.data:t.patches,{next:f,previous:p}=d??{};return(0,X.jsxs)(P,{className:`overflow-hidden shadow-sm`,id:`patches`,children:[(0,X.jsx)(j,{className:`border-b px-4 py-3`,children:(0,X.jsx)(N,{className:`text-sm`,children:(0,X.jsx)(`h2`,{children:`Patches from this build`})})}),(0,X.jsxs)(M,{className:`p-0`,children:[i&&s.isError?(0,X.jsx)(`div`,{className:`p-4`,children:(0,X.jsxs)(O,{variant:`destructive`,children:[(0,X.jsx)(k,{}),(0,X.jsx)(E,{children:`Patches couldn't be loaded`}),(0,X.jsx)(D,{children:s.error.message}),(0,X.jsx)(ue,{children:(0,X.jsxs)(o,{onClick:()=>void s.refetch(),size:`xs`,variant:`outline`,children:[(0,X.jsx)(T,{"data-icon":`inline-start`}),`Retry`]})})]})}):d===void 0?(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,X.jsx)(`span`,{className:`sr-only`,children:`Loading patches`}),(0,X.jsx)(e,{className:`h-4 w-full`}),(0,X.jsx)(e,{className:`h-4 w-2/3`})]}):d.data.length===0?i?(0,X.jsxs)(B,{className:`py-10`,children:[(0,X.jsx)(I,{children:(0,X.jsx)(R,{children:`No more patches`})}),(0,X.jsx)(o,{className:`min-h-11 sm:min-h-8`,onClick:()=>r({}),variant:`outline`,children:`Show the newest patches`})]}):(0,X.jsxs)(B,{className:`py-10`,children:[(0,X.jsxs)(I,{children:[(0,X.jsx)(F,{variant:`icon`,children:(0,X.jsx)(re,{})}),(0,X.jsx)(R,{children:`No patches from this build`}),(0,X.jsx)(z,{children:t.build.is_sandbox?x:(0,X.jsxs)(X.Fragment,{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,X.jsx)(`code`,{className:`font-mono`,children:`patch`}),` in`,` `,(0,X.jsx)(`code`,{className:`font-mono`,children:`hot-updater.config.ts`}),`.`]})})]}),t.build.is_sandbox?null:(0,X.jsx)(L,{children:(0,X.jsxs)(`a`,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),href:Ze,rel:`noreferrer`,target:`_blank`,children:[`Bundle diffing guide`,(0,X.jsx)(l,{"data-icon":`inline-end`})]})})]}):(0,X.jsxs)(K,{"aria-busy":i&&s.isPlaceholderData,"aria-label":`Patches from this build`,className:`table-fixed`,children:[(0,X.jsx)(V,{children:(0,X.jsxs)(W,{children:[(0,X.jsx)(H,{children:`Target bundle`}),(0,X.jsx)(H,{className:`w-28`,children:`Patch size`}),(0,X.jsx)(H,{className:`hidden w-32 sm:table-cell`,children:`Created`})]})}),(0,X.jsx)(U,{children:d.data.map(e=>(0,X.jsxs)(W,{children:[(0,X.jsx)(G,{className:`py-3 whitespace-normal`,children:(0,X.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,X.jsx)(G,{className:`text-xs tabular-nums`,children:y(e.byteSize)}),(0,X.jsx)(G,{className:`hidden sm:table-cell`,children:(0,X.jsx)(q,{uuid:e.bundleId})})]},e.bundleId))})]}),f!==void 0||p!==void 0?(0,X.jsxs)(`nav`,{"aria-label":`Patch pages`,className:`flex items-center justify-end gap-2 border-t px-4 py-2`,children:[(0,X.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,X.jsx)(u,{"data-icon":`inline-start`}),`Newer`]}),(0,X.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,X.jsx)(m,{"data-icon":`inline-end`})]})]}):null]})]})}var $e=(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 et({download:e}){switch(e.kind){case`patch`:return(0,X.jsxs)(`span`,{className:`text-xs`,children:[`Patch`,` `,(0,X.jsxs)(`span`,{className:`text-muted-foreground tabular-nums`,children:[`(`,y(e.byteSize),`)`]})]});case`full`:return(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Full bundle`});case`unknown`:return(0,X.jsx)(`a`,{className:`text-xs underline-offset-4 hover:underline`,href:`#patches`,children:`See patches`})}}function tt({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&&$e(i,s).kind===`full`?[`npx hot-updater patch`,`-p ${t.platform}`,`-c ${_(n)}`,`-b ${_(s)}`,`--base-artifact-id ${_(t.min_bundle_id)}`].join(` `):null,f=(0,X.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,X.jsx)(l,{"aria-hidden":`true`,className:`size-3`})]});return(0,X.jsxs)(P,{className:`overflow-hidden shadow-sm`,children:[(0,X.jsx)(j,{className:`border-b px-4 py-3`,children:(0,X.jsx)(N,{className:`text-sm`,children:(0,X.jsx)(`h2`,{children:`Served now`})})}),(0,X.jsx)(M,{className:`p-0`,children:r.length===0?(0,X.jsxs)(B,{className:`py-10`,children:[(0,X.jsxs)(I,{children:[(0,X.jsx)(F,{variant:`icon`,children:(0,X.jsx)(Ae,{})}),(0,X.jsx)(R,{children:`No OTA for this build yet`}),(0,X.jsxs)(z,{children:[`No release in this build's scope is newer than its built-in bundle. Deploy one with`,` `,(0,X.jsx)(`code`,{className:`font-mono`,children:`hot-updater deploy`}),`, and it shows here.`]})]}),(0,X.jsx)(L,{children:(0,X.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,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(K,{"aria-label":`Served now`,className:`table-fixed`,children:[(0,X.jsx)(V,{children:(0,X.jsxs)(W,{children:[(0,X.jsx)(H,{children:`Bundle`}),(0,X.jsx)(H,{className:`hidden w-40 md:table-cell`,children:`Rollout`}),(0,X.jsx)(H,{className:`hidden w-32 sm:table-cell`,children:`Created`}),(0,X.jsx)(H,{className:`w-32`,children:`First OTA download`})]})}),(0,X.jsx)(U,{children:r.map(e=>{let t=e.bundleId,n=e.rolloutCohortCount/de*100;return(0,X.jsxs)(W,{children:[(0,X.jsx)(G,{className:`py-3 whitespace-normal`,children:(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,X.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,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.message}):null]})}),(0,X.jsx)(G,{className:`hidden md:table-cell`,children:(0,X.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[e.targetCohorts.length>0?(0,X.jsx)(A,{variant:`secondary`,children:e.targetCohorts.length===1?`1 cohort`:`${e.targetCohorts.length} cohorts`}):(0,X.jsx)(Ee,{percentage:n}),e.shouldForceUpdate?(0,X.jsx)(A,{variant:`outline`,children:`Forced`}):null]})}),(0,X.jsx)(G,{className:`hidden sm:table-cell`,children:(0,X.jsx)(q,{uuid:t})}),(0,X.jsx)(G,{children:(0,X.jsx)(et,{download:$e(i,t)})})]},e.releaseId)})})]}),u===null?null:(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 border-t px-4 py-3 text-xs`,children:[(0,X.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,X.jsx)(d,{label:`the patch command`,value:u})]}),(0,X.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. `,f]})]})})]})}function nt({buildId:t,search:n,onSearchChange:r}){let i=ve(t),l=i.data,d={...n.patchesBefore===void 0?{}:{before:n.patchesBefore},...n.patchesAfter===void 0?{}:{after:n.patchesAfter}};return(0,X.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,X.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,X.jsx)(s,{className:`-ml-1 size-11 lg:size-7`}),(0,X.jsxs)(c,{className:a({className:`min-h-11 sm:min-h-7`,size:`sm`,variant:`ghost`}),search:l?{channel:l.channel}:{channels:`all`},to:`/native-builds`,children:[(0,X.jsx)(u,{"data-icon":`inline-start`}),`Native builds`]}),l?(0,X.jsxs)(`h1`,{className:`flex min-w-0 items-center gap-1.5 text-sm font-medium`,children:[(0,X.jsx)(Se,{className:`size-3.5 shrink-0 text-muted-foreground`,platform:l.build.platform}),(0,X.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5`,children:[(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 whitespace-nowrap`,children:[(0,X.jsxs)(`span`,{className:`sr-only`,children:[g(l.build.platform),` `]}),b[l.build.artifact_kind].label,(0,X.jsx)(Oe,{build:l.build})]}),(0,X.jsxs)(`span`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:[`· `,(0,X.jsx)(`span`,{translate:`no`,children:l.channel})]})]}),(0,X.jsx)(`span`,{className:`hidden text-xs font-normal text-muted-foreground tabular-nums sm:inline`,children:y(l.build.byte_size)})]}):(0,X.jsx)(`h1`,{className:`sr-only`,children:`Native build`})]}),(0,X.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,X.jsx)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-4 sm:gap-6`,children:i.isError?(0,X.jsxs)(O,{variant:`destructive`,children:[(0,X.jsx)(k,{}),(0,X.jsx)(E,{children:`The native build couldn't be loaded`}),(0,X.jsx)(D,{children:i.error.message}),(0,X.jsx)(ue,{children:(0,X.jsxs)(o,{onClick:()=>void i.refetch(),size:`xs`,variant:`outline`,children:[(0,X.jsx)(T,{"data-icon":`inline-start`}),`Retry`]})})]}):l===void 0?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{className:`sr-only`,children:`Loading the native build`}),(0,X.jsx)(e,{className:`h-56 w-full rounded-xl`}),(0,X.jsx)(e,{className:`h-64 w-full rounded-xl`})]}):l===null?(0,X.jsxs)(B,{className:`border py-16`,children:[(0,X.jsxs)(I,{children:[(0,X.jsx)(F,{variant:`icon`,children:(0,X.jsx)(ie,{})}),(0,X.jsx)(R,{children:`Native build not found`}),(0,X.jsx)(z,{children:`No native build has this ID. It may have been deleted, or be from another console.`})]}),(0,X.jsx)(L,{children:(0,X.jsx)(c,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),search:{channels:`all`},to:`/native-builds`,children:`Show all native builds`})})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(qe,{build:l.build}),l.build.artifact_kind===`ipa`&&!J(l.build)?(0,X.jsx)(Xe,{build:l.build}):null,(0,X.jsx)(Pe,{detail:l}),(0,X.jsx)(tt,{detail:l}),(0,X.jsx)(Qe,{detail:l,onPage:e=>r({...e.before===void 0?{}:{patchesBefore:e.before},...e.after===void 0?{}:{patchesAfter:e.after}}),page:d})]})})})]})}function rt(){let{buildId:e}=h.useParams(),t=h.useSearch(),n=h.useNavigate();return(0,X.jsx)(nt,{buildId:e,onSearchChange:e=>void n({search:e,replace:!0}),search:t})}export{rt as component};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-builds_._buildId-DZqylSRq.js","assets/sidebar-BmzmPGuv.js","assets/link-CRMwpc7-.js","assets/relativeTime-Dbefsycs.js","assets/arrow-up-right-C_1ALUCD.js","assets/TargetDisplay-DMZHMgWk.js","assets/copy-BjVLMKbo.js","assets/key-round-BkeLvA1m.js","assets/native-builds-uKuvmyXZ.js","assets/constants-zSb7FXDh.js","assets/dist-BEmib-ZM.js","assets/HashValueDisplay-BHL4xWSY.js","assets/chevron-right-RAuPv9r1.js","assets/download-CgpaZb23.js","assets/git-branch-BGatQV8Q.js","assets/-native-builds-search-qeto9-fq.js","assets/history-Ci4dhphE.js","assets/smartphone-Dy13ukaU.js","assets/badge-zMibJGR5.js","assets/QrCode-BSNEn_M-.js","assets/BundleIdDisplay-BKaGARD1.js","assets/ChannelBadge-CPc1M44L.js","assets/PlatformIcon-DYsYaYt6.js","assets/RolloutPercentageBadge-Cd1UNLL0.js","assets/IosInstall-CgNa8B4v.js","assets/useMutation-D7IuoOLE.js","assets/loader-circle-8lunBReu.js","assets/field-BiSGCVoS.js","assets/api-tJRzijjy.js","assets/preload-helper-CE9OukVC.js","assets/SandboxBadge-CqGX5DiH.js","assets/card-pYZSDIxg.js","assets/empty-Bwao2ztZ.js","assets/table-Bo1jU9-v.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{Vr as e}from"./sidebar-BmzmPGuv.js";import{i as t,r as n,t as r}from"./preload-helper-CE9OukVC.js";import{r as i}from"./-native-builds-search-qeto9-fq.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-DZqylSRq.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])),`component`),validateSearch:i});export{a as n,o as t};
|