var Yt=Object.defineProperty;var Jt=(n,e,t)=>e in n?Yt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var y=(n,e,t)=>Jt(n,typeof e!="symbol"?e+"":e,t);import{u as I,i as Qt,j as r,H as Xt,F as Zt,c as J,a as es,b as ts,d as ss,e as ns,f as is,g as rs,h as as,k as os,z as w,l as Ee,m as fe,S as Qe,n as gt,o as ls,P as be,p as ee,q as cs,r as us,s as ds,t as Be,v as ve,w as N,x as Ne,y as B,A as z,L as ne,B as H,C as _,D as q,E as ze,G as Le,I as Oe,J as Pe,K as ce,M as He,N as hs,O as ye,Q as ps,R as ms,T as fs,U as gs,V as xs,W as bs,X as vs,Y as de,Z as ys,_ as js,$ as ie,a0 as ws,a1 as xt,a2 as Ss,a3 as bt,a4 as ks,a5 as ue,a6 as Ke,a7 as Ns,a8 as vt,a9 as yt,aa as _s,ab as Xe,ac as Rs,ad as jt,ae as Cs,af as Ts,ag as Es,ah as Ls,ai as Os,aj as Ps,ak as Fs}from"./ui-library-CdSp3bSD.js";import{f as Is,a as b,O as As,e as ae,u as $s,g as Ue,L as Ze,h as Ds,i as Ms}from"./react-vendor-CE_Ks92h.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(i){if(i.ep)return;i.ep=!0;const a=t(i);fetch(i.href,a)}})();var Se={},et;function Vs(){if(et)return Se;et=1;var n=Is();return Se.createRoot=n.createRoot,Se.hydrateRoot=n.hydrateRoot,Se}var Bs=Vs();const S=n=>typeof n=="string",pe=()=>{let n,e;const t=new Promise((s,i)=>{n=s,e=i});return t.resolve=n,t.reject=e,t},tt=n=>n==null?"":""+n,zs=(n,e,t)=>{n.forEach(s=>{e[s]&&(t[s]=e[s])})},Hs=/###/g,st=n=>n&&n.indexOf("###")>-1?n.replace(Hs,"."):n,nt=n=>!n||S(n),me=(n,e,t)=>{const s=S(e)?e.split("."):e;let i=0;for(;i{const{obj:s,k:i}=me(n,e,Object);if(s!==void 0||e.length===1){s[i]=t;return}let a=e[e.length-1],o=e.slice(0,e.length-1),l=me(n,o,Object);for(;l.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),l=me(n,o,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${a}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${a}`]=t},Ks=(n,e,t,s)=>{const{obj:i,k:a}=me(n,e,Object);i[a]=i[a]||[],i[a].push(t)},_e=(n,e)=>{const{obj:t,k:s}=me(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,s))return t[s]},Us=(n,e,t)=>{const s=_e(n,t);return s!==void 0?s:_e(e,t)},wt=(n,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in n?S(n[s])||n[s]instanceof String||S(e[s])||e[s]instanceof String?t&&(n[s]=e[s]):wt(n[s],e[s],t):n[s]=e[s]);return n},oe=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Gs={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Ws=n=>S(n)?n.replace(/[&<>"'\/]/g,e=>Gs[e]):n;class qs{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 s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const Ys=[" ",",","?","!",";"],Js=new qs(20),Qs=(n,e,t)=>{e=e||"",t=t||"";const s=Ys.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(s.length===0)return!0;const i=Js.getRegExp(`(${s.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(n);if(!a){const o=n.indexOf(t);o>0&&!i.test(n.substring(0,o))&&(a=!0)}return a},De=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const s=e.split(t);let i=n;for(let a=0;a-1&&cn==null?void 0:n.replace("_","-"),Xs={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){var t,s;(s=(t=console==null?void 0:console[n])==null?void 0:t.apply)==null||s.call(t,console,e)}};class Ce{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Xs,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),s=0;s{this.observers[s]||(this.observers[s]=new Map);const i=this.observers[s].get(t)||0;this.observers[s].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i{let[l,c]=o;for(let u=0;u{let[l,c]=o;for(let u=0;u1&&arguments[1]!==void 0?arguments[1]:{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,s){var u,h;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.indexOf(".")>-1?l=e.split("."):(l=[e,t],s&&(Array.isArray(s)?l.push(...s):S(s)&&a?l.push(...s.split(a)):l.push(s)));const c=_e(this.data,l);return!c&&!t&&!s&&e.indexOf(".")>-1&&(e=l[0],t=l[1],s=l.slice(2).join(".")),c||!o||!S(s)?c:De((h=(u=this.data)==null?void 0:u[e])==null?void 0:h[t],s,a)}addResource(e,t,s,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[e,t];s&&(l=l.concat(o?s.split(o):s)),e.indexOf(".")>-1&&(l=e.split("."),i=t,t=l[1]),this.addNamespaces(t),it(this.data,l,i),a.silent||this.emit("added",e,t,s,i)}addResources(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in s)(S(s[a])||Array.isArray(s[a]))&&this.addResource(e,t,a,s[a],{silent:!0});i.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[e,t];e.indexOf(".")>-1&&(l=e.split("."),i=s,s=t,t=l[1]),this.addNamespaces(t);let c=_e(this.data,l)||{};o.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?wt(c,s,a):c={...c,...s},it(this.data,l,c),o.silent||this.emit("added",e,t,s)}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(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var St={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,s,i){return n.forEach(a=>{var o;e=((o=this.processors[a])==null?void 0:o.process(e,t,s,i))??e}),e}};const at={},ot=n=>!S(n)&&typeof n!="boolean"&&typeof n!="number";class Te extends Fe{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),zs(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Y.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const s=this.resolve(e,t);return(s==null?void 0:s.res)!==void 0}extractFromKey(e,t){let s=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const o=s&&e.indexOf(s)>-1,l=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Qs(e,s,i);if(o&&!l){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:S(a)?[a]:a};const u=e.split(s);(s!==i||s===i&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(i)}return{key:e,namespaces:S(a)?[a]:a}}translate(e,t,s){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,a=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],t),c=l[l.length-1],u=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode"){if(h){const P=t.nsSeparator||this.options.nsSeparator;return i?{res:`${c}${P}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(t)}:`${c}${P}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(t)}:o}const m=this.resolve(e,t);let d=m==null?void 0:m.res;const f=(m==null?void 0:m.usedKey)||o,p=(m==null?void 0:m.exactUsedKey)||o,g=["[object Number]","[object Function]","[object RegExp]"],x=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,v=t.count!==void 0&&!S(t.count),k=Te.hasDefaultValue(t),R=v?this.pluralResolver.getSuffix(u,t.count,t):"",O=t.ordinal&&v?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",E=v&&!t.ordinal&&t.count===0,T=E&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${R}`]||t[`defaultValue${O}`]||t.defaultValue;let C=d;j&&!d&&k&&(C=T);const K=ot(C),Q=Object.prototype.toString.apply(C);if(j&&C&&K&&g.indexOf(Q)<0&&!(S(x)&&Array.isArray(C))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,C,{...t,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(m.res=P,m.usedParams=this.getUsedParamsDetails(t),m):P}if(a){const P=Array.isArray(C),$=P?[]:{},je=P?p:f;for(const U in C)if(Object.prototype.hasOwnProperty.call(C,U)){const G=`${je}${a}${U}`;k&&!d?$[U]=this.translate(G,{...t,defaultValue:ot(T)?T[U]:void 0,joinArrays:!1,ns:l}):$[U]=this.translate(G,{...t,joinArrays:!1,ns:l}),$[U]===G&&($[U]=C[U])}d=$}}else if(j&&S(x)&&Array.isArray(d))d=d.join(x),d&&(d=this.extendTranslation(d,e,t,s));else{let P=!1,$=!1;!this.isValidLookup(d)&&k&&(P=!0,d=T),this.isValidLookup(d)||($=!0,d=o);const U=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&$?void 0:d,G=k&&T!==d&&this.options.updateMissing;if($||P||G){if(this.logger.log(G?"updateKey":"missingKey",u,c,o,G?T:d),a){const M=this.resolve(o,{...t,keySeparator:!1});M&&M.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 D=[];const we=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&we&&we[0])for(let M=0;M{var Je;const Ye=k&&he!==d?he:U;this.options.missingKeyHandler?this.options.missingKeyHandler(M,c,re,Ye,G,t):(Je=this.backendConnector)!=null&&Je.saveMissing&&this.backendConnector.saveMissing(M,c,re,Ye,G,t),this.emit("missingKey",M,c,re,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?D.forEach(M=>{const re=this.pluralResolver.getSuffixes(M,t);E&&t[`defaultValue${this.options.pluralSeparator}zero`]&&re.indexOf(`${this.options.pluralSeparator}zero`)<0&&re.push(`${this.options.pluralSeparator}zero`),re.forEach(he=>{qe([M],o+he,t[`defaultValue${he}`]||T)})}):qe(D,o,T))}d=this.extendTranslation(d,e,t,m,s),$&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${c}:${o}`),($||P)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${o}`:o,P?d:void 0))}return i?(m.res=d,m.usedParams=this.getUsedParamsDetails(t),m):d}extendTranslation(e,t,s,i,a){var u,h;var o=this;if((u=this.i18nFormat)!=null&&u.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const m=S(e)&&(((h=s==null?void 0:s.interpolation)==null?void 0:h.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(m){const p=e.match(this.interpolator.nestingRegexp);d=p&&p.length}let f=s.replace&&!S(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,s.lng||this.language||i.usedLng,s),m){const p=e.match(this.interpolator.nestingRegexp),g=p&&p.length;d1&&arguments[1]!==void 0?arguments[1]:{},s,i,a,o,l;return S(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(s))return;const u=this.extractFromKey(c,t),h=u.key;i=h;let m=u.namespaces;this.options.fallbackNS&&(m=m.concat(this.options.fallbackNS));const d=t.count!==void 0&&!S(t.count),f=d&&!t.ordinal&&t.count===0,p=t.context!==void 0&&(S(t.context)||typeof t.context=="number")&&t.context!=="",g=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);m.forEach(x=>{var j,v;this.isValidLookup(s)||(l=x,!at[`${g[0]}-${x}`]&&((j=this.utils)!=null&&j.hasLoadedNamespace)&&!((v=this.utils)!=null&&v.hasLoadedNamespace(l))&&(at[`${g[0]}-${x}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${l}" 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!!!")),g.forEach(k=>{var E;if(this.isValidLookup(s))return;o=k;const R=[h];if((E=this.i18nFormat)!=null&&E.addLookupKeys)this.i18nFormat.addLookupKeys(R,h,k,x,t);else{let T;d&&(T=this.pluralResolver.getSuffix(k,t.count,t));const C=`${this.options.pluralSeparator}zero`,K=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(R.push(h+T),t.ordinal&&T.indexOf(K)===0&&R.push(h+T.replace(K,this.options.pluralSeparator)),f&&R.push(h+C)),p){const Q=`${h}${this.options.contextSeparator}${t.context}`;R.push(Q),d&&(R.push(Q+T),t.ordinal&&T.indexOf(K)===0&&R.push(Q+T.replace(K,this.options.pluralSeparator)),f&&R.push(Q+C))}}let O;for(;O=R.pop();)this.isValidLookup(s)||(a=O,s=this.getResource(k,x,O,t))}))})}),{res:s,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,s){var a;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!S(e.replace);let i=s?e.replace:e;if(s&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!s){i={...i};for(const a of t)delete i[a]}return i}static hasDefaultValue(e){const t="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t===s.substring(0,t.length)&&e[s]!==void 0)return!0;return!1}}class lt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Y.create("languageUtils")}getScriptPartFromCode(e){if(e=Re(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=Re(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(S(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(s=>{if(t)return;const i=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(s=>{if(t)return;const i=this.getLanguagePartFromCode(s);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.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)),S(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return S(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):S(e)&&a(this.formatLanguageCode(e)),s.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}const ct={zero:0,one:1,two:2,few:3,many:4,other:5},ut={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Zs{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Y.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=Re(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:s,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(s,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),ut;if(!e.match(/-|_/))return ut;const c=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(c,t)}return this.pluralRulesCache[a]=o,o}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),(s==null?void 0:s.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,s).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?s.resolvedOptions().pluralCategories.sort((i,a)=>ct[i]-ct[a]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,s))}}const dt=function(n,e,t){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=Us(n,e,t);return!a&&i&&S(t)&&(a=De(n,t,s),a===void 0&&(a=De(e,t,s))),a},Ae=n=>n.replace(/\$/g,"$$$$");class en{constructor(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Y.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(s=>s),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:i,prefix:a,prefixEscaped:o,suffix:l,suffixEscaped:c,formatSeparator:u,unescapeSuffix:h,unescapePrefix:m,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:x,maxReplaces:j,alwaysFormat:v}=e.interpolation;this.escape=t!==void 0?t:Ws,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?oe(a):o||"{{",this.suffix=l?oe(l):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=h?"":m||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=d?oe(d):f||oe("$t("),this.nestingSuffix=p?oe(p):g||oe(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=j||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,s)=>(t==null?void 0:t.source)===s?(t.lastIndex=0,t):new RegExp(s,"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,s,i){var f;let a,o,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=p=>{if(p.indexOf(this.formatSeparator)<0){const v=dt(t,c,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,s,{...i,...t,interpolationkey:p}):v}const g=p.split(this.formatSeparator),x=g.shift().trim(),j=g.join(this.formatSeparator).trim();return this.format(dt(t,c,x,this.options.keySeparator,this.options.ignoreJSONStructure),j,s,{...i,...t,interpolationkey:x})};this.resetRegExp();const h=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,m=((f=i==null?void 0:i.interpolation)==null?void 0:f.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>Ae(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?Ae(this.escape(p)):Ae(p)}].forEach(p=>{for(l=0;a=p.regex.exec(e);){const g=a[1].trim();if(o=u(g),o===void 0)if(typeof h=="function"){const j=h(e,a,i);o=S(j)?j:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))o="";else if(m){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),o="";else!S(o)&&!this.useRawValueToEscape&&(o=tt(o));const x=p.safeValue(o);if(e=e.replace(a[0],x),m?(p.regex.lastIndex+=o.length,p.regex.lastIndex-=a[0].length):p.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,a,o;const l=(c,u)=>{const h=this.nestingOptionsSeparator;if(c.indexOf(h)<0)return c;const m=c.split(new RegExp(`${h}[ ]*{`));let d=`{${m[1]}`;c=m[0],d=this.interpolate(d,o);const f=d.match(/'/g),p=d.match(/"/g);(((f==null?void 0:f.length)??0)%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),u&&(o={...u,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,g),`${c}${h}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,c};for(;i=this.nestingRegexp.exec(e);){let c=[];o={...s},o=o.replace&&!S(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const h=i[1].split(this.formatSeparator).map(m=>m.trim());i[1]=h.shift(),c=h,u=!0}if(a=t(l.call(this,i[1].trim(),o),o),a&&i[0]===e&&!S(a))return a;S(a)||(a=tt(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),a=""),u&&(a=c.reduce((h,m)=>this.format(h,m,s.lng,{...s,interpolationkey:i[1].trim()}),a.trim())),e=e.replace(i[0],a),this.regexp.lastIndex=0}return e}}const tn=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const s=n.split("(");e=s[0].toLowerCase().trim();const i=s[1].substring(0,s[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(o=>{if(o){const[l,...c]=o.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),h=l.trim();t[h]||(t[h]=u),u==="false"&&(t[h]=!1),u==="true"&&(t[h]=!0),isNaN(u)||(t[h]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},le=n=>{const e={};return(t,s,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const o=s+JSON.stringify(a);let l=e[o];return l||(l=n(Re(s),i),e[o]=l),l(t)}};class sn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Y.create("formatter"),this.options=e,this.formats={number:le((t,s)=>{const i=new Intl.NumberFormat(t,{...s});return a=>i.format(a)}),currency:le((t,s)=>{const i=new Intl.NumberFormat(t,{...s,style:"currency"});return a=>i.format(a)}),datetime:le((t,s)=>{const i=new Intl.DateTimeFormat(t,{...s});return a=>i.format(a)}),relativetime:le((t,s)=>{const i=new Intl.RelativeTimeFormat(t,{...s});return a=>i.format(a,s.range||"day")}),list:le((t,s)=>{const i=new Intl.ListFormat(t,{...s});return a=>i.format(a)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=le(t)}format(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(l=>l.indexOf(")")>-1)){const l=a.findIndex(c=>c.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,l)].join(this.formatSeparator)}return a.reduce((l,c)=>{var m;const{formatName:u,formatOptions:h}=tn(c);if(this.formats[u]){let d=l;try{const f=((m=i==null?void 0:i.formatParams)==null?void 0:m[i.interpolationkey])||{},p=f.locale||f.lng||i.locale||i.lng||s;d=this.formats[u](l,p,{...h,...i,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return l},e)}}const nn=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class rn extends Fe{constructor(e,t,s){var a,o;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=Y.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(o=(a=this.backend)==null?void 0:a.init)==null||o.call(a,s,i.backend,i)}queueLoad(e,t,s,i){const a={},o={},l={},c={};return e.forEach(u=>{let h=!0;t.forEach(m=>{const d=`${u}|${m}`;!s.reload&&this.store.hasResourceBundle(u,m)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,h=!1,o[d]===void 0&&(o[d]=!0),a[d]===void 0&&(a[d]=!0),c[m]===void 0&&(c[m]=!0)))}),h||(l[u]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(c)}}loaded(e,t,s){const i=e.split("|"),a=i[0],o=i[1];t&&this.emit("failedLoading",a,o,t),!t&&s&&this.store.addResourceBundle(a,o,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const l={};this.queue.forEach(c=>{Ks(c.loaded,[a],o),nn(c,e),t&&c.errors.push(t),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{l[u]||(l[u]={});const h=c.loaded[u];h.length&&h.forEach(m=>{l[u][m]===void 0&&(l[u][m]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(c=>!c.done)}read(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:a,callback:o});return}this.readingCalls++;const l=(u,h)=>{if(this.readingCalls--,this.waitingReads.length>0){const m=this.waitingReads.shift();this.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.callback)}if(u&&h&&i{this.read.call(this,e,t,s,i+1,a*2,o)},a);return}o(u,h)},c=this.backend[s].bind(this.backend);if(c.length===2){try{const u=c(e,t);u&&typeof u.then=="function"?u.then(h=>l(null,h)).catch(l):l(null,u)}catch(u){l(u)}return}return c(e,t,l)}prepareLoading(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();S(e)&&(e=this.languageUtils.toResolveHierarchy(e)),S(t)&&(t=[t]);const a=this.queueLoad(e,t,s,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const s=e.split("|"),i=s[0],a=s[1];this.read(i,a,"read",void 0,void 0,(o,l)=>{o&&this.logger.warn(`${t}loading namespace ${a} for language ${i} failed`,o),!o&&l&&this.logger.log(`${t}loaded namespace ${a} for language ${i}`,l),this.loaded(e,o,l)})}saveMissing(e,t,s,i,a){var c,u,h,m,d;let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((u=(c=this.services)==null?void 0:c.utils)!=null&&u.hasLoadedNamespace&&!((m=(h=this.services)==null?void 0:h.utils)!=null&&m.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${s}" 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(!(s==null||s==="")){if((d=this.backend)!=null&&d.create){const f={...o,isUpdate:a},p=this.backend.create.bind(this.backend);if(p.length<6)try{let g;p.length===5?g=p(e,t,s,i,f):g=p(e,t,s,i),g&&typeof g.then=="function"?g.then(x=>l(null,x)).catch(l):l(null,g)}catch(g){l(g)}else p(e,t,s,i,l,f)}!e||!e[0]||this.store.addResource(e[0],t,s,i)}}}const ht=()=>({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:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),S(n[1])&&(e.defaultValue=n[1]),S(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(s=>{e[s]=t[s]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),pt=n=>{var e,t;return S(n.ns)&&(n.ns=[n.ns]),S(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),S(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),((t=(e=n.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n},ke=()=>{},an=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class ge extends Fe{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=pt(e),this.services={},this.logger=Y,this.modules={external:[]},an(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(s=t,t={}),t.defaultNS==null&&t.ns&&(S(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=ht();this.options={...i,...this.options,...pt(t)},this.options.interpolation={...i.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const a=h=>h?typeof h=="function"?new h:h:null;if(!this.options.isClone){this.modules.logger?Y.init(a(this.modules.logger),this.options):Y.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=sn;const m=new lt(this.options);this.store=new rt(this.options.resources,this.options);const d=this.services;d.logger=Y,d.resourceStore=this.store,d.languageUtils=m,d.pluralResolver=new Zs(m,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),h&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(d.formatter=a(h),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new en(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new rn(a(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(f){for(var p=arguments.length,g=new Array(p>1?p-1:0),x=1;x1?p-1:0),x=1;x{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,s||(s=ke),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[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(h=>{this[h]=function(){return e.store[h](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=function(){return e.store[h](...arguments),e}});const c=pe(),u=()=>{const h=(m,d)=>{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),c.resolve(d),s(m,d)};if(this.languages&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),c}loadResources(e){var a,o;let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ke;const i=S(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const l=[],c=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(m=>{m!=="cimode"&&l.indexOf(m)<0&&l.push(m)})};i?c(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(h=>c(h)),(o=(a=this.options.preload)==null?void 0:a.forEach)==null||o.call(a,u=>c(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(u)})}else s(null)}reloadResources(e,t,s){const i=pe();return typeof e=="function"&&(s=e,e=void 0),typeof t=="function"&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=ke),this.services.backendConnector.reload(e,t,a=>{i.resolve(),s(a)}),i}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"&&St.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-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}changeLanguage(e,t){var s=this;this.isLanguageChangingTo=e;const i=pe();this.emit("languageChanging",e);const a=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},o=(c,u)=>{u?(a(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return s.t(...arguments)}),t&&t(c,function(){return s.t(...arguments)})},l=c=>{var h,m;!e&&!c&&this.services.languageDetector&&(c=[]);const u=S(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||a(u),this.translator.language||this.translator.changeLanguage(u),(m=(h=this.services.languageDetector)==null?void 0:h.cacheUserLanguage)==null||m.call(h,u)),this.loadResources(u,d=>{o(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e),i}getFixedT(e,t,s){var i=this;const a=function(o,l){let c;if(typeof l!="object"){for(var u=arguments.length,h=new Array(u>2?u-2:0),m=2;m`${c.keyPrefix}${d}${p}`):f=c.keyPrefix?`${c.keyPrefix}${d}${o}`:o,i.t(f,c)};return S(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=s,a}t(){var i;for(var e=arguments.length,t=new Array(e),s=0;s1&&arguments[1]!==void 0?arguments[1]:{};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 s=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const o=(l,c)=>{const u=this.services.backendConnector.state[`${l}|${c}`];return u===-1||u===0||u===2};if(t.precheck){const l=t.precheck(this,o);if(l!==void 0)return l}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(s,e)&&(!i||o(a,e)))}loadNamespaces(e,t){const s=pe();return this.options.ns?(S(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{s.resolve(),t&&t(i)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=pe();S(e)&&(e=[e]);const i=this.options.preload||[],a=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{s.resolve(),t&&t(o)}),s):(t&&t(),Promise.resolve())}dir(e){var i,a;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";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"],s=((a=this.services)==null?void 0:a.languageUtils)||new lt(ht());return t.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ge(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ke;const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},a=new ge(i);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},s){const l=Object.keys(this.store.data).reduce((c,u)=>(c[u]={...this.store.data[u]},Object.keys(c[u]).reduce((h,m)=>(h[m]={...c[u][m]},h),{})),{});a.store=new rt(l,i),a.services.resourceStore=a.store}return a.translator=new Te(a.services,i),a.translator.on("*",function(l){for(var c=arguments.length,u=new Array(c>1?c-1:0),h=1;h{const n=I(e=>e.lang);return b.useEffect(()=>{F.changeLanguage(n)},[n]),null};var Ri="1.3.4";function kt(n,e,t){return Math.max(n,Math.min(e,t))}function Ci(n,e,t){return(1-t)*n+t*e}function Ti(n,e,t,s){return Ci(n,e,1-Math.exp(-t*s))}function Ei(n,e){return(n%e+e)%e}var Li=class{constructor(){y(this,"isRunning",!1);y(this,"value",0);y(this,"from",0);y(this,"to",0);y(this,"currentTime",0);y(this,"lerp");y(this,"duration");y(this,"easing");y(this,"onUpdate")}advance(n){var t;if(!this.isRunning)return;let e=!1;if(this.duration&&this.easing){this.currentTime+=n;const s=kt(0,this.currentTime/this.duration,1);e=s>=1;const i=e?1:this.easing(s);this.value=this.from+(this.to-this.from)*i}else this.lerp?(this.value=Ti(this.value,this.to,this.lerp*60,n),Math.round(this.value)===this.to&&(this.value=this.to,e=!0)):(this.value=this.to,e=!0);e&&this.stop(),(t=this.onUpdate)==null||t.call(this,this.value,e)}stop(){this.isRunning=!1}fromTo(n,e,{lerp:t,duration:s,easing:i,onStart:a,onUpdate:o}){this.from=this.value=n,this.to=e,this.lerp=t,this.duration=s,this.easing=i,this.currentTime=0,this.isRunning=!0,a==null||a(),this.onUpdate=o}};function Oi(n,e){let t;return function(...s){let i=this;clearTimeout(t),t=setTimeout(()=>{t=void 0,n.apply(i,s)},e)}}var Pi=class{constructor(n,e,{autoResize:t=!0,debounce:s=250}={}){y(this,"width",0);y(this,"height",0);y(this,"scrollHeight",0);y(this,"scrollWidth",0);y(this,"debouncedResize");y(this,"wrapperResizeObserver");y(this,"contentResizeObserver");y(this,"resize",()=>{this.onWrapperResize(),this.onContentResize()});y(this,"onWrapperResize",()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)});y(this,"onContentResize",()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)});this.wrapper=n,this.content=e,t&&(this.debouncedResize=Oi(this.resize,s),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize,!1):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){var n,e;(n=this.wrapperResizeObserver)==null||n.disconnect(),(e=this.contentResizeObserver)==null||e.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize,!1)}get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},Nt=class{constructor(){y(this,"events",{})}emit(n,...e){var s;let t=this.events[n]||[];for(let i=0,a=t.length;i{var s;this.events[n]=(s=this.events[n])==null?void 0:s.filter(i=>e!==i)}}off(n,e){var t;this.events[n]=(t=this.events[n])==null?void 0:t.filter(s=>e!==s)}destroy(){this.events={}}},mt=100/6,te={passive:!1},Fi=class{constructor(n,e={wheelMultiplier:1,touchMultiplier:1}){y(this,"touchStart",{x:0,y:0});y(this,"lastDelta",{x:0,y:0});y(this,"window",{width:0,height:0});y(this,"emitter",new Nt);y(this,"onTouchStart",n=>{const{clientX:e,clientY:t}=n.targetTouches?n.targetTouches[0]:n;this.touchStart.x=e,this.touchStart.y=t,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:n})});y(this,"onTouchMove",n=>{const{clientX:e,clientY:t}=n.targetTouches?n.targetTouches[0]:n,s=-(e-this.touchStart.x)*this.options.touchMultiplier,i=-(t-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=e,this.touchStart.y=t,this.lastDelta={x:s,y:i},this.emitter.emit("scroll",{deltaX:s,deltaY:i,event:n})});y(this,"onTouchEnd",n=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:n})});y(this,"onWheel",n=>{let{deltaX:e,deltaY:t,deltaMode:s}=n;const i=s===1?mt:s===2?this.window.width:1,a=s===1?mt:s===2?this.window.height:1;e*=i,t*=a,e*=this.options.wheelMultiplier,t*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:e,deltaY:t,event:n})});y(this,"onWindowResize",()=>{this.window={width:window.innerWidth,height:window.innerHeight}});this.element=n,this.options=e,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,te),this.element.addEventListener("touchstart",this.onTouchStart,te),this.element.addEventListener("touchmove",this.onTouchMove,te),this.element.addEventListener("touchend",this.onTouchEnd,te)}on(n,e){return this.emitter.on(n,e)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel,te),this.element.removeEventListener("touchstart",this.onTouchStart,te),this.element.removeEventListener("touchmove",this.onTouchMove,te),this.element.removeEventListener("touchend",this.onTouchEnd,te)}},ft=n=>Math.min(1,1.001-Math.pow(2,-10*n)),Ii=class{constructor({wrapper:n=window,content:e=document.documentElement,eventsTarget:t=n,smoothWheel:s=!0,syncTouch:i=!1,syncTouchLerp:a=.075,touchInertiaMultiplier:o=35,duration:l,easing:c,lerp:u=.1,infinite:h=!1,orientation:m="vertical",gestureOrientation:d="vertical",touchMultiplier:f=1,wheelMultiplier:p=1,autoResize:g=!0,prevent:x,virtualScroll:j,overscroll:v=!0,autoRaf:k=!1,anchors:R=!1,autoToggle:O=!1,allowNestedScroll:E=!1,__experimental__naiveDimensions:T=!1}={}){y(this,"_isScrolling",!1);y(this,"_isStopped",!1);y(this,"_isLocked",!1);y(this,"_preventNextNativeScrollEvent",!1);y(this,"_resetVelocityTimeout",null);y(this,"__rafID",null);y(this,"isTouching");y(this,"time",0);y(this,"userData",{});y(this,"lastVelocity",0);y(this,"velocity",0);y(this,"direction",0);y(this,"options");y(this,"targetScroll");y(this,"animatedScroll");y(this,"animate",new Li);y(this,"emitter",new Nt);y(this,"dimensions");y(this,"virtualScroll");y(this,"onScrollEnd",n=>{n instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&n.stopPropagation()});y(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});y(this,"onTransitionEnd",n=>{if(n.propertyName.includes("overflow")){const e=this.isHorizontal?"overflow-x":"overflow-y",t=getComputedStyle(this.rootElement)[e];["hidden","clip"].includes(t)?this.stop():this.start()}});y(this,"onClick",n=>{const t=n.composedPath().find(s=>{var i,a,o;return s instanceof HTMLAnchorElement&&(((i=s.getAttribute("href"))==null?void 0:i.startsWith("#"))||((a=s.getAttribute("href"))==null?void 0:a.startsWith("/#"))||((o=s.getAttribute("href"))==null?void 0:o.startsWith("./#")))});if(t){const s=t.getAttribute("href");if(s){const i=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0;let a=`#${s.split("#")[1]}`;["#","/#","./#","#top","/#top","./#top"].includes(s)&&(a=0),this.scrollTo(a,i)}}});y(this,"onPointerDown",n=>{n.button===1&&this.reset()});y(this,"onVirtualScroll",n=>{if(typeof this.options.virtualScroll=="function"&&this.options.virtualScroll(n)===!1)return;const{deltaX:e,deltaY:t,event:s}=n;if(this.emitter.emit("virtual-scroll",{deltaX:e,deltaY:t,event:s}),s.ctrlKey||s.lenisStopPropagation)return;const i=s.type.includes("touch"),a=s.type.includes("wheel");this.isTouching=s.type==="touchstart"||s.type==="touchmove";const o=e===0&&t===0;if(this.options.syncTouch&&i&&s.type==="touchstart"&&o&&!this.isStopped&&!this.isLocked){this.reset();return}const c=this.options.gestureOrientation==="vertical"&&t===0||this.options.gestureOrientation==="horizontal"&&e===0;if(o||c)return;let u=s.composedPath();u=u.slice(0,u.indexOf(this.rootElement));const h=this.options.prevent;if(u.find(x=>{var j,v,k;return x instanceof HTMLElement&&(typeof h=="function"&&(h==null?void 0:h(x))||((j=x.hasAttribute)==null?void 0:j.call(x,"data-lenis-prevent"))||i&&((v=x.hasAttribute)==null?void 0:v.call(x,"data-lenis-prevent-touch"))||a&&((k=x.hasAttribute)==null?void 0:k.call(x,"data-lenis-prevent-wheel"))||this.options.allowNestedScroll&&this.checkNestedScroll(x,{deltaX:e,deltaY:t}))}))return;if(this.isStopped||this.isLocked){s.preventDefault();return}if(!(this.options.syncTouch&&i||this.options.smoothWheel&&a)){this.isScrolling="native",this.animate.stop(),s.lenisStopPropagation=!0;return}let d=t;this.options.gestureOrientation==="both"?d=Math.abs(t)>Math.abs(e)?t:e:this.options.gestureOrientation==="horizontal"&&(d=e),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&(this.animatedScroll>0&&this.animatedScroll0||this.animatedScroll===this.limit&&t<0))&&(s.lenisStopPropagation=!0),s.preventDefault();const f=i&&this.options.syncTouch,g=i&&s.type==="touchend"&&Math.abs(d)>5;g&&(d=this.velocity*this.options.touchInertiaMultiplier),this.scrollTo(this.targetScroll+d,{programmatic:!1,...f?{lerp:g?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})});y(this,"onNativeScroll",()=>{if(this._resetVelocityTimeout!==null&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling==="native"){const n=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-n,this.direction=Math.sign(this.animatedScroll-n),this.isStopped||(this.isScrolling="native"),this.emit(),this.velocity!==0&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}});y(this,"raf",n=>{const e=n-(this.time||n);this.time=n,this.animate.advance(e*.001),this.options.autoRaf&&(this.__rafID=requestAnimationFrame(this.raf))});window.lenisVersion=Ri,(!n||n===document.documentElement)&&(n=window),typeof l=="number"&&typeof c!="function"?c=ft:typeof c=="function"&&typeof l!="number"&&(l=1),this.options={wrapper:n,content:e,eventsTarget:t,smoothWheel:s,syncTouch:i,syncTouchLerp:a,touchInertiaMultiplier:o,duration:l,easing:c,lerp:u,infinite:h,gestureOrientation:d,orientation:m,touchMultiplier:f,wheelMultiplier:p,autoResize:g,prevent:x,virtualScroll:j,overscroll:v,autoRaf:k,anchors:R,autoToggle:O,allowNestedScroll:E,__experimental__naiveDimensions:T},this.dimensions=new Pi(n,e,{autoResize:g}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.anchors&&this.options.wrapper===window&&this.options.wrapper.addEventListener("click",this.onClick,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new Fi(t,{touchMultiplier:f,wheelMultiplier:p}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&this.rootElement.addEventListener("transitionend",this.onTransitionEnd,{passive:!0}),this.options.autoRaf&&(this.__rafID=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),this.options.anchors&&this.options.wrapper===window&&this.options.wrapper.removeEventListener("click",this.onClick,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this.__rafID&&cancelAnimationFrame(this.__rafID)}on(n,e){return this.emitter.on(n,e)}off(n,e){return this.emitter.off(n,e)}setScroll(n){this.isHorizontal?this.options.wrapper.scrollTo({left:n,behavior:"instant"}):this.options.wrapper.scrollTo({top:n,behavior:"instant"})}resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}scrollTo(n,{offset:e=0,immediate:t=!1,lock:s=!1,duration:i=this.options.duration,easing:a=this.options.easing,lerp:o=this.options.lerp,onStart:l,onComplete:c,force:u=!1,programmatic:h=!0,userData:m}={}){if(!((this.isStopped||this.isLocked)&&!u)){if(typeof n=="string"&&["top","left","start"].includes(n))n=0;else if(typeof n=="string"&&["bottom","right","end"].includes(n))n=this.limit;else{let d;if(typeof n=="string"?d=document.querySelector(n):n instanceof HTMLElement&&(n!=null&&n.nodeType)&&(d=n),d){if(this.options.wrapper!==window){const p=this.rootElement.getBoundingClientRect();e-=this.isHorizontal?p.left:p.top}const f=d.getBoundingClientRect();n=(this.isHorizontal?f.left:f.top)+this.animatedScroll}}if(typeof n=="number"){if(n+=e,n=Math.round(n),this.options.infinite){if(h){this.targetScroll=this.animatedScroll=this.scroll;const d=n-this.animatedScroll;d>this.limit/2?n=n-this.limit:d<-this.limit/2&&(n=n+this.limit)}}else n=kt(0,n,this.limit);if(n===this.targetScroll){l==null||l(this),c==null||c(this);return}if(this.userData=m??{},t){this.animatedScroll=this.targetScroll=n,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),c==null||c(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}h||(this.targetScroll=n),typeof i=="number"&&typeof a!="function"?a=ft:typeof a=="function"&&typeof i!="number"&&(i=1),this.animate.fromTo(this.animatedScroll,n,{duration:i,easing:a,lerp:o,onStart:()=>{s&&(this.isLocked=!0),this.isScrolling="smooth",l==null||l(this)},onUpdate:(d,f)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=d-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=d,this.setScroll(this.scroll),h&&(this.targetScroll=d),f||this.emit(),f&&(this.reset(),this.emit(),c==null||c(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())}})}}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}checkNestedScroll(n,{deltaX:e,deltaY:t}){const s=Date.now(),i=n._lenis??(n._lenis={});let a,o,l,c,u,h,m,d;const f=this.options.gestureOrientation;if(s-(i.time??0)>2e3){i.time=Date.now();const O=window.getComputedStyle(n);i.computedStyle=O;const E=O.overflowX,T=O.overflowY;if(a=["auto","overlay","scroll"].includes(E),o=["auto","overlay","scroll"].includes(T),i.hasOverflowX=a,i.hasOverflowY=o,!a&&!o||f==="vertical"&&!o||f==="horizontal"&&!a)return!1;u=n.scrollWidth,h=n.scrollHeight,m=n.clientWidth,d=n.clientHeight,l=u>m,c=h>d,i.isScrollableX=l,i.isScrollableY=c,i.scrollWidth=u,i.scrollHeight=h,i.clientWidth=m,i.clientHeight=d}else l=i.isScrollableX,c=i.isScrollableY,a=i.hasOverflowX,o=i.hasOverflowY,u=i.scrollWidth,h=i.scrollHeight,m=i.clientWidth,d=i.clientHeight;if(!a&&!o||!l&&!c||f==="vertical"&&(!o||!c)||f==="horizontal"&&(!a||!l))return!1;let p;if(f==="horizontal")p="x";else if(f==="vertical")p="y";else{const O=e!==0,E=t!==0;O&&a&&l&&(p="x"),E&&o&&c&&(p="y")}if(!p)return!1;let g,x,j,v,k;if(p==="x")g=n.scrollLeft,x=u-m,j=e,v=a,k=l;else if(p==="y")g=n.scrollTop,x=h-d,j=t,v=o,k=c;else return!1;return(j>0?g0)&&v&&k}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.__experimental__naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){const n=this.options.wrapper;return this.isHorizontal?n.scrollX??n.scrollLeft:n.scrollY??n.scrollTop}get scroll(){return this.options.infinite?Ei(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(n){this._isScrolling!==n&&(this._isScrolling=n,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(n){this._isStopped!==n&&(this._isStopped=n,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(n){this._isLocked!==n&&(this._isLocked=n,this.updateClassName())}get isSmooth(){return this.isScrolling==="smooth"}get className(){let n="lenis";return this.options.autoToggle&&(n+=" lenis-autoToggle"),this.isStopped&&(n+=" lenis-stopped"),this.isLocked&&(n+=" lenis-locked"),this.isScrolling&&(n+=" lenis-scrolling"),this.isScrolling==="smooth"&&(n+=" lenis-smooth"),n}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}},Ai=class{constructor(n){y(this,"listeners",[]);this.state=n}set(n){this.state=n;for(let e of this.listeners)e(this.state)}subscribe(n){return this.listeners=[...this.listeners,n],()=>{this.listeners=this.listeners.filter(e=>e!==n)}}get(){return this.state}};function $i(n){const[e,t]=b.useState(n.get());return b.useEffect(()=>n.subscribe(s=>t(s)),[n]),e}var _t=b.createContext(null),Me=new Ai(null),Di=b.forwardRef(({children:n,root:e=!1,options:t={},className:s,autoRaf:i=!0,style:a,props:o},l)=>{const c=b.useRef(null),u=b.useRef(null),[h,m]=b.useState(void 0);b.useImperativeHandle(l,()=>({wrapper:c.current,content:u.current,lenis:h}),[h]),b.useEffect(()=>{const g=new Ii({...t,...!e&&{wrapper:c.current,content:u.current},autoRaf:(t==null?void 0:t.autoRaf)??i});return m(g),()=>{g.destroy(),m(void 0)}},[e,JSON.stringify(t)]);const d=b.useRef([]),f=b.useCallback((g,x)=>{d.current.push({callback:g,priority:x}),d.current.sort((j,v)=>j.priority-v.priority)},[]),p=b.useCallback(g=>{d.current=d.current.filter(x=>x.callback!==g)},[]);return b.useEffect(()=>{if(e&&h)return Me.set({lenis:h,addCallback:f,removeCallback:p}),()=>Me.set(null)},[e,h,f,p]),b.useEffect(()=>{if(!h)return;const g=x=>{var j;for(let v=0;v{h.off("scroll",g)}},[h]),r.jsx(_t.Provider,{value:{lenis:h,addCallback:f,removeCallback:p},children:e?n:r.jsx("div",{ref:c,className:s,style:a,...o,children:r.jsx("div",{ref:u,children:n})})})}),Mi={};function Vi(n,e=[],t=0){const s=b.useContext(_t),i=$i(Me),a=s??i??Mi,{lenis:o,addCallback:l,removeCallback:c}=a;return b.useEffect(()=>{},[o,l,c,t,...e]),o}function Bi(){return r.jsxs(Di,{root:!0,options:{lerp:.07},children:[r.jsx(Xt,{}),r.jsxs("main",{className:"flex flex-col min-h-screen",children:[r.jsx(_i,{}),r.jsx("div",{className:"flex-auto",children:r.jsx(As,{})})]}),r.jsx(Zt,{})]})}const V=({className:n})=>r.jsx("div",{className:J("container py-32",n),children:r.jsx("h1",{className:"text-5xl text-center",children:"Oops, something went wrong"})}),A=n=>{const e=Vi();b.useEffect(()=>{e&&e.scrollTo(0,{lerp:.3,duration:.3})},[e,n])};function zi(){return A(),r.jsxs("div",{className:"flex flex-col",children:[r.jsx(es,{}),r.jsx(ts,{}),r.jsx(ss,{}),r.jsx(ns,{}),r.jsx(is,{}),r.jsx(rs,{}),r.jsx(as,{}),r.jsx(os,{})]})}const Hi=w.object({type:w.string(),company_name:w.string().min(3,{message:"Название компании должно быть не менее 3 символов"}),representative_name:w.string().min(3,{message:"Имя представителя должно быть не менее 3 символов"}),job_title:w.string().min(3,{message:"Должность должна быть не менее 3 символов"}),participants_number:w.string().min(1,{message:"Укажите количество участников"}),country:w.string().min(3,{message:"Название страны должно быть не менее 3 символов"}),email_address:w.string().email({message:"Укажите корректный email"}),phone_number:w.string().min(8,{message:"Номер телефона должен быть не менее 8 символов"}),website:w.string().optional(),meeting_objective:w.string().min(3,{message:"Укажите цель встречи"}),proposal_description:w.string().optional(),government_agency:w.string().optional(),sector_industry:w.string().optional(),key_services:w.string().optional(),government_experience:w.string().optional(),preferred_meeting_datetime:w.string().optional(),meeting_mode:w.string().optional(),language_preference:w.string().optional(),technical_requirements:w.string().optional(),company_profile:w.custom(n=>n instanceof File,{message:"Выберите корректный файл"}).refine(n=>n&&["image/jpeg","image/png","application/pdf"].includes(n.type),{message:"Допускаются только файлы JPG, PNG и PDF"}).optional(),proposal_presentation:w.custom(n=>n instanceof File,{message:"Выберите корректный файл"}).refine(n=>n&&["image/jpeg","image/png","application/pdf"].includes(n.type),{message:"Допускаются только файлы JPG, PNG и PDF"}).optional(),relevant_certification:w.custom(n=>n instanceof File,{message:"Выберите корректный файл"}).refine(n=>n&&["image/jpeg","image/png","application/pdf"].includes(n.type),{message:"Допускаются только файлы JPG, PNG и PDF"}).optional()}),Ki={type:"B2B",company_name:"",representative_name:"",job_title:"",participants_number:"",country:"",email_address:"",phone_number:"",website:"",meeting_objective:"",proposal_description:"",government_agency:"",sector_industry:"",key_services:"",government_experience:"",preferred_meeting_datetime:"",meeting_mode:"",language_preference:"",technical_requirements:""};function Ui(n){const e=n+"CollectionProvider",[t,s]=Ee(e),[i,a]=t(e,{collectionRef:{current:null},itemMap:new Map}),o=f=>{const{scope:p,children:g}=f,x=ae.useRef(null),j=ae.useRef(new Map).current;return r.jsx(i,{scope:p,itemMap:j,collectionRef:x,children:g})};o.displayName=e;const l=n+"CollectionSlot",c=ae.forwardRef((f,p)=>{const{scope:g,children:x}=f,j=a(l,g),v=fe(p,j.collectionRef);return r.jsx(Qe,{ref:v,children:x})});c.displayName=l;const u=n+"CollectionItemSlot",h="data-radix-collection-item",m=ae.forwardRef((f,p)=>{const{scope:g,children:x,...j}=f,v=ae.useRef(null),k=fe(p,v),R=a(u,g);return ae.useEffect(()=>(R.itemMap.set(v,{ref:v,...j}),()=>void R.itemMap.delete(v))),r.jsx(Qe,{[h]:"",ref:k,children:x})});m.displayName=u;function d(f){const p=a(n+"CollectionConsumer",f);return ae.useCallback(()=>{const x=p.collectionRef.current;if(!x)return[];const j=Array.from(x.querySelectorAll(`[${h}]`));return Array.from(p.itemMap.values()).sort((R,O)=>j.indexOf(R.ref.current)-j.indexOf(O.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:o,Slot:c,ItemSlot:m},d,s]}var Gi=b.createContext(void 0);function Rt(n){const e=b.useContext(Gi);return n||e||"ltr"}var $e="rovingFocusGroup.onEntryFocus",Wi={bubbles:!1,cancelable:!0},Ie="RovingFocusGroup",[Ve,Ct,qi]=Ui(Ie),[Yi,Tt]=Ee(Ie,[qi]),[Ji,Qi]=Yi(Ie),Et=b.forwardRef((n,e)=>r.jsx(Ve.Provider,{scope:n.__scopeRovingFocusGroup,children:r.jsx(Ve.Slot,{scope:n.__scopeRovingFocusGroup,children:r.jsx(Xi,{...n,ref:e})})}));Et.displayName=Ie;var Xi=b.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,orientation:s,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:h=!1,...m}=n,d=b.useRef(null),f=fe(e,d),p=Rt(a),[g=null,x]=gt({prop:o,defaultProp:l,onChange:c}),[j,v]=b.useState(!1),k=ls(u),R=Ct(t),O=b.useRef(!1),[E,T]=b.useState(0);return b.useEffect(()=>{const C=d.current;if(C)return C.addEventListener($e,k),()=>C.removeEventListener($e,k)},[k]),r.jsx(Ji,{scope:t,orientation:s,dir:p,loop:i,currentTabStopId:g,onItemFocus:b.useCallback(C=>x(C),[x]),onItemShiftTab:b.useCallback(()=>v(!0),[]),onFocusableItemAdd:b.useCallback(()=>T(C=>C+1),[]),onFocusableItemRemove:b.useCallback(()=>T(C=>C-1),[]),children:r.jsx(be.div,{tabIndex:j||E===0?-1:0,"data-orientation":s,...m,ref:f,style:{outline:"none",...n.style},onMouseDown:ee(n.onMouseDown,()=>{O.current=!0}),onFocus:ee(n.onFocus,C=>{const K=!O.current;if(C.target===C.currentTarget&&K&&!j){const Q=new CustomEvent($e,Wi);if(C.currentTarget.dispatchEvent(Q),!Q.defaultPrevented){const P=R().filter(D=>D.focusable),$=P.find(D=>D.active),je=P.find(D=>D.id===g),G=[$,je,...P].filter(Boolean).map(D=>D.ref.current);Pt(G,h)}}O.current=!1}),onBlur:ee(n.onBlur,()=>v(!1))})})}),Lt="RovingFocusGroupItem",Ot=b.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,focusable:s=!0,active:i=!1,tabStopId:a,...o}=n,l=cs(),c=a||l,u=Qi(Lt,t),h=u.currentTabStopId===c,m=Ct(t),{onFocusableItemAdd:d,onFocusableItemRemove:f}=u;return b.useEffect(()=>{if(s)return d(),()=>f()},[s,d,f]),r.jsx(Ve.ItemSlot,{scope:t,id:c,focusable:s,active:i,children:r.jsx(be.span,{tabIndex:h?0:-1,"data-orientation":u.orientation,...o,ref:e,onMouseDown:ee(n.onMouseDown,p=>{s?u.onItemFocus(c):p.preventDefault()}),onFocus:ee(n.onFocus,()=>u.onItemFocus(c)),onKeyDown:ee(n.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){u.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const g=tr(p,u.orientation,u.dir);if(g!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let j=m().filter(v=>v.focusable).map(v=>v.ref.current);if(g==="last")j.reverse();else if(g==="prev"||g==="next"){g==="prev"&&j.reverse();const v=j.indexOf(p.currentTarget);j=u.loop?sr(j,v+1):j.slice(v+1)}setTimeout(()=>Pt(j))}})})})});Ot.displayName=Lt;var Zi={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function er(n,e){return e!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function tr(n,e,t){const s=er(n.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return Zi[s]}function Pt(n,e=!1){const t=document.activeElement;for(const s of n)if(s===t||(s.focus({preventScroll:e}),document.activeElement!==t))return}function sr(n,e){return n.map((t,s)=>n[(e+s)%n.length])}var nr=Et,ir=Ot;function rr(n){const e=b.useRef({value:n,previous:n});return b.useMemo(()=>(e.current.value!==n&&(e.current.previous=e.current.value,e.current.value=n),e.current.previous),[n])}var Ge="Radio",[ar,Ft]=Ee(Ge),[or,lr]=ar(Ge),It=b.forwardRef((n,e)=>{const{__scopeRadio:t,name:s,checked:i=!1,required:a,disabled:o,value:l="on",onCheck:c,form:u,...h}=n,[m,d]=b.useState(null),f=fe(e,x=>d(x)),p=b.useRef(!1),g=m?u||!!m.closest("form"):!0;return r.jsxs(or,{scope:t,checked:i,disabled:o,children:[r.jsx(be.button,{type:"button",role:"radio","aria-checked":i,"data-state":Dt(i),"data-disabled":o?"":void 0,disabled:o,value:l,...h,ref:f,onClick:ee(n.onClick,x=>{i||c==null||c(),g&&(p.current=x.isPropagationStopped(),p.current||x.stopPropagation())})}),g&&r.jsx(cr,{control:m,bubbles:!p.current,name:s,value:l,checked:i,required:a,disabled:o,form:u,style:{transform:"translateX(-100%)"}})]})});It.displayName=Ge;var At="RadioIndicator",$t=b.forwardRef((n,e)=>{const{__scopeRadio:t,forceMount:s,...i}=n,a=lr(At,t);return r.jsx(us,{present:s||a.checked,children:r.jsx(be.span,{"data-state":Dt(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:e})})});$t.displayName=At;var cr=n=>{const{control:e,checked:t,bubbles:s=!0,...i}=n,a=b.useRef(null),o=rr(t),l=ds(e);return b.useEffect(()=>{const c=a.current,u=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==t&&m){const d=new Event("click",{bubbles:s});m.call(c,t),c.dispatchEvent(d)}},[o,t,s]),r.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:t,...i,tabIndex:-1,ref:a,style:{...n.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Dt(n){return n?"checked":"unchecked"}var ur=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],We="RadioGroup",[dr,qr]=Ee(We,[Tt,Ft]),Mt=Tt(),Vt=Ft(),[hr,pr]=dr(We),Bt=b.forwardRef((n,e)=>{const{__scopeRadioGroup:t,name:s,defaultValue:i,value:a,required:o=!1,disabled:l=!1,orientation:c,dir:u,loop:h=!0,onValueChange:m,...d}=n,f=Mt(t),p=Rt(u),[g,x]=gt({prop:a,defaultProp:i,onChange:m});return r.jsx(hr,{scope:t,name:s,required:o,disabled:l,value:g,onValueChange:x,children:r.jsx(nr,{asChild:!0,...f,orientation:c,dir:p,loop:h,children:r.jsx(be.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":l?"":void 0,dir:p,...d,ref:e})})})});Bt.displayName=We;var zt="RadioGroupItem",Ht=b.forwardRef((n,e)=>{const{__scopeRadioGroup:t,disabled:s,...i}=n,a=pr(zt,t),o=a.disabled||s,l=Mt(t),c=Vt(t),u=b.useRef(null),h=fe(e,u),m=a.value===i.value,d=b.useRef(!1);return b.useEffect(()=>{const f=g=>{ur.includes(g.key)&&(d.current=!0)},p=()=>d.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",p)}},[]),r.jsx(ir,{asChild:!0,...l,focusable:!o,active:m,children:r.jsx(It,{disabled:o,required:a.required,checked:m,...c,...i,name:a.name,ref:h,onCheck:()=>a.onValueChange(i.value),onKeyDown:ee(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:ee(i.onFocus,()=>{var f;d.current&&((f=u.current)==null||f.click())})})})});Ht.displayName=zt;var mr="RadioGroupIndicator",fr=b.forwardRef((n,e)=>{const{__scopeRadioGroup:t,...s}=n,i=Vt(t);return r.jsx($t,{...i,...s,ref:e})});fr.displayName=mr;var Kt=Bt,Ut=Ht;const xe=b.forwardRef(({className:n,...e},t)=>r.jsx(Kt,{className:J("grid gap-2",n),...e,ref:t}));xe.displayName=Kt.displayName;const Z=b.forwardRef(({className:n,...e},t)=>r.jsx(Ut,{ref:t,className:J(e.checked?"border-primary after:bg-opacity-1":"border-on_surface bg-transparent after:bg-opacity-0","size-5 rounded-full border-[2px] after:size-[9px] after:bg-primary before:scale-0 hover:before:scale-100 before:size-10 before:rounded-full before:transition-all before:absolute before:-top-3 before:-left-3 before:bg-on_surface/[8%] duration-300 after:rounded-full flex relative items-center justify-center text-primary focus:outline-none focus-visible:ring-1 focus-visible:ring-ring transition-all disabled:cursor-not-allowed disabled:opacity-50",n),...e}));Z.displayName=Ut.displayName;const X=[{h2:"Информация об экспоненте:",data:[{label:"Название компании/организации"},{label:"Имя представителя"},{label:"Название должности/позиция"},{label:"Количество участников"},{label:"Страна"},{label:"Email адрес"},{label:"Номер телефона"},{label:"Веб-сайт"}]},{h2:"Applicant Information:",data:[{label:"Company/Organization Name"},{label:"Name of Representative"},{label:"Job title/Position"},{label:"Number of the participants"},{label:"Country"},{label:"Email"},{label:"Phone number"},{label:"Website"}]}],se=[{h2:"Цели встречи:",secondH2:"Информация о компании/организации:",data:[{label:"Основная цель встречи"},{label:"Краткое описание вашего предложения/проекта/запроса"},{label:"Соответствующее государственное учреждение/департамент"},{label:"Отраслевая промышленность"},{label:"Ключевые услуги/продукты"},{label:"Предыдущий опыт работы с правительствами (если применимо)"}]},{h2:"Meeting Purpose: ",secondH2:"Company/Organization Profile:",data:[{label:"Primary objective of the meeting"},{label:"Brief description of your proposal/project/request"},{label:"Relevant government agency/department"},{label:"Sector Industry "},{label:"Key Services/Products"},{label:"Previous Experience working with Governments (if applicable)"}]}],W=[{h2:"Логистика встречи:",secondH2:"Логистика встречи:",subtitle:"(Пожалуйста приложите следующие документы, если это необходимо)",data:[{label:"Предпочтительная дата и время"},{label:"Предпочтительный способ проведения встречи (лично, виртуально (через zoom/ teams/другое), гибридный)"},{label:"Предпочитаемый язык (английский, туркменский, русский, другой)"},{label:"Дополнительные технические или логистические требования (например, аудио-видео оборудование, переводчики и т.д.)"},{label:"Название компании/организации"},{label:"Предложение/презентация"},{label:"Соответствующие сертификаты/лицензии"}],button:"Отправить"},{h2:"Приложения:",secondH2:"Attachments",subtitle:"(Please attach the following documents as applicable)",data:[{label:"Preferred date and time for the meeting"},{label:"Preferred mode of meeting (in-person, virtual (via zoom/teams/other), hybrid)"},{label:"Language preference (English, turkmen, Russian, other)"},{label:"Additional technical or logistical requirements (e.g. AV equipment, interpreters, etc)"},{label:"Company/organization profile"},{label:"Proposal presentation"},{label:"Relevant certification/licenses"}],button:"Send"}],gr=({handleNext:n})=>{A();const{control:e,formState:t}=Be(),s=I(i=>i.lang);return r.jsxs(ve.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,y:"100%",transition:{duration:.2}},className:"w-full",children:[r.jsx("h2",{className:"h2 mb-8",children:X[N(s)].h2}),r.jsxs("div",{className:"flex flex-col gap-8",children:[r.jsx(Ne,{defaultValue:1,control:e,name:"type",render:({field:i})=>r.jsxs(B,{className:"space-y-3",children:[r.jsx(z,{className:"text-xl",children:s===ne.RU?"Тип:":"Type:"}),r.jsx(H,{children:r.jsxs(xe,{onValueChange:i.onChange,defaultValue:i.value,className:"flex flex-col space-y-4",children:[r.jsxs(B,{className:"flex items-center space-x-3 space-y-0",children:[r.jsx(H,{children:r.jsx(Z,{value:"B2B",checked:i.value==="B2B"})}),r.jsx(z,{className:"text-base",children:"B2B"})]}),r.jsxs(B,{className:"flex items-center space-x-3 space-y-0",children:[r.jsx(H,{children:r.jsx(Z,{value:"B2G",checked:i.value==="B2G"})}),r.jsx(z,{className:"text-base",children:"B2G"})]})]})})]})}),r.jsx(_,{control:e,name:"company_name",error:t.errors.company_name,placeholder:"",label:X[N(s)].data[0].label}),r.jsx(_,{control:e,name:"representative_name",error:t.errors.representative_name,placeholder:"",label:X[N(s)].data[1].label}),r.jsx(_,{control:e,name:"job_title",error:t.errors.job_title,placeholder:"",label:X[N(s)].data[2].label}),r.jsx(_,{control:e,name:"participants_number",error:t.errors.participants_number,placeholder:"",label:X[N(s)].data[3].label}),r.jsx(_,{control:e,name:"country",error:t.errors.country,placeholder:"",label:X[N(s)].data[4].label}),r.jsx(_,{control:e,name:"email_address",error:t.errors.email_address,placeholder:"",label:X[N(s)].data[5].label}),r.jsx(_,{control:e,name:"phone_number",error:t.errors.phone_number,placeholder:"",label:X[N(s)].data[6].label}),r.jsx(_,{control:e,name:"website",placeholder:"",label:X[N(s)].data[7].label})]}),r.jsx(q,{variant:"secondary",type:"button",onClick:n,className:"w-full mt-10",children:s===ne.RU?"Далее":"Next"})]})},xr=({handleNext:n,handlePrev:e})=>{A();const t=I(a=>a.lang),{control:s,formState:i}=Be();return r.jsxs(ve.div,{initial:{opacity:0,y:-100},animate:{opacity:1,y:0,transition:{delay:.5,duration:.3}},exit:{opacity:0,y:100},children:[r.jsx("h2",{className:"h2 mb-8",children:se[N(t)].h2}),r.jsxs("div",{className:"flex flex-col gap-8",children:[r.jsx(_,{control:s,name:"meeting_objective",error:i.errors.meeting_objective,placeholder:"",label:se[N(t)].data[0].label}),r.jsx(_,{control:s,name:"proposal_description",error:i.errors.proposal_description,placeholder:"",label:se[N(t)].data[1].label}),r.jsx(_,{control:s,name:"government_agency",error:i.errors.government_agency,placeholder:"",label:se[N(t)].data[2].label}),r.jsx("h2",{className:"h2 mt-4",children:se[N(t)].secondH2}),r.jsx(_,{control:s,name:"sector_industry",error:i.errors.sector_industry,placeholder:"",label:se[N(t)].data[3].label}),r.jsx(_,{control:s,name:"key_services",error:i.errors.key_services,placeholder:"",label:se[N(t)].data[4].label}),r.jsx(_,{control:s,name:"government_experience",error:i.errors.government_experience,placeholder:"",label:se[N(t)].data[5].label})]}),r.jsxs("div",{className:"flex items-center gap-6 mt-10",children:[r.jsx(q,{type:"button",onClick:e,variant:"outline",className:"text-on_surface",children:t===ne.RU?"Назад":"Back"}),r.jsx(q,{variant:"secondary",type:"button",onClick:n,className:"w-full",children:t===ne.RU?"Далее":"Next"})]})]})},br=({handlePrev:n})=>{A();const{control:e,formState:t}=Be(),s=I(i=>i.lang);return r.jsxs(ve.div,{initial:{opacity:0,y:-100},animate:{opacity:1,y:0,transition:{delay:.5,duration:.3}},transition:{duration:1},children:[r.jsx("h2",{className:"h2 mb-8",children:W[N(s)].h2}),r.jsxs("div",{className:"flex flex-col gap-6",children:[r.jsx(_,{control:e,name:"preferred_meeting_datetime",error:t.errors.preferred_meeting_datetime,placeholder:"",label:W[N(s)].data[0].label}),r.jsx(_,{control:e,name:"preferred_mode",error:t.errors.preferred_mode,placeholder:"",label:W[N(s)].data[1].label}),r.jsx(_,{control:e,name:"language_preference",error:t.errors.language_preference,placeholder:"",label:W[N(s)].data[2].label}),r.jsx(_,{control:e,name:"additional_technical",error:t.errors.additional_technical,placeholder:"",label:W[N(s)].data[3].label})]}),r.jsxs("div",{className:"flex flex-col gap-8",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"h2 mt-10",children:W[N(s)].secondH2}),r.jsx("h5",{className:"text-on_surface_v",children:W[N(s)].subtitle})]}),r.jsx(_,{control:e,name:"company_profile",label:W[N(s)].data[4].label,type:"file",textDark:!0}),r.jsx(_,{control:e,name:"proposal_presentation",label:W[N(s)].data[5].label,type:"file",textDark:!0}),r.jsx(_,{control:e,name:"relevant_certification",label:W[N(s)].data[6].label,type:"file",textDark:!0})]}),r.jsxs("div",{className:"flex items-center gap-6 mt-10",children:[r.jsx(q,{type:"button",onClick:n,variant:"outline",className:"text-on_surface",children:s===ne.RU?"Назад":"Back"}),r.jsx(q,{disabled:t.isSubmitting,type:"submit",className:"w-full",children:t.isSubmitting?r.jsx(ze,{className:"animate-spin"}):W[N(s)].button})]})]})},vr=({stage:n,setStage:e,success:t,setSuccess:s})=>{const i=Le({resolver:Oe(Hi),defaultValues:Ki,mode:"onChange"}),a=u=>{switch(u){case 1:return["type","company_name","representative_name","job_title","participants_number","country","email_address","phone_number","website"];case 2:return["meeting_objective","proposal_description","government_agency","sector_industry","key_services","government_experience"];case 3:return["preferred_meeting_datetime","meeting_mode","language_preference","technical_requirements","company_profile","proposal_presentation","relevant_certification"];default:return[]}},o=async()=>{const u=a(n);await i.trigger(u)&&e(m=>m+1)},l=()=>e(u=>u-1),c=async u=>{try{const h=new FormData;Object.entries(u).forEach(([d,f])=>{(f instanceof File||f!==void 0)&&h.append(d,f)}),(await hs.post("https://turkmentextile.turkmenexpo.com/app/api/v1/form",h,{headers:{"Content-Type":"multipart/form-data"}})).status===201&&s(!0)}catch(h){console.error("Ошибка при отправке B2B формы:",h)}};return r.jsx(Pe,{...i,children:r.jsx("form",{onSubmit:i.handleSubmit(c),children:r.jsxs("div",{className:"relative",children:[r.jsx(ce,{children:n===1&&r.jsx(gr,{handleNext:o})}),r.jsx(ce,{children:n===2&&r.jsx(xr,{handleNext:o,handlePrev:l})}),r.jsx(ce,{children:n===3&&t===!1&&r.jsx(br,{handlePrev:l})}),t&&r.jsx(He,{})]})})})};function yr(){A();const n=I(a=>a.lang),[e,t]=b.useState(1),[s,i]=b.useState(!1);return r.jsxs("div",{className:"pb-[120px]",children:[r.jsx(ye,{title:n===ne.RU?"B2B | B2G встречи":"B2B | B2G meetings"}),!s&&e!==0&&r.jsx(ps,{stage:e}),r.jsx("div",{className:"max-w-[808px] md:mx-auto mx-5",children:r.jsx(vr,{success:s,setSuccess:i,stage:e,setStage:t})})]})}function jr(){A();const n=I(e=>e.lang);return r.jsxs("div",{className:J(""),children:[r.jsx(ye,{title:n===ne.RU?"О выставке":"About exhibition"}),r.jsx(ms,{}),r.jsx(fs,{}),r.jsx(gs,{}),r.jsx(xs,{}),r.jsx(bs,{})]})}const wr=w.object({company_name:w.string().min(3,{message:"Название компании должно быть не менее 3 символов"}),rep_name:w.string().min(3,{message:"Имя представителя должно быть не менее 3 символов"}),job_title:w.string().min(3,{message:"Должность должна быть не менее 3 символов"}),country:w.string().min(3,{message:"Название страны должно быть не менее 3 символов"}),email:w.string().email({message:"Укажите корректный email"}),phone:w.string().min(8,{message:"Номер телефона должен быть не менее 8 символов"}),website:w.string().optional(),visa_support:w.string().optional()}),Sr={company_name:"",rep_name:"",job_title:"",country:"",email:"",phone:"",website:"",visa_support:""},L=[{cover:"Забронировать стенд",h2:"Выберите один из вариантов:",radio:"Необорудованная площадь",radio_2:"Оборудованная площадь",label_1:"Название компании/организации",label_2:"Имя представителя",label_3:"Название должности/позиция",number_of_participants:"Количество участников",label_4:"Страна",label_5:"Email адрес",label_6:"Номер телефона",label_7:"Веб-сайт",visa:"Визовая поддержка:",visa_radio:"Да",visa_radio_2:"Нет",button:"Отправить"},{cover:"Book a stand:",h2:"Select one of the options:",radio:"Stand space only",radio_2:"Prefabricated stand",label_1:"Company/Organization Name",label_2:"Name of Representative",label_3:"Job title/Position",number_of_participants:"Number of the participants",label_4:"Country",label_5:"Email",label_6:"Phone number",label_7:"Website",visa:"Visa support:",visa_radio:"Yes",visa_radio_2:"No",button:"Send"}];function kr(){A();const n=I(o=>o.lang),[e,t]=b.useState(!1),s=Le({resolver:Oe(wr),defaultValues:Sr}),i=async o=>{try{await vs(o)&&t(!0)}catch(l){console.error("POST sponsor error",l)}},{errors:a}=s.formState;return r.jsxs("div",{children:[r.jsx(ye,{title:n===ne.RU?"Стать спонсором":"Become a sponsor"}),r.jsx(ce,{children:!e&&r.jsx(Pe,{...s,children:r.jsxs(ve.form,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"max-w-[828px] mx-auto px-5 md:mt-20 mt-10 mb-20 md:mb-[120px] flex flex-col gap-8",onSubmit:s.handleSubmit(i),children:[r.jsx(_,{label:L[N(n)].label_1,name:"company_name",control:s.control,error:a.company_name}),r.jsx(_,{label:L[N(n)].label_2,name:"rep_name",control:s.control,error:a.rep_name}),r.jsx(_,{label:L[N(n)].label_3,name:"job_title",control:s.control,error:a.job_title}),r.jsx(_,{label:L[N(n)].label_4,name:"country",control:s.control,error:a.country}),r.jsx(_,{label:L[N(n)].label_5,name:"email",control:s.control,error:a.email}),r.jsx(_,{label:L[N(n)].label_6,name:"phone",control:s.control,error:a.phone}),r.jsx(_,{label:L[N(n)].label_7,name:"website",control:s.control}),r.jsx(Ne,{control:s.control,name:"visa_support",render:({field:o})=>r.jsxs(B,{className:"space-y-5",children:[r.jsx(z,{className:"text-xl",children:L[N(n)].visa}),r.jsx(H,{children:r.jsxs(xe,{onValueChange:o.onChange,defaultValue:o.value,className:"flex flex-col space-y-4 ml-3",children:[r.jsxs(B,{className:"flex items-center space-x-5 space-y-0",children:[r.jsx(H,{children:r.jsx(Z,{value:"yes",checked:o.value==="yes"})}),r.jsx(z,{className:"text-base",children:L[N(n)].visa_radio})]}),r.jsxs(B,{className:"flex items-center space-x-5 space-y-0 ",children:[r.jsx(H,{children:r.jsx(Z,{value:"no",checked:o.value==="no"})}),r.jsx(z,{className:"text-base",children:L[N(n)].visa_radio_2})]})]})})]})}),r.jsx(q,{disabled:s.formState.isSubmitting,className:"mt-5",children:s.formState.isSubmitting?r.jsx(ze,{className:"animate-spin"}):L[N(n)].button})]})})}),e&&r.jsx(He,{delay:.3})]})}const Nr=w.object({name:w.string().min(2,"error"),email:w.string().email(),phone:w.string().min(8,"error"),company:w.string().min(2,"error"),msg:w.string().min(5,"error")}),_r={name:"",email:"",phone:"",company:"",msg:""},Rr=({className:n})=>{const{t:e}=de("contacts"),[t,s]=b.useState(!1),i=Le({resolver:Oe(Nr),defaultValues:_r});async function a(l){try{const c=await js(l);s(c)}catch(c){console.error("POST contact",c)}}const{errors:o}=i.formState;return r.jsx("div",{className:J("bg-primary rounded-[8px] py-8 px-6 ",n),children:r.jsx(Pe,{...i,children:r.jsxs("form",{onSubmit:i.handleSubmit(a),children:[r.jsx("h2",{className:"h2 !text-on_primary lg:mb-8 mb-6",children:e("title")}),r.jsxs("div",{className:"flex flex-col gap-8",children:[r.jsx(_,{onPrimary:!0,name:"name",control:i.control,label:e("name"),error:o.name}),r.jsxs("div",{className:"flex flex-col lg:flex-row gap-6",children:[r.jsx(_,{onPrimary:!0,name:"email",control:i.control,label:"Email",error:o.email}),r.jsx(_,{onPrimary:!0,name:"phone",control:i.control,label:e("phone"),error:o.phone})]}),r.jsx(_,{onPrimary:!0,name:"company",control:i.control,label:e("company"),error:o.name}),r.jsx(_,{onPrimary:!0,textArea:!0,name:"msg",label:e("message"),control:i.control,error:o.msg}),r.jsx(q,{disabled:i.formState.isSubmitting||t,className:"w-full h-12 overflow-hidden",variant:"secondary",children:t?e("submitted"):i.formState.isSubmitting?r.jsx(ys,{className:"animate-spin text-white"}):e("button")})]})]})})})};function Cr(){A();const{t:n}=de("contacts");return r.jsxs("div",{className:"flex flex-col gap-20 pt-10 md:pt-20",children:[r.jsx(ie,{children:r.jsxs("section",{className:"grid grid-cols-1 lg:grid-cols-2 gap-20 lg:gap-6",children:[r.jsx(Rr,{}),r.jsxs("div",{className:"p-6 bg-surface_container rounded-[8px]",children:[r.jsx("h2",{className:"h2 mb-10 xl:mb-8",children:n("title_2")}),r.jsxs("div",{className:"flex flex-col gap-20",children:[r.jsxs("div",{className:"flex items-center gap-6",children:[r.jsx("img",{src:"/contacts/map.svg",alt:"address"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xl mb-2",children:n("address")}),r.jsx("address",{className:"text-base normal not-italic",children:n("venue")})]})]}),r.jsxs("div",{className:"flex items-center gap-6",children:[r.jsx("img",{src:"/contacts/phone.svg",alt:"phone"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xl mb-2",children:n("phone")}),r.jsx("h4",{className:"text-base normal",children:"+99371871812; 99363719588"})]})]}),r.jsxs("div",{className:"flex items-center gap-6",children:[r.jsx("img",{src:"/contacts/email.svg",alt:"email"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xl mb-2",children:"Email:"}),r.jsx("h4",{className:"text-base normal",children:"contact@turkmenexpo.com"})]})]})]})]})]})}),r.jsx("section",{className:"relative w-full h-[300px] sm:h-[350px] md:h-[400px] lg:h-[600px]",children:r.jsx("iframe",{src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d1443.0869986358682!2d58.35620779177324!3d37.921200202365405!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3f7001fd7afd2a95%3A0x9ce9dca95ea4b87e!2z0JDQstC40LDQutCw0YHRgdCwINCw0LLQuNCw0LrQvtC80L_QsNC90LjQuCDCq9CR0LXQu9Cw0LLQuNCwwrsg0LIg0KLRg9GA0LrQvNC10L3QuNGB0YLQsNC90LU!5e0!3m2!1sru!2sru!4v1738063695919!5m2!1sru!2sru",className:"absolute inset-0 w-full h-full ",style:{border:0},allowFullScreen:!0,loading:"lazy"})})]})}const Tr=[{id:0,title:"Фото",titleEn:"Photo"},{id:1,title:"Видео",titleEn:"Video"}],Er=({className:n})=>{var j,v,k,R,O;A();const[e,t]=b.useState(0),{data:s,isPending:i,status:a}=ws(1),{data:o}=xt(1),[l,c]=b.useState(!1),[u,h]=b.useState({id:0,type:"photo"}),m=I(E=>E.lang),d=({id:E,type:T})=>{c(!0),h({id:E,type:T})},{t:f}=de("main"),[p,g]=b.useState(!1),x=E=>E===0&&i?r.jsx(ue,{}):r.jsx(ue,{});return console.log(a),r.jsxs(r.Fragment,{children:[r.jsx(ce,{children:l&&r.jsx(Ss,{activeItem:u,setActiveItem:h,setIsOpen:c})}),r.jsxs("section",{className:J("md:mb-[120px] mb-20",n),children:[r.jsx(ye,{title:m==="ru"?"Моменты":"Moments"}),r.jsx(ie,{className:"page-bottom md:pt-10 pt-6",children:r.jsxs("div",{className:"flex justify-center flex-col",children:[r.jsx(bt,{state:e,setState:t,data:Tr,className:"mb-6"}),e===0&&i?x(e):r.jsxs(r.Fragment,{children:[r.jsx("h3",{className:"md:text-3xl text-2xl mb-6",children:"TurkmenTextile Expo-2025"}),r.jsx("div",{className:"grid lg:grid-cols-4 lg:gap-y-4 lg:gap-x-6 md:gap-6 gap-4 grid-cols-2 place-items-center",children:e===0?(v=(j=s==null?void 0:s.photos)==null?void 0:j.slice(0,p?1e3:16))==null?void 0:v.map((E,T)=>{var C,K;return r.jsx("div",{onClick:()=>d({id:T,type:"photo"}),className:"cursor-pointer embla__slide basis-1/1 overflow-hidden",children:r.jsx("img",{src:((C=E==null?void 0:E.photo)==null?void 0:C.path)??"",alt:((K=E==null?void 0:E.photo)==null?void 0:K.file_name)??"photo",className:"size-full object-cover hover:scale-105 duration-300 transition-all"})},T)}):(k=o==null?void 0:o.videos)==null?void 0:k.map((E,T)=>{var C;return r.jsxs("div",{onClick:()=>d({id:T,type:"video"}),className:"cursor-pointer group embla__slide h-[155px] w-full basis-1/1 overflow-hidden relative",children:[r.jsx(ks,{fill:"white",size:20,color:"white",className:"absolute group-hover:scale-125 transition-all duration-300 top-1/2 z-10 left-1/2 -translate-x-1/2 -translate-y-1/2 "}),r.jsx("div",{className:"absolute top-0 left-0 size-full bg-[#2C57A752]/[32%]"}),r.jsx("img",{src:((C=E==null?void 0:E.video_photo)==null?void 0:C.path)??"",className:"size-full object-cover"})]},T)})})]}),((R=s==null?void 0:s.photos)==null?void 0:R.length)&&((O=s==null?void 0:s.photos)==null?void 0:O.length)>16&&!p&&r.jsx(q,{onClick:()=>g(!0),className:"mx-auto w-[288px] mt-10 text-on_surface",size:"lg",variant:"outline",children:f("media.button")})]})})]})]})},Lr=(n,e)=>{const{data:t,isPending:s}=Ke({queryKey:["news-inner",n,e],queryFn:()=>Ns(n,e),select:({data:i})=>i.data});return{data:t,isPending:s}};function Or(){var o;const{id:n}=$s(),e=I(l=>l.lang),t=Number(n);A(t);const{data:s,isPending:i}=Lr(t,e),{data:a}=vt(e);return i?r.jsx(ue,{}):r.jsxs(ie,{className:"pt-10 pb-20 md:pt-20 md:pb-[120px]",children:[r.jsxs("section",{className:"max-w-[888px] py-5 mx-auto flex flex-col md:gap-10 gap-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-on_surface md:text-[32px] text-3xl leading-10 mb-2",children:s==null?void 0:s.title}),r.jsx("h4",{children:s==null?void 0:s.published_at.slice(0,10).split("-").reverse().join(".")})]}),r.jsx("div",{className:"w-full h-[300px] md:h-[480px]",children:r.jsx("img",{src:((o=s==null?void 0:s.featured_images[0])==null?void 0:o.path)||"",alt:"news image",className:"size-full object-cover"})}),r.jsx("div",{dangerouslySetInnerHTML:{__html:(s==null?void 0:s.content)??""},className:"news-inner md:text-lg flex flex-col gap-6 text-base md:medium normal text-on_surface_v"})]}),r.jsx("hr",{className:"mt-10 md:mb-20 mb-[60px]"}),r.jsxs("section",{children:[r.jsx("h2",{className:"h2 mb-6",children:e==="ru"?"Читайте также:":"Read more:"}),r.jsx("div",{className:"grid md:grid-cols-3 grid-cols-1 gap-6",children:a==null?void 0:a.filter(l=>l.id!==t).slice(0,3).map(l=>b.createElement(yt,{...l,key:l.title}))})]})]})}function Pr(){A();const n=I(s=>s.lang),{data:e,isPending:t}=vt(n);return t?r.jsx(ue,{}):r.jsxs(ie,{className:"page-padding",children:[r.jsx("h1",{className:"text-center md:text-5xl text-3xl mb-10",children:n==="ru"?"Новости":"News"}),r.jsx("div",{className:"grid md:grid-cols-3 grid-cols-1 gap-6",children:e==null?void 0:e.map(s=>b.createElement(yt,{...s,key:s.title}))})]})}const Fr=()=>{const n=I(s=>s.lang),{data:e,isPending:t}=Ke({queryKey:["participants",n],queryFn:()=>_s(n),select:({data:s})=>s.data});return{data:e,isPending:t}},Ir=({className:n})=>{var u,h,m,d,f;A();const e=I(p=>p.lang),{data:t,isPending:s}=Fr(),i={company:e==="ru"?"Название компании":"Company name",country:e==="ru"?"Страна":"Country",industry:e==="ru"?"Сфера деятельности":"Industry"},[a,o]=b.useState(0),l=(m=t==null?void 0:t[0])==null?void 0:m.participants.concat((u=t==null?void 0:t[1])==null?void 0:u.participants,(h=t==null?void 0:t[2])==null?void 0:h.participants),c=t==null?void 0:t.filter(p=>a===1?p.id===3:a===2?p.id===1:p.id===2);return console.log(a),r.jsx(ie,{children:r.jsxs("section",{className:J("page-padding overflow-x-hidden",n),children:[r.jsx("h1",{className:"text-center md:text-5xl text-3xl mb-4",children:e==="ru"?"Список участников":"List of participants"}),r.jsx(bt,{state:a,setState:o,className:"mb-6 md:w-fit"}),r.jsxs("div",{className:"p-2 sm:p-0 bg-surface_container overflow-hidden",children:[r.jsxs("div",{className:"sm:flex items-center hidden h-[52px] border-b border-outline_v",children:[r.jsx("h3",{className:"flex-[0_0_45.54%] pl-4",children:i==null?void 0:i.company}),r.jsx("h3",{className:"flex-[0_0_19.80%]",children:i==null?void 0:i.country}),r.jsx("h3",{className:"flex-[0_0_34.65%]",children:i==null?void 0:i.industry})]}),s?r.jsx(ue,{}):a===0?l==null?void 0:l.map((p,g,x)=>r.jsx(Xe,{...p,arr:x==null?void 0:x.length,index:g,image:p.image??{path:""},image_country:p.image_country??{path:""}})):(f=(d=c==null?void 0:c[0])==null?void 0:d.participants)==null?void 0:f.map((p,g,x)=>r.jsx(Xe,{...p,arr:x==null?void 0:x.length,index:g,image:p.image??{path:""},image_country:p.image_country??{path:""}}))]})]})})},Ar=w.object({space_package:w.string(),company_name:w.string().min(3,{message:"Название компании должно быть не менее 3 символов"}),rep_name:w.string().min(3,{message:"Имя представителя должно быть не менее 3 символов"}),job_title:w.string().min(3,{message:"Должность должна быть не менее 3 символов"}),participants_number:w.preprocess(n=>Number(n),w.number().min(1,"Укажите количество участников")),country:w.string().min(3,{message:"Название страны должно быть не менее 3 символов"}),email:w.string().email({message:"Укажите корректный email"}),phone:w.string().min(8,{message:"Номер телефона должен быть не менее 8 символов"}),website:w.string().optional(),visa_support:w.string().optional()}),$r={space_package:"space",company_name:"",rep_name:"",job_title:"",participants_number:1,country:"",email:"",phone:"",website:"",visa_support:""};function Dr(){A();const n=I(l=>l.lang),[e,t]=b.useState(!1),s=Le({resolver:Oe(Ar),defaultValues:$r}),i=async l=>{await Rs(l)&&t(!0)};b.useEffect(()=>{window.scrollTo({behavior:"smooth",top:0})},[]);const{errors:a}=s.formState,o=N(n);return r.jsxs("div",{children:[r.jsx(ye,{title:L[N(n)].cover}),r.jsx(ce,{children:!e&&r.jsx(Pe,{...s,children:r.jsxs(ve.form,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"max-w-[828px] px-5 mx-auto mt-20 mb-[120px] flex flex-col gap-8",onSubmit:s.handleSubmit(i),children:[r.jsx(Ne,{control:s.control,name:"space_package",render:({field:l})=>r.jsxs(B,{className:"space-y-5",children:[r.jsx(z,{className:"text-xl",children:L[o].h2}),r.jsx(H,{children:r.jsxs(xe,{onValueChange:l.onChange,defaultValue:l.value,className:"flex flex-col space-y-4 ml-3",children:[r.jsxs(B,{className:"flex items-center space-x-5 space-y-0",children:[r.jsx(H,{children:r.jsx(Z,{value:"space",checked:l.value==="space"})}),r.jsx(z,{className:"text-base",children:L[o].radio})]}),r.jsxs(B,{className:"flex items-center space-x-5 space-y-0",children:[r.jsx(H,{children:r.jsx(Z,{value:"package",checked:l.value==="package"})}),r.jsx(z,{className:"text-base",children:L[o].radio_2})]})]})})]})}),r.jsx(_,{label:L[o].label_1,name:"company_name",control:s.control,error:a.company_name}),r.jsx(_,{label:L[o].label_2,name:"rep_name",control:s.control,error:a.rep_name}),r.jsx(_,{label:L[o].label_3,name:"job_title",control:s.control,error:a.job_title}),r.jsx(_,{label:L[o].number_of_participants,type:"number",name:"participants_number",control:s.control,error:a.participants_number}),r.jsx(_,{label:L[o].label_4,name:"country",control:s.control,error:a.country}),r.jsx(_,{label:L[o].label_5,name:"email",control:s.control,error:a.email}),r.jsx(_,{label:L[o].label_6,name:"phone",control:s.control,error:a.phone}),r.jsx(_,{label:L[o].label_7,name:"website",control:s.control}),r.jsx(Ne,{control:s.control,name:"visa_support",render:({field:l})=>r.jsxs(B,{className:"space-y-5",children:[r.jsx(z,{className:"text-xl",children:L[o].visa}),r.jsx(H,{children:r.jsxs(xe,{onValueChange:l.onChange,defaultValue:l.value,className:"flex flex-col space-y-4 ml-3",children:[r.jsxs(B,{className:"flex items-center space-x-5 space-y-0",children:[r.jsx(H,{children:r.jsx(Z,{value:"yes",checked:l.value==="yes"})}),r.jsx(z,{className:"text-base",children:L[o].visa_radio})]}),r.jsxs(B,{className:"flex items-center space-x-5 space-y-0 ",children:[r.jsx(H,{children:r.jsx(Z,{value:"no",checked:l.value==="no"})}),r.jsx(z,{className:"text-base",children:L[o].visa_radio_2})]})]})})]})}),r.jsx(q,{disabled:s.formState.isSubmitting,className:"mt-5",children:s.formState.isSubmitting?r.jsx(ze,{className:"animate-spin"}):L[o].button})]})})}),e&&r.jsx(He,{delay:.3})]})}const Gt=()=>{var p;const{t:n}=de("main"),e=I(g=>g.lang),{pathname:t}=Ue(),[s]=jt({loop:!0},[Cs({delay:5e3,stopOnInteraction:!1})]),{title:i,texts:a,button:o,button2:l}=n("impressions.hero",{returnObjects:!0}),{title2:c,texts2:u}=n("impressions.hero",{returnObjects:!0}),h=(g,x)=>t==="/impressions"?g:x,m=(g,x)=>t==="/impressions"?g:x,d={en:["https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng1.jpg","https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng2.jpg"],ru:["https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru1.jpg","https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru2.jpg"]},f=()=>e==="ru"?d.ru:d.en;return r.jsxs("section",{className:"",children:[t==="/impressions-tm"?r.jsx("div",{ref:s,className:"embla overflow-hidden",children:r.jsx("div",{className:"flex",children:f().map((g,x)=>r.jsx("img",{src:g,alt:"imperssions",className:"w-full object-cover flex-[0_0_100%] object-top max-h-[610px]"},x))})}):r.jsx("img",{src:n("impressions.banner")}),r.jsx("h1",{className:"absolute opacity-0 top-0 left-0",children:"Модные показы"}),r.jsx("div",{className:"bg-[url('/impressions-bg.png')]",children:r.jsxs(ie,{className:"md:py-20 py-10",children:[r.jsx("h2",{className:"md:text-5xl text-2xl leading-[120%] md:mb-10 mb-6",children:h(i,c)}),r.jsx("div",{className:"text-on_surface_v flex flex-col gap-3",children:(p=m(a,u))==null?void 0:p.map((g,x)=>r.jsx("p",{className:"md:text-lg !normal",children:g},x))}),r.jsxs("div",{className:"flex md:flex-row flex-col items-center gap-6 mt-6",children:[r.jsx(Ze,{target:"_blank",to:"https://turkmentextile.turkmenexpo.com/app/storage/app/media/ICS%20file/TurkmenTextile%20Expo-2025.ics",className:"w-full",children:r.jsx(q,{size:"sm",className:"w-full",children:o})}),r.jsx(Ze,{to:e==="ru"?"https://turkmentextile.turkmenexpo.com/app/storage/app/media/agenda/agenda_ru.pdf":"https://turkmentextile.turkmenexpo.com/app/storage/app/media/agenda/agenda_en.pdf",target:"_blank",className:"w-full",children:r.jsx(q,{size:"sm",className:"w-full",children:l})})]})]})})]})},Wt=()=>{var h,m,d;const{t:n}=de("main"),{pathname:e}=Ue(),[t,s]=b.useState(1),{data:i}=xt(1),o=[...(i==null?void 0:i.videos.filter(f=>f.sections[0]==="fashion_shows"))??[]].sort((f,p)=>(f==null?void 0:f.fashion_shows_order_id)+(p==null?void 0:p.fashion_shows_order_id)),{videosTitle:l,videosTitle2:c}=n("impressions",{returnObjects:!0}),u=()=>e!=="/impressions";return r.jsx("section",{className:"bg-[url('/impressions/videos-block-bg.png')] md:py-20 py-10",children:r.jsxs(ie,{children:[r.jsx("h2",{className:"mb-10 md:text-5xl text-2xl leading-[120%] text-white text-center",children:u()?l:c}),r.jsxs("div",{className:"flex flex-col lg:flex-row lg:mx-20 gap-4 text-white overflow-hidden h-fit lg:h-[490px]",children:[r.jsxs("div",{className:"bg-gray_10 flex-auto p-2 rounded-[8px] border border-gray_09 flex flex-col justify-center h-full",children:[r.jsx("div",{className:"max-h-[450px]",children:r.jsx("video",{src:(d=(m=(h=i==null?void 0:i.videos)==null?void 0:h[t])==null?void 0:m.video)==null?void 0:d.path,muted:!0,controls:!0,autoPlay:!0,loop:!0,className:"w-full size-full mb-2 rounded"})}),r.jsx("div",{className:"flex items-center justify-between mt-auto"})]}),r.jsx("div",{className:"bg-gray_10 flex-[0_0_20%] px-2 pt-2 rounded-[8px] border border-gray_09 flex flex-col h-full",children:r.jsx("div",{className:"flex flex-col gap-2 w-full overflow-y-auto overflow-x-hidden h-full",children:o==null?void 0:o.map((f,p)=>{var g;return r.jsx("div",{onClick:()=>s(p+1),className:"basis-[70px] w-[80%] cursor-pointer mx-auto overflow-hidden",children:r.jsx("img",{src:(g=f==null?void 0:f.video_photo)==null?void 0:g.path,alt:"",className:"object-cover size-full rounded-tl hover:scale-105 transition-transform rounded-bl"})},p)})})})]})]})})},Mr=n=>{const e=I(i=>i.lang),{data:t,isPending:s}=Ke({queryKey:["designers",e],queryFn:()=>Ts(e,n),select:({data:i})=>i.data});return{data:t,isPending:s}},qt=()=>{const{pathname:n}=Ue(),e=()=>n!=="/impressions",{data:t,isPending:s}=Mr(e()?2:1),[i,a]=jt({align:"center",skipSnaps:!0,slidesToScroll:2,dragFree:!0}),[o,l]=b.useState(0),{t:c}=de("main"),[u,h]=b.useState(!1),[m,d]=b.useState(!0),f=b.useCallback(k=>{a&&a.scrollTo(k)},[a]);b.useEffect(()=>{if(!a)return;const k=()=>{l(a==null?void 0:a.selectedScrollSnap()),h(a.canScrollPrev()),d(a.canScrollNext())};return a.on("select",k),()=>{a.off("select",k)}},[a]);const{title:p,text:g,title2:x,text2:j}=c("impressions.designers",{returnObjects:!0}),v=[...(t==null?void 0:t.designers)??[]].sort((k,R)=>(k==null?void 0:k.order_id)-(R==null?void 0:R.order_id));return console.log(v),r.jsx("section",{className:"md:py-20 py-10",children:r.jsxs(ie,{className:"flex flex-col md:gap-10 gap-6",children:[r.jsx("h2",{className:"md:text-5xl text-2xl leading-[120%]",children:e()?p:x}),r.jsx("p",{className:"md:text-xl text-lg normal text-on_surface_v",children:e()?g:j}),r.jsxs("div",{ref:i,className:"embla",children:[r.jsx("div",{className:"flex embla__container",children:s?r.jsx(ue,{}):v==null?void 0:v.map((k,R)=>r.jsx(Es,{...k,className:"embla__slide flex-[0_0_714px] mr-4"},R))}),r.jsxs("div",{className:"flex items-center justify-center gap-4 mt-6",children:[r.jsx("button",{onClick:()=>a==null?void 0:a.scrollPrev(),className:J("size-12 flex items-center justify-center",!u&&"opacity-20 pointer-events-none"),children:r.jsx(Ls,{})}),r.jsx("div",{className:"flex items-center gap-2",children:[...Array(v!=null&&v.length?Math.round((v==null?void 0:v.length)/2):5)].map((k,R)=>r.jsx("div",{onClick:()=>f==null?void 0:f(R),className:J("w-5 h-1 rounded-[2px] cursor-pointer",o===R?"bg-teritary":"bg-on_surface_v")},R))}),r.jsx("button",{onClick:()=>a==null?void 0:a.scrollNext(),className:J("size-12 flex items-center justify-center",!m&&"opacity-20 pointer-events-none"),children:r.jsx(Os,{})})]})]})]})})};function Vr(){return A(),r.jsxs("div",{className:"overflow-x-hidden",children:[r.jsx(Gt,{}),r.jsx(Wt,{}),r.jsx(qt,{})]})}function Br(){return A(),r.jsxs("div",{className:"overflow-x-hidden",children:[r.jsx(Gt,{}),r.jsx(Wt,{}),r.jsx(qt,{})]})}const zr=[{element:r.jsx(Bi,{}),path:"/",children:[{element:r.jsx(zi,{}),path:"",errorElement:r.jsx(V,{})},{element:r.jsx(jr,{}),path:"about",errorElement:r.jsx(V,{})},{element:r.jsx(yr,{}),path:"B2B-B2G",errorElement:r.jsx(V,{})},{element:r.jsx(kr,{}),path:"become-sponsor",errorElement:r.jsx(V,{})},{element:r.jsx(Dr,{}),path:"stend-form",errorElement:r.jsx(V,{})},{element:r.jsx(Cr,{}),path:"contacts",errorElement:r.jsx(V,{})},{element:r.jsx(Pr,{}),path:"news",errorElement:r.jsx(V,{})},{element:r.jsx(Or,{}),path:"news/:id",errorElement:r.jsx(V,{})},{element:r.jsx(Ir,{}),path:"participants",errorElement:r.jsx(V,{})},{element:r.jsx(Er,{}),path:"media",errorElement:r.jsx(V,{})},{element:r.jsx(Vr,{}),path:"impressions",errorElement:r.jsx(V,{})},{element:r.jsx(Br,{}),path:"impressions-tm",errorElement:r.jsx(V,{})}]}],Hr=Ds(zr),Kr=new Ps;Bs.createRoot(document.getElementById("root")).render(r.jsx(b.StrictMode,{children:r.jsx(Fs,{client:Kr,children:r.jsx(Ms,{router:Hr})})}));