1import{t as e}from"./defineProperty.js";var t=e=>typeof e==`string`,n=e=>typeof e==`function`,r=new Map,i=`en`;function a(e){return[...Array.isArray(e)?e:[e],i]}function o(e,n,r){let i=a(e);r||=`default`;let o;if(typeof r==`string`)switch(o={day:`numeric`,month:`short`,year:`numeric`},r){case`full`:o.weekday=`long`;case`long`:o.month=`long`;break;case`short`:o.month=`numeric`}else o=r;return u(()=>d(`date`,i,r),()=>new Intl.DateTimeFormat(i,o)).format(t(n)?new Date(n):n)}function s(e,t,n){let r;if(n||=`default`,typeof n==`string`)switch(r={second:`numeric`,minute:`numeric`,hour:`numeric`},n){case`full`:case`long`:r.timeZoneName=`short`;break;case`short`:delete r.second}else r=n;return o(e,t,r)}function c(e,t,n){let r=a(e);return u(()=>d(`number`,r,n),()=>new Intl.NumberFormat(r,n)).format(t)}function l(e,t,n,{offset:r=0,...i}){let o=a(e),s=t?u(()=>d(`plural-ordinal`,o),()=>new Intl.PluralRules(o,{type:`ordinal`})):u(()=>d(`plural-cardinal`,o),()=>new Intl.PluralRules(o,{type:`cardinal`}));return i[n]??i[s.select(n-r)]??i.other}function u(e,t){let n=e(),i=r.get(n);return i||(i=t(),r.set(n,i)),i}function d(e,t,n){return`${e}-${t.join(`-`)}-${JSON.stringify(n)}`}var f=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}
1/,p=e=>e.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(e,t,n)=>{if(t){let e=parseInt(t,16);return String.fromCharCode(e)}{let e=parseInt(n,16);return String.fromCharCode(e)}}),m=`%__lingui_octothorpe__%`,h=(e,t,n={})=>{let r=t||e,i=e=>typeof e==`object`?e:n[e],a=(e,t)=>{let a=Object.keys(n).length?i(`number`):void 0,o=c(r,e,a);return t.replace(new RegExp(m,`g`),o)};return{plural:(e,t)=>{let{offset:n=0}=t,i=l(r,!1,e,t);return a(e-n,i)},selectordinal:(e,t)=>{let{offset:n=0}=t,i=l(r,!0,e,t);return a(e-n,i)},select:g,number:(e,t)=>c(r,e,i(t)||{style:t}),date:(e,t)=>o(r,e,i(t)||t),time:(e,t)=>s(r,e,i(t)||t)}},g=(e,t)=>(Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0)??t.other;function _(e,n,r){return(i={},a)=>{let o=h(n,r,a),s=(e,n=!1)=>Array.isArray(e)?e.reduce((e,r)=>{if(r===`#`&&n)return e+m;if(t(r))return e+r;let[a,c,l]=r,u={};c===`plural`||c===`selectordinal`||c===`select`?Object.entries(l).forEach(([e,t])=>{u[e]=s(t,c===`plural`||c===`selectordinal`)}):u=l;let d;if(c){let e=o[c];d=e(i[a],u)}else d=i[a];return d==null?e:e+d},``):e,c=s(e);return t(c)&&f.test(c)?p(c):t(c)?c:c?String(c):``}}var v=class{constructor(){e(this,`_events`,{})}on(e,t){return this._events[e]??=new Set,this._events[e].add(t),()=>this.removeListener(e,t)}removeListener(e,t){let n=this._events[e];n?.delete(t),n?.size===0&&delete this._events[e]}emit(e,...t){let n=this._events[e];if(n)for(let e of[...n])e.apply(this,t)}},y=class extends v{constructor(t){super(),e(this,`_locale`,``),e(this,`_locales`,void 0),e(this,`_messages`,{}),e(this,`_missing`,void 0),e(this,`_messageCompiler`,void 0),e(this,`t`,this._.bind(this)),t.missing!=null&&(this._missing=t.missing),t.messages!=null&&this.load(t.messages),(typeof t.locale==`string`||t.locales)&&this.activate(t.locale??i,t.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}setMessagesCompiler(e){return this._messageCompiler=e,this}_load(e,t){let n=Object.prototype.hasOwnProperty.call(this._messages,e)?this._messages[e]:void 0;n?Object.assign(n,t):this._messages[e]=t}load(e,t){typeof e==`string`&&typeof t==`object`?this._load(e,t):Object.entries(e).forEach(([e,t])=>this._load(e,t)),this.emit(`change`)}loadAndActivate({locale:e,locales:t,messages:n}){this._locale=e,this._locales=t||void 0,this._messages[this._locale]=n,this.emit(`change`)}activate(e,t){this._locale=e,this._locales=t,this.emit(`change`)}_(e,r,i){if(!this.locale)throw Error(`Lingui: Attempted to call a translation function without setting a locale. 2Make sure to call \`i18n.activate(locale)\` before using Lingui functions. 3This issue may also occur due to a race condition in your initialization logic.`);let a=i?.message;e||=``,t(e)||(r=e.values||r,a=e.message,e=e.id);let o=this.messages,s=Object.prototype.hasOwnProperty.call(o,e)?o[e]:void 0,c=s===void 0,l=this._missing;if(l&&c)return n(l)?l(this._locale,e):l;c&&this.emit(`missing`,{id:e,locale:this._locale});let u=s||a||e;return t(u)&&(this._messageCompiler?u=this._messageCompiler(u):console.warn(`Uncompiled message detected! Message: 4 5> ${u} 6 7That means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used. 8ICU features such as interpolation and plurals will not work properly for that message. 9 10Please compile your catalog first. 11`)),t(u)&&f.test(u)?p(u):t(u)?u:_(u,this._locale,this._locales)(r,i?.formats)}date(e,t){return o(this._locales||this._locale,e,t)}number(e,t){return c(this._locales||this._locale,e,t)}};function b(e={}){return new y(e)}var x=b();export{x as t};
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.