import{r as d,e as $,j as D}from"./markdown-9_JKOUHQ.js";import{I as J,J as X,c as Y}from"./index-Z_QI94Zg.js";const B=(e,t,r,u)=>{const f=[r,{code:t,...u||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(f,"warn","react-i18next::",!0);b(f[0])&&(f[0]=`react-i18next:: ${f[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...f):console?.warn&&console.warn(...f)},P={},A=(e,t,r,u)=>{b(r)&&P[r]||(b(r)&&(P[r]=new Date),B(e,t,r,u))},F=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},j=(e,t,r)=>{e.loadNamespaces(t,F(e,r))},U=(e,t,r,u)=>{if(b(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return j(e,r,u);r.forEach(f=>{e.options.ns.indexOf(f)<0&&e.options.ns.push(f)}),e.loadLanguages(t,F(e,u))},H=(e,t,r={})=>!t.languages||!t.languages.length?(A(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(u,f)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&u.services.backendConnector.backend&&u.isLanguageChangingTo&&!f(u.isLanguageChangingTo,e))return!1}}),b=e=>typeof e=="string",K=e=>typeof e=="object"&&e!==null,Q=d.createContext();class V{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var O={exports:{}},L={};var z;function Z(){if(z)return L;z=1;var e=$();function t(a,l){return a===l&&(a!==0||1/a===1/l)||a!==a&&l!==l}var r=typeof Object.is=="function"?Object.is:t,u=e.useState,f=e.useEffect,n=e.useLayoutEffect,m=e.useDebugValue;function x(a,l){var p=l(),h=u({inst:{value:p,getSnapshot:l}}),g=h[0].inst,w=h[1];return n(function(){g.value=p,g.getSnapshot=l,S(g)&&w({inst:g})},[a,p,l]),f(function(){return S(g)&&w({inst:g}),a(function(){S(g)&&w({inst:g})})},[a]),m(p),p}function S(a){var l=a.getSnapshot;a=a.value;try{var p=l();return!r(a,p)}catch{return!0}}function v(a,l){return l()}var R=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:x;return L.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:R,L}var q;function ee(){return q||(q=1,O.exports=Z()),O.exports}var te=ee();const ne=(e,t)=>b(t)?t:K(t)&&b(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,re={t:ne,ready:!1},ae=()=>()=>{},ce=(e,t={})=>{const{i18n:r}=t,{i18n:u,defaultNS:f}=d.useContext(Q)||{},n=r||u||X();n&&!n.reportNamespaces&&(n.reportNamespaces=new V),n||A(n,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const m=d.useMemo(()=>({...J(),...n?.options?.react,...t}),[n,t]),{useSuspense:x,keyPrefix:S}=m,v=f||n?.options?.defaultNS,R=b(v)?[v]:v||["translation"],a=d.useMemo(()=>R,R);n?.reportNamespaces?.addUsedNamespaces?.(a);const l=d.useRef(0),p=d.useCallback(o=>{if(!n)return ae;const{bindI18n:s,bindI18nStore:i}=m,c=()=>{l.current+=1,o()};return s&&n.on(s,c),i&&n.store.on(i,c),()=>{s&&s.split(" ").forEach(C=>n.off(C,c)),i&&i.split(" ").forEach(C=>n.store.off(C,c))}},[n,m]),h=d.useRef(),g=d.useCallback(()=>{if(!n)return re;const o=!!(n.isInitialized||n.initializedStoreOnce)&&a.every(W=>H(W,n,m)),s=t.lng||n.language,i=l.current,c=h.current;if(c&&c.ready===o&&c.lng===s&&c.keyPrefix===S&&c.revision===i)return c;const k={t:n.getFixedT(s,m.nsMode==="fallback"?a:a[0],S),ready:o,lng:s,keyPrefix:S,revision:i};return h.current=k,k},[n,a,S,m,t.lng]),[w,M]=d.useState(0),{t:_,ready:y}=te.useSyncExternalStore(p,g,g);d.useEffect(()=>{if(n&&!y&&!x){const o=()=>M(s=>s+1);t.lng?U(n,t.lng,a,o):j(n,a,o)}},[n,t.lng,a,y,x,w]);const N=n||{},E=d.useRef(null),I=d.useRef(),T=o=>{const s=Object.getOwnPropertyDescriptors(o);s.__original&&delete s.__original;const i=Object.create(Object.getPrototypeOf(o),s);if(!Object.prototype.hasOwnProperty.call(i,"__original"))try{Object.defineProperty(i,"__original",{value:o,writable:!1,enumerable:!1,configurable:!1})}catch{}return i},G=d.useMemo(()=>{const o=N,s=o?.language;let i=o;o&&(E.current&&E.current.__original===o?I.current!==s?(i=T(o),E.current=i,I.current=s):i=E.current:(i=T(o),E.current=i,I.current=s));const c=[_,i,y];return c.t=_,c.i18n=i,c.ready=y,c},[_,N,y,N.resolvedLanguage,N.language,N.languages]);if(n&&x&&!y)throw new Promise(o=>{const s=()=>o();t.lng?U(n,t.lng,a,s):j(n,a,s)});return G},se=d.forwardRef(({className:e,type:t,...r},u)=>D.jsx("input",{type:t,className:Y("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:u,...r}));se.displayName="Input";export{se as I,ee as r,te as s,ce as u};
