@object-ui/console 3.1.2 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AdvancedChartImpl-D711bBuO.js → AdvancedChartImpl-BvIFxlPf.js} +2 -2
- package/dist/assets/{AppManagementPage-CaWUYaXX.js → AppManagementPage-6bzxYNlP.js} +1 -1
- package/dist/assets/{AuditLogPage-CB1qkThp.js → AuditLogPage-qCzdxaNq.js} +1 -1
- package/dist/assets/{AuthPageLayout-9l5xWV_-.js → AuthPageLayout-DkrxSZOE.js} +1 -1
- package/dist/assets/{ChartImpl-B9B4Fnbe.js → ChartImpl-DYQ9eXJz.js} +1 -1
- package/dist/assets/CreateAppPage-DNKskVHK.js +1 -0
- package/dist/assets/{DashboardDesignPage-DGz-5xrK.js → DashboardDesignPage-T9tEAHAx.js} +1 -1
- package/dist/assets/{DashboardView-v834XbaQ.js → DashboardView-jCJCERzJ.js} +1 -1
- package/dist/assets/{EditAppPage-DocDqKMS.js → EditAppPage-UGT9V29B.js} +1 -1
- package/dist/assets/{ForgotPasswordPage-8ypvh4-X.js → ForgotPasswordPage-Ca0lLZwY.js} +1 -1
- package/dist/assets/{KanbanEnhanced-Cw4oddBv.js → KanbanEnhanced-CyIdmKhW.js} +1 -1
- package/dist/assets/{KanbanImpl-D6ggfmB0.js → KanbanImpl-PGPpv-gu.js} +1 -1
- package/dist/assets/{LoginPage-XakThPoT.js → LoginPage-BR2RpoGG.js} +1 -1
- package/dist/assets/{MarkdownImpl-C0wRapHT.js → MarkdownImpl-eDhoPCJp.js} +1 -1
- package/dist/assets/{OrgManagementPage-Df5167oO.js → OrgManagementPage-DjT2mZ2x.js} +1 -1
- package/dist/assets/{PageDesignPage-BzM4EsXt.js → PageDesignPage-DTEQcEuR.js} +1 -1
- package/dist/assets/{PageView-CpIQvLmr.js → PageView-CFJhE0CN.js} +2 -2
- package/dist/assets/{PermissionManagementPage-CZH3URJU.js → PermissionManagementPage-C_FPnvGW.js} +1 -1
- package/dist/assets/{ProfilePage-BvIbbebc.js → ProfilePage-CQkgvEEi.js} +1 -1
- package/dist/assets/RecordDetailView-ClpxNRz2.js +1 -0
- package/dist/assets/{RegisterPage-CIeFN9rY.js → RegisterPage-6IYU4bdp.js} +1 -1
- package/dist/assets/{ReportView-DYhXezmy.js → ReportView-DecAJ58u.js} +1 -1
- package/dist/assets/{RoleManagementPage-D0X7HlqJ.js → RoleManagementPage-v0ia3MGn.js} +1 -1
- package/dist/assets/{SearchResultsPage-CoMB32KW.js → SearchResultsPage-CaSb54ho.js} +1 -1
- package/dist/assets/{SystemHubPage-Cvl3VKcV.js → SystemHubPage-PNaxZEht.js} +1 -1
- package/dist/assets/{UserManagementPage-5k8BQxT1.js → UserManagementPage-KAZy5fgy.js} +1 -1
- package/dist/assets/data-adapter-DCM4pdG4.js +1 -0
- package/dist/assets/{framework-52FGgFF6.js → framework-jBjO8CT3.js} +2 -2
- package/dist/assets/{index-D5i0wk-G.js → index-BwkHrw9s.js} +1 -1
- package/dist/assets/index-DXak0mZe.css +1 -0
- package/dist/assets/{index-fjkakZm9.js → index-tta28Q_N.js} +3 -3
- package/dist/assets/infrastructure-CWeiQ12V.js +1 -0
- package/dist/assets/{maplibre-gl-DVmJFhI2.js → maplibre-gl-CENyyZ0G.js} +1 -1
- package/dist/assets/plugins-core-BV7ym-7D.js +8 -0
- package/dist/assets/plugins-views-gxDbTdkX.js +62 -0
- package/dist/assets/{ui-components-CxztIKgM.css → ui-components-BCiSmwiC.css} +1 -1
- package/dist/assets/ui-components-BRpbeVr1.js +36 -0
- package/dist/assets/ui-layout-VeUu0ZVf.js +1 -0
- package/dist/assets/vendor-charts-DthMRf4E.js +60 -0
- package/dist/assets/{vendor-dndkit-CX1oDZqy.js → vendor-dndkit-_-PfuStg.js} +1 -1
- package/dist/assets/vendor-i18n-B3GHNV0X.js +9 -0
- package/dist/assets/{vendor-icons-ndICq8DC.js → vendor-icons-CnLeuN7Z.js} +3419 -3414
- package/dist/assets/vendor-objectstack-BkRCrdfn.js +34 -0
- package/dist/assets/vendor-radix-BPVlBHPl.js +56 -0
- package/dist/assets/{vendor-react-9M-xu2bR.js → vendor-react-Dvo_9NuO.js} +6 -6
- package/dist/assets/{vendor-ui-utils-3tkeUVaX.js → vendor-ui-utils-CU11aiRA.js} +1 -1
- package/dist/assets/vendor-zod-CZmssJWz.js +39 -0
- package/dist/index.html +23 -23
- package/package.json +40 -40
- package/dist/assets/CreateAppPage-DLRU3TEg.js +0 -1
- package/dist/assets/RecordDetailView-BNnPf0DG.js +0 -1
- package/dist/assets/data-adapter-Bif-TtZA.js +0 -1
- package/dist/assets/index-h9Jznm67.css +0 -1
- package/dist/assets/infrastructure-Dn7jNPwf.js +0 -1
- package/dist/assets/plugins-core-CP8uPw4p.js +0 -8
- package/dist/assets/plugins-views-DZCu8Ex3.js +0 -62
- package/dist/assets/ui-components-BE4yvyhE.js +0 -36
- package/dist/assets/ui-layout-CYnH69Z2.js +0 -1
- package/dist/assets/vendor-charts-BLNOCZWl.js +0 -65
- package/dist/assets/vendor-i18n-E3-WitRV.js +0 -9
- package/dist/assets/vendor-objectstack-CatrkstC.js +0 -34
- package/dist/assets/vendor-radix-C6qchjxv.js +0 -56
- package/dist/assets/vendor-zod-C5j6C2CQ.js +0 -39
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,R as I,
|
|
1
|
+
import{r as c,R as I,c as Ne}from"./vendor-react-Dvo_9NuO.js";function On(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const rt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function we(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function mt(e){return"nodeType"in e}function z(e){var t,n;return e?we(e)?e:mt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function yt(e){const{Document:t}=z(e);return e instanceof t}function Be(e){return we(e)?!1:e instanceof z(e).HTMLElement}function Ht(e){return e instanceof z(e).SVGElement}function xe(e){return e?we(e)?e.document:mt(e)?yt(e)?e:Be(e)||Ht(e)?e.ownerDocument:document:document:document}const V=rt?c.useLayoutEffect:c.useEffect;function ot(e){const t=c.useRef(e);return V(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function In(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Pe(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return V(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function _e(e){const t=ot(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function Qe(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let dt={};function $e(e,t){return c.useMemo(()=>{if(t)return t;const n=dt[e]==null?0:dt[e]+1;return dt[e]=n,e+"-"+n},[e,t])}function Vt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const a=Object.entries(s);for(const[l,u]of a){const d=i[l];d!=null&&(i[l]=d+e*u)}return i},{...t})}}const ye=Vt(1),Ze=Vt(-1);function Nn(e){return"clientX"in e&&"clientY"in e}function it(e){if(!e)return!1;const{KeyboardEvent:t}=z(e.target);return t&&e instanceof t}function Tn(e){if(!e)return!1;const{TouchEvent:t}=z(e.target);return t&&e instanceof t}function et(e){if(Tn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Nn(e)?{x:e.clientX,y:e.clientY}:null}const fe=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[fe.Translate.toString(e),fe.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Tt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ln(e){return e.matches(Tt)?e:e.querySelector(Tt)}const kn={display:"none"};function Pn(e){let{id:t,value:n}=e;return I.createElement("div",{id:t,style:kn},n)}function zn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return I.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Bn(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const qt=c.createContext(null);function Fn(e){const t=c.useContext(qt);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function $n(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const Xn={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{r as C,a as Ie}from"./vendor-react-Dvo_9NuO.js";const g=r=>typeof r=="string",H=()=>{let r,e;const t=new Promise((i,s)=>{r=i,e=s});return t.resolve=r,t.reject=e,t},ce=r=>r==null?"":""+r,Te=(r,e,t)=>{r.forEach(i=>{e[i]&&(t[i]=e[i])})},De=/###/g,fe=r=>r&&r.indexOf("###")>-1?r.replace(De,"."):r,he=r=>!r||g(r),z=(r,e,t)=>{const i=g(e)?e.split("."):e;let s=0;for(;s<i.length-1;){if(he(r))return{};const n=fe(i[s]);!r[n]&&t&&(r[n]=new t),Object.prototype.hasOwnProperty.call(r,n)?r=r[n]:r={},++s}return he(r)?{}:{obj:r,k:fe(i[s])}},de=(r,e,t)=>{const{obj:i,k:s}=z(r,e,Object);if(i!==void 0||e.length===1){i[s]=t;return}let n=e[e.length-1],a=e.slice(0,e.length-1),o=z(r,a,Object);for(;o.obj===void 0&&a.length;)n=`${a[a.length-1]}.${n}`,a=a.slice(0,a.length-1),o=z(r,a,Object),o?.obj&&typeof o.obj[`${o.k}.${n}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${n}`]=t},Ke=(r,e,t,i)=>{const{obj:s,k:n}=z(r,e,Object);s[n]=s[n]||[],s[n].push(t)},Q=(r,e)=>{const{obj:t,k:i}=z(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,i))return t[i]},Ve=(r,e,t)=>{const i=Q(r,t);return i!==void 0?i:Q(e,t)},Ne=(r,e,t)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in r?g(r[i])||r[i]instanceof String||g(e[i])||e[i]instanceof String?t&&(r[i]=e[i]):Ne(r[i],e[i],t):r[i]=e[i]);return r},V=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Ae={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Ue=r=>g(r)?r.replace(/[&<>"'\/]/g,e=>Ae[e]):r;class Me{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const He=[" ",",","?","!",";"],ze=new Me(20),_e=(r,e,t)=>{e=e||"",t=t||"";const i=He.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(i.length===0)return!0;const s=ze.getRegExp(`(${i.map(a=>a==="?"?"\\?":a).join("|")})`);let n=!s.test(r);if(!n){const a=r.indexOf(t);a>0&&!s.test(r.substring(0,a))&&(n=!0)}return n},re=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const i=e.split(t);let s=r;for(let n=0;n<i.length;){if(!s||typeof s!="object")return;let a,o="";for(let l=n;l<i.length;++l)if(l!==n&&(o+=t),o+=i[l],a=s[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<i.length-1)continue;n+=l-n+1;break}s=a}return s},B=r=>r?.replace(/_/g,"-"),Be={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){console?.[r]?.apply?.(console,e)}};class q{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Be,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,i,s){return s&&!this.debug?null:(g(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new q(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new q(this.logger,e)}}var I=new q;class X{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const s=this.observers[i].get(t)||0;this.observers[i].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,n])=>{for(let a=0;a<n;a++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,n])=>{for(let a=0;a<n;a++)s.apply(s,[e,...t])})}}class pe extends X{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.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i,s={}){const n=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,a=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],i&&(Array.isArray(i)?o.push(...i):g(i)&&n?o.push(...i.split(n)):o.push(i)));const l=Q(this.data,o);return!l&&!t&&!i&&e.indexOf(".")>-1&&(e=o[0],t=o[1],i=o.slice(2).join(".")),l||!a||!g(i)?l:re(this.data?.[e]?.[t],i,n)}addResource(e,t,i,s,n={silent:!1}){const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=[e,t];i&&(o=o.concat(a?i.split(a):i)),e.indexOf(".")>-1&&(o=e.split("."),s=t,t=o[1]),this.addNamespaces(t),de(this.data,o,s),n.silent||this.emit("added",e,t,i,s)}addResources(e,t,i,s={silent:!1}){for(const n in i)(g(i[n])||Array.isArray(i[n]))&&this.addResource(e,t,n,i[n],{silent:!0});s.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,s,n,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),s=i,i=t,t=o[1]),this.addNamespaces(t);let l=Q(this.data,o)||{};a.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?Ne(l,i,n):l={...l,...i},de(this.data,o,l),a.silent||this.emit("added",e,t,i)}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||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var Pe={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,i,s){return r.forEach(n=>{e=this.processors[n]?.process(e,t,i,s)??e}),e}};const $e=Symbol("i18next/PATH_KEY");function Je(){const r=[],e=Object.create(null);let t;return e.get=(i,s)=>(t?.revoke?.(),s===$e?r:(r.push(s),t=Proxy.revocable(i,e),t.proxy)),Proxy.revocable(Object.create(null),e).proxy}function ae(r,e){const{[$e]:t}=r(Je()),i=e?.keySeparator??".",s=e?.nsSeparator??":";if(t.length>1&&s){const n=e?.ns;if((n?Array.isArray(n)?n:[n]:[]).includes(t[0]))return`${t[0]}${s}${t.slice(1).join(i)}`}return t.join(i)}const ge={},ee=r=>!g(r)&&typeof r!="boolean"&&typeof r!="number";class Z extends X{constructor(e,t={}){super(),Te(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=I.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const i={...t};if(e==null)return!1;const s=this.resolve(e,i);if(s?.res===void 0)return!1;const n=ee(s.res);return!(i.returnObjects===!1&&n)}extractFromKey(e,t){let i=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let n=t.ns||this.options.defaultNS||[];const a=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!_e(e,i,s);if(a&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:g(n)?[n]:n};const u=e.split(i);(i!==s||i===s&&this.options.ns.indexOf(u[0])>-1)&&(n=u.shift()),e=u.join(s)}return{key:e,namespaces:g(n)?[n]:n}}translate(e,t,i){let s=typeof t=="object"?{...t}:t;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),e==null)return"";typeof e=="function"&&(e=ae(e,{...this.options,...s})),Array.isArray(e)||(e=[String(e)]);const n=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],s),u=l[l.length-1];let f=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const c=s.lng||this.language,h=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c?.toLowerCase()==="cimode")return h?n?{res:`${u}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:`${u}${f}${o}`:n?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:o;const p=this.resolve(e,s);let d=p?.res;const x=p?.usedKey||o,b=p?.exactUsedKey||o,E=["[object Number]","[object Function]","[object RegExp]"],O=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject,w=s.count!==void 0&&!g(s.count),N=Z.hasDefaultValue(s),j=w?this.pluralResolver.getSuffix(c,s.count,s):"",T=s.ordinal&&w?this.pluralResolver.getSuffix(c,s.count,{ordinal:!1}):"",J=w&&!s.ordinal&&s.count===0,y=J&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${j}`]||s[`defaultValue${T}`]||s.defaultValue;let m=d;R&&!d&&N&&(m=y);const S=ee(m),L=Object.prototype.toString.apply(m);if(R&&m&&S&&E.indexOf(L)<0&&!(g(O)&&Array.isArray(m))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const v=this.options.returnedObjectHandler?this.options.returnedObjectHandler(x,m,{...s,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return n?(p.res=v,p.usedParams=this.getUsedParamsDetails(s),p):v}if(a){const v=Array.isArray(m),P=v?[]:{},W=v?b:x;for(const F in m)if(Object.prototype.hasOwnProperty.call(m,F)){const D=`${W}${a}${F}`;N&&!d?P[F]=this.translate(D,{...s,defaultValue:ee(y)?y[F]:void 0,joinArrays:!1,ns:l}):P[F]=this.translate(D,{...s,joinArrays:!1,ns:l}),P[F]===D&&(P[F]=m[F])}d=P}}else if(R&&g(O)&&Array.isArray(d))d=d.join(O),d&&(d=this.extendTranslation(d,e,s,i));else{let v=!1,P=!1;!this.isValidLookup(d)&&N&&(v=!0,d=y),this.isValidLookup(d)||(P=!0,d=o);const F=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&P?void 0:d,D=N&&y!==d&&this.options.updateMissing;if(P||v||D){if(this.logger.log(D?"updateKey":"missingKey",c,u,o,D?y:d),a){const k=this.resolve(o,{...s,keySeparator:!1});k&&k.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 U=[];const Y=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Y&&Y[0])for(let k=0;k<Y.length;k++)U.push(Y[k]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(s.lng||this.language):U.push(s.lng||this.language);const le=(k,K,M)=>{const ue=N&&M!==d?M:F;this.options.missingKeyHandler?this.options.missingKeyHandler(k,u,K,ue,D,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(k,u,K,ue,D,s),this.emit("missingKey",k,u,K,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?U.forEach(k=>{const K=this.pluralResolver.getSuffixes(k,s);J&&s[`defaultValue${this.options.pluralSeparator}zero`]&&K.indexOf(`${this.options.pluralSeparator}zero`)<0&&K.push(`${this.options.pluralSeparator}zero`),K.forEach(M=>{le([k],o+M,s[`defaultValue${M}`]||y)})}):le(U,o,y))}d=this.extendTranslation(d,e,s,p,i),P&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${u}${f}${o}`),(P||v)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${f}${o}`:o,v?d:void 0,s))}return n?(p.res=d,p.usedParams=this.getUsedParamsDetails(s),p):d}extendTranslation(e,t,i,s,n){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const l=g(e)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(l){const c=e.match(this.interpolator.nestingRegexp);u=c&&c.length}let f=i.replace&&!g(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,i.lng||this.language||s.usedLng,i),l){const c=e.match(this.interpolator.nestingRegexp),h=c&&c.length;u<h&&(i.nest=!1)}!i.lng&&s&&s.res&&(i.lng=this.language||s.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,(...c)=>n?.[0]===c[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${c[0]} in key: ${t[0]}`),null):this.translate(...c,t),i)),i.interpolation&&this.interpolator.reset()}const a=i.postProcess||this.options.postProcess,o=g(a)?[a]:a;return e!=null&&o?.length&&i.applyPostProcessor!==!1&&(e=Pe.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,t={}){let i,s,n,a,o;return g(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(l,t),f=u.key;s=f;let c=u.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const h=t.count!==void 0&&!g(t.count),p=h&&!t.ordinal&&t.count===0,d=t.context!==void 0&&(g(t.context)||typeof t.context=="number")&&t.context!=="",x=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(b=>{this.isValidLookup(i)||(o=b,!ge[`${x[0]}-${b}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(ge[`${x[0]}-${b}`]=!0,this.logger.warn(`key "${s}" for languages "${x.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!!!")),x.forEach(E=>{if(this.isValidLookup(i))return;a=E;const O=[f];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(O,f,E,b,t);else{let w;h&&(w=this.pluralResolver.getSuffix(E,t.count,t));const N=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(t.ordinal&&w.indexOf(j)===0&&O.push(f+w.replace(j,this.options.pluralSeparator)),O.push(f+w),p&&O.push(f+N)),d){const T=`${f}${this.options.contextSeparator||"_"}${t.context}`;O.push(T),h&&(t.ordinal&&w.indexOf(j)===0&&O.push(T+w.replace(j,this.options.pluralSeparator)),O.push(T+w),p&&O.push(T+N))}}let R;for(;R=O.pop();)this.isValidLookup(i)||(n=R,i=this.getResource(E,b,R,t))}))})}),{res:i,usedKey:s,exactUsedKey:n,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,i,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,i,s):this.resourceStore.getResource(e,t,i,s)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!g(e.replace);let s=i?e.replace:e;if(i&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!i){s={...s};for(const n of t)delete s[n]}return s}static hasDefaultValue(e){const t="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&e[i]!==void 0)return!0;return!1}}class me{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=I.create("languageUtils")}getScriptPartFromCode(e){if(e=B(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=B(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(g(e)&&e.indexOf("-")>-1){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.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(i=>{if(t)return;const s=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(i=>{if(t)return;const s=this.getScriptPartFromCode(i);if(this.isSupportedCode(s))return t=s;const n=this.getLanguagePartFromCode(i);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(a=>{if(a===n)return a;if(!(a.indexOf("-")<0&&n.indexOf("-")<0)&&(a.indexOf("-")>0&&n.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===n||a.indexOf(n)===0&&n.length>1))return a})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),g(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){const i=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),s=[],n=a=>{a&&(this.isSupportedCode(a)?s.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return g(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&n(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&n(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&n(this.getLanguagePartFromCode(e))):g(e)&&n(this.formatLanguageCode(e)),i.forEach(a=>{s.indexOf(a)<0&&n(this.formatLanguageCode(a))}),s}}const ye={zero:0,one:1,two:2,few:3,many:4,other:5},xe={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class We{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=I.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const i=B(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:i,type:s});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];let a;try{a=new Intl.PluralRules(i,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),xe;if(!e.match(/-|_/))return xe;const l=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(l,t)}return this.pluralRulesCache[n]=a,a}needsPlural(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,i={}){return this.getSuffixes(e,i).map(s=>`${t}${s}`)}getSuffixes(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?i.resolvedOptions().pluralCategories.sort((s,n)=>ye[s]-ye[n]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t,i={}){const s=this.getRule(e,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,i))}}const Se=(r,e,t,i=".",s=!0)=>{let n=Ve(r,e,t);return!n&&s&&g(t)&&(n=re(r,t,i),n===void 0&&(n=re(e,t,i))),n},te=r=>r.replace(/\$/g,"$$$$");class be{constructor(e={}){this.logger=I.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(t=>t),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:i,useRawValueToEscape:s,prefix:n,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:u,unescapeSuffix:f,unescapePrefix:c,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:d,nestingSuffixEscaped:x,nestingOptionsSeparator:b,maxReplaces:E,alwaysFormat:O}=e.interpolation;this.escape=t!==void 0?t:Ue,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=n?V(n):a||"{{",this.suffix=o?V(o):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=h?V(h):p||V("$t("),this.nestingSuffix=d?V(d):x||V(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=E||1e3,this.alwaysFormat=O!==void 0?O:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,i)=>t?.source===i?(t.lastIndex=0,t):new RegExp(i,"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,i,s){let n,a,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=p=>{if(p.indexOf(this.formatSeparator)<0){const E=Se(t,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(E,void 0,i,{...s,...t,interpolationkey:p}):E}const d=p.split(this.formatSeparator),x=d.shift().trim(),b=d.join(this.formatSeparator).trim();return this.format(Se(t,l,x,this.options.keySeparator,this.options.ignoreJSONStructure),b,i,{...s,...t,interpolationkey:x})};this.resetRegExp();const f=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>te(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?te(this.escape(p)):te(p)}].forEach(p=>{for(o=0;n=p.regex.exec(e);){const d=n[1].trim();if(a=u(d),a===void 0)if(typeof f=="function"){const b=f(e,n,s);a=g(b)?b:""}else if(s&&Object.prototype.hasOwnProperty.call(s,d))a="";else if(c){a=n[0];continue}else this.logger.warn(`missed to pass in variable ${d} for interpolating ${e}`),a="";else!g(a)&&!this.useRawValueToEscape&&(a=ce(a));const x=p.safeValue(a);if(e=e.replace(n[0],x),c?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=n[0].length):p.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,i={}){let s,n,a;const o=(l,u)=>{const f=this.nestingOptionsSeparator;if(l.indexOf(f)<0)return l;const c=l.split(new RegExp(`${V(f)}[ ]*{`));let h=`{${c[1]}`;l=c[0],h=this.interpolate(h,a);const p=h.match(/'/g),d=h.match(/"/g);((p?.length??0)%2===0&&!d||(d?.length??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{a=JSON.parse(h),u&&(a={...u,...a})}catch(x){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,x),`${l}${f}${h}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];a={...i},a=a.replace&&!g(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const u=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(u!==-1&&(l=s[1].slice(u).split(this.formatSeparator).map(f=>f.trim()).filter(Boolean),s[1]=s[1].slice(0,u)),n=t(o.call(this,s[1].trim(),a),a),n&&s[0]===e&&!g(n))return n;g(n)||(n=ce(n)),n||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),n=""),l.length&&(n=l.reduce((f,c)=>this.format(f,c,i.lng,{...i,interpolationkey:s[1].trim()}),n.trim())),e=e.replace(s[0],n),this.regexp.lastIndex=0}return e}}const Ye=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const i=r.split("(");e=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(a=>{if(a){const[o,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();t[f]||(t[f]=u),u==="false"&&(t[f]=!1),u==="true"&&(t[f]=!0),isNaN(u)||(t[f]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},Oe=r=>{const e={};return(t,i,s)=>{let n=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(n={...n,[s.interpolationkey]:void 0});const a=i+JSON.stringify(n);let o=e[a];return o||(o=r(B(i),s),e[a]=o),o(t)}},Ge=r=>(e,t,i)=>r(B(t),i)(e);class Qe{constructor(e={}){this.logger=I.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const i=t.cacheInBuiltFormats?Oe:Ge;this.formats={number:i((s,n)=>{const a=new Intl.NumberFormat(s,{...n});return o=>a.format(o)}),currency:i((s,n)=>{const a=new Intl.NumberFormat(s,{...n,style:"currency"});return o=>a.format(o)}),datetime:i((s,n)=>{const a=new Intl.DateTimeFormat(s,{...n});return o=>a.format(o)}),relativetime:i((s,n)=>{const a=new Intl.RelativeTimeFormat(s,{...n});return o=>a.format(o,n.range||"day")}),list:i((s,n)=>{const a=new Intl.ListFormat(s,{...n});return o=>a.format(o)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Oe(t)}format(e,t,i,s={}){const n=t.split(this.formatSeparator);if(n.length>1&&n[0].indexOf("(")>1&&n[0].indexOf(")")<0&&n.find(o=>o.indexOf(")")>-1)){const o=n.findIndex(l=>l.indexOf(")")>-1);n[0]=[n[0],...n.splice(1,o)].join(this.formatSeparator)}return n.reduce((o,l)=>{const{formatName:u,formatOptions:f}=Ye(l);if(this.formats[u]){let c=o;try{const h=s?.formatParams?.[s.interpolationkey]||{},p=h.locale||h.lng||s.locale||s.lng||i;c=this.formats[u](o,p,{...f,...s,...h})}catch(h){this.logger.warn(h)}return c}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}const qe=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class Ze extends X{constructor(e,t,i,s={}){super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=I.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,s.backend,s)}queueLoad(e,t,i,s){const n={},a={},o={},l={};return e.forEach(u=>{let f=!0;t.forEach(c=>{const h=`${u}|${c}`;!i.reload&&this.store.hasResourceBundle(u,c)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?a[h]===void 0&&(a[h]=!0):(this.state[h]=1,f=!1,a[h]===void 0&&(a[h]=!0),n[h]===void 0&&(n[h]=!0),l[c]===void 0&&(l[c]=!0)))}),f||(o[u]=!0)}),(Object.keys(n).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(n),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,i){const s=e.split("|"),n=s[0],a=s[1];t&&this.emit("failedLoading",n,a,t),!t&&i&&this.store.addResourceBundle(n,a,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);const o={};this.queue.forEach(l=>{Ke(l.loaded,[n],a),qe(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const f=l.loaded[u];f.length&&f.forEach(c=>{o[u][c]===void 0&&(o[u][c]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,t,i,s=0,n=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:i,tried:s,wait:n,callback:a});return}this.readingCalls++;const o=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(u&&f&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,i,s+1,n*2,a)},n);return}a(u,f)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(f=>o(null,f)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,t,o)}prepareLoading(e,t,i={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();g(e)&&(e=this.languageUtils.toResolveHierarchy(e)),g(t)&&(t=[t]);const n=this.queueLoad(e,t,i,s);if(!n.toLoad.length)return n.pending.length||s(),null;n.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e,t=""){const i=e.split("|"),s=i[0],n=i[1];this.read(s,n,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${n} for language ${s} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${n} for language ${s}`,o),this.loaded(e,a,o)})}saveMissing(e,t,i,s,n,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${i}" 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(!(i==null||i==="")){if(this.backend?.create){const l={...a,isUpdate:n},u=this.backend.create.bind(this.backend);if(u.length<6)try{let f;u.length===5?f=u(e,t,i,s,l):f=u(e,t,i,s),f&&typeof f.then=="function"?f.then(c=>o(null,c)).catch(o):o(null,f)}catch(f){o(f)}else u(e,t,i,s,o,l)}!e||!e[0]||this.store.addResource(e[0],t,i,s)}}}const se=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",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:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),g(r[1])&&(e.defaultValue=r[1]),g(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(i=>{e[i]=t[i]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Le=r=>(g(r.ns)&&(r.ns=[r.ns]),g(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),g(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs?.indexOf?.("cimode")<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r),G=()=>{},Xe=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})},Ee="__i18next_supportNoticeShown",et=()=>typeof globalThis<"u"&&!!globalThis[Ee],tt=()=>{typeof globalThis<"u"&&(globalThis[Ee]=!0)},st=r=>!!(r?.modules?.backend?.name?.indexOf("Locize")>0||r?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||r?.options?.backend?.backends&&r.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||r?.options?.backend?.projectId||r?.options?.backend?.backendOptions&&r.options.backend.backendOptions.some(e=>e?.projectId));class _ extends X{constructor(e={},t){if(super(),this.options=Le(e),this.services={},this.logger=I,this.modules={external:[]},Xe(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&&(g(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=se();this.options={...i,...this.options,...Le(e)},this.options.interpolation={...i.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=i.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!st(this)&&!et()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),tt());const s=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?I.init(s(this.modules.logger),this.options):I.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=Qe;const f=new me(this.options);this.store=new pe(this.options.resources,this.options);const c=this.services;c.logger=I,c.resourceStore=this.store,c.languageUtils=f,c.pluralResolver=new We(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(c.formatter=s(u),c.formatter.init&&c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new be(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new Ze(s(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",(p,...d)=>{this.emit(p,...d)}),this.modules.languageDetector&&(c.languageDetector=s(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=s(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new Z(this.services,this.options),this.translator.on("*",(p,...d)=>{this.emit(p,...d)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,t||(t=G),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[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(u=>{this[u]=(...f)=>this.store[u](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...f)=>(this.store[u](...f),this)});const o=H(),l=()=>{const u=(f,c)=>{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),o.resolve(c),t(f,c)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(e,t=G){let i=t;const s=g(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const n=[],a=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&n.indexOf(u)<0&&n.push(u)})};s?a(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload?.forEach?.(o=>a(o)),this.services.backendConnector.load(n,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(o)})}else i(null)}reloadResources(e,t,i){const s=H();return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),i||(i=G),this.services.backendConnector.reload(e,t,n=>{s.resolve(),i(n)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new 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"&&Pe.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"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){const i=this.languages[t];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const i=H();this.emit("languageChanging",e);const s=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},n=(o,l)=>{l?this.isLanguageChangingTo===e&&(s(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve((...u)=>this.t(...u)),t&&t(o,(...u)=>this.t(...u))},a=o=>{!e&&!o&&this.services.languageDetector&&(o=[]);const l=g(o)?o:o&&o[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(g(o)?[o]:o);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector?.cacheUserLanguage?.(u)),this.loadResources(u,f=>{n(f,u)})};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),i}getFixedT(e,t,i){const s=(n,a,...o)=>{let l;typeof a!="object"?l=this.options.overloadTranslationOptionHandler([n,a].concat(o)):l={...a},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||i||s.keyPrefix);const u=this.options.keySeparator||".";let f;return l.keyPrefix&&Array.isArray(n)?f=n.map(c=>(typeof c=="function"&&(c=ae(c,{...this.options,...a})),`${l.keyPrefix}${u}${c}`)):(typeof n=="function"&&(n=ae(n,{...this.options,...a})),f=l.keyPrefix?`${l.keyPrefix}${u}${n}`:n),this.t(f,l)};return g(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=i,s}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;const i=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,n=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const a=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(i,e)&&(!s||a(n,e)))}loadNamespaces(e,t){const i=H();return this.options.ns?(g(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{i.resolve(),t&&t(s)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){const i=H();g(e)&&(e=[e]);const s=this.options.preload||[],n=e.filter(a=>s.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return n.length?(this.options.preload=s.concat(n),this.loadResources(a=>{i.resolve(),t&&t(a)}),i):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const s=new Intl.Locale(e);if(s&&s.getTextInfo){const n=s.getTextInfo();if(n&&n.direction)return n.direction}}catch{}const 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"],i=this.services?.languageUtils||new me(se());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const i=new _(e,t);return i.createInstance=_.createInstance,i}cloneInstance(e={},t=G){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},n=new _(s);if((e.debug!==void 0||e.prefix!==void 0)&&(n.logger=n.logger.clone(e)),["store","services","language"].forEach(o=>{n[o]=this[o]}),n.services={...this.services},n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},i){const o=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((f,c)=>(f[c]={...l[u][c]},f),l[u]),l),{});n.store=new pe(o,s),n.services.resourceStore=n.store}if(e.interpolation){const l={...se().interpolation,...this.options.interpolation,...e.interpolation},u={...s,interpolation:l};n.services.interpolator=new be(u)}return n.translator=new Z(n.services,s),n.translator.on("*",(o,...l)=>{n.emit(o,...l)}),n.init(s,t),n.translator.options=s,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const $=_.createInstance();$.createInstance;$.dir;$.init;$.loadResources;$.reloadResources;$.use;$.changeLanguage;$.getFixedT;$.t;$.exists;$.setDefaultNamespace;$.hasLoadedNamespace;$.loadNamespaces;$.loadLanguages;const it=(r,e,t,i)=>{const s=[t,{code:e,...i||{}}];if(r?.services?.logger?.forward)return r.services.logger.forward(s,"warn","react-i18next::",!0);A(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),r?.services?.logger?.warn?r.services.logger.warn(...s):console?.warn&&console.warn(...s)},we={},ke=(r,e,t,i)=>{A(t)&&we[t]||(A(t)&&(we[t]=new Date),it(r,e,t,i))},je=(r,e)=>()=>{if(r.isInitialized)e();else{const t=()=>{setTimeout(()=>{r.off("initialized",t)},0),e()};r.on("initialized",t)}},oe=(r,e,t)=>{r.loadNamespaces(e,je(r,t))},ve=(r,e,t,i)=>{if(A(t)&&(t=[t]),r.options.preload&&r.options.preload.indexOf(e)>-1)return oe(r,t,i);t.forEach(s=>{r.options.ns.indexOf(s)<0&&r.options.ns.push(s)}),r.loadLanguages(e,je(r,i))},nt=(r,e,t={})=>!e.languages||!e.languages.length?(ke(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(r,{lng:t.lng,precheck:(i,s)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,r))return!1}}),A=r=>typeof r=="string",rt=r=>typeof r=="object"&&r!==null,at=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ot={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},lt=r=>ot[r],ut=r=>r.replace(at,lt);let ct={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ut,transDefaultProps:void 0};const ft=()=>ct;let ht;const dt=()=>ht,Fe=C.createContext();class pt{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var ie={exports:{}},ne={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* use-sync-external-store-shim.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Ce;function gt(){if(Ce)return ne;Ce=1;var r=Ie();function e(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var t=typeof Object.is=="function"?Object.is:e,i=r.useState,s=r.useEffect,n=r.useLayoutEffect,a=r.useDebugValue;function o(c,h){var p=h(),d=i({inst:{value:p,getSnapshot:h}}),x=d[0].inst,b=d[1];return n(function(){x.value=p,x.getSnapshot=h,l(x)&&b({inst:x})},[c,p,h]),s(function(){return l(x)&&b({inst:x}),c(function(){l(x)&&b({inst:x})})},[c]),a(p),p}function l(c){var h=c.getSnapshot;c=c.value;try{var p=h();return!t(c,p)}catch{return!0}}function u(c,h){return h()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return ne.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:f,ne}var Re;function mt(){return Re||(Re=1,ie.exports=gt()),ie.exports}var yt=mt();const xt=(r,e)=>A(e)?e:rt(e)&&A(e.defaultValue)?e.defaultValue:Array.isArray(r)?r[r.length-1]:r,St={t:xt,ready:!1},bt=()=>()=>{},Lt=(r,e={})=>{const{i18n:t}=e,{i18n:i,defaultNS:s}=C.useContext(Fe)||{},n=t||i||dt();n&&!n.reportNamespaces&&(n.reportNamespaces=new pt),n||ke(n,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const a=C.useMemo(()=>({...ft(),...n?.options?.react,...e}),[n,e]),{useSuspense:o,keyPrefix:l}=a,u=s||n?.options?.defaultNS,f=A(u)?[u]:u||["translation"],c=C.useMemo(()=>f,f);n?.reportNamespaces?.addUsedNamespaces?.(c);const h=C.useRef(0),p=C.useCallback(y=>{if(!n)return bt;const{bindI18n:m,bindI18nStore:S}=a,L=()=>{h.current+=1,y()};return m&&n.on(m,L),S&&n.store.on(S,L),()=>{m&&m.split(" ").forEach(v=>n.off(v,L)),S&&S.split(" ").forEach(v=>n.store.off(v,L))}},[n,a]),d=C.useRef(),x=C.useCallback(()=>{if(!n)return St;const y=!!(n.isInitialized||n.initializedStoreOnce)&&c.every(W=>nt(W,n,a)),m=e.lng||n.language,S=h.current,L=d.current;if(L&&L.ready===y&&L.lng===m&&L.keyPrefix===l&&L.revision===S)return L;const P={t:n.getFixedT(m,a.nsMode==="fallback"?c:c[0],l),ready:y,lng:m,keyPrefix:l,revision:S};return d.current=P,P},[n,c,l,a,e.lng]),[b,E]=C.useState(0),{t:O,ready:R}=yt.useSyncExternalStore(p,x,x);C.useEffect(()=>{if(n&&!R&&!o){const y=()=>E(m=>m+1);e.lng?ve(n,e.lng,c,y):oe(n,c,y)}},[n,e.lng,c,R,o,b]);const w=n||{},N=C.useRef(null),j=C.useRef(),T=y=>{const m=Object.getOwnPropertyDescriptors(y);m.__original&&delete m.__original;const S=Object.create(Object.getPrototypeOf(y),m);if(!Object.prototype.hasOwnProperty.call(S,"__original"))try{Object.defineProperty(S,"__original",{value:y,writable:!1,enumerable:!1,configurable:!1})}catch{}return S},J=C.useMemo(()=>{const y=w,m=y?.language;let S=y;y&&(N.current&&N.current.__original===y?j.current!==m?(S=T(y),N.current=S,j.current=m):S=N.current:(S=T(y),N.current=S,j.current=m));const L=[O,S,R];return L.t=O,L.i18n=S,L.ready=R,L},[O,w,R,w.resolvedLanguage,w.language,w.languages]);if(n&&o&&!R)throw new Promise(y=>{const m=()=>y();e.lng?ve(n,e.lng,c,m):oe(n,c,m)});return J};function wt({i18n:r,defaultNS:e,children:t}){const i=C.useMemo(()=>({i18n:r,defaultNS:e}),[r,e]);return C.createElement(Fe.Provider,{value:i},t)}export{wt as I,$ as i,mt as r,yt as s,Lt as u};
|