1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,328976,e=>{"use strict";var t=e.i(843476),s=e.i(500932),l=e.i(271645),a=e.i(657688),n=e.i(618566),r=e.i(174080);function i(e,t,s){let l,a=s.initialDeps??[],n=!0;function r(){var r,i,o;let c,d;s.key&&(null==(r=s.debug)?void 0:r.call(s))&&(c=Date.now());let u=e();if(!(u.length!==a.length||u.some((e,t)=>a[t]!==e)))return l;if(a=u,s.key&&(null==(i=s.debug)?void 0:i.call(s))&&(d=Date.now()),l=t(...u),s.key&&(null==(o=s.debug)?void 0:o.call(s))){let e=Math.round((Date.now()-c)*100)/100,t=Math.round((Date.now()-d)*100)/100,l=t/16,a=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%câ± ${a(t,5)} /${a(e,5)} ms`,` 2 font-size: .6rem; 3 font-weight: bold; 4 color: hsl(${Math.max(0,Math.min(120-120*l,120))}deg 100% 31%);`,null==s?void 0:s.key)}return(null==s?void 0:s.onChange)&&!(n&&s.skipInitialOnChange)&&s.onChange(l),n=!1,l}return r.updateDeps=e=>{a=e},r}function o(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}e.i(247167);let c=e=>{let{offsetWidth:t,offsetHeight:s}=e;return{width:t,height:s}},d=e=>e,u=e=>{let t=Math.max(e.startIndex-e.overscan,0),s=Math.min(e.endIndex+e.overscan,e.count-1),l=[];for(let e=t;e<=s;e++)l.push(e);return l},m=(e,t)=>{let s=e.scrollElement;if(!s)return;let l=e.targetWindow;if(!l)return;let a=e=>{let{width:s,height:l}=e;t({width:Math.round(s),height:Math.round(l)})};if(a(c(s)),!l.ResizeObserver)return()=>{};let n=new l.ResizeObserver(t=>{let l=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t)return void a({width:t.inlineSize,height:t.blockSize})}a(c(s))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return n.observe(s,{box:"border-box"}),()=>{n.unobserve(s)}},h={passive:!0},x="u"<typeof window||"onscrollend"in window,p=(e,t)=>{var s,l;let a,n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,o=e.options.useScrollendEvent&&x?()=>void 0:(s=()=>{t(i,!1)},l=e.options.isScrollingResetDelay,function(...e){r.clearTimeout(a),a=r.setTimeout(()=>s.apply(this,e),l)}),c=s=>()=>{let{horizontal:l,isRtl:a}=e.options;i=l?n.scrollLeft*(a&&-1||1):n.scrollTop,o(),t(i,s)},d=c(!0),u=c(!1);n.addEventListener("scroll",d,h);let m=e.options.useScrollendEvent&&x;return m&&n.addEventListener("scrollend",u,h),()=>{n.removeEventListener("scroll",d),m&&n.removeEventListener("scrollend",u)}},f=(e,t,s)=>{if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[s.options.horizontal?"inlineSize":"blockSize"])}return e[s.options.horizontal?"offsetWidth":"offsetHeight"]},g=(e,{adjustments:t=0,behavior:s},l)=>{var a,n;null==(n=null==(a=l.scrollElement)?void 0:a.scrollTo)||n.call(a,{[l.options.horizontal?"left":"top"]:e+t,behavior:s})};class b{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var e,t,s;return(null==(s=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:s.call(t))??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,s=this.indexFromElement(t);t.isConnected?this.shouldMeasureDuringScroll(s)&&this.resizeItem(s,this.options.measureElement(t,e,this)):this.observer.unobserve(t)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var s;null==(s=t())||s.disconnect(),e=null},observe:e=>{var s;return null==(s=t())?void 0:s.observe(e,{box:"border-box"})},unobserve:e=>{var s;return null==(s=t())?void 0:s.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,s])=>{void 0===s&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:d,rangeExtractor:u,onChange:()=>{},measureElement:f,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",...e}},this.notify=e=>{var t,s;null==(s=(t=this.options).onChange)||s.call(t,this,e)},this.maybeNotify=i(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>
4{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let s=new Map,l=new Map;for(let a=t-1;a>=0;a--){let t=e[a];if(s.has(t.lane))continue;let n=l.get(t.lane);if(null==n||t.end>n.end?l.set(t.lane,t):t.end<n.end&&s.set(t.lane,!0),s.size===this.options.lanes)break}return l.size===this.options.lanes?Array.from(l.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=i(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,s,l,a,n,r)=>(void 0!==this.prevLanes&&this.prevLanes!==n&&(this.lanesChangedFlag=!0),this.prevLanes=n,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:s,getItemKey:l,enabled:a,lanes:n,laneAssignmentMode:r}),{key:!1}),this.getMeasurements=i(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:s,getItemKey:l,enabled:a,lanes:n,laneAssignmentMode:r},i)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let o=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let c=this.measurementsCache.slice(0,o),d=Array(n).fill(void 0);for(let e=0;e<o;e++){let t=c[e];t&&(d[t.lane]=e)}for(let a=o;a<e;a++){let e,n,o=l(a),u=this.laneAssignments.get(a),m="estimate"===r||i.has(o);if(void 0!==u&&this.options.lanes>1){let l=d[e=u],a=void 0!==l?c[l]:void 0;n=a?a.end+this.options.gap:t+s}else{let l=1===this.options.lanes?c[a-1]:this.getFurthestMeasurement(c,a);n=l?l.end+this.options.gap:t+s,e=l?l.lane:a%this.options.lanes,this.options.lanes>1&&m&&this.laneAssignments.set(a,e)}let h=i.get(o),x="number"==typeof h?h:this.options.estimateSize(a),p=n+x;c[a]={index:a,start:n,size:x,end:p,key:o,lane:e},d[e]=a}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=i(()=>
4[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,s,l)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:s,lanes:l}){let a=e.length-1;if(e.length<=l)return{startIndex:0,endIndex:a};let n=v(0,a,t=>e[t].start,s),r=n;if(1===l)for(;r<a&&e[r].end<s+t;)r++;else if(l>1){let i=Array(l).fill(0);for(;r<a&&i.some(e=>e<s+t);){let t=e[r];i[t.lane]=t.end,r++}let o=Array(l).fill(s+t);for(;n>=0&&o.some(e=>e>=s);){let t=e[n];o[t.lane]=t.start,n--}n=Math.max(0,n-n%l),r=Math.min(a,r+(l-1-r%l))}return{startIndex:n,endIndex:r}}({measurements:e,outerSize:t,scrollOffset:s,lanes:l}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=i(()=>{let e=null,t=null,s=this.calculateRange();return s&&(e=s.startIndex,t=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,s,l,a)=>null===l||null===a?[]:e({startIndex:l,endIndex:a,overscan:t,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,s=e.getAttribute(t);return s?parseInt(s,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;let s=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==s&&this.range){let t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),l=Math.max(0,s-t),a=Math.min(this.options.count-1,s+t);return e>=l&&e<=a}return!0},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});let t=this.indexFromElement(e),s=this.options.getItemKey(t),l=this.elementsCache.get(s);l!==e&&(l&&this.observer.unobserve(l),this.observer.observe(e),this.elementsCache.set(s,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var s;let l=this.measurementsCache[e];if(!l)return;let a=t-(this.itemSizeCache.get(l.key)??l.size);0!==a&&((null==(s=this.scrollState)?void 0:s.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(l,a,this):l.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(l.index),this.itemSizeCache=new Map(this.itemSizeCache.set(l.key,t)),this.notify(!1))},this.getVirtualItems=i(()=>
4[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let s=[];for(let l=0,a=e.length;l<a;l++){let a=t[e[l]];s.push(a)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return o(t[v(0,t.length-1,e=>o(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,s=0)=>{if(!this.scrollElement)return 0;let l=this.getSize(),a=this.getScrollOffset();return"auto"===t&&(t=e>=a+l?"end":"start"),"center"===t?e+=(s-l)/2:"end"===t&&(e-=l),Math.max(Math.min(this.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let s=this.getSize(),l=this.getScrollOffset(),a=this.measurementsCache[e];if(!a)return;if("auto"===t)if(a.end>=l+s-this.options.scrollPaddingEnd)t="end";else{if(!(a.start<=l+this.options.scrollPaddingStart))return[l,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let n="end"===t?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(n,t,a.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:s="auto"}={})=>{let l=this.getOffsetForAlignment(e,t),a=this.now();this.scrollState={index:null,align:t,behavior:s,startedAt:a,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:s="auto"}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let l=this.getOffsetForIndex(e,t);if(!l)return;let[a,n]=l,r=this.now();this.scrollState={index:e,align:n,behavior:s,startedAt:r,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{let s=this.getScrollOffset()+e,l=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:l,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var e;let t,s=this.getMeasurements();if(0===s.length)t=this.options.paddingStart;else if(1===this.options.lanes)t=(null==(e=s[s.length-1])?void 0:e.end)??0;else{let e=Array(this.options.lanes).fill(null),l=s.length-1;for(;l>=0&&e.some(e=>null===e);){let t=s[l];null===e[t.lane]&&(e[t.lane]=t.end),l--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:s})=>{this.options.scrollToFn(e,{behavior:s,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,t=e?e[0]:this.scrollState.lastTargetOffset,s=t!==this.scrollState.lastTargetOffset;if(!s&&1.01>Math.abs(t-this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.scrollState=null;return}}else this.scrollState.stableFrames=0,s&&(this.scrollState.lastTargetOffset=t,this.scrollState.behavior="auto",this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}let v=(e,t,s,l)=>{for(;e<=t;){let a=(e+t)/2|0,n=s(a);if(n<l)e=a+1;else{if(!(n>l))return a;t=a-1}}return e>0?e-1:0},j="u">typeof document?l.useLayoutEffect:l.useEffect;function N(e){return function({useFlushSync:e=!0,...t}){let s=l.useReducer(()=>({}),{})[1],a={...t,onChange:(l,a)=>{var n;e&&a?(0,r.flushSync)(s):s(),null==(n=t.onChange)||n.call(t,l,a)}},[n]=l.useState(()=>new b(a));return n.setOptions(a),j(()=>n._didMount(),[]),j(()=>n._willUpdate()),n}({observeElementRect:m,observeElementOffset:p,scrollToFn:g,...e})}var y=e.i(871689),_=e.i(972520),S=e.i(649582),w=e.i(555436),k=e.i(37727),C=e.i(613648),O=e.i(503116),A=e.i(878894);let M=(0,e.i(475254).default)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var E=e.i(367240),$=e.i(897250),L=e.i(991799),I=e.i(351717),R=e.i(797330),T=e.i(497114);e.i(842917);var F=e.i(639789),D=e.i(686873),z=e.i(660386),U=e.i(728762);e.i(596974);var P=e.i(758574),Y=e.i(729793),B=e.i(975157),W=e.i(882943),G=e.i(234049);function H(e){return e?e.split(",").map(e=>/^\d+$/.test(e)?Number(e):e):[]}let K="grid-cols-[88px_112px_minmax(180px,1.4fr)_100px_110px_minmax(130px,1.2fr)_minmax(130px,1.2fr)_minmax(130px,1.1fr)_minmax(130px,1.1fr)_80px_100px]",V={all:"/all_orbits_icon-64.webp",geo:"/GEO.svg",leo:"/LEO.svg",meo:"/MEO.svg",heo:"/HEO.svg"};function q(e){return e.norad_number?`/satellites?norad=${e.norad_number}`:`/satellites?name=${encodeURIComponent(e.name)}
4`}function J(e){switch(e){case"active":return"bg-success";case"inactive":case"retired":case"deorbited":case"decayed":default:return"bg-muted-foreground";case"inclined":return"bg-warning";case"planned":return"bg-primary"}}function X(e,t){switch((e??"").trim().toUpperCase()){case"DEBRIS":case"ROCKET BODY":case"R/B":return!1;case"TBA":case"UNKNOWN":return t;default:return!0}}function Z(e){return"decayed"===e.status||!!e.decay_date}function Q(e){return Z(e)||"retired"===e.status||"deorbited"===e.status||"inactive"===e.status}function ee(e){switch(e){case"active":return"Active";case"inactive":return"Inactive";case"retired":return"Retired";case"deorbited":return"Deorbited";case"decayed":return"Decayed";case"inclined":return"Inclined";case"planned":return"Planned";default:return e?e[0].toUpperCase()+e.slice(1):"Unknown"}}let et=["GEO","MEO","LEO","HEO"];function es(e){let t=e.toUpperCase();return"UNCLASSIFIED"===t||"DEBRIS"===t||"UNKNOWN"===t}function el({initialDetail:e,initialTle:s}){let r,i,o=(0,n.useRouter)(),c=(0,n.useSearchParams)(),d=c.get("id"),{selectedSatellite:u,clearSelection:m,orbitFilter:h,setOrbitFilter:x}=(0,G.useSatelliteSelectorStore)(),[,p]=(0,l.useTransition)(),f="all"!==h,[g,b]=(0,l.useState)(e?String(e.id):null),v=u?.orbitType==="geo"?u.id.toString():d??g,j=u?"geo"!==u.orbitType?u.id:null:s?.norad_cat_id??null,[N,C]=(0,l.useState)([]),[O,A]=(0,l.useState)(null),[M,$]=(0,l.useState)(!1),L=(0,l.useRef)(!1),[I,R]=(0,l.useState)([]),[F,D]=(0,l.useState)(null),[z,P]=(0,l.useState)(!1),[Y,W]=(0,l.useState)(e),[K,J]=(0,l.useState)(!1),[Q,ee]=(0,l.useState)(s),[et,ea]=(0,l.useState)(null),[er,ei]=(0,l.useState)(!0),[eo,ec]=(0,l.useState)(!0),ed=!!c.get("norad")&&!c.get("id"),[eu,em]=(0,l.useState)(()=>({name:c.get("sort")??"norad",type:c.get("dir")??"desc"})),[eh,ex]=(0,l.useState)(()=>({name:c.get("name")??"",norad:(ed?null:c.get("norad"))??"",cospar:c.get("cospar")??"",operator:c.get("operator")??"",launchvehicle:c.get("launchvehicle")??"",status:H(c.get("status")),model:H(c.get("model")),launchsite:H(c.get("launchsite")),mass_value:c.get("mass_value")??"",mass_op:c.get("mass_op")??"gt",date_after:c.get("date_after")??"",date_before:c.get("date_before")??""})),[ep,ef]=(0,l.useState)(!1),[eg,eb]=(0,l.useState)(()=>!ed&&!!c.get("norad")||["name","cospar","operator","launchvehicle","status","model","launchsite","mass_value","date_after","date_before","sort"].some(e=>!!c.get(e))),ev=(0,l.useMemo)(()=>""!==eh.norad||""!==eh.cospar||""!==eh.operator||""!==eh.launchvehicle||""!==eh.mass_value||""!==eh.date_after||""!==eh.date_before||eh.status.length>0||eh.model.length>0||eh.launchsite.length>0,[eh]),ej=eg||eh.name.trim().length>0||ev,ey=(0,l.useCallback)(()=>{ex({name:"",norad:"",cospar:"",operator:"",launchvehicle:"",status:[],model:[],launchsite:[],mass_value:"",mass_op:"gt",date_after:"",date_before:""}),eb(!1)},[]),eS=(0,l.useCallback)(()=>{let e={};return"all"!==h&&(e.orbit=h.toUpperCase()),eh.name&&(e.name=eh.name),eh.norad&&(e.norad=eh.norad),eh.cospar&&(e.cospar=eh.cospar),eh.launchvehicle&&(e.launchvehicle=eh.launchvehicle),eh.operator&&(e.operator=eh.operator),eh.status.length>0&&(e.status=eh.status.join(",")),eh.model.length>0&&(e.model=eh.model.join(",")),eh.launchsite.length>0&&(e.launchsite=eh.launchsite.join(",")),eh.mass_value&&(e[`mass.${eh.mass_op}`]=eh.mass_value),eh.date_after&&(e["date.after"]=eh.date_after),eh.date_before&&(e["date.before"]=eh.date_before),e},[eh,h]),ew=(0,l.useCallback)(async()=>{ei(!0);try{let e=(await U.satelliteApi.getSatellites({lite:1,limit:500,offset:0,sort:eu.name||void 0,dir:"none"!==eu.type?eu.type:void 0,...eS()})).data.satellites||[];C(e),$(500===e.length)}catch(e){console.error("Failed to load satellites:",e)}finally{ei(!1),ec(!1)}},[eu,eS]),ek=(0,l.useCallback)(async()=>{if(!L.current){L.current=!0;try{let e=(await U.satelliteApi.getSatellites({lite:1,limit:500,offset:N.length,sort:eu.name||void 0,dir:"none"!==eu.type?eu.type:void 0,...eS()})).data.satellites||[];C(t=>[...t,...e]),$(500===e.length)}catch(e){console.error("Failed to load more satellites:",e)}finally{L.current=!1}}},[N.length,eu,eS]),eC=(0,l.useCallback)(async()=>
4{try{let e=await U.satelliteApi.getSatelliteStats({...eS(),operators:"all"});A(e.data)}catch(e){console.error("Failed to load satellite stats:",e)}},[eS]),eO=(0,l.useCallback)(async()=>{try{let e=await U.satelliteApi.getFilterInitLists();ea(e.data)}catch(e){console.error("Failed to load filter lists:",e)}},[]),eM=(0,l.useRef)(0),eE=(0,l.useCallback)(async e=>{let t=++eM.current;W(null),J(!1);try{let s=await U.satelliteApi.getSatellite(e);eM.current===t&&W(s.data)}catch(e){console.error("Failed to load satellite detail:",e),eM.current===t&&J(!0)}},[]);(0,l.useEffect)(()=>{let e=setTimeout(()=>{ew(),eC()},200);return()=>clearTimeout(e)},[ew,eC]),(0,l.useEffect)(()=>{eO()},[eO]),(0,l.useEffect)(()=>{v?0===eM.current&&e&&String(e.id)===v||eE(parseInt(v)):(eM.current++,W(null),J(!1))},[v,eE,e]),(0,l.useEffect)(()=>{if(Y){Y.norad_number?(0,B.patchSearchParams)({norad:Y.norad_number,id:null}):(0,B.patchSearchParams)({id:null}),document.title=`${Y.name}${Y.position_display?` at ${Y.position_display}`:""} \xb7 Satbeams`;return}j&&((0,B.patchSearchParams)({norad:j,id:null}),u?.name&&(document.title=`${u.name} \xb7 Satbeams`))},[Y,j,u]);let e$=(0,l.useRef)(!1);(0,l.useEffect)(()=>{e$.current||(e$.current=!0,!u||(d||c.get("norad")||!d&&eg)&&m())},[]);let eR=(0,l.useRef)(e?.norad_number?String(e.norad_number):null);(0,l.useEffect)(()=>{let e=c.get("norad");if(!c.get("id")){if(!e){null!==eR.current&&(eR.current=null,b(null));return}eR.current===e||s&&String(s.norad_cat_id)===e||(eR.current=e,U.satelliteApi.getSatelliteByNorad(parseInt(e,10)).then(e=>
4{if(!e?.id)throw Error("no match");b(String(e.id))}).catch(()=>{ex(t=>({...t,norad:e})),eb(!0)}))}},[c,s]),(0,l.useEffect)(()=>{let e="norad"===eu.name&&"desc"===eu.type;(0,B.patchSearchParams)({name:eh.name,...ed||v||j?{}:{norad:eh.norad},cospar:eh.cospar,operator:eh.operator,launchvehicle:eh.launchvehicle,status:eh.status.join(","),model:eh.model.join(","),launchsite:eh.launchsite.join(","),mass_value:eh.mass_value,mass_op:eh.mass_value&&"gt"!==eh.mass_op?eh.mass_op:null,date_after:eh.date_after,date_before:eh.date_before,sort:e?null:eu.name||null,dir:e||!eu.name?null:eu.type})},[eh,eu,d,v,j,ed]),(0,l.useEffect)(()=>{if(!j)return void ee(null);if(s&&s.norad_cat_id===j)return;let e=!1;return U.tleApi.getSatellite(j).then(t=>{e||ee(t.data)}).catch(()=>{e||ee(null)}),()=>{e=!0}},[j,s]),(0,l.useEffect)(()=>{if(!f){R([]),D(null);return}let e=!1;return P(!0),D(null),U.tleApi.getConstellationSummaries(h).then(t=>{e||(D(t.data.constellations||[]),R([]),P(!1))}).catch(()=>{U.tleApi.getByOrbitType(h,void 0,void 0,!0).then(t=>{e||(D(null),R(t.data.satellites||[]))}).catch(()=>{e||R([])}).finally(()=>{e||P(!1)})}),()=>{e=!0}},[f,h]);let eT=(0,l.useCallback)((e,t)=>{p(()=>{ex(s=>({name:"",norad:"",cospar:"",operator:e,launchvehicle:"",status:[],model:[],launchsite:[],mass_value:"",mass_op:s.mass_op,date_after:t??"",date_before:t??""})),eb(!0)})},[p]),eF=(0,l.useMemo)(()=>{let e={total:0,active:0};return{counts:O?.counts??{total:0,active:0,inactive:0,planned:0,inclined:0},byOrbit:O?.by_orbit??{geo:e,leo:e,meo:e,heo:e,other:e},topOperators:O?.top_operators??[]}},[O]),eD=(0,l.useMemo)(()=>{let e=eF.topOperators.map(e=>({name:e.name,picture:e.picture,color:e.color??null,trackedObjects:e.count,total:e.count,active:e.active??0,decayed:0,firstYear:e.first_year||null,lastYear:e.last_year||null,avgPeriod:0,avgInclination:0,satellites:[]}));return e.sort((e,t)=>t.active-e.active||t.total-e.total),e},[eF.topOperators]),[ez,eU]=(0,l.useState)(null);(0,l.useEffect)(()=>{if("all"!==h)return;let e=!1;return U.tleApi.getStats().then(t=>{if(e)return;let s=t.data.total_satellites??0;eU({total:s,unclassified:Math.max(0,s-(t.data.by_object_type?.PAYLOAD??0))})}).catch(()=>{e||eU(null)}),()=>{e=!0}},[h]);let[eY,eB]=(0,l.useState)(null);(0,l.useEffect)(()=>{let e=eh.operator.trim();if(!e)return void eB(null);let t=!1;return U.satelliteApi.getOperatorProfile(e).then(e=>{t||eB(e.data)}).catch(()=>{t||eB(null)}),()=>{t=!0}},[eh.operator]);let[eW,eG]=(0,l.useState)(null);(0,l.useEffect)(()=>{let e=eh.operator.trim();if(!e)return void eG(null);let t=!1;return U.satelliteApi.getSatelliteStats({operator:e}).then(e=>{t||eG(e.data.by_orbit)}).catch(()=>{t||eG(null)}),()=>{t=!0}},[eh.operator]);let eH=(0,l.useMemo)(()=>{let e=eh.name.trim().toLowerCase();if(!e)return null;let t=N.findIndex(t=>{let s;return!((s=(t.name||"").toLowerCase()).startsWith(e)||s.includes(` ${e}`)||s.includes(`-${e}`))});return -1===t?null:t},[N,eh.name]),[eK,eV]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=eh.operator.trim();if(!e)return void eV([]);let t=!1;return U.satelliteApi.getSatellites({operator:e,orbit:"GEO",lite:1,limit:2e3}).then(e=>{if(t)return;let s=new Set;for(let t of e.data.satellites||[]){if("active"!==t.status)continue;let e=t.position_rounded??t.position_real;null==e||Number.isNaN(e)||s.add(Math.round(10*e)/10)}eV(Array.from(s).sort((e,t)=>e-t))}).catch(()=>{t||eV([])}),()=>{t=!0}},[eh.operator]);let eq=(0,l.useMemo)(()=>{let e=[...O?.recent_launches??[]].filter(e=>e.launch_date).sort((e,t)=>(t.launch_date||"").localeCompare(e.launch_date||"")),t=[];for(let s of e){let e=t[t.length-1];if(e&&e.sat.launch_date?.slice(0,10)===s.launch_date?.slice(0,10)&&(e.sat.operator_name||"")===(s.operator_name||"")){e.count++;continue}if(8===t.length)break;t.push({sat:s,count:1})}return t},[O]),eJ=e=>"Unknown"===e||"UNCLASSIFIED"===e.toUpperCase(),eX=(0,l.useMemo)(()=>{if(!f)return[];if(F){let e=F.map(e=>({name:e.name,operatorName:e.operator_name||null,picture:e.operator_picture||null,color:e.operator_color||null,trackedObjects:e.tracked_objects,total:e.total,active:e.active,decayed:e.decayed,firstYear:e.first_year||null,lastYear:e.last_year||null,avgPeriod:e.avg_period,avgInclination:e.avg_inclination,satellites:[]}));return e.sort((e,t)=>
4eJ(e.name)!==eJ(t.name)?eJ(e.name)?1:-1:t.active-e.active||t.total-e.total),e}let e=new Map;for(let t of I){let s=t.constellation||"Unknown";e.has(s)||e.set(s,[]),e.get(s).push(t)}let t=[];for(let[s,l]of e){let e=l.filter(e=>X(e.object_type,!es(s))),a=Array.from(new Set(e.map(e=>e.launch_date?.slice(0,4)).filter(e=>!!e))).sort(),n=e.filter(e=>Z(e)).length,r=e.length-n;t.push({name:s,picture:l.find(e=>e.operator_picture)?.operator_picture??null,trackedObjects:l.length,total:e.length,active:r,decayed:n,firstYear:a[0]??null,lastYear:a[a.length-1]??null,avgPeriod:e.reduce((e,t)=>e+(t.period||0),0)/Math.max(1,e.length),avgInclination:e.reduce((e,t)=>e+(t.inclination||0),0)/Math.max(1,e.length),satellites:e})}return t.sort((e,t)=>eJ(e.name)!==eJ(t.name)?eJ(e.name)?1:-1:t.active-e.active||t.total-e.total),t},[f,F,I]);if(!Y&&v&&!j)return(0,t.jsx)("div",{className:"p-8 text-sm text-muted-foreground",children:K?(0,t.jsxs)(t.Fragment,{children:["Could not load this satellite."," ",(0,t.jsx)("button",{type:"button",onClick:()=>eE(parseInt(v)),className:"text-primary hover:underline",children:"Try again"})]}):"Loading satelliteâ¦"});if(Y){let e="channels"===c.get("from");return(0,t.jsx)(eP,{detail:Y,backLabel:e?"Back to channels":eg&&eh.operator.trim()||"Satellite Directory",onBack:()=>{m(),b(null),eR.current=null,o.replace(e?"/channels":"/satellites")}})}if(j&&(u||s))return(0,t.jsx)(e0,{norad:j,name:u?.name??s?.object_name??String(j),orbitType:u?.orbitType??s?.orbit_type?.toLowerCase()??"leo",tle:Q,backLabel:`${(u?.orbitType??s?.orbit_type??"LEO").toUpperCase()} constellations`,onBack:()=>{m(),b(null),eR.current=null,(0,B.patchSearchParams)({norad:null,id:null}),document.title="Satellites - GEO Satellite Database & Information | Satbeams"}});if(f&&!eg)return(0,t.jsx)(en,{orbitType:h,loading:z,constellations:eX,onPickConstellation:e=>eT(e),afterGrid:(0,t.jsx)("section",{children:(0,t.jsxs)("button",{onClick:()=>eb(!0),className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2 text-sm font-medium transition-colors hover:bg-muted",children:["All satellites",(0,t.jsx)(_.ArrowRight,{className:"h-3.5 w-3.5"})]})})});if(!eg)return(0,t.jsx)(en,{orbitType:"geo",directory:!0,loading:eo||!O,constellations:eD,census:ez,composition:null,focused:null,onPickConstellation:eT,onClearConstellation:()=>{},onPickSatellite:()=>{},beforeGrid:eF.counts.total>0?(0,t.jsxs)("section",{children:[(0,t.jsx)("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Orbit distribution"}),(0,t.jsx)(eA,{counts:eF.byOrbit})]}):null,afterGrid:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eN,{latestLaunches:eq,onPickOperator:eT,onSelectSatellite:e=>o.push(q(e))}),(0,t.jsx)("section",{children:(0,t.jsxs)("button",{onClick:()=>eb(!0),className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2 text-sm font-medium transition-colors hover:bg-muted",children:["All satellites",(0,t.jsx)(_.ArrowRight,{className:"h-3.5 w-3.5"})]})})]})});let eZ=O?.counts.total,eQ=/^\d{4}-01-01$/.test(eh.date_after)&&eh.date_before===`${eh.date_after.slice(0,4)}-12-31`?parseInt(eh.date_after.slice(0,4),10):null;return(0,t.jsxs)("div",{className:"mx-auto flex min-h-0 w-full max-w-[1400px] flex-col px-3 py-6 sm:px-6 sm:py-8",children:[(0,t.jsxs)("button",{onClick:ey,className:"mb-3 flex shrink-0 items-center gap-2 self-start rounded-lg px-1 py-1 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[(0,t.jsx)(y.ArrowLeft,{className:"h-4 w-4"})," ",f?`${h.toUpperCase()} constellations`:"Satellite Directory"]}),(0,t.jsx)("header",{className:"mb-5 flex flex-wrap items-end justify-between gap-3",children:(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[eY?.picture&&(0,t.jsx)("img",{src:(0,U.proxiedLogo)(eY.picture),alt:"",className:"h-10 w-10 shrink-0 rounded-lg bg-card object-contain ring-1 ring-white/10",draggable:!1}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h1",{className:"break-words text-xl font-bold tracking-tight sm:text-2xl",children:eh.operator.trim()||"Satellite Directory"}),(0,t.jsxs)("p",{className:"mt-1 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{className:"tabular-nums",children:eo?"
4Loadingâ¦":`${(eZ??N.length).toLocaleString()} satellite${(eZ??N.length)===1?"":"s"}`}),ej&&!er&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground/80",children:"· filtered"})]})]})]})}),eh.operator&&eW&&(0,t.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)("span",{className:"mr-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Orbit"}),["all","geo","meo","leo","heo"].map(e=>{let s="all"===e?null:eW[e],l="all"===e?Object.values(eW).reduce((e,t)=>e+(t?.total??0),0):s?.total??0,n="all"===e?Object.values(eW).reduce((e,t)=>e+(t?.active??0),0):s?.active??0;if("all"!==e&&0===l)return null;let r=h===e,i="all"===e?"":`${e.toUpperCase()} `;return(0,t.jsxs)("button",{onClick:()=>x(e),className:(0,B.cn)("flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs transition-colors",r?"border-primary/40 bg-primary/10 text-foreground":"border-border text-muted-foreground hover:bg-muted hover:text-foreground"),title:`${l} ${i}satellite${1===l?"":"s"}, ${n} active`,children:[(0,t.jsx)(a.default,{src:V[e],alt:"",width:14,height:14,className:"h-3.5 w-3.5 shrink-0 object-contain"}),(0,t.jsx)("span",{className:"font-semibold uppercase",children:"all"===e?"All":e}),(0,t.jsx)("span",{className:"tabular-nums",children:l.toLocaleString()}),n>0&&(0,t.jsxs)("span",{className:"tabular-nums text-success",children:["· ",n.toLocaleString()]})]},e)})]}),(r="geo"!==h&&!!eY?.composition,i=("geo"===h||"all"===h)&&eK.length>0,eh.operator&&(r||i)?(0,t.jsxs)("div",{className:"glass-card mb-4 space-y-3 p-4",children:[i&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"GEO orbital slots"}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:eK.length})," active"," ",1===eK.length?"slot":"slots"," occupied:"," ",(0,t.jsx)("span",{className:"tabular-nums",children:eK.map(e=>(0,B.formatPosition)(e)).join(", ")})]})]}),r&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Fleet composition"}),(0,t.jsx)("p",{className:"whitespace-pre-line text-sm text-muted-foreground",children:eY?.composition})]})]}):null),eh.operator&&O?.launches_by_year&&(0,t.jsx)(e_,{byYear:O.launches_by_year,activeYear:eQ,onYearClick:e=>{let t=eQ===e;ex(s=>({...s,date_after:t?"":`${e}-01-01`,date_before:t?"":`${e}-12-31`}))}}),(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"relative max-w-md flex-1",children:[(0,t.jsx)(w.Search,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)("input",{type:"text",value:eh.name,onChange:e=>ex(t=>({...t,name:e.target.value})),placeholder:"Search by nameâ¦",className:"w-full rounded-lg border border-border bg-input py-2 pl-8 pr-8 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"}),eh.name&&(0,t.jsx)("button",{onClick:()=>ex(e=>({...e,name:""})),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:(0,t.jsx)(k.X,{className:"h-3.5 w-3.5"})})]}),(0,t.jsxs)("button",{onClick:()=>ef(!ep),className:(0,B.cn)("relative shrink-0 rounded-lg px-3 py-2 text-sm font-medium transition-colors",ep?"bg-primary text-primary-foreground":ev?"bg-primary/10 text-primary ring-1 ring-primary/30":"text-muted-foreground hover:bg-muted hover:text-foreground"),title:ep?"Hide filters":"Show filters",children:[(0,t.jsx)(S.SlidersHorizontal,{className:"h-4 w-4"}),ev&&!ep&&(0,t.jsx)("span",{className:"absolute -right-1 -top-1 h-2.5 w-2.5 rounded-full border-2 border-card bg-primary"})]}),(ev||eh.name)&&(0,t.jsxs)("button",{onClick:ey,className:"flex shrink-0 items-center gap-1.5 rounded-lg px-3 py-2 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:"Reset filters",children:[(0,t.jsx)(E.RotateCcw,{className:"h-3.5 w-3.5"}),"Reset"]})]}),ep&&(0,t.jsx)("div",{className:"glass-card mb-4 animate-slide-up p-4",children:(0,t.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5",children:[(0,t.jsx)(T.TextFilter,{label:"NORAD",value:eh.norad,onChange:e=>ex(t=>({...t,norad:e})),placeholder:"e.g. 28884"}),(0,t.jsx)(T.TextFilter,{label:"COSPAR",value:eh.cospar,onChange:e=>ex(t=>({...t,cospar:e})),placeholder:"e.g. 2005-028A"}),(0,t.jsx)(T.TextFilter,{label:"Operator",value:eh.operator,onChange:e=>ex(t=>({...t,operator:e})),placeholder:"e.g. SES, Eutelsatâ¦"}),(0,t.jsx)(T.MultiSelectFilter,{label:"Status",options:et?.status||[],selected:eh.status,onChange:e=>ex(t=>({...t,status:e}))}),(0,t.jsx)(T.MultiSelectFilter,{label:"Model",options:et?.models||[],selected:eh.model,onChange:e=>ex(t=>({...t,model:e}))}),(0,t.jsx)(T.MultiSelectFilter,{label:"Launch Site",options:et?.launch_sites||[],selected:eh.launchsite,onChange:e=>ex(t=>({...t,launchsite:e}))}),(0,t.jsx)(T.TextFilter,{label:"Launch Vehicle",value:eh.launchvehicle,onChange:e=>ex(t=>({...t,launchvehicle:e})),placeholder:"e.g. Falcon 9, Ariane 5â¦"}),(0,t.jsx)(T.NumberFilter,{label:"Mass (kg)",value:eh.mass_value,operator:eh.mass_op,onChange:(e,t)=>
4ex(s=>({...s,mass_value:e,mass_op:t}))}),(0,t.jsx)(T.DateRangeFilter,{label:"Launch date",after:eh.date_after,before:eh.date_before,onChange:(e,t)=>ex(s=>({...s,date_after:e,date_before:t}))})]})}),(0,t.jsx)("div",{className:"hidden min-h-0 flex-1 md:flex md:flex-col",children:(0,t.jsx)(eL,{satellites:N,loading:er,initialLoad:eo,sort:eu,onSort:e=>em(t=>t.name!==e?{name:e,type:"asc"}:"asc"===t.type?{name:e,type:"desc"}:{name:"",type:"none"}),onRowClick:e=>o.push(q(e)),onLoadMore:ek,hasMore:M,aliasFrom:eH,showSortHeaders:!0})}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(eI,{satellites:N,loading:er,initialLoad:eo,onRowClick:e=>o.push(q(e)),onLoadMore:ek,hasMore:M,aliasFrom:eH})})]})}function ea(e){let l,a,n,r,i=(0,s.c)(19),{picture:o,color:c,size:d}=e,u="lg"===d?"h-11 w-11":"h-9 w-9",m="lg"===d?"h-5 w-5":"h-4 w-4";if(o){let e,s,l,a;return i[0]!==u?(e=(0,B.cn)(u,"flex shrink-0 items-center justify-center overflow-hidden rounded-lg bg-card shadow-sm ring-1 ring-white/10"),i[0]=u,i[1]=e):e=i[1],i[2]!==o?(s=(0,U.proxiedLogo)(o),i[2]=o,i[3]=s):s=i[3],i[4]!==s?(l=(0,t.jsx)("img",{src:s,alt:"",className:"h-full w-full object-contain",draggable:!1}),i[4]=s,i[5]=l):l=i[5],i[6]!==e||i[7]!==l?(a=(0,t.jsx)("div",{className:e,children:l}),i[6]=e,i[7]=l,i[8]=a):a=i[8],a}return i[9]!==u?(l=(0,B.cn)(u,"flex shrink-0 items-center justify-center rounded-lg shadow-sm ring-1 ring-white/10"),i[9]=u,i[10]=l):l=i[10],i[11]!==c?(a={backgroundColor:c},i[11]=c,i[12]=a):a=i[12],i[13]!==m?(n=(0,t.jsx)(C.Satellite,{className:m}),i[13]=m,i[14]=n):n=i[14],i[15]!==l||i[16]!==a||i[17]!==n?(r=(0,t.jsx)("div",{className:l,style:a,children:n}),i[15]=l,i[16]=a,i[17]=n,i[18]=r):r=i[18],r}function en(e){let l,a,n,r,i,o,c,d,u,m,h,x,p,f,g,b,v=(0,s.c)(62),{orbitType:j,directory:N,loading:y,constellations:S,census:w,composition:k,focused:O,focusedLoading:A,onSwitchOrbit:M,onPickConstellation:E,onClearConstellation:$,onPickSatellite:L,beforeGrid:I,afterGrid:R}=e,T=void 0!==N&&N,F=void 0===k?null:k,z=void 0===O?null:O,U=void 0!==A&&A,P=S.reduce(eu,0);v[0]!==S?(l=S.reduce(ed,0),v[0]=S,v[1]=l):l=v[1];let Y=l,B=S.reduce(ec,0);v[2]!==w||v[3]!==P||v[4]!==B?(a=w??{total:B,unclassified:Math.max(0,B-P)},v[2]=w,v[3]=P,v[4]=B,v[5]=a):a=v[5];let W=a;if(y&&0===S.length){let e,s;return v[6]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"glass-card h-24 animate-pulse"}),v[6]=e):e=v[6],v[7]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsxs)("div",{className:"mx-auto flex h-full max-w-[1400px] flex-col gap-4 px-3 py-6 sm:px-6 sm:py-8",children:[e,(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6}).map(eo)})]}),v[7]=s):s=v[7],s}if(z){let e,s=$??ei,l=L??er;return v[8]!==F||v[9]!==z||v[10]!==U||v[11]!==M||v[12]!==j||v[13]!==s||v[14]!==l?(e=(0,t.jsx)(em,{focused:z,loading:U,defaultOrbit:j,composition:F,onSwitchOrbit:M,onClear:s,onPickSatellite:l}),v[8]=F,v[9]=z,v[10]=U,v[11]=M,v[12]=j,v[13]=s,v[14]=l,v[15]=e):e=v[15],e}v[16]!==T||v[17]!==j?(n=T?"Satellite Directory":`${j.toUpperCase()} constellations`,v[16]=T,v[17]=j,v[18]=n):n=v[18],v[19]!==n?(r=(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:n}),v[19]=n,v[20]=r):r=v[20],v[21]!==S.length?(i=S.length.toLocaleString(),v[21]=S.length,v[22]=i):i=v[22];let G=T?"operator":"constellation",H=1===S.length?"":"s";v[23]!==P?(o=P.toLocaleString(),v[23]=P,v[24]=o):o=v[24],v[25]!==o?(c=(0,t.jsx)("span",{className:"tabular-nums",children:o}),v[25]=o,v[26]=c):c=v[26];let K=1===P?"":"s";if(v[27]!==Y?(d=Y.toLocaleString(),v[27]=Y,v[28]=d):d=v[28],v[29]!==d?(u=(0,t.jsxs)("span",{className:"text-success",children:[d," active"]}),v[29]=d,v[30]=u):u=v[30],v[31]!==G||v[32]!==H||v[33]!==c||v[34]!==K||v[35]!==u||v[36]!==i?(m=(0,t.jsxs)("p",{className:"mt-1 text-sm text-muted-foreground",children:[i," ",G,H," ·"," ",c," satellite",K," ·"," ",u]}),v[31]=G,v[32]=H,v[33]=c,v[34]=K,v[35]=u,v[36]=i,v[37]=m):m=v[37],v[38]!==m||v[39]!==r?(h=(0,t.jsxs)("header",{children:[r,m]}),v[38]=m,v[39]=r,v[40]=h):h=v[40],v[41]!==W.total||v[42]!==W.unclassified?(x=W.total>0&&(0,t.jsxs)("section",{className:"glass-card flex flex-wrap gap-x-10 gap-y-5 p-5",children:[(0,t.jsx)(ey,{label:"Total objects",value:W.total,tone:"border-primary"}),(0,t.jsx)(ey,{label:"Unclassified",value:W.unclassified,tone:"border-warning"})]}),v[41]=W.total,v[42]=W.unclassified,v[43]=x):x=v[43],v[44]!==S||v[45]!==E){let e;v[47]!==E?(e=e=>{let s=e.color||(0,D.getConstellationColor)(e.name),l=e.total>0?e.active/e.total*100:0,a=e.operatorName||e.name;return(0,t.jsxs)("button",{onClick:()=>E(a),className:"group glass-card flex flex-col gap-3 p-4 text-left transition-all hover:-translate-y-0.5 hover:border-primary/30 hover:shadow-md",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[!es(e.name)&&(0,t.jsx)(ea,{picture:e.picture,color:s,size:"sm"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"truncate text-sm font-semibold",title:a,children:a}),e.operatorName&&e.operatorName.toUpperCase()!==e.name.toUpperCase()&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 truncate text-[11px] text-muted-foreground",title:`Constellation: ${e.name}`,children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full",style:{backgroundColor:s}}),(0,t.jsx)("span",{className:"truncate",children:e.name})]}),(0,t.jsx)("div",{className:"truncate text-[11px] text-muted-foreground
4/70",children:e.firstYear&&e.lastYear?e.firstYear===e.lastYear?e.firstYear:`${e.firstYear} â ${e.lastYear}`:"Launch date unknown"})]}),(0,t.jsx)(_.ArrowRight,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5 group-hover:text-primary"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",title:"Satellites. Debris and spent rocket stages are counted separately.",children:"Satellites"}),(0,t.jsx)("div",{className:"font-bold tabular-nums",children:e.total.toLocaleString()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Active"}),(0,t.jsx)("div",{className:"font-bold tabular-nums text-success",children:e.active.toLocaleString()})]})]}),e.trackedObjects>e.total&&(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-muted-foreground/70",title:"Debris and spent rocket stages catalogued under this operator. They are tracked objects, not satellites.",children:["+",(e.trackedObjects-e.total).toLocaleString()," debris / rocket bodies tracked"]}),(0,t.jsx)("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-muted",title:`${e.active.toLocaleString()} of ${e.total.toLocaleString()} active`,children:(0,t.jsx)("div",{className:"h-full",style:{width:`${l}%`,backgroundColor:s}})})]},e.name)},v[47]=E,v[48]=e):e=v[48],p=S.map(e),v[44]=S,v[45]=E,v[46]=p}else p=v[46];return v[49]!==p?(f=(0,t.jsx)("section",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:p}),v[49]=p,v[50]=f):f=v[50],v[51]!==S.length||v[52]!==y||v[53]!==j?(g=0===S.length&&!y&&(0,t.jsxs)("div",{className:"glass-card p-10 text-center",children:[(0,t.jsx)(C.Satellite,{className:"mx-auto mb-3 h-8 w-8 text-muted-foreground/60"}),(0,t.jsxs)("p",{className:"text-sm font-medium",children:["No ",j.toUpperCase()," satellites available"]}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Switch orbit mode in the sidebar, or check back once the TLE pipeline has run."})]}),v[51]=S.length,v[52]=y,v[53]=j,v[54]=g):g=v[54],v[55]!==R||v[56]!==I||v[57]!==h||v[58]!==x||v[59]!==f||v[60]!==g?(b=(0,t.jsxs)("div",{className:"mx-auto flex min-h-full max-w-[1400px] flex-col gap-6 px-3 pb-10 pt-8 sm:px-6 sm:pt-10",children:[h,x,I,f,g,R]}),v[55]=R,v[56]=I,v[57]=h,v[58]=x,v[59]=f,v[60]=g,v[61]=b):b=v[61],b}function er(){}function ei(){}function eo(e,s){return(0,t.jsx)("div",{className:"glass-card h-32 animate-pulse"},s)}function ec(e,t){return e+t.trackedObjects}function ed(e,t){return e+t.active}function eu(e,t){return e+t.total}function em(e){let a,n,r,i,o,c,d,u,m,h,x,p,f,g,b,v,j,N,_,S,w,k,C,O,A,M,E,$,L,I,R,T,F,z,U=(0,s.c)(108),{focused:P,loading:Y,defaultOrbit:W,composition:G,onSwitchOrbit:H,onClear:K,onPickSatellite:V}=e;U[0]!==P.color||U[1]!==P.name?(a=P.color||(0,D.getConstellationColor)(P.name),U[0]=P.color,U[1]=P.name,U[2]=a):a=U[2];let q=a;U[3]!==P.name?(n=es(P.name),U[3]=P.name,U[4]=n):n=U[4];let J=n,[Z,ee]=(0,l.useState)(W);if(U[5]!==W?(r=()=>{ee(W)},i=[W],U[5]=W,U[6]=r,U[7]=i):(r=U[6],i=U[7]),(0,l.useEffect)(r,i),U[8]!==P.satellites||U[9]!==J){let e;U[11]!==J?(e=e=>X(e.object_type,!J),U[11]=J,U[12]=e):e=U[12],o=P.satellites.filter(e),U[8]=P.satellites,U[9]=J,U[10]=o}else o=U[10];let et=o;if(U[13]!==et){let e=new Map;for(let t of et){let s=(t.orbit_type||"OTHER").toUpperCase(),l=e.get(s)??{total:0,active:0};l.total=l.total+1,Q(t)||(l.active=l.active+1),e.set(s,l)}c=Array.from(e.entries()).map(ev).sort(eb),U[13]=et,U[14]=c}else c=U[14];let el=c,en=el.length>1,er=el.reduce(eg,0);e:{let e;if("all"===Z){d=et;break e}if(U[15]!==et||U[16]!==Z){let t;U[18]!==Z?(t=e=>(e.orbit_type||"").toLowerCase()===Z,U[18]=Z,U[19]=t):t=U[19],e=et.filter(t),U[15]=et,U[16]=Z,U[17]=e}else e=U[17];d=e}let ei=d,eo=Y&&Z===W,ec=eo?P.total:ei.length;U[20]!==P.active||U[21]!==ei||U[22]!==eo?(u=eo?P.active:ei.filter(ef).length,U[20]=P.active,U[21]=ei,U[22]=eo,U[23]=u):u=U[23];let ed=u;t:{let e,t;if(eo){let e;U[24]!==P.firstYear||U[25]!==P.lastYear?(e={firstYear:P.firstYear,lastYear:P.lastYear},U[24]=P.firstYear,U[25]=P.lastYear,U[26]=e):e=U[26],m=e;break t}U[27]!==ei?(e=ei.map(ep).filter(ex).sort(),U[27]=ei,U[28]=e):e=U[28];let s=e,l=s[0]??null,a=s[s.length-1]??null;U[29]!==l||U[30]!==a?(t={firstYear:l,lastYear:a},U[29]=l,U[30]=a,U[31]=t):t=U[31],m=t}let{firstYear:eu,lastYear:em}=m;if(U[32]!==ei){s:{let e=new Map;for(let t of ei){let s=t.launch_date?parseInt(t.launch_date.slice(0,4),10):NaN;
4Number.isNaN(s)||e.set(s,(e.get(s)??0)+1)}if(0===e.size){let e;U[34]===Symbol.for("react.memo_cache_sentinel")?(e=[],U[34]=e):e=U[34],h=e;break s}let t=Math.min(...e.keys()),s=Math.max(...e.keys()),l=[];for(let a=t;a<=s;a++)l.push({year:a,count:e.get(a)??0});h=l}U[32]=ei,U[33]=h}else h=U[33];let eN=h,e_=P.operatorName||P.name,eS=P.operatorName&&P.operatorName.toUpperCase()!==P.name.toUpperCase()?P.name:null;U[35]!==Z?(x="all"===Z?"ALL ORBITS":`${Z.toUpperCase()} SATELLITES`,U[35]=Z,U[36]=x):x=U[36];let ew=x;U[37]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)(y.ArrowLeft,{className:"h-4 w-4"}),U[37]=p):p=U[37],U[38]!==W?(f=W.toUpperCase(),U[38]=W,U[39]=f):f=U[39],U[40]!==K||U[41]!==f?(g=(0,t.jsxs)("button",{onClick:K,className:"flex shrink-0 items-center gap-2 self-start rounded-lg px-1 py-1 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[p," ",f," constellations"]}),U[40]=K,U[41]=f,U[42]=g):g=U[42],U[43]!==q||U[44]!==P.picture||U[45]!==J?(b=!J&&(0,t.jsx)(ea,{picture:P.picture,color:q,size:"lg"}),U[43]=q,U[44]=P.picture,U[45]=J,U[46]=b):b=U[46],U[47]!==e_?(v=(0,t.jsx)("h1",{className:"truncate text-xl font-bold leading-none tracking-tight",title:e_,children:e_}),U[47]=e_,U[48]=v):v=U[48],U[49]!==eS?(j=eS&&(0,t.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:eS}),U[49]=eS,U[50]=j):j=U[50],U[51]!==ew?(N=(0,t.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:ew}),U[51]=ew,U[52]=N):N=U[52],U[53]!==v||U[54]!==j||U[55]!==N?(_=(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline gap-2",children:[v,j,N]}),U[53]=v,U[54]=j,U[55]=N,U[56]=_):_=U[56],U[57]!==ec?(S=ec.toLocaleString(),U[57]=ec,U[58]=S):S=U[58],U[59]!==S?(w=(0,t.jsx)("span",{className:"tabular-nums",children:S}),U[59]=S,U[60]=w):w=U[60];let ek=1===ec?"":"s";if(U[61]!==eu||U[62]!==em?(k=eu&&em&&(0,t.jsxs)(t.Fragment,{children:[" · launches ",eu,em!==eu&&`â${em}`]}),U[61]=eu,U[62]=em,U[63]=k):k=U[63],U[64]!==w||U[65]!==ek||U[66]!==k?(C=(0,t.jsxs)("p",{className:"mt-1.5 text-xs text-muted-foreground",children:[w," satellite",ek,k]}),U[64]=w,U[65]=ek,U[66]=k,U[67]=C):C=U[67],U[68]!==_||U[69]!==C?(O=(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[_,C]}),U[68]=_,U[69]=C,U[70]=O):O=U[70],U[71]!==b||U[72]!==O?(A=(0,t.jsxs)("div",{className:"flex items-center gap-4 roun
4ded-xl border border-border bg-card p-4 sm:p-5",children:[b,O]}),U[71]=b,U[72]=O,U[73]=A):A=U[73],U[74]!==el||U[75]!==et||U[76]!==er||U[77]!==en||U[78]!==H||U[79]!==Z?(M=en&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)("span",{className:"mr-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Across orbits"}),el.map(e=>{let s=e.orbit.toLowerCase(),l=Z===s;return(0,t.jsxs)("button",{onClick:()=>{H&&"all"!==s?H(s):ee(s)},className:(0,B.cn)("rounded-full border px-2.5 py-1 text-xs transition-colors",l?"border-primary/40 bg-primary/10 text-foreground":"border-border text-muted-foreground hover:bg-muted hover:text-foreground"),title:`${e.total} ${e.orbit} satellite${1===e.total?"":"s"}, ${e.active} active`,children:[(0,t.jsx)("span",{className:"font-semibold",children:e.orbit})," ",(0,t.jsx)("span",{className:"tabular-nums",children:e.total.toLocaleString()}),e.active>0&&(0,t.jsxs)("span",{className:"tabular-nums text-success",children:[" · ",e.active.toLocaleString()]})]},e.orbit)}),(0,t.jsxs)("button",{onClick:()=>ee("all"),className:(0,B.cn)("rounded-full border px-2.5 py-1 text-xs transition-colors","all"===Z?"border-primary/40 bg-primary/10 text-foreground":"border-border text-muted-foreground hover:bg-muted hover:text-foreground"),title:`${et.length} satellite${1===et.length?"":"s"} across all orbits, ${er} active`,children:[(0,t.jsx)("span",{className:"font-semibold",children:"All"})," ",(0,t.jsx)("span",{className:"tabular-nums",children:et.length.toLocaleString()}),er>0&&(0,t.jsxs)("span",{className:"tabular-nums text-success",children:[" · ",er.toLocaleString()]})]})]}),U[74]=el,U[75]=et,U[76]=er,U[77]=en,U[78]=H,U[79]=Z,U[80]=M):M=U[80],U[81]!==ec?(E=(0,t.jsx)(ey,{label:"Total",value:ec,tone:"border-primary"}),U[81]=ec,U[82]=E):E=U[82],U[83]!==ed?($=(0,t.jsx)(ey,{label:"Active",value:ed,tone:"border-success"}),U[83]=ed,U[84]=$):$=U[84],U[85]!==E||U[86]!==$?(L=(0,t.jsxs)("section",{className:"glass-card flex flex-wrap items-start gap-x-10 gap-y-5 p-5",children:[E,$]}),U[85]=E,U[86]=$,U[87]=L):L=U[87],U[88]!==G?(I=G&&(0,t.jsxs)("section",{className:"glass-card p-5",children:[(0,t.jsx)("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Operator fleet composition"}),(0,t.jsx)("p",{className:"whitespace-pre-line text-sm text-muted-foreground",children:G})]}),U[88]=G,U[89]=I):I=U[89],U[90]!==q||U[91]!==eN){let e,s;R=eN.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Launches per year"}),(0,t.jsxs)("div",{className:"glass-card p-4",children:[(e=Math.max(...eN.map(eh)),s=eN.length>22,(0,t.jsx)("div",{className:"flex items-end gap-1 overflow-x-auto pb-1",children:eN.map((l,a)=>{let{year:n,count:r}=l,i=!s||0===a||a===eN.length-1||n%5==0;return(0,t.jsxs)("div",{className:"flex min-w-[20px] flex-1 flex-col items-center gap-1",title:`${r} launch${1===r?"":"es"} in ${n}`,children:[(0,t.jsx)("span",{className:"h-3 text-[9px] tabular-nums text-muted-foreground",children:r>0?r:""}),(0,t.jsx)("div",{className:"flex h-28 w-full items-end",children:(0,t.jsx)("div",{className:"w-full rounded-t transition-all",style:{height:`${100*(e>0?Math.sqrt(r)/Math.sqrt(e):0)}%`,backgroundColor:q,minHeight:r>0?"3px":"0"}})}),(0,t.jsx)("span",{className:"h-3 font-mono text-[9px] tabular-nums text-muted-foreground/70",children:i?n:""})]},n)})})),(0,t.jsx)("p",{className:"mt-2 text-[10px] text-muted-foreground",children:"Bars use â-scaling so small years remain visible alongside peak-cadence years."})]})]}),U[90]=q,U[91]=eN,U[92]=R}else R=U[92];U[93]===Symbol.for("react.memo_cache_sentinel")?(T=(0,t.jsx)("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Satellites"}),U[93]=T):T=U[93];let eC="all"===Z;return U[94]!==q||U[95]!==V||U[96]!==ei||U[97]!==eC||U[98]!==eo?(F=(0,t.jsxs)("section",{className:"flex min-h-0 flex-col",children:[T,(0,t.jsx)(ej,{satellites:ei,color:q,loading:eo,showOrbit:eC,onPickSatellite:V})]}),U[94]=q,U[95]=V,U[96]=ei,U[97]=eC,U[98]=eo,U[99]=F):F=U[99],U[100]!==g||U[101]!==A||U[102]!==M||U[103]!==L||U[104]!==I||U[105]!==R||U[106]!==F?(z=(0,t.jsxs)("div",{className:"mx-auto flex min-h-full max-w-[1400px] flex-col gap-6 px-3 pb-10 pt-8 sm:px-6 sm:pt-10",children:[g,A,M,L,I,R,F]}),U[100]=g,U[101]=A,U[102]=M,U[103]=L,U[104]=I,U[105]=R,U[106]=F,U[107]=z):z=U[107],z}function eh(e){return e.count}function ex(e){return!!e}function ep(e){return e.launch_date?.slice(0,4)}function ef(e){return!Q(e)}function eg(e,t){return e+t.active}function eb(e,t){let s=et.indexOf(e.orbit),l=et.indexOf(t.orbit);return(-1===s?99:s)-(-1===l?99:l)}function ev(e){let[t,s]=e;return{orbit:t,...s}}function ej({satellites:e,color:s,loading:a=!1,showOrbit:n=!1,onPickSatellite:r}){let[i,o]=(0,l.useState)(""),[c,d]=(0,l.useState)([]),[u,m]=(0,l.useState)(""),[h,x]=(0,l.useState)(""),[p,f]=(0,l.useState)(!1),g=(0,l.useRef)(null),b=(0,l.useMemo)(()=>{let t=new Map;for(let s of e){let e=(s.status||"unknown").toLowerCase();t.set(e,(t.get(e)??0)+1)}return Array.from(t.entries()).sort((e,t)=>
4t[1]-e[1]).map(([e,t])=>({id:e,name:ee(e),count:t}))},[e]),v=""!==i.trim()||c.length>0||""!==u||""!==h,j=(0,l.useMemo)(()=>{let t=i.trim().toLowerCase();return e.filter(e=>{if(c.length>0&&!c.includes((e.status||"unknown").toLowerCase()))return!1;let s=e.launch_date?.slice(0,10)??"";return(!u||!!s&&!(s<u))&&(!h||!!s&&!(s>h))&&(!t||(e.object_name??"").toLowerCase().includes(t)||String(e.norad_cat_id??"").includes(t)||(e.cospar_id??"").toLowerCase().includes(t))}).sort((e,t)=>(t.launch_date||"").localeCompare(e.launch_date||""))},[e,i,c,u,h]),y=N({count:j.length,getScrollElement:()=>g.current,estimateSize:()=>40,overscan:12});return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"relative max-w-md flex-1",children:[(0,t.jsx)(w.Search,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)("input",{type:"text",value:i,onChange:e=>o(e.target.value),placeholder:"Search by name, NORAD or COSPARâ¦",className:"w-full rounded-lg border border-border bg-input py-2 pl-8 pr-8 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"}),i&&(0,t.jsx)("button",{onClick:()=>o(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:(0,t.jsx)(k.X,{className:"h-3.5 w-3.5"})})]}),(0,t.jsxs)("button",{onClick:()=>f(e=>!e),className:(0,B.cn)("relative shrink-0 rounded-lg px-3 py-2 text-sm font-medium transition-colors",p?"bg-primary text-primary-foreground":v?"bg-primary/10 text-primary ring-1 ring-primary/30":"text-muted-foreground hover:bg-muted hover:text-foreground"),title:p?"Hide filters":"Show filters",children:[(0,t.jsx)(S.SlidersHorizontal,{className:"h-4 w-4"}),v&&!p&&(0,t.jsx)("span",{className:"absolute -right-1 -top-1 h-2.5 w-2.5 rounded-full border-2 border-card bg-primary"})]}),v&&(0,t.jsxs)("button",{onClick:()=>{o(""),d([]),m(""),x("")},className:"flex shrink-0 items-center gap-1.5 rounded-lg px-3 py-2 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:"Reset filters",children:[(0,t.jsx)(E.RotateCcw,{className:"h-3.5 w-3.5"}),"Reset"]})]}),p&&(0,t.jsx)("div",{className:"glass-card animate-slide-up p-4",children:(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:[(0,t.jsx)(T.MultiSelectFilter,{label:"Status",options:b,selected:c,onChange:d}),(0,t.jsx)(T.DateRangeFilter,{label:"Launch date",after:u,before:h,onChange:(e,t)=>
4{m(e),x(t)}})]})}),(0,t.jsxs)("div",{className:"px-0.5 text-xs tabular-nums text-muted-foreground",children:[j.length.toLocaleString()," of ",e.length.toLocaleString()," satellite",1===e.length?"":"s"]}),(0,t.jsx)("div",{className:"glass-card flex flex-col overflow-hidden",children:(0,t.jsx)("div",{ref:g,className:"max-h-[520px] overflow-y-auto overscroll-contain",children:a?(0,t.jsx)("div",{className:"space-y-2 p-4",children:Array.from({length:6}).map((e,s)=>(0,t.jsx)("div",{className:"h-8 animate-pulse rounded bg-muted/60"},s))}):0===j.length?(0,t.jsx)("p",{className:"p-6 text-center text-sm text-muted-foreground",children:0===e.length?"No satellites in this orbit.":"No satellites match."}):(0,t.jsx)("div",{style:{height:`${y.getTotalSize()}px`,width:"100%",position:"relative"},children:y.getVirtualItems().map(e=>{let l=j[e.index],a=Z(l),i=Q(l),o=a&&"active"===l.status?"Decayed":ee(l.status);return(0,t.jsxs)("button",{onClick:()=>r(l),style:{position:"absolute",top:0,left:0,width:"100%",height:`${e.size}px`,transform:`translateY(${e.start}px)`},className:"flex items-center gap-3 border-b border-border/60 px-4 text-left transition-colors hover:bg-primary/5",children:[(0,t.jsx)("span",{className:"hidden w-20 shrink-0 font-mono text-xs tabular-nums text-muted-foreground sm:inline",children:(0,B.formatDate)(l.launch_date??null)}),(0,t.jsx)("span",{className:(0,B.cn)("h-1.5 w-1.5 shrink-0 rounded-full",i&&"bg-muted-foreground"),style:i?void 0:{backgroundColor:s}}),(0,t.jsx)("span",{className:(0,B.cn)("flex-1 truncate text-sm font-medium",i&&"text-muted-foreground line-through decoration-muted-foreground/60"),children:l.object_name}),n&&l.orbit_type&&(0,t.jsx)("span",{className:"hidden shrink-0 rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] font-medium tracking-wider text-muted-foreground sm:inline",children:l.orbit_type}),(0,t.jsx)("span",{className:(0,B.cn)("shrink-0 rounded-full px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",function(e,t){if(t&&"active"===e)return"bg-destructive/10 text-destructive";switch(e){case"active":return"bg-success/10 text-success";case"decayed":return"bg-destructive/10 text-destructive";case"planned":return"bg-primary/10 text-primary";case"inclined":return"bg-warning/10 text-warning";default:return"bg-muted text-muted-foreground"}}(l.status,a)),children:o}),(0,t.jsx)("span",{className:"hidden shrink-0 font-mono text-xs text-muted-foreground md:inline",children:l.norad_cat_id}),(0,t.jsx)(_.ArrowRight,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/60"})]},l.norad_cat_id)})})})})]})}function eN(e){let l,a,n,r=(0,s.c)(10),{latestLaunches:i,onPickOperator:o,onSelectSatellite:c}=e;if(0===i.length)return null;if(r[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Latest launches"}),r[0]=l):l=r[0],r[1]!==i||r[2]!==o||r[3]!==c){let e;r[5]!==o||r[6]!==c?(e=e=>{let{sat:s,count:l}=e,a=l>1,n=s.name.replace(/[-\s]\d+$/,"");return(0,t.jsxs)("button",{onClick:()=>a&&s.operator_name?o(s.operator_name,s.launch_date?.slice(0,10)):c(s),className:"flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors hover:bg-primary/5",children:[(0,t.jsx)("span",{className:"hidden shrink-0 font-mono text-xs tabular-nums text-muted-foreground sm:inline",children:(0,B.formatDate)(s.launch_date)}),(0,t.jsx)("span",{className:(0,B.cn)("h-1.5 w-1.5 shrink-0 rounded-full",J(s.status))}),(0,t.jsxs)("span",{className:"flex-1 truncate text-sm font-medium",children:[a?n:s.name,a&&(0,t.jsxs)("span",{className:"ml-2 font-normal text-muted-foreground",children:["· ",l," satellites"]})]}),(0,t.jsx)("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:s.operator_name}),null!=s.position_real&&(0,t.jsx)("span",{className:"hidden shrink-0 font-mono text-xs text-muted-foreground md:inline",children:(0,B.formatPosition)(s.position_real)}),(0,t.jsx)(_.ArrowRight,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/60"})]},s.id)},r[5]=o,r[6]=c,r[7]=e):e=r[7],a=i.map(e),r[1]=i,r[2]=o,r[3]=c,r[4]=a}else a=r[4];return r[8]!==a?(n=(0,t.jsxs)("section",{children:[l,(0,t.jsx)("div",{className:"glass-card divide-y divide-border/60 overflow-hidden",children:a})]}),r[8]=a,r[9]=n):n=r[9],n}function ey(e){let l,a,n,r,i,o,c=(0,s.c)(17),{label:d,value:u,tone:m,total:h}=e,x=null;if(h&&h>0&&u>0){let e,t=u/h*100;c[0]!==t?(e=t<1?"<1%":`${Math.round(t)}%`,c[0]=t,c[1]=e):e=c[1],x=e}return c[2]!==m?(l=(0,B.cn)("flex flex-col gap-1.5 border-l-2 pl-3",m),c[2]=m,c[3]=l):l=c[3],c[4]!==u?(a=u.toLocaleStr
4ing(),c[4]=u,c[5]=a):a=c[5],c[6]!==a?(n=(0,t.jsx)("span",{className:"font-mono text-2xl font-semibold leading-none tabular-nums",children:a}),c[6]=a,c[7]=n):n=c[7],c[8]!==x?(r=null!==x&&(0,t.jsx)("span",{className:"ml-1.5 font-normal text-muted-foreground/70",children:x}),c[8]=x,c[9]=r):r=c[9],c[10]!==d||c[11]!==r?(i=(0,t.jsxs)("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:[d,r]}),c[10]=d,c[11]=r,c[12]=i):i=c[12],c[13]!==l||c[14]!==n||c[15]!==i?(o=(0,t.jsxs)("div",{className:l,children:[n,i]}),c[13]=l,c[14]=n,c[15]=i,c[16]=o):o=c[16],o}function e_(e){let l,a,n,r,i,o,c,d=(0,s.c)(28),{byYear:u,color:m,activeYear:h,onYearClick:x}=e,p=void 0===m?"var(--color-primary)":m,f=void 0===h?null:h;e:{let e,t,s,a,n;d[0]!==u?(e=Object.entries(u).map(eO).filter(eC),d[0]=u,d[1]=e):e=d[1];let r=e;if(0===r.length){let e;d[2]===Symbol.for("react.memo_cache_sentinel")?(e=[],d[2]=e):e=d[2],l=e;break e}d[3]!==r?(t=r.map(ek),d[3]=r,d[4]=t):t=d[4];let i=Math.min(...t);d[5]!==r?(s=r.map(ew),d[5]=r,d[6]=s):s=d[6];let o=Math.max(...s);d[7]!==r?(a=new Map(r),d[7]=r,d[8]=a):a=d[8];let c=a;if(d[9]!==c||d[10]!==o||d[11]!==i){n=[];for(let e=i;e<=o;e++)n.push({year:e,count:c.get(e)??0});d[9]=c,d[10]=o,d[11]=i,d[12]=n}else n=d[12];l=n}let g=l;if(0===g.length)return null;d[13]!==g?(a=g.map(eS),d[13]=g,d[14]=a):a=d[14];let b=Math.max(...a);d[15]!==b?(n=e=>b>0?Math.sqrt(e)/Math.sqrt(b):0,d[15]=b,d[16]=n):n=d[16];let v=n,j=g.length>22;return d[17]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("h3",{className:"mb-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Launches per year"}),d[17]=r):r=d[17],d[18]!==f||d[19]!==p||d[20]!==x||d[21]!==v||d[22]!==j||d[23]!==g?(i=(0,t.jsx)("div",{className:"flex items-end gap-1 overflow-x-auto pb-1",children:g.map((e,s)=>{let{year:l,count:a}=e,n=!j||0===s||s===g.length-1||l%5==0,r=f===l,i=!!x;return(0,t.jsxs)("button",{type:"button",disabled:!i,onClick:()=>x?.(l),className:(0,B.cn)("flex min-w-[20px] flex-1 flex-col items-center gap-1 rounded transition-colors",i&&"hover:bg-muted/50",i?"cursor-pointer":"cursor-default",r&&"bg-primary/10 ring-1 ring-primary/30"),title:`${a} launch${1===a?"":"es"} in ${l}${i?" â click to filter":""}`,children:[(0,t.jsx)("span",{className:"h-3 text-[9px] tabular-nums text-muted-foreground",children:a>0?a:""}),(0,t.jsx)("div",{className:"flex h-28 w-full items-end",children:(0,t.jsx)("div",{className:"w-full rounded-t transition-all",style:{height:`${100*v(a)}%`,backgroundColor:p,minHeight:a>0?"3px":"0",opacity:null==f||r?1:.45}})}),(0,t.jsx)("span",{className:(0,B.cn)("h-3 font-mono text-[9px] tabular-nums",r?"font-semibold text-primary":"text-muted-foreground/70"),children:n||r?l:""})]},l)})}),d[18]=f,d[19]=p,d[20]=x,d[21]=v,d[22]=j,d[23]=g,d[24]=i):i=d[24],d[25]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)("p",{className:"mt-2 text-[10px] text-muted-foreground",children:"Bars use â-scaling so small years remain visible alongside peak-cadence years."}),d[25]=o):o=d[25],d[26]!==i?(c=(0,t.jsxs)("section",{className:"mb-4",children:[r,(0,t.jsxs)("div",{className:"glass-card p-4",children:[i,o]})]}),d[26]=i,d[27]=c):c=d[27],c}function eS(e){return e.count}function ew(e){let[t]=e;return t}function ek(e){let[t]=e;return t}function eC(e){let[t]=e;return!Number.isNaN(t)}function eO(e){let[t,s]=e;return[parseInt(t,10),s]}function eA(e){let l,a,n,r,i,o,c=(0,s.c)(16),{counts:d}=e;if(c[0]!==d.geo||c[1]!==d.heo||c[2]!==d.leo||c[3]!==d.meo||c[4]!==d.other){let e=[{k:"geo",label:"GEO",...d.geo,color:"bg-primary"},{k:"leo",label:"LEO",...d.leo,color:"bg-secondary"},{k:"meo",label:"MEO",...d.meo,color:"bg-success"},{k:"heo",label:"HEO",...d.heo,color:"bg-warning"},{k:"other",label:"Other",...d.other,color:"bg-muted-foreground/60"}].filter(e$),s=e.reduce(eE,0)||1;n="glass-card p-4",r=(0,t.jsx)("div",{className:"flex h-2.5 overflow-hidden rounded-full bg-muted",children:e.map(e=>(0,t.jsx)("div",{className:(0,B.cn)(e.color,"transition-all"),style:{width:`${e.total/s*100}%`},title:`${e.label}
4: ${e.active.toLocaleString()} of ${e.total.toLocaleString()} active`},e.k))}),l="mt-3 grid grid-cols-1 gap-x-6 gap-y-2 text-xs sm:grid-cols-2 lg:grid-cols-3",a=e.map(eM),c[0]=d.geo,c[1]=d.heo,c[2]=d.leo,c[3]=d.meo,c[4]=d.other,c[5]=l,c[6]=a,c[7]=n,c[8]=r}else l=c[5],a=c[6],n=c[7],r=c[8];return c[9]!==l||c[10]!==a?(i=(0,t.jsx)("div",{className:l,children:a}),c[9]=l,c[10]=a,c[11]=i):i=c[11],c[12]!==n||c[13]!==r||c[14]!==i?(o=(0,t.jsxs)("div",{className:n,children:[r,i]}),c[12]=n,c[13]=r,c[14]=i,c[15]=o):o=c[15],o}function eM(e){return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:(0,B.cn)("h-2 w-2 shrink-0 rounded-full",e.color)}),(0,t.jsx)("span",{className:"w-10 shrink-0 font-medium",children:e.label}),(0,t.jsx)("span",{className:"h-1 flex-1 overflow-hidden rounded-full bg-muted/60",children:(0,t.jsx)("span",{className:(0,B.cn)("block h-full rounded-full",e.color),style:{width:`${e.total>0?e.active/e.total*100:0}%`}})}),(0,t.jsxs)("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[(0,t.jsx)("span",{className:"text-success",children:e.active.toLocaleString()})," of ",e.total.toLocaleString()," active"]})]},e.k)}function eE(e,t){return e+t.total}function e$(e){return e.total>0}function eL({satellites:e,loading:s,initialLoad:a,sort:n,onSort:r,onRowClick:i,onLoadMore:o,hasMore:c,aliasFrom:d}){let u=(0,l.useRef)(null),m=null!=d,h=N({count:e.length+ +!!m,getScrollElement:()=>u.current,estimateSize:()=>44,overscan:12}),x=h.getVirtualItems(),p=x.length>0?x[x.length-1].index:0;return(0,l.useEffect)(()=>{c&&o&&p>=e.length-30&&o()},[c,o,p,e.length]),(0,t.jsxs)("div",{className:"glass-card flex min-h-0 flex-1 flex-col overflow-hidden",children:[(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-x-auto",children:(0,t.jsxs)("div",{className:(0,B.cn)("flex min-h-0 flex-1 flex-col","min-w-[1230px]"),children:[(0,t.jsx)("div",{className:(0,B.cn)("grid shrink-0 border-b border-border bg-muted/40 text-[11px] uppercase tracking-wider text-muted-foreground",K),children:[["Position","position",!0],["Status","status",!0],["Name","name",!0],["NORAD","norad",!0],["COSPAR","cospar",!0],["Operator","operator",!0],["Model","model",!0],["Launch Site","launchsite",!0],["Vehicle","launchvehicle",!0],["Mass","mass",!0],["Launch","date",!0]].map(([e,s,l])=>{let a=n.name===s&&"none"!==n.type;return l?(0,t.jsxs)("button",{onClick:()=>r(s),className:(0,B.cn)("flex items-center gap-1 px-3 py-2.5 text-left font-medium transition-colors hover:text-foreground",a&&"text-primary"),children:[(0,t.jsx)("span",{className:"truncate",children:e}),a&&(0,t.jsx)("span",{className:"text-[9px] opacity-80",children:"asc"===n.type?"â²":"â¼"})]},s):(0,t.jsx)("span",{className:"flex items-center px-3 py-2.5 font-medium normal-case",children:(0,t.jsx)("span",{className:"truncate",children:e})},s)})}),(0,t.jsx)("div",{ref:u,className:"max-h-[calc(100dvh-18rem)] min-h-[320px] flex-1 overflow-y-auto overscroll-contain",children:a||s&&0===e.length?(0,t.jsx)(eR,{}):0===e.length?(0,t.jsx)("div",{className:"flex h-full items-center justify-center p-12 text-center",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(C.Satellite,{className:"mx-auto mb-3 h-8 w-8 text-muted-foreground/60"}),(0,t.jsx)("p",{className:"text-sm font-medium",children:"No satellites match your filters"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Try broadening your search or resetting filters."})]})}):(0,t.jsx)("div",{style:{height:`${h.getTotalSize()}px`,width:"100%",position:"relative"},children:x.map(s=>{if(m&&s.index===d)return(0,t.jsxs)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${s.size}px`,transform:`translateY(${s.start}px)`},className:"flex items-center gap-3 border-b border-border/60 px-3",children:[(0,t.jsx)("span",{className:"h-px flex-1 bg-border"}),(0,t.jsx)("span",{className:"shrink-0 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Matched by other or former name"}),(0,t.jsx)("span",{className:"h-px flex-1 bg-border"})]},"alias-divider");let l=m&&s.index>d?s.index-1:s.index,a=e[l];return a?(0,t.jsxs)("button",{onClick:()=>i(a),style:{position:"absolute",top:0,left:0,width:"100%",height:`${s.size}px`,transform:`translateY(${s.start}px)`},className:(0,B.cn)("grid items-center border-b border-border/60 text-left text-sm transition-colors hover:bg-primary/5 focus:outline-none focus-visible:bg-primary/10",K,l%2==1&&"bg-muted/20"),children:[(0,t.jsx)("span",{className:"truncate px-3 font-mono text-xs tabular-nums",children:null!=a.position_real?(0,B.formatPosition)(a.position_real):"â"}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5 px-3",children:[(0,t.jsx)("span",{className:(0,B.cn)("h-1.5 w-1.5 rounded-full shrink-0",J(a.status))}),(0,t.jsx)("span",{className:"truncate text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:a.status})]}),(0,t.jsxs)("span",{className:"min-w-0 px-3",children:[(0,t.jsx)("span",{className:"block truncate font-medium",children:a.name}),m&&l>=d&&a.other_names&&(0,t.jsxs)("span",{className:"block truncate text-[10px] leading-tight text-muted-foreground",title:a.other_names,children:["aka ",a.other_names]})]}),(0,t.jsx)("span",{className:"truncate px-3 font-mono text-xs text-muted-foreground",children:a.norad_number||"â"}),(0,t.jsx)("span",{className:"truncate px-3 font-mono text-xs text-muted-foreground",children:a.cospar_number||"â"}),(0,t.jsx)("span",{className:"truncate px-3 text-muted-foreground",children:a.operator_name||"â"}),(0,t.jsx)("span",{className:"truncate px-3 text-muted-foreground",children:a.model_name||"â"}),(0,t.jsx)("span",{className:"truncate px-3 text-muted-foreground",children:a.launchsite_name||"â"}),(0,t.jsx)("span",{className:"truncate px-3 text-muted-foreground",children:a.launchvehicle_name||"â"}),(0,t.jsx)("span",{className:"truncate px-3 font-mono text-xs tabular-nums",children:a.launch_mass?a.launch_mass:"â"}),(0,t.jsx)("span",{className:"truncate px-3 text-xs text-muted-foreground",children:(0,B.formatDate)(a.launch_date)})]},a.id):null})})})]})}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-between border-t border-border px-4 py-2 text-[11px] text-muted-foreground",children:[(0,t.jsx)("span",{children:s&&e.length>0?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"h-2 w-2 animate-pulse rounded-full bg-primary/60"}),"Refreshingâ¦"]}):(0,t.jsxs)("span",{className:"tabular-nums",children:[e.length.toLocaleStr
4ing()," row",1===e.length?"":"s"]})}),(0,t.jsx)("span",{className:"hidden tabular-nums sm:inline",children:x.length>0&&e.length>0&&(0,t.jsxs)(t.Fragment,{children:["Showing ",x[0].index+1,"â",x[x.length-1].index+1]})})]})]})}function eI({satellites:e,loading:s,initialLoad:a,onRowClick:n,onLoadMore:r,hasMore:i,aliasFrom:o}){let c=(0,l.useRef)(null),d=null!=o,u=N({count:e.length+ +!!d,getScrollElement:()=>c.current,estimateSize:()=>72,overscan:10}),m=u.getVirtualItems(),h=m.length>0?m[m.length-1].index:0;return(0,l.useEffect)(()=>{i&&r&&h>=e.length-20&&r()},[i,r,h,e.length]),(0,t.jsxs)("div",{className:"glass-card flex flex-col overflow-hidden",children:[(0,t.jsx)("div",{ref:c,className:"max-h-[calc(100dvh-16rem)] min-h-[320px] overflow-y-auto overscroll-contain",children:a||s&&0===e.length?(0,t.jsx)("div",{className:"space-y-px py-1",children:Array.from({length:8}).map((e,s)=>(0,t.jsxs)("div",{className:"px-3 py-4",style:{opacity:Math.max(.15,1-.1*s)},children:[(0,t.jsx)("div",{className:"h-3.5 w-2/3 animate-pulse rounded bg-muted"}),(0,t.jsx)("div",{className:"mt-2 h-3 w-1/2 animate-pulse rounded bg-muted/70"})]},s))}):0===e.length?(0,t.jsxs)("div",{className:"p-12 text-center",children:[(0,t.jsx)(C.Satellite,{className:"mx-auto mb-3 h-8 w-8 text-muted-foreground/60"}),(0,t.jsx)("p",{className:"text-sm font-medium",children:"No satellites match your filters"})]}):(0,t.jsx)("div",{style:{height:`${u.getTotalSize()}px`,width:"100%",position:"relative"},children:m.map(s=>{if(d&&s.index===o)return(0,t.jsxs)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${s.size}px`,transform:`translateY(${s.start}px)`},className:"flex items-center gap-3 border-b border-border/60 px-3",children:[(0,t.jsx)("span",{className:"h-px flex-1 bg-border"}),(0,t.jsx)("span",{className:"shrink-0 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Matched by other or former name"}),(0,t.jsx)("span",{className:"h-px flex-1 bg-border"})]},"alias-divider");let l=d&&s.index>o?s.index-1:s.index,a=e[l];return a?(0,t.jsxs)("button",{onClick:()=>n(a),style:{position:"absolute",top:0,left:0,width:"100%",height:`${s.size}px`,transform:`translateY(${s.start}px)`},className:"flex flex-col justify-center gap-1 border-b border-border/60 px-3 text-left transition-colors hover:bg-primary/5 focus:outline-none focus-visible:bg-primary/10",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:(0,B.cn)("h-1.5 w-1.5 shrink-0 rounded-full",J(a.status))}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:a.name}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-xs tabular-nums text-muted-foreground",children:null!=a.position_real?(0,B.formatPosition)(a.position_real):""})]}),(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2 pl-3.5 text-[11px] text-muted-foreground",children:[a.norad_number?(0,t.jsx)("span",{className:"shrink-0 font-mono tabular-nums",children:a.norad_number}):null,(0,t.jsx)("span",{className:"truncate",children:d&&l>=o&&a.other_names?`aka ${a.other_names}`:a.operator_name||a.status})]})]},a.id):null})})}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-between border-t border-border px-3 py-2 text-[11px] text-muted-foreground",children:[(0,t.jsxs)("span",{className:"tabular-nums",children:[e.length.toLocaleString()," row",1===e.length?"":"s"]}),s&&e.length>0&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"h-2 w-2 animate-pulse rounded-full bg-primary/60"})," Refreshing"]})]})]})}function eR(){let e,l=(0,s.c)(1);return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"py-1",children:Array.from({length:14}).map(eT)}),l[0]=e):e=l[0],e}function eT(e,s){return(0,t.jsx)("div",{className:(0,B.cn)("grid items-center border-b border-border/40 py-3",K),style:{opacity:Math.max(.15,1-.06*s)},children:Array.from({length:11}).map(eF)},s)}function eF(e,s){return(0,t.jsx)("div",{className:"mx-3 h-3 animate-pulse rounded bg-muted"},s)}function eD(e){if(null==e)return!1;let t=String(e).trim();return""!==t&&"NULL"!==t.toUpperCase()&&"â"!==t}function ez(e){return eD(e)?String(e):"N/A"}function eU(e,t){let s=eD(e)?String(e):"",l=eD(t)?String(t):"";return s&&l?`${s} / ${l}`:s||l||"â"}function eP(e){var a,n;let r,i,o,c,d,u,m,h,x,p,f,g,b,v,j,N,_,S,w,k,C,O,A,M,E,$,L,T,D,z,P,Y,G,H,K,V,q,J,X,Z,Q,ee,et,es=(0,s.c)(119),{detail:el,onBack:ea,backLabel:en}=e,er=(0,W.useAuthStore)(eB);es[0]!==er?(r=!!er&&F.ADMIN_GROUP_IDS.includes(er.gid),es[0]=er,es[1]=r):r=es[1];let ei=r;es[2]!==el.expected_lifetime||es[3]!==el.launch_date?(i=el.launch_date&&e6(el.expected_lifetime),es[2]=el.expected_lifetime,es[3]=el.launch_date,es[4]=i):i=es[4];let eo=!!i,[ec,ed]=(0,l.useState)(null);
4es[5]!==el.norad_number?(o=()=>{if(!el.norad_number)return;let e=!1;return U.tleApi.getSatellite(el.norad_number).then(t=>{e||ed(t.data??null)}).catch(eY),()=>{e=!0}},c=[el.norad_number],es[5]=el.norad_number,es[6]=o,es[7]=c):(o=es[6],c=es[7]),(0,l.useEffect)(o,c);let eu=!!el.dry_mass&&el.dry_mass>0&&el.dry_mass!==el.launch_mass;es[8]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)(y.ArrowLeft,{className:"h-4 w-4"}),es[8]=d):d=es[8],es[9]!==en||es[10]!==ea?(u=(0,t.jsxs)("button",{onClick:ea,className:"flex items-center gap-2 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[d," ",en]}),es[9]=en,es[10]=ea,es[11]=u):u=es[11];let em=`Satellite: ${el.name} (#${el.id})`;es[12]!==em?(m=(0,t.jsx)(R.default,{variant:"text",label:"Something wrong or missing?",contextLabel:em}),es[12]=em,es[13]=m):m=es[13],es[14]!==u||es[15]!==m?(h=(0,t.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[u,m]}),es[14]=u,es[15]=m,es[16]=h):h=es[16],es[17]!==el.status?(x=(0,t.jsx)(eH,{status:el.status}),es[17]=el.status,es[18]=x):x=es[18],es[19]!==ec?(p=(0,t.jsx)(eG,{tle:ec}),es[19]=ec,es[20]=p):p=es[20],es[21]!==x||es[22]!==p?(f=(0,t.jsxs)(t.Fragment,{children:[x,p]}),es[21]=x,es[22]=p,es[23]=f):f=es[23],es[24]!==el.name||es[25]!==el.other_names||es[26]!==f?(g=(0,t.jsx)(eW,{title:el.name,alsoKnownAs:el.other_names,badges:f}),es[24]=el.name,es[25]=el.other_names,es[26]=f,es[27]=g):g=es[27],es[28]!==el.position_real||es[29]!==el.position_rounded?(b=function(e,t){let s=e??t;if(null==s)return"â";let l=(0,B.formatPosition)(s);if(null==t||null==e)return l;let a=(0,B.formatPosition)(t);return a===l?l:`${l} (${a})`}(el.position_rounded,el.position_real),es[28]=el.position_real,es[29]=el.position_rounded,es[30]=b):b=es[30],es[31]!==b?(v={label:"Position",value:b},es[31]=b,es[32]=v):v=es[32],es[33]!==el.cospar_number||es[34]!==el.norad_number?(j=eU(el.norad_number,el.cospar_number),es[33]=el.cospar_number,es[34]=el.norad_number,es[35]=j):j=es[35],es[36]!==j?(N={label:"NORAD / COSPAR",value:j},es[36]=j,es[37]=N):N=es[37],es[38]!==el.operator_name?(_=ez(el.operator_name),es[38]=el.operator_name,es[39]=_):_=es[39],es[40]!==_?(S={label:"Operator",value:_},es[40]=_,es[41]=S):S=es[41];let eh=ec?.inclination;if(es[42]!==el.orbit||es[43]!==eh){let e;a=el.orbit,e=a||"GEO",w=null==eh||Number.isNaN(eh)?e:eh<.1?`${e} (station-kept)`:`${e} (${eh.toFixed(1)}\xb0)`,es[42]=el.orbit,es[43]=eh,es[44]=w}else w=es[44];es[45]!==w?(k={label:"Orbit",value:w},es[45]=w,es[46]=k):k=es[46],es[47]!==el.callsign?(C=eD(el.callsign)?[{label:"Call sign",value:el.callsign}]:[],es[47]=el.callsign,es[48]=C):C=es[48],es[49]!==v||es[50]!==N||es[51]!==S||es[52]!==k||es[53]!==C?(O=(0,t.jsx)(e3,{title:"Identification",children:(0,t.jsx)(e5,{fields:[v,N,S,k,...C]})}),es[49]=v,es[50]=N,es[51]=S,es[52]=k,es[53]=C,es[54]=O):O=es[54],es[55]!==el.manufacturer_name?(A=ez(el.manufacturer_name),es[55]=el.manufacturer_name,es[56]=A):A=es[56],es[57]!==A?(M={label:"Manufacturer",value:A},es[57]=A,es[58]=M):M=es[58],es[59]!==el.model_name?(E=ez(el.model_name),es[59]=el.model_name,es[60]=E):E=es[60],es[61]!==E?($={label:"Model",value:E},es[61]=E,es[62]=$):$=es[62];let ex=el.launch_mass?`${el.launch_mass} kg`:"â";return(es[63]!==ex?(L={label:"Mass",value:ex},es[63]=ex,es[64]=L):L=es[64],es[65]!==el.dry_mass||es[66]!==eu?(T=eu?[{label:"Dry mass",value:`${el.dry_mass} kg`}]:[],es[65]=el.dry_mass,es[66]=eu,es[67]=T):T=es[67],es[68]!==M||es[69]!==$||es[70]!==L||es[71]!==T?(D=(0,t.jsx)(e3,{title:"Hardware",children:(0,t.jsx)(e5,{fields:[M,$,L,...T]})}),es[68]=M,es[69]=$,es[70]=L,es[71]=T,es[72]=D):D=es[72],es[73]!==el.launch_date||es[74]!==eo?(z=eo?[]:[{label:"Launch date",value:(0,B.formatDate)(el.launch_date)}],es[73]=el.launch_date,es[74]=eo,es[75]=z):z=es[75],es[76]!==el.launchsite_name?(P=ez(el.launchsite_name),es[76]=el.launchsite_name,es[77]=P):P=es[77],es[78]!==P?(Y={label:"Launch site",value:P},es[78]=P,es[79]=Y):Y=es[79],es[80]!==el.launchvehicle_name?(G=ez(el.launchvehicle_name),es[80]=el.launchvehicle_name,es[81]=G):G=es[81],es[82]!==G?(H={label:"Launch vehicle",value:G},es[82]=G,es[83]=H):H=es[83],es[84]!==z||es[85]!==Y||es[86]!==H?(K=(0,t.jsx)(e3,{title:"Launch",children:(0,t.jsx)(e5,{fields:[...z,Y,H]})}),es[84]=z,es[85]=Y,es[86]=H,es[87]=K):K=es[87],es[88]!==el.beacon?(V=eD(el.beacon)&&(0,t.jsx)(e3,{title:"Beacons",children:(0,t.jsx)(eK,{beacon:el.beacon})}),es[88]=el.beacon,es[89]=V):V=es[89],es[90]!==O||es[91]!==D||es[92]!==K||es[93]!==V?(q=(0,t.jsxs)("div",{className:"mt-6 grid gap-x-8 gap-y-6 lg:grid-cols-2",children:[O,D,K,V]}),es[90]=O,es[91]=D,es[92]=K,es[93]=V,es[94]=q):q=es[94],es[95]!==ec?(J=ec&&(ec.epoch||ec.tle_line1)&&(0,t.jsx)("div",{className:"mt-6 border-t border-border/50 pt-6",children:(0,t.jsx)(eJ,{tle:ec})}),es[95]=ec,es[96]=J):J=es[96],es[97]!==el.comments?(X=eD(el.comments)&&(0,t.jsxs)("div",{className:"mt-6 border-t border-border/50 pt-6",children:[(0,t.jsx)("h3",{className:"mb-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Comment"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:el.comments})]}),es[97]=el.comments,es[98]=X):X=es[98],es[99]!==g||es[100]!==q||es[101]!==J||es[102]!==X?(Z=(0,t.jsxs)("div",{className:"glass-card p-5 sm:p-6",children:[g,q,J,X]}),es[99]=g,es[100]=q,es[101]=J,es[102]=X,es[103]=Z):Z=es[103],es[104]!==el.expected_lifetime||es[105]!==el.launch_date||es[106]!==el.status||es[107]!==ei?(Q=(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(e8,{launchDate:el.launch_date,expectedLifetime:el.expected_lifetime,status:el.status,showRing:ei})}),es[104]=el.expected_lifetime,es[105]=el.launch_date,es[106]=el.status,es[107]=ei,es[108]=Q):Q=es[108],es[109]!==el.channels_count||es[110]!==el.
4norad_number||es[111]!==el.orbit||es[112]!==el.status)?(ee="retired"!==(n=el.status)&&"deorbited"!==n&&"decayed"!==n&&"inactive"!==n&&!!el.norad_number&&(0,t.jsx)(eX,{links:[{href:`/footprints?norad=${el.norad_number}`,icon:"/footprints-64.webp",label:"View footprints"},..."GEO"===el.orbit&&(el.channels_count??0)>0?[{href:`/channels?norad=${el.norad_number}`,icon:I.RadioTower,label:"View channels"}]:[]]}),es[109]=el.channels_count,es[110]=el.norad_number,es[111]=el.orbit,es[112]=el.status,es[113]=ee):ee=es[113],es[114]!==Z||es[115]!==Q||es[116]!==ee||es[117]!==h?(et=(0,t.jsxs)("div",{className:"mx-auto max-w-[1600px] animate-fade-in px-3 py-4 sm:px-4 sm:py-6",children:[h,Z,Q,ee]}),es[114]=Z,es[115]=Q,es[116]=ee,es[117]=h,es[118]=et):et=es[118],et}function eY(){}function eB(e){return e.user}function eW(e){let l,a,n,r,i,o=(0,s.c)(12),{title:c,alsoKnownAs:d,badges:u}=e;return o[0]!==c?(l=(0,t.jsx)("h1",{className:"text-2xl font-bold break-words",children:c}),o[0]=c,o[1]=l):l=o[1],o[2]!==d?(a=eD(d)&&(0,t.jsxs)("p",{className:"mt-1 text-sm text-muted-foreground break-words",children:["Also known as ",d]}),o[2]=d,o[3]=a):a=o[3],o[4]!==l||o[5]!==a?(n=(0,t.jsxs)("div",{className:"min-w-0",children:[l,a]}),o[4]=l,o[5]=a,o[6]=n):n=o[6],o[7]!==u?(r=(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:u}),o[7]=u,o[8]=r):r=o[8],o[9]!==n||o[10]!==r?(i=(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[n,r]}),o[9]=n,o[10]=r,o[11]=i):i=o[11],i}function eG(e){let a,n,r,i,o,c=(0,s.c)(12),{tle:d}=e,[u,m]=(0,l.useState)(null);if(c[0]!==d?(a=()=>{let e=!!d?.tle_line1&&!!d?.tle_line2,t=()=>m(e?(0,Y.isTleSunlit)(d,new Date):null),s=setTimeout(t,0),l=e?setInterval(t,3e4):null;return()=>{clearTimeout(s),l&&clearInterval(l)}},n=[d],c[0]=d,c[1]=a,c[2]=n):(a=c[1],n=c[2]),(0,l.useEffect)(a,n),null==u)return null;let h=u?$.Sun:L.Moon,x=u?"bg-amber-500/15 text-amber-600 dark:text-amber-300":"bg-slate-500/15 text-slate-500 dark:text-slate-300";c[3]!==x?(r=(0,B.cn)("flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-semibold",x),c[3]=x,c[4]=r):r=c[4];let p=u?"Satellite is currently in sunlight":"Satellite is currently in Earth shadow";c[5]!==h?(i=(0,t.jsx)(h,{className:"h-3 w-3"}),c[5]=h,c[6]=i):i=c[6];let f=u?"Sunlit":"Eclipse";return c[7]!==r||c[8]!==p||c[9]!==i||c[10]!==f?(o=(0,t.jsxs)("span",{className:r,title:p,children:[i,f]}),c[7]=r,c[8]=p,c[9]=i,c[10]=f,c[11]=o):o=c[11],o}function eH(e){let l,a,n,r,i=(0,s.c)(10),{status:o}=e,c=`status-${o}`;return i[0]!==c?(l=(0,B.cn)("flex items-center gap-1.5 rounded-full bg-muted px-3 py-1 text-xs font-semibold capitalize",c),i[0]=c,i[1]=l):l=i[1],i[2]!==o?(a=(0,B.cn)("h-1.5 w-1.5 rounded-full",J(o)),i[2]=o,i[3]=a):a=i[3],i[4]!==a?(n=(0,t.jsx)("span",{className:a}),i[4]=a,i[5]=n):n=i[5],i[6]!==o||i[7]!==l||i[8]!==n?(r=(0,t.jsxs)("span",{className:l,children:[n,o]}),i[6]=o,i[7]=l,i[8]=n,i[9]=r):r=i[9],r}function eK(e){let l,a,n,r,i=(0,s.c)(7),{beacon:o}=e;if(i[0]!==o){n=Symbol.for("react.early_return_sentinel");e:{let e=o.split(/[,;\n]+/).map(eq).filter(Boolean);if(0===e.length){n=(0,t.jsx)("p",{className:"text-sm",children:o});break e}l="flex flex-wrap gap-1.5",a=e.map(eV)}i[0]=o,i[1]=l,i[2]=a,i[3]=n}else l=i[1],a=i[2],n=i[3];return n!==Symbol.for("react.early_return_sentinel")?n:(i[4]!==l||i[5]!==a?(r=(0,t.jsx)("div",{className:l,children:a}),i[4]=l,i[5]=a,i[6]=r):r=i[6],r)}function eV(e,s){return(0,t.jsx)("span",{className:"rounded-md border border-border bg-muted/40 px-2 py-1 font-mono text-xs",children:e},`${e}-${s}`)}function eq(e){return e.trim()}function eJ(e){let l,a,n,r,i,o,c=(0,s.c)(13),{tle:d}=e;return c[0]!==d.epoch?(l=d.epoch?new Date(d.epoch).toLocaleString():"â",c[0]=d.epoch,c[1]=l):l=c[1],c[2]!==l?(a={label:"TLE epoch",value:l},c[2]=l,c[3]=a):a=c[3],c[4]===Symbol.for("react.memo_cache_sentinel")?(n={label:"Source",value:"Space-Track"},c[4]=n):n=c[4],c[5]!==a?(r=(0,t.jsx)(e5,{fields:[a,n]}),c[5]=a,c[6]=r):r=c[6],c[7]!==d.tle_line1||c[8]!==d.tle_line2?(i=d.tle_line1&&d.tle_line2&&(0,t.jsxs)("pre",{className:"mt-3 overflow-x-auto rounded-lg border border-border bg-muted/40 p-3 font-mono text-[11px] leading-relaxed",children:[d.tle_line1,"\n",d.tle_line2]}),c[7]=d.tle_line1,c[8]=d.tle_line2,c[9]=i):i=c[9],c[10]!==r||c[11]!==i?(o=(0,t.jsxs)(e3,{title:"Tracking",children:[r,i]}),c[10]=r,c[11]=i,c[12]=o):o=c[12],o}function eX(e){let l,a,n=(0,s.c)(4),{links:r}=e;return n[0]!==r?(l=r.map(eZ),n[0]=r,n[1]=l):l=n[1],n[2]!==l?(a=(0,t.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:l}),n[2]=l,n[3]=a):a=n[3],a}function eZ(e){return(0,t.jsxs)("a",{href:e.href,className:"inline-flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-sm font-medium transition-colors hover:border-primary/40 hover:bg-primary/5",children:["string"==typeof e.icon?(0,t.jsx)(a.default,{src:e.icon,alt:"",width:18,height:18,className:"h-4 w-4 shrink-0 object-contain"}):(0,t.jsx)(e.icon,{className:"h-4 w-4 shrink-0 text-primary"}),e.label]},e.href)}let eQ={US:"United States",USA:"United States",CIS:"Russia (CIS)",RU:"Russia",PRC:"China",CN:"China",IND:"India",IN:"India",JPN:"Japan",JP:"Japan",ESA:"European Space Agency",EUTE:"EUTELSAT",EUME:"EUMETSAT",G
4LOB:"Globalstar",IRID:"Iridium",ORB:"ORBCOMM",SES:"SES",FR:"France",DE:"Germany",UK:"United Kingdom",GB:"United Kingdom",IT:"Italy",CA:"Canada",AUS:"Australia",AU:"Australia",ISRA:"Israel",IL:"Israel",TUR:"Türkiye",ROC:"Taiwan",KOR:"South Korea",IRAN:"Iran",PAKI:"Pakistan",ARGN:"Argentina",BRAZ:"Brazil",ARAB:"Arabsat",THAI:"Thailand",INDO:"Indonesia",KAZ:"Kazakhstan",UAE:"UAE",SAUD:"Saudi Arabia",EGYP:"Egypt",NETH:"Netherlands",SPN:"Spain",SWED:"Sweden",NOR:"Norway",POL:"Poland",UKR:"Ukraine",VENZ:"Venezuela",MEX:"Mexico",NIG:"Nigeria",RASC:"Roscosmos"};function e0(e){let a,n,r,i,o,c,d,u,m,h,x,p,f,g,b,v,j,N,_,S,w,k,C,O,M,E,$,L,I,R,T,D,Y,G,H,K,V,q,J,X,Q,ee,et,es=(0,s.c)(192),{norad:el,name:ea,orbitType:en,tle:er,onBack:ei,backLabel:eo}=e,ec="leo"===en?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":"meo"===en?"bg-purple-500/10 text-purple-600 dark:text-purple-400":"bg-orange-500/10 text-orange-600 dark:text-orange-400";es[0]===Symbol.for("react.memo_cache_sentinel")?(a={},es[0]=a):a=es[0];let[ed,eu]=(0,l.useState)(a);es[1]!==el?(n=()=>{let e=!1;return U.satelliteApi.getSatelliteByNorad(el).then(t=>{!e&&t?.id&&eu(e=>({...e,[el]:t}))}).catch(e2),()=>{e=!0}},r=[el],es[1]=el,es[2]=n,es[3]=r):(n=es[2],r=es[3]),(0,l.useEffect)(n,r);let em=ed[el]??null,eh=(0,W.useAuthStore)(e1);es[4]!==eh?(i=!!eh&&F.ADMIN_GROUP_IDS.includes(eh.gid),es[4]=eh,es[5]=i):i=es[5];let ex=i,ep=function(e){let t,a,n=(0,s.c)(4),[r,i]=(0,l.useState)(null),o=!!(e?.tle_line1&&e?.tle_line2);return n[0]!==o||n[1]!==e?(t=()=>{if(!o||!e)return;let t=()=>{let t=(0,P.propagateSatellite)(e,new Date);if(!t)return;let s=6371*Math.sin(Math.acos(6371/(6371+t.alt)));i({lat:t.lat,lng:t.lng,alt:t.alt,velocity:t.velocity??0,fpAreaMkm2:Math.PI*s*s/1e6})};t();let s=setInterval(t,1e3);return()=>clearInterval(s)},a=[e,o],n[0]=o,n[1]=e,n[2]=t,n[3]=a):(t=n[2],a=n[3]),(0,l.useEffect)(t,a),o?r:null}(er);if(es[6]!==eo||es[7]!==em||es[8]!==ea||es[9]!==el||es[10]!==ei||es[11]!==ec||es[12]!==en||es[13]!==er){let e,s,l,a,n,r,i,A,$,L,I,R,T,F,D,U,P,Y,W,G,H,K,V,q,J,X,Q,ee,et=er&&null!=er.apoapsis&&null!=er.periapsis?(er.apoapsis+er.periapsis)/2:null,ed=er&&null!=er.apoapsis&&null!=er.periapsis?(er.apoapsis+er.periapsis)/2+6371:null;es[36]!==er?(e=!!er&&Z(er),es[36]=er,es[37]=e):e=es[37],m=e,es[38]!==em?.operator_name||es[39]!==er?.constellation?(s=em?.operator_name||(0,z.getOperator)(er?.constellation)?.operator||null,es[38]=em?.operator_name,es[39]=er?.constellation,es[40]=s):s=es[40];let eu=s,eh=!!em?.dry_mass&&em.dry_mass>0&&em.dry_mass!==em.launch_mass;h=m?"decayed":em?.status||er?.status||"active",u=(d=er?.constellation)?`&constellation=${encodeURIComponent(d)}`:"",S="mx-auto max-w-[1600px] animate-fade-in px-3 py-4 sm:px-4 sm:py-6",es[41]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(y.ArrowLeft,{className:"h-4 w-4"}),es[41]=l):l=es[41],es[42]!==eo||es[43]!==ei?(w=(0,t.jsxs)("button",{onClick:ei,className:"mb-4 flex items-center gap-2 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[l," ",eo]}),es[42]=eo,es[43]=ei,es[44]=w):w=es[44],N="glass-card p-5 sm:p-6";let ex=er?.object_name||ea,ep=em?.other_names;es[45]!==h?(a=(0,t.jsx)(eH,{status:h}),es[45]=h,es[46]=a):a=es[46],es[47]!==er?(n=(0,t.jsx)(eG,{tle:er}),es[47]=er,es[48]=n):n=es[48],es[49]!==ec?(r=(0,B.cn)("rounded-full px-3 py-1 text-xs font-bold uppercase tracking-wider",ec),es[49]=ec,es[50]=r):r=es[50],es[51]!==en||es[52]!==r?(i=(0,t.jsx)("span",{className:r,children:en}),es[51]=en,es[52]=r,es[53]=i):i=es[53],es[54]!==a||es[55]!==n||es[56]!==i?(A=(0,t.jsxs)(t.Fragment,{children:[a,n,i]}),es[54]=a,es[55]=n,es[56]=i,es[57]=A):A=es[57],es[58]!==ex||es[59]!==ep||es[60]!==A?(_=(0,t.jsx)(eW,{title:ex,alsoKnownAs:ep,badges:A}),es[58]=ex,es[59]=ep,es[60]=A,es[61]=_):_=es[61],g="mt-6 grid gap-x-8 gap-y-6 lg:grid-cols-2";let ef=er?.cospar_id;es[62]!==el||es[63]!==ef?($=eU(el,ef),es[62]=el,es[63]=ef,es[64]=$):$=es[64],es[65]!==$?(L={label:"NORAD / COSPAR",value:$},es[65]=$,es[66]=L):L=es[66];let eg=er?.constellation||"â";es[67]!==eg?(I={label:"Constellation",value:eg},es[67]=eg,es[68]=I):I=es[68];let eb=er?.object_type;es[69]!==eb?(R=ez(eb),es[69]=eb,es[70]=R):R=es[70],es[71]!==R?(T={label:"Object type",value:R},es[71]=R,es[72]=T):T=es[72];let ev=er?.country_code??null;es[73]!==ev?(F=ev?eQ[ev.toUpperCase()]??ev:"â",es[73]=ev,es[74]=F):F=es[74],es[75]!==F?(D={label:"Country / owner",value:F},es[75]=F,es[76]=D):D=es[76],es[77]!==eu?(U=ez(eu),es[77]=eu,es[78]=U):U=es[78],es[79]!==U?(P={label:"Operator",value:U},es[79]=U,es[80]=P):P=es[80],es[81]!==L||es[82]!==I||es[83]!==T||es[84]!==D||es[85]!==P?(b=(0,t.jsx)(e3,{title:"Identification",children:(0,t.jsx)(e5,{fields:[L,I,T,D,P]})}),es[81]=L,es[82]=I,es[83]=T,es[84]=D,es[85]=P,es[86]=b):b=es[86],es[87]!==em||es[88]!==eh?(v=em&&(em.manufacturer_name||em.model_name||em.launch_mass)&&(0,t.jsx)(e3,{title:"Hardware",children:(0,t.jsx)(e5,{fields:[{label:"Manufacturer",value:ez(em.manufacturer_name)},{label:"Model",value:ez(em.model_name)},{label:"Mass",value:em.launch_mass?`${em.launch_mass} kg`:"â"},...eh?[{label:"Dry mass",value:`${em.dry_mass} kg`}]:[]]})}),es[87]=em,es[88]=eh,es[89]=v):v=es[89];let ej=er?.launch_date??em?.launch_date??null;es[90]!==ej?(Y=(0,B.formatDate)(ej),es[90]=ej,es[91]=Y):Y=es[91],es[92]!==Y?(W={label:"Launch date",value:Y},es[92]=Y,es[93]=W):W=es[93];let eN=em?.launchsite_name;es[94]!==eN?(G=ez(eN),es[94]=eN,es[95]=G):G=es[95],es[96]!==G?(H={label:"Launch site",value:G},es[96]=G,es[97]=H):H=es[97];let ey=em?.launchvehicle_name;es[98]!==ey?(K=ez(ey),es[98]=ey,es[99]=K):K=es[99],es[100]!==K?(V={label:"Launch vehicle",value:K},es[100]=K,es[101]=V):V=es[101],es[102]!==m||es[103]!==er?.decay_date?(q=m?(0,B.formatDate)(er?.decay_date??null):"In orbit",es[102]=m,es[103]=er?.decay_date,es[104]=q):q=es[
4104],es[105]!==q?(J={label:"Decay date",value:q},es[105]=q,es[106]=J):J=es[106],es[107]!==W||es[108]!==H||es[109]!==V||es[110]!==J?(j=(0,t.jsx)(e3,{title:"Launch",children:(0,t.jsx)(e5,{fields:[W,H,V,J]})}),es[107]=W,es[108]=H,es[109]=V,es[110]=J,es[111]=j):j=es[111],c=e3,f="Orbital parameters",o=e5,es[112]!==er?(X=er?.period?`${er.period.toFixed(2)} min`:"â",es[112]=er,es[113]=X):X=es[113],es[114]!==X?(O={label:"Period",value:X},es[114]=X,es[115]=O):O=es[115],es[116]!==er?(M=er?.inclination!=null?[{label:"Inclination",value:`${er.inclination.toFixed(2)}\xb0`}]:[],es[116]=er,es[117]=M):M=es[117],es[118]!==er?(Q=er?.apoapsis!=null?`${er.apoapsis.toFixed(0)} km`:"â",es[118]=er,es[119]=Q):Q=es[119],es[120]!==Q?(E={label:"Apoapsis",value:Q},es[120]=Q,es[121]=E):E=es[121],es[122]!==er?(ee=er?.periapsis!=null?`${er.periapsis.toFixed(0)} km`:"â",es[122]=er,es[123]=ee):ee=es[123],es[124]!==ee?(x={label:"Periapsis",value:ee},es[124]=ee,es[125]=x):x=es[125];let e_=null!=et?`${et.toFixed(0)} km`:"â";es[126]!==e_?(p={label:"Mean altitude",value:e_},es[126]=e_,es[127]=p):p=es[127],k="Semi-major axis",C=null!=ed?`${ed.toFixed(0)} km`:"â",es[6]=eo,es[7]=em,es[8]=ea,es[9]=el,es[10]=ei,es[11]=ec,es[12]=en,es[13]=er,es[14]=o,es[15]=c,es[16]=d,es[17]=u,es[18]=m,es[19]=h,es[20]=x,es[21]=p,es[22]=f,es[23]=g,es[24]=b,es[25]=v,es[26]=j,es[27]=N,es[28]=_,es[29]=S,es[30]=w,es[31]=k,es[32]=C,es[33]=O,es[34]=M,es[35]=E}else o=es[14],c=es[15],d=es[16],u=es[17],m=es[18],h=es[19],x=es[20],p=es[21],f=es[22],g=es[23],b=es[24],v=es[25],j=es[26],N=es[27],_=es[28],S=es[29],w=es[30],k=es[31],C=es[32],O=es[33],M=es[34],E=es[35];es[128]!==k||es[129]!==C?($={label:k,value:C},es[128]=k,es[129]=C,es[130]=$):$=es[130],es[131]!==er?(L=er?.eccentricity!=null?er.eccentricity.toFixed(5):"â",es[131]=er,es[132]=L):L=es[132],es[133]!==L?(I={label:"Eccentricity",value:L,mono:!0},es[133]=L,es[134]=I):I=es[134],es[135]!==x||es[136]!==p||es[137]!==$||es[138]!==I||es[139]!==O||es[140]!==M||es[141]!==E?(R=[O,...M,E,x,p,$,I],es[135]=x,es[136]=p,es[137]=$,es[138]=I,es[139]=O,es[140]=M,es[141]=E,es[142]=R):R=es[142],es[143]!==o||es[144]!==R?(T=(0,t.jsx)(o,{fields:R}),es[143]=o,es[144]=R,es[145]=T):T=es[145],es[146]!==c||es[147]!==f||es[148]!==T?(D=(0,t.jsx)(c,{title:f,children:T}),es[146]=c,es[147]=f,es[148]=T,es[149]=D):D=es[149],es[150]!==m||es[151]!==ep?(Y=!m&&(0,t.jsx)(e3,{title:"Live state",liveDot:!0,children:(0,t.jsx)(e5,{fields:[{label:"Latitude",value:ep?`${ep.lat.toFixed(2)}\xb0`:"â",mono:!0},{label:"Longitude",value:ep?`${ep.lng.toFixed(2)}\xb0`:"â",mono:!0},{label:"Altitude",value:ep?`${ep.alt.toFixed(0)} km`:"â"},{label:"Velocity",value:ep?`${ep.velocity.toFixed(2)} km/s`:"â"},{label:"Footprint area",value:ep?`${ep.fpAreaMkm2.toFixed(1)} M km\xb2`:"â"}]})}),es[150]=m,es[151]=ep,es[152]=Y):Y=es[152],es[153]!==g||es[154]!==b||es[155]!==v||es[156]!==j||es[157]!==D||es[158]!==Y?(G=(0,t.jsxs)("div",{className:g,children:[b,v,j,D,Y]}),es[153]=g,es[154]=b,es[155]=v,es[156]=j,es[157]=D,es[158]=Y,es[159]=G):G=es[159],es[160]!==er?(H=er&&(er.epoch||er.tle_line1)&&(0,t.jsx)("div",{className:"mt-6 border-t border-border/50 pt-6",children:(0,t.jsx)(eJ,{tle:er})}),es[160]=er,es[161]=H):H=es[161],es[162]!==er?(K=!er&&(0,t.jsxs)("div",{className:"mt-6 flex items-center gap-2 rounded-lg border border-warning/30 bg-warning/5 p-3 text-xs text-warning",children:[(0,t.jsx)(A.AlertTriangle,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{children:"TLE details are still loading or unavailable for this object. The tracker can still show its live position."})]}),es[162]=er,es[163]=K):K=es[163],es[164]!==N||es[165]!==_||es[166]!==G||es[167]!==H||es[168]!==K?(V=(0,t.jsxs)("div",{className:N,children:[_,G,H,K]}),es[164]=N,es[165]=_,es[166]=G,es[167]=H,es[168]=K,es[169]=V):V=es[169],es[170]!==em||es[171]!==ex||es[172]!==h?(q=em&&(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(e8,{launchDate:em.launch_date,expectedLifetime:em.expected_lifetime,status:h,showRing:ex})}),es[170]=em,es[171]=ex,es[172]=h,es[173]=q):q=es[173];let ef=`/footprints?orbit=${en}&norad=${el}`;
4es[174]!==en?(J=en.toUpperCase(),es[174]=en,es[175]=J):J=es[175];let eg=`Live ${J} tracker`;return es[176]!==ef||es[177]!==eg?(X={href:ef,icon:"/all_orbits_icon-64.webp",label:eg},es[176]=ef,es[177]=eg,es[178]=X):X=es[178],es[179]!==d||es[180]!==u||es[181]!==en?(Q=d?[{href:`/footprints?orbit=${en}${u}`,icon:"/satellite_icon-64.webp",label:`Browse ${d}`}]:[],es[179]=d,es[180]=u,es[181]=en,es[182]=Q):Q=es[182],es[183]!==X||es[184]!==Q?(ee=(0,t.jsx)(eX,{links:[X,...Q]}),es[183]=X,es[184]=Q,es[185]=ee):ee=es[185],es[186]!==S||es[187]!==w||es[188]!==V||es[189]!==q||es[190]!==ee?(et=(0,t.jsxs)("div",{className:S,children:[w,V,q,ee]}),es[186]=S,es[187]=w,es[188]=V,es[189]=q,es[190]=ee,es[191]=et):et=es[191],et}function e1(e){return e.user}function e2(){}function e3(e){let l,a,n,r=(0,s.c)(8),{title:i,liveDot:o,children:c}=e;return r[0]!==o?(l=o&&(0,t.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),r[0]=o,r[1]=l):l=r[1],r[2]!==l||r[3]!==i?(a=(0,t.jsxs)("h3",{className:"mb-3 flex items-center gap-1.5 text-xs uppercase tracking-wider text-muted-foreground",children:[i,l]}),r[2]=l,r[3]=i,r[4]=a):a=r[4],r[5]!==c||r[6]!==a?(n=(0,t.jsxs)("div",{className:"mt-6 first:mt-0",children:[a,c]}),r[5]=c,r[6]=a,r[7]=n):n=r[7],n}function e5(e){let l,a,n=(0,s.c)(4),{fields:r}=e;return n[0]!==r?(l=r.map(e4),n[0]=r,n[1]=l):l=n[1],n[2]!==l?(a=(0,t.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 md:grid-cols-3",children:l}),n[2]=l,n[3]=a):a=n[3],a}function e4(e){return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:e.label}),(0,t.jsx)("span",{className:(0,B.cn)("text-sm font-medium",e.mono&&"font-mono",e.muted&&"text-muted-foreground/80"),children:e.value})]},e.label)}function e6(e){if(!e)return null;let t=e.match(/([\d.]+)/);if(!t)return null;let s=parseFloat(t[1]);return isNaN(s)||s<=0?null:s}function e8(e){let l,a,n,r,i,o,c,d,u,m,h,x,p,f=(0,s.c)(38),{launchDate:g,expectedLifetime:b,status:v,showRing:j}=e,N=void 0===j||j,y=e6(b);if(f[0]!==g||f[1]!==y||f[2]!==N||f[3]!==v){d=Symbol.for("react.early_return_sentinel");e:{let e,s=g?new Date(g):null;if(!s||isNaN(s.getTime())||!y){d=null;break e}let u=new Date,m=365.25*y*864e5,h=new Date(s.getTime()+m),x=u.getTime()-s.getTime(),p=h.getTime()-u.getTime(),b=Math.max(0,x/315576e5),j=Math.max(0,p/315576e5),_=Math.max(0,-p/315576e5),S=Math.min(100,Math.max(0,x/m*100)),w=p<=0,k=!w&&S>=80,C="deorbited"===v||"decayed"===v||"retired"===v,E=C?"text-muted-foreground":w?"text-destructive":k?"text-warning":"text-success",$=C?"bg-muted/30":w?"bg-destructive/5":k?"bg-warning/5":"bg-success/5",L=2*Math.PI*34,I=L-S/100*L;l=(a=C?{icon:A.AlertTriangle,tone:"text-muted-foreground",text:`Satellite is ${v}`}:w?{icon:A.AlertTriangle,tone:"text-destructive",text:`Design lifetime exceeded by ${_.toFixed(1)} years`}:k?{icon:A.AlertTriangle,tone:"text-warning",text:"Approaching end of design lifetime"}:{icon:M,tone:"text-success",text:"Within design lifetime"}).icon;let R=[{label:"Launched",value:(0,B.normalizeShortMonth)(s.toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"}))},{label:"Design life",value:`${y} yr`},{label:"Elapsed",value:`${b.toFixed(1)} yr`},{label:"Remaining",value:w?"Expired":`${j.toFixed(1)} yr`,tone:w?"text-destructive":void 0},{label:"End of life",value:(0,B.normalizeShortMonth)(h.toLocaleDateString("en-GB",{month:"short",year:"numeric"})),tone:w?"text-destructive":void 0}];f[12]!==$?(c=(0,B.cn)("glass-card p-4 sm:p-5",$),f[12]=$,f[13]=c):c=f[13],r="flex flex-col gap-4 sm:flex-row sm:items-center",f[14]!==I||f[15]!==S||f[16
4]!==E||f[17]!==N?(i=N&&(0,t.jsxs)("div",{className:"relative shrink-0",children:[(0,t.jsxs)("svg",{width:76,height:76,className:"-rotate-90",children:[(0,t.jsx)("circle",{cx:38,cy:38,r:34,fill:"none",stroke:"currentColor",className:"text-border",strokeWidth:8}),(0,t.jsx)("circle",{cx:38,cy:38,r:34,fill:"none",stroke:"currentColor",className:E,strokeWidth:8,strokeDasharray:L,strokeDashoffset:I,strokeLinecap:"round",style:{transition:"stroke-dashoffset 0.6s ease"}})]}),(0,t.jsx)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:(0,t.jsxs)("span",{className:(0,B.cn)("text-sm font-bold tabular-nums",E),children:[Math.round(S),"%"]})})]}),f[14]=I,f[15]=S,f[16]=E,f[17]=N,f[18]=i):i=f[18],f[19]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:[(0,t.jsx)(O.Clock,{className:"h-3.5 w-3.5"}),"Lifetime"]}),f[19]=e):e=f[19];let T=R.map(e7);f[20]!==T?(o=(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[e,(0,t.jsx)("div",{className:"grid grid-cols-2 gap-x-6 gap-y-3 sm:grid-cols-5",children:T})]}),f[20]=T,f[21]=o):o=f[21],n=(0,B.cn)("flex items-center gap-2 text-xs shrink-0",a.tone)}f[0]=g,f[1]=y,f[2]=N,f[3]=v,f[4]=l,f[5]=a,f[6]=n,f[7]=r,f[8]=i,f[9]=o,f[10]=c,f[11]=d}else l=f[4],a=f[5],n=f[6],r=f[7],i=f[8],o=f[9],c=f[10],d=f[11];return d!==Symbol.for("react.early_return_sentinel")?d:(f[22]!==l?(u=(0,t.jsx)(l,{className:"h-3.5 w-3.5 shrink-0"}),f[22]=l,f[23]=u):u=f[23],f[24]!==a.text?(m=(0,t.jsx)("span",{children:a.text}),f[24]=a.text,f[25]=m):m=f[25],f[26]!==n||f[27]!==u||f[28]!==m?(h=(0,t.jsxs)("div",{className:n,children:[u,m]}),f[26]=n,f[27]=u,f[28]=m,f[29]=h):h=f[29],f[30]!==h||f[31]!==r||f[32]!==i||f[33]!==o?(x=(0,t.jsxs)("div",{className:r,children:[i,o,h]}),f[30]=h,f[31]=r,f[32]=i,f[33]=o,f[34]=x):x=f[34],f[35]!==x||f[36]!==c?(p=(0,t.jsx)("div",{className:c,children:x}),f[35]=x,f[36]=c,f[37]=p):p=f[37],p)}function e7(e){return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:(0,B.cn)("text-sm font-semibold tabular-nums",e.tone),children:e.value}),(0,t.jsx)("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:e.label})]},e.label)}e.s(["default",0,function(e){let a,n,r=(0,s.c)(4),{initialDetail:i,initialTle:o}=e,c=void 0===i?null:i,d=void 0===o?null:o;return r[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)("div",{className:"flex h-full w-full items-center justify-center bg-background",children:(0,t.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),r[0]=a):a=r[0],r[1]!==c||r[2]!==d?(n=(0,t.jsx)(l.Suspense,{fallback:a,children:(0,t.jsx)(el,{initialDetail:c,initialTle:d})}),r[1]=c,r[2]=d,r[3]=n):n=r[3],n}],328976)}]);
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.