1import{r as e}from"./vendor-react-g7dyc9sh.js";import{r as t}from"./parse-iso-h709tymn.js";import{r as n}from"./math-m6aq0gyl.js";import{t as r}from"./format-duration-kfe23uy3.js";import{t as i}from"./weight-bn89u6xi.js";var a={version:`1.0`,metricIds:[`sleep`,`hrv`,`steps`,`rhr`,`weight`,`dailyhr`,`calories`]},o=e(),s=`#67d36c`,c=`#2e7d32`,l=1.6;function u(e){return{width:e,height:e,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0}}function d(e){return{stroke:e??`currentColor`,strokeWidth:l,strokeLinecap:`round`,strokeLinejoin:`round`}}function f({size:e=18,color:t}){return(0,o.jsxs)(`svg`,{...u(e),children:[(0,o.jsx)(`path`,{d:`M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.29 1.51 4.04 3 5.5l7 7Z`,...d(t)}),(0,o.jsx)(`path`,{d:`M6.5 11.5h3l1.5-3 2 5 1.5-2h3`,...d(t)})]})}function p({size:e=18,color:t}){return(0,o.jsx)(`svg`,{...u(e),children:(0,o.jsx)(`path`,{d:`M21 12.79A9 9 0 1 1 11.21 3a7 7 0 0 0 9.79 9.79z`,...d(t)})})}function m({size:e=18,color:t}){return(0,o.jsx)(`svg`,{...u(e),children:(0,o.jsx)(`path`,{d:`M2 12h3l2-6 3 12 3-8 2 4h2l2-2h3`,...d(t)})})}function h({size:e=18,color:t}){return(0,o.jsxs)(`svg`,{...u(e),children:[(0,o.jsx)(`path`,{d:`M4 16v-2.38C4 11.5 2.97 10.5 3 8c.03-2.72 1.49-6 4.5-6C9.37 2 10 3.8 10 5.5c0 3.11-2 5.66-2 8.68V16a2 2 0 1 1-4 0Z`,...d(t)}),(0,o.jsx)(`path`,{d:`M20 20v-2.38c0-2.12 1.03-3.12 1-5.62-.03-2.72-1.49-6-4.5-6C14.63 6 14 7.8 14 9.5c0 3.11 2 5.66 2 8.68V20a2 2 0 1 0 4 0Z`,...d(t)}),(0,o.jsx)(`path`,{d:`M16 17h4`,...d(t)}),(0,o.jsx)(`path`,{d:`M4 13h4`,...d(t)})]})}function g({size:e=18,color:t}){return(0,o.jsx)(`svg`,{...u(e),children:(0,o.jsx)(`path`,{d:`M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.29 1.51 4.04 3 5.5l7 7Z`,...d(t)})})}function _({size:e=18,color:t}){return(0,o.jsxs)(`svg`,{...u(e),children:[(0,o.jsx)(`path`,{d:`M12 3.5v5.5M12 9c-.9.9-2 1.5-3.3 1.9M12 9c.9.9 2 1.5 3.3 1.9`,...d(t)}),(0,o.jsx)(`path`,{d:`M8.7 10.9C6 12 4.2 14.8 4.2 17.7c0 1.7 1.3 2.9 2.9 2.9 1.6 0 2.9-1.3 2.9-2.9v-4.4c0-.9-.4-1.8-1.3-2.4z`,...d(t)}),(0,o.jsx)(`path`,{d:`M15.3 10.9c2.7 1.1 4.5 3.9 4.5 6.8 0 1.7-1.3 2.9-2.9 2.9-1.6 0-2.9-1.3-2.9-2.9v-4.4c0-.9.4-1.8 1.3-2.4z`,...d(t)})]})}function v({size:e=18,color:t}){return(0,o.jsxs)(`svg`,{...u(e),children:[(0,o.jsx)(`path`,{d:`M6 3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3z`,...d(t)}),(0,o.jsx)(`path`,{d:`M8.2 10.4a4.8 4.8 0 0 1 7.6 0`,...d(t)}),(0,o.jsx)(`path`,{d:`M12 10.2l1.8-2.2`,...d(t)})]})}function y({size:e=18,color:t}){return(0,o.jsxs)(`svg`,{...u(e),children:[(0,o.jsx)(`path`,{d:`M10 4.5a2 2 0 0 1 4 0v8.7a4.5 4.5 0 1 1-4 0V4.5z`,...d(t)}),(0,o.jsx)(`path`,{d:`M12 8.5V15`,...d(t)})]})}function b({size:e=18,color:t}){return(0,o.jsxs)(`svg`,{...u(e),children:[(0,o.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,...d(t)}),(0,o.jsx)(`path`,{d:`M7 12h2l1.5-3.5 2.4 6.5 1.6-3h2.5`,...d(t)})]})}function x({size:e=18,color:t}){return(0,o.jsxs)(`svg`,{...u(e),children:[(0,o.jsx)(`path`,{d:`M9.6 4.6A2 2 0 1 1 11 8H3`,...d(t)}),(0,o.jsx)(`path`,{d:`M12.6 19.4A2 2 0 1 0 14 16H3`,...d(t)}),(0,o.jsx)(`path`,{d:`M17.7 7.7A2.5 2.5 0 1 1 19.5 12H3`,...d(t)})]})}function S({size:e=18,color:t}){return(0,o.jsxs)(`svg`,{...u(e),children:[(0,o.jsx)(`path`,{d:`M4.5 15.5a7.5 7.5 0 1 1 15 0`,...d(t)}),(0,o.jsx)(`path`,{d:`M12 15.5l3.4-4`,...d(t)})]})}function C({size:e=18,color:t}){return(0,o.jsx)(`svg`,{...u(e),children:(0,o.jsx)(`path`,{d:`M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z`,...d(t)})})}function w(e,t){return e?t(`Measured as {method}`,{method:e.toUpperCase()}):t(`Variation between heartbeats`)}function T(e,t,n){switch(e){case`sleep`:return t(`Total time asleep`);case`hrv`:return w(n,t);case`steps`:return t(`Total steps for the day`);case`rhr`:return t(`Resting heart rate from your device`);case`pulseox`:return t(`Blood oxygen saturation`);case`weight`:return t(`Recorded weight`);case`skintemp`:return t(`Deviation from your personal baseline`);case`dailyhr`:return t(`All-day average · includes training`);case`resprate`:return t(`Breaths per minute`);case`bp`:return t(`Systolic / diastolic · mmHg`);case`calories`:return t(`Active energy burned · includes workouts`)}}function E(e){let t=Math.round(e),n=Math.floor(t/60);return`${n}h ${t-n*60}m`}function D(e){let n=t(e);return n?n.toFormat(`h:mm a`):``}
1function O(e){return Math.round(e).toLocaleString(`en-US`)}function k(e){return e<1e3?`${Math.round(e)}`:e%10==0?`${Math.round(e/10)/100}k`:j(Math.round(e/100)/10)}function A(e){return e<1e3?O(Math.floor(e)):j(Math.floor(e/100)/10)}function j(e){return`${Number.isInteger(e)?e:e.toFixed(1)}k`}var M=`â`;function N(e){return n(e*1.8,1)}function P(e){if(e.length===0)return[0,0];let t=Math.min(...e),n=Math.max(...e),r=n-t,i=r>0?r*.15:Math.max(Math.abs(t)*.05,1);return[t-i,n+i]}function F(e){if(e.length===0)return[0,0];let t=Math.max(...e.map(e=>Math.abs(e)),.1);return[-t,t]}var I={id:`sleep`,name:`Sleep`,accent:{base:`#5b6ee8`,light:`#4a5dc7`,dark:`#8e9cf2`},icon:p,daySummaryKey:`sleep`,typicalSpan:180,sparkline:`bars`,featuredBy:`value`,extractValue:e=>{let t=e.totalDurationSeconds;return Number.isFinite(t)?t/60:null},measuredAtOf:e=>e.endTime,formatValue:e=>E(e),formatChipValue:e=>E(e),formatChipNarrow:e=>r(Math.round(e)*60,`h:mm`),axisStep:60,formatAxisValue:e=>`${Math.round(e/60)}h`,formatDelta:e=>`${Math.round(e)} min`,formatRecentMeta:e=>{let t=e,n=D(t.startTime),r=D(t.endTime);return n===``||r===``?null:`${n} â ${r}`}};function L(e){let t=e.metricType;return t===`Sdnn`||t===`Rmssd`?t:null}var R={sleep:I,hrv:{id:`hrv`,name:`HRV`,accent:{base:`#0fb5a0`,light:`#0a8e7e`,dark:`#45cdb9`},icon:m,daySummaryKey:`hrv`,typicalSpan:30,sparkline:`line`,deltaIsPercent:!0,metricTypeOf:L,extractValue:e=>{let t=e.valueMs;return Number.isFinite(t)?t:null},measuredAtOf:e=>e.measuredAt,formatValue:e=>`${Math.round(e)} ms`,formatChipValue:e=>`${Math.round(e)}`,chipUnit:()=>` ms`,formatAxisValue:e=>`${Math.round(e)} ms`,formatDelta:e=>`${Math.round(e)} ms`,formatRecentMeta:(e,t)=>w(L(e),t)},steps:{id:`steps`,name:`Steps`,accent:{base:`#e8a23a`,light:`#b8801c`,dark:`#f0b965`},icon:h,daySummaryKey:`steps`,typicalSpan:8e3,sparkline:`bars`,extractValue:e=>{let t=e.steps;return Number.isFinite(t)?t:null},measuredAtOf:e=>e.measuredAt,formatValue:e=>O(e),formatChipValue:e=>O(e),formatChipNarrow:e=>A(e),formatAxisValue:e=>k(e),formatDelta:e=>O(e),formatRecentMeta:(e,t)=>t(`Today's count is incomplete`),cumulative:!0},rhr:{id:`rhr`,name:`Resting HR`,accent:{base:`#a13f92`,light:`#a13f92`,dark:`#d683c9`},icon:g,daySummaryKey:`rhr`,typicalSpan:12,sparkline:`line`,extractValue:e=>{let t=e.valueBpm;return Number.isFinite(t)?t:null},measuredAtOf:e=>e.measuredAt,formatValue:e=>`${Math.round(e)} bpm`,formatChipValue:e=>`${Math.round(e)}`,chipUnit:()=>` bpm`,formatDelta:e=>`${Math.round(e)} bpm`,formatRecentMeta:()=>null,displayWindow:P},pulseox:{id:`pulseox`,name:`Pulse Ox`,accent:{base:`#2280c2`,light:`#2280c2`,dark:`#74bff0`},icon:_,daySummaryKey:`spo2`,typicalSpan:4,sparkline:`line`,extractValue:e=>{let t=e.avgValue;return Number.isFinite(t)?t:null},measuredAtOf:e=>e.measuredAt,formatValue:e=>`${Math.round(e)}%`,formatChipValue:e=>`${Math.round(e)}`,chipUnit:()=>`%`,formatAxisValue:e=>`${Math.round(e)}%`,formatDelta:e=>`${Math.round(e)} pt`,formatRecentMeta:()=>null,displayWindow:P},weight:{id:`weight`,name:`Weight`,accent:{base:`#7d50cc`,light:`#7d50cc`,dark:`#b795f2`},icon:v,daySummaryKey:`weight`,typicalSpan:1.8,sparkline:`line`,extractValue:e=>{let t=e.weightKg;return Number.isFinite(t)?t:null},measuredAtOf:e=>e.date,formatValue:(e,t)=>t.isMetric?`${n(e,1)} kg`:`${n(i(e),1)} lb`,formatChipValue:(e,t)=>`${n(t.isMetric?e:i(e),1)}`,chipUnit:e=>e.isMetric?` kg`:` lb`,formatChipNarrow:(e,t)=>`${Math.floor(n(t.isMetric?e:i(e),1))}`,formatDelta:(e,t)=>t.isMetric?`${n(e,1)} kg`:`${n(i(e),1)} lb`,formatRecentMeta:()=>null,displayWindow:P},skintemp:{id:`skintemp`,name:`Skin Temp`,accent:{base:`#a08a47`,light:`#a08a47`,dark:`#dbcb97`},icon:y,daySummaryKey:`skinTemperature`,typicalSpan:1.1,sparkline:`bars`,signed:!0,extractValue:e=>{let t=e.deviationCelsius;return t!==null&&Number.isFinite(t)?t:null},measuredAtOf:e=>e.measuredAt,formatValue:(e,t)=>{let r=t.isMetric?n(e,1):N(e);return`${r>0?`+`:r<0?M:``}${Math.abs(r).toFixed(1)} ${t.isMetric?`°C`:`°F`}`},formatChipValue:(e,t)=>{let r=t.isMetric?n(e,1):N(e);return`${r>0?`+`:r<0?M:``}${Math.abs(r).toFixed(1)}°`},formatDelta:(e,t)=>{let r=t.isMetric?n(e,1):N(e);return`${Math.abs(r).toFixed(1)} ${t.isMetric?`°C`:`°F`}`},formatRecentMeta:()=>null,displayWindow:F}
1,dailyhr:{id:`dailyhr`,name:`Daily HR`,accent:{base:`#1f9cad`,light:`#1f9cad`,dark:`#74d8e5`},icon:b,daySummaryKey:`dailyHeartRate`,typicalSpan:20,sparkline:`line`,extractValue:e=>{let t=e.avgBpm;return Number.isFinite(t)?t:null},measuredAtOf:e=>e.measuredAt,formatValue:e=>`${Math.round(e)} bpm`,formatChipValue:e=>`${Math.round(e)}`,chipUnit:()=>` bpm`,formatDelta:e=>`${Math.round(e)} bpm`,formatRecentMeta:()=>null,displayWindow:P},resprate:{id:`resprate`,name:`Respiratory Rate`,accent:{base:`#8f659a`,light:`#8f659a`,dark:`#c5a8cc`},icon:x,daySummaryKey:`respiratoryRate`,typicalSpan:4,sparkline:`line`,extractValue:e=>{let t=e.avgValue;return Number.isFinite(t)?t:null},measuredAtOf:e=>e.measuredAt,formatValue:e=>`${n(e,1)} brpm`,formatChipValue:e=>`${n(e,1)}`,chipUnit:()=>` brpm`,formatDelta:e=>`${n(e,1)} brpm`,formatRecentMeta:()=>null,displayWindow:P},bp:{id:`bp`,name:`Blood Pressure`,accent:{base:`#68809a`,light:`#68809a`,dark:`#aebfd1`},icon:S,daySummaryKey:`bloodPressure`,typicalSpan:24,sparkline:`line`,paired:!0,extractValue:e=>{let t=e.systolicValue;return Number.isFinite(t)?t:null},pairedExtractValue:e=>{let t=e.diastolicValue;return Number.isFinite(t)?t:null},measuredAtOf:e=>e.measuredAt,formatValue:e=>`${Math.round(e)} mmHg`,formatChipValue:e=>`${Math.round(e)}`,chipUnit:()=>` mmHg`,formatChipPaired:(e,t)=>`${Math.round(e)}/${Math.round(t)}`,formatPaired:(e,t)=>`${Math.round(e)}/${Math.round(t)} mmHg`,formatDelta:e=>`${Math.round(e)}`,formatRecentMeta:()=>null,displayWindow:P},calories:{id:`calories`,name:`Calories`,accent:{base:`#b4682c`,light:`#b4682c`,dark:`#e5a878`},icon:C,daySummaryKey:`calories`,typicalSpan:1200,sparkline:`bars`,extractValue:e=>{let t=e.activeCalories;return Number.isFinite(t)?t:null},measuredAtOf:e=>e.measuredAt,formatValue:e=>`${O(e)} kcal`,formatChipValue:e=>O(e),chipUnit:()=>` kcal`,formatChipNarrow:e=>A(e),formatDelta:e=>`${O(e)} kcal`,formatRecentMeta:()=>null,cumulative:!0}},z=Object.keys(R);function B(e){return R[e]}function V(e){return Object.prototype.hasOwnProperty.call(R,e)}export{s as a,a as c,T as i,B as n,c as o,V as r,f as s,z as t}; 2//# sourceMappingURL=registry-dk1379p6.js.map
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.