@hot-updater/console 1.2.0-rc.34 → 1.2.0-rc.35
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/{IosInstall-DsKczesK.js → IosInstall-CyBFeLGv.js} +1 -1
- package/.output/public/assets/{RelativeTime-CP7nosYx.js → RelativeTime-BvgGWfXM.js} +1 -1
- package/.output/public/assets/{RowReason-D7TZ2xwW.js → RowReason-7dIWPxhy.js} +1 -1
- package/.output/public/assets/{TargetDisplay-DzSkf5yP.js → TargetDisplay-CiU6ZsDl.js} +1 -1
- package/.output/public/assets/{index-CccnEzaa.js → index-CQDGK7Fg.js} +1 -1
- package/.output/public/assets/{native-builds-CXDwW54k.js → native-builds-CkaoQZVh.js} +2 -2
- package/.output/public/assets/{native-builds-7sC78eTq.js → native-builds-CtqBGw8a.js} +1 -1
- package/.output/public/assets/native-builds-hOC_V15R.js +1 -0
- package/.output/public/assets/{native-builds_._buildId-C7-yUwvH.js → native-builds_._buildId-CAnF7xPa.js} +2 -2
- package/.output/public/assets/native-builds_._buildId-DSbzVVI5.js +1 -0
- package/.output/public/assets/{native-builds_.devices-CQ_tB3SO.js → native-builds_.devices-CCmLAkXG.js} +1 -1
- package/.output/public/assets/{native-builds_.devices-C_YZoRxB.js → native-builds_.devices-D-8DVNRB.js} +2 -2
- package/.output/public/assets/{routes-Dj_ukxU_.js → routes-BMbT1Qdm.js} +2 -2
- package/.output/public/assets/{routes-DvCD6Kib.js → routes-D8reVBSx.js} +1 -1
- package/.output/server/{__23tanstack-start-server-fn-resolver-CUEijItf.mjs → __23tanstack-start-server-fn-resolver-BkmGm73S.mjs} +58 -58
- package/.output/server/_libs/_.mjs +1 -1
- package/.output/server/_libs/lucide-react.mjs +13 -1
- package/.output/server/_ssr/{BundleIdDisplay-C2Yhau3H.mjs → BundleIdDisplay-B90reloJ.mjs} +2 -2
- package/.output/server/_ssr/{ChannelBadge-BTUSgvbr.mjs → ChannelBadge-Dbmjpe-k.mjs} +3 -3
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-BDSJSs7U.mjs → ConsoleFeatureUnavailable-BX6uKVMH.mjs} +6 -6
- package/.output/server/_ssr/{EventDetails-wqpPsSDt.mjs → EventDetails-DiO0Njqj.mjs} +8 -8
- package/.output/server/_ssr/{HashValueDisplay-yosN9R32.mjs → HashValueDisplay-CicukMPP.mjs} +2 -2
- package/.output/server/_ssr/{InsightsPageHeader-DUvHESff.mjs → InsightsPageHeader-Bu88jQMD.mjs} +7 -7
- package/.output/server/_ssr/{IosInstall-DAZxDeBB.mjs → IosInstall-qOwrZE2v.mjs} +8 -8
- package/.output/server/_ssr/{NativeBuildsNav-JvQo5YkG.mjs → NativeBuildsNav-D20VrrNx.mjs} +3 -3
- package/.output/server/_ssr/{NotFoundPage-Z48ip8aB.mjs → NotFoundPage-_rXA1M7U.mjs} +2 -2
- package/.output/server/_ssr/{QrCode-NrGOfAPX.mjs → QrCode-DmEsrduv.mjs} +2 -2
- package/.output/server/_ssr/{RelativeTime-BiGH0j0S.mjs → RelativeTime-nw54zYAf.mjs} +4 -4
- package/.output/server/_ssr/{RolloutPercentageBadge-O0jbSRuI.mjs → RolloutPercentageBadge-DlRrxKdg.mjs} +3 -3
- package/.output/server/_ssr/{RowReason-DneEz--P.mjs → RowReason-D46cFeQO.mjs} +5 -5
- package/.output/server/_ssr/{SandboxBadge-ujAuQ6FN.mjs → SandboxBadge-DXM9RKlS.mjs} +2 -2
- package/.output/server/_ssr/{TargetDisplay-DFV5VpPn.mjs → TargetDisplay-CIU-9UqJ.mjs} +3 -3
- package/.output/server/_ssr/{alert-dialog-B2IG3q93.mjs → alert-dialog-CAb_7ZLL.mjs} +1 -1
- package/.output/server/_ssr/{api-keys-DpSj11mK.mjs → api-keys-CebW6Olm.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-ZufcGzhb.mjs → api-keys-DY3XY8gz.mjs} +10 -10
- package/.output/server/_ssr/{api-keys-rpc-N3V7gkvv.mjs → api-keys-rpc-D0rQ5vvV.mjs} +3 -3
- package/.output/server/_ssr/{api-rpc-DXvqIbGs.mjs → api-rpc-OTsF60lZ.mjs} +16 -16
- package/.output/server/_ssr/{api-CHpFJ_c4.mjs → api-v-mDt0z9.mjs} +7 -6
- package/.output/server/_ssr/{auth-rpc-Cx72ajwL.mjs → auth-rpc-Cga9IGo3.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-DT4SuI6u.mjs → auth.server-BVqW4FSJ.mjs} +25 -8
- package/.output/server/_ssr/{badge-DNrlMwwO.mjs → badge-Cy4z0pH1.mjs} +1 -1
- package/.output/server/_ssr/{bundleActivity-a-pEDiqu.mjs → bundleActivity-CjE9yslP.mjs} +1 -1
- package/.output/server/_ssr/{card-BSFwWT9T.mjs → card-UaEWfeRI.mjs} +1 -1
- package/.output/server/_ssr/{config.server-BEg-Ln3t.mjs → config.server-OJdvjs7r.mjs} +3 -3
- package/.output/server/_ssr/{console-access-CPYdc4mK.mjs → console-access-BM4TLI4g.mjs} +2 -2
- package/.output/server/_ssr/{console-features-api-D_KFX0JV.mjs → console-features-api-BmiP0aaD.mjs} +3 -3
- package/.output/server/_ssr/{console-features-rpc-CSogovr5.mjs → console-features-rpc-DPcZcHSW.mjs} +3 -3
- package/.output/server/_ssr/{deviceProfileToken-xzDLfE0T.mjs → deviceProfileToken-Eeltr-o0.mjs} +1 -1
- package/.output/server/_ssr/{dialog-BE-0BoPu.mjs → dialog-DWlZVg5y.mjs} +1 -1
- package/.output/server/_ssr/{downloadBundle-C1KOnpiF.mjs → downloadBundle-DLkb7A7E.mjs} +1 -1
- package/.output/server/_ssr/{empty-DVeNY_6z.mjs → empty-BPB71w6i.mjs} +2 -2
- package/.output/server/_ssr/{failureReports-BVufgM3l.mjs → failureReports-Bd7CaadE.mjs} +3 -3
- package/.output/server/_ssr/{field-C_NBjv_7.mjs → field-Bx8FKYuu.mjs} +2 -2
- package/.output/server/_ssr/{foldedPage-CUjJqtlF.mjs → foldedPage-DrxWt5XS.mjs} +1 -1
- package/.output/server/_ssr/{getBundleChildren-CnOf4Frp.mjs → getBundleChildren-DA9zbUBD.mjs} +1 -1
- package/.output/server/_ssr/{input-group-CGiryg7I.mjs → input-group-BzfbjZEj.mjs} +1 -1
- package/.output/server/_ssr/{insights-DNNsxJlD.mjs → insights-CBOTZToQ.mjs} +5 -5
- package/.output/server/_ssr/{insights-ECnoz9jp.mjs → insights-CFbpYpMy.mjs} +2 -2
- package/.output/server/_ssr/{insights-hDsGL-yq.mjs → insights-DaGJDccC.mjs} +25 -25
- package/.output/server/_ssr/{insights-api-DvbUK1vp.mjs → insights-api-b2wrxjFK.mjs} +5 -5
- package/.output/server/_ssr/{insights-errors-DwUaDs0Z.mjs → insights-errors-BrToSfI9.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-DGO2_3Vx.mjs → insights-failures-lmcxwKb3.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-rpc-DCu8iR4V.mjs → insights-failures-rpc-DLo_DEAi.mjs} +8 -8
- package/.output/server/_ssr/{insights-recovery-Cdg3Msrj.mjs → insights-recovery-Dhg3WGpC.mjs} +1 -1
- package/.output/server/_ssr/{insights-recovery-rpc-Bla1PuCq.mjs → insights-recovery-rpc-rpNu1Y8O.mjs} +5 -5
- package/.output/server/_ssr/{insights-rpc-ViJh0Q-s.mjs → insights-rpc-C2u-cHw2.mjs} +3 -3
- package/.output/server/_ssr/{insights-search-DfEqsfAa.mjs → insights-search-BBOEGM68.mjs} +2 -2
- package/.output/server/_ssr/{insights-usage-BVm7CDw9.mjs → insights-usage-gW3T5N6N.mjs} +1 -1
- package/.output/server/_ssr/{insights-usage-rpc-DWSPBftd.mjs → insights-usage-rpc-6VNQ-ZVG.mjs} +5 -5
- package/.output/server/_ssr/{insights-usage-rpc-CLsYlcnO.mjs → insights-usage-rpc-BOfXGKaq.mjs} +4 -4
- package/.output/server/_ssr/{insightsUsage-lPKyRC2o.mjs → insightsUsage-B_7pM9wp.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-CbZmys6X.mjs → insights_.distribution-DrY2XK92.mjs} +14 -14
- package/.output/server/_ssr/{insights_.distribution-6t26Hce4.mjs → insights_.distribution-a1c7v5MP.mjs} +2 -2
- package/.output/server/_ssr/{insights_.distribution-Bj054JTo.mjs → insights_.distribution-kX-VlU6s.mjs} +5 -5
- package/.output/server/_ssr/{installations-CL-nVRbZ.mjs → installations-B5-uJU9A.mjs} +4 -4
- package/.output/server/_ssr/{installations-BOzetKfl.mjs → installations-BG3Mf569.mjs} +2 -2
- package/.output/server/_ssr/{installations-ARFvJMie.mjs → installations-uML6v5Uo.mjs} +12 -12
- package/.output/server/_ssr/{ios-devices-rpc-Xln3pLFJ.mjs → ios-devices-rpc-DqTNHbdN.mjs} +8 -8
- package/.output/server/_ssr/{iosDeviceCookie-BG4X3Kbt.mjs → iosDeviceCookie-DNXjIPeF.mjs} +5 -5
- package/.output/server/_ssr/{iosDeviceProfile-C8NvflH9.mjs → iosDeviceProfile-Cl32eCmk.mjs} +6 -6
- package/.output/server/_ssr/{iosDevices-Ck5ko5IX.mjs → iosDevices-BQ0RaNWs.mjs} +3 -3
- package/.output/server/_ssr/{listReleases-QF91GLE7.mjs → listReleases-B2Q9xwFv.mjs} +3 -3
- package/.output/server/_ssr/{native-artifact-BRNP_q-y.mjs → native-artifact-BurROe05.mjs} +43 -2
- package/.output/server/_ssr/{native-builds-B70NqL0z.mjs → native-builds-BBOmHVsH.mjs} +16 -16
- package/.output/server/_ssr/{native-builds-nRuXKypG.mjs → native-builds-Bnx0fVWs.mjs} +10 -5
- package/.output/server/_ssr/{native-builds-6Kq2Pamq.mjs → native-builds-BuYIAi2p.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_._buildId-B4uQUP7t.mjs → native-builds_._buildId-BUdWhQaH.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_._buildId-zbXBoGs8.mjs → native-builds_._buildId-DZSLPTef.mjs} +58 -43
- package/.output/server/_ssr/{native-builds_.devices-DcgdiEiK.mjs → native-builds_.devices-QK5Z4ACD.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_.devices-OLR3gTfc.mjs → native-builds_.devices-phkJgI1w.mjs} +17 -17
- package/.output/server/_ssr/{nativeBuildDownloadLink-DHsPiwsg.mjs → nativeBuildDownloadLink-BVtopV-4.mjs} +2 -2
- package/.output/server/_ssr/{nativeBuildInstall-DnpC3dUR.mjs → nativeBuildInstall-CVQLkYrX.mjs} +8 -8
- package/.output/server/_ssr/{nativeBuilds-DaF-TcfO.mjs → nativeBuilds-WKdqgemR.mjs} +7 -7
- package/.output/server/_ssr/{publicConsoleBase-wTKw3_iB.mjs → publicConsoleBase-C3sNbafy.mjs} +1 -1
- package/.output/server/_ssr/{release-adoption-gfhE5tz5.mjs → release-adoption-D2719HVh.mjs} +2 -2
- package/.output/server/_ssr/{release-adoption-rpc-C8oj79w3.mjs → release-adoption-rpc-DSlOL5v7.mjs} +7 -7
- package/.output/server/_ssr/{releaseAdoption-DfEYq7I4.mjs → releaseAdoption-CxGKmUXx.mjs} +4 -4
- package/.output/server/_ssr/{releaseReachability-Ch1JpJkY.mjs → releaseReachability-sWr0bLRk.mjs} +1 -1
- package/.output/server/_ssr/{remote-config-ClsnMl5Y.mjs → remote-config-9VJWDosm.mjs} +18 -18
- package/.output/server/_ssr/{remote-config-DOinV02U.mjs → remote-config-C4PKU5_z.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-MEFtxtmM.mjs → remote-config-DPHJyAHV.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-rpc-CCPIk5TC.mjs → remote-config-rpc-DxQ0jW52.mjs} +3 -3
- package/.output/server/_ssr/{router-jomm2ZkW.mjs → router-C1FV3SPc.mjs} +36 -36
- package/.output/server/_ssr/{routes-D0sAXxvj.mjs → routes-DDzrfaZr.mjs} +23 -23
- package/.output/server/_ssr/{routes-YuEmTB66.mjs → routes-Dg1cG9-d.mjs} +11 -11
- package/.output/server/_ssr/{schema-migration-rpc-CzOI4qIc.mjs → schema-migration-rpc-DdijfSjx.mjs} +3 -3
- package/.output/server/_ssr/{select-jxef2GHj.mjs → select-CQvxbdec.mjs} +2 -2
- package/.output/server/_ssr/{server-DowlVz8B.mjs → server-CGStUbwn.mjs} +3 -3
- package/.output/server/_ssr/{sidebar-DbK9IOE6.mjs → sidebar-zjbq02-o.mjs} +2 -2
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{switch-PuW4wKem.mjs → switch-_XoBaA1s.mjs} +2 -2
- package/.output/server/_ssr/{table-CTjtU7u0.mjs → table-FoAc6s3r.mjs} +1 -1
- package/.output/server/_ssr/{tabs-CYGM4B-P.mjs → tabs-BgUZHny1.mjs} +2 -2
- package/.output/server/_ssr/{updateFailures-BwDwIoNu.mjs → updateFailures-DGuFoK6A.mjs} +3 -3
- package/.output/server/{_tanstack-start-manifest_v-Dzfgn9EO.mjs → _tanstack-start-manifest_v-wLJ-tAN0.mjs} +22 -22
- package/.output/server/index.mjs +167 -167
- package/package.json +7 -7
- package/src/components/features/native-builds/BuiltInBundleCard.tsx +21 -5
- package/src/components/features/native-builds/InstallCard.tsx +32 -24
- package/src/components/features/native-builds/IosInstall.tsx +3 -2
- package/src/components/features/native-builds/PatchesCard.tsx +28 -20
- package/src/lib/api-rpc.ts +2 -1
- package/src/lib/native-builds.ts +10 -3
- package/src/lib/server/nativeBuildInstall.ts +3 -1
- package/src/lib/server/nativeBuilds.ts +15 -8
- package/.output/public/assets/native-builds-BOSmoLed.js +0 -1
- package/.output/public/assets/native-builds_._buildId-u5dG7ej5.js +0 -1
package/.output/nitro.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,Di as t,Hr as n,Oi as r,Q as i,Ri as a,Si as o,Vi as s,_r as c,di as l,gr as u,wi as d,zr as f}from"./sidebar-UnsNYOry.js";import{t as p}from"./link-D95E0fwF.js";import{t as m}from"./useMutation-BWX97JX2.js";import{i as ee}from"./-native-builds-search-BvCftqF2.js";import{t as te}from"./loader-circle-C26cZDSM.js";import{C as h,T as g,a as _,c as v,d as y,f as b,i as x,l as S,o as C,r as ne,y as re}from"./native-builds-BOSmoLed.js";import{t as ie}from"./refresh-cw-CpCxPYma.js";import{t as ae}from"./smartphone-lSZWrqxx.js";import{a as w,i as T,n as E,o as D}from"./badge-D4Tiwei-.js";import{n as oe}from"./relativeTime-D_aYJRc7.js";import{a as se,n as ce,r as le,t as ue}from"./field-PkdRPD3A.js";import{m as de}from"./api-B1z_XXrQ.js";var O=s(a(),1),k=s(oe(),1),fe=d({method:`GET`}).middleware([f]).handler(r(`3a62744a539db57f5a29f39cec7fb03fd2817703b40d98e6da69e2f5e7ae6f3d`)),pe=d({method:`POST`}).middleware([f]).handler(r(`7138a71df2ede8dd2c3db732d8d0ae10c56b85a8177dcdacf4e747b8087177c6`)),me=d({method:`POST`}).middleware([f]).handler(r(`4b173c2b2f5ea074a1f10862282308f11f5a043c044d64b6f63e6a29d571ec64`)),he=d({method:`POST`}).middleware([f]).handler(r(`7908c24ccc2674ce07a553a645b8f4790889975a80f424a05d71a9fb8ab49787`)),ge=d({method:`POST`}).middleware([f]).handler(r(`4c92dfeae76a6fc898d6f38941eeedaec1f3d118f51a6f31ebf0bb1cea3fcea4`)),_e=d({method:`POST`}).middleware([f]).handler(r(`8e37ec67413ceba554adb2d4b15e53682595a089d4b431ba7965d4347fb500fc`)),ve=d({method:`GET`}).middleware([f]).handler(r(`a11cb4014e6b23528f76382c43684798b0e84a6936aaba02c918e8f4e216e282`)),A={all:[`ios-devices`],list:e=>[`ios-devices`,e??`all`],device:e=>[`ios-devices`,`device`,e],kept:e=>[`ios-devices`,`kept`,e??``],ipa:e=>[`native-build-ipa-devices`,e]},j=600*1e3;function ye(e){return n({queryKey:A.list(e),queryFn:()=>fe({data:e===void 0?{}:{status:e}}),placeholderData:l})}function be(e){return n({queryKey:A.device(e??``),queryFn:()=>pe({data:{udid:e}}),enabled:e!==null})}function M(e,t=!0){return n({queryKey:[`ios-device-profile-link`,e],queryFn:()=>me({data:e}),enabled:t,staleTime:j,refetchInterval:j})}function N(e){return n({queryKey:A.ipa(e),queryFn:()=>ve({data:{id:e}})})}var P=e=>{let t=o();return m({mutationFn:e,onSettled:async()=>{await Promise.all([t.invalidateQueries({queryKey:A.all}),t.invalidateQueries({queryKey:[`native-build-install-eligibility`]})])}})},xe=()=>P(e=>he({data:e})),Se=()=>P(e=>ge({data:e})),Ce=()=>P(e=>_e({data:e})),F=(e,t)=>`${e}/_hot-updater/devices/${t}`,I=async(e,t={})=>{let{json:n,...r}=t,i=await fetch(e,{credentials:`same-origin`,...r,...n===void 0?{}:{headers:{"content-type":`application/json`},body:JSON.stringify(n)}}),a=await i.json().catch(()=>null);if(!i.ok||a===null)throw Error(a?.error??`Request failed (${i.status}).`);return a},L=`hot-updater-ios-device-kept`,R=`hot-updater-ios-device-kept`,z=new Map,B=(e,t)=>{let n=z.get(t);return n===void 0&&(n=I(F(e,`receipt`),{method:`POST`,json:{receipt:t}}).then(e=>{g(t),window.dispatchEvent(new Event(L));try{window.localStorage.setItem(R,String(Date.now()))}catch{}return e},e=>{throw z.delete(t),e}),z.set(t,n)),n};function V(e,t,r){let i=o();return(0,O.useEffect)(()=>{let e=()=>void i.invalidateQueries({queryKey:A.kept(null),exact:!0}),t=t=>{t.key===R&&e()};return window.addEventListener(L,e),window.addEventListener(`storage`,t),()=>{window.removeEventListener(L,e),window.removeEventListener(`storage`,t)}},[i]),n({queryKey:A.kept(t),queryFn:async()=>{let n=null;t!==null&&await B(e,t).catch(e=>{n=e});let r=await I(F(e,`receipt`));if(n!==null&&r.udid===null)throw n;return r},enabled:r,retry:!1,staleTime:1/0})}var we=async e=>{await I(F(e,`receipt`),{method:`DELETE`}).catch(()=>void 0)},H=e=>P(t=>I(F(e,`request`),{method:`POST`,json:t.receipt===null?{name:t.name}:{name:t.name,receipt:t.receipt}})),U=(e,t)=>e!=null&&t!==null&&e.toLowerCase()===t.toLowerCase(),W=t(),Te=`With the same bundle ID, this install replaces the App Store's copy of the app on this iPhone.`,G=`h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit`,K=e=>/iPhone|iPod|iPad/u.test(e.userAgent)||/Macintosh/u.test(e.userAgent)&&e.maxTouchPoints>1,q=()=>{if(typeof window>`u`)return{udid:null,receipt:null,requested:!1};let e=new URLSearchParams(window.location.hash.slice(1)),t=e.get(`udid`),n=t!==null&&x.test(t)?t:null;return{udid:n,receipt:n===null?null:e.get(`r`),requested:n!==null&&e.get(`requested`)===`1`}},Ee=e=>{try{return window.localStorage.getItem(e)}catch{return null}},J=(e,t)=>{try{window.localStorage.setItem(e,t)}catch{}},Y=`hot-updater-ios-device-adopted`,X=(e,t)=>{let n=e?.ios===!0&&e.udid===null&&t!=null&&x.test(t)?t:null;(0,O.useEffect)(()=>{n!==null&&(J(_,n),window.dispatchEvent(new Event(Y)))},[n])},De=()=>{let[e,t]=(0,O.useState)(null),[n]=(0,O.useState)(q);return(0,O.useEffect)(()=>{let e=e=>e!=null&&x.test(e)?e:null,r=n,i=0,a=e=>{let t=e.receipt!==null||e.requested;e.udid!==null&&t&&(i+=1,J(_,e.udid),e.receipt!==null&&(y(e.udid,e.receipt),B(S(window.location),e.receipt).catch(()=>void 0))),e.udid!==null&&window.location.hash!==``&&window.history.replaceState(window.history.state,``,`${window.location.pathname}${window.location.search}`)};a(n);try{window.localStorage.removeItem(ne)}catch{}let o=()=>{let n=e(Ee(`hot-updater-ios-udid`))??r.udid,a=(r.udid===n?r.receipt:null)??h(n),o=r.requested,s=i;t(e=>e!==null&&e.udid===n&&e.receipt===a&&e.requested===o&&e.answers===s?e:{ios:K(navigator),udid:n,receipt:a,requested:o,answers:s})};o();let s=e=>{(e.key===null||e.key===`hot-updater-ios-udid`)&&o()},c=()=>{let e=q();e.udid!==null&&(r=e,a(e)),o()};return window.addEventListener(`storage`,s),window.addEventListener(Y,o),window.addEventListener(`hashchange`,c),window.addEventListener(`pageshow`,c),document.addEventListener(`visibilitychange`,c),()=>{window.removeEventListener(`storage`,s),window.removeEventListener(Y,o),window.removeEventListener(`hashchange`,c),window.removeEventListener(`pageshow`,c),document.removeEventListener(`visibilitychange`,c)}},[n]),e},Oe=300*1e3,Z=(e,t)=>{let[,n]=(0,O.useReducer)(e=>e+1,0),r=e+C-Oe;return(0,O.useEffect)(()=>{if(!t)return;let e=setTimeout(n,Math.max(0,r-Date.now()));return document.addEventListener(`visibilitychange`,n),window.addEventListener(`pageshow`,n),()=>{clearTimeout(e),document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`pageshow`,n)}},[r,t]),t&&Date.now()>=r};function ke({fetching:e,onRenew:t}){return(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,W.jsxs)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:[`This install link has expired.`,e?` Getting a new one.`:``]}),e?null:(0,W.jsx)(u,{className:G,onClick:t,variant:`outline`,children:`Get a new link`})]})}function Ae({build:e,token:t}){return(0,W.jsx)(`a`,{className:c({className:G}),href:re(window.location,e.id,t),children:`Install`})}function je(){return(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`On iOS 16 or later, the app opens only with Developer Mode on: Settings, Privacy & Security, Developer Mode.`}),(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Te})]})}function Q({build:t,again:n=!1}){let r=M({mode:`identify`,buildId:t.id});return r.data?.status===`no-secret`?(0,W.jsxs)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:[`Set `,r.data.secretName,` on the Console to check iPhones from this page.`]}):r.data?.status===`issued`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`a`,{className:c({className:G,variant:n?`secondary`:`default`}),href:b(v(window.location,t.id),r.data.token),children:[(0,W.jsx)(ae,{"data-icon":`inline-start`}),n?`Check this iPhone again`:`Check this iPhone`]}),(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Allow the download, then install it in Settings, where iOS calls it not signed. Nothing stays installed.`})]}):r.isError?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(E,{variant:`destructive`,children:[(0,W.jsx)(D,{}),(0,W.jsx)(w,{children:`The check couldn't start`}),(0,W.jsx)(T,{children:`Check your connection and try again.`})]}),(0,W.jsxs)(u,{className:G,disabled:r.isFetching,onClick:()=>void r.refetch(),variant:`outline`,children:[(0,W.jsx)(ie,{"data-icon":`inline-start`}),`Reload`]})]}):(0,W.jsx)(e,{"aria-label":`Preparing the check`,className:`h-11 w-full`})}var Me=e=>(0,k.default)(e).format(`MMM D`);function $({device:e,canApprove:t,onDevicesPage:n=!1}){return(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,W.jsxs)(E,{children:[(0,W.jsx)(D,{}),(0,W.jsx)(w,{children:`Apple didn't register this iPhone`}),(0,W.jsx)(T,{children:e.apple_error})]}),t?n?null:(0,W.jsx)(p,{className:c({className:G,variant:`outline`}),to:`/native-builds/devices`,children:`iOS devices`}):(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.status===`approved`?`Ask a maintainer to free a device slot.`:`Ask a maintainer to check it on the iOS devices page.`})]})}function Ne({build:t,device:n,registry:r,newerBuild:a,canApprove:o,registryReadAt:s}){let l=v(window.location,t.id),d=H(l),f=V(l,n.receipt,n.ios&&n.udid!==null&&r===null),m=n.receipt!==null||U(f.data?.udid,n.udid),[h,g]=(0,O.useState)(``),[_,y]=(0,O.useState)(null),b=_!==null&&s<=_.readBefore,x=b?_.device:r,S=(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,W.jsx)(`p`,{className:`text-sm font-medium`,children:`Not in this build`}),(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This IPA was signed without this iPhone, and iOS won't install it here.`})]});if(x!==null){let e=b?null:a;return x.apple_error!==null&&e===null?(0,W.jsx)($,{canApprove:o,device:x}):(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[S,(0,W.jsx)(`p`,{className:`text-sm`,role:`status`,children:x.status===`pending`?`${x.name} was requested on ${Me(x.created_at_ms)}. A maintainer approves it next.`:e===null?`${x.name} is ${x.status}. It joins the next ad hoc build.`:`A newer build has ${x.name}.`}),e===null?null:(0,W.jsx)(p,{className:c({className:G}),params:{buildId:e},to:`/native-builds/$buildId`,children:`Open the newer build`})]})}if(!m&&f.isPending&&n.udid!==null)return(0,W.jsx)(e,{"aria-label":`Reading this iPhone`,className:`h-11 w-full`});if(!m)return(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[S,(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Check this iPhone once more to request it for the next ad hoc build.`}),(0,W.jsx)(Q,{build:t,again:!0})]});let C=h.trim();return(0,W.jsxs)(`form`,{className:`flex min-w-0 flex-col gap-3`,onSubmit:e=>{if(e.preventDefault(),C===``)return;let t=s;d.mutate({receipt:n.receipt,name:C},{onSuccess:({device:e})=>y({device:e,readBefore:t})})},children:[S,(0,W.jsxs)(ue,{"data-invalid":d.isError||void 0,children:[(0,W.jsx)(se,{htmlFor:`ios-device-name`,children:`This iPhone's name`}),(0,W.jsx)(i,{autoComplete:`off`,className:`h-11 sm:h-8`,id:`ios-device-name`,maxLength:100,onChange:e=>g(e.target.value),placeholder:`Kim's iPhone`,value:h}),(0,W.jsx)(ce,{children:`A maintainer approves it, and it joins the next ad hoc build.`}),(0,W.jsx)(le,{children:d.isError?`The request didn't go through. Check this iPhone again, then try once more.`:null})]}),(0,W.jsxs)(u,{className:G,disabled:C===``||d.isPending,type:`submit`,children:[d.isPending?(0,W.jsx)(te,{className:`animate-spin motion-reduce:animate-none`,"data-icon":`inline-start`}):(0,W.jsx)(ee,{"data-icon":`inline-start`}),`Request access`]}),d.isError?(0,W.jsx)(Q,{again:!0,build:t}):null]})}function Pe({build:t,device:n}){X(n,V(v(window.location,t.id),n.receipt,n.ios&&n.udid===null).data?.udid);let{udid:r}=n,i=de(t.id,r),{refetch:a}=i,o=Z(i.dataUpdatedAt,i.data?.status===`installable`&&i.data.device===`included`);if((0,O.useEffect)(()=>{o&&a()},[o,a]),i.isPending)return(0,W.jsx)(e,{"aria-label":`Reading this IPA`,className:`h-11 w-full`});let s=i.data;if(s===void 0||s.status===`unavailable`)return(0,W.jsxs)(E,{children:[(0,W.jsx)(D,{}),(0,W.jsx)(w,{children:`Installation details unavailable`}),(0,W.jsx)(T,{children:`The Console couldn't read this IPA from storage in parts, which takes an HTTPS download link that answers Range requests. Other ways to install still work from a computer.`})]});if(s.status===`store`)return(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This IPA is an App Store export, which installs through TestFlight, not from this page.`});if(s.status===`expired`)return(0,W.jsxs)(E,{variant:`destructive`,children:[(0,W.jsx)(D,{}),(0,W.jsx)(w,{children:`This build's profile has expired`}),(0,W.jsxs)(T,{children:[`It expired on `,(0,k.default)(s.expiresAt).format(`YYYY-MM-DD`),`. A maintainer rebuilds it to install again.`]})]});let c=s.link.status===`issued`?s.link.token:null;return s.link.status===`no-secret`?(0,W.jsxs)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:[`Set `,s.link.secretName,` on the Console to install from this page.`]}):c===null?null:s.device===`included`?(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,W.jsx)(`p`,{className:`text-sm font-medium`,children:`In this build`}),o?(0,W.jsx)(ke,{fetching:i.isFetching,onRenew:()=>void a()}):(0,W.jsx)(Ae,{build:t,token:c}),(0,W.jsx)(je,{})]}):s.device===`not-included`?(0,W.jsx)(Ne,{build:t,device:n,registry:s.registry,newerBuild:s.newerBuild,canApprove:s.canApprove,registryReadAt:i.dataUpdatedAt}):(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,W.jsx)(`p`,{className:`text-sm font-medium`,children:`Check this iPhone first`}),(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`iOS installs this IPA only on the devices it lists. A profile reads this iPhone's ID, then Safari comes back here.`})]}),(0,W.jsx)(Q,{build:t})]})}export{H as _,De as a,U as c,be as d,ye as f,Se as g,Ce as h,X as i,xe as l,N as m,Pe as n,we as o,V as p,K as r,A as s,$ as t,M as u};
|
|
1
|
+
import{$ as e,Di as t,Hr as n,Oi as r,Q as i,Ri as a,Si as o,Vi as s,_r as c,di as l,gr as u,wi as d,zr as f}from"./sidebar-UnsNYOry.js";import{t as p}from"./link-D95E0fwF.js";import{t as m}from"./useMutation-BWX97JX2.js";import{i as ee}from"./-native-builds-search-BvCftqF2.js";import{t as te}from"./loader-circle-C26cZDSM.js";import{E as h,a as g,b as _,f as v,i as y,l as b,o as x,p as S,r as C,u as ne,w as re}from"./native-builds-hOC_V15R.js";import{t as ie}from"./refresh-cw-CpCxPYma.js";import{t as ae}from"./smartphone-lSZWrqxx.js";import{a as w,i as T,n as E,o as D}from"./badge-D4Tiwei-.js";import{n as oe}from"./relativeTime-D_aYJRc7.js";import{a as se,n as ce,r as le,t as ue}from"./field-PkdRPD3A.js";import{m as de}from"./api-B1z_XXrQ.js";var O=s(a(),1),k=s(oe(),1),fe=d({method:`GET`}).middleware([f]).handler(r(`3a62744a539db57f5a29f39cec7fb03fd2817703b40d98e6da69e2f5e7ae6f3d`)),pe=d({method:`POST`}).middleware([f]).handler(r(`7138a71df2ede8dd2c3db732d8d0ae10c56b85a8177dcdacf4e747b8087177c6`)),me=d({method:`POST`}).middleware([f]).handler(r(`4b173c2b2f5ea074a1f10862282308f11f5a043c044d64b6f63e6a29d571ec64`)),he=d({method:`POST`}).middleware([f]).handler(r(`7908c24ccc2674ce07a553a645b8f4790889975a80f424a05d71a9fb8ab49787`)),ge=d({method:`POST`}).middleware([f]).handler(r(`4c92dfeae76a6fc898d6f38941eeedaec1f3d118f51a6f31ebf0bb1cea3fcea4`)),_e=d({method:`POST`}).middleware([f]).handler(r(`8e37ec67413ceba554adb2d4b15e53682595a089d4b431ba7965d4347fb500fc`)),ve=d({method:`GET`}).middleware([f]).handler(r(`a11cb4014e6b23528f76382c43684798b0e84a6936aaba02c918e8f4e216e282`)),A={all:[`ios-devices`],list:e=>[`ios-devices`,e??`all`],device:e=>[`ios-devices`,`device`,e],kept:e=>[`ios-devices`,`kept`,e??``],ipa:e=>[`native-build-ipa-devices`,e]},j=600*1e3;function ye(e){return n({queryKey:A.list(e),queryFn:()=>fe({data:e===void 0?{}:{status:e}}),placeholderData:l})}function be(e){return n({queryKey:A.device(e??``),queryFn:()=>pe({data:{udid:e}}),enabled:e!==null})}function M(e,t=!0){return n({queryKey:[`ios-device-profile-link`,e],queryFn:()=>me({data:e}),enabled:t,staleTime:j,refetchInterval:j})}function N(e){return n({queryKey:A.ipa(e),queryFn:()=>ve({data:{id:e}})})}var P=e=>{let t=o();return m({mutationFn:e,onSettled:async()=>{await Promise.all([t.invalidateQueries({queryKey:A.all}),t.invalidateQueries({queryKey:[`native-build-install-eligibility`]})])}})},xe=()=>P(e=>he({data:e})),Se=()=>P(e=>ge({data:e})),Ce=()=>P(e=>_e({data:e})),F=(e,t)=>`${e}/_hot-updater/devices/${t}`,I=async(e,t={})=>{let{json:n,...r}=t,i=await fetch(e,{credentials:`same-origin`,...r,...n===void 0?{}:{headers:{"content-type":`application/json`},body:JSON.stringify(n)}}),a=await i.json().catch(()=>null);if(!i.ok||a===null)throw Error(a?.error??`Request failed (${i.status}).`);return a},L=`hot-updater-ios-device-kept`,R=`hot-updater-ios-device-kept`,z=new Map,B=(e,t)=>{let n=z.get(t);return n===void 0&&(n=I(F(e,`receipt`),{method:`POST`,json:{receipt:t}}).then(e=>{h(t),window.dispatchEvent(new Event(L));try{window.localStorage.setItem(R,String(Date.now()))}catch{}return e},e=>{throw z.delete(t),e}),z.set(t,n)),n};function V(e,t,r){let i=o();return(0,O.useEffect)(()=>{let e=()=>void i.invalidateQueries({queryKey:A.kept(null),exact:!0}),t=t=>{t.key===R&&e()};return window.addEventListener(L,e),window.addEventListener(`storage`,t),()=>{window.removeEventListener(L,e),window.removeEventListener(`storage`,t)}},[i]),n({queryKey:A.kept(t),queryFn:async()=>{let n=null;t!==null&&await B(e,t).catch(e=>{n=e});let r=await I(F(e,`receipt`));if(n!==null&&r.udid===null)throw n;return r},enabled:r,retry:!1,staleTime:1/0})}var we=async e=>{await I(F(e,`receipt`),{method:`DELETE`}).catch(()=>void 0)},H=e=>P(t=>I(F(e,`request`),{method:`POST`,json:t.receipt===null?{name:t.name}:{name:t.name,receipt:t.receipt}})),U=(e,t)=>e!=null&&t!==null&&e.toLowerCase()===t.toLowerCase(),W=t(),Te=`With the same bundle ID, this install replaces the App Store's copy of the app on this iPhone.`,G=`h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit`,K=e=>/iPhone|iPod|iPad/u.test(e.userAgent)||/Macintosh/u.test(e.userAgent)&&e.maxTouchPoints>1,q=()=>{if(typeof window>`u`)return{udid:null,receipt:null,requested:!1};let e=new URLSearchParams(window.location.hash.slice(1)),t=e.get(`udid`),n=t!==null&&y.test(t)?t:null;return{udid:n,receipt:n===null?null:e.get(`r`),requested:n!==null&&e.get(`requested`)===`1`}},Ee=e=>{try{return window.localStorage.getItem(e)}catch{return null}},J=(e,t)=>{try{window.localStorage.setItem(e,t)}catch{}},Y=`hot-updater-ios-device-adopted`,X=(e,t)=>{let n=e?.ios===!0&&e.udid===null&&t!=null&&y.test(t)?t:null;(0,O.useEffect)(()=>{n!==null&&(J(g,n),window.dispatchEvent(new Event(Y)))},[n])},De=()=>{let[e,t]=(0,O.useState)(null),[n]=(0,O.useState)(q);return(0,O.useEffect)(()=>{let e=e=>e!=null&&y.test(e)?e:null,r=n,i=0,a=e=>{let t=e.receipt!==null||e.requested;e.udid!==null&&t&&(i+=1,J(g,e.udid),e.receipt!==null&&(v(e.udid,e.receipt),B(ne(window.location),e.receipt).catch(()=>void 0))),e.udid!==null&&window.location.hash!==``&&window.history.replaceState(window.history.state,``,`${window.location.pathname}${window.location.search}`)};a(n);try{window.localStorage.removeItem(C)}catch{}let o=()=>{let n=e(Ee(`hot-updater-ios-udid`))??r.udid,a=(r.udid===n?r.receipt:null)??re(n),o=r.requested,s=i;t(e=>e!==null&&e.udid===n&&e.receipt===a&&e.requested===o&&e.answers===s?e:{ios:K(navigator),udid:n,receipt:a,requested:o,answers:s})};o();let s=e=>{(e.key===null||e.key===`hot-updater-ios-udid`)&&o()},c=()=>{let e=q();e.udid!==null&&(r=e,a(e)),o()};return window.addEventListener(`storage`,s),window.addEventListener(Y,o),window.addEventListener(`hashchange`,c),window.addEventListener(`pageshow`,c),document.addEventListener(`visibilitychange`,c),()=>{window.removeEventListener(`storage`,s),window.removeEventListener(Y,o),window.removeEventListener(`hashchange`,c),window.removeEventListener(`pageshow`,c),document.removeEventListener(`visibilitychange`,c)}},[n]),e},Oe=300*1e3,ke=(e,t)=>{let[,n]=(0,O.useReducer)(e=>e+1,0),r=e+x-Oe;return(0,O.useEffect)(()=>{if(!t)return;let e=setTimeout(n,Math.max(0,r-Date.now()));return document.addEventListener(`visibilitychange`,n),window.addEventListener(`pageshow`,n),()=>{clearTimeout(e),document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`pageshow`,n)}},[r,t]),t&&Date.now()>=r};function Z({fetching:e,onRenew:t}){return(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,W.jsxs)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:[`This install link has expired.`,e?` Getting a new one.`:``]}),e?null:(0,W.jsx)(u,{className:G,onClick:t,variant:`outline`,children:`Get a new link`})]})}function Ae({build:e,token:t}){return(0,W.jsx)(`a`,{className:c({className:G}),href:_(window.location,e.id,t),children:`Install`})}function je(){return(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`On iOS 16 or later, the app opens only with Developer Mode on: Settings, Privacy & Security, Developer Mode.`}),(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Te})]})}function Q({build:t,again:n=!1}){let r=M({mode:`identify`,buildId:t.id});return r.data?.status===`no-secret`?(0,W.jsxs)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:[`Set `,r.data.secretName,` on the Console to check iPhones from this page.`]}):r.data?.status===`issued`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`a`,{className:c({className:G,variant:n?`secondary`:`default`}),href:S(b(window.location,t.id),r.data.token),children:[(0,W.jsx)(ae,{"data-icon":`inline-start`}),n?`Check this iPhone again`:`Check this iPhone`]}),(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Allow the download, then install it in Settings, where iOS calls it not signed. Nothing stays installed.`})]}):r.isError?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(E,{variant:`destructive`,children:[(0,W.jsx)(D,{}),(0,W.jsx)(w,{children:`The check couldn't start`}),(0,W.jsx)(T,{children:`Check your connection and try again.`})]}),(0,W.jsxs)(u,{className:G,disabled:r.isFetching,onClick:()=>void r.refetch(),variant:`outline`,children:[(0,W.jsx)(ie,{"data-icon":`inline-start`}),`Reload`]})]}):(0,W.jsx)(e,{"aria-label":`Preparing the check`,className:`h-11 w-full`})}var Me=e=>(0,k.default)(e).format(`MMM D`);function $({device:e,canApprove:t,onDevicesPage:n=!1}){return(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,W.jsxs)(E,{children:[(0,W.jsx)(D,{}),(0,W.jsx)(w,{children:`Apple didn't register this iPhone`}),(0,W.jsx)(T,{children:e.apple_error})]}),t?n?null:(0,W.jsx)(p,{className:c({className:G,variant:`outline`}),to:`/native-builds/devices`,children:`iOS devices`}):(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.status===`approved`?`Ask a maintainer to free a device slot.`:`Ask a maintainer to check it on the iOS devices page.`})]})}function Ne({build:t,device:n,registry:r,newerBuild:a,canApprove:o,registryReadAt:s}){let l=b(window.location,t.id),d=H(l),f=V(l,n.receipt,n.ios&&n.udid!==null&&r===null),m=n.receipt!==null||U(f.data?.udid,n.udid),[h,g]=(0,O.useState)(``),[_,v]=(0,O.useState)(null),y=_!==null&&s<=_.readBefore,x=y?_.device:r,S=(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,W.jsx)(`p`,{className:`text-sm font-medium`,children:`Not in this build`}),(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This IPA was signed without this iPhone, and iOS won't install it here.`})]});if(x!==null){let e=y?null:a;return x.apple_error!==null&&e===null?(0,W.jsx)($,{canApprove:o,device:x}):(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[S,(0,W.jsx)(`p`,{className:`text-sm`,role:`status`,children:x.status===`pending`?`${x.name} was requested on ${Me(x.created_at_ms)}. A maintainer approves it next.`:e===null?`${x.name} is ${x.status}. It joins the next ad hoc build.`:`A newer build has ${x.name}.`}),e===null?null:(0,W.jsx)(p,{className:c({className:G}),params:{buildId:e},to:`/native-builds/$buildId`,children:`Open the newer build`})]})}if(!m&&f.isPending&&n.udid!==null)return(0,W.jsx)(e,{"aria-label":`Reading this iPhone`,className:`h-11 w-full`});if(!m)return(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[S,(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Check this iPhone once more to request it for the next ad hoc build.`}),(0,W.jsx)(Q,{build:t,again:!0})]});let C=h.trim();return(0,W.jsxs)(`form`,{className:`flex min-w-0 flex-col gap-3`,onSubmit:e=>{if(e.preventDefault(),C===``)return;let t=s;d.mutate({receipt:n.receipt,name:C},{onSuccess:({device:e})=>v({device:e,readBefore:t})})},children:[S,(0,W.jsxs)(ue,{"data-invalid":d.isError||void 0,children:[(0,W.jsx)(se,{htmlFor:`ios-device-name`,children:`This iPhone's name`}),(0,W.jsx)(i,{autoComplete:`off`,className:`h-11 sm:h-8`,id:`ios-device-name`,maxLength:100,onChange:e=>g(e.target.value),placeholder:`Kim's iPhone`,value:h}),(0,W.jsx)(ce,{children:`A maintainer approves it, and it joins the next ad hoc build.`}),(0,W.jsx)(le,{children:d.isError?`The request didn't go through. Check this iPhone again, then try once more.`:null})]}),(0,W.jsxs)(u,{className:G,disabled:C===``||d.isPending,type:`submit`,children:[d.isPending?(0,W.jsx)(te,{className:`animate-spin motion-reduce:animate-none`,"data-icon":`inline-start`}):(0,W.jsx)(ee,{"data-icon":`inline-start`}),`Request access`]}),d.isError?(0,W.jsx)(Q,{again:!0,build:t}):null]})}function Pe({build:t,device:n}){X(n,V(b(window.location,t.id),n.receipt,n.ios&&n.udid===null).data?.udid);let{udid:r}=n,i=de(t.id,r),{refetch:a}=i,o=ke(i.dataUpdatedAt,i.data?.status===`installable`&&i.data.device===`included`);if((0,O.useEffect)(()=>{o&&a()},[o,a]),i.isPending)return(0,W.jsx)(e,{"aria-label":`Reading this IPA`,className:`h-11 w-full`});let s=i.data;if(s===void 0||s.status===`unavailable`)return(0,W.jsxs)(E,{children:[(0,W.jsx)(D,{}),(0,W.jsx)(w,{children:`Installation details unavailable`}),(0,W.jsx)(T,{children:`The Console couldn't read this IPA from storage in parts, which takes an HTTPS download link that answers Range requests. Other ways to install still work from a computer.`})]});if(s.status===`store`)return(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t.is_sandbox?`This IPA is an App Store export, which doesn't install from this page.`:`This IPA is an App Store export, which installs through TestFlight, not from this page.`});if(s.status===`expired`)return(0,W.jsxs)(E,{variant:`destructive`,children:[(0,W.jsx)(D,{}),(0,W.jsx)(w,{children:`This build's profile has expired`}),(0,W.jsxs)(T,{children:[`It expired on `,(0,k.default)(s.expiresAt).format(`YYYY-MM-DD`),`. A maintainer rebuilds it to install again.`]})]});let c=s.link.status===`issued`?s.link.token:null;return s.link.status===`no-secret`?(0,W.jsxs)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:[`Set `,s.link.secretName,` on the Console to install from this page.`]}):c===null?null:s.device===`included`?(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,W.jsx)(`p`,{className:`text-sm font-medium`,children:`In this build`}),o?(0,W.jsx)(Z,{fetching:i.isFetching,onRenew:()=>void a()}):(0,W.jsx)(Ae,{build:t,token:c}),(0,W.jsx)(je,{})]}):s.device===`not-included`?(0,W.jsx)(Ne,{build:t,device:n,registry:s.registry,newerBuild:s.newerBuild,canApprove:s.canApprove,registryReadAt:i.dataUpdatedAt}):(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,W.jsx)(`p`,{className:`text-sm font-medium`,children:`Check this iPhone first`}),(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`iOS installs this IPA only on the devices it lists. A profile reads this iPhone's ID, then Safari comes back here.`})]}),(0,W.jsx)(Q,{build:t})]})}export{H as _,De as a,U as c,be as d,ye as f,Se as g,Ce as h,X as i,xe as l,N as m,Pe as n,we as o,V as p,K as r,A as s,$ as t,M as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,Di as t,Vi as n,_r as r,gr as i,vr as a}from"./sidebar-UnsNYOry.js";import{t as o}from"./link-D95E0fwF.js";import{a as s}from"./TargetDisplay-
|
|
1
|
+
import{$ as e,Di as t,Vi as n,_r as r,gr as i,vr as a}from"./sidebar-UnsNYOry.js";import{t as o}from"./link-D95E0fwF.js";import{a as s}from"./TargetDisplay-CiU6ZsDl.js";import{t as c}from"./chevron-right-CuYrscDY.js";import{n as l,t as u}from"./relativeTime-D_aYJRc7.js";import{a as d,n as f,o as p,r as m,t as h}from"./table-r_sYqKTQ.js";var g=t();function _({children:e,className:t}){return(0,g.jsx)(`div`,{className:a(`min-h-0 min-w-0 flex-1 overflow-hidden rounded-lg border bg-card text-card-foreground shadow-sm [&_[data-slot=table-container]]:h-full [&_[data-slot=table-container]]:overflow-auto`,t),children:e})}function v({header:e,children:t,className:n,rowGroups:r=!1,...i}){return(0,g.jsxs)(h,{className:a(`min-w-max`,n),...i,children:[(0,g.jsx)(d,{className:`bg-muted/40`,children:(0,g.jsx)(p,{className:`border-b border-border/60 hover:bg-transparent [&>th]:h-10 [&>th]:text-xs [&>th]:font-semibold [&>th]:uppercase [&>th]:text-muted-foreground`,children:e})}),r?t:(0,g.jsx)(f,{children:t})]})}function y({className:e,...t}){return(0,g.jsx)(f,{className:a(`[&_tr:last-child]:border-b`,e),...t})}var b=e=>t=>{t.target instanceof Element&&t.target.closest(`button, a, input, select, textarea`)||e()};function x({className:e,onOpen:t,...n}){return(0,g.jsx)(p,{onClick:b(t),onKeyDown:e=>{e.target!==e.currentTarget||e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),t())},tabIndex:0,className:a(`cursor-pointer transition-[background-color,filter] hover:bg-muted/10 focus-within:bg-muted/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring motion-reduce:transition-none data-[state=selected]:bg-muted/15 [&>td]:py-3`,e),...n})}function S({columns:t,label:n}){return Array.from({length:7},(r,i)=>(0,g.jsx)(p,{children:(0,g.jsxs)(m,{colSpan:t,children:[i===0&&n?(0,g.jsx)(`span`,{className:`sr-only`,children:n}):null,(0,g.jsx)(e,{className:`h-8 w-full`})]})},i))}function C({columns:e,className:t,children:n}){return(0,g.jsx)(p,{children:(0,g.jsx)(m,{className:a(`h-44 text-center text-muted-foreground`,t),colSpan:e,children:n})})}function w({icon:e,title:t,children:n}){return(0,g.jsxs)(`div`,{className:`mx-auto flex max-w-sm flex-col items-center gap-2 whitespace-normal text-center text-sm text-muted-foreground`,children:[(0,g.jsx)(e,{"aria-hidden":`true`,className:`size-5`}),(0,g.jsx)(`p`,{className:`font-medium text-foreground`,children:t}),n]})}function T({children:e}){return(0,g.jsx)(`div`,{className:`p-8`,children:e})}function E({label:t}){return(0,g.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[t?(0,g.jsx)(`span`,{className:`sr-only`,children:t}):null,Array.from({length:5},(t,n)=>(0,g.jsx)(e,{className:`h-44 w-full`},n))]})}function D({className:e,...t}){return(0,g.jsx)(`article`,{className:a(`flex cursor-pointer touch-manipulation flex-col gap-4 border-b p-4 transition-[background-color,filter] last:border-b-0 hover:bg-muted/10 active:bg-muted/20 motion-reduce:transition-none data-[state=selected]:bg-muted/15`,e),...t})}function O({count:e,noun:t,folded:n,label:a,pending:l=!1,newest:u,previous:d,next:f}){return(0,g.jsxs)(`nav`,{"aria-label":a,className:`flex flex-col gap-3 px-2 sm:flex-row sm:items-center sm:justify-between`,children:[(0,g.jsxs)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:[(0,g.jsx)(`span`,{className:`text-foreground`,children:e}),` `,e===1?t[0]:t[1],`, newest first`,n===void 0||n.count===0?null:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{"aria-hidden":`true`,children:` · `}),(0,g.jsx)(`span`,{className:`sr-only`,children:`, `}),(0,g.jsxs)(`span`,{className:`text-foreground`,children:[n.count,n.more?`+`:``]}),` `,n.label,` folded`]})]}),(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 sm:justify-end`,children:[u&&!l?(0,g.jsx)(o,{className:r({className:`h-11 flex-1 px-3 text-xs sm:h-8 sm:flex-none`,size:`sm`,variant:`ghost`}),search:u.search,to:u.to,children:`Newest`}):null,d&&!l?(0,g.jsxs)(o,{className:r({className:`h-11 flex-1 px-3 text-xs sm:h-8 sm:flex-none`,size:`sm`,variant:`outline`}),search:d.search,to:d.to,children:[(0,g.jsx)(s,{"data-icon":`inline-start`}),`Previous`]}):(0,g.jsxs)(i,{className:`h-11 flex-1 px-3 text-xs sm:h-8 sm:flex-none`,disabled:!0,size:`sm`,variant:`outline`,children:[(0,g.jsx)(s,{"data-icon":`inline-start`}),`Previous`]}),f&&!l?(0,g.jsxs)(o,{className:r({className:`h-11 flex-1 px-3 text-xs sm:h-8 sm:flex-none`,size:`sm`,variant:`outline`}),search:f.search,to:f.to,children:[`Next`,(0,g.jsx)(c,{"data-icon":`inline-end`})]}):(0,g.jsxs)(i,{className:`h-11 flex-1 px-3 text-xs sm:h-8 sm:flex-none`,disabled:!0,size:`sm`,variant:`outline`,children:[`Next`,(0,g.jsx)(c,{"data-icon":`inline-end`})]})]})]})}var k=n(l(),1),A=n(u(),1);k.default.extend(A.default);function j({ms:e,withDate:t=!1}){let n=(0,k.default)(e),r=n.format(`YYYY-MM-DD HH:mm:ss`);return(0,g.jsxs)(`time`,{className:`flex flex-col whitespace-nowrap tabular-nums`,dateTime:n.toISOString(),title:r,children:[(0,g.jsx)(`span`,{children:n.fromNow()}),t?(0,g.jsx)(`span`,{className:`text-muted-foreground`,children:r}):null]})}export{v as a,_ as c,x as d,S as f,T as i,C as l,D as n,y as o,b as p,E as r,w as s,j as t,O as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,Di as t,Ri as n,Vi as r,at as i,gr as a,nt as o,rt as s}from"./sidebar-UnsNYOry.js";import{t as c}from"./chevron-right-CuYrscDY.js";import{o as l,r as u}from"./table-r_sYqKTQ.js";import{o as d}from"./RelativeTime-
|
|
1
|
+
import{$ as e,Di as t,Ri as n,Vi as r,at as i,gr as a,nt as o,rt as s}from"./sidebar-UnsNYOry.js";import{t as c}from"./chevron-right-CuYrscDY.js";import{o as l,r as u}from"./table-r_sYqKTQ.js";import{o as d}from"./RelativeTime-BvgGWfXM.js";var f=r(n(),1),p=t(),m=e=>e.from??``,h=(e,t)=>`${e.count}${e.more?`+`:``} ${e.count===1&&!e.more?t.one:t.other}`,g=e=>{let t=[];for(let n of e){let e=t.at(-1);n.kind===`fold`?t.push({kind:`fold`,fold:n}):e?.kind===`rows`?e.rows.push(n.row):t.push({kind:`rows`,rows:[n.row]})}return t};function _(){let[e,t]=(0,f.useState)(()=>new Set);return{isOpen:t=>e.has(t),set:(e,n)=>t(t=>{if(t.has(e)===n)return t;let r=new Set(t);return n?r.add(e):r.delete(e),r})}}function v({label:e,open:t,onOpenChange:n,panelId:r}){return(0,p.jsxs)(`button`,{"aria-controls":r,"aria-expanded":t,className:`group/fold flex min-h-11 w-full items-center gap-2 px-4 text-left text-xs font-medium text-muted-foreground transition-colors hover:bg-muted/30 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset motion-reduce:transition-none sm:min-h-9 sm:px-3`,onClick:()=>n(!t),type:`button`,children:[(0,p.jsx)(c,{"aria-hidden":`true`,className:`size-3.5 shrink-0 transition-transform group-aria-expanded/fold:rotate-90 motion-reduce:transition-none`}),e]})}function y({columns:e,children:t,...n}){return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(d,{children:(0,p.jsx)(l,{className:`bg-muted/20 hover:bg-muted/20`,children:(0,p.jsx)(u,{className:`p-0`,colSpan:e,children:(0,p.jsx)(v,{...n})})})}),(0,p.jsx)(d,{hidden:!n.open,id:n.panelId,children:n.open?t:null})]})}function b({children:e,inList:t=!1,...n}){return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`div`,{className:`border-b bg-muted/20`,role:t?`listitem`:void 0,children:(0,p.jsx)(v,{...n})}),(0,p.jsx)(`div`,{hidden:!n.open,id:n.panelId,children:n.open?e:null})]})}function x({state:t,label:n,onMore:r,onRetry:i,columns:o}){let s=t===`loading`?(0,p.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-2 p-3`,children:[(0,p.jsx)(`span`,{className:`sr-only`,children:n}),(0,p.jsx)(e,{className:`h-8 w-full`}),(0,p.jsx)(e,{className:`h-8 w-full`})]}):(0,p.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-2 sm:px-3`,children:[t===`error`?(0,p.jsxs)(`span`,{className:`text-xs text-muted-foreground`,role:`status`,children:[n,` couldn't be loaded.`]}):null,(0,p.jsx)(a,{className:`h-11 px-3 text-xs sm:h-8`,onClick:t===`error`?i:r,size:`sm`,variant:`ghost`,children:t===`error`?`Retry`:`Show more`})]});return o===void 0?(0,p.jsx)(`div`,{className:`border-b`,children:s}):(0,p.jsx)(l,{className:`hover:bg-transparent`,children:(0,p.jsx)(u,{className:`p-0`,colSpan:o,children:s})})}var S=e=>{let t=0,n=!1;for(let r of e)r.kind===`fold`&&(t+=r.count,n||=r.more);return{count:t,more:n}};function C({icon:e,children:t,label:n,reason:r}){let a=(0,f.useId)(),[c,l]=(0,f.useState)(!1);return(0,p.jsxs)(o,{onOpenChange:l,open:c,triggerId:a,children:[(0,p.jsxs)(i,{"aria-describedby":c?`${a}-reason`:void 0,"aria-label":n,className:`relative inline-flex shrink-0 items-center gap-1 rounded-sm text-xs text-muted-foreground transition-colors after:absolute after:-inset-x-2 after:-inset-y-3.5 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none motion-reduce:transition-none sm:after:hidden`,closeOnClick:!1,id:a,onClick:()=>l(e=>!e),type:`button`,children:[(0,p.jsx)(e,{"aria-hidden":`true`,className:`size-3.5`}),t]}),(0,p.jsx)(s,{className:`max-w-64`,id:`${a}-reason`,role:`tooltip`,side:`bottom`,children:r})]})}export{m as a,g as c,x as i,_ as l,b as n,h as o,y as r,S as s,C as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Di as e,Vr as t,gr as n}from"./sidebar-UnsNYOry.js";import{t as r}from"./copy-BxI24-g-.js";import{t as i}from"./key-round-B-vaAsR7.js";import{
|
|
1
|
+
import{Di as e,Vr as t,gr as n}from"./sidebar-UnsNYOry.js";import{t as r}from"./copy-BxI24-g-.js";import{t as i}from"./key-round-B-vaAsR7.js";import{O as a}from"./native-builds-hOC_V15R.js";import{n as o}from"./dist-BEIz5ojx.js";import{t as s}from"./HashValueDisplay-DKziWjEg.js";var c=t(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),l=t(`fingerprint-pattern`,[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`,key:`1nerag`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`,key:`o46ks0`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`,key:`ptglia`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`,key:`ydlgp0`}],[`path`,{d:`M2 16h.01`,key:`1gqxmh`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`,key:`drycrb`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`,key:`1tidbn`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`,key:`13wd9y`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`,key:`1fr1j5`}]]),u=e();function d({label:e,value:t,wrap:i=!1}){let a=async()=>{try{await navigator.clipboard.writeText(t),o.success(`Copied to clipboard`)}catch{o.error(`Could not copy ${e}`)}};return(0,u.jsxs)(`div`,{className:`flex w-full min-w-0 items-center gap-2 rounded-md border bg-muted/40 py-1 pr-1 pl-3`,children:[(0,u.jsx)(`code`,{className:i?`min-w-0 flex-1 text-left font-mono text-xs whitespace-normal sm:whitespace-nowrap`:`min-w-0 flex-1 overflow-x-auto text-left font-mono text-xs whitespace-nowrap`,children:t}),(0,u.jsx)(n,{"aria-label":`Copy ${e}`,className:`size-11 sm:size-7`,onClick:()=>void a(),size:`icon-sm`,variant:`ghost`,children:(0,u.jsx)(r,{"aria-hidden":`true`})})]})}function f({icon:e,value:t,display:n}){return(0,u.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,u.jsx)(e,{className:`size-4 shrink-0 text-muted-foreground`}),(0,u.jsx)(s,{display:n,maxLength:12,value:t})]})}function p(){return(0,u.jsx)(`span`,{className:`text-muted-foreground`,children:`-`})}function m({value:e}){return(0,u.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,u.jsx)(a,{className:`size-4 shrink-0 text-muted-foreground`}),(0,u.jsx)(`span`,{className:`font-medium`,children:e})]})}function h({appVersion:e,fingerprintHash:t,nativeAppVersion:n}){if(e)return(0,u.jsx)(m,{value:e});if(t){let e=(0,u.jsx)(f,{icon:l,value:t});return n?(0,u.jsxs)(`span`,{className:`flex flex-col items-start gap-3 sm:gap-1`,"data-target-display":``,children:[(0,u.jsxs)(`span`,{title:`The app version this build reports`,children:[(0,u.jsx)(`span`,{className:`sr-only`,children:`App version `}),(0,u.jsx)(m,{value:n})]}),e]}):e}return(0,u.jsx)(p,{})}function g({value:e}){return e?(0,u.jsx)(f,{display:e.replace(/^nbk1:/,``),icon:i,value:e}):(0,u.jsx)(p,{})}export{c as a,d as i,p as n,h as r,g as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/api-keys-DPuPM7ag.js","assets/ConsoleFeatureUnavailable-C0iDIboF.js","assets/sidebar-UnsNYOry.js","assets/console-features-api-De6tXQnd.js","assets/arrow-up-right-BPRe5soE.js","assets/NotFoundPage-CijSy63W.js","assets/link-D95E0fwF.js","assets/empty-DpSPWLc2.js","assets/api-keys-C_u_ZmPS.js","assets/alert-dialog-Dihztkem.js","assets/useMutation-BWX97JX2.js","assets/check-Dz_5aNwx.js","assets/clipboard-D8uvj6FN.js","assets/key-round-B-vaAsR7.js","assets/loader-circle-C26cZDSM.js","assets/plus-Bp6IqwOH.js","assets/refresh-cw-CpCxPYma.js","assets/badge-D4Tiwei-.js","assets/dist-BEIz5ojx.js","assets/card-BfeRlTvj.js","assets/dialog-e9AF5T6h.js","assets/field-PkdRPD3A.js","assets/table-r_sYqKTQ.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{$r as e,Ci as t,Di as n,Hr as r,Ii as i,Li as a,Mi as o,Oi as s,Pi as c,Ri as l,Si as u,Vi as d,Vr as f,_i as p,_r as m,a as h,ai as g,bi as _,c as v,ci as y,d as b,f as x,fi as ee,gr as te,hi as ne,i as re,ii as ie,it as ae,l as oe,li as se,m as ce,mi as S,n as le,o as ue,oi as de,p as C,pi as w,r as fe,s as pe,si as me,t as he,u as T,ui as E,wi as ge,xi as _e,zi as ve,zr as ye}from"./sidebar-UnsNYOry.js";import{C as be,a as xe,b as Se,c as Ce,i as we,l as Te,o as Ee,p as De,r as Oe,s as ke,t as Ae,u as je,v as Me,x as Ne,y as Pe}from"./link-D95E0fwF.js";import{a as Fe,c as D,i as Ie,l as Le,r as Re,s as ze,t as Be,u as Ve}from"./preload-helper-52zhjEsw.js";import{n as He}from"./useMutation-BWX97JX2.js";import{l as Ue,r as We,t as Ge}from"./console-features-api-De6tXQnd.js";import{t as Ke}from"./remote-config-CD50k2u7.js";import{t as qe}from"./arrow-up-right-BPRe5soE.js";import{o as Je,t as Ye}from"./routes-
|
|
2
|
+
import{$r as e,Ci as t,Di as n,Hr as r,Ii as i,Li as a,Mi as o,Oi as s,Pi as c,Ri as l,Si as u,Vi as d,Vr as f,_i as p,_r as m,a as h,ai as g,bi as _,c as v,ci as y,d as b,f as x,fi as ee,gr as te,hi as ne,i as re,ii as ie,it as ae,l as oe,li as se,m as ce,mi as S,n as le,o as ue,oi as de,p as C,pi as w,r as fe,s as pe,si as me,t as he,u as T,ui as E,wi as ge,xi as _e,zi as ve,zr as ye}from"./sidebar-UnsNYOry.js";import{C as be,a as xe,b as Se,c as Ce,i as we,l as Te,o as Ee,p as De,r as Oe,s as ke,t as Ae,u as je,v as Me,x as Ne,y as Pe}from"./link-D95E0fwF.js";import{a as Fe,c as D,i as Ie,l as Le,r as Re,s as ze,t as Be,u as Ve}from"./preload-helper-52zhjEsw.js";import{n as He}from"./useMutation-BWX97JX2.js";import{l as Ue,r as We,t as Ge}from"./console-features-api-De6tXQnd.js";import{t as Ke}from"./remote-config-CD50k2u7.js";import{t as qe}from"./arrow-up-right-BPRe5soE.js";import{o as Je,t as Ye}from"./routes-BMbT1Qdm.js";import{b as Xe}from"./insights-api-CXXCRZhF.js";import{n as Ze,t as Qe}from"./native-builds_._buildId-CAnF7xPa.js";import{t as $e}from"./copy-BxI24-g-.js";import{a as et}from"./-native-builds-search-BvCftqF2.js";import{t as tt}from"./loader-circle-C26cZDSM.js";import{O as nt,c as rt}from"./native-builds-hOC_V15R.js";import{t as it}from"./rotate-cw-Bn3fIWmY.js";import{o as at}from"./badge-D4Tiwei-.js";import{n as ot,t as st}from"./dist-BEIz5ojx.js";import{o as ct,r as lt}from"./IosInstall-CyBFeLGv.js";import{t as ut}from"./NotFoundPage-CijSy63W.js";import{i as dt,n as ft,o as pt,r as mt,t as ht}from"./empty-DpSPWLc2.js";import{t as gt}from"./insights-CpnFoyo5.js";import{t as _t}from"./installations-DYT2mSjX.js";import{t as vt}from"./native-builds-CkaoQZVh.js";import{t as yt}from"./insights_.distribution-Dd2mYz8D.js";import{t as bt}from"./native-builds_.devices-D-8DVNRB.js";var xt=ve((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,oe());else{var t=n(l);t!==null&&S(x,t.startTime-e)}}var ee=!1,te=-1,ne=5,re=-1;function ie(){return g?!0:!(e.unstable_now()-re<ne)}function ae(){if(g=!1,ee){var t=e.unstable_now();re=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(te),te=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ie());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&S(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?oe():ee=!1}}}var oe;if(typeof y==`function`)oe=function(){y(ae)};else if(typeof MessageChannel<`u`){var se=new MessageChannel,ce=se.port2;se.port1.onmessage=ae,oe=function(){ce.postMessage(null)}}else oe=function(){_(ae,0)};function S(t,n){te=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ne=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(te),te=-1):h=!0,S(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,oe()))),r},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),St=ve(((e,t)=>{t.exports=xt()})),Ct=ve((e=>{var t=St(),n=l(),r=a();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(s(e)!==e)throw Error(i(188))}function f(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return d(a),e;if(o===r)return d(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var c=!1,l=a.child;l;){if(l===n){c=!0,n=a,r=o;break}if(l===r){c=!0,r=a,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=a;break}if(l===r){c=!0,r=o,n=a;break}l=l.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,h=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),_=Symbol.for(`react.portal`),v=Symbol.for(`react.fragment`),y=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),ee=Symbol.for(`react.context`),te=Symbol.for(`react.forward_ref`),ne=Symbol.for(`react.suspense`),re=Symbol.for(`react.suspense_list`),ie=Symbol.for(`react.memo`),ae=Symbol.for(`react.lazy`),oe=Symbol.for(`react.activity`),se=Symbol.for(`react.memo_cache_sentinel`),ce=Symbol.iterator;function S(e){return typeof e!=`object`||!e?null:(e=ce&&e[ce]||e[`@@iterator`],typeof e==`function`?e:null)}var le=Symbol.for(`react.client.reference`);function ue(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case v:return`Fragment`;case b:return`Profiler`;case y:return`StrictMode`;case ne:return`Suspense`;case re:return`SuspenseList`;case oe:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case _:return`Portal`;case ee:return e.displayName||`Context`;case x:return(e._context.displayName||`Context`)+`.Consumer`;case te:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ie:return t=e.displayName||null,t===null?ue(e.type)||`Memo`:t;case ae:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}var de=Array.isArray,C=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,w=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},pe=[],me=-1;function he(e){return{current:e}}function T(e){0>me||(e.current=pe[me],pe[me]=null,me--)}function E(e,t){me++,pe[me]=e.current,e.current=t}var ge=he(null),_e=he(null),ve=he(null),ye=he(null);function be(e,t){switch(E(ve,t),E(_e,e),E(ge,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}T(ge),E(ge,e)}function xe(){T(ge),T(_e),T(ve)}function Se(e){e.memoizedState!==null&&E(ye,e);var t=ge.current,n=Hd(t,e.type);t!==n&&(E(_e,e),E(ge,n))}function Ce(e){_e.current===e&&(T(ge),T(_e)),ye.current===e&&(T(ye),Qf._currentValue=fe)}var we,Te;function Ee(e){if(we===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);we=t&&t[1]||``,Te=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+we+e+Te}var De=!1;function Oe(e,t){if(!e||De)return``;De=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
5
|
`),l=s.split(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-builds-
|
|
2
|
-
import{i as e,r as t,t as n}from"./preload-helper-52zhjEsw.js";import{r}from"./-native-builds-search-BvCftqF2.js";var i=e(`/native-builds`)({component:t(()=>n(()=>import(`./native-builds-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-builds-CtqBGw8a.js","assets/sidebar-UnsNYOry.js","assets/preload-helper-52zhjEsw.js","assets/link-D95E0fwF.js","assets/select-BAd2hAoW.js","assets/useCompositeListItem-B9ONn9qn.js","assets/check-Dz_5aNwx.js","assets/arrow-up-right-BPRe5soE.js","assets/TargetDisplay-CiU6ZsDl.js","assets/copy-BxI24-g-.js","assets/key-round-B-vaAsR7.js","assets/native-builds-hOC_V15R.js","assets/uuidv7-DgXZ1zRR.js","assets/dist-BEIz5ojx.js","assets/HashValueDisplay-DKziWjEg.js","assets/download-ekENI2Sw.js","assets/-native-builds-search-BvCftqF2.js","assets/history-DwdBLzJP.js","assets/refresh-cw-CpCxPYma.js","assets/badge-D4Tiwei-.js","assets/ChannelBadge-Do-lWsLM.js","assets/RelativeTime-BvgGWfXM.js","assets/relativeTime-D_aYJRc7.js","assets/chevron-right-CuYrscDY.js","assets/table-r_sYqKTQ.js","assets/RowReason-7dIWPxhy.js","assets/PlatformIcon-Kq3q98tU.js","assets/NativeBuildsNav-D3FIlSu0.js","assets/tabs-BBfg-c0h.js","assets/SandboxBadge-BPf2uve4.js","assets/dialog-e9AF5T6h.js","assets/api-B1z_XXrQ.js","assets/useMutation-BWX97JX2.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e,r as t,t as n}from"./preload-helper-52zhjEsw.js";import{r}from"./-native-builds-search-BvCftqF2.js";var i=e(`/native-builds`)({component:t(()=>n(()=>import(`./native-builds-CtqBGw8a.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])),`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-DzSkf5yP.js";import{a as p,i as m,n as ee,o as te,r as ne,t as re}from"./select-BAd2hAoW.js";import{t as ie}from"./download-ekENI2Sw.js";import{a as h}from"./-native-builds-search-BvCftqF2.js";import{t as ae}from"./history-DwdBLzJP.js";import{S as g,_ as oe,b as se,g as ce,h as _,m as v,u as y}from"./native-builds-BOSmoLed.js";import{t as b}from"./refresh-cw-CpCxPYma.js";import{a as le,i as ue,n as de,o as fe,r as pe,t as me}from"./badge-D4Tiwei-.js";import{t as he}from"./uuidv7-DgXZ1zRR.js";import{g as ge,i as _e,p as ve}from"./api-B1z_XXrQ.js";import{t as x}from"./native-builds-CXDwW54k.js";import{n as ye,t as be}from"./PlatformIcon-Kq3q98tU.js";import{a as xe,n as Se,o as Ce,r as we,s as Te,t as Ee}from"./dialog-e9AF5T6h.js";import{i as S,r as C}from"./table-r_sYqKTQ.js";import{t as De}from"./ChannelBadge-Do-lWsLM.js";import{a as w,c as T,d as E,f as Oe,i as ke,l as Ae,n as je,o as D,p as Me,r as Ne,s as O,t as k,u as Pe}from"./RelativeTime-CP7nosYx.js";import{a as A,c as Fe,i as j,l as Ie,n as Le,o as Re,r as ze,s as Be,t as Ve}from"./RowReason-D7TZ2xwW.js";import{t as M}from"./NativeBuildsNav-D3FIlSu0.js";import{i as He,n as Ue,r as N,t as P}from"./SandboxBadge-BPf2uve4.js";var We=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`}]]),F=e(),I=`npx hot-updater native-build import <file>`,L=`https://hot-updater.dev/docs/guides/native-build#import-a-build-made-elsewhere`;function Ge(){return(0,F.jsxs)(Ee,{children:[(0,F.jsxs)(Te,{render:(0,F.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,F.jsx)(We,{"data-icon":`inline-start`}),(0,F.jsx)(`span`,{className:`hidden sm:inline`,children:`Import a build`})]}),(0,F.jsxs)(Se,{className:`sm:max-w-lg`,children:[(0,F.jsxs)(xe,{children:[(0,F.jsx)(Ce,{children:`Import a build`}),(0,F.jsx)(we,{children:`Track an .ipa, .aab, .apk or .app built elsewhere as a patch base.`})]}),(0,F.jsx)(l,{label:`the import command`,value:I,wrap:!0}),(0,F.jsxs)(`a`,{className:n({className:`min-h-11 w-full sm:min-h-8 sm:w-fit`,variant:`outline`}),href:L,rel:`noreferrer`,target:`_blank`,children:[`Import guide`,(0,F.jsx)(c,{"data-icon":`inline-end`})]})]})]})}var Ke={"app-store":`App Store`,"ad-hoc":`ad hoc`,development:`development`,enterprise:`enterprise`},R=e=>{let t=v[e.artifact_kind].label,n=e.submitted_to===null?e.artifact_kind===`ipa`&&e.export_method!==null?`${Ke[e.export_method]} ${t}`:t:`${He[e.submitted_to]} build`;return e.is_sandbox?`sandbox ${n}`:n},qe=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=se(e);return{sentence:`A newer ${R(e)} exists${t===null?`.`:`: ${t}`}`,label:`Older: a newer ${R(e)} exists${t===null?``:`, ${t}`}`}};function z({newer:e}){let t=qe(e);return(0,F.jsx)(Ve,{icon:ae,label:t.label,reason:t.sentence,children:`Older`})}var Je=`https://hot-updater.dev/docs/guides/native-build#how-a-build-is-tracked`,B=10,V=e=>e===void 0?{}:{channel:e},Ye={one:`older build`,other:`older builds`};function Xe({channel:e,paged:t,folded:i,onClearChannel:a}){return t||i?(0,F.jsx)(O,{icon:h,title:i?`Each build here has a newer one`:`No more native builds`,children:(0,F.jsx)(o,{className:n({className:`mt-1 min-h-11 sm:min-h-8`,variant:`outline`}),search:V(e),to:`/native-builds`,children:`Show the newest builds`})}):e===void 0?(0,F.jsxs)(O,{icon:h,title:`No native builds`,children:[(0,F.jsxs)(`p`,{children:[`Build one with`,` `,(0,F.jsx)(`code`,{className:`font-mono text-xs`,children:`native-build android`}),` or`,` `,(0,F.jsx)(`code`,{className:`font-mono text-xs`,children:`native-build ios`}),`, or import one built elsewhere:`]}),(0,F.jsx)(`div`,{className:`w-full text-left`,children:(0,F.jsx)(l,{label:`the import command`,value:I,wrap:!0})}),(0,F.jsxs)(`a`,{className:n({className:`mt-1 min-h-11 sm:min-h-8`,variant:`outline`}),href:Je,rel:`noreferrer`,target:`_blank`,children:[`Native build guide`,(0,F.jsx)(c,{"data-icon":`inline-end`})]}),(0,F.jsxs)(`a`,{className:n({className:`min-h-11 sm:min-h-8`,variant:`outline`}),href:L,rel:`noreferrer`,target:`_blank`,children:[`Import guide`,(0,F.jsx)(c,{"data-icon":`inline-end`})]})]}):(0,F.jsxs)(O,{icon:h,title:(0,F.jsxs)(F.Fragment,{children:[`No native build embeds `,(0,F.jsx)(`span`,{translate:`no`,children:e})]}),children:[(0,F.jsx)(`p`,{children:`A build embeds the channel it was built on. Build one on this channel, or list every channel's builds.`}),(0,F.jsx)(r,{className:`mt-1 min-h-11 sm:min-h-8`,onClick:a,variant:`outline`,children:`Show all channels`})]})}var H=e=>`${g(e.platform)} ${v[e.artifact_kind].label}`;function U({build:e}){return(0,F.jsx)(o,{"aria-label":H(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:v[e.artifact_kind].label})}function W({build:e,inTable:t=!1,older:n=!1,newer:r}){return t?(0,F.jsxs)(`span`,{className:`flex max-w-24 flex-wrap items-center gap-x-1.5 gap-y-1`,children:[(0,F.jsx)(U,{build:e}),(0,F.jsx)(P,{build:e}),n?(0,F.jsx)(z,{newer:r}):null]}):(0,F.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-1`,children:[(0,F.jsx)(U,{build:e}),(0,F.jsx)(P,{build:e})]})}function G({channel:e,onChannel:t}){return(0,F.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,F.jsx)(De,{channel:e,className:`block max-w-32 truncate`})})}function Ze({build:e}){return!N(e)&&!e.is_store_build?(0,F.jsx)(u,{}):(0,F.jsx)(K,{build:e,className:`flex flex-col items-start gap-1`})}function K({build:e,className:t}){return(0,F.jsxs)(`span`,{className:t,children:[(0,F.jsx)(Ue,{build:e}),e.is_store_build?(0,F.jsx)(me,{className:`px-1.5`,variant:`muted`,children:`Store build`}):null]})}function q({build:e}){return(0,F.jsxs)(`a`,{"aria-label":`Download ${oe(e)}`,className:n({className:`min-h-11 sm:min-h-8`,size:`sm`,variant:`outline`}),download:!0,href:ce(e.id),children:[(0,F.jsx)(ie,{"data-icon":`inline-start`}),`Download`]})}function Qe({build:e}){return e.build_number?(0,F.jsx)(`span`,{className:`font-mono tabular-nums`,translate:`no`,children:e.build_number}):(0,F.jsx)(u,{})}var J=e=>he(e.id);function Y({build:e,older:t=!1,newer:n,onChannel:r}){let i=s(),a=_(e);return(0,F.jsxs)(E,{"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,F.jsx)(C,{children:(0,F.jsx)(W,{build:e,inTable:!0,newer:n,older:t})}),(0,F.jsx)(C,{children:(0,F.jsx)(G,{channel:a,onChannel:r})}),(0,F.jsx)(C,{className:`whitespace-nowrap`,children:(0,F.jsx)(ye,{platform:e.platform})}),(0,F.jsx)(C,{children:(0,F.jsx)(Qe,{build:e})}),(0,F.jsx)(C,{children:(0,F.jsx)(d,{appVersion:e.app_version,fingerprintHash:e.fingerprint_hash,nativeAppVersion:e.native_app_version})}),(0,F.jsx)(C,{children:(0,F.jsx)(f,{value:e.build_key})}),(0,F.jsx)(C,{children:(0,F.jsx)(Ze,{build:e})}),(0,F.jsx)(C,{className:`whitespace-nowrap text-muted-foreground tabular-nums`,children:y(e.byte_size)}),(0,F.jsx)(C,{className:`text-xs text-muted-foreground`,children:(0,F.jsx)(k,{ms:J(e)})}),(0,F.jsx)(C,{className:`text-right`,children:(0,F.jsx)(q,{build:e})})]})}function X({build:e,older:t=!1,newer:n,onChannel:r}){let i=s(),a=_(e),o=N(e)||e.is_store_build;return(0,F.jsxs)(je,{"aria-label":`Native build ${H(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:Me(()=>void i({to:`/native-builds/$buildId`,params:{buildId:e.id}})),children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,F.jsxs)(`div`,{className:`flex min-w-0 items-center gap-x-2.5`,children:[(0,F.jsx)(be,{className:`size-4 shrink-0 text-muted-foreground`,platform:e.platform}),(0,F.jsx)(W,{build:e}),t?(0,F.jsx)(z,{newer:n}):null]}),(0,F.jsx)(q,{build:e})]}),(0,F.jsx)(`div`,{className:`flex min-w-0`,children:(0,F.jsx)(G,{channel:a,onChannel:r})}),(0,F.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground`,children:[(0,F.jsx)(`span`,{className:`sr-only`,children:g(e.platform)}),e.build_number?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`span`,{translate:`no`,children:[`Build`,` `,(0,F.jsx)(`span`,{className:`font-mono tabular-nums text-foreground`,children:e.build_number})]}),(0,F.jsx)(`span`,{"aria-hidden":`true`,children:`·`})]}):null,(0,F.jsx)(`span`,{className:`tabular-nums`,children:y(e.byte_size)}),(0,F.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,F.jsx)(k,{ms:J(e)})]}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-end gap-x-4 gap-y-6 text-xs`,children:[(0,F.jsxs)(`span`,{className:`flex items-center`,children:[(0,F.jsx)(`span`,{className:`sr-only`,children:`Target `}),(0,F.jsx)(d,{appVersion:e.app_version,fingerprintHash:e.fingerprint_hash,nativeAppVersion:e.native_app_version})]}),e.build_key?(0,F.jsxs)(`span`,{className:`flex items-center`,children:[(0,F.jsx)(`span`,{className:`sr-only`,children:`Build key `}),(0,F.jsx)(f,{value:e.build_key})]}):null]}),o?(0,F.jsx)(K,{build:e,className:`flex flex-wrap items-center gap-1.5`}):null]})}function $e({fold:e,channel:t,isMobile:n,open:r,onOpenChange:i,onChannel:a}){let o=ve(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:B,d=o.isError?(0,F.jsx)(j,{columns:u,label:`Older builds`,onRetry:()=>void o.refetch(),state:`error`}):o.isPending||o.isFetchingNextPage?(0,F.jsx)(j,{columns:u,label:`Loading older builds`,state:`loading`}):o.hasNextPage?(0,F.jsx)(j,{columns:u,label:`Older builds`,onMore:()=>void o.fetchNextPage(),state:`more`}):null,f={label:Re(e,Ye),open:r,onOpenChange:i,panelId:`native-build-fold-${e.to}`};return n?(0,F.jsxs)(Le,{...f,inList:!0,children:[l.map(e=>(0,F.jsx)(`div`,{className:`border-b last:border-b-0`,role:`listitem`,children:(0,F.jsx)(X,{build:e,newer:c[e.id],older:!0,onChannel:a})},e.id)),d]}):(0,F.jsxs)(ze,{...f,columns:B,children:[l.map(e=>(0,F.jsx)(Y,{build:e,newer:c[e.id],older:!0,onChannel:a},e.id)),d]})}function et({builds:e,channel:t,paged:n,onChannel:a}){let o=i(),s=Ie(),c=e.data?.entries,{next:l,previous:u}=e.data??{},d=c?.filter(({kind:e})=>e===`row`).length??0;if(e.isError)return(0,F.jsxs)(de,{variant:`destructive`,children:[(0,F.jsx)(fe,{}),(0,F.jsx)(le,{children:`Native builds couldn't be loaded`}),(0,F.jsx)(ue,{children:`Check your connection and try again.`}),(0,F.jsx)(pe,{children:(0,F.jsxs)(r,{onClick:()=>void e.refetch(),size:`xs`,variant:`outline`,children:[(0,F.jsx)(b,{"data-icon":`inline-start`}),`Retry`]})})]});let f=(0,F.jsx)(Xe,{channel:t,folded:(c?.length??0)>0,onClearChannel:()=>a(void 0),paged:n}),p=e=>(0,F.jsx)($e,{channel:t,fold:e,isMobile:o,onChannel:a,onOpenChange:t=>s.set(A(e),t),open:s.isOpen(A(e))},`fold-${e.to}`);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(T,{children:o?(0,F.jsx)(`div`,{"aria-busy":e.isPlaceholderData,"aria-label":`Native builds`,className:`h-full overflow-y-auto aria-busy:opacity-60`,role:`list`,children:e.isLoading?(0,F.jsx)(Ne,{label:`Loading native builds`}):(0,F.jsxs)(F.Fragment,{children:[d===0?(0,F.jsx)(ke,{children:f}):null,c?.map(e=>e.kind===`fold`?p(e):(0,F.jsx)(`div`,{className:`border-b last:border-b-0`,role:`listitem`,children:(0,F.jsx)(X,{build:e.row,onChannel:a})},e.row.id))]})}):(0,F.jsx)(w,{"aria-busy":e.isPlaceholderData,"aria-label":`Native builds`,className:`aria-busy:opacity-60 [&_td]:px-1.5 [&_th]:px-1.5`,header:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(S,{children:`Artifact`}),(0,F.jsx)(S,{children:`Channel`}),(0,F.jsx)(S,{children:`Platform`}),(0,F.jsx)(S,{children:`Build`}),(0,F.jsx)(S,{children:`Target`}),(0,F.jsx)(S,{children:`Build key`}),(0,F.jsx)(S,{children:`Store`}),(0,F.jsx)(S,{children:`Size`}),(0,F.jsx)(S,{children:`Created`}),(0,F.jsx)(S,{className:`text-right`,children:(0,F.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]}),rowGroups:!0,children:e.isLoading?(0,F.jsx)(D,{children:(0,F.jsx)(Oe,{columns:B,label:`Loading native builds`})}):(0,F.jsxs)(F.Fragment,{children:[d===0?(0,F.jsx)(D,{children:(0,F.jsx)(Ae,{columns:B,children:f})}):null,Fe(c??[]).map(e=>e.kind===`fold`?p(e.fold):(0,F.jsx)(D,{children:e.rows.map(e=>(0,F.jsx)(Y,{build:e,onChannel:a},e.id))},`rows-${e.rows[0].id}`))]})})}),e.isLoading||c===void 0?null:(0,F.jsx)(Pe,{count:d,folded:{...Be(c),label:`older`},label:`Native build pages`,noun:[`build`,`builds`],pending:e.isPlaceholderData,newest:n?{search:V(t),to:`/native-builds`}:void 0,next:l===void 0?void 0:{search:{...V(t),before:l},to:`/native-builds`},previous:u===void 0?void 0:{search:{...V(t),...u},to:`/native-builds`}})]})}var Z=`all`,Q=`channel:`,$=e=>`${Q}${e}`;function tt({search:e,onSearchChange:t}){let{channel:n,before:i,after:o}=e,s=ge(e),c=_e(),l=c.data?.map(({name:e})=>e)??[],u=n===void 0||l.includes(n)?l:[n,...l],d=e=>t(e===void 0?{}:{channel:e});return(0,F.jsxs)(`div`,{className:`flex h-svh min-h-0 min-w-0 flex-col`,children:[(0,F.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,F.jsx)(a,{className:`-ml-1 size-11 lg:size-7`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,F.jsx)(h,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,F.jsx)(`h1`,{className:`text-sm font-medium`,children:`Native builds`})]}),(0,F.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,F.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,F.jsx)(M,{current:`builds`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(re,{items:[{label:`All channels`,value:Z},...u.map(e=>({label:e,value:$(e)}))],onOpenChange:e=>{e&&c.refetch()},onValueChange:e=>d(e?.startsWith(Q)?e.slice(8):void 0),value:n===void 0?Z:$(n),children:[(0,F.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,F.jsx)(te,{})}),(0,F.jsx)(ee,{children:(0,F.jsxs)(ne,{children:[(0,F.jsx)(m,{value:Z,children:`All channels`}),u.map(e=>(0,F.jsx)(m,{translate:`no`,value:$(e),children:e},e))]})})]}),(0,F.jsx)(`div`,{className:`ml-auto`,children:(0,F.jsx)(Ge,{})}),(0,F.jsx)(r,{"aria-label":`Refresh native builds`,className:`size-11 sm:size-7`,disabled:s.isLoading,onClick:()=>void s.refetch(),size:`icon-sm`,variant:`ghost`,children:(0,F.jsx)(b,{"aria-hidden":`true`})})]}),(0,F.jsx)(et,{builds:s,channel:n,onChannel:d,paged:i!==void 0||o!==void 0})]})]})}function nt(){let e=x.useSearch(),t=x.useNavigate();return(0,F.jsx)(tt,{onSearchChange:e=>void t({search:e}),search:e})}export{nt as component};
|
|
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-CiU6ZsDl.js";import{a as p,i as m,n as ee,o as te,r as ne,t as re}from"./select-BAd2hAoW.js";import{t as ie}from"./download-ekENI2Sw.js";import{a as h}from"./-native-builds-search-BvCftqF2.js";import{t as ae}from"./history-DwdBLzJP.js";import{C as g,_ as oe,d as _,g as v,h as y,v as se,x as ce}from"./native-builds-hOC_V15R.js";import{t as b}from"./refresh-cw-CpCxPYma.js";import{a as le,i as ue,n as de,o as fe,r as pe,t as me}from"./badge-D4Tiwei-.js";import{t as he}from"./uuidv7-DgXZ1zRR.js";import{g as ge,i as _e,p as ve}from"./api-B1z_XXrQ.js";import{t as x}from"./native-builds-CkaoQZVh.js";import{n as ye,t as be}from"./PlatformIcon-Kq3q98tU.js";import{a as xe,n as Se,o as Ce,r as we,s as Te,t as Ee}from"./dialog-e9AF5T6h.js";import{i as S,r as C}from"./table-r_sYqKTQ.js";import{t as De}from"./ChannelBadge-Do-lWsLM.js";import{a as w,c as T,d as E,f as Oe,i as ke,l as Ae,n as je,o as D,p as Me,r as Ne,s as O,t as k,u as Pe}from"./RelativeTime-BvgGWfXM.js";import{a as A,c as Fe,i as j,l as Ie,n as Le,o as Re,r as ze,s as Be,t as Ve}from"./RowReason-7dIWPxhy.js";import{t as M}from"./NativeBuildsNav-D3FIlSu0.js";import{i as He,n as Ue,r as N,t as P}from"./SandboxBadge-BPf2uve4.js";var We=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`}]]),F=e(),I=`npx hot-updater native-build import <file>`,L=`https://hot-updater.dev/docs/guides/native-build#import-a-build-made-elsewhere`;function Ge(){return(0,F.jsxs)(Ee,{children:[(0,F.jsxs)(Te,{render:(0,F.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,F.jsx)(We,{"data-icon":`inline-start`}),(0,F.jsx)(`span`,{className:`hidden sm:inline`,children:`Import a build`})]}),(0,F.jsxs)(Se,{className:`sm:max-w-lg`,children:[(0,F.jsxs)(xe,{children:[(0,F.jsx)(Ce,{children:`Import a build`}),(0,F.jsx)(we,{children:`Track an .ipa, .aab, .apk or .app built elsewhere as a patch base.`})]}),(0,F.jsx)(l,{label:`the import command`,value:I,wrap:!0}),(0,F.jsxs)(`a`,{className:n({className:`min-h-11 w-full sm:min-h-8 sm:w-fit`,variant:`outline`}),href:L,rel:`noreferrer`,target:`_blank`,children:[`Import guide`,(0,F.jsx)(c,{"data-icon":`inline-end`})]})]})]})}var Ke={"app-store":`App Store`,"ad-hoc":`ad hoc`,development:`development`,enterprise:`enterprise`},R=e=>{let t=y[e.artifact_kind].label,n=e.submitted_to===null?e.artifact_kind===`ipa`&&e.export_method!==null?`${Ke[e.export_method]} ${t}`:t:`${He[e.submitted_to]} build`;return e.is_sandbox?`sandbox ${n}`:n},qe=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=ce(e);return{sentence:`A newer ${R(e)} exists${t===null?`.`:`: ${t}`}`,label:`Older: a newer ${R(e)} exists${t===null?``:`, ${t}`}`}};function z({newer:e}){let t=qe(e);return(0,F.jsx)(Ve,{icon:ae,label:t.label,reason:t.sentence,children:`Older`})}var Je=`https://hot-updater.dev/docs/guides/native-build#how-a-build-is-tracked`,B=10,V=e=>e===void 0?{}:{channel:e},Ye={one:`older build`,other:`older builds`};function Xe({channel:e,paged:t,folded:i,onClearChannel:a}){return t||i?(0,F.jsx)(O,{icon:h,title:i?`Each build here has a newer one`:`No more native builds`,children:(0,F.jsx)(o,{className:n({className:`mt-1 min-h-11 sm:min-h-8`,variant:`outline`}),search:V(e),to:`/native-builds`,children:`Show the newest builds`})}):e===void 0?(0,F.jsxs)(O,{icon:h,title:`No native builds`,children:[(0,F.jsxs)(`p`,{children:[`Build one with`,` `,(0,F.jsx)(`code`,{className:`font-mono text-xs`,children:`native-build android`}),` or`,` `,(0,F.jsx)(`code`,{className:`font-mono text-xs`,children:`native-build ios`}),`, or import one built elsewhere:`]}),(0,F.jsx)(`div`,{className:`w-full text-left`,children:(0,F.jsx)(l,{label:`the import command`,value:I,wrap:!0})}),(0,F.jsxs)(`a`,{className:n({className:`mt-1 min-h-11 sm:min-h-8`,variant:`outline`}),href:Je,rel:`noreferrer`,target:`_blank`,children:[`Native build guide`,(0,F.jsx)(c,{"data-icon":`inline-end`})]}),(0,F.jsxs)(`a`,{className:n({className:`min-h-11 sm:min-h-8`,variant:`outline`}),href:L,rel:`noreferrer`,target:`_blank`,children:[`Import guide`,(0,F.jsx)(c,{"data-icon":`inline-end`})]})]}):(0,F.jsxs)(O,{icon:h,title:(0,F.jsxs)(F.Fragment,{children:[`No native build embeds `,(0,F.jsx)(`span`,{translate:`no`,children:e})]}),children:[(0,F.jsx)(`p`,{children:`A build embeds the channel it was built on. Build one on this channel, or list every channel's builds.`}),(0,F.jsx)(r,{className:`mt-1 min-h-11 sm:min-h-8`,onClick:a,variant:`outline`,children:`Show all channels`})]})}var H=e=>`${g(e.platform)} ${y[e.artifact_kind].label}`;function U({build:e}){return(0,F.jsx)(o,{"aria-label":H(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:y[e.artifact_kind].label})}function W({build:e,inTable:t=!1,older:n=!1,newer:r}){return t?(0,F.jsxs)(`span`,{className:`flex max-w-24 flex-wrap items-center gap-x-1.5 gap-y-1`,children:[(0,F.jsx)(U,{build:e}),(0,F.jsx)(P,{build:e}),n?(0,F.jsx)(z,{newer:r}):null]}):(0,F.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-1`,children:[(0,F.jsx)(U,{build:e}),(0,F.jsx)(P,{build:e})]})}function G({channel:e,onChannel:t}){return(0,F.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,F.jsx)(De,{channel:e,className:`block max-w-32 truncate`})})}function Ze({build:e}){return!N(e)&&!e.is_store_build?(0,F.jsx)(u,{}):(0,F.jsx)(K,{build:e,className:`flex flex-col items-start gap-1`})}function K({build:e,className:t}){return(0,F.jsxs)(`span`,{className:t,children:[(0,F.jsx)(Ue,{build:e}),e.is_store_build?(0,F.jsx)(me,{className:`px-1.5`,variant:`muted`,children:`Store build`}):null]})}function q({build:e}){return(0,F.jsxs)(`a`,{"aria-label":`Download ${se(e)}`,className:n({className:`min-h-11 sm:min-h-8`,size:`sm`,variant:`outline`}),download:!0,href:oe(e.id),children:[(0,F.jsx)(ie,{"data-icon":`inline-start`}),`Download`]})}function Qe({build:e}){return e.build_number?(0,F.jsx)(`span`,{className:`font-mono tabular-nums`,translate:`no`,children:e.build_number}):(0,F.jsx)(u,{})}var J=e=>he(e.id);function Y({build:e,older:t=!1,newer:n,onChannel:r}){let i=s(),a=v(e);return(0,F.jsxs)(E,{"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,F.jsx)(C,{children:(0,F.jsx)(W,{build:e,inTable:!0,newer:n,older:t})}),(0,F.jsx)(C,{children:(0,F.jsx)(G,{channel:a,onChannel:r})}),(0,F.jsx)(C,{className:`whitespace-nowrap`,children:(0,F.jsx)(ye,{platform:e.platform})}),(0,F.jsx)(C,{children:(0,F.jsx)(Qe,{build:e})}),(0,F.jsx)(C,{children:(0,F.jsx)(d,{appVersion:e.app_version,fingerprintHash:e.fingerprint_hash,nativeAppVersion:e.native_app_version})}),(0,F.jsx)(C,{children:(0,F.jsx)(f,{value:e.build_key})}),(0,F.jsx)(C,{children:(0,F.jsx)(Ze,{build:e})}),(0,F.jsx)(C,{className:`whitespace-nowrap text-muted-foreground tabular-nums`,children:_(e.byte_size)}),(0,F.jsx)(C,{className:`text-xs text-muted-foreground`,children:(0,F.jsx)(k,{ms:J(e)})}),(0,F.jsx)(C,{className:`text-right`,children:(0,F.jsx)(q,{build:e})})]})}function X({build:e,older:t=!1,newer:n,onChannel:r}){let i=s(),a=v(e),o=N(e)||e.is_store_build;return(0,F.jsxs)(je,{"aria-label":`Native build ${H(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:Me(()=>void i({to:`/native-builds/$buildId`,params:{buildId:e.id}})),children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,F.jsxs)(`div`,{className:`flex min-w-0 items-center gap-x-2.5`,children:[(0,F.jsx)(be,{className:`size-4 shrink-0 text-muted-foreground`,platform:e.platform}),(0,F.jsx)(W,{build:e}),t?(0,F.jsx)(z,{newer:n}):null]}),(0,F.jsx)(q,{build:e})]}),(0,F.jsx)(`div`,{className:`flex min-w-0`,children:(0,F.jsx)(G,{channel:a,onChannel:r})}),(0,F.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground`,children:[(0,F.jsx)(`span`,{className:`sr-only`,children:g(e.platform)}),e.build_number?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`span`,{translate:`no`,children:[`Build`,` `,(0,F.jsx)(`span`,{className:`font-mono tabular-nums text-foreground`,children:e.build_number})]}),(0,F.jsx)(`span`,{"aria-hidden":`true`,children:`·`})]}):null,(0,F.jsx)(`span`,{className:`tabular-nums`,children:_(e.byte_size)}),(0,F.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,F.jsx)(k,{ms:J(e)})]}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-end gap-x-4 gap-y-6 text-xs`,children:[(0,F.jsxs)(`span`,{className:`flex items-center`,children:[(0,F.jsx)(`span`,{className:`sr-only`,children:`Target `}),(0,F.jsx)(d,{appVersion:e.app_version,fingerprintHash:e.fingerprint_hash,nativeAppVersion:e.native_app_version})]}),e.build_key?(0,F.jsxs)(`span`,{className:`flex items-center`,children:[(0,F.jsx)(`span`,{className:`sr-only`,children:`Build key `}),(0,F.jsx)(f,{value:e.build_key})]}):null]}),o?(0,F.jsx)(K,{build:e,className:`flex flex-wrap items-center gap-1.5`}):null]})}function $e({fold:e,channel:t,isMobile:n,open:r,onOpenChange:i,onChannel:a}){let o=ve(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:B,d=o.isError?(0,F.jsx)(j,{columns:u,label:`Older builds`,onRetry:()=>void o.refetch(),state:`error`}):o.isPending||o.isFetchingNextPage?(0,F.jsx)(j,{columns:u,label:`Loading older builds`,state:`loading`}):o.hasNextPage?(0,F.jsx)(j,{columns:u,label:`Older builds`,onMore:()=>void o.fetchNextPage(),state:`more`}):null,f={label:Re(e,Ye),open:r,onOpenChange:i,panelId:`native-build-fold-${e.to}`};return n?(0,F.jsxs)(Le,{...f,inList:!0,children:[l.map(e=>(0,F.jsx)(`div`,{className:`border-b last:border-b-0`,role:`listitem`,children:(0,F.jsx)(X,{build:e,newer:c[e.id],older:!0,onChannel:a})},e.id)),d]}):(0,F.jsxs)(ze,{...f,columns:B,children:[l.map(e=>(0,F.jsx)(Y,{build:e,newer:c[e.id],older:!0,onChannel:a},e.id)),d]})}function et({builds:e,channel:t,paged:n,onChannel:a}){let o=i(),s=Ie(),c=e.data?.entries,{next:l,previous:u}=e.data??{},d=c?.filter(({kind:e})=>e===`row`).length??0;if(e.isError)return(0,F.jsxs)(de,{variant:`destructive`,children:[(0,F.jsx)(fe,{}),(0,F.jsx)(le,{children:`Native builds couldn't be loaded`}),(0,F.jsx)(ue,{children:`Check your connection and try again.`}),(0,F.jsx)(pe,{children:(0,F.jsxs)(r,{onClick:()=>void e.refetch(),size:`xs`,variant:`outline`,children:[(0,F.jsx)(b,{"data-icon":`inline-start`}),`Retry`]})})]});let f=(0,F.jsx)(Xe,{channel:t,folded:(c?.length??0)>0,onClearChannel:()=>a(void 0),paged:n}),p=e=>(0,F.jsx)($e,{channel:t,fold:e,isMobile:o,onChannel:a,onOpenChange:t=>s.set(A(e),t),open:s.isOpen(A(e))},`fold-${e.to}`);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(T,{children:o?(0,F.jsx)(`div`,{"aria-busy":e.isPlaceholderData,"aria-label":`Native builds`,className:`h-full overflow-y-auto aria-busy:opacity-60`,role:`list`,children:e.isLoading?(0,F.jsx)(Ne,{label:`Loading native builds`}):(0,F.jsxs)(F.Fragment,{children:[d===0?(0,F.jsx)(ke,{children:f}):null,c?.map(e=>e.kind===`fold`?p(e):(0,F.jsx)(`div`,{className:`border-b last:border-b-0`,role:`listitem`,children:(0,F.jsx)(X,{build:e.row,onChannel:a})},e.row.id))]})}):(0,F.jsx)(w,{"aria-busy":e.isPlaceholderData,"aria-label":`Native builds`,className:`aria-busy:opacity-60 [&_td]:px-1.5 [&_th]:px-1.5`,header:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(S,{children:`Artifact`}),(0,F.jsx)(S,{children:`Channel`}),(0,F.jsx)(S,{children:`Platform`}),(0,F.jsx)(S,{children:`Build`}),(0,F.jsx)(S,{children:`Target`}),(0,F.jsx)(S,{children:`Build key`}),(0,F.jsx)(S,{children:`Store`}),(0,F.jsx)(S,{children:`Size`}),(0,F.jsx)(S,{children:`Created`}),(0,F.jsx)(S,{className:`text-right`,children:(0,F.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]}),rowGroups:!0,children:e.isLoading?(0,F.jsx)(D,{children:(0,F.jsx)(Oe,{columns:B,label:`Loading native builds`})}):(0,F.jsxs)(F.Fragment,{children:[d===0?(0,F.jsx)(D,{children:(0,F.jsx)(Ae,{columns:B,children:f})}):null,Fe(c??[]).map(e=>e.kind===`fold`?p(e.fold):(0,F.jsx)(D,{children:e.rows.map(e=>(0,F.jsx)(Y,{build:e,onChannel:a},e.id))},`rows-${e.rows[0].id}`))]})})}),e.isLoading||c===void 0?null:(0,F.jsx)(Pe,{count:d,folded:{...Be(c),label:`older`},label:`Native build pages`,noun:[`build`,`builds`],pending:e.isPlaceholderData,newest:n?{search:V(t),to:`/native-builds`}:void 0,next:l===void 0?void 0:{search:{...V(t),before:l},to:`/native-builds`},previous:u===void 0?void 0:{search:{...V(t),...u},to:`/native-builds`}})]})}var Z=`all`,Q=`channel:`,$=e=>`${Q}${e}`;function tt({search:e,onSearchChange:t}){let{channel:n,before:i,after:o}=e,s=ge(e),c=_e(),l=c.data?.map(({name:e})=>e)??[],u=n===void 0||l.includes(n)?l:[n,...l],d=e=>t(e===void 0?{}:{channel:e});return(0,F.jsxs)(`div`,{className:`flex h-svh min-h-0 min-w-0 flex-col`,children:[(0,F.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,F.jsx)(a,{className:`-ml-1 size-11 lg:size-7`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,F.jsx)(h,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,F.jsx)(`h1`,{className:`text-sm font-medium`,children:`Native builds`})]}),(0,F.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,F.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,F.jsx)(M,{current:`builds`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(re,{items:[{label:`All channels`,value:Z},...u.map(e=>({label:e,value:$(e)}))],onOpenChange:e=>{e&&c.refetch()},onValueChange:e=>d(e?.startsWith(Q)?e.slice(8):void 0),value:n===void 0?Z:$(n),children:[(0,F.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,F.jsx)(te,{})}),(0,F.jsx)(ee,{children:(0,F.jsxs)(ne,{children:[(0,F.jsx)(m,{value:Z,children:`All channels`}),u.map(e=>(0,F.jsx)(m,{translate:`no`,value:$(e),children:e},e))]})})]}),(0,F.jsx)(`div`,{className:`ml-auto`,children:(0,F.jsx)(Ge,{})}),(0,F.jsx)(r,{"aria-label":`Refresh native builds`,className:`size-11 sm:size-7`,disabled:s.isLoading,onClick:()=>void s.refetch(),size:`icon-sm`,variant:`ghost`,children:(0,F.jsx)(b,{"aria-hidden":`true`})})]}),(0,F.jsx)(et,{builds:s,channel:n,onChannel:d,paged:i!==void 0||o!==void 0})]})]})}function nt(){let e=x.useSearch(),t=x.useNavigate();return(0,F.jsx)(tt,{onSearchChange:e=>void t({search:e}),search:e})}export{nt as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Vr as e}from"./sidebar-UnsNYOry.js";import{f as t,p as n}from"./uuidv7-DgXZ1zRR.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=>n(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 n=e.targetAppVersion;return n===null||t(n)!==n?null:{platform:e.platform,channel:e.channel,fingerprintHash:null,appVersion:n}},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,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-builds_._buildId-
|
|
2
|
-
import{Vr as e}from"./sidebar-UnsNYOry.js";import{i as t,r as n,t as r}from"./preload-helper-52zhjEsw.js";import{n as i}from"./-native-builds-search-BvCftqF2.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-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-builds_._buildId-DSbzVVI5.js","assets/sidebar-UnsNYOry.js","assets/link-D95E0fwF.js","assets/relativeTime-D_aYJRc7.js","assets/arrow-up-right-BPRe5soE.js","assets/TargetDisplay-CiU6ZsDl.js","assets/copy-BxI24-g-.js","assets/key-round-B-vaAsR7.js","assets/native-builds-hOC_V15R.js","assets/uuidv7-DgXZ1zRR.js","assets/dist-BEIz5ojx.js","assets/HashValueDisplay-DKziWjEg.js","assets/chevron-right-CuYrscDY.js","assets/download-ekENI2Sw.js","assets/RolloutPercentageBadge-DnmU8XbU.js","assets/badge-D4Tiwei-.js","assets/git-branch-BWrvONjc.js","assets/-native-builds-search-BvCftqF2.js","assets/history-DwdBLzJP.js","assets/refresh-cw-CpCxPYma.js","assets/smartphone-lSZWrqxx.js","assets/QrCode-D3-Vuudy.js","assets/BundleIdDisplay-D8oR8mcP.js","assets/ChannelBadge-Do-lWsLM.js","assets/PlatformIcon-Kq3q98tU.js","assets/IosInstall-CyBFeLGv.js","assets/useMutation-BWX97JX2.js","assets/loader-circle-C26cZDSM.js","assets/field-PkdRPD3A.js","assets/api-B1z_XXrQ.js","assets/preload-helper-52zhjEsw.js","assets/SandboxBadge-BPf2uve4.js","assets/card-BfeRlTvj.js","assets/empty-DpSPWLc2.js","assets/table-r_sYqKTQ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{Vr as e}from"./sidebar-UnsNYOry.js";import{i as t,r as n,t as r}from"./preload-helper-52zhjEsw.js";import{n as i}from"./-native-builds-search-BvCftqF2.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-DSbzVVI5.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34])),`component`),validateSearch:i});export{a as n,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,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-CiU6ZsDl.js";import{t as m}from"./chevron-right-CuYrscDY.js";import{n as te,t as h}from"./native-builds_._buildId-CAnF7xPa.js";import{t as g}from"./download-ekENI2Sw.js";import{i as ne,n as re,r as _,t as ie}from"./RolloutPercentageBadge-DnmU8XbU.js";import{t as ae}from"./git-branch-BWrvONjc.js";import{a as oe}from"./-native-builds-search-BvCftqF2.js";import{t as se}from"./history-DwdBLzJP.js";import{C as v,D as y,S as ce,_ as b,d as x,h as le,m as ue,s as de,v as S,x as fe,y as pe}from"./native-builds-hOC_V15R.js";import{t as C}from"./refresh-cw-CpCxPYma.js";import{t as me}from"./smartphone-lSZWrqxx.js";import{a as w,i as T,n as E,o as D,r as O,t as k}from"./badge-D4Tiwei-.js";import{n as A}from"./dist-BEIz5ojx.js";import{a as j,n as M,o as N,t as P}from"./card-BfeRlTvj.js";import{r as he}from"./uuidv7-DgXZ1zRR.js";import{n as ge}from"./relativeTime-D_aYJRc7.js";import{a as _e,d as ve,f as ye,h as be,l as xe,u as Se}from"./api-B1z_XXrQ.js";import{a as Ce,m as we,n as Te}from"./IosInstall-CyBFeLGv.js";import{a as F,i as I,n as L,o as R,r as z,t as B}from"./empty-DpSPWLc2.js";import{t as Ee}from"./PlatformIcon-Kq3q98tU.js";import{a as V,i as H,n as U,o as W,r as G,t as K}from"./table-r_sYqKTQ.js";import{t as De}from"./BundleIdDisplay-D8oR8mcP.js";import{t as Oe}from"./ChannelBadge-Do-lWsLM.js";import{a as q,n as ke,r as J,t as Ae}from"./SandboxBadge-BPf2uve4.js";import{t as Y}from"./QrCode-D3-Vuudy.js";var je=i(`circle-slash`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]),Me=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),A.success(`Copied to clipboard`,{description:e})}catch{A.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 Ne({hash:e}){let t=_e();if(e===null)return(0,X.jsx)(f,{});let n=re(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 Pe({detail:e}){let{build:t}=e,n=xe();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:()=>{A.success(r?`Marked as the store build`:`Mark cleared`)},onError:e=>{A.error(`Could not change the mark`,{description:e.message})}}),size:`sm`,type:`button`,variant:`outline`,children:r?`Mark as store build`:`Clear mark`})}function Fe({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)(je,{"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.`}),` `,de]})]});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:se,{"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:[fe(i)??(0,X.jsxs)(X.Fragment,{children:[v(i.platform),` `,le[i.artifact_kind].label,` ·`,` `,(0,X.jsx)(_,{uuid:i.id})]}),(0,X.jsx)(l,{"aria-hidden":`true`,className:`size-3`})]}),`, so this one gets no new patches.`]})]}),(0,X.jsx)(Pe,{detail:e})]})}function Ie({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)(De,{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)(Oe,{channel:r})}),(0,X.jsx)(`span`,{className:`text-xs`,children:v(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,J(t)?(0,X.jsx)(Q,{label:`Store`,children:(0,X.jsx)(ke,{build:t,withTime:!0})}):null,(0,X.jsx)(Q,{label:`Commit`,children:(0,X.jsx)(Ne,{hash:t.git_commit_hash})}),(0,X.jsx)(Q,{label:`Created`,children:(0,X.jsx)(_,{format:`both`,uuid:t.id})})]}),(0,X.jsx)(Fe,{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 Le=r(ge(),1),Re=r(n(),1),ze=`The .ipa installs only on devices its signing profile allows (development or ad hoc)`,$=e=>{switch(e.artifact_kind){case`ipa`:return e.is_sandbox?`${ze}.`:`${ze}; 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}},Be=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. ${$(e)}`}};function Ve(){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 He({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:Be(e)}),n?(0,X.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:n}):null]})}function Ue({message:e}){return(0,X.jsxs)(E,{variant:`destructive`,children:[(0,X.jsx)(D,{}),(0,X.jsx)(w,{children:`The download link couldn't be created`}),(0,X.jsx)(T,{children:e})]})}function We({build:t}){let n=ye(t.id),r=n.data?.url;if(r===null){let e=$(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)(Ue,{message:n.error.message}):(0,X.jsx)(e,{className:`size-48`}):(0,X.jsx)(He,{build:t,note:`This link expires. If the download fails, reload this page.`,url:r})}function Ge({build:e}){return(0,X.jsx)(`span`,{className:`font-mono text-foreground`,translate:`no`,children:e.submitted_version??`this build`})}function Ke({build:e}){let t=e.submitted_to===`testflight`?{name:`App Store Connect`,url:`https://appstoreconnect.apple.com/apps`}:{name:`Play Console`,url:`https://play.google.com/console`};return(0,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)(qe,{build:e}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:flex-wrap`,children:[(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`}),href:t.url,rel:`noreferrer`,target:`_blank`,children:[(0,X.jsx)(ne,{"data-icon":`inline-start`}),`Open `,t.name]}),(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:`outline`}),download:!0,href:b(e.id),children:[(0,X.jsx)(g,{"data-icon":`inline-start`}),(0,X.jsxs)(`span`,{className:`text-left [overflow-wrap:anywhere]`,children:[`Download `,S(e)]})]})]})]})]})}function qe({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:pe(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:pe(e)})]});case`aab`:return J(e)?(0,X.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Submitted to`,` `,e.submitted_to===`play-internal`?q[`play-internal`].name:q[e.submitted_to].label,` `,`as `,(0,X.jsx)(Ge,{build:e}),`.`,` `,e.submitted_to===`play-production`?`Users`:`Testers`,` get it once its release is rolled out; on an app Play Console hasn't published, the release is a draft you roll out in Play Console.`]}):(0,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.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`On TestFlight as `,(0,X.jsx)(Ge,{build:e}),`. Internal testers install it from the TestFlight app once App Store Connect has processed it, and a preview's pull request comment shows that state.`]}):(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Over USB, Xcode or Apple Configurator installs it.`})}}function Je({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,Le.default)(e.expiresAt).format(`YYYY-MM-DD`),`.`]})]})]})}function Ye({build:e}){return J(e)&&(e.artifact_kind===`ipa`||e.artifact_kind===`aab`)?(0,X.jsx)(Ke,{build:e}):(0,X.jsx)(Ze,{build:e})}function Xe({children:e}){let[t,n]=(0,Re.useState)(!1),r=(0,Re.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 Ze({build:t}){let n=S(t),r=ve(t.id),i=r.data?.status===`issued`?ce(window.location,t.id,r.data.token):null,o=Ce(),s=t.artifact_kind===`ipa`,c=s&&o?.ios===!0,l=(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,X.jsx)(qe,{build:t}),(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:`outline`}),download:!0,href:i??b(t.id),children:[(0,X.jsx)(g,{"data-icon":`inline-start`}),(0,X.jsxs)(`span`,{className:`text-left [overflow-wrap:anywhere]`,children:[`Download `,n]})]}),(0,X.jsx)(Je,{link:r.data,url:i})]});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`})})}),c?(0,X.jsxs)(M,{className:`flex min-w-0 flex-col gap-4 p-4 sm:p-6`,children:[(0,X.jsx)(Te,{build:t,device:o}),(0,X.jsx)(Xe,{children:l})]}):(0,X.jsxs)(M,{className:`grid gap-6 p-4 sm:grid-cols-[12rem_minmax(0,1fr)] sm:p-6`,children:[s&&i!==null?(0,X.jsx)(Ve,{}):i===null?r.data===void 0?r.isError?(0,X.jsx)(Ue,{message:r.error.message}):(0,X.jsx)(e,{className:`size-48`}):(0,X.jsx)(We,{build:t}):(0,X.jsx)(He,{build:t,url:i}),l]})]})}function Qe({build:t}){let n=we(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)(C,{"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)(me,{"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:ue(e.udid),value:e.udid})})]})]},e.udid))})})]})}var $e=`https://hot-updater.dev/docs/guides/bundle-diffing#first-ota-update`;function et({detail:t,page:n,onPage:r}){let i=n.before!==void 0||n.after!==void 0,s=be(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)(E,{variant:`destructive`,children:[(0,X.jsx)(D,{}),(0,X.jsx)(w,{children:`Patches couldn't be loaded`}),(0,X.jsx)(T,{children:s.error.message}),(0,X.jsx)(O,{children:(0,X.jsxs)(o,{onClick:()=>void s.refetch(),size:`xs`,variant:`outline`,children:[(0,X.jsx)(C,{"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)(ae,{})}),(0,X.jsx)(R,{children:`No patches from this build`}),(0,X.jsx)(z,{children:t.build.is_sandbox?de:(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:$e,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:x(e.byteSize)}),(0,X.jsx)(G,{className:`hidden sm:table-cell`,children:(0,X.jsx)(_,{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 tt=(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 nt({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:[`(`,x(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 rt({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&&tt(i,s).kind===`full`?[`npx hot-updater patch`,`-p ${t.platform}`,`-c ${y(n)}`,`-b ${y(s)}`,`--base-artifact-id ${y(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)(Me,{})}),(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/he*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)(k,{variant:`secondary`,children:e.targetCohorts.length===1?`1 cohort`:`${e.targetCohorts.length} cohorts`}):(0,X.jsx)(ie,{percentage:n}),e.shouldForceUpdate?(0,X.jsx)(k,{variant:`outline`,children:`Forced`}):null]})}),(0,X.jsx)(G,{className:`hidden sm:table-cell`,children:(0,X.jsx)(_,{uuid:t})}),(0,X.jsx)(G,{children:(0,X.jsx)(nt,{download:tt(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 it({buildId:t,search:n,onSearchChange:r}){let i=Se(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`}),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)(Ee,{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:[v(l.build.platform),` `]}),le[l.build.artifact_kind].label,(0,X.jsx)(Ae,{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:x(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)(E,{variant:`destructive`,children:[(0,X.jsx)(D,{}),(0,X.jsx)(w,{children:`The native build couldn't be loaded`}),(0,X.jsx)(T,{children:i.error.message}),(0,X.jsx)(O,{children:(0,X.jsxs)(o,{onClick:()=>void i.refetch(),size:`xs`,variant:`outline`,children:[(0,X.jsx)(C,{"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)(oe,{})}),(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`}),to:`/native-builds`,children:`Show all native builds`})})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Ye,{build:l.build}),l.build.artifact_kind===`ipa`&&!J(l.build)?(0,X.jsx)(Qe,{build:l.build}):null,(0,X.jsx)(Ie,{detail:l}),(0,X.jsx)(rt,{detail:l}),(0,X.jsx)(et,{detail:l,onPage:e=>r({...e.before===void 0?{}:{patchesBefore:e.before},...e.after===void 0?{}:{patchesAfter:e.after}}),page:d})]})})})]})}function at(){let{buildId:e}=h.useParams(),t=h.useSearch(),n=h.useNavigate();return(0,X.jsx)(it,{buildId:e,onSearchChange:e=>void n({search:e,replace:!0}),search:t})}export{at as component};
|