@hot-updater/console 1.2.0-rc.32 → 1.2.0-rc.34
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/{CompositeItem-Ci-Dvjc7.js → CompositeItem-CyQoQkYs.js} +1 -1
- package/.output/public/assets/{EventDetails-DglqzK6l.js → EventDetails-DFWS-HcW.js} +1 -1
- package/.output/public/assets/{InsightsPageHeader-DLH1MntM.js → InsightsPageHeader-BATHTZWn.js} +1 -1
- package/.output/public/assets/IosInstall-DsKczesK.js +1 -0
- package/.output/public/assets/{NativeBuildsNav-BgeUSMqw.js → NativeBuildsNav-D3FIlSu0.js} +1 -1
- package/.output/public/assets/{api-keys-DL9HeC8e.js → api-keys-C_u_ZmPS.js} +1 -1
- package/.output/public/assets/{index-DZdzmvWS.js → index-CccnEzaa.js} +3 -3
- package/.output/public/assets/{insights-6d-iISFa.js → insights-Bm4Kua5R.js} +2 -2
- package/.output/public/assets/{insights-DotP9eJn.js → insights-CpnFoyo5.js} +2 -2
- package/.output/public/assets/{insights_.distribution-DATeWpQS.js → insights_.distribution-Bjo0aQE4.js} +1 -1
- package/.output/public/assets/{insights_.distribution-DYgsR7-7.js → insights_.distribution-Dd2mYz8D.js} +2 -2
- package/.output/public/assets/{installations-Lm8TxrcB.js → installations-DYT2mSjX.js} +2 -2
- package/.output/public/assets/{installations-Ds-MhfsQ.js → installations-iqDa8KPW.js} +1 -1
- package/.output/public/assets/native-builds-7sC78eTq.js +1 -0
- package/.output/public/assets/{native-builds-Bs_JroPG.js → native-builds-CXDwW54k.js} +2 -2
- package/.output/public/assets/{native-builds_._buildId-Bj24bG99.js → native-builds_._buildId-C7-yUwvH.js} +2 -2
- package/.output/public/assets/native-builds_._buildId-u5dG7ej5.js +1 -0
- package/.output/public/assets/native-builds_.devices-CQ_tB3SO.js +1 -0
- package/.output/public/assets/{native-builds_.devices-o6LsPF9Y.js → native-builds_.devices-C_YZoRxB.js} +2 -2
- package/.output/public/assets/{remote-config-g05054op.js → remote-config-CD50k2u7.js} +3 -3
- package/.output/public/assets/{remote-config-Buy_12p7.js → remote-config-D1EMK2er.js} +1 -1
- package/.output/public/assets/{routes-5mt1iab-.js → routes-Dj_ukxU_.js} +2 -2
- package/.output/public/assets/routes-DvCD6Kib.js +1 -0
- package/.output/public/assets/styles-B8MKzxw2.css +2 -0
- package/.output/public/assets/{switch-C_s67MO4.js → switch-DNa3Cz9K.js} +1 -1
- package/.output/public/assets/{tabs-B95QcXeT.js → tabs-BBfg-c0h.js} +1 -1
- package/.output/server/{__23tanstack-start-server-fn-resolver-ET1Ypyyk.mjs → __23tanstack-start-server-fn-resolver-CUEijItf.mjs} +58 -58
- package/.output/server/_libs/_.mjs +1 -1
- package/.output/server/_ssr/{BundleIdDisplay-CpaKbEYb.mjs → BundleIdDisplay-C2Yhau3H.mjs} +2 -2
- package/.output/server/_ssr/{ChannelBadge-dVXs-bYV.mjs → ChannelBadge-BTUSgvbr.mjs} +3 -3
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-DWuWwY4L.mjs → ConsoleFeatureUnavailable-BDSJSs7U.mjs} +5 -5
- package/.output/server/_ssr/{EventDetails-CcuGyU26.mjs → EventDetails-wqpPsSDt.mjs} +6 -6
- package/.output/server/_ssr/{HashValueDisplay-ClkGq5_0.mjs → HashValueDisplay-yosN9R32.mjs} +2 -2
- package/.output/server/_ssr/{InsightsPageHeader-Bw6RVpdS.mjs → InsightsPageHeader-DUvHESff.mjs} +5 -5
- package/.output/server/_ssr/{IosInstall-DEceeAVT.mjs → IosInstall-DAZxDeBB.mjs} +56 -13
- package/.output/server/_ssr/{NativeBuildsNav-ChqRZH4E.mjs → NativeBuildsNav-JvQo5YkG.mjs} +3 -3
- package/.output/server/_ssr/{NotFoundPage-aZrAWo5n.mjs → NotFoundPage-Z48ip8aB.mjs} +2 -2
- package/.output/server/_ssr/{QrCode-pEaOdaRS.mjs → QrCode-NrGOfAPX.mjs} +2 -2
- package/.output/server/_ssr/{RelativeTime-CFIJbj_r.mjs → RelativeTime-BiGH0j0S.mjs} +3 -3
- package/.output/server/_ssr/{RolloutPercentageBadge-BEqOJXly.mjs → RolloutPercentageBadge-O0jbSRuI.mjs} +3 -3
- package/.output/server/_ssr/{RowReason-DXbU_Nml.mjs → RowReason-DneEz--P.mjs} +4 -4
- package/.output/server/_ssr/{SandboxBadge-CP76AVxN.mjs → SandboxBadge-ujAuQ6FN.mjs} +2 -2
- package/.output/server/_ssr/{TargetDisplay-csC-slf3.mjs → TargetDisplay-DFV5VpPn.mjs} +3 -3
- package/.output/server/_ssr/{alert-dialog-Dn5l3Bob.mjs → alert-dialog-B2IG3q93.mjs} +1 -1
- package/.output/server/_ssr/{api-W0WerUfm.mjs → api-CHpFJ_c4.mjs} +3 -3
- package/.output/server/_ssr/{api-keys-Btu37Irf.mjs → api-keys-DpSj11mK.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-D7kmFdhY.mjs → api-keys-ZufcGzhb.mjs} +10 -9
- package/.output/server/_ssr/{api-keys-rpc-9o4CyzUZ.mjs → api-keys-rpc-N3V7gkvv.mjs} +3 -3
- package/.output/server/_ssr/{api-rpc-B1HnUZMu.mjs → api-rpc-DXvqIbGs.mjs} +7 -7
- package/.output/server/_ssr/{auth-rpc-BBy2L4Ah.mjs → auth-rpc-Cx72ajwL.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-ajvR-m99.mjs → auth.server-DT4SuI6u.mjs} +2 -2
- package/.output/server/_ssr/{badge-DlEpe8yC.mjs → badge-DNrlMwwO.mjs} +1 -1
- package/.output/server/_ssr/{card-AK7Ms1Oa.mjs → card-BSFwWT9T.mjs} +1 -1
- package/.output/server/_ssr/{config.server-DswyWSgG.mjs → config.server-BEg-Ln3t.mjs} +3 -3
- package/.output/server/_ssr/{console-access-DM56j3dM.mjs → console-access-CPYdc4mK.mjs} +2 -2
- package/.output/server/_ssr/{console-features-api-g5s9V5sz.mjs → console-features-api-D_KFX0JV.mjs} +3 -3
- package/.output/server/_ssr/{console-features-rpc-Cnmhvmsk.mjs → console-features-rpc-CSogovr5.mjs} +3 -3
- package/.output/server/_ssr/{dialog-0oBrR9Cj.mjs → dialog-BE-0BoPu.mjs} +1 -1
- package/.output/server/_ssr/{empty-tasgkoU9.mjs → empty-DVeNY_6z.mjs} +2 -2
- package/.output/server/_ssr/{field-phtuBLMh.mjs → field-C_NBjv_7.mjs} +2 -2
- package/.output/server/_ssr/{input-group-BTEoUANX.mjs → input-group-CGiryg7I.mjs} +1 -1
- package/.output/server/_ssr/{insights-CPDtpuXg.mjs → insights-DNNsxJlD.mjs} +5 -5
- package/.output/server/_ssr/{insights-BBzyKO95.mjs → insights-ECnoz9jp.mjs} +2 -2
- package/.output/server/_ssr/{insights-api-D6J2HVtY.mjs → insights-api-DvbUK1vp.mjs} +3 -3
- package/.output/server/_ssr/{insights-failures-rpc-ChwlB9sg.mjs → insights-failures-rpc-DCu8iR4V.mjs} +4 -4
- package/.output/server/_ssr/{insights-D4le8l6s.mjs → insights-hDsGL-yq.mjs} +22 -22
- package/.output/server/_ssr/{insights-recovery-rpc-B6_GT-_U.mjs → insights-recovery-rpc-Bla1PuCq.mjs} +3 -3
- package/.output/server/_ssr/{insights-rpc-DG0GxsIL.mjs → insights-rpc-ViJh0Q-s.mjs} +3 -3
- package/.output/server/_ssr/{insights-search-LKeSNr4M.mjs → insights-search-DfEqsfAa.mjs} +2 -2
- package/.output/server/_ssr/{insights-usage-rpc-qnQWkNn2.mjs → insights-usage-rpc-CLsYlcnO.mjs} +3 -3
- package/.output/server/_ssr/{insights-usage-rpc-I0Eh5Z89.mjs → insights-usage-rpc-DWSPBftd.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-D2dZwvqQ.mjs → insights_.distribution-6t26Hce4.mjs} +2 -2
- package/.output/server/_ssr/{insights_.distribution-BF99IaZu.mjs → insights_.distribution-Bj054JTo.mjs} +5 -5
- package/.output/server/_ssr/{insights_.distribution-Dgv-_T7g.mjs → insights_.distribution-CbZmys6X.mjs} +13 -13
- package/.output/server/_ssr/{installations-DVTUpBGI.mjs → installations-ARFvJMie.mjs} +11 -11
- package/.output/server/_ssr/{installations-BHjU8FUI.mjs → installations-BOzetKfl.mjs} +2 -2
- package/.output/server/_ssr/{installations-C7TindNY.mjs → installations-CL-nVRbZ.mjs} +4 -4
- package/.output/server/_ssr/{ios-devices-rpc-KtosHTCC.mjs → ios-devices-rpc-Xln3pLFJ.mjs} +7 -7
- package/.output/server/_ssr/{iosDeviceCookie-B-8c7lMJ.mjs → iosDeviceCookie-BG4X3Kbt.mjs} +3 -3
- package/.output/server/_ssr/{iosDeviceProfile-CIEuY_kV.mjs → iosDeviceProfile-C8NvflH9.mjs} +2 -2
- package/.output/server/_ssr/{iosDevices-CkLgS8_U.mjs → iosDevices-Ck5ko5IX.mjs} +2 -2
- package/.output/server/_ssr/{native-builds-B6rWkcHL.mjs → native-builds-6Kq2Pamq.mjs} +2 -2
- package/.output/server/_ssr/{native-builds-3WEAnb93.mjs → native-builds-B70NqL0z.mjs} +15 -15
- package/.output/server/_ssr/{native-builds_._buildId-BaykQRJl.mjs → native-builds_._buildId-B4uQUP7t.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_._buildId-RFJXyul0.mjs → native-builds_._buildId-zbXBoGs8.mjs} +16 -16
- package/.output/server/_ssr/{native-builds_.devices-D9EGVV1N.mjs → native-builds_.devices-DcgdiEiK.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_.devices-BzkeAX0K.mjs → native-builds_.devices-OLR3gTfc.mjs} +17 -19
- package/.output/server/_ssr/{nativeBuildDownloadLink-A1aWZBDw.mjs → nativeBuildDownloadLink-DHsPiwsg.mjs} +2 -2
- package/.output/server/_ssr/{nativeBuildInstall-XzMDX9iY.mjs → nativeBuildInstall-DnpC3dUR.mjs} +3 -3
- package/.output/server/_ssr/{release-adoption-rpc-DoDlwfWB.mjs → release-adoption-rpc-C8oj79w3.mjs} +5 -5
- package/.output/server/_ssr/{remote-config-6lhdA4DB.mjs → remote-config-ClsnMl5Y.mjs} +17 -17
- package/.output/server/_ssr/{remote-config-u_T4AXyi.mjs → remote-config-DOinV02U.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-BMg2UurZ.mjs → remote-config-MEFtxtmM.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-rpc-Ddg8dyxw.mjs → remote-config-rpc-CCPIk5TC.mjs} +3 -3
- package/.output/server/_ssr/{router-CovCAswJ.mjs → router-jomm2ZkW.mjs} +33 -33
- package/.output/server/_ssr/{routes-CTUvEVa6.mjs → routes-D0sAXxvj.mjs} +22 -22
- package/.output/server/_ssr/{routes-DtkONaBi.mjs → routes-YuEmTB66.mjs} +8 -8
- package/.output/server/_ssr/{schema-migration-rpc-DvmruDB6.mjs → schema-migration-rpc-CzOI4qIc.mjs} +3 -3
- package/.output/server/_ssr/{select-DJLTQgmc.mjs → select-jxef2GHj.mjs} +1 -1
- package/.output/server/_ssr/{server-BfWxoIjf.mjs → server-DowlVz8B.mjs} +3 -3
- package/.output/server/_ssr/{sidebar-Bsfqid7Q.mjs → sidebar-DbK9IOE6.mjs} +2 -2
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{switch-DckZkZBS.mjs → switch-PuW4wKem.mjs} +3 -3
- package/.output/server/_ssr/{table-DG8aRQBO.mjs → table-CTjtU7u0.mjs} +1 -1
- package/.output/server/_ssr/{tabs-Dblh3lL2.mjs → tabs-CYGM4B-P.mjs} +3 -3
- package/.output/server/{_tanstack-start-manifest_v-CfDH9vVq.mjs → _tanstack-start-manifest_v-Dzfgn9EO.mjs} +31 -31
- package/.output/server/index.mjs +246 -246
- package/package.json +7 -7
- package/src/components/features/api-keys/ApiKeysPage.tsx +3 -1
- package/src/components/features/insights/FailureReports.tsx +2 -2
- package/src/components/features/insights/ReleaseCombobox.tsx +1 -1
- package/src/components/features/native-builds/BuiltInBundleCard.tsx +1 -1
- package/src/components/features/native-builds/IosDevicesPage.tsx +11 -4
- package/src/components/features/native-builds/IosInstall.tsx +36 -1
- package/src/components/features/native-builds/NativeBuildsTable.tsx +1 -1
- package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +1 -1
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/tabs.tsx +1 -1
- package/src/lib/ios-devices-api.ts +42 -5
- package/.output/public/assets/IosInstall-2R2o1IXd.js +0 -1
- package/.output/public/assets/native-builds-Chv-kXaS.js +0 -1
- package/.output/public/assets/native-builds_._buildId-Somk3u9R.js +0 -1
- package/.output/public/assets/native-builds_.devices-afOLyzux.js +0 -1
- package/.output/public/assets/routes-BxJfMpil.js +0 -1
- package/.output/public/assets/styles-CN7c7MGr.css +0 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/console",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.0-rc.
|
|
4
|
+
"version": "1.2.0-rc.34",
|
|
5
5
|
"files": [
|
|
6
6
|
".output",
|
|
7
7
|
"lib",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"tw-animate-css": "^1.4.0",
|
|
60
60
|
"uqr": "^0.1.3",
|
|
61
61
|
"verkit": "0.4.0",
|
|
62
|
-
"@hot-updater/bsdiff": "1.2.0-rc.
|
|
63
|
-
"@hot-updater/
|
|
64
|
-
"@hot-updater/server": "1.2.0-rc.
|
|
65
|
-
"@hot-updater/
|
|
62
|
+
"@hot-updater/bsdiff": "1.2.0-rc.34",
|
|
63
|
+
"@hot-updater/protocol": "1.2.0-rc.34",
|
|
64
|
+
"@hot-updater/server": "1.2.0-rc.34",
|
|
65
|
+
"@hot-updater/plugin-core": "1.2.0-rc.34"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@tanstack/devtools-vite": "^0.6.0",
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"vite-tsconfig-paths": "^6.1.1",
|
|
87
87
|
"vitest": "4.1.4",
|
|
88
88
|
"web-vitals": "^5.1.0",
|
|
89
|
-
"@hot-updater/cli-tools": "1.2.0-rc.
|
|
90
|
-
"@hot-updater/mock": "1.2.0-rc.
|
|
89
|
+
"@hot-updater/cli-tools": "1.2.0-rc.34",
|
|
90
|
+
"@hot-updater/mock": "1.2.0-rc.34"
|
|
91
91
|
},
|
|
92
92
|
"description": "React Native OTA solution for self-hosted",
|
|
93
93
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -224,7 +224,9 @@ function RevokeApiKeyDialog({ record }: { record: ApiKeyView }) {
|
|
|
224
224
|
if (!revoke.isPending) setOpen(nextOpen);
|
|
225
225
|
}}
|
|
226
226
|
>
|
|
227
|
-
<AlertDialogTrigger
|
|
227
|
+
<AlertDialogTrigger
|
|
228
|
+
render={<Button className="max-md:h-11" size="sm" variant="ghost" />}
|
|
229
|
+
>
|
|
228
230
|
<ShieldOff data-icon="inline-start" />
|
|
229
231
|
Revoke
|
|
230
232
|
</AlertDialogTrigger>
|
|
@@ -113,7 +113,7 @@ function FailureDetail({ group }: { readonly group: FailureGroup }) {
|
|
|
113
113
|
</p>
|
|
114
114
|
) : null}
|
|
115
115
|
<Button
|
|
116
|
-
className="w-fit"
|
|
116
|
+
className="w-fit max-md:h-11"
|
|
117
117
|
variant="outline"
|
|
118
118
|
onClick={() => void copy()}
|
|
119
119
|
>
|
|
@@ -175,7 +175,7 @@ function FailureDetail({ group }: { readonly group: FailureGroup }) {
|
|
|
175
175
|
<EventBundleTransition event={event} />
|
|
176
176
|
<Button
|
|
177
177
|
variant="outline"
|
|
178
|
-
className="w-fit"
|
|
178
|
+
className="w-fit max-md:h-11"
|
|
179
179
|
render={
|
|
180
180
|
<Link
|
|
181
181
|
to="/installations"
|
|
@@ -136,7 +136,7 @@ export function ReleaseCombobox({
|
|
|
136
136
|
className={
|
|
137
137
|
trigger
|
|
138
138
|
? undefined
|
|
139
|
-
: "h-11 w-full sm:h-9 sm:w-96 [&_input]:h-full [&_input]:text-base sm:[&_input]:text-xs"
|
|
139
|
+
: "h-11 w-full sm:h-9 sm:w-96 [&_input]:h-full [&_input]:text-base max-md:[&_[data-slot=input-group-button]]:size-11 max-md:[&_input]:min-h-11 sm:[&_input]:text-xs"
|
|
140
140
|
}
|
|
141
141
|
disabled={disabled}
|
|
142
142
|
placeholder={placeholder}
|
|
@@ -159,7 +159,7 @@ export function BuiltInBundleCard({
|
|
|
159
159
|
<span className="flex flex-wrap items-center gap-1.5">
|
|
160
160
|
<Link
|
|
161
161
|
aria-label={`Show the builds that embed ${channel}`}
|
|
162
|
-
className="relative rounded-md after:absolute after
|
|
162
|
+
className="relative rounded-md after:absolute after:-inset-x-1 after:-inset-y-[11px] sm:after:hidden"
|
|
163
163
|
search={{ channel }}
|
|
164
164
|
to="/native-builds"
|
|
165
165
|
>
|
|
@@ -109,7 +109,12 @@ import {
|
|
|
109
109
|
import type { IosDevicesSearch } from "@/routes/-native-builds-search";
|
|
110
110
|
|
|
111
111
|
import { CopyableText } from "./CopyableText";
|
|
112
|
-
import {
|
|
112
|
+
import {
|
|
113
|
+
AppleRefusal,
|
|
114
|
+
type IosDevice,
|
|
115
|
+
useAdoptKeptIosDevice,
|
|
116
|
+
useIosDevice,
|
|
117
|
+
} from "./IosInstall";
|
|
113
118
|
import { NativeBuildsNav } from "./NativeBuildsNav";
|
|
114
119
|
|
|
115
120
|
const STATUS_LABELS: Record<IosDeviceStatus, string> = {
|
|
@@ -681,14 +686,16 @@ function RegisterCard({
|
|
|
681
686
|
// answer's fresh receipt is traded for it, and a phone with no row requests
|
|
682
687
|
// itself again with it, without the profile, for the same person only.
|
|
683
688
|
const path = phone === null ? "" : consolePath();
|
|
689
|
+
// Also the identity of a phone whose storage Safari wiped: the cookie
|
|
690
|
+
// names it, once, and the page adopts it.
|
|
684
691
|
const kept = useKeptIosDeviceQuery(
|
|
685
692
|
path,
|
|
686
|
-
phone ??
|
|
693
|
+
phone?.receipt ?? null,
|
|
687
694
|
onPhone &&
|
|
688
|
-
udid !== null &&
|
|
689
695
|
view?.registration === "ready" &&
|
|
690
|
-
(phone.receipt !== null || mine.data === null),
|
|
696
|
+
(udid === null || phone.receipt !== null || mine.data === null),
|
|
691
697
|
);
|
|
698
|
+
useAdoptKeptIosDevice(phone, kept.data?.udid);
|
|
692
699
|
const again = useRequestThisIphoneMutation(path);
|
|
693
700
|
const proved = onPhone && keptIsThisIphone(kept.data?.udid, phone.udid);
|
|
694
701
|
|
|
@@ -117,6 +117,32 @@ const keep = (key: string, value: string) => {
|
|
|
117
117
|
* back to it already open. Read after the page mounts: the server
|
|
118
118
|
* renders it without a browser. Null until then.
|
|
119
119
|
*/
|
|
120
|
+
/** Tells this page's `useIosDevice` that the ID it keeps was just written. */
|
|
121
|
+
const ADOPTED_EVENT = "hot-updater-ios-device-adopted";
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Adopts the UDID this Safari's cookie names, when the page kept none: Safari
|
|
125
|
+
* wipes script storage after a week away while the 30-day HttpOnly cookie
|
|
126
|
+
* stays, and the cookie is the proof. Kept again, so every page knows it.
|
|
127
|
+
*/
|
|
128
|
+
export const useAdoptKeptIosDevice = (
|
|
129
|
+
device: IosDevice | null,
|
|
130
|
+
kept: string | null | undefined,
|
|
131
|
+
) => {
|
|
132
|
+
const adopt =
|
|
133
|
+
device?.ios === true &&
|
|
134
|
+
device.udid === null &&
|
|
135
|
+
kept != null &&
|
|
136
|
+
IOS_UDID_PATTERN.test(kept)
|
|
137
|
+
? kept
|
|
138
|
+
: null;
|
|
139
|
+
useEffect(() => {
|
|
140
|
+
if (adopt === null) return;
|
|
141
|
+
keep(IOS_UDID_STORAGE_KEY, adopt);
|
|
142
|
+
window.dispatchEvent(new Event(ADOPTED_EVENT));
|
|
143
|
+
}, [adopt]);
|
|
144
|
+
};
|
|
145
|
+
|
|
120
146
|
export const useIosDevice = (): IosDevice | null => {
|
|
121
147
|
const [device, setDevice] = useState<IosDevice | null>(null);
|
|
122
148
|
// Read at the first render, so an effect that runs again (React's
|
|
@@ -209,11 +235,13 @@ export const useIosDevice = (): IosDevice | null => {
|
|
|
209
235
|
read();
|
|
210
236
|
};
|
|
211
237
|
window.addEventListener("storage", onStorage);
|
|
238
|
+
window.addEventListener(ADOPTED_EVENT, read);
|
|
212
239
|
window.addEventListener("hashchange", onReturn);
|
|
213
240
|
window.addEventListener("pageshow", onReturn);
|
|
214
241
|
document.addEventListener("visibilitychange", onReturn);
|
|
215
242
|
return () => {
|
|
216
243
|
window.removeEventListener("storage", onStorage);
|
|
244
|
+
window.removeEventListener(ADOPTED_EVENT, read);
|
|
217
245
|
window.removeEventListener("hashchange", onReturn);
|
|
218
246
|
window.removeEventListener("pageshow", onReturn);
|
|
219
247
|
document.removeEventListener("visibilitychange", onReturn);
|
|
@@ -456,7 +484,7 @@ function NotInThisBuild({
|
|
|
456
484
|
// Read only where it decides something: a phone the registry doesn't know.
|
|
457
485
|
const kept = useKeptIosDeviceQuery(
|
|
458
486
|
consolePath,
|
|
459
|
-
device,
|
|
487
|
+
device.receipt,
|
|
460
488
|
device.ios && device.udid !== null && registry === null,
|
|
461
489
|
);
|
|
462
490
|
const proved =
|
|
@@ -596,6 +624,13 @@ export function IosInstall({
|
|
|
596
624
|
readonly build: NativeBuildRow;
|
|
597
625
|
readonly device: IosDevice;
|
|
598
626
|
}) {
|
|
627
|
+
// A phone that kept no ID asks the cookie once which iPhone it is.
|
|
628
|
+
const kept = useKeptIosDeviceQuery(
|
|
629
|
+
consolePathOf(window.location, build.id),
|
|
630
|
+
device.receipt,
|
|
631
|
+
device.ios && device.udid === null,
|
|
632
|
+
);
|
|
633
|
+
useAdoptKeptIosDevice(device, kept.data?.udid);
|
|
599
634
|
const { udid } = device;
|
|
600
635
|
const eligibility = useNativeBuildInstallEligibilityQuery(build.id, udid);
|
|
601
636
|
const { refetch } = eligibility;
|
|
@@ -251,7 +251,7 @@ function ChannelFilterButton({
|
|
|
251
251
|
return (
|
|
252
252
|
<button
|
|
253
253
|
aria-label={`Show the builds that embed ${channel}`}
|
|
254
|
-
className="relative flex max-w-full min-w-0 rounded-md text-left after:absolute after
|
|
254
|
+
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"
|
|
255
255
|
onClick={() => onChannel(channel)}
|
|
256
256
|
title={channel}
|
|
257
257
|
type="button"
|
|
@@ -88,7 +88,7 @@ export function ReleaseNativeBuildLink({
|
|
|
88
88
|
<span className="text-xs text-muted-foreground">
|
|
89
89
|
None tracked for this scope ·{" "}
|
|
90
90
|
<Link
|
|
91
|
-
className="relative underline-offset-4 after:absolute after:-inset-x-2 after:-inset-y-
|
|
91
|
+
className="relative underline-offset-4 after:absolute after:-inset-x-2 after:-inset-y-4 hover:text-foreground hover:underline md:after:hidden"
|
|
92
92
|
search={{ channel }}
|
|
93
93
|
to="/native-builds"
|
|
94
94
|
>
|
|
@@ -9,7 +9,7 @@ function Switch({ className, ...props }: SwitchPrimitive.Root.Props) {
|
|
|
9
9
|
<SwitchPrimitive.Root
|
|
10
10
|
data-slot="switch"
|
|
11
11
|
className={cn(
|
|
12
|
-
"peer relative inline-flex h-5 w-9 shrink-0 after:absolute after:-inset-x-1 after:-inset-y-3 md:after:hidden cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-checked:bg-primary data-unchecked:bg-input data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
12
|
+
"peer relative inline-flex h-5 w-9 shrink-0 after:absolute after:-inset-x-1.5 after:-inset-y-3.5 md:after:hidden cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-checked:bg-primary data-unchecked:bg-input data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
13
13
|
className,
|
|
14
14
|
)}
|
|
15
15
|
{...props}
|
|
@@ -57,7 +57,7 @@ function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {
|
|
|
57
57
|
<TabsPrimitive.Tab
|
|
58
58
|
data-slot="tabs-trigger"
|
|
59
59
|
className={cn(
|
|
60
|
-
"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",
|
|
60
|
+
"relative inline-flex h-[calc(100%-1px)] flex-1 items-center max-md:before:absolute max-md:before:inset-x-0 max-md:before:-inset-y-1 max-md:before:content-[''] justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",
|
|
61
61
|
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
|
|
62
62
|
"data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground",
|
|
63
63
|
"after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
useQuery,
|
|
6
6
|
useQueryClient,
|
|
7
7
|
} from "@tanstack/react-query";
|
|
8
|
+
import { useEffect } from "react";
|
|
8
9
|
|
|
9
10
|
import {
|
|
10
11
|
approveIosDevice,
|
|
@@ -21,8 +22,10 @@ export const iosDeviceKeys = {
|
|
|
21
22
|
all: ["ios-devices"] as const,
|
|
22
23
|
list: (status?: IosDeviceStatus) => ["ios-devices", status ?? "all"] as const,
|
|
23
24
|
device: (udid: string) => ["ios-devices", "device", udid] as const,
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
// What the cookie names doesn't depend on the ID this page kept: one read
|
|
26
|
+
// serves the page whether it knew its iPhone or learns it from the answer.
|
|
27
|
+
kept: (receipt: string | null) =>
|
|
28
|
+
["ios-devices", "kept", receipt ?? ""] as const,
|
|
26
29
|
ipa: (buildId: string) => ["native-build-ipa-devices", buildId] as const,
|
|
27
30
|
};
|
|
28
31
|
|
|
@@ -149,6 +152,15 @@ const sendDeviceRoute = async <T>(
|
|
|
149
152
|
return body;
|
|
150
153
|
};
|
|
151
154
|
|
|
155
|
+
/** Told when a trade sets the cookie, so a cached "no proof" is read again. */
|
|
156
|
+
const KEPT_EVENT = "hot-updater-ios-device-kept";
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The same news for this Safari's other tabs, which share the cookie: a
|
|
160
|
+
* timestamp only, written where their `storage` event hears it.
|
|
161
|
+
*/
|
|
162
|
+
const KEPT_PING_KEY = "hot-updater-ios-device-kept";
|
|
163
|
+
|
|
152
164
|
/** Trades in flight or done, one per receipt: a failed one is forgotten. */
|
|
153
165
|
const trades = new Map<string, Promise<unknown>>();
|
|
154
166
|
|
|
@@ -169,6 +181,12 @@ export const keepIosDeviceReceipt = (consolePath: string, receipt: string) => {
|
|
|
169
181
|
}).then(
|
|
170
182
|
(answer) => {
|
|
171
183
|
releasePendingReceipt(receipt);
|
|
184
|
+
window.dispatchEvent(new Event(KEPT_EVENT));
|
|
185
|
+
try {
|
|
186
|
+
window.localStorage.setItem(KEPT_PING_KEY, String(Date.now()));
|
|
187
|
+
} catch {
|
|
188
|
+
// A browser that keeps nothing has no other tab to tell.
|
|
189
|
+
}
|
|
172
190
|
return answer;
|
|
173
191
|
},
|
|
174
192
|
(error: unknown) => {
|
|
@@ -188,12 +206,31 @@ export const keepIosDeviceReceipt = (consolePath: string, receipt: string) => {
|
|
|
188
206
|
*/
|
|
189
207
|
export function useKeptIosDeviceQuery(
|
|
190
208
|
consolePath: string,
|
|
191
|
-
|
|
209
|
+
receipt: string | null,
|
|
192
210
|
enabled: boolean,
|
|
193
211
|
) {
|
|
194
|
-
|
|
212
|
+
// A trade on this page, or in another tab, sets the cookie the receiptless
|
|
213
|
+
// read may have found empty: that read, cached for good otherwise, is read
|
|
214
|
+
// again.
|
|
215
|
+
const queryClient = useQueryClient();
|
|
216
|
+
useEffect(() => {
|
|
217
|
+
const onKept = () =>
|
|
218
|
+
void queryClient.invalidateQueries({
|
|
219
|
+
queryKey: iosDeviceKeys.kept(null),
|
|
220
|
+
exact: true,
|
|
221
|
+
});
|
|
222
|
+
const onStorage = (event: StorageEvent) => {
|
|
223
|
+
if (event.key === KEPT_PING_KEY) onKept();
|
|
224
|
+
};
|
|
225
|
+
window.addEventListener(KEPT_EVENT, onKept);
|
|
226
|
+
window.addEventListener("storage", onStorage);
|
|
227
|
+
return () => {
|
|
228
|
+
window.removeEventListener(KEPT_EVENT, onKept);
|
|
229
|
+
window.removeEventListener("storage", onStorage);
|
|
230
|
+
};
|
|
231
|
+
}, [queryClient]);
|
|
195
232
|
return useQuery({
|
|
196
|
-
queryKey: iosDeviceKeys.kept(
|
|
233
|
+
queryKey: iosDeviceKeys.kept(receipt),
|
|
197
234
|
queryFn: async () => {
|
|
198
235
|
let failed: unknown = null;
|
|
199
236
|
if (receipt !== null) {
|
|
@@ -1 +0,0 @@
|
|
|
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 h}from"./-native-builds-search-BvCftqF2.js";import{t as g}from"./loader-circle-C26cZDSM.js";import{C as _,T as v,a as y,c as b,d as x,f as S,i as C,l as w,o as T,r as E,y as ee}from"./native-builds-BOSmoLed.js";import{t as te}from"./refresh-cw-CpCxPYma.js";import{t as ne}from"./smartphone-lSZWrqxx.js";import{a as D,i as O,n as k,o as A}from"./badge-D4Tiwei-.js";import{n as re}from"./relativeTime-D_aYJRc7.js";import{a as ie,n as ae,r as oe,t as se}from"./field-PkdRPD3A.js";import{m as ce}from"./api-B1z_XXrQ.js";var j=s(a(),1),M=s(re(),1),le=d({method:`GET`}).middleware([f]).handler(r(`3a62744a539db57f5a29f39cec7fb03fd2817703b40d98e6da69e2f5e7ae6f3d`)),ue=d({method:`POST`}).middleware([f]).handler(r(`7138a71df2ede8dd2c3db732d8d0ae10c56b85a8177dcdacf4e747b8087177c6`)),de=d({method:`POST`}).middleware([f]).handler(r(`4b173c2b2f5ea074a1f10862282308f11f5a043c044d64b6f63e6a29d571ec64`)),fe=d({method:`POST`}).middleware([f]).handler(r(`7908c24ccc2674ce07a553a645b8f4790889975a80f424a05d71a9fb8ab49787`)),pe=d({method:`POST`}).middleware([f]).handler(r(`4c92dfeae76a6fc898d6f38941eeedaec1f3d118f51a6f31ebf0bb1cea3fcea4`)),me=d({method:`POST`}).middleware([f]).handler(r(`8e37ec67413ceba554adb2d4b15e53682595a089d4b431ba7965d4347fb500fc`)),he=d({method:`GET`}).middleware([f]).handler(r(`a11cb4014e6b23528f76382c43684798b0e84a6936aaba02c918e8f4e216e282`)),N={all:[`ios-devices`],list:e=>[`ios-devices`,e??`all`],device:e=>[`ios-devices`,`device`,e],kept:(e,t)=>[`ios-devices`,`kept`,e,t??``],ipa:e=>[`native-build-ipa-devices`,e]},P=600*1e3;function F(e){return n({queryKey:N.list(e),queryFn:()=>le({data:e===void 0?{}:{status:e}}),placeholderData:l})}function I(e){return n({queryKey:N.device(e??``),queryFn:()=>ue({data:{udid:e}}),enabled:e!==null})}function L(e,t=!0){return n({queryKey:[`ios-device-profile-link`,e],queryFn:()=>de({data:e}),enabled:t,staleTime:P,refetchInterval:P})}function R(e){return n({queryKey:N.ipa(e),queryFn:()=>he({data:{id:e}})})}var z=e=>{let t=o();return m({mutationFn:e,onSettled:async()=>{await Promise.all([t.invalidateQueries({queryKey:N.all}),t.invalidateQueries({queryKey:[`native-build-install-eligibility`]})])}})},ge=()=>z(e=>fe({data:e})),_e=()=>z(e=>pe({data:e})),ve=()=>z(e=>me({data:e})),B=(e,t)=>`${e}/_hot-updater/devices/${t}`,V=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},H=new Map,U=(e,t)=>{let n=H.get(t);return n===void 0&&(n=V(B(e,`receipt`),{method:`POST`,json:{receipt:t}}).then(e=>(v(t),e),e=>{throw H.delete(t),e}),H.set(t,n)),n};function W(e,t,r){let{receipt:i}=t;return n({queryKey:N.kept(t.udid??``,i),queryFn:async()=>{let t=null;i!==null&&await U(e,i).catch(e=>{t=e});let n=await V(B(e,`receipt`));if(t!==null&&n.udid===null)throw t;return n},enabled:r,retry:!1,staleTime:1/0})}var ye=async e=>{await V(B(e,`receipt`),{method:`DELETE`}).catch(()=>void 0)},G=e=>z(t=>V(B(e,`request`),{method:`POST`,json:t.receipt===null?{name:t.name}:{name:t.name,receipt:t.receipt}})),K=(e,t)=>e!=null&&t!==null&&e.toLowerCase()===t.toLowerCase(),q=t(),be=`With the same bundle ID, this install replaces the App Store's copy of the app on this iPhone.`,J=`h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit`,Y=e=>/iPhone|iPod|iPad/u.test(e.userAgent)||/Macintosh/u.test(e.userAgent)&&e.maxTouchPoints>1,X=()=>{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&&C.test(t)?t:null;return{udid:n,receipt:n===null?null:e.get(`r`),requested:n!==null&&e.get(`requested`)===`1`}},xe=e=>{try{return window.localStorage.getItem(e)}catch{return null}},Se=(e,t)=>{try{window.localStorage.setItem(e,t)}catch{}},Ce=()=>{let[e,t]=(0,j.useState)(null),[n]=(0,j.useState)(X);return(0,j.useEffect)(()=>{let e=e=>e!=null&&C.test(e)?e:null,r=n,i=0,a=e=>{let t=e.receipt!==null||e.requested;e.udid!==null&&t&&(i+=1,Se(y,e.udid),e.receipt!==null&&(x(e.udid,e.receipt),U(w(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(E)}catch{}let o=()=>{let n=e(xe(`hot-updater-ios-udid`))??r.udid,a=(r.udid===n?r.receipt:null)??_(n),o=r.requested,s=i;t(e=>e!==null&&e.udid===n&&e.receipt===a&&e.requested===o&&e.answers===s?e:{ios:Y(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=X();e.udid!==null&&(r=e,a(e)),o()};return window.addEventListener(`storage`,s),window.addEventListener(`hashchange`,c),window.addEventListener(`pageshow`,c),document.addEventListener(`visibilitychange`,c),()=>{window.removeEventListener(`storage`,s),window.removeEventListener(`hashchange`,c),window.removeEventListener(`pageshow`,c),document.removeEventListener(`visibilitychange`,c)}},[n]),e},we=300*1e3,Te=(e,t)=>{let[,n]=(0,j.useReducer)(e=>e+1,0),r=e+T-we;return(0,j.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,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:[`This install link has expired.`,e?` Getting a new one.`:``]}),e?null:(0,q.jsx)(u,{className:J,onClick:t,variant:`outline`,children:`Get a new link`})]})}function Ee({build:e,token:t}){return(0,q.jsx)(`a`,{className:c({className:J}),href:ee(window.location,e.id,t),children:`Install`})}function De(){return(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,q.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,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:be})]})}function Q({build:t,again:n=!1}){let r=L({mode:`identify`,buildId:t.id});return r.data?.status===`no-secret`?(0,q.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,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`a`,{className:c({className:J,variant:n?`secondary`:`default`}),href:S(b(window.location,t.id),r.data.token),children:[(0,q.jsx)(ne,{"data-icon":`inline-start`}),n?`Check this iPhone again`:`Check this iPhone`]}),(0,q.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,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(k,{variant:`destructive`,children:[(0,q.jsx)(A,{}),(0,q.jsx)(D,{children:`The check couldn't start`}),(0,q.jsx)(O,{children:`Check your connection and try again.`})]}),(0,q.jsxs)(u,{className:J,disabled:r.isFetching,onClick:()=>void r.refetch(),variant:`outline`,children:[(0,q.jsx)(te,{"data-icon":`inline-start`}),`Reload`]})]}):(0,q.jsx)(e,{"aria-label":`Preparing the check`,className:`h-11 w-full`})}var Oe=e=>(0,M.default)(e).format(`MMM D`);function $({device:e,canApprove:t,onDevicesPage:n=!1}){return(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,q.jsxs)(k,{children:[(0,q.jsx)(A,{}),(0,q.jsx)(D,{children:`Apple didn't register this iPhone`}),(0,q.jsx)(O,{children:e.apple_error})]}),t?n?null:(0,q.jsx)(p,{className:c({className:J,variant:`outline`}),to:`/native-builds/devices`,children:`iOS devices`}):(0,q.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 ke({build:t,device:n,registry:r,newerBuild:a,canApprove:o,registryReadAt:s}){let l=b(window.location,t.id),d=G(l),f=W(l,n,n.ios&&n.udid!==null&&r===null),m=n.receipt!==null||K(f.data?.udid,n.udid),[_,v]=(0,j.useState)(``),[y,x]=(0,j.useState)(null),S=y!==null&&s<=y.readBefore,C=S?y.device:r,w=(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,q.jsx)(`p`,{className:`text-sm font-medium`,children:`Not in this build`}),(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This IPA was signed without this iPhone, and iOS won't install it here.`})]});if(C!==null){let e=S?null:a;return C.apple_error!==null&&e===null?(0,q.jsx)($,{canApprove:o,device:C}):(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[w,(0,q.jsx)(`p`,{className:`text-sm`,role:`status`,children:C.status===`pending`?`${C.name} was requested on ${Oe(C.created_at_ms)}. A maintainer approves it next.`:e===null?`${C.name} is ${C.status}. It joins the next ad hoc build.`:`A newer build has ${C.name}.`}),e===null?null:(0,q.jsx)(p,{className:c({className:J}),params:{buildId:e},to:`/native-builds/$buildId`,children:`Open the newer build`})]})}if(!m&&f.isPending&&n.udid!==null)return(0,q.jsx)(e,{"aria-label":`Reading this iPhone`,className:`h-11 w-full`});if(!m)return(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[w,(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Check this iPhone once more to request it for the next ad hoc build.`}),(0,q.jsx)(Q,{build:t,again:!0})]});let T=_.trim();return(0,q.jsxs)(`form`,{className:`flex min-w-0 flex-col gap-3`,onSubmit:e=>{if(e.preventDefault(),T===``)return;let t=s;d.mutate({receipt:n.receipt,name:T},{onSuccess:({device:e})=>x({device:e,readBefore:t})})},children:[w,(0,q.jsxs)(se,{"data-invalid":d.isError||void 0,children:[(0,q.jsx)(ie,{htmlFor:`ios-device-name`,children:`This iPhone's name`}),(0,q.jsx)(i,{autoComplete:`off`,className:`h-11 sm:h-8`,id:`ios-device-name`,maxLength:100,onChange:e=>v(e.target.value),placeholder:`Kim's iPhone`,value:_}),(0,q.jsx)(ae,{children:`A maintainer approves it, and it joins the next ad hoc build.`}),(0,q.jsx)(oe,{children:d.isError?`The request didn't go through. Check this iPhone again, then try once more.`:null})]}),(0,q.jsxs)(u,{className:J,disabled:T===``||d.isPending,type:`submit`,children:[d.isPending?(0,q.jsx)(g,{className:`animate-spin motion-reduce:animate-none`,"data-icon":`inline-start`}):(0,q.jsx)(h,{"data-icon":`inline-start`}),`Request access`]}),d.isError?(0,q.jsx)(Q,{again:!0,build:t}):null]})}function Ae({build:t,device:n}){let{udid:r}=n,i=ce(t.id,r),{refetch:a}=i,o=Te(i.dataUpdatedAt,i.data?.status===`installable`&&i.data.device===`included`);if((0,j.useEffect)(()=>{o&&a()},[o,a]),i.isPending)return(0,q.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,q.jsxs)(k,{children:[(0,q.jsx)(A,{}),(0,q.jsx)(D,{children:`Installation details unavailable`}),(0,q.jsx)(O,{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,q.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,q.jsxs)(k,{variant:`destructive`,children:[(0,q.jsx)(A,{}),(0,q.jsx)(D,{children:`This build's profile has expired`}),(0,q.jsxs)(O,{children:[`It expired on `,(0,M.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,q.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,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,q.jsx)(`p`,{className:`text-sm font-medium`,children:`In this build`}),o?(0,q.jsx)(Z,{fetching:i.isFetching,onRenew:()=>void a()}):(0,q.jsx)(Ee,{build:t,token:c}),(0,q.jsx)(De,{})]}):s.device===`not-included`?(0,q.jsx)(ke,{build:t,device:n,registry:s.registry,newerBuild:s.newerBuild,canApprove:s.canApprove,registryReadAt:i.dataUpdatedAt}):(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,q.jsx)(`p`,{className:`text-sm font-medium`,children:`Check this iPhone first`}),(0,q.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,q.jsx)(Q,{build:t})]})}export{ye as a,ge as c,F as d,W as f,G as g,_e as h,Ce as i,L as l,ve as m,Ae as n,N as o,R as p,Y as r,K as s,$ as t,I as u};
|
|
@@ -1 +0,0 @@
|
|
|
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-Bs_JroPG.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-BgeUSMqw.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-0 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 +0,0 @@
|
|
|
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-DzSkf5yP.js";import{t as m}from"./chevron-right-CuYrscDY.js";import{n as te,t as h}from"./native-builds_._buildId-Bj24bG99.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{E as v,S as y,_ as b,b as ce,g as x,m as S,p as le,u as C,v as w,x as ue}from"./native-builds-BOSmoLed.js";import{t as T}from"./refresh-cw-CpCxPYma.js";import{t as de}from"./smartphone-lSZWrqxx.js";import{a as E,i as D,n as O,o as k,r as A,t as j}from"./badge-D4Tiwei-.js";import{n as M}from"./dist-BEIz5ojx.js";import{a as N,n as P,o as F,t as I}from"./card-BfeRlTvj.js";import{r as fe}from"./uuidv7-DgXZ1zRR.js";import{n as pe}from"./relativeTime-D_aYJRc7.js";import{a as me,d as he,f as ge,h as _e,l as ve,u as ye}from"./api-B1z_XXrQ.js";import{i as be,n as xe,p as Se}from"./IosInstall-2R2o1IXd.js";import{a as L,i as R,n as z,o as B,r as V,t as H}from"./empty-DpSPWLc2.js";import{t as Ce}from"./PlatformIcon-Kq3q98tU.js";import{a as U,i as W,n as G,o as K,r as q,t as J}from"./table-r_sYqKTQ.js";import{t as we}from"./BundleIdDisplay-D8oR8mcP.js";import{t as Te}from"./ChannelBadge-Do-lWsLM.js";import{a as Y,n as Ee,r as X,t as De}from"./SandboxBadge-BPf2uve4.js";import{t as Oe}from"./QrCode-D3-Vuudy.js";var ke=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`}]]),Z=t();function Ae({value:e,length:t,shown:n=e.slice(0,t),label:r}){let i=async()=>{try{await navigator.clipboard.writeText(e),M.success(`Copied to clipboard`,{description:e})}catch{M.error(`Could not copy the ${r}`)}};return(0,Z.jsx)(`button`,{"aria-label":`Copy the ${r} ${e}`,className:`relative cursor-copy rounded-sm font-mono after:absolute after:-inset-x-2 after:-inset-y-4 sm:after:hidden text-xs whitespace-nowrap tabular-nums underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none`,onClick:e=>{e.stopPropagation(),i()},title:e,translate:`no`,type:`button`,children:n})}function je({hash:e}){let t=me();if(e===null)return(0,Z.jsx)(f,{});let n=re(t.data?.console.gitUrl,e);return n===null?(0,Z.jsx)(Ae,{label:`commit`,length:7,value:e}):(0,Z.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,Z.jsxs)(`div`,{className:`grid gap-1 sm:grid-cols-[10rem_minmax(0,1fr)] sm:gap-4`,children:[(0,Z.jsx)(`dt`,{className:`text-xs font-medium text-muted-foreground`,children:e}),(0,Z.jsx)(`dd`,{className:`min-w-0 text-sm`,children:t})]})}function Me({detail:e}){let{build:t}=e,n=ve();if(t.is_sandbox)return null;let r=!t.is_store_build;return(0,Z.jsx)(o,{className:`min-h-11 shrink-0 sm:min-h-8`,disabled:n.isPending,onClick:()=>n.mutate({id:t.id,storeBuild:r},{onSuccess:()=>{M.success(r?`Marked as the store build`:`Mark cleared`)},onError:e=>{M.error(`Could not change the mark`,{description:e.message})}}),size:`sm`,type:`button`,variant:`outline`,children:r?`Mark as store build`:`Clear mark`})}function Ne({detail:e}){let{build:t,newestInScope:n,storeBuildInScope:r}=e,i=r??n;if(i===null)return null;let a=i.id===t.id;return(0,Z.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,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(a?te:se,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`}),r?.id===t.id?(0,Z.jsxs)(`p`,{children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:`Store build.`}),` New deploys to this scope patch from this build.`]}):a?(0,Z.jsxs)(`p`,{children:[(0,Z.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,Z.jsxs)(`p`,{children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:`Not the base.`}),` New deploys patch from`,` `,(0,Z.jsxs)(c,{className:`inline-flex items-center gap-0.5 font-medium underline underline-offset-4`,params:{buildId:i.id},to:`/native-builds/$buildId`,children:[ce(i)??(0,Z.jsxs)(Z.Fragment,{children:[y(i.platform),` `,S[i.artifact_kind].label,` ·`,` `,(0,Z.jsx)(_,{uuid:i.id})]}),(0,Z.jsx)(l,{"aria-hidden":`true`,className:`size-3`})]}),`, so this one gets no new patches.`]})]}),(0,Z.jsx)(Me,{detail:e})]})}function Pe({detail:e}){let{build:t,builtInBundle:n,channel:r}=e,i=n?.childCount??0;return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsx)(N,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Built-in bundle`})})}),(0,Z.jsxs)(P,{className:`flex flex-col gap-4 p-4 sm:p-6`,children:[(0,Z.jsxs)(`dl`,{className:`flex flex-col gap-3`,children:[(0,Z.jsx)(Q,{label:`Bundle ID`,children:(0,Z.jsx)(we,{bundleId:t.min_bundle_id})}),(0,Z.jsx)(Q,{label:`OTAs patching from it`,children:(0,Z.jsx)(`span`,{className:`tabular-nums`,children:i===1?`1 bundle`:`${i} bundles`})}),(0,Z.jsx)(Q,{label:`Scope`,children:(0,Z.jsxs)(`span`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,Z.jsx)(c,{"aria-label":`Show the builds that embed ${r}`,className:`relative rounded-md after:absolute after:inset-x-0 after:-inset-y-[11px] sm:after:hidden`,search:{channel:r},to:`/native-builds`,children:(0,Z.jsx)(Te,{channel:r})}),(0,Z.jsx)(`span`,{className:`text-xs`,children:y(t.platform)})]})}),(0,Z.jsx)(Q,{label:`Target`,children:(0,Z.jsx)(`span`,{className:`text-xs`,children:(0,Z.jsx)(p,{appVersion:t.app_version,fingerprintHash:t.fingerprint_hash,nativeAppVersion:t.native_app_version})})}),(0,Z.jsx)(Q,{label:`Build key`,children:(0,Z.jsx)(`span`,{className:`text-xs`,children:(0,Z.jsx)(ee,{value:t.build_key})})}),t.build_number?(0,Z.jsx)(Q,{label:`Build`,children:(0,Z.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,translate:`no`,children:t.build_number})}):null,X(t)?(0,Z.jsx)(Q,{label:`Store`,children:(0,Z.jsx)(Ee,{build:t,withTime:!0})}):null,(0,Z.jsx)(Q,{label:`Commit`,children:(0,Z.jsx)(je,{hash:t.git_commit_hash})}),(0,Z.jsx)(Q,{label:`Created`,children:(0,Z.jsx)(_,{format:`both`,uuid:t.id})})]}),(0,Z.jsx)(Ne,{detail:e}),(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`A store or test install of this build runs this bundle until its first OTA. That OTA downloads as a patch from this bundle when one exists, and as the full bundle otherwise.`})]})]})}var Fe=r(pe(),1),Ie=r(n(),1),$={ipa:`The .ipa installs only on devices its signing profile allows (development or ad hoc); an App Store export reaches testers through TestFlight.`,aab:`The .aab installs through Google Play or bundletool, not from the file.`},Le={apk:`Scan with an Android phone's camera, then open the APK to install it.`,ipa:`Scan to download. ${$.ipa}`,aab:`Scan to download. ${$.aab}`,app:`Scan to download the .app.zip on a Mac.`};function Re(){let{origin:e,pathname:t}=window.location;return(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,Z.jsx)(Oe,{className:`size-48`,label:`Open this page on an iPhone`,value:`${e}${t}`}),(0,Z.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:`Scan with an iPhone to install this build from here. The phone signs in to the Console first.`})]})}function ze({build:e,url:t,note:n}){return(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,Z.jsx)(Oe,{className:`size-48`,label:`Download ${b(e)}`,value:t}),(0,Z.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:Le[e.artifact_kind]}),n?(0,Z.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:n}):null]})}function Be({message:e}){return(0,Z.jsxs)(O,{variant:`destructive`,children:[(0,Z.jsx)(k,{}),(0,Z.jsx)(E,{children:`The download link couldn't be created`}),(0,Z.jsx)(D,{children:e})]})}function Ve({build:t}){let n=ge(t.id),r=n.data?.url;if(r===null){let e=$[t.artifact_kind];return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 text-xs text-muted-foreground`,children:[(0,Z.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,Z.jsx)(`p`,{children:e}):null]})}return r===void 0?n.isError?(0,Z.jsx)(Be,{message:n.error.message}):(0,Z.jsx)(e,{className:`size-48`}):(0,Z.jsx)(ze,{build:t,note:`This link expires. If the download fails, reload this page.`,url:r})}function He({build:e}){return(0,Z.jsx)(`span`,{className:`font-mono text-foreground`,translate:`no`,children:e.submitted_version??`this build`})}function Ue({build:e}){let t=e.submitted_to===`testflight`?{name:`App Store Connect`,url:`https://appstoreconnect.apple.com/apps`}:{name:`Play Console`,url:`https://play.google.com/console`};return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsx)(N,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Install`})})}),(0,Z.jsxs)(P,{className:`flex min-w-0 flex-col gap-4 p-4 sm:p-6`,children:[(0,Z.jsx)(We,{build:e}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:flex-wrap`,children:[(0,Z.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,Z.jsx)(ne,{"data-icon":`inline-start`}),`Open `,t.name]}),(0,Z.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:x(e.id),children:[(0,Z.jsx)(g,{"data-icon":`inline-start`}),(0,Z.jsxs)(`span`,{className:`text-left [overflow-wrap:anywhere]`,children:[`Download `,b(e)]})]})]})]})]})}function We({build:e}){switch(e.artifact_kind){case`apk`:return(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Your browser needs the "Install unknown apps" permission.`}),e.is_sandbox?(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Its .sandbox ID installs it beside a Play copy.`}):(0,Z.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,Z.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,Z.jsx)(d,{label:`the install command`,value:w(e)})]});case`app`:return(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.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,Z.jsx)(d,{label:`the install command`,value:w(e)})]});case`aab`:return X(e)?(0,Z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Submitted to`,` `,e.submitted_to===`play-internal`?Y[`play-internal`].name:Y[e.submitted_to].label,` `,`as `,(0,Z.jsx)(He,{build:e}),`.`,` `,e.submitted_to===`play-production`?`Users`:`Testers`,` get it once its release is rolled out; on an app Play Console hasn't published, the release is a draft you roll out in Play Console.`]}):(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`For testers, build and release to internal testing:`}),(0,Z.jsx)(d,{label:`the Google Play command`,value:`npx hot-updater google-play upload`})]});case`ipa`:return X(e)?(0,Z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`On TestFlight as `,(0,Z.jsx)(He,{build:e}),`. Internal testers install it from the TestFlight app once App Store Connect has processed it, and a preview's pull request comment shows that state.`]}):(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Over USB, Xcode or Apple Configurator installs it. For testers without a registered device:`}),(0,Z.jsx)(d,{label:`the TestFlight command`,value:`npx hot-updater testflight`})]})}}function Ge({link:e,url:t}){return e?.status===`no-secret`?(0,Z.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,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsx)(d,{label:`the download link`,value:t}),(0,Z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Anyone with this link can download this build until`,` `,(0,Z.jsxs)(`span`,{className:`whitespace-nowrap`,children:[(0,Fe.default)(e.expiresAt).format(`YYYY-MM-DD`),`.`]})]})]})}function Ke({build:e}){return X(e)&&(e.artifact_kind===`ipa`||e.artifact_kind===`aab`)?(0,Z.jsx)(Ue,{build:e}):(0,Z.jsx)(Je,{build:e})}function qe({children:e}){let[t,n]=(0,Ie.useState)(!1),r=(0,Ie.useId)();return(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3 border-t pt-3`,children:[(0,Z.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,Z.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,Z.jsx)(`div`,{hidden:!t,id:r,children:e})]})}function Je({build:t}){let n=b(t),r=he(t.id),i=r.data?.status===`issued`?ue(window.location,t.id,r.data.token):null,o=be(),s=t.artifact_kind===`ipa`,c=s&&o?.ios===!0,l=(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,Z.jsx)(We,{build:t}),(0,Z.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??x(t.id),children:[(0,Z.jsx)(g,{"data-icon":`inline-start`}),(0,Z.jsxs)(`span`,{className:`text-left [overflow-wrap:anywhere]`,children:[`Download `,n]})]}),(0,Z.jsx)(Ge,{link:r.data,url:i})]});return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsx)(N,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Install`})})}),c?(0,Z.jsxs)(P,{className:`flex min-w-0 flex-col gap-4 p-4 sm:p-6`,children:[(0,Z.jsx)(xe,{build:t,device:o}),(0,Z.jsx)(qe,{children:l})]}):(0,Z.jsxs)(P,{className:`grid gap-6 p-4 sm:grid-cols-[12rem_minmax(0,1fr)] sm:p-6`,children:[s&&i!==null?(0,Z.jsx)(Re,{}):i===null?r.data===void 0?r.isError?(0,Z.jsx)(Be,{message:r.error.message}):(0,Z.jsx)(e,{className:`size-48`}):(0,Z.jsx)(Ve,{build:t}):(0,Z.jsx)(ze,{build:t,url:i}),l]})]})}function Ye({build:t}){let n=Se(t.id),r=n.data;if(r?.status===`store`||r?.status===`enterprise`)return null;let i=r?.status===`listed`?r.devices:null;return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsxs)(N,{className:`flex flex-row items-center gap-2 border-b px-4 py-3`,children:[(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Devices in this build`})}),i===null?null:(0,Z.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:i.length}),(0,Z.jsx)(c,{className:a({className:`ml-auto h-11 sm:h-7`,size:`sm`,variant:`ghost`}),to:`/native-builds/devices`,children:`iOS devices`})]}),(0,Z.jsx)(P,{className:`p-0`,children:n.isPending?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,Z.jsx)(`span`,{className:`sr-only`,children:`Reading this IPA's devices`}),(0,Z.jsx)(e,{className:`h-8 w-full`}),(0,Z.jsx)(e,{className:`h-8 w-full`})]}):n.isError||r?.status===`unavailable`?(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 p-4 text-xs text-muted-foreground`,children:[(0,Z.jsx)(`p`,{className:`min-w-0 flex-1`,children:`The Console couldn't read this IPA's devices from storage.`}),(0,Z.jsxs)(o,{className:`h-11 sm:h-7`,onClick:()=>void n.refetch(),size:`sm`,variant:`outline`,children:[(0,Z.jsx)(T,{"data-icon":`inline-start`}),`Retry`]})]}):i?.length===0?(0,Z.jsx)(`p`,{className:`p-4 text-xs text-muted-foreground`,children:`This IPA lists no devices.`}):(0,Z.jsx)(`ul`,{"aria-label":`Devices in this build`,className:`divide-y`,children:i?.map(e=>(0,Z.jsxs)(`li`,{className:`flex min-h-11 min-w-0 items-center gap-3 px-4 py-2 text-sm`,children:[(0,Z.jsx)(de,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`}),(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-col items-start`,children:[(0,Z.jsx)(`span`,{className:e.name===null?`truncate text-muted-foreground`:`truncate`,children:e.name??`Unknown device`}),(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(Ae,{label:`UDID`,shown:le(e.udid),value:e.udid})})]})]},e.udid))})})]})}var Xe=`https://hot-updater.dev/docs/guides/bundle-diffing#first-ota-update`;function Ze({detail:t,page:n,onPage:r}){let i=n.before!==void 0||n.after!==void 0,s=_e(t.build.min_bundle_id,n,i),d=i?s.data:t.patches,{next:f,previous:p}=d??{};return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,id:`patches`,children:[(0,Z.jsx)(N,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Patches from this build`})})}),(0,Z.jsxs)(P,{className:`p-0`,children:[i&&s.isError?(0,Z.jsx)(`div`,{className:`p-4`,children:(0,Z.jsxs)(O,{variant:`destructive`,children:[(0,Z.jsx)(k,{}),(0,Z.jsx)(E,{children:`Patches couldn't be loaded`}),(0,Z.jsx)(D,{children:s.error.message}),(0,Z.jsx)(A,{children:(0,Z.jsxs)(o,{onClick:()=>void s.refetch(),size:`xs`,variant:`outline`,children:[(0,Z.jsx)(T,{"data-icon":`inline-start`}),`Retry`]})})]})}):d===void 0?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,Z.jsx)(`span`,{className:`sr-only`,children:`Loading patches`}),(0,Z.jsx)(e,{className:`h-4 w-full`}),(0,Z.jsx)(e,{className:`h-4 w-2/3`})]}):d.data.length===0?i?(0,Z.jsxs)(H,{className:`py-10`,children:[(0,Z.jsx)(R,{children:(0,Z.jsx)(B,{children:`No more patches`})}),(0,Z.jsx)(o,{className:`min-h-11 sm:min-h-8`,onClick:()=>r({}),variant:`outline`,children:`Show the newest patches`})]}):(0,Z.jsxs)(H,{className:`py-10`,children:[(0,Z.jsxs)(R,{children:[(0,Z.jsx)(L,{variant:`icon`,children:(0,Z.jsx)(ae,{})}),(0,Z.jsx)(B,{children:`No patches from this build`}),(0,Z.jsxs)(V,{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,Z.jsx)(`code`,{className:`font-mono`,children:`patch`}),` in`,` `,(0,Z.jsx)(`code`,{className:`font-mono`,children:`hot-updater.config.ts`}),`.`]})]}),(0,Z.jsx)(z,{children:(0,Z.jsxs)(`a`,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),href:Xe,rel:`noreferrer`,target:`_blank`,children:[`Bundle diffing guide`,(0,Z.jsx)(l,{"data-icon":`inline-end`})]})})]}):(0,Z.jsxs)(J,{"aria-busy":i&&s.isPlaceholderData,"aria-label":`Patches from this build`,className:`table-fixed`,children:[(0,Z.jsx)(U,{children:(0,Z.jsxs)(K,{children:[(0,Z.jsx)(W,{children:`Target bundle`}),(0,Z.jsx)(W,{className:`w-28`,children:`Patch size`}),(0,Z.jsx)(W,{className:`hidden w-32 sm:table-cell`,children:`Created`})]})}),(0,Z.jsx)(G,{children:d.data.map(e=>(0,Z.jsxs)(K,{children:[(0,Z.jsx)(q,{className:`py-3 whitespace-normal`,children:(0,Z.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,Z.jsx)(q,{className:`text-xs tabular-nums`,children:C(e.byteSize)}),(0,Z.jsx)(q,{className:`hidden sm:table-cell`,children:(0,Z.jsx)(_,{uuid:e.bundleId})})]},e.bundleId))})]}),f!==void 0||p!==void 0?(0,Z.jsxs)(`nav`,{"aria-label":`Patch pages`,className:`flex items-center justify-end gap-2 border-t px-4 py-2`,children:[(0,Z.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,Z.jsx)(u,{"data-icon":`inline-start`}),`Newer`]}),(0,Z.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,Z.jsx)(m,{"data-icon":`inline-end`})]})]}):null]})]})}var Qe=(e,t)=>{let n=e.data.find(e=>e.bundleId===t);if(n!==void 0)return{kind:`patch`,byteSize:n.byteSize};let r=e.data.at(-1)?.bundleId;return e.next!==void 0&&r!==void 0&&t<r?{kind:`unknown`}:{kind:`full`}};function $e({download:e}){switch(e.kind){case`patch`:return(0,Z.jsxs)(`span`,{className:`text-xs`,children:[`Patch`,` `,(0,Z.jsxs)(`span`,{className:`text-muted-foreground tabular-nums`,children:[`(`,C(e.byteSize),`)`]})]});case`full`:return(0,Z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Full bundle`});case`unknown`:return(0,Z.jsx)(`a`,{className:`text-xs underline-offset-4 hover:underline`,href:`#patches`,children:`See patches`})}}function et({detail:e}){let{build:t,channel:n,servedNow:r,patches:i,catalogScopeKey:o}=e,s=r.find(({rolloutCohortCount:e,targetCohorts:t})=>e>0||t.length>0)?.bundleId,u=t.is_store_build&&s!=null&&Qe(i,s).kind===`full`?[`npx hot-updater patch`,`-p ${t.platform}`,`-c ${v(n)}`,`-b ${v(s)}`,`--base-artifact-id ${v(t.min_bundle_id)}`].join(` `):null,f=(0,Z.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,Z.jsx)(l,{"aria-hidden":`true`,className:`size-3`})]});return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsx)(N,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Served now`})})}),(0,Z.jsx)(P,{className:`p-0`,children:r.length===0?(0,Z.jsxs)(H,{className:`py-10`,children:[(0,Z.jsxs)(R,{children:[(0,Z.jsx)(L,{variant:`icon`,children:(0,Z.jsx)(ke,{})}),(0,Z.jsx)(B,{children:`No OTA for this build yet`}),(0,Z.jsxs)(V,{children:[`No release in this build's scope is newer than its built-in bundle. Deploy one with`,` `,(0,Z.jsx)(`code`,{className:`font-mono`,children:`hot-updater deploy`}),`, and it shows here.`]})]}),(0,Z.jsx)(z,{children:(0,Z.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,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(J,{"aria-label":`Served now`,className:`table-fixed`,children:[(0,Z.jsx)(U,{children:(0,Z.jsxs)(K,{children:[(0,Z.jsx)(W,{children:`Bundle`}),(0,Z.jsx)(W,{className:`hidden w-40 md:table-cell`,children:`Rollout`}),(0,Z.jsx)(W,{className:`hidden w-32 sm:table-cell`,children:`Created`}),(0,Z.jsx)(W,{className:`w-32`,children:`First OTA download`})]})}),(0,Z.jsx)(G,{children:r.map(e=>{let t=e.bundleId,n=e.rolloutCohortCount/fe*100;return(0,Z.jsxs)(K,{children:[(0,Z.jsx)(q,{className:`py-3 whitespace-normal`,children:(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.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,Z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.message}):null]})}),(0,Z.jsx)(q,{className:`hidden md:table-cell`,children:(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[e.targetCohorts.length>0?(0,Z.jsx)(j,{variant:`secondary`,children:e.targetCohorts.length===1?`1 cohort`:`${e.targetCohorts.length} cohorts`}):(0,Z.jsx)(ie,{percentage:n}),e.shouldForceUpdate?(0,Z.jsx)(j,{variant:`outline`,children:`Forced`}):null]})}),(0,Z.jsx)(q,{className:`hidden sm:table-cell`,children:(0,Z.jsx)(_,{uuid:t})}),(0,Z.jsx)(q,{children:(0,Z.jsx)($e,{download:Qe(i,t)})})]},e.releaseId)})})]}),u===null?null:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 border-t px-4 py-3 text-xs`,children:[(0,Z.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,Z.jsx)(d,{label:`the patch command`,value:u})]}),(0,Z.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 tt({buildId:t,search:n,onSearchChange:r}){let i=ye(t),l=i.data,d={...n.patchesBefore===void 0?{}:{before:n.patchesBefore},...n.patchesAfter===void 0?{}:{after:n.patchesAfter}};return(0,Z.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,Z.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,Z.jsx)(s,{className:`-ml-1 size-11 lg:size-7`}),(0,Z.jsxs)(c,{className:a({className:`min-h-11 sm:min-h-7`,size:`sm`,variant:`ghost`}),to:`/native-builds`,children:[(0,Z.jsx)(u,{"data-icon":`inline-start`}),`Native builds`]}),l?(0,Z.jsxs)(`h1`,{className:`flex min-w-0 items-center gap-1.5 text-sm font-medium`,children:[(0,Z.jsx)(Ce,{className:`size-3.5 shrink-0 text-muted-foreground`,platform:l.build.platform}),(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5`,children:[(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 whitespace-nowrap`,children:[(0,Z.jsxs)(`span`,{className:`sr-only`,children:[y(l.build.platform),` `]}),S[l.build.artifact_kind].label,(0,Z.jsx)(De,{build:l.build})]}),(0,Z.jsxs)(`span`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:[`· `,(0,Z.jsx)(`span`,{translate:`no`,children:l.channel})]})]}),(0,Z.jsx)(`span`,{className:`hidden text-xs font-normal text-muted-foreground tabular-nums sm:inline`,children:C(l.build.byte_size)})]}):(0,Z.jsx)(`h1`,{className:`sr-only`,children:`Native build`})]}),(0,Z.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,Z.jsx)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-4 sm:gap-6`,children:i.isError?(0,Z.jsxs)(O,{variant:`destructive`,children:[(0,Z.jsx)(k,{}),(0,Z.jsx)(E,{children:`The native build couldn't be loaded`}),(0,Z.jsx)(D,{children:i.error.message}),(0,Z.jsx)(A,{children:(0,Z.jsxs)(o,{onClick:()=>void i.refetch(),size:`xs`,variant:`outline`,children:[(0,Z.jsx)(T,{"data-icon":`inline-start`}),`Retry`]})})]}):l===void 0?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`sr-only`,children:`Loading the native build`}),(0,Z.jsx)(e,{className:`h-56 w-full rounded-xl`}),(0,Z.jsx)(e,{className:`h-64 w-full rounded-xl`})]}):l===null?(0,Z.jsxs)(H,{className:`border py-16`,children:[(0,Z.jsxs)(R,{children:[(0,Z.jsx)(L,{variant:`icon`,children:(0,Z.jsx)(oe,{})}),(0,Z.jsx)(B,{children:`Native build not found`}),(0,Z.jsx)(V,{children:`No native build has this ID. It may have been deleted, or be from another console.`})]}),(0,Z.jsx)(z,{children:(0,Z.jsx)(c,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),to:`/native-builds`,children:`Show all native builds`})})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ke,{build:l.build}),l.build.artifact_kind===`ipa`&&!X(l.build)?(0,Z.jsx)(Ye,{build:l.build}):null,(0,Z.jsx)(Pe,{detail:l}),(0,Z.jsx)(et,{detail:l}),(0,Z.jsx)(Ze,{detail:l,onPage:e=>r({...e.before===void 0?{}:{patchesBefore:e.before},...e.after===void 0?{}:{patchesAfter:e.after}}),page:d})]})})})]})}function nt(){let{buildId:e}=h.useParams(),t=h.useSearch(),n=h.useNavigate();return(0,Z.jsx)(tt,{buildId:e,onSearchChange:e=>void n({search:e,replace:!0}),search:t})}export{nt as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,A as t,An as n,Ar as r,At as i,Bt as a,C as o,Cr as s,Ct as c,Di as l,Dt as u,Er as d,Et as f,Ft as p,Gt as m,Hn as h,Ht as g,In as _,Jt as v,Kt as ee,L as te,Li as y,Lr as b,Mr as x,Mt as S,Nr as C,Or as w,Ot as T,Pr as E,Pt as ne,Q as D,Qn as O,Qt as k,Ri as re,Rr as A,Rt as j,Si as M,Sn as N,Sr as P,St as F,Tr as I,Tt as ie,Ut as ae,Vi as L,Vr as R,Vt as oe,Wt as se,Xt as ce,Yt as z,Zt as B,_r as V,_t as le,ct as H,dt as ue,en as U,fr as de,ft as W,gr as G,gt as fe,h as pe,hn as me,hr as K,jn as he,jr as ge,kr as q,kt as J,lt as Y,mr as _e,mt as ve,nn as ye,ot as X,p as be,pr as xe,pt as Se,qt as Z,rn as Ce,st as we,tn as Te,tt as Ee,ur as De,ut as Oe,vn as ke,vr as Ae,vt as je,wn as Me,wt as Ne,xr as Pe,xt as Fe,yt as Ie}from"./sidebar-UnsNYOry.js";import{t as Le}from"./link-D95E0fwF.js";import{t as Re}from"./check-Dz_5aNwx.js";import{n as ze,r as Be}from"./useCompositeListItem-B9ONn9qn.js";import{i as Ve,n as He}from"./TargetDisplay-DzSkf5yP.js";import{F as Ue,P as We,a as Ge,i as Ke,l as qe,n as Je,o as Ye,r as Xe,s as Ze,t as Qe,u as $e}from"./select-BAd2hAoW.js";import{a as et}from"./-native-builds-search-BvCftqF2.js";import{t as tt}from"./loader-circle-C26cZDSM.js";import{c as nt,f as rt,n as it,p as at,t as ot}from"./native-builds-BOSmoLed.js";import{n as st,t as ct}from"./CompositeItem-Ci-Dvjc7.js";import{t as lt}from"./refresh-cw-CpCxPYma.js";import{t as ut}from"./smartphone-lSZWrqxx.js";import{t as dt}from"./trash-2-BPH7ydek.js";import{a as ft,i as pt,n as mt,o as ht,r as gt,t as _t}from"./badge-D4Tiwei-.js";import{a as vt,n as yt,o as bt,t as xt}from"./card-BfeRlTvj.js";import{t as St}from"./uuidv7-DgXZ1zRR.js";import{n as Ct}from"./relativeTime-D_aYJRc7.js";import{a as wt,i as Tt,n as Et,r as Dt,t as Ot}from"./field-PkdRPD3A.js";import{c as kt,d as At,f as jt,g as Mt,h as Nt,i as Pt,l as Ft,m as It,o as Lt,s as Rt,t as zt,u as Bt}from"./IosInstall-2R2o1IXd.js";import{a as Vt,i as Ht,l as Ut,n as Wt,o as Gt,r as Kt,s as qt,t as Jt}from"./alert-dialog-Dihztkem.js";import{a as Yt,i as Xt,n as Zt,o as Qt,r as $t,t as en}from"./dialog-e9AF5T6h.js";import{t as tn}from"./native-builds_.devices-o6LsPF9Y.js";import{i as nn,o as rn,r as an}from"./table-r_sYqKTQ.js";import{a as on,c as sn,f as cn,i as ln,l as un,n as dn,r as fn,s as pn,t as mn}from"./RelativeTime-CP7nosYx.js";import{t as hn}from"./NativeBuildsNav-BgeUSMqw.js";import{t as gn}from"./QrCode-D3-Vuudy.js";var _n=R(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),Q=L(re()),vn=Q.createContext(void 0);function yn(e=!0){let t=Q.useContext(vn);if(t===void 0&&!e)throw Error(q(25));return t}var bn=Q.createContext(void 0);function xn(e){let t=Q.useContext(bn);if(t===void 0&&!e)throw Error(q(33));return t}var Sn=Q.createContext(void 0);function Cn(e){let t=Q.useContext(Sn);if(t===void 0&&!e)throw Error(q(36));return t}function wn(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,{events:l}=a.useState(`floatingTreeRoot`),u=yn(!0),d=u!==void 0;return Q.useMemo(()=>({id:r,role:`menuitem`,tabIndex:n?0:-1,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&l.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&l.emit(`close`,{domEvent:e,reason:_})},onMouseUp(e){if(u){let t=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,d&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||d&&!De&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!d||e.button===2)&&(!c||c.type===`regular-item`)&&s.current.click()}}),[t,n,r,l,i,a,o,s,u,d,c])}var Tn={type:`regular-item`};function En(e){let{closeOnClick:t,disabled:n=!1,highlighted:i,id:a,store:o,typingRef:s=o.context.typingRef,nativeButton:c,itemMetadata:l,nodeId:u}=e,f=Q.useRef(null),{getButtonProps:p,buttonRef:m}=d({disabled:n,focusableWhenDisabled:!0,native:c,composite:!0}),h=wn({closeOnClick:t,highlighted:i,id:a,nodeId:u,store:o,typingRef:s,itemRef:f,itemMetadata:l}),g=Q.useCallback(e=>r(h,{onMouseEnter(){l.type===`submenu-trigger`&&l.setActive()}},e,p),[h,p,l]),_=I(f,m);return Q.useMemo(()=>({getItemProps:g,itemRef:_}),[g,_])}var Dn=Q.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,d=ze({label:a}),f=xn(!0),p=W(i),{store:m}=Cn(),h=m.useState(`isActive`,d.index),g=m.useState(`itemProps`),{getItemProps:_,itemRef:v}=En({closeOnClick:c,disabled:s,highlighted:h,id:p,store:m,nativeButton:o,nodeId:f?.context.nodeId,itemMetadata:Tn});return Pe(`div`,e,{state:{disabled:s,highlighted:h},props:[g,u,_],ref:[v,t,d.ref]})}),$=l(),On={...Se,...S},kn=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s}=Cn(),{side:c,align:l}=xn(),u=Ze(!0)!=null,d=s.useState(`open`),f=s.useState(`transitionStatus`),p=s.useState(`popupProps`),m=s.useState(`mounted`),h=s.useState(`instantType`),_=s.useState(`activeTriggerElement`),v=s.useState(`parent`),ee=s.useState(`lastOpenChangeReason`),y=s.useState(`rootId`),b=s.useState(`floatingRootContext`),x=s.useState(`floatingTreeRoot`),S=s.useState(`closeDelay`),C=s.useState(`activeTriggerElement`),w=s.useState(`hoverEnabled`),T=s.useState(`disabled`),E=v.type===`context-menu`;J({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),Q.useEffect(()=>{function e(e){s.setOpen(!1,N(e.reason,e.domEvent))}return x.events.on(`close`,e),()=>{x.events.off(`close`,e)}},[x.events,s]),je(b,{enabled:w&&!T&&!E&&v.type!==`menubar`,closeDelay:S});let ne=Q.useCallback(e=>{s.set(`popupElement`,e)},[s]),D=Pe(`div`,e,{state:{transitionStatus:f,side:c,align:l,open:d,nested:v.type===`menu`,instant:h},ref:[t,s.context.popupRef,ne],stateAttributesMapping:On,props:[p,{onKeyDown(e){u&&te.has(e.key)&&e.stopPropagation()}},H(f),o,{"data-rootownerid":y}]}),O=v.type===void 0||E;return(_||v.type===`menubar`&&ee!==`outside-press`)&&(O=!0),(0,$.jsx)(g,{context:b,modal:E,disabled:!m,returnFocus:a===void 0?O:a,initialFocus:v.type!==`menu`,restoreFocus:!0,externalTree:v.type===`menubar`?void 0:x,previousFocusableElement:C,nextFocusableElement:v.type===void 0?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:v.type===void 0?s.context.beforeContentFocusGuardRef:void 0,children:D})}),An=Q.createContext(void 0);function jn(){let e=Q.useContext(An);if(e===void 0)throw Error(q(32));return e}var Mn=Q.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=Cn();return i.useState(`mounted`)||n?(0,$.jsx)(An.Provider,{value:n,children:(0,$.jsx)(z,{ref:t,...r})}):null}),Nn=Q.forwardRef(function(e,n){let{anchor:r,positionMethod:a=`absolute`,className:o,render:s,side:c,align:l,sideOffset:u=0,alignOffset:d=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p=5,arrowPadding:m=5,sticky:g=!1,disableAnchorTracking:_=!1,collisionAvoidance:v=ce,style:ee,...te}=e,{store:y}=Cn(),b=jn(),x=yn(!0),S=y.useState(`parent`),C=y.useState(`floatingRootContext`),w=y.useState(`floatingTreeRoot`),T=y.useState(`mounted`),E=y.useState(`open`),ne=y.useState(`modal`),D=y.useState(`openMethod`),O=y.useState(`activeTriggerElement`),k=y.useState(`transitionStatus`),re=y.useState(`positionerElement`),A=y.useState(`instantType`),j=y.useState(`hasViewport`),M=y.useState(`lastOpenChangeReason`),P=y.useState(`floatingNodeId`),F=y.useState(`floatingParentNodeId`),I=C.useState(`domReferenceElement`),ie=Q.useRef(null),L=i(re,!1,!1),R=r,oe=u,se=d,z=l,V=v;S.type===`context-menu`&&(R=r??S.context?.anchor,z??=`start`,!c&&z!==`center`&&(se=e.alignOffset??2,oe=e.sideOffset??-5));let le=c,H=z;S.type===`menu`?(le??=`inline-end`,H??=`start`,V=e.collisionAvoidance??B):S.type===`menubar`&&(le??=`bottom`,H??=`start`);let ue=S.type===`context-menu`,U=Y({anchor:R,floatingRootContext:C,positionMethod:x?`fixed`:a,mounted:T,side:le,sideOffset:oe,align:H,alignOffset:se,arrowPadding:ue?0:m,collisionBoundary:f,collisionPadding:p,sticky:g,nodeId:P,keepMounted:b,disableAnchorTracking:_,collisionAvoidance:V,shiftCrossAxis:ue&&!(`side`in V&&V.side===`flip`),externalTree:w,adaptiveOrigin:j?Oe:void 0});Q.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===P&&y.set(`hoverEnabled`,!1),e.nodeId!==P&&e.parentNodeId===y.select(`floatingParentNodeId`)&&y.setOpen(!1,N(h)))}return w.events.on(`menuopenchange`,e),()=>{w.events.off(`menuopenchange`,e)}},[y,w.events,P]),Q.useEffect(()=>{if(y.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==y.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;y.setOpen(!1,N(t))}return w.events.on(`menuopenchange`,e),()=>{w.events.off(`menuopenchange`,e)}},[w.events,y]);let W=de();Q.useEffect(()=>{E||W.clear()},[E,W]),Q.useEffect(()=>{function e(e){if(!(!E||e.nodeId!==y.select(`floatingParentNodeId`)))if(e.target&&O&&O!==e.target){let e=y.select(`closeDelay`);e>0?W.isStarted()||W.start(e,()=>{y.setOpen(!1,N(h))}):y.setOpen(!1,N(h))}else W.clear()}return w.events.on(`itemhover`,e),()=>{w.events.off(`itemhover`,e)}},[w.events,E,O,y,W]),Q.useEffect(()=>{let e={open:E,nodeId:P,parentNodeId:F,reason:y.select(`lastOpenChangeReason`)};w.events.emit(`menuopenchange`,e)},[w.events,E,y,P,F]),ge(()=>{let e=I,t=ie.current;if(e&&(ie.current=e),t&&e&&e!==t){y.set(`instantType`,void 0);let e=new AbortController;return L(()=>{y.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[I,L,y]);let G={open:E,side:U.side,align:U.align,anchorHidden:U.anchorHidden,nested:S.type===`menu`,instant:A},fe=S.type===`menubar`&&S.context.modal;qe(E&&(fe||ne&&M!==`trigger-hover`),D===`touch`,re,O);let pe=we(e,G,{styles:U.positionerStyles,transitionStatus:k,props:te,refs:[n,y.useStateSetter(`positionerElement`)],hidden:!T,inert:!E}),me=T&&S.type!==`menu`&&(S.type!==`menubar`&&ne&&M!==`trigger-hover`||S.type===`menubar`&&S.context.modal),K=null;return S.type===`menubar`?K=S.context.contentElement:S.type===void 0&&(K=O),(0,$.jsxs)(bn.Provider,{value:U,children:[me&&(0,$.jsx)(t,{ref:S.type===`context-menu`||S.type===`nested-context-menu`?S.context.internalBackdropRef:null,inert:X(!E),cutout:K}),(0,$.jsx)(ae,{id:P,children:(0,$.jsx)(Be,{elementsRef:y.context.itemDomElements,labelsRef:y.context.itemLabels,children:pe})})]})}),Pn=Q.createContext(null);function Fn(e){let t=Q.useContext(Pn);if(t===null&&!e)throw Error(q(5));return t}var In={...F,disabled:j(e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled),modal:j(e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0)),openMethod:j(e=>e.openMethod),allowMouseEnter:j(e=>e.allowMouseEnter),stickIfOpen:j(e=>e.stickIfOpen),parent:j(e=>e.parent),rootId:j(e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId),activeIndex:j(e=>e.activeIndex),isActive:j((e,t)=>e.activeIndex===t),hoverEnabled:j(e=>e.hoverEnabled),instantType:j(e=>e.instantType),lastOpenChangeReason:j(e=>e.openChangeReason),floatingTreeRoot:j(e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot),floatingNodeId:j(e=>e.floatingNodeId),floatingParentNodeId:j(e=>e.floatingParentNodeId),itemProps:j(e=>e.itemProps),closeDelay:j(e=>e.closeDelay),hasViewport:j(e=>e.hasViewport),keyboardEventRelay:j(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)})},Ln=class e extends p{constructor(e){super({...Rn(),...e},{positionerRef:Q.createRef(),popupRef:Q.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:Q.createRef(),beforeContentFocusGuardRef:Q.createRef(),onOpenChangeComplete:void 0,triggerElements:new c},In),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);t===i&&n===a&&r===o||(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}static useStore(t,n){let r=C(()=>new e(n)).current;return t??r}unsubscribeParentListener=null};function Rn(){return{...Fe(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new v,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:s,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}var zn=Q.createContext(void 0);function Bn(){return Q.useContext(zn)}var Vn=_e(function(e){let{children:t,open:n,onOpenChange:i,onOpenChangeComplete:c,defaultOpen:l=!1,disabled:d=!1,modal:p,loopFocus:h=!0,orientation:g=`vertical`,actionsRef:_,closeParentOnEsc:v=!1,handle:te,triggerId:y,defaultTriggerId:b=null,highlightItemOnHover:S=!0}=e,C=yn(!0),w=Cn(!0),T=Fn(!0),E=Bn(),D=Q.useMemo(()=>E&&w?{type:`menu`,store:w.store}:T?{type:`menubar`,context:T}:C&&!w?{type:`context-menu`,context:C}:{type:void 0},[C,w,T,E]),O=Ln.useStore(te?.store,{open:l,openProp:n,activeTriggerId:b,triggerIdProp:y,parent:D});xe(()=>{n===void 0&&O.state.open===!1&&l===!0&&O.update({open:!0,activeTriggerId:b})}),O.useControlledProp(`openProp`,n),O.useControlledProp(`triggerIdProp`,y),O.useContextCallback(`onOpenChangeComplete`,c);let re=k(),A=k(),j=O.useState(`floatingTreeRoot`),M=m(j),F=ee(),I=O.useState(`open`),ae=O.useState(`activeTriggerElement`),L=O.useState(`positionerElement`),R=O.useState(`hoverEnabled`),oe=O.useState(`disabled`),ce=O.useState(`lastOpenChangeReason`),z=O.useState(`parent`),B=O.useState(`activeIndex`),V=O.useState(`payload`),le=O.useState(`floatingParentNodeId`),H=Q.useRef(null),U=Q.useRef(z.type!==`context-menu`),W=de(),G=Q.useRef(!0),fe=de(),pe=le!=null,{openMethod:me,triggerProps:K}=o(I);O.useSyncedValues({disabled:d,modal:z.type===void 0?p:void 0,openMethod:me,rootId:re}),ie(O);let{forceUnmount:q}=f(I,O,()=>{O.update({allowMouseEnter:!1,stickIfOpen:!0})});ge(()=>{C&&!w?O.update({parent:{type:`context-menu`,context:C},floatingNodeId:M,floatingParentNodeId:F}):w&&O.update({floatingNodeId:M,floatingParentNodeId:F})},[C,w,M,F,O]),Q.useEffect(()=>{if(I||(H.current=null),z.type===`context-menu`){if(!I){W.clear(),U.current=!1;return}W.start(500,()=>{U.current=!0})}},[W,I,z.type]),ge(()=>{!I&&!R&&O.set(`hoverEnabled`,!0)},[I,R,O]);let J=x((e,t)=>{let n=t.reason;if(I===e&&t.trigger===ae&&ce===n||(t.preventUnmountOnClose=()=>{O.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&(t.trigger=ae??void 0),i?.(e,t),t.isCanceled))return;O.state.floatingRootContext.dispatchOpenChange(e,t);let r=t.event;if(e===!1&&r?.type===`click`&&r.pointerType===`touch`&&!G.current)return;if(!e&&B!==null){let e=O.context.itemDomElements.current[B];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}e&&n===`trigger-focus`?(G.current=!1,fe.start(300,()=>{G.current=!0})):(G.current=!0,fe.clear());let a=(n===`trigger-press`||n===`item-press`)&&r.detail===0&&r?.isTrusted,o=!e&&(n===`escape-key`||n==null),s={open:e,openChangeReason:n};H.current=t.event??null;let c=t.trigger?.id??null;(c||e)&&(s.activeTriggerId=c,s.activeTriggerElement=t.trigger??null),O.update(s),z.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?O.set(`instantType`,`group`):a||o?O.set(`instantType`,a?`click`:`dismiss`):O.set(`instantType`,void 0)}),Y=ne({popupStore:O,floatingId:A,nested:F!=null,onOpenChange:J}),_e=Y.context.events;Q.useEffect(()=>{let e=({open:e,eventDetails:t})=>J(e,t);return _e.on(`setOpen`,e),()=>{_e?.off(`setOpen`,e)}},[_e,J]);let ve=Q.useCallback(()=>{O.setOpen(!1,N(he))},[O]);Q.useImperativeHandle(_,()=>({unmount:q,close:ve}),[q,ve]);let ye;z.type===`context-menu`&&(ye=z.context),Q.useImperativeHandle(ye?.positionerRef,()=>L,[L]),Q.useImperativeHandle(ye?.actionsRef,()=>({setOpen:J}),[J]);let X=a(Y,{enabled:!oe,bubbles:{escapeKey:v&&z.type===`menu`},outsidePress(){return z.type!==`context-menu`||H.current?.type===`contextmenu`?!0:U.current},externalTree:pe?j:void 0}),be=ue(),Se=Q.useCallback(e=>{O.select(`activeIndex`)!==e&&O.set(`activeIndex`,e)},[O]),Z=Ue(Y,{enabled:!oe,listRef:O.context.itemDomElements,activeIndex:B,nested:z.type!==void 0,loopFocus:h,orientation:g,parentOrientation:z.type===`menubar`?z.context.orientation:void 0,rtl:be===`rtl`,disabledIndices:P,onNavigate:Se,openOnArrowKeyDown:z.type!==`context-menu`,externalTree:pe?j:void 0,focusItemOnHover:S}),Ce=Q.useCallback(e=>{O.context.typingRef.current=e},[O]),we=We(Y,{listRef:O.context.itemLabels,elementsRef:O.context.itemDomElements,activeIndex:B,resetMs:500,onMatch:e=>{I&&e!==B&&O.set(`activeIndex`,e)},onTyping:Ce});u(O,{floatingRootContext:Y,activeTriggerProps:Q.useMemo(()=>{let e=r(we.reference,Z.reference,X.reference,{onMouseMove(){O.set(`allowMouseEnter`,!0)}},K);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=I,e},[O,we.reference,Z.reference,X.reference,K,I]),inactiveTriggerProps:Q.useMemo(()=>{let e=r(Z.trigger,X.trigger,K);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[Z.trigger,X.trigger,K]),popupProps:Q.useMemo(()=>r(Ne,{id:A,role:`menu`,"aria-labelledby":ae?.id,onMouseMove(){O.set(`allowMouseEnter`,!0),z.type===`menu`&&O.set(`hoverEnabled`,!1)},onClick(){O.select(`hoverEnabled`)&&O.set(`hoverEnabled`,!1)},onKeyDown(e){let t=O.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},we.floating,Z.floating,X.floating),[ae,A,z.type,O,we.floating,Z.floating,X.floating]),itemProps:Z.item??s});let Te=Q.useMemo(()=>({store:O,parent:D}),[O,D]),Ee=(0,$.jsx)(Sn.Provider,{value:Te,children:typeof t==`function`?t({payload:V}):t});return z.type===void 0||z.type===`context-menu`?(0,$.jsx)(se,{externalTree:j,children:Ee}):Ee});function Hn(e){if(b(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`)??void 0;if(!A(e))return Hn(E(e))}var Un=L(y());function Wn(e,t){let r=Q.useRef(null);function i(t){Un.flushSync(()=>{e.setOpen(!1,N(n,t.nativeEvent,t.currentTarget))}),ye(r.current)?.focus()}function a(r){let i=e.select(`positionerElement`);if(i&&Ce(r,i))e.context.beforeContentFocusGuardRef.current?.focus();else{Un.flushSync(()=>{e.setOpen(!1,N(n,r.nativeEvent,r.currentTarget))});let a=Te(e.context.triggerFocusTargetRef.current||t.current);for(;a!==null&&O(i,a);){let e=a;if(a=U(a),a===e)break}a?.focus()}}return{preFocusGuardRef:r,handlePreFocusGuardFocus:i,handleFocusTargetFocus:a}}function Gn(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=Q.useRef(!1);return Q.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,ke(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:s,[t,n,r])}var Kn=2,qn=K(function(e,t){let{render:n,className:i,style:a,disabled:o=!1,nativeButton:c=!0,id:l,openOnHover:u,delay:f=100,closeDelay:p=0,handle:h,payload:g,..._}=e,te=Cn(!0),y=h?.store??te?.store;if(!y)throw Error(q(85));let b=W(l),S=y.useState(`isTriggerActive`,b),C=y.useState(`floatingRootContext`),E=y.useState(`isOpenedByTrigger`,b),ne=y.useState(`triggerPopupId`,b),D=Q.useRef(null),k=Yn(),re=w(!0),A=Z(),j=Q.useMemo(()=>A??new v,[A]),{registerTrigger:M,isMountedByThisTrigger:N}=T(b,D,y,{payload:g,closeDelay:p,parent:k,floatingTreeRoot:j,floatingNodeId:m(j),floatingParentNodeId:ee(),keyboardEventRelay:re?.relayKeyboardEvent}),P=k.type===`menubar`,F=y.useState(`disabled`),I=o||F||P&&k.context.disabled,{getButtonProps:ie,buttonRef:ae}=d({disabled:I,native:c});Q.useEffect(()=>{!E&&k.type===void 0&&(y.context.allowMouseUpTriggerRef.current=!1)},[y,E,k.type]);let L=Q.useRef(null),R=de(),se=x(e=>{if(!L.current)return;R.clear(),y.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if(O(L.current,t)||O(y.select(`positionerElement`),t)||t===L.current||t!=null&&Hn(t)===y.select(`rootId`))return;let n=$e(L.current);e.clientX>=n.left-Kn&&e.clientX<=n.right+Kn&&e.clientY>=n.top-Kn&&e.clientY<=n.bottom+Kn||j.events.emit(`close`,{domEvent:e,reason:Me})});Q.useEffect(()=>{E&&y.select(`lastOpenChangeReason`)===`trigger-hover`&&ke(L.current).addEventListener(`mouseup`,se,{once:!0})},[E,se,y]);let ce=P&&k.context.hasSubmenuOpen,z=le(C,{enabled:(u??ce)&&!I&&k.type!==`context-menu`&&(!P||ce&&!N),handleClose:fe({blockPointerEvents:!P}),mouseOnly:!0,move:!1,restMs:k.type===void 0?f:void 0,delay:{close:p},triggerElementRef:D,externalTree:j,isActiveTrigger:S,isClosing:()=>y.select(`transitionStatus`)===`ending`}),B=Jn(E,y.select(`lastOpenChangeReason`)),V=oe(C,{enabled:!I&&k.type!==`context-menu`,event:E&&P?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:k.type===void 0?B:!1}),H=Ie(C,{enabled:!I&&ce}),ue=Gn({open:E,enabled:P,mouseDownAction:`open`}),U=Q.useMemo(()=>r(H.reference,V.reference),[H.reference,V.reference]),G=y.useState(`triggerProps`,N),{preFocusGuardRef:pe,handlePreFocusGuardFocus:K,handleFocusTargetFocus:he}=Wn(y,D),ge={disabled:I,open:E},J=[L,t,ae,M,D],Y=[U,z??s,G,{"aria-haspopup":`menu`,"aria-controls":ne,id:b,onMouseDown:e=>{y.select(`open`)||(R.start(200,()=>{y.context.allowMouseUpTriggerRef.current=!0}),ke(e.currentTarget).addEventListener(`mouseup`,se,{once:!0}))}},P?{role:`menuitem`}:{},ue,_,ie],_e=Pe(`button`,e,{enabled:!P,stateAttributesMapping:ve,state:ge,ref:J,props:Y});return P?(0,$.jsx)(ct,{tag:`button`,render:n,className:i,style:a,state:ge,refs:J,props:Y,stateAttributesMapping:ve}):E?(0,$.jsxs)(Q.Fragment,{children:[(0,$.jsx)(me,{ref:pe,onFocus:K},`${b}-pre-focus-guard`),(0,$.jsx)(Q.Fragment,{children:_e},b),(0,$.jsx)(me,{ref:y.context.triggerFocusTargetRef,onFocus:he},`${b}-post-focus-guard`)]}):(0,$.jsx)(Q.Fragment,{children:_e},b)});function Jn(e,t){let n=de(),[r,i]=Q.useState(!1);return ge(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Yn(){let e=yn(!0),t=Cn(!0),n=Fn(!0);return Q.useMemo(()=>n?{type:`menubar`,context:n}:e&&!t?{type:`context-menu`,context:e}:{type:void 0},[e,t,n])}var Xn=L(Ct(),1);function Zn({...e}){return(0,$.jsx)(Vn,{"data-slot":`dropdown-menu`,...e})}function Qn({...e}){return(0,$.jsx)(qn,{"data-slot":`dropdown-menu-trigger`,...e})}function $n({align:e=`start`,alignOffset:t=0,side:n=`bottom`,sideOffset:r=4,className:i,...a}){return(0,$.jsx)(Mn,{children:(0,$.jsx)(Nn,{className:`isolate z-50 outline-none`,align:e,alignOffset:t,side:n,sideOffset:r,children:(0,$.jsx)(kn,{"data-slot":`dropdown-menu-content`,className:Ae(`dark z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,i),...a})})})}function er({className:e,inset:t,variant:n=`default`,...r}){return(0,$.jsx)(Dn,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:Ae(`group/dropdown-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive`,e),...r})}function tr({className:e,...t}){return(0,$.jsx)(Ee,{"data-slot":`dropdown-menu-separator`,className:Ae(`-mx-1 my-1 h-px bg-border/50`,e),...t})}var nr={pending:`Requested`,approved:`Approved`,registered:`Registered`},rr={pending:`warning`,approved:`secondary`,registered:`muted`},ir=`all`,ar=6,or=()=>window.location.pathname.endsWith(`/native-builds/devices`)?window.location.pathname.slice(0,-it.length):nt(window.location,``),sr=(e,t)=>({approve:t.canApprove&&e.status===`pending`,rename:t.canApprove,remove:t.canApprove,withdraw:!t.canApprove&&e.status===`pending`&&e.requested_by===t.email}),cr=e=>e.status===`approved`&&e.apple_error!==null,lr=e=>e.requested_by??`Added from a terminal`;function ur({device:e,inTable:t=!1}){return e.apple_error===null?null:t?(0,$.jsx)(`span`,{className:`line-clamp-2 max-w-48 text-xs whitespace-normal text-muted-foreground`,title:e.apple_error,children:e.apple_error}):(0,$.jsx)(`span`,{className:`max-w-64 text-xs whitespace-normal text-muted-foreground`,children:e.apple_error})}function dr({device:e,withError:t=!0}){return(0,$.jsxs)(`div`,{className:`flex min-w-0 shrink-0 flex-col items-start gap-1`,children:[cr(e)?(0,$.jsx)(_t,{variant:`warning`,children:`Apple refused`}):(0,$.jsx)(_t,{variant:rr[e.status],children:nr[e.status]}),t?(0,$.jsx)(ur,{device:e,inTable:!0}):null]})}function fr({device:e}){if(e.build_id===null)return(0,$.jsx)(He,{});let t=`A build`;try{t=`Build of ${(0,Xn.default)(St(e.build_id)).format(`MMM D`)}`}catch{}return(0,$.jsx)(Le,{className:`text-xs font-medium underline-offset-4 hover:underline`,params:{buildId:e.build_id},to:`/native-builds/$buildId`,children:t})}function pr({device:e,viewer:t,onOpen:n}){let r=sr(e,t);return!r.approve&&!r.rename&&!r.remove&&!r.withdraw?null:(0,$.jsxs)(`div`,{className:`flex items-center justify-end gap-1`,children:[r.approve?(0,$.jsxs)(G,{className:`h-11 sm:h-8`,onClick:()=>n({kind:`approve`,device:e}),size:`sm`,children:[(0,$.jsx)(Re,{"data-icon":`inline-start`}),`Approve`]}):null,r.withdraw?(0,$.jsx)(G,{className:`h-11 sm:h-8`,onClick:()=>n({kind:`remove`,device:e}),size:`sm`,variant:`outline`,children:`Withdraw`}):null,r.rename||r.remove?(0,$.jsxs)(Zn,{children:[(0,$.jsx)(Qn,{render:(0,$.jsx)(G,{"aria-label":`More actions for ${e.name}`,className:`size-11 sm:size-8`,size:`icon-sm`,variant:`ghost`}),children:(0,$.jsx)(_n,{"aria-hidden":`true`})}),(0,$.jsxs)($n,{align:`end`,children:[(0,$.jsxs)(er,{onClick:()=>n({kind:`rename`,device:e}),children:[(0,$.jsx)(st,{"aria-hidden":`true`}),`Rename`]}),(0,$.jsx)(tr,{}),(0,$.jsxs)(er,{onClick:()=>n({kind:`remove`,device:e}),variant:`destructive`,children:[(0,$.jsx)(dt,{"aria-hidden":`true`}),e.status===`pending`?`Decline`:`Remove`]})]})]}):null]})}function mr(){return(0,$.jsx)(_t,{className:`shrink-0 px-1.5`,variant:`muted`,children:`This iPhone`})}function hr({device:e,viewer:t,onOpen:n,isThisIphone:r}){return(0,$.jsxs)(rn,{children:[(0,$.jsx)(an,{className:`font-medium`,children:(0,$.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[e.name,r?(0,$.jsx)(mr,{}):null]})}),(0,$.jsx)(an,{children:(0,$.jsx)(`span`,{className:`font-mono text-xs`,title:e.udid,translate:`no`,children:at(e.udid)})}),(0,$.jsx)(an,{className:`text-xs`,children:e.requested_by??(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:lr(e)})}),(0,$.jsx)(an,{children:(0,$.jsx)(dr,{device:e})}),(0,$.jsx)(an,{className:`text-xs`,children:(0,$.jsx)(mn,{ms:e.created_at_ms})}),(0,$.jsx)(an,{children:(0,$.jsx)(fr,{device:e})}),(0,$.jsx)(an,{className:`text-right`,children:(0,$.jsx)(pr,{device:e,onOpen:n,viewer:t})})]})}function gr({device:e,viewer:t,onOpen:n,isThisIphone:r}){return(0,$.jsxs)(dn,{className:`cursor-default gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,$.jsxs)(`p`,{className:`flex min-w-0 items-center gap-1.5 text-sm font-medium`,children:[(0,$.jsx)(`span`,{className:`truncate`,children:e.name}),r?(0,$.jsx)(mr,{}):null]}),(0,$.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,translate:`no`,children:at(e.udid)})]}),(0,$.jsx)(dr,{device:e,withError:!1})]}),(0,$.jsx)(ur,{device:e}),(0,$.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground`,children:[(0,$.jsx)(`span`,{children:lr(e)}),(0,$.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,$.jsx)(mn,{ms:e.created_at_ms}),e.build_id===null?null:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,$.jsx)(fr,{device:e})]})]}),(0,$.jsx)(pr,{device:e,onOpen:n,viewer:t})]})}function _r({target:e,onClose:t}){let n=kt(),r=Nt(),i=e.kind===`approve`?n:r,[a,o]=(0,Q.useState)(e.device.name),s=a.trim();return(0,$.jsx)(en,{onOpenChange:e=>e?null:t(),open:!0,children:(0,$.jsxs)(Zt,{children:[(0,$.jsxs)(Yt,{children:[(0,$.jsx)(Qt,{children:e.kind===`approve`?`Approve ${e.device.name}?`:`Rename ${e.device.name}`}),(0,$.jsx)($t,{children:e.kind===`approve`?`The next ad hoc build registers this iPhone with your Apple account. Each new iPhone uses one of the account's 100 a year, and removing it never gives the slot back.`:`The registry shows this name. The next ad hoc build doesn't rename it at Apple.`})]}),(0,$.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),s!==``&&i.mutate({id:e.device.id,name:s},{onSuccess:t})},children:[(0,$.jsxs)(Tt,{children:[e.kind===`approve`?(0,$.jsxs)(`dl`,{className:`grid grid-cols-[auto_minmax(0,1fr)] gap-x-4 gap-y-1 text-sm`,children:[(0,$.jsx)(`dt`,{className:`text-muted-foreground`,children:`Requested by`}),(0,$.jsx)(`dd`,{className:`truncate`,children:e.device.requested_by??`Terminal (CLI)`}),(0,$.jsx)(`dt`,{className:`text-muted-foreground`,children:`UDID`}),(0,$.jsx)(`dd`,{className:`font-mono text-xs break-all select-all`,translate:`no`,children:e.device.udid})]}):null,(0,$.jsxs)(Ot,{"data-invalid":i.isError||void 0,children:[(0,$.jsx)(wt,{htmlFor:`ios-device-dialog-name`,children:`Name`}),(0,$.jsx)(D,{autoComplete:`off`,id:`ios-device-dialog-name`,maxLength:100,onChange:e=>o(e.target.value),value:a}),e.kind===`approve`?(0,$.jsx)(Et,{children:`The iPhone's ID comes from the person who asked. Approve devices you recognize.`}):null,(0,$.jsx)(Dt,{children:i.isError?`Couldn't ${e.kind===`approve`?`approve`:`rename`} ${e.device.name}. Check your connection and try again.`:null})]})]}),(0,$.jsx)(Xt,{className:`mt-4`,children:(0,$.jsxs)(G,{className:`h-11 sm:h-8`,disabled:s===``||i.isPending,type:`submit`,children:[i.isPending?(0,$.jsx)(tt,{className:`animate-spin motion-reduce:animate-none`,"data-icon":`inline-start`}):(0,$.jsx)(Re,{"data-icon":`inline-start`}),e.kind===`approve`?`Approve`:`Rename`]})})]})]})})}function vr({device:e,viewer:t,onClose:n}){let r=It(),i=!t.canApprove,a=e.status===`pending`;return(0,$.jsx)(Jt,{onOpenChange:e=>e?null:n(),open:!0,children:(0,$.jsxs)(Ht,{children:[(0,$.jsxs)(qt,{children:[(0,$.jsx)(Ut,{children:i?`Withdraw ${e.name}?`:a?`Decline ${e.name}?`:`Remove ${e.name}?`}),(0,$.jsx)(Vt,{children:a?`It leaves the list. Its owner can request it again.`:`It leaves the list. New ad hoc builds keep it until it's disabled at Apple.`})]}),r.isError?(0,$.jsxs)(`p`,{className:`text-xs text-destructive`,role:`alert`,children:[`Couldn't `,i?`withdraw`:a?`decline`:`remove`,` `,e.name,`. Check your connection and try again.`]}):null,(0,$.jsxs)(Gt,{children:[(0,$.jsx)(Kt,{disabled:r.isPending,children:`Cancel`}),(0,$.jsxs)(Wt,{disabled:r.isPending,onClick:t=>{t.preventDefault(),r.mutate({udid:e.udid},{onSuccess:n})},variant:`destructive`,children:[r.isPending?(0,$.jsx)(tt,{className:`animate-spin motion-reduce:animate-none`,"data-icon":`inline-start`}):null,i?`Withdraw`:a?`Decline`:`Remove`]})]})]})})}function yr({device:e,viewer:t}){let n=t?.canApprove===!0;return e.apple_error===null?(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,$.jsx)(`p`,{className:`truncate text-sm font-medium`,children:e.name}),(0,$.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,translate:`no`,children:at(e.udid)})]}),(0,$.jsx)(dr,{device:e,withError:!1})]}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:e.status===`pending`?n?`Approve it below, and it joins the next ad hoc build.`:`A maintainer approves it next.`:e.status===`approved`?`It joins the next ad hoc build.`:`New ad hoc builds install on it.`})]}):(0,$.jsx)(zt,{canApprove:n,device:e,onDevicesPage:!0})}function br({status:e,secretName:t}){return(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:e===`local-console`?`iPhones register through your hosted Console: an iPhone can't reach this computer's.`:`Set ${t} on this Console to register iPhones.`})}function xr({view:t,phone:n}){let[r,i]=(0,Q.useState)(null),a=r??t?.defaultName??``,[o,s]=(0,Q.useState)(a);(0,Q.useEffect)(()=>{let e=setTimeout(()=>s(a.trim()),400);return()=>clearTimeout(e)},[a]);let c=n?.ios===!0,l=Ft({mode:`register`,name:o||`iPhone`},c&&t?.registration===`ready`),u=n===null||window.location.protocol===`https:`,d=c?n.udid:null,f=Bt(d),p=n?.answers??0,{refetch:m}=f,h=(0,Q.useRef)({udid:d,answers:p});(0,Q.useEffect)(()=>{let e=h.current;h.current={udid:d,answers:p},d!==null&&d===e.udid&&p>e.answers&&m()},[d,p,m]);let g=n===null?``:or(),_=jt(g,n??{udid:null,receipt:null},c&&d!==null&&t?.registration===`ready`&&(n.receipt!==null||f.data===null)),v=Mt(g),ee=c&&Rt(_.data?.udid,n.udid),te=(()=>{if(n===null||c&&n.udid!==null&&f.isPending)return(0,$.jsx)(e,{"aria-label":`Loading`,className:`h-36 w-full`});if(c&&f.data)return(0,$.jsx)(yr,{device:f.data,viewer:t?.viewer});if(t!==void 0&&(t.registration===`local-console`||t.registration===`no-secret`))return(0,$.jsx)(br,{secretName:t.secretName,status:t.registration});if(!c)return(0,$.jsxs)(`div`,{className:`flex flex-col items-start gap-4 sm:flex-row sm:items-center`,children:[(0,$.jsx)(gn,{className:`size-36 shrink-0`,label:`Open this page on an iPhone`,value:`${window.location.origin}${or()}${it}`}),(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,$.jsx)(`p`,{className:`text-sm font-medium`,children:`Open this page on the iPhone, in Safari.`}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`It installs a profile that reads the iPhone's ID, then lists the iPhone here as requested. Nothing stays installed.`})]})]});if(!u)return(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:`iPhones need this Console on HTTPS.`});if(f.data===null&&_.isFetching&&!ee)return(0,$.jsx)(e,{"aria-label":`Loading`,className:`h-36 w-full`});if(ee){let e=a.trim();return(0,$.jsxs)(`form`,{className:`flex min-w-0 flex-col gap-3`,onSubmit:t=>{t.preventDefault(),e!==``&&v.mutate({name:e,receipt:n.receipt})},children:[(0,$.jsxs)(Ot,{"data-invalid":v.isError||void 0,children:[(0,$.jsx)(wt,{htmlFor:`ios-device-register-name`,children:`This iPhone's name`}),(0,$.jsx)(D,{autoComplete:`off`,className:`h-11`,id:`ios-device-register-name`,maxLength:100,onChange:e=>i(e.target.value),value:a}),(0,$.jsx)(Et,{children:`This Safari checked it before, so no profile is needed.`}),(0,$.jsx)(Dt,{children:v.isError?`The request didn't go through. Try again.`:null})]}),(0,$.jsxs)(G,{className:`h-11 w-full`,disabled:e===``||v.isPending,type:`submit`,children:[v.isPending?(0,$.jsx)(tt,{className:`animate-spin motion-reduce:animate-none`,"data-icon":`inline-start`}):(0,$.jsx)(ut,{"data-icon":`inline-start`}),`Request this iPhone`]})]})}return l.data?.status===`local-console`?(0,$.jsx)(br,{status:`local-console`}):l.data?.status===`no-secret`?(0,$.jsx)(br,{secretName:l.data.secretName,status:`no-secret`}):(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,$.jsxs)(Ot,{children:[(0,$.jsx)(wt,{htmlFor:`ios-device-register-name`,children:`This iPhone's name`}),(0,$.jsx)(D,{autoComplete:`off`,className:`h-11`,id:`ios-device-register-name`,maxLength:100,onChange:e=>i(e.target.value),value:a})]}),l.data?.status===`issued`&&o===a.trim()?(0,$.jsxs)(`a`,{className:V({className:`h-auto min-h-11 w-full whitespace-normal`}),href:rt(or(),l.data.token),children:[(0,$.jsx)(ut,{"data-icon":`inline-start`}),`Install profile`]}):(0,$.jsx)(e,{"aria-label":`Preparing the profile`,className:`h-11 w-full`}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Safari only. Allow the download, then install it in Settings, where iOS calls it not signed. Safari comes back here, and nothing stays installed.`})]})})();return(0,$.jsxs)(xt,{className:`shadow-sm`,children:[(0,$.jsx)(vt,{className:`border-b px-4 py-3`,children:(0,$.jsx)(bt,{className:`text-sm`,children:(0,$.jsx)(`h2`,{children:`Register an iPhone`})})}),(0,$.jsx)(yt,{className:`p-4 sm:p-6`,children:te})]})}function Sr({search:e,onSearchChange:t}){let n=pe(),r=At(e.status),i=r.data,a=i?.devices,o=M(),s=()=>void o.invalidateQueries({queryKey:Lt.all}),[c,l]=(0,Q.useState)(null),u=Pt(),d=u?.ios===!0?u.udid?.toLowerCase()??null:null,f=()=>l(null),p=(0,$.jsx)(pn,{icon:ut,title:e.status===void 0?`No iPhones yet`:`No ${nr[e.status].toLowerCase()} iPhones`,children:e.status===void 0?(0,$.jsx)(`p`,{children:`Open this page on an iPhone to register it.`}):(0,$.jsx)(G,{className:`h-11 sm:h-8`,onClick:()=>t({}),size:`sm`,variant:`outline`,children:`Show all`})});return(0,$.jsxs)(`div`,{className:`flex h-svh min-h-0 min-w-0 flex-col`,children:[(0,$.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b bg-background px-3 py-3 sm:min-h-12 sm:flex-nowrap sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm`,children:[(0,$.jsx)(be,{className:`-ml-1 size-11 lg:size-7`}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(et,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,$.jsx)(`h1`,{className:`text-sm font-medium`,children:`Native builds`})]}),(0,$.jsx)(`p`,{className:`basis-full pl-12 text-xs text-muted-foreground sm:basis-auto sm:pl-0`,children:`The iPhones and iPads ad hoc builds install on. Android needs none.`})]}),(0,$.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-4 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:[(0,$.jsx)(hn,{current:`devices`}),(0,$.jsx)(xr,{phone:u,view:i}),i!==void 0&&!i.viewer.approversConfigured?(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5 text-xs text-muted-foreground`,children:[(0,$.jsx)(`p`,{children:`Nobody approves in this Console. Approve from a terminal:`}),(0,$.jsx)(Ve,{label:`the approve command`,value:ot})]}):null,(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsxs)(Qe,{items:[{label:`All statuses`,value:ir},...Object.keys(nr).map(e=>({label:nr[e],value:e}))],onValueChange:e=>t(e===null||e===ir?{}:{status:e}),value:e.status??ir,children:[(0,$.jsx)(Ge,{"aria-label":`Status`,className:`min-w-0 flex-1 text-xs data-[size=default]:h-11 sm:w-44 sm:flex-none sm:data-[size=default]:h-8`,children:(0,$.jsx)(Ye,{})}),(0,$.jsx)(Je,{children:(0,$.jsxs)(Xe,{children:[(0,$.jsx)(Ke,{value:ir,children:`All statuses`}),Object.keys(nr).map(e=>(0,$.jsx)(Ke,{value:e,children:nr[e]},e))]})})]}),(0,$.jsx)(G,{"aria-label":`Refresh iOS devices`,className:`ml-auto size-11 sm:size-7`,disabled:r.isFetching,onClick:s,size:`icon-sm`,variant:`ghost`,children:(0,$.jsx)(lt,{"aria-hidden":`true`})})]}),r.isError?(0,$.jsxs)(mt,{variant:`destructive`,children:[(0,$.jsx)(ht,{}),(0,$.jsx)(ft,{children:`iOS devices couldn't be loaded`}),(0,$.jsx)(pt,{children:`Check your connection and try again.`}),(0,$.jsx)(gt,{children:(0,$.jsxs)(G,{onClick:s,size:`xs`,variant:`outline`,children:[(0,$.jsx)(lt,{"data-icon":`inline-start`}),`Retry`]})})]}):(0,$.jsx)(sn,{className:`flex-none`,children:n?(0,$.jsx)(`div`,{"aria-busy":r.isPlaceholderData,"aria-label":`iOS devices`,className:`aria-busy:opacity-60`,role:`list`,children:r.isLoading?(0,$.jsx)(fn,{label:`Loading iOS devices`}):a?.length===0?(0,$.jsx)(ln,{children:p}):a?.map(e=>(0,$.jsx)(`div`,{className:`border-b last:border-b-0`,role:`listitem`,children:(0,$.jsx)(gr,{device:e,isThisIphone:e.udid===d,onOpen:l,viewer:i.viewer})},e.id))}):(0,$.jsx)(on,{"aria-busy":r.isPlaceholderData,"aria-label":`iOS devices`,className:`aria-busy:opacity-60`,header:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(nn,{children:`Name`}),(0,$.jsx)(nn,{children:`UDID`}),(0,$.jsx)(nn,{children:`Requested by`}),(0,$.jsx)(nn,{children:`Status`}),(0,$.jsx)(nn,{children:`Added`}),(0,$.jsx)(nn,{children:`Build`}),(0,$.jsx)(nn,{className:`text-right`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]}),children:r.isLoading?(0,$.jsx)(cn,{columns:ar+1,label:`Loading iOS devices`}):a?.length===0?(0,$.jsx)(un,{columns:ar+1,children:p}):a?.map(e=>(0,$.jsx)(hr,{device:e,isThisIphone:e.udid===d,onOpen:l,viewer:i.viewer},e.id))})})]}),c!==null&&c.kind!==`remove`?(0,$.jsx)(_r,{onClose:f,target:c},c.device.id):null,c?.kind===`remove`&&i!==void 0?(0,$.jsx)(vr,{device:c.device,onClose:f,viewer:i.viewer},c.device.id):null]})}function Cr(){let e=tn.useSearch(),t=tn.useNavigate();return(0,$.jsx)(Sr,{onSearchChange:e=>void t({search:e,replace:!0}),search:e})}export{Cr as component};
|