PageSourceSearch

https://onepe.ai/build/assets/useTranslation-mV-gvqqz.js

js onepe.ai collected 2026-10-05 14:38:38 UTC 4,943 bytes, 9 lines download raw bytes

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

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.