1__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SensorManagementScreen=function(){const e=(0,D.useSeoMeta)('SensorManagement'),o=(0,x.useToast)(),E=(0,S.useConfirm)(),R=(0,O.useAppNavigation)(),I=(0,O.useSensorManagementParams)(),{isAdmin:K}=(0,l.useAuth)(),{submittedSearchText:H,writeSubmittedSearchText:F}=(0,v.useSensorSearchFragment)(),W=(0,n.useRef)(null),$=(0,n.useRef)(0),B=(0,n.useRef)(0),X=(0,n.useRef)(null),{sensors:Y,loading:z,error:Z,refresh:q,reconcile:J}=(0,_.useMySensors)(),Q=V(H??''),[ee,ne]=(0,n.useState)(Q.canonicalText),[se,re]=(0,n.useState)(!1),[te,ae]=(0,n.useReducer)(C.sensorManagementSearchReducer,C.EMPTY_SENSOR_MANAGEMENT_SEARCH_STATE),[oe,ie]=(0,n.useState)(!1),{clearSearchSelection:ce,ownedSelection:le,reconcileSearchResults:ue,searchSelection:de}=(0,w.usePartitionedSensorSelection)({ownedSensors:Y,publicSearchSensors:te.publicSensors,searchSensors:te.sensors}),Se=(0,n.useRef)(0),he=(0,n.useRef)(null),ge=(0,n.useRef)(H),fe=(0,n.useRef)(null),[pe,be]=(0,n.useState)('landing'),[me,ye]=(0,n.useState)(null),[Te,Ce]=(0,n.useState)(null),[Me,we]=(0,n.useState)(!1);(0,n.useLayoutEffect)(()=>{const e=X.current;null!==e&&(X.current=null,W.current?.scrollTo({animated:!1,y:e}))});const ve=(0,n.useRef)({disabledMutationKeys:new Set,pendingSensorIndices:new Set}
1),[xe,Ae]=(0,n.useState)(()=>ve.current),Ee=(0,n.useRef)(new Map),Re=xe.pendingSensorIndices,Ie=xe.disabledMutationKeys,De=(0,n.useCallback)(e=>{ve.current=e,Ae(e)},[]);(0,n.useEffect)(()=>{const e=Ee.current;return()=>{e.forEach(e=>{clearTimeout(e)}),e.clear()}},[]);const Oe=(0,n.useCallback)((e,n)=>{const s=ve.current;if(s.pendingSensorIndices.has(e)||s.disabledMutationKeys.has(n))return!1;const t=new Set(s.pendingSensorIndices);t.add(e);const o=new Set(s.disabledMutationKeys);return o.add(n),De({disabledMutationKeys:o,pendingSensorIndices:t}),!0},[De]),ke=(0,n.useCallback)((e,n)=>{const s=Ee.current.get(n);void 0!==s&&clearTimeout(s);const t=ve.current,o=new Set(t.pendingSensorIndices);o.delete(e),De({disabledMutationKeys:t.disabledMutationKeys,pendingSensorIndices:o});const c=setTimeout(()=>{Ee.current.delete(n);const e=ve.current;if(!e.disabledMutationKeys.has(n))return;const s=new Set(e.disabledMutationKeys);s.delete(n),De({disabledMutationKeys:s,pendingSensorIndices:e.pendingSensorIndices})},L);Ee.current.set(n,c)},[De]),Ne=(0,n.useCallback)((e,n,s)=>Ie.has(j(e,n,s??null)),[Ie]),Pe=(0,n.useCallback)(e=>Ie.has(`${e}:archive`),[Ie]),Le=(0,n.useCallback)(async e=>{const n=Se.current+1;Se.current=n,he.current=e.canonicalText,ie(!0);try{const s=await c.sensorManagementApi.search([...e.terms]);if(Se.current!==n)return;ue(s.sensors,s.publicSensors),ae({publicSensors:s.publicSensors,sensors:s.sensors,totalResults:s.totalResults,type:'searchCompleted'})}catch(e){Se.current===n&&o.error((0,k.errorMessage)(e,'Search failed. Please try again.'))}finally{Se.current===n&&ie(!1)}},[ue,o]);(0,n.useEffect)(()=>{const e=ge.current;if(ge.current=H,null===H){if(null===e)return;return Se.current+=1,he.current=null,ie(!1),ne(''),ce(),void ae({type:'searchCleared'})}const n=V(H);if(0===n.terms.length)return Se.current+=1,ie(!1),ne(''),ce(),void ae({type:'searchCleared'});e!==H&&ne(n.canonicalText),he.current!==n.canonicalText&&Le(n)},[ce,H,Le]),(0,n.useEffect)(()=>()=>{Se.current+=1},[]);const Ve=(0,n.useCallback)(()=>{const e=V(ee);0!==e.terms.length?(ne(e.canonicalText),F(e.canonicalText),Le(e)):o.warning('Enter at least one search term.',{id:'sensor-mgmt-empty-search'})},[Le,ee,o,F]),je=(0,n.useCallback)(e=>{(0,p.exportSensorTable)(e,{download:u.downloadColumnsCsv,filenamePrefix:'sensor-search',recordAudit:(e,n)=>c.sensorManagementApi.exportAudit(e,n),onUnsupported:()=>{o.info('CSV export is not available on this platform yet.')},onAuditError:e=>{N.logger.warn('Failed to record sensor export audit',e)}})},[o]),Ge=(0,n.useCallback)(e=>{(0,p.exportSensorTable)(e,{download:u.downloadColumnsCsv,filenamePrefix:'my-sensors',onUnsupported:()=>{o.info('CSV export is not available on this platform yet.')}})},[o]),Ue=(0,n.useCallback)(async e=>{B.current=$.current,we(!0);try{const n=await c.sensorManagementApi.getDetail(e);ye(n),X.current=0,be('detail')}catch(e){o.error((0,k.errorMessage)(e,'Failed to load sensor details.'))}finally{we(!1)}},[o]);(0,n.useEffect)(()=>{const e=I?.sensorIndex;if(void 0===e)return void(fe.current=null);const n=Number(e);!Number.isSafeInteger(n)||n<=0?o.error('The sensor detail link contains an invalid sensor index.'):fe.current!==n&&(fe.current=n,Ue(n))},[Ue,I?.sensorIndex,o]);const Ke=(0,n.useCallback)(async e=>{B.current=$.current,we(!0);try{const n=await c.sensorManagementApi.getPublicDetail(e);Ce(n),X.current=0,be('public-detail')}catch(e){o.error((0,k.errorMessage)(e,'Failed to load sensor details.'))}finally{we(!1)}},[o]),He=(0,n.useCallback)(async e=>{try{const n=await c.sensorManagementApi.getDetail(e);ye(n)}catch(e){o.error((0,k.errorMessage)(e,'Update applied, but failed to refresh history.'))}},[o]),Fe=(0,n.useCallback)(async(e,n,s,t)=>{const l=j(e,n,t??null);if(Oe(e,l))try{const l=await c.sensorManagementApi.update(Object.assign({sensorIndex:e,action:n,channel:t??null},void 0!==s&&{value:s}));if(!l.success)return void o.error(l.message??'Update failed. Please try again.');o.success(l.message??'Update applied.');const u=l.sensor??null;ae({sensorIndex:e,type:'sensorUpdated',updatedSensor:u}),J(e,u);if(me?.sensor.sensorIndex===e){const n=(0,M.applySensorUpdateToDetail)(me,e,u);null===n?(ye(null),be('landing')):(ye(n),He(e))}}catch(e){o.error((0,k.errorMessage)(e,'Update failed. Please try again.'))}finally{ke(e,l)}},[Oe,me,ke,He,J,o]),We=(0,n.useCallback)(async(e,n)=>{if(!await E(G(n)))return;const s=`${e}:archive`;if(Oe(e,s))try{const n=await c.sensorManagementApi.archive(e);
1if(!n.success)return void o.error(n.message);o.success(n.message),ae({sensorIndex:e,type:'sensorUpdated',updatedSensor:null});const s=Y.find(n=>n.sensorIndex===e);void 0!==s&&null!==n.archivedMac&&J(e,Object.assign({},s,{archived:!0,mac:n.archivedMac})),me?.sensor.sensorIndex===e&&(ye(null),be('landing'))}catch(e){o.error((0,k.errorMessage)(e,'Archive failed. Please try again.'))}finally{ke(e,s)}},[Oe,E,me,ke,Y,J,o]),$e=(0,n.useCallback)((e,n)=>{We(e,n)},[We]),Be=(0,n.useCallback)(e=>{R.navigate('Register',{mac:e})},[R]),Xe=(0,n.useCallback)(()=>{X.current=B.current,be('landing'),ye(null),Ce(null),void 0!==I?.sensorIndex&&R.navigate('SensorManagement')},[R,I?.sensorIndex]),Ye=(0,n.useCallback)(e=>{'landing'===pe&&($.current=e.nativeEvent.contentOffset.y)},[pe]);return(0,P.jsxs)(h.PageLayout,{scrollRef:W,scrollViewTestID:"sensor-management-scroll-view",onScroll:Ye,scrollEventThrottle:16,children:[(0,P.jsx)(A.WebMeta,Object.assign({},e)),(0,P.jsxs)(t.default,{style:U.container,children:['landing'===pe&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(b.OwnedSensorsSection,{sensors:Y,loading:z,error:Z,onRetry:()=>{q()},onViewDetail:e=>{Ue(e)},detailLoading:Me,pendingSensorIndices:Re,onExportTable:Ge,selection:le,selectionModeVisible:se,onSelectionModeChange:re}),(0,P.jsx)(t.default,{style:U.searchSectionHeader,children:(0,P.jsx)(s.default,{style:U.searchSectionTitle,children:"Search Other Sensors"})}),(0,P.jsx)(T.SearchView,{searchText:ee,onSearchTextChange:ne,onSearch:Ve,loading:oe,sensors:te.sensors,publicSensors:te.publicSensors,totalResults:te.totalResults,hasSearched:te.hasSearched,onViewDetail:e=>{Ue(e)},onViewPublicDetail:e=>{Ke(e)},detailLoading:Me,onUpdate:(e,n,s,t)=>{Fe(e,n,s,t)},onArchive:$e,pendingSensorIndices:Re,isActionCoolingDown:Ne,isArchiveCoolingDown:Pe,canModifyOwner:K,canArchive:K,canViewArchiveHistory:K,canUseTableView:K,showUnregisteredNotice:K,onExportTable:je,selection:de,selectionModeVisible:se,onSelectionModeChange:re})]}),'detail'===pe&&null!==me&&(0,P.jsx)(f.DetailView,{detail:me,onBack:Xe,onUpdate:(e,n,s,t)=>{Fe(e,n,s,t)},onArchive:$e,onReRegister:Be,isPending:Re.has(me.sensor.sensorIndex),isActionCoolingDown:(e,n)=>Ne(me.sensor.sensorIndex,e,n),isArchiveCoolingDown:Pe(me.sensor.sensorIndex),canModifyOwner:K,canArchive:K}),'public-detail'===pe&&null!==Te&&(0,P.jsx)(y.PublicDetailView,{detail:Te,onBack:Xe})]})]})};var n=r(d[0]),s=e(r(d[1])),t=e(r(d[2])),o=r(d[3]),c=r(d[4]),l=r(d[5]),u=r(d[6]),S=r(d[7]),h=r(d[8]),f=r(d[9]),p=r(d[10]),b=r(d[11]),y=r(d[12]),T=r(d[13]),C=r(d[14]),M=r(d[15]),w=r(d[16]),v=r(d[17]),x=r(d[18]),A=r(d[19]),E=r(d[20]),R=r(d[21]),I=r(d[22]),_=r(d[23]),D=r(d[24]),O=r(d[25]),k=r(d[26]),N=r(d[27]),P=r(d[28]);const L=500;function V(e){const n=e.split('\n').map(e=>e.trim()).filter(e=>e.length>0);return{canonicalText:n.join('\n'),terms:n}}function j(e,n,s){switch(n){case'SET_SHARE_KEYS':case'CLEAR_SHARE_KEYS':return`${e}:share-keys`;case'SET_DOWNGRADED':case'CLEAR_DOWNGRADED':return`${e}:downgrade-${s??'A'}`;case'SET_ACTIVE_FIRMWARE_TARGET':case'SET_OWNER':case'SET_BRIGHTNESS':case'SET_LED_MODE':case'VERIFY_LOCATION':return`${e}:${n}`;default:return n}}function G(e){const n=e?.trim()??'';return{cancelLabel:'Cancel',confirmLabel:'Archive',confirmTone:'destructive',message:`Archive ${''!==n?n:'this sensor'}? Historical details remain available to the current owner, but this record will no longer receive new reports from the device.`,title:'Archive sensor?'}}const U=(0,o.createStyles)({container:{alignSelf:'center',maxWidth:1080,paddingHorizontal:R.SPACING.XXL,paddingVertical:R.SPACING.XL,width:'100%'},searchSectionHeader:{borderTopColor:E.COLORS.BORDER,borderTopWidth:1,marginTop:R.SPACING.XL,paddingTop:R.SPACING.LG},searchSectionTitle:{color:E.COLORS.TEXT_HEADING,fontSize:I.FONT_SIZE.LG,fontWeight:I.FONT_WEIGHT.SEMIBOLD}})},1174,[34,222,276,489,1286,411,693,656,575,1231,1247,1248,1277,1278,1280,1281,1282,1283,497,572,490,494,495,1287,569,506,468,469,104]); 2__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}
2),_e.DetailView=function({detail:e,onBack:l,onUpdate:c,onArchive:S,onReRegister:h,isPending:v,isActionCoolingDown:w=()=>!1,isArchiveCoolingDown:N=!1,canModifyOwner:G,canArchive:P=!1}){const{sensor:B,history:H}=e,{isPhone:F}=(0,u.useResponsive)(),[W,k]=(0,j.useServerReconciledTextInput)(B.configuredFirmwareTarget??''),[V,K]=(0,j.useServerReconciledTextInput)(B.ownerEmail??''),[z,U]=(0,j.useServerReconciledTextInput)(null!=B.brightness?String(B.brightness):''),X=B.ownerEmail?.trim()??'',Y=B.firmwareVersion?.trim()??'',Z=B.readKey?.trim()??'',$=B.mac?.trim()??'',q=''!==Z?' using the sensor index below. Accessing any data reported while the sensor was private also requires the sensor read key.':' using the sensor index below.';return(0,M.jsxs)(b.SensorDetailCard,{sensorLabel:B.label,sensorModel:B.model,sensorIndex:B.sensorIndex,onlineStatus:B.onlineStatus,badges:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(b.HeaderBadge,{label:(0,T.formatVisibility)(B.hidden),variant:B.hidden?'neutral':'success'}),B.archived&&(0,M.jsx)(b.HeaderBadge,{label:"Archived",variant:"warning"})]}),onBack:l,headline:(0,M.jsx)(D.SensorAqiHeadline,{pm25:B.pm25,size:"lg",offline:!B.archived&&(0,T.isSensorOffline)(B.onlineStatus)}),headerActions:(0,M.jsxs)(M.Fragment,{children:[void 0!==h&&!B.archived&&''!==$&&(0,M.jsx)(f.ActionButton,{label:"Re-register Sensor",variant:"primary",onPress:()=>{h($)},disabled:v}),(0,M.jsx)(y.SensorMapLink,{sensor:B})]}),children:[B.archived&&(0,M.jsx)(_,{isPhone:F}),(0,M.jsxs)(f.DetailSection,{title:"Readings",children:[(0,M.jsx)(I.ChannelReadingsBand,{sensor:B,isPending:v,isChannelCoolingDown:e=>{const n='A'===e?B.downgraded:!0===B.channelB?.downgraded;return w(n?'CLEAR_DOWNGRADED':'SET_DOWNGRADED',e)},edgeToEdge:!0,onToggleDowngrade:B.archived&&!G?null:e=>{const n='A'===e?B.downgraded:!0===B.channelB?.downgraded;c(B.sensorIndex,n?'CLEAR_DOWNGRADED':'SET_DOWNGRADED',void 0,e)}}),(0,M.jsx)(C.ReadingsSupplement,{gas:B.gas,confidencePercent:B.confidencePercent,particleRatioHigh:B.particleRatioHigh})]}),(0,M.jsxs)(b.DetailInfoGrid,{children:[(0,M.jsx)(f.DetailSection,{title:"Status",children:(0,M.jsx)(f.DetailFieldList,{children:(0,O.buildManagedDetailStatusRows)(B,{lastModifiedMinutesAgo:e.lastModifiedMinutesAgo,lastUpdateCheckMinutesAgo:e.lastUpdateCheckMinutesAgo}).map(e=>(0,M.jsx)(f.DetailField,{label:e.label,value:e.value},e.label))})}),(0,M.jsx)(f.DetailSection,{title:"Hardware",children:(0,M.jsx)(f.DetailFieldList,{children:(0,O.buildManagedDetailHardwareRows)(B).map(e=>(0,M.jsx)(f.DetailField,{label:e.label,value:e.value},e.label))})}),(0,M.jsx)(f.DetailSection,{title:"Location",children:(0,M.jsx)(f.DetailFieldList,{children:(0,O.buildManagedDetailLocationRows)(B,e.positionCheckedMinutesAgo).map(e=>(0,M.jsx)(f.DetailField,{label:e.label,value:e.value},e.label))})})]}),(0,M.jsxs)(f.DetailSection,{title:"API Access",children:[(0,M.jsxs)(t.default,{style:L.apiAccessHint,selectable:!0,children:["Read this sensor's data from the ",(0,M.jsx)(R.AppLink,{to:"API",inline:!0,accessibilityLabel:"PurpleAir API documentation",testID:"api-page-link",textStyle:L.apiPageLink,children:"PurpleAir API"}),q]}),(0,M.jsxs)(s.default,{style:f.sharedStyles.cardRow,children:[(0,M.jsx)(f.InfoItem,{label:"Sensor Index",value:String(B.sensorIndex)}),''!==Z&&(0,M.jsx)(f.InfoItem,{label:"Sensor Read Key",value:Z})]})]}),!B.archived&&(0,M.jsxs)(f.DetailSection,{title:"Management Actions",children:[v&&(0,M.jsxs)(s.default,{style:L.pendingBanner,children:[(0,M.jsx)(n.default,{color:o.COLORS.TEXT_MUTED,size:"small"}),(0,M.jsx)(t.default,{style:L.pendingBannerText,selectable:!0,children:"Updating sensor..."})]}),(0,M.jsxs)(s.default,{style:L.managementStack,children:[(0,M.jsx)(s.default,{style:L.managementFields,children:(0,M.jsxs)(p.ManagementInputGrid,{children:[G?(0,M.jsx)(p.ManagementInputRow,{label:"Owner",value:V,onChangeText:K,placeholder:"[email protected]",isPending:v,setDisabled:w('SET_OWNER'),onSet:()=>{c(B.sensorIndex,'SET_OWNER',V)},setVariant:"default",width:"wide"}):(0,M.jsx)(p.ReadOnlyManagementRow,{label:"Owner",value:''!==X?X:'N/A',width:"wide"}),G?(0,M.jsx)(p.ManagementInputRow,{label:"Firmware",value:W,onChangeText:k,placeholder:"e.g. 7.04",isPending:v,setDisabled:w('SET_ACTIVE_FIRMWARE_TARGET'),onSet:()=>{c(B.sensorIndex,'SET_ACTIVE_FIRMWARE_TARGET',W.trim())},setVariant:"admin",width:"medium"}):(0,M.jsx)(p.ReadOnlyManagementRow,{label:"Firmware",value:''!==Y?Y:'N/A',width:"medium"}),(0,M.jsx)(p.ManagementInputRow,{label:"Brightness",value:z,onChangeText:U,placeholder:"0-100",keyboardType:"numeric",isPending:v,setDisabled:w('SET_BRIGHTNESS'),onSet:()=>{c(B.sensorIndex,'SET_BRIGHTNESS',z)},setVariant:"default",width:"narrow"}),(0,M.jsx)(s.default,{style:L.ledModeInputRow,children:(0,M.jsx)(E.LedModeManagementControl,{ledMode:B.ledMode,isPending:v,isSetCoolingDown:w('SET_LED_MODE'),onSet:e=>{c(B.sensorIndex,'SET_LED_MODE',e)}})})]})}),(0,M.jsxs)(s.default,{style:L.managementActionRow,children:[(0,M.jsx)(f.ActionButton,{label:B.shareKeys?'Disable Share Keys':'Enable Share Keys',onPress:()=>{c(B.sensorIndex,B.shareKeys?'CLEAR_SHARE_KEYS':'SET_SHARE_KEYS')},disabled:v||w(B.shareKeys?'CLEAR_SHARE_KEYS':'SET_SHARE_KEYS')}),G&&(0,M.jsx)(f.ActionButton,{label:"Verify Location",variant:"admin",onPress:()=>{c(B.sensorIndex,'VERIFY_LOCATION')},disabled:v||w('VERIFY_LOCATION')}),P&&void 0!==S&&(0,M.jsx)(f.ActionButton,{label:"Archive Sensor",variant:"danger",onPress:()=>{S(B.sensorIndex,B.label)},disabled:v||N})]})]})]}),B.archiveHistory.length>0&&(0,M.jsx)(A.ArchiveHistoryGrid,{archiveHistory:B.archiveHistory}),H.length>0&&(0,M.jsx)(f.DetailSection,{title:"Sensor History",children:(0,M.jsx)(s.default,{style:L.historyList,children:H.map(e=>(0,M.jsxs)(s.default,{style:[L.historyItem,e.isCurrent&&L.historyItemCurrent],children:[(0,M.jsx)(t.default,{style:[L.historyLabel,e.isCurrent&&L.historyLabelCurrent],selectable:!0,children:e.label}),(0,M.jsxs)(t.default,{style:L.historyMeta,selectable:!0,children:["Sensor index: ",e.sensorIndex,null!=e.created&&''!==e.created?` | Created: ${(0,x.formatIsoDateShort)(e.created)}`:'']})]},String(e.sensorIndex)))})}),e.auditLog.length>0&&(0,M.jsx)(f.DetailSection,{title:"Change History",children:(0,M.jsx)(s.default,{style:L.auditList,children:e.auditLog.map((e,n)=>(0,M.jsx)(f.AuditEntryRow,{entry:e},`${e.createdAt}-${e.actorIdentifier??'system'}-${String(n)}`))})})]})},r(d[0]);var n=e(r(d[1])),t=e(r(d[2])),s=e(r(d[3])),l=r(d[4]),o=r(d[5]),c=r(d[6]),S=r(d[7]),h=r(d[8]),u=r(d[9]),x=r(d[10]),R=r(d[11]),A=r(d[12]),I=r(d[13]),E=r(d[14]),C=r(d[15]),D=r(d[16]),b=r(d[17]),O=r(d[18]),T=r(d[19]),p=r(d[20]),y=r(d[21]),f=r(d[22]),j=r(
2d[23]),M=r(d[24]);function _({isPhone:e}){return(0,M.jsxs)(s.default,{style:[L.archivedNotice,e&&L.archivedNoticePhone],children:[(0,M.jsx)(t.default,{style:L.archivedNoticeTitle,selectable:!0,children:"Archived"}),(0,M.jsx)(t.default,{style:L.archivedNoticeText,selectable:!0,children:"This archived sensor no longer receives new readings."})]})}const L=(0,l.createStyles)({apiAccessHint:{color:o.COLORS.TEXT_BODY,fontSize:h.FONT_SIZE.SM,lineHeight:20,marginBottom:S.SPACING.LG},apiPageLink:{color:o.COLORS.BRAND_PRIMARY,fontWeight:h.FONT_WEIGHT.SEMIBOLD},archivedNotice:{backgroundColor:o.COLORS.WARNING_BG,borderBottomColor:o.COLORS.BORDER,borderBottomWidth:1,gap:S.SPACING.MICRO,paddingHorizontal:S.SPACING.XXL,paddingVertical:S.SPACING.MD},archivedNoticePhone:{paddingHorizontal:S.SPACING.LG},archivedNoticeText:{color:o.COLORS.TEXT_BODY,fontSize:h.FONT_SIZE.SM},archivedNoticeTitle:{color:o.COLORS.WARNING_DARK,fontSize:h.FONT_SIZE.MD,fontWeight:h.FONT_WEIGHT.BOLD},auditList:{gap:S.SPACING.SM},historyItem:{backgroundColor:o.COLORS.BG_WASH,borderRadius:c.RADIUS.MD,paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.SM},historyItemCurrent:{backgroundColor:o.COLORS.SUCCESS_BG,borderColor:o.COLORS.GREEN_300,borderWidth:1},historyLabel:{color:o.COLORS.TEXT_HEADING,fontSize:h.FONT_SIZE.MD},historyLabelCurrent:{fontWeight:h.FONT_WEIGHT.SEMIBOLD},historyList:{gap:S.SPACING.XS},historyMeta:{color:o.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.XS,marginTop:S.SPACING.MICRO},ledModeInputRow:{flexBasis:520,flexGrow:1,flexShrink:1,minWidth:0},managementActionRow:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.SM},managementFields:{backgroundColor:o.COLORS.BG_WASH,borderColor:o.COLORS.BORDER,borderRadius:c.RADIUS.MD,borderWidth:1,padding:S.SPACING.LG},managementStack:{gap:S.SPACING.LG},pendingBanner:{alignItems:'center',backgroundColor:o.COLORS.BG_WASH,borderRadius:c.RADIUS.MD,flexDirection:'row',gap:S.SPACING.SM,marginBottom:S.SPACING.MD,padding:S.SPACING.SM},pendingBannerText:{color:o.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.SM,fontStyle:'italic'}})},1231,[34,410,222,276,489,490,491,494,495,560,698,520,1232,1235,1237,1238,1241,1243,1244,1239,1245,1138,1140,1246,104]); 3__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ArchiveHistoryGrid=function({archiveHistory:e,selection:s}){const[c,h]=(0,l.useState)(!1),{isPhone:S}=(0,f.useResponsive)();if(0===e.length)return null;const u=c?e:e.slice(0,M),v=e.length-M,x=(0,I.buildExternalMultiSensorMapPath)(e.map(T.toArchiveHistoryMapTarget)),C=`${String(e.length)} archived sensor location`+(1===e.length?'':'s');return(0,y.jsxs)(o.default,{style:P.archiveHistoryBand,children:[(0,y.jsxs)(o.default,{style:P.archiveHistoryHeader,children:[(0,y.jsx)(t.default,{style:P.sectionTitle,selectable:!0,children:"Archive History"}),'ready'===x.status&&(0,y.jsx)(O.ServiceExternalLink,{service:"mapBaseUrl",path:x.path,accessibilityLabel:`View all ${C} on map`,style:P.historyMapLink,textStyle:P.historyMapLinkText,children:"View history on map"})]}),(0,y.jsxs)(o.default,{style:P.archiveHistoryList,children:[!S&&(0,y.jsxs)(o.default,{style:P.archiveGridHeader,children:[null!=s&&(0,y.jsx)(t.default,{style:[P.archiveColumnHeader,P.archiveSelectionCell],selectable:!0,children:"Select"}),(0,y.jsx)(t.default,{style:[P.archiveColumnHeader,P.archiveIndexCell],selectable:!0,children:"Index"}),(0,y.jsx)(t.default,{style:[P.archiveColumnHeader,P.archiveVisibilityCell],selectable:!0,children:"Visibility"}),(0,y.jsx)(t.default,{style:[P.archiveColumnHeader,P.archiveNameCell],selectable:!0,children:"Name"}),(0,y.jsx)(t.default,{style:[P.archiveColumnHeader,P.archiveOwnerCell],selectable:!0,children:"Owner"}),(0,y.jsx)(t.default,{style:[P.archiveColumnHeader,P.archiveDateCell],selectable:!0,children:"Active dates"}),(0,y.jsx)(t.default,{style:[P.archiveColumnHeader,P.archiveAgoCell],selectable:!0,children:"Archived"}),(0,y.jsx)(t.default,{style:[P.archiveColumnHeader,P.archiveMapCell,P.archiveMapColumnText],selectable:!0,children:"Map"})]}),u.map(e=>S?(0,y.jsx)(p,Object.assign({entry:e},null!=s?{selection:s}:{}),`${String(e.sensorIndex)}-${e.mac??''}`):(0,y.jsx)(b,Object.assign({entry:e},null!=s?{selection:s}:{}),`${String(e.sensorIndex)}-${e.mac??''}`))]}),v>0&&(0,y.jsx)(n.default,{style:P.archiveHistoryToggle,onPress:()=>{h(e=>!e)},children:(0,y.jsx)(t.default,{style:P.archiveHistoryToggleText,children:c?'Show fewer':`Show ${String(v)} more`})})]})};var l=r(d[0]);r(d[1]);var t=e(r(d[2])),n=e(r(d[3])),o=e(r(d[4])),s=r(d[5]),c=r(d[6]),h=r(d[7]),S=r(d[8]),u=r(d[9]),v=r(d[10]),f=r(d[11]),x=r(d[12]),C=r(d[13]),O=r(d[14]),T=r(d[15]),I=r(d[16]),y=r(d[17]);const M=3;function b({entry:e,selection:l}){return(0,y.jsxs)(o.default,{style:P.archiveRow,children:[null!=l&&(0,y.jsx)(N,{entry:e,selection:l}),(0,y.jsx)(L,{value:String(e.sensorIndex),style:[P.archiveSensorIndex,P.archiveIndexCell]}),(0,y.jsx)(L,{value:G(e.hidden),style:[P.archiveVisibility,P.archiveVisibilityCell]}),(0,y.jsx)(L,{value:D(e),style:[P.archiveSensorLabel,P.archiveNameCell],numberOfLines:2}),(0,y.jsx)(L,{value:R(e.ownerEmail),style:[P.archiveOwnerEmail,P.archiveOwnerCell],numberOfLines:2}),(0,y.jsx)(L,{value:j(e),style:[P.archiveDateRange,P.archiveDateCell]}),(0,y.jsx)(L,{value:_(e.archivedAt),style:[P.archiveRelativeTime,P.archiveAgoCell]}),(0,y.jsx)(E,{entry:e})]})}function p({entry:e,selection:l}){return(0,y.jsxs)(o.default,{style:P.archiveCardPhone,children:[(0,y.jsxs)(o.default,{style:P.archiveCardHeaderPhone,children:[null!=l&&(0,y.jsx)(N,{entry:e,selection:l}),(0,y.jsx)(t.default,{style:[P.archiveSensorLabel,P.archiveCardLabelPhone],numberOfLines:2,selectable:!0,children:D(e)}),(0,y.jsx)(t.default,{style:P.archiveRelativeTime,selectable:!0,children:_(e.archivedAt)})]}),(0,y.jsx)(A,{label:"Sensor index",value:String(e.sensorIndex),valueIsMonospace:!0}),(0,y.jsx)(A,{label:"Visibility",value:G(e.hidden)}),(0,y.jsx)(A,{label:"Owner",value:R(e.ownerEmail),numberOfLines:2}),(0,y.jsx)(A,{label:"Active",value:j(e)}),(0,y.jsx)(E,{entry:e})]})}function E({entry:e}){const l=(0,I.buildExternalMultiSensorMapPath)([(0,T.toArchiveHistoryMapTarget)(e)]);if('ready'!==l.status)return(0,y.jsx)(t.default,{style:[P.archiveMapUnavailable,P.archiveMapCell,P.archiveMapColumnText],children:"Map unavailable"});const n=`View ${D(e)} archived location on map`;return(0,y.jsx)(O.ServiceExternalLink,{service:"mapBaseUrl",path:l.path,accessibilityLabel:n,style:[P.archiveMapCell,P.archiveMapAction],textStyle:P.archiveMapLinkText,children:"Map"})}function N({entry:e,selection:l}){const t=(0,T.isArchiveHistoryMapTargetSelectable)(e);return(0,y.jsx)(o.default,{style:P.archiveSelectionCell,children:(0,y.jsx)(s.SelectionCheckbox,{checked:l.selectedMapTargetIndices.has(e.sensorIndex),accessibilityLabel:`Select ${D(e)} archived location (sensor ${String(e.sensorIndex)})`,disabled:!t,onPress:()=>{l.onToggle(e)}})})}function A({label:e,value:l,numberOfLines:n=1,valueIsMonospace:s=!1}){return(0,y.jsxs)(o.default,{style:P.archiveCardMetaRowPhone,children:[(0,y.jsx)(t.default,{style:P.archiveCardMetaLabelPhone,selectable:!0,children:e}),(0,y.jsx)(t.default,{style:[P.archiveCardMetaValuePhone,s&&P.archiveCardMetaValueMonoPhone],numberOfLines:n,selectable:!0,children:l})]})}function L({value:e,style:l,numberOfLines:n=1}){return(0,y.jsx)(C.HoverTooltip,{text:e,children:(0,y.jsx)(t.default,{style:l,numberOfLines:n,selectable:!0,children:e})})}function j(e){const l=H(e.created),t=H(e.archivedAt);return null!==l&&null!==t?`${l} - ${t}`:null!==t?`Archived ${t}`:null!==l?`Created ${l}`:'Archive dates unavailable'}
3function H(e){return null==e||''===e.trim()?null:(0,x.formatIsoDateShort)(e)}function _(e){return null==e||''===e.trim()?'Time unavailable':(0,x.formatTimeAgo)(e)}function R(e){const l=e?.trim()??'';return''!==l?l:'Owner unknown'}function D(e){const l=e.label?.trim()??'';return''!==l?l:'Unnamed archived sensor'}function G(e){return e?'Private':'Public'}const P=(0,c.createStyles)({archiveAgoCell:{flexBasis:116,flexGrow:0,flexShrink:0},archiveCardHeaderPhone:{alignItems:'center',flexDirection:'row',gap:u.SPACING.SM,justifyContent:'space-between',marginBottom:u.SPACING.XS},archiveCardLabelPhone:{flexShrink:1,minWidth:0},archiveCardMetaLabelPhone:{color:h.COLORS.TEXT_MUTED,flexBasis:96,flexGrow:0,flexShrink:0,fontSize:v.FONT_SIZE.XS,fontWeight:v.FONT_WEIGHT.SEMIBOLD,letterSpacing:.3,textTransform:'uppercase'},archiveCardMetaRowPhone:{alignItems:'baseline',flexDirection:'row',gap:u.SPACING.SM,paddingVertical:u.SPACING.MICRO},archiveCardMetaValueMonoPhone:{fontFamily:v.FONT_FAMILY.WEB_MONOSPACE},archiveCardMetaValuePhone:{color:h.COLORS.TEXT_BODY,flexShrink:1,fontSize:v.FONT_SIZE.SM,fontWeight:v.FONT_WEIGHT.MEDIUM,minWidth:0},archiveCardPhone:{backgroundColor:h.COLORS.TEXT_INVERSE,borderColor:h.COLORS.BORDER,borderRadius:S.RADIUS.MD,borderWidth:1,paddingHorizontal:u.SPACING.MD,paddingVertical:u.SPACING.SM},archiveColumnHeader:{color:h.COLORS.TEXT_MUTED,fontSize:v.FONT_SIZE.XS,fontWeight:v.FONT_WEIGHT.BOLD,letterSpacing:.4,textTransform:'uppercase'},archiveDateCell:{flexBasis:190,flexGrow:0,flexShrink:0},archiveDateRange:{color:h.COLORS.TEXT_BODY,fontSize:v.FONT_SIZE.SM,fontWeight:v.FONT_WEIGHT.MEDIUM},archiveGridHeader:{alignItems:'center',flexDirection:'row',gap:u.SPACING.MD,paddingHorizontal:u.SPACING.MD},archiveHistoryBand:{backgroundColor:h.COLORS.BG_WASH,gap:u.SPACING.SM,paddingHorizontal:u.SPACING.LG,paddingVertical:u.SPACING.MD},archiveHistoryHeader:{alignItems:'center',flexDirection:'row',gap:u.SPACING.MD,justifyContent:'space-between'},archiveHistoryList:{gap:u.SPACING.XS},archiveHistoryToggle:Object.assign({alignSelf:'center',flexShrink:0,paddingHorizontal:u.SPACING.SM,paddingVertical:u.SPACING.XS},{cursor:'pointer'}),archiveHistoryToggleText:{color:h.COLORS.ACTION_PRIMARY,fontSize:v.FONT_SIZE.SM,fontWeight:v.FONT_WEIGHT.BOLD},archiveIndexCell:{flexBasis:64,flexGrow:0,flexShrink:0},archiveMapAction:{alignItems:'center',justifyContent:'center',minHeight:44},archiveMapCell:{flexBasis:76,flexGrow:0,flexShrink:0},archiveMapColumnText:{textAlign:'center'},archiveMapLinkText:{color:h.COLORS.BRAND_PRIMARY_DARK,fontSize:v.FONT_SIZE.SM,fontWeight:v.FONT_WEIGHT.SEMIBOLD,textAlign:'center'},archiveMapUnavailable:{color:h.COLORS.TEXT_MUTED,fontSize:v.FONT_SIZE.XS},archiveNameCell:{flexBasis:170,flexGrow:2,flexShrink:1,minWidth:0},archiveOwnerCell:{flexBasis:210,flexGrow:2,flexShrink:1,minWidth:0},archiveOwnerEmail:{color:h.COLORS.TEXT_BODY,fontSize:v.FONT_SIZE.SM},archiveRelativeTime:{color:h.COLORS.TEXT_MUTED,flexShrink:0,fontSize:v.FONT_SIZE.SM},archiveSelectionCell:{alignItems:'center',flexBasis:48,flexGrow:0,flexShrink:0,justifyContent:'center'},archiveRow:{alignItems:'center',backgroundColor:h.COLORS.TEXT_INVERSE,borderColor:h.COLORS.BORDER,borderRadius:S.RADIUS.MD,borderWidth:1,flexDirection:'row',gap:u.SPACING.MD,paddingHorizontal:u.SPACING.MD,paddingVertical:u.SPACING.SM},archiveSensorIndex:{color:h.COLORS.TEXT_HEADING,flexShrink:0,fontFamily:v.FONT_FAMILY.WEB_MONOSPACE,fontSize:v.FONT_SIZE.SM,fontWeight:v.FONT_WEIGHT.BOLD},archiveSensorLabel:{color:h.COLORS.TEXT_HEADING,fontSize:v.FONT_SIZE.SM,fontWeight:v.FONT_WEIGHT.BOLD},archiveVisibility:{color:h.COLORS.TEXT_BODY,flexShrink:0,fontSize:v.FONT_SIZE.SM,fontWeight:v.FONT_WEIGHT.SEMIBOLD},archiveVisibilityCell:{flexBasis:76,flexGrow:0,flexShrink:0},historyMapLink:{alignItems:'center',flexShrink:0,justifyContent:'center',minHeight:44,paddingHorizontal:u.SPACING.XS,paddingVertical:u.SPACING.MICRO},historyMapLinkText:{color:h.COLORS.BRAND_PRIMARY_DARK,fontSize:v.FONT_SIZE.SM,fontWeight:v.FONT_WEIGHT.SEMIBOLD},sectionTitle:{color:h.COLORS.TEXT_BODY,fontSize:v.FONT_SIZE.XS,fontWeight:v.FONT_WEIGHT.BOLD,letterSpacing:.5,marginBottom:u.SPACING.XS,textTransform:'uppercase'}})},1232,[34,95,222,488,276,1233,489,490,491,494,495,560,698,699,527,1234,1139,104]); 4__d(function(g,r,i,a,m,_e,d){"use strict";
4function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SelectionCheckbox=function({checked:e,accessibilityLabel:n,onPress:c,visibleLabel:s,disabled:b=!1}){const S=!0===e||'mixed'===e;return(0,O.jsxs)(l.default,{accessibilityRole:"checkbox",accessibilityLabel:n,accessibilityState:{checked:e,disabled:b},disabled:b,onPress:c,style:[u.control,b&&u.controlDisabled],children:[(0,O.jsx)(o.default,{style:[u.box,S&&u.boxActive],children:S&&(0,O.jsx)(t.default,{style:u.mark,children:'mixed'===e?'\u2212':'\u2713'})}),null!=s&&(0,O.jsx)(t.default,{style:u.label,children:s})]})},r(d[0]);var t=e(r(d[1])),l=e(r(d[2])),o=e(r(d[3])),n=r(d[4]),c=r(d[5]),s=r(d[6]),b=r(d[7]),S=r(d[8]),O=r(d[9]);const u=(0,S.createStyles)({box:{alignItems:'center',borderColor:n.COLORS.BORDER_DEFAULT,borderRadius:c.RADIUS.SM,borderWidth:2,height:20,justifyContent:'center',width:20},boxActive:{backgroundColor:n.COLORS.ACTION_PRIMARY,borderColor:n.COLORS.ACTION_PRIMARY},control:{alignItems:'center',flexDirection:'row',gap:s.SPACING.XS,justifyContent:'center',minHeight:44,minWidth:44,paddingHorizontal:s.SPACING.XS},controlDisabled:{opacity:.45},label:{color:n.COLORS.TEXT_BODY,fontSize:b.FONT_SIZE.SM,fontWeight:b.FONT_WEIGHT.SEMIBOLD},mark:{color:n.COLORS.TEXT_INVERSE,fontSize:b.FONT_SIZE.SM,fontWeight:b.FONT_WEIGHT.BOLD,lineHeight:16}})},1233,[34,222,488,276,490,491,494,495,489,104]); 5__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.toArchiveHistoryMapTarget=n,e.isArchiveHistoryMapTargetSelectable=function(o){return'ready'===(0,t.buildExternalMultiSensorMapPath)([n(o)]).status};var t=r(d[0]);function n(t){return{archived:!0,hidden:t.hidden,lat:t.lat,locationType:t.locationType,lon:t.lon,readKey:t.readKey,sensorIndex:t.sensorIndex}}},1234,[1139]); 6__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ChannelReadingsBand=function({sensor:e,isPending:n,isChannelCoolingDown:t,onToggleDowngrade:o,edgeToEdge:c=!1}){const h=e.channelB,s=E(h),u=P(e.pm25),f=s&&null!==h?P(h.pm25):null,p=y(null===f?[u]:[u,f]),S=null===o?null:()=>{o('A')},C=null===o?null:()=>{o('B')};return(0,T.jsxs)(l.default,{style:[w.readingsBand,c&&w.readingsBandEdgeToEdge],children:[(0,T.jsx)(R,{label:"Channel A",pm25:e.pm25,pm25Reading:u,pm25ColumnWidth:p,temperature:e.temperature,humidity:e.humidity,downgraded:e.downgraded,isPending:n,isCoolingDown:t?.('A')??!1,onToggleDowngrade:S,edgeToEdge:c}),s&&null!==h&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(x,{}),(0,T.jsx)(R,{label:"Channel B",pm25:h.pm25,pm25Reading:f??P(h.pm25),pm25ColumnWidth:p,temperature:h.temperature,humidity:h.humidity,downgraded:h.downgraded,isPending:n,isCoolingDown:t?.('B')??!1,onToggleDowngrade:C,edgeToEdge:c})]})]})};var n=e(r(d[0])),l=e(r(d[1])),t=r(d[2]),o=r(d[3]),c=r(d[4]),h=r(d[5]),s=r(d[6]),u=r(d[7]),f=r(d[8]),p=r(d[9]),S=r(d[10]),T=r(d[11]);function x(){return(0,T.jsx)(l.default,{style:w.channelSeparator})}function R({label:e,pm25:t,pm25Reading:o,pm25ColumnWidth:c,temperature:h,humidity:s,downgraded:f,isPending:x,isCoolingDown:R,onToggleDowngrade:O,edgeToEdge:A}){const{isPhone:B}=(0,u.useResponsive)(),P=(0,p.pm25ToAqi)(t);return(0,T.jsxs)(l.default,{style:[w.channelRow,A&&w.channelRowEdgeToEdge,B&&w.channelRowPhone],children:[(0,T.jsxs)(l.default,{style:[w.channelIdentity,B&&w.channelIdentityPhone],children:[(0,T.jsx)(n.default,{style:w.channelLabel,selectable:!0,children:e}),(0,T.jsx)(C,{aqi:P})]}),(0,T.jsxs)(l.default,{style:[w.channelBody,B&&w.channelBodyPhone],children:[(0,T.jsxs)(l.default,{style:[w.channelReadings,B&&w.channelReadingsPhone],children:[(0,T.jsx)(n.default,{style:[w.channelReadingCell,w.channelPmReading,B?w.channelPmReadingPhone:{flexBasis:c}],numberOfLines:1,selectable:!0,children:o}),(0,T.jsx)(n.default,{style:[w.channelReadingCell,w.channelTemperatureReading,B&&w.channelTemperatureReadingPhone],numberOfLines:1,selectable:!0,children:null===h?'':`${String(h)}\xb0F`}),(0,T.jsx)(n.default,{style:[w.channelReadingCell,w.channelHumidityReading,B&&w.channelHumidityReadingPhone],numberOfLines:1,selectable:!0,children:null===s?'':`${String(s)}%`})]}),f&&(0,T.jsx)(I,{}),null!==O&&(0,T.jsx)(l.default,{style:w.channelAction,children:(0,T.jsx)(S.ActionButton,{label:f?'Restore Channel':'Downgrade Channel',onPress:O,variant:f?'neutralStrong':'warning',disabled:x||R,style:w.channelActionButton})})]})]})}function C({aqi:e}){if(null===e)return(0,T.jsx)(f.HoverTooltip,{text:p.AQI_TOOLTIP_TEXT,children:(0,T.jsx)(l.default,{style:[w.channelAqiBadge,w.channelAqiBadgeEmpty],children:(0,T.jsx)(n.default,{style:w.channelAqiBadgeEmptyText,selectable:!0,children:"-"})})});const t=(0,p.getAqiColor)(e),o=(0,p.getAqiOnColor)(e);return(0,T.jsx)(f.HoverTooltip,{text:p.AQI_TOOLTIP_TEXT,children:(0,T.jsx)(l.default,{style:[w.channelAqiBadge,{backgroundColor:t}],children:(0,T.jsx)(n.default,{style:[w.channelAqiBadgeText,{color:o}],selectable:!0,children:String(e)})})})}function I(){return(0,T.jsx)(l.default,{style:w.chipWarning,children:(0,T.jsx)(n.default,{style:w.chipTextWarning,selectable:!0,children:"Downgraded"})})}function O(e){return null===e?'N/A':String(e)}const A=124,B=8;function P(e){return`PM2.5: ${O(e)} \xb5g/m\xb3`}function y(e){const n=Math.max(...e.map(e=>e.length));return Math.max(A,Math.ceil(n*B))}function E(e){return null!==e&&(null!==e.pm25||null!==e.temperature||null!==e.humidity||e.downgraded)}const w=(0,t.createStyles)({channelAction:{marginLeft:'auto'},channelActionButton:{alignItems:'center',width:144},channelAqiBadge:{alignItems:'center',borderRadius:c.RADIUS.SM,justifyContent:'center',minWidth:44,paddingHorizontal:h.SPACING.SM,paddingVertical:h.SPACING.MICRO},channelAqiBadgeEmpty:{backgroundColor:o.COLORS.BG_SUBTLE_100},channelAqiBadgeEmptyText:{color:o.COLORS.TEXT_MUTED,fontSize:s.FONT_SIZE.SM,fontWeight:s.FONT_WEIGHT.SEMIBOLD},channelAqiBadgeText:{fontSize:s.FONT_SIZE.SM,fontVariant:['tabular-nums'],fontWeight:s.FONT_WEIGHT.BOLD},channelLabel:{color:o.COLORS.TEXT_MUTED,fontSize:s.FONT_SIZE.XS,fontWeight:s.FONT_WEIGHT.BOLD,letterSpacing:.5,textTransform:'uppercase'},channelBody:{alignItems:'center',flex:1,flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.MD,minWidth:0},channelBodyPhone:{flexBasis:'100%'},channelHumidityReading:{flexBasis:36,flexGrow:0,flexShrink:0,marginLeft:h.SPACING.XS},channelHumidityReadingPhone:{flexBasis:'auto',marginLeft:0},channelIdentity:{alignItems:'center',flexDirection:'row',gap:h.SPACING.MD,minWidth:152},channelIdentityPhone:{minWidth:0},channelPmReading:{flexGrow:0,flexShrink:0},channelPmReadingPhone:{flexBasis:'auto'},channelReadingCell:{color:o.COLORS.TEXT_BODY,fontSize:s.FONT_SIZE.SM,fontVariant:['tabular-nums'],fontWeight:s.FONT_WEIGHT.MEDIUM},channelReadings:{alignItems:'center',flex:1,flexDirection:'row',gap:h.SPACING.XS,minWidth:0},channelReadingsPhone:{columnGap:h.SPACING.MD,flexWrap:'wrap',rowGap:h.SPACING.XS},channelTemperatureReading:{flexBasis:36,flexGrow:0,flexShrink:0},channelTemperatureReadingPhone:{flexBasis:'auto'},channelRow:{alignItems:'center',backgroundColor:o.COLORS.TEXT_INVERSE,flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.MD,paddingHorizontal:h.SPACING.LG,paddingVertical:h.SPACING.SM},channelRowEdgeToEdge:{paddingHorizontal:h.SPACING.XL},channelRowPhone:{gap:h.SPACING.SM,paddingHorizontal:h.SPACING.MD},channelSeparator:{backgroundColor:o.COLORS.BORDER,height:1},chipTextWarning:{color:o.COLORS.WARNING_DARK,fontSize:s.FONT_SIZE.XS,fontWeight:s.FONT_WEIGHT.SEMIBOLD,letterSpacing:.3,textTransform:'uppercase'},chipWarning:{backgroundColor:o.COLORS.WARNING_BG,borderRadius:c.RADIUS.SM,paddingHorizontal:h.SPACING.SM,paddingVertical:h.SPACING.MICRO},readingsBand:{borderBottomColor:o.COLORS.BORDER,borderBottomWidth:1,borderTopColor:o.COLORS.BORDER,borderTopWidth:1},readingsBandEdgeToEdge:{marginHorizontal:-h.SPACING.XL}})},1235,[222,276,489,490,491,494,495,560,699,1236,1140,104]); 7__d(function(g,r,i,a,m,e,d){"use strict";
7Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AQI_TOOLTIP_TEXT",{enumerable:!0,get:function(){return O}}),e.pm25ToAqi=function(o){if(null==o||!Number.isFinite(o)||o<0)return null;const O=Math.floor(10*o)/10,n=A(O),t=(n.aqiHigh-n.aqiLow)/(n.cHigh-n.cLow)*(O-n.cLow)+n.aqiLow;return Math.min(500,Math.round(t))},e.getAqiCategory=function(o){if(null===o)return'Good';return(n.find(O=>o<=O.aqiHigh)??t).category},e.getAqiColor=function(O){if(null===O)return o.COLORS.TEXT_PLACEHOLDER;return(n.find(o=>O<=o.aqiHigh)??t).color},e.getAqiWashColor=function(O){if(null===O)return o.COLORS.BG_WASH;return(n.find(o=>O<=o.aqiHigh)??t).wash},e.getAqiMidColor=function(O){if(null===O)return o.COLORS.BG_WASH;return(n.find(o=>O<=o.aqiHigh)??t).mid},e.getAqiOnColor=function(O){if(null===O)return o.COLORS.TEXT_BODY;if(O<=200)return o.COLORS.TEXT_PRIMARY;return o.COLORS.TEXT_INVERSE};var o=r(d[0]);const O='US EPA PM2.5 AQI',n=[{cLow:0,cHigh:9,aqiLow:0,aqiHigh:50,category:'Good',color:o.COLORS.AQI_GOOD,wash:o.COLORS.AQI_WASH_GOOD,mid:o.COLORS.AQI_MID_GOOD},{cLow:9.1,cHigh:35.4,aqiLow:51,aqiHigh:100,category:'Moderate',color:o.COLORS.AQI_MODERATE,wash:o.COLORS.AQI_WASH_MODERATE,mid:o.COLORS.AQI_MID_MODERATE},{cLow:35.5,cHigh:55.4,aqiLow:101,aqiHigh:150,category:'Unhealthy for Sensitive Groups',color:o.COLORS.AQI_UNHEALTHY_SENSITIVE,wash:o.COLORS.AQI_WASH_UNHEALTHY_SENSITIVE,mid:o.COLORS.AQI_MID_UNHEALTHY_SENSITIVE},{cLow:55.5,cHigh:125.4,aqiLow:151,aqiHigh:200,category:'Unhealthy',color:o.COLORS.AQI_UNHEALTHY,wash:o.COLORS.AQI_WASH_UNHEALTHY,mid:o.COLORS.AQI_MID_UNHEALTHY},{cLow:125.5,cHigh:225.4,aqiLow:201,aqiHigh:300,category:'Very Unhealthy',color:o.COLORS.AQI_VERY_UNHEALTHY,wash:o.COLORS.AQI_WASH_VERY_UNHEALTHY,mid:o.COLORS.AQI_MID_VERY_UNHEALTHY},{cLow:225.5,cHigh:500.4,aqiLow:301,aqiHigh:500,category:'Hazardous',color:o.COLORS.AQI_HAZARDOUS,wash:o.COLORS.AQI_WASH_HAZARDOUS,mid:o.COLORS.AQI_MID_HAZARDOUS}],t=(()=>{const o=n.at(-1);if(void 0===o)throw new Error('AQI_BANDS must define at least one band');return o})();function A(o){for(const O of n)if(o<=O.cHigh)return O;return t}},1236,[490]); 8__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.LedModeManagementControl=function({ledMode:e,isPending:t,isSetCoolingDown:s=!1,onSet:c}){const b=f(e),[S,u]=(0,o.useState)(b.baseMode),[L,p]=(0,o.useState)(b.tapEnabled),[_,M]=(0,o.useState)(e);if(_!==e){const o=f(e);M(e),u(o.baseMode),p(o.tapEnabled)}const{isPhone:N}=(0,O.useResponsive)(),B=''===S?null:(0,h.composeLedMode)(S,L),P='0'===S,A=(0,o.useMemo)(()=>''===S?[D,...h.LED_MODE_OPTIONS]:h.LED_MODE_OPTIONS,[S]),G=t||P||''===S;return(0,C.jsxs)(n.default,{style:I.container,children:[(0,C.jsx)(l.default,{style:I.groupLabel,selectable:!0,children:"LED Settings"}),(0,C.jsxs)(n.default,{style:[I.controlsRow,N&&I.controlsRowPhone],children:[(0,C.jsxs)(n.default,{style:[I.modeField,N&&I.fieldPhone],children:[(0,C.jsx)(l.default,{style:I.label,selectable:!0,children:"Mode"}),(0,C.jsx)(x,{testID:"led-management-select",value:S,options:A,disabled:t,onChange:e=>{u(e),'0'===e&&p(!0)}})]}),(0,C.jsxs)(n.default,{style:[I.tapField,N&&I.fieldPhone],children:[(0,C.jsx)(l.default,{style:I.label,selectable:!0,children:"Tap brightness"}),(0,C.jsx)(R,{value:L&&!P&&''!==S,disabled:G,unavailableLabel:E(S,L),onToggle:()=>{p(e=>!e)}})]}),(0,C.jsx)(n.default,{style:[I.actions,N&&I.actionsPhone],children:(0,C.jsx)(T.ActionButton,{label:"Set LED Settings",onPress:()=>{null!==B&&c(String(B))},variant:"neutralStrong",disabled:t||s||null===B,style:N?I.setButtonPhone:void 0})})]})]})};var o=r(d[0]);r(d[1]);var l=e(r(d[2])),t=e(r(d[3])),n=e(r(d[4])),s=r(d[5]),c=r(d[6]),b=r(d[7]),S=r(d[8]),u=r(d[9]),O=r(d[10]),h=r(d[11]),T=r(d[12]),C=r(d[13]);const D={value:'',label:'N/A'};function f(e){return(0,h.parseLedMode)(e??null)??{baseMode:'',tapEnabled:!0}}function E(e,o){return''===e?'N/A':'0'===e?'Not applied (LEDs off)':o?'Enabled':'Disabled'}function R({value:e,disabled:o,unavailableLabel:s,onToggle:c}){return(0,C.jsxs)(t.default,{testID:"tap-brightness-toggle",style:[I.booleanToggle,o&&I.booleanToggleDisabled],disabled:o,accessibilityRole:"checkbox",accessibilityState:{checked:e,disabled:o},onPress:c,children:[(0,C.jsx)(n.default,{style:[I.booleanBox,e&&I.booleanBoxChecked],children:e&&(0,C.jsx)(n.default,{style:I.booleanCheckmark})}),(0,C.jsx)(l.default,{style:[I.booleanToggleText,o&&I.booleanToggleTextDisabled],selectable:!0,children:o?s:e?'Enabled':'Disabled'})]})}function x({testID:e,value:o,options:l,disabled:t,onChange:n}){l.find(e=>e.value===o);return(0,C.jsx)("select",{"data-testid":e,style:I.select,value:o,disabled:t,onChange:e=>{n(e.target.value)},children:l.map(e=>(0,C.jsx)("option",{value:e.value,children:e.label},e.value))})}const I=(0,s.createStyles)({actions:{alignItems:'flex-start',flexShrink:0,justifyContent:'flex-end'},actionsPhone:{alignItems:'stretch',alignSelf:'stretch'},booleanBox:{alignItems:'center',backgroundColor:c.COLORS.TEXT_INVERSE,borderColor:c.COLORS.BORDER_DEFAULT,borderRadius:b.RADIUS.SM,borderWidth:1,height:18,justifyContent:'center',width:18},booleanBoxChecked:{borderColor:c.COLORS.TEXT_BODY},booleanCheckmark:{borderBottomColor:c.COLORS.TEXT_BODY,borderBottomWidth:2,borderRightColor:c.COLORS.TEXT_BODY,borderRightWidth:2,height:10,marginTop:-2,transform:[{rotate:'45deg'}],width:5},booleanToggle:Object.assign({alignItems:'center',backgroundColor:c.COLORS.TEXT_INVERSE,borderColor:c.COLORS.BORDER_DEFAULT,borderRadius:b.RADIUS.MD,borderWidth:1,flexDirection:'row',gap:S.SPACING.SM,minHeight:38,minWidth:116,paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.SM},{cursor:'pointer'}),booleanToggleDisabled:{backgroundColor:c.COLORS.BG_SUBTLE_100},booleanToggleText:{color:c.COLORS.TEXT_BODY,fontSize:u.FONT_SIZE.MD},booleanToggleTextDisabled:{color:c.COLORS.TEXT_MUTED},container:{backgroundColor:c.COLORS.BG_WASH,borderColor:c.COLORS.BORDER_DEFAULT,borderRadius:b.RADIUS.MD,borderWidth:1,gap:S.SPACING.XS,minWidth:0,paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.SM},controlsRow:{alignItems:'flex-end',flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.SM,minWidth:0},controlsRowPhone:{alignItems:'stretch',flexDirection:'column',flexWrap:'nowrap',gap:S.SPACING.MD},fieldPhone:{flexBasis:'auto',flexGrow:0},setButtonPhone:{alignItems:'center',alignSelf:'stretch',paddingVertical:S.SPACING.MD},groupLabel:{color:c.COLORS.TEXT_HEADING,fontSize:u.FONT_SIZE.SM,fontWeight:u.FONT_WEIGHT.BOLD},label:{color:c.COLORS.TEXT_BODY,fontSize:u.FONT_SIZE.SM,fontWeight:u.FONT_WEIGHT.SEMIBOLD},modeField:{flexBasis:250,flexGrow:1,gap:S.SPACING.XS,minWidth:0},select:Object.assign({backgroundColor:c.COLORS.TEXT_INVERSE,borderColor:c.COLORS.BORDER_DEFAULT,borderRadius:b.RADIUS.MD,borderWidth:1,color:c.COLORS.TEXT_HEADING,fontSize:u.FONT_SIZE.MD,minHeight:38,minWidth:0,paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.SM,width:'100%'},{cursor:'pointer'}),selectDisabled:{backgroundColor:c.COLORS.BG_SUBTLE_100},selectText:{color:c.COLORS.TEXT_BODY,fontSize:u.FONT_SIZE.MD},selectTextDisabled:{color:c.COLORS.TEXT_MUTED},tapField:{flexBasis:140,flexGrow:0,gap:S.SPACING.XS}})},1237,[34,95,222,488,276,489,490,491,494,495,560,1123,1140,104]); 9__d(function(g,r,i,a,m,_e,d){"use strict";
9function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ReadingsSupplement=function({gas:e,confidencePercent:n,particleRatioHigh:o=null}){return(0,S.jsxs)(t.default,{style:p.readingSupplement,children:[(0,S.jsx)(R.InfoItem,{label:"Gas",value:(0,f.formatMeasurement)(e)}),n>=0&&(0,S.jsx)(R.InfoItem,{label:"Confidence",value:`${n}%`}),null!=o&&(0,S.jsxs)(t.default,{style:R.sharedStyles.infoItem,children:[(0,S.jsx)(l.default,{style:R.sharedStyles.infoLabel,selectable:!0,children:"Particle Ratio"}),(0,S.jsx)(l.default,{style:[R.sharedStyles.infoValue,!o&&p.particleRatioLowValue],selectable:!0,children:o?'HIGH':'LOW'})]})]})};var l=e(r(d[0])),t=e(r(d[1])),n=r(d[2]),o=r(d[3]),s=r(d[4]),u=r(d[5]),c=r(d[6]),f=r(d[7]),R=r(d[8]),S=r(d[9]);const p=(0,n.createStyles)({particleRatioLowValue:{alignSelf:'flex-start',backgroundColor:o.COLORS.ERROR_BG,borderColor:o.COLORS.ERROR_BORDER,borderRadius:s.RADIUS.SM,borderWidth:1,color:o.COLORS.ERROR,fontWeight:c.FONT_WEIGHT.BOLD,paddingHorizontal:u.SPACING.SM,paddingVertical:2},readingSupplement:{flexDirection:'row',flexWrap:'wrap',gap:u.SPACING.LG,marginTop:u.SPACING.MD}})},1238,[222,276,489,490,491,494,495,1239,1140,104]); 10__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.formatMeasurement=function(n){return null==n?'N/A':String(n)},e.formatRssi=function(n,t){if(null==n)return'N/A';if(null==t||''===t)return`${String(n)} dBm`;return`${String(n)} dBm (${t})`},e.formatFirmwareWithConfiguredTarget=function(n,t){const u=null==n||''===n?'N/A':n;if(null==t||''===t||t===n)return u;return`${u} \u2192 ${t}`},e.resolveSensorDisplayName=function(n,t){const o=null==n?'':(0,u.collapseToSingleLine)(n);return''!==o?o:`Sensor ${String(t)}`},e.formatCoordinates=function(n,t){if(null==n||null==t)return'';return`${n.toFixed(2)}, ${t.toFixed(2)}`},e.formatCoordinatesPrecise=function(n,u){const o=(0,t.toCoord)(n??null,u??null);return null===o?'N/A':(0,t.formatCoord)(o,6)},e.formatPositionRating=function(n){if(null==n||n<=0)return'N/A';const t=Math.min(5,Math.floor(n));return'\u2605'.repeat(t)+'\u2606'.repeat(5-t)},e.formatLocationType=function(n){switch(n){case'inside':return'Inside';case'outside':return'Outside';default:return''}},e.formatVisibility=function(n){return n?'Private':'Public'},e.formatMinutesAgo=function(n){if(null==n)return'N/A';if(n<1)return'Just now';if(n<60)return`${n} min ago`;const t=Math.floor(n/60);if(t<24)return`${t} hr${t>1?'s':''} ago`;const u=Math.floor(t/24);return`${u} day${u>1?'s':''} ago`},e.formatDurationMinutes=function(n){if(null==n)return'N/A';if(n<1)return'Less than 1 min';if(n<60)return`${n} min`;const t=Math.floor(n/60);if(t<24)return`${t} hr${t>1?'s':''}`;const u=Math.floor(t/24);return`${u} day${u>1?'s':''}`},e.getUptimeLabel=function(n){return'online'===n?'Current uptime':'Last uptime'},e.isSensorOffline=function(n){return'offline'===n},e.getStatusColor=function(t){switch(t){case'online':return n.COLORS.GREEN_500;case'delayed':return n.COLORS.YELLOW_500;case'slow':return n.COLORS.ORANGE_500;case'stale':return n.COLORS.RED_500;case'offline':return n.COLORS.TEXT_PLACEHOLDER;default:return n.COLORS.BORDER_DEFAULT}},e.getConfidenceColor=function(t){if(t<0)return n.COLORS.TEXT_PLACEHOLDER;if(t<=50)return n.COLORS.ERROR;if(t<=75)return n.COLORS.WARNING;if(t<=90)return n.COLORS.YELLOW_500;return n.COLORS.GREEN_500};var n=r(d[0]),t=r(d[1]),u=r(d[2])},1239,[490,1117,1240]); 11__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.collapseToSingleLine=function(n){return n.replace(/\s+/gu,' ').trim()}},1240,[]); 12__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SensorAqiHeadline=function({pm25:e,size:n="sm",offline:o=!1}){const S=(0,O.pm25ToAqi)(e),s=o?'offline':'online',c=(0,f.getOwnedSensorAqiColor)(s,S),p=(0,f.getOwnedSensorAqiOnColor)(s,S),_=o?'Offline':null===S?'No data':(0,O.getAqiCategory)(S),L=null===S?'\u2014':String(S),N=null!=e&&Number.isFinite(e)?`PM2.5 ${Number(e).toFixed(1)} \xb5g/m\xb3`:'PM2.5 \u2014',A='lg'===n;return(0,u.jsx)(T.HoverTooltip,{text:O.AQI_TOOLTIP_TEXT,children:(0,u.jsx)(t.default,{style:[I.panelFilled,A?I.panelLargePad:I.panelSmallPad,{backgroundColor:c}],children:(0,u.jsxs)(t.default,{style:I.row,children:[(0,u.jsx)(l.default,{style:[A?I.numberLg:I.numberSm,{color:p}],selectable:!0,children:L}),(0,u.jsxs)(t.default,{style:I.textColumn,children:[(0,u.jsx)(l.default,{style:[A?I.categoryLg:I.categorySm,{color:p}],numberOfLines:1,selectable:!0,children:_}),(0,u.jsx)(l.default,{style:[A?I.pmLg:I.pmSm,I.pmFilledOverlay,{color:p}],selectable:!0,children:N})]})]})})})},r(d[0]);var l=e(r(d[1])),t=e(r(d[2])),n=r(d[3]),o=r(d[4]),S=r(d[5]),s=r(d[6]),c=r(d[7]),T=r(d[8]),O=r(d[9]),f=r(d[10]),u=r(d[11]);const I=(0,n.createStyles)({categoryLg:{fontSize:c.FONT_SIZE.LG,fontWeight:c.FONT_WEIGHT.BOLD},categorySm:{fontSize:c.FONT_SIZE.SM,fontWeight:c.FONT_WEIGHT.BOLD,letterSpacing:.3,textTransform:'uppercase'},numberLg:{fontSize:c.FONT_SIZE.DISPLAY_XL,fontWeight:c.FONT_WEIGHT.EXTRABOLD,lineHeight:c.FONT_SIZE.DISPLAY_XL},numberSm:{fontSize:c.FONT_SIZE.DISPLAY_SM,fontWeight:c.FONT_WEIGHT.EXTRABOLD,lineHeight:c.FONT_SIZE.DISPLAY_SM},panelFilled:{borderRadius:S.RADIUS.MD},panelLargePad:{paddingHorizontal:s.SPACING.LG,paddingVertical:s.SPACING.MD},panelSmallPad:{paddingHorizontal:s.SPACING.MD,paddingVertical:s.SPACING.SM},pmFilledOverlay:{opacity:.85},pmLg:{color:o.COLORS.TEXT_MUTED,fontSize:c.FONT_SIZE.SM,marginTop:s.SPACING.MICRO},pmSm:{color:o.COLORS.TEXT_MUTED,fontSize:c.FONT_SIZE.XS,marginTop:s.SPACING.MICRO},row:{alignItems:'center',flexDirection:'row',gap:s.SPACING.MD},textColumn:{flex:1,minWidth:0}})},1241,[34,222,276,489,490,491,494,495,699,1236,1242,104]); 13__d(function(g,r,i,a,m,e,d){"use strict";
13Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"OFFLINE_SENSOR_AQI_COLOR",{enumerable:!0,get:function(){return O}}),Object.defineProperty(e,"OFFLINE_SENSOR_AQI_ON_COLOR",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"OFFLINE_SENSOR_AQI_WASH_COLOR",{enumerable:!0,get:function(){return f}}),e.getOwnedSensorAqiColor=function(n,u){return(0,t.isSensorOffline)(n)?O:(0,o.getAqiColor)(u)},e.getOwnedSensorAqiOnColor=function(n,O){return(0,t.isSensorOffline)(n)?u:(0,o.getAqiOnColor)(O)},e.getOwnedSensorAqiWashColor=function(n,O){return(0,t.isSensorOffline)(n)?f:(0,o.getAqiWashColor)(O)},e.getOwnedSensorAqiMidColor=function(n,u){return(0,t.isSensorOffline)(n)?O:(0,o.getAqiMidColor)(u)},e.getSearchResultStripeColor=function(n,u){return(0,t.isSensorOffline)(n)?O:(0,o.getAqiColor)(u)};var n=r(d[0]),o=r(d[1]),t=r(d[2]);const O=n.COLORS.TEXT_PLACEHOLDER,u=n.COLORS.TEXT_INVERSE,f=n.COLORS.BG_MUTED},1242,[490,1236,1239]); 14__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.HeaderBadge=function({label:e,variant:o="neutral"}){const l='success'===o?s.COLORS.SUCCESS_BG:'warning'===o?s.COLORS.WARNING_BG:s.COLORS.BG_SUBTLE_100,c='success'===o?s.COLORS.SUCCESS:'warning'===o?s.COLORS.WARNING_DARK:s.COLORS.TEXT_MUTED;return(0,I.jsx)(t.default,{style:[O.headerBadge,{backgroundColor:l}],children:(0,I.jsx)(n.default,{style:[O.headerBadgeText,{color:c}],selectable:!0,children:e})})},_e.SensorDetailCard=function({sensorLabel:e,sensorModel:l,sensorIndex:s,onlineStatus:c,badges:S,backLabel:h="Back to Search Results",onBack:C,children:G,headline:R,headerActions:x}){const{isPhone:T}=(0,u.useResponsive)(),L=(0,f.getStatusColor)(c);return(0,I.jsxs)(t.default,{children:[(0,I.jsx)(o.default,{style:O.backButton,onPress:C,children:(0,I.jsx)(n.default,{style:O.backButtonText,children:h})}),(0,I.jsxs)(t.default,{style:O.card,children:[(0,I.jsxs)(t.default,{style:[O.header,T&&O.headerPhone],children:[(0,I.jsxs)(t.default,{style:O.headerTopRow,children:[(0,I.jsxs)(t.default,{style:O.headerMain,children:[(0,I.jsxs)(t.default,{style:O.headerTitleRow,children:[(0,I.jsx)(t.default,{style:[O.statusDot,{backgroundColor:L}]}),(0,I.jsx)(n.default,{style:[O.title,T&&O.titlePhone],selectable:!0,children:e??`Sensor ${s}`}),S]}),(0,I.jsxs)(n.default,{style:O.subtitle,selectable:!0,children:[l," \u2014 Sensor index: ",s]})]}),null!=x&&(0,I.jsx)(t.default,{style:[O.headerActions,T&&O.headerActionsPhone],children:x})]}),null!=R&&(0,I.jsx)(t.default,{style:O.headerHeadline,children:R})]}),G]})]})},_e.DetailInfoGrid=function({children:e}){const{isPhone:n}=(0,u.useResponsive)();return(0,I.jsx)(C.DetailGridProvider,{children:(0,I.jsx)(t.default,{style:[O.infoGrid,n&&O.infoGridPhone],children:e})})},r(d[0]);var t=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3])),l=r(d[4]),s=r(d[5]),c=r(d[6]),S=r(d[7]),h=r(d[8]),u=r(d[9]),f=r(d[10]),C=r(d[11]),I=r(d[12]);const O=(0,l.createStyles)({backButton:{alignSelf:'flex-start',marginBottom:S.SPACING.XL},backButtonText:{color:s.COLORS.ACTION_PRIMARY,fontSize:h.FONT_SIZE.LG,fontWeight:h.FONT_WEIGHT.MEDIUM},card:{backgroundColor:s.COLORS.TEXT_INVERSE,borderColor:s.COLORS.BORDER,borderRadius:c.RADIUS.LG,borderWidth:1,overflow:'hidden'},header:{backgroundColor:s.COLORS.TEXT_INVERSE,borderBottomColor:s.COLORS.BORDER,borderBottomWidth:1,gap:S.SPACING.LG,paddingHorizontal:S.SPACING.XXL,paddingVertical:S.SPACING.XL},headerActions:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.SM},headerActionsPhone:{width:'100%'},headerHeadline:{alignSelf:'stretch'},headerMain:{flexGrow:1,flexShrink:1,minWidth:0},headerPhone:{paddingHorizontal:S.SPACING.LG,paddingVertical:S.SPACING.LG},headerTopRow:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.LG,justifyContent:'space-between'},headerBadge:{borderRadius:c.RADIUS.SM,paddingHorizontal:S.SPACING.SM,paddingVertical:2},headerBadgeText:{fontSize:h.FONT_SIZE.XS,fontWeight:h.FONT_WEIGHT.SEMIBOLD,textTransform:'uppercase'},headerTitleRow:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.MD},infoGrid:{alignItems:'stretch',flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.LG,padding:S.SPACING.XL},infoGridPhone:{gap:S.SPACING.MD,padding:S.SPACING.LG},statusDot:{borderRadius:c.RADIUS.FULL,height:10,width:10},subtitle:{color:s.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.MD,marginTop:S.SPACING.XS},title:{color:s.COLORS.TEXT_HEADING,fontSize:h.FONT_SIZE.XXXL,fontWeight:h.FONT_WEIGHT.BOLD},titlePhone:{fontSize:h.FONT_SIZE.XXL}})},1243,[34,276,222,488,489,490,491,494,495,560,1239,1140,104]); 15__d(function(g,r,i,a,m,e,d){"use strict";
15Object.defineProperty(e,'__esModule',{value:!0}),e.buildCoreDetailStatusRows=l,e.buildManagedDetailStatusRows=function(o,n){return[...l(o),{label:'Last Update Check',value:(0,t.formatMinutesAgo)(n.lastUpdateCheckMinutesAgo)},{label:'Last Modified',value:(0,t.formatMinutesAgo)(n.lastModifiedMinutesAgo)}]},e.buildPublicDetailStatusRows=function(o){return[...l(o),{label:'RSSI',value:(0,t.formatRssi)(o.rssi,o.rssiQuality)}]},e.buildCoreDetailLocationRows=o,e.buildManagedDetailLocationRows=function(l,n){const u=o(l);return[{label:'Type',value:(0,t.formatLocationType)(l.locationType)||'N/A'},{label:'Visibility',value:(0,t.formatVisibility)(l.hidden)},...u.filter(t=>'Type'!==t.label),{label:'Position Checked',value:(0,t.formatMinutesAgo)(n)}]},e.buildPublicDetailLocationRows=function(t){return o(t)},e.buildManagedDetailHardwareRows=function(l){return[{label:'Device ID',value:l.mac??'N/A'},...n(l,(0,t.formatFirmwareWithConfiguredTarget)(l.firmwareVersion,l.configuredFirmwareTarget)),{label:'RSSI',value:(0,t.formatRssi)(l.rssi,l.rssiQuality)}]},e.buildPublicDetailHardwareRows=function(t){const l=null==t.firmwareVersion||''===t.firmwareVersion?'N/A':t.firmwareVersion;return n(t,l)};var t=r(d[0]);function l(l){return[{label:'Online Status',value:l.onlineStatus},{label:'Last Seen',value:(0,t.formatMinutesAgo)(l.lastSeenMinutesAgo)},{label:(0,t.getUptimeLabel)(l.onlineStatus),value:(0,t.formatDurationMinutes)(l.uptimeMinutes)}]}function o(l){return[{label:'Type',value:(0,t.formatLocationType)(l.locationType)||'N/A'},{label:'Coordinates',value:(0,t.formatCoordinatesPrecise)(l.lat,l.lon)},{label:'Elevation',value:(0,t.formatMeasurement)(l.elevation)},{label:'Position Rating',value:(0,t.formatPositionRating)(l.positionRating)}]}function n(t,l){return[{label:'Model',value:t.model},{label:'Firmware',value:l},{label:'Hardware',value:t.hardwareDiscovered??'N/A'}]}},1244,[1239]); 16__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ManagementInputGrid=function({children:e}){return(0,x.jsx)(t.default,{style:w.managementInputGrid,children:e})},_e.ManagementInputRow=function({label:e,value:l,onChangeText:o,placeholder:u,isPending:s,setDisabled:p=!1,onSet:R,setVariant:y,keyboardType:I,width:O}){const{isPhone:C}=(0,c.useResponsive)(),M=b(O),T=S(O);if(C)return(0,x.jsxs)(t.default,{style:w.inputColumnPhone,children:[(0,x.jsx)(n.default,{style:w.inputLabel,selectable:!0,children:e}),(0,x.jsxs)(t.default,{style:w.inputControlRowPhone,children:[(0,x.jsx)(f.AppTextInput,Object.assign({style:[w.input,w.inputPhone],value:l,onChangeText:o,placeholder:u,editable:!s},void 0!==I?{keyboardType:I}:{})),(0,x.jsx)(h.ActionButton,{label:"Set",accessibilityLabel:`Set ${e}`,onPress:R,variant:y,disabled:s||p})]})]});return(0,x.jsxs)(t.default,{style:[w.inputRow,M],children:[(0,x.jsx)(n.default,{style:w.inputLabel,selectable:!0,children:e}),(0,x.jsx)(f.AppTextInput,Object.assign({style:[w.input,T],value:l,onChangeText:o,placeholder:u,editable:!s},void 0!==I?{keyboardType:I}:{})),(0,x.jsx)(h.ActionButton,{label:"Set",accessibilityLabel:`Set ${e}`,onPress:R,variant:y,disabled:s||p})]})},_e.ReadOnlyManagementRow=function({label:e,value:l,width:o}){const{isPhone:u}=(0,c.useResponsive)(),s=b(o);if(u)return(0,x.jsxs)(t.default,{style:w.inputColumnPhone,children:[(0,x.jsx)(n.default,{style:w.inputLabel,selectable:!0,children:e}),(0,x.jsx)(n.default,{style:w.readOnlyManagementValue,selectable:!0,children:l})]});return(0,x.jsxs)(t.default,{style:[w.inputRow,s],children:[(0,x.jsx)(n.default,{style:w.inputLabel,selectable:!0,children:e}),(0,x.jsx)(n.default,{style:w.readOnlyManagementValue,selectable:!0,children:l})]})},r(d[0]);var n=e(r(d[1])),t=e(r(d[2])),l=r(d[3]),o=r(d[4]),u=r(d[5]),s=r(d[6]),p=r(d[7]),c=r(d[8]),f=r(d[9]),h=r(d[10]),x=r(d[11]);function b(e){return'wide'===e?w.inputRowWide:'medium'===e?w.inputRowMedium:w.inputRowNarrow}function S(e){return'wide'===e?w.inputWide:'medium'===e?w.inputMedium:w.inputNarrow}const w=(0,l.createStyles)({input:Object.assign({backgroundColor:o.COLORS.TEXT_INVERSE,borderColor:o.COLORS.BORDER_DEFAULT,borderRadius:u.RADIUS.MD,borderWidth:1,color:o.COLORS.TEXT_HEADING,flex:1,fontSize:p.FONT_SIZE.MD,minWidth:0,paddingHorizontal:s.SPACING.MD,paddingVertical:s.SPACING.SM},{outlineColor:o.COLORS.ACTION_PRIMARY}),inputColumnPhone:{flexBasis:'100%',gap:s.SPACING.XS,minWidth:0},inputControlRowPhone:{alignItems:'center',flexDirection:'row',gap:s.SPACING.SM,minWidth:0},inputLabel:{color:o.COLORS.TEXT_BODY,flexShrink:0,fontSize:p.FONT_SIZE.SM,fontWeight:p.FONT_WEIGHT.MEDIUM},inputMedium:{minWidth:92},inputNarrow:{minWidth:64},inputPhone:{flexBasis:0,flexGrow:1,minWidth:0},inputRow:{alignItems:'center',flexDirection:'row',flexGrow:1,flexShrink:1,gap:s.SPACING.XS,minWidth:0},inputRowMedium:{flexBasis:220},inputRowNarrow:{flexBasis:180},inputRowWide:{flexBasis:360,flexGrow:2}
16,inputWide:{minWidth:170},managementInputGrid:{columnGap:s.SPACING.XL,flexDirection:'row',flexWrap:'wrap',rowGap:s.SPACING.SM},readOnlyManagementValue:{color:o.COLORS.TEXT_HEADING,flex:1,fontSize:p.FONT_SIZE.MD,fontWeight:p.FONT_WEIGHT.MEDIUM,minWidth:0}})},1245,[95,222,276,489,490,491,494,495,560,725,1140,104]); 17__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useServerReconciledTextInput=function(u){const[n,c]=(0,t.useState)(u),[s,o]=(0,t.useState)(u);s!==u&&(o(u),c(u));return[n,c]};var t=r(d[0])},1246,[34]); 18__d(function(g,r,i,a,m,e,d){"use strict";function n(n,o){return`${n}-${o().toISOString().slice(0,10)}.csv`}Object.defineProperty(e,'__esModule',{value:!0}),e.exportSensorTable=async function(o,t){const s=t.now??(()=>new Date),u=await t.download(n(t.filenamePrefix??'sensors',s),o.columns,o.rows);if('unsupported'===u.status)return void t.onUnsupported(u.reason);if(void 0===t.recordAudit)return;try{await t.recordAudit(o.rows.length,o.columns.map(n=>n.id))}catch(n){t.onAuditError?.(n)}}},1247,[]); 19__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.partitionOwnedSensorsByArchiveState=_,_e.OwnedSensorsSection=function({sensors:e,loading:S,error:u,onRetry:O,onViewDetail:f,detailLoa
19ding:L,pendingSensorIndices:b,onExportTable:v,selection:P,selectionModeVisible:w,onSelectionModeChange:B}){const[W,F]=(0,t.useState)('cards'),{activeSensors:X,archivedSensors:H}=_(e),V=(0,c.useColumnVisibility)(M.SENSOR_OWNED_COLUMNS,{storageKey:M.SENSOR_OWNED_COLUMN_VISIBILITY_KEY});if(S&&0===e.length)return(0,y.jsxs)(l.default,{style:j.loadingContainer,children:[(0,y.jsx)(n.default,{color:h.COLORS.ACTION_PRIMARY,size:"small"}),(0,y.jsx)(o.default,{style:j.loadingText,children:"Loading your sensors..."})]});if(null!==u&&0===e.length)return(0,y.jsxs)(l.default,{style:j.errorContainer,children:[(0,y.jsxs)(o.default,{style:j.errorTitle,children:["Couldn",'\u2019',"t load your sensors"]}),(0,y.jsx)(o.default,{style:j.errorMessage,children:u}),(0,y.jsx)(s.default,{style:j.retryButton,onPress:O,children:(0,y.jsx)(o.default,{style:j.retryButtonText,children:"Try again"})})]});if(0===e.length)return(0,y.jsx)(x.EmptyOwnedState,{});const k=1===X.length?'sensor':'sensors',z=0===X.length?'No active sensors registered to your account':`${String(X.length)} active ${k} registered to your account`,U=X[0],Z='table'===W?v:void 0;return(0,y.jsxs)(l.default,{style:j.container,children:[(0,y.jsxs)(l.default,{style:[j.headerRow,(w||P.selectedMapTargets.length>0)&&j.headerRowWithSelectionActions],testID:"owned-header-row",children:[(0,y.jsxs)(l.default,{style:j.headerTextBlock,children:[(0,y.jsx)(o.default,{style:j.title,children:"My Sensors"}),(0,y.jsx)(o.default,{style:j.subtitle,children:z})]}),(0,y.jsxs)(l.default,{style:j.headerControls,children:['cards'===W&&(0,y.jsx)(R.SensorSelectionModeControl,{availableSensorCount:e.length,visible:w,onShow:()=>{B(!0)},onHide:()=>{B(!1)}}),null!=v&&(0,y.jsx)(N.ResultLayoutToggle,{layout:W,onChange:e=>{F(e),'cards'===e&&P.selectedMapTargets.length>0&&B(!0)},testID:"owned-layout-toggle"}),(0,y.jsx)(T.AppLink,{to:"Register",style:j.registerLink,children:(0,y.jsx)(o.default,{style:j.registerLinkText,children:"+ Register another"})})]})]}),(0,y.jsx)(R.SensorSelectionActions,{availableSensors:e,selectedSensors:P.selectedMapTargets,onSelectAll:P.selectSensors,onDeselectAll:P.deselectSensors,onClear:P.clearSelection,showBulkSelector:'cards'===W&&w,testID:"owned-selection-actions"}),null!=Z?X.length>0?(0,y.jsx)(E.SensorTable,{sensors:X,columns:M.SENSOR_OWNED_COLUMNS,columnVisibility:V,onExport:Z,selection:P,filterPlaceholder:"Filter your sensors",emptyMessage:"No active sensors match the current filter.",testID:"owned-active-table"}):null:1===X.length&&void 0!==U?(0,y.jsx)(p.SensorHeroCard,Object.assign({sensor:U},w?{selection:{selected:P.selectedMapTargetIndices.has(U.sensorIndex),onToggle:P.toggleSensor}}:{}
19,{onViewDetail:f,detailLoading:L,isPending:b.has(U.sensorIndex),treatment:G})):X.length>1?(0,y.jsx)(C.ResponsiveGrid,{minItemWidth:A,gap:I.SPACING.LG,children:X.map(e=>(0,y.jsx)(D,Object.assign({sensor:e},w?{selection:{selected:P.selectedMapTargetIndices.has(e.sensorIndex),onToggle:P.toggleSensor}}:{},{onViewDetail:f,detailLoading:L,pendingSensorIndices:b}),`owned-${String(e.sensorIndex)}`))}):null,H.length>0&&(0,y.jsxs)(l.default,{style:j.archivedSection,children:[(0,y.jsxs)(l.default,{style:j.archivedHeaderTextBlock,children:[(0,y.jsx)(o.default,{style:j.archivedTitle,children:"Archived Sensors"}),(0,y.jsxs)(o.default,{style:j.subtitle,children:[H.length," archived",' ',1===H.length?'sensor':'sensors'," retained for historical details"]})]}),null!=Z?(0,y.jsx)(E.SensorTable,{sensors:H,columns:M.SENSOR_OWNED_COLUMNS,columnVisibility:V,onExport:Z,filterPlaceholder:"Filter archived sensors",emptyMessage:"No archived sensors match the current filter.",selection:P,testID:"owned-archived-table"}):(0,y.jsx)(C.ResponsiveGrid,{minItemWidth:A,gap:I.SPACING.LG,children:H.map(e=>
19(0,y.jsx)(D,Object.assign({sensor:e,onViewDetail:f,detailLoading:L,pendingSensorIndices:b},w?{selection:{selected:P.selectedMapTargetIndices.has(e.sensorIndex),onToggle:P.toggleSensor}}:{},{archived:!0}),`owned-archived-${String(e.sensorIndex)}`))})]})]})};var t=r(d[0]),n=e(r(d[1])),o=e(r(d[2])),s=e(r(d[3])),l=e(r(d[4])),c=r(d[5]),S=r(d[6]),h=r(d[7]),u=r(d[8]),I=r(d[9]),O=r(d[10]),T=r(d[11]),C=r(d[12]),x=r(d[13]),f=r(d[14]),N=r(d[15]),L=r(d[16]),p=r(d[17]),R=r(d[18]),E=r(d[19]),M=r(d[20]),y=r(d[21]);const A=300,G='glass';function D({sensor:e,onViewDetail:t,detailLoading:n,pendingSensorIndices:o,selection:s,archived:l=!1}){return(0,y.jsx)(f.OwnedSensorCard,Object.assign({sensor:e,onViewDetail:t,detailLoading:n,isPending:o.has(e.sensorIndex),treatment:G},null!=s?{selection:s}:{},{archived:l}))}function _(e){const t=[],n=[];return e.forEach(e=>{(0,L.isArchivedSensor)(e)?n.push(e):t.push(e)}),{activeSensors:t,archivedSensors:n}}const j=(0,S.createStyles)({archivedHeaderTextBlock:{gap:I.SPACING.MICRO,marginBottom:I.SPACING.MD},archivedSection:{borderTopColor:h.COLORS.BORDER,borderTopWidth:1,marginTop:I.SPACING.XL,paddingTop:I.SPACING.LG},archivedTitle:{color:h.COLORS.TEXT_BODY,fontSize:O.FONT_SIZE.XL,fontWeight:O.FONT_WEIGHT.BOLD},container:{marginBottom:I.SPACING.XL},errorContainer:{alignItems:'flex-start',backgroundColor:h.COLORS.BG_WASH,borderColor:h.COLORS.BORDER,borderRadius:u.RADIUS.LG,borderWidth:1,gap:I.SPACING.SM,marginBottom:I.SPACING.XL,padding:I.SPACING.LG},errorMessage:{color:h.COLORS.TEXT_MUTED,fontSize:O.FONT_SIZE.SM},errorTitle:{color:h.COLORS.TEXT_HEADING,fontSize:O.FONT_SIZE.LG,fontWeight:O.FONT_WEIGHT.SEMIBOLD},headerControls:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:I.SPACING.MD,justifyContent:'flex-end'},headerRow:{alignItems:'flex-end',flexDirection:'row',flexWrap:'wrap',gap:I.SPACING.MD,justifyContent:'space-between',marginBottom:I.SPACING.LG},headerRowWithSelectionActions:{marginBottom:I.SPACING.SM},headerTextBlock:{flexGrow:1},loadingContainer:{alignItems:'center',flexDirection:'row',gap:I.SPACING.SM,marginBottom:I.SPACING.XL,padding:I.SPACING.LG},loadingText:{color:h.COLORS.TEXT_MUTED,fontSize:O.FONT_SIZE.MD},registerLink:{backgroundColor:h.COLORS.BG_SURFACE,borderColor:h.COLORS.ACTION_PRIMARY,borderRadius:u.RADIUS.MD,borderWidth:1,paddingHorizontal:I.SPACING.LG,paddingVertical:I.SPACING.SM},registerLinkText:{color:h.COLORS.ACTION_PRIMARY,fontSize:O.FONT_SIZE.SM,fontWeight:O.FONT_WEIGHT.SEMIBOLD},retryButton:{alignSelf:'flex-start',backgroundColor:h.COLORS.ACTION_PRIMARY,borderRadius:u.RADIUS.MD,marginTop:I.SPACING.XS,paddingHorizontal:I.SPACING.MD,paddingVertical:I.SPACING.SM},retryButtonText:{color:h.COLORS.TEXT_INVERSE,fontSize:O.FONT_SIZE.SM,fontWeight:O.FONT_WEIGHT.SEMIBOLD},subtitle:{color:h.COLORS.TEXT_MUTED,fontSize:O.FONT_SIZE.SM},title:{color:h.COLORS.TEXT_HEADING,fontSize:O.FONT_SIZE.XXL,fontWeight:O.FONT_WEIGHT.BOLD}})},1248,[34,410,222,488,276,693,489,490,491,494,495,520,1024,1249,1251,1271,1266,1272,1273,1275,1276,104]); 20__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.EmptyOwnedState=function(){return(0,C.jsxs)(o.default,{style:j.container,children:[(0,C.jsx)(t.default,{style:j.title,children:"Start your air-quality journey"}),(0,C.jsx)(t.default,{style:j.subtitle,children:"You can explore PurpleAir without owning a sensor. Pick where to begin."}),(0,C.jsxs)(p.ResponsiveGrid,{minItemWidth:f,gap:c.SPACING.MD,children:[(0,C.jsx)(h.ActionCard,{icon:(0,C.jsx)(O,{children:(0,C.jsx)(R.ShoppingBagIcon,{size:I,color:s.COLORS.BRAND_PRIMARY})}),label:"Shop sensors",description:"Buy a PurpleAir sensor for your home, school, or office.",to:"Store"}),(0,C.jsx)(h.ActionCard,{icon:(0,C.jsx)(O,{children:(0,C.jsx)(A.MapIcon,{size:I,color:s.COLORS.BRAND_PRIMARY})}),label:"Explore the map",description:"See real-time air quality from sensors around the world.",service:"mapBaseUrl"}),(0,C.jsx)(h.ActionCard,{icon:(0,C.jsx)(O,{children:(0,C.jsx)(S.ChatIcon,{size:I,color:s.COLORS.BRAND_PRIMARY})}),label:"Join the community",description:"Ask questions, share tips, and talk with other members.",to:"Community"})]})]})},r(d[0]);var t=e(r(d[1])),o=e(r(d[2])),n=r(d[3]),s=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]),S=r(d[9]),A=r(d[10]),R=r(d[11]),p=r(d[12]),C=r(d[13]);const f=260,I=26;function O({children:e}){return(0,C.jsx)(o.default,{style:j.iconChip,children:e})}const j=(0,n.createStyles)({container:{marginBottom:c.SPACING.XL},iconChip:{alignItems:'center',backgroundColor:s.COLORS.BRAND_PRIMARY_ALPHA_14,borderRadius:l.RADIUS.FULL,height:52,justifyContent:'center',width:52},subtitle:{color:s.COLORS.TEXT_MUTED,fontSize:u.FONT_SIZE.MD,marginBottom:c.SPACING.LG},title:{color:s.COLORS.TEXT_HEADING,fontSize:u.FONT_SIZE.XXL,fontWeight:u.FONT_WEIGHT.BOLD,marginBottom:c.SPACING.SM}})},1249,[34,222,276,489,490,491,494,495,1023,1250,626,629,1024,104]); 21__d(function(g,r,i,a,m,_e,d){"use strict";
21function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ChatIcon=function(e){const{size:c=22,color:l}=e,s=l??h.COLORS.WHITE;return(0,n.jsx)(t.default,{style:{width:c,height:c},children:(0,n.jsx)("svg",{width:c,height:c,viewBox:"0 0 24 24",fill:s,xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12H7v-2h6v2zm4-3H7V9h10v2zm0-3H7V6h10v2z"})})})},r(d[0]),r(d[1]);e(r(d[2]));var t=e(r(d[3])),h=r(d[4]),n=r(d[5])},1250,[34,95,222,276,490,104]); 22__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.OwnedSensorCard=function({sensor:t,onViewDetail:s,detailLoading:o,isPending:l,treatment:c,selection:u,archived:v=!1}){return(0,n.renderCardTreatment)(c,Object.assign({sensor:t,size:'grid',onViewDetail:s,detailLoading:o,isPending:l},null!=u?{selection:u}:{},{archived:v}))};var n=r(d[0])},1251,[1252]); 23__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"SECONDARY_ACTIONS_TEST_ID",{enumerable:!0,get:function(){return G}}),_e.renderCardTreatment=function(e,t){const n=Object.assign({},t,{archived:t.archived??(0,x.isArchivedSensor)(t.sensor)});switch(e){case'glass':return(0,b.jsx)(q,Object.assign({},n));case'stacked':return(0,b.jsx)($,Object.assign({},n));default:throw new Error(`Unhandled CardLevelTreatment: ${String(e)}`)}},_e.resolveDowngradeScope=B,_e.resolveOwnerNoticeKind=F,_e.OwnerNoticeLane=z,r(d[0]);var t=e(r(d[1]));r(d[2]);var n=e(r(d[3])),o=e(r(d[4])),l=e(r(d[5])),s=r(d[6]),c=r(d[7]),S=r(d[8]),O=r(d[9]),u=r(d[10]),f=r(d[11]),h=r(d[12]),T=r(d[13]),C=r(d[14]),I=r(d[15]),R=r(d[16]),x=r(d[17]),y=r(d[18]),p=r(d[19]),L=r(d[20]),E=r(d[21]),A=r(d[22]),D=r(d[23]),N=r(d[24]),b=r(d[25]);const _='https://community.purpleair.com/t/sensor-maintenance/1531',j='https://community.purpleair.com/t/sensor-wifi-and-registration/182',w='https://community.purpleair.com/t/what-does-it-mean-to-archive-a-purpleair-sensor/1332',G='owned-card-secondary-actions';function v({sensor:e,size:o,tint:s}){const c='lg'===o?140:'md'===o?96:72,S=(0,E.sensorImageUrl)(e.model,'lg'===o?200:100);return(0,b.jsx)(l.default,{style:[K.imageWrap,{height:c,width:c},void 0!==s?{backgroundColor:s}:null],children:null!==S?(0,b.jsx)(t.default,{source:{uri:S},style:{height:c-12,width:c-12},accessibilityIgnoresInvertColors:!0,resizeMode:"contain"}):(0,b.jsx)(n.default,{style:K.imagePlaceholder,numberOfLines:2,children:''!==e.model?e.model:'Sensor'})})}function M({sensor:e,isHero:t,inverted:o,aqiOnColor:s}){const c=t?K.labelLg:K.labelSm,S=t?K.modelLg:K.modelSm,O=o?[S,{color:s},K.onColorSecondary]:[S,K.modelDefault],u=e.mac?.trim()??'',f=(0,L.resolveSensorDisplayName)(e.label,e.sensorIndex);return(0,b.jsxs)(l.default,{style:K.identityTextBlock,children:[(0,b.jsx)(h.CopyableValue,{value:f,description:"sensor name",successMessage:"Sensor name copied",children:(0,b.jsx)(n.default,{style:[c,o?{color:s}:K.labelDefault],children:f})}),(0,b.jsxs)(l.default,{style:K.identityCopyRow,children:[(0,b.jsxs)(n.default,{style:[O,K.identityCopyText],numberOfLines:1,children:[''!==e.model?e.model:'Unknown model',' \xb7 ']}),(0,b.jsx)(h.CopyableValue,{value:String(e.sensorIndex),description:"sensor index",successMessage:"Sensor index copied",shrinkable:!1,children:(0,b.jsx)(n.default,{style:O,numberOfLines:1,children:`Sensor index: ${String(e.sensorIndex)}`})})]}),''!==u?(0,b.jsx)(h.CopyableValue,{value:u,description:"Device ID",successMessage:"Device ID copied",children:(0,b.jsx)(n.default,{style:[O,K.identityCopyText],numberOfLines:1,children:`Device ID: ${u}`})}):null]})}function W({sensor:e,inverted:t,archived:o=!1}){const s=(0,L.getStatusColor)(e.onlineStatus),c=(0,L.formatVisibility)(e.hidden),S=t?K.chipOnColor:K.chipNeutral,O=t?K.chipTextInverse:K.chipTextBody;return(0,b.jsxs)(l.default,{style:K.chipRow,children:[(0,b.jsxs)(l.default,{style:[K.statusPill,o?K.archivedChip:S],children:[(0,b.jsx)(l.default,{style:[K.statusDot,o?K.archivedStatusDot:{backgroundColor:s}]}),(0,b.jsx)(n.default,{style:[K.statusText,O],children:o?'Archived':''!==e.onlineStatus?e.onlineStatus:'unknown'})]}),(0,b.jsx)(l.default,{style:[K.chip,S],children:(0,b.jsx)(n.default,{style:[K.chipText,O],children:c})})]})}function B(e){const t=e.downgraded,n=e.channelB;return null===n?t?'single':'none':t&&n.downgraded?'both':t?'a-only':n.downgraded?'b-only':'none'}function F(e,t=(0,x.isArchivedSensor)(e)){return t?'archived':(0,L.isSensorOffline)(e.onlineStatus)?'offline':'none'===B(e)?null:'downgrade'}function H(e){switch(e){case'both':return'Both channels on your sensor are downgraded';case'a-only':return"Your sensor's Channel A is downgraded";case'b-only':return"Your sensor's Channel B is downgraded";case'single':return'Your sensor is downgraded';default:throw new Error(`Unhandled DowngradeScope: ${String(e)}`)}}function P({sensor:e}){const t=B(e);if('none'===t)return null;const o=H(t);return(0,b.jsxs)(C.ExternalLink,{href:_,style:Q.notice,accessibilityLabel:`${o}. Opens the sensor maintenance article in a new window.`,children:[(0,b.jsx)(l.default,{style:Q.iconBadge,children:(0,b.jsx)(n.default,{style:Q.iconText,children:"!"})}),(0,b.jsxs)(l.default,{style:Q.body,children:[(0,b.jsx)(n.default,{style:Q.title,children:o}
23),(0,b.jsxs)(n.default,{style:Q.link,children:["Learn how to clean and maintain your sensor",' \u2192']})]})]})}function k({sensor:e}){return(0,L.isSensorOffline)(e.onlineStatus)?(0,b.jsxs)(C.ExternalLink,{href:j,style:J.notice,accessibilityLabel:"Sensor is offline. Opens the Sensor WiFi and Registration guide in a new window.",children:[(0,b.jsx)(l.default,{style:J.iconBadge,children:(0,b.jsx)(n.default,{style:J.iconText,children:"i"})}),(0,b.jsxs)(l.default,{style:J.body,children:[(0,b.jsx)(n.default,{style:J.title,children:"Your sensor is offline"}),(0,b.jsxs)(n.default,{style:J.helpText,children:["Use the",' ',(0,b.jsx)(n.default,{style:J.link,children:"Sensor WiFi and Registration guide"}),' ',"to reconnect it to Wi-Fi."]}),(0,b.jsx)(n.default,{style:J.helpText,children:"Once it reconnects, give it a few minutes to report in. Then refresh this page to see it marked as connected."})]})]}):null}function U(){return(0,b.jsxs)(C.ExternalLink,{href:w,style:ee.notice,accessibilityLabel:"Archived sensor record. Opens the article explaining what it means to archive a PurpleAir sensor.",children:[(0,b.jsx)(l.default,{style:ee.iconBadge,children:(0,b.jsx)(n.default,{style:ee.iconText,children:"i"})}),(0,b.jsxs)(l.default,{style:ee.body,children:[(0,b.jsx)(n.default,{style:ee.title,children:"Archived sensor record"}),(0,b.jsxs)(n.default,{style:ee.helpText,children:["Historical details remain available here.",' ',(0,b.jsx)(n.default,{style:ee.link,children:"Learn what archiving means"}),"."]})]})]})}function z({sensor:e,archived:t=!1}){const n=F(e,t);return'archived'===n?(0,b.jsx)(U,{}):'offline'===n?(0,b.jsx)(k,{sensor:e}):'downgrade'===n?(0,b.jsx)(P,{sensor:e}):null}function X({sensor:e,isHero:t,inverted:o,tileStyle:s="tile"}){const c=null==e.temperature?'\u2014':`${String(Math.round(e.temperature))}\xb0F`,S=null==e.humidity?'\u2014':`${String(Math.round(e.humidity))}%`,O=e.confidencePercent<0?'\u2014':`${String(Math.round(e.confidencePercent))}%`,u='tile'===s?K.telRowTile:K.telRowFlat,f='tile'===s?[K.telItemTile,t?K.telItemTileHero:null]:K.telItemFlat,h=o?K.telLabelInverse:K.telLabelDefault,T=o?K.telValueInverse:K.telValueDefault;return(0,b.jsxs)(l.default,{style:u,children:[(0,b.jsxs)(l.default,{style:f,children:[(0,b.jsx)(n.default,{style:h,children:"Temp"}),(0,b.jsx)(n.default,{style:T,children:c})]}),(0,b.jsxs)(l.default,{style:f,children:[(0,b.jsx)(n.default,{style:h,children:"Humidity"}),(0,b.jsx)(n.default,{style:T,children:S})]}),(0,b.jsxs)(l.default,{style:f,children:[(0,b.jsx)(n.default,{style:h,children:"Wi-Fi"}),(0,b.jsx)(l.default,{style:K.wifiHolder,children:(0,b.jsx)(N.WifiSignal,{rssiQuality:e.rssiQuality,rssiDbm:e.rssi,disconnected:(0,L.isSensorOffline)(e.onlineStatus)})})]}),t&&(0,b.jsxs)(l.default,{style:f,children:[(0,b.jsx)(n.default,{style:h,children:"Confidence"}),(0,b.jsx)(n.default,{style:T,children:O})]})]})}function V({sensor:e,inverted:t,aqiOnColor:o}){const l=e.ownerEmail?.trim()??'',s=[(0,L.formatLocationType)(e.locationType),(0,L.formatCoordinates)(e.lat,e.lon),''!==l?`Owner ${l}`:'',`Last seen ${(0,L.formatMinutesAgo)(e.lastSeenMinutesAgo)}`,null!==e.firmwareVersion&&''!==e.firmwareVersion||null!==e.configuredFirmwareTarget&&''!==e.configuredFirmwareTarget?`Firmware ${(0,L.formatFirmwareWithConfiguredTarget)(e.firmwareVersion,e.configuredFirmwareTarget)}`:''].filter(e=>''!==e);return 0===s.length?null:(0,b.jsx)(n.default,{style:t?[K.metaStrip,{color:o},K.onColorMuted]:[K.metaStrip,K.metaDefault],numberOfLines:2,children:s.join(' \xb7 ')})}function Z({sensor:e,onViewDetail:t,onArchive:s,detailLoading:S,isPending:O,inverted:u}){const f=K.primaryAction,h=K.primaryActionText,C=u?[K.secondaryAction,K.secondaryActionInverse]:K.secondaryAction,I=u?K.secondaryActionTextInverse:K.secondaryActionText,R=u?[K.archiveAction,K.archiveActionInverse]:K.archiveAction,x=u?K.archiveActionTextInverse:K.archiveActionText;return(0,b.jsxs)(l.default,{style:K.actionsStack,children:[(0,b.jsxs)(l.default,{style:K.actionsRow,testID:G,children:[(0,b.jsx)(l.default,{style:K.detailsActionSlot,children:(0,b.jsx)(o.default,{style:C,onPress:()=>{t(e.sensorIndex)},disabled:S||O,children:(0,b.jsx)(n.default,{style:I,children:"Details"})})}),(0,b.jsx)(l.default,{style:K.copyActionSlot,children:(0,b.jsx)(T.CopyButton,{value:(0,y.formatSensorClipboardSummary)(e),accessibilityLabel:"Copy sensor details",successMessage:"All sensor details copied",label:"Copy details",copiedLabel:"Copied",variant:"action",color:u?c.COLORS.TEXT_INVERSE:void 0})}),void 0!==s&&(0,b.jsx)(l.default,{style:K.archiveActionSlot,children:(0,b.jsx)(o.default,{style:[R,O&&K.actionDisabled],onPress:()=>{s(e.sensorIndex,e.label)},disabled:O,accessibilityRole:"button",children:(0,b.jsx)(n.default,{style:x,children:"Archive"})})})]}),(0,b.jsx)(A.SensorMapLink,{sensor:e,style:f,textStyle:h})]})}function Y({sensor:e,size:t,onViewDetail:n,onArchive:o,detailLoa
23ding:s,isPending:c,selection:S,imageSize:O,archived:u=!1}){const f='hero'===t,h=(0,I.pm25ToAqi)(e.pm25),T=(0,I.getAqiOnColor)(h),C=!u&&(0,L.isSensorOffline)(e.onlineStatus);return(0,b.jsxs)(l.default,{style:K.body,children:[(0,b.jsxs)(l.default,{style:f?K.topRowHero:K.topRowGrid,children:[null!=S&&(0,b.jsx)(D.SensorSelectionCheckbox,{sensor:e,selected:S.selected,onToggle:S.onToggle}),(0,b.jsx)(v,{sensor:e,size:O}),(0,b.jsxs)(l.default,{style:K.identityCol,children:[(0,b.jsx)(M,{sensor:e,isHero:f,inverted:!1,aqiOnColor:T}),(0,b.jsx)(W,{sensor:e,inverted:!1,archived:u})]})]}),(0,b.jsx)(R.SensorAqiHeadline,{pm25:e.pm25,size:f?'lg':'sm',offline:C}),(0,b.jsx)(z,{sensor:e,archived:u}),(0,b.jsx)(X,{sensor:e,isHero:f,inverted:!1,tileStyle:"tile"}),(0,b.jsx)(V,{sensor:e,inverted:!1,aqiOnColor:T}),(0,b.jsx)(Z,Object.assign({sensor:e,onViewDetail:n},void 0!==o?{onArchive:o}:{},{detailLoading:s,isPending:c,inverted:!1}))]})}function q(e){const{sensor:t,size:n,onViewDetail:o,onArchive:s,detailLoading:O,isPending:u,selection:f,archived:h=!1}=e,T='hero'===n,C=(0,I.pm25ToAqi)(t.pm25),x=(0,I.getAqiOnColor)(C),y=!h&&(0,L.isSensorOffline)(t.onlineStatus),E=(0,p.getOwnedSensorAqiWashColor)(t.onlineStatus,C),A=h?`linear-gradient(180deg, ${c.COLORS.BG_WASH} 0%, ${c.COLORS.BG_SURFACE} 85%)`:`linear-gradient(180deg, ${E} 0%, ${c.COLORS.BG_SURFACE} 85%)`;return(0,b.jsx)(l.default,{style:[K.card,te.card,h?ne.card:null,!0===f?.selected?K.cardSelected:null,(N=A,{backgroundImage:N}),null,S.ELEVATION.RAISED],children:(0,b.jsxs)(l.default,{style:K.body,children:[(0,b.jsxs)(l.default,{style:T?K.topRowHero:K.topRowGrid,children:[null!=f&&(0,b.jsx)(D.SensorSelectionCheckbox,{sensor:t,selected:f.selected,onToggle:f.onToggle}),(0,b.jsx)(v,{sensor:t,size:T?'lg':'md'}),(0,b.jsxs)(l.default,{style:K.identityCol,children:[(0,b.jsx)(M,{sensor:t,isHero:T,inverted:!1,aqiOnColor:x}),(0,b.jsx)(W,{sensor:t,inverted:!1,archived:h})]})]}),(0,b.jsx)(l.default,{style:[te.floatingPanel,S.ELEVATION.MEDIUM],children:(0,b.jsx)(R.SensorAqiHeadline,{pm25:t.pm25,size:T?'lg':'sm',offline:y})}),(0,b.jsx)(z,{sensor:t,archived:h}),(0,b.jsx)(X,{sensor:t,isHero:T,inverted:!1,tileStyle:"tile"}),(0,b.jsx)(V,{sensor:t,inverted:!1,aqiOnColor:x}),(0,b.jsx)(Z,Object.assign({sensor:t,onViewDetail:o},void 0!==s?{onArchive:s}:{},{detailLoading:O,isPending:u,inverted:!1}))]})});var N}function $(e){const t=(0,I.pm25ToAqi)(e.sensor.pm25),n=(0,p.getOwnedSensorAqiWashColor)(e.sensor.onlineStatus,t),o=(0,p.getOwnedSensorAqiMidColor)(e.sensor.onlineStatus,t),s=e.archived??!1;return(0,b.jsxs)(l.default,{style:ie.wrap,children:[(0,b.jsx)(l.default,{style:[ie.layer,ie.layerBack,{backgroundColor:o}]}),(0,b.jsx)(l.default,{style:[ie.layer,ie.layerMid,{backgroundColor:n}]}),(0,b.jsx)(l.default,{style:[K.card,ie.front,s?ne.card:null,!0===e.selection?.selected?K.cardSelected:null,S.ELEVATION.MEDIUM],children:(0,b.jsx)(Y,Object.assign({},e,{imageSize:"md"}))})]})}const K=(0,s.createStyles)({actionsRow:{flexDirection:'row',flexWrap:'wrap',gap:u.SPACING.XS},actionsStack:{gap:u.SPACING.XS},actionDisabled:{opacity:.6},archiveAction:{alignItems:'center',backgroundColor:c.COLORS.ERROR_BG,borderColor:c.COLORS.ERROR_BORDER,borderRadius:O.RADIUS.MD,borderWidth:1,justifyContent:'center',minHeight:42,paddingHorizontal:u.SPACING.MD,paddingVertical:u.SPACING.SM},archiveActionInverse:{backgroundColor:c.COLORS.OVERLAY_LIGHT_20,borderColor:c.COLORS.OVERLAY_LIGHT_40},archiveActionSlot:{flexBasis:110,flexGrow:1,flexShrink:1,minWidth:100},archiveActionText:{color:c.COLORS.ERROR,fontSize:f.FONT_SIZE.SM,fontWeight:f.FONT_WEIGHT.BOLD},archiveActionTextInverse:{color:c.COLORS.TEXT_INVERSE,fontSize:f.FONT_SIZE.SM,fontWeight:f.FONT_WEIGHT.BOLD},archivedChip:{backgroundColor:c.COLORS.BG_SUBTLE_100,borderColor:c.COLORS.BORDER_DEFAULT,borderWidth:1},archivedStatusDot:{backgroundColor:c.COLORS.TEXT_MUTED},copyActionSlot:{flexBasis:130,flexGrow:1,flexShrink:1,minWidth:120},detailsActionSlot:{flexBasis:120,flexGrow:1,flexShrink:1,minWidth:110},body:{gap:u.SPACING.MD,padding:u.SPACING.MD},card:{backgroundColor:c.COLORS.BG_SURFACE,borderColor:c.COLORS.BORDER,borderRadius:O.RADIUS.LG,borderWidth:1,minWidth:0,overflow:'hidden'},cardSelected:{borderColor:c.COLORS.ACTION_PRIMARY,borderWidth:2},chip:{alignItems:'center',borderRadius:O.RADIUS.FULL,flexDirection:'row',paddingHorizontal:u.SPACING.SM,paddingVertical:u.SPACING.MICRO},chipNeutral:{backgroundColor:c.COLORS.BG_CHIP},chipOnColor:{backgroundColor:c.COLORS.OVERLAY_LIGHT_20},chipRow:{flexDirection:'row',flexWrap:'wrap',gap:u.SPACING.XS,marginTop:u.SPACING.MICRO},chipText:{fontSize:f.FONT_SIZE.MICRO,fontWeight:f.FONT_WEIGHT.BOLD,letterSpacing:.4,textTransform:'uppercase'},chipTextBody:{color:c.COLORS.TEXT_BODY},chipTextInverse:{color:c.COLORS.TEXT_INVERSE},identityCol:{flex:1,gap:u.SPACING.MICRO,minWidth:0},identityCopyRow:{alignItems:'center',flexDirection:'row',gap:u.SPACING.MICRO},identityCopyText:{flexShrink:1},identityTextBlock:{gap:u.SPACING.MICRO},imagePlaceholder:{color:c.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.MICRO,fontWeight:f.FONT_WEIGHT.BOLD,textAlign:'center'},imageWrap:{alignItems:'center',backgroundColor:c.COLORS.BG_WASH,borderColor:c.COLORS.BORDER,borderRadius:O.RADIUS.MD,borderWidth:1,justifyContent:'center'},onColorMuted:{opacity:.75},onColorSecondary:{opacity:.85},labelDefault:{color:c.COLORS.TEXT_HEADING},labelLg:{fontSize:f.FONT_SIZE.XL,fontWeight:f.FONT_WEIGHT.BOLD},labelSm:{fontSize:f.FONT_SIZE.LG,fontWeight:f.FONT_WEIGHT.BOLD},metaDefault:{color:c.COLORS.TEXT_MUTED},metaStrip:{fontSize:f.FONT_SIZE.XS,lineHeight:18},modelDefault:{color:c.COLORS.TEXT_MUTED},modelLg:{fontSize:f.FONT_SIZE.SM},modelSm:{fontSize:f.FONT_SIZE.XS},primaryAction:Object.assign({alignItems:'center',backgroundColor:c.COLORS.ACTION_PRIMARY,borderRadius:O.RADIUS.MD,paddingHorizontal:u.SPACING.MD,paddingVertical:u.SPACING.SM,width:'100%'},{cursor:'pointer'}),primaryActionText:{color:c.COLORS.TEXT_INVERSE,fontSize:f.FONT_SIZE.SM,fontWeight:f.FONT_WEIGHT.BOLD},secondaryAction:Object.assign({alignItems:'center',borderColor:c.COLORS.BORDER,borderRadius:O.RADIUS.MD,borderWidth:1,paddingHorizontal:u.SPACING.MD,paddingVertical:u.SPACING.SM,width:'100%'},{cursor:'pointer'}),secondaryActionInverse:{backgroundColor:c.COLORS.OVERLAY_LIGHT_20,borderColor:c.COLORS.OVERLAY_LIGHT_40},secondaryActionText:{color:c.COLORS.TEXT_BODY,fontSize:f.FONT_SIZE.SM,fontWeight:f.FONT_WEIGHT.SEMIBOLD},secondaryActionTextInverse:{color:c.COLORS.TEXT_INVERSE,fontSize:f.FONT_SIZE.SM,fontWeight:f.FONT_WEIGHT.SEMIBOLD},statusDot:{borderRadius:O.RADIUS.FULL,height:8,width:8},statusPill:{alignItems:'center',backgroundColor:c.COLORS.BG_WASH,borderRadius:O.RADIUS.FULL,flexDirection:'row',gap:u.SPACING.XS,paddingHorizontal:u.SPACING.SM,paddingVertical:u.SPACING.MICRO},statusText:{color:c.COLORS.TEXT_BODY,fontSize:f.FONT_SIZE.MICRO,fontWeight:f.FONT_WEIGHT.BOLD,letterSpacing:.4,textTransform:'uppercase'},telItemFlat:{flex:1,minWidth:0},telItemTile:{backgroundColor:c.COLORS.BG_WASH,borderRadius:O.RADIUS.MD,flexBasis:100,flexGrow:1,flexShrink:1,padding:u.SPACING.SM},telItemTileHero:{flexBasis:140,padding:u.SPACING.MD},telLabelDefault:{color:c.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.MICRO,fontWeight:f.FONT_WEIGHT.BOLD,letterSpacing:.3,textTransform:'uppercase'},telLabelInverse:{color:c.COLORS.TEXT_INVERSE,fontSize:f.FONT_SIZE.MICRO,fontWeight:f.FONT_WEIGHT.BOLD,letterSpacing:.3,opacity:.75,textTransform:'uppercase'},telRowFlat:{flexDirection:'row',gap:u.SPACING.MD},telRowTile:{flexDirection:'row',flexWrap:'wrap',gap:u.SPACING.XS},telValueDefault:{color:c.COLORS.TEXT_HEADING,fontSize:f.FONT_SIZE.MD,fontWeight:f.FONT_WEIGHT.BOLD,marginTop:u.SPACING.MICRO},telValueInverse:{color:c.COLORS.TEXT_INVERSE,fontSize:f.FONT_SIZE.MD,fontWeight:f.FONT_WEIGHT.BOLD,marginTop:u.SPACING.MICRO},topRowGrid:{flexDirection:'row',gap:u.SPACING.MD},topRowHero:{flexDirection:'row',flexWrap:'wrap',gap:u.SPACING.LG},wifiHolder:{marginTop:u.SPACING.MICRO}}),Q=(0,s.createStyles)({body:{flex:1,gap:u.SPACING.MICRO,minWidth:0},iconBadge:{alignItems:'center',backgroundColor:c.COLORS.WARNING_BANNER_BORDER,borderRadius:O.RADIUS.FULL,height:28,justifyContent:'center',width:28},iconText:{color:c.COLORS.WARNING_BANNER_TEXT,fontSize:f.FONT_SIZE.MD,fontWeight:f.FONT_WEIGHT.BOLD},link:{color:c.COLORS.WARNING_BANNER_LINK,fontSize:f.FONT_SIZE.XS,fontWeight:f.FONT_WEIGHT.SEMIBOLD,textDecorationLine:'underline'},notice:{alignItems:'center',backgroundColor:c.COLORS.WARNING_BANNER_BG,borderColor:c.COLORS.WARNING_BANNER_BORDER,borderRadius:O.RADIUS.MD,borderWidth:1,flexDirection:'row',gap:u.SPACING.SM,padding:u.SPACING.SM},title:{color:c.COLORS.WARNING_BANNER_TEXT,fontSize:f.FONT_SIZE.SM,fontWeight:f.FONT_WEIGHT.BOLD}}),J=(0,s.createStyles)({body:{flex:1,gap:u.SPACING.MICRO,minWidth:0},helpText:{color:c.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.XS,lineHeight:17},iconBadge:{alignItems:'center',backgroundColor:c.COLORS.BG_SUBTLE_100,borderColor:c.COLORS.BORDER_DEFAULT,borderRadius:O.RADIUS.FULL,borderWidth:1,height:28,justifyContent:'center',width:28},iconText:{color:c.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.SM,fontWeight:f.FONT_WEIGHT.BOLD},link:{color:c.COLORS.BRAND_PRIMARY,fontSize:f.FONT_SIZE.XS,fontWeight:f.FONT_WEIGHT.SEMIBOLD,textDecorationLine:'underline'},notice:{alignItems:'flex-start',backgroundColor:c.COLORS.BG_WASH,borderColor:c.COLORS.BORDER_DEFAULT,borderRadius:O.RADIUS.MD,borderWidth:1,flexDirection:'row',gap:u.SPACING.SM,padding:u.SPACING.SM},title:{color:c.COLORS.TEXT_BODY,fontSize:f.FONT_SIZE.SM,fontWeight:f.FONT_WEIGHT.BOLD}}),ee=(0,s.createStyles)({body:{flex:1,gap:u.SPACING.MICRO,minWidth:0},helpText:{color:c.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.XS,lineHeight:17},iconBadge:{alignItems:'center',backgroundColor:c.COLORS.BG_SUBTLE_100,borderColor:c.COLORS.BORDER_DEFAULT,borderRadius:O.RADIUS.FULL,borderWidth:1,height:28,justifyContent:'center',width:28},iconText:{color:c.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.SM,fontWeight:f.FONT_WEIGHT.BOLD},link:{color:c.COLORS.BRAND_PRIMARY,fontSize:f.FONT_SIZE.XS,fontWeight:f.FONT_WEIGHT.SEMIBOLD,textDecorationLine:'underline'},notice:{alignItems:'flex-start',backgroundColor:c.COLORS.BG_WASH,borderColor:c.COLORS.BORDER_DEFAULT,borderRadius:O.RADIUS.MD,borderWidth:1,flexDirection:'row',gap:u.SPACING.SM,padding:u.SPACING.SM},title:{color:c.COLORS.TEXT_BODY,fontSize:f.FONT_SIZE.SM,fontWeight:f.FONT_WEIGHT.BOLD}}),te=(0,s.createStyles)({card:{borderColor:c.COLORS.BORDER_FAINT},floatingPanel:{borderRadius:O.RADIUS.LG,overflow:'hidden'}}),ne=(0,s.createStyles)({card:{borderColor:c.COLORS.BORDER_DEFAULT}}),ie=(0,s.createStyles)({front:{position:'relative',zIndex:3},layer:{borderRadius:O.RADIUS.LG,bottom:0,position:'absolute',right:0},layerBack:{left:14,top:14,zIndex:1},layerMid:{left:7,top:7,zIndex:2},wrap:{flex:1,marginBottom:14,marginRight:14,minWidth:0,position:'relative'}})},1252,[34,328,95,222,488,276,489,490,504,491,494,495,1253,1265,523,1236,1241,1266,1267,1242,1239,1268,1138,1269,1270,104]); 24__d(function(g,r,i,a,m,_e,d){"use strict";
24function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"COPYABLE_VALUE_ICON_TEST_ID",{enumerable:!0,get:function(){return p}}),Object.defineProperty(_e,"COPYABLE_VALUE_ICON_SLOT_TEST_ID",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"COPYABLE_VALUE_HOVER_TARGET_TEST_ID",{enumerable:!0,get:function(){return _}}),_e.CopyableValue=function({value:e,description:s,successMessage:c,shrinkable:x=!0,children:O}){const{copy:T}=(0,o.useClipboardCopy)({value:e,successMessage:c}),{hovered:j,webHoverProps:C}=(0,l.useWebHover)(),E=void 0!==C.onMouseEnter;return(0,f.jsx)(u.HoverTooltip,{text:`Click to copy ${s}`,children:(0,f.jsx)(n.default,Object.assign({style:x?S.hoverTarget:S.hoverTargetFixed,testID:_},C,{children:(0,f.jsxs)(t.default,{accessibilityRole:"button",accessibilityLabel:`Copy ${s}`,onPress:T,style:[x?S.pressable:S.pressableFixed,E&&v],children:[O,E?(0,f.jsx)(n.default,{style:S.iconSlot,testID:y,children:j?(0,f.jsx)(b.CopyIcon,{size:h,testID:p}):null}):null]})}))})};var t=e(r(d[0])),n=e(r(d[1])),s=r(d[2]),o=r(d[3]),l=r(d[4]),c=r(d[5]),u=r(d[6]),b=r(d[7]),f=r(d[8]);const p='copyable-value-icon',y='copyable-value-icon-slot',_='copyable-value-hover-target',h=14;const v={cursor:'pointer',userSelect:'text'},x={alignItems:'center',flexDirection:'row'},S=(0,c.createStyles)({hoverTarget:{flexShrink:1},hoverTargetFixed:{flexShrink:0},pressable:Object.assign({},x,{flexShrink:1}),pressableFixed:Object.assign({},x,{flexShrink:0}),iconSlot:{alignItems:'center',flexShrink:0,justifyContent:'center',marginLeft:s.SPACING.XS,width:h}})},1253,[488,276,494,1254,614,489,699,1264,104]); 25__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"COPY_FEEDBACK_DURATION_MS",{enumerable:!0,get:function(){return n}}),e.useClipboardCopy=function({value:p,successMessage:b}){const y=(0,c.useToast)(),[C,f]=(0,t.useState)(!1),T=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{null!==T.current&&clearTimeout(T.current)},[]);const _=(0,t.useCallback)(()=>{f(!0),null!==T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{T.current=null,f(!1)},n)},[]),v=(0,t.useCallback)(async()=>{try{await(0,u.writeTextToClipboard)(p)}catch(t){return l.logger.warn('Clipboard write failed',t),void y.error(s,{id:o})}_(),y.success(b,{id:o})},[_,b,y,p]),w=(0,t.useCallback)(()=>{''!==p.trim()&&v()},[v,p]);return{copied:C,copy:w}};var t=r(d[0]),c=r(d[1]),u=r(d[2]),l=r(d[3]);const n=2e3,o='clipboard-copy',s="Couldn't copy to the clipboard. Select the text and copy it manually."},1254,[34,497,1255,469]); 26__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.writeTextToClipboard=async function(t){if(!await e.setStringAsync(t))throw new Error('The system clipboard rejected the write.')};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0]))},1255,[1256]); 27__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getStringAsync=async function(t={}){if(!c.default.getStringAsync)throw new n.UnavailabilityError('Clipboard','getStringAsync');return await c.default.getStringAsync(t)},_e.setStringAsync=async function(t,e={}){if(!c.default.setStringAsync)throw new n.UnavailabilityError('Clipboard','setStringAsync');return c.default.setStringAsync(t,e)},_e.setString=function(t){return c.default.setString(t)},_e.hasStringAsync=function(){if(!c.default.hasStringAsync)throw new n.UnavailabilityError('Clipboard','hasStringAsync');return c.default.hasStringAsync()},_e.getUrlAsync=async function(){if(!c.default.getUrlAsync)throw new n.UnavailabilityError('Clipboard','getUrlAsync');return await c.default.getUrlAsync()},_e.setUrlAsync=async function(t){if(!c.default.setUrlAsync)throw new n.UnavailabilityError('Clipboard','setUrlAsync');return c.default.setUrlAsync(t)},_e.hasUrlAsync=async function(){if(!c.default.hasUrlAsync)throw new n.UnavailabilityError('Clipboard','hasUrlAsync');return await c.default.hasUrlAsync()},_e.getImageAsync=async function(t){if(!c.default.getImageAsync)throw new n.UnavailabilityError('Clipboard','getImageAsync');return await c.default.getImageAsync(t)},_e.setImageAsync=async function(t){if(!c.default.setImageAsync)throw new n.UnavailabilityError('Clipboard','setImageAsync');return c.default.setImageAsync(t)},_e.hasImageAsync=async function(){if(!c.default.hasImageAsync)throw new n.UnavailabilityError('Clipboard','hasImageAsync');return c.default.hasImageAsync()},_e.addClipboardListener=function(t){return c.default.addListener(o,n=>{const e=Object.assign({},n,{get content(){return console.warn("The 'content' property of the clipboard event is deprecated. Use 'getStringAsync()' instead to get clipboard content"),''}});t(e)})},_e.removeClipboardListener=function(t){t.remove()},Object.defineProperty(_e,"isPasteButtonAvailable",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"ClipboardPasteButton",{enumerable:!0,get:function(){return e.ClipboardPasteButton}});var t,n=r(d[0]),e=r(d[1]),s=r(d[2]),c=(t=s)&&t.__esModule?t:{default:t},l=r(d[3]);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]}})});const o='onClipboardChanged';const u=!1},1256,[948,1257,1259,1263]); 28__d(function(g,r,i,a,m,_e,d){"use strict";const e=["onPress"];
28function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ClipboardPasteButton=function(t){let{onPress:o}=t,l=(0,n.default)(t,e);if(!s.default)return null;return(0,u.jsx)(s.default,Object.assign({onPastePressed:({nativeEvent:e})=>{o(e)}},l))};var n=t(r(d[0]));r(d[1]);var s=t(r(d[2])),u=r(d[3])},1257,[109,34,1258,104]); 29__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 t}});r(d[0]);r(d[1]);var t=void 0},1258,[948,95]); 30__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 u.default}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e}},1259,[1260]); 31__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}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),c={async getStringAsync(c){if(!navigator.clipboard)throw new t.ClipboardUnavailableException;try{if(c.preferredFormat===o.StringFormat.HTML){const t=await navigator.clipboard.read(),o=await(0,n.findHtmlInClipboardAsync)(t);return o?await new Response(o).text():await navigator.clipboard.readText()}{let t=await navigator.clipboard.readText();if(!t||''===t){const o=await navigator.clipboard.read(),c=await(0,n.findHtmlInClipboardAsync)(o),l=await(c?.text());t=(0,n.htmlToPlainText)(l??'')}return t}}catch(o){if('object'==typeof o&&'NotAllowedError'===o?.name||await(0,n.isClipboardPermissionDeniedAsync)())throw new t.NoPermissionException;try{return window.clipboardData.getData('Text')}catch{return Promise.reject(new Error('Unable to retrieve item from clipboard'))}}},setString(t){const n=document.createElement('textarea');n.textContent=t,document.body.appendChild(n),n.select();try{return document.execCommand('copy'),!0}catch{return!1}finally{document.body.removeChild(n)}},async setStringAsync(c,l){if(l.inputFormat===o.StringFormat.HTML){if(!navigator.clipboard)throw new t.ClipboardUnavailableException;try{const t=(s=c,new ClipboardItem({'text/html':new Blob([s],{type:'text/html'}),'text/plain':new Blob([(0,n.htmlToPlainText)(s)],{type:'text/plain'})}));return await navigator.clipboard.write([t]),!0}catch(o){if('object'==typeof o&&'NotAllowedError'===o?.name||await(0,n.isClipboardPermissionDeniedAsync)())throw new t.NoPermissionException;throw new t.CopyFailureException(o.message)}}try{if(!navigator.clipboard)throw new Error;return await navigator.clipboard.writeText(c),!0}catch{return this.setString(c)}var s},hasStringAsync:async()=>await l(['text/plain','text/html']),async getImageAsync(o){if(!navigator.clipboard)throw new t.ClipboardUnavailableException;try{const t=await navigator.clipboard.read(),o=await(0,n.findImageInClipboardAsync)(t);if(!o)return null;const[c,l]=await Promise.all([(0,n.blobToBase64Async)(o),(0,n.getImageSizeFromBlobAsync)(o)]);return{data:c,size:l}}catch(o){if('object'==typeof o&&'NotAllowedError'===o?.name||await(0,n.isClipboardPermissionDeniedAsync)())throw new t.NoPermissionException;throw new t.PasteFailureException(o.message)}},async setImageAsync(o){if(!navigator.clipboard)throw new t.ClipboardUnavailableException;try{const t=(0,n.base64toBlob)(o,'image/png');await navigator.clipboard.write([new ClipboardItem({[t.type]:t})])}catch(n){throw new t.CopyFailureException(n.message)}},hasImageAsync:async()=>await l(['image/png','image/jpeg']),addClipboardListener(){},removeClipboardListener(){}};async function l(o){if(!navigator.clipboard)throw new t.ClipboardUnavailableException;try{return(await navigator.clipboard.read()).flatMap(t=>t.types).some(t=>o.includes(t))}catch(o){if('object'==typeof o&&'NotAllowedError'===o?.name||await(0,n.isClipboardPermissionDeniedAsync)())throw new t.NoPermissionException;throw o}}},1260,[1261,1262,1263]); 32__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ClipboardUnavailableException",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"CopyFailureException",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"PasteFailureException",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"NoPermissionException",{enumerable:!0,get:function(){return c}});var o=r(d[0]);class t extends o.CodedError{constructor(){super('ERR_CLIPBOARD_UNAVAILABLE',"The 'AsyncCl
32ipboard' API is not available on this browser")}}class n extends o.CodedError{constructor(o){super('ERR_COPY_FAILURE',`Failed to copy to clipboard: ${o}`)}}class s extends o.CodedError{constructor(o){super('ERR_COPY_FAILURE',`Failed to paste from clipboard: ${o}`)}}class c extends o.CodedError{constructor(){super('ERR_NO_PERMISSION','User denied permission to access clipboard')}}},1261,[948]); 33__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.base64toBlob=function(n,t){t=t||'';const o=1024,i=atob(n),s=i.length,c=Math.ceil(s/o),l=new Array(c);for(let n=0;n<c;++n){const t=n*o,c=Math.min(t+o,s),u=new Array(c-t);for(let n=t,o=0;n<c;++o,++n)u[o]=i[n].charCodeAt(0);l[n]=new Uint8Array(u)}return new Blob(l,{type:t})},e.blobToBase64Async=function(n){return new Promise((t,o)=>{const i=new FileReader;i.onloadend=()=>t(i.result),i.readAsDataURL(n)})},e.htmlToPlainText=function(n){const t=document.createElement('div');return t.innerHTML=n,t.textContent||t.innerText||''},e.getImageSizeFromBlobAsync=function(n){return new Promise((t,o)=>{const i=URL.createObjectURL(n),s=document.createElement('img');s.src=i,s.onload=function(){t({width:s.width,height:s.height})}})},e.findImageInClipboardAsync=async function(n){for(const t of n){if(t.types.some(n=>'image/png'===n))return await t.getType('image/png');if(t.types.some(n=>'image/jpeg'===n))return await t.getType('image/jpeg')}return null},e.findHtmlInClipboardAsync=async function(n){for(const t of n)if(t.types.some(n=>'text/html'===n))return await t.getType('text/html');return null},e.isClipboardPermissionDeniedAsync=async function(){return'denied'===(await navigator.permissions.query({name:'clipboard-read'})).state}},1262,[]); 34__d(function(g,r,i,a,m,e,d){"use strict";var t,n;Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ContentType",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"StringFormat",{enumerable:!0,get:function(){return n}}),(function(t){t.PLAIN_TEXT="plain-text",t.HTML="html",t.IMAGE="image",t.URL="url"})(t||(t={})),(function(t){t.PLAIN_TEXT="plainText",t.HTML="html"})(n||(n={}))},1263,[]); 35__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.CopyIcon=function(e){const{size:t=l.ICON_VIEWBOX_SIZE,color:o,testID:I}=e,f=o??n.COLORS.ACTION_PRIMARY,C=t/l.ICON_VIEWBOX_SIZE;return(0,u.jsxs)(s.default,{accessibilityElementsHidden:!0,style:S(t),testID:I,children:[(0,u.jsx)(s.default,{style:(0,l.strokeSegmentStyle)(y,_,t,f,c)}),(0,u.jsx)(s.default,{style:(0,l.strokeSegmentStyle)(_,h,t,f,c)}),(0,u.jsx)(s.default,{style:O(C,f)})]})},r(d[0]);var e,t=r(d[1]),s=(e=t)&&e.__esModule?e:{default:e},n=r(d[2]),o=r(d[3]),l=r(d[4]),u=r(d[5]);const c=2,I=8,f=13,_=[3.5,3.5],y=[3.5,15],h=[15,3.5];function S(e){return{alignItems:'center',height:e,justifyContent:'center',width:e}}function O(e,t){return{borderColor:t,borderRadius:o.RADIUS.SM,borderWidth:Math.max(1,c*e),height:f*e,left:I*e,position:'absolute',top:I*e,width:f*e}}},1264,[34,276,490,491,1288,104]); 36__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"COPY_FEEDBACK_DURATION_MS",{enumerable:!0,get:function(){return C.COPY_FEEDBACK_DURATION_MS}}),Object.defineProperty(_e,"COPY_ICON_TEST_ID",{enumerable:!0,get:function(){return f}}),Object.defineProperty(_e,"COPY_CHECK_TEST_ID",{enumerable:!0,get:function(){return y}}),_e.CopyButton=function({value:e,accessibilityLabel:l,successMessage:s,label:u="Copy",copiedLabel:O="Copied",variant:A="inline",color:R}){const{copied:D,copy:E}=(0,C.useClipboardCopy)({value:e,successMessage:s}),P='action'===A;return(0,b.jsxs)(n.default,{accessibilityRole:"button",accessibilityLabel:l,onPress:E,style:P?p.controlAction:p.controlInline,children:[(0,b.jsx)(o.default,{style:p.iconSlot,children:D?(0,b.jsx)(I.CheckIcon,{size:S,color:R??c.COLORS.GREEN_500,testID:y}):(0,b.jsx)(_.CopyIcon,{size:S,color:R??c.COLORS.ACTION_PRIMARY,testID:f})}),P?(0,b.jsx)(t.default,{numberOfLines:1,style:[p.captionAction,void 0!==R&&{color:R}],children:D?O:u}):null]})};var t=e(r(d[0])),n=e(r(d[1])),o=e(r(d[2])),c=r(d[3]),l=r(d[4]),s=r(
36d[5]),u=r(d[6]),C=r(d[7]),O=r(d[8]),I=r(d[9]),_=r(d[10]),b=r(d[11]);const f='copy-button-icon',y='copy-button-check',S=16;const p=(0,O.createStyles)({captionAction:{color:c.COLORS.ACTION_PRIMARY,fontSize:u.FONT_SIZE.SM,fontWeight:u.FONT_WEIGHT.SEMIBOLD},controlAction:{alignItems:'center',borderColor:c.COLORS.BORDER_DEFAULT,borderRadius:l.RADIUS.MD,borderWidth:1,flexDirection:'row',gap:s.SPACING.XS,justifyContent:'center',minHeight:32,paddingHorizontal:s.SPACING.MD,paddingVertical:s.SPACING.XS},controlInline:{alignItems:'center',justifyContent:'center',minHeight:24,minWidth:24},iconSlot:{alignItems:'center',justifyContent:'center'}})},1265,[222,488,276,490,491,494,495,1254,489,1229,1264,104]); 37__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isArchivedSensorMac=n,e.isArchivedSensor=function(t){if(!0===t.archived)return!0;return n(t.mac)};const t=/_old(?:_\d+)?$/iu;function n(n){return'string'==typeof n&&t.test(n)}},1266,[]); 38__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.formatSensorClipboardSummary=function(l){const t=[{label:'Name',value:(0,u.resolveSensorDisplayName)(l.label,l.sensorIndex)},{label:'Sensor index',value:String(l.sensorIndex)}],f=l.mac?.trim()??'';''!==f&&t.push({label:'Device ID',value:f});const v=l.model.trim();''!==v&&t.push({label:'Model',value:v});!0===l.archived&&t.push({label:'Archived',value:'Yes'});const b=(0,o.pm25ToAqi)(l.pm25);null!==b&&t.push({label:'Channel A US EPA PM2.5 AQI',value:String(b)});const h=(0,o.pm25ToAqi)(l.channelB?.pm25);null!==h&&t.push({label:'Channel B US EPA PM2.5 AQI',value:String(h)});l.confidencePercent>=0&&t.push({label:'Confidence',value:`${String(l.confidencePercent)}%`});const S=p(l.lastSeen,l.lastSeenMinutesAgo);null!==S&&t.push({label:'Last seen',value:S});null!=l.uptimeMinutes&&t.push({label:(0,u.getUptimeLabel)(l.onlineStatus),value:(0,u.formatDurationMinutes)(l.uptimeMinutes)});const M=p(l.lastModified,l.lastModifiedMinutesAgo);null!==M&&t.push({label:'Last modified',value:M});const A=l.firmwareVersion?.trim()??'',T=l.configuredFirmwareTarget?.trim()??'';''===A&&''===T||t.push({label:'Firmware',value:(0,u.formatFirmwareWithConfiguredTarget)(l.firmwareVersion,l.configuredFirmwareTarget)});const y=(0,u.formatLocationType)(l.locationType);''!==y&&t.push({label:'Location type',value:y});void 0!==l.hidden&&t.push({label:'Visibility',value:(0,u.formatVisibility)(l.hidden)});const C=(0,n.toCoord)(l.lat,l.lon);null!==C&&t.push({label:'Coordinates',value:(0,n.formatCoord)(C,s)});return t.map(c).join('\n')};var l=r(d[0]),n=r(d[1]),t=r(d[2]),o=r(d[3]),u=r(d[4]);const s=6;function c(l){return`${l.label}: ${(0,t.collapseToSingleLine)(l.value)}`}function p(n,t){const o=(0,l.formatIsoDateTime)(n,''),s=null==t?'':(0,u.formatMinutesAgo)(t);return''===o?''===s?null:s:''===s?o:`${o} (${s})`}},1267,[698,1117,1240,1236,1239]); 39__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.sensorImageUrl=function(t,s=100){if(null==t||!n.has(t))return null;return`https://static.purpleair.com/images/sensors/${t}/${s}x${s}.png`};const n=new Set(['PA-I','PA-I-TOUCH','PA-II','PA-II-FLEX','PA-II-SD','PA-II-ZEN'])},1268,[]); 40__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.SensorSelectionCheckbox=function({sensor:t,selected:c,onToggle:l}){return(0,s.jsx)(n.SelectionCheckbox,{checked:c,accessibilityLabel:`Select ${o(t)} (sensor ${String(t.sensorIndex)})`,onPress:()=>{l(t)}})},r(d[0]);var n=r(d[1]),s=r(d[2]);function o(n){const s=n.label?.trim();return null!=s&&''!==s?s:`Sensor ${String(n.sensorIndex)}`}},1269,[34,1233,104]); 41__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.WifiSignal=function({rssiQuality:e,rssiDbm:n,disconnected:c=!1}){if(c)return(0,u.jsx)(t.default,{style:S.row,accessibilityLabel:"Wi-Fi: not connected",children:(0,u.jsx)(l.default,{style:S.disconnectedLabel,children:"Not connected"})});const{filled:o,label:f}=b(e),E=null==n?'':` ${String(n)} dBm`,_=0===o?s.COLORS.TEXT_PLACEHOLDER:s.COLORS.BRAND_PRIMARY;return(0,u.jsxs)(t.default,{style:S.row,children:[(0,u.jsx)(t.default,{style:S.bars,accessibilityLabel:`Wi-Fi: ${f}${E}`,children:O.map((e,l)=>{const n=l<o;return(0,u.jsx)(t.default,{style:[S.bar,{height:e,backgroundColor:n?_:s.COLORS.BORDER}]},`bar-${String(l)}`)})}),(0,u.jsx)(l.default,{style:S.label,children:f})]})},r(d[0]);var l=e(r(d[1])),t=e(r(d[2])),n=r(d[3]),s=r(d[4]),c=r(d[5]),o=r(d[6]),f=r(d[7
41]),u=r(d[8]);function b(e){switch(e){case'excellent':return{filled:4,label:'Excellent'};case'good':return{filled:3,label:'Good'};case'fair':return{filled:2,label:'Fair'};case'weak':return{filled:1,label:'Weak'};case'very weak':return{filled:0,label:'Very weak'};case'no signal':return{filled:0,label:'No signal'};default:return{filled:0,label:'Unknown'}}}const O=[4,7,10,13];const S=(0,n.createStyles)({bar:{borderRadius:c.RADIUS.NONE,width:3},bars:{alignItems:'flex-end',flexDirection:'row',gap:2,height:14},label:{color:s.COLORS.TEXT_BODY,fontSize:f.FONT_SIZE.XS,fontWeight:f.FONT_WEIGHT.SEMIBOLD},disconnectedLabel:{color:s.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.XS,fontWeight:f.FONT_WEIGHT.BOLD},row:{alignItems:'center',flexDirection:'row',gap:o.SPACING.XS}})},1270,[34,222,276,489,490,491,494,495,104]); 42__d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ResultLayoutToggle=function({layout:t,onChange:n,testID:s}){return(0,O.jsx)(l.default,Object.assign({style:f.toggle},null!=s?{testID:s}:{},{children:S.map(l=>{const s=t===l;return(0,O.jsx)(o.default,{style:[f.button,s&&f.buttonActive],onPress:()=>{n(l)},accessibilityRole:"button",accessibilityState:{selected:s},accessibilityLabel:'cards'===l?'Card view':'Table view',children:(0,O.jsx)(e.default,{style:[f.text,s&&f.textActive],children:T[l]})},l)})}))},r(d[0]);var e=t(r(d[1])),o=t(r(d[2])),l=t(r(d[3])),n=r(d[4]),s=r(d[5]),c=r(d[6]),u=r(d[7]),b=r(d[8]),O=r(d[9]);const S=['cards','table'],T={cards:'Cards',table:'Table'};const f=(0,n.createStyles)({button:{paddingHorizontal:u.SPACING.LG,paddingVertical:u.SPACING.SM},buttonActive:{backgroundColor:s.COLORS.ACTION_PRIMARY},text:{color:s.COLORS.TEXT_BODY,fontSize:b.FONT_SIZE.SM,fontWeight:b.FONT_WEIGHT.MEDIUM},textActive:{color:s.COLORS.TEXT_INVERSE,fontWeight:b.FONT_WEIGHT.SEMIBOLD},toggle:{borderColor:s.COLORS.BORDER_DEFAULT,borderRadius:c.RADIUS.MD,borderWidth:1,flexDirection:'row',overflow:'hidden'}})},1271,[34,222,488,276,489,490,491,494,495,104]); 43__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.SensorHeroCard=function({sensor:t,onViewDetail:o,detailLoading:s,isPending:l,treatment:c,selection:u,archived:v=!1}){return(0,n.renderCardTreatment)(c,Object.assign({sensor:t,size:'hero',onViewDetail:o,detailLoading:s,isPending:l},null!=u?{selection:u}:{},{archived:v}))};var n=r(d[0])},1272,[1252]); 44__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SensorSelectionModeControl=function({availableSensorCount:e,visible:n,onShow:l,onHide:o}){if(0===e)return null;return(0,y.jsx)(s.default,{accessibilityRole:"button",accessibilityLabel:n?'Finish selecting sensors':'Select sensors',onPress:n?o:l,style:x.modeButton,children:(0,y.jsx)(t.default,{style:x.modeButtonText,children:n?'Done':'Select'})})},_e.SensorSelectionActions=function({availableSensors:e,selectedSensors:c,onSelectAll:u,onDeselectAll:S,onClear:h,showBulkSelector:b,testID:C}){if(0===e.length||!b&&0===c.length)return null;const I=(0,f.buildExternalMultiSensorMapPath)(c),O=(0,f.buildExternalMultiSensorMapPath)(c,'selected-with-all'),T=p(I),M=new Set(c.map(e=>e.sensorIndex)),w=e.reduce((e,t)=>e+(M.has(t.sensorIndex)?1:0),0),B=e.length>0&&w===e.length,_=!!B||w>0&&'mixed',D=`${String(e.length)} sensor card${1===e.length?'':'s'}`;return(0,y.jsxs)(n.default,{style:x.controls,testID:C,children:[b&&(0,y.jsx)(o.SelectionCheckbox,{checked:_,accessibilityLabel:B?`Clear selection for all ${D}`:`Select all ${D}`,onPress:()=>{B?S(e):u(e)},visibleLabel:B?'All sensor cards selected':'Select all sensor cards'}),c.length>0&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(t.default,{style:x.count,children:[c.length," selected"]}),'ready'===I.status&&null===T&&(0,y.jsx)(l.ActionMenuButton,{label:"View on map",accessibilityLabel:`Choose how to view ${String(I.sensorCount)} selected sensor${1===I.sensorCount?'':'s'} on map`,items:[{id:'selected-only',label:'View selected only',accessibilityLabel:`View ${String(I.sensorCount)} selected sensor${1===I.sensorCount?'':'s'} only on map`,service:'mapBaseUrl',path:I.path}
44,...'ready'===O.status?[{id:'selected-with-all',label:'View selected with all sensors',accessibilityLabel:`View ${String(O.sensorCount)} selected sensor${1===O.sensorCount?'':'s'} with all sensors on map`,service:'mapBaseUrl',path:O.path}]:[]]}),(0,y.jsx)(s.default,{accessibilityRole:"button",accessibilityLabel:"Clear selected sensors",onPress:h,style:x.textButton,children:(0,y.jsx)(t.default,{style:x.textButtonText,children:"Clear"})})]}),null!==T&&(0,y.jsx)(t.default,{style:x.message,children:T})]})},r(d[0]);var t=e(r(d[1])),s=e(r(d[2])),n=e(r(d[3])),l=r(d[4]),o=r(d[5]),c=r(d[6]),u=r(d[7]),S=r(d[8]),h=r(d[9]),b=r(d[10]),f=r(d[11]),y=r(d[12]);function p(e){switch(e.status){case'ready':case'empty':return null;case'too-many-sensors':return'Map supports up to 100 selected sensors.';case'path-too-long':return'Select fewer sensors to view them on the map.';case'invalid-private-read-key':return'A selected private sensor has no usable map read key.';case'invalid-sensor':return'A selected sensor has an invalid map identity.';default:return e}}const x=(0,c.createStyles)({controls:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.SM,justifyContent:'flex-end',marginBottom:h.SPACING.LG},count:{color:u.COLORS.TEXT_MUTED,fontSize:b.FONT_SIZE.SM},message:{color:u.COLORS.TEXT_MUTED,fontSize:b.FONT_SIZE.XS},modeButton:{alignItems:'center',borderColor:u.COLORS.BORDER_DEFAULT,borderRadius:S.RADIUS.MD,borderWidth:1,justifyContent:'center',minHeight:32,paddingHorizontal:h.SPACING.MD},modeButtonText:{color:u.COLORS.TEXT_BODY,fontSize:b.FONT_SIZE.SM,fontWeight:b.FONT_WEIGHT.SEMIBOLD},textButton:{alignItems:'center',justifyContent:'center',minHeight:32,paddingHorizontal:h.SPACING.XS},textButtonText:{color:u.COLORS.BRAND_PRIMARY_DARK,fontSize:b.FONT_SIZE.SM,fontWeight:b.FONT_WEIGHT.SEMIBOLD}})},1273,[34,222,488,276,1274,1233,489,490,491,494,495,1139,104]); 45__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ActionMenuButton=function({label:e,accessibilityLabel:s,items:c,testID:u="action-menu-trigger"}){const[h,b]=(0,t.useState)(!1),[O,L]=(0,t.useState)(null),A=(0,t.useRef)(null),E=(0,f.useAnchoredOverlayTrigger)(h,'menu');if(0===c.length)return null;const P=()=>{b(!1),L(null)};return(0,C.jsxs)(o.default,{children:[(0,C.jsxs)(l.default,Object.assign({ref:A},E.triggerProps,{accessibilityRole:"button",accessibilityLabel:s,hitSlop:6,onPress:()=>{h?P():b(!0)},style:({pressed:e})=>[I.trigger,e&&I.triggerPressed],testID:u,children:[(0,C.jsx)(n.default,{style:I.triggerLabel,testID:"action-menu-label",children:e}),(0,C.jsx)(o.default,{style:I.chevronFrame,children:(0,C.jsx)(o.default,{style:I.chevron,testID:"action-menu-chevron"})})]})),(0,C.jsx)(S.AnchoredOverlay,{visible:h,anchorRef:A,trigger:E,placement:y,onRequestClose:P,accessibilityLabel:e,dismissAccessibilityLabel:"Close options menu",surfaceStyle:I.menu,children:c.map(e=>null==e.service?(0,C.jsx)(l.default,{accessibilityRole:"menuitem",accessibilityLabel:e.accessibilityLabel??e.label,onPointerEnter:()=>{L(e.id)},onPointerLeave:()=>{L(null)},onPress:()=>{P(),e.onSelect()},style:({pressed:t})=>[I.item,(t||O===e.id)&&I.itemHighlighted],children:(0,C.jsx)(n.default,{style:I.itemText,children:e.label})},e.id):(0,C.jsx)(o.default,{onPointerEnter:()=>{L(e.id)},onPointerLeave:()=>{L(null)},style:O===e.id&&I.itemHighlighted,children:(0,C.jsx)(R.ServiceExternalLink,{service:e.service,path:e.path,accessibilityLabel:e.accessibilityLabel??e.label,accessibilityRole:"menuitem",onPress:P,style:I.item,textStyle:I.itemText,children:e.label})},e.id))})]})};var t=r(d[0]),l=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3])),s=r(d[4]),c=r(d[5]),u=r(d[6]),h=r(d[7]),b=r(d[8]),O=r(d[9]),R=r(d[10]),S=r(d[11]),f=r(d[12]),C=r(d[13]);const y={preferredWidth:240,anchorGap:0};const I=(0,O.createStyles)({chevron:{borderBottomColor:s.COLORS.ACTION_PRIMARY,borderBottomWidth:2,borderRightColor:s.COLORS.ACTION_PRIMARY,borderRightWidth:2,height:7,transform:[{rotate:'45deg'}],width:7},chevronFrame:{alignItems:'center',height:16,justifyContent:'center',width:16},item:{justifyContent:'center',minHeight:36,paddingHorizontal:h.SPACING.MD,paddingVertical:h.SPACING.XS},itemHighlighted:{backgroundColor:s.COLORS.BRAND_BG_HOVER},itemText:{color:s.COLORS.TEXT_BODY,fontSize:b.FONT_SIZE.SM,fontWeight:b.FONT_WEIGHT.MEDIUM},menu:Object.assign({backgroundColor:s.COLORS.BG_SURFACE,borderColor:s.COLORS.BORDER_DEFAULT,borderRadius:u.RADIUS.MD,borderWidth:1,overflow:'hidden',paddingVertical:0},c.ELEVATION.MEDIUM),trigger:{alignItems:'center',backgroundColor:s.COLORS.TRANSPARENT,borderRadius:u.RADIUS.MD,borderWidth:0,flexDirection:'row',gap:h.SPACING.XS,justifyContent:'center',minHeight:32,paddingHorizontal:h.SPACING.SM},triggerLabel:{color:s.COLORS.ACTION_PRIMARY,fontSize:b.FONT_SIZE.SM,fontWeight:b.FONT_WEIGHT.MEDIUM},triggerPressed:{backgroundColor:s.COLORS.BLUE_50}})},1274,[34,369,222,276,490,504,491,494,495,489,527,728,738,104]); 46__d(function(g,r,i,a,m,_e,d){"use strict";
46function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SensorTable=function({sensors:e,columns:u,columnVisibilityStorageKey:S,columnVisibility:h,onExport:I,filterPlaceholder:b="Filter results",emptyMessage:y="No sensors match the current filter.",selection:E,testID:R}){const[M,w]=(0,t.useState)(''),{width:A}=(0,x.useResponsive)(),[N,D]=(0,t.useState)(0),_=(0,s.useColumnVisibility)(u,null==h&&null!=S?{storageKey:S}:{}),{visibleColumns:L,hiddenIds:G,toggle:j,toggleAll:P}=h??_,B=(0,t.useMemo)(()=>(0,s.filterRows)(L,e,M),[L,e,M]),{sort:k,onSort:v,sortedRows:W}=(0,s.useTableSort)(B,L),F=W.reduce((e,t)=>e+(!0===E?.selectedMapTargetIndices.has(t.sensorIndex)?1:0),0),H=W.length>0&&F===W.length,V=!!H||F>0&&'mixed',X=`${String(W.length)} visible sensor row${1===W.length?'':'s'}`,z=(0,t.useMemo)(()=>({id:'selection',header:'Select',renderHeader:(0,T.jsx)(c.SelectionCheckbox,{checked:V,accessibilityLabel:H?`Clear selection for ${X}`:`Select all ${X}`,disabled:0===W.length,onPress:()=>{H?E?.deselectSensors(W):E?.selectSensors(W)}}),accessor:e=>e.sensorIndex,enableHiding:!1,enableSort:!1,width:64,render:e=>(0,T.jsx)(f.SensorSelectionCheckbox,{sensor:e,selected:!0===E?.selectedMapTargetIndices.has(e.sensorIndex),onToggle:()=>{E?.toggleSensor(e)}})}),[H,E,W,V,X]),$=(0,t.useMemo)(()=>null!=E?[z,...L]:L,[E,z,L]),U=(0,t.useMemo)(()=>(0,s.tableContentWidth)($),[$]),Z=(0,t.useMemo)(()=>{if(N<=0)return null;const e=A-2*p,t=Math.min(U,e);if(t<=N)return null;return{width:t,marginHorizontal:-(t-N)/2}},[N,A,U]),K=(0,t.useCallback)(()=>{I({columns:L,rows:W})},[I,L,W]),Y=(0,t.useCallback)(e=>{D(e.nativeEvent.layout.width)},[]),q=(0,t.useCallback)(e=>!0===E?.selectedMapTargetIndices.has(e.sensorIndex)?O.rowSelected:void 0,[E]);return(0,T.jsx)(n.default,{style:O.container,testID:R,onLayout:Y,children:(0,T.jsxs)(n.default,{style:Z??void 0,children:[(0,T.jsxs)(n.default,{style:O.toolbar,children:[(0,T.jsx)(C.AppTextInput,{style:O.filterInput,value:M,onChangeText:w,placeholder:b,accessibilityLabel:"Filter results"}),(0,T.jsxs)(n.default,{style:O.toolbarActions,children:[(0,T.jsxs)(o.default,{style:O.rowCount,children:[W.length," row",1!==W.length?'s':'']}),(0,T.jsx)(s.ColumnSelector,{columns:u,hiddenIds:G,onToggle:j,onToggleAll:P}),(0,T.jsxs)(l.default,{style:O.exportButton,onPress:K,accessibilityRole:"button",accessibilityLabel:"Export CSV",children:[(0,T.jsx)(o.default,{style:O.exportButtonIcon,children:'\u2913'}),(0,T.jsx)(o.default,{style:O.exportButtonText,children:"Export CSV"})]})]})]}),(0,T.jsx)(s.ColumnTable,Object.assign({columns:$,rows:W,getRowKey:e=>String(e.sensorIndex),sort:k,onSort:v,getRowStyle:q,emptyMessage:y},null!=R?{testID:`${R}-table`}:{}))]})})};var t=r(d[0]),o=e(r(d[1])),l=e(r(d[2])),n=e(r(d[3])),s=r(d[4]),c=r(d[5]),u=r(d[6]),S=r(d[7]),h=r(d[8]),I=r(d[9]),x=r(d[10]),b=r(d[11]),C=r(d[12]),f=r(d[13]),T=r(d[14]);const p=h.SPACING.XXL,O=(0,b.createStyles)({container:{marginTop:h.SPACING.LG},exportButton:{alignItems:'center',backgroundColor:u.COLORS.ACTION_PRIMARY,borderRadius:S.RADIUS.MD,flexDirection:'row',gap:h.SPACING.XS,height:38,paddingHorizontal:h.SPACING.LG},exportButtonIcon:{color:u.COLORS.TEXT_INVERSE,fontSize:I.FONT_SIZE.MD,fontWeight:I.FONT_WEIGHT.BOLD},exportButtonText:{color:u.COLORS.TEXT_INVERSE,fontSize:I.FONT_SIZE.SM,fontWeight:I.FONT_WEIGHT.SEMIBOLD},filterInput:{backgroundColor:u.COLORS.TEXT_INVERSE,borderColor:u.COLORS.BORDER_DEFAULT,borderRadius:S.RADIUS.MD,borderWidth:1,color:u.COLORS.TEXT_HEADING,flexGrow:1,flexShrink:1,fontSize:I.FONT_SIZE.MD,height:38,maxWidth:320,paddingHorizontal:h.SPACING.LG,paddingVertical:0},rowCount:{color:u.COLORS.TEXT_MUTED,fontSize:I.FONT_SIZE.SM,marginRight:h.SPACING.XS},rowSelected:{backgroundColor:u.COLORS.BG_WASH},toolbar:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.MD,justifyContent:'space-between',marginBottom:h.SPACING.MD},toolbarActions:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.SM}})},1275,[34,222,488,276,693,1233,490,491,494,495,560,489,725,1269,104]); 47__d(function(g,r,i,a,m,e,d){"use strict";
47Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SENSOR_SEARCH_COLUMN_VISIBILITY_KEY",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"SENSOR_SEARCH_COLUMNS",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"SENSOR_OWNED_COLUMN_VISIBILITY_KEY",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"SENSOR_OWNED_COLUMNS",{enumerable:!0,get:function(){return l}}),r(d[0]);var t=r(d[1]),n=r(d[2]),s=r(d[3]);const o='sensor-search-table-columns';const c=[{id:'sensorIndex',header:'Sensor Index',type:'number',accessor:t=>t.sensorIndex,enableHiding:!1,render:n=>{return o=n.sensorIndex,(0,s.jsx)(t.ResponsiveTableText,{numberOfLines:1,children:String(o)});var o},exportValue:t=>String(t.sensorIndex),width:110},{id:'label',header:'Name',type:'string',accessor:t=>t.label,width:200},{id:'ownerEmail',header:'Owner Email',type:'string',accessor:t=>t.ownerEmail,width:230},{id:'mac',header:'Device ID',type:'string',accessor:t=>t.mac,width:160},{id:'model',header:'Model',type:'string',accessor:t=>t.model,width:120},{id:'onlineStatus',header:'Status',type:'string',accessor:t=>t.onlineStatus,width:100},{id:'lastSeenMinutesAgo',header:'Last Seen (min ago)',type:'number',accessor:t=>t.lastSeenMinutesAgo,width:150},{id:'firmwareVersion',header:'Firmware',type:'string',accessor:t=>(0,n.formatFirmwareWithConfiguredTarget)(t.firmwareVersion,t.configuredFirmwareTarget),width:150},{id:'readKey',header:'Read Key',type:'string',accessor:t=>t.readKey,defaultHidden:!0,width:170},{id:'locationType',header:'Location',type:'string',accessor:t=>(0,n.formatLocationType)(t.locationType)||'N/A',defaultHidden:!0,width:110},{id:'lat',header:'Latitude',type:'number',accessor:t=>t.lat,defaultHidden:!0,width:110},{id:'lon',header:'Longitude',type:'number',accessor:t=>t.lon,defaultHidden:!0,width:110},{id:'elevation',header:'Elevation (m)',type:'number',accessor:t=>t.elevation,defaultHidden:!0,width:120},{id:'pm25',header:'PM2.5',type:'number',accessor:t=>t.pm25,defaultHidden:!0,width:90},{id:'confidencePercent',header:'Confidence (%)',type:'number',accessor:t=>t.confidencePercent,defaultHidden:!0,width:130},{id:'temperature',header:'Temperature',type:'number',accessor:t=>t.temperature,defaultHidden:!0,width:120},{id:'humidity',header:'Humidity',type:'number',accessor:t=>t.humidity,defaultHidden:!0,width:110},{id:'rssi',header:'RSSI (dBm)',type:'number',accessor:t=>t.rssi,defaultHidden:!0,width:110},{id:'rssiQuality',header:'Signal Quality',type:'string',accessor:t=>t.rssiQuality,defaultHidden:!0,width:130},{id:'uptimeMinutes',header:'Uptime (min)',type:'number',accessor:t=>t.uptimeMinutes,defaultHidden:!0,width:120},{id:'hardwareDiscovered',header:'Hardware',type:'string',accessor:t=>t.hardwareDiscovered,defaultHidden:!0,width:140},{id:'hidden',header:'Visibility',type:'string',accessor:t=>(0,n.formatVisibility)(!0===t.hidden),defaultHidden:!0,width:100},{id:'archived',header:'Archived',type:'boolean',accessor:t=>t.archived,defaultHidden:!0,width:100},{id:'downgraded',header:'Downgraded',type:'boolean',accessor:t=>t.downgraded,defaultHidden:!0,width:120},{id:'lastModified',header:'Last Modified',type:'datetime',accessor:t=>t.lastModified,defaultHidden:!0,width:180},{id:'created',header:'Created',type:'datetime',accessor:t=>t.created,defaultHidden:!0,width:170}],u='my-sensors-table-columns',l=c.filter(t=>'ownerEmail'!==t.id)},1276,[34,700,1239,104]); 48__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.PublicDetailView=function({detail:x,onBack:j}){const{sensor:D}=x;return(0,b.jsxs)(t.SensorDetailCard,{sensorLabel:D.label,sensorModel:D.model,sensorIndex:D.sensorIndex,onlineStatus:D.onlineStatus,badges:(0,b.jsx)(t.HeaderBadge,{label:"Public"}),onBack:j,headline:(0,b.jsx)(s.SensorAqiHeadline,{pm25:D.pm25,size:"lg",offline:(0,c.isSensorOffline)(D.onlineStatus)}),children:[(0,b.jsxs)(u.DetailSection,{title:"Readings",children:[(0,b.jsx)(l.ChannelReadingsBand,{sensor:D,isPending:!1,edgeToEdge:!0,onToggleDowngrade:null}),(0,b.jsx)(n.ReadingsSupplement,{gas:D.gas,confidencePercent:D.confidencePercent})]}),(0,b.jsxs)(t.DetailInfoGrid,{children:[(0,b.jsx)(u.DetailSection,{title:"Status",children:(0,b.jsx)(u.DetailFieldList,{children:(0,o.buildPublicDetailStatusRows)(D).map(l=>(0,b.jsx)(u.DetailField,{label:l.label,value:l.value},l.label))})}),(0,b.jsx)(u.DetailSection,{title:"Hardware",children:(0,b.jsx)(u.DetailFieldList,{children:(0,o.buildPublicDetailHardwareRows)(D).map(l=>(0,b.jsx)(u.DetailField,{label:l.label,value:l.value},l.label))})}),(0,b.jsx)(u.DetailSection,{title:"Location",children:(0,b.jsx)(u.DetailFieldList,{children:(0,o.buildPublicDetailLocationRows)(D).map(l=>(0,b.jsx)(u.DetailField,{label:l.label,value:l.value},l.label))})})]})]})},r(d[0]);
48var l=r(d[1]),n=r(d[2]),s=r(d[3]),t=r(d[4]),o=r(d[5]),c=r(d[6]),u=r(d[7]),b=r(d[8])},1277,[34,1235,1238,1241,1243,1244,1239,1140,104]); 49__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SearchView=function({searchText:e,onSearchTextChange:c,onSearch:u,loading:h,sensors:I,publicSensors:N,totalResults:M,hasSearched:_,onViewDetail:D,onViewPublicDetail:R,detailLoading:j,onUpdate:G,onArchive:w,pendingSensorIndices:P,isActionCoolingDown:H=()=>!1,isArchiveCoolingDown:X=()=>!1,canModifyOwner:B,canArchive:v,canViewArchiveHistory:V,canUseTableView:W=!1,showUnregisteredNotice:F=!1,onExportTable:U,selection:k,selectionModeVisible:z,onSelectionModeChange:Y}){const[Z,K]=(0,n.useState)('cards'),$=[...I,...N],q=W&&'table'===Z;return(0,f.jsxs)(t.default,{style:A.sharedStyles.section,children:[(0,f.jsxs)(t.default,{style:y.searchContainer,children:[(0,f.jsxs)(s.default,{style:y.searchLabel,children:["Search public sensors by sensor name or",' ',(0,f.jsx)(C.ExternalLink,{href:L,textStyle:y.searchLabelLink,inline:!0,children:"sensor index"}),' ',"(one per line)"]}),(0,f.jsx)(T.AppTextInput,{style:y.searchInput,value:e,onChangeText:c,placeholder:'e.g.\nMy Sensor\n1234',multiline:!0,numberOfLines:6,textAlignVertical:"top"}),(0,f.jsx)(o.default,{style:[y.searchButton,h&&y.buttonDisabled],onPress:()=>{u()},disabled:h,children:h?(0,f.jsx)(l.default,{color:S.COLORS.TEXT_INVERSE,size:"small"}):(0,f.jsx)(s.default,{style:y.searchButtonText,children:"Search"})})]}),M>0&&(0,f.jsxs)(t.default,{style:y.resultsContainer,children:[(0,f.jsxs)(t.default,{style:[y.resultsHeader,(z||k.selectedMapTargets.length>0)&&y.resultsHeaderWithSelectionActions],children:[(0,f.jsxs)(s.default,{style:y.resultsCount,children:[M," sensor",1!==M?'s':''," found"]}),(0,f.jsxs)(t.default,{style:y.resultsHeaderControls,children:[!q&&(0,f.jsx)(p.SensorSelectionModeControl,{availableSensorCount:$.length,visible:z,onShow:()=>{Y(!0)},onHide:()=>{Y(!1)}}),W&&I.length>0&&(0,f.jsx)(O.ResultLayoutToggle,{layout:Z,onChange:e=>{K(e),'cards'===e&&k.selectedMapTargets.length>0&&Y(!0)}})]})]}),(0,f.jsx)(p.SensorSelectionActions,{availableSensors:$,selectedSensors:k.selectedMapTargets,onSelectAll:k.selectSensors,onDeselectAll:k.deselectSensors,onClear:k.clearSelection,showBulkSelector:!q&&z}),q&&null!=U?(0,f.jsx)(E.SensorTable,{sensors:I,columns:b.SENSOR_SEARCH_COLUMNS,columnVisibilityStorageKey:b.SENSOR_SEARCH_COLUMN_VISIBILITY_KEY,onExport:U,selection:k,testID:"sensor-search-table"}):I.length>0&&I.map(e=>(0,f.jsx)(x.SensorResultCard,Object.assign({sensor:e},z?{selection:{selected:k.selectedMapTargetIndices.has(e.sensorIndex),onToggle:k.toggleSensor}}:{},{isPending:P.has(e.sensorIndex),isActionCoolingDown:(n,t)=>H(e.sensorIndex,n,t),isArchiveCoolingDown:X(e.sensorIndex),canModifyOwner:B,canArchive:v,canViewArchiveHistory:V},z?{archiveHistorySelection:{selectedMapTargetIndices:k.selectedMapTargetIndices,onToggle:k.toggleArchiveHistory}}:{},{showUnregisteredNotice:F,onApplyAction:(n,t,s)=>{G(e.sensorIndex,n,t,s)},onArchive:()=>{w(e.sensorIndex,e.label)},onViewDetail:()=>{D(e.sensorIndex)}}),`owner-${String(e.sensorIndex)}`)),N.length>0&&(0,f.jsxs)(t.default,{style:y.publicSection,children:[(0,f.jsx)(s.default,{style:y.publicSectionLabel,children:"Public sensors (not yours)"}),N.map(e=>(0,f.jsx)(x.PublicSensorResultCard,Object.assign({sensor:e},z?{selection:{selected:k.selectedMapTargetIndices.has(e.sensorIndex),onToggle:k.toggleSensor}}:{},{onViewDetail:()=>{R(e.sensorIndex)},detailLoading:j}),`public-${String(e.sensorIndex)}`))]})]}),_&&0===M&&!h&&(0,f.jsx)(t.default,{style:y.emptyState,children:(0,f.jsx)(s.default,{style:y.emptyStateText,children:"No sensors found."})})]})};var n=r(d[0]),t=e(r(d[1])),s=e(r(d[2])),o=e(r(d[3])),l=e(r(d[4]));r(d[5]);var c=r(d[6]),S=r(d[7]),u=r(d[8]),h=r(d[9]),I=r(d[10]),T=r(d[11]),
49C=r(d[12]),O=r(d[13]),x=r(d[14]),p=r(d[15]),A=r(d[16]),E=r(d[17]),b=r(d[18]),f=r(d[19]);const L='https://community.purpleair.com/t/sensor-indexes-and-read-keys/4000/1';const y=(0,c.createStyles)({buttonDisabled:{opacity:.6},emptyState:{alignItems:'center',marginTop:h.SPACING.XXXL,padding:h.SPACING.XXL},emptyStateText:{color:S.COLORS.TEXT_MUTED,fontSize:I.FONT_SIZE.LG},publicSection:{marginTop:h.SPACING.XL},publicSectionLabel:{color:S.COLORS.TEXT_HEADING,fontSize:I.FONT_SIZE.MD,fontWeight:I.FONT_WEIGHT.SEMIBOLD,marginBottom:h.SPACING.XS},resultsContainer:{marginTop:h.SPACING.XXXL},resultsCount:{color:S.COLORS.TEXT_BODY,fontSize:I.FONT_SIZE.LG,fontWeight:I.FONT_WEIGHT.SEMIBOLD},resultsHeader:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.SM,justifyContent:'space-between',marginBottom:h.SPACING.LG},resultsHeaderWithSelectionActions:{marginBottom:h.SPACING.SM},resultsHeaderControls:{alignItems:'center',flexDirection:'row',flexShrink:1,flexWrap:'wrap',gap:h.SPACING.SM,justifyContent:'flex-end'},searchButton:{alignItems:'center',backgroundColor:S.COLORS.ACTION_PRIMARY,borderRadius:u.RADIUS.MD,marginTop:h.SPACING.MD,paddingVertical:h.SPACING.LG},searchButtonText:{color:S.COLORS.TEXT_INVERSE,fontSize:I.FONT_SIZE.LG,fontWeight:I.FONT_WEIGHT.SEMIBOLD},searchContainer:{},searchInput:Object.assign({backgroundColor:S.COLORS.TEXT_INVERSE,borderColor:S.COLORS.BORDER_DEFAULT,borderRadius:u.RADIUS.MD,borderWidth:1,color:S.COLORS.TEXT_HEADING,fontFamily:I.FONT_FAMILY.WEB_MONOSPACE,fontSize:I.FONT_SIZE.MD,minHeight:140,paddingHorizontal:h.SPACING.LG,paddingVertical:h.SPACING.MD},{outlineColor:S.COLORS.ACTION_PRIMARY}),searchLabel:{color:S.COLORS.TEXT_BODY,fontSize:I.FONT_SIZE.LG,fontWeight:I.FONT_WEIGHT.MEDIUM,marginBottom:h.SPACING.SM},searchLabelLink:{color:S.COLORS.TEXT_BODY,fontWeight:I.FONT_WEIGHT.MEDIUM,textDecorationLine:'underline'}})},1278,[34,276,222,488,410,95,489,490,491,494,495,725,523,1271,1279,1273,1140,1275,1276,104]); 50__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"FOOTER_COPY_SLOT_TEST_ID",{enumerable:!0,get:function(){return v}}),_e.SensorResultCard=function({sensor:e,isPending:n,isActionCoolingDown:t=()=>!1,isArchiveCoolingDown:o=!1,canModifyOwner:l,canArchive:s=!1,canViewArchiveHistory:c=!1,archiveHistorySelection:u,showUnregisteredNotice:S=!1,selection:h,onApplyAction:p,onArchive:f,onViewDetail:T}){return(0,_.jsxs)(w,{sensor:e,selected:!0===h?.selected,children:[(0,_.jsx)(B,Object.assign({sensor:e,privacyLabel:(0,M.formatVisibility)(e.hidden)},null!=h?{selectionControl:(0,_.jsx)(L.SensorSelectionCheckbox,{sensor:e,selected:h.selected,onToggle:h.onToggle})}:{})),e.archived&&(0,_.jsx)(V,{}),S&&'unregistered'===e.locationType&&(0,_.jsx)(k,{}),(0,_.jsx)(A.ChannelReadingsBand,{sensor:e,isPending:n,isChannelCoolingDown:n=>{const o='A'===n?e.downgraded:!0===e.channelB?.downgraded;return t(o?'CLEAR_DOWNGRADED':'SET_DOWNGRADED',n)},onToggleDowngrade:e.archived&&!l?null:n=>{const t='A'===n?e.downgraded:!0===e.channelB?.downgraded;p(t?'CLEAR_DOWNGRADED':'SET_DOWNGRADED',void 0,n)}}),(0,_.jsx)(F,{sensor:e,isPublic:!1}),(0,_.jsx)(W,{}),(0,_.jsx)(H,Object.assign({sensor:e,isPending:n,isActionCoolingDown:t,isArchiveCoolingDown:o,canModifyOwner:l,canArchive:s,onApplyAction:p},void 0!==f?{onArchive:f}:{},{onViewDetail:T})),c&&e.archiveHistory.length>0&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(W,{}),(0,_.jsx)(x.ArchiveHistoryGrid,Object.assign({archiveHistory:e.archiveHistory},null!=u?{selection:u}:{}))]})]})},_e.PublicSensorResultCard=function({sensor:e,selection:n,onViewDetail:s,detailLoading:c}){const{isPhone:u}=(0,p.useResponsive)();return(0,_.jsxs)(w,{sensor:e,selected:!0===n?.selected,children:[(0,_.jsx)(B,Object.assign({sensor:e,privacyLabel:"Public"},null!=n?{selectionControl:(0,_.jsx)(L.SensorSelectionCheckbox,{sensor:e,selected:n.selected,onToggle:n.onToggle})}:{})),(0,_.jsx)(A.ChannelReadingsBand,{sensor:e,isPending:!1,onToggleDowngrade:null}),(0,_.jsx)(F,{sensor:e,isPublic:!0}),(0,_.jsx)(W,{}),(0,_.jsxs)(l.default,{style:[Y.publicFooter,u&&Y.publicFooterPhone],children:[(0,_.jsx)(y.SensorMapLink,{sensor:e,style:Y.linkButton,textStyle:Y.linkButtonText}),(0,_.jsx)(o.default,{style:Y.detailsLinkButton,onPress:s,disabled:c,
50children:(0,_.jsx)(t.default,{style:Y.detailsLinkText,children:"Details \u2192"})}),(0,_.jsx)(l.default,{style:Y.footerTrailingAction,testID:v,children:(0,_.jsx)(O.CopyButton,{value:(0,N.formatSensorClipboardSummary)(e),accessibilityLabel:"Copy sensor details",successMessage:"All sensor details copied",label:"Copy details",variant:"action"})})]})]})};var n=e(r(d[0]));r(d[1]);var t=e(r(d[2])),o=e(r(d[3])),l=e(r(d[4])),s=r(d[5]),c=r(d[6]),u=r(d[7]),S=r(d[8]),h=r(d[9]),p=r(d[10]),f=r(d[11]),T=r(d[12]),O=r(d[13]),C=r(d[14]),I=r(d[15]),x=r(d[16]),A=r(d[17]),b=r(d[18]),R=r(d[19]),N=r(d[20]),E=r(d[21]),M=r(d[22]),D=r(d[23]),P=r(d[24]),y=r(d[25]),L=r(d[26]),G=r(d[27]),j=r(d[28]),_=r(d[29]);const v='sensor-card-footer-copy-slot';function w({sensor:e,children:n,selected:t=!1}){const o=(0,I.pm25ToAqi)(e.pm25),s=(0,E.getSearchResultStripeColor)(e.onlineStatus,o);return(0,_.jsxs)(l.default,{style:[Y.card,t&&Y.cardSelected],children:[(0,_.jsx)(l.default,{style:[Y.aqiStripe,{backgroundColor:s}]}),(0,_.jsx)(l.default,{style:Y.cardContent,children:n})]})}
50function W(){return(0,_.jsx)(l.default,{style:Y.divider})}function B({sensor:e,privacyLabel:n,selectionControl:o}){const{isPhone:s}=(0,p.useResponsive)(),c=(0,M.getStatusColor)(e.onlineStatus),u=(0,D.sensorImageUrl)(e.model,100),S=(0,M.resolveSensorDisplayName)(e.label,e.sensorIndex),h=(0,I.pm25ToAqi)(e.pm25),f=(0,I.getAqiColor)(h),O=(0,I.getAqiOnColor)(h),C=(0,I.getAqiCategory)(h),x=e.mac?.trim()??'',A='none'!==(0,R.resolveDowngradeScope)(e),b=(0,M.formatLocationType)(e.locationType);return(0,_.jsxs)(l.default,{style:[Y.headerBand,s&&Y.headerBandPhone],children:[o,(0,_.jsx)(U,{imageUrl:u,model:e.model,isPhone:s}),(0,_.jsxs)(l.default,{style:Y.headerContent,children:[(0,_.jsxs)(l.default,{style:Y.headerTitleLine,children:[(0,_.jsx)(l.default,{style:[Y.statusDot,{backgroundColor:c}]}),(0,_.jsx)(T.CopyableValue,{value:S,description:"sensor name",successMessage:"Sensor name copied",children:(0,_.jsx)(t.default,{style:[Y.label,s&&Y.labelPhone],numberOfLines:s?2:void 0,children:S})}),(0,_.jsx)(q,{status:e.onlineStatus}),(0,_.jsx)(Z,{label:n,tone:"muted",testID:"sensor-privacy-chip"}),(0,_.jsx)(Z,{label:b,tone:"muted",testID:"sensor-location-chip"}),A&&(0,_.jsx)(Z,{label:"Downgraded",tone:"warning"})]}),(0,_.jsxs)(l.default,{style:Y.headerMetaLine,children:[(0,_.jsx)(t.default,{style:Y.model,numberOfLines:1,children:e.model}),(0,_.jsx)(T.CopyableValue,{value:String(e.sensorIndex),description:"sensor index",successMessage:"Sensor index copied",children:(0,_.jsx)(t.default,{style:Y.sensorId,numberOfLines:1,children:`Sensor index: ${String(e.sensorIndex)}`})})]}),s&&''!==x&&(0,_.jsx)(T.CopyableValue,{value:x,description:"Device ID",successMessage:"Device ID copied",children:(0,_.jsx)(t.default,{style:Y.headerMacValuePhone,numberOfLines:1,children:`Device ID: ${x}`})})]}),!s&&''!==x&&(0,_.jsxs)(l.default,{style:Y.headerMacSlot,children:[(0,_.jsx)(t.default,{style:Y.headerMacLabel,numberOfLines:1,children:"Device ID"}),(0,_.jsx)(T.CopyableValue,{value:x,description:"Device ID",successMessage:"Device ID copied",children:(0,_.jsx)(t.default,{style:Y.headerMacValue,numberOfLines:1,children:x})})]}),(0,_.jsx)(X,{aqi:h,category:C,bandColor:f,onColor:O,isPhone:s})]})}function F({sensor:e,isPublic:n}){const{isPhone:t}=(0,p.useResponsive)(),o=[{label:'Last seen',value:(0,M.formatMinutesAgo)(e.lastSeenMinutesAgo)},{label:'Last modified',value:(0,M.formatMinutesAgo)(e.lastModifiedMinutesAgo)}];n||o.push({label:'Last update check',value:(0,M.formatMinutesAgo)(e.lastUpdateCheckMinutesAgo??null)}),o.push({label:(0,M.getUptimeLabel)(e.onlineStatus),value:(0,M.formatDurationMinutes)(e.uptimeMinutes)},{label:'RSSI',value:(0,M.formatRssi)(e.rssi,e.rssiQuality)}),e.confidencePercent>=0&&o.push({label:'Confidence',value:`${String(e.confidencePercent)}%`});const s=[{label:'Firmware',value:(0,M.formatFirmwareWithConfiguredTarget)(e.firmwareVersion,e.configuredFirmwareTarget)},{label:'Hardware',value:e.hardwareDiscovered??'N/A',wrap:!0}];null!=e.particleRatioHigh&&s.push(Object.assign({label:'Particle ratio',value:e.particleRatioHigh?'HIGH':'LOW'},e.particleRatioHigh?{}:{tone:'alert'})),s.push({label:'Gas',value:(0,M.formatMeasurement)(e.gas)});const c=(0,f.toCoord)(e.lat,e.lon),u=[{label:'Type',value:(0,M.formatLocationType)(e.locationType)||'N/A'}];return n||void 0===e.hidden||u.push({label:'Visibility',value:(0,M.formatVisibility)(e.hidden)}),u.push({label:'Coordinates',value:null===c?'N/A':(0,f.formatCoord)(c,5),monospace:!0},{label:'Elevation',value:null==e.elevation?'N/A':`${String(e.elevation)} m`},{label:'Position',value:(0,M.formatPositionRating)(e.positionRating)}),(0,_.jsxs)(l.default,{style:[Y.dataGrid,t&&Y.dataGridPhone],children:[(0,_.jsx)(z,{title:"Activity",fields:o}),(0,_.jsx)(z,{title:"Hardware",fields:s}),(0,_.jsx)(z,{title:"Location",fields:u})]})}function H({sensor:e,isPending:n,isActionCoolingDown:s=()=>!1,isArchiveCoolingDown:c=!1,canModifyOwner:u,canArchive:S,onApplyAction:h,onArchive:f,onViewDetail:T}){const{isPhone:C}=(0,p.useResponsive)(),[I,x]=(0,j.useServerReconciledTextInput)(e.ownerEmail??''),[A,R]=(0,j.useServerReconciledTextInput)(e.configuredFirmwareTarget??''),[E,M]=(0,j.use
50ServerReconciledTextInput)(null!=e.brightness?String(e.brightness):''),D=e.ownerEmail?.trim()??'',L=e.firmwareVersion?.trim()??'';return e.archived?(0,_.jsx)(l.default,{style:[Y.managementBand,C&&Y.managementBandPhone],children:(0,_.jsxs)(l.default,{style:Y.managementActions,children:[(0,_.jsx)(y.SensorMapLink,{sensor:e}),(0,_.jsx)(o.default,{style:Y.detailsLinkButton,onPress:T,children:(0,_.jsx)(t.default,{style:Y.detailsLinkText,children:"Details \u2192"})}),(0,_.jsx)(l.default,{style:Y.footerTrailingAction,testID:v,children:(0,_.jsx)(O.CopyButton,{value:(0,N.formatSensorClipboardSummary)(e),accessibilityLabel:"Copy sensor details",successMessage:"All sensor details copied",label:"Copy details",variant:"action"})})]})}):(0,_.jsxs)(l.default,{style:[Y.managementBand,C&&Y.managementBandPhone],children:[(0,_.jsx)(t.default,{style:Y.sectionTitle,children:"Management"}),(0,_.jsxs)(P.ManagementInputGrid,{children:[u?(0,_.jsx)(P.ManagementInputRow,{label:"Owner",value:I,onChangeText:x,placeholder:"[email protected]",isPending:n,setDisabled:s('SET_OWNER'),onSet:()=>{h('SET_OWNER',I)},setVariant:"neutralStrong",width:"wide"}):(0,_.jsx)(P.ReadOnlyManagementRow,{label:"Owner",value:''!==D?D:'N/A',width:"wide"}),u?(0,_.jsx)(P.ManagementInputRow,{label:"Firmware",value:A,onChangeText:R,placeholder:"e.g. 7.04",isPending:n,setDisabled:s('SET_ACTIVE_FIRMWARE_TARGET'),onSet:()=>{h('SET_ACTIVE_FIRMWARE_TARGET',A.trim())},setVariant:"neutralStrong",width:"medium"}):(0,_.jsx)(P.ReadOnlyManagementRow,{label:"Firmware",value:''!==L?L:'N/A',width:"medium"}),(0,_.jsx)(P.ManagementInputRow,{label:"Brightness",value:E,onChangeText:M,placeholder:"0-100",keyboardType:"numeric",isPending:n,setDisabled:s('SET_BRIGHTNESS'),onSet:()=>{h('SET_BRIGHTNESS',E)},setVariant:"neutralStrong",width:"narrow"}),(0,_.jsx)(l.default,{style:Y.ledModeInputRow,children:(0,_.jsx)(b.LedModeManagementControl,{ledMode:e.ledMode,isPending:n,isSetCoolingDown:s('SET_LED_MODE'),onSet:e=>{h('SET_LED_MODE',e)}})})]}),(0,_.jsxs)(l.default,{style:Y.managementActions,children:[(0,_.jsx)(G.ActionButton,{label:e.shareKeys?'Disable Share Keys':'Enable Share Keys',onPress:()=>{h(e.shareKeys?'CLEAR_SHARE_KEYS':'SET_SHARE_KEYS')},variant:"neutralStrong",disabled:n||s(e.shareKeys?'CLEAR_SHARE_KEYS':'SET_SHARE_KEYS')}),u&&(0,_.jsx)(G.ActionButton,{label:"Request Location Verification",onPress:()=>{h('VERIFY_LOCATION')},variant:"neutralStrong",disabled:n||s('VERIFY_LOCATION')}),S&&void 0!==f&&(0,_.jsx)(G.ActionButton,{label:"Archive Sensor",onPress:f,variant:"danger",disabled:n||c}),(0,_.jsx)(y.SensorMapLink,{sensor:e}),(0,_.jsx)(o.default,{style:Y.detailsLinkButton,onPress:T,children:(0,_.jsx)(t.default,{style:Y.detailsLinkText,children:"Details \u2192"})}),(0,_.jsx)(l.default,{style:Y.footerTrailingAction,testID:v,children:(0,_.jsx)(O.CopyButton,{value:(0,N.formatSensorClipboardSummary)(e),accessibilityLabel:"Copy sensor details",successMessage:"All sensor details copied",label:"Copy details",variant:"action"})})]})]})}function V(){const{isPhone:e}=(0,p.useResponsive)();return(0,_.jsxs)(l.default,{style:[Y.archivedNotice,e&&Y.archivedNoticePhone],children:[(0,_.jsx)(t.default,{style:Y.archivedNoticeTitle,children:"Archived"}),(0,_.jsx)(t.default,{style:Y.archivedNoticeText,children:"This archived sensor no longer receives new readings."})]})}function k(){const{isPhone:e}=(0,p.useResponsive)();return(0,_.jsxs)(l.default,{style:[Y.unregisteredNotice,e&&Y.unregisteredNoticePhone],children:[(0,_.jsx)(t.default,{style:Y.unregisteredNoticeTitle,children:"Unregistered"}),(0,_.jsx)(t.default,{style:Y.unregisteredNoticeText,children:"This sensor has not been registered."})]})}function z({title:e,fields:n}){const{isPhone:o}=(0,p.useResponsive)();return(0,_.jsxs)(l.default,{style:[Y.dataColumn,o&&Y.dataColumnPhone],children:[(0,_.jsx)(t.default,{style:[Y.sectionTitle,Y.dataColumnTitle],children:e}),n.map(e=>(0,_.jsxs)(l.default,{style:Y.dataField,children:[(0,_.jsx)(t.default,{style:Y.dataLabel,children:e.label}),(0,_.jsx)(t.default,{style:[Y.dataValue,!0===e.monospace&&Y.dataValueMono,!0===e.wrap&&Y.dataValueWrap,'alert'===e.tone&&Y.dataValueAlert],numberOfLines:!0===e.wrap?void 0:1,children:e.value})]},e.label))]})}function U({imageUrl:e,model:o,isPhone:s}){const c=s?Y.thumbnailPhone:null;return null===e?(0,_.jsx)(l.default,{style:[Y.thumbnail,Y.thumbnailFallback,c],children:(0,_.jsx)(t.default,{style:Y.thumbnailFallbackText,numberOfLines:1,children:o})}):(0,_.jsx)(n.default,{source:{uri:e},style:[Y.thumbnail,c],resizeMode:"contain",accessibilityIgnoresInvertColors:!0})}function X({aqi:e,category:n,bandColor:o,onColor:s,isPhone:c}){return(0,_.jsx)(C.HoverTooltip,{text:I.AQI_TOOLTIP_TEXT,children:(0,_.jsxs)(l.default,{style:[Y.aqiPill,c&&Y.aqiPillPhone,{backgroundColor:o}],children:[(0,_.jsx)(t.default,{style:[Y.aqiPillValue,c&&Y.aqiPillValuePhone,{color:s}],children:null===e?'\u2014':String(e)}),!c&&(0,_.jsx)(t.default,{style:[Y.aqiPillCategory,{color:s}],children:null===e?'No data':n})]})})}function Z({label:e,tone:n,testID:o}){const s='warning'===n?Y.chipWarning:'update'===n?Y.chipUpdate:Y.chipMuted,c='warning'===n?Y.chipTextWarning:'update'===n?Y.chipTextUpdate:Y.chipTextMuted;return(0,_.jsx)(l.default,{style:[Y.chip,s],testID:o,children:(0,_.jsx)(t.default,{style:[Y.chipText,c],children:e})})}function q({status:e}){return'online'===e?null:(0,_.jsx)(Z,{label:e,tone:"muted"})}const Y=(0,s.createStyles)({aqiPill:{alignItems:'center',borderRadius:u.RADIUS.MD,flexDirection:'row',flexShrink:0,gap:S.SPACING.SM,paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.SM},aqiPillCategory:{fontSize:h.FONT_SIZE.SM,fontWeight:h.FONT_WEIGHT.SEMIBOLD},aqiPillPhone:{height:44,justifyContent:'center',minWidth:44,paddingHorizontal:S.SPACING.SM,paddingVertical:0},aqiPillValue:{fontSize:h.FONT_SIZE.XXL,fontVariant:['tabular-nums'],fontWeight:h.FONT_WEIGHT.BOLD},aqiPillValuePhone:{fontSize:h.FONT_SIZE.LG},aqiStripe:{alignSelf:'stretch',width:4},archivedNotice:{backgroundColor:c.COLORS.WARNING_BG,borderTopColor:c.COLORS.BORDER,borderTopWidth:1,gap:S.SPACING.MICRO,paddingHorizontal:S.SPACING.LG,paddingVertical:S.SPACING.SM},archivedNoticePhone:{paddingHorizontal:S.SPACING.MD},archivedNoticeText:{color:c.COLORS.TEXT_BODY,fontSize:h.FONT_SIZE.SM},archivedNoticeTitle:{color:c.COLORS.WARNING_DARK,fontSize:h.FONT_SIZE.SM,fontWeight:h.FONT_WEIGHT.BOLD},unregisteredNotice:{backgroundColor:c.COLORS.ERROR_BG,borderTopColor:c.COLORS.BORDER,borderTopWidth:1,gap:S.SPACING.MICRO,paddingHorizontal:S.SPACING.LG,paddingVertical:S.SPACING.SM},unregisteredNoticePhone:{paddingHorizontal:S.SPACING.MD},unregisteredNoticeText:{color:c.COLORS.TEXT_BODY,fontSize:h.FONT_SIZE.SM},unregisteredNoticeTitle:{color:c.COLORS.ERROR,fontSize:h.FONT_SIZE.SM,fontWeight:h.FONT_WEIGHT.BOLD},card:{backgroundColor:c.COLORS.TEXT_INVERSE,borderColor:c.COLORS.BORDER,borderRadius:u.RADIUS.MD,borderWidth:1,flexDirection:'row',marginBottom:S.SPACING.LG,overflow:'hidden'},cardSelected:{borderColor:c.COLORS.ACTION_PRIMARY,borderWidth:2},cardContent:{flex:1,minWidth:0},chip:{borderRadius:u.RADIUS.SM,paddingHorizontal:S.SPACING.SM,paddingVertical:S.SPACING.MICRO},chipMuted:{backgroundColor:c.COLORS.BG_SUBTLE_100},chipText:{fontSize:h.FONT_SIZE.XS,fontWeight:h.FONT_WEIGHT.SEMIBOLD,letterSpacing:.3,textTransform:'uppercase'},chipTextMuted:{color:c.COLORS.TEXT_MUTED},chipTextUpdate:{color:c.COLORS.WARNING_DARK},chipTextWarning:{color:c.COLORS.WARNING_DARK},chipUpdate:{backgroundColor:c.COLORS.WARNING_BG},chipWarning:{backgroundColor:c.COLORS.WARNING_BG},dataColumn:Object.assign({flexBasis:200,flexGrow:1,flexShrink:1,gap:S.SPACING.XS,minWidth:0},{columnGap:S.SPACING.MD,display:'grid',gridTemplateColumns:'max-content minmax(0, 1fr)'}),dataColumnPhone:Object.assign({gap:S.SPACING.MICRO},{columnGap:S.SPACING.SM,rowGap:S.SPACING.MICRO}),dataColumnTitle:Object.assign({},{gridColumn:'1 / -1'}),dataField:Object.assign({alignItems:'baseline',flexDirection:'row',gap:S.SPACING.SM},{display:'contents'}),dataGrid:{flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.XL,paddingHorizontal:S.SPACING.LG,paddingVertical:S.SPACING.MD},dataGridPhone:{gap:S.SPACING.LG,paddingHorizontal:S.SPACING.MD},dataLabel:{color:c.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.XS,letterSpacing:.3,textTransform:'uppercase'},dataValue:{color:c.COLORS.TEXT_BODY,flex:1,fontSize:h.FONT_SIZE.SM,fontWeight:h.FONT_WEIGHT.MEDIUM,minWidth:0},dataValueAlert:{alignSelf:'flex-start',backgroundColor:c.COLORS.ERROR_BG,borderColor:c.COLORS.ERROR_BORDER,borderRadius:u.RADIUS.SM,borderWidth:1,color:c.COLORS.ERROR,flex:0,fontWeight:h.FONT_WEIGHT.BOLD,paddingHorizontal:S.SPACING.SM,paddingVertical:1}
50,dataValueMono:{fontFamily:h.FONT_FAMILY.WEB_MONOSPACE,fontWeight:h.FONT_WEIGHT.REGULAR},dataValueWrap:Object.assign({},{wordBreak:'break-word'}),detailsLinkButton:Object.assign({paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.SM},{cursor:'pointer'}),detailsLinkText:{color:c.COLORS.BRAND_PRIMARY,fontSize:h.FONT_SIZE.SM,fontWeight:h.FONT_WEIGHT.SEMIBOLD},divider:{backgroundColor:c.COLORS.BORDER,height:1},footerTrailingAction:{marginLeft:'auto'},headerBand:{alignItems:'center',flexDirection:'row',gap:S.SPACING.MD,paddingHorizontal:S.SPACING.LG,paddingVertical:S.SPACING.MD},headerBandPhone:{gap:S.SPACING.SM,paddingHorizontal:S.SPACING.MD},headerContent:{flex:1,gap:S.SPACING.XS,minWidth:0},headerMacValuePhone:{color:c.COLORS.TEXT_HEADING,flexShrink:1,fontFamily:h.FONT_FAMILY.WEB_MONOSPACE,fontSize:h.FONT_SIZE.SM,fontWeight:h.FONT_WEIGHT.BOLD},identityLine:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.SM},headerMacSlot:{alignItems:'flex-start',flexShrink:1,maxWidth:270,minWidth:190},headerMacLabel:{color:c.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.XS,fontWeight:h.FONT_WEIGHT.SEMIBOLD,letterSpacing:.2,marginBottom:2,textTransform:'uppercase'},headerMacValue:{color:c.COLORS.TEXT_HEADING,flexShrink:1,fontFamily:h.FONT_FAMILY.WEB_MONOSPACE,fontSize:h.FONT_SIZE.LG,fontWeight:h.FONT_WEIGHT.EXTRABOLD,maxWidth:'100%'},headerMetaLine:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.SM},headerTitleLine:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.SM},ledModeInputRow:{flexBasis:520,flexGrow:1,flexShrink:1,minWidth:0},label:{color:c.COLORS.TEXT_HEADING,flexShrink:1,fontSize:h.FONT_SIZE.LG,fontWeight:h.FONT_WEIGHT.SEMIBOLD},labelPhone:{fontSize:h.FONT_SIZE.MD},linkButton:Object.assign({backgroundColor:c.COLORS.ACTION_PRIMARY,borderRadius:u.RADIUS.MD,paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.SM},{cursor:'pointer'}),linkButtonText:{color:c.COLORS.TEXT_INVERSE,fontSize:h.FONT_SIZE.XS,fontWeight:h.FONT_WEIGHT.SEMIBOLD},managementActions:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.SM,marginTop:S.SPACING.SM},managementBand:{gap:S.SPACING.SM,paddingHorizontal:S.SPACING.LG,paddingVertical:S.SPACING.MD},managementBandPhone:{paddingHorizontal:S.SPACING.MD},model:{color:c.COLORS.TEXT_MUTED,flexShrink:0,fontSize:h.FONT_SIZE.XS,fontWeight:h.FONT_WEIGHT.MEDIUM,letterSpacing:.3,textTransform:'uppercase'},publicFooter:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.MD,paddingHorizontal:S.SPACING.LG,paddingVertical:S.SPACING.MD},publicFooterPhone:{paddingHorizontal:S.SPACING.MD},sectionTitle:{color:c.COLORS.TEXT_BODY,fontSize:h.FONT_SIZE.XS,fontWeight:h.FONT_WEIGHT.BOLD,letterSpacing:.5,marginBottom:S.SPACING.XS,textTransform:'uppercase'},sensorId:{color:c.COLORS.TEXT_MUTED,flexShrink:0,fontSize:h.FONT_SIZE.XS,fontWeight:h.FONT_WEIGHT.MEDIUM},statusDot:{borderRadius:u.RADIUS.FULL,flexShrink:0,height:10,width:10},thumbnail:{borderRadius:u.RADIUS.MD,flexShrink:0,height:64,width:64},thumbnailPhone:{height:44,width:44},thumbnailFallback:{alignItems:'center',backgroundColor:c.COLORS.BG_SUBTLE_100,justifyContent:'center'},thumbnailFallbackText:{color:c.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.MICRO,fontWeight:h.FONT_WEIGHT.SEMIBOLD,letterSpacing:.3,paddingHorizontal:S.SPACING.XS}})},1279,[328,95,222,488,276,489,490,491,494,495,560,1117,1253,1265,699,1236,1232,1235,1237,1252,1267,1242,1239,1268,1245,1138,1269,1140,1246,104]); 51__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"EMPTY_SENSOR_MANAGEMENT_SEARCH_STATE",{enumerable:!0,get:function(){return t}}),e.sensorManagementSearchReducer=function(n,o){switch(o.type){case'searchCompleted':return{hasSearched:!0,publicSensors:o.publicSensors,sensors:o.sensors,totalResults:o.totalResults};case'searchCleared':return t;case'sensorUpdated':{const t=n.sensors.some(s=>s.sensorIndex===o.sensorIndex),l=(0,s.applySensorUpdateToList)(n.sensors,o.sensorIndex,o.updatedSensor),u=null===o.updatedSensor&&t?Math.max(0,n.totalResults-1):n.totalResults;return l===n.sensors&&u===n.totalResults?n:Object.assign({},n,{sensors:l,totalResults:u})}default:throw new Error(`Unhandled SensorManagementSearchAction: ${String(o)}`)}};var s=r(d[0]);const t={hasSearched:!1,publicSensors:[],sensors:[],totalResults:0}},1280,[1281]); 52__d(function(g,r,i,a,m,e,d){"use strict";
52Object.defineProperty(e,'__esModule',{value:!0}),e.applySensorUpdateToList=function(n,s,t){const l=n.findIndex(n=>n.sensorIndex===s);if(-1===l)return n;if(null===t){const s=n.slice();return s.splice(l,1),s}const u=n.slice();return u[l]=t,u},e.applySensorUpdateToDetail=function(n,s,t){if(null===n)return null;if(n.sensor.sensorIndex!==s)return n;if(null===t)return null;return Object.assign({},n,{sensor:t})}},1281,[]); 53__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.usePartitionedSensorSelection=function({ownedSensors:t,searchSensors:S,publicSearchSensors:l}){const[I,h]=(0,s.useState)(o),w=(0,s.useMemo)(()=>new Map(t.map(s=>[s.sensorIndex,s])),[t]),u=(0,s.useMemo)(()=>c(S,l),[l,S]),x=(0,s.useMemo)(()=>{const s=new Map(u);return w.forEach((n,o)=>{s.set(o,n)}),s},[u,w]),M=(0,s.useMemo)(()=>new Set([...[...I.ownedSensorIndices].filter(s=>w.has(s)),...[...I.searchSensorIndices].filter(s=>!w.has(s)&&u.has(s))]),[u,w,I]),p=(0,s.useMemo)(()=>{const s=[],n=new Set;return w.forEach((o,c)=>{M.has(c)&&(s.push(o),n.add(c))}),u.forEach((o,c)=>{M.has(c)&&!n.has(c)&&s.push(o)}),s},[u,w,M]),f=(0,s.useCallback)(()=>{h(o())},[]),b=(0,s.useCallback)(()=>{h(s=>({ownedSensorIndices:s.ownedSensorIndices,searchSensorIndices:new Set}))},[]),k=(0,s.useCallback)(s=>{h(n=>{const o=new Set(n.ownedSensorIndices),c=new Set(n.searchSensorIndices);return c.delete(s.sensorIndex),o.has(s.sensorIndex)?o.delete(s.sensorIndex):w.has(s.sensorIndex)&&o.add(s.sensorIndex),{ownedSensorIndices:o,searchSensorIndices:c}})},[w]),C=(0,s.useCallback)(s=>{h(n=>{const o=w.has(s.sensorIndex),c=new Set(n.ownedSensorIndices),t=new Set(n.searchSensorIndices),S=o?c:t;return(o?t:c).delete(s.sensorIndex),S.has(s.sensorIndex)?S.delete(s.sensorIndex):x.has(s.sensorIndex)&&S.add(s.sensorIndex),{ownedSensorIndices:c,searchSensorIndices:t}})},[x,w]),v=(0,s.useCallback)(s=>{(0,n.isArchiveHistoryMapTargetSelectable)(s)&&C((0,n.toArchiveHistoryMapTarget)(s))},[C]),y=(0,s.useCallback)(s=>{h(n=>{const o=new Set(n.ownedSensorIndices),c=new Set(n.searchSensorIndices);return s.forEach(s=>{w.has(s.sensorIndex)&&(o.add(s.sensorIndex),c.delete(s.sensorIndex))}),{ownedSensorIndices:o,searchSensorIndices:c}})},[w]),T=(0,s.useCallback)(s=>{h(n=>{const o=new Set(n.ownedSensorIndices),c=new Set(n.searchSensorIndices);return s.forEach(s=>{x.has(s.sensorIndex)&&(w.has(s.sensorIndex)?(o.add(s.sensorIndex),c.delete(s.sensorIndex)):c.add(s.sensorIndex))}),{ownedSensorIndices:o,searchSensorIndices:c}})},[x,w]),E=(0,s.useCallback)(s=>{const n=new Set(s.map(s=>s.sensorIndex));h(s=>({ownedSensorIndices:new Set([...s.ownedSensorIndices].filter(s=>!n.has(s))),searchSensorIndices:new Set([...s.searchSensorIndices].filter(s=>!n.has(s)))}))},[]),H=(0,s.useCallback)((s,n)=>{const o=new Set(c(s,n).keys());h(s=>({ownedSensorIndices:s.ownedSensorIndices,searchSensorIndices:new Set([...s.searchSensorIndices].filter(s=>o.has(s)))}))},[]),A=(0,s.useMemo)(()=>({clearSelection:f,deselectSensors:E,selectedMapTargetIndices:M,selectedMapTargets:p,selectSensors:y,toggleSensor:k}),[f,E,y,M,p,k]),_=(0,s.useMemo)(()=>({clearSelection:f,deselectSensors:E,selectedMapTargetIndices:M,selectedMapTargets:p,selectSensors:T,toggleArchiveHistory:v,toggleSensor:C}),[f,E,T,M,p,v,C]);return{clearSearchSelection:b,ownedSelection:A,reconcileSearchResults:H,searchSelection:_}};var s=r(d[0]),n=r(d[1]);function o(){return{ownedSensorIndices:new Set,searchSensorIndices:new Set}}function c(s,o){const c=new Map(o.map(s=>[s.sensorIndex,s]));return s.forEach(s=>
53{c.set(s.sensorIndex,s),s.archiveHistory.forEach(s=>{!c.has(s.sensorIndex)&&(0,n.isArchiveHistoryMapTargetSelectable)(s)&&c.set(s.sensorIndex,(0,n.toArchiveHistoryMapTarget)(s))})}),c}},1282,[34,1234]); 54__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useSensorSearchFragment=function(){const[s,l]=(0,t.useState)(()=>o((0,c.resolveSensorSearchUrl)(window.location.href)));(0,t.useEffect)(()=>{const n=()=>{const n=(0,c.resolveSensorSearchUrl)(window.location.href);'canonical-search'!==n.kind&&'legacy-search'!==n.kind||window.location.href===n.canonicalUrl||window.history.replaceState(window.history.state,'',n.canonicalUrl),l(o(n))};return n(),window.addEventListener('popstate',n),window.addEventListener('hashchange',n),()=>{window.removeEventListener('popstate',n),window.removeEventListener('hashchange',n)}},[]);const h=(0,t.useCallback)(t=>{const c=(0,n.buildSensorSearchUrl)(window.location.href,t);window.location.href!==c&&window.history.replaceState(window.history.state,'',c),l(t)},[]);return{submittedSearchText:s,writeSubmittedSearchText:h}};var n=r(d[0]),t=r(d[1]),c=r(d[2]);function o(n){switch(n.kind){case'canonical-search':case'legacy-search':return n.searchText;
54case'invalid-canonical-search':case'invalid-legacy-search':case'no-search':return null;default:return n}}},1283,[1284,34,1285]); 55__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveSensorSearchFragment=function(n){const s=new URLSearchParams(n.startsWith('#')?n.slice(1):n).getAll(t);if(0===s.length)return{kind:'absent'};if(1!==s.length||''===s[0])return{kind:'invalid'};return{kind:'search',searchText:s[0]??''}},e.buildSensorSearchFragment=s,e.buildSensorSearchUrl=function(t,c){const o=new URL(n,t);return o.search='',o.hash=s(c),o.toString()};const n='/my-sensors',t='search';function s(n){const s=new URLSearchParams;return s.set(t,n),`#${s.toString()}`}},1284,[]); 56__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveSensorSearchUrl=function(t){const s=new URL(t),o=(0,n.resolveSensorSearchFragment)(s.hash);if('search'===o.kind)return{canonicalUrl:(0,n.buildSensorSearchUrl)(s.toString(),o.searchText),kind:'canonical-search',searchText:o.searchText};if('invalid'===o.kind)return{kind:'invalid-canonical-search'};const h=c(s.searchParams);if('absent'===h.kind)return{kind:'no-search'};if('invalid'===h.kind)return{kind:'invalid-legacy-search'};const u=l(h.value);if(null===u)return{kind:'invalid-legacy-search'};return{canonicalUrl:(0,n.buildSensorSearchUrl)(s.toString(),u),kind:'legacy-search',searchText:u}};var n=r(d[0]);const t='ids';function c(n){const c=n.getAll(t);return 0===c.length?{kind:'absent'}:1!==c.length||''===c[0]?{kind:'invalid'}:{kind:'present',value:c[0]??''}}function l(n){const t=n.split(/\r?\n/).map(n=>n.trim()).filter(n=>n.length>0).join('\n');return''===t?null:t}},1285,[1284]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.