PageSourceSearch

https://app.askara.ai/assets/i18n-D_O0jpHH.js

js askara.ai collected 2026-10-05 16:09:15 UTC 112,964 bytes, 5 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/en-BVGCztNE.js","assets/i18n-translation-en-BKUk3oSm.js","assets/es-C6AGahaj.js","assets/i18n-translation-es-CuXZcJid.js","assets/fr--pVI_W84.js","assets/i18n-translation-fr-D3X-Ckf2.js","assets/it-Bnqz0Ict.js","assets/i18n-translation-it-JwreYsyA.js","assets/pl-BpWhg_gR.js","assets/i18n-translation-pl-CE3U7otL.js","assets/pt-DxiyJQSx.js","assets/i18n-translation-pt-B8BQlePl.js","assets/enums-i18n-en-B15wRsyL.js","assets/enums-i18n-es-CBcj4cwl.js","assets/enums-i18n-fr-C6VjJ3Ix.js","assets/enums-i18n-it-8GlcAZ8J.js","assets/enums-i18n-pl-Be2-xJa1.js","assets/enums-i18n-pt-B_FNL-BT.js"])))=>i.map(i=>d[i]);
2import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{i as t}from"./vendor-react-TnBvT0Ph.js";import{C as n,r}from"./logger-BNwo7-Qa.js";var i=e(t(),1),a=()=>window.localStorage;function o(e,{parse:t,serialize:n,storage:r=a,onError:o}){let s=new Set,c,l,u=()=>{try{return r().getItem(e)}catch(e){return o?.(`read`,e),null}},d=()=>{let e=u();return e!==c&&(c=e,l=t(e)),l},f=()=>s.forEach(e=>e()),p=t=>{try{t===null?r().removeItem(e):r().setItem(e,t)}catch(e){o?.(`write`,e)}f()},m=t=>{(t.key===null||t.key===e)&&f()},h=e=>(s.size===0&&typeof window<`u`&&window.addEventListener(`storage`,m),s.add(e),()=>{s.delete(e),s.size===0&&typeof window<`u`&&window.removeEventListener(`storage`,m)});return{get:d,set:e=>p(n(e)),clear:()=>p(null),subscribe:h,useValue:()=>(0,i.useSyncExternalStore)(h,d,d)}}var s=(e,t,n)=>{let r=t.lastIndexOf(`?`),i=e[r===-1||r<t.lastIndexOf(`/`)?t:t.slice(0,r)];return i?typeof i==`function`?i():Promise.resolve(i):new Promise((e,r)=>{(typeof queueMicrotask==`function`?queueMicrotask:setTimeout)(r.bind(null,Error(`Unknown variable dynamic import: `+t+(t.split(`/`).length===n?``:`. Note that variables only represent file names one level deep.`))))})},c=e=>typeof e==`string`,l=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},u=e=>e==null?``:String(e),d=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},f=/###/g,p=e=>e&&e.includes(`###`)?e.replace(f,`.`):e,m=e=>!e||c(e),h=(e,t,n)=>{let r=c(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(m(e))return{};let t=p(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return m(e)?{}:{obj:e,k:p(r[i])}},g=(e,t,n)=>{let{obj:r,k:i}=h(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=h(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=h(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},ee=(e,t,n,r)=>{let{obj:i,k:a}=h(e,t,Object);i[a]=i[a]||[],i[a].push(n)},_=(e,t)=>{let{obj:n,k:r}=h(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},v=(e,t,n)=>{let r=_(e,n);return r===void 0?_(t,n):r},y=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?c(e[r])||e[r]instanceof String||c(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):y(e[r],t[r],n):e[r]=t[r]);return e},b=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),x={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},te=e=>c(e)?e.replace(/[&<>"'\/]/g,e=>x[e]):e,ne=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},re=[` `,`,`,`?`,`!`,`;`],S=new ne(20),C=(e,t,n)=>{t||=``,n||=``;let r=re.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=S.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},w=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},T=e=>e?.replace(/_/g,`-`),ie={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},E=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||ie,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>c(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),c(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},ae=class{constructor(){this.observers={}}
vendor: 12,260 bytes, line 2
2on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},oe=class extends ae{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):c(n)&&i?o.push(...n.split(i)):o.push(n)));let s=_(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!c(n)?s:w(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),g(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(c(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=_(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?y(s,n,i):s={...s,...n},g(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},se={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},ce=Symbol(`i18next/PATH_KEY`);function le(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===ce?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function D(e,t){let{[ce]:n}=e(le()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var ue=e=>!c(e)&&typeof e!=`boolean`&&typeof e!=`number`,de=class e extends ae{constructor(e,t={}){super(),d([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=E.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=ue(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!C(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:c(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:c(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=D(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?D(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:l}=this.extractFromKey(t[t.length-1],i),u=l[l.length-1],d=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;d===void 0&&(d=`:`);let f=i.lng||this.language,p=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()===`cimode`)return p?a?{res:`${u}${d}${s}`,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${d}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:s;let m=this.resolve(t,i),h=m?.res,g=m?.usedKey||s,ee=m?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!c(i.count),x=e.hasDefaultValue(i),te=b?this.pluralResolver.getSuffix(f,i.count,i):``,ne=i.ordinal&&b?this.pluralResolver.getSuffix(f,i.count,{ordinal:!1}):``,re=b&&!i.ordinal&&i.count===0,S=re&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${te}`]||i[`defaultValue${ne}`]||i.defaultValue,C=h;y&&!h&&x&&(C=S);let w=ue(C),T=Object.prototype.toString.apply(C);if(y&&C&&w&&!_.includes(T)&&!(c(v)&&Array.isArray(C))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,C,{...i,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(m.res=e,m.usedParams=this.getUsedParamsDetails(i),m):e}if(o){let e=Array.isArray(C),t=e?[]:{},n=e?ee:g;for(let e in C)if(Object.prototype.hasOwnProperty.call(C,e)){let r=`${n}${o}${e}`;t[e]=x&&!h?this.translate(r,{...i,defaultValue:ue(S)?S[e]:void 0,joinArrays:!1,ns:l}):this.translate(r,{...i,joinArrays:!1,ns:l}),t[e]===r&&(t[e]=C[e])}h=t}}else if(y&&c(v)&&Array.isArray(h))h=h.join(v),h&&=this.extendTranslation(h,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(h)&&x&&(e=!0,h=S),this.isValidLookup(h)||(n=!0,h=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:h,c=x&&S!==h&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,f,u,b&&!c?`${s}${this.pluralResolver.getSuffix(f,i.count,i)}`:s,c?S:h),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==h?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,u,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,u,t,r,c,i),this.emit(`missingKey`,e,u,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);re&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||S)})}):n(e,s,S))}h=this.extendTranslation(h,t,i,m,r),n&&h===s&&this.options.appendNamespaceToMissingKey&&(h=`${u}${d}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${s}`:s,e?h:void 0,i))}return a?(m.res=h,m.usedParams=this.getUsedParamsDetails(i),m):h}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=c(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!c(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=c(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=se.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return c(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?D(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),l=s.key;r=l;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let d=t.count!==void 0&&!c(t.count),f=d&&!t.ordinal&&t.count===0,p=t.context!==void 0&&(c(t.context)||typeof t.context==`number`)&&t.context!==``,m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${m[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${m[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${m.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),m.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,l,r,e,t);else{let e;d&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(t.ordinal&&e.startsWith(i)&&o.push(l+e.replace(i,this.options.pluralSeparator)),o.push(l+e),f&&o.push(l+n)),p){let r=`${l}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),d&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),f&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}
2getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!c(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},fe=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=E.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=T(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=T(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(c(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),c(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.options.fallbackLng,r=Array.isArray(n)?n.join(`|`):n;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);let i=t===void 0||t===!1||c(t),a=t===void 0&&typeof this.options.fallbackLng==`function`,o=c(e)&&i&&!a,s=null;if(o){let n;n=t===void 0?`undefined`:t===!1?`boolean:false`:`string:${t}`,s=`${e.length}:${e}|${n}`}if(s!==null){let e=this.resolveHierarchyCache[s];if(e!==void 0)return e.slice()}let l=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),u=[],d=e=>{e&&(this.isSupportedCode(e)?u.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return c(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&d(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&d(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&d(this.getLanguagePartFromCode(e))):c(e)&&d(this.formatLanguageCode(e)),l.forEach(e=>{u.includes(e)||d(this.formatLanguageCode(e))}),s===null?u:(this.resolveHierarchyCache[s]=u,u.slice())}},pe={zero:0,one:1,two:2,few:3,many:4,other:5},me={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},he=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=E.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=T(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl pol
2yfill!`),me;if(!e.match(/-|_/))return me;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>pe[e]-pe[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},ge=(e,t,n,r=`.`,i=!0)=>{let a=v(e,t,n);return!a&&i&&c(n)&&(a=w(e,n,r),a===void 0&&(a=w(t,n,r))),a},_e=e=>e.replace(/\$/g,`$$$$`),ve=class{constructor(e={}){this.logger=E.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:ee}=e.interpolation;this.escape=t===void 0?te:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?b(i):a||`{{`,this.suffix=o?b(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?b(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?b(l):``,this.nestingPrefix=d?b(d):f||b(`$t(`),this.nestingSuffix=p?b(p):m||b(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=ee!==void 0&&ee,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(!e.includes(this.formatSeparator)){let i=ge(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(ge(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let d=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=l(n),a===void 0){if(typeof d==`function`){let t=d(e,i,r);a=c(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(f){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``}else!c(a)&&!this.useRawValueToEscape&&(a=u(a));let s=t.safeValue(a);if(e=e.replace(i[0],_e(s)),f?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${b(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!c(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let l=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(l!==-1&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>
vendor: 14,581 bytes, line 2
2e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!c(i))return i;c(i)||(i=u(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},ye=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},be=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(T(r),i),t[o]=s),s(n)}},xe=e=>(t,n,r)=>e(T(n),r)(t),Se=class{constructor(e={}){this.logger=E.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?be:xe;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=be(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=ye(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},Ce=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},we=class extends ae{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=E.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{ee(n.loaded,[i],a),Ce(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();c(e)&&(e=this.languageUtils.toResolveHierarchy(e)),c(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},Te=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),c(e[1])&&(t.defaultValue=e[1]),c(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Ee=e=>(c(e.ns)&&(e.ns=[e.ns]),c(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),c(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),O=()=>{},De=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},k=class e extends ae{constructor(e={},t){if(super(),this.options=Ee(e),this.services={},this.logger=E,this.modules={external:[]},De(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(c(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=Te();this.options={...n,...this.options,...Ee(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?E.init(r(this.modules.logger),this.options):E.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:Se;let t=new fe(this.options);this.store=new oe(this.options.resources,this.options);let n=this.services;n.logger=E,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new he(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new ve(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new we(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new de(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=O,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=l(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=O){let n=t,r=c(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=l();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=O,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&se.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=l();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=c(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(c(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(
2o.keyPrefix=D(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=D(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=D(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return c(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=l();return this.options.ns?(c(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=l();c(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new fe(Te());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=O){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new oe(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...Te().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new ve(n)}return a.translator=new de(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();k.createInstance,k.dir,k.init,k.loadResources,k.reloadResources,k.use,k.changeLanguage,k.getFixedT,k.t,k.exists,k.setDefaultNamespace,k.hasLoadedNamespace,k.loadNamespaces,k.loadLanguages;var Oe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ke={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":` `,"&#160;":` `,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},Ae=e=>ke[e],je=e=>e.replace(Oe,Ae),Me={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:je,transDefaultProps:void 0},Ne=(e={})=>{Me={...Me,...e}},Pe=()=>Me,Fe,Ie=e=>{Fe=e},Le=()=>Fe,Re={type:`3rdParty`,init(e){Ne(e.options.react),Ie(e)}},ze=[`__proto__`,`constructor`,`prototype`];function Be(e,t,n){function r(e){return e&&e.indexOf(`###`)>-1?e.replace(/###/g,`.`):e}function i(){return!e||typeof e==`string`}for(var a=typeof t==`string`?t.split(`.`):[].concat(t);a.length>1;){if(i())return{};var o=r(a.shift());if(ze.indexOf(o)>-1)return{};!e[o]&&n&&(e[o]=new n),e=e[o]}if(i())return{};var s=r(a.shift());return ze.indexOf(s)>-1?{}:{obj:e,k:s}}function Ve(e,t,n){var r=Be(e,t,Object),i=r.obj,a=r.k;i!==void 0&&(i[a]=n)}function He(e,t){var n=Be(e,t),r=n.obj,i=n.k;if(r)return r[i]}var Ue=[],We=Ue.forEach,Ge=Ue.slice;
2function Ke(e){return We.call(Ge.call(arguments,1),function(t){if(t)for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];ze.indexOf(i)>-1||e[i]===void 0&&(e[i]=t[i])}}),e}function qe(e,t){let n=t&&t.cache?t.cache:rt,r=t&&t.serializer?t.serializer:tt;return(t&&t.strategy?t.strategy:Qe)(e,{cache:n,serializer:r})}function Je(e){return e==null||typeof e==`number`||typeof e==`boolean`}function Ye(e,t,n,r){let i=Je(r)?r:n(r),a=t.get(i);return a===void 0&&(a=e.call(this,r),t.set(i,a)),a}function Xe(e,t,n){let r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return a===void 0&&(a=e.apply(this,r),t.set(i,a)),a}function Ze(e,t,n,r,i){return n.bind(t,e,r,i)}function Qe(e,t){let n=e.length===1?Ye:Xe;return Ze(e,this,n,t.cache.create(),t.serializer)}function $e(e,t){return Ze(e,this,Xe,t.cache.create(),t.serializer)}function et(e,t){return Ze(e,this,Ye,t.cache.create(),t.serializer)}var tt=function(){return JSON.stringify(arguments)},nt=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}},rt={create:function(){return new nt}},it={variadic:$e,monadic:et},at=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function ot(e){let t={};return e.replace(at,e=>{let n=e.length;switch(e[0]){case`G`:t.era=n===4?`long`:n===5?`narrow`:`short`;break;case`y`:t.year=n===2?`2-digit`:`numeric`;break;case`Y`:case`u`:case`U`:case`r`:throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case`q`:case`Q`:throw RangeError("`q/Q` (quarter) patterns are not supported");case`M`:case`L`:t.month=[`numeric`,`2-digit`,`short`,`long`,`narrow`][n-1];break;case`w`:case`W`:throw RangeError("`w/W` (week) patterns are not supported");case`d`:t.day=[`numeric`,`2-digit`][n-1];break;case`D`:case`F`:case`g`:throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case`E`:t.weekday=n===4?`long`:n===5?`narrow`:`short`;break;case`e`:if(n<4)throw RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-4];break;case`c`:if(n<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-4];break;case`a`:t.hour12=!0;break;case`b`:case`B`:throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case`h`:t.hourCycle=`h12`,t.hour=[`numeric`,`2-digit`][n-1];break;case`H`:t.hourCycle=`h23`,t.hour=[`numeric`,`2-digit`][n-1];break;case`K`:t.hourCycle=`h11`,t.hour=[`numeric`,`2-digit`][n-1];break;case`k`:t.hourCycle=`h24`,t.hour=[`numeric`,`2-digit`][n-1];break;case`j`:case`J`:case`C`:throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case`m`:t.minute=[`numeric`,`2-digit`][n-1];break;case`s`:t.second=[`numeric`,`2-digit`][n-1];break;case`S`:case`A`:throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case`z`:t.timeZoneName=n<4?`short`:`long`;break;case`Z`:case`O`:case`v`:case`V`:case`X`:case`x`:throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return``}),t}var st=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function ct(e){if(e.length===0)throw Error(`Number skeleton cannot be empty`);let t=e.split(st).filter(e=>e.length>0),n=[];for(let e of t){let t=e.split(`/`);if(t.length===0)throw Error(`Invalid number skeleton`);let[r,...i]=t;for(let e of i)if(e.length===0)throw Error(`Invalid number skeleton`);n.push({stem:r,options:i})}return n}function lt(e){return e.replace(/^(.*?)-/,``)}var ut=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,dt=/^(@+)?(\+|#+)?[rs]?$/g,ft=/(\*)(0+)|(#+)(0+)|(0+)/g,pt=/^(0+)$/;function mt(e){let t={};return e[e.length-1]===`r`?t.roundingPriority=`morePrecision`:e[e.length-1]===`s`&&(t.roundingPriority=`lessPrecision`),e.replace(dt,function(e,n,r){return typeof r==`string`?r===`+`?t.minimumSignificantDigits=n.length:n[0]===`#`?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof r==`string`?r.length:0)):(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length),``}),t}function ht(e){switch(e){case`sign-auto`:return{signDisplay:`auto`};case`sign-accounting`:case`()`:return{currencySign:`accounting`};case`sign-always`:case`+!`:return{signDisplay:`always`};case`sign-accounting-always`:case`()!`:return{signDisplay:`always`,currencySign:`accounting`};case`sign-except-zero`:case`+?`:return{signDisplay:`exceptZero`};case`sign-accounting-except-zero`:case`()?`:return{signDisplay:`exceptZero`,currencySign:`accounting`};case`sign-never`:case`+_`:return{signDisplay:`never`}}}function gt(e){let t;if(e[0]===`E`&&e[1]===`E`?(t={notation:`engineering`},e=e.slice(2)):e[0]===`E`&&(t={notation:`scientific`},e=e.slice(1)),t){let n=e.slice(0,2);if(n===`+!`?(t.signDisplay=`always`,e=e.slice(2)):n===`+?`&&(t.signDisplay=`exceptZero`,e=e.slice(2)),!pt.test(e))throw Error(`Malformed concise eng/scientific notation`);t.minimumIntegerDigits=e.length}return t}function _t(e){return ht(e)||{}}function vt(e){let t={};for(let n of e){switch(n.stem){case`percent`:case`%`:t.style=`percent`;continue;case`%x100`:t.style=`percent`,t.scale=100;continue;case`currency`:t.style=`currency`,t.currency=n.options[0];continue;case`group-off`:case`,_`:t.useGrouping=!1;continue;case`precision-integer`:case`.`:t.maximumFractionDigits=0;continue;case`measure-unit`:case`unit`:t.style=`unit`,t.unit=lt(n.options[0]);continue;case`compact-short`:case`K`:t.notation=`compact`,t.compactDisplay=`short`;continue;case`compact-long`:case`KK`:t.notation=`compact`,t.compactDisplay=`long`;continue;case`scientific`:t={...t,notation:`scientific`,...n.options.reduce((e,t)=>
2({...e,..._t(t)}),{})};continue;case`engineering`:t={...t,notation:`engineering`,...n.options.reduce((e,t)=>({...e,..._t(t)}),{})};continue;case`notation-simple`:t.notation=`standard`;continue;case`unit-width-narrow`:t.currencyDisplay=`narrowSymbol`,t.unitDisplay=`narrow`;continue;case`unit-width-short`:t.currencyDisplay=`code`,t.unitDisplay=`short`;continue;case`unit-width-full-name`:t.currencyDisplay=`name`,t.unitDisplay=`long`;continue;case`unit-width-iso-code`:t.currencyDisplay=`symbol`;continue;case`scale`:t.scale=parseFloat(n.options[0]);continue;case`rounding-mode-floor`:t.roundingMode=`floor`;continue;case`rounding-mode-ceiling`:t.roundingMode=`ceil`;continue;case`rounding-mode-down`:t.roundingMode=`trunc`;continue;case`rounding-mode-up`:t.roundingMode=`expand`;continue;case`rounding-mode-half-even`:t.roundingMode=`halfEven`;continue;case`rounding-mode-half-down`:t.roundingMode=`halfTrunc`;continue;case`rounding-mode-half-up`:t.roundingMode=`halfExpand`;continue;case`integer-width`:if(n.options.length>1)throw RangeError(`integer-width stems only accept a single optional option`);n.options[0].replace(ft,function(e,n,r,i,a,o){if(n)t.minimumIntegerDigits=r.length;else if(i&&a)throw Error(`We currently do not support maximum integer digits`);else if(o)throw Error(`We currently do not support exact integer digits`);return``});continue}if(pt.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(ut.test(n.stem)){if(n.options.length>1)throw RangeError(`Fraction-precision stems only accept a single optional option`);n.stem.replace(ut,function(e,n,r,i,a,o){return r===`*`?t.minimumFractionDigits=n.length:i&&i[0]===`#`?t.maximumFractionDigits=i.length:a&&o?(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),``});let e=n.options[0];e===`w`?t={...t,trailingZeroDisplay:`stripIfInteger`}:e&&(t={...t,...mt(e)});continue}if(dt.test(n.stem)){t={...t,...mt(n.stem)};continue}let e=ht(n.stem);e&&(t={...t,...e});let r=gt(n.stem);r&&(t={...t,...r})}return t}var A=function(e){return e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]=`EXPECT_ARGUMENT_CLOSING_BRACE`,e[e.EMPTY_ARGUMENT=2]=`EMPTY_ARGUMENT`,e[e.MALFORMED_ARGUMENT=3]=`MALFORMED_ARGUMENT`,e[e.EXPECT_ARGUMENT_TYPE=4]=`EXPECT_ARGUMENT_TYPE`,e[e.INVALID_ARGUMENT_TYPE=5]=`INVALID_ARGUMENT_TYPE`,e[e.EXPECT_ARGUMENT_STYLE=6]=`EXPECT_ARGUMENT_STYLE`,e[e.INVALID_NUMBER_SKELETON=7]=`INVALID_NUMBER_SKELETON`,e[e.INVALID_DATE_TIME_SKELETON=8]=`INVALID_DATE_TIME_SKELETON`,e[e.EXPECT_NUMBER_SKELETON=9]=`EXPECT_NUMBER_SKELETON`,e[e.EXPECT_DATE_TIME_SKELETON=10]=`EXPECT_DATE_TIME_SKELETON`,e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]=`UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`,e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]=`EXPECT_SELECT_ARGUMENT_OPTIONS`,e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]=`EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]=`INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]=`EXPECT_SELECT_ARGUMENT_SELECTOR`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]=`EXPECT_PLURAL_ARGUMENT_SELECTOR`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]=`EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]=`EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`,e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]=`INVALID_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]=`DUPLICATE_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]=`DUPLICATE_SELECT_ARGUMENT_SELECTOR`,e[e.MISSING_OTHER_CLAUSE=22]=`MISSING_OTHER_CLAUSE`,e[e.INVALID_TAG=23]=`INVALID_TAG`,e[e.INVALID_TAG_NAME=25]=`INVALID_TAG_NAME`,e[e.UNMATCHED_CLOSING_TAG=26]=`UNMATCHED_CLOSING_TAG`,e[e.UNCLOSED_TAG=27]=`UNCLOSED_TAG`,e}({}),j=function(e){return e[e.literal=0]=`literal`,e[e.argument=1]=`argument`,e[e.number=2]=`number`,e[e.date=3]=`date`,e[e.time=4]=`time`,e[e.select=5]=`select`,e[e.plural=6]=`plural`,e[e.pound=7]=`pound`,e[e.tag=8]=`tag`,e}({}),yt=function(e){return e[e.number=0]=`number`,e[e.dateTime=1]=`dateTime`,e}({});function bt(e){return e.type===j.literal}function xt(e){return e.type===j.argument}function St(e){return e.type===j.number}function Ct(e){return e.type===j.date}function wt(e){return e.type===j.time}function Tt(e){return e.type===j.select}function Et(e){return e.type===j.plural}function Dt(e){return e.type===j.pound}function Ot(e){return e.type===j.tag}function kt(e){return!!(e&&typeof e==`object`&&e.type===yt.number)}function At(e){return!!(e&&typeof e==`object`&&e.type===yt.dateTime)}var jt=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Mt={"001":[`H`,`h`],419:[`h`,`H`,`hB`,`hb`],AC:[`H`,`h`,`hb`,`hB`],AD:[`H`,`hB`],AE:[`h`,`hB`,`hb`,`H`],AF:[`H`,`hb`,`hB`,`h`],AG:[`h`,`hb`,`H`,`hB`],AI:[`H`,`h`,`hb`,`hB`],AL:[`h`,`H`,`hB`],AM:[`H`,`hB`],AO:[`H`,`hB`],AR:[`h`,`H`,`hB`,`hb`],AS:[`h`,`H`],AT:[`H`,`hB`],AU:[`h`,`hb`,`H`,`hB`],AW:[`H`,`hB`],AX:[`H`],AZ:[`H`,`hB`,`h`],BA:[`H`,`hB`,`h`],BB:[`h`,`hb`,`H`,`hB`],BD:[`h`,`hB`,`H`],BE:[`H`,`hB`],BF:[`H`,`hB`],BG:[`H`,`hB`,`h`],BH:[`h`,`hB`,`hb`,`H`],BI:[`H`,`h`],BJ:[`H`,`hB`],BL:[`H`,`hB`],BM:[`h`,`hb`,`H`,`hB`],BN:[`hb`,`hB`,`h`,`H`],BO:[`h`,`H`,`hB`,`hb`],BQ:[`H`],BR:[`H`,`hB`],BS:[`h`,`hb`,`H`,`hB`],BT:[`h`,`H`],BW:[`H`,`h`,`hb`,`hB`],BY:[`H`,`h`],BZ:[`H`,`h`,`hb`,`hB`],CA:[`h`,`hb`,`H`,`hB`],CC:[`H`,`h`,`hb`,`hB`],CD:[`hB`,`H`],CF:[`H`,`h`,`hB`],CG:[`H`,`hB`],CH:[`H`,`hB`,`h`],CI:[`H`,`hB`],CK:[`H`,`h`,`hb`,`hB`],CL:[`h`,`H`,`hB`,`hb`],CM:[`H`,`h`,`hB`],CN:[`H`,`hB`,`hb`,`h`],CO:[`h`,`H`,`hB`,`hb`],CP:[`H`],CR:[`h`,`H`,`hB`,`hb`],CU:[`h`,`H`,`hB`,`hb`],CV:[`H`,`hB`],CW:[`H`,`hB`],CX:[`H`,`h`,`hb`,`hB`],CY:[`h`,`H`,`hb`,`hB`],CZ:[`H`],DE:[`H`,`hB`],DG:[`H`,`h`,`hb`,`hB`],DJ:[`h`,`H`],DK:[`H`],DM:[`h`,`hb`,`H`,`hB`],DO:[`h`,`H`,`hB`,`hb`],DZ:[`h`,`hB`,`hb`,`H`],EA:[`H`,`h`,`hB`,`hb`],EC:[`h`,`H`,`hB`,`hb`],EE:[`H`,`hB`],EG:[`h`,`hB`,`hb`,`H`],EH:[`h`,`hB`,`hb`,`H`],ER:[`h`,`H`],ES:[`H`,`hB`,`h`,`hb`],ET:[`hB`,`hb`,`h`,`H`],FI:[`H`],FJ:[`h`,`hb`,`H`,`hB`],FK:[`H`,`h`,`hb`,`hB`],FM:[`h`,`hb`,`H`,`hB`],FO:[`H`,`h`],FR:[`H`,`hB`],GA:[`H`,`hB`],GB:[`H`,`h`,`hb`,`hB`],GD:[`h`,`hb`,`H`,`hB`],GE:[`H`,`hB`,`h`],GF:[`H`,`hB`],GG:[`H`,`h`,`hb`,`hB`],GH:[`h`,`H`],GI:[`H`,`h`,`hb`,`hB`],GL:[`H`,`h`],GM:[`h`,`hb`,`H`,`hB`],GN:[`H`,`hB`],GP:[`H`,`hB`],GQ:[`H`,`hB`,`h`,`hb`],GR:[`h`,`H`,`hb`,`hB`],GS:[`H`,`h`,`hb`,`hB`],GT:[`h`,`H`,`hB`,`hb`],GU:[`h`,`hb`,`H`,`hB`],GW:[`H`,`hB`],GY:[`h`,`hb`,`H`,`hB`],HK:[`h`,`hB`,`hb`,`H`],HN:[`h`,`H`,`hB`,`hb`],HR:[`H`,`hB`],HU:[`H`,`h`],IC:[`H`,`h`,`hB`,`hb`],ID:[`H`],IE:[`H`,`h`,`hb`,`hB`],IL:[`H`,`hB`],IM:[`H`,`h`,`hb`,`hB`],IN:[`h`,`H`],IO:[`H`,`h`,`hb`,`hB`],IQ:[`h`,`hB`,`hb`,`H`],IR:[`hB`,`H`],IS:[`H`],IT:[`H`,`hB`],JE:[`H`,`h`,`hb`,`hB`],JM:[`h`,`hb`,`H`,`hB`],JO:[`h`,`hB`,`hb`,`H`],JP:[`H`,`K`,`h`],KE:[`hB`,`hb`,`H`,`h`],KG:[`H`,`h`,`hB`,`hb`],KH:[`hB`,`h`,`H`,`hb`],KI:[`h`,`hb`,`H`,`hB`],KM:[`H`,`h`,`hB`,`hb`],KN:[`h`,`hb`,`H`,`hB`],KP:[`h`,`H`,`hB`,`hb`],KR:[`h`,`H`,`hB`,`hb`],KW:[`h`,`hB`,`hb`,`H`],KY:[`h`,`hb`,`H`,`hB`],KZ:[`H`,`hB`],LA:[`H`,`hb`,`hB`,`h`],LB:[`h`,`hB`,`hb`,`H`],LC:[`h`,`hb`,`H`,`hB`],LI:[`H`,`hB`,`h`],LK:[`H`,`h`,`hB`,`hb`],LR:[`h`,`hb`,`H`,`hB`],LS:[`h`,`H`],LT:[`H`,`h`,`hb`,`hB`],LU:[`H`,`h`,`hB`],LV:[`H`,`hB`,`hb`,`h`],LY:[`h`,`hB`,`hb`,`H`],MA:[`H`,`h`,`hB`,`hb`],MC:[`H`,`hB`],MD:[`H`,`hB`],ME:[`H`,`hB`,`h`],MF:[`H`,`hB`],MG:[`H`,`h`],MH:[`h`,`hb`,`H`,`hB`],MK:[`H`,`h`,`hb`,`hB`],ML:[`H`],MM:[`hB`,`hb`,`H`,`h`],MN:[`H`,`h`,`hb`,`hB`],MO:[`h`,`hB`,`hb`,`H`],MP:[`h`,`hb`,`H`,`hB`],MQ:[`H`,`hB`],MR:[`h`,`hB`,`hb`,`H`],MS:[`H`,`h`,`hb`,`hB`],MT:[`H`,`h`],MU:[`H`,`h`],MV:[`H`,`h`],MW:[`h`,`hb`,`H`,`hB`],MX:[`h`,`H`,`hB`,`hb`],MY:[`hb`,`hB`,`h`,`H`],MZ:[`H`,`hB`],NA:[`h`,`H`,`hB`,`hb`],NC:[`H`,`hB`],NE:[`H`],NF:[`H`,`h`,`hb`,`hB`],NG:[`H`,`h`,`hb`,`hB`],NI:[`h`,`H`,`hB`,`hb`],NL:[`H`,`hB`],NO:[`H`,`h`],NP:[`H`,`h`,`hB`],NR:[`H`,`h`,`hb`,`hB`],NU:[`H`,`h`,`hb`,`hB`],NZ:[`h`,`hb`,`H`,`hB`],OM:[`h`,`hB`,`hb`,`H`],PA:[`h`,`H`,`hB`,`hb`],PE:[`h`,`H`,`hB`,`hb`],PF:[`H`,`h`,`hB`],PG:[`h`,`H`],PH:[`h`,`hB`,`hb`,`H`],PK:[`h`,`hB`,`H`],PL:[`H`,`h`],PM:[`H`,`hB`],PN:[`H`,`h`,`hb`,`hB`],PR:[`h`,`H`,`hB`,`hb`],PS:[`h`,`hB`,`hb`,`H`],PT:[`H`,`hB`],PW:[`h`,`H`],PY:[`h`,`H`,`hB`,`hb`],QA:[`h`,`hB`,`hb`,`H`],RE:[`H`,`hB`],RO:[`H`,`hB`],RS:[`H`,`hB`,`h`],RU:[`H`],RW:[`H`,`h`],SA:[`h`,`hB`,`hb`,`H`],SB:[`h`,`hb`,`H`,`hB`],SC:[`H`,`h`,`hB`],SD:[`h`,`hB`,`hb`,`H`],SE:[`H`],SG:[`h`,`hb`,`H`,`hB`],SH:[`H`,`h`,`hb`,`hB`],SI:[`H`,`hB`],SJ:[`H`],SK:[`H`],SL:[`h`,`hb`,`H`,`hB`],SM:[`H`,`h`,`hB`],SN:[`H`,`h`,`hB`],SO:[`h`,`H`],SR:[`H`,`hB`],SS:[`h`,`hb`,`H`,`hB`],ST:[`H`,`hB`],SV:[`h`,`H`,`hB`,`hb`],SX:[`H`,`h`,`hb`,`hB`],SY:[`h`,`hB`,`hb`,`H`],SZ:[`h`,`hb`,`H`,`hB`],TA:[`H`,`h`,`hb`,`hB`],TC:[`h`,`hb`,`H`,`hB`],TD:[`h`,`H`,`hB`],TF:[`H`,`h`,`hB`],TG:[`H`,`hB`],TH:[`H`,`h`],TJ:[`H`,`h`],TL:[`H`,`hB`,`hb`,`h`],TM:[`H`,`h`],TN:[`h`,`hB`,`hb`,`H`],TO:[`h`,`H`],TR:[`H`,`hB`],TT:[`h`,`hb`,`H`,`hB`],TW:[`hB`,`hb`,`h`,`H`],TZ:[`hB`,`hb`,`H`,`h`],UA:[`H`,`hB`,`h`],UG:[`hB`,`hb`,`H`,`h`],UM:[`h`,`hb`,`H`,`hB`],US:[`h`,`hb`,`H`,`hB`],UY:[`h`,`H`,`hB`,`hb`],UZ:[`H`,`hB`,`h`],VA:[`H`,`h`,`hB`],VC:[`h`,`hb`,`H`,`hB`],VE:[`h`,`H`,`hB`,`hb`],VG:[`h`,`hb`,`H`,`hB`],VI:[`h`,`hb`,`H`,`hB`],VN:[`H`,`h`],VU:[`h`,`H`],WF:[`H`,`hB`],WS:[`h`,`H`],XK:[`H`,`hB`,`h`],YE:[`h`,`hB`,`hb`,`H`],YT:[`H`,`hB`],ZA:[`H`,`h`,`hb`,`hB`],ZM:[`h`,`hb`,`H`,`hB`],ZW:[`H`,`h`],"af-ZA":[`H`,`h`,`hB`,`hb`],"ar-001":[`h`,`hB`,`hb`,`H`],"ca-ES":[`H`,`h`,`hB`],"en-001":[`h`,`hb`,`H`,`hB`],"en-HK":[`h`,`hb`,`H`,`hB`],"en-IL":[`H`,`h`,`hb`,`hB`],"en-MY":[`h`,`hb`,`H`,`hB`],"es-BR":[`H`,`h`,`hB`,`hb`],"es-ES":[`H`,`h`,`hB`,`hb`],"es-GQ":[`H`,`h`,`hB`,`hb`],"fr-CA":[`H`,`h`,`hB`],"gl-ES":[`H`,`h`,`hB`],"gu-IN":[`hB`,`hb`,`h`,`H`],"hi-IN":[`hB`,`h`,`H`],"it-CH":[`H`,`h`,`hB`],"it-IT":[`H`,`h`,`hB`],"kn-IN":[`hB`,`h`,`H`],"ku-SY":[`H`,`hB`],"ml-IN":[`hB`,`h`,`H`],"mr-IN":[`hB`,`hb`,`h`,`H`],"pa-IN":[`hB`,`hb`,`h`,`H`],"ta-IN":[`hB`,`h`,`hb`,`H`],"te-IN":[`hB`,`h`,`H`],"zu-ZA":[`H`,`hB`,`hb`,`h`]};function Nt(e,t){let n=``;for(let r=0;r<e.length;r++){let i=e.charAt(r);if(i===`j`){let a=0;for(;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;let o=1+(a&1),s=a<2?1:3+(a>>1),c=Pt(t);for((c==`H`||c==`k`)&&(s=0);s-->0;)n+=`a`;for(;o-->0;)n=c+n}else n+=i===`J`?`H`:i}return n}function Pt(e){let t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case`h24`:return`k`;case`h23`:return`H`;case`h12`:return`h`;case`h11`:return`K`;default:throw Error(`Invalid hourCycle`)}let n=e.language,r;return n!==`root`&&(r=e.maximize().region),(Mt[r||``]||Mt[n||``]||Mt[`${n}-001`]||Mt[`001`])[0]}var Ft=RegExp(`^${jt.source}*`),It=RegExp(`${jt.source}*$`);function M(e,t){return{start:e,end:t}}var Lt=!!Object.fromEntries,Rt=!!String.prototype.trimStart,zt=!!String.prototype.trimEnd,Bt=Lt?Object.fromEntries:function(e){let t={};for(let[n,r]of e)t[n]=r;return t},Vt=Rt?function(e){return e.trimStart()}:function(e){return e.replace(Ft,``)},Ht=zt?function(e){return e.trimEnd()}:function(e){return e.replace(It,``)},Ut=RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`,`yu`);function Wt(e,t){return Ut.lastIndex=t,Ut.exec(e)[1]??``}var Gt=class{constructor(e,t={}){this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}
2parse(){if(this.offset()!==0)throw Error(`parser can only be used once`);return this.parseMessage(0,``,!1)}parseMessage(e,t,n){let r=[];for(;!this.isEOF();){let i=this.char();if(i===123){let t=this.parseArgument(e,n);if(t.err)return t;r.push(t.val)}else if(i===125&&e>0)break;else if(i===35&&(t===`plural`||t===`selectordinal`)){let e=this.clonePosition();this.bump(),r.push({type:j.pound,location:M(e,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(A.UNMATCHED_CLOSING_TAG,M(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Kt(this.peek()||0)){let n=this.parseTag(e,t);if(n.err)return n;r.push(n.val)}else{let n=this.parseLiteral(e,t);if(n.err)return n;r.push(n.val)}}return{val:r,err:null}}parseTag(e,t){let n=this.clonePosition();this.bump();let r=this.parseTagName();if(this.bumpSpace(),this.bumpIf(`/>`))return{val:{type:j.literal,value:`<${r}/>`,location:M(n,this.clonePosition())},err:null};if(this.bumpIf(`>`)){let i=this.parseMessage(e+1,t,!0);if(i.err)return i;let a=i.val,o=this.clonePosition();if(this.bumpIf(`</`)){if(this.isEOF()||!Kt(this.char()))return this.error(A.INVALID_TAG,M(o,this.clonePosition()));let e=this.clonePosition();return r===this.parseTagName()?(this.bumpSpace(),this.bumpIf(`>`)?{val:{type:j.tag,value:r,children:a,location:M(n,this.clonePosition())},err:null}:this.error(A.INVALID_TAG,M(o,this.clonePosition()))):this.error(A.UNMATCHED_CLOSING_TAG,M(e,this.clonePosition()))}return this.error(A.UNCLOSED_TAG,M(n,this.clonePosition()))}return this.error(A.INVALID_TAG,M(n,this.clonePosition()))}parseTagName(){let e=this.offset();for(this.bump();!this.isEOF()&&Jt(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){let n=this.clonePosition(),r=``;for(;;){let n=this.tryParseQuote(t);if(n){r+=n;continue}let i=this.tryParseUnquoted(e,t);if(i){r+=i;continue}let a=this.tryParseLeftAngleBracket();if(a){r+=a;continue}break}let i=M(n,this.clonePosition());return{val:{type:j.literal,value:r,location:i},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!qt(this.peek()||0))?(this.bump(),`<`):null}tryParseQuote(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),`'`;case 123:case 60:case 62:case 125:break;case 35:if(e===`plural`||e===`selectordinal`)break;return null;default:return null}this.bump();let t=[this.char()];for(this.bump();!this.isEOF();){let e=this.char();if(e===39){if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}}else t.push(e);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;let n=this.char();return n===60||n===123||n===35&&(t===`plural`||t===`selectordinal`)||n===125&&e>0?null:(this.bump(),String.fromCodePoint(n))}parseArgument(e,t){let n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(A.EXPECT_ARGUMENT_CLOSING_BRACE,M(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(A.EMPTY_ARGUMENT,M(n,this.clonePosition()));let r=this.parseIdentifierIfPossible().value;if(!r)return this.error(A.MALFORMED_ARGUMENT,M(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(A.EXPECT_ARGUMENT_CLOSING_BRACE,M(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:j.argument,value:r,location:M(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(A.EXPECT_ARGUMENT_CLOSING_BRACE,M(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(A.MALFORMED_ARGUMENT,M(n,this.clonePosition()))}}parseIdentifierIfPossible(){let e=this.clonePosition(),t=this.offset(),n=Wt(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:M(e,this.clonePosition())}}parseArgumentOptions(e,t,n,r){let i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(a){case``:return this.error(A.EXPECT_ARGUMENT_TYPE,M(i,o));case`number`:case`date`:case`time`:{this.bumpSpace();let e=null;if(this.bumpIf(`,`)){this.bumpSpace();let t=this.clonePosition(),n=this.parseSimpleArgStyleIfPossible();if(n.err)return n;let r=Ht(n.val);if(r.length===0)return this.error(A.EXPECT_ARGUMENT_STYLE,M(this.clonePosition(),this.clonePosition()));e={style:r,styleLocation:M(t,this.clonePosition())}}let t=this.tryParseArgumentClose(r);if(t.err)return t;let i=M(r,this.clonePosition());if(e&&e.style.startsWith(`::`)){let t=Vt(e.style.slice(2));if(a===`number`){let r=this.parseNumberSkeletonFromString(t,e.styleLocation);return r.err?r:{val:{type:j.number,value:n,location:i,style:r.val},err:null}}{if(t.length===0)return this.error(A.EXPECT_DATE_TIME_SKELETON,i);let r=t;this.locale&&(r=Nt(t,this.locale));let o={type:yt.dateTime,pattern:r,location:e.styleLocation,parsedOptions:this.shouldParseSkeletons?ot(r):{}};return{val:{type:a===`date`?j.date:j.time,value:n,location:i,style:o},err:null}}}return{val:{type:a===`number`?j.number:a===`date`?j.date:j.time,value:n,location:i,style:e?.style??null},err:null}}case`plural`:case`selectordinal`:case`select`:{let i=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(`,`))return this.error(A.EXPECT_SELECT_ARGUMENT_OPTIONS,M(i,{...i}));this.bumpSpace();let o=this.parseIdentifierIfPossible(),s=0;if(a!==`select`&&o.value===`offset`){if(!this.bumpIf(`:`))return this.error(A.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,M(this.clonePosition(),this.clonePosition()));this.bumpSpace();let e=this.tryParseDecimalInteger(A.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,A.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(e.err)return e;this.bumpSpace(),o=this.parseIdentifierIfPossible(),s=e.val}let c=this.tryParsePluralOrSelectOptions(e,a,t,o);if(c.err)return c;let l=this.tryParseArgumentClose(r);if(l.err)return l;let u=M(r,this.clonePosition());return a===`select`?{val:{type:j.select,value:n,options:Bt(c.val),location:u},err:null}:{val:{type:j.plural,value:n,options:Bt(c.val),offset:s,pluralType:a===`plural`?`cardinal`:`ordinal`,location:u},err:null}}default:return this.error(A.INVALID_ARGUMENT_TYPE,M(i,o))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(A.EXPECT_ARGUMENT_CLOSING_BRACE,M(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0,t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let e=this.clonePosition();if(!this.bumpUntil(`'`))return this.error(A.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,M(e,this.clonePosition()));this.bump();break}case 123:e+=1,this.bump();break;case 125:if(e>0)--e;else return{val:this.message.slice(t.offset,this.offset()),err:null};break;default:this.bump();break}return{val:this.message.slice(t.offset,this.offset()),err:null}}parseNumberSkeletonFromString(e,t){let n=[];try{n=ct(e)}
2catch{return this.error(A.INVALID_NUMBER_SKELETON,t)}return{val:{type:yt.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?vt(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,r){let i=!1,a=[],o=new Set,{value:s,location:c}=r;for(;;){if(s.length===0){let e=this.clonePosition();if(t!==`select`&&this.bumpIf(`=`)){let t=this.tryParseDecimalInteger(A.EXPECT_PLURAL_ARGUMENT_SELECTOR,A.INVALID_PLURAL_ARGUMENT_SELECTOR);if(t.err)return t;c=M(e,this.clonePosition()),s=this.message.slice(e.offset,this.offset())}else break}if(o.has(s))return this.error(t===`select`?A.DUPLICATE_SELECT_ARGUMENT_SELECTOR:A.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);s===`other`&&(i=!0),this.bumpSpace();let r=this.clonePosition();if(!this.bumpIf(`{`))return this.error(t===`select`?A.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:A.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,M(this.clonePosition(),this.clonePosition()));let l=this.parseMessage(e+1,t,n);if(l.err)return l;let u=this.tryParseArgumentClose(r);if(u.err)return u;a.push([s,{value:l.val,location:M(r,this.clonePosition())}]),o.add(s),this.bumpSpace(),{value:s,location:c}=this.parseIdentifierIfPossible()}return a.length===0?this.error(t===`select`?A.EXPECT_SELECT_ARGUMENT_SELECTOR:A.EXPECT_PLURAL_ARGUMENT_SELECTOR,M(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(A.MISSING_OTHER_CLAUSE,M(this.clonePosition(),this.clonePosition())):{val:a,err:null}}tryParseDecimalInteger(e,t){let n=1,r=this.clonePosition();this.bumpIf(`+`)||this.bumpIf(`-`)&&(n=-1);let i=!1,a=0;for(;!this.isEOF();){let e=this.char();if(e>=48&&e<=57)i=!0,a=a*10+(e-48),this.bump();else break}let o=M(r,this.clonePosition());return i?(a*=n,Number.isSafeInteger(a)?{val:a,err:null}:this.error(t,o)):this.error(e,o)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let e=this.position.offset;if(e>=this.message.length)throw Error(`out of bound`);let t=this.message.codePointAt(e);if(t===void 0)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;let e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}bumpIf(e){if(this.message.startsWith(e,this.offset())){for(let t=0;t<e.length;t++)this.bump();return!0}return!1}bumpUntil(e){let t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){let t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&Yt(this.char());)this.bump()}peek(){if(this.isEOF())return null;let e=this.char(),t=this.offset();return this.message.charCodeAt(t+(e>=65536?2:1))??null}};function Kt(e){return e>=97&&e<=122||e>=65&&e<=90}function qt(e){return Kt(e)||e===47}function Jt(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Yt(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Xt(e){e.forEach(e=>{if(delete e.location,Tt(e)||Et(e))for(let t in e.options)delete e.options[t].location,Xt(e.options[t].value);else St(e)&&kt(e.style)||(Ct(e)||wt(e))&&At(e.style)?delete e.style.location:Ot(e)&&Xt(e.children)})}function Zt(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};let n=new Gt(e,t).parse();if(n.err){let e=SyntaxError(A[n.err.kind]);throw e.location=n.err.location,e.originalMessage=n.err.message,e}return t?.captureLocation||Xt(n.val),n.val}var Qt=function(e){return e.MISSING_VALUE=`MISSING_VALUE`,e.INVALID_VALUE=`INVALID_VALUE`,e.MISSING_INTL_API=`MISSING_INTL_API`,e}({}
2),N=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},$t=class extends N{constructor(e,t,n,r){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join(`", "`)}"`,Qt.INVALID_VALUE,r)}},en=class extends N{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,Qt.INVALID_VALUE,n)}},tn=class extends N{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,Qt.MISSING_VALUE,t)}},P=function(e){return e[e.literal=0]=`literal`,e[e.object=1]=`object`,e}({});function nn(e){return e.length<2?e:e.reduce((e,t)=>{let n=e[e.length-1];return!n||n.type!==P.literal||t.type!==P.literal?e.push(t):n.value+=t.value,e},[])}function rn(e){return typeof e==`function`}function F(e,t,n,r,i,a,o){if(e.length===1&&bt(e[0]))return[{type:P.literal,value:e[0].value}];let s=[];for(let c of e){if(bt(c)){s.push({type:P.literal,value:c.value});continue}if(Dt(c)){typeof a==`number`&&s.push({type:P.literal,value:n.getNumberFormat(t).format(a)});continue}let{value:e}=c;if(!(i&&e in i))throw new tn(e,o);let l=i[e];if(xt(c)){(!l||typeof l==`string`||typeof l==`number`||typeof l==`bigint`)&&(l=typeof l==`string`||typeof l==`number`||typeof l==`bigint`?String(l):``),s.push({type:typeof l==`string`?P.literal:P.object,value:l});continue}if(Ct(c)){let e=typeof c.style==`string`?r.date[c.style]:At(c.style)?c.style.parsedOptions:void 0;s.push({type:P.literal,value:n.getDateTimeFormat(t,e).format(l)});continue}if(wt(c)){let e=typeof c.style==`string`?r.time[c.style]:At(c.style)?c.style.parsedOptions:r.time.medium;s.push({type:P.literal,value:n.getDateTimeFormat(t,e).format(l)});continue}if(St(c)){let e=typeof c.style==`string`?r.number[c.style]:kt(c.style)?c.style.parsedOptions:void 0;if(e&&e.scale){let t=e.scale||1;if(typeof l==`bigint`){if(!Number.isInteger(t))throw TypeError(`Cannot apply fractional scale ${t} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(t)}else l*=t}s.push({type:P.literal,value:n.getNumberFormat(t,e).format(l)});continue}if(Ot(c)){let{children:e,value:l}=c,u=i[l];if(!rn(u))throw new en(l,`function`,o);let d=u(F(e,t,n,r,i,a).map(e=>e.value));Array.isArray(d)||(d=[d]),s.push(...d.map(e=>({type:typeof e==`string`?P.literal:P.object,value:e})))}if(Tt(c)){let e=l,a=(Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0)||c.options.other;if(!a)throw new $t(c.value,l,Object.keys(c.options),o);s.push(...F(a.value,t,n,r,i));continue}if(Et(c)){let e=`=${l}`,a=Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0;if(!a){if(!Intl.PluralRules)throw new N(`Intl.PluralRules is not available in this environment.
3Try polyfilling it using "@formatjs/intl-pluralrules"
4`,Qt.MISSING_INTL_API,o);let e=typeof l==`bigint`?Number(l):l,r=n.getPluralRules(t,{type:c.pluralType}).select(e-(c.offset||0));a=(Object.prototype.hasOwnProperty.call(c.options,r)?c.options[r]:void 0)||c.options.other}if(!a)throw new $t(c.value,l,Object.keys(c.options),o);let u=typeof l==`bigint`?Number(l):l;s.push(...F(a.value,t,n,r,i,u-(c.offset||0)));continue}}return nn(s)}function an(e,t){return t?{...e,...t,...Object.keys(e).reduce((n,r)=>(n[r]={...e[r],...t[r]},n),{})}:e}function on(e,t){return t?Object.keys(e).reduce((n,r)=>(n[r]=an(e[r],t[r]),n),{...e}):e}function sn(e){return{create(){return{get(t){return e[t]},set(t,n){e[t]=n}}}}}function cn(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:qe((...e)=>new Intl.NumberFormat(...e),{cache:sn(e.number),strategy:it.variadic}),getDateTimeFormat:qe((...e)=>new Intl.DateTimeFormat(...e),{cache:sn(e.dateTime),strategy:it.variadic}),getPluralRules:qe((...e)=>new Intl.PluralRules(...e),{cache:sn(e.pluralRules),strategy:it.variadic})}}var ln=class e{constructor(t,n=e.defaultLocale,r,i){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=e=>{let t=this.formatToParts(e);if(t.length===1)return t[0].value;let n=t.reduce((e,t)=>(!e.length||t.type!==P.literal||typeof e[e.length-1]!=`string`?e.push(t.value):e[e.length-1]+=t.value,e),[]);return n.length<=1?n[0]||``:n},this.formatToParts=e=>F(this.ast,this.locales,this.formatters,this.formats,e,void 0,this.message),this.resolvedOptions=()=>({locale:this.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}),this.getAst=()=>this.ast,this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t==`string`){if(this.message=t,!e.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");let{...n}=i||{};this.ast=e.__parse(t,{...n,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw TypeError(`A message must be provided as a String or AST.`);this.formats=on(e.formats,r),this.formatters=i&&i.formatters||cn(this.formatterCache)}static{this.memoizedDefaultLocale=null}static get defaultLocale(){return e.memoizedDefaultLocale||=new Intl.NumberFormat().resolvedOptions().locale,e.memoizedDefaultLocale}static{this.resolveLocale=e=>{if(Intl.Locale===void 0)return;let t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale(typeof e==`string`?e:e[0])}}static{this.__parse=Zt}static{this.formats={number:{integer:{maximumFractionDigits:0},currency:{style:`currency`},percent:{style:`percent`}},date:{short:{month:`numeric`,day:`numeric`,year:`2-digit`},medium:{month:`short`,day:`numeric`,year:`numeric`},long:{month:`long`,day:`numeric`,year:`numeric`},full:{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`}},time:{short:{hour:`numeric`,minute:`numeric`},medium:{hour:`numeric`,minute:`numeric`,second:`numeric`},long:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`},full:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`}}}}};function un(e,t){return hn(e)||mn(e,t)||fn(e,t)||dn()}
4function dn(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
5In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fn(e,t){if(e){if(typeof e==`string`)return pn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pn(e,t)}}function pn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mn(e,t){if(!(typeof Symbol>`u`||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function hn(e){if(Array.isArray(e))return e}function gn(e){"@babel/helpers - typeof";return gn=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},gn(e)}function _n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?_n(Object(n),!0).forEach(function(t){yn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_n(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bn(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function xn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sn(e,t,n){return t&&xn(e.prototype,t),n&&xn(e,n),e}function Cn(){return{memoize:!0,memoizeFallback:!1,bindI18n:``,bindI18nStore:``,parseErrorHandler:function(e,t,n,r){return n},parseLngForICU:function(e){return e},escapeVariables:!1}}var wn=function(){function e(t){bn(this,e),this.type=`i18nFormat`,this.mem={},this.init(null,t)}return Sn(e,[{key:`init`,value:function(e,t){var n=this,r=e&&e.options&&e.options.i18nFormat||{};if(this.options=Ke(r,t,this.options||{},Cn()),this.formats=this.options.formats,e){var i=this.options,a=i.bindI18n,o=i.bindI18nStore,s=i.memoize;e.IntlMessageFormat=ln,e.ICU=this,s&&(a&&e.on(a,function(){return n.clearCache()}),o&&e.store.on(o,function(){return n.clearCache()}))}}},{key:`addUserDefinedFormats`,value:function(e){this.formats=this.formats?vn(vn({},this.formats),e):e}},{key:`parse`,value:function(e,t,n,r,i,a){var o=a&&a.resolved&&a.resolved.res,s=this.options.memoize&&`${n}.${r}.${i.replace(/\./g,`###`)}`,c;this.options.memoize&&(c=He(this.mem,s));try{return c||(c=new ln(e,this.options.parseLngForICU(n),this.formats,{ignoreTag:!0}),this.options.memoize&&(this.options.memoizeFallback||!a||o)&&Ve(this.mem,s,c)),c.format(this.escapeVariableValues(t))}catch(n){return this.options.parseErrorHandler(n,i,e,t)}}},{key:`addLookupKeys`,value:function(e,t,n,r,i){return e}},{key:`clearCache`,value:function(){this.mem={}}},{key:`escapeVariableValues`,value:function(e){if(!this.options.escapeVariables||!e||gn(e)!==`object`)return e;for(var t={},n=0,r=Object.entries(e);n<r.length;n++){var i=un(r[n],2),a=i[0],o=i[1];t[a]=typeof o==`string`?o.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`):o}return t}}]),e}();wn.type=`i18nFormat`;var I={USER:`askara_user`,ORIGINAL_ADMIN:`askara_original_admin`,USER_PROFILE:`askara_user_profile`,ONBOARDING:`askara_onboarding`,PENDING_VERIFICATION_EMAIL:`askara_pending_verification_email`,SELECTED_MICROPHONE:`askara_selected_microphone`,LANGUAGE:`askara_language`};function L(){return typeof window<`u`&&typeof window.askaraNative==`object`&&window.askaraNative!==null}function Tn(){return L()?{desktop:1}:{}}function En(){if(!L())return null;let e=window.askaraNative;if(typeof e?.getBridgeInfo!=`function`)return null;try{let t=e.getBridgeInfo();return!t||typeof t.contractVersion!=`number`||!Array.isArray(t.capabilities)?null:{contractVersion:t.contractVersion,capabilities:[...t.capabilities]}}catch{return null}}function R(e){return En()?.capabilities.includes(e)??!1}function Dn(){if(!L())return;let e=window.askaraNative;if(!(!e||typeof e.notifyAppReady!=`function`))try{e.notifyAppReady()}catch{}}function On(e){if(!L())return;let t=window.askaraNative;if(!(!t||typeof t.setLanguage!=`function`))try{Promise.resolve(t.setLanguage(e)).catch(()=>{})}catch{}}function kn(e){if(e!=null)return typeof e==`string`?e:null}function An(e,t){if(e!=null)return t.includes(e)?e:null}var jn=[`absent`,`cps-absent`,`vitale-absent`,`invalid-vitale`,`wrong-pin`,`blocked`,`session-failed`,`ambiguous-card`,`cryptolib`,`opposition`,`unsupported`,`no-reader`,`reversed-card`,`not-authentic`,`reader-config`,`other`],Mn=[`absent`,`cps-absent`,`vitale-absent`,`wrong-pin`,`session-failed`,`ambiguous-card`,`no-reader`,`reversed-card`];function Nn(e){return Mn.includes(e)}var Pn=new Set([`F001`,`F002`,`F003`,`F004`,`F005`,`F007`,`F017`,`F018`,`F026`,`F031`]);function Fn(e){return typeof e==`string`&&Pn.has(e)}function In(){return R(`sesam-vitale`)&&typeof window.askaraNative?.sesamVitale?.startCpsRead==`function`}var Ln=[`ok`,`cancelled`,`error`],Rn=[`absent`,`wrong-pin`,`blocked`,`other`];function zn(e){if(typeof e!=`object`||!e)return null;let{status:t,reason:n,ssvCode:r}=e;if(!Ln.includes(t)||n!==void 0&&!Rn.includes(n))return null;let i=t===`error`?V(r):void 0;return{status:t,...n===void 0?{}:{reason:n},...i?{ssvCode:i}:{}}}async function Bn(){let e=window.askaraNative?.sesamVitale;if(!In()||typeof e?.startCpsRead!=`function`)return null;try{let t=await e.startCpsRead();return!t||typeof t.started!=`boolean`?null:{started:t.started}}catch{return null}}function Vn(e){let t=window.askaraNative?.sesamVitale;if(!In()||typeof t?.onReadCompleted!=`function`)return()=>{};try{return t.onReadCompleted(t=>{let n=zn(t);n&&e(n)})}catch{return()=>{}}}function Hn(){return R(`sesam-vitale`)&&typeof window.askaraNative?.sesamVitale?.startVitaleRead==`function`}async function Un(){let e=window.askaraNative?.sesamVitale;if(!Hn()||typeof e?.startVitaleRead!=`function`)return null;try{let t=await e.startVitaleRead();return!t||typeof t.started!=`boolean`?null:{started:t.started}}catch{return null}}function Wn(e){let t=zn(e);if(!t)return null;let n=e.beneficiaryUuid;return typeof n==`string`&&n.length>0?{...t,beneficiaryUuid:n}:t}function Gn(e){let t=window.askaraNative?.sesamVitale;if(!Hn()||typeof t?.onVitaleReadCompleted!=`function`)return()=>{};try{return t.onVitaleReadCompleted(t=>{let n=Wn(t);n&&e(n)})}catch{return()=>{}}}function z(){let e=window.askaraNative?.sesamVitale;return R(`sesam-vitale`)&&typeof e?.beginVitaleRead==`function`&&typeof e.submitVitaleReadPin==`function`&&typeof e.pickVitaleBeneficiary==`function`&&typeof e.cancelVitaleRead==`function`&&typeof e.onCardReaderStatus==`function`}function Kn(e){if(typeof e!=`object`||!e)return!1;let{available:t,cpsInserted:n,vitaleInserted:r,readerName:i,nativeError:a,cryptolibMissing:o}=e;return typeof t==`boolean`&&typeof n==`boolean`&&typeof r==`boolean`&&(i===null||typeof i==`string`)&&(a===null||typeof a==`string`)&&typeof o==`boolean`}function qn(e){if(!Kn(e))return null;let t=V(e.ssvCode);return{available:e.available,cpsInserted:e.cpsInserted,vitaleInserted:e.vitaleInserted,readerName:e.readerName,nativeError:e.nativeError,cryptolibMissing:e.cryptolibMissing,...t?{ssvCode:t}:{}}}function Jn(e){let t=window.askaraNative?.sesamVitale;if(!z()||typeof t?.onCardReaderStatus!=`function`)return()=>{};try{return t.onCardReaderStatus(t=>{let n=qn(t);n&&e(n)})}catch{return()=>{}}}function B(e){return jn.includes(e)}function V(e){return typeof e==`string`&&/^[0-9A-F]{4}$/.test(e)?e:void 0}async function Yn(){let e=window.askaraNative?.sesamVitale;if(!z()||typeof e?.beginVitaleRead!=`function`)return null;try{let t=await e.beginVitaleRead();return!t||typeof t.started!=`boolean`||typeof t.needsPin!=`boolean`?null:{started:t.started,needsPin:t.needsPin}}catch{return null}}function Xn(e){if(typeof e!=`object`||!e)return!1;let{index:t,firstName:n,lastName:r,birthDate:i,birthRank:a,qualite:o,amcManagementMode:s}=e;return typeof t==`number`&&Number.isInteger(t)&&t>=0&&typeof n==`string`&&typeof r==`string`&&typeof i==`string`&&typeof a==`number`&&typeof o==`string`&&(s===`gestion_unique`||s===`gestion_separee`||s===null)}function Zn(e){if(typeof e!=`object`||!e)return null;let{status:t,reason:n,beneficiaries:r,ssvCode:i}=e;if(t===`ok`){let t=e.warningCode;if(t!==void 0&&!Fn(t)||!Array.isArray(r)||r.length===0)return null;let n=[];for(let e of r){if(!Xn(e))return null;n.push({index:e.index,firstName:e.firstName,lastName:e.lastName,birthDate:e.birthDate,birthRank:e.birthRank,qualite:e.qualite,amcManagementMode:e.amcManagementMode})}let i=e.cardSummary,a;if(typeof i==`object`&&i){let{nir:e,nirKey:t,grandRegime:n,caisse:r,centre:o}=i;typeof e==`string`&&typeof t==`string`&&typeof n==`string`&&typeof r==`string`&&typeof o==`string`&&(a={nir:e,nirKey:t,grandRegime:n,caisse:r,centre:o})}return{status:`ok`,beneficiaries:n,...a?{cardSummary:a}:{},...t?{warningCode:t}:{}}}if(t!==`error`)return null;let a=V(i);return{status:`error`,...B(n)?{reason:n}:{},...a?{ssvCode:a}:{}}}async function Qn(e){let t=window.askaraNative?.sesamVitale;if(!z()||typeof t?.submitVitaleReadPin!=`function`)return null;try{return Zn(await t.submitVitaleReadPin(e))}catch{return null}}function $n(e){if(typeof e!=`object`||!e)return null;let{status:t,reason:n,beneficiaryUuid:r,coverageDeferred:i}=e;return t===`ok`?typeof r==`string`&&r.length>0?{status:`ok`,beneficiaryUuid:r,...i===!0?{coverageDeferred:!0}
5:{}}:null:t===`error`?n===void 0?{status:`error`}:B(n)?{status:`error`,reason:n}:{status:`error`}:null}async function er(e,t){let n=window.askaraNative?.sesamVitale;if(!z()||typeof n?.pickVitaleBeneficiary!=`function`)return null;try{return $n(await(t?n.pickVitaleBeneficiary(e,t):n.pickVitaleBeneficiary(e)))}catch{return null}}async function tr(){let e=window.askaraNative?.sesamVitale;if(!(!z()||typeof e?.cancelVitaleRead!=`function`))try{await e.cancelVitaleRead()}catch{}}function nr(){return R(`sesam-vitale`)&&typeof window.askaraNative?.sesamVitale?.syncArlTranslations==`function`}function rr(e){if(typeof e!=`object`||!e)return!1;let{seen:t,translated:n,failed:r}=e;return typeof t==`number`&&typeof n==`number`&&typeof r==`number`}async function ir(){let e=window.askaraNative?.sesamVitale;if(!nr()||typeof e?.syncArlTranslations!=`function`)return null;try{let t=await e.syncArlTranslations();return rr(t)?t:null}catch{return null}}function ar(){return R(`sesam-vitale`)&&typeof window.askaraNative?.sesamVitale?.callAldiForBeneficiary==`function`}function or(){return R(`sesam-vitale`)&&typeof window.askaraNative?.sesamVitale?.isVitaleCardPresent==`function`&&typeof window.askaraNative?.sesamVitale?.shouldAutoTriggerAdri==`function`}async function sr(e,t){let n=window.askaraNative?.sesamVitale;if(!or()||typeof n?.isVitaleCardPresent!=`function`||typeof n.shouldAutoTriggerAdri!=`function`)return!1;try{let r=await n.isVitaleCardPresent();return await n.shouldAutoTriggerAdri({...e,cardPresent:r},t)}catch{return!1}}var H=[`absent`,`wrong-pin`,`blocked`,`fault`,`network`,`other`];function cr(e){if(typeof e!=`object`||!e)return!1;let{status:t,reason:n}=e;return!(t!==`ok`&&t!==`error`||n!==void 0&&!H.includes(n))}async function lr(e){let t=window.askaraNative?.sesamVitale;if(!ar()||typeof t?.callAldiForBeneficiary!=`function`)return null;try{let n=await t.callAldiForBeneficiary(e);return cr(n)?n:null}catch{return null}}function ur(){return R(`sesam-vitale`)&&typeof window.askaraNative?.sesamVitale?.callApcvAuth==`function`}function dr(e){if(typeof e!=`object`||!e)return!1;let{index:t,firstName:n,qualite:r}=e;return typeof t==`number`&&typeof n==`string`&&typeof r==`number`}function fr(e){if(typeof e!=`object`||!e)return!1;let{status:t,reason:n,beneficiaries:r}=e;return!(t!==`ok`&&t!==`error`||n!==void 0&&!H.includes(n)||r!==void 0&&(!Array.isArray(r)||!r.every(dr)))}async function pr(e){let t=window.askaraNative?.sesamVitale;if(!ur()||typeof t?.callApcvAuth!=`function`)return null;try{let n=await t.callApcvAuth(e);return fr(n)?n:null}catch{return null}}function mr(e){if(typeof e!=`object`||!e)return!1;let{success:t}=e;if(t===!0){let t=e.beneficiary;if(typeof t!=`object`||!t)return!1;let{uuid:n,first_name:r,last_name:i}=t;return typeof n==`string`&&typeof r==`string`&&typeof i==`string`}if(t===!1){let t=e.reason;return t===void 0||H.includes(t)}return!1}async function hr(e){let t=window.askaraNative?.sesamVitale;if(!ur()||typeof t?.createBeneficiaryFromApcv!=`function`)return null;try{let n=await t.createBeneficiaryFromApcv(e);return mr(n)?n:null}catch{return null}}function gr(){return R(`sesam-vitale`)&&typeof window.askaraNative?.sesamVitale?.callApcvSign==`function`}var _r=[...H,`no-context`,`invoice`,`not-implemented`];function vr(e){if(typeof e!=`object`||!e)return!1;let{status:t,reason:n}=e;return!(t!==`ok`&&t!==`error`||n!==void 0&&!_r.includes(n))}async function yr(e,t){let n=window.askaraNative?.sesamVitale;if(!gr()||typeof n?.callApcvSign!=`function`)return null;try{let r=await n.callApcvSign(e,t);return vr(r)?r:null}catch{return null}}function br(){return R(`sesam-vitale`)&&typeof window.askaraNative?.sesamVitale?.startAdriCall==`function`}function xr(e){return cr(e)}async function Sr(e){let t=window.askaraNative?.sesamVitale;if(!br()||typeof t?.startAdriCall!=`function`)return null;try{let n=await t.startAdriCall(e);return!n||typeof n.started!=`boolean`?null:{started:n.started}}catch{return null}}function Cr(e){let t=window.askaraNative?.sesamVitale;if(!br()||typeof t?.onAdriCallCompleted!=`function`)return()=>{};try{return t.onAdriCallCompleted(t=>{xr(t)&&e(t)})}catch{return()=>{}}}function wr(){return R(`sesam-vitale`)&&typeof window.askaraNative?.sesamVitale?.callAdriIdentitySearch==`function`}async function Tr(e){let t=window.askaraNative?.sesamVitale;if(!wr()||typeof t?.callAdriIdentitySearch!=`function`)return null;try{return await t.callAdriIdentitySearch(e)}catch{return null}}function U(){return R(`sesam-vitale`)&&typeof window.askaraNative?.sesamVitale?.callEbdiReferentiel==`function`}var Er=[`absent`,`wrong-pin`,`blocked`,`fault`,`network`,`other`];function W(e){if(typeof e!=`object`||!e)return!1;let{status:t,reason:n}=e;return!(t!==`ok`&&t!==`error`||n!==void 0&&!Er.includes(n))}function Dr(e){let{dmpDeposited:t,dmpErrorLabel:n}=e??{};return!(!W(e)||t!==void 0&&typeof t!=`boolean`||n!==void 0&&typeof n!=`string`)}function Or(e){return Array.isArray(e)&&e.every(e=>typeof e==`object`&&!!e&&typeof e.code==`string`&&typeof e.libelle==`string`)}function kr(e){if(!W(e))return!1;let t=e.referentiel;if(t===void 0)return!0;
5if(typeof t!=`object`||!t)return!1;let n=t;return Or(n.anomaliesDentaires)&&Or(n.risqueCarieux)&&Or(n.besoinsSoins)}async function Ar(e){let t=window.askaraNative?.sesamVitale;if(!U()||typeof t?.callEbdiReferentiel!=`function`)return null;try{let n=await t.callEbdiReferentiel(e);return kr(n)?n:null}catch{return null}}function jr(e){if(!W(e))return!1;let t=e,n=t.indiceCarieuxDentsPermanantes,r=t.indiceCarieuxDentsTemporaires;return(n===void 0||typeof n==`number`)&&(r===void 0||typeof r==`number`)}async function Mr(e,t){let n=window.askaraNative?.sesamVitale;if(!U()||typeof n?.callEbdiCalculIndiceCarieux!=`function`)return null;try{let r=await n.callEbdiCalculIndiceCarieux(e,t);return jr(r)?r:null}catch{return null}}async function Nr(e,t){let n=window.askaraNative?.sesamVitale;if(!U()||typeof n?.callEbdiRecupererExamen!=`function`)return null;try{let r=await n.callEbdiRecupererExamen(e,t);return W(r)?r:null}catch{return null}}async function Pr(e,t,n){let r=window.askaraNative?.sesamVitale;if(!U()||typeof r?.callEbdiDeposerExamen!=`function`)return null;try{let i=await r.callEbdiDeposerExamen(e,t,n);return Dr(i)?i:null}catch{return null}}async function Fr(e){let t=window.askaraNative?.insi;if(typeof t?.retrieve!=`function`)throw Error(`bridgeRetrievePatientIns called without hasInsiPscBridge()`);try{return await t.retrieve(e)}catch{return{success:!1,reason:`other`}}}async function Ir(e){let t=window.askaraNative?.insi;if(typeof t?.verify!=`function`)throw Error(`bridgeVerifyPatientIns called without hasInsiPscBridge()`);try{return await t.verify(e)}catch{return{success:!1,reason:`other`}}}var Lr=[`absent`,`wrong-pin`,`blocked`,`invoice`,`destination`,`securing`,`network`,`transmit`,`other`];function Rr(e){if(typeof e!=`object`||!e)return null;let{status:t,reason:n}=e;return t!==`ok`&&t!==`error`||n!==void 0&&!Lr.includes(n)?null:n===void 0?{status:t}:{status:t,reason:n}}function zr(){return R(`sesam-vitale`)&&typeof window.askaraNative?.sesamVitale?.startInvoiceEmission==`function`}async function Br(e){let t=window.askaraNative?.sesamVitale;if(!zr()||typeof t?.startInvoiceEmission!=`function`)return null;try{let n=await t.startInvoiceEmission(e);return!n||typeof n.started!=`boolean`?null:{started:n.started}}catch{return null}}function Vr(e){let t=window.askaraNative?.sesamVitale;if(!zr()||typeof t?.onInvoiceEmissionCompleted!=`function`)return()=>{};try{return t.onInvoiceEmissionCompleted(t=>{let n=Rr(t);n&&e(n)})}catch{return()=>{}}}function Hr(e){return new Promise(t=>{let n=!1,r=Vr(e=>{n||(n=!0,r(),t(e))});Br(e).then(e=>{n||e?.started||(n=!0,r(),t(null))})})}function Ur(){let e=window.askaraNative?.sesamVitale;return R(`sesam-vitale`)&&typeof e?.startInvoiceBatchEmission==`function`&&typeof e.onInvoiceBatchCompleted==`function`}function Wr(e){let t=window.askaraNative?.sesamVitale;if(!Ur()||!t?.startInvoiceBatchEmission||!t.onInvoiceBatchCompleted)return Promise.resolve(null);let n=t.startInvoiceBatchEmission.bind(t),r=t.onInvoiceBatchCompleted.bind(t),i=[...new Set(e)];return i.length===0?Promise.resolve(null):new Promise((e,t)=>{let a=!1,o=()=>{},s=t=>{a||(a=!0,o(),e(t))};o=r(e=>{if(!e||typeof e!=`object`||!(`outcomes`in e)||!Array.isArray(e.outcomes))return;let t=[];for(let n of e.outcomes){if(!n||typeof n!=`object`||!(`invoiceUuid`in n)||typeof n.invoiceUuid!=`string`||!i.includes(n.invoiceUuid))return;let e=Rr(n);if(!e||t.some(e=>e.invoiceUuid===n.invoiceUuid))return;t.push({...e,invoiceUuid:n.invoiceUuid})}t.length===i.length&&s(t)}),n(i).then(e=>{e.started||s(null)}).catch(e=>{a||(a=!0,o(),t(e))})})}var Gr=[`constitution-signature`,`chiffrement-b2`,`depot`,`remise`];function Kr(e){if(typeof e!=`object`||!e)return!1;let{step:t}=e;if(t===`reading-cards`||t===`resolving-invoices`||t===`securing-invoices`)return!0;if(t!==`lot`)return!1;let{lotIndex:n,lotCount:r,phase:i}=e;
5return typeof n==`number`&&typeof r==`number`&&Gr.includes(i)}function qr(e){if(typeof e!=`object`||!e)return null;let{status:t}=e;if(t===`ok`){let{outcomes:t}=e;if(!Array.isArray(t))return null;let n=[];for(let e of t){if(typeof e!=`object`||!e)return null;let{invoiceUuid:t,status:r,reason:i}=e;if(typeof t!=`string`||t.length===0||r!==`ok`&&r!==`error`||i!==void 0&&!Lr.includes(i))return null;n.push(i===void 0?{invoiceUuid:t,status:r}:{invoiceUuid:t,status:r,reason:i})}return{status:`ok`,outcomes:n}}if(t!==`error`)return null;let{reason:n,ssvCode:r}=e,i=V(r);return{status:`error`,...B(n)?{reason:n}:{},...i?{ssvCode:i}:{}}}function Jr(){let e=window.askaraNative?.sesamVitale;return R(`sesam-vitale`)&&typeof e?.beginInvoiceBatchEmission==`function`&&typeof e.submitInvoiceBatchEmissionPin==`function`&&typeof e.cancelInvoiceBatchEmission==`function`&&typeof e.onInvoiceBatchProgress==`function`}async function Yr(e){let t=window.askaraNative?.sesamVitale;if(!Jr()||typeof t?.beginInvoiceBatchEmission!=`function`)return null;try{let n=await t.beginInvoiceBatchEmission(e);return!n||typeof n.started!=`boolean`||typeof n.needsPin!=`boolean`?null:{started:n.started,needsPin:n.needsPin,...n.reason===`vitale-read-warning`?{reason:n.reason}:{}}}catch{return null}}async function Xr(e){let t=window.askaraNative?.sesamVitale;if(!Jr()||typeof t?.submitInvoiceBatchEmissionPin!=`function`)return null;try{return qr(await t.submitInvoiceBatchEmissionPin(e))}catch{return null}}async function Zr(){let e=window.askaraNative?.sesamVitale;if(!(!Jr()||typeof e?.cancelInvoiceBatchEmission!=`function`))try{await e.cancelInvoiceBatchEmission()}catch{}}function Qr(e){let t=window.askaraNative?.sesamVitale;if(!R(`sesam-vitale`)||typeof t?.onInvoiceBatchProgress!=`function`)return()=>{};try{return t.onInvoiceBatchProgress(t=>{Kr(t)&&e(t)})}catch{return()=>{}}}function $r(e){if(typeof e!=`object`||!e)return null;let{status:t,reason:n,ssvCode:r}=e;if(t===`ok`)return{status:`ok`};if(t!==`error`)return null;let i=V(r);return{status:`error`,...B(n)||Lr.includes(n)?{reason:n}:{},...i?{ssvCode:i}:{}}}function ei(){let e=window.askaraNative?.sesamVitale;return R(`sesam-vitale`)&&typeof e?.beginInvoiceEmission==`function`&&typeof e.submitInvoiceEmissionPin==`function`&&typeof e.cancelInvoiceEmission==`function`}async function ti(e){let t=window.askaraNative?.sesamVitale;if(!ei()||typeof t?.beginInvoiceEmission!=`function`)return null;try{let n=await t.beginInvoiceEmission(e);return!n||typeof n.started!=`boolean`||typeof n.needsPin!=`boolean`?null:{started:n.started,needsPin:n.needsPin,...n.reason===`vitale-read-warning`?{reason:n.reason}:{}}}catch{return null}}async function ni(e){let t=window.askaraNative?.sesamVitale;if(!ei()||typeof t?.submitInvoiceEmissionPin!=`function`)return null;try{return $r(await t.submitInvoiceEmissionPin(e))}catch{return null}}async function ri(){let e=window.askaraNative?.sesamVitale;if(!(!ei()||typeof e?.cancelInvoiceEmission!=`function`))try{await e.cancelInvoiceEmission()}catch{}}var ii=String.raw`[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}`,ai=RegExp(`^${ii}$`,`i`);function oi(e){return ai.test(e.trim())}function si(){return new RegExp(ii,`gi`)}function ci(){return RegExp(`/${ii}`,`gi`)}function li(){let e=window.askaraNative?.organization;return R(`organization`)&&typeof e?.getActive==`function`&&typeof e?.onActiveChanged==`function`}function ui(e){if(typeof e!=`object`||!e)return null;let{uuid:t}=e;if(t===null)return{uuid:null};if(typeof t!=`string`)return null;let n=t.trim();return oi(n)?{uuid:n}:null}async function di(){let e=window.askaraNative?.organization;if(!li()||typeof e?.getActive!=`function`)return null;try{return ui(await e.getActive())}catch{return null}}function fi(e){let t=window.askaraNative?.organization;if(!li()||typeof t?.onActiveChanged!=`function`)return()=>{};try{return t.onActiveChanged(t=>{let n=ui(t);n&&e(n)})}catch{return()=>{}}}var pi=(e,t)=>o(e,{parse:e=>e,serialize:e=>e,storage:()=>t===`local`?localStorage:sessionStorage,onError:(n,i)=>r.warn(`Web Storage unavailable`,{key:e,area:t,operation:n,error:i instanceof Error?i.name:String(i)})}),G={read:(e,t=`local`)=>pi(e,t).get(),write:(e,t,n=`local`)=>pi(e,n).set(t),remove:(e,t=`local`)=>pi(e,t).clear()},mi=`askara_gmail_oauth_modal`,hi={includeUserEmail:!0,includeSecretariatEmail:!1},K=null,q=null,J=null,gi=(e,t)=>{typeof window>`u`||window.dispatchEvent(new CustomEvent(`auth:storage-corrupted`,{detail:{key:e,label:t}}))},_i=[`askara_access_token`,`askara_token_type`,`askara_refresh_token`,`askara_sse_token`,`askara_auth_bundle`],vi=()=>{for(let e of _i)G.remove(e);G.remove(`askara_access_token`,`session`),G.remove(`askara_token_type`,`session`)},Y={meetings:`askara_meetings_guidance_dismissed`,launchMeeting:`askara_launch_meeting_guidance_dismissed`,crop:`askara_crop_guidance_dismissed`,summaryCopy:`askara_summary_copy_guidance_dismissed`,contactSpecialty:`askara_contact_specialty_guidance_dismissed`,gmailOnboarding:`askara_gmail_onboarding_guidance_dismissed`,dropdown:`askara_dropdown_guidance_dismissed`,flow:`askara_flow_guidance_dismissed`},yi=[{legacy:`askara-meetings-guidance-dismissed`,next:Y.meetings},{legacy:`askara-launch-meeting-guidance-dismissed`,next:Y.launchMeeting},{legacy:`askara-crop-guidance-dismissed`,next:Y.crop},{legacy:`askara_contact_specialty_tooltip_seen`,next:Y.contactSpecialty},{legacy:`askara_gmail_onboarding_seen`,next:Y.gmailOnboarding},{legacy:`askara_dropdown_tutorial_seen`,next:Y.dropdown},{legacy:`flow.guidanceDismissed`,next:Y.flow}],bi=()=>{for(let{legacy:e,next:t}of yi)G.read(e)!==null&&(G.read(t)===null&&G.write(t,`true`),G.remove(e))},xi=[`askara_v2_welcome_shown`,`askara_tutorial_step`,...Object.values(Y)],Si={get:e=>{let t=G.read(e);if(!t)return null;try{return JSON.parse(t)}catch{return null}}
5,set:(e,t)=>{G.write(e,JSON.stringify(t))},remove:e=>{G.remove(e)},getString:e=>G.read(e),setString:(e,t)=>{G.write(e,t)},clear:e=>{e.forEach(e=>G.remove(e))},setAccessToken:(e,t=`Bearer`)=>{if(t===`ShortAccessToken`){q=e;return}K=e,vi()},getAccessToken:()=>q===null?K===null?null:K.split(`.`).length===3?K:(K=null,r.warn(`Corrupted access token in memory — clearing`),gi(`askara_access_token`,`access token`),null):q,getTokenType:()=>q===null?`Bearer`:`ShortAccessToken`,clearAccessToken:()=>{K=null,q=null},clearShortAccessToken:()=>{q=null},setSseToken:e=>{J=e},getSseToken:()=>J===null?null:J.split(`.`).length===3?J:(J=null,r.warn(`Corrupted SSE token in memory — clearing`),gi(`askara_sse_token`,`SSE token`),null),clearSseToken:()=>{J=null},getSelectedMicrophone:()=>G.read(I.SELECTED_MICROPHONE),setSelectedMicrophone:e=>{G.write(I.SELECTED_MICROPHONE,e)},hasSelectedMicrophone:()=>G.read(I.SELECTED_MICROPHONE)!==null,clearSelectedMicrophone:()=>{G.remove(I.SELECTED_MICROPHONE)},getEmailRecipientPreferences:()=>{let e=G.read(`askara_email_recipient_preferences`);if(!e)return hi;try{let t=JSON.parse(e);return{...hi,...t}}catch{return hi}},setEmailRecipientPreferences:e=>{G.write(`askara_email_recipient_preferences`,JSON.stringify(e))},getEmailChannelPreference:()=>G.read(`askara_email_channel_preference`)===`gmail`?`gmail`:`ses`,setEmailChannelPreference:e=>{G.write(`askara_email_channel_preference`,e)},getUserRaw:()=>G.read(I.USER,`session`)??G.read(I.USER),setUserRaw:(e,t=`browser`)=>{if(t===`tab`){G.write(I.USER,e,`session`);return}G.remove(I.USER,`session`),G.write(I.USER,e)},clearUserRaw:()=>{if(G.read(I.USER,`session`)!==null){G.remove(I.USER,`session`);return}G.remove(I.USER)},hasPerTabSession:()=>G.read(I.USER,`session`)!==null,clearLegacyAuthKeys:vi,resetFirstRunExperience:()=>{for(let e of xi)G.remove(e)}},Ci=`modulepreload`,wi=function(e){return`/`+e},Ti={},X=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=wi(t,n),t=s(t),t in Ti)return;Ti[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Ci,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function Ei(e,t){let n={...e};for(let e of Object.keys(t)){let r=n[e],i=t[e];n[e]=r&&i&&typeof r==`object`&&!Array.isArray(r)&&typeof i==`object`&&!Array.isArray(i)?Ei(r,i):i}return n}var Di=[`fr`,`en`,`es`,`it`,`pl`,`pt`],Z=`en`,Q=e=>Di.includes(e),Oi=I.LANGUAGE,$={getBrowserLanguage:()=>navigator.language.split(`-`)[0]||`en`,getStoredLanguage:()=>G.read(Oi),setStoredLanguage:e=>{G.write(Oi,e)},getRemoteLanguage:()=>{try{let e=G.read(I.USER_PROFILE);if(e){let t=JSON.parse(e);if(t?.language)return t.language}let t=Si.getUserRaw();if(t)return JSON.parse(t)?.language??null}catch(e){r.warn(`Failed to parse user data for language detection`,{error:e})}return null},applyDocumentLanguage:e=>{typeof document>`u`||(document.documentElement.lang=e)},changeLanguage:async e=>{if(!Q(e)){r.warn(`Language ${e} is not supported. Supported languages: ${Di.join(`, `)}`);return}await k.changeLanguage(e),$.setStoredLanguage(e),$.applyDocumentLanguage(e),On(e)},applyCountryLanguageIfNeeded:async e=>{let t=$.getStoredLanguage();if(t&&Q(t))return;let r=$.getRemoteLanguage();if(r&&Q(r))return;let i=$.getBrowserLanguage();if(i!==Z&&Q(i)||!e)return;let a=n[e.toUpperCase()];!a||!Q(a)||k.language===a||await $.changeLanguage(a)},syncWithRemoteLanguage:async()=>{let e=$.getStoredLanguage();if(e&&Q(e))return;let t=$.getRemoteLanguage();t&&Q(t)&&t!==k.language&&await $.changeLanguage(t)},applyImpersonatedLanguage:async e=>{e&&Q(e)&&e!==k.language&&await $.changeLanguage(e)},detectLanguage:()=>{let e=$.getStoredLanguage();if(e&&Q(e))return e;let t=$.getRemoteLanguage();if(t&&Q(t))return t;let n=$.getBrowserLanguage();return Q(n)?n:Z}},ki=async e=>{let[t,n]=await Promise.all([s(Object.assign({
5"../translations/en.json":()=>X(()=>import(`./en-BVGCztNE.js`),__vite__mapDeps([0,1])),
5"../translations/es.json":()=>X(()=>import(`./es-C6AGahaj.js`),__vite__mapDeps([2,3])),
5"../translations/fr.json":()=>X(()=>import(`./fr--pVI_W84.js`),__vite__mapDeps([4,5])),
5"../translations/it.json":()=>X(()=>import(`./it-Bnqz0Ict.js`),__vite__mapDeps([6,7])),
5"../translations/pl.json":()=>X(()=>import(`./pl-BpWhg_gR.js`),__vite__mapDeps([8,9])),
5"../translations/pt.json":()=>X(()=>import(`./pt-DxiyJQSx.js`),__vite__mapDeps([10,11]))}),`../translations/${e}.json`,3),s(Object.assign({
5"../generated/enums-i18n-en.json":()=>X(()=>import(`./enums-i18n-en-B15wRsyL.js`),__vite__mapDeps([12,1])),
5"../generated/enums-i18n-es.json":()=>X(()=>import(`./enums-i18n-es-CBcj4cwl.js`),__vite__mapDeps([13,3])),
5"../generated/enums-i18n-fr.json":()=>X(()=>import(`./enums-i18n-fr-C6VjJ3Ix.js`),__vite__mapDeps([14,5])),
5"../generated/enums-i18n-it.json":()=>X(()=>import(`./enums-i18n-it-8GlcAZ8J.js`),__vite__mapDeps([15,7])),
5"../generated/enums-i18n-pl.json":()=>X(()=>import(`./enums-i18n-pl-Be2-xJa1.js`),__vite__mapDeps([16,9])),
5"../generated/enums-i18n-pt.json":()=>X(()=>import(`./enums-i18n-pt-B_FNL-BT.js`),__vite__mapDeps([17,11]))
5}),`../generated/enums-i18n-${e}.json`,3)]);return Ei(t.default,n.default)},Ai={type:`backend`,init:()=>{},read:(e,t,n)=>{if(!Q(e)){n(null,{});return}ki(e).then(e=>n(null,e)).catch(t=>{r.error(`Failed to load i18n translation bundle`,t,{language:e}),n(t,null)})}},ji=$.detectLanguage(),Mi=Array.from(new Set([Q(ji)?ji:Z,Z])),Ni={};try{await Promise.all(Mi.map(async e=>{Ni[e]={translation:await ki(e)}}))}catch(e){r.error(`Failed to preload i18n translation bundles at boot`,e,{languages:Mi})}await k.use(wn).use(Ai).use(Re).init({resources:Ni,lng:ji,fallbackLng:Z,partialBundledLanguages:!0,interpolation:{escapeValue:!1,prefix:`{`,suffix:`}`}}),$.applyDocumentLanguage(ji);var Pi=k,Fi=async e=>{await k.loadLanguages(e)},Ii=(e,t)=>{let n=k.getResource(e,`translation`,t);return typeof n==`string`?n:void 0},Li=e=>e.replace(/<[^>]*>/g,``),Ri=(e,t)=>Li(k.t(e,t)),zi=(e,t)=>k.t(e,t);export{In as $,ni as A,Mr as B,Zr as C,je as Ct,zr as D,Jr as E,Ir as F,hr as G,Nr as H,Tr as I,ar as J,br as K,lr as L,jn as M,Yn as N,ei as O,Fr as P,U as Q,pr as R,ti as S,Pe as St,Ur as T,o as Tt,Ar as U,Pr as V,tr as W,gr as X,ur as Y,nr as Z,ci as _,Dn as _t,Ri as a,Sr as at,Hr as b,I as bt,mi as c,Qn as ct,Si as d,Vn as dt,Hn as et,G as f,Gn as ft,si as g,L as gt,oi as h,R as ht,Fi as i,sr as it,Qr as j,Xr as k,Y as l,Cr as lt,fi as m,Tn as mt,Pi as n,Nn as nt,zi as o,Bn as ot,di as p,ir as pt,wr as q,$ as r,er as rt,X as s,Un as st,Ii as t,z as tt,bi as u,Jn as ut,Lr as v,An as vt,ri as w,D as wt,Yr as x,Le as xt,Wr as y,kn as yt,yr as z};

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.