expo-device-hub 0.6.0 → 0.7.0

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.
@@ -188,7 +188,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
188
188
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.installOnUIRuntime=function(t){const o=globalThis?.expo?.installOnUIRuntime;if(!o)throw Error("Native method to install Expo Modules on the worklets UI runtime wasn't found in `expo-modules-core`.");o(t)}},142,[]);
189
189
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useEvent=function(u,s,c=null){const[o,f]=(0,t.useState)(c);return n(u,s,t=>f(t)),o},e.useEventListener=n;var t=r(d[0]);function n(n,u,s){const c=(0,t.useRef)(s);c.current=s,(0,t.useEffect)(()=>{const t=n.addListener(u,(...t)=>c.current(...t));return()=>t.remove()},[n,u,c])}},143,[38]);
190
190
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e},n=r(d[1]);function l(){return(0,n.jsx)(u.default,{dom:{scrollEnabled:!1}})}},144,[145,151]);
191
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return C}}),r(d[0]),r(d[1]);var t=r(d[2]),o=r(d[3]),s=r(d[4]),n=r(d[5]),l=r(d[6]),c=r(d[7]),u=r(d[8]),h=r(d[9]),f=r(d[10]),v=r(d[11]),p=r(d[12]),b=r(d[13]),D=r(d[14]),S=r(d[15]),O=r(d[16]),w=r(d[17]),y=r(d[18]),M=r(d[19]);function k(t,o){const s=new Set(t.map(t=>t.id));return[...t,...o.filter(t=>!s.has(t.id))]}const x=280,j=560,A=320;function R(t,o){const s=('undefined'==typeof window?1/0:window.innerWidth)-o-A,n=Math.max(x,Math.min(j,s));return Math.min(Math.max(t,x),n)}function C(x){const j=(0,f.useColorScheme)(),C=(0,y.dashboardPlatformFilter)(),{booted:I,recent:T}=(0,v.useDeviceLists)(),L=(0,D.useNewDeviceOptions)(),W=(0,h.useHideUnsupportedDevices)(),E=(0,u.useDashboardStore)(t=>t.selectedDeviceId),z=(0,u.useDashboardStore)(t=>t.selectDevice),_=(0,u.useDashboardStore)(t=>t.reconcileSelectedDevice),H=(0,u.useDashboardStore)(t=>t.addedDevices),F=(0,u.useDashboardStore)(t=>t.trackAddedDevice),P=(0,u.useDashboardStore)(t=>t.dismissDevice),U=(0,s.useMemo)(w.browserStreamModeAvailability,[]),N=(0,u.useDashboardStore)(t=>t.streamMode),B=(0,u.useDashboardStore)(t=>t.chooseStreamMode),[q,G]=(0,s.useState)(()=>'mjpeg'===N?'mjpeg':'h264'===N?'h264':'auto'),J=(0,u.useDashboardStore)(t=>t.sidebarWidths.left),K=(0,u.useDashboardStore)(t=>t.sidebarWidths.right),Q=(0,u.useDashboardStore)(t=>t.resizeSidebar),V=(0,s.useRef)(u.DEFAULT_SIDEBAR_WIDTH),X=(0,s.useRef)(u.DEFAULT_SIDEBAR_WIDTH),Y=(0,O.useSidebarLayout)({leftWidth:J,rightWidth:K,minStreamWidth:A}),Z=(0,s.useMemo)(()=>'android'===C?[]:k(I.simulators,H.filter(t=>'ios'===t.platform)),[I.simulators,H,C]),$=(0,s.useMemo)(()=>'ios'===C?[]:k(I.emulators,H.filter(t=>'android'===t.platform)),[I.emulators,H,C]),ee=(0,s.useMemo)(()=>(0,h.visibleDevices)(T.simulators,W),[T.simulators,W]),te=(0,s.useMemo)(()=>(0,h.visibleDevices)(T.emulators,W),[T.emulators,W]),ie=(0,s.useMemo)(()=>(0,h.visibleNewDeviceOptions)(L.ios,W),[L.ios,W]),oe=(0,s.useMemo)(()=>(0,h.visibleNewDeviceOptions)(L.android,W),[L.android,W]);async function re(t){const o='new'===t.kind?await(0,c.createDevice)(t.device):t.device.booted?{id:t.device.id,error:null}:await(0,c.bootDevice)(t.device);if(!o.id)return{ok:!1,error:o.error??'The device did not come online.'};const s='new'===t.kind?{id:o.id,name:t.device.name,version:t.device.version,platform:t.device.platform,physical:!1,booted:!0,supported:t.device.supported,lastUsedAt:Date.now()}:Object.assign({},t.device,{id:o.id,booted:!0,lastUsedAt:Date.now()}),n='new'===t.kind?[t.device.name,o.id]:[t.device.name,t.device.id,o.id];return F(s,n),{ok:!0}}async function se(t){await(0,c.shutdownDevice)(t),P(t.id)}async function de(t){await(0,c.removeDevice)(t),P(t.id)}(0,s.useEffect)(()=>{const t=document.documentElement;return t.classList.toggle('dark-theme','dark'===j),()=>t.classList.remove('dark-theme')},[j]),(0,s.useEffect)(()=>{const t=[...Z,...$];_(t.map(t=>t.id))},[Z,$,_]);const ae=[...Z,...$],ne=ae.find(t=>t.id===E)??ae[0],le='android'===ne?.platform?(0,w.androidStreamModeAvailability)(U,void 0!==window.MediaSource):U,ce=t=>{B(t,le)},ue=(0,t.useActiveDeviceClient)(ne?{platform:ne.platform,device:ne.id,streamMode:N}:null,(0,l.basePath)()),me=(0,b.useArgentInteractions)(),he=ne?me[ne.id]??null:null,fe=Object.keys(me);return(0,M.jsxs)("div",{ref:Y.containerRef,className:'dark'===j?'dark-theme':void 0,style:{display:'flex',position:'relative',flex:1,width:'100%',minWidth:0,height:'100vh',boxSizing:'border-box',backgroundColor:o.bg.subtle,color:o.text.default,fontFamily:'var(--expo-font-sans)',overflow:'hidden'},children:[(0,M.jsx)(n.AnimatedDockedSidebar,{side:"left",width:J,open:Y.leftDocked,sidebarOpen:Y.leftOpen,children:(0,M.jsx)(o.Sidebar,{simulators:Z,emulators:$,recentSimulators:ee,recentEmulators:te,simulatorOptions:ie,emulatorOptions:oe,agentDeviceIds:fe,selectedId:E,onSelect:z,onAddDevice:re,onToggle:Y.closeLeft,platform:C,width:J})}),Y.leftDocked&&(0,M.jsx)(o.ResizeHandle,{side:"left",offset:J,onResizeStart:()=>{V.current=J},onResize:t=>Q('left',R(V.current+t,Y.rightDocked?K:0))}),ne?(0,M.jsx)(o.StreamPanel,{device:ne,client:ue,agentInteraction:he,DeviceScreen:t.DeviceScreen,displayScreen:t.displayScreen,onShutdown:()=>se(ne),onRemove:()=>de(ne),framed:Y.containerWidth>=600}):(0,M.jsx)(o.EmptyState,{platform:C}),Y.rightDocked&&(0,M.jsx)(o.ResizeHandle,{side:"right",offset:K,onResizeStart:()=>{X.current=K},onResize:t=>Q('right',R(X.current+t,Y.leftDocked?J:0))}),(0,M.jsx)(n.AnimatedDockedSidebar,{side:"right",width:K,open:Y.rightDocked,sidebarOpen:Y.rightOpen,children:(0,M.jsx)(o.LogSidebar,{client:ue,streamMode:N,httpCodec:q,streamModeAvailability:le,onStreamModeChange:ce,onHttpCodecChange:G,onToggle:Y.closeRight,width:K})}),(0,M.jsx)(S.SidebarOverlay,{side:"left",open:Y.leftOverlay,sidebarOpen:Y.leftOpen,topmost:'left'===Y.lastOpened||!Y.rightOverlay,onDismiss:Y.closeLeft,children:(0,M.jsx)(o.Sidebar,{simulators:Z,emulators:$,recentSimulators:ee,recentEmulators:te,simulatorOptions:ie,emulatorOptions:oe,agentDeviceIds:fe,selectedId:E,onSelect:z,onAddDevice:re,onToggle:Y.closeLeft,platform:C,width:J})}),(0,M.jsx)(S.SidebarOverlay,{side:"right",open:Y.rightOverlay,sidebarOpen:Y.rightOpen,topmost:'right'===Y.lastOpened||!Y.leftOverlay,onDismiss:Y.closeRight,children:(0,M.jsx)(o.LogSidebar,{client:ue,streamMode:N,httpCodec:q,streamModeAvailability:le,onStreamModeChange:ce,onHttpCodecChange:G,onToggle:Y.closeRight,width:K})}),!Y.leftOpen&&(0,M.jsx)(p.FloatingSidebarToggle,{side:"left",inset:(0,p.floatingSidebarToggleInset)(Y.rightOverlay,Y.containerWidth,K),onClick:Y.openLeft}),!Y.rightOpen&&(0,M.jsx)(p.FloatingSidebarToggle,{side:"right",inset:(0,p.floatingSidebarToggleInset)(Y.leftOverlay,Y.containerWidth,J),onClick:Y.openRight})]})}},145,[146,147,148,181,38,321,323,325,327,334,335,336,338,339,342,343,344,333,345,151]);
191
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return I}}),r(d[0]),r(d[1]);var t=r(d[2]),o=r(d[3]),s=r(d[4]),n=r(d[5]),l=r(d[6]),c=r(d[7]),u=r(d[8]),h=r(d[9]),v=r(d[10]),f=r(d[11]),p=r(d[12]),b=r(d[13]),D=r(d[14]),S=r(d[15]),O=r(d[16]),w=r(d[17]),y=r(d[18]),M=r(d[19]),k=r(d[20]);function x(t,o){const s=new Set(t.map(t=>t.id));return[...t,...o.filter(t=>!s.has(t.id))]}const j=280,A=560,R=320;function C(t,o){const s=('undefined'==typeof window?1/0:window.innerWidth)-o-R,n=Math.max(j,Math.min(A,s));return Math.min(Math.max(t,j),n)}function I(j){const A=(0,f.useColorScheme)(),I=(0,l.dashboardHideBootDevice)(),T=(0,M.dashboardPlatformFilter)(),{booted:L,recent:W}=(0,p.useDeviceLists)(),E=(0,S.useNewDeviceOptions)(),z=(0,v.useHideUnsupportedDevices)(),H=(0,h.useDashboardStore)(t=>t.selectedDeviceId),_=(0,h.useDashboardStore)(t=>t.selectDevice),F=(0,h.useDashboardStore)(t=>t.reconcileSelectedDevice),P=(0,h.useDashboardStore)(t=>t.addedDevices),U=(0,h.useDashboardStore)(t=>t.trackAddedDevice),N=(0,h.useDashboardStore)(t=>t.dismissDevice),B=(0,s.useMemo)(y.browserStreamModeAvailability,[]),q=(0,h.useDashboardStore)(t=>t.streamMode),G=(0,h.useDashboardStore)(t=>t.chooseStreamMode),[J,K]=(0,s.useState)(()=>'mjpeg'===q?'mjpeg':'h264'===q?'h264':'auto'),Q=(0,h.useDashboardStore)(t=>t.sidebarWidths.left),V=(0,h.useDashboardStore)(t=>t.sidebarWidths.right),X=(0,h.useDashboardStore)(t=>t.resizeSidebar),Y=(0,s.useRef)(h.DEFAULT_SIDEBAR_WIDTH),Z=(0,s.useRef)(h.DEFAULT_SIDEBAR_WIDTH),$=(0,w.useSidebarLayout)({leftWidth:Q,rightWidth:V,minStreamWidth:R}),ee=(0,s.useMemo)(()=>'android'===T?[]:x(L.simulators,P.filter(t=>'ios'===t.platform)),[L.simulators,P,T]),te=(0,s.useMemo)(()=>'ios'===T?[]:x(L.emulators,P.filter(t=>'android'===t.platform)),[L.emulators,P,T]),ie=(0,s.useMemo)(()=>(0,v.visibleDevices)(W.simulators,z),[W.simulators,z]),oe=(0,s.useMemo)(()=>(0,v.visibleDevices)(W.emulators,z),[W.emulators,z]),re=(0,s.useMemo)(()=>(0,v.visibleNewDeviceOptions)(E.ios,z),[E.ios,z]),se=(0,s.useMemo)(()=>(0,v.visibleNewDeviceOptions)(E.android,z),[E.android,z]);async function de(t){const o='new'===t.kind?await(0,u.createDevice)(t.device):t.device.booted?{id:t.device.id,error:null}:await(0,u.bootDevice)(t.device);if(!o.id)return{ok:!1,error:o.error??'The device did not come online.'};const s='new'===t.kind?{id:o.id,name:t.device.name,version:t.device.version,platform:t.device.platform,physical:!1,booted:!0,supported:t.device.supported,lastUsedAt:Date.now()}:Object.assign({},t.device,{id:o.id,booted:!0,lastUsedAt:Date.now()}),n='new'===t.kind?[t.device.name,o.id]:[t.device.name,t.device.id,o.id];return U(s,n),{ok:!0}}async function ae(t){await(0,u.shutdownDevice)(t),N(t.id)}async function ne(t){await(0,u.removeDevice)(t),N(t.id)}(0,s.useEffect)(()=>{const t=document.documentElement;return t.classList.toggle('dark-theme','dark'===A),()=>t.classList.remove('dark-theme')},[A]),(0,s.useEffect)(()=>{const t=[...ee,...te];F(t.map(t=>t.id))},[ee,te,F]);const le=[...ee,...te],ce=le.find(t=>t.id===H)??le[0],ue='android'===ce?.platform?(0,y.androidStreamModeAvailability)(B,void 0!==window.MediaSource):B,me=t=>{G(t,ue)},he=(0,t.useActiveDeviceClient)(ce?{platform:ce.platform,device:ce.id,streamMode:q}:null,(0,c.basePath)()),ve=(0,D.useArgentInteractions)(),fe=ce?ve[ce.id]??null:null,ge=Object.keys(ve);return(0,k.jsxs)("div",{ref:$.containerRef,className:'dark'===A?'dark-theme':void 0,style:{display:'flex',position:'relative',flex:1,width:'100%',minWidth:0,height:'100vh',boxSizing:'border-box',backgroundColor:o.bg.subtle,color:o.text.default,fontFamily:'var(--expo-font-sans)',overflow:'hidden'},children:[(0,k.jsx)(n.AnimatedDockedSidebar,{side:"left",width:Q,open:$.leftDocked,sidebarOpen:$.leftOpen,children:(0,k.jsx)(o.Sidebar,{simulators:ee,emulators:te,recentSimulators:ie,recentEmulators:oe,simulatorOptions:re,emulatorOptions:se,agentDeviceIds:ge,selectedId:H,onSelect:_,onAddDevice:I?void 0:de,onToggle:$.closeLeft,platform:T,width:Q})}),$.leftDocked&&(0,k.jsx)(o.ResizeHandle,{side:"left",offset:Q,onResizeStart:()=>{Y.current=Q},onResize:t=>X('left',C(Y.current+t,$.rightDocked?V:0))}),ce?(0,k.jsx)(o.StreamPanel,{device:ce,client:he,agentInteraction:fe,DeviceScreen:t.DeviceScreen,displayScreen:t.displayScreen,onShutdown:()=>ae(ce),onRemove:()=>ne(ce),framed:$.containerWidth>=600}):(0,k.jsx)(o.EmptyState,{platform:T}),$.rightDocked&&(0,k.jsx)(o.ResizeHandle,{side:"right",offset:V,onResizeStart:()=>{Z.current=V},onResize:t=>X('right',C(Z.current+t,$.leftDocked?Q:0))}),(0,k.jsx)(n.AnimatedDockedSidebar,{side:"right",width:V,open:$.rightDocked,sidebarOpen:$.rightOpen,children:(0,k.jsx)(o.LogSidebar,{client:he,streamMode:q,httpCodec:J,streamModeAvailability:ue,onStreamModeChange:me,onHttpCodecChange:K,onToggle:$.closeRight,width:V})}),(0,k.jsx)(O.SidebarOverlay,{side:"left",open:$.leftOverlay,sidebarOpen:$.leftOpen,topmost:'left'===$.lastOpened||!$.rightOverlay,onDismiss:$.closeLeft,children:(0,k.jsx)(o.Sidebar,{simulators:ee,emulators:te,recentSimulators:ie,recentEmulators:oe,simulatorOptions:re,emulatorOptions:se,agentDeviceIds:ge,selectedId:H,onSelect:_,onAddDevice:I?void 0:de,onToggle:$.closeLeft,platform:T,width:Q})}),(0,k.jsx)(O.SidebarOverlay,{side:"right",open:$.rightOverlay,sidebarOpen:$.rightOpen,topmost:'right'===$.lastOpened||!$.leftOverlay,onDismiss:$.closeRight,children:(0,k.jsx)(o.LogSidebar,{client:he,streamMode:q,httpCodec:J,streamModeAvailability:ue,onStreamModeChange:me,onHttpCodecChange:K,onToggle:$.closeRight,width:V})}),!$.leftOpen&&(0,k.jsx)(b.FloatingSidebarToggle,{side:"left",inset:(0,b.floatingSidebarToggleInset)($.rightOverlay,$.containerWidth,V),onClick:$.openLeft}),!$.rightOpen&&(0,k.jsx)(b.FloatingSidebarToggle,{side:"right",inset:(0,b.floatingSidebarToggleInset)($.leftOverlay,$.containerWidth,Q),onClick:$.openRight})]})}},145,[146,147,148,181,38,322,324,325,327,329,336,337,338,340,341,344,345,346,335,347,151]);
192
192
  __d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, dependencyMap) {},146,[]);
193
193
  __d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, dependencyMap) {},147,[]);
194
194
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DeviceScreen",{enumerable:!0,get:function(){return n.DeviceScreen}}),Object.defineProperty(e,"AGENT_INTERACTION_IDLE_TIMEOUT_MS",{enumerable:!0,get:function(){return c.AGENT_INTERACTION_IDLE_TIMEOUT_MS}}),Object.defineProperty(e,"agentInteractionCursorExpiresAt",{enumerable:!0,get:function(){return c.agentInteractionCursorExpiresAt}}),Object.defineProperty(e,"agentInteractionEndMs",{enumerable:!0,get:function(){return c.agentInteractionEndMs}}),Object.defineProperty(e,"agentInteractionPointsAt",{enumerable:!0,get:function(){return c.agentInteractionPointsAt}}),Object.defineProperty(e,"displayScreen",{enumerable:!0,get:function(){return u.displayScreen}}),Object.defineProperty(e,"streamGeometry",{enumerable:!0,get:function(){return u.streamGeometry}}),Object.defineProperty(e,"useIosDeviceClient",{enumerable:!0,get:function(){return o.useIosDeviceClient}}),Object.defineProperty(e,"useAndroidDeviceClient",{enumerable:!0,get:function(){return f.useAndroidDeviceClient}}),Object.defineProperty(e,"useActiveDeviceClient",{enumerable:!0,get:function(){return b.useActiveDeviceClient}});var t=r(d[0]);Object.keys(t).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=r(d[1]),c=r(d[2]),u=r(d[3]),o=r(d[4]),f=r(d[5]),b=r(d[6])},148,[149,150,155,153,157,173,179]);
@@ -234,7 +234,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
234
234
  __d(function(g,_r,_i,a,m,e,d){"use strict";function t(t){return new Uint8Array([t>>8&255,255&t])}function n(t){return new Uint8Array([t>>>24&255,t>>>16&255,t>>>8&255,255&t])}function i(t){const i=Math.floor(t/4294967296),s=t>>>0;return new Uint8Array([...n(i),...n(s)])}function s(t){return new Uint8Array([t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)])}function r(t){let n=0;for(const i of t)n+=i.byteLength;const i=new Uint8Array(n);let s=0;for(const n of t)i.set(n,s),s+=n.byteLength;return i}function o(t,...i){const o=r(i);return r([n(8+o.byteLength),s(t),o])}function*h(t){const n=t.length,i=i=>{for(let s=i;s+2<n;s++)if(0===t[s]&&0===t[s+1]){if(1===t[s+2])return{pos:s,len:3};if(s+3<n&&0===t[s+2]&&1===t[s+3])return{pos:s,len:4}}return null};let s=i(0);for(;s;){const r=s.pos+s.len,o=i(r),h=o?o.pos:n;h>r&&(yield t.subarray(r,h)),s=o}}function u(t){const n=[];for(let i=0;i<t.length;i++)i+2<t.length&&0===t[i]&&0===t[i+1]&&3===t[i+2]?(n.push(0,0),i+=2):n.push(t[i]);return new Uint8Array(n)}Object.defineProperty(e,'__esModule',{value:!0}),e.codecStringFromSps=y,Object.defineProperty(e,"FragmentedMp4Muxer",{enumerable:!0,get:function(){return w}});class c{pos=0;constructor(t){this.data=t}bit(){const t=(this.data[this.pos>>3]??0)>>7-(7&this.pos)&1;return this.pos++,t}bits(t){let n=0;for(let i=0;i<t;i++)n=n<<1|this.bit();return n>>>0}ue(){let t=0;for(;0===this.bit()&&t<32;)t++;return 0===t?0:(1<<t)-1+this.bits(t)}se(){const t=this.ue();return 1&t?t+1>>1:-(t>>1)}}const l=new Set([100,110,122,244,44,83,86,118,128,138,139,134,135]);function f(t,n){let i=8,s=8;for(let r=0;r<n;r++){if(0!==s){s=(i+t.se()+256)%256}i=0===s?i:s}}function b(t){const n=new c(u(t.subarray(1))),i=n.bits(8);n.bits(8),n.bits(8),n.ue();let s=1;if(l.has(i)&&(s=n.ue(),3===s&&n.bit(),n.ue(),n.ue(),n.bit(),n.bit())){const t=3!==s?8:12;for(let i=0;i<t;i++)n.bit()&&f(n,i<6?16:64)}n.ue();const r=n.ue();if(0===r)n.ue();else if(1===r){n.bit(),n.se(),n.se();const t=n.ue();for(let i=0;i<t;i++)n.se()}n.ue(),n.bit();const o=n.ue(),h=n.ue(),b=n.bit();b||n.bit(),n.bit();let y=0,p=0,w=0,A=0;n.bit()&&(y=n.ue(),p=n.ue(),w=n.ue(),A=n.ue());const U=16*(o+1),v=(2-b)*(h+1)*16,L=0===s?1:0===s?1:2,M=(0===s?1:0===s?1:2)*(2-b);return{width:Math.max(0,U-L*(y+p)),height:Math.max(0,v-M*(w+A))}}function y(t){const n=t=>t.toString(16).padStart(2,'0');return`avc1.${n(t[1])}${n(t[2])}${n(t[3])}`}const p=r([n(65536),n(0),n(0),n(0),n(65536),n(0),n(0),n(0),n(1073741824)]);class w{sps=null;pps=null;codecKey='';width=0;height=0;seq=1;baseMediaDecodeTime=0;prevPtsTicks=null;get codec(){return this.sps?y(this.sps):null}get ready(){return!!this.sps&&!!this.pps}append(t,n,i){const s=[];let r,o=null,u=null;for(const n of h(t)){const t=31&n[0];7===t?o=n.slice():8===t?u=n.slice():t>=1&&t<=6&&s.push(n)}if(o&&u){const t=`${o.join(',')}|${u.join(',')}`;if(t!==this.codecKey){this.sps=o,this.pps=u,this.codecKey=t;const n=b(o);this.width=n.width,this.height=n.height,r=this.buildInit()}}if(!this.ready||0===s.length)return{init:r};const c=null==i?null:Math.round(9e4*i/1e6);let l=3e3;if(null!=c&&null!=this.prevPtsTicks){const t=c-this.prevPtsTicks;l=t>0?Math.min(t,45e4):3e3}null!=c&&(this.prevPtsTicks=c);return{init:r,segment:this.buildSegment(s,n,l)}}get dimensions(){return this.width&&this.height?{width:this.width,height:this.height}:null}buildInit(){const i=this.sps,h=this.pps,u=o('avcC',new Uint8Array([1,i[1],i[2],i[3],255,225]),t(i.byteLength),i,new Uint8Array([1]),t(h.byteLength),h),c=o('avc1',new Uint8Array(6),t(1),new Uint8Array(16),t(this.width),t(this.height),n(4718592),n(4718592),n(0),t(1),new Uint8Array(32),t(24),new Uint8Array([255,255]),u),l=o('stbl',o('stsd',n(0),n(1),c),o('stts',n(0),n(0)),o('stsc',n(0),n(0)),o('stsz',n(0),n(0),n(0)),o('stco',n(0),n(0))),f=o('dinf',o('dref',n(0),n(1),o('url ',n(1)))),b=o('minf',o('vmhd',n(1),n(0),n(0)),f,l),y=o('mdhd',n(0),n(0),n(0),n(9e4),n(0),t(21956),t(0)),w=o('hdlr',n(0),n(0),s('vide'),n(0),n(0),n(0),new Uint8Array([...s('Vide'),...s('oHan'),...s('dler'),0])),A=o('mdia',y,w,b),U=o('tkhd',new Uint8Array([0,0,0,7]),n(0),n(0),n(1),n(0),n(0),n(0),n(0),t(0),t(0),t(0),t(0),p,n(this.width<<16),n(this.height<<16)),v=o('trak',U,A),L=o('mvhd',n(0),n(0),n(0),n(1e3),n(0),n(65536),t(256),t(0),n(0),n(0),p,n(0),n(0),n(0),n(0),n(0),n(0),n(2)),M=o('trex',n(0),n(1),n(1),n(0),n(0),n(0)),S=o('moov',L,v,o('mvex',M));return r([o('ftyp',s('isom'),n(0),s('isom'),s('iso6'),s('avc1'),s('mp41')),S])}buildSegment(t,s,h){let u=0;for(const n of t)u+=4+n.byteLength;const c=new Uint8Array(u);let l=0;for(const i of t)c.set(n(i.byteLength),l),l+=4,c.set(i,l),l+=i.byteLength;const f=o('mfhd',n(0),n(this.seq++)),b=o('tfhd',new Uint8Array([0,2,0,0]),n(1)),y=o('tfdt',new Uint8Array([1,0,0,0]),i(this.baseMediaDecodeTime)),p=o('trun',new Uint8Array([0,0,7,1]),n(1),n(0),n(h),n(u),n(s?33554432:16842752)),w=o('moof',f,o('traf',b,y,p));return new DataView(w.buffer,w.byteOffset,w.byteLength).setInt32(w.byteLength-16,w.byteLength+8,!1),this.baseMediaDecodeTime+=h,r([w,o('mdat',c)])}}},178,[]);
235
235
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useActiveDeviceClient=function(s,u){const c='ios'===s?.platform,v='android'===s?.platform,_=(0,o.useIosDeviceClient)({enabled:c,baseUrl:c?(0,n.endpointFor)('ios',u):null,device:c?s?.device??null:null,streamMode:s?.streamMode}),b=(0,l.useAndroidDeviceClient)({enabled:v,baseUrl:v?(0,n.endpointFor)('android',u):null,device:v?s?.device??null:null,streamMode:s?.streamMode});return c?_:v?b:t.NOOP_DEVICE_CLIENT};var n=r(d[0]),l=r(d[1]),o=r(d[2]),t=r(d[3])},179,[161,173,157,180]);
236
236
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"NOOP_DEVICE_CLIENT",{enumerable:!0,get:function(){return t}});const t={platform:'ios',status:'idle',error:null,screen:null,fps:0,devices:[],logs:[],logsEnabled:!1,attachLogs:()=>{},detachLogs:()=>{},clearLogs:()=>{},events:[],eventsEnabled:!1,attachEvents:()=>{},detachEvents:()=>{},clearEvents:()=>{},activity:null,deviceSettings:null,deviceSettingsPending:new Set,setDeviceSetting:()=>{},streamCapabilities:null,streamSettings:null,streamSettingsPending:!1,updateStreamSettings:()=>{},webRtcCodec:'h264',setWebRtcCodec:()=>{},capabilities:{deviceSettings:!1,activity:!1,events:!1,streamSettings:!1},foregroundApp:null,videoKind:'img',attachVideo:()=>{},sendTouch:()=>{},sendKey:()=>!1,pressButton:()=>{},reload:()=>{},rotate:()=>{},screenshot:async()=>null,appearance:null,setAppearance:()=>{},hardwareKeyboardConnected:null,setHardwareKeyboardConnected:()=>{},toggleSoftwareKeyboard:()=>{}}},180,[]);
237
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"Button",{enumerable:!0,get:function(){return t.Button}}),Object.defineProperty(e,"ControlButton",{enumerable:!0,get:function(){return n.ControlButton}}),Object.defineProperty(e,"DeviceListItem",{enumerable:!0,get:function(){return o.DeviceListItem}}),Object.defineProperty(e,"DialogRoot",{enumerable:!0,get:function(){return u.DialogRoot}}),Object.defineProperty(e,"DialogContent",{enumerable:!0,get:function(){return u.DialogContent}}),Object.defineProperty(e,"DialogTitle",{enumerable:!0,get:function(){return u.DialogTitle}}),Object.defineProperty(e,"DialogContentContainer",{enumerable:!0,get:function(){return u.DialogContentContainer}}),Object.defineProperty(e,"DialogFooter",{enumerable:!0,get:function(){return u.DialogFooter}}),Object.defineProperty(e,"DialogClose",{enumerable:!0,get:function(){return u.DialogClose}}),Object.defineProperty(e,"Dropdown",{enumerable:!0,get:function(){return c.Dropdown}}),Object.defineProperty(e,"DropdownItem",{enumerable:!0,get:function(){return b.DropdownItem}}),Object.defineProperty(e,"Logo",{enumerable:!0,get:function(){return f.Logo}}),Object.defineProperty(e,"ResizeHandle",{enumerable:!0,get:function(){return l.ResizeHandle}}),Object.defineProperty(e,"SegmentedControl",{enumerable:!0,get:function(){return p.SegmentedControl}}),Object.defineProperty(e,"Select",{enumerable:!0,get:function(){return y.Select}}),Object.defineProperty(e,"SidebarToggle",{enumerable:!0,get:function(){return O.SidebarToggle}}),Object.defineProperty(e,"Switch",{enumerable:!0,get:function(){return P.Switch}}),Object.defineProperty(e,"cx",{enumerable:!0,get:function(){return j.cx}}),Object.defineProperty(e,"Sidebar",{enumerable:!0,get:function(){return D.Sidebar}}),Object.defineProperty(e,"LogSidebar",{enumerable:!0,get:function(){return C.LogSidebar}}),Object.defineProperty(e,"StreamPanel",{enumerable:!0,get:function(){return v.StreamPanel}}),Object.defineProperty(e,"EmptyState",{enumerable:!0,get:function(){return L.EmptyState}}),Object.defineProperty(e,"DeviceSection",{enumerable:!0,get:function(){return w.DeviceSection}}),Object.defineProperty(e,"OutputSection",{enumerable:!0,get:function(){return h.OutputSection}}),Object.defineProperty(e,"CurrentAppSection",{enumerable:!0,get:function(){return E.CurrentAppSection}}),Object.defineProperty(e,"DeviceOptionsSection",{enumerable:!0,get:function(){return R.DeviceOptionsSection}}),Object.defineProperty(e,"ActivitySection",{enumerable:!0,get:function(){return B.ActivitySection}}),Object.defineProperty(e,"EventsSection",{enumerable:!0,get:function(){return M.EventsSection}}),Object.defineProperty(e,"LogsSection",{enumerable:!0,get:function(){return A.LogsSection}}),Object.defineProperty(e,"CollapsibleSection",{enumerable:!0,get:function(){return F.CollapsibleSection}}),Object.defineProperty(e,"KeyboardSection",{enumerable:!0,get:function(){return I.KeyboardSection}}),Object.defineProperty(e,"PhoneFrame",{enumerable:!0,get:function(){return T.PhoneFrame}}),Object.defineProperty(e,"LogControls",{enumerable:!0,get:function(){return _.LogControls}}),Object.defineProperty(e,"LogList",{enumerable:!0,get:function(){return k.LogList}}),Object.defineProperty(e,"LogRow",{enumerable:!0,get:function(){return x.LogRow}}),Object.defineProperty(e,"StreamControls",{enumerable:!0,get:function(){return z.StreamControls}}),Object.defineProperty(e,"StreamSection",{enumerable:!0,get:function(){return H.StreamSection}}),Object.defineProperty(e,"StreamOptionsSection",{enumerable:!0,get:function(){return K.StreamOptionsSection}}),Object.defineProperty(e,"RecentDevicesModal",{enumerable:!0,get:function(){return q.RecentDevicesModal}}),Object.defineProperty(e,"BootErrorModal",{enumerable:!0,get:function(){return G.BootErrorModal}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),u=r(d[3]),c=r(d[4]),b=r(d[5]),f=r(d[6]),l=r(d[7]),p=r(d[8]),y=r(d[9]),O=r(d[10]),P=r(d[11]),j=r(d[12]),S=r(d[13]);Object.keys(S).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return S[t]}})});var s=r(d[14]);Object.keys(s).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}})});var D=r(d[15]),C=r(d[16]),v=r(d[17]),L=r(d[18]),w=r(d[19]),h=r(d[20]),E=r(d[21]),R=r(d[22]),B=r(d[23]),M=r(d[24]),A=r(d[25]),F=r(d[26]),I=r(d[27]),T=r(d[28]),_=r(d[29]),k=r(d[30]),x=r(d[31]),z=r(d[32]),H=r(d[33]),K=r(d[34]),q=r(d[35]),G=r(d[36]),J=r(d[37]);Object.keys(J).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return J[t]}})})},181,[182,184,185,189,248,263,264,265,266,267,291,292,247,186,183,293,297,311,316,295,317,300,302,298,305,309,299,303,312,306,307,308,315,318,310,296,319,320]);
237
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"Button",{enumerable:!0,get:function(){return t.Button}}),Object.defineProperty(e,"ControlButton",{enumerable:!0,get:function(){return n.ControlButton}}),Object.defineProperty(e,"DeviceListItem",{enumerable:!0,get:function(){return o.DeviceListItem}}),Object.defineProperty(e,"DialogRoot",{enumerable:!0,get:function(){return u.DialogRoot}}),Object.defineProperty(e,"DialogContent",{enumerable:!0,get:function(){return u.DialogContent}}),Object.defineProperty(e,"DialogTitle",{enumerable:!0,get:function(){return u.DialogTitle}}),Object.defineProperty(e,"DialogContentContainer",{enumerable:!0,get:function(){return u.DialogContentContainer}}),Object.defineProperty(e,"DialogFooter",{enumerable:!0,get:function(){return u.DialogFooter}}),Object.defineProperty(e,"DialogClose",{enumerable:!0,get:function(){return u.DialogClose}}),Object.defineProperty(e,"Dropdown",{enumerable:!0,get:function(){return c.Dropdown}}),Object.defineProperty(e,"DropdownItem",{enumerable:!0,get:function(){return b.DropdownItem}}),Object.defineProperty(e,"Logo",{enumerable:!0,get:function(){return f.Logo}}),Object.defineProperty(e,"ResizeHandle",{enumerable:!0,get:function(){return l.ResizeHandle}}),Object.defineProperty(e,"SegmentedControl",{enumerable:!0,get:function(){return p.SegmentedControl}}),Object.defineProperty(e,"Select",{enumerable:!0,get:function(){return y.Select}}),Object.defineProperty(e,"SidebarToggle",{enumerable:!0,get:function(){return O.SidebarToggle}}),Object.defineProperty(e,"Switch",{enumerable:!0,get:function(){return P.Switch}}),Object.defineProperty(e,"cx",{enumerable:!0,get:function(){return j.cx}}),Object.defineProperty(e,"Sidebar",{enumerable:!0,get:function(){return D.Sidebar}}),Object.defineProperty(e,"LogSidebar",{enumerable:!0,get:function(){return C.LogSidebar}}),Object.defineProperty(e,"StreamPanel",{enumerable:!0,get:function(){return v.StreamPanel}}),Object.defineProperty(e,"DeviceTitle",{enumerable:!0,get:function(){return L.DeviceTitle}}),Object.defineProperty(e,"EmptyState",{enumerable:!0,get:function(){return w.EmptyState}}),Object.defineProperty(e,"DeviceSection",{enumerable:!0,get:function(){return h.DeviceSection}}),Object.defineProperty(e,"OutputSection",{enumerable:!0,get:function(){return E.OutputSection}}),Object.defineProperty(e,"CurrentAppSection",{enumerable:!0,get:function(){return R.CurrentAppSection}}),Object.defineProperty(e,"DeviceOptionsSection",{enumerable:!0,get:function(){return B.DeviceOptionsSection}}),Object.defineProperty(e,"ActivitySection",{enumerable:!0,get:function(){return T.ActivitySection}}),Object.defineProperty(e,"EventsSection",{enumerable:!0,get:function(){return M.EventsSection}}),Object.defineProperty(e,"LogsSection",{enumerable:!0,get:function(){return A.LogsSection}}),Object.defineProperty(e,"CollapsibleSection",{enumerable:!0,get:function(){return F.CollapsibleSection}}),Object.defineProperty(e,"KeyboardSection",{enumerable:!0,get:function(){return I.KeyboardSection}}),Object.defineProperty(e,"PhoneFrame",{enumerable:!0,get:function(){return _.PhoneFrame}}),Object.defineProperty(e,"LogControls",{enumerable:!0,get:function(){return k.LogControls}}),Object.defineProperty(e,"LogList",{enumerable:!0,get:function(){return x.LogList}}),Object.defineProperty(e,"LogRow",{enumerable:!0,get:function(){return z.LogRow}}),Object.defineProperty(e,"StreamControls",{enumerable:!0,get:function(){return H.StreamControls}}),Object.defineProperty(e,"StreamSection",{enumerable:!0,get:function(){return K.StreamSection}}),Object.defineProperty(e,"StreamOptionsSection",{enumerable:!0,get:function(){return q.StreamOptionsSection}}),Object.defineProperty(e,"RecentDevicesModal",{enumerable:!0,get:function(){return G.RecentDevicesModal}}),Object.defineProperty(e,"BootErrorModal",{enumerable:!0,get:function(){return J.BootErrorModal}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),u=r(d[3]),c=r(d[4]),b=r(d[5]),f=r(d[6]),l=r(d[7]),p=r(d[8]),y=r(d[9]),O=r(d[10]),P=r(d[11]),j=r(d[12]),S=r(d[13]);Object.keys(S).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return S[t]}})});var s=r(d[14]);Object.keys(s).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}})});var D=r(d[15]),C=r(d[16]),v=r(d[17]),L=r(d[18]),w=r(d[19]),h=r(d[20]),E=r(d[21]),R=r(d[22]),B=r(d[23]),T=r(d[24]),M=r(d[25]),A=r(d[26]),F=r(d[27]),I=r(d[28]),_=r(d[29]),k=r(d[30]),x=r(d[31]),z=r(d[32]),H=r(d[33]),K=r(d[34]),q=r(d[35]),G=r(d[36]),J=r(d[37]),N=r(d[38]);Object.keys(N).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return N[t]}})})},181,[182,184,185,189,248,263,264,265,266,267,291,292,247,186,183,293,297,311,312,317,295,318,300,302,298,305,309,299,303,313,306,307,308,316,319,310,296,320,321]);
238
238
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.Button=function({children:n,theme:l="primary",size:u="sm",leftSlot:b,rightSlot:h,block:x=!1,disabled:y=!1,type:p="button",href:v,target:j,onClick:f,className:k,style:S}){const[O,z]=(0,s.useState)(!1),[I,R]=(0,s.useState)(!1),C=o[l],B=Object.assign({display:'inline-flex',alignItems:'center',justifyContent:'center',gap:'2xs'===u?4:'xs'===u?6:8,border:'1px solid',fontWeight:500,whiteSpace:'nowrap',cursor:y?'default':'pointer',textDecoration:'none',transition:'background-color 150ms ease, transform 100ms ease, opacity 150ms ease',width:x?'100%':void 0,transform:!y&&I?'scale(0.98)':void 0},c[u],{backgroundColor:y?C.disabledBackground:O?C.hover:C.background,borderColor:y?C.disabledBorder:C.border,color:y?C.disabledText:C.text,opacity:y?.8:1,pointerEvents:y?'none':void 0},S),M=(0,t.jsxs)(t.Fragment,{children:[b,null!=n&&(0,t.jsx)("span",{style:{display:'flex',lineHeight:1},children:n}),h]}),w={onMouseEnter:()=>z(!0),onMouseLeave:()=>{z(!1),R(!1)},onMouseDown:()=>R(!0),onMouseUp:()=>R(!1)};if(v)return(0,t.jsx)("a",Object.assign({href:y?void 0:v,target:j,className:k,style:B,onClick:y?void 0:f},w,{children:M}));return(0,t.jsx)("button",Object.assign({type:p,className:k,style:B,disabled:y,onClick:y?void 0:f},w,{children:M}))};var t=r(d[0]),s=r(d[1]),n=r(d[2]);const o={primary:l('primary'),secondary:l('secondary'),tertiary:l('tertiary'),quaternary:l('quaternary'),'primary-destructive':l('primary-destructive'),'secondary-destructive':l('secondary-destructive'),'tertiary-destructive':l('tertiary-destructive'),'agent-overlay':l('agent-overlay')};function l(t){const s=s=>`var(--expo-theme-button-${t}-${s})`;return{background:s('background'),hover:s('hover'),text:s('text'),border:s('border'),disabledBackground:s('disabled-background'),disabledBorder:s('disabled-border'),disabledText:s('disabled-text')}}const c={'2xs':Object.assign({height:28,paddingInline:8,borderRadius:n.radius.lg},n.textSize.xs),xs:Object.assign({height:32,paddingInline:12,borderRadius:n.radius.lg},n.textSize.xs),sm:Object.assign({height:36,paddingInline:16,borderRadius:n.radius.lg},n.textSize.sm),md:Object.assign({height:40,paddingInline:16,borderRadius:n.radius.lg},n.textSize.sm),lg:Object.assign({height:44,paddingInline:24,borderRadius:n.radius.lg},n.textSize.base),xl:Object.assign({height:48,paddingInline:24,borderRadius:n.radius.lg},n.textSize.base),'2xl':Object.assign({height:60,paddingInline:24,borderRadius:n.radius.lg},n.textSize.lg)}},182,[151,38,183]);
239
239
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"bg",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"text",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"icon",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"border",{enumerable:!0,get:function(){return x}}),Object.defineProperty(e,"radius",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"font",{enumerable:!0,get:function(){return h}}),Object.defineProperty(e,"textSize",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"heading",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"tokens",{enumerable:!0,get:function(){return u}});const t={default:'var(--expo-theme-background-default)',screen:'var(--expo-theme-background-screen)',subtle:'var(--expo-theme-background-subtle)',element:'var(--expo-theme-background-element)',hover:'var(--expo-theme-background-hover)',selected:'var(--expo-theme-background-selected)',overlay:'var(--expo-theme-background-overlay)',success:'var(--expo-theme-background-success)',warning:'var(--expo-theme-background-warning)',danger:'var(--expo-theme-background-danger)',info:'var(--expo-theme-background-info)',preview:'var(--expo-theme-background-preview)'},n={default:'var(--expo-theme-text-default)',secondary:'var(--expo-theme-text-secondary)',tertiary:'var(--expo-theme-text-tertiary)',quaternary:'var(--expo-theme-text-quaternary)',link:'var(--expo-theme-text-link)',success:'var(--expo-theme-text-success)',warning:'var(--expo-theme-text-warning)',danger:'var(--expo-theme-text-danger)',info:'var(--expo-theme-text-info)',preview:'var(--expo-theme-text-preview)'},o={default:'var(--expo-theme-icon-default)',secondary:'var(--expo-theme-icon-secondary)',tertiary:'var(--expo-theme-icon-tertiary)',quaternary:'var(--expo-theme-icon-quaternary)',success:'var(--expo-theme-icon-success)',warning:'var(--expo-theme-icon-warning)',danger:'var(--expo-theme-icon-danger)',info:'var(--expo-theme-icon-info)',preview:'var(--expo-theme-icon-preview)'},x={default:'var(--expo-theme-border-default)',secondary:'var(--expo-theme-border-secondary)',success:'var(--expo-theme-border-success)',warning:'var(--expo-theme-border-warning)',danger:'var(--expo-theme-border-danger)',info:'var(--expo-theme-border-info)',preview:'var(--expo-theme-border-preview)'},p={none:'0',xs:'var(--expo-radius-xs)',sm:'var(--expo-radius-sm)',md:'var(--expo-radius-md)',lg:'var(--expo-radius-lg)',xl:'var(--expo-radius-xl)','2xl':'var(--expo-radius-2xl)','3xl':'var(--expo-radius-3xl)',full:'var(--expo-radius-full)'},c={none:'var(--expo-theme-shadows-none)',xs:'var(--expo-theme-shadows-xs)',sm:'var(--expo-theme-shadows-sm)',md:'var(--expo-theme-shadows-md)',lg:'var(--expo-theme-shadows-lg)',xl:'var(--expo-theme-shadows-xl)'},h={sans:'var(--expo-font-sans)',mono:'var(--expo-font-mono)'},l={'2xl':{fontSize:24,fontWeight:500,lineHeight:1.2,letterSpacing:'-0.5px'},xl:{fontSize:20,fontWeight:500,lineHeight:1.2,letterSpacing:'-0.25px'},lg:{fontSize:18,fontWeight:400,lineHeight:1.4,letterSpacing:'0'},base:{fontSize:16,fontWeight:400,lineHeight:1.6,letterSpacing:'0'},sm:{fontSize:14,fontWeight:400,lineHeight:1.6,letterSpacing:'0'},xs:{fontSize:12,fontWeight:400,lineHeight:1.6,letterSpacing:'0'},'2xs':{fontSize:10,fontWeight:500,lineHeight:1.6,letterSpacing:'0'}},s={'5xl':{fontSize:64,fontWeight:600,lineHeight:1.1,letterSpacing:'-3px'},'4xl':{fontSize:48,fontWeight:600,lineHeight:1.1,letterSpacing:'-2px'},'3xl':{fontSize:32,fontWeight:600,lineHeight:1.1,letterSpacing:'-0.5px'},'2xl':{fontSize:24,fontWeight:600,lineHeight:1.2,letterSpacing:'-0.5px'},xl:{fontSize:20,fontWeight:600,lineHeight:1.4,letterSpacing:'-0.25px'},lg:{fontSize:18,fontWeight:600,lineHeight:1.4,letterSpacing:'0'},base:{fontSize:16,fontWeight:600,lineHeight:1.4,letterSpacing:'0'},sm:{fontSize:14,fontWeight:600,lineHeight:1.4,letterSpacing:'0'},xs:{fontSize:12,fontWeight:600,lineHeight:1.6,letterSpacing:'0'}},u={bg:t,text:n,icon:o,border:x,radius:p,shadow:c,font:h,textSize:l,heading:s}},183,[]);
240
240
  __d(function(g,r,i,a,m,_e,d){"use strict";const e=["icon","label","variant","style","onMouseEnter","onMouseLeave","onMouseDown","onMouseUp"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ControlButton",{enumerable:!0,get:function(){return c}});var n,o=r(d[0]),t=(n=o)&&n.__esModule?n:{default:n},s=r(d[1]),l=r(d[2]),u=r(d[3]);const c=(0,l.forwardRef)(function(n,o){let{icon:c,label:f,variant:b="default",style:p,onMouseEnter:y,onMouseLeave:x,onMouseDown:M,onMouseUp:j}=n,v=(0,t.default)(n,e);const[h,_]=(0,l.useState)(!1),[w,O]=(0,l.useState)(!1),D='primary'===b,S=D?60:32,k={display:'flex',alignItems:'center',justifyContent:'center',width:S,height:S,borderRadius:u.radius.full,boxSizing:'border-box',border:D?'none':`1px solid ${u.border.default}`,backgroundColor:D?u.text.default:h?u.bg.element:'transparent',color:D?u.bg.default:u.icon.default,opacity:D&&h?.85:1,transition:'background-color 150ms ease, opacity 150ms ease, transform 100ms ease',transform:w?'scale(0.98)':void 0};return(0,s.jsxs)("button",Object.assign({ref:o,type:"button",onMouseEnter:e=>{_(!0),y?.(e)},onMouseLeave:e=>{_(!1),O(!1),x?.(e)},onMouseDown:e=>{O(!0),M?.(e)},onMouseUp:e=>{O(!1),j?.(e)},style:Object.assign({display:'flex',flexDirection:'column',alignItems:'center',gap:6,padding:0,border:'none',background:'none',cursor:'pointer',fontFamily:'inherit'},p)},v,{children:[(0,s.jsx)("span",{style:k,children:c}),(0,s.jsx)("span",{style:Object.assign({},u.textSize['2xs'],{color:u.text.secondary,textAlign:'center'}),children:f})]}))})},184,[131,151,38,183]);
@@ -346,7 +346,7 @@ __d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule'
346
346
  __d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"usePrevious",{enumerable:!0,get:function(){return u}});var e=(function(e){if(e&&e.__esModule)return e;var u={};return e&&Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(u,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),u.default=e,u})(r(_d[0]));function u(u){const t=e.useRef({value:u,previous:u});return e.useMemo(()=>(t.current.value!==u&&(t.current.previous=t.current.value,t.current.value=u),t.current.previous),[u])}(0,Object.defineProperty)(u,"name",{value:"usePrevious",configurable:!0})},290,[38]);
347
347
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.SidebarToggle=function({onClick:l,floating:u=!1,side:c="left"}){const[b,f]=(0,n.useState)(!1),[h,p]=(0,n.useState)(!1),y=u?{width:40,height:40,borderRadius:t.radius.lg,border:'none',backgroundColor:b?t.bg.element:'transparent'}:{width:32,height:32,borderRadius:t.radius.md,border:'none',backgroundColor:b?t.bg.element:'transparent'};return(0,o.jsx)("button",{type:"button","aria-label":"Toggle sidebar",onClick:l,onMouseEnter:()=>f(!0),onMouseLeave:()=>{f(!1),p(!1)},onMouseDown:()=>p(!0),onMouseUp:()=>p(!1),style:Object.assign({display:'flex',alignItems:'center',justifyContent:'center',padding:0,cursor:'pointer',boxSizing:'border-box',transition:'background-color 150ms ease, transform 100ms ease',transform:h?'scale(0.98)':void 0},y),children:(0,o.jsx)(s.SidebarIcon,{size:20,color:t.icon.default,style:'right'===c?{transform:'scaleX(-1)'}:void 0})})};var o=r(d[0]),n=r(d[1]),t=r(d[2]),s=r(d[3])},291,[151,38,183,186]);
348
348
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.Switch=function({checked:s,onChange:l,label:c}){const[u,b]=(0,n.useState)(!1),[h,x]=(0,n.useState)(!1),f={display:'flex',alignItems:'center',justifyContent:'center',width:32,height:32,boxSizing:'border-box',borderRadius:o.radius.full,border:`1px solid ${o.border.default}`,backgroundColor:u?o.bg.element:'transparent',transition:'background-color 150ms ease, transform 100ms ease',transform:h?'scale(0.98)':void 0};return(0,t.jsxs)("button",{type:"button",role:"switch","aria-checked":s,"aria-label":c,onClick:()=>l?.(!s),onMouseEnter:()=>b(!0),onMouseLeave:()=>{b(!1),x(!1)},onMouseDown:()=>x(!0),onMouseUp:()=>x(!1),style:{display:'flex',flexDirection:'column',alignItems:'center',gap:6,padding:0,border:'none',background:'none',cursor:'pointer',fontFamily:'inherit'},children:[(0,t.jsx)("span",{style:f,children:(0,t.jsx)("span",{style:{width:16,height:16,borderRadius:o.radius.full,backgroundColor:o.text.default}})}),c&&(0,t.jsx)("span",{style:Object.assign({},o.textSize['2xs'],{color:o.text.secondary,textAlign:'center'}),children:c})]})};var t=r(d[0]),n=r(d[1]),o=r(d[2])},292,[151,38,183]);
349
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.Sidebar=function({simulators:s,emulators:l,recentSimulators:c,recentEmulators:u,simulatorOptions:p,emulatorOptions:b,agentDeviceIds:v=[],selectedId:x,onSelect:h,onAddDevice:S,onToggle:f,platform:j,width:y=400}){return(0,t.jsxs)("aside",{style:{display:'flex',flexDirection:'column',gap:32,width:`min(${y}px, 100vw)`,flexShrink:0,height:'100vh',boxSizing:'border-box',padding:'32px 24px',overflow:'hidden'},children:[(0,t.jsxs)("div",{style:{display:'flex',alignItems:'center',justifyContent:'space-between',gap:8},children:[(0,t.jsx)(o.Logo,{}),f&&(0,t.jsx)(o.SidebarToggle,{onClick:f})]}),'android'!==j&&(0,t.jsx)(n.DeviceSection,{title:"Simulators",addLabel:"Add simulator",kind:"simulator",emptyLabel:"No booted simulators. Use the + button to add one.",devices:s,recent:c,options:p,agentDeviceIds:v,selectedId:x,onSelect:h,onAdd:S}),'ios'!==j&&(0,t.jsx)(n.DeviceSection,{title:"Emulators",addLabel:"Add emulator",kind:"emulator",emptyLabel:"No booted emulators or devices. Use the + button to add one.",devices:l,recent:u,options:b,agentDeviceIds:v,selectedId:x,onSelect:h,onAdd:S})]})};var t=r(d[0]),o=r(d[1]),n=r(d[2])},293,[151,294,295]);
349
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.Sidebar=function({simulators:n,emulators:l,recentSimulators:c,recentEmulators:u,simulatorOptions:b,emulatorOptions:p,agentDeviceIds:v=[],selectedId:x,onSelect:h,onAddDevice:S,onToggle:f,platform:j,width:y=400}){return(0,t.jsxs)("aside",{style:{display:'flex',flexDirection:'column',gap:32,width:`min(${y}px, 100vw)`,flexShrink:0,height:'100vh',boxSizing:'border-box',padding:'32px 24px',overflow:'hidden'},children:[(0,t.jsxs)("div",{style:{display:'flex',alignItems:'center',justifyContent:'space-between',gap:8},children:[(0,t.jsx)(o.Logo,{}),f&&(0,t.jsx)(o.SidebarToggle,{onClick:f})]}),'android'!==j&&(0,t.jsx)(s.DeviceSection,{title:"Simulators",addLabel:"Add simulator",kind:"simulator",emptyLabel:S?'No booted simulators. Use the + button to add one.':'No booted simulators.',devices:n,recent:c,options:b,agentDeviceIds:v,selectedId:x,onSelect:h,onAdd:S}),'ios'!==j&&(0,t.jsx)(s.DeviceSection,{title:"Emulators",addLabel:"Add emulator",kind:"emulator",emptyLabel:S?'No booted emulators or devices. Use the + button to add one.':'No booted emulators or devices.',devices:l,recent:u,options:p,agentDeviceIds:v,selectedId:x,onSelect:h,onAdd:S})]})};var t=r(d[0]),o=r(d[1]),s=r(d[2])},293,[151,294,295]);
350
350
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0});var t=r(d[0]);Object.keys(t).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=r(d[1]);Object.keys(n).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})});var c=r(d[2]);Object.keys(c).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return c[t]}})});var o=r(d[3]);Object.keys(o).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})});var u=r(d[4]);Object.keys(u).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return u[t]}})});var f=r(d[5]);Object.keys(f).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return f[t]}})});var l=r(d[6]);Object.keys(l).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return l[t]}})});var b=r(d[7]);Object.keys(b).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return b[t]}})});var p=r(d[8]);Object.keys(p).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return p[t]}})});var y=r(d[9]);Object.keys(y).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return y[t]}})});var O=r(d[10]);Object.keys(O).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return O[t]}})});var j=r(d[11]);Object.keys(j).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return j[t]}})});var s=r(d[12]);Object.keys(s).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}})});var P=r(d[13]);Object.keys(P).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return P[t]}})});var h=r(d[14]);Object.keys(h).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return h[t]}})})},294,[182,184,185,189,248,263,264,265,266,267,291,292,247,186,183]);
351
351
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.DeviceSection=function({title:l,addLabel:c,kind:u,emptyLabel:p,devices:b,recent:x,options:y,agentDeviceIds:v=[],selectedId:f,onSelect:h,onAdd:j}){const[k,S]=(0,s.useState)(!1),[C,D]=(0,s.useState)(!1),[I,M]=(0,s.useState)(!1),L=new Set(b.map(t=>t.id)),_=x.filter(t=>!L.has(t.id));return(0,t.jsxs)("section",{style:{display:'grid',gap:12,minWidth:0},children:[(0,t.jsxs)("div",{style:{display:'flex',alignItems:'center',gap:8},children:[(0,t.jsx)("span",{style:Object.assign({},n.textSize.sm,{fontWeight:500,color:n.text.default}),children:l}),!!j&&(0,t.jsx)("button",{type:"button","aria-label":c,onClick:()=>M(!0),onMouseEnter:()=>S(!0),onMouseLeave:()=>{S(!1),D(!1)},onMouseDown:()=>D(!0),onMouseUp:()=>D(!1),style:{display:'flex',alignItems:'center',justifyContent:'center',width:26,height:26,padding:0,borderRadius:n.radius.full,border:`1px solid ${n.border.default}`,backgroundColor:k?n.bg.hover:n.bg.default,cursor:'pointer',transition:'background-color 150ms ease, transform 100ms ease',transform:C?'scale(0.98)':void 0},children:(0,t.jsx)(n.PlusIcon,{size:18,color:n.icon.secondary})})]}),(0,t.jsx)("div",{style:{display:'grid',gap:6,minWidth:0},children:0===b.length?(0,t.jsx)("p",{style:Object.assign({},n.textSize.sm,{color:n.text.secondary,margin:0,padding:'12px 16px',borderRadius:n.radius.xl,border:`1px dashed ${n.border.default}`,backgroundColor:n.bg.default}),children:p}):b.map(s=>(0,t.jsx)(n.DeviceListItem,{name:s.name,version:s.version,unsupported:!s.supported,usedByAgent:v.includes(s.id),selected:s.id===f,onClick:()=>h(s.id)},s.id))}),(0,t.jsx)(o.RecentDevicesModal,{open:I,onClose:()=>M(!1),kind:u,devices:_,options:y,onAdd:j||(async()=>({ok:!1,error:'Device actions are unavailable.'}))})]})};var t=r(d[0]),s=r(d[1]),n=r(d[2]),o=r(d[3])},295,[151,38,294,296]);
352
352
  __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.RecentDevicesModal=function({open:h,onClose:f,kind:b,devices:v,options:y,onAdd:j}){const w='simulator'===b?'ios':'android',C=b,S=`Add a${'emulator'===b?'n':''} ${C}`,$=(0,t.useMemo)(()=>[...v].sort((n,t)=>(t.lastUsedAt??0)-(n.lastUsedAt??0)),[v]),[k,z]=(0,t.useState)({kind:'new'}),[A,F]=(0,t.useState)(''),[D,M]=(0,t.useState)(''),[_,I]=(0,t.useState)(''),[R,B]=(0,t.useState)(!1),[N,T]=(0,t.useState)(!1),[O,U]=(0,t.useState)(!1),[E,W]=(0,t.useState)(null);(0,t.useEffect)(()=>{if(!h)return;const n=y.runtimes[0],t=n?.models[0];F(n?.value??''),M(t?.value??''),I(x(t?.label??'',$,w)),B(!1),T(!1),U(!1),W(null),z($.length?{kind:'recent',id:$[0].id}:{kind:'new'})},[h,y]);const Z='new'===k.kind,H='recent'===k.kind?$.find(n=>n.id===k.id):void 0,q=(0,t.useMemo)(()=>{const n=new Map;for(const t of y.runtimes)for(const o of t.models)n.has(o.value)||n.set(o.value,o);return[...n.values()].sort((n,t)=>n.label.localeCompare(t.label,void 0,{numeric:!0}))},[y.runtimes]),L='android'===w?y.runtimes.filter(n=>n.models.some(n=>n.value===D)):y.runtimes,P=L.find(n=>n.value===A),V='android'===w?q:P?.models??[],Y=P?.models.find(n=>n.value===D),G=()=>{z({kind:'new'}),W(null)};function J(n){const t=y.runtimes.find(t=>t.value===n);if(F(n),G(),'ios'===w){const n=t?.models[0];M(n?.value??''),R||I(x(n?.label??'',$,w))}}function K(n){M(n),G();const t=V.find(t=>t.value===n);if('android'===w){const t=y.runtimes.find(t=>t.models.some(t=>t.value===n));F(t?.value??'')}R||I(x(t?.label??'',$,w))}const Q=_.trim(),X=Q.length>0&&('android'!==w||l.test(Q)),ee='android'===w&&R&&Q.length>0&&!l.test(Q),ne=`new-${w}-device-name-hint`,te=Z?X&&A.length>0&&D.length>0:!!H;return(0,n.jsx)(o.DialogRoot,{open:h,onOpenChange:n=>{n||f()},children:(0,n.jsxs)(o.DialogContent,{children:[(0,n.jsx)(o.DialogTitle,{title:S}),(0,n.jsxs)("form",{onSubmit:async function(n){if(n.preventDefault(),te&&!O){U(!0),W(null);try{const n=Z&&P&&Y?{kind:'new',device:{platform:w,name:Q,runtime:P.value,deviceType:Y.value,version:P.label,supported:Y.supported}}:{kind:'recent',device:H},t=await j(n);t.ok?f():W(t.error)}catch(n){W(n instanceof Error?n.message:String(n))}finally{U(!1)}}},children:[(0,n.jsxs)(o.DialogContentContainer,{children:[(0,n.jsx)(s,{children:"Recents"}),(0,n.jsx)("div",{style:{display:'flex',flexDirection:'column',gap:3},children:0===$.length?(0,n.jsxs)("p",{style:{margin:0,padding:'2px 2px 6px 2px',fontSize:13,color:o.text.tertiary},children:["No recent ",C,"s."]}):$.map(t=>(0,n.jsx)(c,{device:t,selected:'recent'===k.kind&&k.id===t.id,onSelect:()=>{z({kind:'recent',id:t.id}),W(null)}},t.id))}),(0,n.jsxs)("div",{style:{marginTop:10},children:[(0,n.jsxs)(s,{active:Z,children:["New ",C]}),(0,n.jsx)("div",{onClick:G,style:{borderRadius:o.radius.lg,overflow:'hidden',backgroundColor:o.bg.subtle,border:`1px solid ${Z?o.border.default:o.border.secondary}`,transition:'border-color 150ms ease'},children:0===y.runtimes.length?(0,n.jsxs)("p",{style:{margin:0,padding:13,color:o.text.tertiary,fontSize:13},children:["No usable ",'ios'===w?'iOS runtimes':'Android system images'," were found on this host."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u,{label:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{children:"Name"}),'android'===w&&(0,n.jsx)("span",{id:ne,style:{color:ee?o.text.danger:o.text.tertiary,fontSize:11,lineHeight:1.3},children:a})]}),htmlFor:`new-${w}-device-name`,last:!1,children:(0,n.jsx)("div",{style:{flex:'0 0 58%'},children:(0,n.jsx)("input",{id:`new-${w}-device-name`,type:"text",value:_,placeholder:Y?.label||`New ${C}`,autoComplete:"off",spellCheck:!1,pattern:'android'===w?'[A-Za-z0-9._-]+':void 0,title:'android'===w?a:void 0,"aria-invalid":!!ee||void 0,"aria-describedby":'android'===w?ne:void 0,disabled:O,onChange:n=>{return t=n.currentTarget.value,I(t),B(!0),void G();var t},onFocus:()=>{T(!0),G()},onBlur:()=>T(!1),style:{width:'100%',boxSizing:'border-box',padding:'6px 10px',border:`1px solid ${ee?o.border.danger:o.border.default}`,borderRadius:o.radius.md,backgroundColor:o.bg.default,color:Z?o.text.default:o.text.tertiary,caretColor:o.text.default,fontSize:16,fontFamily:'inherit',outline:'none',boxShadow:N?`0 0 0 3px ${o.bg.element}`:'none'}})})}),'android'===w?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u,{label:"Model",htmlFor:`new-${w}-model`,last:!1,children:(0,n.jsx)(p,{id:`new-${w}-model`,value:D,options:V,disabled:O,onChange:K,onActivate:G,trailing:(0,n.jsx)(o.ChevronsUpDownIcon,{size:14,color:o.icon.secondary})})}),(0,n.jsx)(u,{label:"OS version",htmlFor:`new-${w}-runtime`,last:!0,children:(0,n.jsx)(p,{id:`new-${w}-runtime`,value:A,options:L,disabled:O,onChange:J,onActivate:G,trailing:(0,n.jsx)(o.ChevronDownIcon,{size:14,color:o.icon.secondary})})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u,{label:"OS version",htmlFor:`new-${w}-runtime`,last:!1,children:(0,n.jsx)(p,{id:`new-${w}-runtime`,value:A,options:L,disabled:O,onChange:J,onActivate:G,trailing:(0,n.jsx)(o.ChevronDownIcon,{size:14,color:o.icon.secondary})})}),(0,n.jsx)(u,{label:"Model",htmlFor:`new-${w}-model`,last:!0,children:(0,n.jsx)(p,{id:`new-${w}-model`,value:D,options:V,disabled:O,onChange:K,onActivate:G,trailing:(0,n.jsx)(o.ChevronsUpDownIcon,{size:14,color:o.icon.secondary})})})]})]})})]}),E&&(0,n.jsx)("p",{role:"alert",style:{margin:'12px 0 0',padding:'9px 11px',border:`1px solid ${o.border.danger}`,borderRadius:o.radius.lg,backgroundColor:o.bg.danger,color:o.text.danger,fontSize:13,whiteSpace:'pre-wrap'},children:E})]}),(0,n.jsxs)(o.DialogFooter,{children:[(0,n.jsx)(o.Button,{type:"button",theme:"quaternary",disabled:O,onClick:f,children:"Cancel"}),(0,n.jsx)(o.Button,{type:"submit",theme:"primary",disabled:!te||O,children:O?Z?'Creating\u2026':'Booting\u2026':Z?'Create & Boot':'Boot'})]})]})]})})};var n=r(d[0]),t=r(d[1]),o=r(d[2]);const l=/^[A-Za-z0-9._-]+$/,a='Allowed: a-z A-Z 0-9 . _ -';function s({children:t,active:l=!1}){return(0,n.jsx)("span",{style:{display:'block',marginBottom:4,fontFamily:o.font.mono,fontSize:11,fontWeight:l?600:400,letterSpacing:'0.06em',textTransform:'uppercase',color:l?o.text.default:o.text.tertiary},children:t})}function c({device:l,selected:a,onSelect:s}){const[c,u]=(0,t.useState)(!1);return(0,n.jsxs)("button",{type:"button","aria-pressed":a,onClick:s,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),style:{display:'flex',alignItems:'center',gap:12,width:'100%',padding:'9px 11px',border:'none',borderRadius:o.radius.lg,textAlign:'left',fontFamily:'inherit',cursor:'pointer',backgroundColor:a?o.bg.hover:c?o.bg.element:'transparent',transition:'background-color 150ms ease'},children:[(0,n.jsx)("span",{style:{display:'flex',alignItems:'center',justifyContent:'center',width:31,height:31,flex:'0 0 auto',borderRadius:o.radius.lg,backgroundColor:o.bg.element,color:a?o.text.default:o.icon.default},children:a?(0,n.jsx)(o.CheckIcon,{size:16}):(0,n.jsx)(o.SmartphoneIcon,{size:16})}),(0,n.jsxs)("span",{style:{display:'flex',flexDirection:'column',gap:2,minWidth:0},children:[(0,n.jsx)("span",{style:{fontSize:14,fontWeight:a?600:500,color:o.text.default,lineHeight:1.25},children:l.name}),(0,n.jsxs)("span",{style:{display:'flex',alignItems:'center',gap:6,fontSize:12,color:o.text.tertiary,lineHeight:1.25},children:[(0,n.jsx)("span",{style:{width:6,height:6,flex:'0 0 auto',borderRadius:'50%',backgroundColor:l.booted?o.icon.success:o.icon.quaternary}}),l.booted?'Booted \xb7 now':h(l.lastUsedAt)]})]}),(0,n.jsx)("span",{style:{marginLeft:'auto',flex:'0 0 auto',fontSize:11,color:o.text.secondary,backgroundColor:o.bg.element,borderRadius:o.radius.full,padding:'3px 9px',fontVariantNumeric:'tabular-nums',whiteSpace:'nowrap'},children:l.version})]})}function u({label:t,htmlFor:l,last:a,children:s}){return(0,n.jsxs)("div",{style:{display:'flex',alignItems:'center',justifyContent:'space-between',gap:12,padding:'11px 13px',borderBottom:a?void 0:`1px solid ${o.border.secondary}`},children:[(0,n.jsx)("label",{htmlFor:l,style:{display:'flex',flexDirection:'column',gap:2,fontSize:13,color:o.text.secondary,cursor:'pointer'},children:t}),s]})}function p({id:l,value:a,options:s,disabled:c,onChange:u,onActivate:p,trailing:x}){const[h,f]=(0,t.useState)(!1),b={width:'100%',boxSizing:'border-box',padding:'6px 28px 6px 10px',border:`1px solid ${o.border.default}`,borderRadius:o.radius.md,backgroundColor:o.bg.default,color:o.text.default,fontSize:16,fontFamily:'inherit',appearance:'none',WebkitAppearance:'none',MozAppearance:'none',outline:'none',cursor:'pointer',boxShadow:h?`0 0 0 3px ${o.bg.element}`:'none'};return(0,n.jsxs)("div",{style:{position:'relative',flex:'0 0 58%'},children:[(0,n.jsx)("select",{id:l,value:a,disabled:c,onChange:n=>u(n.currentTarget.value),onMouseDown:p,onFocus:()=>{f(!0),p()},onBlur:()=>f(!1),style:b,children:0===s.length?(0,n.jsx)("option",{value:"",children:"\u2014"}):s.map(t=>(0,n.jsx)("option",{value:t.value,children:t.label},t.value))}),(0,n.jsx)("span",{style:{position:'absolute',right:10,top:'50%',transform:'translateY(-50%)',pointerEvents:'none',display:'flex',color:o.icon.secondary},children:x})]})}function x(n,t,o){const l='android'===o?n.trim().replace(/[^A-Za-z0-9._-]+/g,'_').replace(/^_+|_+$/g,''):n;if(!l)return'';const a=new Set(t.map(n=>n.name));if(!a.has(l))return l;let s=2;const c='android'===o?'_':' ';for(;a.has(`${l}${c}${s}`);)s++;return`${l}${c}${s}`}function h(n){if(!n)return'Idle';const t=Date.now()-n,o=Math.round(t/6e4);if(o<1)return'now';if(o<60)return`${o}m ago`;const l=Math.round(o/60);if(l<24)return`${l}h ago`;const a=Math.round(l/24);if(a<7)return`${a} day${1===a?'':'s'} ago`;const s=Math.round(a/7);if(s<5)return`${s} week${1===s?'':'s'} ago`;const c=Math.round(a/30);return`${c} month${1===c?'':'s'} ago`}},296,[151,38,294]);
@@ -364,40 +364,42 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
364
364
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.LogRow=function({entry:n}){const o=n.message.length>68?`${n.message.slice(0,68)}\u2026`:n.message;return(0,s.jsxs)("div",{style:{display:'flex',alignItems:'flex-start',gap:8,padding:'8px 0',borderBottom:`1px solid ${t.border.secondary}`},children:[(0,s.jsx)("span",{style:Object.assign({},t.textSize['2xs'],{padding:'1px 5px',borderRadius:t.radius.sm,backgroundColor:t.bg.element,fontFamily:t.font.mono,color:t.text.tertiary,flexShrink:0,marginTop:1}),children:n.source}),(0,s.jsx)("span",{title:n.message,style:Object.assign({},t.textSize.xs,{flex:1,minWidth:0,color:t.text.secondary,overflowWrap:'anywhere'}),children:o})]})};var s=r(d[0]),t=r(d[1])},308,[151,294]);
365
365
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.LogsSection=function({client:c}){const[u,L]=(0,t.useState)(!1),h=c?.logs??[],f=c?.logsEnabled??!1,p=c?.attachLogs,S=c?.detachLogs;return(0,t.useEffect)(()=>(u?p?.():S?.(),()=>S?.()),[p,S,u]),(0,o.jsxs)(n.CollapsibleSection,{title:"Logs",open:u,onOpenChange:L,children:[(0,o.jsx)(s.LogControls,{count:h.length,running:f,onClear:()=>c?.clearLogs(),onStart:()=>c?.attachLogs(),onStop:()=>c?.detachLogs()}),(0,o.jsx)(l.LogList,{logs:h,enabled:f})]})};var o=r(d[0]),t=r(d[1]),n=r(d[2]),s=r(d[3]),l=r(d[4])},309,[151,38,299,306,307]);
366
366
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.StreamOptionsSection=function({client:y,defaultOpen:P=!1,streamMode:R="mjpeg",httpCodec:M,streamModeAvailability:f=c,onStreamModeChange:F,onHttpCodecChange:T}){const[A,O]=(0,t.useState)(P),H=y.streamCapabilities??p,L={mjpeg:f.mjpeg&&H.modeAvailability.mjpeg,h264:f.h264&&H.modeAvailability.h264,webrtc:f.webrtc&&H.modeAvailability.webrtc},W=L[R]?R:u.find(l=>L[l])??R,$='android'===y.platform?'websocket':'http',B='android'===y.platform?'WebSocket':'HTTP',E=[{value:$,label:B},{value:'webrtc',label:'WebRTC'}],G=h.filter(l=>H.httpCodecs.includes(l.value)),J=v.filter(l=>H.webRtcCodecs.includes(l.value)),V=y.streamSettings??s,N=!(null!==y.streamSettings)||y.streamSettingsPending,k='webrtc'===W?'webrtc':$,q=L.mjpeg||L.h264;function z(l){return'h264'===l?L.h264:'mjpeg'===l?L.mjpeg:q}const D=M??('mjpeg'===W?'mjpeg':'h264'===W?'h264':'auto'),Q='mjpeg'===W||'h264'===W?W:null,_=(Q&&H.httpCodecs.includes(Q)&&z(Q)?Q:void 0)??G.find(l=>z(l.value))?.value,I=H.httpCodecs.includes(D)&&z(D)?D:_??D,K=H.webRtcCodecs.includes(y.webRtcCodec)?y.webRtcCodec:J[0]?.value??y.webRtcCodec,U='webrtc'===k||L.h264&&'mjpeg'!==I;function X(l){return'mjpeg'===l?'mjpeg':L.h264?'h264':'mjpeg'}function Y(l,t){N||y.updateStreamSettings({[l]:t})}const Z=H.modeAvailability.h264&&!f.h264||H.modeAvailability.webrtc&&!f.webrtc,ee='android'===y.platform&&!H.modeAvailability.webrtc;return(0,l.jsxs)(o.CollapsibleSection,{title:"Stream options",open:A,onOpenChange:O,children:[(0,l.jsx)(b.SidebarRow,{label:"Transport",children:(0,l.jsx)(n.SegmentedControl,{ariaLabel:"Stream transport",options:E.map(l=>Object.assign({},l,{disabled:!F||('webrtc'===l.value?!L.webrtc:!q)})),value:k,onChange:function(l){F?.('webrtc'===l?'webrtc':X(I))}})}),G.length>0&&(0,l.jsx)(b.SidebarRow,{label:`${B} codec`,children:(0,l.jsx)(n.SegmentedControl,{ariaLabel:`${B} codec`,options:G.map(l=>Object.assign({},l,{disabled:'webrtc'===k||!T||!z(l.value)})),value:I,onChange:function(l){T?.(l),'webrtc'!==k&&F?.(X(l))}})}),J.length>0&&(0,l.jsx)(b.SidebarRow,{label:"WebRTC codec",borderBottom:y.capabilities.streamSettings,children:(0,l.jsx)(n.SegmentedControl,{ariaLabel:"WebRTC codec",options:J.map(l=>Object.assign({},l,{disabled:'webrtc'!==k||!L.webrtc})),value:K,onChange:l=>y.setWebRtcCodec(l)})}),Z&&(0,l.jsx)("span",{style:Object.assign({},n.textSize.xs,{display:'block',padding:'0 0 8px',color:n.text.tertiary}),children:'android'===y.platform?'WebRTC requires localhost or HTTPS.':'H.264 and WebRTC require localhost or HTTPS. MJPEG remains available on insecure HTTP.'}),ee&&(0,l.jsx)("span",{style:Object.assign({},n.textSize.xs,{display:'block',padding:'0 0 8px',color:n.text.tertiary}),children:"Start the standalone server with --transport webrtc to enable WebRTC."}),y.capabilities.streamSettings&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(b.SidebarRow,{label:"Max size",children:(0,l.jsx)(n.Select,{ariaLabel:"Max size",value:String(V.maxDimension),options:C(V.maxDimension,j,l=>0===l?'Full':`${l} px`),disabled:N,onChange:l=>Y('maxDimension',Number(l))})}),(0,l.jsx)(b.SidebarRow,{label:"MJPEG FPS",children:(0,l.jsx)(n.Select,{ariaLabel:"MJPEG FPS",value:String(V.mjpegFps),options:C(V.mjpegFps,S,l=>`${l} FPS`),disabled:N||'http'!==k,onChange:l=>Y('mjpegFps',Number(l))})}),(0,l.jsx)(b.SidebarRow,{label:"MJPEG quality",children:(0,l.jsx)(n.Select,{ariaLabel:"MJPEG quality",value:String(V.mjpegQuality),options:C(V.mjpegQuality,x,l=>`${Math.round(100*l)}%`),disabled:N||'http'!==k,onChange:l=>Y('mjpegQuality',Number(l))})}),(0,l.jsx)(b.SidebarRow,{label:"Video FPS",children:(0,l.jsx)(n.Select,{ariaLabel:"Video FPS",value:String(V.h264Fps),options:C(V.h264Fps,S,l=>`${l} FPS`),disabled:N||!U,onChange:l=>Y('h264Fps',Number(l))})}),(0,l.jsx)(b.SidebarRow,{label:"Video bitrate",borderBottom:!1,children:(0,l.jsx)(n.Select,{ariaLabel:"Video bitrate",value:String(V.h264Bitrate),options:C(V.h264Bitrate,w,l=>l/1e6+" Mbps"),disabled:N||!U,onChange:l=>Y('h264Bitrate',Number(l))})})]})]})};var l=r(d[0]),t=r(d[1]),n=r(d[2]),o=r(d[3]),b=r(d[4]);const s={mjpegFps:30,mjpegQuality:.7,maxDimension:0,h264Bitrate:6e6,h264Fps:30},c={mjpeg:!0,h264:!0,webrtc:!0},p={modeAvailability:c,httpCodecs:['auto','h264','mjpeg'],webRtcCodecs:['h264','vp9','vp8']},u=['mjpeg','h264','webrtc'],h=[{value:'auto',label:'Auto'},{value:'h264',label:'H.264'},{value:'mjpeg',label:'MJPEG'}],v=[{value:'h264',label:'H.264'},{value:'vp9',label:'VP9'},{value:'vp8',label:'VP8'}],j=[{value:'0',label:'Full'},{value:'1920',label:'1920 px'},{value:'1600',label:'1600 px'},{value:'1280',label:'1280 px'},{value:'960',label:'960 px'},{value:'720',label:'720 px'}],S=['60','30','20','15','10','5'].map(l=>({value:l,label:`${l} FPS`})),x=[{value:'0.45',label:'45%'},{value:'0.55',label:'55%'},{value:'0.7',label:'70%'},{value:'0.85',label:'85%'},{value:'1',label:'100%'}],w=[{value:'1500000',label:'1.5 Mbps'},{value:'3000000',label:'3 Mbps'},{value:'6000000',label:'6 Mbps'},{value:'10000000',label:'10 Mbps'},{value:'16000000',label:'16 Mbps'}];function C(l,t,n){const o=String(l);return t.some(l=>l.value===o)?t:[{value:o,label:n(l)},...t]}},310,[151,38,294,299,301]);
367
- __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.StreamPanel=function({device:s,client:p,agentInteraction:u,DeviceScreen:f,displayScreen:h,onShutdown:b,onRemove:S,framed:v=!0}){return(0,n.jsxs)("section",{style:{flex:1,minWidth:0,display:'flex',flexDirection:'column',alignItems:'center',justifyContent:'center',gap:40,padding:40,margin:v?'16px 8px':0,boxSizing:'border-box',backgroundColor:o.bg.default,border:v?`1px solid ${o.border.secondary}`:'none',borderRadius:v?o.radius.lg:0,boxShadow:v?o.shadow.sm:'none',overflow:'hidden'},children:[(0,n.jsx)(t.PhoneFrame,{platform:s.platform,client:p,agentInteraction:u,DeviceScreen:f,displayScreen:h}),(0,n.jsx)(a.StreamControls,{platform:s.platform,physical:s.physical,appearance:p.appearance,onToggleAppearance:()=>p.setAppearance('dark'===p.appearance?'light':'dark'),onHome:()=>p.pressButton('home'),onBack:()=>p.pressButton('back'),onRecents:()=>p.pressButton('recents'),onReload:()=>p.reload(),onRotate:()=>p.rotate(),onSave:async()=>{const n=await p.screenshot();n&&c(n,l(s.name))},onShutdown:b,onRemove:S})]})};var n=r(d[0]),o=r(d[1]),t=r(d[2]),a=r(d[3]);function c(n,o){const t=URL.createObjectURL(n),a=document.createElement('a');a.href=t,a.download=o,document.body.appendChild(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(t),0)}function l(n){return`${n.trim().replace(/[^a-zA-Z0-9._-]+/g,'-').replace(/^-+|-+$/g,'')||'device'}-${(new Date).toISOString().replace(/[:.]/g,'-').replace(/Z$/,'')}.png`}},311,[151,294,312,315]);
368
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.PhoneFrame=function({platform:h,client:x,agentInteraction:b,DeviceScreen:y,displayScreen:j}){const[f,P]=(0,n.useState)(!1),[S,w]=(0,n.useState)(null),{ratio:F,radiusFraction:$,squircle:q}=v[h],O=x?j(x.screen):null,_=O&&O.height>0?O.width/O.height:F,I={width:`min(${p*Math.max(_,1)}px, calc((100vh - ${u}px) * ${_}), 100%)`,aspectRatio:`${_}`,containerType:'inline-size',position:'relative',isolation:'isolate'},M=$/Math.max(_,1)*100,T=`${M.toFixed(3)}cqw`,k=x&&'idle'!==x.status,z=!!b&&f&&S!==b.id;return(0,t.jsx)("div",{"data-testid":"device-screen-frame","data-agent-active":b?'true':'false',style:Object.assign({},I,{boxShadow:l,borderRadius:T}),onPointerEnter:t=>{'mouse'===t.pointerType&&P(!0)},onPointerLeave:()=>P(!1),children:(0,t.jsxs)("div",{"data-testid":"device-screen-clip",style:{position:'absolute',inset:0,clipPath:(0,c.deviceScreenClipPath)(M,q)},children:[k?(0,t.jsx)(y,{client:x,agentInteraction:b}):(0,t.jsx)("div",{style:{width:'100%',height:'100%',backgroundColor:s.bg.element}}),(0,t.jsx)("div",{"data-testid":"agent-device-overlay-clip",style:{position:'absolute',inset:0,zIndex:2,pointerEvents:z?'auto':'none'},children:(0,t.jsx)(o.AgentDeviceOverlay,{visible:z,onTakeOver:()=>w(b?.id??null)})})]})})};var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]),c=r(d[4]);const l='0 40px 80px rgba(0, 0, 0, 0.4), 0 12px 28px rgba(0, 0, 0, 0.28)',u=210,p=480,v={ios:{ratio:.460431654676259,radiusFraction:.14066496163682865,squircle:!0},android:{ratio:.450070323488045,radiusFraction:.02564102564102564,squircle:!1}}},312,[151,38,294,313,314]);
369
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.AgentDeviceOverlay=function({visible:c,onTakeOver:h}){return(0,t.jsx)("div",{hidden:!c,"aria-hidden":!c,role:"dialog","aria-label":"Agent device activity","data-testid":"agent-device-overlay",style:{position:'absolute',inset:0,zIndex:2,display:c?'flex':'none',alignItems:'center',justifyContent:'center',padding:24,boxSizing:'border-box',pointerEvents:'auto',textAlign:'center',backgroundColor:s},children:(0,t.jsxs)("div",{style:{display:'flex',width:'100%',maxWidth:300,flexDirection:'column',alignItems:'center',gap:12},children:[(0,t.jsx)("div",{style:Object.assign({color:o},n.textSize.sm,{fontWeight:600}),children:"Agent is using this device"}),(0,t.jsx)("div",{style:Object.assign({maxWidth:260,color:l},n.textSize.xs),children:"Taking over might collide with what the agent is doing."}),(0,t.jsx)(n.Button,{theme:"agent-overlay",size:"sm",onClick:h,style:{fontFamily:'inherit'},children:(0,t.jsx)("span",{style:Object.assign({},n.textSize.xs,{fontWeight:500}),children:"Take over anyway"})})]})})};var t=r(d[0]),n=r(d[1]);const s='rgba(0, 0, 0, 0.55)',l='rgba(255, 255, 255, 0.7)',o='rgba(218, 233, 255, 0.74)'},313,[151,294]);
370
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.deviceScreenClipPath=function($,f){const u=n($),l=n($*(f?o:t)),s=`-${c}`,h=`calc(${u} - ${c})`,v=`calc(100% - ${u} + ${c})`;return[`shape(from ${u} ${s}`,`hline to calc(100% - ${u})`,`curve to 100% ${h} with ${l} 0 from start / 0 -${l} from end`,`vline to ${v}`,`curve to calc(100% - ${u}) calc(100% + ${c}) with 0 ${l} from start / ${l} 0 from end`,`hline to ${u}`,`curve to 0 ${v} with -${l} 0 from start / 0 ${l} from end`,`vline to ${h}`,`curve to ${u} ${s} with 0 -${l} from start / -${l} 0 from end`,'close)'].join(', ')};const t=$(1),o=$(1.1),c='0.5px';function $(t){return(Math.pow(.5,Math.pow(.5,t))-.5)/.375}function n(t){return`${t.toFixed(3)}cqw`}},314,[]);
371
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.StreamControls=function({platform:t,physical:l,appearance:c,onToggleAppearance:s,onHome:I,onBack:p,onRecents:x,onReload:j,onRotate:u,onSave:b,onShutdown:h,onRemove:C}){const R='android'===t,S=(0,o.jsxs)(n.Dropdown,{side:"top",align:"end",alignOffset:-80,onCloseAutoFocus:o=>o.preventDefault(),trigger:(0,o.jsx)(n.ControlButton,{icon:(0,o.jsx)(n.DotsIcon,{}),label:"More"}),children:[R&&(0,o.jsx)(n.DropdownItem,{label:"Back",Icon:n.BackIcon,onSelect:p}),R&&(0,o.jsx)(n.DropdownItem,{label:"Recents",Icon:n.RecentsIcon,onSelect:x}),(0,o.jsx)(n.DropdownItem,{label:"Rotate",Icon:n.RotateIcon,onSelect:u}),(0,o.jsx)(n.DropdownItem,{label:"Shutdown",Icon:n.PowerIcon,onSelect:h}),!l&&(0,o.jsx)(n.DropdownItem,{label:"Remove",Icon:n.TrashIcon,destructive:!0,onSelect:C})]});return(0,o.jsxs)("div",{style:{display:'flex',alignItems:'flex-end',gap:24},children:[(0,o.jsx)(n.ControlButton,{icon:(0,o.jsx)(n.CameraIcon,{}),label:"Save",onClick:b}),(0,o.jsx)(n.Switch,{checked:'dark'===c,onChange:s,label:"Theme"}),(0,o.jsx)(n.ControlButton,{icon:(0,o.jsx)(n.HomeIcon,{}),label:"Home",variant:"primary",onClick:I}),(0,o.jsx)(n.ControlButton,{icon:(0,o.jsx)(n.RefreshIcon,{}),label:"Reload",onClick:j}),S]})};var o=r(d[0]),n=r(d[1])},315,[151,294]);
372
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.EmptyState=function({platform:n}){const s='ios'===n?'No booted simulators':'android'===n?'No booted emulators':'No booted devices',l='ios'===n?'There are no booted simulators. Use the + button to add one.':'android'===n?'There are no booted emulators or connected devices. Use the + button to add one.':'There are no booted simulators, emulators, or connected devices. Use the + button to add a simulator or emulator.';return(0,o.jsxs)("section",{style:{flex:1,minWidth:0,display:'flex',flexDirection:'column',alignItems:'center',justifyContent:'center',gap:16,padding:40,margin:'16px 8px',boxSizing:'border-box',backgroundColor:t.bg.default,border:`1px solid ${t.border.secondary}`,borderRadius:t.radius.lg,boxShadow:t.shadow.sm,overflow:'hidden',textAlign:'center'},children:[(0,o.jsx)("div",{style:{display:'flex',alignItems:'center',justifyContent:'center',width:56,height:56,borderRadius:t.radius.full,border:`1px solid ${t.border.secondary}`,backgroundColor:t.bg.subtle},children:(0,o.jsx)(t.PhoneIcon,{size:28,color:t.icon.secondary})}),(0,o.jsx)("h2",{style:Object.assign({},t.heading.lg,{color:t.text.default,margin:0}),children:s}),(0,o.jsx)("p",{style:Object.assign({},t.textSize.sm,{color:t.text.secondary,margin:0,maxWidth:320}),children:l})]})};var o=r(d[0]),t=r(d[1])},316,[151,294]);
373
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.OutputSection=function({client:c}){return(0,t.jsx)(n.LogsSection,{client:c})};var t=r(d[0]),n=r(d[1])},317,[151,309]);
374
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.StreamSection=function({mode:b,availability:u,onChange:v}){const h=(0,l.useId)(),j=!u.h264||!u.webrtc,p=c.map(t=>Object.assign({},t,{disabled:!u[t.value]}));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.SidebarRow,{label:"Stream",children:(0,t.jsx)(n.SegmentedControl,{ariaLabel:"Stream mode",ariaDescribedBy:j?h:void 0,options:p,value:b,onChange:v})}),j&&(0,t.jsx)("span",{id:h,style:Object.assign({},s.textSize.xs,{display:'block',padding:'0 0 11px',color:s.text.tertiary}),children:"H.264 and WebRTC require localhost or HTTPS. MJPEG is used on insecure HTTP."})]})};var t=r(d[0]),l=r(d[1]),n=r(d[2]),s=r(d[3]),o=r(d[4]);const c=[{value:'mjpeg',label:'MJPEG'},{value:'h264',label:'H.264'},{value:'webrtc',label:'WebRTC'}]},318,[151,38,266,294,301]);
375
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.BootErrorModal=function({open:n,onClose:l,deviceName:s,message:c}){return(0,o.jsx)(t.DialogRoot,{open:n,onOpenChange:o=>{o||l()},children:(0,o.jsxs)(t.DialogContent,{children:[(0,o.jsx)(t.DialogTitle,{title:"Failed to boot device"}),(0,o.jsxs)(t.DialogContentContainer,{children:[(0,o.jsxs)("p",{style:{margin:0,fontSize:14,lineHeight:1.5,color:t.text.secondary},children:[(0,o.jsx)("strong",{style:{color:t.text.default,fontWeight:600},children:s})," could not be booted."]}),(0,o.jsx)("pre",{style:{margin:'6px 0 0',padding:'10px 12px',overflowX:'auto',whiteSpace:'pre-wrap',overflowWrap:'anywhere',backgroundColor:t.bg.subtle,border:`1px solid ${t.border.default}`,borderRadius:t.radius.lg,color:t.text.danger,fontFamily:t.font.mono,fontSize:12,lineHeight:1.5},children:c})]}),(0,o.jsx)(t.DialogFooter,{children:(0,o.jsx)(t.Button,{theme:"primary",onClick:l,children:"Close"})})]})})};var o=r(d[0]),t=r(d[1])},319,[151,294]);
376
- __d(function(g,r,i,a,m,e,d){},320,[]);
377
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.AnimatedDockedSidebar=function({side:s,width:o,open:l,sidebarOpen:h,children:S}){const{present:c,reducedMotion:I,visible:_}=(0,t.useSidebarPresence)(l,!h);if(!c)return null;const u=I?void 0:`width ${t.SIDEBAR_TRANSITION_MS}ms ${t.SIDEBAR_TRANSITION_EASING}`,A=I?void 0:`transform ${t.SIDEBAR_TRANSITION_MS}ms ${t.SIDEBAR_TRANSITION_EASING}`;return(0,n.jsx)("div",{"aria-hidden":!_||void 0,"data-sidebar-docked":s,"data-state":_?'open':'closed',style:{width:_?o:0,height:'100%',flexShrink:0,overflow:'hidden',pointerEvents:_?'auto':'none',transition:u},children:(0,n.jsx)("div",{style:{width:o,height:'100%',transform:_?'translateX(0)':`translateX(${'left'===s?'-100%':'100%'})`,transition:A,willChange:'transform'},children:S})})};var t=r(d[0]),n=r(d[1])},321,[322,151]);
378
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SIDEBAR_TRANSITION_MS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"SIDEBAR_TRANSITION_EASING",{enumerable:!0,get:function(){return c}}),e.useSidebarPresence=function(c,o){const s=u(),[f,w]=(0,t.useState)(c),[S,b]=(0,t.useState)(c),l=(0,t.useRef)(c);return(0,t.useEffect)(()=>{if(c){const t=l.current;if(l.current=!0,w(!0),s||t)return void b(!0);let n=0;const c=requestAnimationFrame(()=>{n=requestAnimationFrame(()=>b(!0))});return()=>{cancelAnimationFrame(c),cancelAnimationFrame(n)}}if(b(!1),!o||s)return l.current=!1,void w(!1);const t=window.setTimeout(()=>{l.current=!1,w(!1)},n);return()=>window.clearTimeout(t)},[o,c,s]),{present:f,reducedMotion:s,visible:c&&S}};var t=r(d[0]);const n=200,c='cubic-bezier(0.16, 1, 0.3, 1)';function u(){const[n,c]=(0,t.useState)(()=>'undefined'!=typeof window&&!0===window.matchMedia?.('(prefers-reduced-motion: reduce)').matches);return(0,t.useEffect)(()=>{const t=window.matchMedia?.('(prefers-reduced-motion: reduce)');if(!t)return;const n=()=>c(t.matches);return t.addEventListener('change',n),()=>t.removeEventListener('change',n)},[]),n}},322,[38]);
379
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.basePath=function(){if(window.__DEV__)return'/_expo/plugins/expo-device-hub';const n=window.__EXPO_DEVICE_HUB_BASE_PATH__;if(null==n)throw new Error('window.__EXPO_DEVICE_HUB_BASE_PATH__ is not defined');return(0,_.trimTrailingSlash)(n)};var _=r(d[0])},323,[324]);
380
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.trimTrailingSlash=function(t){return t.replace(/\/+$/,'')}},324,[]);
381
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shutdownDevice=function(t){return u(o(),t)},e.removeDevice=function(t){return u(c(),t)},e.bootDevice=async function(t){return p(s(),{platform:t.platform,id:t.id,name:t.name})},e.createDevice=async function(t){return p(l(),{platform:t.platform,name:t.name,runtime:t.runtime,deviceType:t.deviceType})};var t=r(d[0]),n=r(d[1]);const o=()=>`${(0,t.basePath)()}/api/devices/shutdown`,c=()=>`${(0,t.basePath)()}/api/devices/remove`,s=()=>`${(0,t.basePath)()}/api/devices/boot`,l=()=>`${(0,t.basePath)()}/api/devices/create`;async function u(t,o){try{const c=await fetch(t,{method:'POST',headers:{'Content-Type':'application/json',Accept:'application/json'},body:JSON.stringify({platform:o.platform,id:o.id,name:o.name})});if(!c.ok)throw new Error(`Unexpected ${c.status}`);const s=await c.json();return(0,n.logUtilityErrors)(s.errors),!0===s.ok}catch(t){return console.warn('[expo-device-hub] Device action failed:',t),!1}}async function p(t,o){try{const c=await fetch(t,{method:'POST',headers:{'Content-Type':'application/json',Accept:'application/json'},body:JSON.stringify(o),signal:AbortSignal.timeout(2e5)}),s=await c.json();if((0,n.logUtilityErrors)(s.errors),!c.ok)return{id:null,error:s.error??`Unexpected ${c.status}`};const l=s.id??s.serial;return s.ok&&l?{id:l,error:null}:{id:null,error:s.error??'The device did not come online.'}}catch(t){return console.warn('[expo-device-hub] Device start failed:',t),{id:null,error:t instanceof Error?t.message:String(t)}}}},325,[323,326]);
382
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t){if(!t||'object'!=typeof t)return!1;const o=t;return'string'==typeof o.id&&'string'==typeof o.message&&'string'==typeof o.error}Object.defineProperty(e,'__esModule',{value:!0}),e.isUtilityError=t,e.logUtilityErrors=function(o,n=new Set){const s=new Set;if(!Array.isArray(o))return s;for(const f of o)t(f)&&!s.has(f.id)&&(s.add(f.id),n.has(f.id)||console.error(f.message,f.error));return s}},326,[]);
383
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DEFAULT_SIDEBAR_WIDTH",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"HIDE_UNSUPPORTED_DEVICES_STORAGE_KEY",{enumerable:!0,get:function(){return u}}),e.readHideUnsupportedDevices=l,e.persistHideUnsupportedDevicesDefault=function(t){try{null===t.getItem(u)&&t.setItem(u,'true')}catch{}},e.createDashboardStore=v,Object.defineProperty(e,"useDashboardStore",{enumerable:!0,get:function(){return f}});var t=r(d[0]),s=r(d[1]),c=r(d[2]),n=r(d[3]);const o=400,u='expo-device-hub.hideUnsupportedDevices';function l(t){try{return'false'!==t.getItem(u)}catch{return!0}}function b(){if('undefined'==typeof window)return!0;try{return l(window.localStorage)}catch{return!0}}function D(){const t=(0,n.browserStreamModeAvailability)();return{selectedDeviceId:'',addedDevices:[],streamMode:(0,n.resolveStreamMode)((0,c.dashboardTransport)(),t),sidebarWidths:{left:o,right:o},sidebarPreferences:{left:(0,s.dashboardHideSidebar)()?'hidden':'auto',right:'auto'},lastOpenedSidebar:'right',hideUnsupportedDevices:b()}}function v(s={}){return(0,t.create)()(t=>Object.assign({},D(),s,{selectDevice:s=>t({selectedDeviceId:s}),reconcileSelectedDevice:s=>t(t=>s.includes(t.selectedDeviceId)?t:{selectedDeviceId:s[0]??''}),trackAddedDevice:(s,c)=>t(t=>{const n=new Set([...c,s.id]);return{addedDevices:[...t.addedDevices.filter(t=>!n.has(t.id)),s],selectedDeviceId:s.id}}),dismissDevice:s=>t(t=>({addedDevices:t.addedDevices.filter(t=>t.id!==s),selectedDeviceId:t.selectedDeviceId===s?'':t.selectedDeviceId})),chooseStreamMode:(s,c)=>t({streamMode:(0,n.resolveStreamMode)(s,c)}),resizeSidebar:(s,c)=>t(t=>({sidebarWidths:Object.assign({},t.sidebarWidths,{[s]:c})})),openSidebar:(s,c)=>t(t=>({sidebarPreferences:Object.assign({},t.sidebarPreferences,{[s]:c?'auto':'open'}),lastOpenedSidebar:s})),closeSidebar:s=>t(t=>({sidebarPreferences:Object.assign({},t.sidebarPreferences,{[s]:'hidden'})})),setHideUnsupportedDevices:s=>t({hideUnsupportedDevices:s})}))}const f=v()},327,[328,331,332,333]);
384
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0});var t=r(d[0]);Object.keys(t).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=r(d[1]);Object.keys(n).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})})},328,[329,330]);
385
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createStore",{enumerable:!0,get:function(){return n}});const t=t=>{let n;const c=new Set,o=(t,o)=>{const s="function"==typeof t?t(n):t;if(!Object.is(s,n)){const t=n;n=(null!=o?o:"object"!=typeof s||null===s)?s:Object.assign({},n,s),c.forEach(c=>c(n,t))}},s=()=>n,u={setState:o,getState:s,getInitialState:()=>l,subscribe:t=>(c.add(t),()=>c.delete(t))},l=n=t(o,s,u);return u},n=n=>n?t(n):t},329,[]);
386
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"create",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"useStore",{enumerable:!0,get:function(){return l}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e},n=r(d[1]);const c=e=>e;function l(e,t=c){const n=u.default.useSyncExternalStore(e.subscribe,u.default.useCallback(()=>t(e.getState()),[e,t]),u.default.useCallback(()=>t(e.getInitialState()),[e,t]));return u.default.useDebugValue(n),n}const s=e=>{const t=(0,n.createStore)(e),u=e=>l(t,e);return Object.assign(u,t),u},o=e=>e?s(e):s},330,[38,329]);
387
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.dashboardHideSidebar=function(){return'undefined'!=typeof window&&!0===window.__EXPO_DEVICE_HUB_HIDE_SIDEBAR__}},331,[]);
388
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DEFAULT_TRANSPORT",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"TRANSPORTS",{enumerable:!0,get:function(){return t}}),e.parseTransport=o,e.dashboardTransport=function(){return'undefined'==typeof window?n:o(window.__EXPO_DEVICE_HUB_TRANSPORT__)??n};const n='mjpeg',t=['mjpeg','h264','webrtc'];function o(n){return t.includes(n)?n:void 0}},332,[]);
389
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t){return{mjpeg:!0,h264:t.secureContext&&t.h264Decoder,webrtc:t.secureContext&&t.webRtc}}Object.defineProperty(e,'__esModule',{value:!0}),e.streamModeAvailability=t,e.browserStreamModeAvailability=function(){if('undefined'==typeof window)return{mjpeg:!0,h264:!1,webrtc:!1};return t({secureContext:window.isSecureContext,h264Decoder:void 0!==window.VideoDecoder,webRtc:void 0!==window.RTCPeerConnection&&void 0!==window.RTCRtpReceiver})},e.androidStreamModeAvailability=function(t,o){return Object.assign({},t,{h264:t.h264||o})},e.resolveStreamMode=function(t,o){return o[t]?t:'mjpeg'}},333,[]);
390
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"HIDE_UNSUPPORTED_DEVICES_STORAGE_KEY",{enumerable:!0,get:function(){return n.HIDE_UNSUPPORTED_DEVICES_STORAGE_KEY}}),Object.defineProperty(e,"persistHideUnsupportedDevicesDefault",{enumerable:!0,get:function(){return n.persistHideUnsupportedDevicesDefault}}),Object.defineProperty(e,"readHideUnsupportedDevices",{enumerable:!0,get:function(){return n.readHideUnsupportedDevices}}),e.useHideUnsupportedDevices=function(){const s=(0,n.useDashboardStore)(t=>t.hideUnsupportedDevices),o=(0,n.useDashboardStore)(t=>t.setHideUnsupportedDevices);return(0,t.useEffect)(()=>{(0,n.persistHideUnsupportedDevicesDefault)(window.localStorage);const t=t=>{t&&null!==t.key&&t.key!==n.HIDE_UNSUPPORTED_DEVICES_STORAGE_KEY||o((0,n.readHideUnsupportedDevices)(window.localStorage))};return t(),window.addEventListener('storage',t),()=>window.removeEventListener('storage',t)},[o]),s},e.visibleDevices=function(t,n){return n?t.filter(t=>t.supported):t},e.visibleNewDeviceOptions=function(t,n){return n?{runtimes:t.runtimes.map(t=>Object.assign({},t,{models:t.models.filter(t=>t.supported)})).filter(t=>t.models.length>0)}:t};var t=r(d[0]),n=r(d[1])},334,[38,327]);
391
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useColorScheme=function(){const[n,c]=(0,t.useState)('light');return(0,t.useEffect)(()=>{if('undefined'==typeof window||!window.matchMedia)return;const t=window.matchMedia('(prefers-color-scheme: dark)'),n=()=>c(t.matches?'dark':'light');return n(),t.addEventListener('change',n),()=>t.removeEventListener('change',n)},[]),n};var t=r(d[0])},335,[38]);
392
- __d(function(g,r,i,a,m,_e,d){"use strict";const e=["errors"];Object.defineProperty(_e,'__esModule',{value:!0}),_e.devicesWebSocketUrl=f,_e.parseDeviceListMessage=_,_e.splitDeviceList=b,_e.useDeviceLists=function(){const e=S();return(0,n.useMemo)(()=>b(e),[e])};var t,s=r(d[0]),o=(t=s)&&t.__esModule?t:{default:t},n=r(d[1]),u=r(d[2]),c=r(d[3]),l=r(d[4]);function f(e=window.location.href){const t=new URL(`${(0,c.basePath)()}/api/devices/ws`,e);return t.protocol='https:'===t.protocol?'wss:':'ws:',t.toString()}const v={simulators:[],emulators:[]},y=500,p=1e4;function S(){const[t,s]=(0,n.useState)(v);return(0,n.useEffect)(()=>{let t=!1,n=null,u=null,c=y,v=new Set;function S(){if(t)return;let u;try{u=new WebSocket(f())}catch{return void b()}n=u,u.onopen=()=>{c=y},u.onmessage=t=>{const n=_(t.data);if(!n)return;v=(0,l.logUtilityErrors)(n.errors,v);const u=(0,o.default)(n,e);s(u)},u.onerror=()=>u.close(),u.onclose=()=>{n===u&&(n=null,b())}}function b(){t||u||(u=setTimeout(()=>{u=null,S()},c),c=Math.min(2*c,p))}return S(),()=>{t=!0,u&&clearTimeout(u),n?.close()}},[]),t}function _(e){if('string'!=typeof e)return null;try{const t=JSON.parse(e);if(t.type!==u.DEVICE_LIST_MESSAGE_TYPE||!Array.isArray(t.devices?.simulators)||!Array.isArray(t.devices?.emulators)||void 0!==t.devices.errors&&!Array.isArray(t.devices.errors))return null;const s=t.devices.errors?.filter(l.isUtilityError);return Object.assign({simulators:t.devices.simulators,emulators:t.devices.emulators},s?{errors:s}:{})}catch{return null}}function b(e){const t=t=>({simulators:e.simulators.filter(e=>e.booted===t),emulators:e.emulators.filter(e=>e.booted===t)});return{booted:t(!0),recent:t(!1)}}},336,[131,38,337,323,326]);
393
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DEVICE_LIST_MESSAGE_TYPE",{enumerable:!0,get:function(){return t}});const t='device-list'},337,[]);
394
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.floatingSidebarToggleInset=function(t,n,c){return t&&n<c+s?l:o},e.FloatingSidebarToggle=function({side:l,inset:s=o,onClick:c}){return(0,n.jsx)("div",{"data-floating-sidebar-toggle":l,style:{position:'absolute',top:28,[l]:s,zIndex:15},children:(0,n.jsx)(t.SidebarToggle,{floating:!0,side:l,onClick:c})})};var t=r(d[0]),n=r(d[1]);const o=24,l=80,s=40},338,[181,151]);
395
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.argentInteractionsWebSocketUrl=l,e.useArgentInteractions=f,e.useArgentInteraction=function(t){const n=f();return t?n[t]??null:null},e.parseArgentInteractionMessage=y;var t=r(d[0]),n=r(d[1]),o=r(d[2]),s=r(d[3]);const c=500,u=1e4;function l(t=window.location.href){const n=new URL(`${(0,s.basePath)()}/api/argent-interactions/ws`,t);return n.protocol='https:'===n.protocol?'wss:':'ws:',n.toString()}function f(){const[n,s]=(0,t.useState)({}),[f,p]=(0,t.useState)(()=>Date.now());(0,t.useEffect)(()=>{let t=!1,n=null,f=null,A=c;function w(){if(t)return;let u;try{u=new WebSocket(l())}catch{return void I()}n=u,u.onopen=()=>{A=c},u.onmessage=t=>{const n=y(t.data);if(!n)return;const c=Date.now(),u=(0,o.normalizeAgentInteractionTimestamp)(n.interaction,c);s(t=>Object.assign({},t,{[u.deviceId]:u})),p(c)},u.onerror=()=>u.close(),u.onclose=()=>{n===u&&(n=null,I())}}function I(){t||f||(f=setTimeout(()=>{f=null,w()},A),A=Math.min(2*A,u))}return w(),()=>{t=!0,f&&clearTimeout(f),n?.close()}},[]);const A=(0,t.useMemo)(()=>(0,o.activeAgentInteractions)(n,f),[n,f]);return(0,t.useEffect)(()=>{const t=(0,o.nextAgentInteractionExpiry)(A,f);if(null===t)return;const n=window.setTimeout(()=>p(Date.now()),Math.max(0,t-Date.now()));return()=>window.clearTimeout(n)},[A,f]),A}function y(t){if('string'!=typeof t)return null;try{const o=JSON.parse(t),s=o.interaction;return o.type===n.ARGENT_INTERACTION_MESSAGE_TYPE&&'string'==typeof s?.id&&'string'==typeof s.deviceId&&'string'==typeof s.timestamp&&Array.isArray(s.segments)&&s.segments.every(p)?o:null}catch{return null}}function p(t){return!!(A(t)&&w(t.startMs)&&Array.isArray(t.frames))&&t.frames.every(t=>A(t)&&w(t.atMs)&&Array.isArray(t.points)&&t.points.length>=1&&t.points.length<=2&&t.points.every(t=>A(t)&&w(t.x)&&w(t.y)))}function A(t){return'object'==typeof t&&null!==t&&!Array.isArray(t)}function w(t){return'number'==typeof t&&Number.isFinite(t)}},339,[38,340,341,323]);
396
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ARGENT_INTERACTION_MESSAGE_TYPE",{enumerable:!0,get:function(){return t}}),e.argentInteractionMessage=function(n){return{type:t,interaction:n}};const t='argent-interaction'},340,[]);
397
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.normalizeAgentInteractionTimestamp=function(t,n){return Number.isFinite(Date.parse(t.timestamp))?t:Object.assign({},t,{timestamp:new Date(n).toISOString()})},e.activeAgentInteractions=function(n,s){return Object.fromEntries(Object.entries(n).filter(([,n])=>(0,t.agentInteractionCursorExpiresAt)(n,s)>s))},e.nextAgentInteractionExpiry=function(n,s){let o=1/0;for(const c of Object.values(n)){const n=(0,t.agentInteractionCursorExpiresAt)(c,s);n>s&&(o=Math.min(o,n))}return Number.isFinite(o)?o:null};var t=r(d[0])},341,[148]);
398
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useNewDeviceOptions=function(){const[o,c]=(0,t.useState)(u);return(0,t.useEffect)(()=>{let t=!1;return(async()=>{try{const o=await fetch(s(),{headers:{Accept:'application/json'}});if(!o.ok)throw new Error(`Unexpected ${o.status}`);const u=await o.json();(0,n.logUtilityErrors)(u.errors),t||c({ios:u.ios,android:u.android})}catch(t){console.warn('[expo-device-hub] No new-device-options endpoint, using empty options:',t)}})(),()=>{t=!0}},[]),o};var t=r(d[0]),o=r(d[1]),n=r(d[2]);const s=()=>`${(0,o.basePath)()}/api/new-device-options`,c={runtimes:[]},u={ios:c,android:c}},342,[38,323,326]);
399
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.SidebarOverlay=function({side:s,open:l,sidebarOpen:c,topmost:u,onDismiss:b,children:p}){const{present:v,reducedMotion:I,visible:S}=(0,t.useSidebarPresence)(l,!c);if(!v)return null;const _=u?12:10,f=I?void 0:`opacity ${t.SIDEBAR_TRANSITION_MS}ms ease`,h=I?void 0:`transform ${t.SIDEBAR_TRANSITION_MS}ms ${t.SIDEBAR_TRANSITION_EASING}`;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{"aria-hidden":"true","data-sidebar-backdrop":s,onClick:b,style:{position:'absolute',inset:0,backgroundColor:o.bg.overlay,opacity:S?.35:0,pointerEvents:S?'auto':'none',transition:f,zIndex:_}}),(0,n.jsx)("div",{"aria-hidden":!S||void 0,"data-sidebar-overlay":s,"data-state":S?'open':'closed',style:{position:'absolute',top:0,[s]:0,zIndex:_+1,backgroundColor:o.bg.subtle,boxShadow:o.shadow.lg,pointerEvents:S?'auto':'none',transform:S?'translateX(0)':`translateX(${'left'===s?'-100%':'100%'})`,transition:h,willChange:'transform'},children:p})]})};var o=r(d[0]),t=r(d[1]),n=r(d[2])},343,[181,322,151]);
400
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveSidebarLayout=o,e.useSidebarLayout=function({leftWidth:s,rightWidth:c,minStreamWidth:h}){const f=(0,t.useRef)(null),[u,l]=(0,t.useState)(()=>'undefined'==typeof window?0:window.innerWidth),b=(0,n.useDashboardStore)(t=>t.sidebarPreferences.left),S=(0,n.useDashboardStore)(t=>t.sidebarPreferences.right),p=(0,n.useDashboardStore)(t=>t.lastOpenedSidebar),W=(0,n.useDashboardStore)(t=>t.openSidebar),O=(0,n.useDashboardStore)(t=>t.closeSidebar);(0,t.useEffect)(()=>{const t=f.current;if(!t)return;const n=()=>l(t.getBoundingClientRect().width);n();const o=new ResizeObserver(n);return o.observe(t),()=>o.disconnect()},[]);const D=o({leftPreference:b,rightPreference:S,containerWidth:u,leftWidth:s,rightWidth:c,minStreamWidth:h});return Object.assign({},D,{containerRef:f,containerWidth:u,leftOpen:D.leftOpen,lastOpened:p,openLeft:()=>{const t=u>=s+h+(D.rightDocked?c:0);W('left',t)},closeLeft:()=>O('left'),openRight:()=>{W('right',u>=c+h)},closeRight:()=>O('right')})};var t=r(d[0]),n=r(d[1]);function o({leftPreference:t,rightPreference:n,containerWidth:o,leftWidth:s,rightWidth:c,minStreamWidth:h}){const f=o>=c+h,u='open'===n||'auto'===n&&f,l=u&&f,b=o>=s+h+(l?c:0),S='open'===t||'auto'===t&&b,p=S&&b;return{leftOpen:S,leftDocked:p,leftOverlay:S&&!p,rightOpen:u,rightDocked:l,rightOverlay:u&&!l}}},344,[38,327]);
401
- __d(function(g,r,i,a,m,e,d){"use strict";function o(o){return'ios'===o||'android'===o?o:void 0}Object.defineProperty(e,'__esModule',{value:!0}),e.parsePlatformFilter=o,e.dashboardPlatformFilter=function(){return'undefined'==typeof window?void 0:o(window.__EXPO_DEVICE_HUB_PLATFORM__)}},345,[]);
367
+ __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.StreamPanel=function({device:p,client:u,agentInteraction:f,DeviceScreen:h,displayScreen:x,onShutdown:v,onRemove:b,framed:y=!0}){return(0,n.jsxs)("section",{style:{flex:1,minWidth:0,display:'flex',flexDirection:'column',alignItems:'center',justifyContent:'center',gap:40,padding:40,margin:y?'16px 8px':0,boxSizing:'border-box',backgroundColor:t.bg.default,border:y?`1px solid ${t.border.secondary}`:'none',borderRadius:y?t.radius.lg:0,boxShadow:y?t.shadow.sm:'none',overflow:'hidden'},children:[(0,n.jsxs)("div",{style:{display:'flex',flexDirection:'column',alignItems:'center',gap:20,width:'100%',minHeight:0},children:[(0,n.jsx)(o.DeviceTitle,{device:p,status:u.status},p.id),(0,n.jsx)(a.PhoneFrame,{platform:p.platform,client:u,agentInteraction:f,DeviceScreen:h,displayScreen:x})]}),(0,n.jsx)(c.StreamControls,{platform:p.platform,physical:p.physical,appearance:u.appearance,onToggleAppearance:()=>u.setAppearance('dark'===u.appearance?'light':'dark'),onHome:()=>u.pressButton('home'),onBack:()=>u.pressButton('back'),onRecents:()=>u.pressButton('recents'),onReload:()=>u.reload(),onRotate:()=>u.rotate(),onSave:async()=>{const n=await u.screenshot();n&&s(n,l(p.name))},onShutdown:v,onRemove:b})]})};var n=r(d[0]),t=r(d[1]),o=r(d[2]),a=r(d[3]),c=r(d[4]);function s(n,t){const o=URL.createObjectURL(n),a=document.createElement('a');a.href=o,a.download=t,document.body.appendChild(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(o),0)}function l(n){return`${n.trim().replace(/[^a-zA-Z0-9._-]+/g,'-').replace(/^-+|-+$/g,'')||'device'}-${(new Date).toISOString().replace(/[:.]/g,'-').replace(/Z$/,'')}.png`}},311,[151,294,312,313,316]);
368
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.DeviceTitle=function({device:s,status:c}){const[b,u]=(0,l.useState)(null),x=b===s.id,f=x?s.id:s.name,h=t[c];return(0,o.jsx)(n.Button,{theme:"tertiary",size:"2xs",onClick:()=>u(x?null:s.id),leftSlot:(0,o.jsx)("span",{title:f,style:{display:'block',flex:'1 1 auto',minWidth:0,overflow:'hidden',textOverflow:'ellipsis',whiteSpace:'nowrap',fontFamily:x?n.font.mono:n.font.sans},children:f}),rightSlot:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{"aria-hidden":!0,style:{width:6,height:6,flexShrink:0,boxSizing:'content-box',border:`2px solid ${h.ringColor}`,borderRadius:n.radius.full,backgroundColor:h.dotColor}}),(0,o.jsx)("span",{"aria-live":"polite",style:{flexShrink:0,color:h.labelColor},children:h.label})]}),style:{maxWidth:'min(100%, 320px)',minWidth:0,flexShrink:0,boxSizing:'border-box',gap:6,paddingInline:12,borderWidth:.5,borderColor:n.border.default,borderRadius:n.radius.full}})};var o=r(d[0]),l=r(d[1]),n=r(d[2]);const t={idle:{label:'Offline',dotColor:n.icon.danger,ringColor:n.border.danger,labelColor:n.text.secondary},connecting:{label:'Starting',dotColor:n.icon.warning,ringColor:n.border.warning,labelColor:n.text.secondary},streaming:{label:'Live',dotColor:n.text.success,ringColor:n.border.success,labelColor:n.text.success},error:{label:'Error',dotColor:n.icon.danger,ringColor:n.border.danger,labelColor:n.text.secondary}}},312,[151,38,294]);
369
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.PhoneFrame=function({platform:h,client:x,agentInteraction:b,DeviceScreen:y,displayScreen:j}){const[f,P]=(0,n.useState)(!1),[S,w]=(0,n.useState)(null),{ratio:F,radiusFraction:$,squircle:q}=v[h],O=x?j(x.screen):null,_=O&&O.height>0?O.width/O.height:F,I={width:`min(${p*Math.max(_,1)}px, calc((100vh - ${u}px) * ${_}), 100%)`,aspectRatio:`${_}`,containerType:'inline-size',position:'relative',isolation:'isolate'},M=$/Math.max(_,1)*100,T=`${M.toFixed(3)}cqw`,k=x&&'idle'!==x.status,z=!!b&&f&&S!==b.id;return(0,t.jsx)("div",{"data-testid":"device-screen-frame","data-agent-active":b?'true':'false',style:Object.assign({},I,{boxShadow:l,borderRadius:T}),onPointerEnter:t=>{'mouse'===t.pointerType&&P(!0)},onPointerLeave:()=>P(!1),children:(0,t.jsxs)("div",{"data-testid":"device-screen-clip",style:{position:'absolute',inset:0,clipPath:(0,c.deviceScreenClipPath)(M,q)},children:[k?(0,t.jsx)(y,{client:x,agentInteraction:b}):(0,t.jsx)("div",{style:{width:'100%',height:'100%',backgroundColor:s.bg.element}}),(0,t.jsx)("div",{"data-testid":"agent-device-overlay-clip",style:{position:'absolute',inset:0,zIndex:2,pointerEvents:z?'auto':'none'},children:(0,t.jsx)(o.AgentDeviceOverlay,{visible:z,onTakeOver:()=>w(b?.id??null)})})]})})};var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]),c=r(d[4]);const l='0 40px 80px rgba(0, 0, 0, 0.4), 0 12px 28px rgba(0, 0, 0, 0.28)',u=258,p=480,v={ios:{ratio:.460431654676259,radiusFraction:.14066496163682865,squircle:!0},android:{ratio:.450070323488045,radiusFraction:.02564102564102564,squircle:!1}}},313,[151,38,294,314,315]);
370
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.AgentDeviceOverlay=function({visible:c,onTakeOver:h}){return(0,t.jsx)("div",{hidden:!c,"aria-hidden":!c,role:"dialog","aria-label":"Agent device activity","data-testid":"agent-device-overlay",style:{position:'absolute',inset:0,zIndex:2,display:c?'flex':'none',alignItems:'center',justifyContent:'center',padding:24,boxSizing:'border-box',pointerEvents:'auto',textAlign:'center',backgroundColor:s},children:(0,t.jsxs)("div",{style:{display:'flex',width:'100%',maxWidth:300,flexDirection:'column',alignItems:'center',gap:12},children:[(0,t.jsx)("div",{style:Object.assign({color:o},n.textSize.sm,{fontWeight:600}),children:"Agent is using this device"}),(0,t.jsx)("div",{style:Object.assign({maxWidth:260,color:l},n.textSize.xs),children:"Taking over might collide with what the agent is doing."}),(0,t.jsx)(n.Button,{theme:"agent-overlay",size:"sm",onClick:h,style:{fontFamily:'inherit'},children:(0,t.jsx)("span",{style:Object.assign({},n.textSize.xs,{fontWeight:500}),children:"Take over anyway"})})]})})};var t=r(d[0]),n=r(d[1]);const s='rgba(0, 0, 0, 0.55)',l='rgba(255, 255, 255, 0.7)',o='rgba(218, 233, 255, 0.74)'},314,[151,294]);
371
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.deviceScreenClipPath=function($,f){const u=n($),l=n($*(f?o:t)),s=`-${c}`,h=`calc(${u} - ${c})`,v=`calc(100% - ${u} + ${c})`;return[`shape(from ${u} ${s}`,`hline to calc(100% - ${u})`,`curve to 100% ${h} with ${l} 0 from start / 0 -${l} from end`,`vline to ${v}`,`curve to calc(100% - ${u}) calc(100% + ${c}) with 0 ${l} from start / ${l} 0 from end`,`hline to ${u}`,`curve to 0 ${v} with -${l} 0 from start / 0 ${l} from end`,`vline to ${h}`,`curve to ${u} ${s} with 0 -${l} from start / -${l} 0 from end`,'close)'].join(', ')};const t=$(1),o=$(1.1),c='0.5px';function $(t){return(Math.pow(.5,Math.pow(.5,t))-.5)/.375}function n(t){return`${t.toFixed(3)}cqw`}},315,[]);
372
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.StreamControls=function({platform:t,physical:l,appearance:c,onToggleAppearance:s,onHome:I,onBack:p,onRecents:x,onReload:j,onRotate:u,onSave:b,onShutdown:h,onRemove:C}){const R='android'===t,S=(0,o.jsxs)(n.Dropdown,{side:"top",align:"end",alignOffset:-80,onCloseAutoFocus:o=>o.preventDefault(),trigger:(0,o.jsx)(n.ControlButton,{icon:(0,o.jsx)(n.DotsIcon,{}),label:"More"}),children:[R&&(0,o.jsx)(n.DropdownItem,{label:"Back",Icon:n.BackIcon,onSelect:p}),R&&(0,o.jsx)(n.DropdownItem,{label:"Recents",Icon:n.RecentsIcon,onSelect:x}),(0,o.jsx)(n.DropdownItem,{label:"Rotate",Icon:n.RotateIcon,onSelect:u}),(0,o.jsx)(n.DropdownItem,{label:"Shutdown",Icon:n.PowerIcon,onSelect:h}),!l&&(0,o.jsx)(n.DropdownItem,{label:"Remove",Icon:n.TrashIcon,destructive:!0,onSelect:C})]});return(0,o.jsxs)("div",{style:{display:'flex',alignItems:'flex-end',gap:24},children:[(0,o.jsx)(n.ControlButton,{icon:(0,o.jsx)(n.CameraIcon,{}),label:"Save",onClick:b}),(0,o.jsx)(n.Switch,{checked:'dark'===c,onChange:s,label:"Theme"}),(0,o.jsx)(n.ControlButton,{icon:(0,o.jsx)(n.HomeIcon,{}),label:"Home",variant:"primary",onClick:I}),(0,o.jsx)(n.ControlButton,{icon:(0,o.jsx)(n.RefreshIcon,{}),label:"Reload",onClick:j}),S]})};var o=r(d[0]),n=r(d[1])},316,[151,294]);
373
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.EmptyState=function({platform:n}){const s='ios'===n?'No booted simulators':'android'===n?'No booted emulators':'No booted devices',l='ios'===n?'There are no booted simulators. Use the + button to add one.':'android'===n?'There are no booted emulators or connected devices. Use the + button to add one.':'There are no booted simulators, emulators, or connected devices. Use the + button to add a simulator or emulator.';return(0,o.jsxs)("section",{style:{flex:1,minWidth:0,display:'flex',flexDirection:'column',alignItems:'center',justifyContent:'center',gap:16,padding:40,margin:'16px 8px',boxSizing:'border-box',backgroundColor:t.bg.default,border:`1px solid ${t.border.secondary}`,borderRadius:t.radius.lg,boxShadow:t.shadow.sm,overflow:'hidden',textAlign:'center'},children:[(0,o.jsx)("div",{style:{display:'flex',alignItems:'center',justifyContent:'center',width:56,height:56,borderRadius:t.radius.full,border:`1px solid ${t.border.secondary}`,backgroundColor:t.bg.subtle},children:(0,o.jsx)(t.PhoneIcon,{size:28,color:t.icon.secondary})}),(0,o.jsx)("h2",{style:Object.assign({},t.heading.lg,{color:t.text.default,margin:0}),children:s}),(0,o.jsx)("p",{style:Object.assign({},t.textSize.sm,{color:t.text.secondary,margin:0,maxWidth:320}),children:l})]})};var o=r(d[0]),t=r(d[1])},317,[151,294]);
374
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.OutputSection=function({client:c}){return(0,t.jsx)(n.LogsSection,{client:c})};var t=r(d[0]),n=r(d[1])},318,[151,309]);
375
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.StreamSection=function({mode:b,availability:u,onChange:v}){const h=(0,l.useId)(),j=!u.h264||!u.webrtc,p=c.map(t=>Object.assign({},t,{disabled:!u[t.value]}));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.SidebarRow,{label:"Stream",children:(0,t.jsx)(n.SegmentedControl,{ariaLabel:"Stream mode",ariaDescribedBy:j?h:void 0,options:p,value:b,onChange:v})}),j&&(0,t.jsx)("span",{id:h,style:Object.assign({},s.textSize.xs,{display:'block',padding:'0 0 11px',color:s.text.tertiary}),children:"H.264 and WebRTC require localhost or HTTPS. MJPEG is used on insecure HTTP."})]})};var t=r(d[0]),l=r(d[1]),n=r(d[2]),s=r(d[3]),o=r(d[4]);const c=[{value:'mjpeg',label:'MJPEG'},{value:'h264',label:'H.264'},{value:'webrtc',label:'WebRTC'}]},319,[151,38,266,294,301]);
376
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.BootErrorModal=function({open:n,onClose:l,deviceName:s,message:c}){return(0,o.jsx)(t.DialogRoot,{open:n,onOpenChange:o=>{o||l()},children:(0,o.jsxs)(t.DialogContent,{children:[(0,o.jsx)(t.DialogTitle,{title:"Failed to boot device"}),(0,o.jsxs)(t.DialogContentContainer,{children:[(0,o.jsxs)("p",{style:{margin:0,fontSize:14,lineHeight:1.5,color:t.text.secondary},children:[(0,o.jsx)("strong",{style:{color:t.text.default,fontWeight:600},children:s})," could not be booted."]}),(0,o.jsx)("pre",{style:{margin:'6px 0 0',padding:'10px 12px',overflowX:'auto',whiteSpace:'pre-wrap',overflowWrap:'anywhere',backgroundColor:t.bg.subtle,border:`1px solid ${t.border.default}`,borderRadius:t.radius.lg,color:t.text.danger,fontFamily:t.font.mono,fontSize:12,lineHeight:1.5},children:c})]}),(0,o.jsx)(t.DialogFooter,{children:(0,o.jsx)(t.Button,{theme:"primary",onClick:l,children:"Close"})})]})})};var o=r(d[0]),t=r(d[1])},320,[151,294]);
377
+ __d(function(g,r,i,a,m,e,d){},321,[]);
378
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.AnimatedDockedSidebar=function({side:s,width:o,open:l,sidebarOpen:h,children:S}){const{present:c,reducedMotion:I,visible:_}=(0,t.useSidebarPresence)(l,!h);if(!c)return null;const u=I?void 0:`width ${t.SIDEBAR_TRANSITION_MS}ms ${t.SIDEBAR_TRANSITION_EASING}`,A=I?void 0:`transform ${t.SIDEBAR_TRANSITION_MS}ms ${t.SIDEBAR_TRANSITION_EASING}`;return(0,n.jsx)("div",{"aria-hidden":!_||void 0,"data-sidebar-docked":s,"data-state":_?'open':'closed',style:{width:_?o:0,height:'100%',flexShrink:0,overflow:'hidden',pointerEvents:_?'auto':'none',transition:u},children:(0,n.jsx)("div",{style:{width:o,height:'100%',transform:_?'translateX(0)':`translateX(${'left'===s?'-100%':'100%'})`,transition:A,willChange:'transform'},children:S})})};var t=r(d[0]),n=r(d[1])},322,[323,151]);
379
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SIDEBAR_TRANSITION_MS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"SIDEBAR_TRANSITION_EASING",{enumerable:!0,get:function(){return c}}),e.useSidebarPresence=function(c,o){const s=u(),[f,w]=(0,t.useState)(c),[S,b]=(0,t.useState)(c),l=(0,t.useRef)(c);return(0,t.useEffect)(()=>{if(c){const t=l.current;if(l.current=!0,w(!0),s||t)return void b(!0);let n=0;const c=requestAnimationFrame(()=>{n=requestAnimationFrame(()=>b(!0))});return()=>{cancelAnimationFrame(c),cancelAnimationFrame(n)}}if(b(!1),!o||s)return l.current=!1,void w(!1);const t=window.setTimeout(()=>{l.current=!1,w(!1)},n);return()=>window.clearTimeout(t)},[o,c,s]),{present:f,reducedMotion:s,visible:c&&S}};var t=r(d[0]);const n=200,c='cubic-bezier(0.16, 1, 0.3, 1)';function u(){const[n,c]=(0,t.useState)(()=>'undefined'!=typeof window&&!0===window.matchMedia?.('(prefers-reduced-motion: reduce)').matches);return(0,t.useEffect)(()=>{const t=window.matchMedia?.('(prefers-reduced-motion: reduce)');if(!t)return;const n=()=>c(t.matches);return t.addEventListener('change',n),()=>t.removeEventListener('change',n)},[]),n}},323,[38]);
380
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.dashboardHideBootDevice=function(){return'undefined'!=typeof window&&!0===window.__EXPO_DEVICE_HUB_HIDE_BOOT_DEVICE__}},324,[]);
381
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.basePath=function(){if(window.__DEV__)return'/_expo/plugins/expo-device-hub';const n=window.__EXPO_DEVICE_HUB_BASE_PATH__;if(null==n)throw new Error('window.__EXPO_DEVICE_HUB_BASE_PATH__ is not defined');return(0,_.trimTrailingSlash)(n)};var _=r(d[0])},325,[326]);
382
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.trimTrailingSlash=function(t){return t.replace(/\/+$/,'')}},326,[]);
383
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shutdownDevice=function(t){return u(o(),t)},e.removeDevice=function(t){return u(c(),t)},e.bootDevice=async function(t){return p(s(),{platform:t.platform,id:t.id,name:t.name})},e.createDevice=async function(t){return p(l(),{platform:t.platform,name:t.name,runtime:t.runtime,deviceType:t.deviceType})};var t=r(d[0]),n=r(d[1]);const o=()=>`${(0,t.basePath)()}/api/devices/shutdown`,c=()=>`${(0,t.basePath)()}/api/devices/remove`,s=()=>`${(0,t.basePath)()}/api/devices/boot`,l=()=>`${(0,t.basePath)()}/api/devices/create`;async function u(t,o){try{const c=await fetch(t,{method:'POST',headers:{'Content-Type':'application/json',Accept:'application/json'},body:JSON.stringify({platform:o.platform,id:o.id,name:o.name})});if(!c.ok)throw new Error(`Unexpected ${c.status}`);const s=await c.json();return(0,n.logUtilityErrors)(s.errors),!0===s.ok}catch(t){return console.warn('[expo-device-hub] Device action failed:',t),!1}}async function p(t,o){try{const c=await fetch(t,{method:'POST',headers:{'Content-Type':'application/json',Accept:'application/json'},body:JSON.stringify(o),signal:AbortSignal.timeout(2e5)}),s=await c.json();if((0,n.logUtilityErrors)(s.errors),!c.ok)return{id:null,error:s.error??`Unexpected ${c.status}`};const l=s.id??s.serial;return s.ok&&l?{id:l,error:null}:{id:null,error:s.error??'The device did not come online.'}}catch(t){return console.warn('[expo-device-hub] Device start failed:',t),{id:null,error:t instanceof Error?t.message:String(t)}}}},327,[325,328]);
384
+ __d(function(g,r,i,a,m,e,d){"use strict";function t(t){if(!t||'object'!=typeof t)return!1;const o=t;return'string'==typeof o.id&&'string'==typeof o.message&&'string'==typeof o.error}Object.defineProperty(e,'__esModule',{value:!0}),e.isUtilityError=t,e.logUtilityErrors=function(o,n=new Set){const s=new Set;if(!Array.isArray(o))return s;for(const f of o)t(f)&&!s.has(f.id)&&(s.add(f.id),n.has(f.id)||console.error(f.message,f.error));return s}},328,[]);
385
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DEFAULT_SIDEBAR_WIDTH",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"HIDE_UNSUPPORTED_DEVICES_STORAGE_KEY",{enumerable:!0,get:function(){return u}}),e.readHideUnsupportedDevices=l,e.persistHideUnsupportedDevicesDefault=function(t){try{null===t.getItem(u)&&t.setItem(u,'true')}catch{}},e.createDashboardStore=v,Object.defineProperty(e,"useDashboardStore",{enumerable:!0,get:function(){return f}});var t=r(d[0]),s=r(d[1]),c=r(d[2]),n=r(d[3]);const o=400,u='expo-device-hub.hideUnsupportedDevices';function l(t){try{return'false'!==t.getItem(u)}catch{return!0}}function b(){if('undefined'==typeof window)return!0;try{return l(window.localStorage)}catch{return!0}}function D(){const t=(0,n.browserStreamModeAvailability)();return{selectedDeviceId:'',addedDevices:[],streamMode:(0,n.resolveStreamMode)((0,c.dashboardTransport)(),t),sidebarWidths:{left:o,right:o},sidebarPreferences:{left:(0,s.dashboardHideSidebar)()?'hidden':'auto',right:'auto'},lastOpenedSidebar:'right',hideUnsupportedDevices:b()}}function v(s={}){return(0,t.create)()(t=>Object.assign({},D(),s,{selectDevice:s=>t({selectedDeviceId:s}),reconcileSelectedDevice:s=>t(t=>s.includes(t.selectedDeviceId)?t:{selectedDeviceId:s[0]??''}),trackAddedDevice:(s,c)=>t(t=>{const n=new Set([...c,s.id]);return{addedDevices:[...t.addedDevices.filter(t=>!n.has(t.id)),s],selectedDeviceId:s.id}}),dismissDevice:s=>t(t=>({addedDevices:t.addedDevices.filter(t=>t.id!==s),selectedDeviceId:t.selectedDeviceId===s?'':t.selectedDeviceId})),chooseStreamMode:(s,c)=>t({streamMode:(0,n.resolveStreamMode)(s,c)}),resizeSidebar:(s,c)=>t(t=>({sidebarWidths:Object.assign({},t.sidebarWidths,{[s]:c})})),openSidebar:(s,c)=>t(t=>({sidebarPreferences:Object.assign({},t.sidebarPreferences,{[s]:c?'auto':'open'}),lastOpenedSidebar:s})),closeSidebar:s=>t(t=>({sidebarPreferences:Object.assign({},t.sidebarPreferences,{[s]:'hidden'})})),setHideUnsupportedDevices:s=>t({hideUnsupportedDevices:s})}))}const f=v()},329,[330,333,334,335]);
386
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0});var t=r(d[0]);Object.keys(t).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=r(d[1]);Object.keys(n).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})})},330,[331,332]);
387
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createStore",{enumerable:!0,get:function(){return n}});const t=t=>{let n;const c=new Set,o=(t,o)=>{const s="function"==typeof t?t(n):t;if(!Object.is(s,n)){const t=n;n=(null!=o?o:"object"!=typeof s||null===s)?s:Object.assign({},n,s),c.forEach(c=>c(n,t))}},s=()=>n,u={setState:o,getState:s,getInitialState:()=>l,subscribe:t=>(c.add(t),()=>c.delete(t))},l=n=t(o,s,u);return u},n=n=>n?t(n):t},331,[]);
388
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"create",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"useStore",{enumerable:!0,get:function(){return l}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e},n=r(d[1]);const c=e=>e;function l(e,t=c){const n=u.default.useSyncExternalStore(e.subscribe,u.default.useCallback(()=>t(e.getState()),[e,t]),u.default.useCallback(()=>t(e.getInitialState()),[e,t]));return u.default.useDebugValue(n),n}const s=e=>{const t=(0,n.createStore)(e),u=e=>l(t,e);return Object.assign(u,t),u},o=e=>e?s(e):s},332,[38,331]);
389
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.dashboardHideSidebar=function(){return'undefined'!=typeof window&&!0===window.__EXPO_DEVICE_HUB_HIDE_SIDEBAR__}},333,[]);
390
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DEFAULT_TRANSPORT",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"TRANSPORTS",{enumerable:!0,get:function(){return t}}),e.parseTransport=o,e.dashboardTransport=function(){return'undefined'==typeof window?n:o(window.__EXPO_DEVICE_HUB_TRANSPORT__)??n};const n='mjpeg',t=['mjpeg','h264','webrtc'];function o(n){return t.includes(n)?n:void 0}},334,[]);
391
+ __d(function(g,r,i,a,m,e,d){"use strict";function t(t){return{mjpeg:!0,h264:t.secureContext&&t.h264Decoder,webrtc:t.secureContext&&t.webRtc}}Object.defineProperty(e,'__esModule',{value:!0}),e.streamModeAvailability=t,e.browserStreamModeAvailability=function(){if('undefined'==typeof window)return{mjpeg:!0,h264:!1,webrtc:!1};return t({secureContext:window.isSecureContext,h264Decoder:void 0!==window.VideoDecoder,webRtc:void 0!==window.RTCPeerConnection&&void 0!==window.RTCRtpReceiver})},e.androidStreamModeAvailability=function(t,o){return Object.assign({},t,{h264:t.h264||o})},e.resolveStreamMode=function(t,o){return o[t]?t:'mjpeg'}},335,[]);
392
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"HIDE_UNSUPPORTED_DEVICES_STORAGE_KEY",{enumerable:!0,get:function(){return n.HIDE_UNSUPPORTED_DEVICES_STORAGE_KEY}}),Object.defineProperty(e,"persistHideUnsupportedDevicesDefault",{enumerable:!0,get:function(){return n.persistHideUnsupportedDevicesDefault}}),Object.defineProperty(e,"readHideUnsupportedDevices",{enumerable:!0,get:function(){return n.readHideUnsupportedDevices}}),e.useHideUnsupportedDevices=function(){const s=(0,n.useDashboardStore)(t=>t.hideUnsupportedDevices),o=(0,n.useDashboardStore)(t=>t.setHideUnsupportedDevices);return(0,t.useEffect)(()=>{(0,n.persistHideUnsupportedDevicesDefault)(window.localStorage);const t=t=>{t&&null!==t.key&&t.key!==n.HIDE_UNSUPPORTED_DEVICES_STORAGE_KEY||o((0,n.readHideUnsupportedDevices)(window.localStorage))};return t(),window.addEventListener('storage',t),()=>window.removeEventListener('storage',t)},[o]),s},e.visibleDevices=function(t,n){return n?t.filter(t=>t.supported):t},e.visibleNewDeviceOptions=function(t,n){return n?{runtimes:t.runtimes.map(t=>Object.assign({},t,{models:t.models.filter(t=>t.supported)})).filter(t=>t.models.length>0)}:t};var t=r(d[0]),n=r(d[1])},336,[38,329]);
393
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useColorScheme=function(){const[n,c]=(0,t.useState)('light');return(0,t.useEffect)(()=>{if('undefined'==typeof window||!window.matchMedia)return;const t=window.matchMedia('(prefers-color-scheme: dark)'),n=()=>c(t.matches?'dark':'light');return n(),t.addEventListener('change',n),()=>t.removeEventListener('change',n)},[]),n};var t=r(d[0])},337,[38]);
394
+ __d(function(g,r,i,a,m,_e,d){"use strict";const e=["errors"];Object.defineProperty(_e,'__esModule',{value:!0}),_e.devicesWebSocketUrl=f,_e.parseDeviceListMessage=_,_e.splitDeviceList=b,_e.useDeviceLists=function(){const e=S();return(0,n.useMemo)(()=>b(e),[e])};var t,s=r(d[0]),o=(t=s)&&t.__esModule?t:{default:t},n=r(d[1]),u=r(d[2]),c=r(d[3]),l=r(d[4]);function f(e=window.location.href){const t=new URL(`${(0,c.basePath)()}/api/devices/ws`,e);return t.protocol='https:'===t.protocol?'wss:':'ws:',t.toString()}const v={simulators:[],emulators:[]},y=500,p=1e4;function S(){const[t,s]=(0,n.useState)(v);return(0,n.useEffect)(()=>{let t=!1,n=null,u=null,c=y,v=new Set;function S(){if(t)return;let u;try{u=new WebSocket(f())}catch{return void b()}n=u,u.onopen=()=>{c=y},u.onmessage=t=>{const n=_(t.data);if(!n)return;v=(0,l.logUtilityErrors)(n.errors,v);const u=(0,o.default)(n,e);s(u)},u.onerror=()=>u.close(),u.onclose=()=>{n===u&&(n=null,b())}}function b(){t||u||(u=setTimeout(()=>{u=null,S()},c),c=Math.min(2*c,p))}return S(),()=>{t=!0,u&&clearTimeout(u),n?.close()}},[]),t}function _(e){if('string'!=typeof e)return null;try{const t=JSON.parse(e);if(t.type!==u.DEVICE_LIST_MESSAGE_TYPE||!Array.isArray(t.devices?.simulators)||!Array.isArray(t.devices?.emulators)||void 0!==t.devices.errors&&!Array.isArray(t.devices.errors))return null;const s=t.devices.errors?.filter(l.isUtilityError);return Object.assign({simulators:t.devices.simulators,emulators:t.devices.emulators},s?{errors:s}:{})}catch{return null}}function b(e){const t=t=>({simulators:e.simulators.filter(e=>e.booted===t),emulators:e.emulators.filter(e=>e.booted===t)});return{booted:t(!0),recent:t(!1)}}},338,[131,38,339,325,328]);
395
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DEVICE_LIST_MESSAGE_TYPE",{enumerable:!0,get:function(){return t}});const t='device-list'},339,[]);
396
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.floatingSidebarToggleInset=function(t,n,c){return t&&n<c+s?l:o},e.FloatingSidebarToggle=function({side:l,inset:s=o,onClick:c}){return(0,n.jsx)("div",{"data-floating-sidebar-toggle":l,style:{position:'absolute',top:28,[l]:s,zIndex:15},children:(0,n.jsx)(t.SidebarToggle,{floating:!0,side:l,onClick:c})})};var t=r(d[0]),n=r(d[1]);const o=24,l=80,s=40},340,[181,151]);
397
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.argentInteractionsWebSocketUrl=l,e.useArgentInteractions=f,e.useArgentInteraction=function(t){const n=f();return t?n[t]??null:null},e.parseArgentInteractionMessage=y;var t=r(d[0]),n=r(d[1]),o=r(d[2]),s=r(d[3]);const c=500,u=1e4;function l(t=window.location.href){const n=new URL(`${(0,s.basePath)()}/api/argent-interactions/ws`,t);return n.protocol='https:'===n.protocol?'wss:':'ws:',n.toString()}function f(){const[n,s]=(0,t.useState)({}),[f,p]=(0,t.useState)(()=>Date.now());(0,t.useEffect)(()=>{let t=!1,n=null,f=null,A=c;function w(){if(t)return;let u;try{u=new WebSocket(l())}catch{return void I()}n=u,u.onopen=()=>{A=c},u.onmessage=t=>{const n=y(t.data);if(!n)return;const c=Date.now(),u=(0,o.normalizeAgentInteractionTimestamp)(n.interaction,c);s(t=>Object.assign({},t,{[u.deviceId]:u})),p(c)},u.onerror=()=>u.close(),u.onclose=()=>{n===u&&(n=null,I())}}function I(){t||f||(f=setTimeout(()=>{f=null,w()},A),A=Math.min(2*A,u))}return w(),()=>{t=!0,f&&clearTimeout(f),n?.close()}},[]);const A=(0,t.useMemo)(()=>(0,o.activeAgentInteractions)(n,f),[n,f]);return(0,t.useEffect)(()=>{const t=(0,o.nextAgentInteractionExpiry)(A,f);if(null===t)return;const n=window.setTimeout(()=>p(Date.now()),Math.max(0,t-Date.now()));return()=>window.clearTimeout(n)},[A,f]),A}function y(t){if('string'!=typeof t)return null;try{const o=JSON.parse(t),s=o.interaction;return o.type===n.ARGENT_INTERACTION_MESSAGE_TYPE&&'string'==typeof s?.id&&'string'==typeof s.deviceId&&'string'==typeof s.timestamp&&Array.isArray(s.segments)&&s.segments.every(p)?o:null}catch{return null}}function p(t){return!!(A(t)&&w(t.startMs)&&Array.isArray(t.frames))&&t.frames.every(t=>A(t)&&w(t.atMs)&&Array.isArray(t.points)&&t.points.length>=1&&t.points.length<=2&&t.points.every(t=>A(t)&&w(t.x)&&w(t.y)))}function A(t){return'object'==typeof t&&null!==t&&!Array.isArray(t)}function w(t){return'number'==typeof t&&Number.isFinite(t)}},341,[38,342,343,325]);
398
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ARGENT_INTERACTION_MESSAGE_TYPE",{enumerable:!0,get:function(){return t}}),e.argentInteractionMessage=function(n){return{type:t,interaction:n}};const t='argent-interaction'},342,[]);
399
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.normalizeAgentInteractionTimestamp=function(t,n){return Number.isFinite(Date.parse(t.timestamp))?t:Object.assign({},t,{timestamp:new Date(n).toISOString()})},e.activeAgentInteractions=function(n,s){return Object.fromEntries(Object.entries(n).filter(([,n])=>(0,t.agentInteractionCursorExpiresAt)(n,s)>s))},e.nextAgentInteractionExpiry=function(n,s){let o=1/0;for(const c of Object.values(n)){const n=(0,t.agentInteractionCursorExpiresAt)(c,s);n>s&&(o=Math.min(o,n))}return Number.isFinite(o)?o:null};var t=r(d[0])},343,[148]);
400
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useNewDeviceOptions=function(){const[o,c]=(0,t.useState)(u);return(0,t.useEffect)(()=>{let t=!1;return(async()=>{try{const o=await fetch(s(),{headers:{Accept:'application/json'}});if(!o.ok)throw new Error(`Unexpected ${o.status}`);const u=await o.json();(0,n.logUtilityErrors)(u.errors),t||c({ios:u.ios,android:u.android})}catch(t){console.warn('[expo-device-hub] No new-device-options endpoint, using empty options:',t)}})(),()=>{t=!0}},[]),o};var t=r(d[0]),o=r(d[1]),n=r(d[2]);const s=()=>`${(0,o.basePath)()}/api/new-device-options`,c={runtimes:[]},u={ios:c,android:c}},344,[38,325,328]);
401
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.SidebarOverlay=function({side:s,open:l,sidebarOpen:c,topmost:u,onDismiss:b,children:p}){const{present:v,reducedMotion:I,visible:S}=(0,t.useSidebarPresence)(l,!c);if(!v)return null;const _=u?12:10,f=I?void 0:`opacity ${t.SIDEBAR_TRANSITION_MS}ms ease`,h=I?void 0:`transform ${t.SIDEBAR_TRANSITION_MS}ms ${t.SIDEBAR_TRANSITION_EASING}`;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{"aria-hidden":"true","data-sidebar-backdrop":s,onClick:b,style:{position:'absolute',inset:0,backgroundColor:o.bg.overlay,opacity:S?.35:0,pointerEvents:S?'auto':'none',transition:f,zIndex:_}}),(0,n.jsx)("div",{"aria-hidden":!S||void 0,"data-sidebar-overlay":s,"data-state":S?'open':'closed',style:{position:'absolute',top:0,[s]:0,zIndex:_+1,backgroundColor:o.bg.subtle,boxShadow:o.shadow.lg,pointerEvents:S?'auto':'none',transform:S?'translateX(0)':`translateX(${'left'===s?'-100%':'100%'})`,transition:h,willChange:'transform'},children:p})]})};var o=r(d[0]),t=r(d[1]),n=r(d[2])},345,[181,323,151]);
402
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveSidebarLayout=o,e.useSidebarLayout=function({leftWidth:s,rightWidth:c,minStreamWidth:h}){const f=(0,t.useRef)(null),[u,l]=(0,t.useState)(()=>'undefined'==typeof window?0:window.innerWidth),b=(0,n.useDashboardStore)(t=>t.sidebarPreferences.left),S=(0,n.useDashboardStore)(t=>t.sidebarPreferences.right),p=(0,n.useDashboardStore)(t=>t.lastOpenedSidebar),W=(0,n.useDashboardStore)(t=>t.openSidebar),O=(0,n.useDashboardStore)(t=>t.closeSidebar);(0,t.useEffect)(()=>{const t=f.current;if(!t)return;const n=()=>l(t.getBoundingClientRect().width);n();const o=new ResizeObserver(n);return o.observe(t),()=>o.disconnect()},[]);const D=o({leftPreference:b,rightPreference:S,containerWidth:u,leftWidth:s,rightWidth:c,minStreamWidth:h});return Object.assign({},D,{containerRef:f,containerWidth:u,leftOpen:D.leftOpen,lastOpened:p,openLeft:()=>{const t=u>=s+h+(D.rightDocked?c:0);W('left',t)},closeLeft:()=>O('left'),openRight:()=>{W('right',u>=c+h)},closeRight:()=>O('right')})};var t=r(d[0]),n=r(d[1]);function o({leftPreference:t,rightPreference:n,containerWidth:o,leftWidth:s,rightWidth:c,minStreamWidth:h}){const f=o>=c+h,u='open'===n||'auto'===n&&f,l=u&&f,b=o>=s+h+(l?c:0),S='open'===t||'auto'===t&&b,p=S&&b;return{leftOpen:S,leftDocked:p,leftOverlay:S&&!p,rightOpen:u,rightDocked:l,rightOverlay:u&&!l}}},346,[38,329]);
403
+ __d(function(g,r,i,a,m,e,d){"use strict";function o(o){return'ios'===o||'android'===o?o:void 0}Object.defineProperty(e,'__esModule',{value:!0}),e.parsePlatformFilter=o,e.dashboardPlatformFilter=function(){return'undefined'==typeof window?void 0:o(window.__EXPO_DEVICE_HUB_PLATFORM__)}},347,[]);
402
404
  __r(3);
403
405
  __r(0);
@@ -25,6 +25,9 @@
25
25
  if ('{{hideSidebar}}' === 'true') {
26
26
  window.__EXPO_DEVICE_HUB_HIDE_SIDEBAR__ = true;
27
27
  }
28
+ if ('{{hideBootDevice}}' === 'true') {
29
+ window.__EXPO_DEVICE_HUB_HIDE_BOOT_DEVICE__ = true;
30
+ }
28
31
  })();
29
32
  </script>
30
33
  <!-- The `react-native-web` recommended style reset: https://necolas.github.io/react-native-web/docs/setup/#root-element -->
@@ -53,6 +56,6 @@
53
56
  <noscript> You need to enable JavaScript to run Expo Device Hub. </noscript>
54
57
  <!-- The root element for the Hub dashboard. -->
55
58
  <div id="root"></div>
56
- <script src="./_expo/static/js/web/index-5422a785eeb6df3fecf4a68f7a475c99.js" defer></script>
59
+ <script src="./_expo/static/js/web/index-7a1b828737986b293cdcc63c4dfbdf18.js" defer></script>
57
60
  </body>
58
61
  </html>
@@ -111,6 +111,7 @@ Options:
111
111
  --webrtc-ice-policy <policy> Android ICE policy: ${WEBRTC_ICE_POLICIES.join(", ")} (default: ${DEFAULT_WEBRTC_ICE_POLICY})
112
112
  --metrics-cors-origin <origin> Allow an origin to read serve-sim metrics (repeatable)
113
113
  --hide-sidebar Hide the device list sidebar by default
114
+ --hide-boot-device Hide controls for booting or creating devices
114
115
  -h, --help Show this help
115
116
  `;
116
117
  function parseNumberOption(value, option, min, max, integer = false) {
@@ -159,6 +160,7 @@ function parseCliOptions(args) {
159
160
  "webrtc-ice-policy": { type: "string" },
160
161
  "metrics-cors-origin": { type: "string", multiple: true, default: [] },
161
162
  "hide-sidebar": { type: "boolean", default: false },
163
+ "hide-boot-device": { type: "boolean", default: false },
162
164
  help: { type: "boolean", short: "h", default: false }
163
165
  }
164
166
  }));
@@ -252,6 +254,7 @@ ${HELP}`);
252
254
  webrtcIcePolicy,
253
255
  metricsCorsOrigins: values["metrics-cors-origin"],
254
256
  hideSidebar: values["hide-sidebar"],
257
+ hideBootDevice: values["hide-boot-device"],
255
258
  help: false
256
259
  };
257
260
  }
@@ -1084,6 +1087,11 @@ async function main() {
1084
1087
  } else {
1085
1088
  delete process.env.EXPO_DEVICE_HUB_HIDE_SIDEBAR;
1086
1089
  }
1090
+ if (options.hideBootDevice) {
1091
+ process.env.EXPO_DEVICE_HUB_HIDE_BOOT_DEVICE = "true";
1092
+ } else {
1093
+ delete process.env.EXPO_DEVICE_HUB_HIDE_BOOT_DEVICE;
1094
+ }
1087
1095
  process.env[SERVE_EMU_OPTIONS_ENV] = encodeStandaloneServeEmuOptions(options);
1088
1096
  process.env[SERVE_SIM_OPTIONS_ENV] = encodeStandaloneServeSimOptions(options);
1089
1097
  const hubServer = await import("./index.mjs");
@@ -1169,5 +1177,5 @@ main().catch((error) => {
1169
1177
  process.exit(1);
1170
1178
  });
1171
1179
 
1172
- //# debugId=9DBCFB523EC89FEE64756E2164756E21
1180
+ //# debugId=DEFA8A61E46B4F3B64756E2164756E21
1173
1181
  //# sourceMappingURL=cli.mjs.map
@@ -8954,6 +8954,9 @@ var require_build2 = __commonJS((exports) => {
8954
8954
  import { readFile as readFile3 } from "node:fs/promises";
8955
8955
  import { fileURLToPath as fileURLToPath2 } from "node:url";
8956
8956
 
8957
+ // src/server/boot-device.ts
8958
+ var SERVER_HIDE_BOOT_DEVICE = process.env.EXPO_DEVICE_HUB_BASE_PATH === "" && process.env.EXPO_DEVICE_HUB_HIDE_BOOT_DEVICE === "true";
8959
+
8957
8960
  // ../@expo/hub-android-utils/dist/boot-device.js
8958
8961
  import { homedir } from "node:os";
8959
8962
 
@@ -10330,8 +10333,8 @@ ${booted.command}`,
10330
10333
  }
10331
10334
 
10332
10335
  // src/server/client-shell.ts
10333
- function configureClientShell(html, mountPath, platform, transport, hideSidebar) {
10334
- return html.replaceAll("{{mount}}", mountPath).replaceAll("{{platform}}", platform ?? "").replaceAll("{{transport}}", transport ?? "").replaceAll("{{hideSidebar}}", String(hideSidebar));
10336
+ function configureClientShell(html, mountPath, platform, transport, hideSidebar, hideBootDevice) {
10337
+ return html.replaceAll("{{mount}}", mountPath).replaceAll("{{platform}}", platform ?? "").replaceAll("{{transport}}", transport ?? "").replaceAll("{{hideSidebar}}", String(hideSidebar)).replaceAll("{{hideBootDevice}}", String(hideBootDevice));
10335
10338
  }
10336
10339
 
10337
10340
  // src/argent-interaction-protocol.ts
@@ -10968,6 +10971,7 @@ Options:
10968
10971
  --webrtc-ice-policy <policy> Android ICE policy: ${WEBRTC_ICE_POLICIES.join(", ")} (default: ${DEFAULT_WEBRTC_ICE_POLICY})
10969
10972
  --metrics-cors-origin <origin> Allow an origin to read serve-sim metrics (repeatable)
10970
10973
  --hide-sidebar Hide the device list sidebar by default
10974
+ --hide-boot-device Hide controls for booting or creating devices
10971
10975
  -h, --help Show this help
10972
10976
  `;
10973
10977
 
@@ -11411,7 +11415,7 @@ async function serveClientIndexHtml() {
11411
11415
  return null;
11412
11416
  }
11413
11417
  }
11414
- return new Response(configureClientShell(clientIndexHtml, MOUNT_PATH, SERVER_PLATFORM_FILTER, SERVER_TRANSPORT, SERVER_HIDE_SIDEBAR), {
11418
+ return new Response(configureClientShell(clientIndexHtml, MOUNT_PATH, SERVER_PLATFORM_FILTER, SERVER_TRANSPORT, SERVER_HIDE_SIDEBAR, SERVER_HIDE_BOOT_DEVICE), {
11415
11419
  headers: {
11416
11420
  "Content-Type": "text/html; charset=utf-8",
11417
11421
  "Cache-Control": "no-store"
@@ -11527,5 +11531,5 @@ export {
11527
11531
  handler as default
11528
11532
  };
11529
11533
 
11530
- //# debugId=3CB220A2AA6B653E64756E2164756E21
11534
+ //# debugId=6AFDBF1ACE75872064756E2164756E21
11531
11535
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-device-hub",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Expo DevTools plugin for managing iOS simulators and Android emulators.",
5
5
  "keywords": [
6
6
  "expo",