1var U=Object.defineProperty;var G=(t,a,e)=>a in t?U(t,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[a]=e;var T=(t,a,e)=>G(t,typeof a!="symbol"?a+"":a,e);import{r as q}from"./chunk-62JRHF6Z-VE1ewJCM.js";import{Q as V,R as W,U as Y,V as S,X as Z,Y as l,Z as N,$ as p,a0 as F,a1 as E,a2 as K,a3 as X,a4 as z,a5 as M,a6 as x,a7 as B,a8 as Q,a9 as H,aa as J,ab as tt,ac as et,ad as rt}from"./use-health-profile-feature-CnrV9wh_.js";import{j as nt}from"./index-y7LNTZAR.js";function I(t,a){return Object.keys(t).reduce((e,r)=>(e[r]={timeZone:a,...t[r]},e),{})}function R(t,a){return Object.keys({...t,...a}).reduce((r,n)=>(r[n]={...t[n],...a[n]},r),{})}function L(t,a){if(!a)return t;const e=Z.formats;return{...e,...t,date:R(I(e.date,a),I(t.date||{},a)),time:R(I(e.time,a),I(t.time||{},a))}}const O=({locale:t,formats:a,messages:e,defaultLocale:r,defaultFormats:n,fallbackOnEmptyString:o,onError:i,timeZone:m,defaultRichTextElements:h},s,y={id:""},c,D)=>{const{id:P,defaultMessage:u}=y;V(!!P,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.github.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.github.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.github.io/docs/tooling/linter#enforce-id)\nto autofix this issue");const g=String(P),f=e&&Object.prototype.hasOwnProperty.call(e,g)&&e[g];if(Array.isArray(f)&&f.length===1&&f[0].type===W.literal)return f[0].value;if(c={...h,...c},a=L(a,m),n=L(n,m),!f){if(o===!1&&f==="")return f;if((!u||t&&t.toLowerCase()!==r.toLowerCase())&&i(new Y(y,t)),u)try{return s.getMessageFormat(u,r,n,D).format(c)}catch(d){return i(new S(`Error formatting default message for: "${g}", rendering default message verbatim`,t,y,d)),typeof u=="string"?u:g}return g}try{return s.getMessageFormat(f,t,a,{formatters:s,...D}).format(c)}catch(d){i(new S(`Error formatting message: "${g}", using ${u?"default message":"id"} as fallback.`,t,y,d))}if(u)try{return s.getMessageFormat(u,r,n,D).format(c)}catch(d){i(new S(`Error formatting the default message for: "${g}", rendering message verbatim`,t,y,d))}return typeof f=="string"?f:typeof u=="string"?u:g},at=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function b({locale:t,formats:a,onError:e,timeZone:r},n,o,i={}){const{format:m}=i,h={...r&&{timeZone:r},...m&&N(a,n,m,e)};let s=p(i,at,h);return n==="time"&&!s.hour&&!s.minute&&!s.second&&!s.timeStyle&&!s.dateStyle&&(s={...s,hour:"numeric",minute:"numeric"}),o(t,s)}function ot(t,a,e,r={}){const n=typeof e=="string"?new Date(e||0):e;try{return b(t,"date",a,r).format(n)}catch(o){t.onError(new l("Error formatting date.",t.locale,o))}return String(n)}function it(t,a,e,r={}){const n=typeof e=="string"?new Date(e||0):e;try{return b(t,"time",a,r).format(n)}catch(o){t.onError(new l("Error formatting time.",t.locale,o))}return String(n)}function st(t,a,e,r,n={}){const o=typeof e=="string"?new Date(e||0):e,i=typeof r=="string"?new Date(r||0):r;try{return b(t,"dateTimeRange",a,n).formatRange(o,i)}catch(m){t.onError(new l("Error formatting date time range.",t.locale,m))}return String(o)}function mt(t,a,e,r={}){const n=typeof e=="string"?new Date(e||0):e;try{return b(t,"date",a,r).formatToParts(n)}catch(o){t.onError(new l("Error formatting date.",t.locale,o))}return[]}function lt(t,a,e,r={}){const n=typeof e=="string"?new Date(e||0):e;try{return b(t,"time",a,r).formatToParts(n)}catch(o){t.onError(new l("Error formatting time.",t.locale,o))}return[]}const ut=["style","type","fallback","languageDisplay"];function ft({locale:t,onError:a},e,r,n){Intl.DisplayNames||a(new F(`Intl.DisplayNames is not available in this environment. 2Try polyfilling it using "@formatjs/intl-displaynames" 3`,E.MISSING_INTL_API));const i=p(n,ut);try{return e(t,i).of(r)}catch(m){a(new l("Error formatting display name.",t,m))}}const ct=["type","style"],_=Date.now();function gt(t){return`${_}_${t}_${_}`}function dt(t,a,e,r={}){const n=$(t,a,e,r).reduce((o,i)=>{const m=i.value;return typeof m!="string"?o.push(m):typeof o[o.length-1]=="string"?o[o.length-1]+=m:o.push(m),o},[]);return n.length===1?n[0]:n.length===0?"":n}function $({locale:t,onError:a},e,r,n={}){Intl.ListFormat||a(new F(`Intl.ListFormat is not available in this environment. 4Try polyfilling it using "@formatjs/intl-listformat" 5`,E.MISSING_INTL_API));const i=p(n,ct);try{const m={},h=Array.from(r).map((s,y)=>{if(typeof s=="object"&&s!==null){const c=gt(y);return m[c]=s,c}return String(s)});return e(t,i).formatToParts(h).map(s=>s.type==="literal"?s:{...s,value:m[s.value]||s.value})}catch(m){a(new l("Error formatting list.",t,m))}return r}const yt=["type"];function pt({locale:t,onError:a},e,r,n={}){Intl.PluralRules||a(new F(`Intl.PluralRules is not available in this environment. 6Try polyfilling it using "@formatjs/intl-pluralrules" 7`,E.MISSING_INTL_API));const o=p(n,yt);try{return e(t,o).select(r)}catch(i){a(new l("Error formatting plural.",t,i))}return"other"}const ht=["numeric","style"];function Tt({locale:t,formats:a,onError:e},r,n={}){const{format:o}=n,i=!!o&&N(a,"relative",o,e)||{},m=p(n,ht,i);return r(t,m)}function bt(t,a,e,r,n={}){r||(r="second"),Intl.RelativeTimeFormat||t.onError(new F(`Intl.RelativeTimeFormat is not available in this environment. 8Try polyfilling it using "@formatjs/intl-relativetimeformat" 9`,E.MISSING_INTL_API));try{return Tt(t,a,n).format(e,r)}catch(i){t.onError(new l("Error formatting relative time.",t.locale,i))}return String(e)}const It=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function v({locale:t,formats:a,onError:e},r,n={}){const{format:o}=n,i=o&&N(a,"number",o,e)||{},m=p(n,It,i);return r(t,m)}function Ft(t,a,e,r={}){try{return v(t,a,r).format(e)}catch(n){t.onError(new l("Error formatting number.",t.locale,n))}return String(e)}function Et(t,a,e,r={}){try{return v(t,a,r).formatToParts(e)}catch(n){t.onError(new l("Error formatting number.",t.locale,n))}return[]}function Dt(t){return typeof(t?t[Object.keys(t)[0]]:void 0)=="string"}function St(t){t.onWarn&&t.defaultRichTextElements&&Dt(t.messages||{})&&t.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled. 10Please consider using "@formatjs/cli" to pre-compile your messages for performance. 11For more details see https://formatjs.github.io/docs/getting-started/message-distribution`)}function wt(t,a){const e=K(a),r={...z,...t},{locale:n,defaultLocale:o,onError:i}=r;return n?!Intl.NumberFormat.supportedLocalesOf(n).length&&i?i(new M(`Missing locale data for locale: "${n}" in Intl.NumberFormat. Using default locale: "${o}" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details`)):!Intl.DateTimeFormat.supportedLocalesOf(n).length&&i&&i(new M(`Missing locale data for locale: "${n}" in Intl.DateTimeFormat. Using default locale: "${o}" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details`)):(i&&i(new X(`"locale" was not configured, using "${o}" as fallback. See https://formatjs.github.io/docs/react-intl/api#intlshape for more details`)),r.locale=r.defaultLocale||"en"),St(r),{...r,formatters:e,formatNumber:Ft.bind(null,r,e.getNumberFormat),formatNumberToParts:Et.bind(null,r,e.getNumberFormat),formatRelativeTime:bt.bind(null,r,e.getRelativeTimeFormat),formatDate:ot.bind(null,r,e.getDateTimeFormat),formatDateToParts:mt.bind(null,r,e.getDateTimeFormat),formatTime:it.bind(null,r,e.getDateTimeFormat),formatDateTimeRange:st.bind(null,r,e.getDateTimeFormat),formatTimeToParts:lt.b
11ind(null,r,e.getDateTimeFormat),formatPlural:pt.bind(null,r,e.getPluralRules),formatMessage:O.bind(null,r,e),$t:O.bind(null,r,e),formatList:dt.bind(null,r,e.getListFormat),formatListToParts:$.bind(null,r,e.getListFormat),formatDisplayName:ft.bind(null,r,e.getDisplayNames)}}function k(t){return t&&Object.keys(t).reduce((a,e)=>{const r=t[e];return a[e]=B(r)?Q(r):r,a},{})}const j=(t,a,e,r,...n)=>{const o=k(r),i=O(t,a,e,o,...n);return Array.isArray(i)?H(i):i},A=({defaultRichTextElements:t,...a},e)=>{const r=k(t),n=wt({...x,...a,defaultRichTextElements:r},e),o={locale:n.locale,timeZone:n.timeZone,fallbackOnEmptyString:n.fallbackOnEmptyString,formats:n.formats,defaultLocale:n.defaultLocale,defaultFormats:n.defaultFormats,messages:n.messages,onError:n.onError,defaultRichTextElements:r};return{...n,formatMessage:j.bind(null,o,n.formatters),$t:j.bind(null,o,n.formatters)}};function w(t){return{locale:t.locale,timeZone:t.timeZone,fallbackOnEmptyString:t.fallbackOnEmptyString,formats:t.formats,textComponent:t.textComponent,messages:t.messages,defaultLocale:t.defaultLocale,defaultFormats:t.defaultFormats,onError:t.onError,onWarn:t.onWarn,wrapRichTextChunksInFragment:t.wrapRichTextChunksInFragment,defaultRichTextElements:t.defaultRichTextElements}}class C extends q.PureComponent{constructor(){super(...arguments);T(this,"cache",J());T(this,"state",{cache:this.cache,intl:A(w(this.props),this.cache),prevConfig:w(this.props)})}static getDerivedStateFromProps(e,{prevConfig:r,cache:n}){const o=w(e);return tt(r,o)?null:{intl:A(o,n),prevConfig:o}}render(){return et(this.state.intl),nt.jsx(rt,{value:this.state.intl,children:this.props.children})}}T(C,"displayName","IntlProvider"),T(C,"defaultProps",x);export{C as I}; 12//# sourceMappingURL=provider-CnMFFexM.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.